CN110324198B - Packet loss processing method and packet loss processing device - Google Patents

Packet loss processing method and packet loss processing device Download PDF

Info

Publication number
CN110324198B
CN110324198B CN201810292453.4A CN201810292453A CN110324198B CN 110324198 B CN110324198 B CN 110324198B CN 201810292453 A CN201810292453 A CN 201810292453A CN 110324198 B CN110324198 B CN 110324198B
Authority
CN
China
Prior art keywords
message
packet loss
packet
analog
reason
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201810292453.4A
Other languages
Chinese (zh)
Other versions
CN110324198A (en
Inventor
李先明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201810292453.4A priority Critical patent/CN110324198B/en
Publication of CN110324198A publication Critical patent/CN110324198A/en
Application granted granted Critical
Publication of CN110324198B publication Critical patent/CN110324198B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A packet loss processing method and a packet loss processing device are provided. The packet loss processing device receives a first message sent by a forwarding module of a network device, where the first message is a message determined to be discarded by the forwarding module. The packet loss processing device analyzes the message header of the first message to obtain message header information of the first message; and the packet loss processing device executes packet loss processing according to the message header information. By adopting the technical scheme, the packet loss can be monitored and analyzed in time.

Description

Packet loss processing method and packet loss processing device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a packet loss processing method and apparatus.
Background
With the rapid development of network technology, switches have become indispensable devices in network construction. Fig. 1 shows a schematic diagram of a logical architecture of a typical existing switch. As shown in fig. 1, the conventional switch mainly includes an application-specific integrated circuit (ASIC) chip and a Central Processing Unit (CPU). The ASIC chip provides a plurality of switching ports for connecting with a server or other network equipment, and the message enters the ASIC chip through the switching ports and is forwarded to other equipment.
At present, the traffic to be processed by an ASIC chip in a switch is very large, usually at the level of TeraBytes per second (Tbps), but is limited by the processing capability and cost factor of the chip, and various reasons (such as congestion packet loss caused by common traffic burst, or packet loss caused by failure of packet inspection, failure of forwarding table lookup, and the like) may cause the internal packet discarding of the switch. When messages are discarded in the switch, most of the chips can only count the number of the discarded messages at present, and cannot sense the discarded specific messages and the influenced services, thereby causing great trouble to network maintenance.
Disclosure of Invention
The embodiment of the invention provides a packet loss processing method and device, which can realize timely monitoring and analysis of packet loss.
In a first aspect, an embodiment of the present invention provides a packet loss processing method, where the method is applied to a packet loss processing apparatus, and the method includes:
receiving a first message sent by a forwarding module of network equipment, wherein the first message is a message which is determined to be discarded by the forwarding module;
analyzing the message header of the first message to obtain message header information of the first message;
and executing packet loss processing according to the message header information.
In the above technical solution, the packet loss processing device performs packet loss processing based on the header information of the discarded packet, so that a network manager can formulate a corresponding packet loss control policy based on the header information, thereby implementing timely monitoring and analysis of the discarded packet.
In one possible design, the performing packet loss processing according to the header information includes:
searching a preconfigured service flow characteristic table according to the message header information to obtain network application information corresponding to the message header information, wherein the network application information is used for indicating network applications influenced by the first message, the service flow characteristic table is used for storing service flow characteristics of a plurality of preconfigured network applications, and the service flow characteristics of each network application comprise at least one of the message header information and the network application information; or the message header information is displayed through an output device.
In the technical scheme, the preconfigured service flow characteristic table is an important bridge for realizing the identification of the message to the network application, and the service flow characteristic can be configured according to different application scenes. According to the message header information of the discarded message, the packet loss processing device can determine the network application influenced by the packet loss, or present the analyzed message header information to the network management personnel, so that the network management personnel can make a corresponding packet loss control strategy based on the message header information, and timely monitoring and analysis of the discarded message are realized.
In one possible design, after receiving the first packet sent by the forwarding module of the network device, the method further includes:
determining an analog message, wherein the analog message is a message with a forwarding path the same as that of the first message, and the forwarding path refers to a forwarding path of the message in the forwarding module;
sending the simulation message to the forwarding module;
and acquiring a packet loss reason sent by the forwarding module, wherein the packet loss reason is a reason for discarding the simulation message generated when the forwarding module receives the simulation message and determines to discard the simulation message.
In the above technical solution, the discard reason of the discarded packet may be determined based on the analog packet.
In a possible design, the receiving the reason for the packet loss sent by the forwarding module includes:
receiving a modified simulation message sent by the forwarding module, wherein the modified simulation message carries the reason for the packet loss;
and analyzing the modified simulation message to obtain the reason for the packet loss.
In a possible design, the analog packet is the first packet, or a packet reconstructed by using a packet header of the first packet as a packet header, or a packet reconstructed according to information for determining a forwarding path of the first packet in the packet header information.
In one possible design, the header information may include at least one of the following information:
source media access control MAC address, destination MAC address, source internet protocol IP address, destination IP address, source port, destination port, transport layer protocol.
In one possible design, the network device includes the packet loss processing apparatus.
In a second aspect, an embodiment of the present invention provides a packet loss processing method, where the method is applied to a forwarding module of a network device, and the method includes:
receiving a first message;
when the first message is determined to be discarded, sending the first message to a packet loss processing device, so that the packet loss processing device analyzes a message header of the first message after receiving the first message, obtains message header information of the first message, and executes packet loss processing according to the message header information.
In the above technical solution, when the forwarding module of the network device determines to discard the packet, not only the packet is discarded on the network device, but also the discarded packet is sent to the packet loss processing device, so that the packet loss processing device performs packet loss processing based on the packet header information of the discarded packet, and thus, a network manager can formulate a corresponding packet loss control policy based on the packet header information, thereby implementing timely monitoring and analysis of the discarded packet.
In a possible design, after sending the first packet to a packet loss processing device, the method further includes:
receiving an analog message sent by the packet loss processing device, wherein the analog message is a message with a forwarding path identical to that of the first message, and the forwarding path is a forwarding path of the message in the forwarding module;
determining a forwarding path of the simulation message according to message header information of the simulation message, and forwarding the simulation message according to the forwarding path of the simulation message;
and when determining to discard the analog message, sending a packet loss reason to the packet loss processing device, where the packet loss reason is a reason for discarding the analog message generated when the forwarding module receives the analog message and determines to discard the analog message.
In the above technical solution, the packet loss processing apparatus may determine the discard reason of the discarded packet based on the analog packet.
In one possible design, the sending the reason for the packet loss to the packet loss processing apparatus includes:
adding the packet loss reason into the simulation message to obtain a modified simulation message;
and sending the modified simulation message to the packet loss processing device.
In one possible design, the sending the reason for the packet loss to the packet loss processing apparatus includes:
adding the packet loss reason into the simulation message to obtain a modified simulation message;
and sending the modified simulation message to a Central Processing Unit (CPU) of the network equipment, so that the CPU sends the modified simulation message to the packet loss processing device, or enabling the CPU to analyze the modified simulation message to obtain the reason of the packet loss, and sending the reason of the packet loss obtained by analysis to the packet loss processing device.
In a third aspect, an embodiment of the present invention provides a packet loss processing apparatus, where the apparatus includes a packet loss processing apparatus, and the packet loss processing apparatus includes:
a message receiving unit, configured to receive a first message sent by a forwarding module of a network device, where the first message is a message that is determined by the forwarding module to be discarded;
a message parsing unit, configured to parse a message header of the first message to obtain message header information of the first message;
and the packet loss processing unit is used for executing packet loss processing according to the message header information.
In one possible design, the packet loss processing unit is configured to:
after message header information of a first message is obtained, searching a preconfigured service flow characteristic table according to the message header information to obtain network application information corresponding to the message header information, wherein the network application information is used for indicating network applications influenced by the first message, the service flow characteristic table is used for storing service flow characteristics of a plurality of preconfigured network applications, and the service flow characteristics of each network application comprise at least one of the message header information and the network application information;
or, the message header information is displayed through an output device.
In one possible design, the apparatus further includes:
an analog message determining unit, configured to determine an analog message, where the analog message is a message whose forwarding path is the same as that of the first message, and the forwarding path is a forwarding path of the message in the forwarding module;
the simulation message sending unit is used for sending the simulation message to the forwarding module;
a packet loss reason obtaining unit, configured to obtain a packet loss reason sent by the forwarding module, where the packet loss reason is a reason for discarding the analog packet generated when the forwarding module receives the analog packet and determines to discard the analog packet.
In a possible design, the packet loss cause obtaining unit is specifically configured to:
receiving a modified simulation message sent by the forwarding module, wherein the modified simulation message carries the reason for the packet loss;
and analyzing the modified simulation message to obtain the reason for the packet loss.
In one possible design, the network device includes the packet loss processing apparatus.
In a fourth aspect, an embodiment of the present invention provides a packet loss processing apparatus, where the apparatus includes a forwarding module, where the forwarding module includes:
a first message receiving unit, configured to receive a first message;
and the packet loss processing unit is used for sending the first message to a packet loss processing device when the first message is determined to be discarded, so that the packet loss processing device analyzes the message header of the first message after receiving the first message to obtain the message header information of the first message, and executes packet loss processing according to the message header information.
In one possible design, the apparatus further includes:
an analog message receiving unit, configured to receive an analog message sent by the packet loss processing apparatus, where the analog message is a message whose forwarding path is the same as that of the first message, and the forwarding path is a forwarding path of the message in the forwarding module;
and the analog message processing unit is used for determining a forwarding path of the analog message according to the message header information of the analog message, forwarding the analog message according to the forwarding path of the analog message, and sending a packet loss reason to the packet loss processing device when the analog message is determined to be discarded, wherein the packet loss reason is the reason for discarding the analog message generated when the forwarding module receives the analog message and determines to discard the analog message.
In a possible design, when the analog packet processing unit sends the reason for packet loss to the packet loss processing apparatus, the analog packet processing unit is specifically configured to:
adding the packet loss reason into the simulation message to obtain a modified simulation message;
and sending the modified simulation message to the packet loss processing device.
In a possible design, when the analog packet processing unit sends the reason for packet loss to the packet loss processing apparatus, the analog packet processing unit is specifically configured to:
adding the packet loss reason into the simulation message to obtain a modified simulation message;
and sending the modified simulation message to a Central Processing Unit (CPU) of the network equipment, so as to send the modified simulation message to the packet loss processing device through the CPU, or analyzing the modified simulation message through the CPU to obtain the reason for the packet loss, and sending the reason for the packet loss obtained through analysis to the packet loss processing device.
In a fifth aspect, an embodiment of the present invention provides a network device, where the data processing device includes a processor and a memory;
the memory for storing executable computer program code;
the processor is configured to read the computer program code to run a computer program corresponding to the computer program code, so as to execute the method of the first aspect and the implementations thereof or the second aspect and the implementations thereof.
In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer instructions are stored, and when the computer instructions are executed on a computer, the computer is caused to execute the method according to the first aspect and the implementations thereof or the second aspect and the implementations thereof.
Drawings
Fig. 1 is a schematic diagram showing a structure of a conventional switch;
FIG. 2 is a schematic diagram of a network architecture used by embodiments of the present invention;
fig. 3 is a schematic flow chart of a packet loss processing method used in the embodiment of the present invention;
FIG. 4 illustrates a service traffic characteristics table in an embodiment of the invention;
FIG. 5 illustrates another service traffic characterization table in an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a packet loss processing apparatus used in the embodiment of the present invention;
fig. 7 is a schematic structural diagram of another packet loss processing apparatus used in the embodiment of the present invention;
fig. 8 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the method and apparatus for packet loss processing according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a packet loss processing method and device and network equipment, which can realize the timely monitoring and discovery of discarded messages in network transmission and the timely analysis of the discarded messages when the network equipment needs to discard the messages, provide data support for the timely discovery and positioning of network transmission faults and avoid the defect that the traditional message transmission network reports the message transmission faults after the service quality is reduced. The network device to which the embodiment of the present invention is applicable includes, but is not limited to, a router, a switch, and other devices capable of implementing data forwarding.
Fig. 2 is a schematic diagram of a network architecture to which an embodiment of the present invention is applicable. As shown in fig. 2, the network architecture includes a network device 100 and a packet loss processing apparatus 200. The network device 100 is specifically implemented as the switch in fig. 1, the network device 100 mainly includes a CPU 110 and a forwarding module 120, the CPU 110 and the forwarding module 120 may be connected by a Peripheral Component Interconnect Express (PCIe) bus or an internal bus, and the forwarding module 120 may be specifically implemented as an ASIC chip shown in fig. 1. The forwarding module 120 may mainly include a message processing module 121 and a traffic management module 122. The packet loss processing apparatus 200 is specifically implemented as a field-programmable gate array (FPGA) chip 210 and an analysis module 220, where the analysis module 220 may be specifically implemented as a processor or other electronic devices capable of performing data processing.
The network device 100 receives first messages sent by other network devices or user terminal devices through a plurality of switching ports of the network device, and a majority of processing processes of the received first messages are completed by the forwarding module 120, where the message processing module 121 is mainly responsible for verification, parsing, forwarding table lookup, message sending, and the like of the first messages, and the traffic management module 122 is mainly responsible for caching of the messages, management of a cache queue, scheduling of the messages, and the like. The CPU 110 is mainly responsible for local management of the switch 100, including the configuration of the forwarding module 120, the configuration of forwarding tables, and network management. In addition, control information such as a control packet (e.g., a routing information packet) received by the switch 100 is generally sent to the input CPU 110 by the forwarding module 120 through the PCIe bus or the internal bus, and then processed by the CPU 110.
In the network architecture shown in fig. 2, after a first packet (e.g., packet 1, packet 2, packet 3, and packet 4 shown in fig. 2) enters the forwarding module 120 through a switching port of the switch 100, the forwarding processing of the first packet is completed through the packet processing module 121 and the traffic management module 122. In the process of the first packet forwarding processing, the packet processing module 121 and the traffic management module 122 may determine the first packet that needs to be discarded, and send the first packet that needs to be discarded to the packet loss processing device 200 for processing. For example, if the message processing module 121 determines that one or more first messages need to be discarded due to various reasons such as a message error or a forwarding table lookup failure, the message processing module 121 directly sends the first messages that need to be discarded to the FPGA chip 210; if the message processing module 121 determines that the first message does not need to be discarded in the process of message processing, the message is sent to the traffic management module 122, and the traffic management module 122 caches the message received from the message processing module 121 into a message cache space (a storage space for caching the message) of the switch 100, at this time, if the message needs to be discarded due to insufficient message cache space or other reasons, the traffic management module 122 sends the message that needs to be discarded to the FPGA chip 210. It can be seen that packet loss may occur in different forwarding processing stages of the packet.
As shown in fig. 2, in the network architecture, the switch 100 receives four first messages, i.e., a message 1, a message 2, a message 3, and a message 4, where the message 3 is the first message determined to be discarded, and the switch 100 sends the message 3 to the FPGA chip 210.
After receiving the message 3 sent by the switch 100, the FPGA chip 210 may analyze the header of the message 3 to obtain the message characteristics of the discarded message, that is, the header information of the message, so that the analyzed header information can be presented to a network manager, so that the network manager can formulate a corresponding packet loss control policy based on the header information to implement timely monitoring and analyzing of the discarded message. After the header information of the discarded packet is obtained through parsing, the FPGA chip 210 may further send the information to the analysis module 220, and the analysis module 220 performs further processing based on the header information. In practical application, different processing strategies may be preconfigured for the analysis module 220 according to actual needs, and after receiving the header information sent by the FPGA chip 210, the analysis module 220 may perform corresponding processing according to the header information and the configured processing strategies. Thus, when the forwarding module 120 determines to discard the first packet, the first packet is sent to the packet loss processing device 200, and the packet loss processing device 200 may analyze the packet characteristics of the discarded packet, for example, the packet header information, and may further obtain the application information of the discarded packet and/or the packet loss reason of the packet, so as to implement timely monitoring and analysis of packet loss, provide data support for analysis and positioning of network faults, and reduce operation and maintenance costs of the network.
An embodiment of the present invention provides a packet loss processing method, which may be used in a network architecture shown in fig. 2, and as shown in fig. 3, the packet loss processing method includes:
301, the forwarding module 120 receives the first packet.
The forwarding module 120 determines whether to discard the first packet after receiving the first packet, and sends the first packet to the packet loss processing device 200 after determining to discard the first packet; and when the first message is determined not to be discarded, normally processing the first message, for example, forwarding the first message according to information carried in a message header of the first message.
302, the forwarding module 120 sends the first packet to the packet loss processing apparatus 200 when determining to discard the first packet.
The forwarding module 120 does not forward the first packet, but sends the first packet to the packet loss processing device 200, so that the packet loss processing device 200 processes the first packet.
303, after receiving the first packet, the packet loss processing device 200 parses the header of the first packet to obtain the header information of the first packet.
The header information may include one or more of a source Media Access Control (MAC) address, a destination MAC address, a source Internet Protocol (IP) address, a destination IP address, a source port, a destination port, and a transport layer Protocol.
In the embodiment of the present invention, the packet loss processing device 200 receives and analyzes the packet determined to be discarded by the forwarding module 120, and then obtains the header information of the discarded packet, thereby implementing timely monitoring and analysis of the discarded packet, providing data support for analysis and positioning of network faults, and reducing the operation and maintenance cost of the network.
In an implementation manner of the embodiment of the present invention, after step 303 of the method shown in fig. 3, the method may further include:
304, the packet loss processing device 200 executes packet loss processing according to the header information.
Specifically, the packet loss processing device 200 searches a preconfigured service traffic characteristic table according to the header information to obtain network application information corresponding to the header information. The network application information is used for indicating the network application influenced by the first message.
The service flow characteristic table is used for storing service flow characteristics of various pre-configured network applications. In the service traffic characteristics table shown in fig. 4, the service traffic characteristics of each network application include at least one of header information and network application information.
Specifically, the service traffic characteristic table may be preconfigured in the analysis module 220, and the service traffic characteristic table is configured to store service traffic characteristics of a plurality of preconfigured network applications, where the service traffic characteristic of each network application includes at least one of header information of a packet corresponding to the network application and network application information of the network application.
The service flow characteristics are information related to the network application corresponding to the message, are an important bridge for realizing the identification from the message to the network application, and can be configured according to different application scenes. For example, in the traffic flow characteristic table shown in fig. 5, the traffic flow characteristic may include network application information in addition to the same information as at least one of the header information (which is used for comparison with the header information of the dropped packet), wherein the network application information may include, but is not limited to, one or more of network layer Protocol (such as TCP Protocol or UDP Protocol), network layer port number (such as port number 80), traffic type (such as HyperText Transfer Protocol (HTTP) traffic or File Transfer Protocol (FTP) traffic, etc.), and other information.
Based on the service flow characteristic table, after receiving the message header information sent by the FPGA chip, the analysis module 220 may search the network application information matched with the received message header information in the service flow characteristic table, so as to determine the network application affected by packet loss. The matching means that at least one piece of information in the received message header information is the same as at least one piece of information in the service traffic characteristics, and the network application information in the matched service traffic characteristics is the matched network application information.
In order to implement the positioning of the reason for the packet loss in the embodiment of the present invention, the analysis module 220 may further construct an analog packet (i.e., the packet loss positioning packet shown in fig. 2) having the same forwarding path as the first packet according to the packet header information received from the FPGA chip 210, and send the analog packet to the switch 100, so as to determine the reason for the packet loss based on the analog packet.
In another implementation manner of the embodiment of the present invention, after step 303 of the method shown in fig. 3, the method may further include: the packet loss processing device 200 determines an analog packet and sends the analog packet to the forwarding module 120; after receiving the analog packet sent by the packet loss processing device 200, the forwarding module 120 determines a forwarding path of the analog packet according to the packet header information of the analog packet, performs forwarding processing on the analog packet according to the forwarding path of the analog packet, and sends a packet loss reason to the packet loss processing device 200 when determining to discard the analog packet; then, the packet loss processing device 200 may obtain the reason for the packet loss sent by the forwarding module 120.
The simulation message is a message with the same forwarding path as that of the first message, and the forwarding path refers to the forwarding path of the message in the forwarding module. The reason for the packet loss is the reason why the forwarding module 120 receives the analog packet and determines to discard the analog packet generated when discarding the analog packet.
Since the payload (payload) of the first packet does not participate in forwarding routing, there is no influence on the behavior of the switch 100 in forwarding packets, and therefore, the payload of the dummy packet can be arbitrarily filled.
In one embodiment, analysis module 220 may send the simulated message to CPU 110, with CPU 110 sending the simulated message to forwarding module 120.
It can be understood that, in actual operation, if the data size of the analog packet is not considered, the FPGA chip 210 may further send the received first packet to the analysis module 220, and the analysis module 220 may directly send the first packet to the forwarding module 120 as the analog packet.
After receiving the analog message, the forwarding module 120 determines a forwarding path of the analog message according to the message header information of the analog message, and since the forwarding path of the analog message is the same as the forwarding path of the discarded first message corresponding to the forwarding path, the forwarding module 120 processes the analog message according to the same forwarding flow as the discarded first message, where the forwarding flow of the message generally mainly includes steps of checking the message, checking an Access Control List (ACL), finding an egress port through a forwarding table, and the like. In the process of forwarding the analog packet, when determining that the analog packet needs to be discarded, the forwarding module 120 adds the packet loss reason condition to the analog packet to obtain a modified analog packet, and then uploads the modified analog packet carrying the packet loss reason to the CPU 110. The reason for the packet loss is the reason for discarding the analog packet generated when the forwarding module 120 receives the analog packet and determines to discard the analog packet.
After receiving the modified analog packet with the packet loss reason, the CPU 110 may analyze the modified analog packet to obtain the packet loss reason, and send the packet loss reason to the analysis module 220. Of course, the CPU 110 may also directly send the modified analog packet carrying the reason for the packet loss to the packet loss processing device 200, and the analysis module 220 or the FPGA chip 210 of the packet loss processing device 200 completes analysis of the modified analog packet to obtain the reason for the packet loss.
Based on the packet loss processing method provided by the embodiment of the invention, the message characteristics (message header information) of the discarded message can be analyzed and obtained, the application information of the discarded message and/or the packet loss reason of the message can be further obtained, the timely monitoring and analysis of the packet loss are realized, the data support is provided for the analysis and positioning of the network fault, and the operation and maintenance cost of the network is reduced.
It is understood that the network architecture shown in fig. 2 is only one of the network architectures to which the embodiments of the present invention are applicable, and the implementation and connection relationship of the components or modules in the network architecture shown in the figure are only one possible solution, but not the only one. For example, the packet loss processing apparatus 200 may be a device independent from the switch 100, or may be a module in the switch 100, that is, the packet loss processing apparatus 200 may be separately provided, or may be integrally provided in the switch. Similarly, the analysis module 220 of the packet loss processing apparatus 200 may be integrated in the FPGA chip 210, or may be a single processor or chip. Of course, the FPGA chip 210 is also merely an example and may be implemented by other chips or processors having programmable functions. In addition, if the performance of the CPU 110 of the switch 100 is high enough, the packet loss processing apparatus 200 may also be directly implemented by the CPU 110, that is, the implementation of the above functions and/or operations of the packet loss processing apparatus 200 may be performed by the CPU 110.
In order to implement the above method embodiments, the present application further provides a packet loss processing apparatus.
Fig. 6 shows a schematic structural diagram of a packet loss processing apparatus used in an embodiment of the present invention, where the packet loss processing apparatus specifically includes a message receiving unit 601, a message parsing unit 602, and a packet loss processing unit 603.
A message receiving unit 601, configured to receive a first message sent by a forwarding module of a network device, where the first message is a message that the forwarding module determines to discard.
A message parsing unit 602, configured to parse a message header of the first message to obtain message header information of the first message;
a packet loss processing unit 603, configured to perform packet loss processing according to the header information.
In an optional embodiment of the present invention, the packet loss processing unit 603 is configured to, after obtaining packet header information of a first packet, search a preconfigured service traffic characteristic table according to the packet header information, to obtain network application information corresponding to the packet header information, where the network application information is used to indicate a network application affected by the first packet, the service traffic characteristic table is used to store service traffic characteristics of a plurality of preconfigured network applications, and the service traffic characteristic of each network application includes at least one of the packet header information and the network application information;
in another alternative embodiment, the packet loss processing unit 603 is configured to display the header information through an output device.
In an optional embodiment of the present invention, the packet loss processing apparatus further includes an analog packet determining unit 604, an analog packet sending unit 605, and a packet loss reason obtaining unit 606.
An analog packet determining unit 604, configured to determine an analog packet, where the analog packet is a packet whose forwarding path is the same as that of the first packet, and the forwarding path is a forwarding path of the packet in the forwarding module;
an analog message sending unit 605, configured to send the analog message to the forwarding module;
a packet loss reason obtaining unit 606, configured to obtain a packet loss reason sent by the forwarding module, where the packet loss reason is a reason for discarding the analog packet generated when the forwarding module receives the analog packet and determines to discard the analog packet.
In an optional embodiment of the present invention, the packet loss reason acquiring unit 606 is specifically configured to:
receiving, by a message receiving unit 601, a modified analog message sent by the forwarding module, where the modified analog message carries the reason for the packet loss;
and analyzing the modified simulation message to obtain the reason for the packet loss.
In an optional embodiment of the present invention, the network device includes the packet loss processing apparatus.
Fig. 7 shows a schematic structural diagram of another packet loss processing apparatus used in the embodiment of the present invention, where the packet loss processing apparatus includes a forwarding module 701, and the forwarding module 701 includes: a first message receiving unit 7011 and a packet loss processing unit 7012.
A first message receiving unit 7011, configured to receive a first message;
a packet loss processing unit 7012, configured to send the first packet to a packet loss processing device when it is determined to discard the first packet, so that the packet loss processing device, after receiving the first packet, parses a packet header of the first packet to obtain packet header information of the first packet, and performs packet loss processing according to the packet header information.
In an optional embodiment of the present invention, the packet loss processing apparatus further includes an analog packet receiving unit 702 and an analog packet processing unit 703.
An analog packet receiving unit 702, configured to receive an analog packet sent by the packet loss processing apparatus, where the analog packet is a packet whose forwarding path is the same as that of the first packet, and the forwarding path is a forwarding path of a packet in the forwarding module;
an analog packet processing unit 703 is configured to determine a forwarding path of the analog packet according to packet header information of the analog packet, forward the analog packet according to the forwarding path of the analog packet, and send a packet loss reason to the packet loss processing device when determining to discard the analog packet, where the packet loss reason is a reason for discarding the analog packet generated when the forwarding module receives the analog packet and determines to discard the analog packet.
In an optional embodiment of the present invention, when the analog packet processing unit 703 sends the reason for packet loss to the packet loss processing apparatus, it is specifically configured to:
adding the packet loss reason into the simulation message to obtain a modified simulation message;
and sending the modified simulation message to the packet loss processing device.
In an optional embodiment of the present invention, when the analog packet processing unit 703 sends the reason for packet loss to the packet loss processing apparatus, it is specifically configured to:
adding the packet loss reason into the simulation message to obtain a modified simulation message;
and sending the modified simulation message to a Central Processing Unit (CPU) of the network equipment, so as to send the modified simulation message to the packet loss processing device through the CPU, or sending the packet loss reason obtained through analysis to the packet loss processing device through the CPU, so as to obtain the packet loss reason through analysis of the modified simulation message.
Fig. 8 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the method and apparatus for packet loss processing according to an embodiment of the present invention.
As shown in fig. 8, computing device 800 includes an input device 801, an input interface 802, a processor 803, a memory 804, an output interface 805, and an output device 806.
The input interface 802, the processor 803, the memory 804, and the output interface 805 are connected to each other via a bus 810, and the input device 801 and the output device 806 are connected to the bus 810 via the input interface 802 and the output interface 805, respectively, and further connected to other components of the computing device 800.
Specifically, the input device 801 receives input information from the outside and transmits the input information to the processor 803 through the input interface 802; the processor 803 processes input information based on computer-executable instructions stored in the memory 804 to generate output information, stores the output information in the memory 804 temporarily or permanently, and then transmits the output information to the output device 806 via the output interface 805; output device 806 outputs output information external to computing device 800 for use by a user.
The memory 804 also stores program code that the processor 803 invokes to cause the computing device 800 to perform the steps of the methods described herein.
The processor 803 may be one or more CPUs. In the case where the processor 801 is one CPU, the CPU may be a single-core CPU or a multi-core CPU.
The memory 804 may be, but is not limited to, one or more of Random Access Memory (RAM), Read Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), compact disc read only memory (CD-ROM), a hard disk, and the like. The memory 804 is used to store program codes.
The above-described embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media.

