Communication methods and devices

By obtaining the multicast forwarding table entries of the multicast stream in the network device, and statistically comparing the actual count value with the expected value, multicast silent fault detection is realized, filling the gap in the existing technology, consuming a small amount of hardware resources, and achieving the effect of reporting multicast stream and interface faults.

CN122137757APending Publication Date: 2026-06-02NEW H3C TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2026-03-23
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing network equipment cannot perform silent fault detection for multicast forwarding.

Method used

By obtaining the multicast forwarding table entries of the multicast stream, the actual value of the interface count indicated by the interface identifier is calculated and compared with the expected value. If the actual value is less than the expected value, the multicast stream or interface is determined to be faulty.

Benefits of technology

It achieves multicast silent fault detection with minimal hardware resources, solving the problem that existing network devices cannot detect multicast forwarding silent faults.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137757A_ABST
    Figure CN122137757A_ABST
Patent Text Reader

Abstract

This application provides a communication method and apparatus applied to a network device. The method includes: obtaining a multicast forwarding table entry for a multicast stream, the multicast forwarding table entry including at least one outgoing interface identifier; calculating a first actual count value of the multicast stream through the interface indicated by the outgoing interface identifier; and determining that the network device is faulty when forwarding the multicast stream if the first actual count value is less than a first expected count value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a communication method and apparatus. Background Technology

[0002] As a communication method alongside unicast and broadcast, multicast can effectively solve the problem of single-point sending and multi-point receiving, thereby achieving efficient point-to-multipoint data transmission in the network, saving a lot of network bandwidth and reducing network load.

[0003] Multicast can also be used to easily provide some new value-added services, including online live streaming, IPTV, distance education, telemedicine, internet radio, real-time video conferencing, and other information services that have high requirements for bandwidth and real-time data interaction.

[0004] The multicast forwarding table is used to guide multicast forwarding. The format of the multicast forwarding table is as follows: (1.1.1.1, 225.0.0.1); Incoming interface: interface 1; Outgoing interface list: interface 2, interface 3. When a multicast packet with a source IP address of 1.1.1.1 and a destination IP address of 225.0.0.1 is received from the incoming interface (interface 1), the network device forwards one copy of the multicast packet to both interface 2 and interface 3.

[0005] Silent forwarding fault detection refers to an automatic detection mechanism where network devices proactively detect faults and notify users when the forwarding table is normal but service packets are not forwarded according to the forwarding table. For example, unicast silent detection works as follows: within a period, the number of incoming received packets and outgoing forwarded packets in the unicast forwarding table are counted. If the number of outgoing forwarded packets is less than the number of incoming received packets, then a silent fault has occurred on the outgoing interface corresponding to the service flow to which the network device's packet belongs.

[0006] Currently, since the unicast forwarding table includes only one ingress interface and one egress interface, implementing silent fault detection for unicast forwarding within network devices is relatively simple. However, for multicast forwarding, network devices currently lack relevant silent fault detection technologies. Summary of the Invention

[0007] In view of this, this application provides a communication method and apparatus to solve the problem that existing network equipment cannot achieve silent fault detection in multicast forwarding.

[0008] In a first aspect, this application provides a communication method applied to a network device, the method comprising: Obtain the multicast forwarding table entry for the multicast stream, wherein the multicast forwarding table entry includes at least one outgoing interface identifier; The first actual count value of the multicast stream is calculated through the interface indicated by the outgoing interface identifier; If the actual value of the first count is less than the expected value of the first count, then the network device is determined to be faulty when forwarding the multicast stream.

[0009] Secondly, this application provides a communication device applied to a network device, the device comprising: The acquisition unit is used to acquire the multicast forwarding table entry of the multicast stream, wherein the multicast forwarding table entry includes at least one outgoing interface identifier; The first statistical unit is used to count the first actual value of the multicast stream through the interface indicated by the outgoing interface identifier; The determining unit is configured to determine that the network device is faulty when forwarding the multicast stream if the actual value of the first count is less than the expected value of the first count.

