A ring network fault processing method and device
By using preset MAC addresses and on-ring interface groups to change the packet forwarding direction in a ring network topology, the problems of complex ring network topology fault handling and high resource consumption are solved, and simple fault recovery is achieved.
Patent Information
- Application Number
- CN202411305668.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2044-09-18
AI Technical Summary
When a fault occurs in a ring network topology, existing technologies require each network node to pre-calculate backup paths and backup outgoing interfaces, resulting in high resource consumption and complex processing.
By changing the packet forwarding direction in the on-ring interface group, packet forwarding is performed using a preset MAC address, avoiding the need to calculate backup paths and backup outgoing interfaces.
It simplifies the fault handling process, reduces the resource consumption of network nodes, and enables rapid fault recovery.
Smart Images

Figure CN119135475B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network technology, and in particular to a method and apparatus for handling ring network faults. Background Technology
[0002] Ring network topology is simple, improves network reliability, and is a widely adopted network topology. (See also...) Figure 1 This diagram illustrates the message forwarding path for the first type of ring network topology. The diagram includes a ring network topology consisting of network nodes A and H. In this case, if a message is sent from network node Y to network node X, the message will be sent along the shortest path indicated by the arrow in the diagram. In this message forwarding process, network node G is the network node in the ring network topology where the message enters, and can be called the upstream link node. Network node A is the network node in the ring network topology where the message leaves, and can be called the downstream link node. Figure 1 The diagram only shows one upper link and one lower link. In reality, a ring network topology can have multiple upper link and multiple lower link.
[0003] If a network node in a ring network topology fails or a link between network nodes fails, the packet forwarding path needs to be replanned. For example, in Figure 1 Based on what is shown, see Figure 2 This is a schematic diagram of the message forwarding path for the second type of ring network topology. If the link between network node H and network node A fails, then... Figure 1 The original path shown in the diagram is unavailable. After receiving the message sent by node G, network node H needs to forward the message according to the backup path. Since the link between network node H and network node G is not faulty, network node H will forward the message to network node G. Then, network node G forwards the message clockwise to network node F, and so on, until the message is finally forwarded clockwise to network node A, and then network node A forwards the message to network node X.
[0004] In related technologies, to achieve the packet forwarding process according to backup paths described above after a ring network topology failure, the topology-independent Loop-Free Alternate (TI-LFA) FRR (Fast Reroute) technology can be used. TI-LFA FRR technology is based on Segment Routing (SR) technology. However, the prerequisite for using TI-LFA FRR technology to handle network failures is that for each network node in the ring network topology, that network node needs to pre-calculate the backup paths (Repair List) and backup outgoing interfaces to each downstream node and the underlay (physical infrastructure network) node outside the ring, so that the backup paths and backup outgoing interfaces can be used to forward packets during a failure.
[0005] As can be seen, the TI-LFA FRR technology based on SR technology is inherently complex. Even in a simple network topology like a ring network, each network node needs to pre-calculate backup paths and backup outgoing interfaces before a fault occurs. This requires complex calculations and the storage of a large amount of protection path information for handling network faults, including backup paths and backup outgoing interfaces. After a network fault, packets are forwarded through these backup paths and interfaces based on this information. This results in the ring network fault handling process consuming significant network node resources and is quite complex. Summary of the Invention
[0006] The purpose of this application is to provide a ring network fault handling method and apparatus to reduce the resource consumption of ring network fault handling and achieve simple fault recovery. The specific technical solution is as follows:
[0007] In a first aspect, embodiments of this application provide a ring network fault handling method, applied to a first node, the first node being located on a ring network topology, the method comprising:
[0008] Receive a first message sent by the second node, the first message including a first destination IP address;
[0009] Based on the first destination IP address, obtain the first FIB entry that matches the first destination IP address from the forwarding information table FIB. The first FIB entry includes a first outgoing interface identifier and a first forwarding attribute. The first outgoing interface identifier indicates the first interface.
[0010] If the value of the first forwarding attribute is the first value and the first interface is in a DOWN state, then the second packet is forwarded to the third node in the ring network topology through the second interface. The first destination MAC address included in the second packet is a preset MAC address, so that the third node forwards the second packet according to the preset MAC address.
[0011] The first interface and the second interface belong to the same ring interface group.
[0012] Secondly, embodiments of this application provide a ring network fault handling device applied to a first node, the first node being located on a ring network topology, the device comprising:
[0013] The first message receiving module is used to receive a first message sent by the second node, the first message including a first destination IP address;
[0014] The first entry acquisition module is used to acquire a first FIB entry that matches the first destination IP address from the forwarding information table FIB. The first FIB entry includes a first outgoing interface identifier and a first forwarding attribute. The first outgoing interface identifier indicates a first interface.
[0015] The first message forwarding module is used to forward a second message to a third node in the ring network topology through a second interface if the value of the first forwarding attribute is a first value and the first interface is in a DOWN state. The second message includes a first destination MAC address that is a preset MAC address, so that the third node forwards the second message according to the preset MAC address.
[0016] The first interface and the second interface belong to the same ring interface group.
[0017] Thirdly, embodiments of this application provide a network node located in a ring network topology, the network node comprising:
[0018] processor;
[0019] transceiver;
[0020] A machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the machine-executable instructions cause the processor to perform the method steps described in any one of the first aspects.
[0021] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the methods described in the first aspect.
[0022] Fifthly, embodiments of this application also provide a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the steps described in the first aspect above.
[0023] Beneficial effects of the embodiments in this application:
[0024] In this embodiment, after receiving a first packet, the first node in the ring network topology retrieves a first FIB entry from the FIB that matches the first destination IP address of the first packet. This first FIB entry contains a first forwarding attribute and a first outgoing interface identifier. If the value of the first forwarding attribute is a first value, it indicates that the packet needs to be forwarded on the ring, meaning the first node needs to forward the packet to other nodes in the ring network topology. In this case, if the first interface indicated by the first outgoing interface identifier is in a DOWN state, the first node cannot send packets through the first interface. Since both the first and second interfaces belong to the ring interface group, they are interfaces on the first node connected to network nodes in the ring network topology. Changing the first interface for forwarding the first packet to the second interface is equivalent to changing the packet forwarding direction. Because the network nodes in the ring network topology are connected in a ring, packet forwarding can still be completed normally even if the forwarding direction is changed. Furthermore, by handling network faults using the method described in this embodiment, the first node does not need to calculate complex backup paths and backup outgoing interfaces; it only needs to forward packets according to the ring interface group during the packet forwarding process. It can handle ring network faults in a simple way without consuming a lot of network node resources. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0026] Figure 1 This is a schematic diagram of the message forwarding path for the first type of ring network topology;
[0027] Figure 2 This is a schematic diagram of the message forwarding path for the second type of ring network topology;
[0028] Figure 3 A schematic diagram of a backup path provided for an embodiment of this application;
[0029] Figure 4 A flowchart illustrating the first ring network fault handling method provided in this application embodiment;
[0030] Figure 5This is a schematic diagram of the first type of message forwarding in a ring network fault provided in an embodiment of this application;
[0031] Figure 6 This is a schematic diagram of a second type of message forwarding in a ring network fault, provided in an embodiment of this application.
[0032] Figure 7 A flowchart illustrating the second ring network fault handling method provided in this application embodiment;
[0033] Figure 8 A schematic diagram illustrating a third type of message forwarding in a ring network fault, provided in an embodiment of this application;
[0034] Figure 9 A flowchart illustrating the third ring network fault handling method provided in this application embodiment;
[0035] Figure 10 A schematic diagram of the fourth type of message forwarding in a ring network fault provided in this application embodiment;
[0036] Figure 11 A schematic diagram illustrating a normal message forwarding path provided in an embodiment of this application;
[0037] Figure 12 This is a schematic diagram of the first tangential microring in the related technology;
[0038] Figure 13 This is a schematic diagram of the second type of tangential microring in the related technology;
[0039] Figure 14 A schematic diagram of a tangential anti-micro-ring process provided in an embodiment of this application;
[0040] Figure 15 A schematic diagram of the fifth type of message forwarding in a ring network fault provided in an embodiment of this application;
[0041] Figure 16 This is a schematic diagram of a back-cutting micro-ring in related technologies;
[0042] Figure 17 This application provides a schematic flowchart for back-cutting to prevent micro-rings.
[0043] Figure 18 This is a schematic diagram of the structure of a ring network fault handling device provided in an embodiment of this application;
[0044] Figure 19 This is a schematic diagram of the structure of a network node provided in an embodiment of this application. Detailed Implementation
[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of the present invention.
[0046] To highlight the differences between the embodiments of this application and related technologies, the related technologies will be described first.
[0047] Among related technologies, FRR technology can be used to repair faults in IP network links or network nodes. The evolution of FRR technology has gone through FRR, LFA (Loop-Free Alternate) FRR, Remote LFA FRR, and TI-LFA FRR.
[0048] Specifically, FRR is unavailable in IP (Internet Protocol) ring network topologies. LFA FRR cannot calculate a loop-free backup path in most cases and is therefore unavailable in IP ring network topologies. Remote LFA FRR cannot calculate a backup path in some cases, and it uses a more complex MPLS (Multi-Protocol Label Switching) forwarding method on the forwarding plane instead of the simple and widely used IP forwarding method, thus it is unavailable in IP-based IP ring network topologies.
[0049] In other words, among the fault repair methods mentioned above, only TI-LFA FRR is independent of the network topology and can be applied to IP ring network topologies. However, TI-LFA FRR is based on SR technology, which is divided into MPLS SR based on MPLS and SRv6 (Segment Routing Internet Protocol Version 6) based on IPv6 (Internet Protocol Version 6). The MPLS SR forwarding plane uses a more complex MPLS forwarding method, which is not suitable for IP ring network topologies. Only TI-LFA FRR based on SRv6 is suitable for IP ring network topologies.
[0050] But the previous text Figure 2Taking the scenario shown as an example, if fault handling is performed based on TI-LFA FRR using SRv6, in order to avoid flow interruption caused by link failure between network node H and network node A, or to avoid flow interruption caused by failure of network node A, network node H needs to calculate the extended P space, Q space, backup path, and backup outgoing interface, and finally generate backup forwarding table entries.
[0051] See Figure 3 This is a schematic diagram of a backup path provided in an embodiment of this application. Figure 2 Based on the scenario shown, Figure 3 The bold arrow indicates the clockwise direction for packet forwarding in the backup path generated by network node H. The backup path is: Network Node H - Network Node G - Network Node F - Network Node E - Network Node D - Network Node C - Network Node B - Network Node A. That is, before the fault, packets were sent counter-clockwise in the ring network topology. After the fault, packets are sent clockwise in the ring network topology.
[0052] In summary, because the location of a fault in a ring network topology is random, before a fault occurs, each network node in the ring network topology, in order to successfully forward packets to the next node even when its own interface is down, needs to calculate a backup path to that next node, in order to ensure continued packet forwarding after a fault. That is, from the perspective of the next node, other network nodes in the ring network topology need to calculate the backup path and backup outgoing interface to that next node. For each next node, from the perspective of other network nodes in the ring network topology, each node needs to calculate its own backup path and backup outgoing interface to that next node. Only in this way can the network nodes in the ring network topology successfully forward packets after a fault occurs.
[0053] Therefore, for simple ring network topologies, each network node in the ring network needs to undergo complex calculations and deployments, and store a large amount of protection path information in order to cope with ring network topology faults. This results in a complex fault handling process that consumes a lot of resources.
[0054] To address the aforementioned issues, this application provides a method and apparatus for handling ring network faults.
[0055] To facilitate the subsequent description, the terminology used in the embodiments of this application will be explained first.
[0056] Ingress: A network node in a ring network topology that receives packets from network nodes outside the ring network topology and forwards the packets to network nodes within the ring network topology.
[0057] Transit: A network node in a ring network topology that receives packets from network nodes within the ring network topology and forwards packets to other network nodes within the ring network topology.
[0058] Egress: A network node in a ring network topology that receives packets from network nodes within the ring network topology and forwards packets to network nodes outside the ring network topology.
[0059] As mentioned above Figure 1 Taking the scenario shown as an example, network node G is the entry node, network node H is the passing node, and network node A is the next node.
[0060] Ring interface: The interface through which network nodes in a ring network topology connect to each other. For example, Figure 1 The interfaces connecting network node G to network nodes H and F are both on-ring interfaces.
[0061] External interface: The interface on a network node in a ring network topology that connects to network nodes outside the ring network topology. For example, Figure 1 The interface on network node G that connects to network node Y.
[0062] Media Access Control (MAC): This refers to the preset MAC address in this application embodiment. If the destination MAC address of the packet is a MAC loopback, it means that the packet is protected by loopback, which means that the packet needs to be forwarded in accordance with the ring network fault handling method provided in this application.
[0063] In one embodiment of this application, the preset MAC address (i.e., wraparound MAC) can be different from the MAC addresses of existing network nodes and the MAC addresses of the network node's interfaces in the IP network, thereby distinguishing it from the real MAC addresses already existing in the network. In this case, the preset MAC address can be a fixed value, or it can be a specified MAC address existing in the network. In actual processing, different preset MAC addresses need to be configured for unicast packets and multicast packets.
[0064] Wrap-around message: A message whose destination MAC address in the Ethernet header is the wrap-around MAC address. This application applies to IP packets; therefore, a wrap-around message refers to an IP packet whose destination MAC address in the outer Ethernet header is the wrap-around MAC address. It is applicable to various IP protocols, including IPv4 (Internet Protocol Version 4) and IPv6.
[0065] Ring forwarding: If the next-hop interface recorded in the FIB entry is a ring interface, then the value of the first forwarding attribute in the FIB entry is the first value, indicating ring forwarding.
[0066] Next-loop forwarding: If the next-hop interface recorded in the FIB entry is an external interface, then the value of the first forwarding attribute in the FIB entry is the second value, indicating next-loop forwarding.
[0067] In-loop messages: If the ingress interface of a message is connected to other network nodes in the ring network topology, then the message is an in-loop message. For example, if network node H receives a message sent by network node G, then for network node H, the ingress interface of the message is connected to network node G in the ring network topology, therefore the message is an in-loop message.
[0068] Inbound message: A message is considered an inbound message if its inbound interface is connected to another network node outside the ring network topology. For example, if network node G receives a message sent by network node Y, then for network node G, the inbound interface of this message is connected to network node Y outside the ring network topology, therefore this message is an inbound message.
[0069] The following describes the methods for handling ring network faults.
[0070] See Figure 4 This is a flowchart illustrating the first ring network fault handling method provided in this application embodiment. It is applied to a first node, which is located on a ring network topology. The method includes the following steps S401-S403.
[0071] S401: Receive the first message sent by the second node.
[0072] The first message mentioned above includes the first destination IP address.
[0073] The second node mentioned above can be a node outside the ring network topology, in which case the first node is an ingress node and the first message is an ingress message. Alternatively, the second node can be a node inside the ring network topology, in which case the first node may be a cascading node or a next node, and the first message is an ingress message.
[0074] S402: Based on the first destination IP address mentioned above, obtain the first FIB entry that matches the first destination IP address from the FIB.
[0075] The first FIB (Forwarding Information Base) entry includes a first outgoing interface identifier and a first forwarding attribute, wherein the first outgoing interface identifier indicates the first interface.
[0076] S403: If the value of the first forwarding attribute is the first value and the first interface is in the DOWN state, then the second message is forwarded to the third node in the ring network topology through the second interface. The first destination MAC address included in the second message is a preset MAC address, so that the third node forwards the second message according to the preset MAC address.
[0077] The first interface and the second interface mentioned above belong to the same ring interface group.
[0078] The value of the first forwarding attribute is the first value, which indicates that the first FIB entry is a ring-on forwarding entry, that is, the first interface indicated by the first outgoing interface identifier is a ring-on interface.
[0079] If the first interface is faulty, it could be due to a link failure between the first node and the connected network nodes via the first interface, or it could be a failure of the network node connected to the first interface. In this case, the first node can no longer forward packets through the first interface. Ring network fault handling is required in this situation.
[0080] In this case, it is necessary to first decapsulate the Ethernet header of the first packet, and then encapsulate the decapsulated first packet with an Ethernet header whose destination MAC address is a preset MAC address, to obtain the second packet. Since the destination MAC address of the second packet is the preset MAC address, the second packet is a wraparound packet. After receiving the second packet, the third node can determine that the second packet is a wraparound packet based on the preset MAC address. Therefore, the third node can act as the first node, as described below. Figure 7 Steps S405-S406 shown below, or as described below Figure 9 Steps S408-S409 shown involve message forwarding. The specific forwarding method is described below and will not be detailed here.
[0081] In one embodiment of this application, after executing step S401, step A or step B may also be executed, and the second message is forwarded through step C.
[0082] Step A: If the ingress interface receiving the first message is connected to a node on the ring network topology, then the first message is marked as an in-ring message.
[0083] The fact that the ingress interface of the first message is connected to a node on the aforementioned ring network topology indicates that the first message was sent by a node on the ring network topology, thus the first message is an in-ring message.
[0084] Step B: If the ingress interface receiving the first message is connected to a node outside the ring network topology, then the first message is marked as an ingress message.
[0085] The first message's ingress interface is connected to a node outside the aforementioned ring network topology, indicating that the first message was sent by a node outside the ring network topology, thus the first message is an ingress message.
[0086] Step C: If the value of the first forwarding attribute is the first value, and the first interface is in the DOWN state, and the first packet is marked as an in-loop packet or an in-loop packet, then the second packet is forwarded to the third node in the ring network topology through the second interface.
[0087] In one embodiment of this application, a first extended header can be added to the first message. The first extended header can be added anywhere before the data portion of the first message. The first extended header contains a first identifier. A first identifier value indicates that the first message is a loop-in message, while a first identifier value indicates that the first message is a loop-in message. The first identifier in the first extended header is used during the first node's processing of the first message, and is not included in the second message sent out by the first node. Therefore, the first extended header can be deleted at any time after the first identifier is used and before forwarding the second message. Because a first extended header is added to the first message, even if the first node processes the first message on different data boards internally during forwarding, each data board can quickly determine whether the first message is a loop-in message or a loop-in message through the first extended header.
[0088] Specifically, as shown above, the first message may be an inbound message or an in-loop message. For both of these situations, message forwarding can be performed through the following steps D-F.
[0089] Step D: Decapsulate the Ethernet header of the first packet, and then encapsulate the first packet after decapsulating the Ethernet header with an Ethernet header whose destination MAC address is a preset MAC address to obtain the second packet.
[0090] Step E: If the first message is a loopback message, then forward the second message through the ingress interface of the first message.
[0091] For example, see Figure 2 In the scenario shown, network node H receives a first message sent from network node G. In this case, network node H is a loopback node, and the first message is a loopback message. The first interface is the interface connected to network node A. Due to a link failure between network node A and network node H, the first interface is in a DOWN state. In this situation, the second message needs to be forwarded through the second interface.
[0092] The second interface, which belongs to the interface group on the first ring, is the interface on network node H that connects to network node G, which is the ingress interface of the first message.
[0093] Therefore, when the first message is a loopback message, the first node forwards the second message through the ingress interface of the first message.
[0094] See Figure 5 This is a schematic diagram of the first type of message forwarding for ring network faults provided in the embodiments of this application.
[0095] Figure 5 The network structure shown in the figure is similar to Figure 1 Same, and Figure 5 and Figure 1 The scenarios are all where network node Y sends a message to network node X. And... Figure 5 In the example, the link between network node H and network node A fails.
[0096] Figure 5 In this context, IP represents the destination IP address of the first packet, MAC_G represents the MAC address of network node G, MAC_H represents the MAC address of network node H, and MAC_P represents the default MAC address.
[0097] Solid arrows indicate the forwarding path of a message when it is forwarded normally, while dashed arrows indicate the forwarding path of a message after a failure occurs.
[0098] Depend on Figure 5 As can be seen, the destination MAC address in the Ethernet header of the message sent by network node Y to network node G is MAC_G, and the destination MAC address in the Ethernet header of the message sent by network node G to network node H is MAC_H. After receiving the message, network node H decapsulates the outer Ethernet header, determines the outgoing interface of the message (i.e., the first interface is DOWN), and therefore encapsulates the decapsulated message with an Ethernet header containing the preset MAC address as the destination MAC address, and forwards the message to network node G. Therefore, the destination MAC address in the Ethernet header of the message sent by network node H to network node G is the preset MAC address.
[0099] Step F: If the first message is an inbound message, then forward the second message through the second interface.
[0100] In this case, the second interface is not the ingress interface for the first message.
[0101] For example, see Figure 1 In the scenario shown, network node G receives a first message sent from network node Y. In this case, network node G is an inbound loop node, and the first message is an inbound loop message. The first interface is the interface on network node G that connects to network node H. If the link between network node G and network node H fails, the first interface will be down. In this case, the second message needs to be forwarded through the second interface.
[0102] The second interface, which belongs to the same ring interface group as the first interface, is the interface on network node G that connects to network node F.
[0103] See Figure 6 This is a schematic diagram of the second type of message forwarding for ring network faults provided in the embodiments of this application.
[0104] Figure 6 The network structure shown in the figure is similar to Figure 1 Same, and Figure 6 and Figure 1 The scenarios are all where network node Y sends a message to network node X. And... Figure 6 In the middle, the link between network node G and network node H fails.
[0105] Figure 6 In this context, IP represents the destination IP address of the first packet, MAC_G represents the MAC address of network node G, and MAC_P represents the default MAC address.
[0106] Solid arrows indicate the forwarding path of a message when it is forwarded normally, while dashed arrows indicate the forwarding path of a message after a failure occurs.
[0107] Depend on Figure 6 As can be seen, the destination MAC address in the Ethernet header of the message sent by network node Y to network node G is MAC_G. After receiving the message, network node G decapsulates the outer Ethernet header and determines the outgoing interface of the message, i.e., the first interface is DOWN. Therefore, it encapsulates the decapsulated message with an Ethernet header containing the destination MAC address of the preset MAC address and forwards the message to network node F. Thus, the destination MAC address in the Ethernet header of the message sent by network node G to network node F is the preset MAC address.
[0108] In one embodiment of this application, the above-mentioned ring interface group may be created by the following step G before performing step S401.
[0109] Step G: Create an interface group on the ring.
[0110] The aforementioned ring interface group includes interface identifiers for at least two interfaces, both of which belong to the aforementioned first node and are connected to other nodes in the aforementioned ring network topology besides the first node.
[0111] Specifically, each network node in a ring network topology is connected to two other network nodes in the same ring network. That is, each network node in a ring network topology has two interfaces that connect to two other network nodes in the ring network; these two interfaces form a ring interface group. As mentioned above... Figure 1Taking the ring network topology shown as an example, network node H is the first node, and the two interfaces on network node H that are connected to network node A and network node G respectively form the ring interface group of the first node.
[0112] In addition, in one embodiment of this application, before forwarding the second message to the third node in the above-mentioned ring network topology through the second interface, the following steps H-Step I are also included.
[0113] Step H: Determine the interface group on the first ring to which the first interface belongs.
[0114] Step 1: Identify the interfaces in the interface group on the first ring, excluding the first interface, as the second interface.
[0115] In this embodiment, after receiving a first packet, the first node in the ring network topology retrieves a first FIB entry from the FIB that matches the first destination IP address of the first packet. This first FIB entry contains a first forwarding attribute and a first outgoing interface identifier. If the value of the first forwarding attribute is a first value, it indicates that the packet needs to be forwarded on the ring, meaning the first node needs to forward the packet to other nodes in the ring network topology. In this case, if the first interface indicated by the first outgoing interface identifier is in a DOWN state, the first node cannot send packets through the first interface. Since both the first and second interfaces belong to the ring interface group, they are interfaces on the first node connected to network nodes in the ring network topology. Changing the first interface for forwarding the first packet to the second interface is equivalent to changing the packet forwarding direction. Because the network nodes in the ring network topology are connected in a ring, packet forwarding can still be completed normally even if the forwarding direction is changed. Furthermore, by handling network faults using the method described in this embodiment, the first node does not need to calculate complex backup paths and backup outgoing interfaces; it only needs to forward packets according to the ring interface group during the packet forwarding process. It can handle ring network faults in a simple way without consuming a lot of network node resources.
[0116] In another embodiment of this application, see Figure 7 This is a flowchart illustrating the second ring network fault handling method provided in this application embodiment, including the following steps S404-S406.
[0117] S404: Receives the third message sent by the fourth node through the third interface.
[0118] The aforementioned third message includes the second destination MAC address and the second destination IP address.
[0119] In one embodiment of this application, the preset MAC address is a unicast preset MAC address or a multicast preset MAC address, and the unicast preset MAC address is different from the multicast preset MAC address.
[0120] S405: When the second destination MAC address is the preset MAC address, obtain the second FIB entry that matches the second destination IP address from the FIB.
[0121] The aforementioned second FIB entry includes a second forwarding attribute.
[0122] As mentioned above, the destination MAC address of the third message is a preset MAC address, indicating that the third message is a wraparound message and needs to be forwarded in accordance with the ring network fault handling method provided in the embodiments of this application.
[0123] S406: If the value of the second forwarding attribute is the first value, then the fourth message is forwarded to the fifth node in the ring network topology through the fourth interface. The third destination MAC address included in the fourth message is the preset MAC address, so that the fifth node forwards the fourth message according to the preset MAC address.
[0124] The third interface and the fourth interface mentioned above belong to the same ring interface group.
[0125] If the value of the second forwarding attribute is the first value, it indicates that the second FIB entry is a ring-on-ring forwarding entry, requiring packet forwarding within the ring network topology, rather than to nodes outside the ring network topology. In this case, if packet forwarding is performed through the third packet ingress interface (i.e., the third interface), the packet will be resent to the network node that previously forwarded the third packet, resulting in a forwarding loop failure. Therefore, in this situation, the fourth packet needs to be forwarded through a fourth interface, which is different from the third interface and belongs to the same ring-on-ring interface group as the third interface. Furthermore, the third destination MAC address of the fourth packet is the aforementioned preset MAC address, enabling the fifth node receiving the fourth packet to also determine that the fourth packet is a loopback packet based on the preset MAC address, requiring continued packet forwarding according to the ring network failure handling procedure.
[0126] Specifically, the first node needs to decapsulate the Ethernet header of the third message and encapsulate a new Ethernet header with the destination MAC address set to the preset MAC address for the decapsulated third message, thus obtaining the fourth message.
[0127] In one embodiment of this application, after step S404, the method further includes step J, and forwards the fourth message through step K.
[0128] Step J: When the second destination MAC address is determined to be the preset MAC address, the third message is marked as a wraparound message.
[0129] Step K: If the value of the second forwarding attribute is the first value, and the third message is marked as a wraparound message, then the fourth message is forwarded to the fifth node in the ring network topology through the fourth interface.
[0130] In one embodiment of this application, a second extended header can be added to the third message. This second extended header can be added anywhere before the data portion of the third message. The second extended header contains a second identifier, and if the value of the second identifier is a third identifier value, it indicates that the third message is a wraparound message. This second identifier is used by the first node during the processing of the third message, but is not included in the fourth message sent out by the first node. Therefore, after identifying the third message marked with the second identifier, the second extended header can be deleted at any time before forwarding the fourth message. Because a second extended header is added to the third message, even if the first node processes the third message on different data boards internally during forwarding, each data board can quickly determine that the third message is a wraparound message through the second extended header.
[0131] In one embodiment of this application, before forwarding the fourth message to the fifth node in the above-mentioned ring network topology through the fourth interface, the following steps L-M are further included.
[0132] Step L: Determine the interface group on the second ring to which the third interface mentioned above belongs.
[0133] Step M: Identify the interfaces in the interface group on the second ring above, excluding the third interface, as the fourth interface.
[0134] See Figure 8 This is a schematic diagram of the third type of message forwarding for ring network faults provided in the embodiments of this application.
[0135] exist Figure 5 Based on the illustrated embodiment, the newly added dashed arrows indicate the forwarding path after the packet is forwarded to network node G. After receiving the packet, network node G needs to continue forwarding it. In this case, network node G receives the packet from network node H. Network node G is not a next-stage node; as the first node, network node G receives the packet through the interface connected to network node H and then forwards the packet through the interface connected to network node F.
[0136] At this point, network node F is not a next node either. After receiving the message through the interface connected to network node G, network node F, as the first node, forwards the message through the interface connected to network node E.
[0137] In this manner, the message is forwarded from network node G to network node F, network node E, network node D, network node C, network node B, and network node A in sequence.
[0138] The destination MAC address in the Ethernet header of the packets forwarded during this process is the preset MAC address, namely MAC_P.
[0139] In another embodiment of this application, after receiving a packet, each network node first decapsulates the Ethernet header and then recapsulates the Ethernet header. When a passing node receives a packet with a destination MAC address equal to a preset MAC address, it first decapsulates the Ethernet header, and then recapsulates the Ethernet header again, where the destination MAC address remains the preset MAC address. The source MAC address in the recapsulated Ethernet header is the MAC address of that passing node.
[0140] As can be seen from the above, in this embodiment, after receiving a third packet with a destination MAC address that is a preset MAC address, the first node can determine that the third packet is a packet forwarded under fault conditions. Furthermore, the value of the second forwarding attribute being the first value indicates that the packet needs to be forwarded within the ring network topology. Therefore, the first node forwards the packet to the fourth interface, which belongs to the same ring interface group as the incoming interface. Thus, even if the first node does not record the backup path and backup outgoing interface, it can still forward the packet upon receiving the third packet. The first node still does not need to calculate complex backup paths and backup outgoing interfaces; it only needs to forward the packet according to the ring interface group during the packet forwarding process. This does not consume a large amount of network node resources and enables ring network fault handling in a simple way.
[0141] In another embodiment of this application, see [link to application]. Figure 9 This is a flowchart illustrating the third ring network fault handling method provided in the embodiments of this application, including the following steps S407-S409.
[0142] S407: Receives the fifth message sent by the sixth node through the fifth interface.
[0143] The aforementioned fifth message includes the third destination IP address and the fourth destination MAC address.
[0144] S408: When the fourth destination MAC address is the preset MAC address, obtain the third FIB entry that matches the third destination IP address from the FIB.
[0145] The aforementioned third FIB entry includes a third forwarding attribute and a second outgoing interface identifier, the latter indicating the sixth interface.
[0146] S409: If the value of the third forwarding attribute is the second value, then the sixth message is forwarded to the seventh node outside the ring network topology through the sixth interface.
[0147] The fifth destination MAC address included in the sixth message is the MAC address of the seventh node.
[0148] If the value of the third forwarding attribute is the second value, it means that the third FIB entry indicates ring forwarding, which means that the fifth message needs to be sent to a node outside the ring network topology.
[0149] This indicates that the node connected to the sixth interface is a network node outside the ring network topology. In this case, the packet needs to be sent outside the ring network topology and cannot continue to be forwarded within the ring network topology. Therefore, in this case, the packet is forwarded normally through the sixth interface to the network node outside the ring network topology.
[0150] Specifically, the first node needs to decapsulate the Ethernet header of the fifth packet and encapsulate an Ethernet header with the destination MAC address as the next-hop MAC address, resulting in the sixth packet. After decapsulating the outer Ethernet header of the fifth packet, the first node obtains the first destination IP address from the inner IP header. Based on the first destination IP address, it retrieves the first FIB entry that matches the first destination IP address from the FIB. The first FIB entry includes the next-hop IP address. Based on the next-hop IP address, it searches the ARP (Address Resolution Protocol) table for an ARP entry that matches the next-hop IP address, and uses the MAC address recorded in the matching ARP entry as the destination MAC address in the newly encapsulated Ethernet header.
[0151] In one embodiment of this application, the above step S407 is followed by step N, and the sixth message is forwarded through step O.
[0152] Step N: When the fourth destination MAC address is determined to be the preset MAC address, the fifth message is marked as a wraparound message.
[0153] Step O: If the value of the third forwarding attribute is the second value, and the fifth message is marked as a wraparound message, then the sixth message is forwarded to the seventh node outside the ring network topology through the sixth interface.
[0154] In one embodiment of this application, a third extended header can be added to the fifth message. This third extended header can be added anywhere before the data portion of the fifth message. The third extended header contains a second identifier, and if the value of the second identifier is the value of the third identifier, it indicates that the fifth message is a wraparound message. This second identifier is used by the first node during the processing of the fifth message, but is not included in the sixth message sent out by the first node. Therefore, after identifying the fifth message marked with the second identifier, the third extended header can be deleted at any time before forwarding the sixth message. Because a third extended header is added to the fifth message, even if the first node processes the sixth message on different data boards internally during forwarding, each data board can quickly determine that the fifth message is a wraparound message through the third extended header.
[0155] See Figure 10 This is a schematic diagram of the fourth type of message forwarding for ring network faults provided in the embodiments of this application.
[0156] exist Figure 8 Based on the illustrated embodiment, an arrow is added between network node A and network node X to indicate that the packet is forwarded from network node A to network node X. After the packet is forwarded to network node A, since the destination node of the packet is network node X, network node A is the next step node in this case. Therefore, network node A, as the first node, forwards the packet according to the sixth interface, that is, the interface connected to network node X.
[0157] Therefore, when network node Y sends a message to network node X, if the ring network topology is fault-free, the message will be sent to network node X via network nodes Y, G, H, and A. If the ring network topology is faulty, the message will still be sent to network node X via network nodes Y, G, F, E, D, C, B, and A. Thus, the solution provided in this application can achieve ring network fault handling.
[0158] As can be seen from the above, if the value of the third forwarding attribute is the second value, it indicates that the first node is the next hop node. In this case, the first node needs to forward the packet to the network node indicated by the destination address of the packet outside the ring network topology. The sixth interface recorded in the FIB entry is the interface connected to the network node outside the ring network topology. In this situation, the packet needs to be forwarded through the next-hop interface. The first node still does not need to calculate complex backup paths and backup output interfaces, and can still achieve ring network fault handling in a simple way. The simple fault handling method provided by the embodiments of this application can achieve rapid fault handling at the sub-millisecond to microsecond level.
[0159] The above describes the message forwarding process when a fault occurs. The following describes the message forwarding process under normal conditions.
[0160] See Figure 11 This is a schematic diagram of a normal message forwarding path provided in an embodiment of this application.
[0161] Figure 11 Network nodes A and H form a ring network topology.
[0162] Figure 11 The arrow representing service flow 1, which runs from network node Y to network node X, is specifically an underlay flow. Figure 11 It also includes service flow 2, represented by the arrow from network node Z to network node W. This service flow is specifically an overlay (logical overlay network) flow. An overlay is a logical or virtual network built on top of an underlay, such as a VPN (Virtual Private Network).
[0163] For service flow 1, all service packets constituting service flow 1 contain an IP header (in... Figure 11 (represented by the IP address in the underlay flow). The destination IP address in the IP header of the service message constituting service flow 1 is the IP address of network node X, which will not be repeated below.
[0164] In one example, under normal link conditions, network node Y sends service message 1 to network node G. Service message 1, from outermost to innermost layer, includes an Ethernet header, an IP header, and a data portion. The Ethernet header includes the destination MAC address of network node G (MAC_G). Network node Y can forward service message 1 to network node G based on MAC_G.
[0165] After receiving service packet 1, network node G decapsulates the outer Ethernet header and determines the destination IP address in the IP header. Network node G searches the FIB (Fixed Instructions for Portable Nodes) for the matching destination IP address, obtains the next-hop IP address included in that FIB entry, and then searches the ARP table for the MAC address corresponding to that next-hop IP address, which is the MAC address (MAC_H) of network node H. Then, network node G encapsulates an Ethernet header around the decapsulated service packet 1, with the destination MAC address in the encapsulated Ethernet header being MAC_H, resulting in service packet 2. Network node G forwards service packet 2 to network node H based on MAC_H.
[0166] After receiving service packet 2, network node H decapsulates the outer Ethernet header of service packet 2 using the same method, and then recapsulates the Ethernet header. The destination MAC address of the recapsulated Ethernet header is the MAC address of network node A (MAC_A), resulting in service packet 3. Network node H then forwards service packet 3 to network node A based on MAC_A.
[0167] After receiving service packet 3, network node A decapsulates the outer Ethernet header of service packet 3 using the same method and recapsulates the Ethernet header. The destination MAC address of the recapsulated Ethernet header is the MAC address of network node X (MAC_X), resulting in service packet 4. Network node A forwards service packet 4 to network node X based on MAC_X.
[0168] This completes the forwarding of the service message from network node Y to network node X.
[0169] exist Figure 11 In the ring network topology shown, if the link between network node H and network node A fails, for service flow 1, the process of network node Y forwarding service message 1 to network node G is the same as before, and will not be repeated here.
[0170] After service packet 1 enters the ring network topology, the scheme provided in this application embodiment is used for service packet forwarding. That is, after receiving service packet 1, network node G marks service packet 1 as an inbound packet because the inbound interface of service packet 1 is connected to network node Y outside the ring network topology. The outer Ethernet header of service packet 1 is decapsulated, and the FIB table entry is searched based on the destination IP address in the IP header. The next-hop IP address, outbound interface identifier, and forwarding attribute values are obtained from the found FIB table entry. The outbound interface identifier indicates the outbound interface (referred to as outbound interface 1) on network node G connected to network node H. Network node G determines that outbound interface 1 is in the UP state, and the obtained forwarding attribute value is the first value. Service packet 1 is marked as an inbound packet, indicating that the service packet needs to be forwarded through outbound interface 1 in the ring network topology. Then, network node G searches for the MAC address corresponding to the next-hop IP address in the ARP table, that is, the MAC address (MAC_H) of network node H. An Ethernet header is then encapsulated around the decapsulated service packet 1 to obtain service packet 2. The destination MAC address of the encapsulated Ethernet header is MAC_H. Network node G forwards service packet 2 to network node H through outgoing interface 1.
[0171] After receiving service packet 2, network node H marks it as an in-ring packet based on the fact that the ingress interface of service packet 2 is connected to network node G within the ring network topology. Network node H decapsulates the Ethernet header of service packet 2 and looks up the FIB entry based on the destination IP address in the IP header. From the found FIB entry, it retrieves the outgress interface identifier and forwarding attribute values. This outgress interface identifier indicates the outgress interface (referred to as outgress interface 2) on network node H connected to network node A. Network node H determines that outgress interface 2 is in a DOWN state, and since the retrieved forwarding attribute value is the first value and service packet 2 is marked as an in-ring packet, it means that the service packet needs to be forwarded using other outgress interfaces in the ring interface group to which outgress interface 2 belongs within the ring network topology. Furthermore, network node H determines that the interface belonging to the same ring interface group as outgress interface 2 is the outgress interface (referred to as outgress interface 3) on network node H connected to network node G. Network node H encapsulates an Ethernet header around service packet 2 after decapsulating the Ethernet header. The destination MAC address of the encapsulated Ethernet header is a preset MAC address, resulting in service packet 5. Since service packets 3 and 4 existed in the previous example, this service packet will be referred to as service packet 5 to distinguish it from the service packets in the previous example. Network node H forwards service packet 5 to network node G through outgoing interface 3.
[0172] After receiving service packet 5 through the ingress interface connected to network node H, network node G determines that the destination MAC address of service packet 5 is the preset MAC address, and therefore marks service packet 5 as a wraparound packet. Network node G decapsulates the outer Ethernet header of service packet 5. Network node G looks up the FIB entry based on the destination IP address in the IP header and obtains the forwarding attribute value from the found FIB entry. The obtained forwarding attribute value is the first value, and service packet 5 is marked as a wraparound packet, indicating that the packet needs to be forwarded using other interfaces in the ring interface group to which the ingress interface belongs in the ring network topology. Therefore, network node G determines the interface that belongs to the same ring interface group as the ingress interface, namely the outgress interface (referred to as outgress interface 4) on network node G connected to network node F. Network node G encapsulates an Ethernet header around service packet 5 after decapsulation, and the destination MAC address of the encapsulated Ethernet header is the preset MAC address, resulting in service packet 6. Network node G forwards service packet 6 to network node F through outgress interface 4.
[0173] Subsequently, network nodes F, E, D, C, and B use a forwarding method similar to that of network node G to forward service packets along network nodes F, E, D, C, and B to network node A.
[0174] After receiving service packet n forwarded by network node B, network node A determines that the destination MAC address of service packet n is a preset MAC address. Therefore, it marks service packet n as a wraparound packet. Network node A decapsulates the outer Ethernet header of service packet n. Network node A looks up the FIB entry based on the destination IP address in the IP header, and obtains the forwarding attribute, outgoing interface identifier, and next-hop IP address from the found FIB entry. The obtained forwarding attribute value is the second value, and service packet n is marked as a wraparound packet, indicating that it needs to be forwarded in a loop. Therefore, network node A looks up the MAC address corresponding to the next-hop IP address obtained from the FIB entry in the ARP table, which is the MAC address (MAC_X) of network node X. After decapsulating the Ethernet header, network node A encapsulates the service packet n with an Ethernet header, and the destination MAC address in the encapsulated Ethernet header is MAC_X, resulting in service packet n+1. Network node A forwards service packet n+1 to network node X through the outgoing interface (the interface connected to network node X) indicated by the outgoing interface identifier obtained from the FIB entry.
[0175] Thus, the forwarding of service packets from network node Y to network node X in the event of a link failure has been completed using the above methods.
[0176] For service flow 2, all service packets constituting service flow 2 contain an inner IP header (in... Figure 11 (represented by the IP address in the overlay flow). The destination IP address in the inner IP header of the service message constituting service flow 2 is the IP address of network node W, which will not be repeated below.
[0177] In another example, assuming a normal link, network node Z sends service message 7 to network node E. Service message 7, from outermost to innermost layer, includes an Ethernet header, an inner IP header, and a data portion. The Ethernet header includes the destination MAC address of network node E (MAC_E). Network node Z can then forward service message 7 to network node E based on MAC_E.
[0178] Network node E is a network node in a ring network topology, and tunnels exist in the ring network topology. Service packets entering the ring network topology are encapsulated with tunnel headers to enable tunnel forwarding. For example, a VXLAN (Virtual Extensible Local Area Network) tunnel header, which includes a VXLAN header, an outer UDP (User Datagram Protocol) header, and an outer IP header. This tunnel header is located between the Ethernet header and the inner IP header.
[0179] Specifically, a pre-configured tunnel exists between network node E and network node C. After receiving service packet 7, network node E decapsulates the outer Ethernet header and obtains the destination IP address (the IP address of network node W) from the inner IP header. Network node E searches the FIB for a matching destination IP address and obtains the next-hop information contained in that FIB entry. This next-hop information indicates a tunnel forwarding table entry. This tunnel forwarding table entry contains the IP address (IP_C) of network node C at the other end of the tunnel, the IP address and MAC address (MAC_D) of the next-hop node (network node D), and the outgoing interface identifier (the identifier of the interface on network node E connected to network node D). Network node E encapsulates a tunnel header on the outer layer of service packet 7 after decapsulating the Ethernet header. The destination IP address in the tunnel header is IP_C. Then, it encapsulates an Ethernet header on the outer layer of the tunnel header to obtain service packet 8. The destination MAC address in the encapsulated Ethernet header is MAC_D. Network node E forwards service packet 8 to network node D through the outgoing interface indicated by the outgoing interface identifier in the tunnel forwarding table, based on MAC_D. It should be noted that, Figure 11 The code only shows the destination IP address (IP_C) in the tunnel header, omitting other information included in the tunnel header.
[0180] After receiving service packet 8, network node D decapsulates the outermost Ethernet header of service packet 8. Then, network node D searches the FIB (Fixed Instructions for Portable Nodes) for a matching destination IP address in the tunnel header, obtains the next-hop IP address included in that FIB entry, and then searches the ARP table for the MAC address corresponding to that next-hop IP address, which is the MAC address (MAC_C) of network node C. Network node D then encapsulates the decapsulated service packet 8 with an Ethernet header, resulting in service packet 9. The destination MAC address of the encapsulated Ethernet header is MAC_C. Network node D forwards service packet 9 to network node C based on MAC_C.
[0181] After receiving service packet 9, network node C decapsulates the outermost Ethernet header of service packet 9. Then, network node C determines that the destination IP address (IP_C) in the tunnel header is its own IP address, so network node C decapsulates the tunnel header of service packet 9. Next, network node C obtains the destination IP address (the IP address of network node W) from the inner IP header. Network node C searches the FIB for a matching entry for network node W's IP address. It then retrieves the next-hop IP address included in that FIB entry. Next, it searches the ARP table for the MAC address corresponding to the next-hop IP address, which is network node W's MAC address (MAC_W). Network node C then encapsulates the Ethernet header and tunnel header of service packet 9 with an outer layer of Ethernet header, resulting in service packet 10. The destination MAC address of the encapsulated Ethernet header is MAC_W. Network node C forwards service packet 10 to network node W based on MAC_W.
[0182] This completes the forwarding of the service message from network node Z to network node W.
[0183] exist Figure 11 In the ring network topology shown, if the link between network node D and network node C fails, for service flow 2, the process of network node Z forwarding service message 7 to network node E is the same as before, and will not be repeated here.
[0184] After subsequent service packets enter the ring network topology, the service packet forwarding scheme provided in this application embodiment is adopted. A pre-configured tunnel exists between network node E and network node C. After receiving service packet 7, network node E marks service packet 7 as an inbound packet because the ingress interface of service packet 7 is connected to network node Y outside the ring network topology. The outer Ethernet header is decapsulated to obtain the destination IP address (IP address of network node W) in the inner IP header. Network node E searches for the FIB entry matching the destination IP address and obtains the next-hop information and forwarding attribute values contained in the FIB entry. The next-hop information indicates the tunnel forwarding table entry. This tunnel forwarding table entry contains the IP address (IP_C) of network node C located at the other end of the tunnel, the IP address and MAC address (MAC_D) of the next-hop node (network node D), and the outgress interface identifier. The outgoing interface identifier indicates the outgoing interface (referred to as outgoing interface 5) on network node E that connects to network node D. Network node E determines that outgoing interface 5 is in the UP state, and the obtained forwarding attribute value is the first value. Furthermore, service packet 7 is marked as an inbound packet, indicating that the service packet needs to be forwarded through outgoing interface 5 in the ring network topology. Therefore, network node E encapsulates a tunnel header on the outer layer of service packet 7 after decapsulating the Ethernet header. The destination IP address in the tunnel header is IP_C. Then, it encapsulates an Ethernet header on the outer layer of the tunnel header to obtain service packet 8. The destination MAC address in the encapsulated Ethernet header is MAC_D. Network node E forwards service packet 8 to network node D through outgoing interface 5, based on MAC_D.
[0185] After receiving service packet 8, network node D, based on the connection between the ingress interface of service packet 8 and network node E within the ring network topology, marks service packet 8 as an in-ring packet. Network node D then decapsulates the outermost Ethernet header of service packet 8 and looks up the FIB entry based on the IP_C in the tunnel header. From the found FIB entry, it retrieves the outgress interface identifier and forwarding attribute values. This outgress interface identifier indicates the outgress interface (referred to as outgress interface 6) on network node D connected to network node C. Network node D determines that outgress interface 6 is in a DOWN state, and since the obtained forwarding attribute value is the first value, and service packet 8 is marked as an in-ring packet, it means that the service packet needs to be forwarded using other outgress interfaces in the ring interface group to which outgress interface 6 belongs within the ring network topology. Therefore, network node D determines that the interface belonging to the same ring interface group as outgress interface 6 is the outgress interface (referred to as outgress interface 7) on network node D connected to network node E. Network node D encapsulates an Ethernet header around service packet 8 after decapsulating the Ethernet header. The destination MAC address of the encapsulated Ethernet header is a preset MAC address, resulting in service packet 11. Since service packets 9 and 10 existed in the previous example, this service packet is referred to as service packet 11 for distinction. Network node D forwards service packet 11 to network node E through outgoing interface 7.
[0186] After receiving service packet 11 through the ingress interface connected to network node D, network node E determines that the destination MAC address of service packet 11 is the preset MAC address. Therefore, service packet 11 is marked as a wraparound packet. Network node E decapsulates the outermost Ethernet header of service packet 11. Network node E looks up the FIB entry based on the destination IP address (IP_C) in the tunnel header and obtains the forwarding attribute value from the found FIB entry. The obtained forwarding attribute value is the first value, and service packet 11 is marked as a wraparound packet, which means that the packet needs to be forwarded using other interfaces in the ring interface group to which the ingress interface belongs in the ring network topology. Then, network node E determines the interface that belongs to the same ring interface group as the ingress interface, namely the egress interface (referred to as egress interface 8) connected to network node F on network node E. Network node E encapsulates the outermost Ethernet header of service packet 11 after decapsulation, and the destination MAC address of the encapsulated Ethernet header is the preset MAC address, resulting in service packet 12. Network node E forwards service message 12 to network node F through outgoing interface 8.
[0187] Subsequently, network nodes F, G, H, A, and B use a forwarding method similar to that of network node E to forward service packets along network nodes F, G, H, A, and B to network node C.
[0188] After receiving service packet m forwarded by network node B, network node C determines that the destination MAC address of service packet m is a preset MAC address. Therefore, it marks service packet m as a wraparound packet. Network node C decapsulates the outermost Ethernet header of service packet m. Network node C determines that the destination IP address in the tunnel header is its own IP address (IP_C), so it decapsulates the tunnel header in service packet m to obtain the destination IP address in the inner IP header (the IP address of network node W). Network node C looks up the FIB entry based on the destination IP address in the inner IP header, and obtains the forwarding attribute value, outgoing interface identifier, and next-hop IP address from the found FIB entry. The obtained forwarding attribute value is the second value, and service packet m is marked as a wraparound packet, indicating that a next-hop forwarding is required. Therefore, network node C looks up the MAC address corresponding to the next-hop IP address obtained from the FIB entry in the ARP table, which is the MAC address of network node W, MAC_W. After decapsulating the Ethernet header and tunnel header, the service packet m is encapsulated with an Ethernet header. The destination MAC address of the encapsulated Ethernet header is MAC_W, resulting in service packet m+1. Network node C forwards service packet m+1 to network node W through the outgoing interface (the interface connected to network node W) indicated by the outgoing interface identifier obtained from the FIB entry, based on MAC_W.
[0189] Thus, the forwarding of service packets from network node Z to network node W in the event of a link failure has been completed using the above methods.
[0190] In other words, the ring network topology enables the forwarding of underlay and overlay flows when the link is normal and when the link is abnormal.
[0191] In another embodiment of this application, the first node further performs the following steps P-R to configure the value of the forwarding attribute in the FIB entry.
[0192] Step P: If the interface indicated by the outgoing interface identifier in any FIB entry is connected to other nodes on the ring network topology besides the first node mentioned above, then configure the value of the forwarding attribute in any of the above FIB entries to the first value.
[0193] If the interface indicated by the outgoing interface identifier in the FIB entry is connected to other nodes in the ring network topology besides the first node mentioned above, it means that the packets forwarded from this outgoing interface are still in the ring network topology. That is, the packets can be forwarded on the ring through this interface. Therefore, the value of the forwarding attribute in this FIB entry is configured to the first value, which is used to indicate on-ring forwarding.
[0194] Step Q: If the interface indicated by the outgoing interface identifier in any FIB entry is connected to a node outside the ring network topology, then configure the value of the forwarding attribute in any of the above FIB entries to the second value.
[0195] If the outgoing interface identifier in the FIB entry indicates that the interface is connected to a node outside the ring network topology, it means that the packets forwarded from this interface are not in the ring network topology. In other words, the packets can be forwarded to the next ring through this interface. Therefore, the value of the forwarding attribute in this FIB entry is configured to the second value, which is used to indicate the next ring forwarding.
[0196] Step R: When updating the FIB entries in the above FIB, obtain the cost (COST) values of the routing entries corresponding to the FIB entries before and after the update. If the COST value of the updated FIB entry is not less than the COST value of the FIB entry before the update, then configure the forwarding attribute value in the updated FIB entry to the third value.
[0197] The first node performs real-time route calculations based on the current network state, ensuring that the calculated routes match the actual network conditions. In the event of a fault in the ring network topology, the first node recalculates a new forwarding path that avoids the faulty section, updating the routing table entries and subsequently the FIB table entries.
[0198] The first node follows the shortest path principle when performing route calculations. If a fault occurs in the ring network topology, the shortest path from the first node to the destination address becomes unavailable. The first node will recalculate a new shortest path to that destination address and update its FIB entry to avoid the faulty portion of the ring network topology during subsequent packet forwarding.
[0199] If the cost value of the updated FIB entry is greater than or equal to the cost value of the original FIB entry, the first node will configure the forwarding attribute value in the updated FIB entry to the third value, which indicates the wraparound protection status. Thus, after a ring network topology failure, the first node can forward packets based on this third value, avoiding the occurrence of tangent micro-loops during packet forwarding in the new shortest path.
[0200] The following describes the causes of the tangential microring problem and the methods for solving the tangential microring problem in the embodiments of this application.
[0201] When using TI-LFA FRR technology to handle faults in ring network topologies, a tangential micro-ring problem exists. Specifically, the following text... Figure 12 and Figure 13 Describe the specific meaning of the tangential microring.
[0202] See Figure 12 This is a schematic diagram of the first tangential microring in the related technology.
[0203] Figure 12 The structure of the network and Figure 1 Same. Solid arrows indicate the forwarding path when a message is forwarded normally, while dashed arrows indicate the forwarding path during fault handling.
[0204] Depend on Figure 12 As can be seen, when network node Y sends a message to network node X, the message is initially forwarded from network node Y to network node G, and then from network node G to network node H. Due to a link failure between network node H and network node A, after network node H updates its FIB entry, it forwards the message according to the updated FIB entry. That is, network node H will forward the message clockwise to network node G along dashed arrow 1. However, if network node G's FIB entry has not yet been updated, network node G will still forward the message according to the original FIB entry, that is, it will send the message to network node H again along dashed arrow 2. This creates a loop between network node G and network node H. The message will be forwarded uselessly, resulting in a tangent micro-loop problem.
[0205] See Figure 13 This is a schematic diagram of the second type of tangential microring in the related technology.
[0206] Figure 13 The structure of the network and Figure 1 Same. Solid arrows indicate the forwarding path when a message is forwarded normally, while dashed arrows indicate the forwarding path during fault handling.
[0207] Depend on Figure 13 As can be seen, when network node Y sends a message to network node X, the message is initially forwarded from network node Y to network node G. Due to a link failure between network node G and network node H, after network node G updates its FIB entry, it forwards the message according to the updated FIB entry. That is, network node G will forward the message clockwise to network node F along dashed arrow 1. However, if network node F's FIB entry has not yet been updated, network node F will still forward the message to network node X according to the original FIB entry, following the shortest path, which means it will again send the message to network node G along dashed arrow 2. This creates a loop between network node G and network node F. In other words, due to the asynchronous updates of FIB entries between network nodes, messages are forwarded unnecessarily, resulting in a tangent micro-loop problem.
[0208] To address the aforementioned issue of tangential microrings, the TI-LFA FRR technology requires an additional tangential anti-microring mechanism, further increasing the complexity of the TI-LFA FRR technology.
[0209] In this embodiment of the application, to solve the problem of tangential micro-rings, see [link to relevant documentation]. Figure 14 The present invention provides a schematic flowchart of a tangential anti-micro-ring process, including the following steps S1401-S1403.
[0210] S1401: Receive the seventh message sent by the eighth node.
[0211] The seventh message mentioned above includes the IP address of the fourth destination.
[0212] S1402: Based on the aforementioned fourth destination IP address, obtain the fourth FIB entry that matches the aforementioned fourth destination IP address from the aforementioned FIB.
[0213] The aforementioned fourth FIB entry contains a third outgoing interface identifier and a fourth forwarding attribute, with the third outgoing interface identifier indicating the seventh interface.
[0214] S1403: If the value of the fourth forwarding attribute is the third value, then the eighth message is forwarded to the ninth node through the seventh interface.
[0215] The sixth destination MAC address included in the eighth message is the preset MAC address, so that the ninth node forwards the eighth message according to the preset MAC address.
[0216] If the value of the fourth forwarding attribute is the third value, it indicates that the fourth FIB entry is in the wraparound protection state. In this case, when the first node receives the seventh message, after decapsulating the Ethernet header of the seventh message, it encapsulates the seventh message with an Ethernet header whose destination MAC address is a preset MAC address to obtain the eighth message, indicating that the eighth message is a wraparound message, and forwards the eighth message to the ninth node through the seventh interface.
[0217] If the network node receiving the eighth packet is a loopback node, and if the FIB entry in the loopback node is not updated, after receiving the eighth packet, it can determine that the eighth packet is a loopback packet based on the preset MAC address in the Ethernet header, and then proceed according to the previous steps. Figure 7 The illustrated embodiment forwards the wraparound message. Figure 7 In the illustrated embodiment, when forwarding wraparound packets, the packet is not forwarded according to the outgoing interface indicated by the outgoing interface identifier recorded in the FIB entry. Therefore, packet forwarding can still be performed even if the FIB entry is not updated. If the FIB entry in the wraparound node has been updated, the wraparound node will forward the packet according to the outgoing interface identifier recorded in the FIB entry. Figure 14The illustrated embodiment can also achieve packet forwarding. Furthermore, if the network node receiving the eighth packet is a downstream node, after receiving the eighth packet and determining that it is a wraparound packet based on the preset MAC address in the Ethernet header, if the downstream node's FIB entry is not updated, it can proceed as described above. Figure 8 The illustrated embodiment forwards data to network nodes outside the ring network topology via the outgoing interface identifier indicated by the outgoing interface recorded in the FIB entry. If the FIB entry in the next node has been updated, the next node proceeds according to... Figure 14 The illustrated embodiment can also achieve message forwarding.
[0218] As can be seen, the embodiments of this application can avoid the problem of tangent micro-loops caused by asynchronous FIB updates of different network nodes.
[0219] For example, in the aforementioned Figure 12 In the illustrated embodiment, the FIB entry for network node H has been updated, while the FIB entry for network node G has not. To avoid a faulty link between network node H and network node A, the outgoing interface identifier in the updated FIB entry of network node H should indicate the interface with network node G. Therefore, network node H, based on the preceding... Figure 14 In the illustrated embodiment, a message is sent to network node G based on the updated FIB entry. The destination MAC address of this message is a preset MAC address. After receiving the message, network node G follows the steps outlined above. Figure 8 The illustrated embodiment continues to forward packets to network node F, thereby avoiding the problem of a loop forming between network node H and network node G.
[0220] See Figure 15 This is a schematic diagram of the fifth type of message forwarding in a ring network fault provided in the embodiments of this application.
[0221] Figure 15 The network structure shown is similar to Figure 1 Same, and Figure 15 and Figure 1 The scenarios are all about sending messages from network node Y to network node X. And... Figure 15 In the network, the link between network node H and network node A is faulty. Assume... Figure 15In this case, the FIB entry of network node G, which is the ingress link, has been updated. To avoid the faulty link between network node H and network node A, the interface indicated by the outgoing interface identifier in the updated FIB entry should be the interface between network node G and network node F. Therefore, network node G, as the first node, after receiving the seventh packet, first decapsulates the Ethernet header of the seventh packet, then encapsulates an Ethernet header with the destination MAC address set to a preset MAC address (i.e., MAC_P in the diagram), obtaining the eighth packet, and forwards the eighth packet to network node F. Subsequently, after receiving the eighth packet, network node F will forward the packet to network node E according to the aforementioned steps S404-S406, instead of... Figure 13 As shown, the message is forwarded to network node G. This avoids the problem of a loop forming between network node F and network node G.
[0222] As can be seen from the above, when a fault occurs in the ring network topology using the solution provided in this application embodiment, the first node forwards the message according to the FIB entry of the wraparound protection state, and other network nodes forward the message in the aforementioned manner. This method can achieve tangential anti-micro-ring.
[0223] Furthermore, after the fault is recovered, the packet forwarding path will revert to the path before the fault. Since different network nodes converge their routes at different speeds, the forwarding paths indicated by FIB entries in some network nodes will be the forwarding paths after the fault, while those in other network nodes will be the forwarding paths before the fault. This can cause a forwarding loop to form before the fault, resulting in a back-cutting micro-loop problem.
[0224] See Figure 16 This is a schematic diagram of a back-cutting micro-ring in related technologies.
[0225] Figure 16 The network structure shown is similar to Figure 1 Same. And... Figure 16 A link failure between network node H and network node A causes the routes of all network nodes in the network to converge again, and the generated forwarding paths avoid the link between network node H and network node A.
[0226] Therefore, for a message sent to network node X, after route reconvergence, the interface indicated by the outgoing interface identifier recorded in the FIB table of network node H should be the interface connected to network node G. The interface indicated by the outgoing interface identifier recorded in the FIB table of network node G should be the interface connected to network node F.
[0227] Based on this, the "√" symbol in the diagram indicates that the link between network node H and network node A has returned to normal. Then, the routes of each network node need to be reconverged. For a message sent to network node X, if the route of network node G converges first, the interface indicated by the outgoing interface identifier recorded in network node G is the interface connected to network node H. However, if the route of network node H has not yet reconverged, the interface indicated by the outgoing interface identifier recorded in network node H will still be the interface connected to network node G.
[0228] Therefore, the destination MAC address of the message sent by network node G to network node H is MAC_H, and the destination MAC address of the message sent by network node H to network node G is MAC_G. This creates a loop in the network, resulting in the problem of backtracking micro-loops.
[0229] To solve the above problem, see Figure 17 This application provides a schematic diagram of a back-cutting anti-micro-ring process, including the following steps S1701-S1702.
[0230] S1701: If it is determined that the eighth interface has recovered from the DOWN state to the UP state, or a first routing protocol message is received through the eighth interface, then route recovery is performed and the FIB entries in the FIB are updated.
[0231] Among them, the eighth interface is the interface of the first node. The recovery of the eighth interface means that the interface of the first node itself is restored. The first node needs to perform route recovery and update the FIB table entries.
[0232] In addition, receiving the first routing protocol message through the eighth interface means that other nodes instruct the first node to perform route recovery and update the FIB table entries.
[0233] The aforementioned first routing protocol message can be a BGP (Border Gateway Protocol) message or an IGP (Interior Gateway Protocol) message.
[0234] S1702: Send a second routing protocol message to the tenth node on the above ring network topology through the ninth interface, so that the tenth node can perform route recovery and update the FIB table entries in its local FIB after receiving the second routing protocol message.
[0235] Among them, the eighth interface and the ninth interface belong to the same ring interface group, and the second routing protocol message is generated based on the FIB table entry updated by the first node.
[0236] After the first node completes the FIB entry update, a second routing protocol message is sent to the tenth node so that the tenth node can update its FIB entry, thereby controlling the tenth node's FIB entry update to be performed after the first node.
[0237] by Figure 16 Taking the scenario shown as an example, the ring interface of network node H (i.e., the interface on network node H that connects to network node A) has recovered from a failure. In this case, network node H first determines that the eighth interface has recovered from the DOWN state to the UP state. Therefore, network node H first executes step S1701 to perform route recovery and update the FIB table entry. For packets sent to network node X, the interface indicated by the outgoing interface identifier in the updated FIB table entry is changed to the interface on network node H that is connected to network node A. Then, network node H executes step S1702 to send a routing protocol message through the ninth interface (i.e., the interface other than the ring interface that has recovered from the failure in the ring interface group). Since the ring interface that has recovered from the failure is the interface on network node H that is connected to network node A, the corresponding ninth interface is the interface on network node H that is connected to network node G. That is, network node H sends a routing protocol message to network node G.
[0238] At this time, Figure 16 In the scenario shown, only the route to network node H is restored. The FIB entries for network node B-network node G remain the FIB entries calculated after the link failure between network node H and network node A. (As mentioned earlier...) Figure 15 As described, after a link failure between network node H and network node A, the updated FIB entry in network node G indicates the interface between network node G and network node F. Therefore, when network node G needs to send a message to network node X, network node G will still forward the message to network node F, network node F will forward the message to network node E, and so on. The message can still be forwarded clockwise to network node A, and then to network node X. It is clear that no back-loop issue will occur in this process.
[0239] Subsequently, network node G receives the routing protocol message sent by network node H. As the first node, it executes step S1701 to restore the route and update the FIB entry. For the message destined for network node X, the updated FIB entry indicates the outgoing interface as the interface on network node G connected to network node H. Then, network node G executes step S1702, sending the routing protocol message through the ninth interface (i.e., the interface in the ring interface group other than the interface that receives the routing protocol message). Since the interface on network node G that receives the routing protocol message is the interface on network node G connected to network node H, the corresponding ninth interface is the interface on network node G connected to network node F. In other words, network node G sends the routing protocol message to network node F.
[0240] In this scenario, since the routes for both network nodes G and H are restored, for packets destined for network node X, network node G forwards the packet to network node H, network node H then forwards the packet to network node A, and finally network node A sends the packet to network node X. This achieves packet forwarding without encountering the issue of backtracking micro-loops.
[0241] After network node G recovers its route, it sends a routing protocol message to network node F. After network node F recovers its route, it sends a routing protocol message to network node E. This process continues, with route recovery performed sequentially from downstream to upstream in the order of message forwarding direction before the failure (i.e., counterclockwise), thus avoiding the problem of back-cutting micro-loops.
[0242] As can be seen from the above, in the scheme provided by the embodiments of this application, each network node can perform route recovery in the order from downstream to upstream according to the packet forwarding direction before the failure, thereby avoiding the problem of back-cutting micro-loops.
[0243] Corresponding to the aforementioned ring network fault handling method, this application embodiment also provides a ring network fault handling device.
[0244] See Figure 18 This application provides a ring network fault handling device, applied to a first node, which is located on a ring network topology. The device includes:
[0245] The first message receiving module 1801 is used to receive a first message sent by the second node, the first message including a first destination IP address;
[0246] The first entry acquisition module 1802 is used to acquire a first FIB entry matching the first destination IP address from the forwarding information table FIB according to the first destination IP address. The first FIB entry includes a first outgoing interface identifier and a first forwarding attribute. The first outgoing interface identifier indicates a first interface.
[0247] The first message forwarding module 1803 is used to forward a second message to a third node in the ring network topology through a second interface if the value of the first forwarding attribute is a first value and the first interface is in a disconnected state. The second message includes a first destination MAC address that is a preset MAC address, so that the third node forwards the second message according to the preset MAC address.
[0248] The first interface and the second interface belong to the same ring interface group.
[0249] In this embodiment, after receiving a first packet, the first node in the ring network topology retrieves a first FIB entry from the FIB that matches the first destination IP address of the first packet. This first FIB entry contains a first forwarding attribute and a first outgoing interface identifier. If the value of the first forwarding attribute is a first value, it indicates that the packet needs to be forwarded on the ring, meaning the first node needs to forward the packet to other nodes in the ring network topology. In this case, if the first interface indicated by the first outgoing interface identifier is in a DOWN state, the first node cannot send packets through the first interface. Since both the first and second interfaces belong to the ring interface group, they are interfaces on the first node connected to network nodes in the ring network topology. Changing the first interface for forwarding the first packet to the second interface is equivalent to changing the packet forwarding direction. Because the network nodes in the ring network topology are connected in a ring, packet forwarding can still be completed normally even if the forwarding direction is changed. Furthermore, by handling network faults using the method described in this embodiment, the first node does not need to calculate complex backup paths and backup outgoing interfaces; it only needs to forward packets according to the ring interface group during the packet forwarding process. It can handle ring network faults in a simple way without consuming a lot of network node resources.
[0250] In one embodiment of this application, the apparatus further includes:
[0251] The second message receiving module is used to receive a third message sent by the fourth node through the third interface. The third message includes a second destination MAC address and a second destination IP address.
[0252] The second entry acquisition module is used to acquire a second FIB entry that matches the second destination IP address from the FIB when the second destination MAC address is the preset MAC address. The second FIB entry includes a second forwarding attribute.
[0253] The second message forwarding module is used to forward a fourth message to the fifth node in the ring network topology through the fourth interface if the value of the second forwarding attribute is the first value. The third destination MAC address included in the fourth message is the preset MAC address, so that the fifth node forwards the fourth message according to the preset MAC address.
[0254] The third interface and the fourth interface belong to the same ring interface group.
[0255] As can be seen from the above, in this embodiment, after receiving a third packet with a destination MAC address that is a preset MAC address, the first node can determine that the third packet is a packet forwarded under fault conditions. Furthermore, the value of the second forwarding attribute being the first value indicates that the packet needs to be forwarded within the ring network topology. Therefore, the first node forwards the packet to the fourth interface, which belongs to the same ring interface group as the incoming interface. Thus, even if the first node does not record the backup path and backup outgoing interface, it can still forward the packet upon receiving the third packet. The first node still does not need to calculate complex backup paths and backup outgoing interfaces; it only needs to forward the packet according to the ring interface group during the packet forwarding process. This does not consume a large amount of network node resources and enables ring network fault handling in a simple way.
[0256] In one embodiment of this application, the apparatus further includes:
[0257] The third message receiving module is used to receive the fifth message sent by the sixth node through the fifth interface. The fifth message includes the third destination IP address and the fourth destination MAC address.
[0258] The third entry acquisition module is used to acquire a third FIB entry that matches the third destination IP address from the FIB when the fourth destination MAC address is the preset MAC address. The third FIB entry includes a third forwarding attribute and a second outgoing interface identifier, and the second outgoing interface identifier indicates a sixth interface.
[0259] The third message forwarding module is used to forward a sixth message to a seventh node outside the ring network topology through the sixth interface if the value of the third forwarding attribute is the second value. The fifth destination MAC address included in the sixth message is the MAC address of the seventh node.
[0260] As can be seen from the above, in this embodiment, after receiving a third packet with a destination MAC address that is a preset MAC address, the first node can determine that the third packet is a packet forwarded under fault conditions. Furthermore, the value of the second forwarding attribute being the first value indicates that the packet needs to be forwarded within the ring network topology. Therefore, the first node forwards the packet to the fourth interface, which belongs to the same ring interface group as the incoming interface. Thus, even if the first node does not record the backup path and backup outgoing interface, it can still forward the packet upon receiving the third packet. The first node still does not need to calculate complex backup paths and backup outgoing interfaces; it only needs to forward the packet according to the ring interface group during the packet forwarding process. This does not consume a large amount of network node resources and enables ring network fault handling in a simple way.
[0261] In one embodiment of this application, the apparatus further includes:
[0262] The first interface group determination module is used to determine the interface group on the first ring to which the first interface belongs;
[0263] The first interface determination module is used to determine the interfaces in the interface group on the first ring other than the first interface as the second interface.
[0264] In one embodiment of this application, the apparatus further includes:
[0265] The second interface group determination module is used to determine the interface group on the second ring to which the third interface belongs;
[0266] The second interface determination module is used to determine the interfaces in the interface group on the second ring, excluding the third interface, as the fourth interface.
[0267] In one embodiment of this application, the apparatus further includes:
[0268] The first message marking module is used to mark the first message as an in-loop message if the ingress interface receiving the first message is connected to a node on the ring network topology.
[0269] The second message marking module is used to mark the first message as an inbound message if the inbound interface receiving the first message is connected to a node outside the ring network topology.
[0270] The first message forwarding module 1803 is specifically used to forward a second message to a third node in the ring network topology through a second interface if the value of the first forwarding attribute is a first value, the first interface is in a DOWN state, and the first message is marked as an in-loop message or an in-loop message. The second message includes a first destination MAC address that is a preset MAC address, so that the third node forwards the second message according to the preset MAC address.
[0271] In one embodiment of this application, the apparatus further includes:
[0272] The third message marking module is used to mark the third message as a wraparound message when the second destination MAC address is determined to be the preset MAC address;
[0273] The second message forwarding module is specifically used for:
[0274] If the value of the second forwarding attribute is the first value, and the third message is marked as a wraparound message, then the fourth message is forwarded to the fifth node in the ring network topology through the fourth interface. The third destination MAC address included in the fourth message is the preset MAC address, so that the fifth node forwards the fourth message according to the preset MAC address.
[0275] In one embodiment of this application, the apparatus further includes:
[0276] The fourth message marking module is used to mark the fifth message as a wraparound message when the fourth destination MAC address is determined to be the preset MAC address;
[0277] The third message forwarding module is specifically used for:
[0278] If the value of the third forwarding attribute is the second value, and the fifth message is marked as a wraparound message, then the sixth message is forwarded to the seventh node outside the ring network topology through the sixth interface.
[0279] In one embodiment of this application, the apparatus further includes:
[0280] An interface group creation module is used to create an on-ring interface group, wherein the on-ring interface group includes interface identifiers for at least two interfaces, both of which belong to the first node and are connected to other nodes in the ring network topology other than the first node.
[0281] In one embodiment of this application, the apparatus further includes:
[0282] The fourth message receiving module is used to receive the seventh message sent by the eighth node, the seventh message including the fourth destination IP address;
[0283] The fourth entry acquisition module is used to acquire a fourth FIB entry that matches the fourth destination IP address from the FIB. The fourth FIB entry contains a third outgoing interface identifier and a fourth forwarding attribute. The third outgoing interface identifier indicates the seventh interface.
[0284] The fourth message forwarding module is used to forward an eighth message to the ninth node through the seventh interface if the value of the fourth forwarding attribute is the third value. The sixth destination MAC address included in the eighth message is the preset MAC address, so that the ninth node forwards the eighth message according to the preset MAC address.
[0285] As can be seen from the above, when a fault occurs in the ring network topology using the solution provided in this application embodiment, the first node forwards the message according to the FIB entry of the wraparound protection state, and other network nodes forward the message in the aforementioned manner. This method can achieve tangential anti-micro-ring.
[0286] In one embodiment of this application, the apparatus further includes:
[0287] The first value configuration module is used to configure the value of the forwarding attribute in any FIB entry as the first value if the interface indicated by the outgoing interface identifier contained in any FIB entry is connected to other nodes on the ring network topology other than the first node.
[0288] The second value configuration module is used to configure the value of the forwarding attribute in any FIB entry as the second value if the interface indicated by the outgoing interface identifier contained in any FIB entry is connected to a node outside the ring network topology.
[0289] The third value configuration module is used to obtain the cost COST values of the routing entries corresponding to the FIB entries before and after the update when updating the FIB entries. If the COST value corresponding to the updated FIB entries is not less than the COST value corresponding to the FIB entries before the update, the value of the forwarding attribute in the updated FIB entries is configured as the third value.
[0290] In one embodiment of this application, the apparatus further includes:
[0291] The entry update module is used to perform route recovery and update the FIB entries in the FIB if it is determined that the eighth interface has recovered from the DOWN state to the UP state, or if a first routing protocol message is received through the eighth interface.
[0292] The protocol message sending module is used to send a second routing protocol message to the tenth node on the ring network topology through the ninth interface, so that the tenth node can perform route recovery and update the FIB table entries in the local FIB after receiving the second routing protocol message.
[0293] The eighth interface and the ninth interface belong to the same ring interface group, and the second routing protocol message is generated based on the FIB table entry updated by the first node.
[0294] As can be seen from the above, in the scheme provided by the embodiments of this application, each network node can perform route recovery in the order from downstream to upstream according to the packet forwarding direction before the failure, thereby avoiding the problem of back-cutting micro-loops.
[0295] In one embodiment of this application, the preset MAC address is a unicast preset MAC address or a multicast preset MAC address, and the unicast preset MAC address is different from the multicast preset MAC address.
[0296] Corresponding to the aforementioned ring network fault handling method, this application embodiment also provides a network node.
[0297] See Figure 19This is a schematic diagram of a network node provided in an embodiment of this application. The network node is located in a ring network topology as a first node, and the network node includes:
[0298] Processor 1901;
[0299] Transceiver 1904;
[0300] Machine-readable storage medium 1902 stores machine-executable instructions that can be executed by the processor; the machine-executable instructions cause the processor to perform any of the method steps in the ring network fault handling method.
[0301] like Figure 19 As shown, the network device may also include a communication bus 1903. The processor 1901, machine-readable storage medium 1902, and transceiver 1904 communicate with each other via the communication bus 1903. The communication bus 1903 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 1903 can be divided into an address bus, a data bus, a control bus, etc.
[0302] Transceiver 1904 can be a wireless communication module. Under the control of processor 1901, transceiver 1904 interacts with other devices for data exchange.
[0303] Machine-readable storage medium 1902 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Alternatively, machine-readable storage medium 1902 may also be at least one storage device located remotely from the aforementioned processor.
[0304] The processor 1901 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0305] In this embodiment, after receiving a first packet, the first node in the ring network topology retrieves a first FIB entry from the FIB that matches the first destination IP address of the first packet. This first FIB entry contains a first forwarding attribute and a first outgoing interface identifier. If the value of the first forwarding attribute is a first value, it indicates that the packet needs to be forwarded on the ring, meaning the first node needs to forward the packet to other nodes in the ring network topology. In this case, if the first interface indicated by the first outgoing interface identifier is in a DOWN state, the first node cannot send packets through the first interface. Since both the first and second interfaces belong to the ring interface group, they are interfaces on the first node connected to network nodes in the ring network topology. Changing the first interface for forwarding the first packet to the second interface is equivalent to changing the packet forwarding direction. Because the network nodes in the ring network topology are connected in a ring, packet forwarding can still be completed normally even if the forwarding direction is changed. Furthermore, by handling network faults using the method described in this embodiment, the first node does not need to calculate complex backup paths and backup outgoing interfaces; it only needs to forward packets according to the ring interface group during the packet forwarding process. It can handle ring network faults in a simple way without consuming a lot of network node resources.
[0306] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described ring network fault handling methods.
[0307] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the ring network fault handling methods described in the above embodiments.
[0308] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0309] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0310] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for apparatus, network nodes, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0311] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A method for handling ring network faults, characterized in that, Applied to a first node, which is located on a ring network topology, the method includes: Receive a first message sent by the second node, the first message including a first destination IP address; Based on the first destination IP address, obtain the first FIB entry that matches the first destination IP address from the forwarding information table FIB. The first FIB entry includes a first outgoing interface identifier and a first forwarding attribute. The first outgoing interface identifier indicates the first interface. If the value of the first forwarding attribute is the first value and the first interface is in a DOWN state, then the second packet is forwarded to the third node in the ring network topology through the second interface. The first destination MAC address included in the second packet is a preset MAC address, so that the third node forwards the second packet according to the preset MAC address. The first interface and the second interface belong to the same ring interface group.
2. The method according to claim 1, characterized in that, The method further includes: The third message sent by the fourth node is received through the third interface. The third message includes the second destination MAC address and the second destination IP address. When the second destination MAC address is the preset MAC address, a second FIB entry matching the second destination IP address is obtained from the FIB, and the second FIB entry includes a second forwarding attribute; If the value of the second forwarding attribute is the first value, then the fourth packet is forwarded to the fifth node in the ring network topology through the fourth interface. The third destination MAC address included in the fourth packet is the preset MAC address, so that the fifth node forwards the fourth packet according to the preset MAC address. The third interface and the fourth interface belong to the same ring interface group.
3. The method according to claim 1, characterized in that, The method further includes: The fifth message sent by the sixth node is received through the fifth interface. The fifth message includes the third destination IP address and the fourth destination MAC address. When the fourth destination MAC address is the preset MAC address, a third FIB entry matching the third destination IP address is obtained from the FIB. The third FIB entry includes a third forwarding attribute and a second outgoing interface identifier, and the second outgoing interface identifier indicates a sixth interface. If the value of the third forwarding attribute is the second value, then the sixth message is forwarded to the seventh node outside the ring network topology through the sixth interface, and the fifth destination MAC address included in the sixth message is the MAC address of the seventh node.
4. The method according to claim 1, characterized in that, Before forwarding the second message to the third node in the ring network topology via the second interface, the method further includes: Determine the interface group on the first ring to which the first interface belongs; The interfaces in the interface group on the first ring, excluding the first interface, are designated as the second interfaces.
5. The method according to claim 2, characterized in that, Before forwarding the fourth message to the fifth node in the ring network topology via the fourth interface, the method further includes: Determine the interface group on the second ring to which the third interface belongs; The interface in the second ring interface group other than the third interface is designated as the fourth interface.
6. The method according to claim 1, characterized in that, After receiving the first message sent by the second node, the method further includes: If the ingress interface receiving the first message is connected to a node on the ring network topology, then the first message is marked as an in-ring message; If the ingress interface receiving the first message is connected to a node outside the ring network topology, then the first message is marked as an ingress message. If the value of the first forwarding attribute is a first value, and the first interface is in a DOWN state, then the second packet is forwarded to the third node in the ring network topology through the second interface, including: If the value of the first forwarding attribute is the first value, and the first interface is in the DOWN state, and the first packet is marked as an in-loop packet or an in-loop packet, then the second packet is forwarded to the third node in the ring network topology through the second interface.
7. The method according to claim 2, characterized in that, After receiving the third message sent by the fourth node through the third interface, the process further includes: When the second destination MAC address is determined to be the preset MAC address, the third message is marked as a wraparound message; If the value of the second forwarding attribute is the first value, then the fourth packet is forwarded to the fifth node in the ring network topology through the fourth interface, including: If the value of the second forwarding attribute is the first value, and the third message is marked as a wraparound message, then the fourth message is forwarded to the fifth node in the ring network topology through the fourth interface.
8. The method according to claim 3, characterized in that, After receiving the fifth message sent by the sixth node through the fifth interface, the process further includes: When the fourth destination MAC address is determined to be the preset MAC address, the fifth message is marked as a wraparound message; If the value of the third forwarding attribute is the second value, then the sixth message is forwarded to the seventh node outside the ring network topology through the sixth interface, including: If the value of the third forwarding attribute is the second value, and the fifth message is marked as a wraparound message, then the sixth message is forwarded to the seventh node outside the ring network topology through the sixth interface.
9. The method according to any one of claims 1-8, characterized in that, Before receiving the first message sent by the second node, the method further includes: Create an on-ring interface group, which includes interface identifiers for at least two interfaces, both of which belong to the first node and are connected to other nodes in the ring network topology besides the first node.
10. The method according to any one of claims 1-8, characterized in that, The method further includes: Receive the seventh message sent by the eighth node, the seventh message including the fourth destination IP address; Based on the fourth destination IP address, obtain a fourth FIB entry that matches the fourth destination IP address from the FIB. The fourth FIB entry contains a third outgoing interface identifier and a fourth forwarding attribute. The third outgoing interface identifier indicates the seventh interface. If the value of the fourth forwarding attribute is the third value, then the eighth message is forwarded to the ninth node through the seventh interface. The sixth destination MAC address included in the eighth message is the preset MAC address, so that the ninth node forwards the eighth message according to the preset MAC address.
11. The method according to any one of claims 1-8, characterized in that, The method further includes: If the interface indicated by the outgoing interface identifier in any FIB entry is connected to other nodes in the ring network topology besides the first node, then the value of the forwarding attribute in any FIB entry is configured to the first value. If the interface indicated by the outgoing interface identifier in any FIB entry is connected to a node outside the ring network topology, then the value of the forwarding attribute in that FIB entry is configured to the second value. When updating the FIB entries in the FIB, the cost (COST) values of the routing entries corresponding to the FIB entries before and after the update are obtained. If the COST value of the updated FIB entry is not less than the COST value of the FIB entry before the update, the value of the forwarding attribute in the updated FIB entry is configured to the third value.
12. The method according to any one of claims 1-8, characterized in that, The method further includes: If it is determined that the eighth interface has recovered from the DOWN state to the UP state, or if a first routing protocol message is received through the eighth interface, then route recovery is performed and the FIB entries in the FIB are updated. The second routing protocol message is sent to the tenth node on the ring network topology through the ninth interface, so that the tenth node can perform route recovery and update the FIB table entries in the local FIB after receiving the second routing protocol message. The eighth interface and the ninth interface belong to the same ring interface group, and the second routing protocol message is generated based on the FIB table entry updated by the first node.
13. The method according to any one of claims 1-8, characterized in that, The preset MAC address is either a unicast preset MAC address or a multicast preset MAC address, and the unicast preset MAC address is different from the multicast preset MAC address.
14. A ring network fault handling device, characterized in that, Applied to a first node, which is located on a ring network topology, the device includes: The first message receiving module is used to receive a first message sent by the second node, the first message including a first destination IP address; The first entry acquisition module is used to acquire a first FIB entry that matches the first destination IP address from the forwarding information table FIB. The first FIB entry includes a first outgoing interface identifier and a first forwarding attribute. The first outgoing interface identifier indicates a first interface. The first message forwarding module is used to forward a second message to a third node in the ring network topology through a second interface if the value of the first forwarding attribute is a first value and the first interface is in a DOWN state. The second message includes a first destination MAC address that is a preset MAC address, so that the third node forwards the second message according to the preset MAC address. The first interface and the second interface belong to the same ring interface group.
Citation Information
Patent Citations
Data packet forwarding method for Ether ring network
CN101425979A
Ring network fault switching method and device
CN102299835A