Communication method and device

By passing announcement information and establishing table entries between transmission nodes in the ring network, the problem of slow convergence speed of ring network protection switching and large equipment overhead is solved, and fast path switching and low overhead service packet transmission is realized.

CN119094276APending Publication Date: 2024-12-06HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310663140.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-06
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

When the link failure of the existing ring network, the convergence speed of ring protection switching is slow and the equipment overhead is large, resulting in the impact of transmission performance.

Method used

By passing advertisement information between transmission nodes in the ring network, including the end-side device address and transmission distance, establishing table entries to determine the path status, achieving fast path switching and avoiding broadcast traffic.

Benefits of technology

It improves the convergence speed of ring network protection switching, reduces equipment overhead, and ensures the normal transmission of service messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094276A_ABST
    Figure CN119094276A_ABST
Patent Text Reader

Abstract

The invention provides a communication method and device, and relates to the field of communication. The method comprises the following steps: a first node receives first notification information through a first port, wherein the first notification information comprises a first address of end side equipment and a transmission distance L1; the transmission distance L1 is used for indicating the transmission distance between the second node and the fourth node on the ring network, and the fourth node is an access node of the end side equipment on the ring network; the first node sends second notification information to the third node through the second port, the second notification information comprises the first address and a transmission distance L2, and the transmission distance L2 is used for indicating the transmission distance between the first node and the fourth node passing through the ring network. The method and the device are used for improving the convergence speed of the ring network protection switching and reducing the equipment overhead required by the ring network protection switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a communication method and device. Background Art

[0002] At present, ring networks are often used in industrial networks and other fields due to their inherent redundancy. When a link failure occurs in a ring network, the transmission path can be switched by ring network protection switching to ensure the normal transmission of service messages.

[0003] Among them, ring network protection switching mainly involves three processes: fault detection, fault diffusion and path switching. Specifically, the transmission node on the ring network can detect the link failure through operation administration and maintenance (OAM) technology, and notify the fault information to other nodes on the ring network. After receiving the fault notification, other nodes re-determine the sending direction of the service message on the ring network to achieve path switching.

[0004] Among them, how to improve the convergence speed of ring network protection switching and reduce the equipment overhead required for ring network protection switching are the problems that need to be solved at present. Summary of the invention

[0005] The present application provides a communication method and device for improving the convergence speed of ring network protection switching and reducing the equipment overhead required for ring network protection switching.

[0006] In a first aspect, a communication method is provided, the method being applied to a first node on a ring network, the second node and the third node on the ring network being adjacent nodes of the first node, the first node being connected to the second node via a first port, and the first node being connected to the third node via a second port, the method comprising: the first node receiving first notification information via the first port, the first notification information comprising a first address of an end-side device and a transmission distance L1; the transmission distance L1 being used to indicate a transmission distance on the ring network passed between the second node and a fourth node, the fourth node being an access node of an end-side device on the ring network. The first node sending second notification information to the third node via the second port, the second notification information comprising a first address and a transmission distance L2, the transmission distance L2 being used to indicate a transmission distance on the ring network passed between the first node and the fourth node.

[0007] Through the above method of the present application, each transmission node on the ring network can determine the transmission distance on the ring network in the transmission path from the node to each end-side device. In this way, on the one hand, the transmission node can judge whether the transmission path from the node to each end-side device is affected by the link failure based on the above transmission distance. For the affected transmission path, the data message can be forwarded from the net port on the other side by updating the forwarding table entry; for the transmission path that is not affected, there is no need to update the forwarding table entry. On the other hand, for the forwarding table entry that needs to be updated, since the update of the forwarding table entry is caused by the link failure on the ring network, the forwarding table entry can be directly updated to forward the data message from the net port on the other side of the ring network, so that the switching of the transmission path can be completed without sending broadcast traffic.

[0008] In one implementation, the method further includes: the first node establishing a first table entry according to the first notification information, wherein the first table entry includes a correspondence between the first address, the first port, and the transmission distance L2.

[0009] Through the above implementation, the first node can determine the first table entry by looking up the table according to the first address, and further determine the transmission distance L2 from the first node to the first address through the ring network.

[0010] In one implementation, the method also includes: the first node establishes a second table entry, the second table entry includes a correspondence between the first port, the transmission distance L2 and a first state identifier, and the first state identifier is used to indicate the path state from the first port of the first node to the fourth node on the ring network.

[0011] Through the above implementation, the first node can determine the second table entry by looking up the table according to the first port and the transmission distance L2, and further determine the path state from the first port of the first node to the fourth node.

[0012] In one implementation, the method further includes: the first node receives a data message with a destination address being the first address; after the first node determines that the first status identifier in the second table entry indicates that the path status is available, the first node forwards the data message through the first port according to the first table entry.

[0013] In the above implementation, the first node can quickly determine the path status between the first port and the fourth node by looking up a table, and then forward the data message through the first port after determining that the path status is available. Therefore, when a link failure occurs, there is no need to re-update the forwarding table entry.

[0014] In one implementation, the method further includes: the first node receives first fault information through the first port, the first fault information includes a transmission distance L3, and the transmission distance L3 is used to indicate the transmission distance of the ring network from the first node to the faulty link. The first node searches for a second table entry that includes the first port and includes a transmission distance L2 greater than the transmission distance L3 based on the first fault information, and updates the first state flag in the second table entry so that the first state flag indicates that the path state is unavailable.

[0015] In the above implementation, by adding the transmission distance to the fault information, the first node can determine the distance from the link fault to the first node, so that the first node can determine the forwarding table entries affected by the fault.

[0016] In one implementation, the method further includes: the first node sending second fault information through the second port, the second fault information including a transmission distance L4, and the transmission distance L4 is used to indicate a transmission distance from the third node to the ring network through which the faulty link passes.

[0017] In one implementation, the method further includes: the first node receives first fault recovery information through the first port, the first fault recovery information includes a transmission distance L3, and the transmission distance L3 is used to indicate the transmission distance from the first node to the fault recovery link on the ring network. The first node sends second fault recovery information through the second port, the second fault recovery information includes a transmission distance L4, and the transmission distance L4 is used to indicate the transmission distance from the third node to the fault recovery link on the ring network.

[0018] In the above implementation, by adding the transmission distance to the fault recovery information, the first node can determine the distance from the fault recovery link to the first node, so that the first node can determine the forwarding table entry affected by the fault and update the forwarding table entry.

[0019] In one implementation, the method further includes: the first node receives first confirmation information from the node where the ring protection link is located, the first confirmation information is used to indicate that the ring protection link has been restored to a blocked state; the first node updates the forwarding table entry recorded in the first node according to the first confirmation information.

[0020] In the above implementation, after receiving the confirmation information from the node where the ring protection link is located, the first node updates the forwarding table entry, thereby avoiding the situation where the data message is lost due to the premature update of the forwarding table entry.

[0021] In one implementation, the first confirmation information includes a transmission distance L3, and the transmission distance L3 is used to indicate the transmission distance on the ring network from the first node to the fault repair link. The method also includes: the first node sends a second confirmation information to the downstream node, the second confirmation information is used to indicate that the ring protection link has been restored to a blocked state, and the first confirmation information includes the transmission distance on the ring network from the downstream node to the fault repair link.

[0022] In one implementation, the method also includes: the first node establishes a third table entry based on the first notification information, the third table entry includes a correspondence between the first address, the second port and the second state identifier, the second state identifier is used to indicate the path status from the second port of the first node to the fourth node on the ring network, when the first state identifier indicates that the path status is available, the second state identifier indicates that the path is unavailable, and when the first state identifier indicates that the path status is unavailable, the second state identifier indicates that the path is available.

[0023] Through the above implementation, when the primary path is unavailable, the backup path can be quickly switched to for data message forwarding.

[0024] In a second aspect, a communication method is provided, which is applied to a first node in a ring network, where a second node and a third node are adjacent nodes of the first node on the ring network, the first node is connected to the second node via a first port, and the first node is connected to the third node via a second port, the method comprising: the first node receives first fault information via the first port, the first fault information includes a transmission distance L3, and the transmission distance L3 is used to indicate the transmission distance of the ring network from the first node to the faulty link; the first node searches for a second table entry containing the first port and containing a transmission distance greater than the transmission distance L3 based on the first fault information; the second table entry includes a correspondence between the first port, the transmission distance L2 and a first state identifier, and the first state identifier is used to indicate the path state on the ring network from the first port of the first node to a fourth node outside the transmission distance L2; the first node updates the first state identifier in the second table entry so that the first state identifier indicates that the path state is unavailable.

[0025] In one implementation, the method further includes: the first node sending second fault information through the second port, the second fault information including a transmission distance L4, and the transmission distance L4 is used to indicate a transmission distance from the third node to the ring network through which the faulty link passes.

[0026] In one implementation, the method also includes: the first node receives first fault recovery information through a first port, the first fault recovery information includes a transmission distance L3, and the transmission distance L3 is used to indicate the transmission distance from the first node to the fault recovery link on the ring network; the first node sends second fault recovery information through a second port, the second fault recovery information includes a transmission distance L4, and the transmission distance L4 is used to indicate the transmission distance from the third node to the fault recovery link on the ring network.

[0027] In one implementation, the method further includes: the first node receives first confirmation information from the node where the ring protection link is located, the first confirmation information is used to indicate that the ring protection link has been restored to a blocked state; the first node updates the forwarding table entry recorded in the first node according to the first confirmation information.

[0028] In one implementation, the first confirmation information includes a transmission distance L3, and the transmission distance L3 is used to indicate the transmission distance from the first node to the fault repair link on the ring network. The method also includes: the first node sends a second confirmation information to the downstream node, and the second confirmation information is used to indicate that the ring protection link has been restored to a blocked state. The first confirmation information includes the transmission distance from the downstream node to the fault repair link on the ring network.

[0029] In one implementation, the method also includes: the first node updates a third table entry based on the first fault information, the third table entry including a correspondence between the first address, the second port, and the second state identifier, the second state identifier being used to indicate the path state from the second port of the first node to the fourth node on the ring network, and when the first state identifier indicates that the path state is available, the second state identifier indicates that the path is unavailable, and when the first state identifier indicates that the path state is unavailable, the second state identifier indicates that the path is available.

[0030] According to a third aspect, a communication method is provided, which is applied to a first node on a ring network, wherein the second node and the third node are adjacent nodes of the first node on the ring network, the first node is connected to the second node via a first port, and the first node is connected to the third node via a second port, and the method comprises: the first node receives a data packet with a destination address as a first address; the first node determines a first table entry based on the first address, the first table entry including a correspondence between the first address, the first port and a transmission distance L2; after the first node determines that the path status between the first node and the fourth node outside the transmission distance L2 on the ring network is available, the first node forwards the data packet through the first port according to the first table entry.

[0031] In one implementation, after the first node determines that the path state between the first node and the fourth node outside the transmission distance L2 on the ring network is available, the first node forwards the data packet through the first port according to the first table entry, including: the first node determines the second table entry based on the first port and the transmission distance L2 included in the first table entry; the second table entry includes a correspondence between the first port, the transmission distance L2 and the first state identifier, and the first state identifier is used to indicate the path state between the first port of the first node and the fourth node outside the transmission distance L2 on the ring network; after the first node determines that the first state identifier indicates that the path state is available according to the second table entry, the data packet is forwarded through the first port according to the first table entry.

[0032] In one implementation, the method also includes: the first node determines a third table entry based on the first address, the third table entry includes a correspondence between the first address, the second port and the second state identifier, the second state identifier is used to indicate the path state from the second port of the first node to the fourth node on the ring network, when the first state identifier indicates that the path state is available, the second state identifier indicates that the path is unavailable, when the first state identifier indicates that the path state is unavailable, the second state identifier indicates that the path is available; after the first node determines that the second state identifier indicates that the path state is available based on the third table entry, the first node forwards the data packet through the second port based on the third table entry.

[0033] In a fourth aspect, a communication device is provided, which is applied to a first node in a ring network, where a second node and a third node are adjacent nodes of the first node on the ring network, the first node is connected to the second node via a first port, and the first node is connected to the third node via a second port, and the communication device includes: a receiving unit, used to receive first notification information through the first port, the first notification information including a first address of an end-side device and a transmission distance L1; the transmission distance L1 is used to indicate a transmission distance on the ring network passed between the second node and the fourth node, and the fourth node is an access node of the end-side device on the ring network; a sending unit, used to send second notification information to the third node through the second port, the second notification information including a first address and a transmission distance L2, and the transmission distance L2 is used to indicate a transmission distance on the ring network passed between the first node and the fourth node.

