Method, apparatus and system for handling transmission path failures - Patents.com

JP7644064B2Active Publication Date: 2025-03-11HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2022156315
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-06-30
Filing Date
2022-09-29
Publication Date
2025-03-11
Estimated Expiration
2039-06-17

Smart Images

  • Figure 0007644064000003
    Figure 0007644064000003
  • Figure 0007644064000004
    Figure 0007644064000004
  • Figure 0007644064000005
    Figure 0007644064000005
Patent Text Reader

Abstract

This application discloses a method and apparatus, as well as a system, for handling transmission path failures to solve the prior art problem of data packets not being forwarded due to insufficient capacity of a context table supported by a node. [Solution] In this application, after the first network device receives the packet and when the first network device determines that the third network device has failed, a difference between the initial value of the segment routing global block (SRGB) of the first network device and the initial value of the SRGB of the third network device is determined, and a backup path is determined based on the difference and the backup forwarding table. The first network device transmits the first packet based on the backup path.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application relates to the field of communications technology, and in particular to a method, apparatus, and system for handling transmission path failures.

[0002] This application claims priority to Chinese Patent Application No. 201810703248.2, entitled “METHOD AND APPARATUS FOR PROCESSING TRANSMISSION PATH FAULT, AND SYSTEM,” filed with the China Patent Office on June 30, 2018, the entire contents of which are incorporated herein by reference. [Background technology]

[0003] Segment routing-traffic engineering (SR-TE) is a new multiprotocol label switching (MPLS) TE tunnel technology that uses an interior gateway protocol (IGP) or border gateway protocol (BGP) as control signaling. A controller is responsible for calculating a forwarding path for the tunnel and delivering a label stack that is strictly mapped to the path to the transponder. At the ingress node of the SR-TE tunnel, the transponder can control the transmission path of the packet on the network based on the label stack.

[0004] Currently, a backup path is used to forward packets based on fast routing (FRR) techniques when a node on the primary path fails.

[0005] For example, if node A on the primary path fails, after node A's previous-hop node B on the primary path knows that node A has failed, the previous-hop node B switches the data packet for transmission to the backup path based on a pre-generated label information table (also referred to as a context table) for node A and pre-generated primary and secondary forwarding tables for node A. The context table contains node (prefix) label information corresponding to all nodes in the entire network and adjacency labels advertised by node A.

[0006] Since the context table is pre-generated, in the SR-TE FRR solution, node B generates a context table for each neighbor of node A. Therefore, the specification of the context table is the quantity of the node in the whole network plus the quantity of neighbors of the neighboring nodes, and each node needs to generate the following quantity for the context table: quantity of neighbors * (quantity of the node in the whole network plus the quantity of neighbors of the neighboring nodes).

[0007] When a network includes a relatively large number of nodes, and the capacity of the context table supported by some nodes cannot reach the number of neighbors * (the number of nodes in the whole network plus the number of neighbors of the neighboring nodes), the contents in the context table generated by the node will be incomplete or fail to be generated. When a node in the network fails, it cannot switch to the correct backup path based on the context table, so the forwarding of data packets may fail. Summary of the Invention

[0008] This application provides a method, apparatus, and system for handling transmission path failures to solve the problem in the prior art that data packet forwarding fails due to insufficient capacity of a context table supported by a node.

[0009] According to a first aspect, one embodiment of this application provides a method for handling a transmission path failure, the method comprising the steps of: receiving, by a first network device, a first packet transmitted by a second network device, the second network device being a previous hop network device of the first network device on a primary path; determining, by the first network device, upon determining that a third network device is faulty, a difference between an initial value of a segment routing global block SRGB of the first network device and an initial value of SRGB of the third network device, the third network device being a next hop network device of the first network device on the primary path; and obtaining, by the first network device, a first label from the first packet, the first label being a difference between the initial value of SRGB of the third network device and an initial value of SRGB of the third network device. the first network device determining, based on a node segment identifier of the third network device and a value of the first label, the fourth network device being a next hop network device of the third network device on the primary path; using, by the first network device, the sum of the first label and the difference as an incoming label of a backup path from the first network device to the fourth network device, and determining from a backup forwarding table, an outgoing label of the backup path from the first network device to the fourth network device; and transmitting, by the first network device, the first packet on the backup path to the next hop network device of the first network device based on the outgoing label.

[0010] By using the above solution, the backup path is determined using the SRGB difference and the backup forwarding table, thus overcoming the problem of failure to forward data packets due to insufficient capacity of the context table supported by the node.

[0011] In a possible design, the first packet includes a label stack list used to provide guidance for forwarding the first packet on the primary path, and determining a difference between an initial value of SRGB of a first network device and an initial value of SRGB of a third network device includes obtaining, by the first network device, a second label from a top of the label stack list, the second label being determined based on a node segment identifier of the third network device and the initial value of SRGB of the first network device, determining, by the first network device, a first forwarding behavior corresponding to the second label in a backup forwarding table, the first forwarding behavior being used to search a label information table, the label information table including the difference corresponding to the second label, and obtaining, by the first network device, the difference from the label information table.

[0012] By using the above design, the SRGB initial values ​​of two adjacent nodes are stored in the label information table in advance, and then when the difference between the SRGB initial value of the first network device and the SRGB initial value of the third network device is determined, the difference is directly obtained from the label information table with storage, thereby saving processing resources. In addition, the label information table only contains the difference and information about the node segment identifier of the network device adjacent to the third network device, and the node segment identifiers of all nodes in the entire network do not need to be stored in the context table, thereby saving storage resources and overcoming the problem of data packet forwarding failure due to insufficient capacity of the context table supported by the node.

[0013] In one possible design, the obtaining, by the first network device, a first label from the first packet includes, after popping the second label from the top of the label stack list, obtaining, by the first network device, the first label from the top of the label stack list from which the second label was popped, and the sending, by the first network device, of the first packet on the backup path to a next hop network device of the first network device based on the outgoing label includes, by the first network device, switching the first label in the label stack list for the outgoing label and sending the updated first packet on the backup path to the next hop network device of the first network device.

[0014] In a possible design, after receiving the node segment identifier of the third network device flooded into the network by the third network device, the first network device floods the node segment identifier of the third network device to other network devices in the network, where the first label is of the third network device and is determined by the second network device based on the node segment identifier flooded by the first network device and the initial value of an SRBG of the first network device.

[0015] If there is a loose path in the forwarding path and the destination node on the loose path segment fails, after the node's failure information is flooded to the whole network, all nodes in the whole network delete the corresponding primary and secondary forwarding tables to the failed node. If the destination node on the loose path segment fails, all nodes in both the primary path and the backup path, from the first node to the last node, need to go through the loose path segment, and can reach the last node by bypassing the failed node from the previous hop node of the failed node. After the primary and secondary forwarding tables to the failed node are deleted, the source node on the path segment cannot forward the data packet to the previous hop node of the failed node. As a result, the packet forwarding failure occurs. Therefore, by using the above design, after receiving the node segment identifier of the destination node on the loose path segment, the previous hop node of the destination node on the loose path segment floods the node segment identifier of the destination node to the whole network. In this way, the source node on the loose path segment can determine a forwarding path based on the node segment identifier of the destination node, and forward the data packet.

[0016] In a possible design, upon determining that the third network device has failed, the first network device may flood the entire network with a node segment identifier of the third network device.

[0017] In a possible design, the method further includes a step of receiving, by the first network device, indication information sent by the third network device after the failure is recovered, the indication information being used to indicate that the third network device is unable to forward a packet correctly, and a step of transmitting, by the first network device, a second packet sent by the second network device upon receiving the second packet based on the outgoing label determined.

