WO2022033157A1 - Network attack defense method, and cp device and up device - Google Patents

Network attack defense method, and cp device and up device Download PDF

Info

Publication number
WO2022033157A1
WO2022033157A1 PCT/CN2021/099503 CN2021099503W WO2022033157A1 WO 2022033157 A1 WO2022033157 A1 WO 2022033157A1 CN 2021099503 W CN2021099503 W CN 2021099503W WO 2022033157 A1 WO2022033157 A1 WO 2022033157A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
watermark
message
dial
control message
Prior art date
Application number
PCT/CN2021/099503
Other languages
French (fr)
Chinese (zh)
Inventor
余舟毅
花荣荣
彭涛
王晓凯
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022033157A1 publication Critical patent/WO2022033157A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1458Denial of Service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a network attack defense method, a CP device, and a UP device.
  • CU separation refers to a network architecture in which the control plane (CP) and the user plane (UP) are decoupled.
  • CP control plane
  • UP user plane
  • the CP and UP are located on different hardware devices, or the CP and UP are located on the same hardware device and have separate functions.
  • the CU separation architecture has become the next hop in the evolution of many communication systems, and has been recognized by mainstream manufacturers, operators and standards organizations.
  • the embodiments of the present application provide a network attack defense method, a CP device, and a UP device, which help to ensure the security of the CP device.
  • the technical solution is as follows:
  • a method for defending against network attacks is provided.
  • the method is applied in a communication system in which the CP and UP are separated.
  • the method is described from the perspective of the CP device.
  • the CP device responds to a dial-up message at a rate that meets the requirements.
  • Abnormal condition the CP device generates a first control message, the first control message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device;
  • the CP device sends the UP device to the the first control message;
  • the CP device identifies the attack packet in the packet flow according to the watermark; the CP device discards the attack packet.
  • the CP device when the CP device finds that the receiving rate of the dial-up packet is abnormal, it considers that it is under a network attack. In this case, the CP device will generate and deliver a control message to the UP device, so that the control message can pass the control message. Notify the UP device to carry the watermark when sending dial-up packets, so as to realize the function that the CP controls the UP to enable the watermark to be turned on. Since it is difficult for an attacker to know the watermark negotiated between the CP device and the UP device, the attacker cannot construct an attack packet containing the watermark. Therefore, when the CP device receives a packet stream, it can determine whether the packet contains a watermark or not.
  • the attack packet is discarded. Since the attack packets are discarded by the CP device, the processing of the attack packets is prevented from consuming the processing resources of the CP device. It can be seen that this method can effectively resist network attacks and ensure the security of the CP device.
  • the watermark includes a first virtual extended local area network identifier (VXLAN network identifier, VNI), the packet stream includes a first packet, and the CP device identifies in the packet stream according to the watermark.
  • the attack packet includes: the CP device determines that the first packet is a non-attack packet according to the first packet including the first VNI.
  • the action of the CP device to determine the attack packet according to the first VNI can verify the VNI in the received VXLAN packet by multiplexing the Virtual Extensible Local Area Network (VXLAN) forwarding process.
  • VXLAN Virtual Extensible Local Area Network
  • the watermark includes a first random number
  • the packet stream includes a second packet
  • the CP device identifies the attack packet in the packet stream according to the watermark, including: the CP device according to The second packet includes the first random number to determine that the second packet is a non-attack packet.
  • the CP device can effectively distinguish whether the packet is an attack packet sent by an attacker or a non-attack packet (for example, a normal packet sent by the UP device) according to whether the packet contains the first random number, thereby effectively defending against attacks. cyberattacks.
  • the watermark includes a first timestamp, and the first timestamp is used to indicate a time point of synchronization between the CP device and the UP device, and the packet flow includes a third packet, so
  • the CP device can effectively distinguish whether the packet is an attack packet sent by an attacker or a non-attack packet (for example, a normal packet sent by an UP device) according to whether the packet contains the first timestamp, thereby effectively defending against attacks. cyberattacks.
  • the time synchronization mechanism between the CP device and the UP device can be multiplexed, thereby reducing the implementation complexity.
  • the watermark includes a first message authentication code
  • the packet stream includes a fourth packet
  • the CP device identifies an attack packet in the packet stream according to the watermark, including: the CP device It is determined that the fourth packet is a non-attack packet according to the fourth packet including the first message authentication code.
  • the CP device and the UP device use the message authentication code as a watermark for verifying the message, and the message authentication code needs to be obtained through hash operation, the security is high, and it is difficult to forge, so the ability to resist network attacks is strong. .
  • the first control message includes the watermark; or, the first control message includes watermark type information corresponding to the watermark; or, the first control message includes parameters related to generating the watermark.
  • the first control message is a control plane and user plane separated protocol (control plane and user plane separated protocol, CUSP) message
  • the CUSP message includes a watermark type length value (type length value, TLV)
  • the watermark The TLV is the TLV carrying the watermark or the parameter.
  • the CP device issues a watermark to the UP device through the CUSP
  • the CP device and the UP device can be multiplexed to realize the relevant architecture of CUSP communication, thereby improving the usability of the technical solution.
  • the first control message is a Packet Forwarding Control Protocol (Packet Forwarding Control Protocol, PFCP) message
  • the PFCP message includes a watermark information element (information element, IE)
  • the watermark IE carries the watermark or IE of the parameter.
  • the CP device issues a watermark to the UP device through the PFCP
  • the CP device and the UP device can be multiplexed to realize the related architecture of the PFCP communication, thereby improving the usability of the technical solution.
  • the first control message is a PFCP node message; or, the first control message is a PFCP session message.
  • the packet stream includes a fifth packet
  • the CP device identifies the attack packet in the packet stream according to the watermark, including: the CP device does not include all the attack packets according to the fifth packet.
  • the watermark determines that the fifth packet is an attack packet.
  • the method further includes:
  • the CP device In response to the reception rate of the dial-up message meeting the normal condition, the CP device generates a second control message, and the second control message is used to instruct the UP device to cancel carrying the watermark when sending the dial-up message to the CP device;
  • the CP device sends the second control message to the UP device.
  • the CP device confirms that the network attack is stopped when it finds that the receiving rate of the dial-up packets is normal. In this case, the CP device will generate and send a control message to the UP device, so as to notify the UP device through the control message. The UP device cancels the carrying of the watermark when sending the dial-up message, thus supporting the function of the CP to control the UP to turn off the watermark.
  • the communication system is a broadband network gateway (broadband network gateway, BNG) system or a broadband remote access server (virtual broadband remote access server, BRAS) system.
  • BNG broadband network gateway
  • BRAS broadband remote access server
  • a network attack defense method is provided.
  • the method is applied in a communication system in which the CP and the UP are separated.
  • the method is described from the perspective of the UP device.
  • the UP device receives the first information from the CP device.
  • a control message, the first control message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device;
  • the UP device carries the watermark in the dial-up message according to the first control message the watermark;
  • the UP device sends a dial-up message including the watermark to the CP device.
  • the UP device sends the dial-up message containing the watermark to the CP device by carrying the watermark in the dial-up message when receiving the control message sent by the CP device, which helps the CP device to base on the Whether the packet contains a watermark can effectively distinguish whether the packet is an attack packet sent by an attacker or a normal packet sent by an UP device, and then discard the attack packet. It can be seen that this method can effectively resist network attacks and ensure the security of the CP device.
  • the watermark includes a first virtual extended local area network identifier VNI.
  • the watermark includes a first random number.
  • the watermark includes a first timestamp.
  • the watermark includes a first message authentication code.
  • the first control message includes the watermark; or, the first control message includes watermark type information corresponding to the watermark; or, the first control message includes parameters related to generating the watermark.
  • the first control message is a control and forwarding separation protocol CUSP message
  • the CUSP message includes a watermark type length value TLV
  • the watermark TLV is a TLV carrying the watermark or the parameter.
  • the first control message is a packet forwarding control protocol PFCP message
  • the PFCP message includes a watermark information element IE
  • the watermark IE is an IE that carries the watermark or the parameter.
  • the first control message is a PFCP node message; or, the first control message is a PFCP session message.
  • the communication system is a broadband network gateway BNG system or a broadband remote access server BRAS system.
  • the method further includes:
  • the UP device receives a second control message from the CP device, where the second control message is used to instruct the UP device to cancel carrying a watermark when sending a dial-up message to the CP device;
  • the UP device sends, according to the second control message, a dial-up message that does not include a watermark to the CP device.
  • a CP device in a third aspect, is provided, and the CP device has a function corresponding to the first aspect or any optional manner of the first aspect.
  • the CP device includes at least one unit, and the at least one unit is configured to implement the method provided in the first aspect or any optional manner of the first aspect.
  • the units in the CP device are implemented in software, and the units in the CP device are program modules. In another example, the units in the CP device are implemented by hardware or firmware.
  • the CP device are implemented in software, and the units in the CP device are program modules. In another example, the units in the CP device are implemented by hardware or firmware.
  • a UP device in a fourth aspect, is provided, and the UP device has a function corresponding to the second aspect or any optional manner of the second aspect.
  • the UP device includes at least one unit, and the at least one unit is configured to implement the method provided in the second aspect or any optional manner of the second aspect.
  • the units in the UP device are implemented in software, and the units in the UP device are program modules. In another example, the units in the UP device are implemented by hardware or firmware.
  • the UP device are implemented in software, and the units in the UP device are program modules. In another example, the units in the UP device are implemented by hardware or firmware.
  • a fifth aspect provides a CP device, the CP device includes a processor and a communication interface, and the processor is used to execute an instruction, so that the CP device executes the above-mentioned first aspect or any optional manner of the first aspect.
  • the communication interface is used for receiving or sending a message.
  • a UP device in a sixth aspect, includes a processor and a communication interface, the processor is configured to execute an instruction, so that the UP device executes the above-mentioned second aspect or any optional manner of the second aspect.
  • the communication interface is used for receiving or sending a message.
  • a computer-readable storage medium where at least one instruction is stored in the storage medium, and the instruction is read by a processor to cause the CP device to execute the first aspect or any optional manner of the first aspect. provided method.
  • a computer-readable storage medium is provided, and at least one instruction is stored in the storage medium, and the instruction is read by a processor to cause the UP device to execute the second aspect or any optional manner of the second aspect. provided method.
  • a computer program product comprising computer instructions stored in a computer-readable storage medium.
  • the processor of the CP device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the CP device performs the method provided in the first aspect or any optional manner of the first aspect.
  • a computer program product comprising computer instructions stored in a computer-readable storage medium.
  • the processor of the UP device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the UP device performs the method provided in the second aspect or any optional manner of the second aspect.
  • a chip is provided, when the chip runs on a CP device, the CP device is made to execute the method provided in the first aspect or any optional manner of the first aspect.
  • a twelfth aspect provides a chip that, when the chip runs on a UP device, enables the UP device to perform the method provided in the second aspect or any optional manner of the second aspect.
  • a thirteenth aspect provides a CP device, where the CP device includes: a main control board and an interface board, and further, may also include a switching network board.
  • the CP device is configured to execute the method in the first aspect or any possible implementation manner of the first aspect.
  • the CP device includes a unit for executing the method in the first aspect or any possible implementation manner of the first aspect.
  • a fourteenth aspect provides an UP device, where the UP device includes: a main control board and an interface board, and further, may also include a switching network board.
  • the UP device is configured to perform the method of the second aspect or any possible implementation of the second aspect.
  • the UP device includes means for performing the method in the second aspect or any possible implementation of the second aspect.
  • a fifteenth aspect provides a communication system in which CP and UP are separated, and the communication system includes a CP device and a UP device.
  • the communication system includes the CP device provided in any one of the third aspect, the fifth aspect, and the thirteenth aspect, and the communication system includes any one of the fourth aspect, the sixth aspect, and the fourteenth aspect.
  • FIG. 1 is a schematic diagram of the architecture of a CU separation system provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of the working principle of a BNG system with CU separation provided by an embodiment of the present application;
  • FIG. 3 is a schematic structural diagram of a communication system provided by an embodiment of the present application.
  • FIG. 4 is a functional architecture diagram inside a CP device provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of a method for defending a network attack provided by an embodiment of the present application
  • FIG. 6 is a schematic diagram of a CP device and a UP device defending against network attacks according to an embodiment of the present application
  • FIG. 7 is a schematic diagram of the format of a dial-up message including a watermark provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of the format of a dial-up message including a watermark provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of the format of a dial-up message including a watermark provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of the format of a dial-up message including a watermark provided by an embodiment of the present application
  • FIG. 11 is a schematic structural diagram of a CP device 400 provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of a UP device 500 provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a device 600 provided by an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of a device 700 provided by an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a communication system 800 provided by an embodiment of the present application.
  • CU separation refers to the network architecture in which CP and UP are decoupled. CU separation includes, but is not limited to, implementation A and implementation B described below.
  • control plane and the forwarding plane are located on different hardware devices.
  • the CP device and the UP device are two separate and different devices.
  • the CP device and the UP device are distributed in different locations.
  • the CP device is located in the data center of the cloud, and the UP device is deployed in a suitable location in the network according to the requirements. In this way, the deployment of the control plane and the forwarding plane is more flexible.
  • control plane and the forwarding plane are located on the same hardware device and have separate functions.
  • the physical entity of the CP device and the physical entity of the UP device are the same device.
  • the CP device and the UP device run in the same host, the same server or the same terminal.
  • both the CP device and the UP device are implemented through virtualization technology.
  • the CP device is called, for example, a virtual CP (virtual CP, vCP), and the UP device is called, for example, a virtual UP (virtual UP, vUP).
  • the CP device is a virtual machine
  • the UP device is a virtual router or virtual switch.
  • both the CP device and the UP device are implemented based on a general physical server combined with the NFV technology, and the CP device and the UP device are two different virtualized network functions (VNFs).
  • VNFs virtualized network functions
  • both the CP device and the UP device are network elements virtualized through the X86 server.
  • the CP device is implemented by a virtualization technology
  • the UP device is implemented by a traditional network device.
  • the UP device is called, for example, a physical UP (physical UP, pUP).
  • the CP device has a one-to-many relationship with the UP device, that is, one CP device is used to control multiple UP devices.
  • there is a one-to-one correspondence between CP devices and UP devices that is, one CP device is used to control one UP device.
  • the CU-separated communication system includes multiple UP devices.
  • a plurality of UP devices are distributed in different locations in the communication system where the CU is separated.
  • multiple UP devices in a communication system where CUs are separated cooperate to share forwarding tasks based on a distributed architecture.
  • CU separation can have different names. For example, different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for "CU separation".
  • CU separation may also sometimes be referred to as “control and forwarding separation”, “forwarding control separation”, “control plane and user plane separation”, “control and user separation”, and the like.
  • CP can have different names. For example, different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for "CP”.
  • CP may also sometimes be referred to as "CP function (CPF)" or "CP face”.
  • CPF CP function
  • CP face CP face
  • CP device refers to any device that implements CP functionality.
  • UP can have a different name.
  • different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for "UP”.
  • UP may also sometimes be referred to as “UP function (UPF)” or "UP face”.
  • UPF UP function
  • UP face is used interchangeably herein.
  • UP device refers to any device that implements UP functionality.
  • BNG Broadband network gateway
  • a BNG is a telecom network element device used by operators for broadband access, and is used to undertake the function of connecting user equipment to a broadband network.
  • BNG is mainly responsible for access authentication and Internet Protocol (IP) address allocation.
  • IP Internet Protocol
  • FIG. 1 is an example illustrating the architecture of the CU-separated BNG system.
  • the CU-separated BNG system extracts and concentrates the user management functions on multiple BNG devices to form CP devices.
  • the BNG devices retain routing and forwarding functions to form UP devices.
  • the CU-separated BNG system has the advantages brought by the CU-separated architecture.
  • a BNG system separated by a CU can have multiple UP devices, and the CP device schedules multiple UP devices to process traffic forwarding tasks, and the CP device allocates resources to multiple UP devices.
  • the utilization and reliability of the equipment of the BNG system under the separation architecture can be greatly improved.
  • the CU-separated BNG system has become the next hop in the evolution of BNG, and has been fully recognized by mainstream BNG manufacturers, operators and standards organizations.
  • RFC 8772 in the request for comments (RFC, a series of numbered documents) of the Internet Engineering Task Force (IETF) group defines the architecture of CU-separated BNG systems and CP devices
  • the control interface with UP equipment, Broadband Forum (Boardband Forum, BBF) in TR-384 defines the basic architecture of the CU-separated BNG system
  • in TR-459 defines the module function definition and interface of the CU-separated BNG system definition etc.
  • the "BNG system with CU separation” may have different names.
  • different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for the "BNG system with CU separation”.
  • the term "CU-disaggregated BNG system” may sometimes be referred to as “disaggregated BNG system (disaggregated BNG, DBNG)", and correspondingly, the CP device in the CU-disaggregated BNG system may be referred to as DBNG-CP, CU The UP device in the separate BNG system may be referred to as DBNG-UP.
  • CU-separated BNG system may also sometimes be referred to as a "virtual broadband network gateway (virtual BNG, vBNG) control plane and user plane separation system (control plane and user plane separation vBNG, CUPS vBNG)", That is, “vBNG CU system”, correspondingly, the CP device in the CU-separated BNG system may be referred to as vBNG-CP, and the UP device in the CU-separated BNG system may be referred to as vBNG-UP.
  • vBNG-CP the CP device in the CU-separated BNG system
  • UP device in the CU-separated BNG system may be referred to as vBNG-UP.
  • CU-separated BNG system may also sometimes be referred to as “virtual broadband remote access server (vBRAS) CU system", that is, “vBRAS CU system”, correspondingly, the CU-separated
  • vBRAS-CP virtual broadband remote access server
  • UP device in the CU-separated BNG system may be referred to as vBRAS-UP.
  • DBNG "vBNG CU system”
  • vBRAS CU system are used interchangeably herein.
  • FIG. 2 the working principle of the BNG system with CU separation is shown in FIG. 2 , including the following S101 to S107 .
  • S101 Centrally configure the BNG service on the CP device, and configure the routing service on the UP device.
  • the CP device delivers part of the configuration information of the BNG to the UP device through a management interface (management interface, Mi) interface.
  • the home terminal initiates dialing, and the original dialing message is transmitted to the UP device.
  • the UP device encapsulates the original dial-up packet according to the encapsulation format corresponding to the control packet redirect interface (CPRi) interface, and sends the encapsulated dial-up packet to the CP device for processing.
  • the CP device generates a response packet according to the dial-up packet, and sends the response packet to the UP device through the CPRi interface. After the UP device decapsulates the response packet, it responds to the user.
  • CPRi control packet redirect interface
  • the home terminal is, for example, a customer premise equipment (customer premise equipment, CPE).
  • the original dial-up message is, for example, a point-to-point protocol over ethernet (point-to-point protocol over ethernet, PPPoE) message or a dynamic host configuration protocol (dynamic host configuration protocol, DHCP) message.
  • PPPoE dial-up message is, for example, PPPOE Active Discovery Initiation (PPOE Active Discovery Initiation, PADI).
  • PADI PPPOE Active Discovery Initiation
  • the DHCP dial-up message is, for example, a DHCP discover message.
  • the CP device interacts with a remote user dialing authentication service (remote authentication dial in user service, RADIUS) server to authenticate and authorize the user.
  • RADIUS remote authentication dial in user service
  • the CP device After the user dials successfully, the CP device sends the user forwarding entry to the UP device through a state control interface (state control interface, SCi) interface.
  • state control interface state control interface
  • the CP device uses the SCi interface to control the UP device to advertise routes to a core router (core router, CR).
  • core router core router
  • the CP device After the user goes online, the CP device sends an accounting packet to the RADIUS server.
  • the RADIUS server issues a change of authorization (change of authorization, COA) instruction to adjust the user's service level agreement (service level agreement, SLA).
  • COA change of authorization
  • an embodiment of the present application provides a communication system 200
  • the communication system 200 is an example of a communication system in which the CP and the UP are separated.
  • the communication system 200 includes a CP device 210 , a UP device 220 , an operation and maintenance (OM) 230 , a RADIUS server 240 , a DHCP server 250 , and a CP device 211 .
  • OM operation and maintenance
  • the CP device 210 and the UP device 220 There are three kinds of interfaces between the CP device 210 and the UP device 220, and the three kinds of interfaces are the CPRi interface, the Mi interface and the SCi interface respectively.
  • the CPRi interface is used to upload the original dial-up message received by the UP device 220 to the CP device 210 .
  • the original dialing packet eg, PPPoE packet or DHCP packet
  • the UP device 220 receives the original dial-up message, and after encapsulating the original dial-up message according to the message encapsulation format corresponding to the CPRi interface, the UP device 220 sends the encapsulated dial-up message to the CP device 210 through the CPRi interface.
  • the CPRi interface is implemented through a tunnel between the UP device 220 and the CP device 210 .
  • the CPRi interface is implemented through a user datagram protocol (User Datagram Protocol, UDP)-based tunnel, and the packet encapsulation format corresponding to the CPRi interface is to encapsulate the tunnel header corresponding to the UDP-based tunnel to the original dial-up packet.
  • UDP User Datagram Protocol
  • the UDP-based tunnel is a generic protocol encapsulation (GPE) tunnel based on Virtual Extensible Local Area Network (VXLAN), and the tunnel header encapsulated to the original dial-up packet includes the VXLAN header and the GPE extension header.
  • GPE generic protocol encapsulation
  • the UDP-based tunnel is a general packet radio service (GPRS) tunneling protocol control plane (GPRS tunneling protocol (GTP) control plane, GTP-C) tunnel, encapsulating the original dial-up message
  • GPRS general packet radio service
  • GTP general packet radio service tunneling protocol
  • GTP-C general packet radio service tunneling protocol control plane
  • the tunnel header includes the GTP-C header and the network service header (NSH).
  • the functions of the SCi interface include that the CP device sends a flow table to the UP device, and the UP device sends status information to the CP device.
  • the SCi interface is used for the CP device to deliver a control message to the UP device, thereby instructing the UP device to carry a watermark when sending a dial-up message to the CP device through the CPRi interface.
  • the SCi interface is implemented using a control plane and user plane separated protocol (CUSP).
  • CUSP control plane and user plane separated protocol
  • the SCi interface is implemented using the Packet Forwarding Control Protocol (PFCP).
  • the Mi interface is used by the CP device to deliver configuration information to the UP device.
  • the Mi interface is implemented by, for example, a network configuration (Network Configuration, NETCONF) protocol.
  • the CP device 210 communicates with the OM 230 through, for example, Simple Network Management Protocol (SNMP) or NETCONF.
  • the CP device 210 communicates with the RADIUS server 240, eg, through the RADIUS protocol.
  • the CP device 210 communicates with the DHCP server 250, eg, through DHCP.
  • the CP device 210 and the CP device 211 perform data synchronization through, for example, a data backup message.
  • the CP device 211 cooperates with the CP device 210 to perform dialing processing based on a load sharing mechanism; in another example, the CP device 210 is the active device, and the CP device 211 is the backup device of the CP device 210 .
  • the overall structure of the communication system 200 is described above as an example, and the CP device 210 in the communication system 200 is described in detail below.
  • the functions of the CP device 210 include: supporting the management functions of the UP device 220, including, for example, joining and exiting the UP device 220 and reporting the interface resources of the UP device 220; Dial-up messages to access users; support communication with RADIUS server 240 to perform authentication, authorization and accounting for users; support assigning IP addresses to users; The user traffic is forwarded at the UP device 220 .
  • the CP device 210 is a VNF network element, and the CP device 210 is deployed in an NFV infrastructure (NFV infrastructure, NFVI) environment.
  • NFV infrastructure NFV infrastructure, NFVI
  • the CP device 210 is a piece of software, and the CP device 210 runs on an X86 server.
  • the CP device 210 is a distributed software, and different functional modules of the CP device 210 are distributed on different hardware devices.
  • FIG. 4 is an example illustrating the functional architecture inside the CP device 210 .
  • the CP device 210 includes a plurality of dial-up processing modules 2201 and an input output (IO)/load balance (LB) module 2202 .
  • IO input output
  • LB load balance
  • multiple dial-up processing modules 2201 are distributed on different hardware devices, for example.
  • the IO/LB module 2202 is used to communicate with the UP device.
  • the IO/LB module 2202 distributes the load of the received dial-up packets to multiple dial-up processing modules 2201 .
  • the dialing processing can be performed in coordination with the computing power of multiple hardware devices, the performance of the communication system 200 in processing user online is effectively guaranteed; on the other hand, when capacity expansion is required, the This is achieved by adding more dial-up processing modules 2201 to the CP device 210, so that the communication system 200 meets the elastic expansion requirements of the VNF.
  • system architecture is exemplarily introduced above, and application scenarios to which some embodiments of the present application are suitable are exemplified below with reference to the system architecture described above.
  • the CP device 210 serves as the control plane of the communication system 200 , and the CP device 210 needs to provide a security function to ensure the system security and service security of the communication system 200 . Since the channels established between the CP device 210 and the UP device 220 through the CPRi interface, Mi interface, SCi interface and other interfaces are generally in-band communication channels, they need to cross the metropolitan area network or even the backbone network, so there is a security risk. Therefore, the CP device 210 needs to adopt security protection measures to defend against network attacks from the channel between the CP device 210 and the UP device 220 .
  • DDoS distributed denial of service attack
  • the main means of DDoS attack is Synchronize Sequence Numbers (SYN) flood attack (SYN flood).
  • SYN flood Synchronize Sequence Numbers
  • TCP Transmission Control Protocol
  • anti-DDoS anti-DDoS
  • dial-up packets eg, PADI packets for PPPoE dialing and DHCP discovery packets for DHCP dialing
  • an attacker may intercept the PADI packets or DHCP discovery packets sent by the UP.
  • the attacker hops the media access control (MAC) address or virtual LAN (VLAN) number in such dial-up packets, constructs a large number of attack packets, and encapsulates them according to the packets of the CPRi interface. format, a large number of encapsulated attack packets are directly sent to the CP device 210 without passing through the UP device 220, thereby initiating a replay attack.
  • MAC media access control
  • VLAN virtual LAN
  • the subsequent process of dialing is required to determine whether a PADI packet or a DHCP discovery packet is an attack packet, that is, a user who only sends a PADI packet or a DHCP discovery packet without sending subsequent dial-up packets is determined as an attack. Therefore, it is difficult for general firewalls or anti-DDoS systems to identify attack packets, and the CP device 210 needs to be used to defend against attack packets.
  • the CP device 210 since the implementation of the CPRi interface is VXLAN+GPE or GTP-C+NSH tunnel encapsulation, both of which are based on UDP, the CP device 210 cannot use the TCP keychain, etc.
  • the technology verifies the source IP address in the packets received through the CPRi interface.
  • dial-up packets such as PADI packets for PPPoE dial-up and DHCP discovery packets for DHCP dial-up
  • the source MAC address is the MAC address of the dial-up user.
  • the CP device 210 cannot determine whether the source MAC address is legal, and cannot simply rely on the source MAC addresses distinguish attack packets from normal online packets. It can be seen that how the CP device 210 identifies the attack packet from the CPRi interface is one of the technical difficulties in the art.
  • rate limiting is used to defend against replay attacks initiated by PADI packets or DHCP discovery packets.
  • the CP device 210 adopts the token bucket technology on the IO/LB module 2202 to group users according to MAC addresses. Then, the CP device 210 performs a committed access rate (committed access rate, CAR) on the rate of each group of dial-up packets sent to the dial-up processing module 2201.
  • CAR committed access rate
  • the IO/LB module 2202 When an attack occurs, the IO/LB module 2202 performs a hash operation according to the source MAC address, groups the received dial-up packets, each group corresponds to a token bucket, and restricts the sending to the dial-up processing module according to the rate of the token
  • the dial-up packet rate of 2201 the packets exceeding the token rate will be randomly discarded. In this way, the dialing processing module 2201 will not hang up because the number of sent packets exceeds the processing performance.
  • some embodiments of the present application provide a method for the joint defense of the CP device and the UP device 220 against DDoS attacks.
  • the CP device sends a control message from the SCi interface to notify the UP device 220 to
  • the dial-up packets sent through the CPRi interface carry a watermark, so that the CP device can effectively distinguish attack packets from normal packets according to the watermark, so that the attack packets of the replayer can be discarded. Normal packets can be processed. Through this method, not only can the normal user go online, but also the computing resources of the CP can be saved.
  • some embodiments extend the SCi interface between the CP device and the UP device 220, and provide how to extend the CUSP message format defined by the standard IETF RFC 8772 and the PFCP message format defined by the BBF TR-459 to implement control message, so that the CP device can use the extended message format to control the UP device 220 to use the watermark or turn off the watermark.
  • some embodiments extend the CPRi interface between the CP device and the UP device 220, providing how to extend the VXLAN-GPE packet format to carry various types of watermarks.
  • FIG. 5 is a flowchart of a network attack defense method 300 provided by an embodiment of the present application.
  • the interactive subject of the method 300 includes a CP device and a UP device.
  • the CP device in the method 300 is the CP device 210 or the CP device 211 in the communication system 200 shown in FIG. 3
  • the CP device in the method 300 is the UP in the communication system 200 shown in FIG. 3 . device 220.
  • the CP device in the method 300 is a CP device in a BNG system where CP and UP are separated, such as a CP or DBNG-CP in a vBNG system.
  • the UP device in the method 300 is the UP device in the BNG system in which the CP and the UP are separated, for example, the UP or DBNG-UP in the vBNG system.
  • the CP device in method 300 is a CP device in a BRAS system where CP and UP are separated.
  • the UP device in the method 300 is the UP device in the BRAS system in which the CP and the UP are separated.
  • the CP device and the UP device in the method 300 are implemented using other CU separation systems other than the BNG system.
  • the CP device in method 300 is the device where the control plane is located in the wired access system or wireless access system separated from other CUs
  • the UP device in method 300 is in the wired access system or wireless access system separated from other CUs
  • the device where the forwarding plane is located is located.
  • the CP device and the UP device in the method 300 are implemented using a CU-separated 4G core network (EPC) system or a CU-separated 5G core network (5GC) system.
  • EPC CU-separated 4G core network
  • 5GC CU-separated 5G core network
  • the CP device is implemented by adopting the CP in the serving gateway (serving gateway, S-GW) separated from the CU.
  • the CP device is implemented by adopting the CP in the packet data network gateway (PDN gateway, PGW) separated by the CU.
  • the CP device is implemented by using a mobility management function (access and mobility management function, AMF) network element.
  • AMF access and mobility management function
  • SMF session management function
  • the access gateway function access gateway function, AGF network element in the WT-456 fixed and mobile converged communication system is used to implement the CP device.
  • the method 300 is processed by a general-purpose central processing unit (CPU), or by a CPU and a network processor (NP) jointly, or by a CPU, a network processor (NP) 2 or more than two pieces of hardware in a physical interface card (ph10sical interface card, PIC) are jointly processed, or other processors suitable for packet forwarding may be used instead of NP or PIC.
  • CPU general-purpose central processing unit
  • NP network processor
  • PIC physical interface card
  • Method 300 does not impose restrictions.
  • the CP performs the processing work corresponding to the method 300 carrying a watermark and identifying the attack packet according to the watermark
  • the NP and the PIC undertake the processing work corresponding to the method 300 for sending or receiving packets.
  • the method 300 includes steps S301 to S315.
  • the attacker sends the hopping dial-up packet to the CP device.
  • the attacker captures the dial-up packets sent by the UP device in the network, and performs the parameters (such as source MAC address, VLAN number, etc.) in the dial-up packets. Hopping, sending dial-up packets after hopping to attack.
  • the CP device In response to the reception rate of the dialing packet meeting the abnormal condition, the CP device generates a first control message, where the first control message is used to instruct the UP device to carry a watermark when sending the dialing packet to the CP device.
  • the abnormal condition is used to detect whether the receiving rate of dial-up packets is abnormal.
  • satisfying the abnormal condition is that the receiving rate exceeds the rate threshold for a preset period of time.
  • the CP device performs speed measurement on dial-up packets. Specifically, the CP device measures the reception rate of the dial-up message, and if the time period for which the reception rate exceeds the rate threshold reaches a preset time period, the CP device determines that the reception rate meets the abnormal condition, and executes S303. For example, the CP device uses CAR to limit the rate of dial-up packets. If the received rate of dial-up packets exceeds the CAR value, it will count the time. When the recorded time exceeds the preset time, it is determined that the received rate meets the abnormal condition.
  • the dial-up packet includes the above-mentioned dial-up packet sent by the attacker to the CP device, and also includes the dial-up packet sent by the UP device connected to the CP device.
  • the CP device sends a first control message to the UP device.
  • the CP device Since the receiving rate of dial-up packets meets the abnormal condition, it is most likely caused by a network attack. Therefore, if the receiving rate of dial-up packets meets the abnormal condition, the CP device can be determined to be attacked by the network. In this case, the CP device will generate the first control message. Since the first control message indicates that the watermark is carried when sending the dial-up message, the CP device notifies the UP device to carry the watermark in the dial-up message by delivering the first control message to the UP device. Therefore, the subsequent dial-up packets sent by the UP device to the CP device will contain a watermark, thereby supporting the function of the CP device to control the UP device to enable watermarking.
  • the watermark is used by the CP to verify the validity of the dial-up packets it receives.
  • the role of the watermark is similar to the identification of the identity of the UP device.
  • the specific value of the watermark is negotiated between the CP device and the UP device by transmitting the first control message. If the packet sent to the CP device does not contain a watermark or does include a watermark but the watermark is incorrect, it indicates that the packet sent to the CP device does not come from the UP device, then the packet will not pass the verification of the CP device, and the packet will It is recognized as an attack packet by the CP device.
  • Which data the CP device and the UP device use as the watermark include various implementations, which are illustrated below by using watermark type a to watermark type d.
  • VXLAN network identifier VNI
  • a VXLAN tunnel exists between the UP device and the CP device.
  • the UP device When the UP device sends a dial-up packet, it will add a VXLAN header containing VNI to the original dial-up packet, so that the dial-up packet with the VXLAN header enters the VXLAN tunnel. Forwarding using VXLAN headers.
  • the CP device When the watermark needs to be used to defend against attacks, the CP device will notify the UP device to adjust the value of the VNI in the VXLAN header, so that the VNI in the VXLAN header in the dial-up packet sent by the UP device is changed from the original VNI to the adjusted VNI so that the CP can The device uses the adjusted VNI to verify the dial-up packets sent.
  • VNI is a user identifier similar to VLAN ID.
  • a VNI represents a tenant.
  • a 24-bit length space is allocated to the VNI, so that it can support the isolation of a large number of tenants.
  • Watermark type b Use random numbers as watermarks.
  • the CP device and the UP device will use random numbers as the watermark of dial-up packets. Specifically, the CP device will notify the UP device to carry a random number when sending a dial-up packet, so that the dial-up packet sent by the UP device to the CP device includes a random number, so that the CP device uses the random number to process the sent dial-up packet. check.
  • Watermark type c use timestamp as watermark.
  • the CP device and the UP device use the time stamp as the watermark of the dial-up message. Specifically, the CP device and the UP device will perform time synchronization.
  • the CP device instructs the UP device to carry a timestamp when sending dial-up packets, so that the dial-up packets sent by the UP device contain Timestamp, so that the CP device can use whether the timestamp corresponds to the synchronization time point to verify the dial-up packet sent.
  • the CP device and the UP device perform time synchronization based on the Network Time Protocol (NTP) protocol.
  • NTP Network Time Protocol
  • Both the CP device and the UP device use the NTP time calibration server as the clock source, and both the CP device and the UP device receive the time from the NTP time calibration server. The current time point, thereby ensuring the time synchronization between the UP device and the CP device.
  • Watermark type d use message authentication code as watermark.
  • the message authentication code is, for example, a hash value of at least one parameter in the dial-up message.
  • the message authentication code is the hash value of the parameters in the IP header, MAC frame header, and UDP header of the dial-up message.
  • the message authentication code is the hash value of the source MAC address and destination MAC address in the dial-up packet.
  • the message authentication code is a hash value of the source MAC address, destination MAC address, source IP address, and destination IP address in the dial-up packet.
  • the message authentication code is the hash value of the source MAC address, destination MAC address, source IP address, destination IP address, and UDP header in the dial-up packet.
  • the message authentication code is obtained, for example, by performing a hash operation according to a hash function.
  • watermarks are exemplified above through watermark type a to watermark type d.
  • This embodiment does not limit which type of watermarks the CP device and the UP device use from the watermark type a to the watermark type d.
  • the CP device selects a specific watermark type according to the strength of the attack. For example, when the attack intensity of the CP device is strong, the watermark type d is selected, that is, the message authentication code is used as the watermark used by the CP device and the UP device to defend against attacks, so as to achieve the best defense effect.
  • the attack intensity of the CP device is weak
  • select the watermark type a that is, adjust the VNI as the watermark used by the CP device and the UP device to defend against attacks, thereby reducing the performance overhead of the CP device and the UP device.
  • the first control message includes a watermark.
  • the CP device carries the watermark itself in the first control message and delivers it to the UP device.
  • the first control message includes watermark type information corresponding to the watermark.
  • the first control message includes parameters related to generating the watermark.
  • the CP device carries at least one of the watermark format, the watermark type, the position of the watermark in the dial-up message, the number of digits of the watermark, and the name of the input parameter for generating the watermark in the first control message, and sends it to the UP equipment.
  • the content of the first control message is exemplified by the following cases a to d in combination with the above watermark type a to watermark type d.
  • the CP device obtains the first VNI, and carries the first VNI in the first control message, so that the first control message includes the first VNI.
  • the first VNI refers to the adjusted VNI.
  • the first VNI is different from the VNI used by the UP device when it originally sent dial-up packets.
  • this embodiment does not limit how the CP device obtains the first VNI.
  • the CP device reserves a segment of VNI according to the configuration, and the CP device selects an unoccupied VNI from the reserved segment of VNI as the first VNI.
  • the CP device carries the watermark type information corresponding to the first VNI in the first control message, so that the first control message includes the watermark type information corresponding to the first VNI.
  • the watermark type information corresponding to the first VNI indicates that the watermark type is VNI.
  • Case b The content of the first control message when a random number is used as the watermark.
  • the first control message includes a first random number.
  • the CP device obtains the first random number, and carries the first random number in the first control message.
  • This embodiment does not limit how the CP device obtains the first random number.
  • the CP device performs calculations through a random number generation algorithm, thereby generating the first random number.
  • the CP device receives the first random number from the other device.
  • the CP device carries the watermark type information corresponding to the first random number in the first control message, so that the first control message includes the watermark type information corresponding to the first random number.
  • the watermark type information corresponding to the first random number indicates that the watermark type is a random number.
  • the CP device when the same CP device controls multiple UP devices, the CP device will generate corresponding random numbers for each UP device, and deliver each random number to the corresponding UP device.
  • the CP device generates different random numbers for different UP devices, and delivers different random numbers to different UP devices.
  • the UP device controlled by the CP device includes the first UP device, and the CP device carries the first random number corresponding to the first UP device in the first control message, and sends the first control message to the first UP device. In this way, it is helpful for the CP device to verify the dial-up packets of different UP devices by using different random numbers.
  • the CP device when multiple interfaces on the same UP device are connected to the CP device, the CP device will generate corresponding random numbers for each interface of the UP device, and the corresponding random numbers between the interfaces and the random numbers will be generated. The relationship is delivered to the UP device.
  • the CP device generates different random numbers for different interfaces of the UP device. For example, the UP device accesses the CP device through the first interface, the CP device carries the first random number corresponding to the first interface in the first control message, and sends the first control message to the first UP device, thereby sending the first UP device to the first UP device. Indicates that the first random number is carried when the dial-up packet is sent through the first interface. In this way, the CP device can use different random numbers to verify the dial-up packets of different interfaces on the same UP device.
  • the first control message includes a first timestamp.
  • the CP device obtains the first timestamp corresponding to the synchronization time point according to the time synchronization mechanism with the UP device, and carries the first timestamp in the first control message.
  • the CP device carries the watermark type information corresponding to the first timestamp in the first control message, so that the first control message includes the watermark type information corresponding to the first timestamp.
  • the watermark type information corresponding to the first timestamp indicates that the watermark type is a timestamp.
  • the first control message does not include the first timestamp itself, but includes any information capable of identifying the first timestamp.
  • the first control message includes a one-bit flag field. When the flag field is set, it indicates that the UP device carries the first timestamp when sending the dialing message to the CP device.
  • the first control message includes the format of the message verification code.
  • the format of the message verification code is used to instruct the UP device which part of the dial-up message to perform hash operation on to obtain the first message verification code.
  • the format of the message verification code is used to indicate the hash algorithm used to generate the first message verification code.
  • the format of the message verification code in the first control message is represented by numbers, letters or character strings, for example.
  • the CP device carries the watermark type information corresponding to the first message verification code in the first control message, so that the first control message includes the watermark type information corresponding to the first message verification code.
  • the watermark type information corresponding to the first message verification code indicates that the watermark type is a message verification code.
  • the CP device and the UP device agree that different numbers represent different formats of the message verification code.
  • the two types of information, the source MAC address and the destination MAC address are hashed to obtain the first message verification code.
  • the UP device is instructed to obtain the first message verification code by hashing the four pieces of information, source MAC address, destination MAC address, source IP address, and destination IP address in the dial-up packet.
  • the format of the message verification code is represented by 2
  • the first control message does not include the format of the message verification code, but includes any information capable of identifying the first message verification code.
  • the format of the message verification code is negotiated between the CP device and the UP device in advance.
  • the format of the message verification code is negotiated during the handshake phase between the CP device and the UP device, or the format of the message verification code is preconfigured between the CP device and the UP device.
  • a one-bit flag field in a control message instructs the UP device to carry the first message verification code when it sends a dial-up message to the CP device. When the flag field is set, it instructs the UP device to carry the first message verification code when it sends a dial-up message to the CP device. The first message verification code.
  • the CP device sends the first control message to the UP device through the SCi interface.
  • the first control message is also called an SCi message.
  • the communication protocol implementing the SCi interface is extended, and a new type of SCi message is added.
  • the new type of SCi message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device.
  • the type SCi message is the first control message.
  • How to extend the communication protocol of the SCi interface to implement the first control message includes multiple implementation manners, and the following is an example of the extension manner 1 and the extension manner 2.
  • IETF RFC 8772 stipulates that the SCi interface is implemented using CUSP between the CP device and the UP device.
  • a new type of CUSP message is extended.
  • the new type of CUSP message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device, and the new type of CUSP message is the first control message.
  • the CUSP message as the first control message includes a type field.
  • the type field in the CUSP message includes the type value.
  • the value of this type identifies the CUSP message to instruct the UP device to carry the watermark when sending the dial-up message to the CP device.
  • the type value is the type of control messages in Table 2 (table2) of RFC 8772.
  • control message is a message that requires the UP dial-up message to carry a watermark
  • control message name can be the watermark start, which also includes the desired watermark type information.
  • CRPI_WATERPRINT_VNI when its value is CRPI_WATERPRINT_VNI, it indicates that it wants UP to send dial-up messages with VNI watermark information; when its value is CRPI_WATERPRINT_RANDOM, it indicates that UP wants to send dial-up messages with random number watermark information;
  • CRPI_WATERPRINT_TIMESTAMP when the value is CRPI_WATERPRINT_TIMESTAMP, it indicates that the UP is expected to carry the timestamp watermark information when sending dial-up packets; when the value is CRPI_WATERPRINT_MAC, it indicates that the UP is expected to carry the message verification code watermark information when sending the dial-up packets.
  • control message also includes a specific watermark value or information about parameters related to generating a related watermark, such as the VNI value, random value, timestamp value, or the watermark that needs to be carried in the dial-up message sent by the UP.
  • Information about the value of the message verification code is not limited to the VNI value, random value, timestamp value, or the watermark that needs to be carried in the dial-up message sent by the UP.
  • the UP device When the UP device receives the control message sent by the CP device, it can send the corresponding watermark information according to the pre-configured or pre-agreed information, such as: sending the default VNI value, generating random numbers according to pre-agreed rules, carrying timestamps, The message verification code is sent according to the default rules; the corresponding value can also be obtained from the control message, carried in the dial-up message, and sent to the CP device; a watermark can also be generated according to the parameters carried in the control message and carried in the dial-up message In the text, it is sent to the CP device.
  • the pre-configured or pre-agreed information such as: sending the default VNI value, generating random numbers according to pre-agreed rules, carrying timestamps,
  • the message verification code is sent according to the default rules; the corresponding value can also be obtained from the control message, carried in the dial-up message, and sent to the CP device; a watermark can also be generated according to the
  • a TLV may be added to the CUSP message to carry the watermark or generate parameters related to the watermark.
  • the value of the type part of these TLVs can be used to indicate the watermark type corresponding to this TLV, that is, the type of watermark that needs to be carried by the UP device.
  • the CUSP message includes a watermark TLV, and the watermark TLV is a TLV that carries a watermark; or, the watermark TLV is a TLV that carries watermark type information corresponding to the watermark; or, the watermark TLV is a TLV that carries parameters related to generating a watermark, and the watermark TLV
  • the type value can be, for example, 901, indicating that it is a watermark TLV.
  • the watermark TLV is a new type of TLV, and the watermark TLV includes a type value of the new application, the type value identifying the watermark TLV carrying the watermark or generating parameters related to the watermark.
  • the watermark TLV is an existing type of TLV.
  • the TLV used to carry the VNI in the VXLAN standard is multiplexed as the watermark TLV in this embodiment.
  • the watermark TLV includes at least one of VNI watermark TLV, random number watermark TLV, time stamp watermark TLV, and message verification code watermark TLV.
  • VNI watermark TLV VNI watermark TLV
  • the VNI watermark TLV includes the first VNI.
  • the value of the type part of the VNI watermark TLV is, for example, used to indicate that the watermark type corresponding to this TLV is VNI.
  • the VNI watermark TLV includes a VNI field, and the VNI field includes the first VNI.
  • the VNI watermark TLV may also be referred to as CRPI_WATERPRINT_VNI (CRPI_watermark_VNI).
  • Table 2 is an illustration of the format of the VNI watermark TLV.
  • the VNI in Table 2 is the first VNI.
  • the VNI watermark TLV occupies, for example, 4 bytes. Wherein, the VNI occupies, for example, 3 bytes in the VNI watermark TLV, for example, occupies the second byte to the fourth byte.
  • the first byte of the VNI watermark TLV is all set to 0 for padding.
  • the random number watermark TLV includes a first random number.
  • the value of the type part of the random number watermark TLV is, for example, used to indicate that the watermark type corresponding to this TLV is a random number.
  • the random number watermark TLV may also be called CRPI_WATERPRINT_RANDOM (CRPI_watermark_random number).
  • the random number watermark TLV includes a random number field, and the random number field includes a first random number.
  • Table 3 which is an example of the format of the random number watermark TLV, and the random number in Table 3 is the first random number.
  • the random number occupies, for example, 2 bytes.
  • the timestamp watermark TLV includes the first timestamp.
  • the value of the type part of the timestamp watermark TLV is, for example, used to indicate that the watermark type corresponding to this TLV is a timestamp.
  • the timestamp watermark TLV may also be referred to as CRPI_WATERPRINT_TIMESTAMP (CRPI_watermark_timestamp).
  • the timestamp watermark TLV includes a timestamp field, and the timestamp field includes a first timestamp.
  • Table 4 which is an example of the format of the timestamp watermark TLV, and the timestamp in Table 4 is the first timestamp.
  • the timestamp occupies, for example, 1 byte.
  • the message verification code watermark TLV includes the format of the message verification code.
  • the value of the type part of the message verification code watermark TLV is, for example, used to indicate that the watermark type corresponding to this TLV is a message verification code.
  • the message authentication code watermark TLV may also be referred to as CRPI_WATERPRINT_MAC (CRPI_watermark_message authentication code).
  • the message verification code watermark TLV includes a message verification code format field. When the value of the message verification code format field is 0, the UP device is instructed to obtain the first message verification code by performing hash operation on the source MAC address and the destination MAC address in the dial-up packet.
  • the UP device When the value of the message verification code format field is 1, the UP device is instructed to obtain the first message verification code by hashing the source MAC address, destination MAC address, source IP address and destination IP address in the dial-up packet.
  • the value of the message verification code format field When the value of the message verification code format field is 2, it instructs the UP device to obtain the first message verification code by hashing the source MAC address, destination MAC address, source IP address, destination IP address and UDP header in the dial-up packet .
  • Table 5 which is an example description of the format of the message verification code watermark TLV
  • the message verification code format in Table 5 is the message verification code format field.
  • the message verification code format field occupies 1 byte in the message verification code watermark TLV.
  • the second extension method is to extend the PFCP.
  • PFCP is a protocol defined by the 3rd Generation Partnership Project (3GPP) and carried over UDP.
  • 3GPP 3rd Generation Partnership Project
  • PFCP defines a set of abstract business models based on 5th generation mobile networks (5th generation mobile networks or 5th generation wireless systems, 5th-Generation, 5G) business, and based on this model defines node messages and sessions between CP and UP.
  • PFCP refers to the UP device as the UPF, the CP device as the CPF, and the connection between the CP device and the UP device as the PFCP association (PFCP association).
  • PFCP messages are divided into PFCP node messages (PFCP node related messages) and PFCP session messages (PFCP session related messages).
  • the PFCP message includes two parts: a PFCP message header (PFCP message header) and an IE.
  • the PFCP message header includes fields such as message type and message length.
  • IE adopts the packaging format of TLV.
  • IE is divided into grouped IE (grouped IE) and embedded IE (embedded IE).
  • Embedded IE is the smallest unit of IE.
  • a grouped IE optionally contains multiple embedded IEs.
  • BBF TR-459 stipulates that the SCi interface between the CP device and the UP device is implemented using PFCP.
  • the CP device uses the IE in the PFCP message to carry the watermark or generate watermark-related parameters.
  • the PFCP message as the first control message includes a watermark IE
  • the watermark IE is an IE that carries a watermark
  • the watermark IE is an IE that carries watermark type information corresponding to the watermark
  • the watermark IE is an IE that carries parameters related to generating a watermark.
  • the watermark type information carried by the Watermark IE is, for example, the value of the type part in the Watermark IE.
  • the value of the type part of the VNI watermark IE is used to indicate that the watermark type corresponding to this IE is VNI.
  • the value of the type part of the random number watermark IE is used to indicate that the watermark type corresponding to this IE is a random number.
  • the value of the type part of the Timestamp Watermark IE is used to indicate that the watermark type corresponding to this IE is Timestamp.
  • the value of the type part of the message verification code watermark IE is used to indicate that the watermark type corresponding to this IE is the message verification code.
  • the Watermark IE is a Packet IE.
  • the watermark IE is an embedded IE. For example, see Table 6 below, which is an introduction to the Watermark IE.
  • the IE contains a watermark when the CP is DDoS attacked. watermark
  • C in Table 6 indicates conditional, indicating that the watermark IE is carried when the condition is met, and the condition is that the CP device may be attacked by DDoS.
  • the CP device detects that the receiving rate of the dial-up message is abnormal, it will determine that the condition for carrying the watermark IE is satisfied.
  • the type field includes the type of the watermark IE.
  • the type field occupies 2 bytes.
  • the type value in the type field is, for example, a decimal value.
  • the length field includes the length of the watermark IE.
  • the length in the length field does not include, for example, 4 bytes of the type field and the length field.
  • the manufacturer ID (enterprise ID) field includes the manufacturer number.
  • the Manufacturer ID field is an optional field of the Watermark IE.
  • the watermark type (water print type) field and the watermark parameter (water print para) field belong to the data part in the watermark IE or a sub-IE of the watermark IE.
  • Table 7 The definition of the type field in Table 7 is shown in Table 8 below.
  • 7/1 represents the first bit of a byte (type field); 7/2 represents the second bit of a byte (type field); 7/3 represents a byte (type field)
  • the definitions of the four watermark parameters from watermark parameter 0 to watermark parameter 3 are the same as or similar to the definitions of the four types of watermark TLVs, namely, VNI watermark TLV, random number watermark TLV, time stamp watermark TLV, and message authentication code watermark TLV described in the extension mode 1.
  • a PFCP node message is used to carry the Watermark IE.
  • the first control message is a PFCP node message.
  • a PFCP session message is used to carry the Watermark IE.
  • the first control message is a PFCP session message.
  • a new type of PFCP message is extended to carry the watermark IE using the new type of PFCP message.
  • the new type of PFCP message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device, and the new type of PFCP message is the first control message provided in this embodiment.
  • the PFCP message as the first control message includes a type field.
  • the Type field in the PFCP message includes the Type value.
  • the type value indicates that the PFCP message instructs the UP device to carry the watermark when sending the dial-up message to the CP device.
  • this embodiment does not limit the extended PFCP node message or the extended PFCP session message.
  • a new type of PFCP node message is added, for example, a new type value is applied between 16 and 49.
  • This new type of PFCP node message carries the watermark IE, and the CP device sends this new type of PFCP node to the UP device. message to implement the function of watermarking.
  • a new type of PFCP session message is added, for example, a new type value is applied between 58 and 99.
  • This new type of PFCP session message carries the watermark IE, and the CP device sends this new type of PFCP to the UP device. Conversation message, realizes the function of watermarking.
  • the existing PFCP message carrying the watermark IE is multiplexed, and the existing PFCP message carries the watermark IE, which can instruct the UP device to carry the watermark when sending a dial-up message to the CP device, and the existing PFCP message is also The first control message provided in this embodiment.
  • the multiplexing PFCP Session Modification Request (PFCP Session Modification Request) carries the watermark IE
  • the PFCP update session request carrying the watermark IE is the first control message provided in this embodiment.
  • the PFCP update session request is a PFCP session message, and the message type value of the PFCP update session request is 52.
  • the IE shown in Table 9 below is added to the Update Forwarding Parameters IE in the PFCP update session request.
  • C in Table 9 indicates Conditional, indicating that the watermark IE is carried when a condition is met, and the condition is that the CP is attacked by DDoS.
  • the CP detects that the receiving rate of the dial-up message is abnormal, it will determine that the condition for carrying the watermark IE is satisfied.
  • the UP device receives a first control message from the CP device, where the first control message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device.
  • the UP device carries a watermark in the dial-up message according to the first control message.
  • the dial-up message sent by the UP device includes, for example, the original dial-up message and a watermark.
  • the original dialing packet is sent by the user equipment, and in another example, the original dialing packet may also be sent by an access device connected to the user equipment.
  • the original dial-up message will be transmitted to the UP device.
  • the UP device receives the original dial-up message, it obtains a watermark according to the first control message sent by the CP device; the UP device encapsulates the obtained watermark with the original dial-up message to obtain a Watermarked dial-up packets, so that the watermark is carried in the dial-up packets, so that the watermark is added to the dial-up packets sent by the UP device.
  • the following focuses on the content of the dial-up packets sent by the UP device through the way that the user equipment sends the original dial-up packets.
  • the dialing method includes but is not limited to PPPoE dialing or DHCP dialing.
  • PPPoE dial-up the original dial-up packets sent by the user equipment are PPPoE dial-up packets.
  • DHCP dial-up the original dial-up packets sent by the user equipment are DHCP dial-up packets.
  • the PPPoE dial-up message is, for example, a PADI message. See Table 10 below, which is an example of the PADI message format.
  • Table 12 is an example of the format of the DHCP dial-up message.
  • the numbers in parentheses in Table 12 indicate the length of the field, for example, the message type (1) indicates that the length of the message type field is 1 byte, and the transaction ID (4) indicates that the length of the transaction ID field is 4 bytes.
  • the first packet of a DHCP dial-up packet is a DHCP discovery packet.
  • a DHCP discovery packet When a DHCP client requests an address, it does not know the location of the DHCP server, so the DHCP client will broadcast a request message in the local network, which is called a DHCP discovery message. Arts.
  • the DHCP discovery message is used to discover the DHCP server on the network. All DHCP servers that receive the DHCP discovery message will send a response message, so that the DHCP client can know the location of the DHCP server in the network. See Table 14 below, which is an example of the format of the DHCP discovery message. The meaning of each field in the DHCP dial-up message shown in Table 14 is shown in Table 13 above.
  • the above example describes the format of the dial-up packet.
  • the following describes how the UP device adds a watermark to the dial-up packet.
  • the UP device obtains the first VNI from the first control message; or the UP device obtains the pre-agreed first VNI, or the UP device generates the first VNI according to the parameters carried in the first control message A VNI.
  • the UP device carries the first VNI in the dial-up message, so that the VNI in the dial-up message sent by the UP device changes from the original VNI to the adjusted VNI. VNI.
  • the UP device obtains the first random number from the first control message; or the UP device obtains the pre-agreed first random number, or the UP device obtains the first random number according to the parameters carried in the first control message Generate a first random number. After the UP device obtains the first random number in any of the three methods, the UP device carries the first random number in the dial-up packet, so that the dial-up packet sent by the UP device adds the random number sent by the CP device. number.
  • the UP device determines the first timestamp according to the time synchronization mechanism between the UP device and the CP device, and the first timestamp is used to indicate the time point of synchronization between the UP device and the CP device .
  • the UP device carries the first time stamp in the dial-up message, so that the dial-up message sent by the UP device adds a time stamp corresponding to the synchronization time point.
  • the precision of the first timestamp is second.
  • the time point of synchronization between the UP device and the CP device is 17:43:5 seconds on July 20, 2020, and the first timestamp is 20200720174305.
  • the UP device generates the first time stamp, and carries the generated first time stamp in the dial-up packet.
  • the first control message carries a timestamp format
  • the UP device generates the first timestamp according to the timestamp format.
  • the CP device and the UP device agree on a timestamp format by transmitting the first control message, thereby adding a watermark according to the pre-agreed timestamp format.
  • the timestamp format is, for example, the precision of the timestamp, the number of digits of the timestamp, and the like.
  • the first timestamp is a complete timestamp.
  • the first timestamp is part of a complete timestamp.
  • the first timestamp is the hour, minute, and second in a full timestamp.
  • a full timestamp is 20200720174305 and the first timestamp is 170510.
  • the UP device performs a hash operation on at least one parameter in the dial-up message to obtain the first message authentication code; the UP device carries the first message authentication code in the dial-up message, so that the UP device The message authentication code is added to the dial-up message sent. Specifically, the UP device obtains the format of the message verification code according to the first control message; or, the UP device obtains a pre-agreed format of the message verification code. After the UP device determines the format of the message verification code in either of the two methods, it performs a hash operation on at least one parameter in the dial-up message according to the format of the message verification code.
  • the UP device interprets the source MAC address in the dial-up packet.
  • the two types of information, the address and the destination MAC address, are hashed, and the obtained hash value is used as the first message verification code.
  • the UP device sends a dial-up message including a watermark to the CP device.
  • a UDP-based tunnel is established between the UP device and the CP device, and the UP device sends a dial-up packet including a watermark through the UDP-based tunnel, where the dial-up packet including the watermark is a UDP packet.
  • FIG. 6 is an illustration of the network architecture formed by the UP device, the CP device and the attacker.
  • (b) in FIG. 6 is an example of the format of the dial-up message sent by the UP device when the watermark function is turned off.
  • (c) in FIG. 6 is an example of the format of the dial-up message sent by the attacker.
  • (d) in FIG. 6 is an example of the format of the dial-up message sent by the UP device when the watermark function is enabled. Specifically, when the watermark function is disabled, the UP device will encapsulate the UDP-based tunnel header on the basis of the original dial-up message sent by the user equipment, and then send the dial-up message including the UDP-based tunnel header.
  • the dial-up message sent by the UP device includes two parts, which are the UDP-based tunnel header and the original dial-up message sent by the user equipment.
  • the attacker captures the dial-up packets sent by the UP device and sent to the CP device, the attacker hops the MAC address or VLAN number in the dial-up packets to obtain hopping dial-up packets.
  • the attacker also sends hop dial packets through the UDP-based tunnel. Therefore, as shown in (c) of FIG. 6 , the dial-up message sent by the attacker includes two parts, which are the UDP-based tunnel header and the hopping dial-up message.
  • the CP device finds that the rate of the dial packets exceeds the rate threshold for a certain period of time, and sends a control message to the UP device to instruct the UP device to add a watermark.
  • the UP device enables the watermark function.
  • the UP device encapsulates the UDP-based tunnel header and watermark on the basis of the original dial-up message sent by the user equipment, and then sends the dial-up message including the UDP-based tunnel header and watermark. . Therefore, as shown in (d) of FIG. 6 , the dial-up message sent by the UP device includes three parts, which are the UDP-based tunnel header, the watermark field and the original dial-up message sent by the user equipment.
  • the carrying position of the watermark field is between the UDP-based tunnel header and the original dial-up message sent by the user equipment.
  • the watermark field shown in (d) of FIG. 6 is specifically a random number field, and the random number field carries the first random number.
  • the watermark field shown in (d) of FIG. 6 is specifically a timestamp field, and the timestamp field carries the first timestamp.
  • the watermark field shown in (d) of FIG. 6 is specifically the message authentication code field, and the message authentication code field carries the first message authentication code.
  • the watermark field is carried in a UDP-based tunnel header.
  • the UDP-based tunnel header includes a VXLAN header, the watermark field is specifically a VNI field, and the VNI field carries the first VNI.
  • the VNI field including the first VNI is located, for example, in the VXLAN header.
  • the CP device sends a dial-up message including a watermark to the UP device through the CPRi interface.
  • the dial-up message including the watermark is also called CPRi message or CPRi message.
  • the specific implementation methods of the CPRi interface include, but are not limited to, the VXLAN GPE method and the GTP-C method. When different methods are used to implement the CPRi interface, the location of the watermark in the dial-up packets sent by the UP device is different.
  • the following is an example of how the UP device carries the watermark in the dial-up packet sent in the VXLAN GPE mode in case A, and how the UP device carries the watermark in the dial-up packet sent by the GTP-C mode in the case B.
  • FIG. 7 is an illustration of two encapsulation formats of the dial-up message including the watermark-VXLAN GPE message.
  • the dial-up message including the watermark includes, for example, three parts, namely the VXLAN GPE header, the watermark field and the original dial-up message sent by the user equipment.
  • the watermark field is located in the VXLAN GPE header and the user equipment.
  • the dial-up message including the watermark includes, for example, two parts, namely the VXLAN GPE header and the original dial-up message sent by the user equipment, the watermark Fields are in the VXLAN GPE header.
  • the VXLAN GPE header includes a destination MAC address (Destination MAC Address, DA) field, a source MAC address (Source MAC Address, SA) field, a destination IP (Destination IP, DIP) field, a source IP (Source IP) field , SIP) field, UDP header (UDP Header), VXLAN header (VXLAN Header), GPE extension header.
  • DA Destination MAC Address
  • SA Source MAC Address
  • DIP Destination IP
  • SIP source IP
  • UDP Header UDP header
  • VXLAN header VXLAN Header
  • GPE extension header GPE extension header.
  • the VXLAN header includes a VNI field, a Reserved (R) field, and an I field.
  • the I field is, for example, an instance bit (instance bit, referred to as I bit or I field or I flag), and the I field is used to identify whether the VNI is valid. When the value of the I field is 1, it indicates that the VNI is valid; when the value of the I field is 0 indicates that the VNI is invalid.
  • a reserved field includes one or more bits that are reserved.
  • the VNI field includes the VNI. In this embodiment, the VNI field includes the first VNI.
  • the VXLAN header in the VXLAN GPE header further includes a Next Protocol (Next Protocol) field.
  • Next Protocol Next Protocol
  • the value of the next protocol field is, for example, 0x7.
  • the VXLAN header in the VXLAN GPE header also includes a version (version, Ver) field, the Ver field indicates the version of the VXLAN GPE, and the initial value is 0; the VXLAN header in the VXLAN GPE header also includes the instance A bit (instance bit, referred to as I bit or I field or I flag), when the I bit carries 1, it indicates that the VNI included in the VXLAN header is a valid VNI.
  • the VXLAN header in the VXLAN GPE header also includes the next protocol bit (Next Protocol Bit, referred to as the P bit or the next protocol flag), and the P bit is used to identify that the value of the next protocol field is valid.
  • the VXLAN header in the VXLAN GPE header also includes the broadcast unknown unicast multicast traffic bit (broadcast&unknown-unicast&multicast traffic bit, BUM traffic Bit, referred to as B bit or B field or B flag), and the B bit is used to identify that the message is a broadcast message Or unknown unicast packets or multicast packets (broadcast&unknown-unicast&multica, BUM) packets.
  • the VXLAN header in the VXLAN GPE header also includes an operation and maintenance management flag bit (operation administration and maintenance flag bit, OAM flag bit, referred to as O bit or O field or O flag), and the O bit is used to identify that the message is an OAM message.
  • OAM flag bit operation administration and maintenance flag bit
  • O field or O flag operation field or O flag
  • the GPE extension header includes a P field, a type (Class) field, and a port information (Port Info) field.
  • the P field is used to indicate the type of dialing, and the type of dialing is, for example, DHCP dialing or PPPoE dialing.
  • the type field is used to indicate the specific category of the original dial-up packet. For example, the type field indicates that the original dial-up packet is a PADI packet. For example, the type field indicates that the original dial-up message is a DHCP discovery message.
  • the port information field indicates the interface information that the user equipment accesses on the UP device.
  • the format of the VXLAN GPE message including the watermark sent by the UP device has been generally introduced above.
  • the following describes the format of the VXLAN GPE message with reference to the specific watermark types from watermark type a to watermark type d.
  • the VXLAN GPE packet sent by the UP device includes the adjusted VNI (the first VNI).
  • the first VNI is, for example, located in the VXLAN header in (b) of FIG. 7 .
  • the first VNI is located in the VXLAN header shown in Table 15, such as in the VNI field in Table 15; for another example, referring to Table 16, the first VNI is located in the VXLAN header shown in Table 16, such as in the VNI field in Table 16.
  • the VXLAN GPE packet sent by the UP device includes a random number (the first random number) generated by the CP device.
  • the first random number is, for example, located in the random number field in FIG. 8 .
  • FIG. 8 is an illustration of a VXLAN GPE message including the first random number.
  • the first random number is, for example, located in the random number field in FIG. 8 .
  • FIG. 8 please refer to the above introduction.
  • the VXLAN GPE packet sent by the UP device includes the timestamp (first timestamp) of the synchronization time point between the UP device and the CP device.
  • first timestamp the timestamp of the synchronization time point between the UP device and the CP device.
  • FIG. 9 which is an illustration of a VXLAN GPE message including a first timestamp.
  • the first timestamp is, for example, in the timestamp field in FIG. 9 .
  • FIG. 9 is an illustration of a VXLAN GPE message including a first timestamp.
  • FIG. 9 is an illustration of a VXLAN GPE message including a first timestamp.
  • the first timestamp is, for example, in the timestamp field in FIG. 9 .
  • FIG. 9 please refer to the above introduction.
  • the VXLAN GPE message sent by the UP device includes the message authentication code (first message authentication code) obtained by hashing the parameters in the dial-up message.
  • first message authentication code is, for example, in the message authentication code field in FIG. 10 .
  • FIG. 10 is an illustration of a VXLAN GPE message including a first message authentication code.
  • the first message authentication code is, for example, in the message authentication code field in FIG. 10 .
  • FIG. 10 For the meaning of each field in FIG. 10, please refer to the above introduction.
  • Case B The case where the CPRi interface is implemented by means of GTP-C.
  • the dial-up message including the watermark sent by the UP device is specifically a GTP-C message.
  • the UDP-based tunnel header shown in (d) of FIG. 6 specifically includes a GTP-C header and an NSH header.
  • the VXLAN GPE headers in the four types of dial-up messages including watermarks shown in FIG. 7 , FIG. 8 , FIG. 9 and FIG. 10 are replaced by GTP-C headers and NSH headers.
  • a field in the GTP-C header or a field in the NSH header is used to carry the watermark.
  • the CP device identifies the attack packet in the packet flow according to the watermark.
  • the packet flow refers to a series of packets received after the CP device sends the first control message.
  • the packet flow includes packets received by the CP device through the CPRi interface.
  • the CP device verifies the packet according to the watermark to identify whether the packet is an attack packet sent by an attacker or a normal packet sent by an UP device.
  • the CP device identifies attack packets includes multiple implementations.
  • the attack packet sent by the attacker itself does not carry a watermark.
  • the CP device determines that the packet is an attack packet according to the fact that the packet does not include a watermark.
  • the packet flow includes the fifth packet, and the CP device determines that the fifth packet is an attack packet according to the fact that the fifth packet does not include a watermark.
  • the attack packet sent by the attacker carries a watermark but the watermark is incorrect.
  • the CP device determines that the watermark carried in the packet is not the watermark sent by the CP device to the UP device before.
  • the packets are attack packets.
  • the specific implementation manners for the CP device to identify attack packets are illustrated by way of identification methods A to D.
  • the CP device uses VNI to identify attack packets.
  • the first packet refers to a packet in the packet flow received by the CP device after delivering the first VNI. If the first packet does not include the first VNI previously delivered by the CP device to the UP device, this indicates that the first packet is not a packet from the UP device. Therefore, the CP device fails to verify the first packet, and the CP device fails to verify the first packet. It is determined that the first packet is an attack packet. In an example, after the CP device adjusts the original VNI to the first VNI, it saves the first VNI in the local entry; when the CP device receives the first packet, it reads the first VNI from the local entry. VNI, so as to identify the attack packet by using the pre-stored first VNI.
  • the CP device can use the identification method A to discover that the received packet is an attack packet sent by an attacker.
  • the CP device determines that the first packet is an attack packet according to the fact that the first packet does not include VNI.
  • the CP device obtains the second VNI from the first packet; the CP device determines whether the second VNI is the same as the first VNI; if the second VNI is different from the first VNI, the CP device determines that the first packet is an attack packet.
  • the second VNI refers to the VNI carried in the first packet.
  • the first packet is also sent based on the VXLAN tunnel, and the second VNI is the VNI in the VXLAN header in the first packet.
  • CP devices and UP devices can achieve the following two effects.
  • the CP device can distinguish whether the packet is an attack packet sent by the attacker or a normal packet sent by the UP device according to whether the packet contains the adjusted VNI, thereby effectively defending against network attacks by the attacker.
  • the step that the CP device determines the attack packet according to the first VNI can be implemented by multiplexing the process of verifying the VNI in the received VXLAN packet in the VXLAN, and the step that the UP device carries the first VNI in the packet can be implemented. It is implemented by multiplexing the process of carrying VNI in VXLAN packets sent in VXLAN.
  • This embodiment does not limit how to identify normal packets when the identification mode A is adopted.
  • the first packet includes the first VNI previously delivered by the CP device to the UP device
  • the verification of the first packet is passed, and the CP device determines that the first packet is a non-attack packet (for example, a normal packet). Arts).
  • the CP device uses not only the VNI but also other features other than the VNI to identify the packet, if the first packet includes the first VNI previously delivered by the CP device to the UP device and other If the feature satisfies the normal condition, the CP device determines that the first packet is a normal packet.
  • the CP device uses random numbers to identify attack packets.
  • the second packet refers to a packet in the packet flow received by the CP device after delivering the first random number. If the second packet does not include the first random number sent by the CP device to the UP device, it indicates that the second packet is not from the UP device. Therefore, the CP device fails to verify the second packet, and the CP device fails to verify the second packet. The device determines that the second packet is an attack packet. In an example, after the CP device generates the first random number, it stores the first random number in a local table entry; when the CP device receives the second packet, it reads the first random number from the local table entry, Therefore, the attack packet is identified by using the pre-stored first random number.
  • the CP device can use the identification method B to discover that the received packets are attack packets sent by the attacker.
  • the CP device determines that the second packet is an attack packet according to the fact that the second packet does not include a random number.
  • the CP device obtains the second random number from the second packet; the CP device determines whether the second random number is the same as the first random number; if the second random number is different from the first random number, the CP device determines that the second packet is attack message.
  • the second random number refers to a random number carried in the second packet.
  • This embodiment does not limit how to identify normal packets when the identification mode B is adopted.
  • the second packet includes the first random number previously sent by the CP device to the UP device
  • the verification of the second packet is passed, and the CP device determines that the second packet is a non-attack packet (for example, normal message).
  • the CP device uses not only the random number but also other features other than the random number to identify the packet, if the second packet includes the first random number previously delivered by the CP device to the UP device and the second packet If other characteristics of the message meet the normal conditions, the CP device determines that the second message is a normal message.
  • the CP device uses timestamps to identify attack packets.
  • the third packet refers to a packet in the packet flow received by the CP device after delivering the first control message. If the third packet does not include the first timestamp corresponding to the time point of synchronization between the CP device and the UP device, this indicates that the third packet is not a packet from the UP device. Therefore, the CP device verifies the third packet. If it fails, the CP device determines that the third packet is an attack packet.
  • how the CP device obtains the first timestamp includes various ways. For example, since the time between the CP device and the UP device is synchronized, when the CP device receives the third packet, it reads the timestamp corresponding to the local time point as the first timestamp. Alternatively, when the CP device receives the third packet, it uses an algorithm to compensate the timestamp corresponding to the local time point, and uses the compensated timestamp as the first timestamp.
  • the CP device can use the identification method C to discover that the received packet is an attack packet sent by an attacker.
  • the third packet does not include a time stamp
  • the CP device determines that the third packet is an attack packet according to the fact that the third packet does not include a time stamp.
  • the CP device obtains the second time stamp from the third packet; the CP device compares the second time stamp with the first time stamp; if the time difference between the second time stamp and the first time stamp is greater than the time difference threshold, the CP device It is determined that the third packet is an attack packet.
  • the second timestamp refers to the timestamp carried in the third packet.
  • This embodiment does not limit how to identify normal packets when the identification mode C is adopted.
  • the third packet includes the first timestamp
  • the verification of the third packet is passed, and the CP device determines that the third packet is a non-attack packet (for example, a normal packet).
  • the time difference between the second time stamp and the first time stamp included in the third packet is less than the time difference threshold, for example, the time difference between the second time stamp and the first time difference belongs to a range of plus or minus 1 second Inside, the CP device determines that the third packet is a normal packet.
  • the CP device uses not only the time stamp but also other features other than the time stamp to identify the message, if the third message includes the first time stamp and the other features of the third message meet the normal conditions, the CP device The device determines that the third packet is a normal packet.
  • the CP device uses the message authentication code to identify attack packets.
  • the fourth packet refers to a packet in the packet flow received by the CP device after delivering the first control message. If the fourth packet does not include the first message authentication code, it indicates that the fourth packet is not from the UP device. Therefore, the CP device fails to verify the fourth packet, and the CP device determines that the fourth packet is an attack. message.
  • the CP device After the CP device sends the format of the message verification code through the first control message, it saves the format of the message verification code in the local table entry; when the CP device receives the fourth message, it reads from the local table entry
  • the format of the message verification code is to perform a hash operation on at least one parameter in the dial-up message according to the format of the message verification code stored in advance to obtain the first message verification code.
  • the CP device can use the identification method D to discover that the received packets are attack packets sent by the attacker.
  • the fourth packet does not include the message authentication code
  • the CP device determines that the fourth packet is an attack packet according to the fact that the fourth packet does not include the message authentication code.
  • the CP device obtains the second message authentication code from the fourth message; the CP device determines whether the second message authentication code is the same as the first message authentication code; if the second message authentication code is different from the first message authentication code, the CP device determines The fourth packet is an attack packet.
  • the second message authentication code refers to the message authentication code carried in the fourth packet.
  • This embodiment does not limit how to identify normal packets when the identification mode D is adopted.
  • the fourth packet includes the first message authentication code
  • the verification of the fourth packet is passed, and the CP device determines that the fourth packet is a non-attack packet (for example, a normal packet).
  • the CP device uses not only the message authentication code, but also other characteristics than the message authentication code to identify the packet, if the fourth packet includes the first message authentication code and other characteristics of the fourth packet satisfy the normal condition, the CP device determines that the fourth packet is a normal packet.
  • the identification method a to the identification method d can be combined in any manner.
  • only one type of watermark in the identification mode a to the identification mode d is used to defend against attacks; in another example, two or more types of watermarks in the identification mode a to the identification mode d are used at the same time Defense attack.
  • the CP device generates and sends a first control message, and the first control message is used to instruct the UP device to carry the first VNI and the first random number when sending a dial-up message to the CP device;
  • the UP device carries the first VNI and the first random number in the dial-up message according to the first control message; the UP device sends the dial-up message including the first VNI and the first random number to the CP device.
  • the CP device determines that the first packet is an attack packet according to the fact that the first packet does not include the first VNI or does not include the first random number.
  • the CP device determines that the first packet is a normal packet according to the first packet including the first VNI and the first random number.
  • the CP device also determines whether the attack packet is sent from the UP device according to the watermark. If the attack packet is sent from the UP device, the CP device limits the rate of the user-side interface on the UP device.
  • the user-side interface refers to the interface connected to the access network or the aggregation network.
  • the user-side interface is the interface used by the UP device to receive original dial-up packets from the user equipment.
  • the CP device sends a third control message to the UP device, where the third control message is used to instruct the UP device to limit the rate of the user-side interface.
  • the UP device limits the rate of the original dial-up packet received through the user-side interface. In this way, in scenarios such as home terminal poisoning, by limiting the speed of the user-side interface of the UP device, the problem of the home terminal concentrically dialing up to the UP device can be solved.
  • the CP device discards the attack packet.
  • the CP device distinguishes attack packets from normal packets according to the watermark, and discards the attack packets. Since the CP device does not need to respond to the attack packets by dialing up, performing authentication and other dial-up processing actions, the computing resources of the CP device are saved. In order to avoid the situation that normal packets are randomly discarded by the token bucket, the CP device can perform dial-up processing for normal packets to ensure that normal users can go online.
  • the CP device cooperates with the designated UP device to defend against attacks through watermarking. For example, the CP device measures the speed of the dial-up packets of each source IP address, and obtains the corresponding reception rate of the dial-up packets of each source IP address. If the receiving rate of the dial-up packets of the first source IP address satisfies the abnormal condition, the CP device determines, among at least one UP device associated with the CP device, the first UP device with the first source IP address, and sends the message to the first UP device. The first control message. After that, the first UP device carries the watermark in the dial-up message.
  • the CP device identifies the attack packet in the packet flow whose IP address is the first source IP address.
  • the attacker since the attacker often impersonates the identity of the UP device when launching an attack, that is, the attacker uses the same source IP address as a certain UP device to send packets, so if the dial-up packet with the first source IP address is received If the rate satisfies the abnormal condition, it indicates that the dial-up packets of the first source IP address are likely to be forged by attackers. Therefore, the CP device defends against attacks by linking with the designated first UP device. Compared with the requirement that all UP devices in the system send the packets The dial-up messages carry watermarks, and the CP device uses watermark verification for all received message flows. The network attack defense function is more precise and the overhead is lower.
  • the CP device In response to the receiving rate of the dial-up message meeting the normal condition, the CP device generates a second control message, where the second control message is used to instruct the UP device to cancel carrying the watermark when sending the dial-up message to the CP device.
  • the CP device will determine that the network attack has stopped, and the CP device generates and sends a second control message to instruct the UP device to cancel the watermark when sending dial-up packets, thereby closing the pass-through The function of watermark defense against attacks, thereby reducing network overhead and equipment pressure.
  • the CP device measures the reception rate of dial-up packets. If the duration of the reception rate exceeding the rate threshold is less than the preset duration, or the duration of the reception rate being less than the rate threshold is greater than the preset duration, or the reception rate of dial-up packets is lower than the rate threshold, Then the CP device determines that the reception rate satisfies the normal condition.
  • the CUSP is extended to implement the second control message.
  • a new type of CUSP message is extended.
  • the new type of CUSP message is used to instruct the UP device to cancel carrying the watermark when sending the dial-up message to the CP device
  • the new type of CUSP message is the second control message.
  • the CUSP message as the second control message includes a type field.
  • the type field in the CUSP message includes the type value.
  • the type value identifies the CUSP message and instructs the UP device to cancel carrying the watermark when sending the dial-up message to the CP device.
  • the type value is the type of control messages in Table 2 of RFC 8772.
  • Table 18 is an example of a CUSP message as the second control message.
  • the watermark end (waterprint_End) in Table 18 is an example of the type name of the CUSP message as the second control message.
  • 10 in Table 18 is an example of the type value of the CUSP message as the second control message.
  • the PFCP extension is implemented to implement the second control message.
  • the PFCP message as the second control message includes the Watermark IE.
  • the second control message is a PFCP node message.
  • the second control message is a PFCP session message.
  • the CP device sends a second control message to the UP device.
  • the UP device receives the second control message from the CP device.
  • the UP device sends a dial-up message that does not include a watermark to the CP device according to the second control message.
  • the dial-up message sent by the UP device includes, for example, the original dial-up message but does not include the watermark.
  • the original dialing packet is sent by the user equipment, and in another example, the original dialing packet may also be sent by an access device connected to the user equipment.
  • the original dial-up message will be transmitted to the UP device. Since the second control message indicates that the UP device cancels carrying the watermark when sending the dial-up message to the CP device, when the UP device receives the original dial-up message, it will cancel the dial-up message according to the second control message sent by the CP device.
  • the watermark is carried in the UP device, so that the watermark is no longer included in the dial-up packets sent by the UP device.
  • the CP device sends a control message to the UP device when it finds that the receiving rate of the dial-up message is abnormal, so as to notify the UP device to carry the watermark when sending the dial-up message through the control message. Since the dial-up packets sent by the UP device include a watermark, and the attack packets sent by the attacker do not include a watermark, the CP device can effectively identify the attack packets in the received packet flow according to the watermark, so that the attack packets can be It is discarded by the CP device, thereby effectively resisting network attacks, reducing the risk of the CP device being attacked by the network, and improving the security of the CP device and the communication system.
  • the interaction process in which the CP device and the UP device participate is exemplarily introduced above through the method 300 .
  • the following describes the CP device and the UP device in the embodiments of the present application.
  • the CP device and the UP device described below have any of the functions of the CP device and the UP device in the foregoing method 300, respectively.
  • FIG. 11 shows a possible schematic structural diagram of the CP device involved in the above embodiment.
  • the CP device 400 shown in FIG. 11 for example, implements the functions of the CP device in the method 300 .
  • the CP device 400 includes a processing unit 401 and a sending unit 402 .
  • Each unit in the CP device 400 is implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • Each unit in the CP device 400 is used to perform the corresponding functions of the CP device in the above method 300 .
  • the processing unit 401 is configured to support the CP device 400 to execute S303, S309 and S310.
  • the sending unit 402 is configured to support the CP device 400 to perform S304.
  • the processing unit 401 and the sending unit 402 are also configured to support the CP device 400 to perform other processes performed by the CP device in the techniques described herein.
  • the processing unit 401 is further configured to support the CP device 400 to execute S311.
  • the sending unit 402 is further configured to support the CP device 400 to perform S312.
  • S311 For the specific execution process, please refer to the detailed description of the corresponding steps in the method 300, which will not be repeated here.
  • the various units in the CP device 400 are integrated into one processing unit.
  • each unit in the CP device 400 is integrated on the same chip.
  • the chip includes a processing circuit, an input interface and an output interface that are internally connected and communicated with the processing circuit.
  • the processing unit 401 is implemented by a processing circuit in the chip.
  • the sending unit 402 is implemented through an output interface in the chip.
  • the chip uses one or more field programmable gate arrays (full name in English: field-programmable gate array, English abbreviation: FPGA), programmable logic device (full English name: programmable logic device, English abbreviation: PLD), controller , state machines, gate logic, discrete hardware components, any other suitable circuit, or any combination of circuits capable of performing the various functions described throughout this application.
  • field programmable gate arrays full name in English: field-programmable gate array, English abbreviation: FPGA
  • programmable logic device full English name: programmable logic device, English abbreviation: PLD
  • controller state machines, gate logic, discrete hardware components, any other suitable circuit, or any combination of circuits capable of performing the various functions described throughout this application.
  • each unit of the CP device 400 physically exists independently.
  • a part of the units of the CP device 400 exist physically alone, and another part of the units are integrated in one unit.
  • the processing unit 401 and the sending unit 402 are the same unit.
  • the processing unit 401 and the sending unit 402 are different units.
  • the integration of the different units is implemented in the form of hardware, that is, the different units correspond to the same hardware.
  • the integration of different units is implemented in the form of software units.
  • the processing unit 401 in the CP device 400 is implemented by at least one of the processor 701 or the processor 705 in the device 700 .
  • the sending unit 402 in the CP device 400 is implemented through the communication interface 704 in the device 700 .
  • the processing unit 401 in the CP device 400 is processed by the central processing unit 611 in the device 600, the central processing unit 631 on the interface board 603, the network processor 632, the central processing unit 641 on the interface board 640, or the network processing unit at least one of the implementations of the device 642 .
  • the sending unit 402 in the CP device 400 is implemented by at least one of the physical interface card 633 or the physical interface card 643 in the device 600 .
  • each unit in the CP device 400 is software generated after the processor 701 or the processor 705 in the device 700 reads the program code stored in the memory 703;
  • Each unit in the device 400 is the central processing unit 611 in the device 600, the central processing unit 631 on the interface board 603, the network processor 632, the central processing unit 641 on the interface board 640, or the network processor 642 reads the storage in the memory 612.
  • the software generated after the program code is a virtualized device.
  • the virtualization device includes, but is not limited to, at least one of a virtual machine, a container, and a Pod.
  • the CP device 400 is deployed on a hardware device (eg, a physical server) in the form of a virtual machine.
  • a hardware device eg, a physical server
  • the CP device 400 is implemented based on a general physical server combined with a Network Functions Virtualization (NFV) technology.
  • NFV Network Functions Virtualization
  • the CP device 400 is, for example, a virtual host, a virtual router, or a virtual switch.
  • NFV Network Functions Virtualization
  • the CP device 400 is deployed on a hardware device in the form of a container (eg, a docker container).
  • the process of the CP device 400 executing the above method embodiments is encapsulated in an image file, and the hardware device creates the CP device 400 by running the image file.
  • the CP device 400 is deployed on a hardware device in the form of a Pod.
  • a Pod includes a plurality of containers, and each container is used to implement one or more units in the CP device 400 .
  • FIG. 12 shows a possible schematic structural diagram of the UP device involved in the above embodiment.
  • the UP device 500 shown in FIG. 12 for example, implements the functions of the UP device in the method 300 .
  • the UP device 500 includes a receiving unit 501 , a processing unit 502 and a sending unit 503 .
  • Each unit in the UP device 500 is implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • Each unit in the UP device 500 is used to perform the corresponding functions of the UP device in the above method 300 .
  • the receiving unit 501 is configured to support the UP device 500 to perform S305.
  • the processing unit 502 is used to support the UP device 500 to execute S307.
  • the sending unit 503 is used to support the UP device 500 to perform S308.
  • the receiving unit 501, the processing unit 502, or the sending unit 503 are also used to support the UP device 500 to perform other processes performed by the UP device in the techniques described herein.
  • the receiving unit 501 is configured to support the UP device 500 to perform other receiving operations performed by the UP device in the method 300, such as S313.
  • the sending unit 503 is configured to support the UP device 500 to perform other sending operations performed by the UP device in the method 300, such as S315.
  • S315. For the specific execution process, please refer to the detailed description of the corresponding steps in the method 300, which will not be repeated here.
  • the various units in the UP device 500 are integrated into one processing unit.
  • each unit in the UP device 500 is integrated on the same chip.
  • the chip includes a processing circuit, an input interface and an output interface that are internally connected and communicated with the processing circuit.
  • the processing unit 502 is implemented by a processing circuit in the chip.
  • the receiving unit 501 is implemented by an input interface in the chip.
  • the sending unit 503 is implemented through an output interface in the chip.
  • the chip uses one or more field programmable gate arrays (full name in English: field-programmable gate array, English abbreviation: FPGA), programmable logic device (full English name: programmable logic device, English abbreviation: PLD), controller , state machines, gate logic, discrete hardware components, any other suitable circuit, or any combination of circuits capable of performing the various functions described throughout this application.
  • field programmable gate arrays full name in English: field-programmable gate array, English abbreviation: FPGA
  • programmable logic device full English name: programmable logic device, English abbreviation: PLD
  • controller state machines, gate logic, discrete hardware components, any other suitable circuit, or any combination of circuits capable of performing the various functions described throughout this application.
  • each unit of the UP device 500 physically exists separately.
  • some units of the UP device 500 are physically separate and some units are integrated into one unit.
  • the processing unit 502 and the sending unit 503 are the same unit.
  • the processing unit 502 and the sending unit 503 are different units.
  • the integration of the different units is implemented in the form of hardware, that is, the different units correspond to the same hardware.
  • the integration of different units is implemented in the form of software units.
  • the processing unit 502 in the UP device 500 is implemented by at least one of the processor 701 or the processor 705 in the device 700 .
  • the receiving unit 501 and the sending unit 503 in the UP device 500 are implemented, for example, by the communication interface 704 in the device 700 .
  • the processing unit 502 in the UP device 500 is processed by the central processing unit 611 in the device 600, the central processing unit 631 on the interface board 603, the network processor 632, the central processing unit 641 on the interface board 640, or the network processing unit at least one of the implementations of the device 642 .
  • the receiving unit 501 and the sending unit 503 in the UP device 500 are implemented by at least one of the physical interface card 633 or the physical interface card 643 in the device 600 .
  • each unit in the UP device 500 is software generated by the processor 701 or the processor 705 in the device 700 after reading the program code stored in the memory 703, or, for example, the UP
  • Each unit in the device 500 is the central processing unit 611 in the device 600, the central processing unit 631 on the interface board 603, the network processor 632, the central processing unit 641 on the interface board 640, or the network processor 642 reads the storage in the memory 612.
  • the UP device 500 is a virtualized device.
  • the virtualization device includes, but is not limited to, at least one of a virtual machine, a container, and a Pod.
  • the UP device 500 is deployed on a hardware device (eg, a physical server) in the form of a virtual machine.
  • a hardware device eg, a physical server
  • the UP device 500 is implemented based on a general physical server combined with a Network Functions Virtualization (NFV) technology.
  • NFV Network Functions Virtualization
  • the UP device 500 is, for example, a virtual host, a virtual router or a virtual switch.
  • NFV Network Functions Virtualization
  • the UP device 500 is deployed on a hardware device in the form of a container (eg, a docker container).
  • the process of the UP device 500 executing the above method embodiments is encapsulated in an image file, and the hardware device creates the UP device 500 by running the image file.
  • the UP device 500 is deployed on a hardware device in the form of a Pod.
  • a Pod includes a plurality of containers, each of which is used to implement one or more units in the UP device 500 .
  • the above describes how to implement the CP device and the UP device from the perspective of logical functions through the CP device 400 and the UP device 500 .
  • the following describes how to implement the CP device or the UP device from the perspective of hardware through the device 600 and the device 700 .
  • the device 600 shown in FIG. 13 or the device 700 shown in FIG. 14 is an example of the hardware structure of the CP device or the UP device.
  • the device 600 or the device 700 corresponds to the CP device or the UP device in the above method 300, and the hardware, modules and the other operations and/or functions in the device 600 or the device 700 are respectively for realizing the CP device or the UP device in the method embodiment.
  • the steps of the methods disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
  • the software modules are located in, for example, random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware, which will not be described in detail here to avoid repetition.
  • FIG. 13 shows a schematic diagram of a hardware structure of a device provided by an exemplary embodiment of the present application.
  • the device 600 is configured as a CP device or a UP device in the method 300 , for example.
  • the device 600 includes: a main control board 610 and an interface board 630 .
  • the main control board is also called a main processing unit (MPU) or a route processor card (route processor card).
  • the main control board 610 is used to control and manage various components in the device 600, including route calculation, device management, Equipment maintenance, protocol processing functions.
  • the main control board 610 includes: a central processing unit 611 and a memory 612 .
  • the interface board 630 is also referred to as a line processing unit (LPU), a line card or a service board.
  • the interface board 630 is used to provide various service interfaces and realize data packet forwarding.
  • the service interface includes, but is not limited to, an Ethernet interface, a POS (Packet over SONET/SDH) interface, etc.
  • the Ethernet interface is, for example, a flexible Ethernet service interface (Flexible Ethernet Clients, FlexE Clients).
  • the interface board 630 includes: a central processing unit 631 , a network processor 632 , a forwarding table entry storage 634 and a physical interface card (PIC) 633 .
  • PIC physical interface card
  • the central processing unit 631 on the interface board 630 is used to control and manage the interface board 630 and communicate with the central processing unit 611 on the main control board 610 .
  • the network processor 632 is used to implement packet forwarding processing.
  • the form of the network processor 632 is, for example, a forwarding chip.
  • the network processor 632 is configured to forward the received message based on the forwarding table stored in the forwarding table entry memory 634. If the destination address of the message is the address of the device 600, the message is sent to the CPU (eg The central processing unit 611) processes; if the destination address of the message is not the address of the device 600, the next hop and outgoing interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the destination The outbound interface corresponding to the address.
  • the processing of the uplink packet includes: processing the incoming interface of the packet, and searching the forwarding table; processing of the downlink packet: searching the forwarding table, and so on.
  • the physical interface card 633 is used to realize the docking function of the physical layer, the original traffic enters the interface board 630 from this, and the processed packets are sent from the physical interface card 633.
  • the physical interface card 633 is also called a daughter card, which can be installed on the interface board 630 and is responsible for converting the photoelectric signal into a message, and after checking the validity of the message, the message is forwarded to the network processor 632 for processing.
  • the central processing unit may also perform the functions of the network processor 632 , such as implementing software forwarding based on a general-purpose CPU, so that the network processor 632 is not required in the physical interface card 633 .
  • the device 600 includes multiple interface boards, for example, the device 600 further includes an interface board 640 , and the interface board 640 includes a central processing unit 641 , a network processor 642 , a forwarding table entry storage 644 and a physical interface card 643 .
  • the interface board 640 includes a central processing unit 641 , a network processor 642 , a forwarding table entry storage 644 and a physical interface card 643 .
  • the device 600 further includes a switch fabric board 620 .
  • the switch fabric 620 is also called, for example, a switch fabric unit (switch fabric unit, SFU).
  • SFU switch fabric unit
  • the switching network board 620 is used to complete data exchange between the interface boards.
  • the interface board 630 and the interface board 640 communicate through, for example, the switch fabric board 620 .
  • the main control board 610 and the interface board 630 are coupled.
  • the main control board 610 , the interface board 630 , the interface board 640 , and the switch fabric board 620 are connected to the system backplane through a system bus to achieve intercommunication.
  • an inter-process communication (IPC) channel is established between the main control board 610 and the interface board 630, and the main control board 610 and the interface board 630 communicate through the IPC channel.
  • IPC inter-process communication
  • the device 600 includes a control plane and a forwarding plane
  • the control plane includes the main control board 610 and the central processing unit 631
  • the forwarding plane includes various components that perform forwarding, such as the forwarding entry memory 634, the physical interface card 633, and the network processor 632.
  • the control plane performs functions such as routers, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining device status.
  • the control plane delivers the generated forwarding tables to the forwarding plane.
  • the network processor 632 is based on the control plane
  • the delivered forwarding table is forwarded to the packet received by the physical interface card 633 by looking up the table.
  • the forwarding table issued by the control plane is stored in the forwarding table entry storage 634, for example.
  • the control plane and the forwarding plane are, for example, completely separate and not on the same device.
  • the operations on the interface board 640 in the embodiments of the present application are the same as the operations on the interface board 630, and for brevity, details are not repeated here.
  • the device 600 in this embodiment may correspond to the CP device or the UP device in the above method embodiments, and the main control board 610, the interface board 630 and/or 640 in the device 600, for example, implement the above method embodiments
  • the functions possessed by the CP device or the UP device and/or various steps implemented are not repeated here.
  • main control boards there may be one or more main control boards, and when there are multiple main control boards, for example, the main control board and the backup main control board are included.
  • a network device may have at least one switching network board, and the switching network board realizes data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those in a centralized architecture.
  • the form of the network device can also be that there is only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on this board.
  • the central processing unit on the board can be combined into a central processing unit on this board to perform the functions of the two superimposed, the data exchange and processing capacity of this form of equipment is low (for example, low-end switches or routers and other networks. equipment).
  • the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
  • FIG. 14 shows a schematic structural diagram of a device 700 provided by an exemplary embodiment of the present application, where the device 700 is configured as a CP device or a UP device in the method 300, for example.
  • the device 700 may be a host computer, a server or a personal computer or the like.
  • the device 700 may be implemented by a general bus architecture.
  • Device 700 includes at least one processor 701 , communication bus 702 , memory 703 , and at least one communication interface 704 .
  • the processor 701 is, for example, a general-purpose central processing unit (central processing unit, CPU), a network processor (network processor, NP), a graphics processor (Graphics Processing Unit, GPU), a neural-network processing unit (neural-network processing units, NPU) ), a data processing unit (Data Processing Unit, DPU), a microprocessor or one or more integrated circuits for implementing the solution of the present application.
  • the processor 701 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
  • the PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
  • the communication bus 702 is used to transfer information between the aforementioned components.
  • the communication bus 702 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in FIG. 14, but it does not mean that there is only one bus or one type of bus.
  • the memory 703 is, for example, a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (random access memory, RAM) or a memory device that can store information and instructions.
  • Other types of dynamic storage devices such as electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disks storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of Any other medium accessed by a computer, but not limited to this.
  • the memory 703 exists independently, for example, and is connected to the processor 701 through the communication bus 702 .
  • the memory 703 may also be integrated with the processor 701 .
  • the Communication interface 704 uses any transceiver-like device for communicating with other devices or a communication network.
  • the communication interface 704 includes a wired communication interface and may also include a wireless communication interface.
  • the wired communication interface may be, for example, an Ethernet interface.
  • the Ethernet interface can be an optical interface, an electrical interface or a combination thereof.
  • the wireless communication interface may be a wireless local area network (wireless local area networks, WLAN) interface, a cellular network communication interface or a combination thereof, and the like.
  • the processor 701 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 14 .
  • the device 700 may include multiple processors, such as the processor 701 and the processor 705 shown in FIG. 14 .
  • processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • the device 700 may further include an output device and an input device.
  • the output device communicates with the processor 701 and can display information in a variety of ways.
  • the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, a projector, or the like.
  • the input device communicates with the processor 701 and can receive user input in a variety of ways.
  • the input device may be a mouse, a keyboard, a touch screen device, or a sensor device, or the like.
  • the memory 703 is used to store the program code 710 for executing the solution of the present application, and the processor 701 can execute the program code 710 stored in the memory 703. That is, the device 700 can implement the network attack defense method provided by the method embodiment through the processor 701 and the program code 710 in the memory 703 .
  • the device 700 in this embodiment of the present application may correspond to the CP device or the UP device in the foregoing method embodiments, and the processor 701, the communication interface 704, etc. in the device 700 may implement the CP device or the UP device in the foregoing method embodiments.
  • the functions and/or the various steps and methods implemented by the UP device are not repeated here.
  • an embodiment of the present application provides a communication system 800 .
  • the system 800 includes: a CP device 801 and a UP device 802 .
  • the CP device 801 is the CP device 400 shown in FIG. 11 , the device 600 shown in FIG. 14 , or the device 700 shown in FIG. 15
  • the UP device 802 is the UP device 500 shown in FIG. 12 or The apparatus 600 shown in FIG. 14 or the apparatus 700 shown in FIG. 15 .
  • a computer program product includes computer instructions stored in a computer-readable storage medium.
  • the processor of the CP device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the CP device performs the relevant steps on the CP device side in the above method 300 .
  • a computer program product includes computer instructions stored in a computer-readable storage medium.
  • the processor of the UP device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the UP device performs the relevant steps on the UP device side in the above method 300 .
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the unit is only a logical function division.
  • there may be other division methods for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
  • the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present application.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application are essentially or part of contributions to the prior art, or all or part of the technical solutions can be embodied in the form of software products, and the computer software products are stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .
  • first, second and other words are used to distinguish the same or similar items that have basically the same function and function. It should be understood that there is no logical OR between “first” and “second”. Timing dependencies, and do not limit the number and execution order. It will also be understood that, although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, a first message may be referred to as a second message, and, similarly, a second message may be referred to as a first message, without departing from the scope of the various examples. Both the first message and the second message may be messages, and in some cases, may be separate and distinct messages.
  • the term “if” may be interpreted to mean “when” or “upon” or “in response to determining” or “in response to detecting.”
  • the phrases “if it is determined" or “if a [statement or event] is detected” can be interpreted to mean “when determining" or “in response to determining... ” or “on detection of [recited condition or event]” or “in response to detection of [recited condition or event]”.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer program instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer program instructions may be transmitted from a website site, computer, server or data center via Transmission by wire or wireless to another website site, computer, server or data center.
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
  • the available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, digital video discs (DVDs), or semiconductor media (eg, solid state drives), and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Provided are a network attack defense method, and a CP device and a UP device, which belong to the technical field of communications. The method disclosed in the present application is applied to a CP and UP disaggregated communication system. The method comprises: a CP device responding to the case where the receiving rate of a dialing packet meets an abnormal condition so that the CP device generates a first control message, wherein the first control message is used for indicating that a UP device carries a watermark when sending the dialing packet to the CP device; the CP device sending the first control message to the UP device; the CP device identifying an attack packet from a packet stream according to the watermark; and the CP device discarding the attack packet. The method can effectively realize network attack defense, and can ensure the security of a CP device.

Description

网络攻击的防御方法、CP设备及UP设备Network attack defense method, CP equipment and UP equipment
本申请要求于2020年08月11日提交的申请号为202010803044.3、发明名称为“网络攻击的防御方法、CP设备及UP设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202010803044.3 and the invention titled "Network Attack Defense Method, CP Equipment and UP Equipment" filed on August 11, 2020, the entire contents of which are incorporated herein by reference middle.
技术领域technical field
本申请涉及通信技术领域,特别涉及一种网络攻击的防御方法、CP设备及UP设备。The present application relates to the field of communication technologies, and in particular, to a network attack defense method, a CP device, and a UP device.
背景技术Background technique
随着软件定义网络(software defined network,SDN)技术和网络功能虚拟化(network functions virtualization,NFV)技术的发展,数据通信网络由传统的以网络为核心的架构向以数据中心为核心的网络架构演进。传统的网络设备也从专业化朝着通用化演进。有鉴于此,控制面和用户面分离(control plane and user plane disaggregated,CU分离)技术应运而生,成为本领域的研究热点。CU分离是指控制面(control plane,CP)和用户面(user plane,UP)解耦的网络架构。在采用CU分离架构时,CP和UP位于不同硬件设备上,或者CP和UP位于同一个硬件设备上且功能分离。时下,CU分离架构成为很多通信系统演进的下一跳,得到了主流厂商、运营商和标准组织的认可。With the development of software defined network (SDN) technology and network functions virtualization (NFV) technology, data communication networks have changed from traditional network-centric architecture to data center-centric network architecture. evolution. Traditional network equipment has also evolved from specialization to generalization. In view of this, control plane and user plane disaggregated (control plane and user plane disaggregated, CU separation) technology emerged as the times require, which has become a research hotspot in this field. CU separation refers to a network architecture in which the control plane (CP) and the user plane (UP) are decoupled. When the CU separation architecture is adopted, the CP and UP are located on different hardware devices, or the CP and UP are located on the same hardware device and have separate functions. Nowadays, the CU separation architecture has become the next hop in the evolution of many communication systems, and has been recognized by mainstream manufacturers, operators and standards organizations.
时下,CP设备受到网络攻击的风险很大,影响了CP设备的安全性。Nowadays, CP devices are at great risk of being attacked by the network, which affects the security of CP devices.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种网络攻击的防御方法、CP设备及UP设备,有助于保障CP设备的安全性。所述技术方案如下:The embodiments of the present application provide a network attack defense method, a CP device, and a UP device, which help to ensure the security of the CP device. The technical solution is as follows:
第一方面,提供了一种网络攻击的防御方法,该方法应用在CP和UP分离的通信系统中,以该方法从CP设备一侧的角度描述,CP设备响应于拨号报文的接收速率满足异常条件,所述CP设备生成第一控制消息,所述第一控制消息用于指示所述UP设备在向所述CP设备发送拨号报文时携带水印;所述CP设备向所述UP设备发送所述第一控制消息;所述CP设备根据所述水印,在报文流中识别攻击报文;所述CP设备丢弃所述攻击报文。In a first aspect, a method for defending against network attacks is provided. The method is applied in a communication system in which the CP and UP are separated. The method is described from the perspective of the CP device. The CP device responds to a dial-up message at a rate that meets the requirements. Abnormal condition, the CP device generates a first control message, the first control message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device; the CP device sends the UP device to the the first control message; the CP device identifies the attack packet in the packet flow according to the watermark; the CP device discards the attack packet.
通过第一方面的方法,CP设备在发现拨号报文的接收速率异常时,认为正在遭受网络攻击,那么在这种情况下,CP设备会生成并向UP设备下发控制消息,以便通过控制消息通知UP设备在上送拨号报文时携带水印,实现CP控制UP使能水印打开的功能。由于攻击者难以知晓CP设备与UP设备之间协商的水印,攻击者也就无法构造包含水印的攻击报文,因此CP设备后续收到报文流时,能够依据报文是否包括水印,判别报文究竟是攻击者上送的攻击报文还是UP设备上送的正常报文,进而将攻击报文丢弃。由于攻击报文被CP设备丢弃,也就避免了攻击报文的处理动作消耗CP设备的处理资源。由此可见,该方法能够有效地抵御网络攻击,保障了CP设备的安全性。Through the method of the first aspect, when the CP device finds that the receiving rate of the dial-up packet is abnormal, it considers that it is under a network attack. In this case, the CP device will generate and deliver a control message to the UP device, so that the control message can pass the control message. Notify the UP device to carry the watermark when sending dial-up packets, so as to realize the function that the CP controls the UP to enable the watermark to be turned on. Since it is difficult for an attacker to know the watermark negotiated between the CP device and the UP device, the attacker cannot construct an attack packet containing the watermark. Therefore, when the CP device receives a packet stream, it can determine whether the packet contains a watermark or not. Whether the packet is an attack packet sent by the attacker or a normal packet sent by the UP device, the attack packet is discarded. Since the attack packets are discarded by the CP device, the processing of the attack packets is prevented from consuming the processing resources of the CP device. It can be seen that this method can effectively resist network attacks and ensure the security of the CP device.
可选地,所述水印包括第一虚拟扩展局域网网络标识符(VXLAN network identifier, VNI),所述报文流包括第一报文,所述CP设备根据所述水印,在报文流中识别攻击报文,包括:所述CP设备根据所述第一报文包括所述第一VNI确定所述第一报文为非攻击报文。Optionally, the watermark includes a first virtual extended local area network identifier (VXLAN network identifier, VNI), the packet stream includes a first packet, and the CP device identifies in the packet stream according to the watermark. The attack packet includes: the CP device determines that the first packet is a non-attack packet according to the first packet including the first VNI.
通过这种可选方式,CP设备根据第一VNI确定攻击报文的动作能通过复用虚拟扩展局域网(Virtual Extensible Local Area Network,VXLAN)转发流程中对收到的VXLAN报文中的VNI校验的流程实现。由于CP设备能复用已有的处理逻辑来实现网络攻击的防御能力,节约了CP设备为了新增防御能力而新增的计算性能开销。由此可见,这种实现防御网络攻击的方案开销小,实用性高。In this optional manner, the action of the CP device to determine the attack packet according to the first VNI can verify the VNI in the received VXLAN packet by multiplexing the Virtual Extensible Local Area Network (VXLAN) forwarding process. process implementation. Since the CP device can reuse the existing processing logic to realize the network attack defense capability, the computing performance overhead of the CP device to increase the defense capability is saved. It can be seen that this solution for implementing defense against network attacks has low overhead and high practicability.
可选地,所述水印包括第一随机数,所述报文流包括第二报文,所述CP设备根据所述水印,在报文流中识别攻击报文,包括:所述CP设备根据所述第二报文包括所述第一随机数确定所述第二报文为非攻击报文。Optionally, the watermark includes a first random number, the packet stream includes a second packet, and the CP device identifies the attack packet in the packet stream according to the watermark, including: the CP device according to The second packet includes the first random number to determine that the second packet is a non-attack packet.
通过这种可选方式,由于攻击者难以知晓CP设备向UP设备下发的第一随机数,也就无法构造包含第一随机数的攻击报文。因此,CP设备能够依据报文是否包含第一随机数,有效地区分报文是攻击者上送的攻击报文还是非攻击报文(例如UP设备上送的正常报文),从而有效防御攻击者的网络攻击。In this optional manner, since it is difficult for an attacker to know the first random number delivered by the CP device to the UP device, it is impossible to construct an attack packet containing the first random number. Therefore, the CP device can effectively distinguish whether the packet is an attack packet sent by an attacker or a non-attack packet (for example, a normal packet sent by the UP device) according to whether the packet contains the first random number, thereby effectively defending against attacks. cyberattacks.
可选地,所述水印包括第一时间戳,所述第一时间戳用于指示所述CP设备与所述UP设备之间同步的时间点,所述报文流包括第三报文,所述CP设备根据所述水印,在报文流中识别攻击报文,包括:所述CP设备根据所述第三报文包括所述第一时间戳确定所述第三报文为非攻击报文。Optionally, the watermark includes a first timestamp, and the first timestamp is used to indicate a time point of synchronization between the CP device and the UP device, and the packet flow includes a third packet, so The CP device identifying the attack packet in the packet flow according to the watermark, comprising: determining, by the CP device, that the third packet is a non-attack packet according to the third packet including the first timestamp .
通过这种可选方式,一方面,由于攻击者难以知晓CP设备与UP设备同步的时间点,也就无法构造包含同步的时间点对应的第一时间戳的攻击报文。因此,CP设备能够依据报文是否包含第一时间戳,有效地区分报文是攻击者上送的攻击报文还是非攻击报文(例如UP设备上送的正常报文),从而有效防御攻击者的网络攻击。另一方面,能够复用CP设备与UP设备之间的时间同步机制,从而降低了实现复杂度。In this optional manner, on the one hand, since it is difficult for an attacker to know the time point at which the CP device and the UP device are synchronized, he cannot construct an attack packet including the first timestamp corresponding to the synchronized time point. Therefore, the CP device can effectively distinguish whether the packet is an attack packet sent by an attacker or a non-attack packet (for example, a normal packet sent by an UP device) according to whether the packet contains the first timestamp, thereby effectively defending against attacks. cyberattacks. On the other hand, the time synchronization mechanism between the CP device and the UP device can be multiplexed, thereby reducing the implementation complexity.
可选地,所述水印包括第一消息认证码,所述报文流包括第四报文,所述CP设备根据所述水印,在报文流中识别攻击报文,包括:所述CP设备根据所述第四报文包括所述第一消息认证码确定所述第四报文为非攻击报文。Optionally, the watermark includes a first message authentication code, the packet stream includes a fourth packet, and the CP device identifies an attack packet in the packet stream according to the watermark, including: the CP device It is determined that the fourth packet is a non-attack packet according to the fourth packet including the first message authentication code.
通过这种可选方式,由于CP设备与UP设备将消息认证码作为验证报文使用的水印,而消息认证码需要通过哈希运算得到,安全性高,难以伪造,因此抵御网络攻击的能力强。In this optional method, since the CP device and the UP device use the message authentication code as a watermark for verifying the message, and the message authentication code needs to be obtained through hash operation, the security is high, and it is difficult to forge, so the ability to resist network attacks is strong. .
可选地,所述第一控制消息包括所述水印;或者,所述第一控制消息包括所述水印对应的水印类型信息;或者,所述第一控制消息包括生成所述水印相关的参数。Optionally, the first control message includes the watermark; or, the first control message includes watermark type information corresponding to the watermark; or, the first control message includes parameters related to generating the watermark.
可选地,所述第一控制消息为转控分离协议(control plane and user plane separated protocol,CUSP)报文,所述CUSP报文包括水印类型长度值(type length value,TLV),所述水印TLV为携带所述水印或所述参数的TLV。Optionally, the first control message is a control plane and user plane separated protocol (control plane and user plane separated protocol, CUSP) message, the CUSP message includes a watermark type length value (type length value, TLV), the watermark The TLV is the TLV carrying the watermark or the parameter.
通过这种可选方式,由于CP设备通过CUSP向UP设备下发水印,能够复用CP设备以及UP设备实现CUSP通信的相关架构,提高本技术方案的可用性。In this optional manner, since the CP device issues a watermark to the UP device through the CUSP, the CP device and the UP device can be multiplexed to realize the relevant architecture of CUSP communication, thereby improving the usability of the technical solution.
可选地,所述第一控制消息为包转发控制协议(Packet Forwarding Control Protocol,PFCP)消息,所述PFCP消息包括水印信息元素(information element,IE),所述水印IE为携带所述水印或所述参数的IE。Optionally, the first control message is a Packet Forwarding Control Protocol (Packet Forwarding Control Protocol, PFCP) message, the PFCP message includes a watermark information element (information element, IE), and the watermark IE carries the watermark or IE of the parameter.
通过这种可选方式,由于CP设备通过PFCP向UP设备下发水印,能够复用CP设备以及 UP设备实现PFCP通信的相关架构,提高本技术方案的可用性。In this optional manner, since the CP device issues a watermark to the UP device through the PFCP, the CP device and the UP device can be multiplexed to realize the related architecture of the PFCP communication, thereby improving the usability of the technical solution.
可选地,所述第一控制消息为PFCP节点消息;或者,所述第一控制消息为PFCP会话消息。Optionally, the first control message is a PFCP node message; or, the first control message is a PFCP session message.
可选地,所述报文流包括第五报文,所述CP设备根据所述水印,在报文流中识别攻击报文,包括:所述CP设备根据所述第五报文不包括所述水印确定所述第五报文为攻击报文。Optionally, the packet stream includes a fifth packet, and the CP device identifies the attack packet in the packet stream according to the watermark, including: the CP device does not include all the attack packets according to the fifth packet. The watermark determines that the fifth packet is an attack packet.
可选地,所述CP设备向所述UP设备发送所述第一控制消息之后,所述方法还包括:Optionally, after the CP device sends the first control message to the UP device, the method further includes:
响应于拨号报文的接收速率满足正常条件,所述CP设备生成第二控制消息,所述第二控制消息用于指示所述UP设备在向所述CP设备发送拨号报文时取消携带水印;In response to the reception rate of the dial-up message meeting the normal condition, the CP device generates a second control message, and the second control message is used to instruct the UP device to cancel carrying the watermark when sending the dial-up message to the CP device;
所述CP设备向所述UP设备发送所述第二控制消息。The CP device sends the second control message to the UP device.
通过这种可选方式,CP设备在发现拨号报文的接收速率正常时,确认网络攻击停止,那么在这种情况下,CP设备会生成并向UP设备下发控制消息,从而通过控制消息通知UP设备在上送拨号报文时取消携带水印,从而支持CP控制UP关闭水印的功能。In this optional method, the CP device confirms that the network attack is stopped when it finds that the receiving rate of the dial-up packets is normal. In this case, the CP device will generate and send a control message to the UP device, so as to notify the UP device through the control message. The UP device cancels the carrying of the watermark when sending the dial-up message, thus supporting the function of the CP to control the UP to turn off the watermark.
可选地,所述通信系统为宽带网络网关(broadband network gateway,BNG)系统或者宽带远程接入服务器(virtual broadband remote access server,BRAS)系统。Optionally, the communication system is a broadband network gateway (broadband network gateway, BNG) system or a broadband remote access server (virtual broadband remote access server, BRAS) system.
第二方面,提供了一种网络攻击的防御方法,该方法应用在CP和UP分离的通信系统中,以该方法从UP设备一侧的角度描述,所述UP设备从所述CP设备接收第一控制消息,所述第一控制消息用于指示所述UP设备在向所述CP设备发送拨号报文时携带水印;所述UP设备根据所述第一控制消息,在拨号报文中携带所述水印;所述UP设备向所述CP设备发送包括所述水印的拨号报文。In a second aspect, a network attack defense method is provided. The method is applied in a communication system in which the CP and the UP are separated. The method is described from the perspective of the UP device. The UP device receives the first information from the CP device. A control message, the first control message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device; the UP device carries the watermark in the dial-up message according to the first control message the watermark; the UP device sends a dial-up message including the watermark to the CP device.
通过第二方面的方法,UP设备通过在接收到CP设备下发的控制消息的情况下,在拨号报文中携带水印,向CP设备上送包含水印的拨号报文,有助于CP设备依据报文是否包括水印,有效区分报文究竟是攻击者上送的攻击报文还是UP设备上送的正常报文,进而将攻击报文丢弃。由此可见,该方法能够有效地抵御网络攻击,保障了CP设备的安全性。Through the method of the second aspect, the UP device sends the dial-up message containing the watermark to the CP device by carrying the watermark in the dial-up message when receiving the control message sent by the CP device, which helps the CP device to base on the Whether the packet contains a watermark can effectively distinguish whether the packet is an attack packet sent by an attacker or a normal packet sent by an UP device, and then discard the attack packet. It can be seen that this method can effectively resist network attacks and ensure the security of the CP device.
可选地,所述水印包括第一虚拟扩展局域网网络标识符VNI。Optionally, the watermark includes a first virtual extended local area network identifier VNI.
可选地,所述水印包括第一随机数。Optionally, the watermark includes a first random number.
可选地,所述水印包括第一时间戳。Optionally, the watermark includes a first timestamp.
可选地,所述水印包括第一消息认证码。Optionally, the watermark includes a first message authentication code.
可选地,所述第一控制消息包括所述水印;或者,所述第一控制消息包括所述水印对应的水印类型信息;或者,所述第一控制消息包括生成所述水印相关的参数。Optionally, the first control message includes the watermark; or, the first control message includes watermark type information corresponding to the watermark; or, the first control message includes parameters related to generating the watermark.
可选地,所述第一控制消息为控制与转发分离协议CUSP报文,所述CUSP报文包括水印类型长度值TLV,所述水印TLV为携带所述水印或所述参数的TLV。Optionally, the first control message is a control and forwarding separation protocol CUSP message, the CUSP message includes a watermark type length value TLV, and the watermark TLV is a TLV carrying the watermark or the parameter.
可选地,所述第一控制消息为包转发控制协议PFCP消息,所述PFCP消息包括水印信息元素IE,所述水印IE为携带所述水印或所述参数的IE。Optionally, the first control message is a packet forwarding control protocol PFCP message, the PFCP message includes a watermark information element IE, and the watermark IE is an IE that carries the watermark or the parameter.
可选地,所述第一控制消息为PFCP节点消息;或者,所述第一控制消息为PFCP会话消息。Optionally, the first control message is a PFCP node message; or, the first control message is a PFCP session message.
可选地,所述通信系统为宽带网络网关BNG系统或者宽带远程接入服务器BRAS系统。Optionally, the communication system is a broadband network gateway BNG system or a broadband remote access server BRAS system.
可选地,所述UP设备根据所述第一控制消息,在拨号报文中携带所述水印之后,所述方法还包括:Optionally, after the UP device carries the watermark in the dial-up message according to the first control message, the method further includes:
所述UP设备从所述CP设备接收第二控制消息,所述第二控制消息用于指示所述UP设备在向所述CP设备发送拨号报文时取消携带水印;The UP device receives a second control message from the CP device, where the second control message is used to instruct the UP device to cancel carrying a watermark when sending a dial-up message to the CP device;
所述UP设备根据所述第二控制消息,向所述CP设备发送不包括水印的拨号报文。The UP device sends, according to the second control message, a dial-up message that does not include a watermark to the CP device.
第三方面,提供了一种CP设备,该CP设备具有实现上述第一方面或第一方面任一种可选方式中对应的功能。该CP设备包括至少一个单元,至少一个单元用于实现上述第一方面或第一方面任一种可选方式所提供的方法。In a third aspect, a CP device is provided, and the CP device has a function corresponding to the first aspect or any optional manner of the first aspect. The CP device includes at least one unit, and the at least one unit is configured to implement the method provided in the first aspect or any optional manner of the first aspect.
在一个示例中,CP设备中的单元通过软件实现,CP设备中的单元是程序模块。在另一个示例中,CP设备中的单元通过硬件或固件实现。第三方面提供的CP设备的具体细节可参见上述第一方面或第一方面任一种可选方式,此处不再赘述。In one example, the units in the CP device are implemented in software, and the units in the CP device are program modules. In another example, the units in the CP device are implemented by hardware or firmware. For the specific details of the CP device provided by the third aspect, reference may be made to the first aspect or any optional manner of the first aspect, which will not be repeated here.
第四方面,提供了一种UP设备,该UP设备具有实现上述第二方面或第二方面任一种可选方式中对应的功能。该UP设备包括至少一个单元,至少一个单元用于实现上述第二方面或第二方面任一种可选方式所提供的方法。In a fourth aspect, a UP device is provided, and the UP device has a function corresponding to the second aspect or any optional manner of the second aspect. The UP device includes at least one unit, and the at least one unit is configured to implement the method provided in the second aspect or any optional manner of the second aspect.
在一个示例中,UP设备中的单元通过软件实现,UP设备中的单元是程序模块。在另一个示例中,UP设备中的单元通过硬件或固件实现。第四方面提供的UP设备的具体细节可参见上述第二方面或第二方面任一种可选方式,此处不再赘述。In one example, the units in the UP device are implemented in software, and the units in the UP device are program modules. In another example, the units in the UP device are implemented by hardware or firmware. For the specific details of the UP device provided in the fourth aspect, reference may be made to the second aspect or any optional manner of the second aspect, which will not be repeated here.
第五方面,提供了一种CP设备,该CP设备包括处理器和通信接口,该处理器用于执行指令,使得该CP设备执行上述第一方面或第一方面任一种可选方式所提供的方法,所述通信接口用于接收或发送报文。第五方面提供的CP设备的具体细节可参见上述第一方面或第一方面任一种可选方式,此处不再赘述。A fifth aspect provides a CP device, the CP device includes a processor and a communication interface, and the processor is used to execute an instruction, so that the CP device executes the above-mentioned first aspect or any optional manner of the first aspect. method, wherein the communication interface is used for receiving or sending a message. For the specific details of the CP device provided in the fifth aspect, reference may be made to the foregoing first aspect or any optional manner of the first aspect, which will not be repeated here.
第六方面,提供了一种UP设备,该UP设备包括处理器和通信接口,该处理器用于执行指令,使得该UP设备执行上述第二方面或第二方面任一种可选方式所提供的方法,所述通信接口用于接收或发送报文。第六方面提供的UP设备的具体细节可参见上述第二方面或第二方面任一种可选方式,此处不再赘述。In a sixth aspect, a UP device is provided, the UP device includes a processor and a communication interface, the processor is configured to execute an instruction, so that the UP device executes the above-mentioned second aspect or any optional manner of the second aspect. method, wherein the communication interface is used for receiving or sending a message. For the specific details of the UP device provided in the sixth aspect, reference may be made to the second aspect or any optional manner of the second aspect, which will not be repeated here.
第七方面,提供了一种计算机可读存储介质,该存储介质中存储有至少一条指令,该指令由处理器读取以使CP设备执行上述第一方面或第一方面任一种可选方式所提供的方法。In a seventh aspect, a computer-readable storage medium is provided, where at least one instruction is stored in the storage medium, and the instruction is read by a processor to cause the CP device to execute the first aspect or any optional manner of the first aspect. provided method.
第八方面,提供了一种计算机可读存储介质,该存储介质中存储有至少一条指令,该指令由处理器读取以使UP设备执行上述第二方面或第二方面任一种可选方式所提供的方法。In an eighth aspect, a computer-readable storage medium is provided, and at least one instruction is stored in the storage medium, and the instruction is read by a processor to cause the UP device to execute the second aspect or any optional manner of the second aspect. provided method.
第九方面,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。CP设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该CP设备执行上述第一方面或第一方面任一种可选方式所提供的方法。In a ninth aspect, a computer program product is provided, the computer program product comprising computer instructions stored in a computer-readable storage medium. The processor of the CP device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the CP device performs the method provided in the first aspect or any optional manner of the first aspect.
第十方面,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。UP设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该UP设备执行上述第二方面或第二方面任一种可选方式所提供的方法。In a tenth aspect, a computer program product is provided, the computer program product comprising computer instructions stored in a computer-readable storage medium. The processor of the UP device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the UP device performs the method provided in the second aspect or any optional manner of the second aspect.
第十一方面,提供了一种芯片,当该芯片在CP设备上运行时,使得CP设备执行上述第一方面或第一方面任一种可选方式所提供的方法。In an eleventh aspect, a chip is provided, when the chip runs on a CP device, the CP device is made to execute the method provided in the first aspect or any optional manner of the first aspect.
第十二方面,提供了一种芯片,当该芯片在UP设备上运行时,使得UP设备执行上述第二方面或第二方面任一种可选方式所提供的方法。A twelfth aspect provides a chip that, when the chip runs on a UP device, enables the UP device to perform the method provided in the second aspect or any optional manner of the second aspect.
第十三方面,提供一种CP设备,所述CP设备包括:主控板和接口板,进一步,还可以包括交换网板。所述CP设备用于执行第一方面或第一方面的任意可能的实现方式中的方法。具体地,所述CP设备包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的单元。A thirteenth aspect provides a CP device, where the CP device includes: a main control board and an interface board, and further, may also include a switching network board. The CP device is configured to execute the method in the first aspect or any possible implementation manner of the first aspect. Specifically, the CP device includes a unit for executing the method in the first aspect or any possible implementation manner of the first aspect.
第十四方面,提供一种UP设备,所述UP设备包括:主控板和接口板,进一步,还可以包括交换网板。所述UP设备用于执行第二方面或第二方面的任意可能的实现方式中的方法。具体地,所述UP设备包括用于执行第二方面或第二方面的任意可能的实现方式中的方法的单元。A fourteenth aspect provides an UP device, where the UP device includes: a main control board and an interface board, and further, may also include a switching network board. The UP device is configured to perform the method of the second aspect or any possible implementation of the second aspect. Specifically, the UP device includes means for performing the method in the second aspect or any possible implementation of the second aspect.
第十五方面,提供了一种CP和UP分离的通信系统,该通信系统包括CP设备以及UP设备。例如,该通信系统包括上述第三方面、第五方面、第十三方面中任一项提供的CP设备,并且该通信系统包括上述第四方面、第六方面、第十四方面中任一项提供的UP设备。A fifteenth aspect provides a communication system in which CP and UP are separated, and the communication system includes a CP device and a UP device. For example, the communication system includes the CP device provided in any one of the third aspect, the fifth aspect, and the thirteenth aspect, and the communication system includes any one of the fourth aspect, the sixth aspect, and the fourteenth aspect. Provided UP equipment.
附图说明Description of drawings
图1是本申请实施例提供的一种CU分离系统的架构示意图;1 is a schematic diagram of the architecture of a CU separation system provided by an embodiment of the present application;
图2是本申请实施例提供的一种CU分离的BNG系统的工作原理示意图;2 is a schematic diagram of the working principle of a BNG system with CU separation provided by an embodiment of the present application;
图3是本申请实施例提供的一种通信系统的结构示意图;3 is a schematic structural diagram of a communication system provided by an embodiment of the present application;
图4是本申请实施例提供的一种CP设备内部的功能架构图;4 is a functional architecture diagram inside a CP device provided by an embodiment of the present application;
图5是本申请实施例提供的一种网络攻击的防御方法的流程图;5 is a flowchart of a method for defending a network attack provided by an embodiment of the present application;
图6是本申请实施例提供的一种CP设备与UP设备防御网络攻击的示意图;6 is a schematic diagram of a CP device and a UP device defending against network attacks according to an embodiment of the present application;
图7是本申请实施例提供的一种包括水印的拨号报文的格式示意图;7 is a schematic diagram of the format of a dial-up message including a watermark provided by an embodiment of the present application;
图8是本申请实施例提供的一种包括水印的拨号报文的格式示意图;8 is a schematic diagram of the format of a dial-up message including a watermark provided by an embodiment of the present application;
图9是本申请实施例提供的一种包括水印的拨号报文的格式示意图;9 is a schematic diagram of the format of a dial-up message including a watermark provided by an embodiment of the present application;
图10是本申请实施例提供的一种包括水印的拨号报文的格式示意图;10 is a schematic diagram of the format of a dial-up message including a watermark provided by an embodiment of the present application;
图11是本申请实施例提供的一种CP设备400的结构示意图;FIG. 11 is a schematic structural diagram of a CP device 400 provided by an embodiment of the present application;
图12是本申请实施例提供的一种UP设备500的结构示意图;FIG. 12 is a schematic structural diagram of a UP device 500 provided by an embodiment of the present application;
图13是本申请实施例提供的一种设备600的结构示意图;FIG. 13 is a schematic structural diagram of a device 600 provided by an embodiment of the present application;
图14是本申请实施例提供的一种设备700的结构示意图;FIG. 14 is a schematic structural diagram of a device 700 provided by an embodiment of the present application;
图15是本申请实施例提供的一种通信系统800的结构示意图。FIG. 15 is a schematic structural diagram of a communication system 800 provided by an embodiment of the present application.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
下面先对本申请实施例涉及的一些术语相关概念进行介绍。The following first introduces some terms related concepts involved in the embodiments of the present application.
(1)CU分离(1) CU separation
CU分离是指CP和UP解耦的网络架构。CU分离包括而不限于下述实现方式A和实现方式B。CU separation refers to the network architecture in which CP and UP are decoupled. CU separation includes, but is not limited to, implementation A and implementation B described below.
实现方式A、控制面和转发面位于不同硬件设备上。In implementation A, the control plane and the forwarding plane are located on different hardware devices.
在采用实现方式A时,CP设备和UP设备是两个单独且不同的设备。可选地,CP设备与UP设备分布式在不同的地点。例如,CP设备位于云端的数据中心,UP设备根据需求部署在网络中合适的位置。通过这种方式,使得控制面和转发面的部署更加灵活。When implementation A is adopted, the CP device and the UP device are two separate and different devices. Optionally, the CP device and the UP device are distributed in different locations. For example, the CP device is located in the data center of the cloud, and the UP device is deployed in a suitable location in the network according to the requirements. In this way, the deployment of the control plane and the forwarding plane is more flexible.
实现方式B、控制面和转发面位于同一个硬件设备上且功能分离。In implementation B, the control plane and the forwarding plane are located on the same hardware device and have separate functions.
在采用实现方式B时,CP设备的物理实体和UP设备的物理实体为同一个设备。例如,CP设备与UP设备运行在同一个主机、同一个服务器或同一个终端中。When implementation B is adopted, the physical entity of the CP device and the physical entity of the UP device are the same device. For example, the CP device and the UP device run in the same host, the same server or the same terminal.
在一个示例中,CP设备和UP设备均通过虚拟化技术实现。CP设备例如称为虚拟CP(virtual CP,vCP),UP设备例如称为虚拟UP(virtual UP,vUP)。例如,CP设备为虚拟机,UP设备为虚拟路由器或虚拟交换机。在一个示例中,CP设备和UP设备均是基于通用的物理服务器结合NFV技术实现的,CP设备和UP设备是两个不同的虚拟网络功能(virtualized network function,VNF)。例如,CP设备和UP设备均是通过X86服务器虚拟化出的网元。In one example, both the CP device and the UP device are implemented through virtualization technology. The CP device is called, for example, a virtual CP (virtual CP, vCP), and the UP device is called, for example, a virtual UP (virtual UP, vUP). For example, the CP device is a virtual machine, and the UP device is a virtual router or virtual switch. In an example, both the CP device and the UP device are implemented based on a general physical server combined with the NFV technology, and the CP device and the UP device are two different virtualized network functions (VNFs). For example, both the CP device and the UP device are network elements virtualized through the X86 server.
在另一个示例中,CP设备通过虚拟化技术实现,UP设备通过传统的网络设备实现。UP设备例如称为物理UP(physical UP,pUP)。In another example, the CP device is implemented by a virtualization technology, and the UP device is implemented by a traditional network device. The UP device is called, for example, a physical UP (physical UP, pUP).
本实施例对通信系统中CP设备与UP设备之间的数量关系不做限定。在一个示例中,CP设备与UP设备是一对多的关系,即,一个CP设备用于控制多个UP设备。在另一个示例中,CP设备与UP设备是一一对应的关系,即,一个CP设备用于控制一个UP设备。This embodiment does not limit the quantitative relationship between the CP device and the UP device in the communication system. In one example, the CP device has a one-to-many relationship with the UP device, that is, one CP device is used to control multiple UP devices. In another example, there is a one-to-one correspondence between CP devices and UP devices, that is, one CP device is used to control one UP device.
本实施例对通信系统中UP设备的数量不做限定。可选地,CU分离的通信系统包括多个UP设备。可选地,CU分离的通信系统中多个UP设备分布在不同的地点。可选地,CU分离的通信系统中多个UP设备基于分布式架构协同分担转发任务。This embodiment does not limit the number of UP devices in the communication system. Optionally, the CU-separated communication system includes multiple UP devices. Optionally, a plurality of UP devices are distributed in different locations in the communication system where the CU is separated. Optionally, multiple UP devices in a communication system where CUs are separated cooperate to share forwarding tasks based on a distributed architecture.
值得说明的一点是,“CU分离”可以具有不同的名称。例如,不同标准、同一标准的不同版本、不同厂商、不同应用场景对“CU分离”可以具有不同的称呼。例如,术语“CU分离”有时也可以被称为“控制和转发分离”、“转控分离”、“控制面和用户面分离”、“控制和用户分离”等。It's worth stating that "CU separation" can have different names. For example, different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for "CU separation". For example, the term "CU separation" may also sometimes be referred to as "control and forwarding separation", "forwarding control separation", "control plane and user plane separation", "control and user separation", and the like.
值得说明的一点是,“CP”可以具有不同的名称。例如,不同标准、同一标准的不同版本、不同厂商、不同应用场景对“CP”可以具有不同的称呼。例如,术语“CP”有时也可以被称为“CP功能(CP function,CPF)”或“CP面”。本文中“CP”、“CPF”和“CP面”可互换使用。术语“CP设备”是指实现了CP功能的任意设备。It's worth stating that "CP" can have different names. For example, different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for "CP". For example, the term "CP" may also sometimes be referred to as "CP function (CPF)" or "CP face". "CP", "CPF" and "CP face" are used interchangeably herein. The term "CP device" refers to any device that implements CP functionality.
值得说明的一点是,“UP”可以具有不同的名称。例如,不同标准、同一标准的不同版本、 不同厂商、不同应用场景对“UP”可以具有不同的称呼。例如,术语“UP”有时也可以被称为“UP功能(UP function,UPF)”或“UP面”。本文中“UP”、“UPF”和“UP面”可互换使用。术语“UP设备”是指实现了UP功能的任意设备。It's worth stating that "UP" can have a different name. For example, different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for "UP". For example, the term "UP" may also sometimes be referred to as "UP function (UPF)" or "UP face". "UP", "UPF" and "UP face" are used interchangeably herein. The term "UP device" refers to any device that implements UP functionality.
(2)宽带网络网关(broadband network gateway,BNG)(2) Broadband network gateway (BNG)
BNG是一种运营商用于宽带接入的电信网元设备,用于承担将用户设备接入宽带网络的功能。BNG主要负责接入认证以及互联网协议(internet protocol,IP)地址分配。A BNG is a telecom network element device used by operators for broadband access, and is used to undertake the function of connecting user equipment to a broadband network. BNG is mainly responsible for access authentication and Internet Protocol (IP) address allocation.
(3)CU分离的BNG系统(3) BNG system with CU separation
传统的BNG一般是在路由器上叠加用户管理功能来实现的。而随着各种互联网业务的层出不穷,对BNG支持的用户的会话数量要求不断提高、对用户接入带宽不断提高、尤其对BNG系统对外提供业务开放、可编程的能力的要求越来越高。有鉴于这些需求,对基于SDN或NFV的架构,对传统的BNG设备进行控制与转发的解耦以及软件与硬件的解耦,从而形成CU分离的BNG系统。具体地,参见附图1,附图1是对CU分离的BNG系统的架构的举例说明。CU分离的BNG系统将多台BNG设备上的用户管理功能抽取出来并且集中,形成CP设备,BNG设备上保留路由功能及转发功能,形成UP设备。The traditional BNG is generally realized by superimposing the user management function on the router. With the continuous emergence of various Internet services, the requirements for the number of user sessions supported by the BNG continue to increase, the user access bandwidth continues to increase, and the requirements for the BNG system to provide open and programmable services to the outside world are getting higher and higher. In view of these requirements, the SDN or NFV-based architecture, the decoupling of control and forwarding of traditional BNG equipment, and the decoupling of software and hardware, form a BNG system with separate CUs. Specifically, referring to FIG. 1 , FIG. 1 is an example illustrating the architecture of the CU-separated BNG system. The CU-separated BNG system extracts and concentrates the user management functions on multiple BNG devices to form CP devices. The BNG devices retain routing and forwarding functions to form UP devices.
CU分离的BNG系统在保持BNG原有的功能的基础上,具备CU分离的架构带来的优势。例如,CU分离的BNG系统能够具备多个UP设备,由CP设备调度多个UP设备处理流量的转发任务,CP设备为多个UP设备分配资源,因此与单机实现BNG系统的方式相比,CU分离架构下BNG系统的设备的利用率和可靠性都能得到大幅的提升。时下,CU分离的BNG系统已成为BNG演进的下一跳,得到了BNG主流厂商、运营商和标准组织的全面认可。例如,互联网工程任务组(Internet Engineering Task Force,IETF)组的请求评论(request for comments,RFC,一系列以编号排定的文件)中的RFC 8772定义了CU分离的BNG系统的架构和CP设备与UP设备之间的控制接口,宽带论坛(Boardband Forum,BBF)在TR-384定义了CU分离的BNG系统的基本架构,在TR-459中定义了CU分离的BNG系统的模块功能定义及接口定义等。On the basis of maintaining the original functions of BNG, the CU-separated BNG system has the advantages brought by the CU-separated architecture. For example, a BNG system separated by a CU can have multiple UP devices, and the CP device schedules multiple UP devices to process traffic forwarding tasks, and the CP device allocates resources to multiple UP devices. The utilization and reliability of the equipment of the BNG system under the separation architecture can be greatly improved. Nowadays, the CU-separated BNG system has become the next hop in the evolution of BNG, and has been fully recognized by mainstream BNG manufacturers, operators and standards organizations. For example, RFC 8772 in the request for comments (RFC, a series of numbered documents) of the Internet Engineering Task Force (IETF) group defines the architecture of CU-separated BNG systems and CP devices The control interface with UP equipment, Broadband Forum (Boardband Forum, BBF) in TR-384 defines the basic architecture of the CU-separated BNG system, in TR-459 defines the module function definition and interface of the CU-separated BNG system definition etc.
值得说明的一点是,本申请实施例中“CU分离的BNG系统”可以具有不同的名称。例如,不同标准、同一标准的不同版本、不同厂商、不同应用场景对“CU分离的BNG系统”可以具有不同的称呼。例如,术语“CU分离的BNG系统”有时也可以被称为“分离的BNG系统(disaggregated BNG,DBNG)”,相应地,CU分离的BNG系统中的CP设备可以被称为DBNG-CP,CU分离的BNG系统中的UP设备可以被称为DBNG-UP。又如,术语“CU分离的BNG系统”有时也可以被称为“虚拟宽带网络网关(virtual BNG,vBNG)控制面和用户面分离的系统(control plane and user plane separation vBNG,CUPS vBNG)”,即“vBNG CU系统”,相应地,CU分离的BNG系统中的CP设备可以被称为vBNG-CP,CU分离的BNG系统中的UP设备可以被称为vBNG-UP。又如,术语“CU分离的BNG系统”有时也可以被称为“虚拟宽带远程接入服务器(virtual broadband remote access server,vBRAS)CU系统”,即“vBRAS CU系统”,相应地,CU分离的BNG系统中的CP设备可以被称为vBRAS-CP,CU分离的BNG系统中的UP设备可以被称为vBRAS-UP。本文中“DBNG”、“vBNG CU系统”和“vBRAS CU系统”可互换使用。It should be noted that, in this embodiment of the present application, the "BNG system with CU separation" may have different names. For example, different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for the "BNG system with CU separation". For example, the term "CU-disaggregated BNG system" may sometimes be referred to as "disaggregated BNG system (disaggregated BNG, DBNG)", and correspondingly, the CP device in the CU-disaggregated BNG system may be referred to as DBNG-CP, CU The UP device in the separate BNG system may be referred to as DBNG-UP. For another example, the term "CU-separated BNG system" may also sometimes be referred to as a "virtual broadband network gateway (virtual BNG, vBNG) control plane and user plane separation system (control plane and user plane separation vBNG, CUPS vBNG)", That is, "vBNG CU system", correspondingly, the CP device in the CU-separated BNG system may be referred to as vBNG-CP, and the UP device in the CU-separated BNG system may be referred to as vBNG-UP. For another example, the term "CU-separated BNG system" may also sometimes be referred to as "virtual broadband remote access server (vBRAS) CU system", that is, "vBRAS CU system", correspondingly, the CU-separated The CP device in the BNG system may be referred to as vBRAS-CP, and the UP device in the CU-separated BNG system may be referred to as vBRAS-UP. "DBNG", "vBNG CU system" and "vBRAS CU system" are used interchangeably herein.
请参考附图2,CU分离的BNG系统的工作原理如附图2所示,包括以下S101至S107。Referring to FIG. 2 , the working principle of the BNG system with CU separation is shown in FIG. 2 , including the following S101 to S107 .
S101、将BNG业务集中在CP设备上进行配置,将路由业务在UP设备上进行配置。CP设备将BNG的部分配置信息通过管理接口(management interface,Mi)接口下发到UP设备。S101. Centrally configure the BNG service on the CP device, and configure the routing service on the UP device. The CP device delivers part of the configuration information of the BNG to the UP device through a management interface (management interface, Mi) interface.
S102、家庭终端发起拨号,原始拨号报文传输至UP设备。UP设备将原始拨号报文按照控制报文重定向接口(control packet redirect interface,CPRi)接口对应的封装格式封装后,将封装后的拨号报文上送到CP设备进行处理。CP设备根据拨号报文生成回应报文,通过CPRi接口将回应报文发送给UP设备。UP设备对回应报文解封装后,回应用户。S102, the home terminal initiates dialing, and the original dialing message is transmitted to the UP device. The UP device encapsulates the original dial-up packet according to the encapsulation format corresponding to the control packet redirect interface (CPRi) interface, and sends the encapsulated dial-up packet to the CP device for processing. The CP device generates a response packet according to the dial-up packet, and sends the response packet to the UP device through the CPRi interface. After the UP device decapsulates the response packet, it responds to the user.
其中,家庭终端例如是客户前置设备(customer premise equipment,CPE)。原始拨号报文例如是以太网承载点到点协议(point-to-point protocol over ethernet,PPPoE)报文或动态主机配置协议(dynamic host configuration protocol,DHCP)报文。PPPoE拨号报文例如是PPPOE主动发现启动(PPPOE Active Discovery Initiation,PADI)。DHCP拨号报文例如是DHCP发现(DHCP discover)报文。The home terminal is, for example, a customer premise equipment (customer premise equipment, CPE). The original dial-up message is, for example, a point-to-point protocol over ethernet (point-to-point protocol over ethernet, PPPoE) message or a dynamic host configuration protocol (dynamic host configuration protocol, DHCP) message. The PPPoE dial-up message is, for example, PPPOE Active Discovery Initiation (PPOE Active Discovery Initiation, PADI). The DHCP dial-up message is, for example, a DHCP discover message.
S103、在拨号过程中,CP设备与远程用户拨号认证服务(remote authentication dial in user service,RADIUS)服务器交互,对用户进行认证授权。S103. During the dialing process, the CP device interacts with a remote user dialing authentication service (remote authentication dial in user service, RADIUS) server to authenticate and authorize the user.
S104、用户拨号成功后,CP设备向UP设备通过及状态控制接口(state control interface,SCi)接口下发用户转发表项。S104. After the user dials successfully, the CP device sends the user forwarding entry to the UP device through a state control interface (state control interface, SCi) interface.
S105、CP设备用SCi接口控制UP设备向核心路由器(core router,CR)发布路由。S105, the CP device uses the SCi interface to control the UP device to advertise routes to a core router (core router, CR).
S106、用户访问因特网。S106, the user accesses the Internet.
S107、在用户上线后,CP设备向RADIUS服务器发送计费报文。可选地,RADIUS服务器下发授权变更(change of authorization,COA)指令,调整用户的服务级别协议(service level agreement,SLA)。S107. After the user goes online, the CP device sends an accounting packet to the RADIUS server. Optionally, the RADIUS server issues a change of authorization (change of authorization, COA) instruction to adjust the user's service level agreement (service level agreement, SLA).
下面介绍本申请实施例提供的系统架构。The following describes the system architecture provided by the embodiments of the present application.
参见附图3,本申请实施例提供了一种通信系统200,通信系统200是对CP和UP分离的通信系统的举例说明。通信系统200包括CP设备210、UP设备220、运行和维护(operation and maintenance,OM)230、RADIUS服务器240、DHCP服务器250以及CP设备211。CP设备210、UP设备220、OM230、RADIUS服务器240、DHCP服务器250、CP设备211中的不同网元之间通过无线网络或有线网络相连。Referring to FIG. 3, an embodiment of the present application provides a communication system 200, and the communication system 200 is an example of a communication system in which the CP and the UP are separated. The communication system 200 includes a CP device 210 , a UP device 220 , an operation and maintenance (OM) 230 , a RADIUS server 240 , a DHCP server 250 , and a CP device 211 . Different network elements in the CP device 210 , the UP device 220 , the OM 230 , the RADIUS server 240 , the DHCP server 250 , and the CP device 211 are connected through a wireless network or a wired network.
CP设备210与UP设备220之间具有三种接口,这三种接口分别是CPRi接口、Mi接口以及SCi接口。There are three kinds of interfaces between the CP device 210 and the UP device 220, and the three kinds of interfaces are the CPRi interface, the Mi interface and the SCi interface respectively.
CPRi接口用于将UP设备220接收到的原始拨号报文上送至CP设备210。例如,在附图3所示的应用场景中,在CPE发起拨号以接入网络的过程中,CPE发送的原始拨号报文(如PPPoE报文或DHCP报文)会传输至UP设备220。UP设备220接收原始拨号报文,按照CPRi接口对应的报文封装格式对原始拨号报文进行封装后,UP设备220通过CPRi接口将封装后的拨号报文发送至CP设备210。CPRi接口通过UP设备220与CP设备210之间的隧道实现。例如,CPRi接口通过基于用户数据报协议(User Datagram Protocol,UDP)的隧道实现,CPRi接口对应的报文封装格式为向原始拨号报文封装该基于UDP的隧道对应的隧道头。在一个示例中,基于UDP的隧道为基于虚拟扩展局域网(Virtual Extensible Local Area Network,VXLAN)的通用协议封装(generic protocol encapsulation,GPE)隧道,向原始拨号报文封装的隧道头包括VXLAN头和GPE扩展头。在另一个示例中,基于UDP的隧道为通用无线分组业务(general packet radio service,GPRS)隧道协议控制面部分(GPRS tunneling protocol(GTP)control plane,GTP-C)隧道,向原始拨号报文封装的隧道头包括GTP-C头 和网络服务头(network service header,NSH)。The CPRi interface is used to upload the original dial-up message received by the UP device 220 to the CP device 210 . For example, in the application scenario shown in FIG. 3 , when the CPE initiates dialing to access the network, the original dialing packet (eg, PPPoE packet or DHCP packet) sent by the CPE will be transmitted to the UP device 220 . The UP device 220 receives the original dial-up message, and after encapsulating the original dial-up message according to the message encapsulation format corresponding to the CPRi interface, the UP device 220 sends the encapsulated dial-up message to the CP device 210 through the CPRi interface. The CPRi interface is implemented through a tunnel between the UP device 220 and the CP device 210 . For example, the CPRi interface is implemented through a user datagram protocol (User Datagram Protocol, UDP)-based tunnel, and the packet encapsulation format corresponding to the CPRi interface is to encapsulate the tunnel header corresponding to the UDP-based tunnel to the original dial-up packet. In an example, the UDP-based tunnel is a generic protocol encapsulation (GPE) tunnel based on Virtual Extensible Local Area Network (VXLAN), and the tunnel header encapsulated to the original dial-up packet includes the VXLAN header and the GPE extension header. In another example, the UDP-based tunnel is a general packet radio service (GPRS) tunneling protocol control plane (GPRS tunneling protocol (GTP) control plane, GTP-C) tunnel, encapsulating the original dial-up message The tunnel header includes the GTP-C header and the network service header (NSH).
SCi接口的功能包括CP设备向UP设备下发流表、UP设备向CP设备上送状态信息等。在本申请的一些实施例中,SCi接口用于供CP设备向UP设备下发控制消息,从而指示UP设备在通过CPRi接口向CP设备上送拨号报文时携带水印。在一个示例中,SCi接口采用转控分离协议(control plane and user plane separated protocol,CUSP)实现。在另一个示例中,SCi接口采用包转发控制协议(Packet Forwarding Control Protocol,PFCP)实现。The functions of the SCi interface include that the CP device sends a flow table to the UP device, and the UP device sends status information to the CP device. In some embodiments of the present application, the SCi interface is used for the CP device to deliver a control message to the UP device, thereby instructing the UP device to carry a watermark when sending a dial-up message to the CP device through the CPRi interface. In one example, the SCi interface is implemented using a control plane and user plane separated protocol (CUSP). In another example, the SCi interface is implemented using the Packet Forwarding Control Protocol (PFCP).
Mi接口用于供CP设备向UP设备下发配置信息。Mi接口例如采用网络配置(Network Configuration,NETCONF)协议实现。The Mi interface is used by the CP device to deliver configuration information to the UP device. The Mi interface is implemented by, for example, a network configuration (Network Configuration, NETCONF) protocol.
此外,如附图3所示,CP设备210与OM230例如通过简单网络管理协议(Simple Network Management Protocol,SNMP)或NETCONF通信。CP设备210与RADIUS服务器240例如通过RADIUS协议通信。CP设备210与DHCP服务器250例如通过DHCP通信。CP设备210与CP设备211例如通过数据备份消息进行数据同步。在一个示例中,CP设备211与CP设备210例如基于负载分担机制协同进行拨号处理;在另一个示例中,CP设备210为主用设备,CP设备211为CP设备210的备用设备。In addition, as shown in FIG. 3 , the CP device 210 communicates with the OM 230 through, for example, Simple Network Management Protocol (SNMP) or NETCONF. The CP device 210 communicates with the RADIUS server 240, eg, through the RADIUS protocol. The CP device 210 communicates with the DHCP server 250, eg, through DHCP. The CP device 210 and the CP device 211 perform data synchronization through, for example, a data backup message. In one example, the CP device 211 cooperates with the CP device 210 to perform dialing processing based on a load sharing mechanism; in another example, the CP device 210 is the active device, and the CP device 211 is the backup device of the CP device 210 .
以上对通信系统200的整体结构进行了举例介绍,以下对通信系统200中CP设备210进行具体介绍。The overall structure of the communication system 200 is described above as an example, and the CP device 210 in the communication system 200 is described in detail below.
CP设备210的功能包括:支持对UP设备220的管理功能,例如包括UP设备220的加入、退出以及UP设备220的接口资源上报;支持处理UP设备220上送的用户的PPPoE拨号报文或DHCP拨号报文,对用户进行接入;支持与RADIUS服务器240通信,对用户进行认证、授权和计费;支持为用户分配IP地址;支持为UP设备220下发用户会话(session)表项,用于UP设备220转发用户流量。The functions of the CP device 210 include: supporting the management functions of the UP device 220, including, for example, joining and exiting the UP device 220 and reporting the interface resources of the UP device 220; Dial-up messages to access users; support communication with RADIUS server 240 to perform authentication, authorization and accounting for users; support assigning IP addresses to users; The user traffic is forwarded at the UP device 220 .
在一个示例中,CP设备210是一个VNF网元,CP设备210部署在NFV基础设施(NFV infrastructure,NFVI)环境中。例如,CP设备210是一个软件,CP设备210运行在X86服务器上。例如,CP设备210是一个分布式软件,CP设备210的不同功能模块分布在不同硬件设备上。In an example, the CP device 210 is a VNF network element, and the CP device 210 is deployed in an NFV infrastructure (NFV infrastructure, NFVI) environment. For example, the CP device 210 is a piece of software, and the CP device 210 runs on an X86 server. For example, the CP device 210 is a distributed software, and different functional modules of the CP device 210 are distributed on different hardware devices.
例如,参见附图4,附图4是对CP设备210内部的功能架构的举例说明。CP设备210包括多个拨号处理模块2201以及输入输出(input output,IO)/负载均衡(load balance,LB)模块2202。其中,多个拨号处理模块2201例如分布在不同硬件设备上。IO/LB模块2202用于与UP设备通信。并且,IO/LB模块2202将接收到的拨号报文负载分担到多个拨号处理模块2201上。通过采用附图4所示的架构,一方面,由于能协同多个硬件设备的算力进行拨号处理,从而有效保障通信系统200处理用户上线的性能,另一方面,当需要进行扩容时,可通过向CP设备210增加更多的拨号处理模块2201实现,使得通信系统200符合VNF的弹性扩容要求。For example, referring to FIG. 4 , FIG. 4 is an example illustrating the functional architecture inside the CP device 210 . The CP device 210 includes a plurality of dial-up processing modules 2201 and an input output (IO)/load balance (LB) module 2202 . Wherein, multiple dial-up processing modules 2201 are distributed on different hardware devices, for example. The IO/LB module 2202 is used to communicate with the UP device. In addition, the IO/LB module 2202 distributes the load of the received dial-up packets to multiple dial-up processing modules 2201 . By adopting the architecture shown in FIG. 4 , on the one hand, since the dialing processing can be performed in coordination with the computing power of multiple hardware devices, the performance of the communication system 200 in processing user online is effectively guaranteed; on the other hand, when capacity expansion is required, the This is achieved by adding more dial-up processing modules 2201 to the CP device 210, so that the communication system 200 meets the elastic expansion requirements of the VNF.
以上示例性介绍了系统架构,以下结合上文描述的系统架构对本申请的一些实施例适于的应用场景进行举例介绍。The system architecture is exemplarily introduced above, and application scenarios to which some embodiments of the present application are suitable are exemplified below with reference to the system architecture described above.
在以上描述的系统架构中,CP设备210作为通信系统200的控制面,CP设备210需要提供安全功能,从而保障通信系统200的系统安全和业务安全。由于CP设备210与UP设备220 之间通过CPRi接口、Mi接口、SCi接口等接口建立的通道一般都是带内通信通道,需要跨越城域网甚至是骨干网,从而存在安全风险。因此,CP设备210需要采用安全防护手段,防御来自CP设备210与UP设备220之间通道的网络攻击。In the system architecture described above, the CP device 210 serves as the control plane of the communication system 200 , and the CP device 210 needs to provide a security function to ensure the system security and service security of the communication system 200 . Since the channels established between the CP device 210 and the UP device 220 through the CPRi interface, Mi interface, SCi interface and other interfaces are generally in-band communication channels, they need to cross the metropolitan area network or even the backbone network, so there is a security risk. Therefore, the CP device 210 needs to adopt security protection measures to defend against network attacks from the channel between the CP device 210 and the UP device 220 .
分布式拒绝服务攻击(distributed denial of service attack,DDoS)作为一种典型的攻击服务器的方式,正是CP设备210面临的主要威胁之一。DDoS攻击的主要手段是同步序列编号(Synchronize Sequence Numbers,SYN)泛洪攻击(SYN flood)。在CP设备210与UP设备220之间的三种接口中,SCi接口和Mi接口都是基于传输控制协议(Transmission Control Protocol,TCP)的接口,而且SCi接口和Mi接口都具备加密能力,可通过DDoS防护(anti-DDoS)设备防御对CP设备210的SCi接口和Mi接口的攻击,因此防御DDoS攻击的实现难度相对较小,而CPRi接口防御DDoS攻击的实现难度相对较大。As a typical way of attacking a server, distributed denial of service attack (DDoS) is one of the main threats faced by the CP device 210 . The main means of DDoS attack is Synchronize Sequence Numbers (SYN) flood attack (SYN flood). Among the three interfaces between the CP device 210 and the UP device 220, the SCi interface and the Mi interface are both based on the Transmission Control Protocol (TCP), and both the SCi interface and the Mi interface have encryption capabilities, which can be passed through The DDoS protection (anti-DDoS) device defends against attacks on the SCi interface and Mi interface of the CP device 210. Therefore, it is relatively difficult to implement defense against DDoS attacks, while the implementation of CPRi interface defense against DDoS attacks is relatively difficult.
具体地,在UP设备220上送拨号报文(例如PPPoE拨号的PADI报文和DHCP拨号的DHCP发现报文)过程中,攻击者可能截获UP上送的PADI报文或DHCP发现报文。攻击者对这类拨号报文中的媒体访问控制(media access control,MAC)地址或虚拟局域网(virtual LAN,VLAN)号进行跳变,构造大量的攻击报文,并按照CPRi接口的报文封装格式,将封装后的大量攻击报文直接发送到CP设备210,不再经过UP设备220,从而发起重放攻击。大量的攻击报文进入至CP设备210后,容易导致正常上线用户的拨号报文被淹没,并且大量的攻击报文会导致CP设备210建立大量的无效状态机,导致CP设备210的CPU利用率高,内存消耗大,从而造成拒绝服务(denial of service,DoS)效果。因此,CP设备210如何防御来自CPRi接口的DDoS重放攻击是本领域亟需满足的需求。Specifically, during the process of sending dial-up packets (eg, PADI packets for PPPoE dialing and DHCP discovery packets for DHCP dialing) on the UP device 220, an attacker may intercept the PADI packets or DHCP discovery packets sent by the UP. The attacker hops the media access control (MAC) address or virtual LAN (VLAN) number in such dial-up packets, constructs a large number of attack packets, and encapsulates them according to the packets of the CPRi interface. format, a large number of encapsulated attack packets are directly sent to the CP device 210 without passing through the UP device 220, thereby initiating a replay attack. After a large number of attack packets enter the CP device 210, it is easy to flood the dial-up packets of normal online users, and a large number of attack packets will cause the CP device 210 to establish a large number of invalid state machines, resulting in CPU utilization of the CP device 210. high, the memory consumption is large, resulting in a denial of service (DoS) effect. Therefore, how the CP device 210 defends against DDoS replay attacks from the CPRi interface is an urgent requirement in the art.
然而,由于需要通过拨号的后续过程才能判断PADI报文或DHCP发现报文是否是攻击报文,也就是将只发送PADI报文或DHCP发现报文而不发送后续拨号报文的用户判定为攻击者并不合理,因此,一般的防火墙或anti-DDoS系统难以识别攻击报文,需要基于CP设备210防御攻击报文。而对于CP设备210来说,由于CPRi接口的实现方式是VXLAN+GPE或者GTP-C+NSH隧道封装,这两种实现方式都基于UDP,CP设备210无法使用TCP密钥链(TCP keychain)等技术对通过CPRi接口收到的报文中的源IP地址进行校验。而拨号报文(如PPPoE拨号的PADI报文和DHCP拨号的DHCP发现报文中),源MAC地址是拨号用户的MAC地址,CP设备210无法确定源MAC地址是否合法,也就无法单纯依据源MAC地址区分攻击报文和正常上线报文。由此可见,CP设备210如何识别来自CPRi接口的攻击报文是本领域的技术难点之一。However, since the subsequent process of dialing is required to determine whether a PADI packet or a DHCP discovery packet is an attack packet, that is, a user who only sends a PADI packet or a DHCP discovery packet without sending subsequent dial-up packets is determined as an attack. Therefore, it is difficult for general firewalls or anti-DDoS systems to identify attack packets, and the CP device 210 needs to be used to defend against attack packets. For the CP device 210, since the implementation of the CPRi interface is VXLAN+GPE or GTP-C+NSH tunnel encapsulation, both of which are based on UDP, the CP device 210 cannot use the TCP keychain, etc. The technology verifies the source IP address in the packets received through the CPRi interface. In dial-up packets (such as PADI packets for PPPoE dial-up and DHCP discovery packets for DHCP dial-up), the source MAC address is the MAC address of the dial-up user. The CP device 210 cannot determine whether the source MAC address is legal, and cannot simply rely on the source MAC addresses distinguish attack packets from normal online packets. It can be seen that how the CP device 210 identifies the attack packet from the CPRi interface is one of the technical difficulties in the art.
在一些情况下,采用限速的手段防御利用PADI报文或DHCP发现报文发起的重放攻击。具体地,CP设备210在IO/LB模块2202上采用令牌桶技术,对用户按照MAC地址进行分组。然后,CP设备210对每组上送到拨号处理模块2201的拨号报文的速率进行承诺访问速率(committed access rate,CAR)。当攻击发生时,IO/LB模块2202根据源MAC地址进行哈希运算,将收到的拨号报文进行分组,每组对应一个令牌桶,根据令牌的速率来限制上送到拨号处理模块2201的拨号报文速率,超过令牌速率的报文将被随机丢弃。这样,拨号处理模块2201就不会由于上送的报文数量太大超过处理性能而挂死。In some cases, rate limiting is used to defend against replay attacks initiated by PADI packets or DHCP discovery packets. Specifically, the CP device 210 adopts the token bucket technology on the IO/LB module 2202 to group users according to MAC addresses. Then, the CP device 210 performs a committed access rate (committed access rate, CAR) on the rate of each group of dial-up packets sent to the dial-up processing module 2201. When an attack occurs, the IO/LB module 2202 performs a hash operation according to the source MAC address, groups the received dial-up packets, each group corresponds to a token bucket, and restricts the sending to the dial-up processing module according to the rate of the token The dial-up packet rate of 2201, the packets exceeding the token rate will be randomly discarded. In this way, the dialing processing module 2201 will not hang up because the number of sent packets exceeds the processing performance.
但是,在采用上述方式时,由于分组的数量是有限的,会出现攻击报文的MAC地址和正常报文的MAC地址被划分至同一个分组中的情况。由于令牌桶技术对同一个分组中的报文是随机进行丢弃的,导致正常报文也可能被CP设备210丢弃,导致正常用户无法上线。另外, 即使采用限速的手段,CP设备210还是需要处理很多攻击报文,浪费了CP设备210的处理资源。However, when the above method is adopted, since the number of groups is limited, it may happen that the MAC address of the attack packet and the MAC address of the normal packet are divided into the same group. Since the token bucket technology randomly discards the packets in the same group, normal packets may also be discarded by the CP device 210, so that normal users cannot go online. In addition, even if the rate limiting method is adopted, the CP device 210 still needs to process many attack packets, which wastes the processing resources of the CP device 210 .
有鉴于以上应用场景存在的需求,本申请的一些实施例中,提供了一种CP设备和UP设备220联动防御DDoS攻击的方法,CP设备通过从SCi接口下发控制消息,通知UP设备220在通过CPRi接口上送的拨号报文中携带水印,使得CP设备能够根据水印有效的区分攻击报文和正常报文,使得重放者的攻击报文能够被丢弃,用户通过UP设备220上送的正常报文能够被处理。通过该方法,不仅能够保证正常用户的上线,而且能够节省CP的计算资源。此外,一些实施例对CP设备与UP设备220之间的SCi接口进行了扩展,提供了如何扩展标准IETF RFC 8772定义的CUSP报文格式以及BBF TR-459定义的PFCP的报文格式来实现控制消息,使得CP设备能够利用扩展的报文格式控制UP设备220使用水印或者关闭水印。此外,一些实施例对CP设备与UP设备220之间的CPRi接口进行了扩展,提供了如何扩展VXLAN-GPE的报文格式来携带各种类型的水印。In view of the requirements of the above application scenarios, some embodiments of the present application provide a method for the joint defense of the CP device and the UP device 220 against DDoS attacks. The CP device sends a control message from the SCi interface to notify the UP device 220 to The dial-up packets sent through the CPRi interface carry a watermark, so that the CP device can effectively distinguish attack packets from normal packets according to the watermark, so that the attack packets of the replayer can be discarded. Normal packets can be processed. Through this method, not only can the normal user go online, but also the computing resources of the CP can be saved. In addition, some embodiments extend the SCi interface between the CP device and the UP device 220, and provide how to extend the CUSP message format defined by the standard IETF RFC 8772 and the PFCP message format defined by the BBF TR-459 to implement control message, so that the CP device can use the extended message format to control the UP device 220 to use the watermark or turn off the watermark. In addition, some embodiments extend the CPRi interface between the CP device and the UP device 220, providing how to extend the VXLAN-GPE packet format to carry various types of watermarks.
下面,通过方法300对本实施例提供的技术方案进行具体介绍。Below, the technical solution provided by this embodiment is specifically introduced through the method 300 .
参见附图5,附图5是本申请实施例提供的一种网络攻击的防御方法300的流程图。方法300的交互主体包括CP设备以及UP设备。Referring to FIG. 5, FIG. 5 is a flowchart of a network attack defense method 300 provided by an embodiment of the present application. The interactive subject of the method 300 includes a CP device and a UP device.
在一个示例中,方法300中的CP设备为附图3所示的通信系统200中的CP设备210或CP设备211,方法300中的CP设备为附图3所示的通信系统200中的UP设备220。In an example, the CP device in the method 300 is the CP device 210 or the CP device 211 in the communication system 200 shown in FIG. 3 , and the CP device in the method 300 is the UP in the communication system 200 shown in FIG. 3 . device 220.
在一个示例中,方法300中的CP设备是CP和UP分离的BNG系统中的CP设备,例如是vBNG系统中的CP或者DBNG-CP。方法300中的UP设备是CP和UP分离的BNG系统中的UP设备,例如是vBNG系统中的UP或者DBNG-UP。在一个示例中,方法300中的CP设备是CP和UP分离的BRAS系统中的CP设备。方法300中的UP设备是CP和UP分离的BRAS系统中的UP设备。In one example, the CP device in the method 300 is a CP device in a BNG system where CP and UP are separated, such as a CP or DBNG-CP in a vBNG system. The UP device in the method 300 is the UP device in the BNG system in which the CP and the UP are separated, for example, the UP or DBNG-UP in the vBNG system. In one example, the CP device in method 300 is a CP device in a BRAS system where CP and UP are separated. The UP device in the method 300 is the UP device in the BRAS system in which the CP and the UP are separated.
在另一个示例中,方法300中的CP设备和UP设备采用BNG系统之外的其他CU分离系统实现。例如,方法300中的CP设备是其他CU分离的有线接入系统或无线接入系统中控制面所在的设备,方法300中的UP设备是其他CU分离的有线接入系统或无线接入系统中转发面所在的设备。例如,方法300中的CP设备和UP设备采用CU分离的4G核心网(EPC)系统或者CU分离的5G核心网(5GC)系统实现。例如,采用CU分离的服务网关(serving gateway,S-GW)中的CP实现CP设备。又如,采用CU分离的分组数据网网关(PDN gateway,PGW)中的CP实现CP设备。又如,采用移动性管理功能(access and mobility management function,AMF)网元实现CP设备。又如,采用会话管理功能(session management function,SMF)网元实现CP设备。又如,采用WT-456固定、移动融合的通信系统中的接入网关功能(access gateway function,AGF)网元实现CP设备。In another example, the CP device and the UP device in the method 300 are implemented using other CU separation systems other than the BNG system. For example, the CP device in method 300 is the device where the control plane is located in the wired access system or wireless access system separated from other CUs, and the UP device in method 300 is in the wired access system or wireless access system separated from other CUs The device where the forwarding plane is located. For example, the CP device and the UP device in the method 300 are implemented using a CU-separated 4G core network (EPC) system or a CU-separated 5G core network (5GC) system. For example, the CP device is implemented by adopting the CP in the serving gateway (serving gateway, S-GW) separated from the CU. For another example, the CP device is implemented by adopting the CP in the packet data network gateway (PDN gateway, PGW) separated by the CU. For another example, the CP device is implemented by using a mobility management function (access and mobility management function, AMF) network element. For another example, a session management function (session management function, SMF) network element is used to implement the CP device. For another example, the access gateway function (access gateway function, AGF) network element in the WT-456 fixed and mobile converged communication system is used to implement the CP device.
在一个示例中,方法300由通用中央处理器(central processing unit,CPU)处理,或者由CPU和网络处理器(network processer,NP)共同处理,或者由CPU、网络处理器(network processer,NP)、物理接口卡(ph10sical interface card,PIC)中两个或两个以上的硬件共同处理,也可以不用NP或PIC,而使用其他适合用于报文转发的处理器,方法300不做限制。例如,CP执行方法300中在报文携带水印、根据水印识别攻击报文对应的处理工作,NP 和PIC承担方法300发送报文或接收报文对应的处理工作。In one example, the method 300 is processed by a general-purpose central processing unit (CPU), or by a CPU and a network processor (NP) jointly, or by a CPU, a network processor (NP) 2 or more than two pieces of hardware in a physical interface card (ph10sical interface card, PIC) are jointly processed, or other processors suitable for packet forwarding may be used instead of NP or PIC. Method 300 does not impose restrictions. For example, in the method 300, the CP performs the processing work corresponding to the method 300 carrying a watermark and identifying the attack packet according to the watermark, and the NP and the PIC undertake the processing work corresponding to the method 300 for sending or receiving packets.
示例性地,方法300包括步骤S301至步骤S315。Exemplarily, the method 300 includes steps S301 to S315.
S301、攻击者向CP设备发送跳变后的拨号报文。S301. The attacker sends the hopping dial-up packet to the CP device.
在拨号报文从UP设备通过网络传输至CP设备的过程中,攻击者在网络中捕获UP设备上送的拨号报文,对拨号报文中的参数(例如源MAC地址、VLAN号等)进行跳变,发送跳变后的拨号报文,进行攻击。During the transmission of dial-up packets from the UP device to the CP device through the network, the attacker captures the dial-up packets sent by the UP device in the network, and performs the parameters (such as source MAC address, VLAN number, etc.) in the dial-up packets. Hopping, sending dial-up packets after hopping to attack.
S303、响应于拨号报文的接收速率满足异常条件,CP设备生成第一控制消息,第一控制消息用于指示UP设备在向CP设备发送拨号报文时携带水印。S303. In response to the reception rate of the dialing packet meeting the abnormal condition, the CP device generates a first control message, where the first control message is used to instruct the UP device to carry a watermark when sending the dialing packet to the CP device.
异常条件用于检测拨号报文的接收速率是否异常。在一个示例中,满足异常条件为接收速率超过速率阈值的时长达到预设时长。The abnormal condition is used to detect whether the receiving rate of dial-up packets is abnormal. In one example, satisfying the abnormal condition is that the receiving rate exceeds the rate threshold for a preset period of time.
在一个示例中,CP设备对拨号报文进行测速。具体地,CP设备测量拨号报文的接收速率,如果接收速率超过速率阈值的时长达到预设时长,CP设备确定接收速率满足异常条件,则执行S303。例如,CP设备通过CAR对拨号报文进行限速,如果发现拨号报文的接收速率超过CAR值则进行计时,当记录的时长超过预设时长后,确定接收速率满足异常条件。In one example, the CP device performs speed measurement on dial-up packets. Specifically, the CP device measures the reception rate of the dial-up message, and if the time period for which the reception rate exceeds the rate threshold reaches a preset time period, the CP device determines that the reception rate meets the abnormal condition, and executes S303. For example, the CP device uses CAR to limit the rate of dial-up packets. If the received rate of dial-up packets exceeds the CAR value, it will count the time. When the recorded time exceeds the preset time, it is determined that the received rate meets the abnormal condition.
在一个示例中,该拨号报文包括上述攻击者向CP设备发送的拨号报文,也包括与CP设备相连的UP设备发送的拨号报文。In an example, the dial-up packet includes the above-mentioned dial-up packet sent by the attacker to the CP device, and also includes the dial-up packet sent by the UP device connected to the CP device.
S304、CP设备向UP设备发送第一控制消息。S304. The CP device sends a first control message to the UP device.
由于拨号报文接收速率满足异常条件的情况很大概率上是由于发生网络攻击引起的,因此如果拨号报文的接收速率满足异常条件,CP设备则可以确定受到了网络攻击。在这种情况下,CP设备会生成第一控制消息。由于第一控制消息指明了在上送拨号报文时携带水印,CP设备通过将第一控制消息下发给UP设备,从而通知UP设备在拨号报文中携带水印。因此,UP设备后续上送给CP设备的拨号报文会包含水印,从而支持了CP设备控制UP设备使能水印的功能。Since the receiving rate of dial-up packets meets the abnormal condition, it is most likely caused by a network attack. Therefore, if the receiving rate of dial-up packets meets the abnormal condition, the CP device can be determined to be attacked by the network. In this case, the CP device will generate the first control message. Since the first control message indicates that the watermark is carried when sending the dial-up message, the CP device notifies the UP device to carry the watermark in the dial-up message by delivering the first control message to the UP device. Therefore, the subsequent dial-up packets sent by the UP device to the CP device will contain a watermark, thereby supporting the function of the CP device to control the UP device to enable watermarking.
水印用于CP设备校验其接收到的拨号报文的合法性。水印的作用类似于表明UP设备身份的标识。水印的具体取值是CP设备与UP设备之间通过传递第一控制消息协商的。如果向CP设备上送的报文不包括水印或者包括水印但水印不正确,表明向CP设备上送的报文不是来自于UP设备,那么报文不会通过CP设备的校验,报文会被CP设备识别为攻击报文。The watermark is used by the CP to verify the validity of the dial-up packets it receives. The role of the watermark is similar to the identification of the identity of the UP device. The specific value of the watermark is negotiated between the CP device and the UP device by transmitting the first control message. If the packet sent to the CP device does not contain a watermark or does include a watermark but the watermark is incorrect, it indicates that the packet sent to the CP device does not come from the UP device, then the packet will not pass the verification of the CP device, and the packet will It is recognized as an attack packet by the CP device.
CP设备与UP设备使用哪种数据作为水印包括多种实现方式,以下通过水印类型a至水印类型d举例说明。Which data the CP device and the UP device use as the watermark include various implementations, which are illustrated below by using watermark type a to watermark type d.
水印类型a、使用调整后的虚拟扩展局域网网络标识符(VXLAN network identifier,VNI)作为水印。Watermark type a. Use the adjusted virtual extended local area network identifier (VXLAN network identifier, VNI) as the watermark.
具体而言,UP设备与CP设备之间存在VXLAN隧道,UP设备在上送拨号报文时,会向原始拨号报文添加包含VNI的VXLAN头,以便添加VXLAN头的拨号报文进入VXLAN隧道后利用VXLAN头转发。当需要利用水印防御攻击时,CP设备会通知UP设备调整VXLAN头中VNI的取值,使得UP设备上送的拨号报文中VXLAN头的VNI从原来的VNI改变为调整后的VNI,以便CP设备利用调整后的VNI对上送的拨号报文进行校验。Specifically, a VXLAN tunnel exists between the UP device and the CP device. When the UP device sends a dial-up packet, it will add a VXLAN header containing VNI to the original dial-up packet, so that the dial-up packet with the VXLAN header enters the VXLAN tunnel. Forwarding using VXLAN headers. When the watermark needs to be used to defend against attacks, the CP device will notify the UP device to adjust the value of the VNI in the VXLAN header, so that the VNI in the VXLAN header in the dial-up packet sent by the UP device is changed from the original VNI to the adjusted VNI so that the CP can The device uses the adjusted VNI to verify the dial-up packets sent.
其中,VNI是一种类似于VLAN ID的用户标识,一个VNI代表了一个租户,VXLAN报文封装时会给VNI分配了24比特的长度空间,使其可以支持海量租户的隔离。Among them, VNI is a user identifier similar to VLAN ID. A VNI represents a tenant. When a VXLAN packet is encapsulated, a 24-bit length space is allocated to the VNI, so that it can support the isolation of a large number of tenants.
水印类型b、使用随机数作为水印。Watermark type b. Use random numbers as watermarks.
在采用水印类型b时,CP设备与UP设备会使用随机数作为拨号报文的水印。具体地,CP设备会通知UP设备在上送拨号报文时携带随机数,使得UP设备向CP设备上送的拨号报文包括随机数,以便CP设备利用随机数对上送的拨号报文进行校验。When the watermark type b is used, the CP device and the UP device will use random numbers as the watermark of dial-up packets. Specifically, the CP device will notify the UP device to carry a random number when sending a dial-up packet, so that the dial-up packet sent by the UP device to the CP device includes a random number, so that the CP device uses the random number to process the sent dial-up packet. check.
水印类型c、使用时间戳作为水印。Watermark type c, use timestamp as watermark.
在采用水印类型c时,CP设备与UP设备使用时间戳作为拨号报文的水印。具体而言,CP设备与UP设备会进行时间同步,当需要利用水印防御攻击时,CP设备通过指示UP设备在上送拨号报文时携带时间戳,使得UP设备上送的拨号报文中包含时间戳,以便CP设备利用时间戳是否对应于同步时间点对上送的拨号报文进行校验。例如,CP设备与UP设备基于网络时间协议(Network Time Protocol,NTP)协议进行时间同步,CP设备和UP设备均将NTP校时服务器作为时钟源,CP设备和UP设备均从NTP校时服务器接收当前时间点,从而保证UP设备与CP设备之间的时间同步。When the watermark type c is adopted, the CP device and the UP device use the time stamp as the watermark of the dial-up message. Specifically, the CP device and the UP device will perform time synchronization. When a watermark needs to be used to defend against attacks, the CP device instructs the UP device to carry a timestamp when sending dial-up packets, so that the dial-up packets sent by the UP device contain Timestamp, so that the CP device can use whether the timestamp corresponds to the synchronization time point to verify the dial-up packet sent. For example, the CP device and the UP device perform time synchronization based on the Network Time Protocol (NTP) protocol. Both the CP device and the UP device use the NTP time calibration server as the clock source, and both the CP device and the UP device receive the time from the NTP time calibration server. The current time point, thereby ensuring the time synchronization between the UP device and the CP device.
水印类型d、使用消息认证码作为水印。Watermark type d, use message authentication code as watermark.
消息认证码例如是拨号报文中至少一个参数的哈希值。例如,消息认证码是拨号报文中IP头、MAC帧头、UDP头等报文头中参数的哈希值。例如,消息认证码是拨号报文中源MAC地址和目的MAC地址的哈希值。又如,消息认证码是拨号报文中源MAC地址、目的MAC地址、源IP地址以及目的IP地址的哈希值。又如,消息认证码是拨号报文中源MAC地址、目的MAC地址、源IP地址、目的IP地址以及UDP头的哈希值。消息认证码例如根据哈希函数进行哈希运算得到。The message authentication code is, for example, a hash value of at least one parameter in the dial-up message. For example, the message authentication code is the hash value of the parameters in the IP header, MAC frame header, and UDP header of the dial-up message. For example, the message authentication code is the hash value of the source MAC address and destination MAC address in the dial-up packet. For another example, the message authentication code is a hash value of the source MAC address, destination MAC address, source IP address, and destination IP address in the dial-up packet. For another example, the message authentication code is the hash value of the source MAC address, destination MAC address, source IP address, destination IP address, and UDP header in the dial-up packet. The message authentication code is obtained, for example, by performing a hash operation according to a hash function.
以上通过水印类型a至水印类型d对水印的几种类型进行了举例说明。本实施例并不限定CP设备与UP设备使用水印类型a至水印类型d中哪种类型的水印。在一个示例中,CP设备根据攻击的强度选择具体的水印类型。例如,当CP设备遭受的攻击强度强时,选择水印类型d,也就是采用消息认证码的方式作为CP设备和UP设备防御攻击所利用的水印,从而达到最好的防御效果。例如,当CP设备遭受的攻击强度弱时,选择水印类型a,也就是采用调整VNI的方式作为CP设备和UP设备防御攻击所利用的水印,从而减少CP设备和UP设备的性能开销。Several types of watermarks are exemplified above through watermark type a to watermark type d. This embodiment does not limit which type of watermarks the CP device and the UP device use from the watermark type a to the watermark type d. In one example, the CP device selects a specific watermark type according to the strength of the attack. For example, when the attack intensity of the CP device is strong, the watermark type d is selected, that is, the message authentication code is used as the watermark used by the CP device and the UP device to defend against attacks, so as to achieve the best defense effect. For example, when the attack intensity of the CP device is weak, select the watermark type a, that is, adjust the VNI as the watermark used by the CP device and the UP device to defend against attacks, thereby reducing the performance overhead of the CP device and the UP device.
本实施例对第一控制消息的具体内容不做限定。在一个示例中,第一控制消息包括水印。换句话说,CP设备将水印本身携带在第一控制消息中,下发给UP设备。在另一个示例中,第一控制消息包括水印对应的水印类型信息。在另一个示例中,第一控制消息包括生成水印相关的参数。例如,CP设备将水印格式、水印类型、水印在拨号报文中携带的位置、水印的位数、生成水印的输入参数的名称中的至少一项携带在第一控制消息中,下发给UP设备。以下结合上述水印类型a至水印类型d,通过下述情况a至情况d对第一控制消息的内容举例说明。This embodiment does not limit the specific content of the first control message. In one example, the first control message includes a watermark. In other words, the CP device carries the watermark itself in the first control message and delivers it to the UP device. In another example, the first control message includes watermark type information corresponding to the watermark. In another example, the first control message includes parameters related to generating the watermark. For example, the CP device carries at least one of the watermark format, the watermark type, the position of the watermark in the dial-up message, the number of digits of the watermark, and the name of the input parameter for generating the watermark in the first control message, and sends it to the UP equipment. The content of the first control message is exemplified by the following cases a to d in combination with the above watermark type a to watermark type d.
情况a、在采用调整后的VNI作为水印时第一控制消息的内容。Case a. The content of the first control message when the adjusted VNI is used as the watermark.
具体地,CP设备获得第一VNI,将第一VNI携带在第一控制消息中,使得第一控制消息包括第一VNI。第一VNI是指调整后的VNI。第一VNI与UP设备原来上送拨号报文时使用的VNI不同。其中,本实施例对CP设备如何获得第一VNI不做限定。在一个示例中,CP设备根据配置预留一段VNI,CP设备从预留的一段VNI中选择一个未被占用的VNI,作为第一VNI。在另一个示例中,CP设备将第一VNI对应的水印类型信息携带在第一控制消息中,使得第一控制消息包括第一VNI对应的水印类型信息。第一VNI对应的水印类型信息表示水印类型为 VNI。Specifically, the CP device obtains the first VNI, and carries the first VNI in the first control message, so that the first control message includes the first VNI. The first VNI refers to the adjusted VNI. The first VNI is different from the VNI used by the UP device when it originally sent dial-up packets. Wherein, this embodiment does not limit how the CP device obtains the first VNI. In an example, the CP device reserves a segment of VNI according to the configuration, and the CP device selects an unoccupied VNI from the reserved segment of VNI as the first VNI. In another example, the CP device carries the watermark type information corresponding to the first VNI in the first control message, so that the first control message includes the watermark type information corresponding to the first VNI. The watermark type information corresponding to the first VNI indicates that the watermark type is VNI.
情况b、在采用随机数作为水印时第一控制消息的内容。Case b. The content of the first control message when a random number is used as the watermark.
例如,第一控制消息包括第一随机数。具体地,CP设备获得第一随机数,将第一随机数携带在第一控制消息中。本实施例对CP设备如何获得第一随机数不做限定。在一个示例中,CP设备通过随机数生成算法进行计算,从而生成第一随机数。在另一个示例中,CP设备从其他设备接收第一随机数。在另一个示例中,CP设备将第一随机数对应的水印类型信息携带在第一控制消息中,使得第一控制消息包括第一随机数对应的水印类型信息。第一随机数对应的水印类型信息表示水印类型为随机数。For example, the first control message includes a first random number. Specifically, the CP device obtains the first random number, and carries the first random number in the first control message. This embodiment does not limit how the CP device obtains the first random number. In one example, the CP device performs calculations through a random number generation algorithm, thereby generating the first random number. In another example, the CP device receives the first random number from the other device. In another example, the CP device carries the watermark type information corresponding to the first random number in the first control message, so that the first control message includes the watermark type information corresponding to the first random number. The watermark type information corresponding to the first random number indicates that the watermark type is a random number.
在一个示例中,在同一个CP设备控制多个UP设备的情况下,CP设备会为每个UP设备分别生成对应的随机数,将每个随机数分别下发给对应的UP设备。可选地,CP设备为不同UP设备生成不同的随机数,向不同UP设备下发不同的随机数。例如,CP设备控制的UP设备包括第一UP设备,CP设备将第一UP设备对应的第一随机数携带在第一控制消息中,向第一UP设备发送第一控制消息。通过这种方式,有助于CP设备利用不同随机数对不同UP设备的拨号报文进行校验。In an example, when the same CP device controls multiple UP devices, the CP device will generate corresponding random numbers for each UP device, and deliver each random number to the corresponding UP device. Optionally, the CP device generates different random numbers for different UP devices, and delivers different random numbers to different UP devices. For example, the UP device controlled by the CP device includes the first UP device, and the CP device carries the first random number corresponding to the first UP device in the first control message, and sends the first control message to the first UP device. In this way, it is helpful for the CP device to verify the dial-up packets of different UP devices by using different random numbers.
在一个示例中,在同一个UP设备上的多个接口均接入CP设备的情况下,CP设备会为UP设备的每个接口分别生成对应的随机数,将接口与随机数之间的对应关系下发给UP设备。可选地,CP设备为UP设备的不同接口生成不同的随机数。例如,UP设备通过第一接口接入CP设备,CP设备将第一接口对应的第一随机数携带在第一控制消息中,向第一UP设备发送第一控制消息,从而向第一UP设备指明通过第一接口上送拨号报文时携带第一随机数。通过这种方式,有助于CP设备利用不同随机数对同一个UP设备上不同接口的拨号报文进行校验。In an example, when multiple interfaces on the same UP device are connected to the CP device, the CP device will generate corresponding random numbers for each interface of the UP device, and the corresponding random numbers between the interfaces and the random numbers will be generated. The relationship is delivered to the UP device. Optionally, the CP device generates different random numbers for different interfaces of the UP device. For example, the UP device accesses the CP device through the first interface, the CP device carries the first random number corresponding to the first interface in the first control message, and sends the first control message to the first UP device, thereby sending the first UP device to the first UP device. Indicates that the first random number is carried when the dial-up packet is sent through the first interface. In this way, the CP device can use different random numbers to verify the dial-up packets of different interfaces on the same UP device.
情况c、在采用时间戳作为水印时第一控制消息的内容。Case c. The content of the first control message when the timestamp is used as the watermark.
在一个示例中,第一控制消息包括第一时间戳。具体地,CP设备根据与UP设备之间的时间同步机制,获得同步时间点对应的第一时间戳,将第一时间戳携带在第一控制消息中。在另一个示例中,CP设备将第一时间戳对应的水印类型信息携带在第一控制消息中,使得第一控制消息包括第一时间戳对应的水印类型信息。第一时间戳对应的水印类型信息表示水印类型为时间戳。In one example, the first control message includes a first timestamp. Specifically, the CP device obtains the first timestamp corresponding to the synchronization time point according to the time synchronization mechanism with the UP device, and carries the first timestamp in the first control message. In another example, the CP device carries the watermark type information corresponding to the first timestamp in the first control message, so that the first control message includes the watermark type information corresponding to the first timestamp. The watermark type information corresponding to the first timestamp indicates that the watermark type is a timestamp.
在另一个示例中,第一控制消息不包括第一时间戳本身,而包括能够标识第一时间戳的任意信息。例如,第一控制消息包括一个比特的标志(flag)字段,当该flag字段置位时,指示UP设备在向CP设备发送拨号报文时携带第一时间戳。In another example, the first control message does not include the first timestamp itself, but includes any information capable of identifying the first timestamp. For example, the first control message includes a one-bit flag field. When the flag field is set, it indicates that the UP device carries the first timestamp when sending the dialing message to the CP device.
情况d、在采用消息认证码作为水印时第一控制消息的内容。Case d. The content of the first control message when the message authentication code is used as the watermark.
在一个示例中,第一控制消息包括消息验证码的格式。例如,消息验证码的格式用于指示UP设备通过对拨号报文的哪一部分进行哈希运算以获得第一消息验证码。又如,消息验证码的格式用于指示生成第一消息验证码所使用的哈希算法。第一控制消息中消息验证码的格式例如通过数字、字母或字符串表示。在另一个示例中,CP设备将第一消息验证码对应的水印类型信息携带在第一控制消息中,使得第一控制消息包括第一消息验证码对应的水印类型信息。第一消息验证码对应的水印类型信息表示水印类型为消息验证码。In one example, the first control message includes the format of the message verification code. For example, the format of the message verification code is used to instruct the UP device which part of the dial-up message to perform hash operation on to obtain the first message verification code. For another example, the format of the message verification code is used to indicate the hash algorithm used to generate the first message verification code. The format of the message verification code in the first control message is represented by numbers, letters or character strings, for example. In another example, the CP device carries the watermark type information corresponding to the first message verification code in the first control message, so that the first control message includes the watermark type information corresponding to the first message verification code. The watermark type information corresponding to the first message verification code indicates that the watermark type is a message verification code.
以消息验证码的格式通过数字表示为例,CP设备与UP设备例如约定不同的数字表示消息验证码的不同格式,例如,消息验证码的格式通过0表示时,指示UP设备通过对拨号报文中源MAC地址和目的MAC地址这2种信息进行哈希运算以获得第一消息验证码。当消息验证 码的格式通过1表示时,指示UP设备通过对拨号报文中源MAC地址、目的MAC地址、源IP地址以及目的IP地址这四种信息进行哈希运算以获得第一消息验证码。当消息验证码的格式通过2表示时,指示UP设备通过对拨号报文中源MAC地址、目的MAC地址、源IP地址、目的IP地址以及UDP头这五种信息进行哈希运算以获得第一消息验证码。Taking the format of the message verification code represented by numbers as an example, the CP device and the UP device, for example, agree that different numbers represent different formats of the message verification code. The two types of information, the source MAC address and the destination MAC address, are hashed to obtain the first message verification code. When the format of the message verification code is represented by 1, the UP device is instructed to obtain the first message verification code by hashing the four pieces of information, source MAC address, destination MAC address, source IP address, and destination IP address in the dial-up packet. . When the format of the message verification code is represented by 2, it instructs the UP device to perform hash operation on the source MAC address, destination MAC address, source IP address, destination IP address and UDP header in the dial-up packet to obtain the first Message verification code.
在另一个示例中,第一控制消息不包括消息验证码的格式,而是包括能够标识第一消息验证码的任意信息。例如,CP设备与UP设备预先协商消息验证码的格式,比如在CP设备与UP设备握手阶段就协商消息验证码的格式,或者CP设备与UP设备预先配置消息验证码的格式,CP设备在第一控制消息中使用一个比特的标志字段指示UP设备在向CP设备发送拨号报文时携带第一消息验证码,当该flag字段置位时,指示UP设备在向CP设备发送拨号报文时携带第一消息验证码。In another example, the first control message does not include the format of the message verification code, but includes any information capable of identifying the first message verification code. For example, the format of the message verification code is negotiated between the CP device and the UP device in advance. For example, the format of the message verification code is negotiated during the handshake phase between the CP device and the UP device, or the format of the message verification code is preconfigured between the CP device and the UP device. A one-bit flag field in a control message instructs the UP device to carry the first message verification code when it sends a dial-up message to the CP device. When the flag field is set, it instructs the UP device to carry the first message verification code when it sends a dial-up message to the CP device. The first message verification code.
在一个示例中,CP设备与UP设备之间具有SCi接口,CP设备通过SCi接口向UP设备发送第一控制消息。在采用这种方式时,第一控制消息也称SCi消息。在一个示例中,对实现SCi接口的通信协议进行扩展,新增一种新类型的SCi消息,该新类型的SCi消息用于指示UP设备在向CP设备发送拨号报文时携带水印,该新类型的SCi消息是第一控制消息。In an example, there is an SCi interface between the CP device and the UP device, and the CP device sends the first control message to the UP device through the SCi interface. In this way, the first control message is also called an SCi message. In an example, the communication protocol implementing the SCi interface is extended, and a new type of SCi message is added. The new type of SCi message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device. The type SCi message is the first control message.
如何扩展SCi接口的通信协议来实现第一控制消息包括多种实现方式,以下通过扩展方式一和扩展方式二举例说明。How to extend the communication protocol of the SCi interface to implement the first control message includes multiple implementation manners, and the following is an example of the extension manner 1 and the extension manner 2.
扩展方式一、扩展CUSP。Expansion method 1. Expand CUSP.
IETF RFC 8772规定CP设备与UP设备之间使用CUSP实现SCi接口。本申请的一些实施例中,扩展了新类型的CUSP报文。新类型的CUSP报文用于指示UP设备在向CP设备发送拨号报文时携带水印,新类型的CUSP报文为第一控制消息。具体地,作为第一控制消息的CUSP报文包括类型字段。CUSP报文中类型字段包括类型值。该类型值标识CUSP报文指示UP设备在向CP设备发送拨号报文时携带水印。在一个示例中,该类型值为RFC 8772中表2(table2)的控制消息(control messages)的类型。IETF RFC 8772 stipulates that the SCi interface is implemented using CUSP between the CP device and the UP device. In some embodiments of the present application, a new type of CUSP message is extended. The new type of CUSP message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device, and the new type of CUSP message is the first control message. Specifically, the CUSP message as the first control message includes a type field. The type field in the CUSP message includes the type value. The value of this type identifies the CUSP message to instruct the UP device to carry the watermark when sending the dial-up message to the CP device. In one example, the type value is the type of control messages in Table 2 (table2) of RFC 8772.
例如,参见下表1,表1是对作为第一控制消息的CUSP报文的举例说明。表1中的类型为9,表明该控制消息为要求UP的拨号报文携带水印的报文,其对应的控制消息名称可以为水印开始,其中,还包括希望携带的水印类型信息。如:当其值为CRPI_WATERPRINT_VNI时,则表明希望UP发送拨号报文时,携带VNI水印信息;当其值为CRPI_WATERPRINT_RANDOM时,则表明希望UP发送拨号报文时,携带随机数水印信息;当其值为CRPI_WATERPRINT_TIMESTAMP时,则表明希望UP发送拨号报文时,携带时间戳水印信息;当其值为CRPI_WATERPRINT_MAC时,则表明希望UP发送拨号报文时,携带消息验证码水印信息。可选的,该控制消息中还包括具体的水印值或生成相关水印的相关参数的信息,如UP上送的拨号报文中需要携带的水印包括的VNI值、随机数值、时间戳值、或者消息验证码的值的信息。当UP设备接收到CP设备发送的控制消息后,可以根据预先配置的或预先约定的信息发送对应的水印信息,如:发送默认的VNI值、按照预先约定的规则生成随机数、携带时间戳、按照默认的规则发送消息验证码;也可以从该控制消息中获取对应的值,携带在拨号报文中,发送给CP设备;还可以根据该控制消息携带的参数,生成水印,携带在拨号报文中,发送给CP设备。For example, see Table 1 below, which is an example of the CUSP message as the first control message. The type in Table 1 is 9, indicating that the control message is a message that requires the UP dial-up message to carry a watermark, and the corresponding control message name can be the watermark start, which also includes the desired watermark type information. For example: when its value is CRPI_WATERPRINT_VNI, it indicates that it wants UP to send dial-up messages with VNI watermark information; when its value is CRPI_WATERPRINT_RANDOM, it indicates that UP wants to send dial-up messages with random number watermark information; When the value is CRPI_WATERPRINT_TIMESTAMP, it indicates that the UP is expected to carry the timestamp watermark information when sending dial-up packets; when the value is CRPI_WATERPRINT_MAC, it indicates that the UP is expected to carry the message verification code watermark information when sending the dial-up packets. Optionally, the control message also includes a specific watermark value or information about parameters related to generating a related watermark, such as the VNI value, random value, timestamp value, or the watermark that needs to be carried in the dial-up message sent by the UP. Information about the value of the message verification code. When the UP device receives the control message sent by the CP device, it can send the corresponding watermark information according to the pre-configured or pre-agreed information, such as: sending the default VNI value, generating random numbers according to pre-agreed rules, carrying timestamps, The message verification code is sent according to the default rules; the corresponding value can also be obtained from the control message, carried in the dial-up message, and sent to the CP device; a watermark can also be generated according to the parameters carried in the control message and carried in the dial-up message In the text, it is sent to the CP device.
表1Table 1
Figure PCTCN2021099503-appb-000001
Figure PCTCN2021099503-appb-000001
Figure PCTCN2021099503-appb-000002
Figure PCTCN2021099503-appb-000002
在另一个示例中,可以在CUSP报文中新增TLV来携带水印或生成水印相关的参数。在一个示例中,这些TLV的type部分的值可以用来指示这个TLV对应的水印类型,即需要UP设备携带的水印的类型。例如,CUSP报文包括水印TLV,水印TLV为携带水印的TLV;或者,水印TLV为携带水印对应的水印类型信息的TLV;或者,水印TLV为携带生成水印相关的参数的TLV,该水印TLV的type值可以为例如901,表明其为水印TLV。In another example, a TLV may be added to the CUSP message to carry the watermark or generate parameters related to the watermark. In an example, the value of the type part of these TLVs can be used to indicate the watermark type corresponding to this TLV, that is, the type of watermark that needs to be carried by the UP device. For example, the CUSP message includes a watermark TLV, and the watermark TLV is a TLV that carries a watermark; or, the watermark TLV is a TLV that carries watermark type information corresponding to the watermark; or, the watermark TLV is a TLV that carries parameters related to generating a watermark, and the watermark TLV The type value can be, for example, 901, indicating that it is a watermark TLV.
本实施例对水印TLV的类型不做限定。在一个示例中,水印TLV是新类型的TLV,水印TLV包括新申请的类型值,该类型值标识水印TLV携带水印或生成水印相关的参数。在另一个示例中,水印TLV是已有类型的TLV。例如,在使用调整后的VNI作为水印时,复用VXLAN标准中用于携带VNI的TLV,作为本实施例中的水印TLV。水印TLV包括VNI水印TLV、随机数水印TLV、时间戳水印TLV、消息验证码水印TLV中的至少一项,以下通过(1)至(4)分别对这几种水印TLV举例说明。This embodiment does not limit the type of the watermark TLV. In one example, the watermark TLV is a new type of TLV, and the watermark TLV includes a type value of the new application, the type value identifying the watermark TLV carrying the watermark or generating parameters related to the watermark. In another example, the watermark TLV is an existing type of TLV. For example, when the adjusted VNI is used as the watermark, the TLV used to carry the VNI in the VXLAN standard is multiplexed as the watermark TLV in this embodiment. The watermark TLV includes at least one of VNI watermark TLV, random number watermark TLV, time stamp watermark TLV, and message verification code watermark TLV. These watermark TLVs are exemplified by (1) to (4) below.
(1)VNI水印TLV。(1) VNI watermark TLV.
VNI水印TLV包括第一VNI。VNI水印TLV的type部分的值例如用来指示这个TLV对应的水印类型是VNI。例如,VNI水印TLV包括VNI字段,VNI字段包括第一VNI。VNI水印TLV也可称为CRPI_WATERPRINT_VNI(CRPI_水印_VNI)。例如,参见下表2,表2是对VNI水印TLV的格式的举例说明。表2中的VNI为第一VNI。VNI水印TLV例如占4个字节。其中,VNI在VNI水印TLV中例如占3个字节,比如说占第2个字节至第4个字节。VNI水印TLV的第1个字节例如全部置为0以进行补齐。The VNI watermark TLV includes the first VNI. The value of the type part of the VNI watermark TLV is, for example, used to indicate that the watermark type corresponding to this TLV is VNI. For example, the VNI watermark TLV includes a VNI field, and the VNI field includes the first VNI. The VNI watermark TLV may also be referred to as CRPI_WATERPRINT_VNI (CRPI_watermark_VNI). For example, see Table 2 below, which is an illustration of the format of the VNI watermark TLV. The VNI in Table 2 is the first VNI. The VNI watermark TLV occupies, for example, 4 bytes. Wherein, the VNI occupies, for example, 3 bytes in the VNI watermark TLV, for example, occupies the second byte to the fourth byte. For example, the first byte of the VNI watermark TLV is all set to 0 for padding.
表2Table 2
Figure PCTCN2021099503-appb-000003
Figure PCTCN2021099503-appb-000003
(2)随机数水印TLV。(2) Random number watermark TLV.
随机数水印TLV包括第一随机数。随机数水印TLV的type部分的值例如用来指示这个TLV对应的水印类型是随机数。随机数水印TLV也可称为CRPI_WATERPRINT_RANDOM(CRPI_水印_随机数)。例如,随机数水印TLV包括随机数字段,随机数字段包括第一随机数。例如,参见下表3,表3是对随机数水印TLV的格式的举例说明,表3中的随机数为第一随机数。随机数例如占2个字节。The random number watermark TLV includes a first random number. The value of the type part of the random number watermark TLV is, for example, used to indicate that the watermark type corresponding to this TLV is a random number. The random number watermark TLV may also be called CRPI_WATERPRINT_RANDOM (CRPI_watermark_random number). For example, the random number watermark TLV includes a random number field, and the random number field includes a first random number. For example, see Table 3 below, which is an example of the format of the random number watermark TLV, and the random number in Table 3 is the first random number. The random number occupies, for example, 2 bytes.
表3table 3
Figure PCTCN2021099503-appb-000004
Figure PCTCN2021099503-appb-000004
(3)时间戳水印TLV。(3) Timestamp watermark TLV.
时间戳水印TLV包括第一时间戳。时间戳水印TLV的type部分的值例如用来指示这个TLV对应的水印类型是时间戳。时间戳水印TLV也可称为CRPI_WATERPRINT_TIMESTAMP(CRPI_水印_时间戳)。例如,时间戳水印TLV包括时间戳字段,时间戳字段包括第一时间戳。例如,参见下表4,表4是对时间戳水印TLV的格式的举例说明,表4中的时间戳为第一时间戳。时间戳例如占1个字节。The timestamp watermark TLV includes the first timestamp. The value of the type part of the timestamp watermark TLV is, for example, used to indicate that the watermark type corresponding to this TLV is a timestamp. The timestamp watermark TLV may also be referred to as CRPI_WATERPRINT_TIMESTAMP (CRPI_watermark_timestamp). For example, the timestamp watermark TLV includes a timestamp field, and the timestamp field includes a first timestamp. For example, see Table 4 below, which is an example of the format of the timestamp watermark TLV, and the timestamp in Table 4 is the first timestamp. The timestamp occupies, for example, 1 byte.
表4Table 4
Figure PCTCN2021099503-appb-000005
Figure PCTCN2021099503-appb-000005
(4)消息验证码水印TLV。(4) Message verification code watermark TLV.
消息验证码水印TLV包括消息验证码的格式。消息验证码水印TLV的type部分的值例如用来指示这个TLV对应的水印类型是消息验证码。消息验证码水印TLV也可称为CRPI_WATERPRINT_MAC(CRPI_水印_消息验证码)。例如,消息验证码水印TLV包括消息验证码格式字段。当消息验证码格式字段取值为0时,指示UP设备通过对拨号报文中源MAC地址和目的MAC地址进行哈希运算以获得第一消息验证码。当消息验证码格式字段取值为1时,指示UP设备通过对拨号报文中源MAC地址、目的MAC地址、源IP地址以及目的IP地址进行哈希运算以获得第一消息验证码。当消息验证码格式字段取值为2时,指示UP设备通过对拨号报文中源MAC地址、目的MAC地址、源IP地址、目的IP地址以及UDP头进行哈希运算以获得第一消息验证码。例如,参见下表5,表5是对消息验证码水印TLV的格式的举例说明,表5中的消息验证码格式为消息验证码格式字段。消息验证码格式字段例如在消息验证码水印TLV中占1个字节。The message verification code watermark TLV includes the format of the message verification code. The value of the type part of the message verification code watermark TLV is, for example, used to indicate that the watermark type corresponding to this TLV is a message verification code. The message authentication code watermark TLV may also be referred to as CRPI_WATERPRINT_MAC (CRPI_watermark_message authentication code). For example, the message verification code watermark TLV includes a message verification code format field. When the value of the message verification code format field is 0, the UP device is instructed to obtain the first message verification code by performing hash operation on the source MAC address and the destination MAC address in the dial-up packet. When the value of the message verification code format field is 1, the UP device is instructed to obtain the first message verification code by hashing the source MAC address, destination MAC address, source IP address and destination IP address in the dial-up packet. When the value of the message verification code format field is 2, it instructs the UP device to obtain the first message verification code by hashing the source MAC address, destination MAC address, source IP address, destination IP address and UDP header in the dial-up packet . For example, see Table 5 below, which is an example description of the format of the message verification code watermark TLV, and the message verification code format in Table 5 is the message verification code format field. For example, the message verification code format field occupies 1 byte in the message verification code watermark TLV.
表5table 5
Figure PCTCN2021099503-appb-000006
Figure PCTCN2021099503-appb-000006
扩展方式二、扩展PFCP。The second extension method is to extend the PFCP.
为了便于理解,下面先简单介绍PFCP,再介绍具体如何对PFCP扩展来实现第一控制消息。For ease of understanding, the following briefly introduces PFCP, and then describes how to extend the PFCP to implement the first control message.
PFCP是第三代合作伙伴计划(3rd Generation Partnership Project,3GPP)定义的一种承载在UDP之上的协议。PFCP基于第五代移动通信技术(5th generation mobile networks或5th generation wireless systems、5th-Generation,5G)业务定义了一套抽象的业务模型,基于此模型定义了CP与UP之间的节点消息、会话消息和一系列的信息元素(information element,IE)。PFCP将UP设备称为UPF,将CP设备称作CPF,将CP设备与UP设备之间的连接称为PFCP联盟(PFCP association)。PFCP消息分为PFCP节点消息(PFCP node related messages)以及PFCP会话消息(PFCP session related messages)。PFCP消息包括PFCP消息头(PFCP message header)和IE这两个部分。PFCP消息头包括消息类型(message type)、消息长度(message length)等字段。IE采用TLV的封装格式。IE分为分组IE(grouped IE)以及嵌入式IE(embedded IE)。嵌入式IE是最小单位的IE。一个分组IE可选地包含多个嵌入式IE。BBF TR-459规定,CP设备与UP设备之间SCi接口使用PFCP实现。PFCP is a protocol defined by the 3rd Generation Partnership Project (3GPP) and carried over UDP. PFCP defines a set of abstract business models based on 5th generation mobile networks (5th generation mobile networks or 5th generation wireless systems, 5th-Generation, 5G) business, and based on this model defines node messages and sessions between CP and UP. A message and a series of information elements (IEs). PFCP refers to the UP device as the UPF, the CP device as the CPF, and the connection between the CP device and the UP device as the PFCP association (PFCP association). PFCP messages are divided into PFCP node messages (PFCP node related messages) and PFCP session messages (PFCP session related messages). The PFCP message includes two parts: a PFCP message header (PFCP message header) and an IE. The PFCP message header includes fields such as message type and message length. IE adopts the packaging format of TLV. IE is divided into grouped IE (grouped IE) and embedded IE (embedded IE). Embedded IE is the smallest unit of IE. A grouped IE optionally contains multiple embedded IEs. BBF TR-459 stipulates that the SCi interface between the CP device and the UP device is implemented using PFCP.
在一个示例中,CP设备使用PFCP消息中的IE携带水印或者生成水印相关的参数。例如,作为第一控制消息的PFCP消息包括水印IE,水印IE为携带水印的IE;或者,水印IE为携带水印对应的水印类型信息的IE;或者,水印IE为携带生成水印相关参数的IE。水印IE携带的水印类型信息例如是水印IE中type部分的值。例如,VNI水印IE的type部分的值用来指示这个IE对应的水印类型是VNI。例如,随机数水印IE的type部分的值用来指示这个IE对应的水印类型是随机数。例如,时间戳水印IE的type部分的值用来指示这个IE对应的水印类型是时间戳。例如,消息验证码水印IE的type部分的值用来指示这个IE对应的水印类型是消息验证码。在一个示例中,水印IE为分组IE。在另一个示例中,水印IE为嵌入式IE。例如,参见下表6,表6是对水印IE的介绍。In one example, the CP device uses the IE in the PFCP message to carry the watermark or generate watermark-related parameters. For example, the PFCP message as the first control message includes a watermark IE, and the watermark IE is an IE that carries a watermark; or, the watermark IE is an IE that carries watermark type information corresponding to the watermark; or, the watermark IE is an IE that carries parameters related to generating a watermark. The watermark type information carried by the Watermark IE is, for example, the value of the type part in the Watermark IE. For example, the value of the type part of the VNI watermark IE is used to indicate that the watermark type corresponding to this IE is VNI. For example, the value of the type part of the random number watermark IE is used to indicate that the watermark type corresponding to this IE is a random number. For example, the value of the type part of the Timestamp Watermark IE is used to indicate that the watermark type corresponding to this IE is Timestamp. For example, the value of the type part of the message verification code watermark IE is used to indicate that the watermark type corresponding to this IE is the message verification code. In one example, the Watermark IE is a Packet IE. In another example, the watermark IE is an embedded IE. For example, see Table 6 below, which is an introduction to the Watermark IE.
表6Table 6
IEIE PP 条件/注释Conditions/Comments IE类型IE type
水印IEWatermark IE CC 当CP被DDoS攻击时该IE包含水印。The IE contains a watermark when the CP is DDoS attacked. 水印watermark
其中,表6中的C表示conditional,表示水印IE是在满足条件时携带的,该条件为CP设备被可能被DDoS攻击。在本实施例中,CP设备检测到拨号报文的接收速率异常时,会确定满足携带水印IE的条件。Wherein, C in Table 6 indicates conditional, indicating that the watermark IE is carried when the condition is met, and the condition is that the CP device may be attacked by DDoS. In this embodiment, when the CP device detects that the receiving rate of the dial-up message is abnormal, it will determine that the condition for carrying the watermark IE is satisfied.
请参考下表7,表7是对水印IE的格式的举例说明。在表7中,类型(type)字段包括水印IE的类型。类型字段占2个字节。类型字段中的类型值例如是10进制的取值。长度(length)字段包括水印IE的长度。长度字段中的长度例如不包括类型字段和长度字段的4字节。厂家ID(enterprise ID)字段包括厂家号。厂家ID字段是水印IE的可选字段。水印类型(water print type)字段、水印参数(water print para)字段属于水印IE中的数据部分或者水印IE的子IE。Please refer to Table 7 below, which is an example description of the format of the watermark IE. In Table 7, the type field includes the type of the watermark IE. The type field occupies 2 bytes. The type value in the type field is, for example, a decimal value. The length field includes the length of the watermark IE. The length in the length field does not include, for example, 4 bytes of the type field and the length field. The manufacturer ID (enterprise ID) field includes the manufacturer number. The Manufacturer ID field is an optional field of the Watermark IE. The watermark type (water print type) field and the watermark parameter (water print para) field belong to the data part in the watermark IE or a sub-IE of the watermark IE.
表7Table 7
Figure PCTCN2021099503-appb-000007
Figure PCTCN2021099503-appb-000007
表7中类型字段的定义如下表8所示。在表8中,7/1表示一个字节(类型字段)的第1个比特;7/2表示一个字节(类型字段)的第2个比特;7/3表示一个字节(类型字段)的第3个比特;7/4表示一个字节(类型字段)的第4个比特;7/5表示一个字节(类型字段)的第5个比特。水印参数0至水印参数3这四种水印参数的定义与扩展方式一描述的VNI水印TLV、随机数水印TLV、时间戳水印TLV、消息验证码水印TLV这4类水印TLV的定义相同或类似。The definition of the type field in Table 7 is shown in Table 8 below. In Table 8, 7/1 represents the first bit of a byte (type field); 7/2 represents the second bit of a byte (type field); 7/3 represents a byte (type field) The 3rd bit of ; 7/4 represents the 4th bit of a byte (type field); 7/5 represents the 5th bit of a byte (type field). The definitions of the four watermark parameters from watermark parameter 0 to watermark parameter 3 are the same as or similar to the definitions of the four types of watermark TLVs, namely, VNI watermark TLV, random number watermark TLV, time stamp watermark TLV, and message authentication code watermark TLV described in the extension mode 1.
表8Table 8
Figure PCTCN2021099503-appb-000008
Figure PCTCN2021099503-appb-000008
如何使用PFCP消息携带水印IE包括多种方式。在一个示例中,使用PFCP节点消息携带水印IE。换句话说,第一控制消息为PFCP节点消息。在另一个示例中,使用PFCP会话消息携带水印IE。换句话说,第一控制消息为PFCP会话消息。How to use the PFCP message to carry the watermark IE includes various ways. In one example, a PFCP node message is used to carry the Watermark IE. In other words, the first control message is a PFCP node message. In another example, a PFCP session message is used to carry the Watermark IE. In other words, the first control message is a PFCP session message.
在一个示例中,扩展新类型的PFCP消息,使用新类型的PFCP消息携带水印IE。该新类型的PFCP消息用于指示UP设备在向CP设备发送拨号报文时携带水印,该新类型的PFCP消息为本实施例提供的第一控制消息。其中,作为第一控制消息的PFCP消息包括类型字段。PFCP消息中类型字段包括类型值。该类型值标识PFCP消息指示UP设备在向CP设备发送拨号报文时携带水印。In one example, a new type of PFCP message is extended to carry the watermark IE using the new type of PFCP message. The new type of PFCP message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device, and the new type of PFCP message is the first control message provided in this embodiment. Wherein, the PFCP message as the first control message includes a type field. The Type field in the PFCP message includes the Type value. The type value indicates that the PFCP message instructs the UP device to carry the watermark when sending the dial-up message to the CP device.
其中,在通过扩展新类型的PFCP消息实现第一控制消息的情况下,本实施例对扩展PFCP节点消息还是扩展PFCP会话消息不做限定。例如,新增一种PFCP节点消息,比如在16至49之间新申请一个类型值,通过这种新类型的PFCP节点消息携带水印IE,CP设备通过向UP设备发送这种新类型的PFCP节点消息,实现水印下发的功能。又如,新增一种PFCP会话消息,比如在58至99之间新申请一个类型值,通过这种新类型的PFCP会话消息携带水印IE,CP设备通过向UP设备发送这种新类型的PFCP会话消息,实现水印下发的功能。In the case where the first control message is implemented by extending a new type of PFCP message, this embodiment does not limit the extended PFCP node message or the extended PFCP session message. For example, a new type of PFCP node message is added, for example, a new type value is applied between 16 and 49. This new type of PFCP node message carries the watermark IE, and the CP device sends this new type of PFCP node to the UP device. message to implement the function of watermarking. For another example, a new type of PFCP session message is added, for example, a new type value is applied between 58 and 99. This new type of PFCP session message carries the watermark IE, and the CP device sends this new type of PFCP to the UP device. Conversation message, realizes the function of watermarking.
在另一个示例中,复用已有的PFCP消息携带水印IE,该已有的PFCP消息携带水印IE,能够指示UP设备在向CP设备发送拨号报文时携带水印,该已有的PFCP消息也是本实施例提供的第一控制消息。例如,复用PFCP更新会话请求(PFCP Session Modification Request)携带水印IE,该携带了水印IE的PFCP更新会话请求为本实施例提供的第一控制消息。其中,PFCP更新会话请求是一种PFCP会话消息,PFCP更新会话请求的消息类型值是52。例如,在PFCP更新会话请求中更新转发参数(Update Forwarding Parameters)IE中增加下表9所示的IE。In another example, the existing PFCP message carrying the watermark IE is multiplexed, and the existing PFCP message carries the watermark IE, which can instruct the UP device to carry the watermark when sending a dial-up message to the CP device, and the existing PFCP message is also The first control message provided in this embodiment. For example, the multiplexing PFCP Session Modification Request (PFCP Session Modification Request) carries the watermark IE, and the PFCP update session request carrying the watermark IE is the first control message provided in this embodiment. The PFCP update session request is a PFCP session message, and the message type value of the PFCP update session request is 52. For example, the IE shown in Table 9 below is added to the Update Forwarding Parameters IE in the PFCP update session request.
表9Table 9
Figure PCTCN2021099503-appb-000009
Figure PCTCN2021099503-appb-000009
其中,表9中的P表示Preferance(优先级)。表9中的C表示Conditional,表示水印IE是在满足条件时携带的,该条件为CP被DDoS攻击。在本实施例中,CP检测到拨号报文的接收速率异常时,会确定满足携带水印IE的条件。Among them, P in Table 9 represents Preferences. C in Table 9 indicates Conditional, indicating that the watermark IE is carried when a condition is met, and the condition is that the CP is attacked by DDoS. In this embodiment, when the CP detects that the receiving rate of the dial-up message is abnormal, it will determine that the condition for carrying the watermark IE is satisfied.
S305、UP设备从CP设备接收第一控制消息,第一控制消息用于指示UP设备在向CP设备发送拨号报文时携带水印。S305. The UP device receives a first control message from the CP device, where the first control message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device.
S307、UP设备根据第一控制消息,在拨号报文中携带水印。S307. The UP device carries a watermark in the dial-up message according to the first control message.
UP设备发送的拨号报文例如包括原始拨号报文和水印。在一个示例中,该原始拨号报文是由用户设备发送的,在另一个示例中,该原始拨号报文也可以是与用户设备相连的接入设备发送的。原始拨号报文会传输至UP设备,UP设备接收到原始拨号报文时,根据CP设备下发的第一控制消息,获得水印;UP设备将获得的水印与原始拨号报文进行封装,得到包括水印的拨号报文,从而将水印携带在拨号报文中,使得UP设备上送的拨号报文中增加了水印。The dial-up message sent by the UP device includes, for example, the original dial-up message and a watermark. In one example, the original dialing packet is sent by the user equipment, and in another example, the original dialing packet may also be sent by an access device connected to the user equipment. The original dial-up message will be transmitted to the UP device. When the UP device receives the original dial-up message, it obtains a watermark according to the first control message sent by the CP device; the UP device encapsulates the obtained watermark with the original dial-up message to obtain a Watermarked dial-up packets, so that the watermark is carried in the dial-up packets, so that the watermark is added to the dial-up packets sent by the UP device.
以下重点通过用户设备发送原始拨号报文的方式介绍UP设备发送的拨号报文的相关内容。The following focuses on the content of the dial-up packets sent by the UP device through the way that the user equipment sends the original dial-up packets.
拨号的方式包括而不限于PPPoE拨号或DHCP拨号。在采用PPPoE拨号的情况下,用户设备发送的原始拨号报文为PPPoE拨号报文。在采用DHCP拨号的情况下,用户设备发送的原始拨号报文为DHCP拨号报文。The dialing method includes but is not limited to PPPoE dialing or DHCP dialing. In the case of using PPPoE dial-up, the original dial-up packets sent by the user equipment are PPPoE dial-up packets. In the case of using DHCP dial-up, the original dial-up packets sent by the user equipment are DHCP dial-up packets.
PPPoE拨号报文例如是PADI报文。参见下表10,表10是对PADI报文格式的举例说明。The PPPoE dial-up message is, for example, a PADI message. See Table 10 below, which is an example of the PADI message format.
表10Table 10
Figure PCTCN2021099503-appb-000010
Figure PCTCN2021099503-appb-000010
Figure PCTCN2021099503-appb-000011
Figure PCTCN2021099503-appb-000011
表10所示的PADI报文中每个字段的含义如下表11所示。The meaning of each field in the PADI message shown in Table 10 is shown in Table 11 below.
表11Table 11
Figure PCTCN2021099503-appb-000012
Figure PCTCN2021099503-appb-000012
参见下表12,表12是对DHCP拨号报文格式的举例说明。表12中括号内的数字表示字段的长度,例如报文类型(1)表报文类型字段的长度是1字节,事务ID(4)表示事务ID字段的长度是4字节。See Table 12 below, which is an example of the format of the DHCP dial-up message. The numbers in parentheses in Table 12 indicate the length of the field, for example, the message type (1) indicates that the length of the message type field is 1 byte, and the transaction ID (4) indicates that the length of the transaction ID field is 4 bytes.
表12Table 12
Figure PCTCN2021099503-appb-000013
Figure PCTCN2021099503-appb-000013
Figure PCTCN2021099503-appb-000014
Figure PCTCN2021099503-appb-000014
上表12所示的DHCP拨号报文中每个字段的含义如下表13所示。The meaning of each field in the DHCP dial-up packet shown in Table 12 above is shown in Table 13 below.
表13Table 13
Figure PCTCN2021099503-appb-000015
Figure PCTCN2021099503-appb-000015
Figure PCTCN2021099503-appb-000016
Figure PCTCN2021099503-appb-000016
DHCP拨号报文的第一个报文为DHCP发现报文。具体地,在DFCP拨号过程中,当DHCP客户端请求地址时,并不知道DHCP服务器的位置,因此DHCP客户端会在本地网络内以广播方式发送请求报文,这个报文称为DHCP发现报文。DHCP发现报文用于发现网络中的DHCP服务器,所有收到DHCP发现报文的DHCP服务器都会发送回应报文,DHCP客户端据此能知道网络中存在的DHCP服务器的位置。参见下表14,表14是对DHCP发现报文格式的举例说明。表14所示的DHCP拨号报文中每个字段的含义如上表13所示。The first packet of a DHCP dial-up packet is a DHCP discovery packet. Specifically, in the DFCP dial-up process, when a DHCP client requests an address, it does not know the location of the DHCP server, so the DHCP client will broadcast a request message in the local network, which is called a DHCP discovery message. Arts. The DHCP discovery message is used to discover the DHCP server on the network. All DHCP servers that receive the DHCP discovery message will send a response message, so that the DHCP client can know the location of the DHCP server in the network. See Table 14 below, which is an example of the format of the DHCP discovery message. The meaning of each field in the DHCP dial-up message shown in Table 14 is shown in Table 13 above.
表14Table 14
Figure PCTCN2021099503-appb-000017
Figure PCTCN2021099503-appb-000017
Figure PCTCN2021099503-appb-000018
Figure PCTCN2021099503-appb-000018
以上示例性介绍了拨号报文的格式,以下,介绍UP设备如何在拨号报文中添加水印。The above example describes the format of the dial-up packet. The following describes how the UP device adds a watermark to the dial-up packet.
例如,在采用水印类型a的情况下,UP设备从第一控制消息获得第一VNI;或者,UP设备获得预先约定的第一VNI,或者,UP设备根据第一控制消息中携带的参数生成第一VNI。UP设备采用这三种方式中任一种方式获得第一VNI后,UP设备在拨号报文中携带第一VNI,使得UP设备上送的拨号报文中的VNI从原来的VNI变为调整后的VNI。For example, in the case of using the watermark type a, the UP device obtains the first VNI from the first control message; or the UP device obtains the pre-agreed first VNI, or the UP device generates the first VNI according to the parameters carried in the first control message A VNI. After the UP device obtains the first VNI in any of the three methods, the UP device carries the first VNI in the dial-up message, so that the VNI in the dial-up message sent by the UP device changes from the original VNI to the adjusted VNI. VNI.
例如,在采用水印类型b的情况下,UP设备从第一控制消息获得第一随机数;或者,UP设备获得预先约定的第一随机数,或者,UP设备根据第一控制消息中携带的参数生成第一随机数。UP设备采用这三种方式中任一种方式获得第一随机数后,UP设备在拨号报文中携带第一随机数,使得UP设备上送的拨号报文中增加了CP设备下发的随机数。For example, in the case of using watermark type b, the UP device obtains the first random number from the first control message; or the UP device obtains the pre-agreed first random number, or the UP device obtains the first random number according to the parameters carried in the first control message Generate a first random number. After the UP device obtains the first random number in any of the three methods, the UP device carries the first random number in the dial-up packet, so that the dial-up packet sent by the UP device adds the random number sent by the CP device. number.
例如,在采用水印类型c的情况下,UP设备根据UP设备与CP设备之间的时间同步机制,确定第一时间戳,第一时间戳用于指示UP设备与CP设备之间同步的时间点。UP设备在拨号报文中携带第一时间戳,使得UP设备上送的拨号报文增加了同步时间点对应的时间戳。可选地,第一时间戳的精度为秒级。例如,UP设备与CP设备之间同步的时间点是2020年7月20日17点43分5秒,第一时间戳是20200720174305。For example, in the case of using watermark type c, the UP device determines the first timestamp according to the time synchronization mechanism between the UP device and the CP device, and the first timestamp is used to indicate the time point of synchronization between the UP device and the CP device . The UP device carries the first time stamp in the dial-up message, so that the dial-up message sent by the UP device adds a time stamp corresponding to the synchronization time point. Optionally, the precision of the first timestamp is second. For example, the time point of synchronization between the UP device and the CP device is 17:43:5 seconds on July 20, 2020, and the first timestamp is 20200720174305.
或者,UP设备生成第一时间戳,在拨号报文中携带生成的第一时间戳。在一个示例中,第一控制消息携带时间戳格式,UP设备根据该时间戳格式生成第一时间戳。通过这种方式,CP设备与UP设备通过传输第一控制消息,约定时间戳格式,从而按照预先约定的时间戳格式增加水印。时间戳格式例如为时间戳的精度、时间戳的位数等。Or, the UP device generates the first time stamp, and carries the generated first time stamp in the dial-up packet. In one example, the first control message carries a timestamp format, and the UP device generates the first timestamp according to the timestamp format. In this way, the CP device and the UP device agree on a timestamp format by transmitting the first control message, thereby adding a watermark according to the pre-agreed timestamp format. The timestamp format is, for example, the precision of the timestamp, the number of digits of the timestamp, and the like.
本实施例并不限定第一时间戳是否是一个完整时间戳。可选地,第一时间戳是一个完整时间戳包含的一部分。例如,第一时间戳是一个完整时间戳中的小时、分钟和秒。例如,一个完整的时间戳是20200720174305,第一时间戳是170510。This embodiment does not limit whether the first timestamp is a complete timestamp. Optionally, the first timestamp is part of a complete timestamp. For example, the first timestamp is the hour, minute, and second in a full timestamp. For example, a full timestamp is 20200720174305 and the first timestamp is 170510.
例如,在采用水印类型d的情况下,UP设备对拨号报文中至少一个参数进行哈希运算,获得第一消息认证码;UP设备在拨号报文中携带第一消息认证码,使得UP设备上送的拨号报文中增加了消息认证码。具体地,UP设备根据第一控制消息获得消息验证码的格式;或者,UP设备获得预先约定的消息验证码的格式。UP设备采用这两种方式中任一种方式确定消息验证码的格式后,按照消息验证码的格式对拨号报文中至少一个参数进行哈希运算。例如,如果第一控制消息中消息验证码的格式为1,含义是消息验证码的格式是拨号报文中源MAC地址和目的MAC地址的哈希值,那么UP设备对拨号报文中源MAC地址和目的MAC地址这2种信息进行哈希运算,将得到的哈希值作为第一消息验证码。For example, in the case of using watermark type d, the UP device performs a hash operation on at least one parameter in the dial-up message to obtain the first message authentication code; the UP device carries the first message authentication code in the dial-up message, so that the UP device The message authentication code is added to the dial-up message sent. Specifically, the UP device obtains the format of the message verification code according to the first control message; or, the UP device obtains a pre-agreed format of the message verification code. After the UP device determines the format of the message verification code in either of the two methods, it performs a hash operation on at least one parameter in the dial-up message according to the format of the message verification code. For example, if the format of the message verification code in the first control message is 1, which means that the format of the message verification code is the hash value of the source MAC address and the destination MAC address in the dial-up packet, then the UP device interprets the source MAC address in the dial-up packet. The two types of information, the address and the destination MAC address, are hashed, and the obtained hash value is used as the first message verification code.
S308、UP设备向CP设备发送包括水印的拨号报文。S308, the UP device sends a dial-up message including a watermark to the CP device.
UP设备如何上送拨号报文包括多种方式。在一个示例中,UP设备与CP设备之间建立有基于UDP的隧道,UP设备通过该基于UDP的隧道发送包括水印的拨号报文,该包括水印的拨号报文为UDP报文。There are various methods for how the UP device sends dial-up packets. In an example, a UDP-based tunnel is established between the UP device and the CP device, and the UP device sends a dial-up packet including a watermark through the UDP-based tunnel, where the dial-up packet including the watermark is a UDP packet.
例如,参见附图6,附图6中的(a)是对UP设备、CP设备与攻击者形成的网络架构的举例说明。附图6中的(b)是对水印功能关闭时UP设备上送的拨号报文的格式的举例说明。附图6中的(c)是对攻击者上送的拨号报文的格式的举例说明。附图6中的(d)是对水印功能开启时UP设备上送的拨号报文的格式的举例说明。具体地,当水印功能关闭时,UP设 备会在用户设备发送的原始拨号报文的基础上封装基于UDP的隧道头,再上送包括基于UDP的隧道头的拨号报文。因此,如附图6中的(b)所示,UP设备上送的拨号报文包括两个部分,分别是基于UDP的隧道头和用户设备发送的原始拨号报文。攻击者捕获UP设备上送CP设备的拨号报文后,攻击者对拨号报文中的MAC地址或VLAN号进行跳变,得到跳变拨号报文。攻击者同样通过基于UDP的隧道发送跳变拨号报文。因此,如附图6中的(c)所示,攻击者上送的拨号报文包括两个部分,分别是基于UDP的隧道头和跳变拨号报文。攻击者通过发送跳变拨号报文发起重放攻击后,CP设备发现拨号报文的速率超过速率阈值的时长超过一定时间,则通过向UP设备下发控制消息指示UP设备增加水印。UP设备接收到控制消息后,开启水印功能,UP设备在用户设备发送的原始拨号报文的基础上封装基于UDP的隧道头以及水印,再上送包括基于UDP的隧道头以及水印的拨号报文。因此,如附图6中的(d)所示,UP设备上送的拨号报文包括三个部分,分别是基于UDP的隧道头、水印字段和用户设备发送的原始拨号报文。For example, referring to FIG. 6 , (a) in FIG. 6 is an illustration of the network architecture formed by the UP device, the CP device and the attacker. (b) in FIG. 6 is an example of the format of the dial-up message sent by the UP device when the watermark function is turned off. (c) in FIG. 6 is an example of the format of the dial-up message sent by the attacker. (d) in FIG. 6 is an example of the format of the dial-up message sent by the UP device when the watermark function is enabled. Specifically, when the watermark function is disabled, the UP device will encapsulate the UDP-based tunnel header on the basis of the original dial-up message sent by the user equipment, and then send the dial-up message including the UDP-based tunnel header. Therefore, as shown in (b) of FIG. 6 , the dial-up message sent by the UP device includes two parts, which are the UDP-based tunnel header and the original dial-up message sent by the user equipment. After the attacker captures the dial-up packets sent by the UP device and sent to the CP device, the attacker hops the MAC address or VLAN number in the dial-up packets to obtain hopping dial-up packets. The attacker also sends hop dial packets through the UDP-based tunnel. Therefore, as shown in (c) of FIG. 6 , the dial-up message sent by the attacker includes two parts, which are the UDP-based tunnel header and the hopping dial-up message. After the attacker initiates a replay attack by sending hopping dial packets, the CP device finds that the rate of the dial packets exceeds the rate threshold for a certain period of time, and sends a control message to the UP device to instruct the UP device to add a watermark. After receiving the control message, the UP device enables the watermark function. The UP device encapsulates the UDP-based tunnel header and watermark on the basis of the original dial-up message sent by the user equipment, and then sends the dial-up message including the UDP-based tunnel header and watermark. . Therefore, as shown in (d) of FIG. 6 , the dial-up message sent by the UP device includes three parts, which are the UDP-based tunnel header, the watermark field and the original dial-up message sent by the user equipment.
本实施例并不限定水印字段在拨号报文的携带位置。在一个示例中,参见附图6中的(d),水印字段的携带位置在基于UDP的隧道头和用户设备发送的原始拨号报文之间。例如,在采用水印类型b的情况下,附图6中的(d)所示的水印字段具体为随机数字段,该随机数字段携带第一随机数。又如,在采用水印类型c的情况下,附图6中的(d)所示的水印字段具体为时间戳字段,时间戳字段携带第一时间戳。又如,在采用水印类型d的情况下,附图6中的(d)所示的水印字段具体为消息认证码字段,消息认证码字段携带第一消息认证码。在另一个示例中,水印字段的携带位置在基于UDP的隧道头内。例如,在采用水印类型a的情况下,基于UDP的隧道头包括VXLAN头,水印字段具体为VNI字段,VNI字段携带第一VNI。包括第一VNI的VNI字段例如位于VXLAN头中。This embodiment does not limit the carrying position of the watermark field in the dial-up message. In an example, referring to (d) in FIG. 6 , the carrying position of the watermark field is between the UDP-based tunnel header and the original dial-up message sent by the user equipment. For example, in the case of adopting the watermark type b, the watermark field shown in (d) of FIG. 6 is specifically a random number field, and the random number field carries the first random number. For another example, in the case of adopting the watermark type c, the watermark field shown in (d) of FIG. 6 is specifically a timestamp field, and the timestamp field carries the first timestamp. For another example, in the case of adopting the watermark type d, the watermark field shown in (d) of FIG. 6 is specifically the message authentication code field, and the message authentication code field carries the first message authentication code. In another example, the watermark field is carried in a UDP-based tunnel header. For example, in the case of adopting the watermark type a, the UDP-based tunnel header includes a VXLAN header, the watermark field is specifically a VNI field, and the VNI field carries the first VNI. The VNI field including the first VNI is located, for example, in the VXLAN header.
在一个示例中,CP设备与UP设备之间具有CPRi接口,CP设备通过CPRi接口向UP设备发送包括水印的拨号报文。在采用这种方式时,包括水印的拨号报文也称CPRi消息或CPRi报文。CPRi接口的具体实现方式包括而不限于VXLAN GPE的方式以及GTP-C的方式,在采用不同的方式实现CPRi接口时,UP设备上送的拨号报文中水印的携带位置有所区别。下面通过情况A对采用VXLAN GPE的方式时UP设备如何在上送的拨号报文中携带水印举例说明,通过情况B对采用GTP-C的方式时UP设备如何在上送的拨号报文中携带水印举例说明。In an example, there is a CPRi interface between the CP device and the UP device, and the CP device sends a dial-up message including a watermark to the UP device through the CPRi interface. In this way, the dial-up message including the watermark is also called CPRi message or CPRi message. The specific implementation methods of the CPRi interface include, but are not limited to, the VXLAN GPE method and the GTP-C method. When different methods are used to implement the CPRi interface, the location of the watermark in the dial-up packets sent by the UP device is different. The following is an example of how the UP device carries the watermark in the dial-up packet sent in the VXLAN GPE mode in case A, and how the UP device carries the watermark in the dial-up packet sent by the GTP-C mode in the case B. An example of a watermark.
情况A、采用VXLAN GPE的方式实现CPRi接口的情况。Case A. The CPRi interface is implemented by means of VXLAN GPE.
在采用VXLAN GPE的方式实现CPRi接口时,附图6所示的基于UDP的隧道头具体为VXLAN GPE头,UP设备上送的包括水印的拨号报文具体为VXLAN GPE报文。参见附图7,附图7是对包括水印的拨号报文-VXLAN GPE报文的两种封装格式的举例说明。如附图7中的(a)所示,包括水印的拨号报文例如包括三个部分,分别是VXLAN GPE头、水印字段以及用户设备发送的原始拨号报文,水印字段位于VXLAN GPE头与用户设备发送的原始拨号报文之间;如附图7中的(b)所示,包括水印的拨号报文例如包括两个部分,分别是VXLAN GPE头以及用户设备发送的原始拨号报文,水印字段位于VXLAN GPE头中。When the CPRi interface is implemented by means of VXLAN GPE, the UDP-based tunnel header shown in Figure 6 is specifically the VXLAN GPE header, and the dial-up message including the watermark sent by the UP device is specifically the VXLAN GPE message. Referring to FIG. 7, FIG. 7 is an illustration of two encapsulation formats of the dial-up message including the watermark-VXLAN GPE message. As shown in (a) of FIG. 7 , the dial-up message including the watermark includes, for example, three parts, namely the VXLAN GPE header, the watermark field and the original dial-up message sent by the user equipment. The watermark field is located in the VXLAN GPE header and the user equipment. Between the original dial-up messages sent by the device; as shown in (b) in Figure 7, the dial-up message including the watermark includes, for example, two parts, namely the VXLAN GPE header and the original dial-up message sent by the user equipment, the watermark Fields are in the VXLAN GPE header.
如附图7所示,VXLAN GPE头包括目的MAC地址(Destination MAC Address,DA)字段、源MAC地址(Source MAC Address,SA)字段、目的IP(Destination IP,DIP)字段、源IP(Source IP,SIP)字段、UDP头(UDP Header)、VXLAN头(VXLAN Header)、GPE扩展头。As shown in Figure 7, the VXLAN GPE header includes a destination MAC address (Destination MAC Address, DA) field, a source MAC address (Source MAC Address, SA) field, a destination IP (Destination IP, DIP) field, a source IP (Source IP) field , SIP) field, UDP header (UDP Header), VXLAN header (VXLAN Header), GPE extension header.
例如,VXLAN头的格式参考下表15所示。VXLAN头包括VNI字段、保留(Reserved,R) 字段以及I字段。其中,I字段例如是实例比特(instance bit,简称I比特或I字段或I标志),I字段用于标识VNI是否有效,当I字段取值为1时标识VNI有效;当I字段取值为0时标识VNI无效。保留字段包括作为保留的一个或多个比特位。VNI字段包括VNI。在本实施例中,VNI字段包括第一VNI。For example, the format of the VXLAN header is shown in Table 15 below. The VXLAN header includes a VNI field, a Reserved (R) field, and an I field. Wherein, the I field is, for example, an instance bit (instance bit, referred to as I bit or I field or I flag), and the I field is used to identify whether the VNI is valid. When the value of the I field is 1, it indicates that the VNI is valid; when the value of the I field is 0 indicates that the VNI is invalid. A reserved field includes one or more bits that are reserved. The VNI field includes the VNI. In this embodiment, the VNI field includes the first VNI.
表15Table 15
Figure PCTCN2021099503-appb-000019
Figure PCTCN2021099503-appb-000019
在一个示例中,参见下表16,VXLAN GPE头中VXLAN头还包括下一协议(Next Protocol)字段,应用在CP和UP分离的BNG系统时,下一协议字段的取值例如为0x7。在一个示例中,如表16所示,VXLAN GPE头中的VXLAN头还包括版本(version,Ver)字段,Ver字段表示VXLAN GPE的版本,初始值是0;VXLAN GPE头中VXLAN头还包括实例比特(instance bit,简称I比特或I字段或I标志),当I比特携带1时,表示VXLAN头包括的VNI是一个有效的VNI。VXLAN GPE头中VXLAN头还包括下一协议比特(Next Protocol Bit,简称P比特或下一协议标志),P比特用于标识下一协议字段的值有效。VXLAN GPE头中VXLAN头还包括广播未知单播组播流量比特(broadcast&unknown-unicast&multicast traffic bit,BUM traffic Bit,简称B比特或B字段或B标志),B比特用于标识报文是一个广播报文或未知单播报文或组播报文(broadcast&unknown-unicast&multica,BUM)报文。VXLAN GPE头中VXLAN头还包括操作维护管理标志比特(operation administration and maintenance flag bit,OAM flag bit,简称O比特或O字段或O标志),O比特用于标识报文是一个OAM报文。In an example, referring to Table 16 below, the VXLAN header in the VXLAN GPE header further includes a Next Protocol (Next Protocol) field. When applied to a BNG system in which the CP and UP are separated, the value of the next protocol field is, for example, 0x7. In an example, as shown in Table 16, the VXLAN header in the VXLAN GPE header also includes a version (version, Ver) field, the Ver field indicates the version of the VXLAN GPE, and the initial value is 0; the VXLAN header in the VXLAN GPE header also includes the instance A bit (instance bit, referred to as I bit or I field or I flag), when the I bit carries 1, it indicates that the VNI included in the VXLAN header is a valid VNI. The VXLAN header in the VXLAN GPE header also includes the next protocol bit (Next Protocol Bit, referred to as the P bit or the next protocol flag), and the P bit is used to identify that the value of the next protocol field is valid. The VXLAN header in the VXLAN GPE header also includes the broadcast unknown unicast multicast traffic bit (broadcast&unknown-unicast&multicast traffic bit, BUM traffic Bit, referred to as B bit or B field or B flag), and the B bit is used to identify that the message is a broadcast message Or unknown unicast packets or multicast packets (broadcast&unknown-unicast&multica, BUM) packets. The VXLAN header in the VXLAN GPE header also includes an operation and maintenance management flag bit (operation administration and maintenance flag bit, OAM flag bit, referred to as O bit or O field or O flag), and the O bit is used to identify that the message is an OAM message.
表16Table 16
Figure PCTCN2021099503-appb-000020
Figure PCTCN2021099503-appb-000020
GPE扩展头的格式例如参见下表17所示,GPE扩展头包括P字段、类型(Class)字段、端口信息(Port Info)字段。其中,P字段用于表示拨号的类别,拨号的类型例如是DHCP拨号或PPPoE拨号等。类型字段用于表示原始拨号报文的具体类别,例如,类型字段表示原始拨号报文是PADI报文。例如,类型字段表示原始拨号报文是DHCP发现报文。端口信息字段表示用户设备在UP设备上接入的接口信息。For example, the format of the GPE extension header is shown in Table 17 below. The GPE extension header includes a P field, a type (Class) field, and a port information (Port Info) field. The P field is used to indicate the type of dialing, and the type of dialing is, for example, DHCP dialing or PPPoE dialing. The type field is used to indicate the specific category of the original dial-up packet. For example, the type field indicates that the original dial-up packet is a PADI packet. For example, the type field indicates that the original dial-up message is a DHCP discovery message. The port information field indicates the interface information that the user equipment accesses on the UP device.
表17Table 17
Figure PCTCN2021099503-appb-000021
Figure PCTCN2021099503-appb-000021
以上对UP设备上送的包括水印的VXLAN GPE报文的格式进行了整体介绍,以下结合水印类型a至水印类型d这几种具体的水印类型,对VXLAN GPE报文的格式进行举例说明。The format of the VXLAN GPE message including the watermark sent by the UP device has been generally introduced above. The following describes the format of the VXLAN GPE message with reference to the specific watermark types from watermark type a to watermark type d.
例如,在采用水印类型a的情况下,UP设备上送的VXLAN GPE报文包括调整后的VNI(第一VNI)。参见附图7中的(b),第一VNI例如位于附图7中的(b)中的VXLAN头中。例如,参见表15,第一VNI位于表15所示的VXLAN头中,比如在表15中的VNI字段中;又如,参见表16,第一VNI位于表16所示的VXLAN头中,比如在表16中的VNI字段中。For example, in the case of using the watermark type a, the VXLAN GPE packet sent by the UP device includes the adjusted VNI (the first VNI). Referring to (b) of FIG. 7 , the first VNI is, for example, located in the VXLAN header in (b) of FIG. 7 . For example, referring to Table 15, the first VNI is located in the VXLAN header shown in Table 15, such as in the VNI field in Table 15; for another example, referring to Table 16, the first VNI is located in the VXLAN header shown in Table 16, such as in the VNI field in Table 16.
例如,在采用水印类型b的情况下,UP设备上送的VXLAN GPE报文包括CP设备生成的随机数(第一随机数)。例如,参见附图8,附图8是对包括第一随机数的VXLAN GPE报文的举例说明。第一随机数例如位于附图8中的随机数字段中。附图8中每个字段的含义请参考上文的介绍。For example, in the case of using watermark type b, the VXLAN GPE packet sent by the UP device includes a random number (the first random number) generated by the CP device. For example, see FIG. 8, which is an illustration of a VXLAN GPE message including the first random number. The first random number is, for example, located in the random number field in FIG. 8 . For the meaning of each field in FIG. 8, please refer to the above introduction.
例如,在采用水印类型c的情况下,UP设备上送的VXLAN GPE报文包括UP设备与CP设备之间同步时间点的时间戳(第一时间戳)。例如,参见附图9,附图9是对包括第一时间戳的VXLAN GPE报文的举例说明。第一时间戳例如位于附图9中的时间戳字段中。附图9中每个字段的含义请参考上文的介绍。For example, in the case of using watermark type c, the VXLAN GPE packet sent by the UP device includes the timestamp (first timestamp) of the synchronization time point between the UP device and the CP device. For example, see FIG. 9, which is an illustration of a VXLAN GPE message including a first timestamp. The first timestamp is, for example, in the timestamp field in FIG. 9 . For the meaning of each field in FIG. 9, please refer to the above introduction.
例如,在采用水印类型d的情况下,UP设备上送的VXLAN GPE报文包括对拨号报文中的参数进行哈希运算得到的消息认证码(第一消息认证码)。例如,参见附图10,附图10是对包括第一消息认证码的VXLAN GPE报文的举例说明。第一消息认证码例如位于附图10中的消息认证码字段中。附图10中每个字段的含义请参考上文的介绍。For example, in the case of using watermark type d, the VXLAN GPE message sent by the UP device includes the message authentication code (first message authentication code) obtained by hashing the parameters in the dial-up message. For example, see FIG. 10, which is an illustration of a VXLAN GPE message including a first message authentication code. The first message authentication code is, for example, in the message authentication code field in FIG. 10 . For the meaning of each field in FIG. 10, please refer to the above introduction.
情况B、采用GTP-C的方式实现CPRi接口的情况。Case B. The case where the CPRi interface is implemented by means of GTP-C.
在采用GTP-C的方式实现CPRi接口时,UP设备上送的包括水印的拨号报文具体为GTP-C报文。例如,附图6中的(d)所示的基于UDP的隧道头具体包括GTP-C头和NSH头。例如,附图7、附图8、附图9以及附图10所示的四种包括水印的拨号报文中的VXLAN GPE头被替换为GTP-C头和NSH头。在一个示例中,使用GTP-C头中某个字段或者NSH头中某个字段携带水印。When the CPRi interface is implemented in the GTP-C manner, the dial-up message including the watermark sent by the UP device is specifically a GTP-C message. For example, the UDP-based tunnel header shown in (d) of FIG. 6 specifically includes a GTP-C header and an NSH header. For example, the VXLAN GPE headers in the four types of dial-up messages including watermarks shown in FIG. 7 , FIG. 8 , FIG. 9 and FIG. 10 are replaced by GTP-C headers and NSH headers. In one example, a field in the GTP-C header or a field in the NSH header is used to carry the watermark.
S309、CP设备根据水印,在报文流中识别攻击报文。S309, the CP device identifies the attack packet in the packet flow according to the watermark.
报文流是指CP设备发送第一控制消息之后接收到的一系列报文。例如,报文流包括CP设备通过CPRi接口接收的报文。对于报文流中的一个报文,CP设备会根据水印对报文进行校验,从而识别报文是攻击者上送的攻击报文还是UP设备上送的正常报文。The packet flow refers to a series of packets received after the CP device sends the first control message. For example, the packet flow includes packets received by the CP device through the CPRi interface. For a packet in the packet flow, the CP device verifies the packet according to the watermark to identify whether the packet is an attack packet sent by an attacker or a normal packet sent by an UP device.
CP设备如何识别攻击报文包括多种实现方式。在一个示例中,攻击者上送的攻击报文本身没有携带水印,在这种情况下,CP设备根据报文不包括水印,确定报文是攻击报文。以识别第五报文的过程为例,例如,报文流包括第五报文,CP设备根据第五报文不包括水印确定第五报文为攻击报文。在另一个示例中,攻击者上送的攻击报文携带水印但水印并不正确,在这种情况下,CP设备根据报文携带的水印并不是CP设备之前下发给UP设备的水印,确定报文是攻击报文。下面,结合上面描述的四种具体的水印类型,通过识别方式A至识别方式D对CP设备识别攻击报文的具体实现方式举例说明。How the CP device identifies attack packets includes multiple implementations. In an example, the attack packet sent by the attacker itself does not carry a watermark. In this case, the CP device determines that the packet is an attack packet according to the fact that the packet does not include a watermark. Taking the process of identifying the fifth packet as an example, for example, the packet flow includes the fifth packet, and the CP device determines that the fifth packet is an attack packet according to the fact that the fifth packet does not include a watermark. In another example, the attack packet sent by the attacker carries a watermark but the watermark is incorrect. In this case, the CP device determines that the watermark carried in the packet is not the watermark sent by the CP device to the UP device before. The packets are attack packets. In the following, in conjunction with the four specific watermark types described above, the specific implementation manners for the CP device to identify attack packets are illustrated by way of identification methods A to D.
识别方式A、CP设备利用VNI识别攻击报文。Identification method A. The CP device uses VNI to identify attack packets.
以识别方式A应用在识别第一报文为例,第一报文是指CP设备在下发第一VNI后接收到的报文流中的一个报文。如果第一报文不包括CP设备之前向UP设备下发的第一VNI,这表明第一报文并不是来自UP设备的报文,因此CP设备对第一报文校验不通过,CP设备确定第一报文为攻击报文。在一个示例中,CP设备将原来的VNI调整为第一VNI之后,在本地的表项中保存第一VNI;当CP设备收到第一报文时,从本地的表项中读取第一VNI,从而利用预先保存的第一VNI识别攻击报文。Taking the application of the identification method A in identifying the first packet as an example, the first packet refers to a packet in the packet flow received by the CP device after delivering the first VNI. If the first packet does not include the first VNI previously delivered by the CP device to the UP device, this indicates that the first packet is not a packet from the UP device. Therefore, the CP device fails to verify the first packet, and the CP device fails to verify the first packet. It is determined that the first packet is an attack packet. In an example, after the CP device adjusts the original VNI to the first VNI, it saves the first VNI in the local entry; when the CP device receives the first packet, it reads the first VNI from the local entry. VNI, so as to identify the attack packet by using the pre-stored first VNI.
在以下情况A-1和情况A-2下,CP设备均能够利用识别方式A发现收到的报文是攻击者上送的攻击报文。In the following cases A-1 and A-2, the CP device can use the identification method A to discover that the received packet is an attack packet sent by an attacker.
情况A-1、攻击者上送的报文没有VNI。In case A-1, the packets sent by the attacker do not have VNI.
例如,第一报文不包括VNI,CP设备根据第一报文不包括VNI确定第一报文为攻击报文。For example, if the first packet does not include VNI, the CP device determines that the first packet is an attack packet according to the fact that the first packet does not include VNI.
情况A-2、攻击者上送的报文包含VNI而VNI不正确。In case A-2, the packet sent by the attacker contains VNI but the VNI is incorrect.
例如,CP设备从第一报文获得第二VNI;CP设备判断第二VNI与第一VNI是否相同;若第二VNI与第一VNI不同,CP设备确定第一报文为攻击报文。其中,第二VNI是指第一报文携带的VNI。例如,第一报文也是基于VXLAN隧道发送的,第二VNI是第一报文中VXLAN头中的VNI。For example, the CP device obtains the second VNI from the first packet; the CP device determines whether the second VNI is the same as the first VNI; if the second VNI is different from the first VNI, the CP device determines that the first packet is an attack packet. The second VNI refers to the VNI carried in the first packet. For example, the first packet is also sent based on the VXLAN tunnel, and the second VNI is the VNI in the VXLAN header in the first packet.
CP设备和UP设备通过采用识别方式A防御网络攻击,能够达到以下两个方面的效果。By adopting identification method A to defend against network attacks, CP devices and UP devices can achieve the following two effects.
一方面,由于攻击者难以知晓CP设备向UP设备下发的调整后的VNI(即第一VNI),也就无法构造包含调整后的VNI的攻击报文。因此,CP设备能够依据报文是否包含调整后的VNI,区分报文是攻击者上送的攻击报文还是UP设备上送的正常报文,从而有效防御攻击者的网络攻击。On the one hand, since it is difficult for an attacker to know the adjusted VNI (ie, the first VNI) delivered by the CP device to the UP device, he cannot construct an attack packet containing the adjusted VNI. Therefore, the CP device can distinguish whether the packet is an attack packet sent by the attacker or a normal packet sent by the UP device according to whether the packet contains the adjusted VNI, thereby effectively defending against network attacks by the attacker.
另一方面,在利用VNI实现防御网络攻击的功能时,能够复用CP设备与UP设备基于VXLAN通信时涉及的诸多流程。例如,CP设备根据第一VNI确定攻击报文的步骤可通过复用VXLAN中对收到的VXLAN报文中的VNI进行校验的流程实现,UP设备在报文中携带第一VNI的步骤可通过复用VXLAN中在发送的VXLAN报文携带VNI的流程实现。由于CP设备和UP设备能复用已有的处理逻辑来实现网络攻击的防御能力,节约了CP设备为了新增防御能力而新增的计算性能开销,也节约了UP设备为了新增防御能力而新增的转发性能开销。因此,这种实现防御网络攻击的方案开销小,实用性高。On the other hand, when using VNI to implement the function of defending against network attacks, many processes involved in the communication between the CP device and the UP device based on VXLAN can be reused. For example, the step that the CP device determines the attack packet according to the first VNI can be implemented by multiplexing the process of verifying the VNI in the received VXLAN packet in the VXLAN, and the step that the UP device carries the first VNI in the packet can be implemented. It is implemented by multiplexing the process of carrying VNI in VXLAN packets sent in VXLAN. Since the CP device and the UP device can reuse the existing processing logic to realize the defense capability of network attacks, the computing performance overhead of the CP device to increase the defense capability is saved, and the UP device to increase the defense capability is also saved. Added forwarding performance overhead. Therefore, this solution for implementing defense against network attacks has low overhead and high practicability.
本实施例对采用识别方式A时如何识别正常报文不做限定。在一个示例中,如果第一报 文包括CP设备之前向UP设备下发的第一VNI,则对第一报文校验通过,CP设备确定第一报文为非攻击报文(例如正常报文)。在另一个示例中,CP设备不仅利用VNI,还利用VNI之外的其他特征识别报文时,如果第一报文包括CP设备之前向UP设备下发的第一VNI且第一报文的其他特征满足正常条件,CP设备确定第一报文为正常报文。This embodiment does not limit how to identify normal packets when the identification mode A is adopted. In an example, if the first packet includes the first VNI previously delivered by the CP device to the UP device, the verification of the first packet is passed, and the CP device determines that the first packet is a non-attack packet (for example, a normal packet). Arts). In another example, when the CP device uses not only the VNI but also other features other than the VNI to identify the packet, if the first packet includes the first VNI previously delivered by the CP device to the UP device and other If the feature satisfies the normal condition, the CP device determines that the first packet is a normal packet.
识别方式B、CP设备利用随机数识别攻击报文。Identification method B. The CP device uses random numbers to identify attack packets.
以识别方式B应用在识别第二报文为例,第二报文是指CP设备在下发第一随机数后接收到的报文流中的一个报文。如果第二报文不包括CP设备之前向UP设备下发的第一随机数,这表明第二报文并不是来自UP设备的报文,因此CP设备对第二报文校验不通过,CP设备确定第二报文为攻击报文。在一个示例中,CP设备生成第一随机数后,在本地的表项中保存第一随机数;当CP设备收到第二报文时,从本地的表项中读取第一随机数,从而利用预先保存的第一随机数识别攻击报文。Taking the identification mode B applied to the identification of the second packet as an example, the second packet refers to a packet in the packet flow received by the CP device after delivering the first random number. If the second packet does not include the first random number sent by the CP device to the UP device, it indicates that the second packet is not from the UP device. Therefore, the CP device fails to verify the second packet, and the CP device fails to verify the second packet. The device determines that the second packet is an attack packet. In an example, after the CP device generates the first random number, it stores the first random number in a local table entry; when the CP device receives the second packet, it reads the first random number from the local table entry, Therefore, the attack packet is identified by using the pre-stored first random number.
在以下情况B-1和情况B-2下,CP设备均能够利用识别方式B发现收到的报文是攻击者上送的攻击报文。In the following cases B-1 and B-2, the CP device can use the identification method B to discover that the received packets are attack packets sent by the attacker.
情况B-1、攻击者上送的报文没有随机数。In case B-1, the packets sent by the attacker do not have random numbers.
例如,第二报文不包括随机数,CP设备根据第二报文不包括随机数确定第二报文为攻击报文。For example, if the second packet does not include a random number, the CP device determines that the second packet is an attack packet according to the fact that the second packet does not include a random number.
情况B-2、攻击者上送的报文包含随机数而随机数不正确。In case B-2, the packet sent by the attacker contains random numbers and the random numbers are incorrect.
例如,CP设备从第二报文获得第二随机数;CP设备判断第二随机数与第一随机数是否相同;若第二随机数与第一随机数不同,CP设备确定第二报文为攻击报文。其中,第二随机数是指第二报文携带的随机数。For example, the CP device obtains the second random number from the second packet; the CP device determines whether the second random number is the same as the first random number; if the second random number is different from the first random number, the CP device determines that the second packet is attack message. The second random number refers to a random number carried in the second packet.
本实施例对采用识别方式B时如何识别正常报文不做限定。在一个示例中,如果第二报文包括CP设备之前向UP设备下发的第一随机数,则对第二报文校验通过,CP设备确定第二报文为非攻击报文(例如正常报文)。在另一个示例中,CP设备不仅利用随机数,还利用随机数之外的其他特征识别报文时,如果第二报文包括CP设备之前向UP设备下发的第一随机数且第二报文的其他特征满足正常条件,CP设备确定第二报文为正常报文。This embodiment does not limit how to identify normal packets when the identification mode B is adopted. In an example, if the second packet includes the first random number previously sent by the CP device to the UP device, the verification of the second packet is passed, and the CP device determines that the second packet is a non-attack packet (for example, normal message). In another example, when the CP device uses not only the random number but also other features other than the random number to identify the packet, if the second packet includes the first random number previously delivered by the CP device to the UP device and the second packet If other characteristics of the message meet the normal conditions, the CP device determines that the second message is a normal message.
识别方式C、CP设备利用时间戳识别攻击报文。Identification method C. The CP device uses timestamps to identify attack packets.
以识别方式C应用在识别第三报文为例,第三报文是指CP设备在下发第一控制消息后接收到的报文流中的一个报文。如果第三报文不包括CP设备与UP设备之间同步的时间点对应的第一时间戳,这表明第三报文并不是来自UP设备的报文,因此CP设备对第三报文校验不通过,CP设备确定第三报文为攻击报文。Taking the identification mode C applied to the identification of the third packet as an example, the third packet refers to a packet in the packet flow received by the CP device after delivering the first control message. If the third packet does not include the first timestamp corresponding to the time point of synchronization between the CP device and the UP device, this indicates that the third packet is not a packet from the UP device. Therefore, the CP device verifies the third packet. If it fails, the CP device determines that the third packet is an attack packet.
其中,CP设备如何获得第一时间戳包括多种方式。例如,由于CP设备与UP设备之间的时间是同步的,CP设备收到第三报文时,读取本地时间点对应的时间戳,作为第一时间戳。或者,CP设备收到第三报文时,采用算法对本地时间点对应的时间戳进行补偿,将补偿后的时间戳作为第一时间戳。Wherein, how the CP device obtains the first timestamp includes various ways. For example, since the time between the CP device and the UP device is synchronized, when the CP device receives the third packet, it reads the timestamp corresponding to the local time point as the first timestamp. Alternatively, when the CP device receives the third packet, it uses an algorithm to compensate the timestamp corresponding to the local time point, and uses the compensated timestamp as the first timestamp.
在以下情况C-1和情况C-2下,CP设备均能够利用识别方式C发现收到的报文是攻击者上送的攻击报文。In the following cases C-1 and C-2, the CP device can use the identification method C to discover that the received packet is an attack packet sent by an attacker.
情况C-1、攻击者上送的报文没有时间戳。In case C-1, the packet sent by the attacker does not have a timestamp.
例如,第三报文不包括时间戳,CP设备根据第三报文不包括时间戳确定第三报文为攻击报文。For example, the third packet does not include a time stamp, and the CP device determines that the third packet is an attack packet according to the fact that the third packet does not include a time stamp.
情况C-2、攻击者上送的报文包含时间戳而时间戳不正确。In case C-2, the packet sent by the attacker contains a timestamp but the timestamp is incorrect.
例如,CP设备从第三报文获得第二时间戳;CP设备对第二时间戳与第一时间戳进行比较;若第二时间戳与第一时间戳之间的时间差大于时间差阈值,CP设备确定第三报文为攻击报文。其中,第二时间戳是指第三报文携带的时间戳。For example, the CP device obtains the second time stamp from the third packet; the CP device compares the second time stamp with the first time stamp; if the time difference between the second time stamp and the first time stamp is greater than the time difference threshold, the CP device It is determined that the third packet is an attack packet. The second timestamp refers to the timestamp carried in the third packet.
本实施例对采用识别方式C时如何识别正常报文不做限定。在一个示例中,如果第三报文包括第一时间戳,则对第三报文校验通过,CP设备确定第三报文为非攻击报文(例如正常报文)。在另一个示例中,如果第三报文包括的第二时间戳与第一时间戳之间的时间差小于时间差阈值,比如,第二时间戳与第一时间差之间的时间差属于正负1秒范围内,CP设备确定第三报文为正常报文。在另一个示例中,CP设备不仅利用时间戳,还利用时间戳之外的其他特征识别报文时,如果第三报文包括第一时间戳且第三报文的其他特征满足正常条件,CP设备确定第三报文为正常报文。This embodiment does not limit how to identify normal packets when the identification mode C is adopted. In an example, if the third packet includes the first timestamp, the verification of the third packet is passed, and the CP device determines that the third packet is a non-attack packet (for example, a normal packet). In another example, if the time difference between the second time stamp and the first time stamp included in the third packet is less than the time difference threshold, for example, the time difference between the second time stamp and the first time difference belongs to a range of plus or minus 1 second Inside, the CP device determines that the third packet is a normal packet. In another example, when the CP device uses not only the time stamp but also other features other than the time stamp to identify the message, if the third message includes the first time stamp and the other features of the third message meet the normal conditions, the CP device The device determines that the third packet is a normal packet.
识别方式D、CP设备利用消息认证码识别攻击报文。Identification method D. The CP device uses the message authentication code to identify attack packets.
以识别方式D应用在识别第四报文为例,第四报文是指CP设备在下发第一控制消息后接收到的报文流中的一个报文。如果第四报文不包括第一消息认证码,这表明第四报文并不是来自UP设备的报文,因此CP设备对第四报文校验不通过,CP设备确定第四报文为攻击报文。例如,CP设备通过第一控制消息下发消息验证码的格式后,在本地的表项中保存消息验证码的格式;当CP设备收到第四报文时,从本地的表项中读取消息验证码的格式,按照预先保存的消息验证码的格式对拨号报文中至少一个参数进行哈希运算,得到第一消息认证码。Taking the identification mode D applied to the identification of the fourth packet as an example, the fourth packet refers to a packet in the packet flow received by the CP device after delivering the first control message. If the fourth packet does not include the first message authentication code, it indicates that the fourth packet is not from the UP device. Therefore, the CP device fails to verify the fourth packet, and the CP device determines that the fourth packet is an attack. message. For example, after the CP device sends the format of the message verification code through the first control message, it saves the format of the message verification code in the local table entry; when the CP device receives the fourth message, it reads from the local table entry The format of the message verification code is to perform a hash operation on at least one parameter in the dial-up message according to the format of the message verification code stored in advance to obtain the first message verification code.
在以下情况D-1和情况D-2下,CP设备均能够利用识别方式D发现收到的报文是攻击者上送的攻击报文。In the following cases D-1 and D-2, the CP device can use the identification method D to discover that the received packets are attack packets sent by the attacker.
情况D-1、攻击者上送的报文没有消息认证码。In case D-1, the message sent by the attacker has no message authentication code.
例如,第四报文不包括消息认证码,CP设备根据第四报文不包括消息认证码确定第四报文为攻击报文。For example, the fourth packet does not include the message authentication code, and the CP device determines that the fourth packet is an attack packet according to the fact that the fourth packet does not include the message authentication code.
情况D-2、攻击者上送的报文包含消息认证码而消息认证码不正确。In case D-2, the packet sent by the attacker contains a message authentication code and the message authentication code is incorrect.
例如,CP设备从第四报文获得第二消息认证码;CP设备判断第二消息认证码与第一消息认证码是否相同;若第二消息认证码与第一消息认证码不同,CP设备确定第四报文为攻击报文。其中,第二消息认证码是指第四报文携带的消息认证码。For example, the CP device obtains the second message authentication code from the fourth message; the CP device determines whether the second message authentication code is the same as the first message authentication code; if the second message authentication code is different from the first message authentication code, the CP device determines The fourth packet is an attack packet. The second message authentication code refers to the message authentication code carried in the fourth packet.
本实施例对采用识别方式D时如何识别正常报文不做限定。在一个示例中,如果第四报文包括第一消息认证码,则对第四报文校验通过,CP设备确定第四报文为非攻击报文(例如正常报文)。在另一个示例中,CP设备不仅利用消息认证码,还利用消息认证码之外的其他特征识别报文时,如果第四报文包括第一消息认证码且第四报文的其他特征满足正常条件,CP设备确定第四报文为正常报文。This embodiment does not limit how to identify normal packets when the identification mode D is adopted. In an example, if the fourth packet includes the first message authentication code, the verification of the fourth packet is passed, and the CP device determines that the fourth packet is a non-attack packet (for example, a normal packet). In another example, when the CP device uses not only the message authentication code, but also other characteristics than the message authentication code to identify the packet, if the fourth packet includes the first message authentication code and other characteristics of the fourth packet satisfy the normal condition, the CP device determines that the fourth packet is a normal packet.
识别方式a至识别方式d能够采用任意方式结合。在一个示例中,仅采用识别方式a至识别方式d中的一种类型的水印防御攻击;在另一个示例中,同时采用识别方式a至识别方式d中的两种或两种以上类型的水印防御攻击。以识别方式a和识别方式b结合为例,CP设备生成并发送第一控制消息,第一控制消息用于指示UP设备在向CP设备发送拨号报文时携带第一VNI以及第一随机数;UP设备根据第一控制消息,在拨号报文中携带第一VNI以及第一随机数;UP设备向CP设备发送包括第一VNI以及第一随机数的拨号报文。CP设备接收到第一报文时,根据第一报文不包括第一VNI或者不包括第一随机数确定第一报文为攻击报文。 CP设备根据第一报文包括第一VNI且包括第一随机数确定第一报文为正常报文。The identification method a to the identification method d can be combined in any manner. In one example, only one type of watermark in the identification mode a to the identification mode d is used to defend against attacks; in another example, two or more types of watermarks in the identification mode a to the identification mode d are used at the same time Defense attack. Taking the combination of identification mode a and identification mode b as an example, the CP device generates and sends a first control message, and the first control message is used to instruct the UP device to carry the first VNI and the first random number when sending a dial-up message to the CP device; The UP device carries the first VNI and the first random number in the dial-up message according to the first control message; the UP device sends the dial-up message including the first VNI and the first random number to the CP device. When receiving the first packet, the CP device determines that the first packet is an attack packet according to the fact that the first packet does not include the first VNI or does not include the first random number. The CP device determines that the first packet is a normal packet according to the first packet including the first VNI and the first random number.
在一个示例中,CP设备还根据水印判断攻击报文是否从UP设备上送。如果攻击报文从UP设备上送,CP设备对UP设备上的用户侧接口进行限速。其中,用户侧接口是指与接入网或者汇聚网相连的接口。用户侧接口是UP设备从用户设备接收原始拨号报文时使用的接口。例如,CP设备向UP设备发送第三控制消息,第三控制消息用于指示UP设备对用户侧接口进行限速。UP设备响应于第三控制消息,对通过用户侧接口接收的原始拨号报文进行限速。通过这种方式,在家庭终端中毒等场景下,通过对UP设备的用户侧接口进行限速,能够解决家庭终端疯狂向UP设备进行拨号的问题。In an example, the CP device also determines whether the attack packet is sent from the UP device according to the watermark. If the attack packet is sent from the UP device, the CP device limits the rate of the user-side interface on the UP device. The user-side interface refers to the interface connected to the access network or the aggregation network. The user-side interface is the interface used by the UP device to receive original dial-up packets from the user equipment. For example, the CP device sends a third control message to the UP device, where the third control message is used to instruct the UP device to limit the rate of the user-side interface. In response to the third control message, the UP device limits the rate of the original dial-up packet received through the user-side interface. In this way, in scenarios such as home terminal poisoning, by limiting the speed of the user-side interface of the UP device, the problem of the home terminal frantically dialing up to the UP device can be solved.
S310、CP设备丢弃攻击报文。S310. The CP device discards the attack packet.
CP设备通过根据水印区分攻击报文和正常报文,对攻击报文进行丢弃,由于免去了CP设备为攻击报文回应拨号、进行认证等拨号处理的动作,因此节省了CP设备的计算资源,由于避免正常报文被令牌桶随机丢弃的情况,因此CP设备能够为正常报文执行拨号处理的动作,保证正常用户能够上线。The CP device distinguishes attack packets from normal packets according to the watermark, and discards the attack packets. Since the CP device does not need to respond to the attack packets by dialing up, performing authentication and other dial-up processing actions, the computing resources of the CP device are saved. In order to avoid the situation that normal packets are randomly discarded by the token bucket, the CP device can perform dial-up processing for normal packets to ensure that normal users can go online.
在一个示例中,CP设备联动指定的UP设备通过水印防御攻击。例如,CP设备对每个源IP地址的拨号报文分别进行测速,得到每个源IP地址的拨号报文对应的接收速率。如果第一源IP地址的拨号报文的接收速率满足异常条件,CP设备在CP设备关联的至少一个UP设备中,确定具有该第一源IP地址的第一UP设备,向第一UP设备发送第一控制消息。之后,第一UP设备在拨号报文中携带水印。CP设备根据水印,在IP地址为第一源IP地址的报文流中识别攻击报文。通过这种方式,由于攻击者发动攻击时经常仿冒UP设备的身份,即,攻击者使用与某个UP设备相同的源IP地址发送报文,因此如果第一源IP地址的拨号报文的接收速率满足异常条件,表明第一源IP地址的拨号报文被攻击者仿冒的可能性大,因此,CP设备通过联动指定的第一UP设备防御攻击,相对于要求系统中所有UP设备在上送拨号报文时都携带水印、CP设备对收到的所有报文流都使用水印校验的方式而言,网络攻击的防御功能更精确,开销更小。In one example, the CP device cooperates with the designated UP device to defend against attacks through watermarking. For example, the CP device measures the speed of the dial-up packets of each source IP address, and obtains the corresponding reception rate of the dial-up packets of each source IP address. If the receiving rate of the dial-up packets of the first source IP address satisfies the abnormal condition, the CP device determines, among at least one UP device associated with the CP device, the first UP device with the first source IP address, and sends the message to the first UP device. The first control message. After that, the first UP device carries the watermark in the dial-up message. According to the watermark, the CP device identifies the attack packet in the packet flow whose IP address is the first source IP address. In this way, since the attacker often impersonates the identity of the UP device when launching an attack, that is, the attacker uses the same source IP address as a certain UP device to send packets, so if the dial-up packet with the first source IP address is received If the rate satisfies the abnormal condition, it indicates that the dial-up packets of the first source IP address are likely to be forged by attackers. Therefore, the CP device defends against attacks by linking with the designated first UP device. Compared with the requirement that all UP devices in the system send the packets The dial-up messages carry watermarks, and the CP device uses watermark verification for all received message flows. The network attack defense function is more precise and the overhead is lower.
S311、响应于拨号报文的接收速率满足正常条件,CP设备生成第二控制消息,第二控制消息用于指示UP设备在向CP设备发送拨号报文时取消携带水印。S311. In response to the receiving rate of the dial-up message meeting the normal condition, the CP device generates a second control message, where the second control message is used to instruct the UP device to cancel carrying the watermark when sending the dial-up message to the CP device.
如果拨号报文的接收速率满足正常条件,CP设备会确定网络攻击已经停止,则CP设备通过生成并下发第二控制消息,来指示UP设备上送拨号报文时取消携带水印,从而关闭通过水印防御攻击的功能,进而减小网络的开销和设备的压力。If the receiving rate of the dial-up packets meets the normal conditions, the CP device will determine that the network attack has stopped, and the CP device generates and sends a second control message to instruct the UP device to cancel the watermark when sending dial-up packets, thereby closing the pass-through The function of watermark defense against attacks, thereby reducing network overhead and equipment pressure.
例如,CP设备测量拨号报文的接收速率,如果接收速率超过速率阈值的时长小于预设时长,或者接收速率小于速率阈值的时长大于预设时长,或者拨号报文的接收速率低于速率阈值,则CP设备确定接收速率满足正常条件。For example, the CP device measures the reception rate of dial-up packets. If the duration of the reception rate exceeding the rate threshold is less than the preset duration, or the duration of the reception rate being less than the rate threshold is greater than the preset duration, or the reception rate of dial-up packets is lower than the rate threshold, Then the CP device determines that the reception rate satisfies the normal condition.
在一个示例中,对CUSP扩展来实现第二控制消息。具体地,扩展了新类型的CUSP报文。新类型的CUSP报文用于指示UP设备在向CP设备发送拨号报文时取消携带水印,新类型的CUSP报文为第二控制消息。具体地,作为第二控制消息的CUSP报文包括类型字段。CUSP报文中类型字段包括类型值。该类型值标识CUSP报文指示UP设备在向CP设备发送拨号报文时取消携带水印。在一个示例中,该类型值为RFC 8772中Table 2的控制消息(control messages)的类型。例如,参见下表18,表18是作为第二控制消息的CUSP报文的举例说明。表18中水印结束(waterprint_End)是对作为第二控制消息的CUSP报文的类型名称的举例说明。表 18中的10是对作为第二控制消息的CUSP报文的类型值的举例说明。In one example, the CUSP is extended to implement the second control message. Specifically, a new type of CUSP message is extended. The new type of CUSP message is used to instruct the UP device to cancel carrying the watermark when sending the dial-up message to the CP device, and the new type of CUSP message is the second control message. Specifically, the CUSP message as the second control message includes a type field. The type field in the CUSP message includes the type value. The type value identifies the CUSP message and instructs the UP device to cancel carrying the watermark when sending the dial-up message to the CP device. In one example, the type value is the type of control messages in Table 2 of RFC 8772. For example, see Table 18 below, which is an example of a CUSP message as the second control message. The watermark end (waterprint_End) in Table 18 is an example of the type name of the CUSP message as the second control message. 10 in Table 18 is an example of the type value of the CUSP message as the second control message.
表18Table 18
类型(type)type 名称(name)name 注释Notes
1010 水印结束watermark end 停止加水印stop watermarking
在一个示例中,对PFCP扩展来实现第二控制消息。例如,作为第二控制消息的PFCP消息包括水印IE。水印IE的格式请参考上表6、表7和表8的介绍。在一个示例中,第二控制消息为PFCP节点消息。在一个示例中,第二控制消息为PFCP会话消息。In one example, the PFCP extension is implemented to implement the second control message. For example, the PFCP message as the second control message includes the Watermark IE. For the format of the watermark IE, please refer to the introduction in Table 6, Table 7 and Table 8 above. In one example, the second control message is a PFCP node message. In one example, the second control message is a PFCP session message.
S312、CP设备向UP设备发送第二控制消息。S312. The CP device sends a second control message to the UP device.
S313、UP设备从CP设备接收第二控制消息。S313. The UP device receives the second control message from the CP device.
S315、UP设备根据第二控制消息,向CP设备发送不包括水印的拨号报文。S315. The UP device sends a dial-up message that does not include a watermark to the CP device according to the second control message.
S315中UP设备发送的拨号报文例如包括原始拨号报文而不包括水印。在一个示例中,该原始拨号报文是由用户设备发送的,在另一个示例中,该原始拨号报文也可以是与用户设备相连的接入设备发送的。原始拨号报文会传输至UP设备。由于第二控制消息指明了UP设备在向CP设备发送拨号报文时取消携带水印,因此UP设备接收到原始拨号报文时,根据CP设备下发的第二控制消息,会取消在拨号报文中携带水印,使得UP设备上送的拨号报文中不再包括水印。In S315, the dial-up message sent by the UP device includes, for example, the original dial-up message but does not include the watermark. In one example, the original dialing packet is sent by the user equipment, and in another example, the original dialing packet may also be sent by an access device connected to the user equipment. The original dial-up message will be transmitted to the UP device. Since the second control message indicates that the UP device cancels carrying the watermark when sending the dial-up message to the CP device, when the UP device receives the original dial-up message, it will cancel the dial-up message according to the second control message sent by the CP device. The watermark is carried in the UP device, so that the watermark is no longer included in the dial-up packets sent by the UP device.
本实施例提供的方法,CP设备通过在发现拨号报文的接收速率异常的情况下,向UP设备下发控制消息,从而通过控制消息通知UP设备在上送拨号报文时携带水印。由于UP设备上送的拨号报文包括水印,攻击者上送的攻击报文不包括水印,CP设备根据水印能够在收到的报文流中有效地识别出攻击报文,使得攻击报文能够被CP设备丢弃,从而有效地抵御了网络攻击,降低了CP设备受到网络攻击的风险,提高了CP设备以及该通信系统的安全性。In the method provided by this embodiment, the CP device sends a control message to the UP device when it finds that the receiving rate of the dial-up message is abnormal, so as to notify the UP device to carry the watermark when sending the dial-up message through the control message. Since the dial-up packets sent by the UP device include a watermark, and the attack packets sent by the attacker do not include a watermark, the CP device can effectively identify the attack packets in the received packet flow according to the watermark, so that the attack packets can be It is discarded by the CP device, thereby effectively resisting network attacks, reducing the risk of the CP device being attacked by the network, and improving the security of the CP device and the communication system.
以上通过方法300示例性介绍了CP设备和UP设备参与的交互流程。以下介绍本申请实施例的CP设备和UP设备,下面描述的CP设备和UP设备分别具有上述方法300中CP设备和UP设备的任意功能。The interaction process in which the CP device and the UP device participate is exemplarily introduced above through the method 300 . The following describes the CP device and the UP device in the embodiments of the present application. The CP device and the UP device described below have any of the functions of the CP device and the UP device in the foregoing method 300, respectively.
附图11示出了上述实施例中所涉及的CP设备的一种可能的结构示意图。附图11所示的CP设备400例如实现方法300中CP设备的功能。FIG. 11 shows a possible schematic structural diagram of the CP device involved in the above embodiment. The CP device 400 shown in FIG. 11 , for example, implements the functions of the CP device in the method 300 .
请参考附图11,CP设备400包括处理单元401和发送单元402。CP设备400中的各个单元全部或部分地通过软件、硬件、固件或者其任意组合来实现。CP设备400中的各个单元用于执行上述方法300中CP设备的相应功能。具体地,处理单元401用于支持CP设备400执行S303、S309和S310。发送单元402用于支持CP设备400执行S304。Referring to FIG. 11 , the CP device 400 includes a processing unit 401 and a sending unit 402 . Each unit in the CP device 400 is implemented in whole or in part by software, hardware, firmware or any combination thereof. Each unit in the CP device 400 is used to perform the corresponding functions of the CP device in the above method 300 . Specifically, the processing unit 401 is configured to support the CP device 400 to execute S303, S309 and S310. The sending unit 402 is configured to support the CP device 400 to perform S304.
在一个示例中,处理单元401以及发送单元402还用于支持CP设备400执行本文所描述的技术中CP设备执行的其它过程。例如,处理单元401还用于支持CP设备400执行S311。发送单元402还用于支持CP设备400执行S312。具体执行过程请参考方法300中相应步骤的详细描述,这里不再一一赘述。In one example, the processing unit 401 and the sending unit 402 are also configured to support the CP device 400 to perform other processes performed by the CP device in the techniques described herein. For example, the processing unit 401 is further configured to support the CP device 400 to execute S311. The sending unit 402 is further configured to support the CP device 400 to perform S312. For the specific execution process, please refer to the detailed description of the corresponding steps in the method 300, which will not be repeated here.
本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可选地有另外的划分方式。The division of units in this embodiment of the present application is schematic, and is only a logical function division. In actual implementation, there may be other division methods.
例如,在另一个示例中,CP设备400中各个单元集成在一个处理单元中。例如,CP设备 400中各个单元集成在同一个芯片上。该芯片包括处理电路和与该处理电路内部连接通信的输入接口以及输出接口。处理单元401通过芯片中的处理电路实现。发送单元402通过芯片中的输出接口实现。例如,该芯片通过一个或多个现场可编程门阵列(英文全称:field-programmable gate array,英文简称:FPGA)、可编程逻辑器件(英文全称:programmable logic device,英文简称:PLD)、控制器、状态机、门逻辑、分立硬件部件、任何其它适合的电路、或者能够执行本申请通篇所描述的各种功能的电路的任意组合实现。For example, in another example, the various units in the CP device 400 are integrated into one processing unit. For example, each unit in the CP device 400 is integrated on the same chip. The chip includes a processing circuit, an input interface and an output interface that are internally connected and communicated with the processing circuit. The processing unit 401 is implemented by a processing circuit in the chip. The sending unit 402 is implemented through an output interface in the chip. For example, the chip uses one or more field programmable gate arrays (full name in English: field-programmable gate array, English abbreviation: FPGA), programmable logic device (full English name: programmable logic device, English abbreviation: PLD), controller , state machines, gate logic, discrete hardware components, any other suitable circuit, or any combination of circuits capable of performing the various functions described throughout this application.
又如,在另一个示例中,CP设备400各个单元单独物理存在。在另一个示例中,CP设备400一部分单元单独物理存在,另一部分单元集成在一个单元中。例如,在一个示例中,处理单元401和发送单元402是同一个单元。在另一个示例中,处理单元401和发送单元402是不同的单元。在一个示例中,不同单元的集成采用硬件的形式实现,即,不同单元对应于同一个硬件。又如,不同单元的集成采用软件单元的形式实现。For another example, in another example, each unit of the CP device 400 physically exists independently. In another example, a part of the units of the CP device 400 exist physically alone, and another part of the units are integrated in one unit. For example, in one example, the processing unit 401 and the sending unit 402 are the same unit. In another example, the processing unit 401 and the sending unit 402 are different units. In one example, the integration of the different units is implemented in the form of hardware, that is, the different units correspond to the same hardware. For another example, the integration of different units is implemented in the form of software units.
在CP设备400中通过硬件实现的情况下,在一个示例中,CP设备400中处理单元401通过设备700中的处理器701或者处理器705中的至少一项实现。CP设备400中发送单元402通过设备700中的通信接口704实现。在另一个示例中,CP设备400中处理单元401通过设备600中的中央处理器611、接口板603上的中央处理器631、网络处理器632、接口板640上的中央处理器641或者网络处理器642中的至少一项实现。CP设备400中发送单元402通过设备600中的物理接口卡633或者物理接口卡643中的至少一项实现。In the case of hardware implementation in the CP device 400 , in one example, the processing unit 401 in the CP device 400 is implemented by at least one of the processor 701 or the processor 705 in the device 700 . The sending unit 402 in the CP device 400 is implemented through the communication interface 704 in the device 700 . In another example, the processing unit 401 in the CP device 400 is processed by the central processing unit 611 in the device 600, the central processing unit 631 on the interface board 603, the network processor 632, the central processing unit 641 on the interface board 640, or the network processing unit at least one of the implementations of the device 642 . The sending unit 402 in the CP device 400 is implemented by at least one of the physical interface card 633 or the physical interface card 643 in the device 600 .
在CP设备400中通过软件实现的情况下,例如,CP设备400中各个单元为设备700中的处理器701或者处理器705读取存储器703中存储的程序代码后生成的软件;又如,CP设备400中各个单元为设备600中的中央处理器611、接口板603上的中央处理器631、网络处理器632、接口板640上的中央处理器641或者网络处理器642读取存储器612中存储的程序代码后生成的软件。例如,CP设备400为虚拟化设备。虚拟化设备包括而不限于虚拟机、容器、Pod中的至少一种。在一个示例中,CP设备400以虚拟机的形式,部署在硬件设备(如物理服务器)上。例如,基于通用的物理服务器结合网络功能虚拟化(Network Functions Virtualization,NFV)技术来实现CP设备400。采用虚拟机的方式实现时,CP设备400例如为虚拟主机、虚拟路由器或虚拟交换机。本领域技术人员通过阅读本申请即可结合NFV技术在通用物理服务器上虚拟出CP设备400。在另一个示例中,CP设备400以容器(例如docker容器)的形式,部署在硬件设备上。例如,CP设备400执行上述方法实施例的流程被封装在镜像文件中,硬件设备通过运行镜像文件来创建CP设备400。在另一个示例中,CP设备400以Pod的形式,部署在硬件设备上。Pod包括多个容器,每个容器用于实现CP设备400中的一个或多个单元。In the case of software implementation in the CP device 400, for example, each unit in the CP device 400 is software generated after the processor 701 or the processor 705 in the device 700 reads the program code stored in the memory 703; Each unit in the device 400 is the central processing unit 611 in the device 600, the central processing unit 631 on the interface board 603, the network processor 632, the central processing unit 641 on the interface board 640, or the network processor 642 reads the storage in the memory 612. The software generated after the program code. For example, the CP device 400 is a virtualized device. The virtualization device includes, but is not limited to, at least one of a virtual machine, a container, and a Pod. In one example, the CP device 400 is deployed on a hardware device (eg, a physical server) in the form of a virtual machine. For example, the CP device 400 is implemented based on a general physical server combined with a Network Functions Virtualization (NFV) technology. When implemented by a virtual machine, the CP device 400 is, for example, a virtual host, a virtual router, or a virtual switch. Those skilled in the art can virtualize the CP device 400 on a general physical server in combination with the NFV technology by reading this application. In another example, the CP device 400 is deployed on a hardware device in the form of a container (eg, a docker container). For example, the process of the CP device 400 executing the above method embodiments is encapsulated in an image file, and the hardware device creates the CP device 400 by running the image file. In another example, the CP device 400 is deployed on a hardware device in the form of a Pod. A Pod includes a plurality of containers, and each container is used to implement one or more units in the CP device 400 .
附图12示出了上述实施例中所涉及的UP设备的一种可能的结构示意图。附图12所示的UP设备500例如实现方法300中UP设备的功能。FIG. 12 shows a possible schematic structural diagram of the UP device involved in the above embodiment. The UP device 500 shown in FIG. 12 , for example, implements the functions of the UP device in the method 300 .
请参考附图12,UP设备500包括接收单元501、处理单元502和发送单元503。UP设备500中的各个单元全部或部分地通过软件、硬件、固件或者其任意组合来实现。UP设备500中的各个单元用于执行上述方法300中UP设备的相应功能。具体地,接收单元501用于支持UP设备500执行S305。处理单元502用于支持UP设备500执行S307。发送单元503用于支 持UP设备500执行S308。Referring to FIG. 12 , the UP device 500 includes a receiving unit 501 , a processing unit 502 and a sending unit 503 . Each unit in the UP device 500 is implemented in whole or in part by software, hardware, firmware, or any combination thereof. Each unit in the UP device 500 is used to perform the corresponding functions of the UP device in the above method 300 . Specifically, the receiving unit 501 is configured to support the UP device 500 to perform S305. The processing unit 502 is used to support the UP device 500 to execute S307. The sending unit 503 is used to support the UP device 500 to perform S308.
在一个示例中,接收单元501、处理单元502或发送单元503还用于支持UP设备500执行本文所描述的技术中UP设备执行的其它过程。例如,接收单元501用于支持UP设备500执行方法300中UP设备执行的其他接收操作,如S313。发送单元503用于支持UP设备500执行方法300中UP设备执行的其他发送操作,如S315。具体执行过程请参考方法300中相应步骤的详细描述,这里不再一一赘述。In one example, the receiving unit 501, the processing unit 502, or the sending unit 503 are also used to support the UP device 500 to perform other processes performed by the UP device in the techniques described herein. For example, the receiving unit 501 is configured to support the UP device 500 to perform other receiving operations performed by the UP device in the method 300, such as S313. The sending unit 503 is configured to support the UP device 500 to perform other sending operations performed by the UP device in the method 300, such as S315. For the specific execution process, please refer to the detailed description of the corresponding steps in the method 300, which will not be repeated here.
本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可选地有另外的划分方式。The division of units in this embodiment of the present application is schematic, and is only a logical function division. In actual implementation, there may be other division methods.
在一个示例中,UP设备500中各个单元集成在一个处理单元中。例如,UP设备500中各个单元集成在同一个芯片上。该芯片包括处理电路和与该处理电路内部连接通信的输入接口以及输出接口。处理单元502通过芯片中的处理电路实现。接收单元501通过芯片中的输入接口实现。发送单元503通过芯片中的输出接口实现。例如,该芯片通过一个或多个现场可编程门阵列(英文全称:field-programmable gate array,英文简称:FPGA)、可编程逻辑器件(英文全称:programmable logic device,英文简称:PLD)、控制器、状态机、门逻辑、分立硬件部件、任何其它适合的电路、或者能够执行本申请通篇所描述的各种功能的电路的任意组合实现。In one example, the various units in the UP device 500 are integrated into one processing unit. For example, each unit in the UP device 500 is integrated on the same chip. The chip includes a processing circuit, an input interface and an output interface that are internally connected and communicated with the processing circuit. The processing unit 502 is implemented by a processing circuit in the chip. The receiving unit 501 is implemented by an input interface in the chip. The sending unit 503 is implemented through an output interface in the chip. For example, the chip uses one or more field programmable gate arrays (full name in English: field-programmable gate array, English abbreviation: FPGA), programmable logic device (full English name: programmable logic device, English abbreviation: PLD), controller , state machines, gate logic, discrete hardware components, any other suitable circuit, or any combination of circuits capable of performing the various functions described throughout this application.
在另一个示例中,UP设备500各个单元单独物理存在。在另一个示例中,UP设备500一部分单元单独物理存在,另一部分单元集成在一个单元中。例如,在一个示例中,处理单元502和发送单元503是同一个单元。在另一个示例中,处理单元502和发送单元503是不同的单元。在一个示例中,不同单元的集成采用硬件的形式实现,即,不同单元对应于同一个硬件。又如,不同单元的集成采用软件单元的形式实现。In another example, each unit of the UP device 500 physically exists separately. In another example, some units of the UP device 500 are physically separate and some units are integrated into one unit. For example, in one example, the processing unit 502 and the sending unit 503 are the same unit. In another example, the processing unit 502 and the sending unit 503 are different units. In one example, the integration of the different units is implemented in the form of hardware, that is, the different units correspond to the same hardware. For another example, the integration of different units is implemented in the form of software units.
在UP设备500中通过硬件实现的情况下,在一个示例中,UP设备500中处理单元502通过设备700中的处理器701或者处理器705中的至少一项实现。UP设备500中接收单元501、发送单元503例如通过设备700中的通信接口704实现。在另一个示例中,UP设备500中处理单元502通过设备600中的中央处理器611、接口板603上的中央处理器631、网络处理器632、接口板640上的中央处理器641或者网络处理器642中的至少一项实现。UP设备500中接收单元501、发送单元503通过设备600中的物理接口卡633或者物理接口卡643中的至少一项实现。In the case of hardware implementation in the UP device 500 , in one example, the processing unit 502 in the UP device 500 is implemented by at least one of the processor 701 or the processor 705 in the device 700 . The receiving unit 501 and the sending unit 503 in the UP device 500 are implemented, for example, by the communication interface 704 in the device 700 . In another example, the processing unit 502 in the UP device 500 is processed by the central processing unit 611 in the device 600, the central processing unit 631 on the interface board 603, the network processor 632, the central processing unit 641 on the interface board 640, or the network processing unit at least one of the implementations of the device 642 . The receiving unit 501 and the sending unit 503 in the UP device 500 are implemented by at least one of the physical interface card 633 or the physical interface card 643 in the device 600 .
在UP设备500中通过软件实现的情况下,例如,UP设备500中各个单元为设备700中的处理器701或者处理器705读取存储器703中存储的程序代码后生成的软件,又如,UP设备500中各个单元为设备600中的中央处理器611、接口板603上的中央处理器631、网络处理器632、接口板640上的中央处理器641或者网络处理器642读取存储器612中存储的程序代码后生成的软件。例如,UP设备500为虚拟化设备。虚拟化设备包括而不限于虚拟机、容器、Pod中的至少一种。在一个示例中,UP设备500以虚拟机的形式,部署在硬件设备(如物理服务器)上。例如,基于通用的物理服务器结合网络功能虚拟化(Network Functions Virtualization,NFV)技术来实现UP设备500。采用虚拟机的方式实现时,UP设备500例如为虚拟主机、虚拟路由器或虚拟交换机。本领域技术人员通过阅读本申请即可结合NFV技术在通用物理服务器上虚拟出UP设备500。在另一个示例中,UP设备500以容器(例如 docker容器)的形式,部署在硬件设备上。例如,UP设备500执行上述方法实施例的流程被封装在镜像文件中,硬件设备通过运行镜像文件来创建UP设备500。在另一个示例中,UP设备500以Pod的形式,部署在硬件设备上。Pod包括多个容器,每个容器用于实现UP设备500中的一个或多个单元。In the case of software implementation in the UP device 500, for example, each unit in the UP device 500 is software generated by the processor 701 or the processor 705 in the device 700 after reading the program code stored in the memory 703, or, for example, the UP Each unit in the device 500 is the central processing unit 611 in the device 600, the central processing unit 631 on the interface board 603, the network processor 632, the central processing unit 641 on the interface board 640, or the network processor 642 reads the storage in the memory 612. The software generated after the program code. For example, the UP device 500 is a virtualized device. The virtualization device includes, but is not limited to, at least one of a virtual machine, a container, and a Pod. In one example, the UP device 500 is deployed on a hardware device (eg, a physical server) in the form of a virtual machine. For example, the UP device 500 is implemented based on a general physical server combined with a Network Functions Virtualization (NFV) technology. When implemented by a virtual machine, the UP device 500 is, for example, a virtual host, a virtual router or a virtual switch. Those skilled in the art can virtualize the UP device 500 on a general physical server in combination with the NFV technology by reading this application. In another example, the UP device 500 is deployed on a hardware device in the form of a container (eg, a docker container). For example, the process of the UP device 500 executing the above method embodiments is encapsulated in an image file, and the hardware device creates the UP device 500 by running the image file. In another example, the UP device 500 is deployed on a hardware device in the form of a Pod. A Pod includes a plurality of containers, each of which is used to implement one or more units in the UP device 500 .
以上通过CP设备400以及UP设备500,从逻辑功能的角度介绍了如何实现CP设备以及UP设备。以下通过设备600和设备700,从硬件的角度介绍如何实现CP设备或UP设备。附图13所示的设备600或者附图14所示的设备700是对CP设备或UP设备的硬件结构的举例说明。The above describes how to implement the CP device and the UP device from the perspective of logical functions through the CP device 400 and the UP device 500 . The following describes how to implement the CP device or the UP device from the perspective of hardware through the device 600 and the device 700 . The device 600 shown in FIG. 13 or the device 700 shown in FIG. 14 is an example of the hardware structure of the CP device or the UP device.
设备600或者设备700对应于上述方法300中的CP设备或UP设备,设备600或者设备700中的各硬件、模块和上述其他操作和/或功能分别为了实现方法实施例中CP设备或UP设备所实施的各种步骤和方法,关于设备600或者设备700如何防御网络攻击的详细流程,具体细节可参见上述方法300,为了简洁,在此不再赘述。其中,方法300的各步骤通过设备600或者设备700处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块例如位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤,为避免重复,这里不再详细描述。The device 600 or the device 700 corresponds to the CP device or the UP device in the above method 300, and the hardware, modules and the other operations and/or functions in the device 600 or the device 700 are respectively for realizing the CP device or the UP device in the method embodiment. Various steps and methods to be implemented, as for the detailed process of how the device 600 or the device 700 defends against network attacks, for details, see the above-mentioned method 300, which is not repeated here for brevity. Wherein, each step of the method 300 is completed by an integrated logic circuit of hardware in the processor of the device 600 or the device 700 or instructions in the form of software. The steps of the methods disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor. The software modules are located in, for example, random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware, which will not be described in detail here to avoid repetition.
参见附图13,附图13示出了本申请一个示例性实施例提供的设备的硬件结构示意图,设备600例如配置为方法300中的CP设备或UP设备。设备600包括:主控板610和接口板630。Referring to FIG. 13 , FIG. 13 shows a schematic diagram of a hardware structure of a device provided by an exemplary embodiment of the present application. The device 600 is configured as a CP device or a UP device in the method 300 , for example. The device 600 includes: a main control board 610 and an interface board 630 .
主控板也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板610用于对设备600中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板610包括:中央处理器611和存储器612。The main control board is also called a main processing unit (MPU) or a route processor card (route processor card). The main control board 610 is used to control and manage various components in the device 600, including route calculation, device management, Equipment maintenance, protocol processing functions. The main control board 610 includes: a central processing unit 611 and a memory 612 .
接口板630也称为线路接口单元卡(line processing unit,LPU)、线卡(line card)或业务板。接口板630用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(Flexible Ethernet Clients,FlexE Clients)。接口板630包括:中央处理器631、网络处理器632、转发表项存储器634和物理接口卡(physical interface card,PIC)633。The interface board 630 is also referred to as a line processing unit (LPU), a line card or a service board. The interface board 630 is used to provide various service interfaces and realize data packet forwarding. The service interface includes, but is not limited to, an Ethernet interface, a POS (Packet over SONET/SDH) interface, etc. The Ethernet interface is, for example, a flexible Ethernet service interface (Flexible Ethernet Clients, FlexE Clients). The interface board 630 includes: a central processing unit 631 , a network processor 632 , a forwarding table entry storage 634 and a physical interface card (PIC) 633 .
接口板630上的中央处理器631用于对接口板630进行控制管理并与主控板610上的中央处理器611进行通信。The central processing unit 631 on the interface board 630 is used to control and manage the interface board 630 and communicate with the central processing unit 611 on the main control board 610 .
网络处理器632用于实现报文的转发处理。网络处理器632的形态例如是转发芯片。具体而言,网络处理器632用于基于转发表项存储器634保存的转发表转发接收到的报文,如果报文的目的地址为设备600的地址,则将该报文上送至CPU(如中央处理器611)处理;如果报文的目的地址不是设备600的地址,则根据该目的地址从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。其中,上行报文的处理包括:报文入接口的处理,转发表查找;下行报文的处理:转发表查找等等。The network processor 632 is used to implement packet forwarding processing. The form of the network processor 632 is, for example, a forwarding chip. Specifically, the network processor 632 is configured to forward the received message based on the forwarding table stored in the forwarding table entry memory 634. If the destination address of the message is the address of the device 600, the message is sent to the CPU (eg The central processing unit 611) processes; if the destination address of the message is not the address of the device 600, the next hop and outgoing interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the destination The outbound interface corresponding to the address. Wherein, the processing of the uplink packet includes: processing the incoming interface of the packet, and searching the forwarding table; processing of the downlink packet: searching the forwarding table, and so on.
物理接口卡633用于实现物理层的对接功能,原始的流量由此进入接口板630,以及处 理后的报文从该物理接口卡633发出。物理接口卡633也称为子卡,可安装在接口板630上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器632处理。在一个示例中,中央处理器也可执行网络处理器632的功能,比如基于通用CPU实现软件转发,从而物理接口卡633中不需要网络处理器632。The physical interface card 633 is used to realize the docking function of the physical layer, the original traffic enters the interface board 630 from this, and the processed packets are sent from the physical interface card 633. The physical interface card 633 is also called a daughter card, which can be installed on the interface board 630 and is responsible for converting the photoelectric signal into a message, and after checking the validity of the message, the message is forwarded to the network processor 632 for processing. In one example, the central processing unit may also perform the functions of the network processor 632 , such as implementing software forwarding based on a general-purpose CPU, so that the network processor 632 is not required in the physical interface card 633 .
可选地,设备600包括多个接口板,例如设备600还包括接口板640,接口板640包括:中央处理器641、网络处理器642、转发表项存储器644和物理接口卡643。Optionally, the device 600 includes multiple interface boards, for example, the device 600 further includes an interface board 640 , and the interface board 640 includes a central processing unit 641 , a network processor 642 , a forwarding table entry storage 644 and a physical interface card 643 .
可选地,设备600还包括交换网板620。交换网板620也例如称为交换网板单元(switch fabric unit,SFU)。在网络设备有多个接口板630的情况下,交换网板620用于完成各接口板之间的数据交换。例如,接口板630和接口板640之间例如通过交换网板620通信。Optionally, the device 600 further includes a switch fabric board 620 . The switch fabric 620 is also called, for example, a switch fabric unit (switch fabric unit, SFU). In the case that the network device has multiple interface boards 630, the switching network board 620 is used to complete data exchange between the interface boards. For example, the interface board 630 and the interface board 640 communicate through, for example, the switch fabric board 620 .
主控板610和接口板630耦合。例如。主控板610、接口板630和接口板640,以及交换网板620之间通过系统总线与系统背板相连实现互通。在一种可能的实现方式中,主控板610和接口板630之间建立进程间通信协议(inter-process communication,IPC)通道,主控板610和接口板630之间通过IPC通道进行通信。The main control board 610 and the interface board 630 are coupled. E.g. The main control board 610 , the interface board 630 , the interface board 640 , and the switch fabric board 620 are connected to the system backplane through a system bus to achieve intercommunication. In a possible implementation manner, an inter-process communication (IPC) channel is established between the main control board 610 and the interface board 630, and the main control board 610 and the interface board 630 communicate through the IPC channel.
在逻辑上,设备600包括控制面和转发面,控制面包括主控板610和中央处理器631,转发面包括执行转发的各个组件,比如转发表项存储器634、物理接口卡633和网络处理器632。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器632基于控制面下发的转发表对物理接口卡633收到的报文查表转发。控制面下发的转发表例如保存在转发表项存储器634中。在有些实施例中,控制面和转发面例如完全分离,不在同一设备上。Logically, the device 600 includes a control plane and a forwarding plane, the control plane includes the main control board 610 and the central processing unit 631, and the forwarding plane includes various components that perform forwarding, such as the forwarding entry memory 634, the physical interface card 633, and the network processor 632. The control plane performs functions such as routers, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining device status. The control plane delivers the generated forwarding tables to the forwarding plane. On the forwarding plane, the network processor 632 is based on the control plane The delivered forwarding table is forwarded to the packet received by the physical interface card 633 by looking up the table. The forwarding table issued by the control plane is stored in the forwarding table entry storage 634, for example. In some embodiments, the control plane and the forwarding plane are, for example, completely separate and not on the same device.
应理解,本申请实施例中接口板640上的操作与接口板630的操作一致,为了简洁,不再赘述。应理解,本实施例的设备600可对应于上述各个方法实施例中的CP设备或UP设备,该设备600中的主控板610、接口板630和/或640例如实现上述各个方法实施例中的CP设备或UP设备所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。It should be understood that the operations on the interface board 640 in the embodiments of the present application are the same as the operations on the interface board 630, and for brevity, details are not repeated here. It should be understood that the device 600 in this embodiment may correspond to the CP device or the UP device in the above method embodiments, and the main control board 610, the interface board 630 and/or 640 in the device 600, for example, implement the above method embodiments For the sake of brevity, the functions possessed by the CP device or the UP device and/or various steps implemented are not repeated here.
值得说明的是,主控板可能有一块或多块,有多块的时候例如包括主用主控板和备用主控板。接口板可能有一块或多块,网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的设备。可选地,网络设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。It is worth noting that there may be one or more main control boards, and when there are multiple main control boards, for example, the main control board and the backup main control board are included. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There can also be one or more physical interface cards on the interface board. There may be no switch fabric boards, or there may be one or more boards. When there are multiple boards, load sharing and redundancy backup can be implemented together. Under the centralized forwarding architecture, the network device does not need to switch the network board, and the interface board is responsible for the processing function of the service data of the entire system. Under the distributed forwarding architecture, a network device may have at least one switching network board, and the switching network board realizes data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those in a centralized architecture. Optionally, the form of the network device can also be that there is only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on this board. The central processing unit on the board can be combined into a central processing unit on this board to perform the functions of the two superimposed, the data exchange and processing capacity of this form of equipment is low (for example, low-end switches or routers and other networks. equipment). The specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
参见附图14,附图14示出了本申请一个示例性实施例提供的设备700的结构示意图,该设备700例如配置为方法300中的CP设备或UP设备。该设备700可以是主机、服务器或个人计算机等。该设备700可以由一般性的总线体系结构来实现。Referring to FIG. 14, FIG. 14 shows a schematic structural diagram of a device 700 provided by an exemplary embodiment of the present application, where the device 700 is configured as a CP device or a UP device in the method 300, for example. The device 700 may be a host computer, a server or a personal computer or the like. The device 700 may be implemented by a general bus architecture.
设备700包括至少一个处理器701、通信总线702、存储器703以及至少一个通信接口704。 Device 700 includes at least one processor 701 , communication bus 702 , memory 703 , and at least one communication interface 704 .
处理器701例如是通用中央处理器(central processing unit,CPU)、网络处理器(network processer,NP)、图形处理器(Graphics Processing Unit,GPU)、神经网络处理器(neural-network processing units,NPU)、数据处理单元(Data Processing Unit,DPU)、微处理器或者一个或多个用于实现本申请方案的集成电路。例如,处理器701包括专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。PLD例如是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。The processor 701 is, for example, a general-purpose central processing unit (central processing unit, CPU), a network processor (network processor, NP), a graphics processor (Graphics Processing Unit, GPU), a neural-network processing unit (neural-network processing units, NPU) ), a data processing unit (Data Processing Unit, DPU), a microprocessor or one or more integrated circuits for implementing the solution of the present application. For example, the processor 701 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
通信总线702用于在上述组件之间传送信息。通信总线702可以分为地址总线、数据总线、控制总线等。为便于表示,附图14中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus 702 is used to transfer information between the aforementioned components. The communication bus 702 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in FIG. 14, but it does not mean that there is only one bus or one type of bus.
存储器703例如是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,又如是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,又如是电可擦可编程只读存储器(electrically erasable programmable read-only Memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器703例如是独立存在,并通过通信总线702与处理器701相连接。存储器703也可以和处理器701集成在一起。The memory 703 is, for example, a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (random access memory, RAM) or a memory device that can store information and instructions. Other types of dynamic storage devices, such as electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disks storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of Any other medium accessed by a computer, but not limited to this. The memory 703 exists independently, for example, and is connected to the processor 701 through the communication bus 702 . The memory 703 may also be integrated with the processor 701 .
通信接口704使用任何收发器一类的装置,用于与其它设备或通信网络通信。通信接口704包括有线通信接口,还可以包括无线通信接口。其中,有线通信接口例如可以为以太网接口。以太网接口可以是光接口,电接口或其组合。无线通信接口可以为无线局域网(wireless local area networks,WLAN)接口,蜂窝网络通信接口或其组合等。 Communication interface 704 uses any transceiver-like device for communicating with other devices or a communication network. The communication interface 704 includes a wired communication interface and may also include a wireless communication interface. Wherein, the wired communication interface may be, for example, an Ethernet interface. The Ethernet interface can be an optical interface, an electrical interface or a combination thereof. The wireless communication interface may be a wireless local area network (wireless local area networks, WLAN) interface, a cellular network communication interface or a combination thereof, and the like.
在具体实现中,作为一种实施例,处理器701可以包括一个或多个CPU,如附图14中所示的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 701 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 14 .
在具体实现中,作为一种实施例,设备700可以包括多个处理器,如附图14中所示的处理器701和处理器705。这些处理器中的每一个可以是一个单核处理器(single-CPU),也可以是一个多核处理器(multi-CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the device 700 may include multiple processors, such as the processor 701 and the processor 705 shown in FIG. 14 . Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
在具体实现中,作为一种实施例,设备700还可以包括输出设备和输入设备。输出设备和处理器701通信,可以以多种方式来显示信息。例如,输出设备可以是液晶显示器(liquid crystal display,LCD)、发光二级管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备和处理器701通信,可以以多种方式接收用户的输入。例如,输入设备可以是鼠标、键盘、触摸屏设备或传感设备等。In a specific implementation, as an embodiment, the device 700 may further include an output device and an input device. The output device communicates with the processor 701 and can display information in a variety of ways. For example, the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, a projector, or the like. The input device communicates with the processor 701 and can receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensor device, or the like.
在一个示例中,存储器703用于存储执行本申请方案的程序代码710,处理器701可以 执行存储器703中存储的程序代码710。也即是,设备700可以通过处理器701以及存储器703中的程序代码710,来实现方法实施例提供的网络攻击的防御方法。In one example, the memory 703 is used to store the program code 710 for executing the solution of the present application, and the processor 701 can execute the program code 710 stored in the memory 703. That is, the device 700 can implement the network attack defense method provided by the method embodiment through the processor 701 and the program code 710 in the memory 703 .
本申请实施例的设备700可对应于上述各个方法实施例中的CP设备或UP设备,并且,该设备700中的处理器701、通信接口704等可以实现上述各个方法实施例中的CP设备或UP设备所具有的功能和/或所实施的各种步骤和方法。为了简洁,在此不再赘述。The device 700 in this embodiment of the present application may correspond to the CP device or the UP device in the foregoing method embodiments, and the processor 701, the communication interface 704, etc. in the device 700 may implement the CP device or the UP device in the foregoing method embodiments. The functions and/or the various steps and methods implemented by the UP device. For brevity, details are not repeated here.
参见附图15,本申请实施例提供了一种通信系统800,系统800包括:CP设备801和UP设备802。可选的,CP设备801为如附图11所示的CP设备400或附图14所示的设备600或附图15所示的设备700,UP设备802为如附图12的UP设备500或附图14所示的设备600或附图15所示的设备700。Referring to FIG. 15 , an embodiment of the present application provides a communication system 800 . The system 800 includes: a CP device 801 and a UP device 802 . Optionally, the CP device 801 is the CP device 400 shown in FIG. 11 , the device 600 shown in FIG. 14 , or the device 700 shown in FIG. 15 , and the UP device 802 is the UP device 500 shown in FIG. 12 or The apparatus 600 shown in FIG. 14 or the apparatus 700 shown in FIG. 15 .
在一个示例中,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。CP设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该CP设备执行上述方法300中CP设备一侧的相关步骤。In one example, a computer program product is provided that includes computer instructions stored in a computer-readable storage medium. The processor of the CP device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the CP device performs the relevant steps on the CP device side in the above method 300 .
在一个示例中,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。UP设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该UP设备执行上述方法300中UP设备一侧的相关步骤。In one example, a computer program product is provided that includes computer instructions stored in a computer-readable storage medium. The processor of the UP device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the UP device performs the relevant steps on the UP device side in the above method 300 .
本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和单元,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that, in combination with the method steps and units described in the embodiments disclosed herein, they can be implemented in electronic hardware, computer software, or a combination of the two. Interchangeability, the steps and components of the various embodiments have been generally described in terms of functions in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Persons of ordinary skill in the art may use different methods of implementing the described functionality for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参见前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the above-described systems, devices and units, reference may be made to the corresponding processes in the foregoing method embodiments, which are not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present application.
另外,在本申请各个实施例中的各单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采 用硬件的形式实现,也可以采用软件单元的形式实现。In addition, each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software units.
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例中方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application are essentially or part of contributions to the prior art, or all or part of the technical solutions can be embodied in the form of software products, and the computer software products are stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .
本申请中术语“第一”、“第二”等字样用于对作用和功能基本相同的相同项或相似项进行区分,应理解,“第一”、“第二”之间不具有逻辑或时序上的依赖关系,也不对数量和执行顺序进行限定。还应理解,尽管以下描述使用术语第一、第二等来描述各种元素,但这些元素不应受术语的限制。这些术语只是用于将一元素与另一元素区别分开。例如,在不脱离各种示例的范围的情况下,第一报文可以被称为第二报文,并且类似地,第二报文可以被称为第一报文。第一报文和第二报文都可以是报文,并且在某些情况下,可以是单独且不同的报文。In this application, the terms "first", "second" and other words are used to distinguish the same or similar items that have basically the same function and function. It should be understood that there is no logical OR between "first" and "second". Timing dependencies, and do not limit the number and execution order. It will also be understood that, although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, a first message may be referred to as a second message, and, similarly, a second message may be referred to as a first message, without departing from the scope of the various examples. Both the first message and the second message may be messages, and in some cases, may be separate and distinct messages.
本申请中术语“至少一个”的含义是指一个或多个,本申请中术语“多个”的含义是指两个或两个以上,例如,多个报文是指两个或两个以上的报文。本文中术语“系统”和“网络”经常可互换使用。The meaning of the term "at least one" in this application refers to one or more, and the meaning of the term "plurality" in this application refers to two or more, for example, a plurality of messages refers to two or more 's message. The terms "system" and "network" are often used interchangeably herein.
还应理解,术语“如果”可被解释为意指“当...时”(“when”或“upon”)或“响应于确定”或“响应于检测到”。类似地,根据上下文,短语“如果确定...”或“如果检测到[所陈述的条件或事件]”可被解释为意指“在确定...时”或“响应于确定...”或“在检测到[所陈述的条件或事件]时”或“响应于检测到[所陈述的条件或事件]”。It should also be understood that the term "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, depending on the context, the phrases "if it is determined..." or "if a [statement or event] is detected" can be interpreted to mean "when determining..." or "in response to determining... ” or “on detection of [recited condition or event]” or “in response to detection of [recited condition or event]”.
以上描述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above descriptions are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications within the technical scope disclosed in the present application. or replacement, these modifications or replacements should be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机程序指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例中的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机程序指令可以从一个网站站点、计算机、服务器或数据中心通过有线或无线方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DVD)、或者半导体介质(例如固态硬盘)等。The computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer program instructions may be transmitted from a website site, computer, server or data center via Transmission by wire or wireless to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, digital video discs (DVDs), or semiconductor media (eg, solid state drives), and the like.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成, 也可以通过程序来指令相关的硬件完成,该程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium can be read-only memory, magnetic disk or optical disk, etc.
以上,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Above, the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the above-mentioned embodiments, those of ordinary skill in the art should understand that: it can still be used for the above-mentioned implementations The technical solutions described in the examples are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims (24)

  1. 一种网络攻击的防御方法,其特征在于,应用于控制面CP和用户面UP分离的通信系统中的CP设备,所述通信系统包括所述CP设备以及UP设备,所述方法包括:A method for defending a network attack, characterized in that it is applied to a CP device in a communication system in which a control plane CP and a user plane UP are separated, the communication system including the CP device and the UP device, and the method includes:
    响应于拨号报文的接收速率满足异常条件,所述CP设备生成第一控制消息,所述第一控制消息用于指示所述UP设备在向所述CP设备发送拨号报文时携带水印;In response to the reception rate of the dial-up message meeting the abnormal condition, the CP device generates a first control message, and the first control message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device;
    所述CP设备向所述UP设备发送所述第一控制消息;sending, by the CP device, the first control message to the UP device;
    所述CP设备根据所述水印,在报文流中识别攻击报文;The CP device identifies the attack packet in the packet flow according to the watermark;
    所述CP设备丢弃所述攻击报文。The CP device discards the attack packet.
  2. 根据权利要求1所述的方法,其特征在于,所述水印包括第一虚拟扩展局域网网络标识符VNI,所述报文流包括第一报文,所述CP设备根据所述水印,在报文流中识别攻击报文,包括:The method according to claim 1, wherein the watermark includes a first virtual extended local area network identifier (VNI), the packet flow includes a first packet, and the CP device, according to the watermark, records a packet in the packet. Identify attack packets in the flow, including:
    所述CP设备根据所述第一报文包括所述第一VNI确定所述第一报文为非攻击报文。The CP device determines that the first packet is a non-attack packet according to the first packet including the first VNI.
  3. 根据权利要求1所述的方法,其特征在于,所述水印包括第一随机数,所述报文流包括第二报文,所述CP设备根据所述水印,在报文流中识别攻击报文,包括:The method according to claim 1, wherein the watermark includes a first random number, the packet stream includes a second packet, and the CP device identifies the attack packet in the packet stream according to the watermark text, including:
    所述CP设备根据所述第二报文包括所述第一随机数确定所述第二报文为非攻击报文。The CP device determines that the second packet is a non-attack packet according to the second packet including the first random number.
  4. 根据权利要求1所述的方法,其特征在于,所述水印包括第一时间戳,所述第一时间戳用于指示所述CP设备与所述UP设备之间同步的时间点,所述报文流包括第三报文,所述CP设备根据所述水印,在报文流中识别攻击报文,包括:The method according to claim 1, wherein the watermark comprises a first time stamp, and the first time stamp is used to indicate a time point of synchronization between the CP device and the UP device, and the report The packet stream includes a third packet, and the CP device identifies the attack packet in the packet stream according to the watermark, including:
    所述CP设备根据所述第三报文包括所述第一时间戳确定所述第三报文为非攻击报文。The CP device determines that the third packet is a non-attack packet according to the third packet including the first timestamp.
  5. 根据权利要求1所述的方法,其特征在于,所述水印包括第一消息认证码,所述报文流包括第四报文,所述CP设备根据所述水印,在报文流中识别攻击报文,包括:The method according to claim 1, wherein the watermark includes a first message authentication code, the packet stream includes a fourth packet, and the CP device identifies the attack in the packet stream according to the watermark messages, including:
    所述CP设备根据所述第四报文包括所述第一消息认证码确定所述第四报文为非攻击报文。The CP device determines that the fourth packet is a non-attack packet according to the fourth packet including the first message authentication code.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述第一控制消息包括所述水印;或者,所述第一控制消息包括所述水印对应的水印类型信息;或者,所述第一控制消息包括生成所述水印相关的参数。The method according to any one of claims 1 to 5, wherein the first control message includes the watermark; or, the first control message includes watermark type information corresponding to the watermark; or, The first control message includes parameters related to generating the watermark.
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述第一控制消息为控制与转发分离协议CUSP报文,所述CUSP报文包括水印类型长度值TLV;The method according to any one of claims 1 to 6, wherein the first control message is a control and forwarding separation protocol CUSP message, and the CUSP message includes a watermark type length value TLV;
    其中,所述水印TLV为携带所述水印的TLV;或者,所述水印TLV为携带所述水印对应的水印类型信息的TLV;或者,所述水印TLV为携带生成所述水印相关的参数的TLV。Wherein, the watermark TLV is a TLV that carries the watermark; or, the watermark TLV is a TLV that carries watermark type information corresponding to the watermark; or, the watermark TLV is a TLV that carries parameters related to generating the watermark .
  8. 根据权利要求1至6中任一项所述的方法,其特征在于,所述第一控制消息为包转发控制协议PFCP消息,所述PFCP消息包括水印信息元素IE;The method according to any one of claims 1 to 6, wherein the first control message is a packet forwarding control protocol PFCP message, and the PFCP message includes a watermark information element IE;
    其中,所述水印IE为携带所述水印的IE;或者,所述水印IE为携带所述水印对应的水印类型信息的IE;或者,所述水印IE为携带生成所述水印相关的参数的IE。Wherein, the watermark IE is an IE that carries the watermark; or, the watermark IE is an IE that carries watermark type information corresponding to the watermark; or, the watermark IE is an IE that carries parameters related to generating the watermark .
  9. 根据权利要求8所述的方法,其特征在于,所述第一控制消息为PFCP节点消息;或者,所述第一控制消息为PFCP会话消息。The method according to claim 8, wherein the first control message is a PFCP node message; or, the first control message is a PFCP session message.
  10. 根据权利要求1至9任一项所述的方法,其特征在于,所述报文流包括第五报文,所述CP设备根据所述水印,在报文流中识别攻击报文,包括:The method according to any one of claims 1 to 9, wherein the packet stream includes a fifth packet, and the CP device identifies the attack packet in the packet stream according to the watermark, including:
    所述CP设备根据所述第五报文不包括所述水印确定所述第五报文为攻击报文。The CP device determines that the fifth packet is an attack packet according to the fact that the fifth packet does not include the watermark.
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,所述CP设备向所述UP设备发送所述第一控制消息之后,所述方法还包括:The method according to any one of claims 1 to 10, wherein after the CP device sends the first control message to the UP device, the method further comprises:
    响应于拨号报文的接收速率满足正常条件,所述CP设备生成第二控制消息,所述第二控制消息用于指示所述UP设备在向所述CP设备发送拨号报文时取消携带水印;In response to the reception rate of the dial-up message meeting the normal condition, the CP device generates a second control message, and the second control message is used to instruct the UP device to cancel carrying the watermark when sending the dial-up message to the CP device;
    所述CP设备向所述UP设备发送所述第二控制消息。The CP device sends the second control message to the UP device.
  12. 根据权利要求1至11中任一项所述的方法,其特征在于,所述通信系统为宽带网络网关BNG系统或者宽带远程接入服务器BRAS系统。The method according to any one of claims 1 to 11, wherein the communication system is a broadband network gateway BNG system or a broadband remote access server BRAS system.
  13. 一种报文处理方法,其特征在于,应用于控制面CP和用户面UP分离的通信系统中的UP设备,所述通信系统包括CP设备以及所述UP设备,所述方法包括:A packet processing method, characterized in that it is applied to a UP device in a communication system in which a control plane CP and a user plane UP are separated, the communication system including the CP device and the UP device, and the method includes:
    所述UP设备从所述CP设备接收第一控制消息,所述第一控制消息用于指示所述UP设备在向所述CP设备发送拨号报文时携带水印;The UP device receives a first control message from the CP device, where the first control message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device;
    所述UP设备根据所述第一控制消息,在拨号报文中携带所述水印;The UP device carries the watermark in the dial-up message according to the first control message;
    所述UP设备向所述CP设备发送包括所述水印的拨号报文。The UP device sends a dial-up message including the watermark to the CP device.
  14. 根据权利要求13所述的方法,其特征在于,所述UP设备根据所述第一控制消息,在拨号报文中携带所述水印之后,所述方法还包括:The method according to claim 13, wherein after the UP device carries the watermark in the dial-up message according to the first control message, the method further comprises:
    所述UP设备从所述CP设备接收第二控制消息,所述第二控制消息用于指示所述UP设备在向所述CP设备发送拨号报文时取消携带水印;The UP device receives a second control message from the CP device, where the second control message is used to instruct the UP device to cancel carrying a watermark when sending a dial-up message to the CP device;
    所述UP设备根据所述第二控制消息,向所述CP设备发送不包括水印的拨号报文。The UP device sends, according to the second control message, a dial-up message that does not include a watermark to the CP device.
  15. 一种控制面CP设备,其特征在于,所述CP设备位于CP和用户面UP分离的通信系统中,所述通信系统包括所述CP设备以及UP设备,所述CP设备包括:A control plane CP device, characterized in that the CP device is located in a communication system in which the CP and the user plane UP are separated, the communication system includes the CP device and the UP device, and the CP device includes:
    处理单元,用于响应于拨号报文的接收速率满足异常条件,生成第一控制消息,所述第一控制消息用于指示所述UP设备在向所述CP设备发送拨号报文时携带水印;a processing unit, configured to generate a first control message in response to the reception rate of the dial-up message meeting an abnormal condition, where the first control message is used to instruct the UP device to carry a watermark when sending the dial-up message to the CP device;
    发送单元,用于向所述UP设备发送所述第一控制消息;a sending unit, configured to send the first control message to the UP device;
    所述处理单元,还用于根据所述水印,在报文流中识别攻击报文;The processing unit is further configured to identify attack packets in the packet flow according to the watermark;
    所述处理单元,还用于丢弃所述攻击报文。The processing unit is further configured to discard the attack packet.
  16. 根据权利要求15所述的CP设备,其特征在于,所述水印包括第一虚拟扩展局域网网络标识符VNI,所述报文流包括第一报文,所述处理单元,用于根据所述第一报文包括所述第一VNI确定所述第一报文为非攻击报文。The CP device according to claim 15, wherein the watermark includes a first virtual extended local area network identifier VNI, the packet flow includes a first packet, and the processing unit is configured to A packet includes that the first VNI determines that the first packet is a non-attack packet.
  17. 根据权利要求15所述的CP设备,其特征在于,所述水印包括第一随机数,所述报文流包括第二报文,所述处理单元,用于根据所述第二报文包括所述第一随机数确定所述第二报文为非攻击报文。The CP device according to claim 15, wherein the watermark includes a first random number, the packet stream includes a second packet, and the processing unit is configured to include the second packet according to the second packet. The first random number determines that the second packet is a non-attack packet.
  18. 根据权利要求15所述的CP设备,其特征在于,所述水印包括第一时间戳,所述第一时间戳用于指示所述CP设备与所述UP设备之间同步的时间点,所述报文流包括第三报文,所述处理单元,用于根据所述第三报文包括所述第一时间戳确定所述第三报文为非攻击报文。The CP device according to claim 15, wherein the watermark comprises a first time stamp, and the first time stamp is used to indicate a time point of synchronization between the CP device and the UP device, and the The packet flow includes a third packet, and the processing unit is configured to determine that the third packet is a non-attack packet according to the third packet including the first timestamp.
  19. 根据权利要求15所述的CP设备,其特征在于,所述水印包括第一消息认证码,所述报文流包括第四报文,所述处理单元,用于根据所述第四报文包括所述第一消息认证码确定所述第四报文为非攻击报文。The CP device according to claim 15, wherein the watermark includes a first message authentication code, the packet stream includes a fourth packet, and the processing unit is configured to include, according to the fourth packet, a The first message authentication code determines that the fourth message is a non-attack message.
  20. 根据权利要求15至19中任一项所述的CP设备,其特征在于,所述处理单元,还用于响应于拨号报文的接收速率满足正常条件,生成第二控制消息,所述第二控制消息用于指示所述UP设备在向所述CP设备发送拨号报文时取消携带水印;The CP device according to any one of claims 15 to 19, wherein the processing unit is further configured to generate a second control message in response to the reception rate of the dial-up message satisfying a normal condition, the second control message The control message is used to instruct the UP device to cancel carrying a watermark when sending a dial-up message to the CP device;
    所述发送单元,还用于向所述UP设备发送所述第二控制消息。The sending unit is further configured to send the second control message to the UP device.
  21. 根据权利要求15至20任一项所述的CP设备,其特征在于,所述报文流包括第五报文,所述处理单元,用于根据所述第五报文不包括所述水印确定所述第五报文为攻击报文。The CP device according to any one of claims 15 to 20, wherein the packet stream includes a fifth packet, and the processing unit is configured to determine according to whether the fifth packet does not include the watermark The fifth packet is an attack packet.
  22. 一种用户面UP设备,其特征在于,所述UP设备位于控制面CP和UP分离的通信系统中,所述通信系统包括CP设备以及所述UP设备,所述UP设备包括:A user plane UP device, characterized in that the UP device is located in a communication system in which a control plane CP and UP are separated, the communication system includes a CP device and the UP device, and the UP device includes:
    接收单元,用于从所述CP设备接收第一控制消息,所述第一控制消息用于指示所述UP设备在向所述CP设备发送拨号报文时携带水印;a receiving unit, configured to receive a first control message from the CP device, where the first control message is used to instruct the UP device to carry a watermark when sending a dial-up message to the CP device;
    处理单元,用于根据所述第一控制消息,在拨号报文中携带水印;a processing unit, configured to carry a watermark in the dial-up message according to the first control message;
    发送单元,用于向所述CP设备发送包括所述水印的拨号报文。A sending unit, configured to send a dial-up message including the watermark to the CP device.
  23. 根据权利要求22所述的UP设备,其特征在于,所述接收单元,还用于从所述CP设备接收第二控制消息,所述第二控制消息用于指示所述UP设备在向所述CP设备发送拨号报文时取消携带水印;The UP device according to claim 22, wherein the receiving unit is further configured to receive a second control message from the CP device, wherein the second control message is used to indicate that the UP device is sending a message to the CP device. When the CP device sends a dial-up message, cancel the carrying of the watermark;
    所述发送单元,还用于根据所述第二控制消息,向所述CP设备发送不包括水印的拨号报文。The sending unit is further configured to send a dial-up message that does not include a watermark to the CP device according to the second control message.
  24. 一种控制面CP和用户面UP分离的通信系统,其特征在于,所述系统包括包括如权利要求15至21中任一项所述的CP设备以及如权利要求22至23中任一项所述的UP设备。A communication system in which a control plane CP and a user plane UP are separated, wherein the system includes the CP device as claimed in any one of claims 15 to 21 and the device as claimed in any one of claims 22 to 23 the UP device described above.
PCT/CN2021/099503 2020-08-11 2021-06-10 Network attack defense method, and cp device and up device WO2022033157A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010803044.3A CN114079572A (en) 2020-08-11 2020-08-11 Network attack defense method, CP device and UP device
CN202010803044.3 2020-08-11

Publications (1)

Publication Number Publication Date
WO2022033157A1 true WO2022033157A1 (en) 2022-02-17

Family

ID=80246909

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/099503 WO2022033157A1 (en) 2020-08-11 2021-06-10 Network attack defense method, and cp device and up device

Country Status (2)

Country Link
CN (1) CN114079572A (en)
WO (1) WO2022033157A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108270690A (en) * 2016-12-30 2018-07-10 北京华为数字技术有限公司 The method and apparatus for controlling message flow
CN109005175A (en) * 2018-08-07 2018-12-14 腾讯科技(深圳)有限公司 Network protection method, apparatus, server and storage medium
US20190215263A1 (en) * 2016-05-09 2019-07-11 Qualcomm Incorporated In-flow packet prioritization and data-dependent flexible qos policy
CN110099027A (en) * 2018-01-29 2019-08-06 腾讯科技(深圳)有限公司 Transmission method and device, storage medium, the electronic device of service message

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101965009A (en) * 2009-07-22 2011-02-02 中兴通讯股份有限公司 Method and system for processing message exception of network wireless link control layer
CN109698760B (en) * 2017-10-23 2021-05-04 华为技术有限公司 Traffic processing method, user plane device and terminal equipment
WO2019088801A1 (en) * 2017-11-06 2019-05-09 엘지전자 주식회사 Method for protecting user data in wireless communication system and apparatus therefor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190215263A1 (en) * 2016-05-09 2019-07-11 Qualcomm Incorporated In-flow packet prioritization and data-dependent flexible qos policy
CN108270690A (en) * 2016-12-30 2018-07-10 北京华为数字技术有限公司 The method and apparatus for controlling message flow
CN110099027A (en) * 2018-01-29 2019-08-06 腾讯科技(深圳)有限公司 Transmission method and device, storage medium, the electronic device of service message
CN109005175A (en) * 2018-08-07 2018-12-14 腾讯科技(深圳)有限公司 Network protection method, apparatus, server and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "3rd Generation Partnership Project; Technical Specification Group Services and System Aspects; Study on evolution of Cellular Internet of Things (CIoT) security for the 5G System; (Release 16)", 3GPP STANDARD; 3GPP TR 33.861, no. V16.0.0, 8 July 2020 (2020-07-08), pages 1 - 72, XP051924306 *

Also Published As

Publication number Publication date
CN114079572A (en) 2022-02-22

Similar Documents

Publication Publication Date Title
US11777783B2 (en) Network slicing with smart contracts
WO2021207922A1 (en) Packet transmission method, device, and system
RU2269873C2 (en) Wireless initialization device
CN109362085B (en) Implementing EPC in cloud computer through OPENFLOW data plane
CN106878253B (en) MAC (L2) layer authentication, security and policy control
WO2022057753A1 (en) Message processing method and related device
EP2725829A2 (en) Apparatuses for a common control protocol for wired and wireless nodes
WO2019033920A1 (en) Method and device enabling network side to identify and control remote user equipment
US10581735B2 (en) Packet processing method and apparatus
BR112014001861B1 (en) Method for implementing a packet radio general service tunnel protocol, and cloud computing system for managing the implementation of a packet radio general service tunneling protocol
WO2013144747A1 (en) Implementing epc in a cloud computer with openflow data plane
CN106464583A (en) Implementing 3g packet core in cloud computer with openflow data and control planes
US20140244733A1 (en) Method, Apparatus, Device and System for Generating DHCP Snooping Binding Table
US20230139272A1 (en) Packet Processing Method, UP Device, and CP Device
EP4152882A1 (en) Session establishment method, apparatus and system and computer storage medium
US20220141027A1 (en) Automatic distribution of dynamic host configuration protocol (dhcp) keys via link layer discovery protocol (lldp)
WO2015184840A1 (en) Method, apparatus and system for acquiring response message, and method, apparatus and system for routing response message
ES2857723T3 (en) Quality of Service (QoS) support for touch traffic
US20230122810A1 (en) Communication Method, UP Device, and CP Device
WO2022033157A1 (en) Network attack defense method, and cp device and up device
EP4262176A1 (en) Standby access gateway function signaling for a dynamic host configuration protocol
EP4391457A1 (en) Communication method and apparatus
WO2023036135A1 (en) Message transceiving method, information acquisition and transceiving method, and related device
US20240224039A1 (en) Communication method and apparatus
WO2023221742A1 (en) Route selection method, network device, and system

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21855213

Country of ref document: EP

Kind code of ref document: A1