[0010] Thirdly, this application provides a network device including a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which in turn cause the processor to perform the method provided in the first aspect of this application.

[0011] Therefore, by applying the communication method and apparatus provided in this application, the network device obtains the multicast forwarding table entry of the multicast stream, which includes at least one outgoing interface identifier; through the interface indicated by the outgoing interface identifier, the network device counts the first actual value of the multicast stream; if the first actual value of the multicast stream is less than the first expected value of the multicast stream, the network device determines that the network device is malfunctioning when forwarding the multicast stream.

[0012] In this way, by comparing the actual count value of the multicast stream with the expected count value, multicast silent fault detection is achieved, filling the gap in existing technology, and consuming very few hardware resources to achieve the effect of reporting multicast stream faults and interface faults; at the same time, it also solves the problem that existing network devices cannot achieve multicast forwarding silent fault detection. Attached Figure Description

[0013] Figure 1 A flowchart illustrating the communication method provided in the embodiments of this application; Figure 2 A structural diagram of a communication device provided in an embodiment of this application; Figure 3 The network device hardware structure provided in the embodiments of this application. Detailed Implementation

[0014] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0015] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the corresponding listed items.

[0016] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0017] The communication method provided in the embodiments of this application will be described in detail below. See also... Figure 1 , Figure 1 A flowchart illustrating a communication method provided in an embodiment of this application. This method is applied to a network device. The communication method provided in an embodiment of this application may include the following steps.

[0018] Step 110: Obtain the multicast forwarding table entry for the multicast stream, wherein the multicast forwarding table entry includes at least one outgoing interface identifier; Specifically, the network device carries multiple multicast streams and stores multicast forwarding entries for multiple multicast streams. Each multicast forwarding entry includes an ingress interface identifier and at least one egress interface identifier.

[0019] Users select a preset number of multicast streams from the multiple multicast streams carried by the network device based on the importance of their business. The network device then obtains the multicast forwarding table entries for each multicast stream selected by the user.

[0020] In one example, the user selects three multicast streams: multicast stream 1, multicast stream 2, and multicast stream 3. The multicast forwarding table entries for each multicast stream are shown below.

[0021] Multicast forwarding entry 1 for multicast stream 1: (1.1.1.1, 225.0.0.1) Input interface: Interface 1 Outgoing interface list: Interface 4, Interface 5 Multicast forwarding table item 2 for multicast stream 2: (1.1.1.2, 225.0.0.2) Input interface: Interface 2 Outgoing interface list: Interface 5, Interface 6 Multicast forwarding table item 3 for multicast stream 3: (1.1.1.3, 225.0.0.3) Input interface: Interface 3 Outgoing interface list: Interface 6, Interface 7, Interface 8 Step 120: Calculate the first actual count value of the multicast stream through the interface indicated by the outgoing interface identifier; Specifically, according to the description of step 110, after the network device obtains the multicast forwarding table entry, it counts the first actual value of the multicast stream through the interface indicated by the outgoing interface identifier in the outgoing interface list included in each multicast forwarding table entry.

[0022] Optionally, in this embodiment of the application, the specific process by which the network device counts the first actual value of the multicast stream through the interface indicated by the outgoing interface identifier is as follows: the network device counts the first packet count of the service packets of the same multicast stream for each interface in the same multicast forwarding table entry; the network device uses the sum of the counts of each first packet as the first actual value of the count.

[0023] Based on the aforementioned example, the network device counts the inbound and outbound packets for each multicast stream during the detection period. The inbound packet count is the total inbound packet count of the inbound interface, and the outbound packet count is the sum of the outbound packet counts for each interface in the outbound interface list. See Table 1 below.

[0024] Table 1 Actual values ​​of the first count for multicast streams In Table 1, interface 1 of multicast stream 1 receives 10 packets, and interfaces 4 and 5 forward a total of 20 packets; interface 2 of multicast stream 2 receives 20 packets, and interfaces 5 and 6 forward a total of 30 packets; interface 3 of multicast stream 3 receives 30 packets, and interfaces 6, 7 and 8 forward a total of 90 packets.