[0018] When a forwarding node on the primary path fails, the previous-hop node switches to the backup path to forward packets. After the failed node recovers and restarts, the failed node re-floods information, such as the node (prefix) label and the neighbor label belonging to the node, to other nodes in the network. After receiving the information flooded by the node after the failure is recovered, the previous-hop node switches back to forward data packets to the primary path. That is, the packets are sent by reusing the failed node. However, since the failed node has just restarted, the local database may be incomplete. For example, the local database does not contain information about other nodes, such as the node label and the neighbor label of the node's next-hop node after the failure is recovered on the primary path. In this case, the packet cannot be forwarded to the next-hop node after RT3 receives the packet. As a result, data packet loss occurs. Based on this, by using the above design, the failure node preferentially sends indication information to indicate to the previous-hop network device of the failure node that the failure node after recovery cannot forward packets correctly, so that the previous-hop network device still forwards the data packets by using the backup path.

[0019] According to a second aspect, an embodiment of this application provides a method for handling a transmission path failure, the method includes the steps of: determining, by the second network device, that a third network device is failed in a process of sending a packet by using a primary path; receiving, by the second network device, a node segment identifier of the third network device flooded in a network by a first network device, the third network device being an adjacent network device of the first network device, the first network device being a next-hop network device of the second network device on the primary path, and the third network device being a next-hop network device of the first network device on the primary path; and transmitting, by the second network device, the packet to the first network device by using a backup path based on the node segment identifier of the third network device flooded by the first network device, the first network device being a next-hop network device of the second network device on the backup path.

[0020] When there is a loose path in the forwarding path and the destination node on the loose path segment fails, after the node failure information is flooded to the whole network, all the nodes in the whole network delete the corresponding primary and secondary forwarding tables to the failed node. When the destination node on the loose path segment fails, all the nodes in both the primary path and the backup path, from the first node to the last node, need to go through the loose path segment, and can reach the last node by bypassing the failed node from the previous hop node of the failed node. After the primary and secondary forwarding tables to the failed node are deleted, the source node on the path segment cannot forward the data packet to the previous hop node of the failed node. As a result, the packet forwarding failure occurs. Therefore, by using the above design, after receiving the node segment identifier of the destination node on the loose path segment, the previous hop node of the destination node on the loose path segment floods the node segment identifier of the destination node to the whole network. In this way, the source node on the loose path segment can determine the forwarding path based on the node segment identifier of the destination node, and forward the data packet.

[0021] According to a third aspect, based on the same inventive concept as the method embodiment of the first aspect, an embodiment of this application provides an apparatus for handling a transmission path failure. The apparatus is applied to a first network device according to the first aspect. In other words, the apparatus may be the first network device, or may be a chip applicable to the first network device. The apparatus has a function for implementing an embodiment of the first aspect. The function may be implemented by using hardware, or may be implemented by hardware by executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0022] According to a fourth aspect, based on the same inventive concept as the method embodiment of the second aspect, an embodiment of this application provides an apparatus for handling a transmission path failure. The apparatus is applied to a network device according to the second aspect. In other words, the apparatus may be a network device, or a chip applicable to a network device. The apparatus has a function for implementing the embodiment of the second aspect. The function may be realized by hardware, or may be implemented by hardware by executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0023] According to a fifth aspect, an embodiment of the application provides an apparatus for handling a transmission path fault, and the apparatus includes a processor and a memory, where the memory is configured to store instructions. When the apparatus operates, the processor executes the instructions stored in the memory, and the apparatus performs the method for handling a transmission path fault according to the first aspect or any one of the embodiments of the first aspect. It should be noted that the memory may be integrated into the processor or may be independent of the processor. The apparatus may further include a bus. The processor is coupled to the memory by using the bus. The memory may include a read-only memory and a random access memory. When it needs to run, the apparatus is started by using a basic input / output system solidified in the read-only memory, or a boot loader boot system in an embedded system, to bring the apparatus into a normal running state. After entering the normal running state, the apparatus executes an application program and an operating system in the random access memory, and the processor performs the method according to the first aspect or any one of the possible implementation designs of the first aspect.

[0024] According to a sixth aspect, an embodiment of the present application provides an apparatus for handling a transmission path fault, and the apparatus includes a processor and a memory, where the memory is configured to store instructions. When the apparatus operates, the processor executes the instructions stored in the memory, and the apparatus performs the method for handling a transmission path fault according to the second aspect or any one of the embodiments of the second aspect. It should be noted that the memory may be integrated into the processor or may be independent of the processor. The apparatus may further include a bus. The processor is coupled to the memory by using the bus. The memory may include a read-only memory and a random access memory. When it needs to run, the apparatus is started by using a basic input / output system solidified in the read-only memory, or a boot loader boot system in an embedded system, to bring the apparatus into a normal running state. After entering the normal running state, the apparatus executes the application program and the operating system in the random access memory, and the processor performs the method according to the second aspect or any one of the possible implementation designs of the second aspect.

[0025] According to a seventh aspect, an embodiment of this application further provides a system, including an apparatus of the third or fifth aspect and an apparatus of the fourth or sixth aspect. In a possible design, the system may further include another network device that exists in the solution provided in this embodiment of this application and interacts with the two network devices. For example, the another network device may be another network device on the transmission path.

[0026] According to an eighth aspect, an embodiment of the present application further provides a readable storage medium, which stores a program or instructions, and when the program is executed or the instructions are executed on a computer, any method for handling a transmission path failure in the above aspect is performed.

[0027] According to a ninth aspect, an embodiment of the present application further provides a computer program product including instructions, which, when executed on a computer, enables the computer to perform any method for handling a transmission path failure in the above aspects.

[0028] In addition, for the technical effects brought about by any design method from the third aspect to the ninth aspect, please refer to the technical effects brought about by different implementations in the first aspect to the second aspect, and the details will not be described here. [Brief description of the drawings]

[0029] [Figure 1A] FIG. 1A is a schematic diagram of the architecture of a network system according to one embodiment of the present application. [Figure 1B] FIG. 1B is a schematic diagram of another network system architecture according to an embodiment of the present application. [Diagram 2] FIG. 2 is a flow chart of a method for handling a transmission path failure according to an embodiment of the present application. [Diagram 3] FIG. 3 is a schematic diagram of yet another network system architecture according to an embodiment of the present application. [Figure 4] FIG. 4 is a schematic diagram of a method for handling a transmission path failure according to an embodiment of the present application. [Diagram 5] FIG. 5 is a schematic diagram of a TLV format according to one embodiment of the present application. [Figure 6] FIG. 6 is a schematic diagram of a flag format according to one embodiment of the present application. [Figure 7] FIG. 7 is a schematic diagram of the structure of an apparatus 700 according to one embodiment of the present application. [Figure 8] FIG. 8 is a schematic diagram of the structure of a network device 800 according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0030] This application is applied to a node that supports SR-TE. In the embodiment of this application, the node is also referred to as a network device. The network device is a device that provides routing and forwarding functions in a network, and may be, for example, a router, a switch, a transponder, or a label switching router (LSR). It is not limited thereto. In the following description process, the node is used as an example for explanation.

[0031] In SR-TE technology, a control plane distributes MPLS labels for nodes by using an IGP protocol based on link state or border gateway protocol (BGP), and then a data plane forwards MPLS packets based on the labels distributed by the control plane.

[0032] SR-TE (Segment Routing-Traffic Engineering) is a new TE tunnel technology that uses an interior gateway protocol (IGP) or border gateway protocol (BGP) as control signaling. The controller is responsible for calculating the forwarding path of the tunnel and delivering a label stack that corresponds strictly to the path to the transponder. At the ingress node of the SR-TE tunnel, the transponder can control the transmission path of the packet in the network based on the label stack.

[0033] The terms in the embodiments of this application are first explained below.

[0034] (1) Segment Routing Global Block (SRGB): A set of user-specified labels reserved for a segment.

[0035] (2) Segment: A segment is identified by using a segment label (Segment ID, SID). The segment label in the embodiment of this application may be referred to as a segment identifier. On the forwarding plane, the SID may be mapped to an MPLS label.

[0036] Segments are classified into three types of segments: prefix segments, adjacency segments, and node segments.

