CN116319448A - Packet loss diagnosis method, apparatus, electronic device and computer readable storage medium - Google Patents

Packet loss diagnosis method, apparatus, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN116319448A
CN116319448A CN202310132727.4A CN202310132727A CN116319448A CN 116319448 A CN116319448 A CN 116319448A CN 202310132727 A CN202310132727 A CN 202310132727A CN 116319448 A CN116319448 A CN 116319448A
Authority
CN
China
Prior art keywords
packet loss
message
pipeline
information
original
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.)
Pending
Application number
CN202310132727.4A
Other languages
Chinese (zh)
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.)
Suzhou Centec Communications Co Ltd
Original Assignee
Suzhou Centec Communications 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 Suzhou Centec Communications Co Ltd filed Critical Suzhou Centec Communications Co Ltd
Priority to CN202310132727.4A priority Critical patent/CN116319448A/en
Publication of CN116319448A publication Critical patent/CN116319448A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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
    • 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/22Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]

Abstract

The embodiment of the invention provides a packet loss diagnosis method, a device, electronic equipment and a computer readable storage medium, which belong to the technical field of communication, a chip sequentially carries out packet loss detection on received original messages through various pipelines, generates packet loss information, and reports reserved packet loss signals to an embedded CPU (central processing unit) arranged on the chip.

Description