Claims (15)

1. A packet loss processing method is applicable to a packet loss processing device, and comprises the following steps:
receiving a first message sent by a forwarding module of network equipment, wherein the first message is a message which is determined to be discarded by the forwarding module;
analyzing the message header of the first message to obtain message header information of the first message;
executing packet loss processing according to the message header information;
wherein, the executing packet loss processing according to the header information includes:
and searching a preconfigured service flow characteristic table according to the message header information to obtain network application information corresponding to the message header information, wherein the network application information is used for indicating the network application influenced by the first message, the service flow characteristic table is used for storing service flow characteristics of a plurality of preconfigured network applications, and the service flow characteristics of each network application comprise at least one of the message header information and the network application information.
2. The method of claim 1, wherein after obtaining the header information of the first packet, the method further comprises:
and displaying the message header information through an output device.
3. The method according to claim 1 or 2, wherein after receiving the first packet sent by the forwarding module of the network device, the method further comprises:
determining an analog message, wherein the analog message is a message with a forwarding path the same as that of the first message, and the forwarding path refers to a forwarding path of the message in the forwarding module;
sending the simulation message to the forwarding module;
and acquiring a packet loss reason sent by the forwarding module, wherein the packet loss reason is a reason for discarding the simulation message generated when the forwarding module receives the simulation message and determines to discard the simulation message.
4. The method according to claim 3, wherein the receiving the reason for the packet loss sent by the forwarding module includes:
receiving a modified simulation message sent by the forwarding module, wherein the modified simulation message carries the reason for the packet loss;
and analyzing the modified simulation message to obtain the reason for the packet loss.
5. The method according to claim 3, wherein the analog packet is the first packet, or a packet reconstructed by using a header of the first packet as a header, or a packet reconstructed according to information in the header information for determining a forwarding path of the first packet.
6. A packet loss processing method is applicable to a forwarding module of a network device, and the method comprises the following steps:
receiving a first message;
when the first message is determined to be discarded, sending the first message to a packet loss processing device, so that the packet loss processing device analyzes a message header of the first message after receiving the first message, so as to obtain message header information of the first message, and executing packet loss processing according to the message header information;
after the sending the first packet to a packet loss processing device, the method further includes: receiving an analog message sent by the packet loss processing device, wherein the analog message is a message with a forwarding path identical to that of the first message, and the forwarding path is a forwarding path of the message in the forwarding module; determining a forwarding path of the simulation message according to message header information of the simulation message, and forwarding the simulation message according to the forwarding path of the simulation message; and when determining to discard the analog message, sending a packet loss reason to the packet loss processing device, where the packet loss reason is a reason for discarding the analog message generated when the forwarding module receives the analog message and determines to discard the analog message.
7. The method according to claim 6, wherein the sending the packet loss reason to the packet loss processing device includes:
adding the packet loss reason into the simulation message to obtain a modified simulation message;
and sending the modified simulation message to the packet loss processing device.
8. The method according to claim 6, wherein the sending the packet loss reason to the packet loss processing device includes:
adding the packet loss reason into the simulation message to obtain a modified simulation message;
and sending the modified simulation message to a Central Processing Unit (CPU) of the network equipment, so that the CPU sends the modified simulation message to the packet loss processing device, or enabling the CPU to analyze the modified simulation message to obtain the reason of the packet loss, and sending the reason of the packet loss obtained by analysis to the packet loss processing device.
9. A packet loss processing apparatus, comprising:
a message receiving unit, configured to receive a first message sent by a forwarding module of a network device, where the first message is a message that is determined by the forwarding module to be discarded;
a message parsing unit, configured to parse a message header of the first message to obtain message header information of the first message;
a packet loss processing unit, configured to perform packet loss processing according to the header information;
the packet loss processing unit is further configured to, after obtaining packet header information of a first packet, search a preconfigured service traffic characteristic table according to the packet header information, to obtain network application information corresponding to the packet header information, where the network application information is used to indicate a network application affected by the first packet, the service traffic characteristic table is used to store service traffic characteristics of a plurality of preconfigured network applications, and the service traffic characteristics of each network application include at least one of the packet header information and the network application information.
10. The apparatus of claim 9, wherein the packet loss processing unit is further configured to display the header information through an output device.
11. The apparatus of claim 9 or 10, further comprising:
an analog message determining unit, configured to determine an analog message, where the analog message is a message whose forwarding path is the same as that of the first message, and the forwarding path is a forwarding path of the message in the forwarding module;
the simulation message sending unit is used for sending the simulation message to the forwarding module;
a packet loss reason obtaining unit, configured to obtain a packet loss reason sent by the forwarding module, where the packet loss reason is a reason for discarding the analog packet generated when the forwarding module receives the analog packet and determines to discard the analog packet.
12. The apparatus according to claim 11, wherein the packet loss cause acquiring unit is specifically configured to:
receiving a modified simulation message sent by the forwarding module, wherein the modified simulation message carries the reason for the packet loss;
and analyzing the modified simulation message to obtain the reason for the packet loss.
13. A packet loss processing apparatus, wherein the apparatus comprises a forwarding module, and wherein the forwarding module comprises:
a first message receiving unit, configured to receive a first message;
the packet loss processing unit is configured to send the first packet to a packet loss processing device when the first packet is determined to be discarded, so that the packet loss processing device analyzes a packet header of the first packet after receiving the first packet to obtain packet header information of the first packet, and performs packet loss processing according to the packet header information;
an analog message receiving unit, configured to receive an analog message sent by the packet loss processing apparatus, where the analog message is a message whose forwarding path is the same as that of the first message, and the forwarding path is a forwarding path of the message in the forwarding module;
and the analog message processing unit is used for determining a forwarding path of the analog message according to the message header information of the analog message, forwarding the analog message according to the forwarding path of the analog message, and sending a packet loss reason to the packet loss processing device when the analog message is determined to be discarded, wherein the packet loss reason is the reason for discarding the analog message generated when the forwarding module receives the analog message and determines to discard the analog message.
14. The apparatus of claim 13, wherein when sending the packet loss reason to the packet loss processing apparatus, the analog packet processing unit is specifically configured to:
adding the packet loss reason into the simulation message to obtain a modified simulation message;
and sending the modified simulation message to the packet loss processing device.
15. The apparatus of claim 14, wherein when sending the packet loss reason to the packet loss processing apparatus, the analog packet processing unit is specifically configured to:
adding the packet loss reason into the simulation message to obtain a modified simulation message;
and sending the modified simulation message to a Central Processing Unit (CPU) of the network equipment, so as to send the modified simulation message to the packet loss processing device through the CPU, or analyzing the modified simulation message through the CPU to obtain the reason for the packet loss, and sending the reason for the packet loss obtained through analysis to the packet loss processing device.
CN201810292453.4A 2018-03-30 2018-03-30 Packet loss processing method and packet loss processing device Active CN110324198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810292453.4A CN110324198B (en) 2018-03-30 2018-03-30 Packet loss processing method and packet loss processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810292453.4A CN110324198B (en) 2018-03-30 2018-03-30 Packet loss processing method and packet loss processing device