[0025] Understandably, when network devices calculate the outbound packet count for each multicast stream, they first calculate the outbound packet count for each outbound interface when forwarding the current multicast stream, and then sum the multiple outbound packet counts as the outbound packet count for the current multicast stream.

[0026] Furthermore, when counting the outgoing packet count of multicast stream 1, the network device first calculates the packet count 1 (e.g., 10) when interface 4 forwards packets of multicast stream 1, then calculates the packet count 2 (e.g., 10) when interface 5 forwards packets of multicast stream 1, and finally, the network device uses the sum of packet count 1 and packet count 2 as the outgoing packet count of multicast stream 1 (e.g., 20).

[0027] Similarly, when counting the outgoing packets of multicast stream 2, the network device first calculates the packet count 3 (e.g., 20) when interface 5 forwards packets of multicast stream 2, then calculates the packet count 4 (e.g., 10) when interface 6 forwards packets of multicast stream 2, and finally, the network device uses the sum of packet count 3 and packet count 4 as the outgoing packet count of multicast stream 2 (e.g., 30).

[0028] Similarly, when counting the outgoing packets of multicast stream 3, the network device first calculates the packet count 5 (e.g., 30) when interface 6 forwards packets of multicast stream 3, then calculates the packet count 6 (e.g., 30) when interface 7 forwards packets of multicast stream 3, then calculates the packet count 7 (e.g., 30) when interface 8 forwards packets of multicast stream 3, and finally, the network device uses the sum of packet count 5, packet count 6, and packet count 7 as the outgoing packet count of multicast stream 3 (e.g., 90).

[0029] Step 130: If the actual value of the first count is less than the expected value of the first count, then it is determined that the network device is faulty when forwarding the multicast stream.

[0030] Specifically, according to the description of step 120, after the network device obtains the first actual count value of each multicast stream, it compares the size relationship between the first actual count value and the first expected count value of the corresponding multicast stream.

[0031] If the actual value of the first count is less than the expected value of the first count for the corresponding multicast stream, the network device determines that it is faulty when forwarding the multicast stream, and the fault may be a silent fault.

[0032] If the actual value of the first count is equal to the expected value of the first count for the corresponding multicast stream, then the network device determines that it is normal to forward the multicast stream.

[0033] Optionally, in an embodiment of this application, the first expected count value is determined by the following formula.

[0034] The expected value of the first count = the inbound packet count of multicast stream n * the number of outbound interfaces in the corresponding multicast forwarding table entry (Formula 1) Based on the multicast forwarding table entries for each multicast stream and the examples in Table 1, the network device calculates the first expected count value for each multicast stream.

[0035] The expected first count for multicast stream 1 is 10 * 2 = 20. The expected first count for multicast stream 2 is 20 * 2 = 40. The expected first count for multicast stream 3 is 30 * 3 = 90. The network devices compare the actual first count value of each multicast stream with the expected first count value of the corresponding multicast stream.

[0036] If the actual value of the first count of multicast stream 1 (20) is equal to the expected value of the first count of multicast stream 1 (20), then the network device determines that it is normal to forward this multicast stream. If the actual value of the first count of multicast stream 2 (30) is less than the expected value of the first count of multicast stream 2 (40), then the network device determines that a silent fault has occurred when it forwards this multicast stream. If the actual value of the first count of multicast stream 3 (90) is equal to the expected value of the first count of multicast stream 3 (90), then the network device determines that it is normal to forward this multicast stream.

[0037] Optionally, in this embodiment of the application, the network device may further determine the state of its own interface when forwarding multicast streams in order to further determine the location of the fault.

[0038] Furthermore, the network device counts the actual value of the second count of the interface; if the actual value of the second count is less than the expected value of the second count, then a fault is determined when the interface forwards the multicast stream, which may be specifically a silent fault.