Packet loss diagnosis method, apparatus, electronic device and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a packet loss diagnosis method, a device, an electronic apparatus, and a computer readable storage medium.
Background
The chips of the network devices typically employ a multistage pipeline (pipeline) architecture that includes an ingress direction processing pipeline, a traffic management unit, and an egress direction processing pipeline. The messages received by the network equipment sequentially pass through all levels of pipelines, namely the messages sequentially pass through an incoming direction processing pipeline, a flow management unit and an outgoing direction processing pipeline, so that the table look-up, editing and forwarding of the messages are realized.
Aiming at the packet loss phenomenon in the processing process of the chip to the message, the traditional packet loss diagnosis method is to arrange diagnosis information buffer registers in each level of production line of the chip and record the table lookup information of the passing message in each level of production line, so that a CPU (Centeral Processing Unit, central processing unit) reads the diagnosis information of each register in an IO mode and translates the diagnosis information. However, the conventional packet loss diagnosis method cannot handle diagnosis in the case that a large number of packet losses exist in the chip.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a packet loss diagnosis method, apparatus, electronic device, and computer readable storage medium, which can solve the problem that the conventional method cannot perform diagnosis processing when a chip loses a large amount of packets.
In order to achieve the above object, the technical scheme adopted by the embodiment of the invention is as follows:
in a first aspect, an embodiment of the present invention provides a packet loss diagnosis method, applied to a chip of a network device, where the chip includes an embedded CPU and a multi-stage pipeline, and the multi-stage pipeline includes an ingress direction processing pipeline, a traffic management unit, and an egress direction processing pipeline, and the method includes:
when an original message sent by external equipment is received, carrying out packet loss detection on the original message on each stage of pipeline, and when any stage of pipeline detects that packet loss is generated, generating a packet loss signal according to the packet loss reason;
under the condition that the reserved packet loss signal is detected, reporting the original message and the packet loss signal to an embedded CPU, and adding first additional information into the original message through the embedded CPU; the first additional information comprises a packet loss reason in a packet loss signal of a single-stage pipeline;
under the condition that the multistage assembly line completes all packet loss detection and first additional information corresponding to each stage of assembly line is added in the original message, second additional information and the original message are analyzed from the added message; wherein, the second additional information includes the packet loss reasons in all packet loss signals;
The embedded CPU edits the second additional information and the original message according to the path information from the network equipment to the target monitoring equipment to obtain an alarm message, and sends the alarm message to the outgoing direction processing pipeline;
and forwarding the alarm message to the target monitoring equipment through the outgoing direction processing pipeline so as to visually display the alarm message on the target monitoring equipment.
Further, the embedded CPU comprises an analysis device and a cache device;
after the step of parsing the second additional information and the original message from the added message, before the step of editing the second additional information and the original message to obtain the notification message according to the path information from the network device to the target monitoring device by the embedded CPU, the method further includes:
transmitting the second additional information and the original message to the buffer memory device through the analysis device; the second additional information further comprises forwarding information of the original message, a source port, an output port and a timestamp of entering the network equipment;
inquiring whether packet loss record information of the original message is recorded in a preset packet loss message record table or not based on the second additional information and the original message by the caching device;
If not, recording the packet loss record information of the original message in the packet loss message record table;
if yes, updating the packet loss record information; the packet loss record information comprises a characteristic field and a packet identifier of the original packet, a packet loss identifier ID, a time stamp and a packet loss number value.
Further, the step of querying whether packet loss record information of the original packet is recorded in a preset packet loss record table based on the second additional information and the original packet includes:
carrying out hash calculation based on the second additional information and the original message to obtain a hash value;
and inquiring whether a message which is the same as the original message exists in a preset packet loss message record table according to the hash value and the message identifier.
Further, the method further comprises:
acquiring an original message corresponding to a packet loss Identification (ID) and a packet loss reason of the original message through the embedded CPU;
according to all the packet loss reasons, adding a diagnosis mark into the message header of the original message to obtain a diagnosis message, and resending the diagnosis message to the multi-stage pipeline; the diagnosis mark comprises a first mark and a second mark, the first mark indicates that the diagnosis message is to be re-diagnosed, and the second mark diagnosis mark comprises diagnosis values of all levels of pipelines;
Aiming at each stage of the pipeline, carrying out packet loss detection on the original message again through the stage of the pipeline under the condition that a diagnosis value corresponding to the stage of the pipeline indicates to be diagnosed, so as to obtain diagnosis information; the diagnosis information comprises packet loss bits and/or packet loss contents;
and writing the diagnosis information obtained by each level of the pipeline into a chip register, and reporting the message carrying all the diagnosis information to the embedded CPU.
Further, the step of editing the second additional information and the original message according to the path information from the network device to the target monitoring device to obtain an alarm message includes:
according to a preset fixed format, adjusting and assembling the second additional information and the original message to obtain an adjusted message;
determining path information from the network equipment to target monitoring equipment, and adding the path information into a message header of the adjustment message;
adding all the analyzed diagnostic information to the message header of the adjustment message for the message carrying all the diagnostic information;
and taking the adjustment message added with the path information and all the diagnosis information as an alarm message.
Further, the method further comprises:
and under the condition that the packet loss times value reaches a reporting threshold value, executing the step of obtaining an alarm message by editing the second additional information and the original message according to the path information from the network equipment to the target monitoring equipment by the embedded CPU, and sending the alarm message to the outgoing direction processing pipeline.
Further, after the step of generating a packet loss signal according to a packet loss reason, before the step of reporting the original packet and the packet loss signal to an embedded CPU in the case that the reserved packet loss signal is detected, the method further includes:
when the packet loss signal is generated, a random value is generated, whether the random value is larger than a preset threshold value or not is judged, if not, the packet loss signal is reserved, and if yes, the packet loss signal is deleted.
In a second aspect, an embodiment of the present invention provides a packet loss diagnosis device, which is applied to a chip of a network device, where the chip includes an embedded CPU and a multi-stage pipeline, the multi-stage pipeline includes an ingress direction processing pipeline, a flow management unit, and an egress direction processing pipeline, and the packet loss diagnosis device includes a packet loss detection module, a reporting module, a receiving module, an analysis module, a sending module, and a forwarding module;
The packet loss detection module is used for carrying out packet loss detection on the original message on each stage of the pipeline when receiving the original message sent by the external equipment, and generating a packet loss signal according to the packet loss reason when detecting that packet loss is generated on any stage of the pipeline;
the reporting module is used for reporting the original message and the packet loss signal to an embedded CPU (central processing unit) under the condition that the reserved packet loss signal is detected;
the receiving module is used for adding first additional information into the original message through the embedded CPU; the first additional information comprises a packet loss reason in a packet loss signal of a single-stage pipeline;
the analysis module is used for analyzing second additional information and an original message from the added message under the condition that all packet loss detection is completed by the multi-stage pipeline and the first additional information corresponding to each stage of pipeline is added in the original message; wherein, the second additional information includes the packet loss reasons in all packet loss signals;
the sending module is used for editing the second additional information and the original message to obtain an alarm message according to the path information from the network equipment to the target monitoring equipment through the embedded CPU, and sending the alarm message to the outgoing direction processing pipeline;
And the forwarding module is used for forwarding the alarm message to the target monitoring equipment through the outgoing direction processing pipeline so as to visually display the alarm message on the target monitoring equipment.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the memory stores machine executable instructions executable by the processor, and the processor may execute the machine executable instructions to implement the packet loss diagnosis method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the packet loss diagnosis method according to the first aspect.
According to the packet loss diagnosis method, the device, the electronic equipment and the computer readable storage medium, when the chip of the network equipment receives an original packet, packet loss detection is sequentially carried out on the original packet through the incoming direction processing pipeline, the flow management unit and the outgoing direction processing pipeline, packet loss information is generated, the reserved packet loss signals are reported to the embedded CPU arranged on the chip, first additional information corresponding to the packet loss signals of all stages of pipelines is added into the original packet through the embedded CPU, so that the packet added with all the first additional information is analyzed through the embedded CPU, second additional information and the original packet are obtained, the path information from the network equipment to the target monitoring equipment is combined, the alarm message is obtained through editing, the edited packet is forwarded to the target monitoring equipment through the outgoing direction processing pipeline, the packet loss information is timely processed through the embedded CPU as independent resources, the pipeline resources of the chip are not occupied, the packet loss information (namely, the first additional information and the second additional information) is added into the packet, and the packet loss diagnosis based on the chip is realized, the packet loss information is greatly added in batch, and the packet loss efficiency is greatly improved.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a schematic structural diagram of a packet loss diagnosis system according to an embodiment of the present invention.
Fig. 2 shows a block schematic diagram of a network device according to an embodiment of the present invention.
Fig. 3 shows one of flow diagrams of a packet loss diagnosis method according to an embodiment of the present invention.
Fig. 4 shows a second flowchart of a packet loss diagnosis method according to an embodiment of the present invention.
Fig. 5 shows a third flowchart of a packet loss diagnosis method according to an embodiment of the present invention.
Fig. 6 shows a fourth flowchart of a packet loss diagnosis method according to an embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a message format according to an embodiment of the present invention.
Fig. 8 shows a schematic flow chart of a partial sub-step of step S17 in fig. 3 or fig. 4.
Fig. 9 is a schematic structural diagram of an alarm message according to an embodiment of the present invention.
Fig. 10 is a block diagram of a packet loss diagnosis device according to an embodiment of the present invention.
Fig. 11 shows a block schematic diagram of an electronic device according to an embodiment of the present invention.
Reference numerals: 100-packet loss diagnosis system; 110-a network device; 111-chip; 112-an external CPU; 113-embedded CPU; 114-incoming direction processing pipe; 115-a traffic management unit; 116-out-of-direction treatment pipeline; 120-an external device; 130-monitoring equipment; 140-packet loss diagnosis device; 150-a packet loss detection module; 160-reporting module; 170-a receiving module; 180-an analysis module; 190-a transmitting module; 200-a forwarding module; 210-an electronic device.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present invention.
It is noted that relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The traditional packet loss diagnosis method is to set diagnosis information buffer registers in each level of pipeline of a chip, record table lookup information of the passing messages in each level of pipeline, so that a CPU (Centeral Processing Unit, central processing unit) reads diagnosis information of each register in an IO mode and translates the diagnosis information. However, due to the limitation of chip resources, under the condition that the stable progress of the chip on the receiving, editing, forwarding and the like of the message is ensured, the chip cannot process the diagnosis of the chip under the condition that a large number of packets are lost.
Based on the above consideration, the embodiment of the invention provides a packet loss diagnosis method, which can solve the problem that the conventional method cannot perform diagnosis processing when a large number of chips lose packets. Hereinafter, this scheme will be described.
The packet loss diagnosis method provided by the embodiment of the invention can be applied to the packet loss diagnosis system 100 shown in fig. 1, wherein the packet loss diagnosis system 100 comprises a network device 110, a plurality of monitoring devices 130 and a plurality of external devices 120, and the network device 110 and the plurality of external devices 120 can be connected through network communication. The monitoring device 130 may be communicatively coupled directly to the network device 110 or may be communicatively coupled to the network device 110 via one or more external devices 120.
Referring to fig. 2, the network device 110 may include a chip 111 and an external CPU112, and the chip 111 may include an embedded CPU113 and a multi-stage pipeline including an ingress direction processing pipe 114 (Ingress Process Engine, IPE), a traffic management unit 115 (TM), and an egress direction processing pipe 116 (Egress Process Engin, EPE).
The ingress direction processing pipeline 114 is configured to, when receiving the original packet, search a pre-stored forwarding table according to forwarding information such as a destination address and a source address of the original packet, and determine an egress. The traffic management unit 115 is configured to perform traffic management such as packet speed limiting and congestion management. And an outbound processing pipeline 116 for editing the message, for example, adding or deleting vlan fields in the message.
The external device 120 is configured to forward the original packet to the network device 110.
The chip 111 of the network device 110 is configured to implement the packet loss diagnosis method provided by the embodiment of the present invention.
Wherein the network device 110 includes, but is not limited to: switches and gateways. External devices 120 include, but are not limited to: switches, gateways, notebook computers, servers (either stand alone or as a cluster of servers), personal computers, mobile terminals, wearable portable devices, and the like.
In a possible implementation manner, an embodiment of the present invention provides a packet loss diagnosis method, referring to fig. 3, may include the following steps. In the present embodiment, the chip 111 to which the method is applied to the network device 110 in fig. 1 is exemplified.
S11, when an original message sent by an external device is received, carrying out packet loss detection on the original message on each stage of pipeline, and when any stage of pipeline detects that packet loss is generated, generating a packet loss signal according to the packet loss reason.
The packet loss signal includes a packet loss reason, namely a packet loss type. Different packet loss causes may be represented by different information, for example, using several bits of discard type to record different types of packet loss causes. It should be understood that, on each stage of pipeline, a preset packet loss detection rule or algorithm is adopted to perform packet loss detection, where the packet loss detection rule or algorithm includes but is not limited to: the deep packet inspection technique, the neural network algorithm, and the like are not particularly limited in this embodiment.
S13, under the condition that the reserved packet loss signal is detected, the original message and the packet loss signal are reported to the embedded CPU, and the first additional information is added in the original message through the embedded CPU.
In this embodiment, the first additional information may include a packet loss reason and a packet loss hint in the packet loss signal of the single-stage pipeline.
S15, under the condition that all packet loss detection is completed by the multi-stage pipeline and first additional information corresponding to each stage of pipeline is added in the original message, second additional information and the original message are analyzed from the added message.
In this embodiment, the second additional information may include the packet loss cause in all the packet loss signals, for example, if the ingress direction processing pipe 114, the traffic management unit 115, and the egress direction processing pipe 116 each detect packet loss, the second additional information includes the packet loss cause detected by the ingress direction processing pipe 114, the packet loss cause detected by the traffic management unit 115, and the packet loss cause detected by the egress direction processing pipe 116.
S17, editing and obtaining an alarm message through the embedded CPU according to the path information from the network equipment to the target monitoring equipment, the second additional information and the original message, and sending the alarm message to the outgoing direction processing pipeline.
S19, forwarding the alarm message to the target monitoring equipment through the outgoing direction processing pipeline so as to visually display the alarm message on the target monitoring equipment.
It should be emphasized that, in this embodiment, the detection focus of packet loss detection performed on the original packet by each stage of pipeline is related to the processing content of the packet by each stage of pipeline. Detection concerns of the ingress direction processing pipe 114 include whether forwarding information is abnormal, such as illegal MAC address, mars IP (i.e., unable to identify IP), forwarding table configuration errors, etc. The detection focus of the traffic management unit 115 may include whether a field in the stored traffic management information is missing, for example, whether a missing packet is queued in the chip 111, whether a buffer is occupied, whether a buffer check result is wrong, and whether a security policy loses a packet. The detection attention point of the outgoing direction management unit may include whether outgoing direction information is missing, for example, whether an entry index of the editing action is missing in the chip 111.
When the network device 110 receives an original packet sent by the external device 120, the original packet is first processed by the ingress direction processing pipeline 114 of the chip 111, the ingress direction processing pipeline 114 (IPE) parses and looks up the original packet, and detects whether the packet is lost or not in the parsing and looking up process, for example, an illegal MAC address, a spark IP (i.e. an IP cannot be identified), or a configuration error of the forwarding table, if the packet is lost, a packet loss signal is generated according to the reason of the packet loss. After the processing of the original packet by the ingress direction processing pipe 114 (IPE) is finished, the original packet enters the flow management unit 115 (TM), and the flow management unit 115 performs packet loss detection on the original packet while performing flow management, and if packet loss occurs, generates a packet loss signal according to the packet loss reason. The outbound processing pipe 116 (EPE) transmits from the traffic management unit 115 to the outbound processing management, where the outbound processing pipe 116 edits and forwards the original message, and in this process, the outbound processing pipe 116 performs packet loss detection on the original message, for example, whether forwarding fails, whether decrypted information is wrong, and if a packet is lost, a packet loss signal is generated according to a packet loss reason.
When the chip 111 detects a reserved packet loss signal, the original message and the packet loss signal are reported to the embedded CPU113 on the chip 111, and the embedded CPU113 adds first additional information (including a packet loss reason in the packet loss signal) corresponding to the packet loss signal into the original message (may be a header). And under the condition that the multi-stage assembly line completes all packet loss detection and the first additional information corresponding to all packet loss signals is added, second additional information and an original message are analyzed from the added message. The second additional information at this time includes all the packet loss causes detected by each stage of pipeline.
The chip 111 determines the target monitoring device 130 (the target monitoring device 130 may be pre-specified or may be determined according to a certain policy, for example, a path shortest policy), and determines a forwarding path from the network device 110 to the target monitoring device 130, so as to combine the forwarding path, the second additional information and the original message, and edit the alarm message. The outbound processing pipeline 116 forwards the alert message according to the forwarding path in the alert message to forward the alert message to the target monitoring device 130. After receiving the alarm message, the target monitoring device 130 visually displays the alarm message so that the operation and maintenance personnel can know and process the alarm message in time.
Compared with the traditional packet loss diagnosis method, the packet loss diagnosis method provided by the embodiment of the invention sets the embedded CPU on the chip of the network equipment as an independent resource to timely process the packet loss in batches, does not occupy the processing resource of the chip to process the packet loss, and realizes batch diagnosis of the packet based on the original assembly line of the chip and batch forwarding of the packet added with the packet loss information by adding the packet loss information (namely, the first additional information and the second additional information) to the packet, thereby greatly improving the packet processing efficiency.
Considering that the resources of the chip are limited, when the packet loss signal and the original message are reported to the embedded CPU, the resources of the chip are required to be consumed, so that the chip is very easy to influence the receiving, editing and forwarding of the message, and the message forwarding efficiency is reduced. Based on the above considerations, in one possible implementation, the concept of reporting rate is introduced for packet loss signals. Specifically, referring to fig. 4, after step S11, before step S13, the packet loss diagnosis method provided by the embodiment of the present invention may further include step S12.
And S12, when the packet loss signal is generated, generating a random value, judging whether the random value is larger than a preset threshold value, if not, reserving the packet loss signal, and if so, deleting the packet loss signal.
The random value may be any one of 0 to 99, and the preset threshold may be any one of 0 to 99. The value of the preset threshold value can be adjusted according to actual requirements. When the chip 111 monitors that a packet loss signal is generated, a random value is randomly generated, and when the random value is greater than a preset threshold value, the packet loss signal is reserved, otherwise, the packet loss signal is cleared or deleted, so that the reporting amount can be reduced. For example, when the preset threshold is 49, the probability of packet loss signal reservation is 50%, so that the reserved amount of packet loss signal can be greatly reduced.
Considering that the detected original message can be forwarded to the network device 110 for multiple times, the situation that the alarm message of the original message is repeatedly sent for multiple times is very easy to occur, which causes the embedded CPU113 to occupy resources and affects the batch processing efficiency. Based on the above considerations, in order to reduce the resource consumption caused by repeated processing of diagnostic and alert messages of the same original message, in one possible implementation, buffering and logging is introduced. Specifically, the embedded CPU113 may include a receiving device, an analyzing device, a buffer decoration and a transmitting device, referring to fig. 5, after step S15, before step S17, the packet loss diagnosis method provided by the embodiment of the present invention may further include the following steps.
S161, transmitting the second additional information and the original message to the buffer memory device through the analysis device.
S162, inquiring whether packet loss record information of the original message is recorded in a preset packet loss message record table or not based on the second additional information and the original message through the buffer device. If not, step S163 is executed, and if yes, step S164 is executed.
S163, the packet loss record information of the original message is recorded in the packet loss message record table.
S164, updating the packet loss record information.
In the present embodiment, the packet loss record information includes, but is not limited to: the method comprises the steps of characteristic fields and message identifications of original messages, packet loss identification IDs, time stamps and packet loss times.
The receiving device of the embedded CPU113 (eCPU) circulates the report signal of the monitoring chip 111, when receiving the reported original message and the packet loss signal, according to the packet loss signal, adds the first additional information in the header of the original message, and when the header of the original message is added with the first additional information corresponding to the packet loss signal of each pipeline, the receiving device of the embedded CPU113 sends the added message to the analyzing device of the embedded CPU 113.
The analysis device of the embedded CPU113 analyzes the received message to obtain an original message and second additional information, where the second additional information includes, but is not limited to: the source port, the output port, the time stamp, the source MAC address, the destination MAC address, the source IP address, the destination IP address, the IPprotocol, the L4Srcport, the L4Dstport and other information of the original message are detected by each level of pipeline. The timestamp refers to the timestamp of the original message into network device 110. Further, the analyzing device transmits the original message and the second additional information to the buffer device of the embedded CPU 113.
After receiving the original message and the second additional information, the buffer memory device inquires whether the packet loss record information of the original message is recorded in a preset packet loss message record table. If the packet loss number is recorded, adding a time stamp of the original packet in the recorded packet loss record information, and adding one to the original packet loss number. For example, when the original packet loss number is 1, the updated packet loss number is 2, i.e. the statistics is that the packet loss number of the original packet is counted. If not, the packet loss record information of the original message is recorded in a packet loss message record table.
In order to reduce the resource overhead of the embedded CPU, based on the steps S161-S164, in a possible implementation manner, the method may be implemented as follows: if the packet loss count value reaches the reporting threshold, step S17 is executed. That is, for each packet loss record information on the packet loss message record table in the buffer device, when the packet loss number value in the packet loss record information reaches the reporting threshold, step S17 is executed.
For example, if the reporting threshold is 2, when the packet loss number exceeds 2, step S17 is executed to report the corresponding alarm message to the target monitoring device.
In another possible embodiment, it may be implemented as: when the packet loss number value satisfies the reporting interval period, step S17 is executed. For example, if the reporting interval period is 2, step S17 is executed when the packet loss times are 1,3,5, etc.
For step S162, the way of querying whether the packet loss record information of the original packet has been recorded can be flexibly selected, for example, the matching can be performed according to the feature field, or the matching can be performed according to the identifier. In the present embodiment, there is no particular limitation.
In one possible implementation, to reduce matching time consumption, increase query speed, and increase query accuracy, hash computations are introduced. On this basis, the step S162 may be further implemented as: carrying out hash calculation based on the second additional information and the original message to obtain a hash value; and inquiring whether a message which is the same as the original message exists in a preset packet loss message record table or not according to the hash value and the message identifier.
The characteristic field can be selected to perform Hash calculation, the second additional information can be selected to perform matching, and the field with the preset length can be intercepted from the original message to perform Hash calculation, so that a Hash value (Hash value) is obtained.
The packet loss record information may include a Hash value, if no packet with the Hash value identical to that of the original packet is queried, the original packet is indicated to be the first packet, and if the packet with the Hash value identical to that of the original packet is queried, the original packet is indicated to be not the first packet.
By the implementation mode, all information of the original message is not required to be matched with the recorded message, and matching time consumption can be greatly reduced. Meanwhile, the same original message is guaranteed to be cached once through the Hash value, and the time stamp and the packet loss number value in the original message which is repeated later are updated.
In one possible implementation, the packet loss identification ID (also referred to as dropframeID) in the packet loss record information may be an assigned value for triggering retransmission of the original packet back to the chip for detailed packet loss diagnosis. Referring to fig. 6, the following steps may be included.
S21, acquiring an original message corresponding to the packet loss identification ID and a packet loss reason of the original message through the embedded CPU.
S22, according to all the packet loss reasons, adding a diagnosis mark in the message header of the original message to obtain a diagnosis message, and sending the diagnosis message back to the multi-stage pipeline again.
It should be noted that the diagnostic identifier includes a first identifier and a second identifier, where the first identifier indicates that the diagnostic message is to be re-diagnosed, and the second identifier includes a diagnostic value of each stage of pipeline. Taking a total three-stage pipeline as an example (an in-direction processing pipeline 114, a flow management unit 115 and an out-direction processing pipeline 116), the first identifier is a single bit value, and when the diagnostic value of the first identifier is 1, the packet loss of the original message is represented. The second identifier may be a diagnostic value composed of three bits, where the first bit corresponds to the ingress direction processing management, the second bit corresponds to the traffic management unit 115, and the third bit corresponds to the egress direction processing pipeline 116, and when the diagnostic values of the three bits of the second identifier are all 1, it is indicated that packet loss is detected on the ingress direction processing pipeline 114, the traffic management unit 115, and the egress direction processing pipeline 116.
S23, for each stage of pipeline, carrying out packet loss detection on the original message again through the stage of pipeline under the condition that the diagnosis value corresponding to the stage of pipeline indicates to be diagnosed, and obtaining diagnosis information.
It is emphasized that in the present embodiment, the diagnostic information in step S23 may include a packet loss bit and/or a packet loss content. I.e. the position and/or the content of the lost packet is diagnosed.
S24, the diagnosis information obtained by each level of pipeline is written into a chip register, and the message carrying all the diagnosis information is reported to the embedded CPU.
Steps S21 and S22 may be performed by the embedded CPU113 itself or may be performed by the external CPU112 of the network device 110. For example, when identifying the packet loss identification ID in the packet loss record information, the embedded CPU113 may notify the external CPU112 of the original packet and the second additional information by means of an interrupt. The external CPU112 may also read the packet loss record information recorded in the buffer device in the IO manner, and when reading the packet loss identifier ID, read the original packet and the second additional information, and trigger step S22, that is, the external CPU112 adds the diagnostic identifier in the header of the original packet according to all the packet loss reasons, to obtain a diagnostic packet, and resends the diagnostic packet back to the chip 111, so that the diagnostic packet reenters the multi-stage pipeline.
For each stage of pipeline, when the message is identified as a diagnostic message, the diagnostic values of corresponding bits in the first identifier and the second identifier in the diagnostic identifier are read, for example, for the ingress direction processing pipeline 114, when the diagnostic values of the first bit in the first identifier and the first bit in the second identifier are both identified as 1, the ingress direction processing pipeline 114 detects the original message by adopting a preset packet loss detection method or rule, and determines the position or the packet loss content generated by packet loss, so as to obtain diagnostic information (which may include the packet loss reason, the packet loss bit and/or the packet loss content). Similarly, the flow management unit 115 and the outgoing direction processing pipeline 116 detect the diagnostic message in the same manner as described above.
When the packet loss detection principle of each stage of pipeline aiming at the original message is the same as the packet loss detection principle of the diagnosis message. In contrast, for the original message, only the reason for the packet loss can be obtained, while for the diagnostic message, the packet loss bit and/or the packet loss content can be determined. In addition, for the original message, the outbound processing pipe 116 forwards the original message, while for the diagnostic message, the outbound processing pipe 116 does not forward the diagnostic message.
The format of the diagnostic message in the chip 111 and the format of the non-diagnostic message (e.g., original message) in the chip 111 can be seen in fig. 7, and the chip 111 and the pipelines at each stage can quickly identify the diagnostic message and the non-diagnostic message according to the format of the message.
For each stage of pipeline, when forwarding a message (diagnostic message or original message) to the next stage of pipeline, a message header of a plurality of bytes can be inserted in front of the data content of the message for transferring information required between each stage of pipeline, and some of the information is forwarding necessary information and some of the information is optional additional information which can be shared. The diagnostic message may multiplex these optional additional information, for example, when the debugpacket en in the header is 1, then the diagnostic header mode is used, and the additional information content is the diagnostic information for recording each stage of pipeline.
Similarly, for the original message, each stage of pipeline can insert a message header of a plurality of bytes in front of the data content of the original message, and the message header records the packet loss reason detected by the stage of pipeline.
When all the pipelines are monitored to finish packet loss detection of the messages (diagnosis messages or original messages), reporting the messages carrying all the diagnosis information or the messages carrying all the reasons of packet loss to the embedded CPU. When the embedded CPU receives a message carrying diagnostic information, the diagnostic information in the message is added into the packet loss record information of the message on the packet loss message record table. Meanwhile, when a message carrying diagnostic information is received, the embedded CPU can clear the packet loss mark ID in the packet loss record information of the original message.
In addition to the above, in order for the operation and maintenance personnel to know the packet loss condition, in a possible implementation, referring to fig. 8, the manner of editing the notification message in the step S17 may be further implemented as the following steps.
S171, according to a preset fixed format, the second additional information and the original message are adjusted and assembled to obtain an adjusted message.
S172, determining path information from the network equipment to the target monitoring equipment, and adding the path information into a message header of the adjustment message.
S173, adding all the analyzed diagnosis information to the message header of the adjustment message for the message carrying all the diagnosis information.
And S174, taking the adjustment message added with the path information and all the diagnostic information as an alarm message.
In other embodiments, in the case where the diagnostic information is not acquired, the alert message may be edited from the path information, the second additional information, and the original message.
It should be noted that, the path information may include a target monitoring portal and a header editing index. The target monitoring portal is an egress port on the network device 110 and is a designated egress port for messages arriving at the target monitoring device 130. The header edit index is used to obtain forwarding information to the target monitoring device 130.
In one possible implementation, the sending device of the embedded CPU113 sends the edited alarm message to the DMA sending channel, which sends the alarm message to the outbound processing pipe 116. After the outbound processing pipeline 116 receives the alarm message, the chip 111 takes out a message Header editing index from the message Header of the alarm message, acquires forwarding information such as a corresponding L2/L3/L4 Header and the like according to the message Header editing index, edits and inserts the forwarding information into the message Header of the alarm message, and sends the final alarm message from the target monitoring network. The format of the final alert message may be as shown in fig. 9.
In fig. 9, L2/L3/L4 Header is monitoring message forwarding Header information configured in the chip by the external network manager. The message type indication message is an event type alarm message. Length indicates the total data Length after the L4 Header. The sequence id indicates the sequence number of the message, incremented by 1 for each message sent. The DeviceId characterizes the serial number of the configurable current device, uniquely identifying the device number within the network. Usermeadata characterizes data that an application layer can customize. The TLV indicates standard TLV format data. The tlv.type indicates tlv.data as packet loss information. Len indicates the current TLV data length. For tlv.data, drop Reason indicates the cause of packet loss in chip 111, such as illegal MAC address of packet, spark IP, configuration error of forwarding table, or packet loss of security policy. Drop Position indicates the location of packet loss in chip 111, such as IPE/EPE/TM, etc. SourcePort indicates that the message enters the source port of chip 111. DestPort indicates the destination port from which the message is about to exit chip 111. IngressTs indicates the ingress port timestamp of the message into chip 111. DeviceTs indicates the current device timestamp. Drop Count indicates the number of message drops. The Flags indicate the validity of information such as MAC DA/MAC SA carried behind the identity.
Through the steps S171 to S174, the target monitoring device 130 may display detailed packet loss information such as the packet loss reason and the packet loss position, so that the network manager or the operation and maintenance personnel can see the detailed packet loss information at a glance.
Compared with the traditional packet loss diagnosis method, the packet loss diagnosis method provided by the embodiment of the invention outputs the packet loss information of the chip to the message by a telemetry means, and can visually display and process the packet loss information on the remote monitoring equipment. The traditional external CPU has a plurality of tasks to be processed, independent resources can not be separated, and the packet loss can be timely processed. Diagnostic information obtained in each level of production line is recorded in the message header to carry out pipeline linear diagnosis, so that batch diagnosis of messages can be realized. In addition, a packet loss mark ID is allocated to each packet loss message, so that more detailed packet loss diagnosis can be performed based on the forwarding flow of the packet loss mark ID re-triggering message on the chip, and the external retransmission of the message is not required.
Based on the same inventive concept as the packet loss diagnosis method described above, in one possible implementation manner, the embodiment of the present invention further provides a packet loss diagnosis apparatus 140, which may be applied to the chip 111 of the network device 110 in fig. 1. Referring to fig. 10, the packet loss diagnosis apparatus 140 may include a packet loss detection module 150, a reporting module 160, a receiving module 170, an parsing module 180, a transmitting module 190, and a forwarding module 200.
The packet loss detection module 150 is configured to, when receiving an original packet sent by an external device, perform packet loss detection on each stage of pipeline, and when any stage of pipeline detects that packet loss occurs, generate a packet loss signal according to a packet loss reason.
And the reporting module 160 is configured to report the original message and the packet loss signal to the embedded CPU when the reserved packet loss signal is detected.
The receiving module 170 is configured to add the first additional information to the original packet through the embedded CPU. Wherein the first additional information includes a packet loss cause in a packet loss signal of the single-stage pipeline.
The parsing module 180 is configured to parse the added message from the second additional information and the original message when all packet loss detection is completed by the multi-stage pipeline and the first additional information corresponding to each stage of pipeline is added to the original message. Wherein the second additional information includes the reasons for packet loss in all packet loss signals.
And the sending module 190 is configured to edit, by using the embedded CPU, the second additional information and the original message according to the path information from the network device to the target monitoring device, to obtain an alarm message, and send the alarm message to the outbound processing pipeline.
And the forwarding module 200 is used for forwarding the alarm message to the target monitoring equipment through the outbound processing pipeline so as to visually display the alarm message on the target monitoring equipment.
In the packet loss diagnosis device 140, through the synergistic effect of the packet loss detection module 150, the reporting module 160, the receiving module 170, the analyzing module 180, the transmitting module 190 and the forwarding module 200, the embedded CPU is arranged on the chip of the network device as an independent resource to timely process the packet loss in batches, the processing resource of the chip is not required to be occupied to process the packet loss, and the packet loss information (namely, the first additional information and the second additional information) is added to the packet, so that the batch diagnosis of the packet based on the original pipeline of the chip and the packet added with the packet loss information are realized, and the packet processing efficiency can be greatly improved.
The specific limitation of the packet loss diagnosis apparatus 140 may be referred to the limitation of the packet loss diagnosis method hereinabove, and will not be described herein. The respective modules in the packet loss diagnosis apparatus 140 described above may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or independent of a processor in the electronic device, or may be stored in software in a memory of the electronic device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, an electronic device 210 is provided, the electronic device 210 may be a terminal, and an internal structure diagram thereof may be as shown in fig. 11. The electronic device 210 includes a processor, memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the electronic device 210 is configured to provide computing and control capabilities. The memory of the electronic device 210 includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the electronic device 210 is used for performing wired or wireless communication with an external terminal, where the wireless communication may be implemented through WIFI, an operator network, near Field Communication (NFC), or other technologies. The computer program, when executed by a processor, implements the packet loss diagnosis method provided in the above embodiment.
The structure shown in fig. 11 is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation of the electronic device 210 to which the present invention is applied, and a specific electronic device 210 may include more or less components than those shown in fig. 11, or may combine some components, or have a different arrangement of components.
In one embodiment, the packet loss diagnosis apparatus 140 provided in the present invention may be implemented as a computer program, which may run on the electronic device 210 as shown in fig. 11. The memory of the electronic device 210 may store various program modules constituting the packet loss diagnosis apparatus 140, such as the packet loss detection module 150, the reporting module 160, the receiving module 170, the parsing module 180, the transmitting module 190, and the forwarding module 200 shown in fig. 10. The computer program constituted by the respective program modules causes the processor to execute the steps in the packet loss diagnosis method described in the present specification.
For example, the electronic device 210 shown in fig. 11 may perform step S11 through the packet loss detection module 150 in the packet loss diagnosis apparatus 140 shown in fig. 10. The electronic device 210 may report the original packet and the packet loss signal to the embedded CPU113 through the reporting module 160 when the retained packet loss signal is detected in step S13. The electronic device 210 may perform the following in S13 through the receiving module 170: the first additional information is added to the original message by the embedded CPU113. The electronic device 210 may perform step S15 through the parsing module 180. The electronic device 210 may perform step S17 through the transmission module 190. The electronic device 210 may perform step S19 through the forwarding module 200.
In one embodiment, an electronic device 210 is provided that includes a memory storing machine executable instructions and a processor that when executing the machine executable instructions performs the steps of: when an original message sent by external equipment is received, carrying out packet loss detection on the original message on each stage of pipeline, and when any stage of pipeline detects that packet loss is generated, generating a packet loss signal according to the packet loss reason; under the condition that the reserved packet loss signal is detected, reporting an original message and the packet loss signal to an embedded CPU, and adding first additional information into the original message through the embedded CPU; under the condition that all packet loss detection is completed by the multi-stage pipeline and first additional information corresponding to each stage of pipeline is added in the original message, second additional information and the original message are analyzed from the completed added message; editing the second additional information and the original message to obtain an alarm message according to the path information from the network device to the target monitoring device through the embedded CPU, and sending the alarm message to an outgoing direction processing pipeline; and forwarding the alarm message to the target monitoring equipment through the outgoing direction processing pipeline so as to visually display the alarm message on the target monitoring equipment.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: when an original message sent by external equipment is received, carrying out packet loss detection on the original message on each stage of pipeline, and when any stage of pipeline detects that packet loss is generated, generating a packet loss signal according to the packet loss reason; under the condition that the reserved packet loss signal is detected, reporting an original message and the packet loss signal to an embedded CPU, and adding first additional information into the original message through the embedded CPU; under the condition that all packet loss detection is completed by the multi-stage pipeline and first additional information corresponding to each stage of pipeline is added in the original message, second additional information and the original message are analyzed from the completed added message; editing the second additional information and the original message to obtain an alarm message according to the path information from the network device to the target monitoring device through the embedded CPU, and sending the alarm message to an outgoing direction processing pipeline; and forwarding the alarm message to the target monitoring equipment through the outgoing direction processing pipeline so as to visually display the alarm message on the target monitoring equipment.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present invention may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. The utility model provides a packet loss diagnosis method which is characterized in that is applied to the chip of network equipment, the chip includes embedded CPU and multistage pipeline, multistage pipeline includes into direction processing pipeline, flow management unit and go out direction processing pipeline, the method includes:
when an original message sent by external equipment is received, carrying out packet loss detection on the original message on each stage of pipeline, and when any stage of pipeline detects that packet loss is generated, generating a packet loss signal according to the packet loss reason;
under the condition that the reserved packet loss signal is detected, reporting the original message and the packet loss signal to an embedded CPU, and adding first additional information into the original message through the embedded CPU; the first additional information comprises a packet loss reason in a packet loss signal of a single-stage pipeline;
under the condition that the multistage assembly line completes all packet loss detection and first additional information corresponding to each stage of assembly line is added in the original message, second additional information and the original message are analyzed from the added message; wherein, the second additional information includes the packet loss reasons in all packet loss signals;
The embedded CPU edits the second additional information and the original message according to the path information from the network equipment to the target monitoring equipment to obtain an alarm message, and sends the alarm message to the outgoing direction processing pipeline;
and forwarding the alarm message to the target monitoring equipment through the outgoing direction processing pipeline so as to visually display the alarm message on the target monitoring equipment.
2. The packet loss diagnosis method according to claim 1, wherein the embedded CPU includes an analysis device and a buffer device;
after the step of parsing the second additional information and the original message from the added message, before the step of editing the second additional information and the original message to obtain the notification message according to the path information from the network device to the target monitoring device by the embedded CPU, the method further includes:
transmitting the second additional information and the original message to the buffer memory device through the analysis device; the second additional information further comprises forwarding information of the original message, a source port, an output port and a timestamp of entering the network equipment;
Inquiring whether packet loss record information of the original message is recorded in a preset packet loss message record table or not based on the second additional information and the original message by the caching device;
if not, recording the packet loss record information of the original message in the packet loss message record table;
if yes, updating the packet loss record information; the packet loss record information comprises a characteristic field and a packet identifier of the original packet, a packet loss identifier ID, a time stamp and a packet loss number value.
3. The method for diagnosing packet loss according to claim 2, wherein the step of querying whether packet loss record information of the original packet has been recorded in a preset packet loss record table based on the second additional information and the original packet includes:
carrying out hash calculation based on the second additional information and the original message to obtain a hash value;
and inquiring whether a message which is the same as the original message exists in a preset packet loss message record table according to the hash value and the message identifier.
4. The packet loss diagnosis method according to claim 2, characterized in that the method further comprises:
acquiring an original message corresponding to a packet loss Identification (ID) and a packet loss reason of the original message through the embedded CPU;
According to all the packet loss reasons, adding a diagnosis mark into the message header of the original message to obtain a diagnosis message, and resending the diagnosis message to the multi-stage pipeline; the diagnosis mark comprises a first mark and a second mark, the first mark indicates that the diagnosis message is to be re-diagnosed, and the second mark diagnosis mark comprises diagnosis values of all levels of pipelines;
aiming at each stage of the pipeline, carrying out packet loss detection on the original message again through the stage of the pipeline under the condition that a diagnosis value corresponding to the stage of the pipeline indicates to be diagnosed, so as to obtain diagnosis information; the diagnosis information comprises packet loss bits and/or packet loss contents;
and writing the diagnosis information obtained by each level of the pipeline into a chip register, and reporting the message carrying all the diagnosis information to the embedded CPU.
5. The packet loss diagnosis method according to claim 4, wherein the step of editing the second additional information and the original message according to the path information from the network device to the target monitoring device to obtain an alert message includes:
according to a preset fixed format, adjusting and assembling the second additional information and the original message to obtain an adjusted message;
Determining path information from the network equipment to target monitoring equipment, and adding the path information into a message header of the adjustment message;
adding all the analyzed diagnostic information to the message header of the adjustment message for the message carrying all the diagnostic information;
and taking the adjustment message added with the path information and all the diagnosis information as an alarm message.
6. The packet loss diagnosis method according to claim 2, characterized in that the method further comprises:
and under the condition that the packet loss times value reaches a reporting threshold value, executing the step of obtaining an alarm message by editing the second additional information and the original message according to the path information from the network equipment to the target monitoring equipment by the embedded CPU, and sending the alarm message to the outgoing direction processing pipeline.
7. The packet loss diagnosis method according to claim 1, wherein after the step of generating a packet loss signal according to a packet loss cause, the step of reporting the original packet and the packet loss signal to an embedded CPU in the case where the reserved packet loss signal is detected, the method further comprises:
When the packet loss signal is generated, a random value is generated, whether the random value is larger than a preset threshold value or not is judged, if not, the packet loss signal is reserved, and if yes, the packet loss signal is deleted.
8. The packet loss diagnosis device is characterized by comprising a chip applied to network equipment, wherein the chip comprises an embedded CPU and a multi-stage pipeline, the multi-stage pipeline comprises an incoming direction processing pipeline, a flow management unit and an outgoing direction processing pipeline, and the packet loss diagnosis device comprises a packet loss detection module, a reporting module, a receiving module, an analyzing module, a sending module and a forwarding module;
the packet loss detection module is used for carrying out packet loss detection on the original message on each stage of the pipeline when receiving the original message sent by the external equipment, and generating a packet loss signal according to the packet loss reason when detecting that packet loss is generated on any stage of the pipeline;
the reporting module is used for reporting the original message and the packet loss signal to an embedded CPU (central processing unit) under the condition that the reserved packet loss signal is detected;
the receiving module is used for adding first additional information into the original message through the embedded CPU; the first additional information comprises a packet loss reason in a packet loss signal of a single-stage pipeline;
The analysis module is used for analyzing second additional information and an original message from the added message under the condition that all packet loss detection is completed by the multi-stage pipeline and the first additional information corresponding to each stage of pipeline is added in the original message; wherein, the second additional information includes the packet loss reasons in all packet loss signals;
the sending module is used for editing the second additional information and the original message to obtain an alarm message according to the path information from the network equipment to the target monitoring equipment through the embedded CPU, and sending the alarm message to the outgoing direction processing pipeline;
and the forwarding module is used for forwarding the alarm message to the target monitoring equipment through the outgoing direction processing pipeline so as to visually display the alarm message on the target monitoring equipment.
9. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to implement the packet loss diagnostic method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the packet loss diagnosis method according to any one of claims 1 to 7.
CN202310132727.4A 2023-02-17 2023-02-17 Packet loss diagnosis method, apparatus, electronic device and computer readable storage medium Pending CN116319448A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310132727.4A CN116319448A (en) 2023-02-17 2023-02-17 Packet loss diagnosis method, apparatus, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310132727.4A CN116319448A (en) 2023-02-17 2023-02-17 Packet loss diagnosis method, apparatus, electronic device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116319448A true CN116319448A (en) 2023-06-23