Publications (2)

Publication Number Publication Date
CN110324198A CN110324198A (en) 2019-10-11
CN110324198B true CN110324198B (en) 2021-06-04

Family

ID=68112257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810292453.4A Active CN110324198B (en) 2018-03-30 2018-03-30 Packet loss processing method and packet loss processing device

Country Status (1)

Country Link
CN (1) CN110324198B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110838949B (en) * 2018-08-16 2023-09-29 阿里巴巴集团控股有限公司 Network traffic log recording method and device
CN111030884B (en) * 2019-11-25 2021-12-24 杭州迪普科技股份有限公司 Method and device for acquiring interface packet loss
CN112702236B (en) * 2020-12-23 2022-11-11 锐捷网络股份有限公司 Method and processor for realizing packet loss detection
CN115473818B (en) * 2021-06-10 2024-03-26 维沃移动通信有限公司 Method and device for acquiring flow characteristic analysis result and network side equipment
CN113590431B (en) * 2021-09-27 2022-01-21 联想长风科技(北京)有限公司 Dynamic monitoring method and system for data transmission of CPU and FPGA
CN116830543A (en) * 2022-01-11 2023-09-29 华为技术有限公司 Packet loss processing method, device, switch, sending equipment and data transmission system
CN115484193A (en) * 2022-08-22 2022-12-16 北京东土军悦科技有限公司 Method, system, storage medium and device for monitoring and analyzing network packet loss flow
CN116436825A (en) * 2022-10-27 2023-07-14 中国电信股份有限公司 Packet loss processing method and system and network equipment
CN116016277A (en) * 2022-12-08 2023-04-25 苏州盛科通信股份有限公司 Monitoring method and device for network congestion packet loss, electronic equipment and storage medium
CN117560306B (en) * 2024-01-11 2024-04-02 腾讯科技(深圳)有限公司 Packet loss reporting method, network switch and related device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114989B (en) * 2006-07-28 2011-07-13 中兴通讯股份有限公司 Method for processing three-layer ethernet switchboard direct connection host computer routing
CN101635713A (en) * 2009-06-09 2010-01-27 北京安天电子设备有限公司 Method and system for preventing local area network ARP defection attacks
CN103036734A (en) * 2011-10-10 2013-04-10 盛科网络(苏州)有限公司 Logic verification method and logic verification system for network chip
CN102752792B (en) * 2011-12-26 2015-08-19 华为技术有限公司 Method, the equipment and system of monitoring mobile terminal Internet access quality of service
US20160127402A1 (en) * 2014-11-04 2016-05-05 Patternex, Inc. Method and apparatus for identifying and detecting threats to an enterprise or e-commerce system
JP6586667B2 (en) * 2016-03-07 2019-10-09 富士通株式会社 Packet verification program, packet verification apparatus, and packet verification method