[0039] Optionally, the specific process of the second count actual value of the above network device statistics interface is as follows: the network device statistics interface counts the second packets of service packets forwarding different multicast streams; the network device uses the sum of the counts of each second packet as the second count actual value.

[0040] Furthermore, the network device counts the second count for each interface used to forward multicast streams. This second count is the sum of the second packet counts for each interface forwarding service packets of different multicast streams (i.e., the outgoing direction of the interface), as shown in Table 2 below.

[0041] Table 2. Actual values ​​of the second count of the interface. In Table 2, since interfaces 1, 2, and 3 are the ingress interfaces for multicast streams, their outgress packet counts are 0. The network device counts the second packet counts for interfaces 4, 5, 6, 7, and 8 respectively, and uses the sum of the second packet counts for each interface as the actual second count value for that interface.

[0042] Interface 4 serves as the outgoing interface for multicast stream 1 and does not carry other multicast streams. Therefore, the packet count 8 (e.g., 10) of interface 4 as counted by the network device is also the outgoing packet count of interface 4 (e.g., 10).

[0043] Interface 5 serves as the outgoing interface for both multicast stream 1 and multicast stream 2. The network device counts the number of packets (9 for example, 10) when interface 5 is used as the outgoing interface for multicast stream 1, and the number of packets (10 for example, 20) when interface 5 is used as the outgoing interface for multicast stream 2. Finally, the network device uses the sum of the number of packets (9 for example, 10) as the outgoing packet count for interface 5 (30 for example).

[0044] Similarly, interface 6 serves as the outgoing interface for both multicast stream 2 and multicast stream 3. The network device counts the number of packets 11 (e.g., 10) when interface 6 is the outgoing interface for multicast stream 2, and the number of packets 12 (e.g., 30) when interface 6 is the outgoing interface for multicast stream 3. Finally, the network device uses the sum of the number of packets 11 and the number of packets 12 as the outgoing packet count for interface 6 (e.g., 40).

[0045] Similarly, since interface 7 is the outgoing interface for multicast stream 3 and does not carry other multicast streams, the packet count of interface 7 counted by the network device is 13 (e.g., 30), which is also the outgoing packet count of interface 7, 30.

[0046] Similarly, since interface 8 serves as the outgoing interface for multicast stream 3 and does not carry other multicast streams, the packet count of interface 8 counted by the network device is 14 (e.g., 30), which is also the outgoing packet count of interface 8, 30.

[0047] Furthermore, in the embodiments of this application, the expected value of the first count is determined by the following formula two.

[0048] The second expected count value = the sum of the inbound packet counts of all multicast streams n corresponding to the multicast forwarding table of all outgoing interfaces m (Formula 2). Based on the multicast forwarding table entries for each multicast stream and the examples in Table 2, the network device calculates the second expected count value for each interface.

[0049] The expected second count values ​​for interfaces 1, 2, and 3 are all 0. The expected value of the second count for interface 4 is 10. The expected value of the second count in Interface 5 is 10 + 20 = 30 The expected value of the second count for interface 6 is 20 + 30 = 50. The expected value of the second count for interface 7 is 30. The expected value of the second count for interface 8 is 30. The network devices compare the actual value of the second count for each interface with the expected value of the second count for the corresponding interface.

[0050] If the actual value of the second count of interface 4 (10) is equal to the expected value of the second count of interface 4 (10), then the network device determines that the multicast stream forwarding on interface 4 is normal. If the actual value of the second count of interface 5 (30) is equal to the expected value of the second count of interface 5 (30), then the network device determines that the multicast stream forwarding on interface 5 is normal. If the actual value of the second count of interface 6 (40) is less than the expected value of the second count of interface 6 (50), then the network device determines that a silent fault has occurred when the multicast stream is forwarded on interface 6. If the actual value of the second count of interface 7 (30) is equal to the expected value of the second count of interface 7 (30), then the network device determines that the multicast stream forwarding on interface 7 is normal. If the actual value of the second count of interface 8 (30) is equal to the expected value of the second count of interface 8 (30), then the network device determines that the multicast stream forwarding on interface 8 is normal.