[0037] A prefix segment is used to identify the prefix of a destination address in a SR network. The prefix segment can be flooded to other network elements by using an IGP protocol, where the prefix segment is globally visible and globally valid. The prefix segment is identified by a prefix segment identifier (Prefix Segment ID, Prefix SID). In the embodiment of this application, the prefix segment label is referred to as a prefix label for short. The prefix SID is an offset within the range of the SRGB advertised by the destination node. The receiving end calculates the actual label based on the SRGB of the receiving end.

[0038] Adjacency Segment is used to identify the routing link between two adjacent nodes in a network. Adjacency Segment can be flooded to other network elements by using IGP protocol, where prefix segment is globally visible and globally valid. Adjacency Segment is identified by Adjacency Segment Label (Adjacency Segment ID, Adjacency SID). In the embodiment of this application, Adjacency Segment Label is referred to as Adjacency Label for short.

[0039] Adjacency labels are directional and are used to provide guidance in packet forwarding. For example, adjacency label 9003 corresponds to link PE1->P3. Adjacency SIDs are local SIDs outside the SRGB range.

[0040] A node segment is a special prefix segment used to identify a particular node. An IP address is configured as a prefix of the node's local loopback interface. The prefix SID of a node is its node segment label. In the embodiments of this application, the node segment label is referred to as a node label for short.

[0041] In short, the prefix segment represents the destination address and the neighbor segment represents the outgoing link of the data packet, and the destination address and the outgoing link may be similar to the destination IP address and the outbound interface in traditional IP forwarding, respectively. In an IGP area, nodes use an extended IGP protocol to flood the node SID and its neighbor SIDs so that all nodes can obtain information about other nodes.

[0042] Any path in a network can be constructed by combining prefix (node) SIDs and neighbor SIDs. A route in a network can be formed by multiple routing segments. The constructed path is represented by a label stack list. The label stack list contains a segment label (Segment ID) corresponding to each routing segment on the forwarding path.

[0043] The destination node forwards the node analysis node by using the node (prefix) SID of the IGP protocol, and calculates the label value based on its own SRGB. Then, each node uses the topology information collected by the IGP protocol to calculate the label forwarding path based on the shortest path algorithm, and delivers the calculated next hop and outgoing label information to the forwarding table to provide guidance for data packet forwarding.

[0044] In addition, it should be noted that "a plurality of" in the embodiments of this application means two or more. The term "and / or" indicates an association relationship for describing related objects, and indicates that three relationships may exist. For example, A and / or B may indicate the following three cases: only A exists, both A and B exist, and only B exists. In addition, it should be understood that the terms "first" and "second" in the specification of this application are used merely for the purpose of distinguishing between the nodes described, but cannot be understood as an indication or implication of relative importance, and cannot be understood as an indication or implication of sequence. Node 1 or node 2 is also used merely to distinguish between the nodes described, and cannot be understood as an indication or implication of relative importance, and cannot be understood as an indication or implication of sequence.

[0045] In addition, the forwarding tables in the embodiments of this application may generally include only a primary forwarding table, or may include a primary forwarding table and a backup forwarding table. The primary / backup forwarding tables in the embodiments of this application generally include a primary forwarding table and a backup forwarding table.

[0046] FIG. 1A is used as an example to explain the generation of a segment path of a prefix segment and the forwarding of a data packet.

[0047] For example, a prefix segment path to be established is RT1, RT2, RT3, RT4, and RT5, where RT1 is the first node of the prefix segment and RT5 is the destination node of the prefix segment.

[0048] SRGB=[5000-5999] is configured for RT5, and a prefix (node) SID that is 5 is configured for the loopback interface of RT5. RT5 generates and distributes a forwarding table based on the SRGB and prefix (node) SID. The SRGB and prefix SID of RT5 are encapsulated into a control packet, and the control packet is flooded to the whole network by using IGP. After receiving the control packet, another network device in the network analyzes the prefix SID advertised by RT5, and calculates an incoming label value based on the SRGB of the other network device. In addition, the other network device calculates an Outer Label value based on the SRGB advertised by the next hop node, calculates a label forwarding path by using the IGP topology, and then generates a forwarding table.

[0049] RT4 analyzes the prefix SID advertised by RT5 and calculates the label value based on RT4's SRGB=[4000-4999]. The formula is: inLabel=start value of SRGB+prefix SID value. Therefore, inLabel=4000+5=4005. The outgoing label (OuterLabel) is calculated by using the IS-IS topology. The formula is: OuterLabel=start value of SRGB advertised by the next hop device+prefix SID value (i.e., the node label of the destination node on the prefix segment or node segment). As shown in Figure 1A, the next hop device of RT4 is RT5, and the SRGB placement advertised by RT5 is from 5000 to 5999. Therefore, OuterLabel=5000+5=5005.

[0050] The calculation process of RT3 is the same as that of RT4, i.e., inLabel=3000+5=3005 and OuterLabel=4000+5=4005. The calculation process of RT2 is the same as that of RT4, i.e., inLabel=2000+5=2005 and OuterLabel=3000+5=3005. The calculation process of RT1 is the same as that of RT4, i.e., inLabel=1000+5=1005 and OuterLabel=2000+5=2005.

[0051] After the segment path from RT1 to RT5 is established, RT1 receives the data packet, adds a label value 2005 to the data packet, and forwards the data packet. The RT2 node receives the data packet carrying the label, performs label switching, pops the label 2005, and replaces the label with the outgoing label 3005. The RT3 node receives the data packet, performs label switching, pops the label 3005, and replaces the label with the outgoing label 4004. After receiving the data packet, RT4 pops the label 4005 and replaces the label 4005 with the label 5005. After receiving the data packet, RT5 pops the label 5005 and continues to search for a route to forward the packet.

[0052] In the following, FIG. 1B is used as an example to explain the generation of strict segment paths (which are not allowed to be loose paths) and the forwarding of data packets.

[0053] The transponder allocates neighbor labels based on the IGP protocol, and reports the allocated neighbor labels to the controller, so that the controller generates a label stack list based on the neighbor labels.

[0054] The neighbor label is flooded to the whole network by using the IGP protocol. As shown in Figure 1B, by using the RT1 node as an example, the process of allocating the neighbor label by the IGP protocol is as follows:

[0055] RT1 applies local dynamic labels for all links of RT1 by using IGP protocol (e.g., RT1 assigns neighbor label 1031 for link RT1->RT2). RT1 advertises the neighbor label by using IGP protocol and floods the whole network with the neighbor label. Other devices in the network learn the neighbor label advertised by RT1 by using IGP protocol. Specifically, other nodes assign and advertise the neighbor label as RT1 does and flood other devices in the network with the neighbor label.

[0056] The controller calculates a path based on the constraint attribute of the SR-TE tunnel. After calculating the path, the controller combines the neighbor labels of the entire path based on the topology and the neighbor labels to generate a label stack list. For example, referring to FIG. 1B, the controller calculates the SR-TE tunnel path as RT1->RT2->RT3->RT4->RT5, and the corresponding label stack list is {1031, 1032, 1034, 1035}, and then the controller delivers the label stack list obtained through the calculation to the ingress node RT1 of the transponder. Thus, the transponder obtains the SR-TE tunnel based on the label stack list delivered by the controller. In this application, the node label may also be used here to form the label stack list, i.e., the label stack list is {1002, 2003, 3004, 4005}.

[0057] The transponder performs a label operation on the packet based on the label stack list corresponding to the SR-TE tunnel, searches for a forwarding outbound interface hop-by-hop based on the top label of the stack, and guides the data packet to be forwarded to the destination address of the tunnel.