[0034] In one implementation, the communication device further includes: a processing unit, configured to establish a first table entry according to the first notification information, wherein the first table entry includes a correspondence between the first address, the first port, and the transmission distance L2.

[0035] In one implementation, the processing unit is further used to establish a second table entry, which includes a correspondence between the first port, the transmission distance L2 and the first state identifier, and the first state identifier is used to indicate the path state from the first port of the first node to the fourth node on the ring network.

[0036] In one implementation, the receiving unit is further used to receive a data message with a destination address as the first address; the processing unit is further used to forward the data message through the first port according to the first table entry after determining that the first state identifier in the second table entry indicates that the path state is available.

[0037] In one implementation, the receiving unit is further used to receive first fault information through the first port, the first fault information including a transmission distance L3, and the transmission distance L3 is used to indicate the transmission distance of the ring network from the first node to the faulty link; the processing unit is further used to search, based on the first fault information, for a second table entry that includes the first port and includes a transmission distance L2 that is greater than the transmission distance L3, and to update a first state identifier in the second table entry so that the first state identifier indicates that the path state is unavailable.

[0038] In one implementation, the sending unit is further used to send second fault information through the second port, where the second fault information includes a transmission distance L4, and the transmission distance L4 is used to indicate a transmission distance from the third node to the faulty link through the ring network.

[0039] In one implementation, the receiving unit is further used to receive first fault recovery information through the first port, the first fault recovery information includes a transmission distance L3, and the transmission distance L3 is used to indicate the transmission distance from the first node to the fault recovery link on the ring network; the sending unit is further used to send second fault recovery information through the second port, the second fault recovery information includes a transmission distance L4, and the transmission distance L4 is used to indicate the transmission distance from the third node to the fault recovery link on the ring network.

[0040] In one implementation, the receiving unit is further used to receive first confirmation information from the node where the ring protection link is located, and the first confirmation information is used to indicate that the ring protection link has been restored to a blocked state; the processing unit is further used to update the forwarding table entry recorded in the first node according to the first confirmation information.

[0041] In one implementation, the first confirmation information includes the transmission distance L3, which is used to indicate the transmission distance from the first node to the fault repair link on the ring network; the sending unit is also used to send the second confirmation information to the downstream node, and the second confirmation information is used to indicate that the ring protection link has been restored to a blocked state, and the first confirmation information includes the transmission distance from the downstream node to the fault repair link on the ring network.

[0042] In one implementation, the processing unit is further used to establish a third table entry based on the first notification information, the third table entry including a correspondence between the first address, the second port, and the second state identifier, the second state identifier being used to indicate the path state from the second port of the first node to the fourth node on the ring network, and when the first state identifier indicates that the path state is available, the second state identifier indicates that the path is unavailable, and when the first state identifier indicates that the path state is unavailable, the second state identifier indicates that the path is available.

[0043] In a fifth aspect, a communication device is provided, which is applied to a first node in a ring network, where a second node and a third node are adjacent nodes of the first node on the ring network, the first node is connected to the second node via a first port, and the first node is connected to the third node via a second port, and the communication device includes: a receiving unit, used to receive first fault information via the first port, the first fault information including a transmission distance L3, and the transmission distance L3 is used to indicate the transmission distance of the ring network from the first node to the faulty link; a processing unit, used to search for a second table entry containing the first port and containing a transmission distance greater than the transmission distance L3 according to the first fault information; the second table entry includes a correspondence between the first port, the transmission distance L2 and a first state identifier, and the first state identifier is used to indicate the path state on the ring network from the first port of the first node to the fourth node outside the transmission distance L2; the processing unit is also used to update the first state identifier in the second table entry so that the first state identifier indicates that the path state is unavailable.

[0044] In one implementation, the communication device further includes: a sending unit, configured to send second fault information through a second port, wherein the second fault information includes a transmission distance L4, and the transmission distance L4 is used to indicate a transmission distance of the ring network from the third node to the faulty link.

[0045] In one implementation, the receiving unit is further used to receive first fault recovery information through the first port, the first fault recovery information includes a transmission distance L3, and the transmission distance L3 is used to indicate the transmission distance from the first node to the fault recovery link on the ring network; the sending unit is further used to send second fault recovery information through the second port, the second fault recovery information includes a transmission distance L4, and the transmission distance L4 is used to indicate the transmission distance from the third node to the fault recovery link on the ring network.

[0046] In one implementation, the receiving unit is further used to receive first confirmation information from the node where the ring protection link is located, and the first confirmation information is used to indicate that the ring protection link has been restored to a blocked state; the processing unit is further used to update the forwarding table entry recorded in the first node according to the first confirmation information.

[0047] In one implementation, the first confirmation information includes the transmission distance L3, which is used to indicate the transmission distance from the first node to the fault repair link on the ring network; the sending unit is also used to send the second confirmation information to the downstream node, and the second confirmation information is used to indicate that the ring protection link has been restored to a blocked state, and the first confirmation information includes the transmission distance from the downstream node to the fault repair link on the ring network.

[0048] In one implementation, the processing unit is further used to update a third table entry based on the first fault information, the third table entry including a correspondence between the first address, the second port, and the second state identifier, the second state identifier being used to indicate the path status from the second port of the first node to the fourth node on the ring network, and when the first state identifier indicates that the path status is available, the second state identifier indicates that the path is unavailable, and when the first state identifier indicates that the path status is unavailable, the second state identifier indicates that the path is available.

[0049] In a sixth aspect, a communication device is provided, which is applied to a first node in a ring network, wherein the second node and the third node are adjacent nodes of the first node on the ring network, the first node is connected to the second node via a first port, and the first node is connected to the third node via a second port, and the communication device includes: a receiving unit, for receiving a data message with a destination address as a first address; a processing unit, for determining a first table entry based on the first address, the first table entry including a correspondence between the first address, the first port and a transmission distance L2; the processing unit is also used to forward the data message through the first port according to the first table entry after determining that the path status between the first node and the fourth node outside the transmission distance L2 on the ring network is available.

[0050] In one implementation, the processing unit is also used to forward the data packet through the first port according to the first table entry after determining that the path state between the first node and the fourth node outside the transmission distance L2 on the ring network is available, including: the processing unit is also used to determine the second table entry based on the first port and the transmission distance L2 included in the first table entry; the second table entry includes the correspondence between the first port, the transmission distance L2 and the first state identifier, and the first state identifier is used to indicate the path state between the first port of the first node and the fourth node outside the transmission distance L2 on the ring network; the processing unit is also used to forward the data packet through the first port according to the first table entry after determining that the first state identifier indicates that the path state is available according to the second table entry.

[0051] In one implementation, the processing unit is further used to determine a third table entry based on the first address, the third table entry including a correspondence between the first address, the second port, and a second state identifier, the second state identifier being used to indicate the path state from the second port of the first node to the fourth node on the ring network, and when the first state identifier indicates that the path state is available, the second state identifier indicates that the path is unavailable, and when the first state identifier indicates that the path state is unavailable, the second state identifier indicates that the path is available; the processing unit is further used to determine, based on the third table entry, that the second state identifier indicates that the path state is available, and then forward the data packet through the second port based on the third table entry.

[0052] In the seventh aspect, an information processing device is provided, comprising a memory and a processor, the memory being used to store computer instructions, and the processor being used to call and execute computer instructions from the memory to implement a method as in the first aspect or any one of the first aspects, or to implement a method as in the second aspect or any one of the second aspects, or to implement a method as in the third aspect or any one of the third aspects.

[0053] In an eighth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed on a processor, the method as in the first aspect or any one of the first aspects is implemented, or the method as in the second aspect or any one of the second aspects is implemented, or the method as in the third aspect or any one of the third aspects is implemented.

[0054] In the ninth aspect, a computer program product is provided, the computer program product comprising instructions, which, when executed on a processor, implement a method as in the first aspect or any one of the first aspects, or implement a method as in the second aspect or any one of the second aspects, or implement a method as in the third aspect or any one of the third aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 One of the structural diagrams of a transmission network provided in an embodiment of the present application;

[0056] Figure 2 A second structural diagram of a transmission network provided in an embodiment of the present application;

[0057] Figure 3 A third structural diagram of a transmission network provided in an embodiment of the present application;

[0058] Figure 4 A fourth structural diagram of a transmission network provided in an embodiment of the present application;

[0059] Figure 5 One of the structural schematic diagrams of a forwarding table entry provided in an embodiment of the present application;

[0060] Figure 6 A second structural diagram of a forwarding table entry provided in an embodiment of the present application;

[0061] Figure 7 A third structural diagram of a forwarding table entry provided in an embodiment of the present application;

[0062] Figure 8 A fourth structural diagram of a forwarding table entry provided in an embodiment of the present application;

[0063] Fig. 9 One of the flow charts of a communication method provided in an embodiment of the present application;

[0064] Fig.10 One of the structural schematic diagrams of a notification information provided in an embodiment of the present application;

[0065] Fig.11 A second structural diagram of a notification information provided in an embodiment of the present application;

[0066] Fig. 12A A fifth structural diagram of a forwarding table entry provided in an embodiment of the present application;

[0067] Fig. 12B A sixth structural diagram of a forwarding table entry provided in an embodiment of the present application;

[0068] Fig. 12C A seventh structural diagram of a forwarding table entry provided in an embodiment of the present application;

[0069] Fig.12D An eighth structural diagram of a forwarding table entry provided in an embodiment of the present application;

[0070] Fig.12E A ninth structural diagram of a forwarding table entry provided in an embodiment of the present application;

[0071] Fig.12F A tenth structural diagram of a forwarding table entry provided in an embodiment of the present application;

[0072] Fig.13 A second flow chart of a communication method provided in an embodiment of the present application;

[0073] Fig.14A An eleventh structural diagram of a forwarding table entry provided in an embodiment of the present application;

[0074] Fig. 14B A twelfth structural diagram of a forwarding table entry provided in an embodiment of the present application;

[0075] Fig. 14CA thirteenth structural diagram of a forwarding table entry provided in an embodiment of the present application;

[0076] Fig.14D A structural diagram of a forwarding table entry provided in an embodiment of the present application is shown in FIG14;

[0077] Fig.14E A structural diagram of a forwarding table entry provided in an embodiment of the present application is shown in FIG15;

[0078] Fig.14F A structural diagram of a forwarding table entry provided in an embodiment of the present application is shown in FIG16 ;

[0079] Fig.15 A third flow chart of a communication method provided in an embodiment of the present application;

[0080] Fig.16 One of the structural schematic diagrams of a communication device provided in an embodiment of the present application;

[0081] Fig.17 A second structural diagram of a communication device provided in an embodiment of the present application;

[0082] Fig.18 The third structural diagram of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0083] The technical solution in the present embodiment will be described below in conjunction with the accompanying drawings in the present embodiment. Among them, in order to facilitate the clear description of the technical solution of the present embodiment, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. It can be understood by those skilled in the art that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit the difference. At the same time, in the present embodiment, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present embodiment should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for easy understanding.

[0084] To facilitate understanding of the technical solution provided by this embodiment, the relevant technologies involved in this embodiment are first introduced:

[0085] At present, ring networks are often used in industrial networks and other fields due to their inherent redundancy. When a link failure occurs in a ring network, the transmission path can be switched by ring network protection switching to ensure the normal transmission of service messages.

[0086] For example, in Figure 1 The transmission network 10 shown includes a ring network consisting of a node 111, a node 112, a node 113, a node 114, a node 115, and a node 116. In addition, in the transmission network 10, the end-side device can access the network through the transmission nodes on the ring network. Figure 1 The middle-end devices 121 to the end-end devices 126 are respectively connected to the nodes 111 to 116 to access the network, wherein the addresses of the end-end devices 121 to 126 are respectively represented as MAC1, MAC2, ..., MAC6.

