WO2022057647A1 - Packet processing method, system, and device - Google Patents

Packet processing method, system, and device Download PDF

Info

Publication number
WO2022057647A1
WO2022057647A1 PCT/CN2021/116602 CN2021116602W WO2022057647A1 WO 2022057647 A1 WO2022057647 A1 WO 2022057647A1 CN 2021116602 W CN2021116602 W CN 2021116602W WO 2022057647 A1 WO2022057647 A1 WO 2022057647A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
port
attack
packets
forwarding priority
Prior art date
Application number
PCT/CN2021/116602
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 WO2022057647A1 publication Critical patent/WO2022057647A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/36Flow control; Congestion control by determining packet size, e.g. maximum transfer unit [MTU]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a message processing method, system and device.
  • the network device usually forwards the to-be-forwarded packets in an orderly manner according to the forwarding priority of the to-be-forwarded packets.
  • packets with higher forwarding priorities will be preferentially forwarded by network devices.
  • the forwarding priority corresponding to these packets is usually set to the highest forwarding priority. level to ensure that these packets are effectively processed to ensure the normal operation of network devices.
  • attack packets with the highest forwarding priority will also be preferentially processed. Since the total bandwidth of each network device is limited, once the number of attack packets increases sharply, the total bandwidth of the packets with the highest forwarding priority exceeds the total bandwidth of the network device, and the network device will respond to the highest forwarding priority. Therefore, protocol packets, detection packets of network devices, or more important data packets may be lost, resulting in the failure of network devices to provide normal services.
  • the network device identifies safe packets from the received packets through the security policy template, forwards the safe packets normally, and discards the unrecognized packets. , to achieve defense against attack packets to improve network security.
  • the security policy template since the security policy template is fixed, it cannot effectively defend against changeable attack packets.
  • the embodiments of the present application provide a packet processing method, system, and device.
  • the network device can identify and process the attack packet to ensure that Security packets with the highest forwarding priority are effectively forwarded, making it possible for network devices to provide normal services.
  • an embodiment of the present application provides a method for processing a packet, and the method may include: when a first communication device determines that a packet with the highest forwarding priority transmitted through a first port occupies the bandwidth of the first port When the first condition is satisfied, the characteristic information of the first attack packet included in the packet with the highest forwarding priority transmitted through the first port is acquired, and the characteristic information of the first attack packet is sent to the control management entity.
  • the first condition is a condition configured by the first communication device for the first port and used to determine whether the attack packet processing needs to be performed on the first port.
  • control and management entity can generate a packet processing policy based on the packet characteristics of the received first attack packet, so that the first communication device can compare the characteristics of the first attack packet with the characteristics of the first attack packet based on the packet processing policy.
  • Packet loss and/or rate limiting are performed on packets with matching information to avoid network equipment congestion caused by attacks based on high-priority packets, and ensure that normal packets with the highest forwarding priority can be effectively forwarded, so that the first communication It becomes possible for the device to provide normal services.
  • the control management entity may further generate a packet processing policy based on the feature information of the first attack packet, the first The communication device acquires the packet processing policy, where the packet processing policy is used to process the packet matching the feature information of the first attack packet.
  • the first communication device can obtain the message processing policy through internal data transmission; if the control management entity and the first communication device are two different devices, the first communication device A communication device can obtain a message processing policy through a message, and the message can be a Border Gateway Protocol (English: Border Gateway Protocol, referred to as: BGP) message, Path Computation Element Communication Protocol (English: Path Computation Element Communication Protocol) , referred to as: PCEP) message, telemetry (English: Telemetry) message or Network Configuration Protocol (English: Network Configuration Protocol, referred to as: NETCONF) message any kind of message, for example: the message processing policy can carry The Type Length Value (English: Type Length Value, TLV for short) field extended in the indication message carries the feature information of the first attack message.
  • Border Gateway Protocol English: Border Gateway Protocol, referred to as: BGP
  • Path Computation Element Communication Protocol English: Path Computation Element Communication Protocol
  • PCEP Path Computation Element Communication Protocol
  • telemetry English: Telemetry
  • Network Configuration Protocol
  • control management entity by acquiring the packet processing policy generated by the control management entity, a precondition is provided for subsequent processing of the packet matching the characteristic information of the first attack packet, so that the normal packet with the highest forwarding priority on the network device can be processed.
  • the purpose of efficient forwarding becomes possible. It should be noted that, in the following description, the control management entity and the first communication apparatus belong to two independent network devices as an example for description.
  • the first communication device may process the first packet based on the packet processing policy, where the first packet is A packet whose characteristic information matches the characteristic information of the first attack packet.
  • the first packet is A packet whose characteristic information matches the characteristic information of the first attack packet.
  • the first communication apparatus processing the first packet based on the packet processing policy may include: performing packet loss processing on the first packet based on the packet processing policy.
  • the first communication apparatus processes the first packet based on the packet processing policy, and may also include: performing rate-limiting processing on the first packet based on the packet processing policy.
  • suppression processing such as packet loss or rate limiting on the first packet matching the characteristic information of the first attack packet
  • the attack packet can effectively prevent the attack packet from occupying a large number of bandwidth resources of the normal packet with the highest forwarding priority. Reduce the forwarding delay of normal packets with the highest forwarding priority.
  • the first communication device may also send indication information to the control management entity, where the indication information is used to instruct the control management entity to generate a packet processing policy.
  • the first communication device may carry the indication information and the feature information of the first attack packet in different indication packets and deliver them to the control management entity.
  • the first communication apparatus may carry the indication information and the feature information of the first attack packet in the same indication packet and send it to the control management entity.
  • the indication message can be any one of the following messages: BGP message, PCEP message, Telemetry message or NETCONF message.
  • the indication information and the feature information of the first attack packet may be carried through the extended TLV field in any of the foregoing types of packets.
  • the indication information and the characteristic information of the first attack packet may also be carried through other available fields such as a reserved (English: Reserved) field in any of the foregoing types of packets.
  • the first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  • the first threshold is 70%
  • the bandwidth of the first port is 20 megabytes per second (English: Gb/s)
  • the first communication device obtains the packet with the highest forwarding priority transmitted through the first port as 15Gb/s
  • the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold. For example, if the second threshold is 15 Gb/s, the bandwidth of the first port is 20 Gb/s, and the packet with the highest forwarding priority acquired by the first communication device through the first port is 15 Gb/s, then the first communication The device determines that the size of the message with the highest forwarding priority on the first port is equal to the second threshold of 15 Gb/s, thereby determining that the message with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port to satisfy the first port. condition.
  • the first communication apparatus may poll and detect the bandwidth occupancy status of each port.
  • the first communication device can poll and detect the bandwidth occupancy of the first port, for example, it can be realized by the timer of the traffic management (English: Traffic Management, TM for short) module of the first communication device.
  • the TM module sets the timing of the timer to 1 second, and when the timer reaches 1 second, obtains the size of the packet transmitted through the first port once.
  • the first communication device polls and detects the bandwidth occupancy of the first port, obtains the size of all packets transmitted through the first port, and then determines that all packets transmitted through the first port occupy the first port.
  • the second condition may refer to that the proportion of the bandwidth of the first port occupied by all packets transmitted through the first port is greater than or equal to the third threshold, or the second condition may also mean that all packets transmitted through the first port are greater than or equal to the third threshold. equal to the fourth threshold.
  • the first communication device determines that all the packets transmitted through the first port satisfy the second condition through polling detection, it is determined that there are many packets transmitted through the first port, and there is a risk of congestion, and it is necessary to focus on the more important ones.
  • the bandwidth occupancy of the highest forwarding priority At this time, when it is determined that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies the first condition, it can be considered that the highest forwarding priority transmitted on the first port is the highest bandwidth.
  • attack packets in the packets of forwarding priority that is to say, the above-mentioned polling mechanism and the two judgment conditions, so that the normal packets with the highest forwarding priority transmitted on the first communication device through the first port can be Normal forwarding provides the premise and guarantee.
  • a third condition corresponding to the first condition of the first port is also set.
  • the packet processing process on the second port may include: when the first communication device determines that the bandwidth of the second port occupied by the packet with the highest forwarding priority transmitted through the second port satisfies the third condition, obtaining the The characteristic information of the second attack packet included in the packet with the highest forwarding priority transmitted by the two ports, and the characteristic information of the second attack packet is sent to the control management entity.
  • the third condition may refer to that the ratio of the bandwidth of the second port occupied by the packets with the highest forwarding priority transmitted through the second port is greater than or equal to the fifth threshold; The transmitted packet with the highest forwarding priority is greater than or equal to the sixth threshold. It should be noted that, for the second port, one or more of the foregoing implementation manners can also be used to process the counterfeit attack packet with the highest forwarding priority, and the relevant description will not be repeated.
  • the feature information of the attack packet may refer to the feature information that can identify the attack packet and the attack flow to which the attack packet belongs.
  • the characteristic information of the attack packet may specifically be all or part of the content of the quintuple of the attack packet.
  • the attack packet is an Internet Protocol (English: Internet Protocol, IP for short) packet
  • the The feature information may include one or more of the following information: source IP address, destination IP address, source port number, destination port number or transport layer protocol number; for another example, the attack packet is a multi-protocol label switching (English: Multiprotocol Label Switching, MPLS for short) message
  • the feature information of the attack message may include one or more of the following information: MPLS label, the source media access control of the attack message (English: Media Access Control, Abbreviation: MAC address, destination MAC address, source IP address, and destination IP address.
  • the first communication device may perform the processing method provided in this embodiment of the present application on the packet with the highest forwarding priority in the network scenario transmitted through the first port.
  • the first communication device may run on the Internet Protocol version 4 (English: Internet Protocol version 4, referred to as: IPv4) network, on the Internet Protocol version 6 (English: Internet Protocol version 6, referred to as: IPv6) network, virtual private Network (English: Virtual Private Network, referred to as: VPN) network, Multiprotocol Label Switching (English: Multiprotocol Label Switching, referred to as: MPLS) network, Virtual Extended Local Area Network (English: Virtual Extensible Local Area Network, referred to as: VXLAN) and other network environments middle.
  • IPv4 Internet Protocol version 4, referred to as: IPv4
  • IPv6 Internet Protocol version 6
  • VPN Virtual Private Network
  • MPLS Multiprotocol Label Switching
  • VXLAN Virtual Extended Local Area Network
  • VXLAN Virtual Extensible Local Area Network
  • the first communication device may refer to any network device capable of implementing a message forwarding function, for example, the communication device may be a switch, a router, etc.; or, the first communication device may also be a network device with a message A single board, chip, etc. with the text forwarding function.
  • the TM module may refer to a TM chip in the first communication device or a functional module capable of implementing the TM function.
  • the port of the first communication device may be a physical port of the first communication device or a logical port of the first communication device.
  • an embodiment of the present application further provides a method for processing a packet, the method comprising: the first communication device determines that the packet with the highest forwarding priority transmitted by the first port occupies the bandwidth of the first port and satisfies the first When the conditions are met, the packets with the highest forwarding priority transmitted through the first port are analyzed, and it is determined that the packets transmitted by the first port include attack packets with the highest forwarding priority.
  • the first communication device may also send an alarm signal to the network management, where the alarm signal is used for It is indicated that there are attack packets in the first communication device, so that the network management can perform security defense on the network to prevent the attack packets from causing greater threats to the network.
  • the alarm signal may also carry characteristic information of the attack.
  • the first communication apparatus may further acquire feature information of the attack packet after determining that the packet transmitted by the first port includes the attack packet with the highest forwarding priority.
  • the first communication device may also send the characteristic information of the attack packet to the control management entity, and obtain a packet processing policy generated by the control management entity, where the packet processing policy is used to compare the characteristics of the attack packet with the attack packet.
  • the first communication device can perform packet loss and/or speed limit processing on the first packet based on the packet processing policy, and the first packet is an attack packet.
  • the characteristic information matches the packet.
  • the first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  • the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
  • an embodiment of the present application further provides a method for processing a packet, the method may include: the first communication device determines that the packet with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port and satisfies the first port. Under one condition, obtain the characteristic information of the attack packet in the packet with the highest forwarding priority, and send the characteristic information of the attack packet to the control management entity; at this time, the control management entity can be based on the characteristics of the attack packet The information generates a packet processing policy, where the packet processing policy is used to process the packet matching the characteristic information of the attack packet.
  • the method may further include: the first communication device obtains a packet processing policy generated by the control and management device, so that the first communication device processes the first packet based on the packet processing policy, where the first packet is Packets matching the feature information of attack packets.
  • the method may further include: controlling the management device to send a packet processing policy to the second communication apparatus, so that the second communication apparatus processes the second packet based on the packet processing policy, and the second packet is Packets matching the feature information of attack packets.
  • the first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  • the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
  • an embodiment of the present application further provides a system for processing a message.
  • the system may include at least a first communication device and a control management entity, wherein the first communication device is configured to determine the highest value transmitted through the first port.
  • the control management entity uses According to the packet feature information of the attack packet, a packet processing policy is generated, and the packet processing policy is used to process the packet matching the characteristic information of the attack packet.
  • control and management device is further configured to send the packet processing policy to the first communication apparatus.
  • the first communication device is further configured to process a first packet based on the packet processing policy, where the first packet is a packet matching the feature information of the attack packet.
  • the system may further include a second communication apparatus, which controls a management device, and is further configured to send the packet processing policy to the second communication apparatus. Then, the second communication device is further configured to process a second packet based on the packet processing policy, where the second packet is a packet matching the feature information of the attack packet.
  • the first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  • the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
  • the present application further provides a first communication device, including a transceiver unit and a processing unit.
  • the transceiver unit is configured to perform the transceiver operation in the method provided in the first aspect, any possible implementation manner of the first aspect, the second aspect, or any possible implementation manner of the second aspect, or for performing The transceiving operation of the first communication device in the method provided by the third aspect or any possible implementation manner of the third aspect;
  • the processing unit is configured to execute the first aspect, any possible implementation manner of the first aspect, and the second Other operations other than the transceiving operation in the method provided by the aspect or any possible implementation manner of the second aspect, or for performing the first aspect in the method provided by the third aspect or any possible implementation manner of the third aspect.
  • the transceiver unit is configured to send the feature information of the first attack packet to the control management entity; the processing unit is configured to determine A packet with the highest forwarding priority transmitted by a port occupies the bandwidth of the first port and satisfies the first condition; the processing unit is further configured to acquire the information included in the packet with the highest forwarding priority transmitted through the first port The feature information of the first attack packet.
  • an embodiment of the present application further provides a first communication apparatus, including a first communication interface and a processor.
  • the first communication interface is used to perform the sending operation in the method provided by the first aspect, any possible implementation manner of the first aspect, the second aspect, or any possible implementation manner of the second aspect, or, using the sending operation of the first communication device in performing the method provided by the third aspect or any of the possible implementations of the third aspect;
  • the processor is configured to execute the first aspect or any of the possible implementations of the first aspect , other operations other than the receiving and sending operations in the method provided by the second aspect or any possible implementation manner of the second aspect, or, for performing the above-mentioned third aspect or any one of the possible implementations of the third aspect
  • Other operations other than the receiving and sending operations of the first communication apparatus in the method provided by the implementation manner are implemented.
  • the first communication device may further include a second communication interface, and the second communication interface is used to perform the receiving operation of the aforementioned first communication device.
  • an embodiment of the present application further provides a first communication apparatus, where the first communication apparatus includes a memory and a processor.
  • the memory includes computer-readable instructions; a processor in communication with the memory is configured to execute the computer-readable instructions, so that the first communication device is configured to execute the first aspect and any possible implementation of the first aspect manner, the method provided by the second aspect or any possible implementation manner of the second aspect, or the method implemented by the first communication device for performing the method provided by the third aspect or any possible implementation manner of the third aspect method.
  • embodiments of the present application further provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium runs on a computer, the computer is configured to execute the above first aspect,
  • the method provided by any possible implementation manner of the first aspect, the second aspect or any possible implementation manner of the second aspect, or, for implementing the third aspect or any possible implementation manner of the third aspect.
  • the method is implemented by the first communication device.
  • the embodiments of the present application also provide a computer program product, including a computer program or computer-readable instructions, when the computer program or the computer-readable instructions are run on a computer, the computer is made to execute the above first aspect,
  • the method provided by any possible implementation manner of the first aspect, the second aspect or any possible implementation manner of the second aspect, or, for implementing the third aspect or any possible implementation manner of the third aspect.
  • the method is implemented by the first communication device.
  • an embodiment of the present application further provides a communication system, where the communication system includes the first communication device provided in the fifth aspect, the sixth aspect or the seventh aspect, and the corresponding method in the third aspect.
  • a control management entity (or a control management entity in the system provided by the fourth aspect).
  • the communication device in the foregoing embodiment may be a network device for executing the foregoing method, or may refer to a single board, a line card, a chip, or the like for executing the foregoing method.
  • FIG. 1 is a schematic structural diagram of a network 10 to which this embodiment of the application is applied;
  • FIG. 2 is a schematic flowchart of performing packet processing in the network 10 according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a method 100 for processing a message in an embodiment of the present application
  • FIG. 4 is a schematic flowchart of another packet processing method 200 in an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of another method 300 for processing a message in an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of another method 400 for processing a message in an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a message processing system 700 according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a first communication apparatus 800 according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a first communication apparatus 900 in an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a first communication apparatus 1000 according to an embodiment of the present application.
  • ordinal numbers such as “1”, “2”, “3”, “first”, “second” and “third” are used to distinguish multiple objects, and are not used to limit the order of multiple objects .
  • a and/or B mentioned in this application should be understood to include the following situations: only A, only B, or both A and B are included.
  • each network device After the source network device of the packet carries the priority in the packet, each network device forwards the packet according to the priority carried in the packet. Among them, the more important packets correspond to the higher priority packets, and the network device preferentially forwards the higher priority packets compared to the lower priority packets.
  • the highest priority is usually set for the packets that affect the normal operation of network equipment, such as protocol packets, detection packets of network equipment, and more important data packets, to ensure that these packets are processed Efficient processing.
  • the priority carried in the packet is used to instruct the network device to perform the forwarding processing on the packet, the priority is referred to as the forwarding priority in the embodiment of this application, and the forwarding priority mentioned in this application refers to The priority of the packet indicated by the priority field carried in the packet.
  • the forwarding priority of the packet can be determined by the IP
  • the value of the type of service (English: Type of Service, referred to as: TOS) field in the packet indicates; for another example, when the packet is a Multiprotocol Label Switching (English: Multiprotocol Label Switching, referred to as: MPLS) packet, the packet
  • the forwarding priority of the message may be indicated by the value of the experimental bits (English: Experimental Bits, EXP for short) field in the MPLS message.
  • attack packets that carry the highest forwarding priority will also be prioritized for processing by the network device, occupying the bandwidth of the network device. Since the total bandwidth of each network device is limited, the received attack packets will quickly cause network device congestion. For example, the total bandwidth of the received packets to be forwarded exceeds the total bandwidth of the network device. In this case, even the to-be-processed packets corresponding to the highest forwarding priority will be discarded by the network device, causing the network device to lose the protocol. Packets, detection packets, or more important data packets cause network devices to be attacked by a large number of attack packets, affecting the normal operation of network devices.
  • a security policy template is manually configured on the network device, and the security policy template is used to identify secure packets.
  • the packets are normally forwarded, and the packets that cannot be identified by the security policy template are regarded as attack packets, and the attack packets are discarded.
  • the security policy template is fixed, on the one hand, if the attack packet is forged into a format that can be recognized by the security policy template, the attack packet cannot be effectively defended; on the other hand, the attack packet cannot be effectively defended.
  • the security policy template needs to be modified so that the security policy module can identify the packets corresponding to the new service, otherwise the packets corresponding to the new service will be discarded, and the implementation process is relatively complex.
  • an embodiment of the present application provides a packet processing method.
  • the communication device determines that the packet with the highest forwarding priority transmitted through a certain port occupies the bandwidth of the port and satisfies the condition, that is, when the highest forwarding priority is configured
  • the attack packets of the highest priority have not yet caused congestion on the network device
  • the characteristic information of the attack packets in the packets with the highest forwarding priority is obtained, and the characteristic information of the attack packets is sent to the control management entity.
  • the control management entity can generate a message processing strategy based on the message characteristics of the received attack message, and send the message processing strategy to the communication device. Packets with matching feature information are processed (eg packet loss and/or rate limiting).
  • the security defense mechanism provided by this application can effectively identify and process attack packets, effectively avoid network equipment congestion caused by attacks based on high-priority packets, and ensure that normal packets with the highest forwarding priority can be effectively forwarded , making it possible for the communication device to provide normal services.
  • the network 10 includes a network device 110 , a network device 120 , . . . , a network device 130 , and a control management entity 200 .
  • Each network device includes a traffic management (English: Traffic Management, TM for short) module.
  • the network device 110 includes a TM module 111
  • the network device 120 includes a TM module 121
  • the network device 130 includes a TM module 131 .
  • the TM module is used to manage the traffic in the network device to which it belongs, for example, to count the bandwidth of the packets of each forwarding priority corresponding to each port on the network device.
  • Each network device at least has the function of message forwarding; the control and management entity 200 can perform data interaction with each network device, so as to realize the management and control of the network device.
  • the number of network devices included in the network 10 is not specifically limited in this embodiment of the present application, for example, there may be more than three network devices, that is, in addition to the above-mentioned network device 110 , network device 120 , and network device 130 , other network devices are also included; or, the number of network devices included in the network 10 may also be less than 3.
  • the bandwidth of port 1 is c
  • the processing process of the attack packet may include: S11, the TM module 121 of the network device 120 periodically acquires (for example, once every 1 second) the packet transmitted through the port 1 bandwidth a; S12, the TM module 121 judges whether (a ⁇ c) ⁇ Th1 is satisfied, if so, execute the following S13, otherwise, return to execute S11; S13, the TM module 121 obtains the highest forwarding priority transmitted through port 1 Bandwidth b of the class packet; S14, the TM module 121 judges whether (b ⁇ c) ⁇ Th2 is satisfied, if so, execute the following S15, otherwise, return to execute S11; The quintuple of the attack packet in the packet with the highest forwarding priority (that is, the source Internet Protocol (English: Internet Protocol, IP) address, destination IP address, source port number, destination port number and protocol version number); S16, the network device 120 sends the quintuple of the attack packet to the control management entity 200; S17, the control management entity 200 generates a packet processing policy
  • the attack packets with the highest forwarding priority can be effectively suppressed before the attack packets with the highest forwarding priority cause serious network congestion, so as to avoid a large number of the highest forwarding priority on the network device.
  • Attack packets occupy the bandwidth resources of normal packets, causing normal packets with the highest forwarding priority to be discarded, which affects the normal operation of the network.
  • normal packets with the highest forwarding priority can be reduced. It can be seen that the method provided by the embodiment of the present application makes it possible for the network device to still operate normally when there are attack packets.
  • the communication device in this embodiment of the present application may refer to any network device capable of implementing a message forwarding function.
  • the communication device may be a switch, a router, etc.; or, the communication device may also be an internal network device.
  • the control management entity may be any device or functional entity capable of controlling the communication device, for example, the control management entity may be a network cloud engine (English: Network Cloud Engine, NCE for short), a server or a router with control functions; Alternatively, the control management entity may also be a functional entity integrated in any communication device, and the functional entity may be embodied in the form of hardware or in the form of software.
  • the TM module in the communication device may refer to a TM chip in the communication device or a functional module capable of realizing the TM function.
  • the port of the communication device in the embodiment of the present application may be a physical port of the communication device or a logical port of the communication device.
  • a method 100 for processing a packet provided in an embodiment of the present application is implemented by a first communication device, where the first communication device may be any network device with a packet forwarding function in the network or a single board in the network device , chip, etc.
  • the network device 110 , the network device 120 , and the network device 130 can all be used as the first communication apparatus to implement the method 100 .
  • FIG. 3 is a schematic flowchart of a packet processing method 100 according to an embodiment of the present application. Referring to FIG. 3, the method 100 may include, for example:
  • the forwarding priority carried in the message is used to indicate the priority of the communication device that forwards the message to forward the message.
  • the higher the forwarding priority the more important the message is, and the more important the communication device is to forward the message.
  • the forwarding priorities of the packets can be divided into priority 0 to priority 7, and the packet with priority 7 is the packet with the highest forwarding priority.
  • the forwarding priority and the highest forwarding priority of a packet may be backward compatible, and the highest forwarding priority referred to in the embodiments of this application may be the highest packet priority in any scenario that occurs later.
  • the forwarding priority of the packet may be carried in the priority field of the packet, and the first communication device may determine the forwarding priority to which the packet belongs by parsing the priority field of the received packet.
  • the first condition is a condition defined by the first communication device for the first port and used to determine whether the attack packet processing needs to be performed on the first port.
  • the first communication device may also set a corresponding condition for each port.
  • the first communication device may set a corresponding third condition for the second port, and the third condition and the first condition may be the same or different.
  • a certain port on the first communication device is used as an example for description.
  • the first condition may be that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  • the first threshold is a trigger condition for executing the following S102 and S103 correspondingly set in advance on the first communication device for the first port.
  • the first threshold is 70%
  • the bandwidth of the first port is 20 megabytes per second (English: Gb/s)
  • the first communication device obtains the packet with the highest forwarding priority transmitted through the first port as 15Gb/s
  • the third condition may be that the ratio of the bandwidth of the second port occupied by the packets with the highest forwarding priority transmitted through the second port is greater than or equal to the fifth threshold, where the fifth threshold may be equal to the first threshold, or not equal to the first threshold.
  • the first condition may also be that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
  • the second threshold is a trigger condition for executing the following S102 and S103 correspondingly set in advance on the first communication device for the first port.
  • the first communication The device determines that the size of the message with the highest forwarding priority on the first port is equal to the second threshold of 15 Gb/s, thereby determining that the message with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port to satisfy the first port. condition.
  • the third condition may be that the packet with the highest forwarding priority transmitted through the second port is greater than or equal to the sixth threshold, where the sixth threshold may or may not be equal to the second threshold.
  • the first communication device may periodically (for example, 100 milliseconds) obtain the size of the packet with the highest forwarding priority transmitted through the first port, and determine the highest forwarding priority transmitted through the first port Whether the bandwidth occupied by the packets of the first port satisfies the first condition. Similarly, the first communication device may also periodically obtain the size of the packet with the highest forwarding priority transmitted through the second port, and determine that the packet with the highest forwarding priority transmitted through the second port occupies the size of the second port. Whether the bandwidth satisfies the second condition. In this way, the first communication device can timely find out that the packet with the highest forwarding priority transmitted through each port occupies the bandwidth of each port. Therefore, the following processes S102 to S103 are performed on the port, so as to prevent the congestion of the port from affecting the forwarding of normal packets with the highest forwarding priority.
  • the first communication device may also, based on an event trigger, acquire the size of the packet with the highest forwarding priority transmitted through the first port, and determine the packet with the highest forwarding priority transmitted through the first port. Whether the bandwidth occupied by the file on the first port satisfies the first condition.
  • the event triggering the execution of S101 includes but is not limited to: the first communication device determines that all packets transmitted through the first port satisfy the second condition, where the second condition is defined by the first communication device for the first port , a condition for determining whether to measure the packet with the highest forwarding priority on the first port.
  • the first communication device may also set a corresponding event-triggered condition for each port.
  • the first communication device may set a corresponding fourth condition for the second port, and the fourth condition and the second condition may be the same or the same Differently, in the embodiments of the present application, a certain port on the first communication device is used as an example for description.
  • the second condition may be that the proportion of all packets transmitted through the first port occupying the bandwidth of the first port is greater than or equal to the third threshold.
  • the third threshold is a threshold corresponding to the first port pre-set on the first communication device.
  • the third threshold is 80%
  • the bandwidth of the first port is 20 megabytes per second (English: Gb/s)
  • the first communication device obtains all packets transmitted through the first port as 17 Gb/s
  • the fourth condition may be that the proportion of all packets transmitted through the second port occupying the bandwidth of the second port is greater than or equal to the seventh threshold, where the seventh threshold may be equal to the third threshold, or may not be equal to the third threshold. threshold.
  • the second condition may also be that all packets transmitted through the first port are greater than or equal to the fourth threshold.
  • the fourth threshold is a threshold corresponding to the first port set in advance on the first communication device. For example, if the fourth threshold is 18 Gb/s, the bandwidth of the first port is 20 Gb/s, and the first communication device acquires that all packets transmitted through the first port are 18.5 Gb/s, the first communication device determines that the The size of all the packets transmitted on the first port is greater than the fourth threshold of 18 Gb/s, so it is determined that the bandwidth of the first port occupied by all the packets transmitted through the first port satisfies the second condition.
  • the magnitude relationship between the fourth threshold and the second threshold is not specifically limited.
  • the fourth condition may be that all packets transmitted through the second port are greater than or equal to the eighth threshold, where the eighth threshold may or may not be equal to the fourth threshold.
  • the method 100 may further include: S21, the first communication device polls the first port, and obtains information through the first communication device.
  • the polling in S21 may be specifically implemented by the timer of the TM module of the first communication device.
  • the timing of the timer is set to 1 second, and when the timer counts up to 1 second, a pass through the first time is obtained.
  • the first communication device obtains the size of all packets transmitted through the first port, and obtains the size of the packet with the highest forwarding priority transmitted through the first port, both of which may be obtained by the first communication device through its own TM module This is achieved by performing a measurement operation on the first port.
  • the first communication device may monitor and process the packets with the highest forwarding priority in the network scenario transmitted through the first port according to different operating network scenarios.
  • the first communication device may run on the Internet Protocol version 4 (English: Internet Protocol version 4, referred to as: IPv4) network, on the Internet Protocol version 6 (English: Internet Protocol version 6, referred to as: IPv6) network, virtual private Network (English: Virtual Private Network, referred to as: VPN) network, Multiprotocol Label Switching (English: Multiprotocol Label Switching, referred to as: MPLS) network, Virtual Extended Local Area Network (English: Virtual Extensible Local Area Network, referred to as: VXLAN) and other network environments middle.
  • IPv4 Internet Protocol version 4, referred to as: IPv4
  • IPv6 Internet Protocol version 6
  • VPN Virtual Private Network
  • MPLS Multiprotocol Label Switching
  • VXLAN Virtual Extended Local Area Network
  • VXLAN Virtual Extensible Local Area Network
  • the first condition may be that the proportion of the bandwidth of the first port occupied by the IPv6 packet with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold; A condition may also be that the IPv6 packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
  • the second condition may be that the proportion of the bandwidth of the first port occupied by all IPv6 packets transmitted through the first port is greater than or equal to the third threshold; or, the second condition may also be that the bandwidth of the first port is transmitted through the first port. All IPv6 packets are greater than or equal to the fourth threshold.
  • the first communication device may process the attack packet by executing the following S102-S103.
  • S102 Acquire feature information of a first attack packet in the packet with the highest forwarding priority transmitted through the first port.
  • the characteristic information of the attack packet refers to characteristic information that can identify the attack packet and the attack flow to which the attack packet belongs.
  • the characteristic information of the attack packet may specifically be all or part of the contents of the five-tuple of the attack packet.
  • the characteristic information of the attack packet may include one of the following information or Multiple: source IP address, destination IP address, source port number, destination port number or transport layer protocol number; for another example, if the attack packet is an MPLS packet, the characteristic information of the attack packet may include one of the following information or multiple: MPLS label, source media access control (English: Media Access Control, MAC for short) address of the attack packet, destination MAC address, source IP address, and destination IP address.
  • the characteristic information of the attack packet may be a source IP address, a destination IP address, a source port number, a destination port number, and a transport layer protocol number.
  • the first attack packet is determined according to the source IP address, destination IP address, source port number, destination port number and transport layer protocol number of each packet, so as to obtain the source IP address,
  • the destination IP address, source port number, destination port number, and transport layer protocol number are used as feature information of the first attack packet in the packet with the highest forwarding priority obtained in S102.
  • the characteristic information of the attack packet may be the source port number and the destination port number, and the first communication device selects the source port number of each packet from the packets with the highest forwarding priority transmitted through the first port. and the destination port number to determine the first attack packet, so as to obtain the source port number and destination port number of the first attack packet, as the first attack packet in the packet with the highest forwarding priority obtained in S102.
  • characteristic information For example, a packet whose source port number and destination port number are constantly changing may be determined by the first communication device as the first attack packet.
  • the characteristic information of the attack packet may be the source MAC address and the destination MAC address, and the first communication device selects the source MAC address of each packet from the packets with the highest forwarding priority transmitted through the first port. and the destination MAC address to determine the first attack packet, so as to obtain the source MAC address and destination MAC address of the first attack packet, as the first attack packet in the packet with the highest forwarding priority obtained in S102.
  • characteristic information For example, a packet in which the source MAC address and the destination MAC address change may be determined by the first communication device as the first attack packet.
  • the TM module of the first communication device may determine the first attack packet from the packets with the highest forwarding priority transmitted through the first port, and obtain feature information of the first attack packet, which is used for subsequent The processing of the first attack packet provides a basis, so that the first attack packet can be sensed and suppressed, and conditions are provided for the normal operation of the first communication device.
  • S103 Send the feature information of the first attack packet to the control management entity.
  • S103 may be, for example, that the first communication device sends an indication message to the control management entity, where the indication message carries the feature information of the first attack message acquired in S102.
  • the indication message can be any one of the following messages: Border Gateway Protocol (English: Border Gateway Protocol, referred to as: BGP) message, Path Computation Element Communication Protocol (English: Path Computation Element Communication Protocol, referred to as: BGP) message : PCEP) message, telemetry (English: Telemetry) message or Network Configuration Protocol (English: Network Configuration Protocol, referred to as: NETCONF) message.
  • Border Gateway Protocol English: Border Gateway Protocol, referred to as: BGP
  • Path Computation Element Communication Protocol English: Path Computation Element Communication Protocol, referred to as: BGP
  • PCEP PCEP
  • telemetry English: Telemetry
  • Network Configuration Protocol English: Network Configuration Protocol, referred to as: NETCONF
  • the characteristic information of the first attack packet may be carried through an extended type length value (English: Type Length Value, TLV for short) field in any of the foregoing types of packets.
  • the feature information of the first attack packet may also be carried through other available fields such as a reserved (English:
  • control management entity and the first communication device belong to two different devices respectively, taking the indication message as a Telemetry message as an example, before executing S103, it is also necessary to implement a network between the first communication device and the control management entity through a routing protocol. Layer connectivity, and configure and enable the Telemetry function on the first communication device and the control management entity, so that after S102, the first communication device can carry the feature information of the first attack packet in the Telemetry packet and send it to Control management entity.
  • the first communication device may periodically send the attack detection result to the control management entity, and the control management entity may take the initiative to determine that the received attack detection result includes the feature information of the first attack packet. generates a packet processing policy for the first attack packet.
  • the first communication device sends the feature information of the first attack packet to the control management entity only when the first attack packet is detected.
  • the control management entity may also actively generate a report against the first attack packet message processing policy.
  • the first communication device may also send indication information to the control management entity for instructing the control management entity to generate packet processing policy, where the packet processing policy is used to process packets matching the feature information of the first attack packet.
  • the first communication device may carry the indication information and the characteristic information of the first attack packet in an indication packet and send it to the control management entity, or the first communication device may send the indication information and the first attack packet to the control management entity.
  • the feature information of the message is carried in different indication messages and sent to the control management entity respectively.
  • the indication message for carrying the indication information may be any one of the following messages: a BGP message, a PCEP message, a Telemetry message or a NETCONF message.
  • the control management entity and the first communication device belong to one network device respectively, taking the indication message as an example of a Telemetry message, before executing S103, the first communication device and the control management entity need to be configured and enabled with the Telemetry function.
  • the first communication device may send the feature information of the first attack packet to the control management entity in the form of Telemetry data.
  • the first communication device can obtain the highest forwarding priority when it is determined that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies the first condition
  • the feature information of the first attack packet in the packets of the highest level is sent to the control management entity.
  • the control management entity can generate a message processing strategy based on the message characteristics of the received first attack message, and send the message processing strategy to the communication device, so that the communication device that receives the message processing strategy
  • the packet that matches the characteristic information of the first attack packet can be processed based on the packet processing policy (for example, packet loss and/or speed limit), so that the first attack packet does not cause the port of the first communication device
  • the security defense mechanism can effectively identify and process attack packets to ensure that the attack packets will not cause the communication device to be congested, thereby ensuring that the security packets with the highest forwarding priority can be transmitted. Effective forwarding makes it possible for the first communication device to provide normal services.
  • the above takes the processing of the attack packet in the packet with the highest forwarding priority transmitted on the first port as an example, and describes the implementation and effect of the packet processing method provided in the embodiment of the present application. Similarly, this The method can be applied to other ports. For example, when it is determined that the bandwidth of the packet with the highest forwarding priority transmitted through the second port occupies the bandwidth of the second port and satisfies the third condition, the highest forwarding priority transmitted through the second port is obtained.
  • the characteristic information of the second attack packet in the packets of the advanced level is sent to the control management entity. Among them, the "first" and "second" in the first attack packet and the second attack packet are only to distinguish the attack packets with the highest forwarding priority transmitted on different ports, and do not refer to a certain packet. .
  • the first communication apparatus may analyze the packet transmitted through the first port when determining that the bandwidth of the packet with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port and satisfies the first condition. For the packets with the highest forwarding priority, it is determined that the packets with the highest forwarding priority transmitted through the first port include attack packets.
  • the first communication device may also send an alarm signal to the network management device to notify the network management that there is an attack packet on the first communication device, so that the network management can respond to the first communication device and the communication device that may transmit attack packets. Manage and control to ensure network security.
  • the embodiment of the present application also provides another method 200 for processing attack packets.
  • the method may further include:
  • control and management entity generates a packet processing policy based on the characteristic information of the first attack packet, where the packet processing policy is used to process the packet matching the characteristic information of the first attack packet.
  • the packet processing strategy may include, for example, feature information and a processing strategy of the first attack packet.
  • the characteristic information of the first attack packet is used to describe the characteristic information of the to-be-processed packet, so that the second communication device executing the packet processing policy can determine the attack packet to be processed according to the processing policy.
  • the processing strategy refers to the specific processing operation performed on the to-be-processed packet. For example, it can be a packet loss operation, that is, packet loss processing is performed on the packet matching the characteristic information of the first attack packet; for example, it can be a rate-limiting operation. , that is, performing rate-limiting processing on the packets matching the characteristic information of the first attack packet. Whether it is packet loss or rate limiting, it can effectively reduce the preemption of network resources by attack packets, especially the probability of insufficient bandwidth resources for normal packets with the highest forwarding priority.
  • any current algorithm for packet loss and/or rate limiting processing may be adopted, which is not specifically limited in this embodiment of the present application.
  • control management entity sends a message processing policy to the second communication apparatus.
  • the second communication apparatus and the first communication apparatus may belong to the same network device, or may belong to two different network devices.
  • control management entity may carry the message processing policy in a BGP message, a PCEP message, a Telemetry message or a NETCONF message and send it to the second communication device.
  • control and management entity may also send indication information to the second communication device for instructing the second communication device to process the packet matching the feature information of the first attack packet according to the packet processing policy.
  • the second communication apparatus processes the packet matching the feature information of the first attack packet based on the packet processing policy.
  • S106 may, for example, include: the second communication device obtains the first packet; then, judging whether the packet characteristics of the first packet and the packet characteristics of the first attack packet in the packet processing policy match, if If they match, the first packet is processed based on the processing policy in the packet processing policy.
  • the processing of the first packet based on the packet processing policy may, for example, include: performing packet loss processing on the first packet based on the processing policy in the packet processing policy, or processing based on the processing policy in the packet processing policy The policy performs rate-limiting processing on the first packet.
  • S106 may include, for example: the second communication device determines that the packet transmitted through the first port matches the packet characteristic of the first attack packet in the packet processing policy , if it matches, then, based on the processing policy in the packet processing policy, packet loss or speed limit processing is performed on the packet transmitted through the first port, so that the first communication device can be prevented from being caused by the first attack packet.
  • the normal packet with the highest forwarding priority is lost, ensuring the effective forwarding of the normal packet by the first communication device
  • the second communication device may be any network device controlled by the control management entity, so that even if the first attack packet attacks a network device in the network Other communication devices can also prevent the normal packets with the highest forwarding priority from being lost by other communication devices due to the first attack packet, and ensure effective forwarding of normal packets by other communication devices.
  • the second communication device may belong to the previous hop node of the network device where the first communication device is located on the transmission path of the attack packet.
  • the control and management entity sends the packet processing policy to the second communication device.
  • the first attack packet can be suppressed from the source as much as possible, so that the first attack packet no longer occupies the bandwidth resources of the first communication device, and the effect of the first attack packet on the first communication device is eliminated. influence.
  • the control management entity may also send the packet processing policy to the first communication device; then, the first communication device may also use the The packet processing policy is to process packets received from the first port that match the feature information of the attack packets.
  • the control management entity may also send the packet processing policy to all communication devices in the network connected to the control management entity, so that each communication device receives
  • the packet can be determined as an attack packet, and based on the processing policy in the packet processing policy Packet loss or rate limit processing. In this way, the transmission of the first attack packet between multiple communication devices in the network to attack the multiple communication devices can be effectively avoided, which greatly improves network security.
  • the control management entity generates a packet processing policy based on the feature information of the first attack packet reported by the first communication device and sends it to the second communication device, and the second communication device can
  • the packet that matches the feature information of the first attack packet is processed, so that the security defense mechanism is effective under the condition that the attack packet does not cause port congestion of the first communication device and threaten the security of the first communication device
  • the attack packets are identified and processed to ensure that the attack packets will not cause congestion of the communication device, thereby ensuring that the security packets with the highest forwarding priority can be effectively forwarded, making it possible for the first communication device to provide normal services.
  • the method may further include: the control management entity generates a packet processing policy based on the feature information of the second attack packet, and the packet The message processing policy is used to process the message matching the feature information of the second attack message; the control management entity sends the message processing policy to the third communication device; the third communication device, based on the message processing policy, The packets matching the characteristic information of the attack packets are processed.
  • the third communication apparatus and the first communication apparatus may belong to the same network device, or may belong to two different network devices.
  • FIG. 5 shows a schematic flowchart of a packet processing method 300 in an embodiment of the present application.
  • the method 300 takes the first communication device as the execution subject, and the method 300 may include, for example:
  • the first communication device determines that a packet with the highest forwarding priority transmitted by the first port occupies the bandwidth of the first port and satisfies the first condition
  • S303 Determine that the packet transmitted by the first port includes the attack packet with the highest forwarding priority.
  • the first communication device may also send an alarm signal to the network management, where the alarm signal is used for It is indicated that there are attack packets in the first communication device, so that the network management can perform security defense on the network to prevent the attack packets from causing greater threats to the network.
  • the alarm signal may also carry characteristic information of the attack.
  • the first communication apparatus may further acquire feature information of the attack packet after determining that the packet transmitted by the first port includes the attack packet with the highest forwarding priority.
  • the first communication device may also send the characteristic information of the attack packet to the control management entity, and obtain a packet processing policy generated by the control management entity, where the packet processing policy is used to compare the characteristics of the attack packet with the attack packet.
  • the first communication device can perform packet loss and/or speed limit processing on the first packet based on the packet processing policy, and the first packet is an attack packet.
  • the characteristic information matches the packet.
  • the first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  • the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
  • FIG. 6 shows a schematic flowchart of a packet processing method 400 in an embodiment of the present application.
  • the method 400 is described with the interaction between the first communication device and the control management entity.
  • the method 400 may include:
  • the first communication device sends the characteristic information of the attack packet to the control management entity
  • the control and management entity generates a packet processing policy based on the characteristic information of the attack packet, where the packet processing policy is used to process the packet matching the characteristic information of the attack packet.
  • the method 400 may further include: the first communication apparatus obtains a packet processing policy generated by the control and management device, so that the first communication apparatus processes the first packet based on the packet processing policy, and the first packet It is a packet matching the feature information of the attack packet.
  • the method 400 may further include: controlling the management device to send a packet processing policy to the second communication apparatus, so that the second communication apparatus processes the second packet based on the packet processing policy, and the second packet It is a packet matching the feature information of the attack packet.
  • the first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  • the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
  • an embodiment of the present application further provides a system 700 for processing a message, as shown in FIG. 7 .
  • the system 700 may include at least a first communication device 701 and a control management entity 702 . in,
  • the first communication device 701 is configured to obtain and send the highest forwarding priority to the control management entity 702 when determining that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies a first condition The characteristic information of the attack packet in the packet;
  • the control and management entity 702 is configured to generate a packet processing policy according to the packet characteristic information of the attack packet, where the packet processing policy is used to process the packet matching the characteristic information of the attack packet.
  • control and management device 702 is further configured to send the packet processing policy to the first communication apparatus. Then, the first communication device 701 is further configured to process a first packet based on the packet processing policy, where the first packet is a packet matching the feature information of the attack packet.
  • system 700 may further include a second communication apparatus, a control and management device 702, which is further configured to send the packet processing policy to the second communication apparatus. Then, the second communication device is further configured to process a second packet based on the packet processing policy, where the second packet is a packet matching the feature information of the attack packet.
  • the first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  • the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
  • an embodiment of the present application further provides a first communication apparatus 800, as shown in FIG. 8 .
  • the first communication apparatus 800 includes a processing unit 801 and a sending unit 802 .
  • the processing unit 801 is configured to execute the processing operation performed by the first communication device in any of the embodiments shown in FIG. 3 to FIG. 6 ;
  • the sending unit 802 is configured to execute any of the embodiments shown in FIG. 3 to FIG. 6 above.
  • the processing unit 801 may perform the operations in the embodiment in FIG.
  • the sending unit 802 may perform the operation in the embodiment in FIG. 3: send the feature information of the first attack packet to the control management entity.
  • an embodiment of the present application further provides a first communication apparatus 900, as shown in FIG. 9 .
  • the first communication device 900 includes a first communication interface 901 , a second communication interface 902 and a processor 903 .
  • the first communication interface 901 is used to perform the aforementioned receiving operation performed by the first communication device in any of the embodiments shown in FIG. 3 to FIG. 6 ;
  • the second communication interface 902 is used to perform the aforementioned FIG. 3 to FIG. 6 .
  • the processor 903 is configured to perform the above-mentioned any of the embodiments shown in FIG. 3 to FIG. 6 except the receiving operation and the sending operation performed by the first communication apparatus. other operations.
  • the processor 903 may perform the operations in the embodiment of FIG. 3 to determine that the bandwidth of the packet with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port and satisfies the first condition; The feature information of the first attack packet included in the packet with the highest forwarding priority.
  • an embodiment of the present application further provides a first communication apparatus 1000, as shown in FIG. 10 .
  • the first communication device 1000 includes a memory 1001 and a processor 1002 in communication with the memory 1001 .
  • the memory 1001 includes computer-readable instructions; the processor 1002 is configured to execute the computer-readable instructions, so that the first communication device 1000 executes the execution of the first communication device in any of the embodiments shown in FIG. 3 to FIG. 6 . Methods.
  • the processor may be a central processing unit (English: central processing unit, abbreviation: CPU), a network processor (English: network processor, abbreviation: NP) or a combination of CPU and NP.
  • the processor may also be an application-specific integrated circuit (English: application-specific integrated circuit, abbreviation: ASIC), a programmable logic device (English: programmable logic device, abbreviation: PLD) or a combination thereof.
  • the above-mentioned PLD can be a complex programmable logic device (English: complex programmable logic device, abbreviation: CPLD), a field programmable logic gate array (English: field-programmable gate array, abbreviation: FPGA), a general-purpose array logic (English: generic array logic, abbreviation: GAL) or any combination thereof.
  • a processor may refer to a single processor or may include multiple processors.
  • the memory may include volatile memory (English: volatile memory), such as random-access memory (English: random-access memory, abbreviation: RAM); the memory may also include non-volatile memory (English: non-volatile memory), For example, read-only memory (English: read-only memory, abbreviation: ROM), flash memory (English: flash memory), hard disk (English: hard disk drive, abbreviation: HDD) or solid-state hard disk (English: solid-state drive, Abbreviation: SSD); the memory may also comprise a combination of the above-mentioned kinds of memory.
  • the memory may refer to one memory, or may include multiple memories.
  • computer-readable instructions are stored in the memory, and the computer-readable instructions include a plurality of software modules, such as a sending module, a processing module and a receiving module. After executing each software module, the processor can perform corresponding operations according to the instructions of each software module. In this embodiment, the operation performed by a software module actually refers to the operation performed by the processor according to the instruction of the software module. After the processor executes the computer-readable instructions in the memory, it can execute all operations that can be performed by the first communication device in the packet processing method according to the instructions of the computer-readable instructions.
  • the second communication interface 902 of the first communication device 900 can be specifically used as the sending unit 802 in the first communication device 800 to realize the communication between the first communication device and the control management entity.
  • Data communication; the first communication interface 901 of the first communication apparatus 900 may be specifically used as a receiving unit in the first communication apparatus 800, for example, may be used to receive a message sent by an upstream network device.
  • an embodiment of the present application further provides a communication system
  • the first communication apparatus in the communication system may be, for example, the above-mentioned first communication apparatus 800 , 900 or 1000 .
  • the communication system is the processing system 700 of the above-mentioned message
  • the first communication device is the first communication device 701
  • the control management entity is the control management entity 702 .
  • an embodiment of the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium runs on a computer, the computer is made to execute the implementation shown in FIG. 3 to FIG. 6 above.
  • the processing method of the message in the example is made to execute the implementation shown in FIG. 3 to FIG. 6 above.
  • the embodiments of the present application also provide a computer program product, including a computer program or computer-readable instructions, when the computer program or the computer-readable instructions are run on a computer, the computer is made to execute the above-mentioned FIG. 3 to FIG. 6 .
  • the method for processing the packet in the example embodiment is described in detail below.

Landscapes

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

Abstract

Disclosed in embodiments of the present application are a packet processing method, a system, and a device, comprising: when a first communication device determines that the bandwidth of a first port occupied by packets having the highest forwarding priority transmitted by the first port satisfies a first condition, obtaining feature information of a first attack packet comprised in the packets having the highest forwarding priority transmitted by the first port, and sending the feature information of the first attack packet to a control management entity, such that the control management entity generates a packet processing strategy on the basis of packet features of the received attack packet, and thus the communication device can perform processing such as packet loss and/or rate limit on the packet matching the feature information of the attack packet on the basis of the packet processing strategy, thereby preventing network device congestion caused by attacks based on high-priority packets and ensuring that normal packets having the highest forwarding priority can be effectively forwarded, thus enabling the communication device to provide normal services.

Description

一种报文的处理方法、系统及设备A message processing method, system and device
本申请要求于2020年09月15日提交中国国家知识产权局、申请号为202010966693.5、申请名称为“一种报文的处理方法、系统及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202010966693.5 and the application title "A message processing method, system and equipment", which was submitted to the State Intellectual Property Office of China on September 15, 2020, the entire contents of which are approved by Reference is incorporated in this application.
技术领域technical field
本申请涉及通信技术领域,特别是涉及一种报文的处理方法、系统及设备。The present application relates to the field of communication technologies, and in particular, to a message processing method, system and device.
背景技术Background technique
网络设备通常按照待转发报文的转发优先级,对待转发报文进行有序的转发。其中,转发优先级越高的报文,会被网络设备优先转发。对于协议报文、网络设备的检测报文以及较为重要的数据报文,正常的转发对网络设备的正常运行十分重要,所以,通常将这些报文对应的转发优先级均设置为最高的转发优先级,确保这些报文被有效的处理从而保证网络设备的正常运行。The network device usually forwards the to-be-forwarded packets in an orderly manner according to the forwarding priority of the to-be-forwarded packets. Among them, packets with higher forwarding priorities will be preferentially forwarded by network devices. For protocol packets, detection packets of network devices, and more important data packets, normal forwarding is very important to the normal operation of network devices. Therefore, the forwarding priority corresponding to these packets is usually set to the highest forwarding priority. level to ensure that these packets are effectively processed to ensure the normal operation of network devices.
但是,如果网络设备接收到最高的转发优先级的攻击报文,这些攻击报文也会被优先处理。由于每个网络设备的总带宽是有限的,一旦攻击报文的数量暴增,最高的转发优先级的报文的总带宽超过网络设备的总带宽,网络设备将会对最高的转发优先级对应的报文进行丢包处理,从而,很可能丢失协议报文、网络设备的检测报文或较为重要的数据报文,导致网络设备无法提供正常的业务。However, if the network device receives attack packets with the highest forwarding priority, these attack packets will also be preferentially processed. Since the total bandwidth of each network device is limited, once the number of attack packets increases sharply, the total bandwidth of the packets with the highest forwarding priority exceeds the total bandwidth of the network device, and the network device will respond to the highest forwarding priority. Therefore, protocol packets, detection packets of network devices, or more important data packets may be lost, resulting in the failure of network devices to provide normal services.
目前,通过在网络设备上手动配置安全策略模板,网络设备通过该安全策略模板从接收的报文识别出安全的报文,对安全的报文进行正常转发,对于未识别出的报文进行丢弃,实现对攻击报文的防御,以提高网络安全。但是,该技术方案中,由于安全策略模板固定不变,无法有效的防御多变的攻击报文。At present, by manually configuring a security policy template on a network device, the network device identifies safe packets from the received packets through the security policy template, forwards the safe packets normally, and discards the unrecognized packets. , to achieve defense against attack packets to improve network security. However, in this technical solution, since the security policy template is fixed, it cannot effectively defend against changeable attack packets.
基于此,亟待提供一种报文的处理方法,使得网络设备能够有效的识别和处理攻击报文,确保最高转发优先级的安全报文被有效的转发。Based on this, there is an urgent need to provide a packet processing method, which enables network devices to effectively identify and process attack packets, and ensures that security packets with the highest forwarding priority are effectively forwarded.
发明内容SUMMARY OF THE INVENTION
基于此,本申请实施例提供了一种报文的处理方法、系统及设备,在最高转发优先级的攻击报文还未导致网络设备拥塞时,网络设备就能够识别和处理攻击报文,确保最高转发优先级的安全报文被有效的转发,使得网络设备提供正常的业务成为可能。Based on this, the embodiments of the present application provide a packet processing method, system, and device. When the attack packet with the highest forwarding priority has not caused congestion on the network device, the network device can identify and process the attack packet to ensure that Security packets with the highest forwarding priority are effectively forwarded, making it possible for network devices to provide normal services.
第一方面,本申请实施例提供了一种报文的处理方法,该方法可以包括:第一通信装置在确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件时,获取通过第一端口传输的最高转发优先级的报文中所包括的第一攻击报文的特征信息,并向控制管理实体发送该第一攻击报文的特征信息。其中,第一条件是是第一通信装置为第一端口配置的、用于确定是否需要对该第一端口实施攻击报文的处理的条件。这样,控制管理实体即可基于接收到的第一攻击报文的报文特征,生成报文处理策略,从而,第一通信装置能够基于该报文处理策略,对与第一攻击报文的特征信息匹配的报文进行丢包 和/或限速等处理,避免基于高优先级报文进行攻击所导致网络设备拥塞,保证最高转发优先级的正常报文能够被有效的转发,使得第一通信装置提供正常的业务成为可能。In a first aspect, an embodiment of the present application provides a method for processing a packet, and the method may include: when a first communication device determines that a packet with the highest forwarding priority transmitted through a first port occupies the bandwidth of the first port When the first condition is satisfied, the characteristic information of the first attack packet included in the packet with the highest forwarding priority transmitted through the first port is acquired, and the characteristic information of the first attack packet is sent to the control management entity. The first condition is a condition configured by the first communication device for the first port and used to determine whether the attack packet processing needs to be performed on the first port. In this way, the control and management entity can generate a packet processing policy based on the packet characteristics of the received first attack packet, so that the first communication device can compare the characteristics of the first attack packet with the characteristics of the first attack packet based on the packet processing policy. Packet loss and/or rate limiting are performed on packets with matching information to avoid network equipment congestion caused by attacks based on high-priority packets, and ensure that normal packets with the highest forwarding priority can be effectively forwarded, so that the first communication It becomes possible for the device to provide normal services.
在一些可能的实现方式中,在第一通信装置向控制管理实体发送第一攻击报文的特征之后,控制管理实体还可以基于该第一攻击报文的特征信息生成报文处理策略,第一通信装置获取该报文处理策略,该报文处理策略用于对与所述第一攻击报文的特征信息匹配的报文进行处理。如果控制管理实体属于第一通信装置内的功能模块时,第一通信装置获取报文处理策略可以通过内部数据传输实现;如果控制管理实体和第一通信装置分别为两个不同的设备时,第一通信装置获取报文处理策略可以通过报文实现,该报文具体可以是边界网关协议(英文:Border Gateway Protocol,简称:BGP)报文、路径计算单元通信协议(英文:Path Computation Element Communication Protocol,简称:PCEP)报文、遥感勘测(英文:Telemetry)报文或网络配置协议(英文:Network Configuration Protocol,简称:NETCONF)报文中的任意一种报文,例如:报文处理策略可以携带在指示报文中扩展的类型长度值(英文:Type Length Value,简称:TLV)字段携带第一攻击报文的特征信息。这样,通过获取控制管理实体生成的报文处理策略,为后续对与第一攻击报文的特征信息匹配的报文进行处理提供了前提,使得实现网络设备上最高转发优先级的正常报文被有效转发的目的成为可能。需要说明的是,下文中以控制管理实体和第一通信装置属于独立的两个网络设备为例进行描述。In some possible implementations, after the first communication device sends the feature of the first attack packet to the control management entity, the control management entity may further generate a packet processing policy based on the feature information of the first attack packet, the first The communication device acquires the packet processing policy, where the packet processing policy is used to process the packet matching the feature information of the first attack packet. If the control management entity belongs to a functional module in the first communication device, the first communication device can obtain the message processing policy through internal data transmission; if the control management entity and the first communication device are two different devices, the first communication device A communication device can obtain a message processing policy through a message, and the message can be a Border Gateway Protocol (English: Border Gateway Protocol, referred to as: BGP) message, Path Computation Element Communication Protocol (English: Path Computation Element Communication Protocol) , referred to as: PCEP) message, telemetry (English: Telemetry) message or Network Configuration Protocol (English: Network Configuration Protocol, referred to as: NETCONF) message any kind of message, for example: the message processing policy can carry The Type Length Value (English: Type Length Value, TLV for short) field extended in the indication message carries the feature information of the first attack message. In this way, by acquiring the packet processing policy generated by the control management entity, a precondition is provided for subsequent processing of the packet matching the characteristic information of the first attack packet, so that the normal packet with the highest forwarding priority on the network device can be processed. The purpose of efficient forwarding becomes possible. It should be noted that, in the following description, the control management entity and the first communication apparatus belong to two independent network devices as an example for description.
在另一些可能的实现方式中,当第一通信装置接收到报文处理策略后,该第一通信装置即可基于该报文处理策略,对第一报文进行处理,该第一报文为特征信息与第一攻击报文的特征信息匹配的报文。这样,通过设置条件和该条件触发的相关操作,能够在仿冒最高转发优先级的攻击报文还未造成严重的网络拥塞时就对攻击报文进行有效的抑制,避免网络设备上最高转发优先级的大量攻击报文抢占正常报文的带宽资源,造成最高转发优先级的正常报文被丢弃从而影响网络的正常运行,而且,随着攻击报文被有效抑制,能够降低最高转发优先级的正常报文的转发时延,提高转发性能。In some other possible implementation manners, after the first communication device receives the packet processing policy, the first communication device may process the first packet based on the packet processing policy, where the first packet is A packet whose characteristic information matches the characteristic information of the first attack packet. In this way, by setting a condition and related operations triggered by the condition, it is possible to effectively suppress the attack packet before the attack packet with the highest forwarding priority has caused serious network congestion, and avoid the highest forwarding priority on the network device. A large number of attack packets occupy the bandwidth resources of normal packets, causing the normal packets with the highest forwarding priority to be discarded, thus affecting the normal operation of the network. Moreover, as the attack packets are effectively suppressed, the normal packets with the highest forwarding priority can be reduced. Packet forwarding delay to improve forwarding performance.
作为一个示例,第一通信装置基于报文处理策略,对第一报文进行处理,可以包括:基于报文处理策略,对第一报文进行丢包处理。或者,作为另一个示例,第一通信装置基于报文处理策略,对第一报文进行处理,也可以包括:基于报文处理策略,对第一报文进行限速处理。这样,通过对于与第一攻击报文的特征信息匹配的第一报文进行丢包或限速等抑制处理,有效的避免该攻击报文大量抢占最高转发优先级的正常报文的带宽资源,降低最高转发优先级的正常报文的转发时延。As an example, the first communication apparatus processing the first packet based on the packet processing policy may include: performing packet loss processing on the first packet based on the packet processing policy. Or, as another example, the first communication apparatus processes the first packet based on the packet processing policy, and may also include: performing rate-limiting processing on the first packet based on the packet processing policy. In this way, by performing suppression processing such as packet loss or rate limiting on the first packet matching the characteristic information of the first attack packet, the attack packet can effectively prevent the attack packet from occupying a large number of bandwidth resources of the normal packet with the highest forwarding priority. Reduce the forwarding delay of normal packets with the highest forwarding priority.
其中,第一通信装置除了向控制管理实体发送第一攻击报文的特征信息,还可以向控制管理实体发送指示信息,该指示信息用于指示控制管理实体生成报文处理策略。一种情况下,第一通信装置可以将指示信息和第一攻击报文的特征信息分别携带在不同的指示报文中下发给控制管理实体。另一种情况下,第一通信装置可以将指示信息和第一攻击报文的特征信息携带在同一个指示报文中发送给控制管理实体。该指示报文可以是下述报文中的任意一种:BGP报文、PCEP报文、Telemetry报文或NETCONF报文。例如,可以通过上述任一类型的报文中扩展的TLV字段携带指示信息和第一攻击报文的特征信息。又例如, 也可以通过上述任一类型的报文中的预留(英文:Reserved)字段等其他可用字段携带指示信息和第一攻击报文的特征信息。Wherein, in addition to sending the feature information of the first attack packet to the control management entity, the first communication device may also send indication information to the control management entity, where the indication information is used to instruct the control management entity to generate a packet processing policy. In one case, the first communication device may carry the indication information and the feature information of the first attack packet in different indication packets and deliver them to the control management entity. In another case, the first communication apparatus may carry the indication information and the feature information of the first attack packet in the same indication packet and send it to the control management entity. The indication message can be any one of the following messages: BGP message, PCEP message, Telemetry message or NETCONF message. For example, the indication information and the feature information of the first attack packet may be carried through the extended TLV field in any of the foregoing types of packets. For another example, the indication information and the characteristic information of the first attack packet may also be carried through other available fields such as a reserved (English: Reserved) field in any of the foregoing types of packets.
其中,第一条件可以包括通过第一端口传输的最高转发优先级的报文占用第一端口的带宽的比例大于或等于第一阈值。例如,第一阈值为70%,该第一端口的带宽为20兆字节每秒(英文:Gb/s),第一通信装置获取通过该第一端口传输的最高转发优先级的报文为15Gb/s,则,第一通信装置确定该第一端口上最高转发优先级的报文占用该第一端口的带宽的比例为(15÷20)=75%,大于第一阈值70%,从而确定通过第一端口传输的最高转发优先级的报文占用该第一端口的带宽满足第一条件。或者,第一条件也可以包括通过第一端口传输的最高转发优先级的报文大于或等于第二阈值。例如,第二阈值为15Gb/s,该第一端口的带宽为20Gb/s,第一通信装置获取通过该第一端口传输的最高转发优先级的报文为15Gb/s,则,第一通信装置确定该第一端口上最高转发优先级的报文的大小等于该第二阈值15Gb/s,从而确定通过第一端口传输的最高转发优先级的报文占用该第一端口的带宽满足第一条件。The first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold. For example, the first threshold is 70%, the bandwidth of the first port is 20 megabytes per second (English: Gb/s), and the first communication device obtains the packet with the highest forwarding priority transmitted through the first port as 15Gb/s, then, the first communication device determines that the ratio of the bandwidth of the first port occupied by the packet with the highest forwarding priority on the first port is (15÷20)=75%, which is greater than the first threshold of 70%, so It is determined that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies the first condition. Alternatively, the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold. For example, if the second threshold is 15 Gb/s, the bandwidth of the first port is 20 Gb/s, and the packet with the highest forwarding priority acquired by the first communication device through the first port is 15 Gb/s, then the first communication The device determines that the size of the message with the highest forwarding priority on the first port is equal to the second threshold of 15 Gb/s, thereby determining that the message with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port to satisfy the first port. condition.
在一些可能的实现方式中,第一通信装置可以轮询检测各端口的带宽占用情况。以第一端口为例,第一通信装置可以轮询检测第一端口的带宽占用情况,例如,可以通过第一通信装置的流量管理(英文:Traffic Management,简称:TM)模块的定时器实现的,TM模块设置定时器的定时时间为1秒,在定时器计时达到1秒时,获取一次通过该第一端口传输的报文的大小。具体实现时,第一通信装置轮询检测第一端口的带宽占用情况,获取通过第一端口传输的所有报文的大小,接着,即可判断通过该第一端口传输的所有报文占该第一端口的带宽是否满足第二条件,如果不满足,则继续轮询检测,如果满足,则继续获取通过该第一端口传输的最高转发优先级的报文的大小,并判断通过该第一端口传输的最高转发优先级的报文占用该第一端口的带宽是否满足第一条件,否则继续轮询检测。其中,第二条件可以指通过第一端口传输的所有报文占用第一端口的带宽的比例大于或等于第三阈值,或者,第二条件也可以指通过第一端口传输的所有报文大于或等于第四阈值。可见,当第一通信装置通过轮询检测确定通过第一端口传输的所有报文满足第二条件时,确定第一端口传输的报文较多,有发生拥塞的风险,需要重点关注较为重要的最高转发优先级的带宽占用情况,此时,当确定通过第一端口传输的最高转发优先级的报文占用该第一端口的带宽满足第一条件时,可以认为该第一端口上传输的最高转发优先级的报文中可能存在攻击报文,也就是说,上述轮询机制以及两个判断条件,为了该第一通信装置上通过该第一端口传输的最高转发优先级的正常报文能够正常被转发提供了前提和保障。In some possible implementation manners, the first communication apparatus may poll and detect the bandwidth occupancy status of each port. Taking the first port as an example, the first communication device can poll and detect the bandwidth occupancy of the first port, for example, it can be realized by the timer of the traffic management (English: Traffic Management, TM for short) module of the first communication device. , the TM module sets the timing of the timer to 1 second, and when the timer reaches 1 second, obtains the size of the packet transmitted through the first port once. In specific implementation, the first communication device polls and detects the bandwidth occupancy of the first port, obtains the size of all packets transmitted through the first port, and then determines that all packets transmitted through the first port occupy the first port. Whether the bandwidth of a port satisfies the second condition, if not, continue polling and detection, if so, continue to obtain the size of the packet with the highest forwarding priority transmitted through the first port, and determine that the first port Check whether the bandwidth of the first port occupied by the transmitted message with the highest forwarding priority satisfies the first condition; otherwise, continue polling and detection. The second condition may refer to that the proportion of the bandwidth of the first port occupied by all packets transmitted through the first port is greater than or equal to the third threshold, or the second condition may also mean that all packets transmitted through the first port are greater than or equal to the third threshold. equal to the fourth threshold. It can be seen that when the first communication device determines that all the packets transmitted through the first port satisfy the second condition through polling detection, it is determined that there are many packets transmitted through the first port, and there is a risk of congestion, and it is necessary to focus on the more important ones. The bandwidth occupancy of the highest forwarding priority. At this time, when it is determined that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies the first condition, it can be considered that the highest forwarding priority transmitted on the first port is the highest bandwidth. There may be attack packets in the packets of forwarding priority, that is to say, the above-mentioned polling mechanism and the two judgment conditions, so that the normal packets with the highest forwarding priority transmitted on the first communication device through the first port can be Normal forwarding provides the premise and guarantee.
在另一些可能的实现方式中,对于第一通信装置的第二端口,同样设置有与第一端口的第一条件对应的第三条件。对于第二端口上的报文处理过程,例如可以包括:第一通信装置确定通过第二端口传输的最高转发优先级的报文占用第二端口的带宽满足第三条件时,获取所述通过第二端口传输的最高转发优先级的报文中所包括的第二攻击报文的特征信息,并向控制管理实体发送第二攻击报文的特征信息。其中,第三条件可以指通过第二端口传输的最高转发优先级的报文占用所述第二端口的带宽的比例大于或等于第五阈值;或者,该第三条件也可以指通过第二端口传输的最高转发优先级的报文大于或等于第六阈 值。需要说明的是,对于第二端口,同样可以通过上述一种或多种实现方式达到对仿冒的最高转发优先级的攻击报文的处理,相关描述不再赘述。In some other possible implementation manners, for the second port of the first communication device, a third condition corresponding to the first condition of the first port is also set. For the packet processing process on the second port, for example, it may include: when the first communication device determines that the bandwidth of the second port occupied by the packet with the highest forwarding priority transmitted through the second port satisfies the third condition, obtaining the The characteristic information of the second attack packet included in the packet with the highest forwarding priority transmitted by the two ports, and the characteristic information of the second attack packet is sent to the control management entity. Wherein, the third condition may refer to that the ratio of the bandwidth of the second port occupied by the packets with the highest forwarding priority transmitted through the second port is greater than or equal to the fifth threshold; The transmitted packet with the highest forwarding priority is greater than or equal to the sixth threshold. It should be noted that, for the second port, one or more of the foregoing implementation manners can also be used to process the counterfeit attack packet with the highest forwarding priority, and the relevant description will not be repeated.
需要说明的是,攻击报文的特征信息,可以是指能够标识该攻击报文以及该攻击报文所属的攻击流的特征信息。攻击报文的特征信息具体可以是该攻击报文的五元组中的全部或部分内容,例如,攻击报文为互联网协议(英文:Internet Protocol,简称:IP)报文,该攻击报文的特征信息可以包括下述信息中的一个或多个:源IP地址、目的IP地址、源端口号、目的端口号或传输层协议号;又例如,攻击报文为多协议标签交换(英文:Multiprotocol Label Switching,简称:MPLS)报文,该攻击报文的特征信息可以包括下述信息中的一个或多个:MPLS标签、所述攻击报文的源媒体接入控制(英文:Media Access Control,简称:MAC)地址、目的MAC地址、源IP地址和目的IP地址。It should be noted that the feature information of the attack packet may refer to the feature information that can identify the attack packet and the attack flow to which the attack packet belongs. The characteristic information of the attack packet may specifically be all or part of the content of the quintuple of the attack packet. For example, the attack packet is an Internet Protocol (English: Internet Protocol, IP for short) packet, and the The feature information may include one or more of the following information: source IP address, destination IP address, source port number, destination port number or transport layer protocol number; for another example, the attack packet is a multi-protocol label switching (English: Multiprotocol Label Switching, MPLS for short) message, the feature information of the attack message may include one or more of the following information: MPLS label, the source media access control of the attack message (English: Media Access Control, Abbreviation: MAC address, destination MAC address, source IP address, and destination IP address.
需要说明的是,第一通信装置可以根据运行网络场景的不同,对通过第一端口传输的该网络场景下的最高转发优先级的报文进行本申请实施例提供的处理方法。例如,第一通信装置可以运行在第四版互联网协议(英文:Internet Protocol version 4,简称:IPv4)网络、在第六版互联网协议(英文:Internet Protocol version 6,简称:IPv6)网络、虚拟专用网(英文:Virtual Private Network,简称:VPN)网络、多协议标签交换(英文:Multiprotocol Label Switching,简称:MPLS)网络、虚拟扩展局域网(英文:Virtual Extensible Local Area Network,简称:VXLAN)等网络环境中。It should be noted that, according to different operating network scenarios, the first communication device may perform the processing method provided in this embodiment of the present application on the packet with the highest forwarding priority in the network scenario transmitted through the first port. For example, the first communication device may run on the Internet Protocol version 4 (English: Internet Protocol version 4, referred to as: IPv4) network, on the Internet Protocol version 6 (English: Internet Protocol version 6, referred to as: IPv6) network, virtual private Network (English: Virtual Private Network, referred to as: VPN) network, Multiprotocol Label Switching (English: Multiprotocol Label Switching, referred to as: MPLS) network, Virtual Extended Local Area Network (English: Virtual Extensible Local Area Network, referred to as: VXLAN) and other network environments middle.
需要说明的是,第一通信装置,可以是指能够实现报文转发功能的任意的网络设备,例如,通信装置可以是交换机、路由器等;或者,第一通信装置也可以是网络设备内具有报文转发功能的单板,芯片等。TM模块,可以是指第一通信装置中的TM芯片或能够实现TM功能的功能模块。第一通信装置的端口可以是该第一通信装置的物理端口也可以是该第一通信装置的逻辑端口。It should be noted that the first communication device may refer to any network device capable of implementing a message forwarding function, for example, the communication device may be a switch, a router, etc.; or, the first communication device may also be a network device with a message A single board, chip, etc. with the text forwarding function. The TM module may refer to a TM chip in the first communication device or a functional module capable of implementing the TM function. The port of the first communication device may be a physical port of the first communication device or a logical port of the first communication device.
第二方面,本申请实施例还提供了一种报文的处理方法,该方法包括:第一通信装置确定第一端口传输的最高转发优先级的报文占用该第一端口的带宽满足第一条件时,对通过第一端口传输的最高转发优先级报文进行分析,并确定第一端口传输的报文中包括具有所述最高转发优先级的攻击报文。In a second aspect, an embodiment of the present application further provides a method for processing a packet, the method comprising: the first communication device determines that the packet with the highest forwarding priority transmitted by the first port occupies the bandwidth of the first port and satisfies the first When the conditions are met, the packets with the highest forwarding priority transmitted through the first port are analyzed, and it is determined that the packets transmitted by the first port include attack packets with the highest forwarding priority.
作为一个示例,当第一通信装置确定第一端口传输的报文中包括具有所述最高转发优先级的攻击报文时,该第一通信装置还可以向网管发送告警信号,该告警信号用于指示第一通信装置中具有攻击报文,从而,网管可以对网络进行安全防御,避免攻击报文对网络造成更大的威胁。此外,为了网管能够针对性的进行安全防御,该告警信号中还可以携带攻击的特征信息。As an example, when the first communication device determines that the packet transmitted by the first port includes the attack packet with the highest forwarding priority, the first communication device may also send an alarm signal to the network management, where the alarm signal is used for It is indicated that there are attack packets in the first communication device, so that the network management can perform security defense on the network to prevent the attack packets from causing greater threats to the network. In addition, in order for the network management to carry out targeted security defense, the alarm signal may also carry characteristic information of the attack.
作为一个示例,该第一通信装置还可以在确定第一端口传输的报文中包括具有所述最高转发优先级的攻击报文之后,获取所述攻击报文的特征信息。此时,该第一通信装置还可以向控制管理实体发送所述攻击报文的特征信息,并获取控制管理实体生成的报文处理策略,该报文处理策略用于对与攻击报文的特征信息匹配的报文进行处理,这样,该第一通信装置即可基于所述报文处理策略,对第一报文进行丢包和/或限速处理,该第一报文为与攻击报文的特征信息匹配的报文。As an example, the first communication apparatus may further acquire feature information of the attack packet after determining that the packet transmitted by the first port includes the attack packet with the highest forwarding priority. At this time, the first communication device may also send the characteristic information of the attack packet to the control management entity, and obtain a packet processing policy generated by the control management entity, where the packet processing policy is used to compare the characteristics of the attack packet with the attack packet. In this way, the first communication device can perform packet loss and/or speed limit processing on the first packet based on the packet processing policy, and the first packet is an attack packet. The characteristic information matches the packet.
其中,第一条件可以包括通过第一端口传输的最高转发优先级的报文占用第一端口的带宽的比例大于或等于第一阈值。或者,第一条件也可以包括通过第一端口传输的最高转发优先级的报文大于或等于第二阈值。The first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold. Alternatively, the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
需要说明的是,该第二方面提供的方法的具体实现方式以及达到的效果,均可以参见上述第一方面的相关描述,在此不再赘述。It should be noted that, for the specific implementation manner of the method provided in the second aspect and the effect achieved, reference may be made to the relevant description of the above-mentioned first aspect, and details are not repeated here.
第三方面,本申请实施例还提供了一种报文的处理方法,该方法可以包括:第一通信装置确定通过第一端口传输的最高转发优先级的报文占用第一端口的带宽满足第一条件时,获取最高转发优先级的报文中的攻击报文的特征信息,并向控制管理实体发送所述攻击报文的特征信息;此时,控制管理实体即可基于攻击报文的特征信息生成报文处理策略,该报文处理策略用于对与所述攻击报文的特征信息匹配的报文进行处理。In a third aspect, an embodiment of the present application further provides a method for processing a packet, the method may include: the first communication device determines that the packet with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port and satisfies the first port. Under one condition, obtain the characteristic information of the attack packet in the packet with the highest forwarding priority, and send the characteristic information of the attack packet to the control management entity; at this time, the control management entity can be based on the characteristics of the attack packet The information generates a packet processing policy, where the packet processing policy is used to process the packet matching the characteristic information of the attack packet.
作为一个示例,该方法还可以包括:第一通信装置获取控制管理设备生成的报文处理策略,从而,第一通信装置基于报文处理策略,对第一报文进行处理,第一报文为与攻击报文的特征信息匹配的报文。As an example, the method may further include: the first communication device obtains a packet processing policy generated by the control and management device, so that the first communication device processes the first packet based on the packet processing policy, where the first packet is Packets matching the feature information of attack packets.
作为又一个示例,该方法还可以包括:控制管理设备向第二通信装置发送报文处理策略,从而,第二通信装置基于报文处理策略,对第二报文进行处理,第二报文为与攻击报文的特征信息匹配的报文。As another example, the method may further include: controlling the management device to send a packet processing policy to the second communication apparatus, so that the second communication apparatus processes the second packet based on the packet processing policy, and the second packet is Packets matching the feature information of attack packets.
其中,第一条件可以包括通过第一端口传输的最高转发优先级的报文占用第一端口的带宽的比例大于或等于第一阈值。或者,第一条件也可以包括通过第一端口传输的最高转发优先级的报文大于或等于第二阈值。The first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold. Alternatively, the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
需要说明的是,该第三方面提供的方法的具体实现方式以及达到的效果,均可以参见上述第一方面或第二方面的相关描述,在此不再赘述。It should be noted that, for the specific implementation manner of the method provided in the third aspect and the effect achieved, reference may be made to the relevant description of the first aspect or the second aspect, and details are not repeated here.
第四方面,本申请实施例还提供了一种报文的处理系统,该系统至少可以包括第一通信装置和控制管理实体,其中,第一通信装置,用于确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件时,获取并向控制管理实体发送所述最高转发优先级的报文中的攻击报文的特征信息;控制管理实体,用于根据攻击报文的报文特征信息,生成报文处理策略,该报文处理策略用于对与攻击报文的特征信息匹配的报文进行处理。In a fourth aspect, an embodiment of the present application further provides a system for processing a message. The system may include at least a first communication device and a control management entity, wherein the first communication device is configured to determine the highest value transmitted through the first port. When the bandwidth of the first port occupied by the packet of the forwarding priority satisfies the first condition, acquire and send the characteristic information of the attack packet in the packet with the highest forwarding priority to the control management entity; the control management entity uses According to the packet feature information of the attack packet, a packet processing policy is generated, and the packet processing policy is used to process the packet matching the characteristic information of the attack packet.
作为一个示例,所述控制管理设备,还用于向所述第一通信装置发送所述报文处理策略。那么,所述第一通信装置,还用于基于所述报文处理策略,对第一报文进行处理,所述第一报文为与所述攻击报文的特征信息匹配的报文。As an example, the control and management device is further configured to send the packet processing policy to the first communication apparatus. Then, the first communication device is further configured to process a first packet based on the packet processing policy, where the first packet is a packet matching the feature information of the attack packet.
作为另一个示例,该系统还可以包括第二通信装置,控制管理设备,还用于向所述第二通信装置发送所述报文处理策略。那么,所述第二通信装置,还用于基于所述报文处理策略,对第二报文进行处理,所述第二报文为与所述攻击报文的特征信息匹配的报文。As another example, the system may further include a second communication apparatus, which controls a management device, and is further configured to send the packet processing policy to the second communication apparatus. Then, the second communication device is further configured to process a second packet based on the packet processing policy, where the second packet is a packet matching the feature information of the attack packet.
其中,第一条件可以包括通过第一端口传输的最高转发优先级的报文占用第一端口的带宽的比例大于或等于第一阈值。或者,第一条件也可以包括通过第一端口传输的最高转发优先级的报文大于或等于第二阈值。The first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold. Alternatively, the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
需要说明的是,该第四方面提供的系统的具体实现方式以及达到的效果,均可以参见 上述第一方面、第二方面或第三方面的相关描述,在此不再赘述。It should be noted that, for the specific implementation manner of the system provided by the fourth aspect and the effect achieved, reference may be made to the relevant descriptions of the above-mentioned first aspect, second aspect or third aspect, which will not be repeated here.
第五方面,本申请还提供了第一通信装置,包括收发单元和处理单元。其中,收发单元用于执行上述第一方面、第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式提供的方法中的收发操作,或者,用于执行上述第三方面或第三方面任意一种可能的实现方式提供的方法中第一通信装置的收发操作;处理单元用于执行上述第一方面、第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式提供的方法中除了收发操作以外的其他操作,或者,用于执行上述第三方面或第三方面任意一种可能的实现方式提供的方法中第一通信装置的除了收发操作以外的其他操作。例如:当所述第一通信装置执行所述第一方面所述的方法时,所述收发单元用于向控制管理实体发送第一攻击报文的特征信息;所述处理单元用于确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件;所述处理单元还用于获取所述通过第一端口传输的最高转发优先级的报文中所包括的第一攻击报文的特征信息。In a fifth aspect, the present application further provides a first communication device, including a transceiver unit and a processing unit. Wherein, the transceiver unit is configured to perform the transceiver operation in the method provided in the first aspect, any possible implementation manner of the first aspect, the second aspect, or any possible implementation manner of the second aspect, or for performing The transceiving operation of the first communication device in the method provided by the third aspect or any possible implementation manner of the third aspect; the processing unit is configured to execute the first aspect, any possible implementation manner of the first aspect, and the second Other operations other than the transceiving operation in the method provided by the aspect or any possible implementation manner of the second aspect, or for performing the first aspect in the method provided by the third aspect or any possible implementation manner of the third aspect. Other operations of the communication device other than transceiving operations. For example: when the first communication device executes the method described in the first aspect, the transceiver unit is configured to send the feature information of the first attack packet to the control management entity; the processing unit is configured to determine A packet with the highest forwarding priority transmitted by a port occupies the bandwidth of the first port and satisfies the first condition; the processing unit is further configured to acquire the information included in the packet with the highest forwarding priority transmitted through the first port The feature information of the first attack packet.
第六方面,本申请实施例还提供了一种第一通信装置,包括第一通信接口和处理器。其中,第一通信接口用于执行上述第一方面、第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式提供的方法中的发送操作,或者,用于执行上述第三方面或第三方面任意一种可能的实现方式提供的方法中第一通信装置的发送操作;处理器,用于执行上述第一方面、第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式提供的方法中的除所述接收和发送操作以外的其他操作,或者,用于执行上述第三方面或第三方面任意一种可能的实现方式提供的方法中第一通信装置的除所述接收和发送操作以外的其他操作。此外,该第一通信装置还可以包括第二通信接口,第二通信接口用于执行前述第一通信装置的接收操作。In a sixth aspect, an embodiment of the present application further provides a first communication apparatus, including a first communication interface and a processor. The first communication interface is used to perform the sending operation in the method provided by the first aspect, any possible implementation manner of the first aspect, the second aspect, or any possible implementation manner of the second aspect, or, using the sending operation of the first communication device in performing the method provided by the third aspect or any of the possible implementations of the third aspect; the processor is configured to execute the first aspect or any of the possible implementations of the first aspect , other operations other than the receiving and sending operations in the method provided by the second aspect or any possible implementation manner of the second aspect, or, for performing the above-mentioned third aspect or any one of the possible implementations of the third aspect Other operations other than the receiving and sending operations of the first communication apparatus in the method provided by the implementation manner are implemented. In addition, the first communication device may further include a second communication interface, and the second communication interface is used to perform the receiving operation of the aforementioned first communication device.
第七方面,本申请实施例还提供了一种第一通信装置,该第一通信装置包括存储器和处理器。其中,该存储器包括计算机可读指令;与该存储器通信的处理器用于执行所述计算机可读指令,使得所述第一通信装置用于执行以上第一方面、第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式提供的方法,或者,用于执行上述第三方面或第三方面任意一种可能的实现方式提供的方法中第一通信装置实施的方法。In a seventh aspect, an embodiment of the present application further provides a first communication apparatus, where the first communication apparatus includes a memory and a processor. Wherein, the memory includes computer-readable instructions; a processor in communication with the memory is configured to execute the computer-readable instructions, so that the first communication device is configured to execute the first aspect and any possible implementation of the first aspect manner, the method provided by the second aspect or any possible implementation manner of the second aspect, or the method implemented by the first communication device for performing the method provided by the third aspect or any possible implementation manner of the third aspect method.
第八方面,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得所述计算机用于执行以上第一方面、第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式提供的方法,或者,用于执行上述第三方面或第三方面任意一种可能的实现方式提供的方法中第一通信装置实施的方法。In an eighth aspect, embodiments of the present application further provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium runs on a computer, the computer is configured to execute the above first aspect, The method provided by any possible implementation manner of the first aspect, the second aspect or any possible implementation manner of the second aspect, or, for implementing the third aspect or any possible implementation manner of the third aspect. The method is implemented by the first communication device.
第九方面,本申请实施例还提供了计算机程序产品,包括计算机程序或计算机可读指令,当所述计算机程序或所述计算机可读指令在计算机上运行时,使得计算机执行以上第一方面、第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式提供的方法,或者,用于执行上述第三方面或第三方面任意一种可能的实现方式提供的方法中第一通信装置实施的方法。In a ninth aspect, the embodiments of the present application also provide a computer program product, including a computer program or computer-readable instructions, when the computer program or the computer-readable instructions are run on a computer, the computer is made to execute the above first aspect, The method provided by any possible implementation manner of the first aspect, the second aspect or any possible implementation manner of the second aspect, or, for implementing the third aspect or any possible implementation manner of the third aspect. The method is implemented by the first communication device.
第十方面,本申请实施例还提供了一种通信系统,该通信系统包括第五方面、第六方 面或第七方面提供的所述的第一通信装置以及第三方面提供的方法中对应的控制管理实体(或第四方面提供的系统中的控制管理实体)。In a tenth aspect, an embodiment of the present application further provides a communication system, where the communication system includes the first communication device provided in the fifth aspect, the sixth aspect or the seventh aspect, and the corresponding method in the third aspect. A control management entity (or a control management entity in the system provided by the fourth aspect).
需要说明的是,上述实施例中的通信装置,可以是用于执行上述方法的网络设备,也可以是指用于执行上述方法的单板、线卡、芯片等。It should be noted that, the communication device in the foregoing embodiment may be a network device for executing the foregoing method, or may refer to a single board, a line card, a chip, or the like for executing the foregoing method.
附图说明Description of drawings
图1为本申请实施例所适用的网络10的结构示意图;FIG. 1 is a schematic structural diagram of a network 10 to which this embodiment of the application is applied;
图2为本申请实施例在网络10中执行报文处理的流程示意图;FIG. 2 is a schematic flowchart of performing packet processing in the network 10 according to an embodiment of the present application;
图3为本申请实施例中一种报文的处理方法100的流程示意图;FIG. 3 is a schematic flowchart of a method 100 for processing a message in an embodiment of the present application;
图4为本申请实施例中另一种报文的处理方法200的流程示意图;FIG. 4 is a schematic flowchart of another packet processing method 200 in an embodiment of the present application;
图5为本申请实施例中再一种报文的处理方法300的流程示意图;FIG. 5 is a schematic flowchart of another method 300 for processing a message in an embodiment of the present application;
图6为本申请实施例中又一种报文的处理方法400的流程示意图;FIG. 6 is a schematic flowchart of another method 400 for processing a message in an embodiment of the present application;
图7为本申请实施例中一种报文的处理系统700的结构示意图;FIG. 7 is a schematic structural diagram of a message processing system 700 according to an embodiment of the present application;
图8为本申请实施例中一种第一通信装置800的结构示意图;FIG. 8 is a schematic structural diagram of a first communication apparatus 800 according to an embodiment of the present application;
图9为本申请实施例中一种第一通信装置900的结构示意图;FIG. 9 is a schematic structural diagram of a first communication apparatus 900 in an embodiment of the present application;
图10为本申请实施例中一种第一通信装置1000的结构示意图。FIG. 10 is a schematic structural diagram of a first communication apparatus 1000 according to an embodiment of the present application.
具体实施方式detailed description
下面将结合附图,对本申请实施例中的技术方案进行描述。本申请实施例描述的网络架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings. The network architecture and service scenarios described in the embodiments of the present application are for the purpose of illustrating the technical solutions of the embodiments of the present application more clearly, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. The evolution of the architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
本申请中的“1”、“2”、“3”、“第一”、“第二”以及“第三”等序数词用于对多个对象进行区分,不用于限定多个对象的顺序。In this application, ordinal numbers such as "1", "2", "3", "first", "second" and "third" are used to distinguish multiple objects, and are not used to limit the order of multiple objects .
本申请中提及的“A和/或B”,应该理解为包括以下情形:仅包括A,仅包括B,或者同时包括A和B。"A and/or B" mentioned in this application should be understood to include the following situations: only A, only B, or both A and B are included.
报文的源端网络设备在报文中携带优先级后,各网络设备根据报文中携带的优先级对该报文进行转发。其中,越重要的报文对应的优先级越高的报文,相比较低优先级的报文,网络设备对高优先级的报文优先进行转发。为了确保网络提供正常的业务服务,通常将协议报文、网络设备的检测报文以及较为重要的数据报文等影响网络设备的正常运行的报文设置最高的优先级,以确保这些报文被有效的处理。由于报文中携带的优先级用于指导网络设备对该报文进行转发处理的优先程度,所以,本申请实施例中将优先级称为转发优先级,本申请所述的转发优先级即指报文中携带的优先级字段所指示的报文的优先级,例如,当报文为互联网协议(英文:Internet Protocol,简称:IP)报文时,该报文的转发优先级可以通过该IP报文中的服务类型(英文:Type of Service,简称:TOS)字段的值指示;又例如,当报文为多协议标签交换(英文:Multiprotocol Label Switching,简称:MPLS)报文时,该报文的转发优先级可以通过该MPLS报文中的实验比特位(英文:Experimental Bits, 简称:EXP)字段的值指示。After the source network device of the packet carries the priority in the packet, each network device forwards the packet according to the priority carried in the packet. Among them, the more important packets correspond to the higher priority packets, and the network device preferentially forwards the higher priority packets compared to the lower priority packets. In order to ensure that the network provides normal business services, the highest priority is usually set for the packets that affect the normal operation of network equipment, such as protocol packets, detection packets of network equipment, and more important data packets, to ensure that these packets are processed Efficient processing. Since the priority carried in the packet is used to instruct the network device to perform the forwarding processing on the packet, the priority is referred to as the forwarding priority in the embodiment of this application, and the forwarding priority mentioned in this application refers to The priority of the packet indicated by the priority field carried in the packet. For example, when the packet is an Internet Protocol (English: Internet Protocol, referred to as: IP) packet, the forwarding priority of the packet can be determined by the IP The value of the type of service (English: Type of Service, referred to as: TOS) field in the packet indicates; for another example, when the packet is a Multiprotocol Label Switching (English: Multiprotocol Label Switching, referred to as: MPLS) packet, the packet The forwarding priority of the message may be indicated by the value of the experimental bits (English: Experimental Bits, EXP for short) field in the MPLS message.
网络设备如果接收到攻击报文,该攻击报文也携带最高的转发优先级,那么,这些攻击报文也会成为网络设备优先处理的对象,占用网络设备的带宽。由于每个网络设备的总带宽是有限的,接收的攻击报文很快会导致网络设备拥塞。例如,接收的待转发报文的总带宽超过网络设备的总带宽,此时,即使是最高的转发优先级对应的待处理报文,也会被网络设备进行丢包处理,导致网络设备丢失协议报文、检测报文或较为重要的数据报文,使得网络设备被大量攻击报文攻击,影响网络设备的正常运行。If a network device receives attack packets that carry the highest forwarding priority, these attack packets will also be prioritized for processing by the network device, occupying the bandwidth of the network device. Since the total bandwidth of each network device is limited, the received attack packets will quickly cause network device congestion. For example, the total bandwidth of the received packets to be forwarded exceeds the total bandwidth of the network device. In this case, even the to-be-processed packets corresponding to the highest forwarding priority will be discarded by the network device, causing the network device to lose the protocol. Packets, detection packets, or more important data packets cause network devices to be attacked by a large number of attack packets, affecting the normal operation of network devices.
面对上述场景,目前的安全防御机制中,通过在网络设备上手动配置安全策略模板,该安全策略模板用于识别安全的报文,这样,网络设备即可对通过安全策略模板识别出的安全报文进行正常的转发,对于安全策略模板不能识别出的报文视作攻击报文,对攻击报文进行丢弃。但是,该安全防御机制中,由于安全策略模板是固定的,一方面,如果攻击报文仿冒成能够被安全策略模板识别的安全报文的格式,则,无法有效的防御该攻击报文;另一方面,如果网络中有新的业务,则,需要修改安全策略模板使得该安全策略模块能够识别出该新业务对应的报文,否则该新业务对应的报文将统统被丢弃,实现过程较为复杂。Faced with the above scenario, in the current security defense mechanism, a security policy template is manually configured on the network device, and the security policy template is used to identify secure packets. The packets are normally forwarded, and the packets that cannot be identified by the security policy template are regarded as attack packets, and the attack packets are discarded. However, in this security defense mechanism, since the security policy template is fixed, on the one hand, if the attack packet is forged into a format that can be recognized by the security policy template, the attack packet cannot be effectively defended; on the other hand, the attack packet cannot be effectively defended. On the one hand, if there is a new service in the network, the security policy template needs to be modified so that the security policy module can identify the packets corresponding to the new service, otherwise the packets corresponding to the new service will be discarded, and the implementation process is relatively complex.
基于此,本申请实施例提供了一种报文的处理方法,通信装置在确定通过某个端口传输的最高转发优先级的报文占用该端口的带宽满足条件时,即,在配置了最高转发优先级的攻击报文还未导致网络设备拥塞时,获取最高转发优先级的报文中的攻击报文的特征信息,并将攻击报文的特征信息发送给控制管理实体。从而,控制管理实体即可基于接收到的攻击报文的报文特征,生成报文处理策略,并向该通信装置发送报文处理策略,通信装置基于该报文处理策略对与攻击报文的特征信息匹配的报文进行处理(例如丢包和/或限速)。通过本申请提供的安全防御机制,能够有效的识别和处理攻击报文,有效避免基于高优先级报文进行攻击所导致网络设备拥塞,从而保证最高转发优先级的正常报文能够被有效的转发,使得通信装置提供正常的业务成为可能。Based on this, an embodiment of the present application provides a packet processing method. When the communication device determines that the packet with the highest forwarding priority transmitted through a certain port occupies the bandwidth of the port and satisfies the condition, that is, when the highest forwarding priority is configured When the attack packets of the highest priority have not yet caused congestion on the network device, the characteristic information of the attack packets in the packets with the highest forwarding priority is obtained, and the characteristic information of the attack packets is sent to the control management entity. Thus, the control management entity can generate a message processing strategy based on the message characteristics of the received attack message, and send the message processing strategy to the communication device. Packets with matching feature information are processed (eg packet loss and/or rate limiting). The security defense mechanism provided by this application can effectively identify and process attack packets, effectively avoid network equipment congestion caused by attacks based on high-priority packets, and ensure that normal packets with the highest forwarding priority can be effectively forwarded , making it possible for the communication device to provide normal services.
举例来说,以图1所示的网络10为例,该网络10中包括网络设备110、网络设备120、…、网络设备130和控制管理实体200。各网络设备中均包括流量管理(英文:Traffic Management,简称:TM)模块,例如网络设备110中包括TM模块111,网络设备120中包括TM模块121,网络设备130中包括TM模块131。TM模块用于对所属网络设备内的流量进行管理,例如统计网络设备上各端口对应的各转发优先级的报文的带宽。各网络设备至少具有报文转发的功能;控制管理实体200能够和各个网络设备进行数据交互,实现对网络设备的管理和控制。需要说明的是,该网络10中包括的网络设备的数量在本申请实施例中不作具体限定,例如网络设备可以多于3个,即,除了上述网络设备110、网络设备120和网络设备130以外,还包括其他的网络设备;或者,网络10中包括的网络设备数量也可以小于3。For example, taking the network 10 shown in FIG. 1 as an example, the network 10 includes a network device 110 , a network device 120 , . . . , a network device 130 , and a control management entity 200 . Each network device includes a traffic management (English: Traffic Management, TM for short) module. For example, the network device 110 includes a TM module 111 , the network device 120 includes a TM module 121 , and the network device 130 includes a TM module 131 . The TM module is used to manage the traffic in the network device to which it belongs, for example, to count the bandwidth of the packets of each forwarding priority corresponding to each port on the network device. Each network device at least has the function of message forwarding; the control and management entity 200 can perform data interaction with each network device, so as to realize the management and control of the network device. It should be noted that the number of network devices included in the network 10 is not specifically limited in this embodiment of the present application, for example, there may be more than three network devices, that is, in addition to the above-mentioned network device 110 , network device 120 , and network device 130 , other network devices are also included; or, the number of network devices included in the network 10 may also be less than 3.
作为一个示例,假设网络设备120上包括端口1,端口1的带宽为c,通过端口1传输的所有报文占用该端口1的带宽的阈值Th1=80%,通过端口1传输的最高转发优先级的报文占用该端口1的带宽的阈值Th2=70%。具体实现时,参见图2所示的流程示意图,攻击报文的处理过程可以包括:S11,网络设备120的TM模块121周期性的获取(例如每1秒 获取一次)通过端口1传输的报文的带宽a;S12,TM模块121判断是否满足(a÷c)≥Th1,如果满足,则,执行下述S13,否则,返回执行S11;S13,TM模块121获取通过端口1传输的最高转发优先级报文的带宽b;S14,TM模块121判断是否满足(b÷c)≥Th2,如果满足,则,执行下述S15,否则,返回执行S11;S15,TM模块121获取通过端口1传输的最高转发优先级的报文中的攻击报文的五元组(即,攻击报文的源互联网协议(英文:Internet Protocol,简称:IP)地址、目的IP地址、源端口号、目的端口号和协议版本号);S16,网络设备120将该攻击报文的五元组发送给控制管理实体200;S17,控制管理实体200基于攻击报文的五元组生成报文处理策略;S18,控制管理实体200将该报文处理策略发送给网络设备120;S19,网络设备120基于该报文处理策略对通过该端口1接收的报文中与攻击报文的五元组匹配的报文进行丢包或限速等处理。这样,通过设置阈值和上述的处理流程,能够在仿冒最高转发优先级的攻击报文还未造成严重的网络拥塞时就对攻击报文进行有效的抑制,避免网络设备上最高转发优先级的大量攻击报文抢占正常报文的带宽资源,造成最高转发优先级的正常报文被丢弃从而影响网络的正常运行,而且,随着攻击报文被有效抑制,能够降低最高转发优先级的正常报文的转发时延,提高转发性能,可见,本申请实施例提供的方法使得网络设备在存在攻击报文时仍然正常运行成为可能。As an example, assuming that the network device 120 includes port 1, the bandwidth of port 1 is c, the threshold Th1=80% of the bandwidth of port 1 is occupied by all packets transmitted through port 1, and the highest forwarding priority transmitted through port 1 The threshold Th2 = 70% of the bandwidth of the port 1 is occupied by the packets. For specific implementation, referring to the schematic flowchart shown in FIG. 2 , the processing process of the attack packet may include: S11, the TM module 121 of the network device 120 periodically acquires (for example, once every 1 second) the packet transmitted through the port 1 bandwidth a; S12, the TM module 121 judges whether (a÷c)≥Th1 is satisfied, if so, execute the following S13, otherwise, return to execute S11; S13, the TM module 121 obtains the highest forwarding priority transmitted through port 1 Bandwidth b of the class packet; S14, the TM module 121 judges whether (b÷c)≥Th2 is satisfied, if so, execute the following S15, otherwise, return to execute S11; The quintuple of the attack packet in the packet with the highest forwarding priority (that is, the source Internet Protocol (English: Internet Protocol, IP) address, destination IP address, source port number, destination port number and protocol version number); S16, the network device 120 sends the quintuple of the attack packet to the control management entity 200; S17, the control management entity 200 generates a packet processing policy based on the quintuple of the attack packet; S18, control management The entity 200 sends the packet processing policy to the network device 120; S19, the network device 120 discards packets that match the quintuple of the attack packet in the packets received through the port 1 based on the packet processing policy or speed limit, etc. In this way, by setting the threshold and the above processing flow, the attack packets with the highest forwarding priority can be effectively suppressed before the attack packets with the highest forwarding priority cause serious network congestion, so as to avoid a large number of the highest forwarding priority on the network device. Attack packets occupy the bandwidth resources of normal packets, causing normal packets with the highest forwarding priority to be discarded, which affects the normal operation of the network. Moreover, with the effective suppression of attack packets, normal packets with the highest forwarding priority can be reduced. It can be seen that the method provided by the embodiment of the present application makes it possible for the network device to still operate normally when there are attack packets.
可以理解的是,上述场景仅是本申请实施例提供的一个场景示例,本申请实施例并不限于此场景。It can be understood that the above scenario is only an example of a scenario provided by the embodiment of the present application, and the embodiment of the present application is not limited to this scenario.
需要说明的是,本申请实施例中的通信装置,可以是指能够实现报文转发功能的任意的网络设备,例如,通信装置可以是交换机、路由器等;或者,通信装置也可以是网络设备内具有报文转发功能的单板,芯片等。控制管理实体可以是能够对通信装置进行控制的任意设备或功能实体,例如,控制管理实体可以是具有控制功能的网络云化引擎(英文:Network Cloud Engine,简称:NCE)、服务器或者路由器等;或者,控制管理实体也可以是任意一个通信装置内集成的功能实体,该功能实体可以通过硬件形式体现也可以通过软件形式体现。通信装置中的TM模块,可以是指通信装置中的TM芯片或能够实现TM功能的功能模块。It should be noted that the communication device in this embodiment of the present application may refer to any network device capable of implementing a message forwarding function. For example, the communication device may be a switch, a router, etc.; or, the communication device may also be an internal network device. A single board, chip, etc. with the packet forwarding function. The control management entity may be any device or functional entity capable of controlling the communication device, for example, the control management entity may be a network cloud engine (English: Network Cloud Engine, NCE for short), a server or a router with control functions; Alternatively, the control management entity may also be a functional entity integrated in any communication device, and the functional entity may be embodied in the form of hardware or in the form of software. The TM module in the communication device may refer to a TM chip in the communication device or a functional module capable of realizing the TM function.
需要说明的是,本申请实施例中通信装置的端口可以是该通信装置的物理端口也可以是该通信装置的逻辑端口。It should be noted that, the port of the communication device in the embodiment of the present application may be a physical port of the communication device or a logical port of the communication device.
下面结合附图,通过实施例来详细说明本申请实施例中一种报文的处理方法的具体实现方式。A specific implementation manner of a packet processing method in an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
本申请实施例提供的一种报文的处理方法100,该方法100由第一通信装置实施,该第一通信装置可以是网络中具有报文转发功能的任意网络设备或网络设备内的单板、芯片等,例如,在图1所示的场景中,网络设备110、网络设备120、网络设备130均可以作为第一通信装置实施该方法100。图3为本申请实施例中一种报文的处理方法100的流程示意图。参见图3,该方法100例如可以包括:A method 100 for processing a packet provided in an embodiment of the present application is implemented by a first communication device, where the first communication device may be any network device with a packet forwarding function in the network or a single board in the network device , chip, etc. For example, in the scenario shown in FIG. 1 , the network device 110 , the network device 120 , and the network device 130 can all be used as the first communication apparatus to implement the method 100 . FIG. 3 is a schematic flowchart of a packet processing method 100 according to an embodiment of the present application. Referring to FIG. 3, the method 100 may include, for example:
S101,确定通过第一端口传输的最高转发优先级的报文占用该第一端口的带宽满足第一条件。S101. Determine that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies the first condition.
其中,报文中携带的转发优先级,用于指示转发该报文的通信装置转发该报文的优先程度,转发优先级越高,表征该报文越重要,通信装置越要优先转发该报文。例如,报文的转发优先级可以被划分为优先级0到优先级7,则优先级7的报文为最高转发优先级的报文。需要说明的是,报文的转发优先级以及最高转发优先级可以向后兼容,本申请实施例中所指的最高转发优先级,可以是之后出现的任意场景下最高的报文优先级。The forwarding priority carried in the message is used to indicate the priority of the communication device that forwards the message to forward the message. The higher the forwarding priority, the more important the message is, and the more important the communication device is to forward the message. Arts. For example, the forwarding priorities of the packets can be divided into priority 0 to priority 7, and the packet with priority 7 is the packet with the highest forwarding priority. It should be noted that the forwarding priority and the highest forwarding priority of a packet may be backward compatible, and the highest forwarding priority referred to in the embodiments of this application may be the highest packet priority in any scenario that occurs later.
报文的转发优先级,可以通过报文的优先级字段携带,第一通信装置可以通过解析所接收到报文的优先级字段,确定该报文所属的转发优先级。The forwarding priority of the packet may be carried in the priority field of the packet, and the first communication device may determine the forwarding priority to which the packet belongs by parsing the priority field of the received packet.
第一条件,是第一通信装置为第一端口定义的、用于确定是否需要对该第一端口实施攻击报文的处理的条件。此外,第一通信装置也可以为每个端口设置对应的条件,例如,第一通信装置可以为第二端口设置对应的第三条件,该第三条件和第一条件可以相同也可以不同,本申请实施例中以第一通信装置上的某个端口为例进行说明。The first condition is a condition defined by the first communication device for the first port and used to determine whether the attack packet processing needs to be performed on the first port. In addition, the first communication device may also set a corresponding condition for each port. For example, the first communication device may set a corresponding third condition for the second port, and the third condition and the first condition may be the same or different. In the application embodiments, a certain port on the first communication device is used as an example for description.
作为一个示例,第一条件可以是通过第一端口传输的最高转发优先级的报文占用该第一端口的带宽的比例大于或等于第一阈值。其中,第一阈值为第一通信装置上预先为该第一端口对应设置的执行下述S102和S103的触发条件。例如,第一阈值为70%,该第一端口的带宽为20兆字节每秒(英文:Gb/s),第一通信装置获取通过该第一端口传输的最高转发优先级的报文为15Gb/s,则,第一通信装置确定该第一端口上最高转发优先级的报文占用该第一端口的带宽的比例为(15÷20)=75%,大于第一阈值70%,从而确定通过第一端口传输的最高转发优先级的报文占用该第一端口的带宽满足第一条件。相应的,第三条件可以是通过第二端口传输的最高转发优先级的报文占用该第二端口的带宽的比例大于或等于第五阈值,其中,第五阈值可以等于第一阈值,也可以不等于第一阈值。As an example, the first condition may be that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold. The first threshold is a trigger condition for executing the following S102 and S103 correspondingly set in advance on the first communication device for the first port. For example, the first threshold is 70%, the bandwidth of the first port is 20 megabytes per second (English: Gb/s), and the first communication device obtains the packet with the highest forwarding priority transmitted through the first port as 15Gb/s, then, the first communication device determines that the ratio of the bandwidth of the first port occupied by the packet with the highest forwarding priority on the first port is (15÷20)=75%, which is greater than the first threshold of 70%, so It is determined that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies the first condition. Correspondingly, the third condition may be that the ratio of the bandwidth of the second port occupied by the packets with the highest forwarding priority transmitted through the second port is greater than or equal to the fifth threshold, where the fifth threshold may be equal to the first threshold, or not equal to the first threshold.
作为另一个示例,第一条件也可以是通过第一端口传输的最高转发优先级的报文大于或等于第二阈值。其中,第二阈值为第一通信装置上预先为该第一端口对应设置的执行下述S102和S103的触发条件。例如,第二阈值为15Gb/s,该第一端口的带宽为20Gb/s,第一通信装置获取通过该第一端口传输的最高转发优先级的报文为15Gb/s,则,第一通信装置确定该第一端口上最高转发优先级的报文的大小等于该第二阈值15Gb/s,从而确定通过第一端口传输的最高转发优先级的报文占用该第一端口的带宽满足第一条件。相应的,第三条件可以是通过第二端口传输的最高转发优先级的报文大于或等于第六阈值,其中,第六阈值可以等于第二阈值,也可以不等于第二阈值。As another example, the first condition may also be that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold. Wherein, the second threshold is a trigger condition for executing the following S102 and S103 correspondingly set in advance on the first communication device for the first port. For example, if the second threshold is 15 Gb/s, the bandwidth of the first port is 20 Gb/s, and the packet with the highest forwarding priority acquired by the first communication device through the first port is 15 Gb/s, then the first communication The device determines that the size of the message with the highest forwarding priority on the first port is equal to the second threshold of 15 Gb/s, thereby determining that the message with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port to satisfy the first port. condition. Correspondingly, the third condition may be that the packet with the highest forwarding priority transmitted through the second port is greater than or equal to the sixth threshold, where the sixth threshold may or may not be equal to the second threshold.
在一些可能的实现方式中,第一通信装置可以周期性(例如100毫秒)的获取通过第一端口传输的最高转发优先级的报文的大小,并判断通过第一端口传输的最高转发优先级的报文占用该第一端口的带宽是否满足第一条件。同理,第一通信装置也可以周期性的获取通过第二端口传输的最高转发优先级的报文的大小,并判断通过第二端口传输的最高转发优先级的报文占用该第二端口的带宽是否满足第二条件。这样,第一通信装置能够及时发现通过各端口传输的最高转发优先级的报文占用各端口的带宽的情况,如果发现某个端口上传输的最高转发优先级的报文占用该端口的带宽较多,从而对该端口进行下述S102~S103的处理,避免该端口发生拥塞影响对最高转发优先级的正常报文的转发。In some possible implementations, the first communication device may periodically (for example, 100 milliseconds) obtain the size of the packet with the highest forwarding priority transmitted through the first port, and determine the highest forwarding priority transmitted through the first port Whether the bandwidth occupied by the packets of the first port satisfies the first condition. Similarly, the first communication device may also periodically obtain the size of the packet with the highest forwarding priority transmitted through the second port, and determine that the packet with the highest forwarding priority transmitted through the second port occupies the size of the second port. Whether the bandwidth satisfies the second condition. In this way, the first communication device can timely find out that the packet with the highest forwarding priority transmitted through each port occupies the bandwidth of each port. Therefore, the following processes S102 to S103 are performed on the port, so as to prevent the congestion of the port from affecting the forwarding of normal packets with the highest forwarding priority.
在另一些可能的实现方式中,第一通信装置也可以基于事件触发,获取通过第一端口 传输的最高转发优先级的报文的大小,并判断通过第一端口传输的最高转发优先级的报文占用该第一端口的带宽是否满足第一条件。例如,该触发执行S101的事件包括但不限定于:第一通信装置确定通过该第一端口传输的所有报文满足第二条件,其中,第二条件是第一通信装置为第一端口定义的、用于确定是否需要对该第一端口上最高转发优先级的报文进行测量的条件。当确定通过第一端口传输的所有报文占用该第一端口的带宽满足第二条件,则表示该第一端口上的占用率较大,需要获取通过该第一端口传输的最高转发优先级的报文并判断该第一端口上最高转发优先级的报文占用该第一端口的带宽是否满足第一条件,以保障最高转发优先级的正常报文能够正常转发。此外,第一通信装置也可以为每个端口设置对应的事件触发的条件,例如,第一通信装置可以为第二端口设置对应的第四条件,该第四条件和第二条件可以相同也可以不同,本申请实施例中以第一通信装置上的某个端口为例进行说明。In some other possible implementation manners, the first communication device may also, based on an event trigger, acquire the size of the packet with the highest forwarding priority transmitted through the first port, and determine the packet with the highest forwarding priority transmitted through the first port. Whether the bandwidth occupied by the file on the first port satisfies the first condition. For example, the event triggering the execution of S101 includes but is not limited to: the first communication device determines that all packets transmitted through the first port satisfy the second condition, where the second condition is defined by the first communication device for the first port , a condition for determining whether to measure the packet with the highest forwarding priority on the first port. When it is determined that the bandwidth of the first port occupied by all packets transmitted through the first port satisfies the second condition, it means that the occupancy rate on the first port is relatively large, and it is necessary to obtain the highest forwarding priority transmitted through the first port. and determine whether the bandwidth of the first port occupied by the packet with the highest forwarding priority on the first port satisfies the first condition, so as to ensure that the normal packet with the highest forwarding priority can be normally forwarded. In addition, the first communication device may also set a corresponding event-triggered condition for each port. For example, the first communication device may set a corresponding fourth condition for the second port, and the fourth condition and the second condition may be the same or the same Differently, in the embodiments of the present application, a certain port on the first communication device is used as an example for description.
作为一个示例,第二条件可以是通过第一端口传输的所有报文占用该第一端口的带宽的比例大于或等于第三阈值。其中,第三阈值为第一通信装置上预先为该第一端口对应设置的阈值。例如,第三阈值为80%,该第一端口的带宽为20兆字节每秒(英文:Gb/s),第一通信装置获取通过该第一端口传输的所有报文为17Gb/s,则,第一通信装置确定该第一端口上的所有报文占用该第一端口的带宽的比例为(17÷20)=85%,大于第三阈值80%,从而确定通过第一端口传输的所有报文占用该第一端口的带宽满足第二条件。其中,第三阈值和第一阈值的大小关系不作具体限定。相应的,第四条件可以是通过第二端口传输的所有报文占用该第二端口的带宽的比例大于或等于第七阈值,其中,第七阈值可以等于第三阈值,也可以不等于第三阈值。As an example, the second condition may be that the proportion of all packets transmitted through the first port occupying the bandwidth of the first port is greater than or equal to the third threshold. The third threshold is a threshold corresponding to the first port pre-set on the first communication device. For example, the third threshold is 80%, the bandwidth of the first port is 20 megabytes per second (English: Gb/s), and the first communication device obtains all packets transmitted through the first port as 17 Gb/s, Then, the first communication device determines that the proportion of all packets on the first port occupying the bandwidth of the first port is (17÷20)=85%, which is greater than the third threshold of 80%, so as to determine that the packets transmitted through the first port are The bandwidth occupied by all packets on the first port satisfies the second condition. The magnitude relationship between the third threshold and the first threshold is not specifically limited. Correspondingly, the fourth condition may be that the proportion of all packets transmitted through the second port occupying the bandwidth of the second port is greater than or equal to the seventh threshold, where the seventh threshold may be equal to the third threshold, or may not be equal to the third threshold. threshold.
作为另一个示例,第二条件也可以是通过第一端口传输的所有报文大于或等于第四阈值。其中,第四阈值为第一通信装置上预先为该第一端口对应设置的阈值。例如,第四阈值为18Gb/s,该第一端口的带宽为20Gb/s,第一通信装置获取通过该第一端口传输的所有报文为18.5Gb/s,则,第一通信装置确定该第一端口上传输的所有报文的大小大于第四阈值18Gb/s,从而确定通过第一端口传输的所有报文占用该第一端口的带宽满足第二条件。其中,第四阈值和第二阈值的大小关系不作具体限定。相应的,第四条件可以是通过第二端口传输的所有报文大于或等于第八阈值,其中,第八阈值可以等于第四阈值,也可以不等于第四阈值。As another example, the second condition may also be that all packets transmitted through the first port are greater than or equal to the fourth threshold. The fourth threshold is a threshold corresponding to the first port set in advance on the first communication device. For example, if the fourth threshold is 18 Gb/s, the bandwidth of the first port is 20 Gb/s, and the first communication device acquires that all packets transmitted through the first port are 18.5 Gb/s, the first communication device determines that the The size of all the packets transmitted on the first port is greater than the fourth threshold of 18 Gb/s, so it is determined that the bandwidth of the first port occupied by all the packets transmitted through the first port satisfies the second condition. The magnitude relationship between the fourth threshold and the second threshold is not specifically limited. Correspondingly, the fourth condition may be that all packets transmitted through the second port are greater than or equal to the eighth threshold, where the eighth threshold may or may not be equal to the fourth threshold.
例如,第一通信装置上设置有第一阈值70%和第三阈值80%,则,在S101之前,该方法100还可以包括:S21,第一通信装置轮询第一端口,获取通过第一端口传输的所有报文的大小;S22,第一通信装置判断通过该第一端口传输的所有报文占该第一端口的带宽的比例是否大于或等于第三阈值,如果大于或等于,则,执行S23,否则,继续按照该S21继续轮询;S23,第一通信装置获取通过该第一端口传输的最高转发优先级的报文的大小;S24,第一通信装置判断通过该第一端口传输的最高转发优先级的报文占用该第一端口的带宽的比例是否大于或等于第一阈值,如果大于或等于,则,执行S101,即,确定通过该第一端口传输的最高转发优先级的报文占用该第一端口的带宽满足第一条件。For example, if the first communication device is set with a first threshold of 70% and a third threshold of 80%, then, before S101, the method 100 may further include: S21, the first communication device polls the first port, and obtains information through the first communication device. The size of all packets transmitted by the port; S22, the first communication device determines whether the ratio of all packets transmitted through the first port to the bandwidth of the first port is greater than or equal to a third threshold, and if greater than or equal to, then, Execute S23, otherwise, continue to poll according to this S21; S23, the first communication device obtains the size of the message with the highest forwarding priority transmitted through the first port; S24, the first communication device determines to transmit through the first port Whether the proportion of the bandwidth of the first port occupied by the packets with the highest forwarding priority of the The bandwidth occupied by the packet on the first port satisfies the first condition.
对于S21中的轮询,具体可以是通过第一通信装置的TM模块的定时器实现的,例如, 设置定时器的定时时间为1秒,在定时器计时达到1秒时,获取一次通过该第一端口传输的最高转发优先级的报文的大小。The polling in S21 may be specifically implemented by the timer of the TM module of the first communication device. For example, the timing of the timer is set to 1 second, and when the timer counts up to 1 second, a pass through the first time is obtained. The size of the packet with the highest forwarding priority transmitted by a port.
其中,第一通信装置获取通过第一端口传输的所有报文的大小,以及,获取通过第一端口传输的最高转发优先级的报文的大小,均可以是第一通信装置通过自身的TM模块对该第一端口执行测量操作实现的。Wherein, the first communication device obtains the size of all packets transmitted through the first port, and obtains the size of the packet with the highest forwarding priority transmitted through the first port, both of which may be obtained by the first communication device through its own TM module This is achieved by performing a measurement operation on the first port.
其中,第一通信装置可以根据运行网络场景的不同,对通过第一端口传输的该网络场景下的最高转发优先级的报文进行监控和处理。例如,第一通信装置可以运行在第四版互联网协议(英文:Internet Protocol version 4,简称:IPv4)网络、在第六版互联网协议(英文:Internet Protocol version 6,简称:IPv6)网络、虚拟专用网(英文:Virtual Private Network,简称:VPN)网络、多协议标签交换(英文:Multiprotocol Label Switching,简称:MPLS)网络、虚拟扩展局域网(英文:Virtual Extensible Local Area Network,简称:VXLAN)等网络环境中。以第一通信装置运行在IPv6网络为例,第一条件可以是通过第一端口传输的最高转发优先级的IPv6报文占用该第一端口的带宽的比例大于或等于第一阈值;或者,第一条件也可以是通过第一端口传输的最高转发优先级的IPv6报文大于或等于第二阈值。该实施例中,第二条件可以是通过第一端口传输的所有IPv6报文占用该第一端口的带宽的比例大于或等于第三阈值;或者,第二条件也可以是通过第一端口传输的所有IPv6报文大于或等于第四阈值。Wherein, the first communication device may monitor and process the packets with the highest forwarding priority in the network scenario transmitted through the first port according to different operating network scenarios. For example, the first communication device may run on the Internet Protocol version 4 (English: Internet Protocol version 4, referred to as: IPv4) network, on the Internet Protocol version 6 (English: Internet Protocol version 6, referred to as: IPv6) network, virtual private Network (English: Virtual Private Network, referred to as: VPN) network, Multiprotocol Label Switching (English: Multiprotocol Label Switching, referred to as: MPLS) network, Virtual Extended Local Area Network (English: Virtual Extensible Local Area Network, referred to as: VXLAN) and other network environments middle. Taking the first communication device running on an IPv6 network as an example, the first condition may be that the proportion of the bandwidth of the first port occupied by the IPv6 packet with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold; A condition may also be that the IPv6 packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold. In this embodiment, the second condition may be that the proportion of the bandwidth of the first port occupied by all IPv6 packets transmitted through the first port is greater than or equal to the third threshold; or, the second condition may also be that the bandwidth of the first port is transmitted through the first port. All IPv6 packets are greater than or equal to the fourth threshold.
可见,当第一通信装置确定通过第一端口传输的最高转发优先级的报文占用该第一端口的带宽满足第一条件时,可以认为该第一端口上传输的报文较多,该第一端口上传输的报文中可能存在攻击报文,该第一端口上的最高转发优先级的协议报文、测试报文等重要的报文有可能被丢包,从而影响第一通信装置的正常运行。为了确保该第一通信装置上通过该第一端口传输的最高转发优先级的正常报文能够正常被转发,第一通信装置可以通过执行下述S102~S103进行攻击报文的处理。It can be seen that when the first communication device determines that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies the first condition, it can be considered that there are many packets transmitted on the first port, and the first port has more packets. There may be attack packets in the packets transmitted on a port, and important packets such as protocol packets and test packets with the highest forwarding priority on the first port may be lost, thereby affecting the security of the first communication device. normal operation. In order to ensure that the normal packet with the highest forwarding priority transmitted on the first communication device through the first port can be normally forwarded, the first communication device may process the attack packet by executing the following S102-S103.
S102,获取所述通过第一端口传输的最高转发优先级的报文中的第一攻击报文的特征信息。S102: Acquire feature information of a first attack packet in the packet with the highest forwarding priority transmitted through the first port.
其中,攻击报文的特征信息是指能够标识该攻击报文以及该攻击报文所属的攻击流的特征信息。攻击报文的特征信息具体可以是该攻击报文的五元组中的全部或部分内容,例如,攻击报文为IP报文,该攻击报文的特征信息可以包括下述信息中的一个或多个:源IP地址、目的IP地址、源端口号、目的端口号或传输层协议号;又例如,攻击报文为MPLS报文,该攻击报文的特征信息可以包括下述信息中的一个或多个:MPLS标签、所述攻击报文的源媒体接入控制(英文:Media Access Control,简称:MAC)地址、目的MAC地址、源IP地址和目的IP地址。The characteristic information of the attack packet refers to characteristic information that can identify the attack packet and the attack flow to which the attack packet belongs. The characteristic information of the attack packet may specifically be all or part of the contents of the five-tuple of the attack packet. For example, if the attack packet is an IP packet, the characteristic information of the attack packet may include one of the following information or Multiple: source IP address, destination IP address, source port number, destination port number or transport layer protocol number; for another example, if the attack packet is an MPLS packet, the characteristic information of the attack packet may include one of the following information or multiple: MPLS label, source media access control (English: Media Access Control, MAC for short) address of the attack packet, destination MAC address, source IP address, and destination IP address.
作为一个示例,攻击报文的特征信息可以是源IP地址、目的IP地址、源端口号、目的端口号和传输层协议号,第一通信装置从通过该第一端口传输的最高转发优先级的报文中,根据各报文的源IP地址、目的IP地址、源端口号、目的端口号和传输层协议号,确定第一攻击报文,从而获取该第一攻击报文的源IP地址、目的IP地址、源端口号、目的端口号和传输层协议号,作为S102中所获取的最高转发优先级的报文中的第一攻击报文的 特征信息。As an example, the characteristic information of the attack packet may be a source IP address, a destination IP address, a source port number, a destination port number, and a transport layer protocol number. In the packet, the first attack packet is determined according to the source IP address, destination IP address, source port number, destination port number and transport layer protocol number of each packet, so as to obtain the source IP address, The destination IP address, source port number, destination port number, and transport layer protocol number are used as feature information of the first attack packet in the packet with the highest forwarding priority obtained in S102.
作为另一个示例,攻击报文的特征信息可以是源端口号和目的端口号,第一通信装置从通过该第一端口传输的最高转发优先级的报文中,根据各报文的源端口号和目的端口号,确定第一攻击报文,从而获取该第一攻击报文的源端口号和目的端口号,作为S102中所获取的最高转发优先级的报文中的第一攻击报文的特征信息。例如,源端口号和目的端口号在不断跳变的报文,可以被第一通信装置确定为第一攻击报文。As another example, the characteristic information of the attack packet may be the source port number and the destination port number, and the first communication device selects the source port number of each packet from the packets with the highest forwarding priority transmitted through the first port. and the destination port number to determine the first attack packet, so as to obtain the source port number and destination port number of the first attack packet, as the first attack packet in the packet with the highest forwarding priority obtained in S102. characteristic information. For example, a packet whose source port number and destination port number are constantly changing may be determined by the first communication device as the first attack packet.
作为又一个示例,攻击报文的特征信息可以是源MAC地址和目的MAC地址,第一通信装置从通过该第一端口传输的最高转发优先级的报文中,根据各报文的源MAC地址和目的MAC地址,确定第一攻击报文,从而获取该第一攻击报文的源MAC地址和目的MAC地址,作为S102中所获取的最高转发优先级的报文中的第一攻击报文的特征信息。例如,源MAC地址和目的MAC地址发生变化的报文,可以被第一通信装置确定为第一攻击报文。As another example, the characteristic information of the attack packet may be the source MAC address and the destination MAC address, and the first communication device selects the source MAC address of each packet from the packets with the highest forwarding priority transmitted through the first port. and the destination MAC address to determine the first attack packet, so as to obtain the source MAC address and destination MAC address of the first attack packet, as the first attack packet in the packet with the highest forwarding priority obtained in S102. characteristic information. For example, a packet in which the source MAC address and the destination MAC address change may be determined by the first communication device as the first attack packet.
具体实现时,第一通信装置的TM模块可以从通过该第一端口传输的最高转发优先级的报文中,确定第一攻击报文,并获取第一攻击报文的特征信息,为后续对第一攻击报文的处理提供了基础,使得能够感知和抑制第一攻击报文,为第一通信装置的正常运行提供了条件。During specific implementation, the TM module of the first communication device may determine the first attack packet from the packets with the highest forwarding priority transmitted through the first port, and obtain feature information of the first attack packet, which is used for subsequent The processing of the first attack packet provides a basis, so that the first attack packet can be sensed and suppressed, and conditions are provided for the normal operation of the first communication device.
S103,向控制管理实体发送该第一攻击报文的特征信息。S103: Send the feature information of the first attack packet to the control management entity.
具体实现时,S103例如可以是:第一通信装置向控制管理实体发送指示报文,该指示报文中携带S102所获取的第一攻击报文的特征信息。When specifically implemented, S103 may be, for example, that the first communication device sends an indication message to the control management entity, where the indication message carries the feature information of the first attack message acquired in S102.
其中,该指示报文可以是下述报文中的任意一种:边界网关协议(英文:Border Gateway Protocol,简称:BGP)报文、路径计算单元通信协议(英文:Path Computation Element Communication Protocol,简称:PCEP)报文、遥感勘测(英文:Telemetry)报文或网络配置协议(英文:Network Configuration Protocol,简称:NETCONF)报文。例如,可以通过上述任一类型的报文中扩展的类型长度值(英文:Type Length Value,简称:TLV)字段携带第一攻击报文的特征信息。又例如,也可以通过上述任一类型的报文中的预留(英文:Reserved)字段等其他可用字段携带第一攻击报文的特征信息。Wherein, the indication message can be any one of the following messages: Border Gateway Protocol (English: Border Gateway Protocol, referred to as: BGP) message, Path Computation Element Communication Protocol (English: Path Computation Element Communication Protocol, referred to as: BGP) message : PCEP) message, telemetry (English: Telemetry) message or Network Configuration Protocol (English: Network Configuration Protocol, referred to as: NETCONF) message. For example, the characteristic information of the first attack packet may be carried through an extended type length value (English: Type Length Value, TLV for short) field in any of the foregoing types of packets. For another example, the feature information of the first attack packet may also be carried through other available fields such as a reserved (English: Reserved) field in any of the foregoing types of packets.
如果控制管理实体和第一通信装置分别属于两个不同的设备,以指示报文为Telemetry报文为例,在执行S103之前,还需要第一通信装置和控制管理实体之间通过路由协议实现网络层的连通,并且在第一通信装置和控制管理实体上配置并开启Telemetry功能,这样,在S102之后,第一通信装置即可将第一攻击报文的特征信息携带在Telemetry报文中发送给控制管理实体。If the control management entity and the first communication device belong to two different devices respectively, taking the indication message as a Telemetry message as an example, before executing S103, it is also necessary to implement a network between the first communication device and the control management entity through a routing protocol. Layer connectivity, and configure and enable the Telemetry function on the first communication device and the control management entity, so that after S102, the first communication device can carry the feature information of the first attack packet in the Telemetry packet and send it to Control management entity.
在一些可能的实现方式中,第一通信装置可以周期性的向控制管理实体发送攻击检测结果,控制管理实体确定所接收的攻击检测结果中包括第一攻击报文的特征信息之后,就可以主动的生成针对该第一攻击报文的报文处理策略。或者,第一通信装置进行在检测到第一攻击报文时,才向控制管理实体发送该第一攻击报文的特征信息,此时,控制管理实体也可以主动的生成针对该第一攻击报文的报文处理策略。In some possible implementations, the first communication device may periodically send the attack detection result to the control management entity, and the control management entity may take the initiative to determine that the received attack detection result includes the feature information of the first attack packet. generates a packet processing policy for the first attack packet. Alternatively, the first communication device sends the feature information of the first attack packet to the control management entity only when the first attack packet is detected. At this time, the control management entity may also actively generate a report against the first attack packet message processing policy.
在另一些可能的实现方式中,第一通信装置除了向控制管理实体发送第一攻击报文的特征信息以外,还可以向该控制管理实体发送指示信息,用于指示控制管理实体生成报文 处理策略,该报文处理策略用于对与第一攻击报文的特征信息匹配的报文进行处理。需要说明的是,第一通信装置可以将指示信息和第一攻击报文的特征信息携带在一个指示报文中发送给控制管理实体,或者,第一通信装置可以将指示信息和第一攻击报文的特征信息分别携带在不同的指示报文中分别发送给控制管理实体。其中,用于承载指示信息的指示报文可以是下述报文中的任意一种:BGP报文、PCEP报文、Telemetry报文或NETCONF报文。In some other possible implementation manners, in addition to sending the feature information of the first attack packet to the control management entity, the first communication device may also send indication information to the control management entity for instructing the control management entity to generate packet processing policy, where the packet processing policy is used to process packets matching the feature information of the first attack packet. It should be noted that the first communication device may carry the indication information and the characteristic information of the first attack packet in an indication packet and send it to the control management entity, or the first communication device may send the indication information and the first attack packet to the control management entity. The feature information of the message is carried in different indication messages and sent to the control management entity respectively. The indication message for carrying the indication information may be any one of the following messages: a BGP message, a PCEP message, a Telemetry message or a NETCONF message.
如果控制管理实体和第一通信装置分别属于一个网络设备,以指示报文为Telemetry报文为例,在执行S103之前,需要第一通信装置和控制管理实体上配置并开启Telemetry功能,这样,在S102之后,第一通信装置即可将第一攻击报文的特征信息通过Telemetry数据的形式发送给控制管理实体。If the control management entity and the first communication device belong to one network device respectively, taking the indication message as an example of a Telemetry message, before executing S103, the first communication device and the control management entity need to be configured and enabled with the Telemetry function. After S102, the first communication device may send the feature information of the first attack packet to the control management entity in the form of Telemetry data.
可见,通过本申请实施例提供的方法100,第一通信装置在确定通过第一端口传输的最高转发优先级的报文占用该第一端口的带宽满足第一条件时,就能够获取最高转发优先级的报文中的第一攻击报文的特征信息,并将第一攻击报文的特征信息发送给控制管理实体。从而,使得控制管理实体即可基于接收到的第一攻击报文的报文特征,生成报文处理策略,并向通信装置发送报文处理策略,从而,接收到报文处理策略的通信装置就能够基于该报文处理策略对与第一攻击报文的特征信息匹配的报文进行处理(例如丢包和/或限速),这样,在第一攻击报文未导致第一通信装置的端口拥塞、威胁第一通信装置安全的情况下,该安全防御机制就有效的识别和处理了攻击报文,确保攻击报文不会导致通信装置拥塞,从而保证最高转发优先级的安全报文能够被有效的转发,使得第一通信装置提供正常的业务成为可能。It can be seen that with the method 100 provided in this embodiment of the present application, the first communication device can obtain the highest forwarding priority when it is determined that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies the first condition The feature information of the first attack packet in the packets of the highest level is sent to the control management entity. Therefore, the control management entity can generate a message processing strategy based on the message characteristics of the received first attack message, and send the message processing strategy to the communication device, so that the communication device that receives the message processing strategy The packet that matches the characteristic information of the first attack packet can be processed based on the packet processing policy (for example, packet loss and/or speed limit), so that the first attack packet does not cause the port of the first communication device In the case of congestion that threatens the security of the first communication device, the security defense mechanism can effectively identify and process attack packets to ensure that the attack packets will not cause the communication device to be congested, thereby ensuring that the security packets with the highest forwarding priority can be transmitted. Effective forwarding makes it possible for the first communication device to provide normal services.
上述是以对第一端口上传输的最高转发优先级的报文中的攻击报文的处理为例,对本申请实施例提供的报文的处理方法的实现方式以及效果的描述,同理,该方法可以被适用于其他端口,例如,在确定通过第二端口传输的最高转发优先级的报文占用该第二端口的带宽满足第三条件时,获取所述通过第二端口传输的最高转发优先级的报文中的第二攻击报文的特征信息,并向控制管理实体发送该第二攻击报文的特征信息。其中,第一攻击报文和第二攻击报文中的“第一”和“第二”仅是为了区别不同端口上传输的最高转发优先级的攻击报文,并不特指某个报文。The above takes the processing of the attack packet in the packet with the highest forwarding priority transmitted on the first port as an example, and describes the implementation and effect of the packet processing method provided in the embodiment of the present application. Similarly, this The method can be applied to other ports. For example, when it is determined that the bandwidth of the packet with the highest forwarding priority transmitted through the second port occupies the bandwidth of the second port and satisfies the third condition, the highest forwarding priority transmitted through the second port is obtained. The characteristic information of the second attack packet in the packets of the advanced level is sent to the control management entity. Among them, the "first" and "second" in the first attack packet and the second attack packet are only to distinguish the attack packets with the highest forwarding priority transmitted on different ports, and do not refer to a certain packet. .
在另一些可能的实现方式中,第一通信装置可以在确定通过第一端口传输的最高转发优先级的报文占用该第一端口的带宽满足第一条件时,分析该通过第一端口传输的最高转发优先级的报文,确定通过该第一端口传输的最高转发优先级的报文中包括攻击报文。该实现方式中,第一通信装置还可以向网管发送告警信号,用于向网管通告该第一通信装置上具有攻击报文,以便网管对该第一通信装置以及可能传输攻击报文的通信装置进行管理和控制,确保网络安全性。In some other possible implementation manners, the first communication apparatus may analyze the packet transmitted through the first port when determining that the bandwidth of the packet with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port and satisfies the first condition. For the packets with the highest forwarding priority, it is determined that the packets with the highest forwarding priority transmitted through the first port include attack packets. In this implementation manner, the first communication device may also send an alarm signal to the network management device to notify the network management that there is an attack packet on the first communication device, so that the network management can respond to the first communication device and the communication device that may transmit attack packets. Manage and control to ensure network security.
此外,本申请实施例还提供了另一种攻击报文的处理方法200,如图4所示,该方法200中,在上述方法100的S103之后,还可以包括:In addition, the embodiment of the present application also provides another method 200 for processing attack packets. As shown in FIG. 4 , in the method 200, after S103 of the above method 100, the method may further include:
S104,控制管理实体基于第一攻击报文的特征信息,生成报文处理策略,该报文处理 策略用于对与第一攻击报文的特征信息匹配的报文进行处理。S104, the control and management entity generates a packet processing policy based on the characteristic information of the first attack packet, where the packet processing policy is used to process the packet matching the characteristic information of the first attack packet.
其中,该报文处理策略例如可以包括第一攻击报文的特征信息和处理策略。第一攻击报文的特征信息用于说明待处理的报文的特征信息,使得执行该报文处理策略的第二通信装置能够确定出待按照处理策略进行处理的攻击报文。处理策略,是指对待处理报文执行的具体处理操作,例如可以是丢包操作,即,对与第一攻击报文的特征信息匹配的报文进行丢包处理;又例如可以是限速操作,即,对与第一攻击报文的特征信息匹配的报文进行限速处理。无论是丢包还是限速,均能够有效的减少攻击报文对网络资源的抢占,尤其降低了最高转发优先级的正常报文的带宽资源发生不足的概率。The packet processing strategy may include, for example, feature information and a processing strategy of the first attack packet. The characteristic information of the first attack packet is used to describe the characteristic information of the to-be-processed packet, so that the second communication device executing the packet processing policy can determine the attack packet to be processed according to the processing policy. The processing strategy refers to the specific processing operation performed on the to-be-processed packet. For example, it can be a packet loss operation, that is, packet loss processing is performed on the packet matching the characteristic information of the first attack packet; for example, it can be a rate-limiting operation. , that is, performing rate-limiting processing on the packets matching the characteristic information of the first attack packet. Whether it is packet loss or rate limiting, it can effectively reduce the preemption of network resources by attack packets, especially the probability of insufficient bandwidth resources for normal packets with the highest forwarding priority.
其中,对于处理策略,可以采用目前任何的丢包和/或限速处理的算法,在本申请实施例中不作具体限定。Wherein, for the processing strategy, any current algorithm for packet loss and/or rate limiting processing may be adopted, which is not specifically limited in this embodiment of the present application.
S105,控制管理实体向第二通信装置发送报文处理策略。S105, the control management entity sends a message processing policy to the second communication apparatus.
该第二通信装置和第一通信装置可以属于同一个网络设备,也可以属于两个不同的网络设备。The second communication apparatus and the first communication apparatus may belong to the same network device, or may belong to two different network devices.
控制管理实体具体可以将报文处理策略携带在BGP报文、PCEP报文、Telemetry报文或NETCONF报文中发送给第二通信装置。Specifically, the control management entity may carry the message processing policy in a BGP message, a PCEP message, a Telemetry message or a NETCONF message and send it to the second communication device.
此外,该控制管理实体也可以向第二通信装置发送指示信息,用于指示第二通信装置依据该报文处理策略对与第一攻击报文的特征信息匹配的报文进行处理。In addition, the control and management entity may also send indication information to the second communication device for instructing the second communication device to process the packet matching the feature information of the first attack packet according to the packet processing policy.
S106,第二通信装置基于报文处理策略,对与第一攻击报文的特征信息匹配的报文进行处理。S106, the second communication apparatus processes the packet matching the feature information of the first attack packet based on the packet processing policy.
具体实现时,S106例如可以包括:第二通信装置获取第一报文;接着,判断该第一报文的报文特征和报文处理策略中第一攻击报文的报文特征是否匹配,如果匹配,则,基于报文处理策略中的处理策略对第一报文进行处理。其中,基于所述报文处理策略对第一报文进行处理,例如可以包括:基于报文处理策略中的处理策略对第一报文进行丢包处理,或者,基于报文处理策略中的处理策略对第一报文进行限速处理。When specifically implemented, S106 may, for example, include: the second communication device obtains the first packet; then, judging whether the packet characteristics of the first packet and the packet characteristics of the first attack packet in the packet processing policy match, if If they match, the first packet is processed based on the processing policy in the packet processing policy. The processing of the first packet based on the packet processing policy may, for example, include: performing packet loss processing on the first packet based on the processing policy in the packet processing policy, or processing based on the processing policy in the packet processing policy The policy performs rate-limiting processing on the first packet.
当第一通信装置和第二通信装置属于一个网络设备时,S106例如可以包括:第二通信装置确定通过第一端口传输的报文与报文处理策略中第一攻击报文的报文特征匹配,如果匹配,则,基于报文处理策略中的处理策略对该通过第一端口传输的报文进行丢包或限速处理,这样,能够避免第一通信装置上由于该第一攻击报文导致最高转发优先级的正常报文被丢包,确保第一通信装置对正常报文的有效转发When the first communication device and the second communication device belong to one network device, S106 may include, for example: the second communication device determines that the packet transmitted through the first port matches the packet characteristic of the first attack packet in the packet processing policy , if it matches, then, based on the processing policy in the packet processing policy, packet loss or speed limit processing is performed on the packet transmitted through the first port, so that the first communication device can be prevented from being caused by the first attack packet. The normal packet with the highest forwarding priority is lost, ensuring the effective forwarding of the normal packet by the first communication device
当第一通信装置和第二通信装置属于不同的网络设备时,该第二通信装置可以是属于该控制管理实体管控的任意一台网络设备,这样,即使该第一攻击报文攻击网络中的其他通信装置,也能够避免其他通信装置由于该第一攻击报文导致最高转发优先级的正常报文被丢包,确保其他通信装置对正常报文的有效转发。When the first communication device and the second communication device belong to different network devices, the second communication device may be any network device controlled by the control management entity, so that even if the first attack packet attacks a network device in the network Other communication devices can also prevent the normal packets with the highest forwarding priority from being lost by other communication devices due to the first attack packet, and ensure effective forwarding of normal packets by other communication devices.
作为一个示例,该第二通信装置可以属于该攻击报文传输路径上第一通信装置所在网络设备的上一跳节点,这样,控制管理实体将报文处理策略发送给第二通信装置,对于第一通信装置来说,能够尽量实现从源头对第一攻击报文的抑制,使得第一攻击报文不再占用第一通信装置的带宽资源,消除该第一攻击报文对第一通信装置的影响。As an example, the second communication device may belong to the previous hop node of the network device where the first communication device is located on the transmission path of the attack packet. In this way, the control and management entity sends the packet processing policy to the second communication device. For a communication device, the first attack packet can be suppressed from the source as much as possible, so that the first attack packet no longer occupies the bandwidth resources of the first communication device, and the effect of the first attack packet on the first communication device is eliminated. influence.
该示例下,为了更加有效和彻底的抑制第一攻击报文,在执行S106的同时,控制管理实体还可以向第一通信装置发送该报文处理策略;那么,第一通信装置也可以基于该报文处理策略,对从该第一端口接收到的与攻击报文的特征信息匹配的报文进行处理。In this example, in order to suppress the first attack packet more effectively and thoroughly, while executing S106, the control management entity may also send the packet processing policy to the first communication device; then, the first communication device may also use the The packet processing policy is to process packets received from the first port that match the feature information of the attack packets.
为了避免网络中其他通信装置受到该第一攻击报文的影响,该控制管理实体还可以将该报文处理策略发送给网络中与该控制管理实体连接的所有通信装置,以便各个通信装置在接收到与该报文处理策略中的第一攻击报文的特征信息匹配的报文时,均可以将该报文确定为攻击报文,并基于报文处理策略中的处理策略对所确定的攻击报文进行丢包或限速处理。这样,可以有效的避免第一攻击报文在网络中的多个通信装置之间传输以攻击多个通信装置,大大的提高了网络安全性。In order to prevent other communication devices in the network from being affected by the first attack packet, the control management entity may also send the packet processing policy to all communication devices in the network connected to the control management entity, so that each communication device receives When there is a packet matching the feature information of the first attack packet in the packet processing policy, the packet can be determined as an attack packet, and based on the processing policy in the packet processing policy Packet loss or rate limit processing. In this way, the transmission of the first attack packet between multiple communication devices in the network to attack the multiple communication devices can be effectively avoided, which greatly improves network security.
可见,通过本申请实施例提供的方法200,控制管理实体基于第一通信装置上报的第一攻击报文的特征信息生成报文处理策略并发送给第二通信装置,第二通信装置即可对与该第一攻击报文的特征信息匹配的报文进行处理,这样,在攻击报文未导致第一通信装置的端口拥塞、威胁第一通信装置安全的情况下,该安全防御机制就有效的识别和处理了攻击报文,确保攻击报文不会导致通信装置拥塞,从而保证最高转发优先级的安全报文能够被有效的转发,使得第一通信装置提供正常的业务成为可能。It can be seen that through the method 200 provided in this embodiment of the present application, the control management entity generates a packet processing policy based on the feature information of the first attack packet reported by the first communication device and sends it to the second communication device, and the second communication device can The packet that matches the feature information of the first attack packet is processed, so that the security defense mechanism is effective under the condition that the attack packet does not cause port congestion of the first communication device and threaten the security of the first communication device The attack packets are identified and processed to ensure that the attack packets will not cause congestion of the communication device, thereby ensuring that the security packets with the highest forwarding priority can be effectively forwarded, making it possible for the first communication device to provide normal services.
上述是以对第一端口上传输的最高转发优先级的报文中的攻击报文的处理为例,对本申请实施例提供的报文的处理方法的实现方式以及效果的描述,同理,该方法200可以被适用于其他端口,例如,对于第二端口执行方法100所示的实施例之后,还可以包括:控制管理实体基于第二攻击报文的特征信息,生成报文处理策略,该报文处理策略用于对与第二攻击报文的特征信息匹配的报文进行处理;控制管理实体向第三通信装置发送报文处理策略;第三通信装置基于报文处理策略,对与第二攻击报文的特征信息匹配的报文进行处理。其中,该第三通信装置和第一通信装置可以属于同一个网络设备,也可以属于两个不同的网络设备。The above takes the processing of the attack packet in the packet with the highest forwarding priority transmitted on the first port as an example, and describes the implementation and effect of the packet processing method provided in the embodiment of the present application. Similarly, this The method 200 can be applied to other ports. For example, after executing the embodiment shown in the method 100 on the second port, the method may further include: the control management entity generates a packet processing policy based on the feature information of the second attack packet, and the packet The message processing policy is used to process the message matching the feature information of the second attack message; the control management entity sends the message processing policy to the third communication device; the third communication device, based on the message processing policy, The packets matching the characteristic information of the attack packets are processed. The third communication apparatus and the first communication apparatus may belong to the same network device, or may belong to two different network devices.
图5示出了本申请实施例中一种报文的处理方法300的流程示意图。参见图5,该方法300以第一通信装置为执行主体,该方法300例如可以包括:FIG. 5 shows a schematic flowchart of a packet processing method 300 in an embodiment of the present application. Referring to FIG. 5 , the method 300 takes the first communication device as the execution subject, and the method 300 may include, for example:
S301,第一通信装置确定第一端口传输的最高转发优先级的报文占用该第一端口的带宽满足第一条件;S301, the first communication device determines that a packet with the highest forwarding priority transmitted by the first port occupies the bandwidth of the first port and satisfies the first condition;
S302,对通过第一端口传输的最高转发优先级报文进行分析;S302, analyze the highest forwarding priority packet transmitted through the first port;
S303,确定第一端口传输的报文中包括具有所述最高转发优先级的攻击报文。S303: Determine that the packet transmitted by the first port includes the attack packet with the highest forwarding priority.
作为一个示例,当第一通信装置确定第一端口传输的报文中包括具有所述最高转发优先级的攻击报文时,该第一通信装置还可以向网管发送告警信号,该告警信号用于指示第一通信装置中具有攻击报文,从而,网管可以对网络进行安全防御,避免攻击报文对网络造成更大的威胁。此外,为了网管能够针对性的进行安全防御,该告警信号中还可以携带攻击的特征信息。As an example, when the first communication device determines that the packet transmitted by the first port includes the attack packet with the highest forwarding priority, the first communication device may also send an alarm signal to the network management, where the alarm signal is used for It is indicated that there are attack packets in the first communication device, so that the network management can perform security defense on the network to prevent the attack packets from causing greater threats to the network. In addition, in order for the network management to carry out targeted security defense, the alarm signal may also carry characteristic information of the attack.
作为另一个示例,该第一通信装置还可以在确定第一端口传输的报文中包括具有所述最高转发优先级的攻击报文之后,获取所述攻击报文的特征信息。此时,该第一通信装置 还可以向控制管理实体发送所述攻击报文的特征信息,并获取控制管理实体生成的报文处理策略,该报文处理策略用于对与攻击报文的特征信息匹配的报文进行处理,这样,该第一通信装置即可基于所述报文处理策略,对第一报文进行丢包和/或限速处理,该第一报文为与攻击报文的特征信息匹配的报文。As another example, the first communication apparatus may further acquire feature information of the attack packet after determining that the packet transmitted by the first port includes the attack packet with the highest forwarding priority. At this time, the first communication device may also send the characteristic information of the attack packet to the control management entity, and obtain a packet processing policy generated by the control management entity, where the packet processing policy is used to compare the characteristics of the attack packet with the attack packet. In this way, the first communication device can perform packet loss and/or speed limit processing on the first packet based on the packet processing policy, and the first packet is an attack packet. The characteristic information matches the packet.
其中,第一条件可以包括通过第一端口传输的最高转发优先级的报文占用第一端口的带宽的比例大于或等于第一阈值。或者,第一条件也可以包括通过第一端口传输的最高转发优先级的报文大于或等于第二阈值。The first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold. Alternatively, the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
需要说明的是,该方法300的具体实现方式以及达到的效果,均可以参见上述方法100和方法200的相关描述,在此不再赘述。It should be noted that, for the specific implementation manner of the method 300 and the effect achieved, reference may be made to the relevant descriptions of the above-mentioned method 100 and method 200, and details are not repeated here.
图6示出了本申请实施例中一种报文的处理方法400的流程示意图。参见图6,该方法400以第一通信装置和控制管理实体之间的交互进行描述,该方法400例如可以包括:FIG. 6 shows a schematic flowchart of a packet processing method 400 in an embodiment of the present application. Referring to FIG. 6 , the method 400 is described with the interaction between the first communication device and the control management entity. For example, the method 400 may include:
S401,第一通信装置确定通过第一端口传输的最高转发优先级的报文占用第一端口的带宽满足第一条件时,获取最高转发优先级的报文中的攻击报文的特征信息;S401, when the first communication device determines that the bandwidth of the first port occupied by the message with the highest forwarding priority transmitted through the first port satisfies the first condition, obtain characteristic information of the attack message in the message with the highest forwarding priority;
S402,第一通信装置向控制管理实体发送攻击报文的特征信息;S402, the first communication device sends the characteristic information of the attack packet to the control management entity;
S402,控制管理实体基于攻击报文的特征信息生成报文处理策略,该报文处理策略用于对与所述攻击报文的特征信息匹配的报文进行处理。S402: The control and management entity generates a packet processing policy based on the characteristic information of the attack packet, where the packet processing policy is used to process the packet matching the characteristic information of the attack packet.
作为一个示例,该方法400还可以包括:第一通信装置获取控制管理设备生成的报文处理策略,从而,第一通信装置基于报文处理策略,对第一报文进行处理,第一报文为与攻击报文的特征信息匹配的报文。As an example, the method 400 may further include: the first communication apparatus obtains a packet processing policy generated by the control and management device, so that the first communication apparatus processes the first packet based on the packet processing policy, and the first packet It is a packet matching the feature information of the attack packet.
作为又一个示例,该方法400还可以包括:控制管理设备向第二通信装置发送报文处理策略,从而,第二通信装置基于报文处理策略,对第二报文进行处理,第二报文为与攻击报文的特征信息匹配的报文。As another example, the method 400 may further include: controlling the management device to send a packet processing policy to the second communication apparatus, so that the second communication apparatus processes the second packet based on the packet processing policy, and the second packet It is a packet matching the feature information of the attack packet.
其中,第一条件可以包括通过第一端口传输的最高转发优先级的报文占用第一端口的带宽的比例大于或等于第一阈值。或者,第一条件也可以包括通过第一端口传输的最高转发优先级的报文大于或等于第二阈值。The first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold. Alternatively, the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
需要说明的是,该方法400的具体实现方式以及达到的效果,均可以参见上述方法100~方法300的相关描述,在此不再赘述。It should be noted that, for the specific implementation manner of the method 400 and the effect achieved, reference may be made to the relevant descriptions of the above-mentioned methods 100 to 300, and details are not repeated here.
此外,本申请实施例还提供了一种报文的处理系统700,参见图7所示。该系统700至少可以包括第一通信装置701和控制管理实体702。其中,In addition, an embodiment of the present application further provides a system 700 for processing a message, as shown in FIG. 7 . The system 700 may include at least a first communication device 701 and a control management entity 702 . in,
第一通信装置701,用于确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件时,获取并向控制管理实体702发送所述最高转发优先级的报文中的攻击报文的特征信息;The first communication device 701 is configured to obtain and send the highest forwarding priority to the control management entity 702 when determining that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies a first condition The characteristic information of the attack packet in the packet;
控制管理实体702,用于根据攻击报文的报文特征信息,生成报文处理策略,该报文处理策略用于对与攻击报文的特征信息匹配的报文进行处理。The control and management entity 702 is configured to generate a packet processing policy according to the packet characteristic information of the attack packet, where the packet processing policy is used to process the packet matching the characteristic information of the attack packet.
作为一个示例,所述控制管理设备702,还用于向所述第一通信装置发送所述报文处理策略。那么,所述第一通信装置701,还用于基于所述报文处理策略,对第一报文进行处理,所述第一报文为与所述攻击报文的特征信息匹配的报文。As an example, the control and management device 702 is further configured to send the packet processing policy to the first communication apparatus. Then, the first communication device 701 is further configured to process a first packet based on the packet processing policy, where the first packet is a packet matching the feature information of the attack packet.
作为另一个示例,该系统700还可以包括第二通信装置,控制管理设备702,还用于向所述第二通信装置发送所述报文处理策略。那么,所述第二通信装置,还用于基于所述报文处理策略,对第二报文进行处理,所述第二报文为与所述攻击报文的特征信息匹配的报文。As another example, the system 700 may further include a second communication apparatus, a control and management device 702, which is further configured to send the packet processing policy to the second communication apparatus. Then, the second communication device is further configured to process a second packet based on the packet processing policy, where the second packet is a packet matching the feature information of the attack packet.
其中,第一条件可以包括通过第一端口传输的最高转发优先级的报文占用第一端口的带宽的比例大于或等于第一阈值。或者,第一条件也可以包括通过第一端口传输的最高转发优先级的报文大于或等于第二阈值。The first condition may include that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold. Alternatively, the first condition may also include that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to the second threshold.
需要说明的是,该系统700的具体实现方式以及达到的效果,可以参见上述方法100~方法400的相关描述,或者,也可以参见图1和图2所示实施例的相关描述,在此不再赘述。It should be noted that, for the specific implementation manner and effects of the system 700, reference may be made to the relevant descriptions of the above-mentioned methods 100 to 400, or, to the relevant descriptions of the embodiments shown in FIG. 1 and FIG. Repeat.
此外,本申请实施例还提供了一种第一通信装置800,参见图8所示。该第一通信装置800包括处理单元801和发送单元802。其中,处理单元801用于执行上述图3~图6所示的任一实施例中第一通信装置执行的处理操作;发送单元802用于执行上述图3~图6所示的任一实施例中第一通信装置执行的发送操作。例如:处理单元801可以执行图3中实施例中的操作:确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件;获取所述通过第一端口传输的最高转发优先级的报文中所包括的第一攻击报文的特征信息。例如:发送单元802可以执行图3中实施例中的操作:向控制管理实体发送第一攻击报文的特征信息。In addition, an embodiment of the present application further provides a first communication apparatus 800, as shown in FIG. 8 . The first communication apparatus 800 includes a processing unit 801 and a sending unit 802 . The processing unit 801 is configured to execute the processing operation performed by the first communication device in any of the embodiments shown in FIG. 3 to FIG. 6 ; the sending unit 802 is configured to execute any of the embodiments shown in FIG. 3 to FIG. 6 above. The sending operation performed by the first communication device in . For example, the processing unit 801 may perform the operations in the embodiment in FIG. 3 : determine that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies the first condition; Feature information of the first attack packet included in the transmitted packet with the highest forwarding priority. For example, the sending unit 802 may perform the operation in the embodiment in FIG. 3: send the feature information of the first attack packet to the control management entity.
此外,本申请实施例还提供了一种第一通信装置900,参见图9所示。该第一通信装置900包括第一通信接口901、第二通信接口902和处理器903。其中,第一通信接口901用于执行前述用于执行上述图3~图6所示的任一实施例中第一通信装置执行的接收操作;第二通信接口902用于执行前述图3~图6所示的任一实施例中第一通信装置执行的发送操作;处理器903用于执行上述图3~图6所示的任一实施例中第一通信装置执行的除了接收操作和发送操作之外的其他操作。例如:处理器903可以执行图3中实施例中的操作确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件;获取所述通过第一端口传输的最高转发优先级的报文中所包括的第一攻击报文的特征信息。In addition, an embodiment of the present application further provides a first communication apparatus 900, as shown in FIG. 9 . The first communication device 900 includes a first communication interface 901 , a second communication interface 902 and a processor 903 . The first communication interface 901 is used to perform the aforementioned receiving operation performed by the first communication device in any of the embodiments shown in FIG. 3 to FIG. 6 ; the second communication interface 902 is used to perform the aforementioned FIG. 3 to FIG. 6 . The sending operation performed by the first communication apparatus in any of the embodiments shown in FIG. 6; the processor 903 is configured to perform the above-mentioned any of the embodiments shown in FIG. 3 to FIG. 6 except the receiving operation and the sending operation performed by the first communication apparatus. other operations. For example, the processor 903 may perform the operations in the embodiment of FIG. 3 to determine that the bandwidth of the packet with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port and satisfies the first condition; The feature information of the first attack packet included in the packet with the highest forwarding priority.
此外,本申请实施例还提供了一种第一通信装置1000,参见图10所示。该第一通信装置1000包括存储器1001和与存储器1001通信的处理器1002。其中,存储器1001包括计算机可读指令;处理器1002用于执行所述计算机可读指令,使得该第一通信装置1000执行上述图3~图6所示的任一实施例中第一通信装置执行的方法。In addition, an embodiment of the present application further provides a first communication apparatus 1000, as shown in FIG. 10 . The first communication device 1000 includes a memory 1001 and a processor 1002 in communication with the memory 1001 . The memory 1001 includes computer-readable instructions; the processor 1002 is configured to execute the computer-readable instructions, so that the first communication device 1000 executes the execution of the first communication device in any of the embodiments shown in FIG. 3 to FIG. 6 . Methods.
可以理解的是,上述实施例中,处理器可以是中央处理器(英文:central processing unit,缩写:CPU),网络处理器(英文:network processor,缩写:NP)或者CPU和NP的组合。处理器还可以是专用集成电路(英文:application-specific integrated circuit,缩写:ASIC),可编程逻辑器件(英文:programmable logic device,缩写:PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(英文:complex programmable logic device,缩写:CPLD),现场可编程逻辑门阵列(英文:field-programmable gate array,缩写:FPGA),通用阵列逻辑(英文:generic array logic,缩写:GAL)或其任意组合。处理器可以是指一个处理器,也可以 包括多个处理器。存储器可以包括易失性存储器(英文:volatile memory),例如随机存取存储器(英文:random-access memory,缩写:RAM);存储器也可以包括非易失性存储器(英文:non-volatile memory),例如只读存储器(英文:read-only memory,缩写:ROM),快闪存储器(英文:flash memory),硬盘(英文:hard disk drive,缩写:HDD)或固态硬盘(英文:solid-state drive,缩写:SSD);存储器还可以包括上述种类的存储器的组合。存储器可以是指一个存储器,也可以包括多个存储器。在一个具体实施方式中,存储器中存储有计算机可读指令,所述计算机可读指令包括多个软件模块,例如发送模块,处理模块和接收模块。处理器执行各个软件模块后可以按照各个软件模块的指示进行相应的操作。在本实施例中,一个软件模块所执行的操作实际上是指处理器根据所述软件模块的指示而执行的操作。处理器执行存储器中的计算机可读指令后,可以按照所述计算机可读指令的指示,执行报文的处理方法中第一通信装置可以执行的全部操作。It can be understood that, in the above embodiment, the processor may be a central processing unit (English: central processing unit, abbreviation: CPU), a network processor (English: network processor, abbreviation: NP) or a combination of CPU and NP. The processor may also be an application-specific integrated circuit (English: application-specific integrated circuit, abbreviation: ASIC), a programmable logic device (English: programmable logic device, abbreviation: PLD) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (English: complex programmable logic device, abbreviation: CPLD), a field programmable logic gate array (English: field-programmable gate array, abbreviation: FPGA), a general-purpose array logic (English: generic array logic, abbreviation: GAL) or any combination thereof. A processor may refer to a single processor or may include multiple processors. The memory may include volatile memory (English: volatile memory), such as random-access memory (English: random-access memory, abbreviation: RAM); the memory may also include non-volatile memory (English: non-volatile memory), For example, read-only memory (English: read-only memory, abbreviation: ROM), flash memory (English: flash memory), hard disk (English: hard disk drive, abbreviation: HDD) or solid-state hard disk (English: solid-state drive, Abbreviation: SSD); the memory may also comprise a combination of the above-mentioned kinds of memory. The memory may refer to one memory, or may include multiple memories. In a specific embodiment, computer-readable instructions are stored in the memory, and the computer-readable instructions include a plurality of software modules, such as a sending module, a processing module and a receiving module. After executing each software module, the processor can perform corresponding operations according to the instructions of each software module. In this embodiment, the operation performed by a software module actually refers to the operation performed by the processor according to the instruction of the software module. After the processor executes the computer-readable instructions in the memory, it can execute all operations that can be performed by the first communication device in the packet processing method according to the instructions of the computer-readable instructions.
可以理解的是,上述实施例中,第一通信装置900的第二通信接口902,具体可以被用作第一通信装置800中的发送单元802,实现第一通信装置到控制管理实体之间的数据通信;第一通信装置900的第一通信接口901,具体可以被用作第一通信装置800中的接收单元,例如可以用于接收由上游网络设备发送的报文。It can be understood that, in the above embodiment, the second communication interface 902 of the first communication device 900 can be specifically used as the sending unit 802 in the first communication device 800 to realize the communication between the first communication device and the control management entity. Data communication; the first communication interface 901 of the first communication apparatus 900 may be specifically used as a receiving unit in the first communication apparatus 800, for example, may be used to receive a message sent by an upstream network device.
此外,本申请实施例还提供了一种通信系统,该通信系统中的第一通信装置例如可以是上述第一通信装置800、900或1000。例如,该通信系统为上述报文的处理系统700,那么,第一通信装置为第一通信装置701,控制管理实体为控制管理实体702。In addition, an embodiment of the present application further provides a communication system, and the first communication apparatus in the communication system may be, for example, the above-mentioned first communication apparatus 800 , 900 or 1000 . For example, if the communication system is the processing system 700 of the above-mentioned message, then the first communication device is the first communication device 701 , and the control management entity is the control management entity 702 .
此外,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得所述计算机执行以上图3~图6所示实施例中的所述报文的处理方法。In addition, an embodiment of the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium runs on a computer, the computer is made to execute the implementation shown in FIG. 3 to FIG. 6 above. The processing method of the message in the example.
此外,本申请实施例还提供了计算机程序产品,包括计算机程序或计算机可读指令,当所述计算机程序或所述计算机可读指令在计算机上运行时,使得计算机执行前述图3~图6所示实施例中的所述报文的处理方法。In addition, the embodiments of the present application also provide a computer program product, including a computer program or computer-readable instructions, when the computer program or the computer-readable instructions are run on a computer, the computer is made to execute the above-mentioned FIG. 3 to FIG. 6 . The method for processing the packet in the example embodiment.
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到上述实施例方法中的全部或部分步骤可借助软件加通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如只读存储器(英文:read-only memory,ROM)/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者诸如路由器等网络通信设备)执行本申请各个实施例或者实施例的某些部分所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general hardware platform. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as read-only memory (English: read-only memory, ROM)/RAM, magnetic disk, An optical disc, etc., includes several instructions for causing a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of the present application.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例和设备实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的设备及系统实施例仅仅是示意性的,其中作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通 技术人员在不付出创造性劳动的情况下,即可以理解并实施。Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiments and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for related parts. The device and system embodiments described above are only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.
以上所述仅是本申请的优选实施方式,并非用于限定本申请的保护范围。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the present application, several improvements and modifications can also be made, and these improvements and modifications should also be regarded as the protection scope of the present application.