[0051] Optionally, in this embodiment of the application, after determining that its own or the interface forwarding multicast stream is faulty, the network device may also summarize the fault information and report it.

[0052] Furthermore, as can be seen from the aforementioned example, the network device experienced a silent failure when forwarding multicast stream 2 (receiving 20 packets, expecting to forward 40 packets, actually forwarding 30 packets) and interface 6 when forwarding multicast stream (expecting to forward 50 packets, actually forwarding 40 packets).

[0053] The network device generates and sends a notification message to the controller (or user equipment), which includes fault information. Upon receiving the notification message, the controller (or user equipment) displays the fault information so that the user can determine that interface 6 of multicast stream 2 has experienced a silent fault.

[0054] Optionally, in the embodiments of this application, during the process of determining a fault, the user may be unable to determine which interface of which multicast stream the network device is forwarding has a silent fault based on the notification message reported by the network device.

[0055] Furthermore, if a network device fails when forwarding multiple multicast streams, or if multiple interfaces within the device fail when forwarding multicast streams, and the multiple multicast streams have the same multiple interfaces, then for each multicast stream, the network device will count the actual value of the third count for each interface used to forward the multicast stream.

[0056] If the actual value of the third count is less than the expected value of the third count, the network device determines that it is faulty when forwarding the multicast stream, and the interface is faulty when forwarding the multicast stream.

[0057] Based on the aforementioned example, if the network device determines that it is faulty when forwarding multicast stream 1 and multicast stream 2, and determines that interfaces 4, 5, and 6 are faulty when forwarding multicast stream 1 and multicast stream 2, since interface 5 carries both multicast stream 1 and multicast stream 2, the user cannot determine from the network device's report whether interface 5 is faulty when forwarding multicast stream 1 or experiencing a silent fault when forwarding multicast stream 2.

[0058] Therefore, in this embodiment, for multicast stream 1 and multicast stream 2, the network device counts the actual value of the third count (i.e., the packet count of each interface forwarding one multicast stream) for each outgoing interface (interfaces 4 and 5 of multicast stream 1; interfaces 5 and 6 of multicast stream 2) used to forward the multicast stream. Finally, the network device compares the packet count of each interface forwarding one multicast stream with the expected count of that interface forwarding the multicast stream (the expected value of each interface forwarding one multicast stream) to ultimately determine which interface of which multicast stream has a silent failure.

[0059] It is understood that in the foregoing embodiments, examples of packet counts for each interface forwarding a multicast stream have been given (e.g., packet count 8, packet count 9, packet count 10, packet count 11, packet count 12), which will not be repeated here. The aforementioned third count expectation value is the expectation value for each interface forwarding a multicast stream, that is, it is determined by the inbound packet count of a multicast stream.

[0060] For example, if the inbound packet count of multicast stream 1 is 10, then the expected value of the third count for interface 4 is 10, and the expected value of the third count for interface 5 is 10; if the inbound packet count of multicast stream 1 is 20, then the expected value of the third count for interface 5 is 20, and the expected value of the third count for interface 6 is 20.

[0061] It should be noted that the above-mentioned scheme provided in this application requires periodic statistics of packet forwarding counts and periodic calculation of expected packet values, and the impact on services must be considered. 1) For counting packet forwarding counts, conventional forwarding chips are capable of performing the packet statistics function of the above scheme, avoiding the use of CPU-based packet forwarding statistics technology to reduce the impact on services. 2) Calculating expected count values ​​is a complex and time-consuming task, and repeated calculations should be avoided every period. The previous calculation result can be cached for each multicast stream (or interface). If the multicast forwarding table entries (outgoing interface list) have not changed within two statistical periods, the network device uses the previous calculation result; if the multicast forwarding table entries have changed within two statistical periods, the network device recalculates. 3) Statistical period: A fixed statistical period of minutes (1-2 minutes) can be set to avoid consuming too many resources.