[0087] Among them, for the convenience of description, in the embodiment of the present application, the ports between the transmission nodes on the ring network are referred to as net ports, and the ports of the transmission nodes on the ring network connected to the end-side devices are referred to as device ports (referred to as dev ports). For example, the ports on the node 112 that connect the nodes 111 and 113 are respectively referred to as the "net2-1" port and the "net2-2" port, and the port on the node 112 that connects the end-side device 122 is referred to as the "dev2" port. The ports of other transmission nodes are similar, and are not described in detail here.

[0088] In order to avoid path conflicts, a link may be included in the ring network, and the ports on both sides of the link may switch between two states of blocking / unlocking (hereinafter, for ease of description, the link is referred to as a "standby link". In practical applications, the link may also be referred to as other names, which are not limited in the embodiments of the present application). The standby link may be destroyed in accordance with related technologies such as the spanning tree protocol (Spanning Tree Protocol, STP) or Ethernet ring protection switching (Ethernet Ring Protection Switching, ERPS).

[0089] For example, Figure 1 The link between the net1-1 port on the node 111 and the net6-2 port on the node 116 on the medium ring network is a standby link. The net1-1 port and the net6-2 port can be switched between block / unlock states.

[0090] When ERPS is used for ring networking, the net1-1 port on the node 111 and the net6-2 on the node 116 can be called RPL owner port and RPL neighbor port respectively. When STP is used for ring networking, the net1-1 port on the node 111 and the net6-2 on the node 116 can be called congestion backup ports.

[0091] Specifically, when there is no link failure in the ring network, the device ports at both ends of the backup link are block ports, for example Figure 1 The net1-1 port on the middle node 111 and the net6-2 port on the node 116 are block ports so that data packets can be forwarded in one direction to avoid path conflicts. When a link failure occurs in the ring network, the device ports at both ends of the backup link are unblocked ports. Figure 2 The net1-1 port on the intermediate node 111 and the net6-2 port on the node 116 are unblocked ports, so that data packets can be forwarded through the backup link.

[0092] Take the case where the end-side device 121 sends a data message to the end-side device 124 as an example: when there is no link failure in the ring network, the ports on both sides of the standby link are block ports, such as Figure 1 As shown, the data message sent by the end-side device 121 can be forwarded to the end-side device 124 through the transmission path: node 111-node 112-node 113-node 114-end-side device 124. In the case of a link failure in the ring network, Figure 2 Taking the link failure between node 113 and node 114 as an example, the ports on both sides of the backup link are unblocked ports, and the data message sent by the end-side device 121 can be forwarded to the end-side device 124 through the transmission path: node 111-node 116-node 115-node 114-end-side device 124.

[0093] In order to achieve normal switching of transmission paths in a ring network, the ring protection switching in the related art mainly involves three processes: fault detection, fault diffusion and path switching. Specifically, in the fault detection process, the transmission nodes on the ring network can detect link failures through OAM technology and other methods. In the fault diffusion process, the transmission node that detects the link failure can notify the other transmission nodes of the fault information. For example, Figure 3 In the embodiment, after node 113 and node 114 detect the link failure through OAM technology, they can send the fault information to other transmission nodes in the ring network through the signal fail (SF) message in the ring auto protection switching (RAPS) protocol. During the path switching process, the transmission node that receives the fault information can change the forwarding port of the data message by updating (flushing) the local forwarding table entry to avoid the faulty link. In addition, after receiving the fault information, the transmission nodes at both ends of the standby link will also switch the ports on both sides of the standby link to the unblocked ports so as to use the standby link for data message transmission.

[0094] Wherein, in the related art, on the one hand, each transmission node, after receiving the fault information, owing to being unable to determine which forwarding table items will be affected by the fault, therefore usually needs to update the forwarding table items corresponding to all end-side devices.Take the link failure between node 113 and node 114 as an example, after receiving the fault information, node 111, owing to being unable to determine which forwarding table items will be affected by the fault, therefore can update the forwarding table items with destination address MAC1 to MAC6 in the forwarding table items of local record.Similarly node 112-node 116 also needs to update the forwarding table items with destination address MAC1 to MAC6 in the forwarding table items of local record.This just causes the convergence speed of ring network protection switching to be slower.On the other hand, each transmission node, in the process of updating the forwarding table items, also can produce a large amount of broadcast traffic, therefore also can increase the equipment overhead of each transmission node, thereby affects the transmission performance.

[0095] In view of the above problems, the embodiments of the present application take into account that when a link failure occurs in a ring network, the communication between some nodes will not be affected by the link failure. For example, Figure 2 When a link failure occurs between node 113 and node 114, the communication between end-side device 122 and end-side device 123, the communication between end-side device 122 and end-side device 121, etc., may not be affected. However, in the ring protection switching process of the related art, since each transmission node in the ring network cannot determine which nodes' communication will be affected by the failure, it is necessary to update the forwarding table entries corresponding to each end-side device in the locally recorded forwarding table entries.

[0096] Furthermore, in the embodiments of the present application, it is considered that: if each transmission node on the ring network can determine the transmission distance on the ring network in the transmission path from the node to each end-side device, then when a link failure occurs on the ring network: on the one hand, the transmission node can determine whether the transmission path from the node to each end-side device is affected by the link failure based on the above transmission distance. For the affected transmission path, the data message can be forwarded from the net port on the other side by updating the forwarding table entry; for the transmission path that is not affected, there is no need to update the forwarding table entry. On the other hand, for the forwarding table entry that needs to be updated, since the update of the forwarding table entry is caused by the link failure on the ring network, the forwarding table entry can be directly updated to forward the data message from the net port on the other side of the ring network, so that the switching of the transmission path can be completed without sending broadcast traffic.

[0097] by Figure 4 For example, the middle-end device 122 sends data packets to the end-end device 123 and the end-end device 124 respectively:

[0098] On the one hand, in the case of no link failure in the ring network, e.g. Figure 4 As shown in (a), the forwarding table entries in node 112 may include: (MAC3, net2-2) and (MAC4, net2-2), which are respectively used to indicate that when a data packet with a destination address of MAC3 (i.e., the address of the end-side device 123) or MAC4 (i.e., the address of the end-side device 124) is received, it is forwarded through net2-2.

[0099] On the other hand, if node 112 (i.e., the access node of the end-side device 122) can also determine the transmission distance on the transmission path from node 112 to MAC3 through the ring network (for example, the number of node hops can be used to represent the transmission distance on the ring network, then the transmission distance on the transmission path from node 112 to MAC3 through the ring network can be expressed as: 1 hop), as well as the transmission distance on the transmission path from this node to MAC4 through the ring network (2 hops).

[0100] Furthermore, in the event of a link failure between node 113 and node 114, after node 112 receives the fault information from the net2-2 port (where the fault information may include the transmission distance from the faulty link to node 112, i.e., 2 hops), by comparing the transmission distances, it can be determined that the transmission path from node 112 to MAC3 is not affected, while the transmission path from node 112 to MAC4 is affected.

[0101] Furthermore, if Figure 4 As shown in (b), node 112 determines that the forwarding table entry (MAC3, net2-2) does not need to be updated. In addition, node 112 determines that the forwarding table entry (MAC4, net2-2) needs to be updated, so that the updated forwarding table entry indicates that the data message with the destination address of MAC4 is forwarded through the net2-1 port. Figure 4 In (b), the updated forwarding table entry is exemplarily represented as (MAC4, net2-1).

[0102] It can be seen that, through the technical solution provided by the embodiment of the present application, on the one hand, it is not necessary to update all the forwarding table entries, and on the other hand, the updating of the forwarding table entries can be completed without generating broadcast traffic.

[0103] The technical solution provided in the embodiments of the present application is introduced below with reference to examples.

[0104] In one application, in an embodiment of the present application, a corresponding field can be added to the forwarding table entry to record the transmission distance on the ring network in the transmission path from the transmission node to each end-side device, so that by reading the forwarding table entry, the transmission distance on the ring network in the transmission path from the transmission node to each end-side device can be determined.

[0105] like Figure 5 FIG. 1 is a schematic diagram of a structure of a forwarding table provided in an embodiment of the present application. Figure 5 The forwarding table entry shown in (a) includes a first field for recording the access address of the end-side device, a second field for recording the port, and a third field for recording the transmission distance required to pass through the ring network. Figure 5 The contents of the first field and the second field in the forwarding table entry shown in (a) may refer to the contents of the Mac-port table entry used in layer 2 forwarding.

[0106] In this way, after the transmission node finds the forwarding table entry according to the access address of the end-side device, it can determine the port used for forwarding and the transmission distance that needs to be passed through the ring network on the transmission path according to the second field and the third field in the forwarding table entry.

[0107] In addition, the transmission node can also store Figure 5 The forwarding table entry shown in (b) includes a first field for recording the port, a second field for recording the transmission distance, and a third field for recording the status identifier. The status identifier is used to indicate the path status between the current node and the transmission node outside the above transmission distance on the ring network. In this way, after the transmission node finds the forwarding table entry according to the port and the transmission distance, it can determine the path status between the current node and the transmission node outside the above transmission distance on the ring network according to the third field in the forwarding table entry.

[0108] For example, in the case where there is no link failure in the ring network, the forwarding table entry recorded in the node 112 may include Figure 5 The forwarding table entry shown in (c) of . In actual applications, on the one hand, node 112 can find table entry 1 according to MAC4, and then node 112 can determine that when forwarding a data message with a destination address of MAC4 through the net2-2 port, the distance through the ring network is 2 hops. On the other hand, node 112 can find table entry 2 according to the net2-2 port and 2 hops, and then node 112 can determine whether the path status from the net2-2 port to the transmission node 2 hops away (i.e., node 124) on the ring network is available. After the status identifier in table entry 2 indicates that the path status is available, node 112 can forward the data message with a destination address of MAC4 through the net2-2 port.

[0109] For another example, when a link failure occurs between node 113 and node 114 in a ring network, after receiving the fault information from node 113, node 112 can determine that the transmission path from port net2-2 through 2 hops in the ring network is unavailable based on the transmission distance information carried in the fault information. Figure 5 As shown in (b), the node 112 updates the status flag in the table entry 2 to indicate that the path is unavailable. In this way, the node 112 will not forward the data message with the destination address of MAC4 through the net2-2 port.

[0110] In one implementation, the information of the above-mentioned entry 1 and entry 2 may also be recorded in one forwarding entry. Figure 6 As shown, it is a schematic diagram of the structure of another forwarding table item provided in an embodiment of the present application. Among them, the forwarding table item includes a first field for recording the access address of the end-side device, a second field for recording the port, a third field for recording the transmission distance, and a fourth field for recording the status identifier. In addition, the forwarding table item may also include fields for recording other information, such as a fifth field for recording a virtual local area network (Vlan), which may not be limited in the embodiment of the present application. Among them, Figure 6 The contents of the first to fourth fields in the forwarding table shown in the figure can refer to the above Figure 5 Description of the corresponding fields in (a) and (b).

[0111] In this way, node 112 finds Figure 6 After the forwarding table entries are shown, on the one hand, the forwarding port and the transmission distance on the ring network that needs to be passed on the transmission path can be determined, and on the other hand, the corresponding path status can be determined so that after determining that the path is available, the data message can be sent through Figure 6 The port in the forwarding table entry shown is forwarded.

[0112] In another implementation, considering that the transmission node on the ring network includes two net ports, the forwarding table entry recorded in the transmission node may include forwarding information when forwarding messages from the two net ports to the end-side device respectively, as shown in FIG. Figure 7 As shown. Figure 7 The forwarding table entry shown includes a first field for recording the access address. Figure 7 The second to fourth fields are respectively used to record the port A used when forwarding messages from port A, the transmission distance that needs to be passed on the ring network, and the first state identifier, wherein the first state identifier is used to indicate the path status from port A to the transmission node outside the above-mentioned transmission distance on the ring network. Figure 7The fifth to eighth fields are used to record the port B used when forwarding the message from port B, the transmission distance on the ring network, and the second state identifier, where the second state identifier is used to indicate the path status from port B to the transmission node outside the above transmission distance on the ring network. Port A and port B are two net ports on a transmission node.