[0058] When a packet enters an SR-TE tunnel, the ingress node adds a label stack list to the packet. When the packet is forwarded through the SR-TE tunnel, the ingress node pops the top label after searching for a forwarding outbound interface based on the top label. For example, as shown in FIG. 1B, the ingress node PE1 adds a label stack list {1031, 1032, 1034, 1035} to the data packet, and then finds that the corresponding forwarding outbound interface is the RT1->RT2 link based on the link that matches the label 1031 at the top of the stack, and then pops the label 1031. The packet carries the label stack {1032, 1034, 1035} and is forwarded to the next-hop node RT2 through the link RT1->RT2. After intermediate node RT2 receives the packet, based on the link matching label 1032 at the top of the stack, it finds that the corresponding forwarding interface is RT2->RT3 link, then label 1032 is popped, etc. After node RT3 receives the packet, node RT3 continues forwarding in the same manner as intermediate node RT3. After node RT4 pops the last label 1035, the data packet is forwarded to node RT5. The packet received by outgoing node RT5 does not have a label and continues to be forwarded by looking up the routing table.

[0059] In the strict segment path mode, load balancing cannot be performed even if equal-cost paths exist. In this case, the node label of the loose path can be specified based on the node label or the hybrid label stack formed by the node label and the neighbor label. The controller sends the label stack to the first node of the transponder, and the transponder searches the outbound interface hop by hop based on the label stack to pop the label, and forwards the data packet to the tunnel destination address. For example, as shown in Figure 1B, in the path from RT1 to RT5, the nodes specified to be crossed are RT3 and RT4. In this case, a loose path is formed between RT1 and RT3, and can be forwarded by RT2 or RT6. In this case, the label stack list used for packet forwarding in RT1 is {2003, 3004, 4005}.

[0060] A link or node failure may occur when a packet is forwarded by using SR-TE. Now, the FRR mechanism can be used to restore the path. For example, node R2 is the failed node.

[0061] When node R2 is not failed, the forwarding path identified by the SR-TE label stack is RT1->RT2->RT3->RT4->RT5. When node RT2 is failed, the neighboring node RT1 of node RT2 replaces node RT2 to perform a label popping (POP) action, uses the next layer label as the destination address, and uses the path bypassing the failed node RT2 as a backup path to forward the data packet. The backup path is RT1->RT6->RT3->RT4->RT5.

[0062] For example, the label stack list used by RT1 to transmit a data packet is {1002, 2003, 3004, 4005}. RT1 can determine that RT2 is the failed node by checking the top label 1002 of the label stack, and then determine that the node that the path after the failed node needs to reach is RT3 by checking the top label 1002 and the second label 2003 of the label stack. RT1 calculates a path that bypasses the failed node RT2 to reach the node identified by the second label 2003 (i.e., RT3), and uses the path as the node protection path for SR-TE FRR of the next-hop node RT2.

[0063] In a scenario where a failed node is switched to an SR-TE FRR path, the following three issues exist:

[0064] Problem 1: The capacity of the label information table is limited. For example, the capacity can be referred to as storage capacity.

[0065] Problem 2: Packet forwarding failure due to loose paths.

[0066] Problem 3: Packet forwarding failure due to an incomplete failback entry.

[0067] Below we detail the three problems and their corresponding solutions.

[0068] Regarding issue 1:

[0069] Before the RT2 node fails, each node has calculated a backup forwarding table and a label information table (context table) by using IGP in advance. Each node generates a context table for each node's neighbors, where the number of neighbors for each node is equal to the number of context tables generated at each node. The context table contains the node (prefix) labels of all nodes in the whole network and all neighbor labels advertised by neighbors.

[0070] For example, node RT1 generates a context table for its neighboring node RT2, where the context table contains the node (prefix) label information corresponding to all nodes in the entire network and the neighbor labels advertised by RT2. The node (prefix) label information corresponding to each node of all nodes in the entire network is the sum of the node's node label and the initial value of SRGB of RT2 node.

[0071] Since the context table is pre-generated, in the SR-TE FRR solution, a node generates a context table for each neighbor of the node. Therefore, the specification of the context table is the quantity of the node in the whole network plus the quantity of neighbors of the neighboring node, and each node needs to generate the following quantity for the context table: quantity of neighbors * (quantity of the node in the whole network plus the quantity of neighbors of the neighboring node).

[0072] When a network includes a relatively large number of nodes and the specification of the context table supported by some nodes is insufficient to support the number of nodes in the whole network plus the number of neighbors of the neighboring nodes, the content in the context table generated by the node is incomplete. When a node in the network fails, packets may not be forwarded because they cannot switch to the correct backup path.

[0073] It should be noted that if a node on the primary path fails or the path from the node to the next hop fails, after the previous hop node associated with the node on the primary path learns of the failure, the previous hop node will flood other nodes in the network with the node's failure information.

[0074] Based on this, an embodiment of this application provides a method for handling a transmission path failure. See FIG.

[0075] S201. A first node receives a first packet sent from a second node.

[0076] The second node is a previous hop node of the first node on the primary path.

[0077] S202. If the third node determines that it has failed, the first node determines a difference between an initial value of the segment routing global block SRGB of the first node and an initial value of SRGB of the third node.

[0078] The third node is the next hop node of the first node on the primary path.

[0079] S203. The first node acquires a first label from the first packet, where the first label is determined based on an initial value of SRGB of the third node and a node segment identifier of the fourth node.

[0080] The fourth node is the next hop node of the third node on the primary path.

[0081] S204. The first node uses the sum of the first label and the difference as the incoming label of the backup path from the first node to the fourth node, and determines the outgoing label of the backup path from the first node to the fourth node from the backup forwarding table.

[0082] S205. The first node sends the first packet to a next hop node of the first node on the backup path based on the outgoing label.

[0083] By using the above solution, the backup path is determined using the SRGB difference and the backup forwarding table, thus overcoming the problem of data packets not being forwarded due to insufficient capacity of the context table supported by the node.

[0084] In a possible implementation, the first packet includes a label stack list used to provide guidance for forwarding the first packet on the primary path, and determining a difference between an initial value of SRGB of the first node and an initial value of SRGB of the third node includes: obtaining, by the first node, a second label from an upper portion of the label stack list, where the second label is determined based on a node segment identifier of the third node and the initial value of SRGB of the first node; determining, by the first node, a first forwarding behavior corresponding to the second label in a backup forwarding table, where the first forwarding behavior is used to indicate to search a label information table, and the label information table includes the difference corresponding to the second label; and obtaining, by the first node, the difference from the label information table.

[0085] In the prior art, when a node on the primary path fails, and a context table is generated for the failed node, a backup forwarding is searched for according to the top label in the label stack when the previous hop node of the failed node is switched from the primary path to the backup path. After determining that the forwarding behavior in the forwarding entry corresponding to the upper label in the backup table is to search the context table, the next hop node that needs to forward the packet on the backup path is determined according to the context table. That is, the backup forwarding table is queried only once in the prior art, and the backup path is determined to be implemented by the context table. However, in the solution provided in the embodiment of this application, when the difference between SRGB is delivered to the forwarding plane node, only the context table needs to be used to determine the node label of the next hop node of the failure node. Then, the next hop node for forwarding the packet on the backup path is determined, and the backup forwarding table is queried again according to the node label of the next hop node of the failure node. Therefore, the context table does not need to include node labels corresponding to all nodes, and only needs to include label information corresponding to adjacent nodes of adjacent nodes, thereby avoiding packet forwarding failures caused by insufficient entry capacity, and in addition, can save storage resources.

[0086] In a possible implementation, after receiving the node segment identifier of the third node flooded in the network by the third node, the first node floods another node in the network with the node segment identifier of the third node, where the first label is determined by the second node based on the node segment identifier of the third node flooded by the first node and an initial value of the SRGB of the first node.

[0087] Based on this, the second node receives the node segment identifier of the third node flooded in the network by the first node, the third node is a neighbor node of the first node, and the priority of the node segment identifier of the third node flooded by the first node is lower than the priority of the node segment identifier of the third node flooded by the third node. In the process of sending the packet by using the primary path, the second node determines that the third node is faulty. The first node is a next-hop node of the second node on the primary path, and the third node is a next-hop node of the first node on the primary path. The second node sends the packet to the first node through the backup path based on the node segment identifier of the third node flooded by the first node. And the first node is a next-hop node of the second node on the backup path.