[0062] Therefore, by applying the communication method provided in this application, the network device obtains the multicast forwarding table entry of the multicast stream, which includes at least one outgoing interface identifier; through the interface indicated by the outgoing interface identifier, the network device counts the first actual value of the multicast stream; if the first actual value of the first count is less than the first expected value of the first count, the network device determines that the network device is faulty when forwarding the multicast stream.

[0063] In this way, by comparing the actual count value of the multicast stream with the expected count value, multicast silent fault detection is achieved, filling the gap in existing technology, and consuming very few hardware resources to achieve the effect of reporting multicast stream faults and interface faults; at the same time, it also solves the problem that existing network devices cannot achieve multicast forwarding silent fault detection.

[0064] Based on the same inventive concept, embodiments of this application also provide a communication device corresponding to the communication method. See also Figure 2 , Figure 2 The communication device provided in this application embodiment is applied to a network device, and the device includes: The acquisition unit 210 is used to acquire multicast forwarding table entries for multicast streams, wherein the multicast forwarding table entries include at least one outgoing interface identifier; The first statistical unit 220 is used to count the first actual value of the multicast stream through the interface indicated by the outgoing interface identifier; The determining unit 230 is configured to determine that the network device is faulty when forwarding the multicast stream if the actual value of the first count is less than the expected value of the first count.

[0065] Optionally, the device further includes: The second statistical unit (not shown in the figure) is used to count the actual value of the second count of the interface; The determining unit 230 is further configured to determine that the interface is faulty when forwarding the multicast stream if the actual value of the second count is less than the expected value of the second count.

[0066] Optionally, the first statistics unit 220 is specifically used to count the first packet count of service packets of the same multicast stream for each interface in the same multicast forwarding table entry. The sum of the counts for each first message is used as the actual value of the first count.

[0067] Optionally, the second statistical unit (not shown in the figure) is specifically used to count the second packet count of the interface when forwarding service packets of different multicast streams; The sum of the counts for each second message is used as the actual value of the second count.

[0068] Optionally, the device further includes: The third statistical unit (not shown in the figure) is used to count the actual value of the third count for each interface used to forward the multicast stream if the network device forwards multiple multicast streams, the multiple interfaces included in the network device fail when forwarding the multicast streams, and the multiple multicast streams have the same multiple interfaces. The determining unit 230 is further configured to determine that the network device is faulty when forwarding the multicast stream, and that the interface is faulty when forwarding the multicast stream, if the actual value of the third count is less than the expected value of the third count.

[0069] Therefore, using the communication device provided in this application, the network device obtains the multicast forwarding table entry of the multicast stream, which includes at least one outgoing interface identifier; through the interface indicated by the outgoing interface identifier, the network device counts the first actual value of the multicast stream; if the first actual value of the first count is less than the first expected value of the first count, the network device determines that the network device is faulty when forwarding the multicast stream.

[0070] In this way, by comparing the actual count value of the multicast stream with the expected count value, multicast silent fault detection is achieved, filling the gap in existing technology, and consuming very few hardware resources to achieve the effect of reporting multicast stream faults and interface faults; at the same time, it also solves the problem that existing network devices cannot achieve multicast forwarding silent fault detection.

[0071] Based on the same inventive concept, embodiments of this application also provide a network device, such as... Figure 3 As shown, the system includes a processor 310, a transceiver 320, and a machine-readable storage medium 330. The machine-readable storage medium 330 stores machine-executable instructions that can be executed by the processor 310. The processor 310 is prompted by the machine-executable instructions to execute the communication method provided in the embodiments of this application. (The foregoing...) Figure 2 The communication device shown can be used as follows: Figure 3 The hardware structure of the network device shown is implemented.

[0072] The aforementioned computer-readable storage medium 330 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the computer-readable storage medium 330 may also be at least one storage device located remotely from the aforementioned processor 310.