Claims (78)

  1. 一种报文的处理方法,其特征在于,所述方法由第一通信装置执行,包括:A method for processing a message, wherein the method is executed by a first communication device, comprising:
    确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件;It is determined that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies the first condition;
    获取所述通过第一端口传输的最高转发优先级的报文中所包括的第一攻击报文的特征信息;acquiring feature information of the first attack packet included in the packet with the highest forwarding priority transmitted through the first port;
    向控制管理实体发送所述第一攻击报文的特征信息。The feature information of the first attack packet is sent to the control management entity.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    获取所述控制管理实体生成的报文处理策略,所述报文处理策略用于对与所述第一攻击报文的特征信息匹配的报文进行处理。A packet processing policy generated by the control management entity is acquired, where the packet processing policy is used to process packets matching the feature information of the first attack packet.
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    基于所述报文处理策略,对第一报文进行处理,所述第一报文为与所述第一攻击报文的特征信息匹配的报文。Based on the packet processing policy, a first packet is processed, where the first packet is a packet matching the feature information of the first attack packet.
  4. 根据权利要求3所述的方法,其特征在于,所述基于所述报文处理策略,对第一报文进行处理,包括:The method according to claim 3, wherein the processing the first packet based on the packet processing policy comprises:
    基于所述报文处理策略,对所述第一报文进行丢包处理。Based on the packet processing policy, packet loss processing is performed on the first packet.
  5. 根据权利要求3所述的方法,其特征在于,所述基于所述报文处理策略,对第一报文进行处理,包括:The method according to claim 3, wherein the processing the first packet based on the packet processing policy comprises:
    基于所述报文处理策略,对所述第一报文进行限速处理。Based on the packet processing policy, rate-limit processing is performed on the first packet.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-5, wherein the method further comprises:
    向所述控制管理实体发送指示信息,所述指示信息用于指示所述控制管理实体生成报文处理策略。Sending indication information to the control management entity, where the indication information is used to instruct the control management entity to generate a packet processing policy.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述第一条件包括所述通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽的比例大于或等于第一阈值。The method according to any one of claims 1 to 6, wherein the first condition comprises that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  8. 根据权利要求1-6任一项所述的方法,其特征在于,所述第一条件包括所述通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽大于或等于第二阈值。The method according to any one of claims 1-6, wherein the first condition includes that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port is greater than or equal to second threshold.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,在所述确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件之前,所述方法还包括:The method according to any one of claims 1-8, characterized in that before said determining that the packet with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port and satisfies the first condition, the The method also includes:
    确定通过所述第一端口传输的所有报文满足第二条件。It is determined that all packets transmitted through the first port satisfy the second condition.
  10. 根据权利要求9所述的方法,其特征在于,所述第二条件包括所述通过所述第一端口传输的所有报文占用所述第一端口的带宽的比例大于或等于第三阈值。The method according to claim 9, wherein the second condition comprises that the proportion of the bandwidth of the first port occupied by all the packets transmitted through the first port is greater than or equal to a third threshold.
  11. 根据权利要求9所述的方法,其特征在于,所述第二条件包括所述通过所述第一端口传输的所有报文大于或等于第四阈值。The method according to claim 9, wherein the second condition comprises that all the packets transmitted through the first port are greater than or equal to a fourth threshold.
  12. 根据权利要求1-11任一项所述的方法,其特征在于,在所述确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件之前,所述方法还包括:The method according to any one of claims 1-11, characterized in that before said determining that the packet with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port and satisfies the first condition, the The method also includes:
    轮询检测所述第一端口的带宽占用情况。Polling to detect the bandwidth occupancy status of the first port.
  13. 根据权利要求1-12任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-12, wherein the method further comprises:
    确定通过第二端口传输的最高转发优先级的报文占用所述第二端口的带宽满足第三条件;It is determined that the bandwidth of the packet with the highest forwarding priority transmitted through the second port occupies the bandwidth of the second port and satisfies the third condition;
    获取所述通过第二端口传输的最高转发优先级的报文中所包括的第二攻击报文的特征信息;acquiring feature information of the second attack packet included in the packet with the highest forwarding priority transmitted through the second port;
    向所述控制管理实体发送所述第二攻击报文的特征信息。Send the feature information of the second attack packet to the control management entity.
  14. 根据权利要求13所述的方法,其特征在于,所述第三条件包括所述通过第二端口传输的最高转发优先级的报文占用所述第二端口的带宽的比例大于或等于第五阈值。The method according to claim 13, wherein the third condition comprises that the ratio of the bandwidth of the second port occupied by the packets with the highest forwarding priority transmitted through the second port is greater than or equal to a fifth threshold .
  15. 根据权利要求13所述的方法,其特征在于,所述第三条件包括所述通过第二端口传输的最高转发优先级的报文大于或等于第六阈值。The method according to claim 13, wherein the third condition comprises that the packet with the highest forwarding priority transmitted through the second port is greater than or equal to a sixth threshold.
  16. 根据权利要求1-15任一项所述的方法,其特征在于,所述向控制管理实体发送所述第一攻击报文的特征信息,包括:The method according to any one of claims 1-15, wherein the sending the feature information of the first attack packet to the control management entity comprises:
    向所述控制管理实体发送报文,所述报文中携带所述第一攻击报文的特征信息。Send a message to the control management entity, where the message carries the feature information of the first attack message.
  17. 根据权利要求16所述的方法,其特征在于,所述报文为下述报文中的任意一种:The method according to claim 16, wherein the message is any one of the following messages:
    边界网关协议BGP报文、路径计算单元通信协议PCEP报文、遥感勘测Telemetry报文或网络配置协议NETCONF报文。Border Gateway Protocol BGP packets, Path Computation Element Communication Protocol PCEP packets, Telemetry Telemetry packets, or Network Configuration Protocol NETCONF packets.
  18. 根据权利要求1-17任一项所述的方法,其特征在于,所述第一攻击报文的特征信息包括下述信息中的一个或多个:The method according to any one of claims 1-17, wherein the characteristic information of the first attack packet includes one or more of the following information:
    所述第一攻击报文的源互联网协议IP地址、目的IP地址、源端口号、目的端口号或传输层协议号。Source Internet Protocol IP address, destination IP address, source port number, destination port number or transport layer protocol number of the first attack packet.
  19. 根据权利要求1-18任一项所述的方法,其特征在于,所述第一通信装置运行在第四版互联网协议IPv4网络、第六版互联网协议IPv6网络或虚拟专用网VPN。The method according to any one of claims 1-18, wherein the first communication device operates on a fourth version of the Internet Protocol IPv4 network, the sixth version of the Internet Protocol IPv6 network or a virtual private network VPN.
  20. 一种报文的处理方法,其特征在于,所述方法由第一通信装置执行,包括:A method for processing a message, wherein the method is executed by a first communication device, comprising:
    确定第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件;It is determined that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted by the first port satisfies the first condition;
    对通过所述第一端口传输的最高转发优先级报文进行分析;analyzing the highest forwarding priority message transmitted through the first port;
    确定所述第一端口传输的报文中包括具有所述最高转发优先级的攻击报文。It is determined that the packet transmitted by the first port includes the attack packet with the highest forwarding priority.
  21. 根据权利要求20所述的方法,其特征在于,所述方法还包括:The method of claim 20, wherein the method further comprises:
    响应于确定所述第一端口传输的报文中包括具有所述最高转发优先级的攻击报文,发送告警信号。In response to determining that the packet transmitted by the first port includes an attack packet with the highest forwarding priority, an alarm signal is sent.
  22. 根据权利要求20或21所述的方法,其特征在于,所述方法还包括:The method according to claim 20 or 21, wherein the method further comprises:
    获取所述攻击报文的特征信息。Obtain feature information of the attack packet.
  23. 根据权利要求22所述的方法,其特征在于,所述方法还包括:The method of claim 22, wherein the method further comprises:
    向控制管理实体发送所述攻击报文的特征信息。The characteristic information of the attack packet is sent to the control management entity.
  24. 根据权利要求23所述的方法,其特征在于,所述方法还包括:The method of claim 23, wherein the method further comprises:
    获取所述控制管理实体生成的报文处理策略,所述报文处理策略用于对与所述攻击报文的特征信息匹配的报文进行处理。A packet processing policy generated by the control management entity is acquired, where the packet processing policy is used to process packets matching the feature information of the attack packets.
  25. 根据权利要求22所述的方法,其特征在于,所述方法还包括:The method of claim 22, wherein the method further comprises:
    基于所述攻击报文的特征信息,生成报文处理策略,所述报文处理策略用于对与所述 攻击报文的特征信息匹配的报文进行处理。Based on the characteristic information of the attack packet, a packet processing policy is generated, and the packet processing policy is used to process the packet matching the characteristic information of the attack packet.
  26. 根据权利要求24或25所述的方法,其特征在于,所述方法还包括:The method according to claim 24 or 25, wherein the method further comprises:
    基于所述报文处理策略,对第一报文进行处理,所述第一报文为与所述攻击报文的特征信息匹配的报文。Based on the packet processing policy, a first packet is processed, where the first packet is a packet matching the characteristic information of the attack packet.
  27. 根据权利要求26所述的方法,其特征在于,所述基于所述报文处理策略,对所述第一报文进行处理,包括:The method according to claim 26, wherein the processing the first packet based on the packet processing policy comprises:
    基于所述报文处理策略,对所述第一报文进行丢包处理。Based on the packet processing policy, packet loss processing is performed on the first packet.
  28. 根据权利要求26所述的方法,其特征在于,所述基于所述报文处理策略,对所述第一报文进行处理,包括:The method according to claim 26, wherein the processing the first packet based on the packet processing policy comprises:
    基于所述报文处理策略,对所述第一报文进行限速处理。Based on the packet processing policy, rate-limit processing is performed on the first packet.
  29. 根据权利要求20-28任一项所述的方法,其特征在于,所述第一条件包括所述通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽的比例大于或等于第一阈值。The method according to any one of claims 20 to 28, wherein the first condition comprises that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  30. 根据权利要求20-28任一项所述的方法,其特征在于,所述第一条件包括所述通过第一端口传输的最高转发优先级的报文大于或等于第二阈值。The method according to any one of claims 20-28, wherein the first condition includes that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to a second threshold.
  31. 一种报文的处理方法,其特征在于,所述方法包括:A message processing method, characterized in that the method comprises:
    第一通信装置确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件时,获取所述最高转发优先级的报文中的攻击报文的特征信息;When the first communication device determines that the bandwidth of the packet with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port and satisfies the first condition, obtain characteristic information of the attack packet in the packet with the highest forwarding priority ;
    所述第一通信装置向所述控制管理实体发送所述攻击报文的特征信息;sending, by the first communication device, the feature information of the attack packet to the control management entity;
    所述控制管理实体根据所述攻击报文的报文特征信息,生成报文处理策略,所述报文处理策略用于对与所述攻击报文的特征信息匹配的报文进行处理。The control and management entity generates a packet processing policy according to the packet characteristic information of the attack packet, where the packet processing policy is used to process the packet matching the characteristic information of the attack packet.
  32. 根据权利要求31所述的方法,其特征在于,所述方法还包括:The method of claim 31, wherein the method further comprises:
    所述控制管理设备向所述第一通信装置发送所述报文处理策略。The control and management device sends the message processing policy to the first communication apparatus.
  33. 根据权利要求32所述的方法,其特征在于,所述方法还包括:The method of claim 32, wherein the method further comprises:
    所述第一通信装置基于所述报文处理策略,对第一报文进行处理,所述第一报文为与所述攻击报文的特征信息匹配的报文。The first communication device processes a first packet based on the packet processing policy, where the first packet is a packet matching the feature information of the attack packet.
  34. 根据权利要求31所述的方法,其特征在于,所述方法还包括:The method of claim 31, wherein the method further comprises:
    所述控制管理设备向第二通信装置发送所述报文处理策略。The control and management device sends the message processing policy to the second communication apparatus.
  35. 根据权利要求34所述的方法,其特征在于,所述方法还包括:The method of claim 34, wherein the method further comprises:
    所述第二通信装置基于所述报文处理策略,对第二报文进行处理,所述第二报文为与所述攻击报文的特征信息匹配的报文。The second communication device processes a second packet based on the packet processing policy, where the second packet is a packet matching the feature information of the attack packet.
  36. 根据权利要求31-35任一项所述的方法,其特征在于,所述第一条件包括所述通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽的比例大于或等于第一阈值。The method according to any one of claims 31 to 35, wherein the first condition includes that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  37. 根据权利要求31-35任一项所述的方法,其特征在于,所述第一条件包括所述通过第一端口传输的最高转发优先级的报文大于或等于第二阈值。The method according to any one of claims 31-35, wherein the first condition comprises that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to a second threshold.
  38. 一种第一通信装置,其特征在于,包括:A first communication device, comprising:
    处理单元,用于确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件;a processing unit, configured to determine that a packet with the highest forwarding priority transmitted through the first port occupies the bandwidth of the first port and satisfies the first condition;
    所述处理单元,还用于获取所述通过第一端口传输的最高转发优先级的报文中所包括的第一攻击报文的特征信息;The processing unit is further configured to acquire feature information of the first attack packet included in the packet with the highest forwarding priority transmitted through the first port;
    收发单元,用于向控制管理实体发送所述第一攻击报文的特征信息。A transceiver unit, configured to send the feature information of the first attack packet to the control management entity.
  39. 根据权利要求38所述的装置,其特征在于,The apparatus of claim 38, wherein:
    所述处理单元,还用于获取所述控制管理实体生成的报文处理策略,所述报文处理策略用于对与所述第一攻击报文的特征信息匹配的报文进行处理。The processing unit is further configured to acquire a packet processing policy generated by the control management entity, where the packet processing policy is used to process the packet matching the feature information of the first attack packet.
  40. 根据权利要求39所述的装置,其特征在于,The apparatus of claim 39, wherein
    所述处理单元,还用于基于所述报文处理策略,对第一报文进行处理,所述第一报文为与所述第一攻击报文的特征信息匹配的报文。The processing unit is further configured to process a first packet based on the packet processing policy, where the first packet is a packet matching the feature information of the first attack packet.
  41. 根据权利要求40所述的装置,其特征在于,所述处理单元,具体用于:The apparatus according to claim 40, wherein the processing unit is specifically configured to:
    基于所述报文处理策略,对所述第一报文进行丢包处理。Based on the packet processing policy, packet loss processing is performed on the first packet.
  42. 根据权利要求40所述的装置,其特征在于,所述处理单元,具体用于:The apparatus according to claim 40, wherein the processing unit is specifically configured to:
    基于所述报文处理策略,对所述第一报文进行限速处理。Based on the packet processing policy, rate-limit processing is performed on the first packet.
  43. 根据权利要求38-42任一项所述的装置,其特征在于,The device according to any one of claims 38-42, characterized in that,
    所述收发单元,还用于向所述控制管理实体发送指示信息,所述指示信息用于指示所述控制管理实体生成报文处理策略。The transceiver unit is further configured to send indication information to the control management entity, where the indication information is used to instruct the control management entity to generate a message processing policy.
  44. 根据权利要求38-43任一项所述的装置,其特征在于,所述第一条件包括所述通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽的比例大于或等于第一阈值。The apparatus according to any one of claims 38 to 43, wherein the first condition comprises that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  45. 根据权利要求38-43任一项所述的装置,其特征在于,所述第一条件包括所述通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽大于或等于第二阈值。The apparatus according to any one of claims 38 to 43, wherein the first condition includes that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port is greater than or equal to second threshold.
  46. 根据权利要求38-45任一项所述的装置,其特征在于,The device according to any one of claims 38-45, characterized in that,
    所述处理单元,还用于在所述确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件之前,确定通过所述第一端口传输的所有报文满足第二条件。The processing unit is further configured to determine all packets transmitted through the first port before the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port satisfies the first condition. The text satisfies the second condition.
  47. 根据权利要求46所述的装置,其特征在于,所述第二条件包括所述通过所述第一端口传输的所有报文占用所述第一端口的带宽的比例大于或等于第三阈值。The apparatus according to claim 46, wherein the second condition comprises that the proportion of the bandwidth of the first port occupied by all the packets transmitted through the first port is greater than or equal to a third threshold.
  48. 根据权利要求46所述的装置,其特征在于,所述第二条件包括所述通过所述第一端口传输的所有报文大于或等于第四阈值。The apparatus of claim 46, wherein the second condition comprises that all packets transmitted through the first port are greater than or equal to a fourth threshold.
  49. 根据权利要求38-48任一项所述的装置,其特征在于,The device according to any one of claims 38-48, characterized in that,
    所述处理单元,还用于在所述确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件之前,轮询检测所述第一端口的带宽占用情况。The processing unit is further configured to poll and detect the bandwidth occupancy of the first port before the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies the first condition condition.
  50. 根据权利要求38-49任一项所述的装置,其特征在于,The device according to any one of claims 38-49, characterized in that,
    所述处理单元,还用于确定通过第二端口传输的最高转发优先级的报文占用所述第二端口的带宽满足第三条件;The processing unit is further configured to determine that the bandwidth of the second port occupied by the packet with the highest forwarding priority transmitted through the second port satisfies the third condition;
    所述处理单元,还用于获取所述通过第二端口传输的最高转发优先级的报文中所包括的第二攻击报文的特征信息;The processing unit is further configured to acquire feature information of the second attack packet included in the packet with the highest forwarding priority transmitted through the second port;
    所述收发单元,还用于向所述控制管理实体发送所述第二攻击报文的特征信息。The transceiver unit is further configured to send the feature information of the second attack packet to the control management entity.
  51. 根据权利要求50所述的装置,其特征在于,所述第三条件包括所述通过第二端口传输的最高转发优先级的报文占用所述第二端口的带宽的比例大于或等于第五阈值。The apparatus according to claim 50, wherein the third condition comprises that a proportion of the bandwidth of the second port occupied by the packets with the highest forwarding priority transmitted through the second port is greater than or equal to a fifth threshold .
  52. 根据权利要求50所述的装置,其特征在于,所述第三条件包括所述通过第二端口传输的最高转发优先级的报文大于或等于第六阈值。The apparatus according to claim 50, wherein the third condition comprises that the packet with the highest forwarding priority transmitted through the second port is greater than or equal to a sixth threshold.
  53. 根据权利要求38-52任一项所述的装置,其特征在于,所述收发单元,具体用于:The device according to any one of claims 38-52, wherein the transceiver unit is specifically configured to:
    向所述控制管理实体发送报文,所述报文中携带所述第一攻击报文的特征信息。Send a message to the control management entity, where the message carries the feature information of the first attack message.
  54. 根据权利要求53所述的装置,其特征在于,所述报文为下述报文中的任意一种:The device according to claim 53, wherein the message is any one of the following messages:
    边界网关协议BGP报文、路径计算单元通信协议PCEP报文、遥感勘测Telemetry报文或网络配置协议NETCONF报文。Border Gateway Protocol BGP packets, Path Computation Element Communication Protocol PCEP packets, Telemetry Telemetry packets, or Network Configuration Protocol NETCONF packets.
  55. 根据权利要求38-54任一项所述的装置,其特征在于,所述第一攻击报文的特征信息包括下述信息中的一个或多个:The apparatus according to any one of claims 38-54, wherein the feature information of the first attack packet includes one or more of the following information:
    所述第一攻击报文的源互联网协议IP地址、目的IP地址、源端口号、目的端口号或传输层协议号。Source Internet Protocol IP address, destination IP address, source port number, destination port number or transport layer protocol number of the first attack packet.
  56. 根据权利要求38-55任一项所述的装置,其特征在于,所述第一通信装置运行在第四版互联网协议IPv4网络、第六版互联网协议IPv6网络或虚拟专用网VPN。The device according to any one of claims 38 to 55, wherein the first communication device operates on a fourth version of the Internet Protocol IPv4 network, the sixth version of the Internet Protocol IPv6 network or a virtual private network VPN.
  57. 一种第一通信装置,其特征在于,包括:A first communication device, comprising:
    处理单元,用于确定第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件;a processing unit, configured to determine that the packet with the highest forwarding priority transmitted by the first port occupies the bandwidth of the first port and satisfies the first condition;
    所述处理单元,还用于对通过所述第一端口传输的最高转发优先级报文进行分析;The processing unit is further configured to analyze the highest forwarding priority message transmitted through the first port;
    所述处理单元,还用于确定所述第一端口传输的报文中包括具有所述最高转发优先级的攻击报文。The processing unit is further configured to determine that the packet transmitted by the first port includes an attack packet with the highest forwarding priority.
  58. 根据权利要求57所述的装置,其特征在于,所述装置还包括:The apparatus of claim 57, wherein the apparatus further comprises:
    收发单元,用于响应于确定所述第一端口传输的报文中包括具有所述最高转发优先级的攻击报文,发送告警信号。A transceiver unit, configured to send an alarm signal in response to determining that the packet transmitted by the first port includes an attack packet with the highest forwarding priority.
  59. 根据权利要求57或58所述的装置,其特征在于,The device according to claim 57 or 58, characterized in that,
    所述处理单元,还用于获取所述攻击报文的特征信息。The processing unit is further configured to acquire feature information of the attack packet.
  60. 根据权利要求59所述的装置,其特征在于,The apparatus of claim 59, wherein
    所述收发单元,还用于向控制管理实体发送所述攻击报文的特征信息。The transceiver unit is further configured to send the feature information of the attack packet to the control management entity.
  61. 根据权利要求60所述的装置,其特征在于,The apparatus of claim 60, wherein:
    所述处理单元,还用于获取所述控制管理实体生成的报文处理策略,所述报文处理策略用于对与所述攻击报文的特征信息匹配的报文进行处理。The processing unit is further configured to acquire a packet processing policy generated by the control management entity, where the packet processing policy is used to process packets matching the characteristic information of the attack packets.
  62. 根据权利要求59所述的装置,其特征在于,The apparatus of claim 59, wherein
    所述处理单元,还用于基于所述攻击报文的特征信息,生成报文处理策略,所述报文处理策略用于对与所述攻击报文的特征信息匹配的报文进行处理。The processing unit is further configured to generate a packet processing policy based on the characteristic information of the attack packet, where the packet processing policy is used to process the packet matching the characteristic information of the attack packet.
  63. 根据权利要求61或62所述的装置,其特征在于,The device according to claim 61 or 62, characterized in that,
    所述处理单元,还用于基于所述报文处理策略,对第一报文进行处理,所述第一报文为与所述攻击报文的特征信息匹配的报文。The processing unit is further configured to process a first packet based on the packet processing policy, where the first packet is a packet matching the feature information of the attack packet.
  64. 根据权利要求63所述的装置,其特征在于,所述处理单元,具体用于:The device according to claim 63, wherein the processing unit is specifically configured to:
    基于所述报文处理策略,对所述第一报文进行丢包处理。Based on the packet processing policy, packet loss processing is performed on the first packet.
  65. 根据权利要求63所述的装置,其特征在于,所述处理单元,具体用于:The device according to claim 63, wherein the processing unit is specifically configured to:
    基于所述报文处理策略,对所述第一报文进行限速处理。Based on the packet processing policy, rate-limit processing is performed on the first packet.
  66. 根据权利要求57-65任一项所述的装置,其特征在于,所述第一条件包括所述通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽的比例大于或等于第一阈值。The apparatus according to any one of claims 57 to 65, wherein the first condition comprises that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  67. 根据权利要求57-65任一项所述的装置,其特征在于,所述第一条件包括所述通过第一端口传输的最高转发优先级的报文大于或等于第二阈值。The apparatus according to any one of claims 57-65, wherein the first condition comprises that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to a second threshold.
  68. 一种报文的处理系统,其特征在于,所述系统包括第一通信装置和控制管理实体,其中,A message processing system, characterized in that the system includes a first communication device and a control management entity, wherein,
    所述第一通信装置,用于确定通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽满足第一条件时,获取并向所述控制管理实体发送所述最高转发优先级的报文中的攻击报文的特征信息;The first communication device is configured to obtain and send the highest forwarding priority to the control management entity when determining that the bandwidth of the first port occupied by the packet with the highest forwarding priority transmitted through the first port satisfies a first condition Feature information of attack packets in priority packets;
    所述控制管理实体,用于根据所述攻击报文的报文特征信息,生成报文处理策略,所述报文处理策略用于对与所述攻击报文的特征信息匹配的报文进行处理。The control management entity is configured to generate a packet processing policy according to the packet characteristic information of the attack packet, where the packet processing policy is used to process the packet matching the characteristic information of the attack packet .
  69. 根据权利要求68所述的系统,其特征在于,The system of claim 68, wherein:
    所述控制管理设备,还用于向所述第一通信装置发送所述报文处理策略。The control and management device is further configured to send the message processing policy to the first communication apparatus.
  70. 根据权利要求69所述的系统,其特征在于,The system of claim 69, wherein:
    所述第一通信装置,还用于基于所述报文处理策略,对第一报文进行处理,所述第一报文为与所述攻击报文的特征信息匹配的报文。The first communication device is further configured to process a first packet based on the packet processing policy, where the first packet is a packet matching the feature information of the attack packet.
  71. 根据权利要求68所述的系统,其特征在于,所述系统还包括第二通信装置,The system of claim 68, wherein the system further comprises a second communication device,
    所述控制管理设备,还用于向所述第二通信装置发送所述报文处理策略。The control and management device is further configured to send the message processing policy to the second communication apparatus.
  72. 根据权利要求71所述的系统,其特征在于,The system of claim 71, wherein:
    所述第二通信装置,还用于基于所述报文处理策略,对第二报文进行处理,所述第二报文为与所述攻击报文的特征信息匹配的报文。The second communication device is further configured to process a second packet based on the packet processing policy, where the second packet is a packet matching the feature information of the attack packet.
  73. 根据权利要求68-72任一项所述的系统,其特征在于,所述第一条件包括所述通过第一端口传输的最高转发优先级的报文占用所述第一端口的带宽的比例大于或等于第一阈值。The system according to any one of claims 68 to 72, wherein the first condition includes that the ratio of the bandwidth of the first port occupied by the packets with the highest forwarding priority transmitted through the first port is greater than or equal to the first threshold.
  74. 根据权利要求68-72任一项所述的系统,其特征在于,所述第一条件包括所述通过第一端口传输的最高转发优先级的报文大于或等于第二阈值。The system according to any one of claims 68-72, wherein the first condition includes that the packet with the highest forwarding priority transmitted through the first port is greater than or equal to a second threshold.
  75. 一种通信装置,其特征在于,包括:A communication device, comprising:
    存储器,该存储器包括计算机可读指令;a memory including computer-readable instructions;
    与该存储器通信的处理器,所述处理器用于执行所述计算机可读指令,使得所述通信 装置用于执行权利要求1-19任一项所述的方法。A processor in communication with the memory, the processor for executing the computer readable instructions causing the communication means to perform the method of any of claims 1-19.
  76. 一种通信装置,其特征在于,包括:A communication device, comprising:
    存储器,该存储器包括计算机可读指令;a memory including computer-readable instructions;
    与该存储器通信的处理器,所述处理器用于执行所述计算机可读指令,使得所述通信装置用于执行权利要求20-30任一项所述的方法。A processor in communication with the memory, the processor for executing the computer readable instructions causing the communication means for performing the method of any of claims 20-30.
  77. 一种通信系统,其特征在于,所述通信系统包括第一通信装置和控制管理实体,A communication system, characterized in that the communication system includes a first communication device and a control management entity,
    所述第一通信装置用于执行权利要求31-37任一项所述的方法中所述第一通信装置实施的操作;The first communication device is configured to perform the operation performed by the first communication device in the method of any one of claims 31-37;
    所述控制管理实体用于执行权利要求31-37任一项所述的方法中所述控制管理实体实施的操作。The control management entity is configured to perform the operations performed by the control management entity in the method according to any one of claims 31-37.
  78. 一种计算机可读存储介质,包括计算机可读指令,其特征在于,当所述计算机可读指令在计算机上运行时,使得所述计算机实施权利要求1-37任一项所述的方法。A computer-readable storage medium comprising computer-readable instructions, characterized in that, when the computer-readable instructions are executed on a computer, the computer is made to implement the method of any one of claims 1-37.