[0088] In this way, problem 2 can be solved. For specific implementation, please refer to the detailed description of problem 2 below.

[0089] In a possible implementation, the first network device receives indication information sent by the third network device after the failure is recovered. Here, the indication information is used to indicate that the third network device cannot forward the packet correctly. Then, when receiving a second packet sent from the second network device, the first network device sends the second packet based on the determined outgoing label. In this way, problem 3 can be solved. For specific implementation, please refer to the detailed description of problem 3 below.

[0090] In the following, the method for handling a transmission path failure provided in this embodiment of the application will be described in more detail with reference to a specific scenario. It should be noted that the following method is relatively comprehensive. Some steps or descriptions are possible implementations. Any two or more steps in a method procedure may constitute a solution that needs to be protected in this embodiment of the application. In particular, when some steps are optional, the remaining steps can also constitute a solution that needs to be protected in this embodiment of the application, and any step may further have another possible implementation.

[0091] This embodiment of this application provides a method for constructing a context table. When a node acquires the adjacency label advertised by an adjacent node and the node label of the adjacent node's neighbor node by using IGP, and after learning the SRGB of the adjacent node, the node generates a context table. The context table includes the adjacency label advertised by the adjacent node, the node label information of the adjacent node's neighbor node, and the difference between the initial value of the SRGB of the node and the initial value of the SRGB of the adjacent node, where the node label information is the sum of the initial value of the SRGB of the adjacent node and the node label of the adjacent node's neighbor node.

[0092] Using FIG. 3 as an example, some contents of the context table generated by RT2 are shown in Table 1. And Table 1 shows some contents of the entry generated for the adjacent node RT3 in the context table. The initial value of SRGB of RT2 is 2000, and the initial value of SRGB of the adjacent node RT3 of RT2 is 3000. Therefore, the difference between the initial value of SRGB of RT2 and the initial value of SRGB of RT3 is -1000. [Table 1] Table 1

[0093] Inlabel indicates the incoming label, which is the initial value of the SRGB of the node plus the Sid of the adjacent node, i.e., RT2's initial SRGB value 2000 + RT3's node label 3 = 2003. The incoming label is used as the KEY field to query the context table.

[0094] The SRGB difference is the initial value of the SRGB of the node minus the initial value of the SRGB of the adjacent node.

[0095] The neighbor Sid (adj Sid) indicates the neighbor labels advertised by the neighboring nodes. The neighbor labels advertised by RT3 are the neighbor label 1034 of the link between RT3 and RT4, the neighbor label 1037 of the link between RT3 and RT7, and the neighbor label 1036 of the link between RT3 and RT6.

[0096] Adjacent Node Sid (adj node Sid) indicates the destination node corresponding to the adjacent label advertised by the adjacent node, which uses the initial value of the node's SRGB plus the node Sid advertised by the destination node. For example, if the destination node of the adjacent label 1034 of the link between RT3 and RT4 is RT4, the adjacent node Sid corresponding to 1034 is the initial value of SRGB of RT2 + the node label of RT4 = 2004 RT4.

[0097] In the following, FIG. 3 is used as an example to explain the data packet forwarding process in detail.

[0098] As shown in FIG. 3, for the route from RT1 to RT5, the nodes designated to intersect are RT3 and RT4. In this case, a loose path is formed between RT1 and RT3, and can be forwarded by RT2 or RT6. In this embodiment of the application, RT1 performs path calculation and determines that the primary path is RT1->RT2->RT3->RT4->RT5. In this case, the label stack list used for packet forwarding in RT1 is {2003, 3004, 4005}. For example, if RT3 is down, the backup path is RT1->RT2->RT7->RT4->RT5. In addition, RT2 may generate a primary / backup forwarding table for node Sid in the entire network. For some contents of the primary / backup forwarding table, see Table 2. FIG. 2 shows only partial contents of two entries with incoming labels 2003 and 2004. [Table 2] Table 2

[0099] As shown in FIG. 3, when RT3 is not down, RT1 sends a data packet to RT2. Here, the label stack in the data packet is {2003, 3004, 4005}. The primary forwarding table is searched based on the top label in the label stack. For example, Table 2 is searched, and the top label, which is 2003, 2003, is used as the in label, and the incoming label is searched and is the forwarding entry corresponding to the input label 2003. The forwarding behavior indicated in the forwarding entry is forwarded to RT3, and then RT2 switches the top label of the stack to 3003. That is, the top label of the stack is switched to a label value determined based on the label value determined by the initial value of the SRGB of the next hop node (the initial value of the SRGB of RT3) and the node label of the destination node (the node label of RT3), and then the updated data packet is forwarded to RT3. After RT3 receives the data packet sent by RT2, it is determined that the label stack in the data packet is {3003, 3004, 4005}, and the top label of the stack is at least the label advertised by the receiving node. Therefore, after the top label of the stack is popped, it is determined that the next hop node is RT4 based on the top label 3004, the top label 3004 is switched to 4004, and the updated data packet is forwarded to RT4. Similarly, after RT4 receives the data packet sent by RT3, it is determined that the label stack of the data packet is {3004, 4005}. It is determined that the top label indicates that the receiving node is itself. Therefore, the top label is popped. Based on the top label 4005, it is determined that the next hop node is RT5, and the top label is switched to 5005, and the updated data packet is forwarded to RT5. After RT5 receives the data packet sent by RT4, the label stack of the data packet is {5005}. It determines that the top label indicates that the receiving node is itself.Thus, the top label is popped and the forwarding table continues to be searched for a forwarding.

[0100] Therefore, after receiving the data packet of RT1, based on the top label 2003 of the label stack of the data packet, RT2 determines that the next-hop node RT3 indicated by the top label is out of order. RT2 needs to find a forwarding path from RT3 to the next-hop node RT4 that bypasses RT3. Thus, the backup forwarding table (Table 2) is searched, the forwarding behavior found pops the top label 2003, and then the context table generated by RT2 for the neighboring node RT3 is searched. The SRGB difference obtained based on the context table in Table 1 is -1000, and the top label 2003 is popped. In this case, the label stack is {3004, 4005}. RT2 obtains the label from RT3 to the next-hop node RT4, i.e., the top label 3004. The difference between the top label of the stack and the SRGB is used as the sum. That is, the second outgoing label (3004) + difference with SRGB (-1000) = 2004, i.e., the incoming label at RT2 is obtained in the routing segment from the ingress node RT2 to the egress node RT4. 2004 is used as the incoming label to search the primary forwarding table. The next hop node found is RT3. Since the interface to RT3 is down, it switches to the backup path and searches the backup forwarding table. The forwarding behavior found by using 2004 as the incoming label is forwarded to RT7, and the outgoing label is 7004. Then, the RT2 node replaces the top label of the stack with the found outgoing label, i.e., it pops the top label 3004 and replaces it with 7004. The label stack now is {7004, 4005}. The updated data packet is forwarded to RT7.

[0101] After receiving the data packet, based on the top label 7004, RT7 determines that the next hop node is RT4, swaps the top label 7004 to 4004, and forwards the updated data packet to RT4. Similarly, after receiving the data packet, RT4 determines that the destination node indicated by the top label of the stack is itself, pops the top label of the stack, and determines that the next hop node indicated by the top label 4005 of the updated label stack is RT5, swaps the top label 4005 to 5005, and sends the updated data packet to RT5.