[0113] In addition, since the ring network includes backup links, Figure 7 The first state identifier and the second state identifier recorded in the fourth field and the eighth field may include three states: the first state identifier indicates that the transmission path is available (hereinafter referred to as "active"), that is, the transmission path from the net port to the access node of the end-side device on the ring network is available; the second state identifier indicates that there is a link failure on the transmission path (hereinafter referred to as "down"), that is, there is a failure in the transmission path from the net port to the access node of the end-side device on the ring network; the third state identifier indicates that the transmission path is a backup path through a backup link (hereinafter referred to as "slave"), that is, the backup link will be passed from the net port to the access node of the end-side device on the ring network. Specifically, when the state identifier of the main path is active, the state identifier of the backup path is slave; when the state identifier of the main path is down, since the ports on both sides of the backup link will be switched to unblock at this time, the state identifier of the backup path is switched to active, so as to forward the message through the backup path. Among them, when the state indicates down and slave, the path is unavailable.

[0114] by Figure 4 Take the forwarding table entry of the message forwarded from node 112 to MAC4 as an example:

[0115] In the case where there is no link failure in the ring network, the forwarding table entry recorded in node 112 is as follows: Figure 8 (b) is shown. According to the forwarding table entry, it can be determined that: the transmission distance from the net2-2 port of node 112 to MAC4 on the ring network is 2 (i.e., 2 hops are required in the ring network), and the path status is available; the transmission distance from the net2-1 port of node 112 to MAC4 on the ring network is unknown (indicated by "∞" in the figure, and in actual applications, this field can also be filled with negative values, etc., to indicate that the transmission distance is unknown), and the path status is slave, that is, the transmission path needs to pass through the backup link. At this time, node 112 forwards the data message with the destination address of MAC4 through the net2-2 port according to the forwarding table entry.

[0116] In addition, in the case where there is a link failure between node 113 and node 114 in the ring network, the forwarding table entry recorded in node 112 is as follows: Figure 8 (b) is shown. According to the forwarding table entry, it can be determined that: the transmission distance from the net2-2 port of node 112 to MAC4 on the ring network is 2 (i.e., it needs to transmit 2 hops in the ring network), and the path status is unavailable; the transmission distance from the net2-1 port of node 112 to MAC4 on the ring network is unknown, and the path status is available (at this time, the ports on both sides of the standby link are unblocked ports). At this time, node 112 forwards the data message with the destination address of MAC4 through the net2-1 port according to the forwarding table entry.

[0117] It is understandable that the above Figure 8 In the example, the transmission distance from the net2-1 port of the node 112 to MAC4 is unknown because when the ports on both sides of the backup link are unblocked ports, the message cannot be forwarded through the backup link, so the transmission distance from the net2-1 port of the node 112 to MAC4 cannot be determined. In actual application, when the ports on both sides of the backup link are switched to unblocked ports, the transmission distance from the net2-1 port of the node 112 to MAC4 in the forwarding table entry can be updated, and this is not limited in the embodiments of the present application.

[0118] The communication method provided in the embodiment of the present application is introduced below in conjunction with the operation process of each transmission node in the ring network.

[0119] First, taking the process of determining the transmission distance required from the node 111 to the node 116 in the above transmission network 10 to the end-side node 124 on the ring network as an example, the operation process of each transmission node in the ring network is introduced. Specifically, Fig. 9 As shown, the method includes:

[0120] S200. Each transmission node learns the access address (MAC4) of the end-side device 124 respectively.

[0121] For example, after the end-side device 124 establishes a connection with the node 114 through the dev4 port, the node 114 can learn the access address MAC4 of the end-side device 124 and establish a forwarding table entry including MAC4 and the dev4 port. Then, other transmission nodes learn the access address MAC4 of the end-side device 124 through interaction with the node 114. Specifically, the process of nodes 111-116 learning the access address of the end-side device 124 can refer to the description of the relevant technology, which will not be repeated here.

[0122] S201. Node 114 sends notification information a to node 113 through port net4-1.

[0123] The notification information a includes MAC4 and a transmission distance. The transmission distance is used to indicate the transmission distance from the node 114 to the access node of the end-side device 124 through the ring network. Specifically, since the node 114 is the access node of the end-side device 124, the transmission distance in the notification information a is 0.

[0124] In one implementation, the node hop count on the ring network may be used to represent the transmission distance on the ring network. Therefore, the notification information a may include the hop count 0.

[0125] In actual application, the notification information carrying the access address and the transmission distance can be carried in an Ethernet frame for forwarding.

[0126] For example, Fig.10 As shown, it is a schematic diagram of the structure of an Ethernet frame provided in an embodiment of the present application. The Ethernet frame includes a destination address field for indicating a receiving device, a source address field for indicating a sending device, a Vlan field for indicating the Vlan transmitted by the Ethernet frame, a type field for indicating the type of the Ethernet frame, a length field for indicating the length of the Ethernet frame, a data field for carrying data, and a frame check sequence (FCS) field for checking.

[0127] The data field may include multiple protocol data units (PDUs), such as PDU1, PDU2, etc. Specifically, the notification information a may be carried in a PDU of an Ethernet frame.

[0128] The Ethernet frame can be forwarded only on the net port on the ring network. Each time it is forwarded, the transmission distance in the notification information carried in the PDU1 of the Ethernet frame is increased by 1 (used to indicate that the transmission distance increases by 1 hop). For example, the transmission distance in the notification information a in the Ethernet frame sent by node 114 to node 113 through the net4-1 port is 0 (indicating that node 114 is the access node of the end-side device 124). After receiving the Ethernet frame, node 113 increases the transmission distance in the notification information carried in PDU1 in the Ethernet frame by 1, and sends it to node 112 through net3-1. And so on, thereby realizing the transmission of notification information between transmission nodes. Among them, the processing process of each transmission node after node 113 receives the Ethernet frame will be introduced separately below.

[0129] In one implementation, a Link Layer Discovery Protocol (LLDP) message, ie, an Ethernet frame of type 0x88CC, may be used to carry the above notification information.

[0130] Specifically, Fig.11 As shown, in the LLDP data unit (LLDP data unit, LLDPDU) of the LLDP message, multiple type+data length+value (type+length+value, TLV) fields may be included. Among them, Chassis ID TLV (chassis identification TLV), Port ID TLV (port identification TLV), Time To Live TLV (lifetime TLV) and EndOf LLDPDU TLV (end TLV) are mandatory (i.e., the part that must be included). In addition, 0 to multiple optional other TLVs may be included between Time To Live TLV and End Of LLDPDU TLV.

[0131] Specifically, the definition of the TLV type field is shown in Table 1 below:

[0132] Table 1

[0133]

[0134]

[0135] In a possible design, one or more TLV types may be selected from TLV type=9-126 (ie, Reserved type) to define the type used to carry the notification information in the embodiments of the present application.

[0136] When the notification information is carried in an LLDP message, the LLDP message can be forwarded only on the net port on the ring network. Each time the message is forwarded, the transmission distance in the notification information carried in the LLDP message increases by 1 (used to indicate that the transmission distance increases by 1 hop).

[0137] S202. After receiving the notification information a through the net3-2 port, the node 113 establishes a forwarding table entry according to the notification information a.

[0138] Among them, the forwarding table entry includes the correspondence a of MAC4, net3-2 and hop number 1 (used to indicate that there is 1 hop from the net3-2 port of node 113 to node 114 on the ring network), as well as net3-2, hop number 1 and status flag active (used to indicate that the path status from node 113 to node 114 on the ring network is available).

[0139] In addition, considering that at this time, since the node 111 and the node 116 are in a blocked state, the node 113 is usually unable to receive the notification information including MAC4 from net3-1. Therefore, the forwarding table entry established by the node 113 may also include: a corresponding relationship x1 including MAC4, net3-1, hop count ∞ (used to indicate that the transmission distance from the net3-1 port of the node 113 to the node 114 through the ring network is unknown) and a state identifier slave (used to indicate that the transmission path from the net3-1 port of the node 113 to the node 114 is in a standby state).

[0140] It is understandable that, in actual applications, the node 113 may also record the above correspondence relationship a, the correspondence relationship b and the correspondence relationship x1 in three independent forwarding table entries respectively. The number of forwarding table entries is not limited in the embodiment of the present application.

[0141] In addition, the specific form of the forwarding table entry established by node 113 can refer to the above description of Figure 5-Figure 8 The corresponding descriptions of the forwarding table entries are shown, and the repeated parts are not repeated here.

[0142] S203. Node 113 sends notification information b to node 112 through net3-1.

[0143] The notification information b includes MAC4 and transmission distance. The transmission distance is used to indicate the transmission distance from the node 113 to the access node (node ​​114) of the terminal device 124 through the ring network. Specifically, the notification information c may include hop number 1.

[0144] Similar to the notification information a, the notification information b can be carried in an LLDP message or other Ethernet frame for transmission.

[0145] In addition, it can be understood that the transmission distance carried in the notification information sent by node 113 to node 112 in the above example is 1 hop, and in actual applications, the form of the transmission distance carried in the notification information can be determined according to actual needs. For example, the transmission distance carried in the notification information sent by node 113 to node 112 (for distinction, the notification information can be called notification information b1) can also be 2 hops, which is used to indicate that the net2-2 port of node 112 to node 114 passes through 2 hops on the ring network. Since each transmission node in the ring network has at most two net ports, after the adjacent node determines the number of node hops from the node to other nodes in the ring network, it can easily determine the number of node hops from the adjacent node to the above other nodes. Therefore, according to the "2 hops" carried in the above notification information b1, it can also be determined that the net3-2 port from node 113 to node 114 has passed through 1 hop on the ring network, that is, the "2 hops" carried in the above notification information b1 can also be used to indicate the transmission distance on the ring network from the net3-2 port from node 113 to node 114. In the following, the transmission distance in the notification information sent between other nodes can also be understood as above, and the repetitions will not be repeated below.

[0146] S204 , after receiving the notification information b through the net2 - 2 port, the node 112 establishes a forwarding table entry according to the notification information b.

[0147] Among them, the forwarding table entry includes the correspondence c of MAC4, net2-2 and hop number 2 (used to indicate that there are 2 hops from the net2-2 port of node 112 to node 114 on the ring network), as well as net2-2, hop number 2 and status flag active (used to indicate that the path status from node 112 to node 114 on the ring network is available).

[0148] In addition, similar to S202, the forwarding table entry established by node 112 may also include: a corresponding relationship x2 including MAC4, net2-1, hop count ∞ (used to indicate that the transmission distance from the net2-1 port of node 112 to node 114 through the ring network is unknown) and a state identifier slave (used to indicate that the transmission path from the net2-1 port of node 112 to node 114 is in a standby state).

[0149] It is understandable that, in actual applications, the node 112 may also record the above-mentioned correspondence c, correspondence d and correspondence x2 in three independent forwarding table entries respectively. The number of forwarding table entries is not limited in the embodiment of the present application.

[0150] In addition, the specific form of the forwarding table entry established by node 112 can refer to the above description of Figure 5-Figure 8The corresponding descriptions of the forwarding table entries are shown, and the repeated parts are not repeated here.

[0151] S205 , the node 112 sends notification information c to the node 111 through the net2 - 1 .

[0152] The notification information c includes MAC4 and a transmission distance. The transmission distance is used to indicate the transmission distance from the node 112 to the access node (node ​​114) of the terminal device 124 through the ring network. Specifically, the notification information c may include a hop count of 2.

[0153] For the specific implementation process of S205, reference may be made to the corresponding contents of S201 and S203 above, and the repeated parts will not be repeated here.

[0154] S206 , after receiving the notification information c through the net1 - 2 port, the node 111 creates a forwarding table entry according to the notification information c.

[0155] Among them, the forwarding table entry includes the correspondence e of MAC4, net1-2 and hop number 3 (used to indicate that there are 3 hops from the net1-2 port of node 111 to node 114 on the ring network), as well as net1-2, hop number 3 and status flag active (used to indicate that the path status from node 111 to node 114 on the ring network is available).

[0156] In addition, the forwarding table entry established by node 111 may also include: a corresponding relationship x3 including MAC4, net1-1, hop count ∞ (used to indicate that the transmission distance from the net1-1 port of node 111 to node 114 through the ring network is unknown) and a state identifier slave (used to indicate that the transmission path from the net1-1 port of node 111 to node 114 is in a standby state).

[0157] For the specific implementation process of S206, reference may be made to the corresponding contents of S202 and S204 above, and the repeated parts will not be repeated here.

[0158] In addition, the node 114 may also send notification information to the node 115 through net4-2. Specifically, the method may also include:

[0159] S207 , node 114 sends notification information d to node 115 through net4 - 2 .

[0160] The notification information d includes MAC4 and a transmission distance. The transmission distance is used to indicate the transmission distance from the node 114 to the access node (node ​​114) of the terminal device 124 through the ring network. Specifically, the notification information d may include a hop number of 0.

[0161] For the specific implementation process of S207, reference may be made to the corresponding contents of S201 and S203 above, and the repeated parts will not be repeated here.

[0162] S208. After receiving the notification information d through the net5-1 port, the node 115 establishes a forwarding entry according to the notification information d.

[0163] Among them, the forwarding table entry includes the corresponding relationship g of MAC4, net5-1 and hop number 1 (used to indicate that there is 1 hop from the net5-1 port of node 115 to node 114 on the ring network), as well as net5-1, hop number 1 and status flag active (used to indicate that the path status from node 115 to node 114 on the ring network is available).

[0164] In addition, the forwarding table entry established by node 115 may also include: a corresponding relationship x4 including MAC4, net5-2, hop count ∞ (used to indicate that the transmission distance from the net5-2 port of node 115 to node 114 through the ring network is unknown) and a state identifier slave (used to indicate that the transmission path from the net5-2 port of node 115 to node 114 is in a standby state).

[0165] For the specific implementation process of S208, reference may be made to the corresponding contents of S202 and S204 above, and the repeated parts will not be repeated here.

[0166] S209. Node 115 sends notification information e to node 116 via net5-2.

[0167] The notification information e includes MAC4 and transmission distance. The transmission distance is used to indicate the transmission distance from the node 115 to the access node (node ​​114) of the terminal device 124 through the ring network. Specifically, the notification information d may include hop number 1.

[0168] For the specific implementation process of S209, reference may be made to the corresponding contents of S201 and S203 above, and the repeated parts will not be repeated here.

[0169] S210. After receiving the notification information e through the net6-1 port, the node 116 establishes a forwarding table entry according to the notification information e.

[0170] Among them, the forwarding table entry includes the correspondence i between MAC4, net6-1 and hop count 2 (used to indicate that there are 2 hops from the net6-1 port of node 116 to node 114 on the ring network), as well as net6-1, hop count 2 and status flag active (used to indicate that the path status from node 116 to node 114 on the ring network is available).

[0171] In addition, the forwarding table entry established by node 116 may also include: a corresponding relationship x5 including MAC4, net6-2, hop count ∞ (used to indicate that the transmission distance from the net6-2 port of node 116 to node 114 through the ring network is unknown) and a state identifier slave (used to indicate that the transmission path from the net6-2 port of node 116 to node 114 is in a standby state).

[0172] For the specific implementation process of S210, reference may be made to the corresponding contents of S202 and S204 above, and the repeated parts will not be repeated here.

[0173] After the above Fig. 9 The process shown can enable the nodes 111 to 116 in the transmission network 10 to determine the transmission distance required from the node to the end-side node 124 on the ring network and establish corresponding forwarding table entries.

[0174] Similarly, each transmission node in the transmission network 10 can be Fig. 9 The process shown in FIG. 1 determines the transmission distance required from the node to each other end-side node on the ring network, and establishes corresponding forwarding table entries. Taking node 111 as an example, if there is no link failure in the ring network, the forwarding table entries established in node 111 can be as follows: Fig. 12A As shown:

[0175] in, Fig. 12A (a) and (b) are two possible forms of forwarding table entries provided in the embodiments of the present application:

[0176] exist Fig. 12A In (a), the field for recording the state identifier and the field for recording the transmission distance are both recorded in one forwarding table entry. In this way, after the node 111 performs a table lookup according to the access address, it can obtain the transmission distance and state identifier corresponding to the net port in different directions in one forwarding table entry.

[0177] In addition, Fig. 12A In (b), the port, transmission distance and status flag are recorded in another forwarding table entry.

[0178] Similarly, in Fig. 12B , Fig. 12C , Fig.12D , Fig.12E and Fig.12F 2 and 3 respectively show the forwarding table entries established in the node 112, the node 113, the node 114, the node 115 and the node 116.

[0179] The following is an example of the operation of each transmission node when a link failure occurs in a ring network. Fig.13 As shown, the method includes:

[0180] S301. After detecting a link failure, the node 113 updates a forwarding table entry according to the failure information.

[0181] For example, when a link failure occurs between node 114 and node 113, node 114 and node 113 can detect the link failure through OAM and other means to obtain failure information. Node 113 can then update the forwarding table entry recorded in node 113 according to the failure information.

[0182] For example, before updating the forwarding table entry, the forwarding table entry recorded in node 113 is as follows: Fig. 12C After node 113 updates the forwarding table entry according to the fault information, the forwarding table entry recorded in node 113 can be as follows: Fig. 14C As shown. It can be seen that since the link failure occurs on the net3-2 port of node 113, the path status from the net3-2 port of node 113 to MAC4, MAC5 and MAC6 is updated to down. In addition, since the ports on both sides of the backup link are unblocked ports after the link failure occurs, the path status from the net3-1 port of node 113 to MAC4, MAC5 and MAC6 is updated to active. In this way, node 113 can forward messages to MAC4, MAC5 and MAC6 through the net3-1 port according to the updated table items 3-3, 3-4 and 3-4 (or according to the updated table items 3-8, 3-8, 3-10, 3-13, 3-14 and 3-15).

[0183] S302. Node 113 sends fault information to node 112 via net3-1.

[0184] The fault information includes a transmission distance in the ring network from node 112 to the faulty link. When the transmission distance is represented by the number of node hops, the fault information includes a hop number of 1 (i.e., indicating that the node 112 to the faulty link needs to pass through 1 hop in the ring network).

[0185] Similar to the transmission distance carried by the notification information in S203 above, in actual applications, the form of the transmission distance carried in the fault information can be determined according to actual needs. Here, "hop number 1" is used as the transmission distance for illustration. The same understanding can be made for the fault information sent by other nodes below.

[0186] S303. After receiving the fault information through net2-2, node 112 updates the forwarding table entry according to the fault information.

[0187] Specifically, after receiving the fault information from the node 113, the node 112 may search for a forwarding table entry that includes the net2-2 port and includes a transmission distance that is smaller than the transmission distance carried in the fault information, according to the transmission distance carried in the fault information.

[0188] For example, before updating the forwarding table entry, the forwarding table entry recorded in the node 112 is as follows: Fig. 12B After node 112 updates the forwarding table entry according to the fault information, the forwarding table entry recorded in node 112 can be as follows: Fig. 14B As shown. It can be seen that since the link failure occurs on the ring network link that is 1 hop away from the net2-2 port of node 112, the path status from the net2-2 port of node 112 to MAC4, MAC5 and MAC6 is updated to down. In addition, since the ports on both sides of the backup link will switch to unblock ports after the link failure occurs, the path status from the net2-1 port of node 112 to MAC4, MAC5 and MAC6 is updated to active. In this way, node 112 can forward messages to MAC4, MAC5 and MAC6 through the net2-1 port according to the updated table items 2-3, 2-4 and 2-4 (or according to the updated table items 2-8, 2-8, 2-10, 2-13, 2-14 and 2-15).

[0189] S304 , node 112 sends fault information to node 111 through net2 - 1 .

[0190] The fault information includes a transmission distance in the ring network from node 111 to the faulty link. When the transmission distance is represented by the number of node hops, the fault information includes a hop number of 2 (i.e., indicating that the faulty link needs to pass through 2 hops in the ring network from node 111 to the faulty link).

[0191] S305 . After receiving the fault information through net1 - 2 , node 111 updates the forwarding table entry according to the fault information.

[0192] Specifically, after receiving the fault information from the node 112, the node 111 may search for a forwarding table entry that includes the net1-2 port and includes a transmission distance that is smaller than the transmission distance carried in the fault information, according to the transmission distance carried in the fault information.

[0193] For example, before updating the forwarding table entry, the forwarding table entry recorded in the node 111 is as follows: Fig. 12AAfter node 111 updates the forwarding table entry according to the fault information, the forwarding table entry recorded in node 111 can be as follows: Fig.14A As shown. It can be seen that since the link failure occurs on the ring network link that is 2 hops away from the net1-2 port of node 111, the path status from the net1-2 port of node 111 to MAC4, MAC5 and MAC6 is updated to down. In addition, since the ports on both sides of the backup link will switch to unblock ports after the link failure occurs, the path status from the net1-1 port of node 111 to MAC4, MAC5 and MAC6 is updated to active. In this way, node 111 can forward messages to MAC4, MAC5 and MAC6 through the net1-1 port according to the updated table items 1-3, 1-4 and 1-4 (or according to the updated table items 1-8, 1-8, 1-10, 1-13, 1-14 and 1-15).

[0194] Similar to S301, after detecting a faulty link, node 114 will also update the forwarding table entry and send fault information. Therefore, the method further includes:

[0195] S306 , after detecting a link failure, the node 114 updates the forwarding table entry according to the failure information.

[0196] For example, before updating the forwarding table entry, the forwarding table entry recorded in the node 114 is as follows: Fig.12D After node 114 updates the forwarding table entry according to the fault information, the forwarding table entry recorded in node 114 can be as follows: Fig.14D As shown. It can be seen that since the link failure occurs on the net4-1 port of node 114, the path status from the net4-1 port of node 114 to MAC1, MAC2 and MAC3 is updated to down. In addition, since the ports on both sides of the backup link will switch to unblock ports after the link failure occurs, the path status from the net4-2 port of node 114 to MAC1, MAC2 and MAC3 is updated to active. In this way, node 114 can forward messages to MAC1, MAC2 and MAC3 through the net4-2 port according to the updated table items 4-1, 4-2 and 4-3 (or according to the updated table items 4-6, 4-7, 4-8, 4-11, 4-12 and 4-13).

[0197] S307 , node 114 sends fault information to node 115 via net4 - 2 .

[0198] The fault information includes a transmission distance in the ring network from the node 115 to the faulty link. When the transmission distance is represented by the number of node hops, the fault information includes a hop number of 1 (i.e., indicating that the node 115 to the faulty link needs to pass through 1 hop in the ring network).

[0199] S308. After receiving the link failure information through net5-1, node 115 updates the forwarding table entry according to the failure information.

[0200] For example, before updating the forwarding table entry, the forwarding table entry recorded in node 115 is as follows: Fig.12E After node 115 updates the forwarding table entry according to the fault information, the forwarding table entry recorded in node 115 can be as follows: Fig.14E As shown. It can be seen that since the link failure occurs on the link that is 1 hop away from the net5-1 port of node 115, the path status from the net5-1 port of node 115 to MAC1, MAC2, and MAC3 is updated to down. In addition, since the ports on both sides of the backup link will switch to unblock ports after the link failure occurs, the path status from the net5-2 port of node 115 to MAC1, MAC2, and MAC3 is updated to active. In this way, node 115 can forward messages to MAC1, MAC2, and MAC3 through the net5-2 port according to the updated table items 5-1, 5-2, and 5-3 (or according to the updated table items 5-6, 5-7, 5-8, 5-11, 5-12, and 5-13).

[0201] S309. Node 115 sends fault information to node 116 via net5-2.

[0202] The fault information includes a transmission distance in the ring network from node 116 to the faulty link. When the transmission distance is represented by the number of node hops, the fault information includes a hop number of 2 (i.e., indicating that the node 116 to the faulty link needs to pass through 2 hops in the ring network).

[0203] S310. After receiving the link failure information through net6-1, node 116 updates the forwarding table entry according to the failure information.

[0204] For example, before updating the forwarding table entry, the forwarding table entry recorded in the node 116 is as follows: Fig.12F After node 115 updates the forwarding table entry according to the fault information, the forwarding table entry recorded in node 116 can be as follows: Fig.14FAs shown. It can be seen that since the link failure occurs on the link 2 hops away from the net6-1 port of node 116, the path status from the net6-1 port of node 116 to MAC1, MAC2 and MAC3 is updated to down. In addition, since the ports on both sides of the backup link will switch to unblock ports after the link failure occurs, the path status from the net6-2 port of node 116 to MAC1, MAC2 and MAC3 is updated to active. In this way, node 116 can forward messages to MAC1, MAC2 and MAC3 through the net6-2 port according to the updated table items 6-1, 6-2 and 6-3 (or according to the updated table items 6-6, 6-7, 6-8, 6-11, 6-12 and 6-13).

[0205] In addition, after receiving the fault information, the node 111 and the node 116 can switch the ports on both sides of the standby link to unblock through the corresponding technology in STP or ERPS.

[0206] In addition, after the link failure between the node 113 and the node 114 is restored, the method may further include:

[0207] S311 , node 113 sends fault recovery information to node 112 .

[0208] The fault recovery information includes a transmission distance on the ring network that is used to indicate the node 112 to the fault recovery link. Specifically, when the node hop number is used to represent the transmission distance, the fault information includes a hop number of 1 (i.e., indicating that the node 112 to the fault recovery link needs to pass through 1 hop in the ring network).

[0209] Similar to the transmission distance carried by the notification information in S203 above, in actual applications, the form of the transmission distance carried in the fault recovery information can be determined according to actual needs. Here, "hop number 1" is used as the transmission distance for illustration. The same understanding can be made for the fault recovery information sent by other nodes below.

[0210] S312 , node 112 sends fault recovery information to node 111 .

[0211] The fault recovery information includes a transmission distance on the ring network that is used to indicate the node 111 to the fault recovery link. Specifically, when the node hop count is used to indicate the transmission distance, the fault information includes a hop count of 2 (i.e., indicating that the node 111 to the fault recovery link needs to pass through 2 hops in the ring network).

[0212] S313 , node 114 sends fault recovery information to node 115 .

[0213] The fault recovery information includes a transmission distance on the ring network that is used to indicate the node 115 to the fault recovery link. Specifically, when the node hop number is used to represent the transmission distance, the fault information includes a hop number of 1 (i.e., indicating that the node 115 to the fault recovery link needs to pass through 1 hop in the ring network).

[0214] S314 , node 115 sends fault recovery information to node 116 .

[0215] The fault recovery information includes a transmission distance on the ring network that is used to indicate the node 116 to the fault recovery link. Specifically, when the node hop count is used to indicate the transmission distance, the fault information includes a hop count of 2 (i.e., indicating that the node 116 to the fault recovery link needs to pass through 2 hops in the ring network).

[0216] After receiving the fault recovery information, the node 116 and the node 111 can switch the ports on both sides of the standby link to block through the corresponding technology in STP or ERPS.

[0217] After the ports on both sides of the standby link are switched to block, the method further includes:

[0218] S315. Node 111 updates the forwarding table entry.

[0219] For example, the node 111 may update the forwarding table entry according to the transmission distance (2 hops) carried in the fault recovery information received in S312. Fig.14A The forwarding table entry shown is updated to Fig. 12A The forwarding table entries shown.

[0220] S316 , node 111 sends confirmation information to node 112 .

[0221] The confirmation information may be an acknowledgement character (ACK) confirmation notification.

[0222] In addition, the confirmation information includes a transmission distance (1 hop), which is used to indicate that the transmission distance from the node 112 to the fault repair link on the ring network is 1 hop.

[0223] Similar to the transmission distance carried by the notification information in S203 above, the form of the transmission distance carried in the confirmation information in actual application can be determined according to actual needs. Here, "hop number 1" is used as the transmission distance for illustration. The same understanding can be made for the confirmation information sent by other nodes below.

[0224] S317. Node 112 updates the forwarding table entry.

[0225] For example, node 112 may update the forwarding table entry according to the transmission distance (1 hop) included in the confirmation information. Fig. 14B The forwarding table entry shown is updated to Fig. 12B The forwarding table entries shown.

[0226] S318 , node 111 sends confirmation information to node 113 .

[0227] The confirmation information may be an acknowledgement character (ACK) confirmation notification.

[0228] In addition, the confirmation information includes a transmission distance (0 hops), which is used to indicate that the transmission distance from the node 111 to the fault repair link on the ring network is 0 hops.

[0229] S319, node 113 updates the forwarding table entry.

[0230] For example, node 113 may update the forwarding table entry according to the transmission distance (0 hops) included in the confirmation information. Fig. 14C The forwarding table entry shown is updated to Fig. 12C The forwarding table entries shown.

[0231] In addition, the node 113 may determine that the fault repair link is the link between the node 113 and the node 114 according to the transmission distance (0 hop) included in the confirmation information, so the node 113 may not send the confirmation information to the node 114 .

[0232] In addition, after the link failure is corrected, the node 116 may also update the forwarding table entry and send a confirmation message. Furthermore, the method further includes:

[0233] S320 , the node 116 updates the forwarding table entry.

[0234] For example, the node 116 may update the forwarding table entry according to the transmission distance (2 hops) carried in the fault recovery information received in S314. Fig.14F The forwarding table entry shown is updated to Fig.12F The forwarding table entries shown.

[0235] S321 , node 116 sends confirmation information to node 115 .

[0236] The confirmation information may be an acknowledgement character (ACK) confirmation notification.

[0237] In addition, the confirmation information includes a transmission distance (1 hop), which is used to indicate that the transmission distance from the node 115 to the fault repair link on the ring network is 1 hop.

[0238] S322. Node 115 updates the forwarding table entry.

[0239] For example, the node 115 may update the forwarding table entry according to the transmission distance (1 hop) included in the confirmation information. Fig.14E The forwarding table entry shown is updated to Fig.12E The forwarding table entries shown.

[0240] S323 , node 115 sends confirmation information to node 114 .

[0241] The confirmation information may be an acknowledgement character (ACK) confirmation notification.

[0242] In addition, the confirmation information includes a transmission distance (0 hops), which is used to indicate that the transmission distance from the node 114 to the fault repair link on the ring network is 0 hops.

[0243] S324. Node 114 updates the forwarding table entry.

[0244] For example, the node 114 may update the forwarding table entry according to the transmission distance (0 hops) included in the confirmation information. Fig.14D The forwarding table entry shown is updated to Fig.12D The forwarding table entries shown.

[0245] In addition, the node 114 may determine that the fault repair link is the link between the node 114 and the node 113 according to the transmission distance (0 hop) included in the confirmation information, so the node 114 may not send the confirmation information to the node 113 .

[0246] Next, the communication method provided by the embodiment of the present application is introduced from the process of forwarding data packets. Fig.15 As shown, the method may include:

[0247] S401: A first node receives a data message whose destination address is a first address.

[0248] The first node may be any transmission node in the ring network. For example, the first node may be any one of the nodes 111 to 116 in the transmission network 10 described above.

[0249] The first address may be an access address of any end-side device accessing the ring network. For example, the first address may be an access address of any one of the end-side devices 121 to 126 in the transmission network 10 described above.

[0250] S402: The first node determines a first table entry according to the first address, where the first table entry includes a correspondence between the first address, the first port, and the transmission distance L2.

[0251] The first entry can be Figure 5-Figure 8 or Fig. 12A , Fig. 12B , Fig. 12C , Fig.12D , Fig.12E , Fig.12F or Fig.14A , Fig. 14B , Fig. 14C , Fig.14D , Fig.14E , Fig.14F The forwarding table includes the corresponding relationship between the access address of the end-side device, the net port of the transmission node and the transmission distance.

[0252] S403: After determining that the path status between the first node and the fourth node outside the transmission distance L2 on the ring network is available, the first node forwards the data message through the first port according to the first table entry.

[0253] In one implementation, S403 may include:

[0254] S4031. The first node determines a second table entry according to the first port and the transmission distance L2 included in the first table entry.

[0255] The second table entry includes a correspondence between the first port, the transmission distance L2 and the first state identifier, wherein the first state identifier is used to indicate a path state between the first port of the first node and the fourth node outside the transmission distance L2 on the ring network.

[0256] Specifically, the second table item can be Figure 5-Figure 8 or Fig. 12A , Fig. 12B , Fig. 12C , Fig.12D , Fig.12E , Fig.12F or Fig.14A , Fig. 14B , Fig. 14C , Fig.14D , Fig.14E , Fig.14F The forwarding table includes the corresponding relationship between the net port of the transmission node, the transmission distance and the status identifier.

[0257] S4032: After the first node determines according to the second table entry that the first state identifier indicates that the path state is available, the first node forwards the data message through the first port according to the first table entry.

[0258] For example, the first node is based on Figure 5-Figure 8 or Fig. 12A , Fig. 12B , Fig. 12C , Fig.12D , Fig.12E , Fig.12F or Fig.14A , Fig. 14B , Fig. 14C , Fig.14D , Fig.14E , Fig.14F In the forwarding table entry including the correspondence between the net port of the transmission node, the transmission distance and the state identifier, it is determined that the state identifier in the forwarding table entry is active, and the first node forwards the data message through the net port (ie, the first port) in the correspondence.

[0259] In one implementation, the method further includes:

[0260] S404: The first node determines a third table entry according to the first address, where the third table entry includes a correspondence between the first address, the second port, and the second state identifier.

[0261] Among them, the second status identifier is used to indicate the path status from the second port of the first node to the fourth node on the ring network. When the first status identifier indicates that the path status is available, the second status identifier indicates that the path is unavailable. When the first status identifier indicates that the path status is unavailable, the second status identifier indicates that the path is available.

[0262] For example, the third entry is Figure 5-Figure 8 or Fig. 12A , Fig. 12B , Fig. 12C , Fig.12D , Fig.12E , Fig.12F or Fig.14A , Fig. 14B , Fig. 14C , Fig.14D , Fig.14E , Fig.14F In the forwarding table entry corresponding to the backup path, when the state flag corresponding to the primary path is active, the state flag corresponding to the backup path is slave; when the state flag corresponding to the primary path is down, the state flag corresponding to the backup path is active.

[0263] S405: After the first node determines according to the third table entry that the second state identifier indicates that the path state is available, the first node forwards the data message through the second port according to the third table entry.

[0264] For example, when Figure 5-Figure 8 or Fig. 12A , Fig. 12B , Fig. 12C , Fig.12D , Fig.12E , Fig.12F or Fig.14A , Fig. 14B , Fig. 14C , Fig.14D , Fig.14E , Fig.14F When the state flag corresponding to the standby path is active, the data message is forwarded through the net port corresponding to the standby path.

[0265] Based on the above method embodiment, the device provided by the embodiment of the present application is described below. Fig.16 The structure diagram of a communication device provided in an embodiment of the present application is shown. Specifically, the communication device 50 can be used for the functions of the nodes 111 to 116 in the above-mentioned transmission network 10.

[0266] Reference Fig.16 The communication device 50 includes at least one of a sending unit 501, a receiving unit 502, and a processing unit 503. These units can perform the corresponding functions of each device in the above method example.

[0267] In one possible design, the communication device 50 is applied to a first node on a ring network, where the second node and the third node are adjacent nodes of the first node, the first node is connected to the second node via a first port, and the first node is connected to the third node via a second port.

[0268] Among them, the receiving unit 502 is used to receive the first notification information through the first port, and the first notification information includes the first address of the end side device and the transmission distance L1; the transmission distance L1 is used to indicate the transmission distance between the second node and the fourth node on the ring network, and the fourth node is the access node of the end side device on the ring network.

[0269] The sending unit 501 is used to send second notification information to the third node through the second port. The second notification information includes the first address and the transmission distance L2. The transmission distance L2 is used to indicate the transmission distance on the ring network between the first node and the fourth node.

[0270] In one implementation, the processing unit 503 is configured to establish a first table entry according to the first notification information, where the first table entry includes a correspondence between the first address, the first port, and the transmission distance L2.

[0271] In one implementation, the processing unit 503 is further used to establish a second table entry, which includes a correspondence between the first port, the transmission distance L2 and the first state identifier, and the first state identifier is used to indicate the path state from the first port of the first node to the fourth node on the ring network.

[0272] In one implementation, the receiving unit 502 is further configured to receive a data message whose destination address is the first address.

[0273] The processing unit 503 is further configured to forward the data message through the first port according to the first table entry after determining that the first state identifier in the second table entry indicates that the path state is available.

[0274] In one implementation, the receiving unit 502 is further configured to receive first fault information through the first port, where the first fault information includes a transmission distance L3, and the transmission distance L3 is used to indicate a transmission distance from the first node to the faulty link through the ring network.