PCT/CN2021/116602 2020-09-15 2021-09-06 Packet processing method, system, and device WO2022057647A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010966693.5 2020-09-15
CN202010966693.5A CN114268592A (en) 2020-09-15 2020-09-15 Message processing method, system and equipment

Publications (1)

Publication Number Publication Date
WO2022057647A1 true WO2022057647A1 (en) 2022-03-24

Family

ID=80777560

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/116602 WO2022057647A1 (en) 2020-09-15 2021-09-06 Packet processing method, system, and device

Country Status (2)

Country Link
CN (1) CN114268592A (en)
WO (1) WO2022057647A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114793199A (en) * 2022-03-30 2022-07-26 新华三信息安全技术有限公司 Message processing method, device and network equipment
CN117978758A (en) * 2024-03-29 2024-05-03 珠海星云智联科技有限公司 Adaptation method for data processing unit, computer device and medium
CN117978758B (en) * 2024-03-29 2024-06-07 珠海星云智联科技有限公司 Adaptation method for data processing unit, computer device and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725705A (en) * 2005-05-09 2006-01-25 杭州华为三康技术有限公司 Method for detecting flow attacking message characteristic of network equipment
CN104702560A (en) * 2013-12-04 2015-06-10 华为技术有限公司 Method and device for preventing message attack
CN105991637A (en) * 2015-06-15 2016-10-05 杭州迪普科技有限公司 Network attack protection method and network attack protection device
US20190230101A1 (en) * 2018-01-19 2019-07-25 Fujitsu Limited Device and method for detecting attack in network
CN111092840A (en) * 2018-10-23 2020-05-01 中兴通讯股份有限公司 Processing strategy generation method, system and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725705A (en) * 2005-05-09 2006-01-25 杭州华为三康技术有限公司 Method for detecting flow attacking message characteristic of network equipment
CN104702560A (en) * 2013-12-04 2015-06-10 华为技术有限公司 Method and device for preventing message attack
CN105991637A (en) * 2015-06-15 2016-10-05 杭州迪普科技有限公司 Network attack protection method and network attack protection device
US20190230101A1 (en) * 2018-01-19 2019-07-25 Fujitsu Limited Device and method for detecting attack in network
CN111092840A (en) * 2018-10-23 2020-05-01 中兴通讯股份有限公司 Processing strategy generation method, system and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114793199A (en) * 2022-03-30 2022-07-26 新华三信息安全技术有限公司 Message processing method, device and network equipment
CN114793199B (en) * 2022-03-30 2024-02-09 新华三信息安全技术有限公司 Message processing method, device and network equipment
CN117978758A (en) * 2024-03-29 2024-05-03 珠海星云智联科技有限公司 Adaptation method for data processing unit, computer device and medium
CN117978758B (en) * 2024-03-29 2024-06-07 珠海星云智联科技有限公司 Adaptation method for data processing unit, computer device and medium