[0102] In the prior art, when a node on the primary path fails, the previous hop node of the failed node generates a context table for the failed node, and when the primary / secondary forwarding table is switched from the primary path to the backup path, the backup forwarding table is searched according to the top label in the label stack, and after it is determined that the forwarding behavior in the forwarding entry corresponding to the top label in the backup forwarding table is to search the context table, the next hop node that needs to forward the packet on the backup path is determined according to the context table. That is, in the prior art, the backup forwarding table is queried only once, and the backup path is implemented by using the context table. However, in the solution provided in this embodiment of this application, when the difference between SRGB is delivered to the forwarding plane node, only the context table needs to be used to determine the node label of the next hop node of the failed node, and then the next hop node for forwarding the packet on the backup path is determined, and the backup forwarding table is queried again by using the node label of the next hop node of the failed node. Therefore, the context table does not need to include node labels corresponding to all nodes, and only needs to include label information corresponding to neighboring nodes of adjacent nodes, thereby avoiding packet forwarding failures caused by insufficient entry capacity, and in addition, storage resources can be saved.

[0103] Regarding issue 2:

[0104] When there is a loose path in the forwarding path and the destination node on the loose path segment fails, after the node failure information is flooded to the whole network, all the nodes in the whole network delete the corresponding primary and secondary forwarding tables to the failed node. When the destination node on the loose path segment fails, all the nodes in both the primary path and the backup path from the first node to the last node need to go through the loose path segment, and can reach the last node from the previous hop node of the failed node by bypassing the failed node. After the primary and secondary forwarding tables to the failed node are deleted, the source node on the path segment cannot forward the data packet to the previous hop node of the failed node. As a result, a packet forwarding failure occurs.

[0105] Using Figure 3 as an example, the nodes through which the SR-TE path specified by RT1 passes are RT3, RT4, and RT5. When RT3 is down, RT2 recognizes that RT3 is down and floods the failure information of RT3 by using IGP. At the same time, SR-TE FRR switching is triggered to switch to the backpath RT3, RT4, and RT5, and the failure point RT3 is bypassed. When the failure information of RT3 is flooded to all nodes in the entire network, RT1 starts convergence and deletes the primary and backup forwarding tables to RT3. As a result, RT1 cannot forward data packets to RT2.

[0106] Based on this, an embodiment of this application provides a method for handling a transmission path failure. The previous hop node of the failure node floods the prefix (node) label of the failure node to all nodes in the entire network by using an IGP protocol. In one method, when the previous hop node of the failure node recognizes that the failure node is failed, the prefix (node) label of the failure node is flooded to the entire network by using an IGP protocol. For example, the priority of the prefix label of the failure node flooded by the previous hop node can be set to be lower than the priority of the prefix label of the failure node flooded by the failure node when the failure node acquires the prefix label of the failure node before the failure occurs. In another method, the failure node floods the prefix label of the failure node when it acquires the prefix label of the failure node before the failure, and the previous hop node of the failure node floods the prefix label of the failure node to the entire network when it receives the prefix label flooded by the failure node before the failure. For example, the priority of the prefix label of the failure node flooded by a previous hop node may be set to be lower than the priority of the prefix label of the failure node flooded by the failure node when the failure node acquires the prefix label of the failure node before the failure occurs.

[0107] When flooding the prefix label of the failure node, the previous-hop node may carry the prefix label of the failure node in a mapping Type-Length-Value (TLV).

[0108] For details of the mapping TLV in this embodiment of the application, it should be noted that reference is made to the document draft-ietf-isis-segment-routing-extensions released by the Internet Engineering Task Force (IETF). The contents and relevant parts of this document are generally incorporated into this specification in their entirety by use of the introduction. For the sake of brevity, the details will not be described again here.

[0109] In the TLV definition, there are three fields: Tag, Length, and Value. Value contains the label. Mapping TLV can also be referred to as SID / Label Binding TLV. For example, the mapping TLV format shown in Figure 5 is used as an example. Type indicates the type of TLV, Length indicates the length of the control packet, Flags indicates flag bits, and RESERVED indicates reserved bits that are not currently used. Range field provides the ability to specify the prefix SID segment associated with the address segment. Here, Prefix length indicates the length of the prefix, Prefix indicates the forwarding equivalence class at the last node of the advertised path, and SubTLV indicates the subTLV that issued the prefix SID.

[0110] For example, in this embodiment of the application, the previous hop node can add an R field to the flag to indicate the re-advertised flag bit, i.e., the prefix label for the failure node is re-advertised by the previous hop node to other nodes in the entire network.

[0111] See Figure 6 for the format of the flags. F indicates the address family flag. If this bit is not set, it indicates an IPv4 prefix. If this bit is set, it indicates an IPv6 prefix. M indicates the mirroring environment flag. This flag is set if the advertised SID is associated with a mirroring environment. S indicates whether the SID / Label Binding TLV can be flooded in the entire routing domain. If this bit is set, the SID / Label Binding TLV is flooded in the entire routing domain. If this bit is not set, the SID / Label Binding TLV cannot be leaked between levels. D indicates that the flag should be set when the SID / Label Binding TLV is leaked from Level 2 to Level 1. Otherwise, the flag should be cleared. A indicates an auxiliary flag. Levels are a concept of network layering in Intermediate System-to-Intermediate system (IS-IS) routing protocols. The common area is called the Level 1 area, and the backbone area is called the Level 2 area.

[0112] The network architecture shown in Figure 3 is used as an example. When RT3 is determined to be out of order, RT2 floods the node label of RT3 to the entire network. The priority of the node label of RT3 flooded by RT2 may be lower than the priority of the node label of RT3 flooded by RT3. After receiving the node label of RT3 flooded by RT2, RT1 decides to send the outgoing label of the data packet to RT2 based on the node label of RT3. That is, the initial value of SRGB of RT2+node label of RT3=2000+3=2003. After RT2 receives the packet, RT2 switches to the backup path for continuous forwarding. RT2 can switch to the backup path to forward the packet in the form of the existing context table, and certainly can also use the above-mentioned method of setting the context table. For the specific sending process, please refer to the forwarding method described in the embodiment of problem 1. The details will not be described again here.

[0113] Regarding issue 3:

[0114] When a forwarding node on the primary path fails, the previous-hop node switches to the backup path to forward packets. After the failed node recovers and restarts, the failed node re-floods information, such as the node (prefix) label and the neighbor label of the node, to other nodes in the network. After receiving the information flooded by the node after the failure is recovered, the previous-hop node switches back to the primary path to forward data packets. That is, the packets are sent by reusing the failed node. However, since the failed node has just restarted, the local database may be incomplete. For example, the local database does not contain information about other nodes, such as the node label and the neighbor label of the node's next-hop node after the failure is recovered on the primary path. In this case, the packet cannot be forwarded to the next-hop node after RT3 receives the packet. As a result, data packet loss occurs.

[0115] As shown in Figure 3, the SR-TE paths specified by RT1 are RT3, RT4, and RT5. When RT3 fails, RT2 triggers SR-TE FRR switching after recognizing that RT3 has failed, and switches to the backup paths RT7, RT4, and RT5. Thus, the failed node RT3 is bypassed. After RT3 recovers and restarts, RT3 advertises its node Sid again to the whole network, and RT2 switches data packets back to RT3. However, since RT3 has just restarted, its local database may not be complete. For example, RT3 has not learned the node SIDs of RT4 and RT5. As a result, data packets cannot be forwarded from RT3 to the next hop RT4, and are discarded.

[0116] Based on this, an embodiment of this application provides a method for handling a transmission path failure. When a failed node recovers and is restarted, in order to prevent a previous hop node of the recovered failed node from learning a prefix SID of another node when the recovered failed node recognizes the recovery of the failed node, the recovered failed node attempts to learn a prefix SID of another node, and then data packets are lost. After the failed node recovers, an indication information is first released in the whole network, where the indication information is used to indicate that the recovered failed node cannot forward packets correctly. Therefore, when receiving a data packet to be sent to the recovered failed node, the previous hop node still forwards the data packet through the backup path.

[0117] For example, the indication information can be carried in an overload bit. The overload bit is defined in the IS-IS routing protocol. When a node cannot complete all connected status data (LSDB), i.e., topology information used by local storage to recover all nodes in the entire network, the node uses a bit in the header of the link state data packet advertised by itself to identify the incomplete LSDB. As a result, the packet cannot be forwarded correctly, and this flag bit is called the overload (OL) bit. By using the overload bit in the link state packet advertised by the node, other nodes know that the node may fail to make a correct routing decision, i.e., the node's LSDB is not complete, so the data packet cannot be forwarded correctly. Other nodes will not forward the data packet through this node when calculating the shortest path.