[0073] The processor 310 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0074] In this embodiment of the application, the processor 310 reads the machine-executable instructions stored in the machine-readable storage medium 330, and is prompted by the machine-executable instructions to enable the processor 310 itself and the transceiver 320 to execute the communication method described in the foregoing embodiment of the application.

[0075] In addition, this application provides a machine-readable storage medium 330 that stores machine-executable instructions. When called and executed by the processor 310, the machine-executable instructions cause the processor 310 itself and the transceiver 320 to execute the communication method described in the aforementioned application.

[0076] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0077] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0078] For the embodiments of communication devices and machine-readable storage media, since the methods involved are basically similar to those of the aforementioned method embodiments, the description is relatively simple, and relevant details can be found in the descriptions of the method embodiments.

[0079] The above description is merely a preferred embodiment of this application and is 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 communication method, characterized in that, Applied to network devices, the method includes: Obtain the multicast forwarding table entry for the multicast stream, wherein the multicast forwarding table entry includes at least one outgoing interface identifier; The first actual count value of the multicast stream is calculated through the interface indicated by the outgoing interface identifier; If the actual value of the first count is less than the expected value of the first count, then the network device is determined to be faulty when forwarding the multicast stream.

2. The method according to claim 1, characterized in that, The method further includes: Calculate the actual value of the second count of the interface; If the actual value of the second count is less than the expected value of the second count, then a fault is determined when the interface forwards the multicast stream.

3. The method according to claim 1, characterized in that, The step of counting the first actual value of the multicast stream through the interface indicated by the outgoing interface identifier specifically includes: Count the first packet of the same multicast stream service packets forwarded by each interface within the same multicast forwarding table entry. The sum of the counts for each first message is used as the actual value of the first count.

4. The method according to claim 2, characterized in that, The statistical analysis of the second count actual value of the interface specifically includes: Count the number of second packets in the interface when forwarding service packets from different multicast streams; The sum of the counts for each second message is used as the actual value of the second count.

5. The method according to claim 1, characterized in that, The method further includes: If the network device forwards multiple multicast streams, the multiple interfaces included in the network device fail when forwarding multicast streams, and the multiple multicast streams have the same multiple interfaces, then for each multicast stream, the third count actual value of each interface used to forward the multicast stream is counted separately. If the actual value of the third count is less than the expected value of the third count, then it is determined that the network device is faulty when forwarding the multicast stream, and the interface is faulty when forwarding the multicast stream.

6. A communication device, characterized in that, Applied to network devices, the device includes: The acquisition unit is used to acquire the multicast forwarding table entry of the multicast stream, wherein the multicast forwarding table entry includes at least one outgoing interface identifier; The first statistical unit is used to count the first actual value of the multicast stream through the interface indicated by the outgoing interface identifier; The determining unit is configured to determine that the network device is faulty when forwarding the multicast stream if the actual value of the first count is less than the expected value of the first count.

7. The apparatus according to claim 6, characterized in that, The device further includes: The second statistical unit is used to count the second actual value of the interface; The determining unit is further configured to determine that the interface is faulty when forwarding the multicast stream if the actual value of the second count is less than the expected value of the second count.

8. The apparatus according to claim 6, characterized in that, The first statistical unit is specifically used to count the first packet count of each interface forwarding the same multicast stream service packets in the same multicast forwarding table entry. The sum of the counts for each first message is used as the actual value of the first count.

9. The apparatus according to claim 7, characterized in that, The second statistical unit is specifically used to count the second packet count of the service packets of different multicast streams forwarded by the interface; The sum of the counts for each second message is used as the actual value of the second count.

10. The apparatus according to claim 6, characterized in that, The device further includes: The third statistical unit is used to count the actual value of the third count for each interface used to forward the multicast stream if the network device forwards multiple multicast streams, the multiple interfaces included in the network device fail when forwarding the multicast streams, and the multiple multicast streams have the same multiple interfaces. The determining unit is further configured to, if the actual value of the third count is less than the expected value of the third count, determine that the network device is faulty when forwarding the multicast stream, and that the interface is faulty when forwarding the multicast stream.