Family

ID=86797000

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310132727.4A Pending CN116319448A (en) 2023-02-17 2023-02-17 Packet loss diagnosis method, apparatus, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116319448A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117560306A (en) * 2024-01-11 2024-02-13 腾讯科技(深圳)有限公司 Packet loss reporting method, network switch and related device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117560306A (en) * 2024-01-11 2024-02-13 腾讯科技(深圳)有限公司 Packet loss reporting method, network switch and related device
CN117560306B (en) * 2024-01-11 2024-04-02 腾讯科技(深圳)有限公司 Packet loss reporting method, network switch and related device

Similar Documents

Publication Publication Date Title
US11057420B2 (en) Detection of malware and malicious applications
US9717011B2 (en) Event management in telecommunications networks
EP3817298A1 (en) Data message detection method, device and system
US6515967B1 (en) Method and apparatus for detecting a fault in a multicast routing infrastructure
US8813220B2 (en) Methods and systems for internet protocol (IP) packet header collection and storage
US7903566B2 (en) Methods and systems for anomaly detection using internet protocol (IP) traffic conversation data
US8726382B2 (en) Methods and systems for automated detection and tracking of network attacks
CN112311789B (en) Deep packet processing method and device, electronic device and storage medium
EP3082293B1 (en) Switching device and packet loss method therefor
CN111385121B (en) Transmission method of operation administration maintenance (iOAM) message and corresponding device
US8762515B2 (en) Methods and systems for collection, tracking, and display of near real time multicast data
US10284460B1 (en) Network packet tracing
CN112751833B (en) RTP message identification method and device, electronic equipment and readable storage medium
CN116319448A (en) Packet loss diagnosis method, apparatus, electronic device and computer readable storage medium
CN110784339B (en) LACP message overtime fault detection method and device, and electronic equipment
CN112491662A (en) ICMP hidden tunnel detection method and device
CN111654474B (en) Safety detection method and device
CN114697160B (en) Tunnel message processing method and device
CN115484193A (en) Method, system, storage medium and device for monitoring and analyzing network packet loss flow
CN114125078A (en) MAC address learning method and device
CN106664217A (en) Identification of candidate problem network entities
CN116319468B (en) Network telemetry method, device, switch, network, electronic equipment and medium
CN110380940B (en) Router and data packet evaluation method thereof
US20240146655A1 (en) Telemetry-based congestion source detection
TWI743860B (en) Communication device and network management method

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