[0118] The network architecture shown in Figure 3 is used as an example. After the failed node RT3 recovers and restarts, in order to prevent RT2 from first recognizing the recovery of RT3 failure, and at this point, RT3 has not learned the prefixes of RT4 and RT5, causing data packets to be lost. RT3 adds an overload bit flag to the header of the link status packet after it is restarted due to the failure.

[0119] RT2 receives the overload bit in the link state packet advertised by RT3, and senses that the next hop RT3 is in an overload state. Therefore, the node RT2 continues to use the SR-TE FRR forwarding path before the failure recovery, and RT2 can forward the data packet by using the backup path in the form of an existing context table, and can also clearly use the above-mentioned method of setting the context table, which is not limited here. For the specific transmission process, please refer to the forwarding method in the embodiment corresponding to Figure 4. The details will not be described again here.

[0120] The time it takes for the failure node to complete the LSDB, i.e., the overload time, is generally long, e.g., 60 seconds. Therefore, within the duration, RT2 can forward data packets based on the SR-TE FRR path (backup path) by looking up the context table. For example, the overload duration can be set. Then, RT2 forwards the data packets by using the backup path within the duration. Once the LSDB is completed, RT3 can advertise link status packets in the whole network again, and the header does not include the overload bit. After receiving a link status data packet that does not include the overload bit flag, RT2 switches back to RT3 to forward the data packets.

[0121] Based on the same inventive concept as the embodiment of the method, the embodiment of this application further provides an apparatus, and reference is made to FIG. 7. The apparatus 700 is applied to a network device. The apparatus 700 may include a receiving module 701, a processing module 702, and a sending module 703. The apparatus 700 may specifically be a processor, a chip, a chip system, a function module, etc. in the network device. The processing module 702 is used to control and manage the operation of the apparatus 700, the receiving module 701 is used to receive information or packets, the sending module 703 is used to transmit information or packets, and the processing module 702 is used to process the information or packets received by the receiving module 701. The processing module 702 may also be used to indicate a processing process in the network device (such as the first node or RT2) in any of the above-mentioned embodiments and / or another process of the technical solution described in this application. The apparatus may further include a storage module (not shown in FIG. 7), where the storage module is configured to store the context table and the primary / backup forwarding table. In a possible implementation, the apparatus 700 may be applied to a previous hop node of a failure node, such as the first node in the embodiment corresponding to FIG. 2, or RT2 in the embodiment corresponding to FIG. 3 and FIG. 4.

[0122] For example, the apparatus 180 is applied to a first node. The receiving module 701 is configured to receive a first packet sent by a second node, where the second node is a previous hop node of the first node on a primary path. The processing module 702 is configured to determine a difference between an initial value of a segment routing global block SRGB of the first node and an initial value of SRGB of the third node when the third node is determined to be failed, where the third node is a next hop node of the first node on the primary path. The processing module 702 is configured to obtain a first label from the first packet, where the first label is determined based on the initial value of SRGB of the third node and a node segment identifier of a fourth node, where the fourth node is a next hop node of the third node on the primary path. The processing module 702 is configured to use the sum of the first label and the difference as an incoming label for a backup path from the first node to the fourth node, and to determine an outgoing label of the backup path from the first node to the fourth node from a backup forwarding table. And the sending module 703 is configured to send the first packet to a next hop node of the first node on the backup path based on the outgoing label.

[0123] In a possible implementation, the first packet includes a label stack list that is used to provide guidance for forwarding the first packet on the primary path.

[0124] The processing module 702 is specifically configured to obtain a second label from the top of the label stack list when determining a difference between an initial value of SRGB of the first node and an initial value of SRGB of the third node, where the second label is determined based on a node segment identifier of the third node and the initial value of SRGB of the first node, to determine a first forwarding behavior corresponding to the second label in a backup forwarding table, where the first forwarding behavior is used to instruct searching a label information table, and the label information table includes the difference corresponding to the second label, and to obtain the difference from the label information table.

[0125] In a possible implementation, when obtaining the first label from the first packet, the processing module 702 is specifically configured to obtain the first label from the top of the label stack list from which the second label is popped after popping the second label at the top of the label stack list. The processing module 702 is further configured to switch the first label in the label stack list to an outgoing label. And the sending module 703 is specifically configured to send the updated first packet to a next-hop node of the first node on the backup path.

[0126] In a possible implementation, the transmitting module 703 is further configured to flood the node segment identifier of the third node into the network for another node before the receiving module 701 receives the first packet transmitted by the second node and after the node segment identifier of the third node flooded into the network by the third node is received, where a priority of the node segment identifier of the third node flooded by the first node is lower than a priority of the node segment identifier of the third node flooded by the third node.

[0127] The first label is determined by the second node based on the node segment identifier of the third node and the initial value of the SRGB of the first node flooded by the first node.

[0128] In a possible embodiment, the receiving module is further configured to receive indication information sent by the third network device after the failure is recovered, where the indication information is used to indicate that the third network device cannot forward the packet correctly, and the transmitting module is further configured to transmit the second packet based on the determined outgoing label when the receiving module receives the second packet sent by the second network device.

[0129] In a possible embodiment, the apparatus 700 may be applied to a source node of a loose path segment, for example the second node shown in FIG. 2, or RT1 in the embodiment corresponding to FIGS.

[0130] Taking the application to the second node as an example, the receiving module 701 is configured to receive a node segment identifier of a third network device flooded in the network by the first network device, where the third network device is an adjacent network device of the first network device, and the priority of the node segment identifier of the third network device flooded by the first network device is lower than the priority of the node segment identifier of the third network device flooded by the third network device. The processing module 702 is configured to determine that a failure occurs in the third network device in the process of sending the packet by using the primary path, where the first network device is a next-hop network device of the second network device on the primary path, and the third network device is a next-hop network device of the first network device on the primary path. And the sending module 703 is configured to send the packet to the first network device over the backup path based on the node segment identifier of the third network device flooded by the first network device, where the first network device is a next-hop network device of the second network device on the backup path.

[0131] The embodiment of this application further provides a structure of a network device. As shown in FIG. 8, the network device 800 may include a communication interface 810 and a processor 820. Optionally, the network device 800 may further include a memory 830. The memory 830 may be disposed in the network device or may be disposed outside the network device. As shown in FIG. 7, the processing module 702 is implemented by the processor 820. The receiving module 701 and the transmitting module 703 may be implemented by the communication interface 810.

[0132] In a possible implementation, the processor 820 is configured to receive and send packets or messages by using the communication interface 810, and to implement any method performed by the node (first node or RT2) in Figures 2 to 4. During implementation, the steps of the process flow may implement the method performed by the first node or RT2 described in Figures 2 to 4 through an integrated logic circuit of hardware or instructions in software in the processor 820. For brevity, the details will not be described again here. The program code executed by the processor 820 to implement the above-mentioned method may be stored in the memory 830. The memory 830 is coupled to the processor 820.

[0133] In a possible implementation, the processor 820 is configured to receive and send packets or messages by using the communication interface 810, and to implement any method performed by the node (first node or RT2) in Figures 2 to 4. During implementation, the steps of the process flow may implement the method performed by the first node or RT2 described in Figures 2 to 4 through an integrated logic circuit of hardware or instructions in software in the processor 820. For brevity, the details will not be described again here. The program code executed by the processor 820 to implement the above-mentioned method may be stored in the memory 830. The memory 830 is coupled to the processor 820.

[0134] Any communication interface in the embodiments of this application may be a circuit, a bus, a transceiver, or any other device that may be configured to exchange information. For example, the communication interface 810 in the network device 800 may be a device connected to the network device 800, such as a previous hop node or a next hop node of the network device 800, for example.

