A method and device for detecting silent packet loss in multicast data packets
Patent Information
- Application Number
- CN202610959503.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-09-01
AI Technical Summary
因此,即使分别统计各出口流量,也无法确定组播流理论上应复制多少份报文,更无法将分散的出口统计结果与原始入口流量准确关联,从而难以识别是否存在静默丢包
[0007]本申请的有益效果在于,静默检测过程中转发平面的统计与控制平面的静默丢包分析隔离,控制平面根据转发平面在每个检测周期内统计的流量进行计算分析,避免了CPU资源的长期占用,实现了组播报文转发过程中的静默丢包检测。
Smart Images

Figure CN122679079A_ABST
Abstract
Description
Technical Field
[0001] This application relates to communication technology, specifically a method and device for detecting silent packet loss in multicast data packets. Background Technology
[0002] In multicast networks, silent packet loss is a hidden fault that is difficult to detect using traditional monitoring methods. When devices drop multicast packets due to hardware defects, software errors, or hidden configuration problems, no alarms or logs are generated, and all control protocol statuses show as normal, but service traffic has been silently lost. This "asymptomatic" packet loss is extremely harmful in scenarios with extremely high reliability requirements, such as financial transactions and real-time media distribution, and can cause abnormal reception for some users without the maintenance personnel being able to locate the problem.
[0003] Existing streaming statistics techniques primarily target unicast traffic, requiring significant CPU resources for statistical analysis of traffic latency, packet loss, and path status. Multicast traffic relies on dynamically maintained multicast entries for one-to-many replication and forwarding. Its outgoing port list changes dynamically with group members, and the congestion status of each outgoing queue is independent. Therefore, even if each outgoing traffic is statistically analyzed separately, it's impossible to determine how many packets a multicast stream should theoretically replicate, and it's also impossible to accurately correlate the dispersed outgoing statistics with the original incoming traffic, making it difficult to identify whether silent packet loss exists. Summary of the Invention
[0004] The purpose of this application is to provide a method and device for detecting silent packet loss in multicast data packets, thereby achieving a simplified method for detecting silent packet loss.
[0005] To achieve the above objectives, this application provides a method for detecting silent packet loss in multicast data packets. The method includes: in the forwarding plane, counting the total number of packets actually received and the total number of packets actually sent by the multicast group in the current detection period; in the control plane, determining whether the multicast group members have changed in the current detection period; if the multicast group members have not changed, calculating the expected total number of packets sent by the multicast group members in the current detection period based on the total number of packets actually received; determining that no silent packet loss has occurred if the expected total number of packets sent equals the actual total number of packets sent; determining that silent packet loss has occurred if the expected total number of packets sent is greater than the actual total number of packets sent; and stopping the silent packet loss detection in the current detection period when the multicast group members have changed.
[0006] To achieve the above objectives, this application provides a device for detecting silent packet loss in multicast data packets. The device includes a processor, a machine-readable storage medium, a switching chip, and a network interface. The switching chip is configured to count the total number of packets received and the total number of packets sent by the multicast group in the current detection period. The processor executes machine-executable instructions recorded on the machine-readable storage medium to perform the following operations: determining whether the multicast group members have changed in the current detection period; when the multicast group members have not changed, calculating the expected total number of packets sent by the multicast group members in the current detection period based on the actual total number of packets received; determining that no silent packet loss has occurred if the expected total number of packets sent equals the actual total number of packets sent; determining that silent packet loss has occurred if the expected total number of packets sent is greater than the actual total number of packets sent; and exiting the silent packet loss detection for the current detection period when the multicast group members have changed.
[0007] The beneficial effect of this application is that the statistics of the forwarding plane and the silent packet loss analysis of the control plane are isolated during the silent detection process. The control plane performs calculation and analysis based on the traffic statistics of the forwarding plane in each detection cycle, which avoids long-term occupation of CPU resources and realizes silent packet loss detection in the multicast packet forwarding process. Attached Figure Description
[0008] Figure 1 A flowchart illustrating an embodiment of a method for detecting silent packet loss of multicast data packets provided in this application; Figure 2 This is a statistical diagram of the messages for silent packet loss detection provided in this application; Figure 3 This is a packet statistics diagram of the location of the silent packet loss port provided in this application; Figure 4 This is a schematic diagram of an embodiment of the device for detecting silent packet loss of multicast data packets provided in this application. Detailed Implementation
[0009] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.
[0010] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.
[0011] Figure 1 A flowchart illustrating an embodiment of a method for detecting silent packet loss of multicast data packets provided in this application; Step 101: In the forwarding plane, count the total number of packets received and the total number of packets sent by the multicast group in the current detection period. Step 102: In the control plane, determine whether the multicast group members have changed within the current detection period; if yes, proceed to step 103; if they have fallen behind, proceed to step 104. Step 103: Exit the silent packet loss detection for the current detection cycle; Step 104: Calculate the expected total number of packets sent by the multicast group members in the current detection period based on the actual total number of packets received; Step 105: Compare the expected total number of packets sent with the actual total number of packets sent; if the expected total number of packets sent is equal to the actual total number of packets sent, it is determined that no silent packet loss has occurred; if the expected total number of packets sent is greater than the actual total number of packets sent, it is determined that silent packet loss has occurred.
[0012] Figure 1 The beneficial effect of the embodiment is that the statistics of the forwarding plane and the silent packet loss analysis of the control plane are isolated during the silent detection process. The control plane performs calculation and analysis based on the traffic statistics of the forwarding plane in each detection cycle, avoiding long-term occupation of CPU resources and realizing silent packet loss detection in the multicast packet forwarding process.
[0013] Figure 2 This is a schematic diagram of packet statistics for silent packet loss detection provided in this application; the ACL entries configured in the inbound ACL table of the switching chip are used to match the multicast type of Layer 2 multicast data packets / Layer 3 multicast data packets to trigger the creation of an inbound flow table entry for counting the total number of packets actually received in the inbound flow table, thereby counting the total number of packets actually received by the inbound port of the Layer 2 multicast group / Layer 3 multicast group in each detection cycle in the inbound pipeline 201.
[0014] In the inbound flow table entries, the flow key records the five-tuple information of Layer 2 multicast data packets / Layer 3 multicast data packets; the flow state includes: inbound port, VLAN (Virtual Local Area Network), detection period ID, and packet counter.
[0015] The ACL entries configured in the outgoing ACL table of the switching chip are used to match the multicast type of Layer 2 multicast data packets / Layer 3 multicast data packets, triggering the creation of an entry in the outgoing flow table to count the number of Layer 2 / Layer 3 multicast data packets replicated for each multicast group, so as to count the total number of data packets actually sent in each detection cycle in the outgoing pipeline 202.
[0016] In the outgoing flow table entry, the flow key value records the five-tuple information of Layer 2 multicast data packets / Layer 3 multicast data packets; the flow status includes: detection period ID and packet counter.
[0017] The CPU's flow collection and management module modifies the detection cycle ID of the inbound and outbound flow table entries when each detection cycle arrives.
[0018] In the inbound pipeline 201, when the switching chip receives a Layer 2 / Layer 3 multicast data packet from a multicast group, it simultaneously searches the inbound ACL table and the inbound flow table and finds the matched inbound flow table entries and inbound ACL entries. The matched inbound flow table entries are given priority because of their higher priority. The packet counter of the inbound flow table entries counts the number of times they are matched. When a detection period arrives, the inbound port, VLAN, detection period ID, packet counter count value, and Hash value recorded in the inbound flow table entries are synchronized to the traffic collection and management module to obtain the number of multicast data packets actually received by the inbound port within a detection period.
[0019] In the outbound pipeline 201, the switching chip simultaneously searches the outbound ACL table and the outbound flow table and finds the matched outbound flow table entries and outbound ACL entries. The matched outbound flow table entries are given priority because of their higher priority. The packet counter of the outbound flow table entries counts the number of packets sent. When a detection period arrives, the detection period ID recorded in the outbound flow table entries and the count value of the packet counter are synchronized to the traffic collection and management module to obtain the number of multicast data packets actually sent in a detection period.
[0020] Before obtaining the actual total number of packets received and sent for each multicast group within the detection period from the traffic collection and management module, the multicast management module first checks whether the multicast member change flag of the corresponding Layer 2 / Layer 3 multicast forwarding table entry is set. If it is, it indicates that the multicast members in the current detection period are different from those in the previous detection period. To avoid changes in the actual total number of packets sent due to the departure or addition of multicast members, the processor in this application exits the silent packet loss detection processing for the current detection period. If the multicast member change flag is not set, the multicast members have not changed, and the expected total number of packets sent in the current detection period is calculated.
[0021] The multicast management module determines that the multicast type is Layer 2 multicast. Based on the multicast group information of the 5-tuple, it finds the Layer 2 multicast forwarding table entry. According to the number of outgoing ports in the outgoing port list of the found Layer 2 multicast forwarding table entry and the actual total number of packets received in the current detection period, it calculates the expected total number of packets to be sent in the current detection period. If the expected total number of packets to be sent is the same as the actual total number of packets to be sent, it is determined that no silent packet loss has occurred; if they are different, it is determined that silent packet loss has occurred.
[0022] The multicast management module determines that the multicast type is Layer 3 multicast. Based on the multicast group information of the 5-tuple, it finds the Layer 3 multicast forwarding table entry and then searches for the Layer 2 forwarding domain egress ports of each egress interface associated with the Layer 2 forwarding domain in the outgoing interface list. For example, the outgoing interface list of the Layer 3 multicast forwarding table entry may contain VLAN interfaces; the multicast management module then searches for each egress port within the VLAN associated with the VLAN interface.
[0023] The multicast management module calculates the actual number of outgoing ports in the previous detection period by adding the total number of outgoing ports in the Layer 2 forwarding domains connected to each found outgoing interface to the number of other outgoing interfaces not associated with Layer 2 forwarding domains in the outgoing interface list. In one example, the outgoing interface list found by the multicast management module contains one routing port, one tunnel port, and one VLAN interface. The multicast management module finds three outgoing ports within the VLAN associated with this VLAN interface. Based on the two outgoing interfaces in the outgoing interface list and the three outgoing ports within the VLAN associated with the VLAN interface, the multicast management module calculates the actual number of outgoing ports to be five.
[0024] The multicast management module multiplies the actual number of outgoing ports in the current detection period by the actual total number of received packets to calculate the expected total number of packets to be sent. When the expected total number of packets to be sent is the same as the actual total number of packets sent, the multicast management module determines that no silent packet loss has occurred. When the expected total number of packets to be sent is the same as the actual total number of packets sent, the multicast management module determines that silent packet loss has occurred.
[0025] Figure 3 This is a schematic diagram of packet statistics for locating silent packet loss ports provided in this application.
[0026] The traffic collection and management module configures a detection flow mapping ACL entry in the inbound ACL table; the matching item is the five-tuple information, inbound port, and VLAN of the Layer 2 / Layer 3 multicast data packets that have experienced silent packet loss; the action item is to set the statistical flow identifier FlowID and perform statistics.
[0027] For Layer 2 multicast data packets that experience silent packet loss, the traffic collection and management module configures a flow counting ACL entry for each outgoing port in the outgoing ACL table; the matching items are FlowID and outgoing port, and the action item is counting.
[0028] For Layer 3 multicast data packets experiencing silent packet loss, the traffic collection and management module configures a flow counting ACL entry in the outbound ACL table for each outbound interface in the outbound interface list that is not associated with a Layer 2 forwarding domain. The matching item is the FlowID and the outbound interface, and the action item is counting. Furthermore, in the outbound ACL table, the traffic collection and management module configures a counting ACL entry for each Layer 2 forwarding domain outbound port of the outbound interface list that is associated with a Layer 2 forwarding domain. The matching item is the FlowID and the outbound interface, and the action item is counting.
[0029] In one example, the multicast management module finds a routing port, a tunnel port, and a VLAN interface in the outgoing interface list. The multicast management module then checks that the VLAN associated with this VLAN interface has three outgoing ports. The multicast management module sets up a detection counting flow table entry for the routing port; creates a detection counting flow table entry for the tunnel port; and sets up a detection counting flow table entry for each of the three outgoing ports within the VLAN associated with the VLAN interface.
[0030] The switching chip adds a FlowID and counts the matched Layer 2 or Layer 3 multicast data packets based on the detection flow mapping ACL entries.
[0031] The traffic collection and management module periodically reads the count value of the detection flow mapping ACL entry. When the count value reaches the mapping packet threshold, such as 1000 packets, the detection flow mapping ACL entry is deleted, the mapping between Layer 2 / Layer 3 multicast data packets and the detection flow is removed, and the flow packet statistics of the detection count flow entry for each real outgoing port are terminated simultaneously.
[0032] If a Layer 2 multicast data packet experiences silent packet loss, and the count value of the outgoing port's counting ACL entry read by the traffic collection and management module is not equal to 1000, then it is identified as a silent packet loss outgoing port.
[0033] Similarly, for Layer 3 multicast data packets that experience silent packet loss, if the count value of the outgoing interface / port counting ACL entry read by the traffic collection and management module is not equal to 1000, it is identified as an outgoing port experiencing silent packet loss.
[0034] Figure 4 This is a schematic diagram of an embodiment of the device for detecting silent packet loss of multicast data packets provided in this application. The device includes a processor 41, a machine-readable storage medium 42, a switching chip 43, and a network interface 44.
[0035] The switching chip 43 is configured to count the total number of packets received and the total number of packets sent by the multicast group in the current detection period. The processor 41 executes the machine-executable instructions recorded in the machine-readable storage medium 42 to perform the following operations: determine whether the multicast group members have changed in the current detection period; when the multicast group members have not changed, calculate the expected total number of packets sent by the multicast group members in the current detection period based on the total number of packets received; if the expected total number of packets sent is equal to the actual total number of packets sent, determine that no silent packet loss has occurred; if the expected total number of packets sent is greater than the actual total number of packets sent, determine that silent packet loss has occurred; when the multicast group members have changed, exit the silent packet loss detection for the current detection period.
[0036] The processor 41 executes machine-executable instructions recorded in the machine-readable storage medium 42 to perform operations including calculating the expected total number of packets to be sent by multicast group members in the current detection period based on the actual total number of packets received; identifying the type of multicast group as Layer 2 multicast; obtaining the egress port list of Layer 2 multicast entries of the Layer 2 multicast group; and calculating the expected number of packets to be sent based on the number of egress ports in the egress port list and the actual total number of packets received.
[0037] The processor 41 executes machine-executable instructions recorded in the machine-readable storage medium 42 to perform operations including calculating the expected total number of packets sent by multicast group members in the current detection period based on the actual total number of packets received. These operations include: identifying the type of the multicast group as a Layer 3 multicast group; obtaining the list of outgoing interfaces for the Layer 3 multicast entries of the Layer 3 multicast group; finding the Layer 2 forwarding domain outgoing ports of each outgoing interface in the outgoing interface list that are associated with a Layer 2 forwarding domain; and calculating the expected number of packets sent based on the number of all Layer 2 forwarding domain outgoing ports, the number of other outgoing interfaces in the outgoing interface list that are not associated with a Layer 2 forwarding domain, and the actual total number of packets received.
[0038] The switching chip 43 is also configured to map Layer 2 multicast data packets of a multicast group to a detection stream; count the number of packets received in the detection stream; count the number of packets sent in the detection stream for each outgoing port in the outgoing port list; the processor 41 executes machine-executable instructions recorded in the machine-readable storage medium 42 to, when the number of packets received in the detection stream reaches a preset mapping packet threshold, release the mapping between the Layer 2 multicast data packets and the detection stream; and identify the outgoing port corresponding to the number of packets sent in each detection stream that is less than the number of packets received in the detection stream as a silent packet-dropping outgoing port.
[0039] The switching chip 43 is also configured to map the Layer 3 multicast data packets of the multicast group to a detection stream; count the number of packets received in the detection stream; count the number of packets sent in the detection stream at each Layer 2 forwarding domain egress port of each egress interface associated with the Layer 2 forwarding domain; count the number of packets sent in the detection stream at each egress interface not associated with the Layer 2 forwarding domain; the processor 41, by running machine-executable instructions recorded in the machine-readable storage medium 42, when the number of packets received in the detection stream reaches a preset mapping packet threshold, releases the mapping between the Layer 3 multicast data packets and the detection stream; identifies the Layer 2 forwarding domain egress ports corresponding to the number of packets sent in the detection stream at egress interfaces that are less than the number of packets received in the detection stream as silent packet-dropping egress ports; and / or identifies the egress interfaces not associated with the Layer 2 forwarding domain corresponding to the number of packets sent in the detection stream at egress interfaces that are less than the number of packets received in the detection stream as silent packet-dropping egress ports.
[0040] In this application, a machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device used to store or contain information (such as executable instructions, data, etc.). For example, any machine-readable storage medium herein can be any type of random access memory (RAM), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid-state drive, any type of optical disc (such as an optical disc, DVD, etc.), and similar devices, or combinations thereof. Furthermore, any machine-readable storage medium herein can be a non-transitory machine-readable storage medium.
[0041] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for detecting silent packet loss of multicast data packets, the method comprising: The method includes, In the forwarding plane, the total number of packets received and the total number of packets sent by the multicast group within the current detection period are counted. In the control plane, it is determined whether the multicast group members of the multicast group have changed within the current detection period. If the multicast group members have not changed, the expected total number of packets sent by the multicast group members in the current detection period is calculated based on the actual total number of packets received. Based on the fact that the expected total number of packets sent is equal to the actual total number of packets sent, it is determined that no silent packet loss has occurred. Based on the fact that the expected total number of packets sent is greater than the actual total number of packets sent, it is determined that silent packet loss has occurred. When the multicast group members change, the silent packet loss detection for the current detection period is stopped.
2. The method according to claim 1, characterized in that, The multicast group is a Layer 2 multicast group; the expected total number of packets sent by the multicast group members in the current detection period is calculated based on the actual total number of packets received; Obtain the list of output ports for the Layer 2 multicast entries of the Layer 2 multicast group; The expected number of packets to be sent is calculated based on the number of outgoing ports in the outgoing port list and the actual total number of packets received.
3. The method according to claim 1, characterized in that, The multicast group is a three-layer multicast group; the expected total number of packets sent by the multicast group members in the current detection period is calculated based on the actual total number of packets received; Obtain the list of outgoing interfaces for the Layer 3 multicast entries of the Layer 3 multicast group; Locate the Layer 2 forwarding domain output ports of each output interface in the output interface list that are associated with the Layer 2 forwarding domain; The expected number of packets to be sent is calculated based on the number of all Layer 2 forwarding domain outgoing ports, the number of other outgoing interfaces in the outgoing interface list that are not associated with Layer 2 forwarding domains, and the actual total number of packets received.
4. The method according to claim 2, characterized in that, The method also includes, Map the Layer 2 multicast data packets of the multicast group to a detection stream; Count the number of packets received by the detection stream; Count the number of detected packets for each outgoing port in the outgoing port list; When the number of packets received by the detection stream reaches a preset mapping packet threshold, the mapping between the Layer 2 multicast data packet and the detection stream is released; If the number of packets sent by the detection flow at any of the aforementioned outgoing ports is less than the number of packets received by the detection flow, it is identified as a silent packet-dropping outgoing port.
5. The method according to claim 3, characterized in that, The method also includes, Map the Layer 3 multicast data packets of the multicast group to a detection stream; Count the number of packets received by the detection stream; Count the number of detected packets sent to each egress port of each Layer 2 forwarding domain of the associated Layer 2 forwarding domain; Count the number of detected packets sent to each outgoing interface of the unassociated Layer 2 forwarding domain; When the number of packets received by the detection stream reaches a preset mapping packet threshold, the mapping between the Layer 3 multicast data packets and the detection stream is released; If the number of packets sent by any of the Layer 2 forwarding domain outgoing ports or any of the outgoing interfaces of unassociated Layer 2 forwarding domains is less than the number of packets received by the detection flow, it is identified as a silent packet-dropping outgoing port.
6. A device for detecting silent packet loss of multicast data packets, the device comprising a processor, a machine-readable storage medium, a switching chip, and a network interface; characterized in that, The switching chip is configured to count the total number of packets received and the total number of packets sent by the multicast group in the current detection period. The processor performs the following operations by executing machine-executable instructions recorded on the machine-readable storage medium. Determine whether the multicast group members of the multicast group have changed within the current detection period; When the multicast group members remain unchanged, calculate the expected total number of packets sent by the multicast group members in the current detection period based on the actual total number of packets received; Based on the fact that the expected total number of packets sent is equal to the actual total number of packets sent, it is determined that no silent packet loss has occurred. Based on the fact that the expected total number of packets sent is greater than the actual total number of packets sent, it is determined that silent packet loss has occurred. When the multicast group members change, the silent packet loss detection for the current detection period is terminated.
7. The device according to claim 6, characterized in that, The processor executes machine-executable instructions recorded on the machine-readable storage medium to perform operations including calculating the expected total number of packets sent by the multicast group members in the current detection period based on the actual total number of packets received; The type of the multicast group is identified as Layer 2 multicast; Obtain the list of output ports for the Layer 2 multicast entries of the Layer 2 multicast group; The expected number of packets to be sent is calculated based on the number of outgoing ports in the outgoing port list and the actual total number of packets received.
8. The device according to claim 7, characterized in that, The processor executes machine-executable instructions recorded on the machine-readable storage medium to perform operations including calculating the expected total number of packets sent by the multicast group members in the current detection period based on the actual total number of packets received. The multicast group was identified as a Layer 3 multicast group. Obtain the list of outgoing interfaces for the Layer 3 multicast entries of the Layer 3 multicast group; Locate the Layer 2 forwarding domain output ports of each output interface in the output interface list that are associated with the Layer 2 forwarding domain; The expected number of packets to be sent is calculated based on the number of all Layer 2 forwarding domain outgoing ports, the number of other outgoing interfaces in the outgoing interface list that are not associated with Layer 2 forwarding domains, and the actual total number of packets received.
9. The device according to claim 7, characterized in that, The switching chip is also configured to map the Layer 2 multicast data packets of the multicast group to a detection stream; count the number of packets received in the detection stream; and count the number of packets sent in the detection stream for each outgoing port in the outgoing port list. The processor also performs the following operations by executing machine-executable instructions recorded on the machine-readable storage medium. When the number of packets received by the detection stream reaches a preset mapping packet threshold, the mapping between the Layer 2 multicast data packet and the detection stream is released; The output port corresponding to the number of packets sent by each detection flow that is less than the number of packets received by the detection flow is identified as a silent packet loss output port.
10. The device according to claim 7, characterized in that, The switching chip is also configured to map the Layer 3 multicast data packets of the multicast group to a detection stream; and to count the number of packets received in the detection stream. Count the number of detected packets sent to each egress port of each Layer 2 forwarding domain of the associated Layer 2 forwarding domain; Count the number of detected packets sent to each outgoing interface of the unassociated Layer 2 forwarding domain; The processor performs the following operations by executing machine-executable instructions recorded on the machine-readable storage medium. When the number of packets received by the detection stream reaches a preset mapping packet threshold, the mapping between the Layer 3 multicast data packets and the detection stream is released; The Layer 2 forwarding domain outgoing port corresponding to the outgoing interface packet sending number that is less than the number of packets received by the detection flow is identified as a silent packet loss outgoing port. And / or, The outgoing interface corresponding to the unassociated Layer 2 forwarding domain whose outgoing interface packet sending count is less than the number of packets received by the detection flow is identified as a silent packet loss outgoing port.