[0275] The processing unit 503 is further configured to search, according to the first fault information, for a second table entry including the first port and including a transmission distance L2 greater than the transmission distance L3, and update the first state flag in the second table entry so that the first state flag indicates that the path state is unavailable.

[0276] In one implementation, the sending unit 501 is further configured to send second fault information through the second port, wherein the second fault information includes a transmission distance L4, and the transmission distance L4 is used to indicate a transmission distance from the third node to the faulty link through the ring network.

[0277] In one implementation, the receiving unit 502 is further used to receive first fault recovery information through the first port, where the first fault recovery information includes a transmission distance L3, and the transmission distance L3 is used to indicate a transmission distance on the ring network from the first node to the fault recovery link.

[0278] The sending unit 501 is further used to send second fault recovery information through the second port, where the second fault recovery information includes a transmission distance L4, and the transmission distance L4 is used to indicate a transmission distance on the ring network from the third node to the fault recovery link.

[0279] In an implementation manner, the receiving unit 502 is further configured to receive first confirmation information from a node where the ring protection link is located, where the first confirmation information is used to indicate that the ring protection link has been restored to a blocked state.

[0280] The processing unit 503 is further configured to update the forwarding table entry recorded in the first node according to the first confirmation information.

[0281] In one implementation, the first confirmation information includes a transmission distance L3, where the transmission distance L3 is used to indicate a transmission distance on the ring network from the first node to the fault repair link.

[0282] The sending unit 501 is further used to send second confirmation information to the downstream node, the second confirmation information is used to indicate that the ring protection link has been restored to a blocked state, and the first confirmation information includes the transmission distance on the ring network from the downstream node to the fault repair link.

[0283] In one implementation, the processing unit 503 is also used to establish a third table entry based on the first notification information, the third table entry including a correspondence between the first address, the second port, and the second state identifier, the second state identifier being used to indicate the path status from the second port of the first node to the fourth node on the ring network, and when the first state identifier indicates that the path status is available, the second state identifier indicates that the path is unavailable, and when the first state identifier indicates that the path status is unavailable, the second state identifier indicates that the path is available.

[0284] In another possible design, the receiving unit 502 is used to receive first fault information through the first port, where the first fault information includes a transmission distance L3, and the transmission distance L3 is used to indicate a transmission distance from the first node to the faulty link through the ring network.

[0285] The processing unit 503 is used to search for a second table entry that includes the first port and the transmission distance included is greater than the transmission distance L3 according to the first fault information; the second table entry includes the correspondence between the first port, the transmission distance L2 and the first state identifier, and the first state identifier is used to indicate the path state between the first port of the first node to the fourth node outside the transmission distance L2 on the ring network.

[0286] The processing unit 503 is further configured to update the first state flag in the second table entry so that the first state flag indicates that the path state is unavailable.

[0287] In one implementation, the sending unit 501 is used to send second fault information through the second port, where the second fault information includes a transmission distance L4, and the transmission distance L4 is used to indicate a transmission distance from the third node to the faulty link through the ring network.

[0288] In one implementation, the receiving unit 502 is further used to receive first fault recovery information through the first port, where the first fault recovery information includes a transmission distance L3, and the transmission distance L3 is used to indicate a transmission distance on the ring network from the first node to the fault recovery link.

[0289] The sending unit 501 is further used to send second fault recovery information through the second port, where the second fault recovery information includes a transmission distance L4, and the transmission distance L4 is used to indicate a transmission distance on the ring network from the third node to the fault recovery link.

[0290] In an implementation manner, the receiving unit 502 is further configured to receive first confirmation information from a node where the ring protection link is located, where the first confirmation information is used to indicate that the ring protection link has been restored to a blocked state.

[0291] The processing unit 503 is further configured to update the forwarding table entry recorded in the first node according to the first confirmation information.

[0292] In one implementation, the first confirmation information includes a transmission distance L3, where the transmission distance L3 is used to indicate a transmission distance on the ring network from the first node to the fault repair link.

[0293] The sending unit 501 is further used to send second confirmation information to the downstream node, the second confirmation information is used to indicate that the ring protection link has been restored to a blocked state, and the first confirmation information includes the transmission distance on the ring network from the downstream node to the fault repair link.

[0294] In one implementation, the processing unit 503 is also used to update a third table entry based on the first fault information, the third table entry including a correspondence between the first address, the second port, and the second state identifier, the second state identifier being used to indicate the path status from the second port of the first node to the fourth node on the ring network, and when the first state identifier indicates that the path status is available, the second state identifier indicates that the path is unavailable, and when the first state identifier indicates that the path status is unavailable, the second state identifier indicates that the path is available.

[0295] In another possible design, the receiving unit 502 is used to receive a data packet whose destination address is a first address; the processing unit is used to determine a first table entry based on the first address, and the first table entry includes a correspondence between the first address, the first port and the transmission distance L2.

[0296] The processing unit 503 is further configured to forward the data message through the first port according to the first table entry after determining that the path status between the first node and the fourth node outside the transmission distance L2 on the ring network is available.

[0297] In one implementation, the processing unit 503 is further configured to forward the data message through the first port according to the first table entry after determining that the path state between the first node and the fourth node outside the transmission distance L2 on the ring network is available, including:

[0298] The processing unit 503 is also used to determine the second table entry based on the first port and transmission distance L2 included in the first table entry; the second table entry includes the correspondence between the first port, the transmission distance L2 and the first state identifier, and the first state identifier is used to indicate the path state between the first port of the first node to the fourth node outside the transmission distance L2 on the ring network.

[0299] The processing unit 503 is further configured to forward the data packet through the first port according to the first table entry after determining according to the second table entry that the first state identifier indicates that the path state is available.

[0300] In one implementation, the processing unit 503 is also used to determine a third table entry based on the first address, the third table entry including a correspondence between the first address, the second port, and the second state identifier, the second state identifier being used to indicate the path state from the second port of the first node to the fourth node on the ring network, and when the first state identifier indicates that the path state is available, the second state identifier indicates that the path is unavailable, and when the first state identifier indicates that the path state is unavailable, the second state identifier indicates that the path is available; the processing unit is also used to determine, based on the third table entry, that the second state identifier indicates that the path state is available, and then forward the data packet through the second port according to the third table entry.

[0301] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The functional units in the embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.

[0302] See also Fig.17 , which is a schematic diagram of the structure of another communication device provided in an embodiment. The communication device 60 can be used for the functions of the nodes 111 to 116 in the above-mentioned transmission network 10.

[0303] See also Fig.17 As shown, the communication device 60 includes: a processor 601, a communication interface 602 and a memory 603. The number of the processor 601 in the communication device 60 can be one or more. Fig.17 In the embodiment of the present application, the processor 601, the communication interface 602 and the memory 603 may be connected via a bus system or other means, wherein: Fig.17 The connection via bus system 604 is taken as an example.

[0304] The processor 601 may be a central processor unit (CPU), a network processor (NP) or a combination of a CPU and a NP. The processor 601 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0305] The communication interface 602 is used to receive and send data. Specifically, the communication interface 602 may include a receiving interface and a sending interface. The receiving interface may be used to receive data, and the sending interface may be used to send data. The number of the communication interface 602 may be one or more.

[0306] The memory 603 may include a volatile memory, such as a random-access memory (RAM); the memory 603 may also include a non-volatile memory, such as a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 603 may also include a combination of the above-mentioned types of memories. The memory 603 may, for example, store the notification message mentioned above.

[0307] Optionally, the memory 603 stores an operating system and a program, an executable module or a data structure, or a subset thereof, or an extended set thereof, wherein the program may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks. The processor 601 may read the program in the memory 603 to implement the method provided in the embodiment of the present application.

[0308] The memory 603 may be a storage device in the communication device 60 , or may be a storage device independent of the communication device 60 .

[0309] The bus system 604 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus system 604 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.17 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0310] Fig.18 It is a structural diagram of another communication device 70 provided in an embodiment of the present application. The communication device 70 can be used for the functions of nodes 111 to 116 in the above-mentioned transmission network 10.

[0311] The communication device 70 includes a main control board 701 and an interface board 703 .

[0312] The main control board 701 is also called a main processing unit (MPU) or a route processor card. The main control board 701 controls and manages each component in the communication device 70, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 701 includes: a central processing unit 7011 and a memory 7012.

[0313] The interface board 703 is also called a line processing unit (LPU), a line card or a service board. The interface board 703 is used to provide various service interfaces and realize the forwarding of data packets. The service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET / SDH) interface, etc., and the Ethernet interface is, for example, a flexible Ethernet service interface (FlexE Clients). The interface board 703 includes: a central processing unit 7031, a network processor 7032, a forwarding table entry memory 7034 and a physical interface card (PIC) 7033.

[0314] The central processor 7031 on the interface board 703 is used to control and manage the interface board 703 and communicate with the central processor 7011 on the main control board 701 .

[0315] The network processor 7032 is used to implement message forwarding processing. The network processor 7032 may be in the form of a forwarding chip. Specifically, the processing of uplink messages includes: message inbound interface processing, forwarding table search; the processing of downlink messages includes forwarding table search, etc.

[0316] The physical interface card 7033 is used to implement the docking function of the physical layer, and the original traffic enters the interface board 703 from this, and the processed message is sent from the physical interface card 7033. The physical interface card 7033 includes at least one physical interface, which is also called a physical port. The physical interface card 7033 is also called a daughter card, which can be installed on the interface board 703 and is responsible for converting the optical signal into a message and forwarding the message to the network processor 7032 for processing after checking the legitimacy of the message. In some embodiments, the central processor 7031 of the interface board 1103 can also perform the functions of the network processor 7032, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 7032 is not required in the physical interface card 7033.

[0317] Optionally, the communication device 70 includes multiple interface boards. For example, the communication device 70 also includes an interface board 704 . The interface board 704 includes: a central processor 7041 , a network processor 7042 , a forwarding table entry memory 7044 and a physical interface card 7043 .

[0318] Optionally, the communication device 70 further includes a switching fabric board 702. The switching fabric board 702 may also be referred to as a switch fabric unit (SFU). When the communication device has multiple interface boards 703, the switching fabric board 702 is used to complete data exchange between the interface boards. For example, the interface board 703 and the interface board 704 may communicate via the switching fabric board 702.

[0319] The main control board 701 is coupled to the interface board 703. For example, the main control board 701, the interface board 703, the interface board 704, and the switching network board 702 are connected to the system backplane through a system bus to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 701 and the interface board 703, and the main control board 701 and the interface board 703 communicate through the IPC channel.

[0320] Logically, the communication device 70 includes a control plane and a forwarding plane. The control plane includes a main control board 701 and a central processor 7031. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 7034, a physical interface card 7033, and a network processor 7032. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 7032 forwards the message received by the physical interface card 7033 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 7034. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.

[0321] It should be understood that the operation on the interface board 704 in the embodiment of the present application is consistent with the operation on the interface board 703, and for the sake of brevity, it will not be repeated. It should be understood that the communication device 70 in the embodiment of the present application may correspond to the above Figures 4 to 13 The network node or information processing node 131 or the communication device 70 in the embodiment may correspond to the above-mentioned FIG. 14 or Fig.15 The first node in the embodiment. The main control board 701, the interface board 703 and / or the interface board 704 in the communication device 70 can implement various steps in the above-mentioned method embodiments, which will not be described here for brevity.

[0322] It should be understood that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the communication device 70, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, load sharing and redundant backup can be achieved together. Under a centralized forwarding architecture, the communication device 70 may not need a switching network board, and the interface board is responsible for the processing function of the business data of the entire system. Under a distributed forwarding architecture, the communication device 70 may have at least one switching network board, and data exchange between multiple interface boards is achieved through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the communication device 70 with a distributed architecture are greater than those of the device with a centralized architecture. Optionally, the communication device 70 may also be in the form of only one board, that is, without a switching network board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two superimposed. The data exchange and processing capabilities of this type of device are relatively low (for example, low-end switches or routers and other network devices). The specific architecture to be adopted depends on the specific networking deployment scenario.

[0323] In some possible embodiments, the nodes 111-116 in the above-mentioned transmission network 10 can be implemented as virtualized devices. For example, the virtualized device can be a virtual machine (VM) running a program for sending message functions, and the virtual machine is deployed on a hardware device (for example, a physical server). A virtual machine refers to a complete computer system with complete hardware system functions and running in a completely isolated environment simulated by software. The virtual machine can be configured as a first network device or a second network device. For example, the nodes 111-116 in the transmission network 10 can be implemented based on a general physical server in combination with network function virtualization (NFV) technology. Those skilled in the art can virtualize a device with the functions of nodes 111-116 in the transmission network 10 on a general physical server in combination with NFV technology by reading this application, which will not be repeated here.

[0324] The embodiment of the present application also provides a chip, including a processor and an interface circuit, the interface circuit is used to receive instructions and transmit them to the processor; the processor can be used to execute the above method. The processor is coupled to a memory, the memory is used to store programs or instructions, and when the program or instruction is executed by the processor, the chip system implements the method in any of the above method embodiments.

[0325] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0326] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be provided on different chips. The present application does not specifically limit the type of memory and the arrangement of the memory and the processor.

[0327] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.

[0328] The embodiments of the present application also provide a computer-readable storage medium, including instructions or computer programs, which, when executed on a computer, enable the computer to execute the methods provided in the above embodiments.

[0329] The embodiments of the present application also provide a computer program product including instructions or a computer program, which, when executed on a computer, enables the computer to execute the method provided in the above embodiments.

[0330] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0331] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0332] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical business division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0333] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0334] In addition, each business unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software business units.

[0335] If the integrated unit is implemented in the form of a software business unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0336] Those skilled in the art should be aware that in one or more of the above examples, the services described in this application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these services can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. Storage media can be any available media that a general or special-purpose computer can access.

[0337] The above specific implementation methods further describe in detail the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above are only specific implementation methods of the present application.

[0338] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A communication method, characterized in that: The method is applied to a first node on a ring network, where a second node and a third node are adjacent nodes of the first node, the first node is connected to the second node via a first port, and the first node is connected to the third node via a second port, and the method includes: The first node receives first notification information through the first port, where the first notification information includes a first address of an end-side device and a transmission distance L1; the transmission distance L1 is used to indicate a transmission distance between the second node and a fourth node on the ring network, where the fourth node is an access node of the end-side device on the ring network; The first node sends a second notification message to the third node through the second port, wherein the second notification message includes the first address and a transmission distance L2, and the transmission distance L2 is used to indicate a transmission distance between the first node and the fourth node on the ring network.

2. The method according to claim 1, characterized in that The method further comprises: The first node establishes a first table entry according to the first notification information, where the first table entry includes a correspondence between the first address, the first port, and the transmission distance L2.

3. The method according to claim 2, characterized in that The method further comprises: The first node establishes a second table entry, which includes a correspondence between the first port, the transmission distance L2 and a first state identifier, and the first state identifier is used to indicate a path state from the first port of the first node to the fourth node on the ring network.

4. The method according to claim 3, characterized in that The method further comprises: The first node receives a data message whose destination address is the first address; After determining that the first status identifier in the second table entry indicates that the path status is available, the first node forwards the data message through the first port according to the first table entry.

5. The method according to claim 3 or 4, characterized in that The method further comprises: The first node receives first fault information through the first port, where the first fault information includes a transmission distance L3, where the transmission distance L3 is used to indicate a transmission distance from the first node to the faulty link through the ring network; The first node searches for the second table entry containing the first port and containing a transmission distance L2 greater than the transmission distance L3 according to the first fault information, and updates the first state flag in the second table entry so that the first state flag indicates that the path state is unavailable.

6. The method according to claim 5, characterized in that The method further comprises: The first node sends second fault information through the second port, where the second fault information includes a transmission distance L4, where the transmission distance L4 is used to indicate a transmission distance from the third node to the faulty link through the ring network.

7. The method according to claim 5 or 6, characterized in that: The method further comprises: The first node receives first fault recovery information through the first port, where the first fault recovery information includes a transmission distance L3, where the transmission distance L3 is used to indicate a transmission distance on the ring network from the first node to the fault recovery link; The first node sends second fault recovery information through the second port, and the second fault recovery information includes a transmission distance L4, where the transmission distance L4 is used to indicate a transmission distance on the ring network from the third node to the fault recovery link.

8. The method according to any one of claims 5 to 7, characterized in that: The method further comprises: The first node receives first confirmation information from a node where the ring protection link is located, where the first confirmation information is used to indicate that the ring protection link has been restored to a blocked state; The first node updates the forwarding table entry recorded in the first node according to the first confirmation information.

9. The method according to claim 8, characterized in that The first confirmation information includes a transmission distance L3, where the transmission distance L3 is used to indicate a transmission distance on the ring network from the first node to the fault recovery link. The method further includes: The first node sends second confirmation information to the downstream node, the second confirmation information is used to indicate that the ring protection link has been restored to a blocked state, and the first confirmation information includes a transmission distance on the ring network from the downstream node to the fault repair link.

10. The method according to any one of claims 3 to 9, characterized in that: The method further comprises: The first node establishes a third table entry based on the first notification information, and the third table entry includes a correspondence between the first address, the second port and a second state identifier, the second state identifier is used to indicate the path status from the second port of the first node to the fourth node on the ring network, and when the first state identifier indicates that the path status is available, the second state identifier indicates that the path is unavailable; when the first state identifier indicates that the path status is unavailable, the second state identifier indicates that the path is available.

11. A communication method, characterized in that: The method is applied to a first node on a ring network, where a second node and a third node are adjacent nodes of the first node, the first node is connected to the second node via a first port, and the first node is connected to the third node via a second port, and the method includes: The first node receives first fault information through a first port, wherein the first fault information includes a transmission distance L3, and the transmission distance L3 is used to indicate a transmission distance from the first node to the faulty link through the ring network; The first node searches, according to the first fault information, for a second table entry that includes the first port and includes a transmission distance greater than the transmission distance L3; the second table entry includes a correspondence between the first port, the transmission distance L2, and a first state identifier, the first state identifier being used to indicate a path state between the first port of the first node and a fourth node outside the transmission distance L2 on the ring network; The first node updates the first state flag in the second table entry so that the first state flag indicates that the path state is unavailable.

12. The method according to claim 11, characterized in that The method further comprises: The first node sends second fault information through the second port, where the second fault information includes a transmission distance L4, where the transmission distance L4 is used to indicate a transmission distance from the third node to the faulty link through the ring network.

13. The method according to claim 11 or 12, characterized in that: The method further comprises: The first node receives first fault recovery information through the first port, where the first fault recovery information includes a transmission distance L3, where the transmission distance L3 is used to indicate a transmission distance on the ring network from the first node to the fault recovery link; The first node sends second fault recovery information through the second port, and the second fault recovery information includes a transmission distance L4, where the transmission distance L4 is used to indicate a transmission distance on the ring network from the third node to the fault recovery link.

14. The method according to claim 13, characterized in that The method further comprises: The first node receives first confirmation information from a node where the ring protection link is located, where the first confirmation information is used to indicate that the ring protection link has been restored to a blocked state; The first node updates the forwarding table entry recorded in the first node according to the first confirmation information.

15. The method according to claim 14, characterized in that The first confirmation information includes a transmission distance L3, where the transmission distance L3 is used to indicate a transmission distance on the ring network from the first node to the fault recovery link. The method further includes: The first node sends second confirmation information to the downstream node, the second confirmation information is used to indicate that the ring protection link has been restored to a blocked state, and the first confirmation information includes a transmission distance on the ring network from the downstream node to the fault repair link.

16. The method according to any one of claims 11 to 15, characterized in that: The method further comprises: The first node updates a third table entry based on the first fault information, and the third table entry includes a correspondence between the first address, the second port, and a second state identifier, the second state identifier is used to indicate the path state from the second port of the first node to the fourth node on the ring network, and when the first state identifier indicates that the path state is available, the second state identifier indicates that the path is unavailable, and when the first state identifier indicates that the path state is unavailable, the second state identifier indicates that the path is available.

17. A communication method, characterized in that: The method is applied to a first node on a ring network, where a second node and a third node are adjacent nodes of the first node, the first node is connected to the second node via a first port, and the first node is connected to the third node via a second port, and the method includes: The first node receives a data message with a destination address being a first address; The first node determines a first table entry according to the first address, where the first table entry includes a correspondence between the first address, the first port, and the transmission distance L2; After determining that the path status from the first node to a fourth node outside the transmission distance L2 on the ring network is available, the first node forwards the data message through the first port according to the first table entry.

18. The method according to claim 17, characterized in that After determining that the path state between the first node and the fourth node outside the transmission distance L2 on the ring network is available, the first node forwards the data message through the first port according to the first table entry, including: The first node determines a second table entry according to the first port and the transmission distance L2 included in the first table entry; the second table entry includes a correspondence between the first port, the transmission distance L2 and a first state identifier, and the first state identifier is used to indicate a path state between the first port of the first node and a fourth node outside the transmission distance L2 on the ring network; After the first node determines, according to the second table entry, that the first state identifier indicates that the path state is available, the first node forwards the data message through the first port according to the first table entry.

19. The method according to claim 18, characterized in that The method further comprises: The first node determines a third table entry according to the first address, the third table entry including a correspondence between the first address, the second port, and a second state identifier, the second state identifier being used to indicate a path state from the second port of the first node to the fourth node on the ring network, the second state identifier indicating that the path is unavailable when the first state identifier indicates that the path state is available, and the second state identifier indicating that the path is available when the first state identifier indicates that the path state is unavailable; After the first node determines, according to the third table entry, that the second state identifier indicates that the path state is available, the first node forwards the data message through the second port according to the third table entry.

20. A communication device, characterized in that: The communication device is applied to a first node on a ring network, a second node and a third node on the ring network are adjacent nodes of the first node, the first node is connected to the second node through a first port, and the first node is connected to the third node through a second port, and the communication device includes: A receiving unit, configured to receive first notification information through the first port, wherein the first notification information includes a first address of an end-side device and a transmission distance L1; the transmission distance L1 is used to indicate a transmission distance between the second node and a fourth node on the ring network, wherein the fourth node is an access node of the end-side device on the ring network; A sending unit is used to send second notification information to the third node through the second port, wherein the second notification information includes the first address and a transmission distance L2, and the transmission distance L2 is used to indicate a transmission distance between the first node and the fourth node on the ring network.

21. A communication device, characterized in that: The communication device is applied to a first node on a ring network, a second node and a third node on the ring network are adjacent nodes of the first node, the first node is connected to the second node through a first port, and the first node is connected to the third node through a second port, and the communication device includes: A receiving unit, configured to receive first fault information through a first port, wherein the first fault information includes a transmission distance L3, and the transmission distance L3 is used to indicate a transmission distance from the first node to the faulty link through the ring network; a processing unit, configured to search, according to the first fault information, for a second table entry including the first port and including a transmission distance greater than the transmission distance L3; the second table entry including a correspondence between the first port, the transmission distance L2, and a first state identifier, the first state identifier being used to indicate a path state between the first port of the first node and a fourth node outside the transmission distance L2 on the ring network; The processing unit is further configured to update the first state identifier in the second table entry so that the first state identifier indicates that the path state is unavailable.

22. A communication device, characterized in that: The communication device is applied to a first node on a ring network, a second node and a third node on the ring network are adjacent nodes of the first node, the first node is connected to the second node through a first port, and the first node is connected to the third node through a second port, and the communication device includes: A receiving unit, configured to receive a data message with a destination address being a first address; a processing unit, configured to determine a first table entry according to the first address, wherein the first table entry includes a correspondence between the first address, the first port, and the transmission distance L2; The processing unit is further configured to forward the data message through the first port according to the first table entry after determining that the path status between the first node and the fourth node outside the transmission distance L2 on the ring network is available.

23. A communication device, characterized in that: It comprises a memory and a processor, the memory is used to store computer instructions, and the processor is used to call and execute the computer instructions from the memory to implement the method as described in any one of claims 1-10, or to implement the method as described in any one of claims 11-16, or to implement the method as described in any one of claims 17-19.

24. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a processor, implement the method according to any one of claims 1 to 10, or implement the method according to any one of claims 11 to 16, or implement the method according to any one of claims 17 to 19.

25. A computer program product, characterized in that The computer program product comprises instructions, which, when executed on a processor, are used to implement the method according to any one of claims 1 to 10, or to implement the method according to any one of claims 11 to 16, or to implement the method according to any one of claims 17 to 19.