[0135] In the embodiments of this application, the processor may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor, any conventional processor, etc. The steps of the methods disclosed with reference to the embodiments of this application may be directly executed by a hardware processor, or may be executed by using a combination of hardware and software modules in the processor.

[0136] A coupling in the embodiments of this application is an indirect connection or communication connection between devices, modules, or modules, which may be electrical, mechanical, or in another form, and is used for the interaction of information between devices, modules, and modules.

[0137] The processor 820 may operate in conjunction with a memory 830. The memory 830 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), or may be a volatile memory, such as a random-access memory (RAM). The memory 830 may be any other medium, including but not limited to, that can carry or store expected program code in the form of instructions or data structures and that can be accessed by a computer.

[0138] In this embodiment of the application, the particular connection medium between the communication interface 810, the processor 820, and the memory 830 is not limited. According to this embodiment of the application, in FIG. 8, the memory 830, the processor 820, and the communication interface 810 are connected to each other by using a bus. The bus is represented by using a thick line in FIG. 8. The manner of connection between the other components is merely illustrated generally, but is not used as a limitation. The bus can be classified into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used to represent the bus in FIG. 8, but this does not mean that there is only one bus or only one type of bus.

[0139] Based on the above embodiment, an embodiment of this application further provides a computer storage medium. The storage medium stores a software program, and when read and executed by one or more processors, the software program can implement the method provided in any one or more of the above embodiments. The computer storage medium may include any medium that can store program code, such as a removable hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.

[0140] Based on the above-mentioned embodiment, this embodiment of the application also provides a chip, where the chip includes a processor for performing any one or more functions of the above-mentioned embodiment, such as for implementing the method performed by the first node or RT2 in FIG. 2 to FIG. 4, or for implementing the method performed by the second node or RT1 in FIG. 2 to FIG. 4. Optionally, the chip may further include a memory. The memory is configured to store program instructions and data required and executed by the processor. The chip system may include the chip, or may include the chip and another individual device.

[0141] Those skilled in the art should understand that the embodiments of this application may be provided as a method, a system, or a computer program product. Thus, this application may use the form of an embodiment that uses only hardware, only software, or a combination of software and hardware. Furthermore, this application may use the form of a computer program product embodied in one or more computer usable storage media (including, but not limited to, disk memory, CD-ROM, optical memory, etc.) that contains computer usable program code.

[0142] This application is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that computer program instructions can be used to implement each process and / or each block in the flowcharts and / or block diagrams, and combinations of processes and / or blocks in the flowcharts and / or block diagrams. These computer program instructions can be provided for a processor of a general purpose computer, a special purpose computer, an embedded processor, or any other programmable data processing device to create a machine. The instructions executed by the processor of the computer or any other programmable data processing device thus create an apparatus for implementing the specified functions in one or more processes in the flowcharts and / or one or more blocks in the block diagrams.

[0143] These computer program instructions may be stored in a computer readable memory that can instruct a computer or any other programmable data processing apparatus to operate in a particular manner. The instructions stored in the computer readable memory thus generate an artifact that includes an instruction apparatus that implements a particular function in one or more processes in the flowcharts and / or one or more blocks in the block diagrams.

[0144] These computer program instructions may be loaded onto a computer or other programmable data processing apparatus such that a sequence of operations and steps are executed on the computer or other programmable apparatus, thereby producing a computer-implemented process. Thus, the instructions that execute on the computer or other programmable apparatus provide steps for implementing a particular function in one or more processes in the flowcharts and / or one or more blocks in the block diagrams.

[0145] It is obvious that a person skilled in the art can make various modifications and variations to this application without departing from the scope of this application. This application is intended to cover these modifications and variations, provided that they fall within the scope of protection defined by the following claims and their equivalent technologies. [Explanation of symbols]

[0146] 700 equipment 700 701 Receiver Module 702 Processing Module 703 Transmitting Module 800 Network Devices 810 Communication Interface 820 Processor

Claims

1. 1. A method for handling a transmission path failure, comprising: receiving, by a first network device, a first packet transmitted by a second network device, the second network device being a previous hop network device of the first network device on a primary path; determining, by the first network device, in response to determining that a third network device has failed, a difference between an initial value of a segment routing global block SRGB of the first network device and an initial value of SRGB of the third network device, the third network device being a next-hop network device of the first network device on the primary path; obtaining, by the first network device, a first label from the first packet, the first label corresponding to a fourth network device that is a next hop network device of a third network device on the primary path; determining, by the first network device, a backup path from the first network device to the fourth network device based on a sum of the first label and the difference; transmitting, by the first network device, the first packet on the backup path to a next hop network device of the first network device; A method comprising:

2. the first label is determined based on an initial value of SRGB of the third network device and a node segment identifier of the fourth network device; The method of claim 1.

3. determining, by the first network device, a backup path from the first network device to the fourth network device based on a sum of the first label and the difference, using, by the first network device, the sum of the first label and the difference as an incoming label; determining, by the first network device, from a forwarding table, an outgoing label of the backup path from the first network device to the fourth network device; Including, searching said forwarding table with said incoming label to determine said outgoing label; The method of claim 1.

4. The method further comprises: flooding, by the first network device, the node segment identifier of the third network device to another network device in the network after receiving the node segment identifier of the third network device flooded into the network by the third network device; 4. The method according to claim 1 .

5. The method further comprises: receiving, by the first network device, indication information sent by the third network device after the failure is recovered, the indication information being used to indicate that the third network device cannot forward packets correctly; transmitting, by the first network device, a second packet based on the backup path upon receiving a second packet transmitted by the second network device; The method according to any one of claims 1 to 4, comprising:

6. An apparatus for handling a transmission path failure, the apparatus being applied to a first network device, a receiving module configured to receive a first packet transmitted by a second network device, the second network device being a previous hop network device of the first network device on a primary path; a processing module, configured to determine, in response to the processing module determining that a third network device has failed, a difference between an initial value of a segment routing global block (SRGB) of the first network device and an initial value of SRGB of the third network device, the third network device being a next-hop network device of the first network device on the primary path; configured to obtain a first label from the first packet, the first label corresponding to a fourth network device that is a next hop network device of the third network device on the primary path; and determining a backup path from the first network device to the fourth network device based on a sum of the first label and the difference. A processing module; a transmission module configured to transmit the first packet to a next hop network device of the first network device on the backup path; 13. An apparatus comprising:

7. the first label is determined based on an initial value of SRGB of the third network device and a node segment identifier of the fourth network device; 7. The apparatus of claim 6.

8. The processing module further comprises: using the sum of the first label and the difference as an incoming label; and determining an outgoing label for the backup path from the first network device to the fourth network device from a forwarding table; It is structured as follows: searching said forwarding table with said incoming label to determine said outgoing label; 7. The apparatus of claim 6.

9. The transmission module further comprises: configured to flood the node segment identifier of the third network device to another network device in the network after receiving the node segment identifier of the third network device flooded into the network by the third network device; 9. Apparatus according to any one of claims 6 to 8.

10. The receiving module further comprises: configured to receive indication information sent by the third network device after the failure is recovered, the indication information being used to indicate that the third network device cannot forward packets correctly; and The transmission module further comprises: configured to transmit a second packet based on the backup path when the receiving module receives a second packet transmitted by the second network device; 10. Apparatus according to any one of claims 6 to 9.

11. A network device, A communication interface, a processor, and a memory; the memory is configured to store a software program; and The processor, Reading the software program stored in the memory; Receiving and sending messages via the communication interface; and Implementing the method according to any one of claims 1 to 5, It is configured as follows: Network device.

12. 1. A system comprising: A device according to any one of claims 6 to 10, or A network device according to claim 11 . Including, the system.

Citation Information

Patent Citations

  • System and method for implementing label switch router (LSR) overload protection

    JP2015515827A

  • Network system and packet transfer method

    JP2017034365A

  • Egress protection for label switched paths

    US8259564B1

  • Node protection for stacked labels

    US9794148B1