Also Published As

Publication number Publication date
CN114268592A (en) 2022-04-01

Similar Documents

Publication Publication Date Title
US9819590B2 (en) Method and apparatus for notifying network abnormality
US10778809B2 (en) Per-input port, per-control plane network data traffic class control plane policing
US10404555B2 (en) System and method for dynamic management of network device data
EP3253025B1 (en) Sdn-based ddos attack prevention method, device and system
US7921460B1 (en) Rate limiting data traffic in a network
US8443444B2 (en) Mitigating low-rate denial-of-service attacks in packet-switched networks
US20050102414A1 (en) Systems and methods to support quality of service in communications networks
US20070014276A1 (en) Route processor adjusting of line card admission control parameters for packets destined for the route processor
WO2009089701A1 (en) Method and system for packet inspection
US7818795B1 (en) Per-port protection against denial-of-service and distributed denial-of-service attacks
TW201032542A (en) Network intrusion protection
TWI713501B (en) Method, device, flow cleaning equipment and system for identifying network loop
US8505091B2 (en) Method of protecting against denial-of-service attacks
WO2015070608A1 (en) Oam performance monitoring method and apparatus
WO2020083272A1 (en) Processing strategy generation method and system, and storage medium
CA2887428C (en) A computer implemented system and method for secure path selection using network rating
KR20120060655A (en) Routing Method And Apparatus For Detecting Server Attacking And Network Using Method Thereof
US11223568B2 (en) Packet processing method and apparatus
WO2022057647A1 (en) Packet processing method, system, and device
US10944695B2 (en) Uplink port oversubscription determination
CN114157609B (en) PFC deadlock detection method and device
Isyaku et al. Software defined networking failure recovery with flow table aware and flows classification
WO2019096104A1 (en) Attack prevention
WO2021083324A1 (en) Information reporting method, and data processing method and device
Mohammadi et al. Practical extensions to countermeasure dos attacks in software defined networking

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: 21868474

Country of ref document: EP

Kind code of ref document: A1