Also Published As

Publication number Publication date
CN110324198A (en) 2019-10-11

Similar Documents

Publication Publication Date Title
CN110324198B (en) Packet loss processing method and packet loss processing device
US20220263735A1 (en) Method and system for deep packet inspection in software defined networks
US10764148B2 (en) Methods, systems, and computer readable media for network traffic statistics collection
US8014295B2 (en) Parallel packet processor with session active checker
CN110557342B (en) Apparatus for analyzing and mitigating dropped packets
US10348510B2 (en) Switching device and packet discarding method
US8537839B2 (en) Traffic generator with dynamic MPLS label assignment
CN112039796B (en) Data packet transmission method and device, storage medium and electronic equipment
US10284460B1 (en) Network packet tracing
US9137305B2 (en) Information processing device, computer-readable recording medium, and control method
WO2021164261A1 (en) Method for testing cloud network device, and storage medium and computer device
JP2015057931A (en) Network apparatus, communication system, and detection method and program for abnormal traffic
CN111026324B (en) Updating method and device of forwarding table entry
CN111800501A (en) Method and device for processing service request, storage medium and electronic equipment
US9917747B2 (en) Problem detection in a distributed digital network through distributed packet analysis
CN110545230B (en) Method and device for forwarding VXLAN message
US8966321B2 (en) Logical port and layer protocol test configuration resource manager
Orosz et al. C-GEP: Adaptive network management with reconfigurable hardware
US8655969B2 (en) Statistics reporting in a network test system
CN110959278A (en) Packet batching using graph path based pre-classification
Thanh et al. On Profiling, Benchmarking and Behavioral Analysis of SDN Architecture Under DDoS Attacks
US10462017B2 (en) Network property verification in hybrid networks
Lucero et al. Routing in Fat Trees: a protocol analyzer for debugging and experimentation
CN115250254B (en) Netflow message distribution processing method and device
US12010001B2 (en) Extending distributed application tracing for network optimizations

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant