WO2024039262A1 - Method for determining backup path and related device - Google Patents

Method for determining backup path and related device Download PDF

Info

Publication number
WO2024039262A1
WO2024039262A1 PCT/RU2022/000257 RU2022000257W WO2024039262A1 WO 2024039262 A1 WO2024039262 A1 WO 2024039262A1 RU 2022000257 W RU2022000257 W RU 2022000257W WO 2024039262 A1 WO2024039262 A1 WO 2024039262A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
tree
subtree
link
network
Prior art date
Application number
PCT/RU2022/000257
Other languages
French (fr)
Inventor
Longfei DAI
Zhaoyu Jiang
Original Assignee
Huawei Technologies Co., Ltd.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Priority to PCT/RU2022/000257 priority Critical patent/WO2024039262A1/en
Publication of WO2024039262A1 publication Critical patent/WO2024039262A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]

Definitions

  • Embodiments of the present application relate to the field of network technologies, and more specifically, to a method for determining a backup path and a related device.
  • Embodiments of the present application provide a method for determining a backup path and a related device.
  • the technical solution may provide fast traffic recovery when more than one failures occurr on almost the same time.
  • an embodiment of the present application provides a method for determining a backup path, including: determining, by a first node, a pair of trees according to a network including the first node, where the pair of trees includes a first tree and a second tree, and where a path from any node X to the first node along the first tree is node-disjoint with a path from the node X to the first node along the second tree, and where both a root of the first tree and a root of the second are the first node; determining, by the first node, the backup path for each primary next-hop link of the second tree according to the second tree and the network; and forwarding, by the first node, a received packet according to the first tree, the second tree, or the backup path.
  • the first node may determine at least one backup path for its backup tree (e.g., the second tree), and if the failure occurs in a main tree (e.g., the first tree) and in a backup tree at the same time, the first node may forward the packet according to the backup path. Therefore, the technical solution provided by the embodiments of the present application may protect against a dual link failure and provide fast traffic recovery when more than one failures occurr on almost the same time. Further, the first node may focus on the failure of the node and the failure of the primary next-hop link of the second tree. The first node does not need to consider the failure of each link in the network. Therefore, the complexity of the forwarding table of the first node may be O (N), where N is a number of nodes in the network including the first node.
  • determining, by the first node, the backup path for each primary next-hop link of the second tree according to the second tree and the network includes: splitting, by the first node, the second tree into a first subtree and a second subtree, where the second subtree includes a second node and a descendant node of the second node, and where the first subtree includes a node belonging to the second tree but not to the second subtree, and where the second node and the first node are endpoints of a first primary next-hop link; determining, by the first node, a first connected node in the second subtree according to the first subtree, the second subtree, and a network graph corresponding to the network, where the first connected node is an endpoint of a connecting edge in the network graph, and another endpoint of the connecting edge is a node belonging to the first subtree; and determining, by the first node, the backup path of the first primary next-hop
  • the backup path corresponding to the first connected node or the descendant node of the first connected node includes at least one forward node, and the at least one forward node includes the first connected node
  • the backup path corresponding to an ancestor node of the first connected node in the second subtree or a target descendant node of the ancestor node includes K forward nodes, where the K forward nodes include nodes in a path from the ancestor node to the first connected node, and where the target descendant node is a first child node of the ancestor node or the descendant node of the first child node of the ancestor node, and the first connected node is a second child node of the ancestor node or the descendant node of the second child node, and where K is a positive integer greater than 1.
  • determining, by the first node, the backup path of the first primary next-hop link according to the second subtree and the first connected node includes: determining, by the first node, the backup path of the first primary next-hop link by using segment routing technology.
  • the packet may be easily forwarded though the backup path and the packet may be forwarded through a specified node.
  • the packet may be forwarded to a destination node through a specified sub-topology.
  • determining, by the first node, a first connected node in the second subtree according to the first subtree, the second subtree, and a network graph corresponding to the network includes: determining, by the first node, at least two candidate nodes in the second subtree according to the first subtree, the second subtree, and the network graph, where each of the at least two candidate nodes is an endpoint of an edge connecting the second subtree with the first subtree except an edge corresponding to the first primary next-hop link; determining, by the first node, distances between the first node and each of the at least two candidate nodes in the second subtree; and determining, by the first node, the first connected node from the at least two candidate nodes according to the distances between the first node and each of the at least two candidate nodes in the second subtree, where a distance between the first node and the first connected node is less than or equals to a distance between the first no
  • determining, by a first node, a pair of trees according to a network including the first node includes: determining, by the first node, at least one almost directed acyclic graph, AD AG, according to the network graph by using a depth-first search; combining, by the first node, all of the at least one ADAG to construct a generalized ADAG, GAD AG; and determining, by the first node, the pair of trees according to the GAD AG.
  • Using the depth-first search may construct a larger ADAG as possible, thereby reducing the number of ears and the number of connecting edges. Therefore, the first node may spend less time to find the first connected node.
  • the forwarding, by the first node, the received packet according to the first tree, the second tree, or the backup path includes: determining, by the first node, whether a third node or a first link fails, where the first link is configured to connect the first node with the third node in the first tree; if the first link and the third node do not fail, forwarding the received packet according to the first tree; if the first link or the third node fails, determining whether a second link or a fourth node fails, where the second link is configured to connect the first node with the fourth node in the second tree; if the second link and the fourth node do not fail, forwarding the received packet according to the second tree; and if the second link or the fourth node fails, forwarding the received packet according to the backup path.
  • the method further including: if the first link and the second node do not fail, setting a flag in the received packet into a first value, where the first value is used to indicate that the first link and the second node do not fail; and if the first link or the second node fails, setting the flag in the received packet into a second value, where the second value is used to indicate that the first link or the second node fails.
  • an embodiment of the present application provides a network device, and the network device has a function of implementing the method in the first aspect.
  • the function may be implemented by hardware, or may be implemented by hardware executing corresponding software.
  • the hardware of the software includes one or more modules corresponding to the function.
  • an embodiment of the present application provides a computer readable storage medium, including an instruction.
  • the instruction runs on a network device, the network device is configured to perform the method in the first aspect or any possible implementation of the first aspect.
  • a network device including a processor and a memory.
  • the processor is connected to the memory.
  • the memory is configured to store an instruction
  • the processor is configured to execute the instruction.
  • the processor executes the instruction stored in the memory, the processor is configured to perform the method in the first aspect or any possible implementation of the first aspect.
  • a chip system includes a memory and a processor, where the memory is configured to store a computer program, and the processor is configured to invoke the computer program from the memory and run the computer program, so that a network device on which the chip is disposed performs the method in the first aspect or any possible implementation of the first aspect.
  • a computer program product is provided, where when the computer program product runs on a network device, the network device is configured to perform the method in the first aspect or any possible implementation of the first aspect.
  • FIG. 1 illustrates an example of a network 100.
  • FIG. 2 is a block diagram illustrating a GAD AG 101 associated with the network graph of FIG. 1.
  • FIG. 3 illustrates a pair of trees computed by a node 10A.
  • FIG. 4 illustrates a pair of trees computed by a node 10B.
  • FIG. 5 illustrates a pair of trees computed by a node 10D.
  • FIG. 6 illustrates a flowchart of a method for determining a backup path according to an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of a network device according to an embodiment of the present application.
  • FIG. 8 is a schematic block diagram of a network device according to an embodiment of the present application.
  • FIG. 9 is a schematic block diagram of a network device according to an embodiment of the present application. DESCRIPTION OF EMBODIMENTS
  • a directed acyclic graph is a graph where all links are directed and there are no cycles in it.
  • An almost directed acyclic graph is a graph with one node designated as a root.
  • the graph has the property that if all links incoming to the root were removed, then the resulting graph would be a DAG.
  • a generalized almost directed acyclic graph is a graph composed of the ADAGs of all blocks.
  • the term “block” refers to either a 2-connected cluster, a cut-edge, or a cut-vertex.
  • the 2-connected cluster is a maximal set of 2-connected nodes.
  • the term “2-connected” is a graph that has no cut-vertices and requires two nodes to be removed before the network is partitioned.
  • the cut-vertex is a vertex whose removal partitions a network graph.
  • Redundant trees is a pair of trees where a path from any node X to a root R along one of the pair of trees is node-disjoint with the path from the same node X to the root along another one of the pair of trees.
  • the redundant trees can always be computed in the 2-connected graph.
  • Maximally redundant trees is a pair of trees where the path from any node X to the root R along one of the pair of trees and the path from the same node X to the root along another one of the pair of trees share a minimum number of nodes and a minimum number of links. Each such shared node is a cut-vertex. Any shared links are cut-links. In the graph that is not 2-connected, it is impossible to compute the RTs. However, it is possible to compute the MRTs.
  • the MRTs are maximally redundant in a sense that they are as redundant as possible given the constraints of the network graph.
  • One of the two MRTs is regarded as MRT-red, the other of the two MRTs is regarded as MRT-blue. Different MRTs may be computed on the same network graph, depending on what algorithm is used for MRT computation or depending on which neighbor node the computing node selects for a first cycle.
  • a cut-link is a link whose removal partitions the network.
  • the cut-link by definition must be connected between two cut- vertices.
  • a network device mentioned in the present application is a networking apparatus including hardware and software, which may communicatively interconnect other equipment in the network.
  • the network device may be a router, a switch, or an electronic apparatus implementing routing function and/or switching function.
  • FIG. 1 illustrates an example of a network 100.
  • the network 100 includes network devices 10A-10F (hereinafter referred to as “network devices 10” or “nodes 10”) configured to employ the techniques of the present application.
  • the network devices 10 may use the techniques described herein to determine a backup path for rerouting a packet and to forward a received packet according to the determined backup path.
  • the network devices 10 are connected to one another by links 11A to 11L (hereinafter referred to as “links 11”).
  • the network devices 10 may run a link state protocol (such as open shortest path first (OSPF) or intermediate system to intermediate system (IS-IS)) to realize basic routing intercommunication.
  • OSPF open shortest path first
  • IS-IS intermediate system to intermediate system
  • the network devices 10 may exchange link state routing information to learn a topology of the network 100 according to the link state protocol.
  • the network 100 may include additional network devices and/or links (not shown).
  • Each of the network devices 10 may calculate a pair of trees for itself.
  • a network graph is a graph that reflects the network topology where all links are connected to exactly two nodes and broadcast links have been transformed into a standard pseudo-node representation.
  • FIG. 1 illustrates an example arrangement of nodes 10 in a network graph that is a 2-connected graph.
  • FIG. 2 is a block diagram illustrating a GAD AG 101 associated with the network graph of FIG. 1.
  • the GAD AG 101 shown in FIG. 2 is a GAD AG determined by the nodes 10. As shown in FIG. 2, the GADAG 10 also includes the node 10, and the nodes 10 are connected by links 12A to 12H (hereinafter referred to as “links 12”). The direction of the links 12 shown in FIG. 2 is the direction of the GADAG 101.
  • the nodes 10 may determine at least one AD AG and combine the at least one AD AG to construct the GADAG 101. Details of GADAG are found in Enyedl, G., “An Algorithm for Computing IP/LDP Fast Reroute Using Maximally Redundant Trees (MRT-FRR)”, RFC 7811, June 2016.
  • FIG. 2 shows a pair of trees associated with the GADAG of FIG. 2.
  • the pair of threes include a tree 102 shown in FIG. 2 (a) and a tree 103 shown in FIG. 2 (b).
  • a path from any node X to the root (that is, the node 10A) along the tree 102 is node-disjoint with a path from the node X to the root along the tree 103.
  • the pair of trees may be the redundant trees.
  • the tree 102 and the tree 103 may be the MRT, that is, the path from any node X to the root (that is, the node 10 A) along the tree 102 and the path from the same node X to the root along the tree 103 share the minimum number of nodes and the minimum number of links.
  • the tree 102 may be called MRT-red
  • the tree 103 may be called MRT-blue.
  • Each of the nodes 10 may compute the pair of trees for itself.
  • FIG. 4 illustrates the pair of trees computed by a node 10B
  • FIG. 5 illustrates the pair of trees computed by the node 10D.
  • one of the pair of trees determined by the nodes 10 may be called a red tree or a first tree, and the other one of the pair of trees may be called a blue tree or a second tree.
  • the tree 102 is the red tree (or the first tree) determined by the node 10A
  • the tree 103 is the blue tree (or the second tree) determined by the node 10A.
  • a tree 104 shown in FIG. 4 (a) is the red tree (or the first tree) determined by the node 10B
  • a tree 105 shown in FIG. 4 (b) is the blue tree (or the second tree) determined by the node 10B.
  • a tree 106 shown in FIG. 5 (a) is the red tree (or the first tree) determined by the node 10D
  • a tree 107 shown in FIG. 5 (b) is the blue tree (or the second tree) determined by the node 10D.
  • the nodes 10 may forward the packet according to the determined pair of trees.
  • the nodes 10 may select one of the red tree and the blue tree as a default tree.
  • an unselected tree is a backup tree.
  • the nodes 10 may forward the packet along the default tree by default.
  • a link or a node in the default tree fails, the nodes 10 may forward the packet along the backup tree.
  • a path from a source node (e.g., the node 10A) to a destination node e.g., a node 10F
  • 10A— >10B— >10G— *10F that is, a path 13A shown in FIG.
  • a path from the node lOA to the node 10F is 10A— »10D— >10E— >10F (that is, a path 13B shown in FIG. 3 (b)).
  • the node 10A may forward the packet to the node 10F along the path 13 A.
  • a main next hop link or node in the default tree fails (e.g., the node 10B or the link 14A fails)
  • the node 10A may forward the packet to the node 10F along the path 13B.
  • the path will be switched to the path in the backup tree after a network failure occurs in the default tree.
  • this method can merely provide fast traffic recovery when one link failure or one node failure occurs but cannot provide fast traffic recovery when more than one failures occurr at almost the same time.
  • the path in the backup tree cannot be configured to forward the packet when a link or node in the default tree and a link or node in the backup tree fail at almost the same time. For example, for the node 10A, if the node 10B and the node 10D fail at almost the same time, the node 10A cannot forward the packet to the node 10F.
  • a re-backup path for the failure may also form a loop together with the original backup path.
  • the node 10A may forward the packet along the path 13B.
  • the node 10D cannot forward the packet to a node 10E.
  • the node 10D may forward the packet according to its own default tree (that is, the tree 107 shown in FIG. 5 (a)), and yet a loop may be formed since the primary next-hop of the node 10D in the tree 107 is the node 10A.
  • each of the nodes in the network may determine at least one backup path for its backup tree, and if the failure occurs in a main path and in the backup path at the same time, the node may forward the packet according to the backup path.
  • the method provided by the embodiments of the present application may be performed by each of the nodes 10.
  • An example in which the node 10A determines the backup path is used for detailed description in the followings.
  • FIG. 6 illustrates a flowchart of a method for determining a backup path according to an embodiment of the present application.
  • the node 10A determines a pair of trees.
  • the node lOA may determine at least one AD AG according to the network 100. Then the node lOAmay combine all of the at least one AD AG to construct a GAD AG (e.g., the GAD AG 101 shown in FIG 2) and determine the pair of trees (e.g., the trees shown in FIG 3) according to the determined GADAG.
  • a GAD AG e.g., the GAD AG 101 shown in FIG 2
  • the pair of trees e.g., the trees shown in FIG 3
  • the node 10A may determine each of the at least one ADAG by using a depth-first search, thereby constructing the largest ADAG as possible and reducing the number of edges in the GADAQ so that the node 10A may spend less time determining the backup path.
  • the node 10A determines the backup path for each primary next-hop link of the backup tree according to the backup tree and the network 100.
  • the pair of trees include a default tree and a backup tree.
  • the node 10A may determine the backup path for each primary next-hop link of the backup tree. Therefore, the node 10A may determine the backup path according to the backup tree and the network including the node 10A (that is, the network 100). For ease of description, it is assumed that the tree 102 is the default tree and the tree 103 is the backup tree. Therefore, according to the step 602, the node 10A may determine the backup path according to the tree 103 and the network 100.
  • the backup path is configured to protect the primary next-hop link, that is, a link connects the root of the backup tree with the child of the root.
  • Two endpoints of the primary next-hop link may be called a first endpoint and a second endpoint.
  • the first endpoint is the root of the backup tree and the second endpoint is the child of the root.
  • FIG. 3 (b) as the node 10A merely includes one child, there is only one primary next-hop, that is, a link 14G.
  • the first endpoint of the primary next-hop link is the node 10 A
  • the second endpoint of the primary next-hop link is the node 10D.
  • the backup path determined by the node 10A are used for protecting the link 14G.
  • the node 10A may split the tree 103 into two subtrees, a first subtree and a second subtree.
  • the second subtree includes the second endpoint of the primary next-hop link and a descendant node of the child node.
  • the first subtree include a node belonging to the tree 103 but not to the second subtree.
  • the second endpoint of the primary next-hop link is the node 10D. Therefore, the second subtree includes the node 10D and the descendent node of the node 10D (that is, a node 10C, the node 10B, the node 10E, the node 10F, and a node 10G).
  • the first subtree merely includes the node 10 A.
  • the node 10A may determine a first connected node in the second subtree according to the first subtree, the second subtree, and the network, and determine the backup path according to the second subtree and the first connected node.
  • the first connected node is an endpoint of a connecting edge in the network, and another endpoint of the edge of the connecting edge is a node belonging to the first subtree.
  • the node 10A may determine an edge which is used for connecting the first subtree and the second subtree in addition to an edge corresponding to the first primary next-hop link, determine one or more candidate nodes according to the determined edge, and determine the first connected node from the candidate node.
  • the node 10A may determine at least one edge according to the network graph.
  • the network graph may include at least one link.
  • the at least one link and the at least one edge are in one-to-one correspondence.
  • One of the at least one link is configured to connect two nodes in the network graph, the two nodes are the endpoints of the corresponding edge, and the two nodes belong to the first subtree and the second subtree respectively. According to the network graph shown in FIG.
  • the link 11 A is the primary next-hop link, so there are only two edges which are configured to connect the node belonging to the first subtree with the node belonging to the second subtree.
  • One of the two edges (hereinafter referred to as “the first edge”) is configured to connect the node 10A with the node IOC, and the other edge (hereinafter referred to as “the second edge”) is configured to connect the node 10A with the node 10B.
  • the first edge corresponds to the link 11B
  • the second edge corresponds to the link 11 A.
  • the node 10A may determine candidate nodes according to the determined edges, the first edge and the second edge.
  • the candidate nodes are the endpoints of the determined edges and belong to the second subtree. Therefore, there are two candidate nodes, the node 10B and the node IOC.
  • the node 10A may determine the distance from the root of the backup tree (that is, the node 10A) to each candidate node and select the node with a shortest distance as the first connected node. Referring to FIG. 3 (b), the distance from the node 10A to the node IOC is 2, and the distance from the node 10A to the node 10B is 3. Therefore, the node IOC is the first connected node.
  • the connecting edge is the first edge, and another endpoint of the connecting edge is the node 10 A.
  • more than two candidate nodes may have the same distance to the root node, and the distance is the shortest distance to the root node. Under this condition, the node 10A may select the candidate node with a minimum path cost as the first connected node. If there are more than two candidate nodes with the shortest distance and the minimum path cost, the node 10A may randomly select one of the nodes as the first connected node.
  • the node 10A may determine the backup path according to the second subtree and the first connected node. Each of the backup paths corresponds to a node in the second subtree.
  • the node corresponding to the backup path is a destination node of the packet forwarded by the node 10A.
  • the node 10A may use a backup path corresponding to the node to forward the packet.
  • the number of the backup paths may be equal to the number of the nodes in the second subtree. Referring to FIG. 3 (b), the second subtree includes six nodes, so the node 10A may determine six backup paths. Table 1 shows a relation between the backup path and the node in the network 100.
  • the path is 10 A— >10C— >I0B; and if the node 10A receives the packet destined for the node 10F, the path is 10A ⁇ 10C->10D- 10E- 10F.
  • Each backup path includes at least one forward node.
  • the forward node is configured to transmit the received packet from a first reference node.
  • the first reference node may be a source node of the packet or another forward node.
  • the forward node may be configured to forward the packet to a second reference node.
  • the second reference node may be another forward node, the destination node of the packet, or a node that can forward the packet to the destination node along a path in the backup tree.
  • the forward node may be the destination node of the packet. If the packet is transmitted along a path in the backup tree, a node which is a forward node in the backup path will not receive the packet from the corresponding first reference node.
  • the backup path corresponding to the first connected node or a descendant node of the first connected node includes at least one forward node, and the at least one forward node includes the first connected node.
  • each of the two backup paths includes one forward node, that is, the node 10C.
  • the first reference node of the forward node (the node 10C) is the node 10 A.
  • the node 10C may receive the packet from the node 10 A. If the destination node of the packet is the node 10B, the node 10C transmits the packet to the node 10B, and the node 10B is the second reference node of the node 10C; and if the destination node of the packet is the node 10C, the node 10C processes the packet by itself.
  • the backup path corresponding to an ancestor node of the node 10A in the tree 103 and a target descendant node of the ancestor node includes K forward nodes, K is a positive integer greater than 1.
  • the target descendant node is a first child node of the ancestor node or a descendant node of the first child node of the ancestor node
  • the first connected node is a second child node of the ancestor node or a descendant node of the second child node.
  • the K forward nodes include the node in a path from the ancestor node to the first connected node.
  • the K forward nodes include the first connected node and its parent node. If the distance from the ancestor node to the first connected is greater than or equals to 2 (that is, the ancestor node is a grandparent node of the first connected node, the great grandparent node of the first connected node, or the like), than the K forward nodes include the first connected node, the ancestor node, and node between the ancestor node and the first connected node.
  • the K forward nodes include the first connected node, the parent node of the first connected node, and the grandparent node of the first connected node. If the ancestor node is the great grandparent node of the first connected node, the K forward nodes include the first connected node, the parent node of the first connected node, the grandparent node of the first connected node, and the great grandparent node of the first connected node. Further, if the second connected node is not the root of the backup tree, the backup path corresponding to the ancestor node of the node lOAmay further include the second connected node.
  • the ancestor node of the first connected node (the node 10C) is the node 10D.
  • the first child node of the node 10D is the node 10E and the second child node of the node 10D is the node IOC. So, the target descendant node of the ancestor node (the node 10D) may be the node 10E, the node 10F, or the node 10G.
  • each of the four backup paths includes two forward nodes, one of the forward nodes is the node IOC, and the other forward node is the node 10D.
  • the first reference node is the node 10 A, and the second reference node is the node 10D; and for the forward node 10D, the first reference node is the node 10C, and the second reference node is the node 10E.
  • the node 10A may use segment routing (SR) technology to build the backup path.
  • the SR technology may be SR-multi-protocol label switching (SR-MPLS) technology or SR internet protocol version 6 (SR-v6) technology.
  • SR-MPLS SR-multi-protocol label switching
  • SR-v6 SR internet protocol version 6
  • the node 10A merely needs to determine one or more key nodes, and then the packet may be transmitted along a shortest path.
  • the forward node is the key node. Therefore, the node 10A may determine SR information (also called SR label or routing information) for the forward node.
  • the SR information may include an adjacency segment ID (SID) of each forward node.
  • SID adjacency segment ID
  • the node 10A may add the SR information including the adjacency SID of the forward node (that is, the node 10C and the node 10D) to the packet and forward the packet to the node 10C.
  • the node 10C may receive the packet from the node 10 A, remove the adjacency SID of the node 10C from the SR information, and forward the packet to the node 10D.
  • the node 10D receives the packet from the node 10C, removes the SR information from the received packet, and forward the packet to the node 10E.
  • the node 10E receives the packet from the node 10D and forwards the packet to the node 10F.
  • the node 10A may also use multi-protocol label switching (MPLS) technology to build the backup path.
  • MPLS multi-protocol label switching
  • the node 10A may add MPLS information to the packet and forward the packet to the forward node, and the forward node may forward the packet according to the MPLS information.
  • the MPLS information may include MPLS label of the forward node.
  • the detail for forwarding the packet by using the MPLS technology may refer to the current MPLS forward method.
  • each node may determine a default tree, a backup tree, and a backup path for each primary next-hop link of the backup tree.
  • the tree 104 shown in FIG. 4 (a) is the default tree
  • the tree 105 shown in FIG. 4 (b) is the backup tree.
  • the node 10B may determine the backup path for each primary next-hop link of the backup tree.
  • a first subtree of the tree 105 includes the node 10B
  • the second subtree of the tree 105 includes the node 10A, the node 10D, the node 10C, the node 10E, the node 10F, and the node 10G.
  • the link 11A is the primary next-hop link of the tree 105, so there are two edges for connecting the node 10B with the node belonging to the second subtree.
  • One of the two edges (hereinafter referred to as “the third edge”) is configured to connect the node 10B with the node 10C, and another edge (hereinafter referred to as “the fourth edge”) is configured to connect the node 10B with the node 10G.
  • the third edge corresponds to the link 11D
  • the fourth edge corresponds to the link 11E.
  • the node 10B may determine two candidate nodes for determining the first connected node of the second subtree of the tree 105.
  • the two candidate nodes are the node 10C and the node 10G.
  • the distance from the node 10B to the node 10C is 3, and the distance from the node 10B to the node 10G is 5. Therefore, the first connected node is the node 10C.
  • the second subtree of the tree 105 includes six nodes, so the node 10B may determine six backup paths as well.
  • the backup paths determined by the node 10B are illustrated in Table 2.
  • the backup path includes one or more backup paths corresponding to the first connected node or a descendant node of the first connected node and one or more backup path corresponding to the ancestor of the first connected node or a target descendant node of the ancestor node.
  • the backup path corresponding to the first connected node or a descendant node of the first connected node may be called a first backup path
  • the backup path corresponding to the ancestor node of the first connected node or the target descendant node of the ancestor node may be called a second backup path.
  • the first connected node 10C does not have a descendant node. So, there is only one first backup path, that is, the backup path 7 shown in Table 2, and the first backup path 7 has one forward node, the node 10C.
  • the parent node of the first connected node (the node 10D) has two child node, the node 10E is the first child node of the node 10D, and the node 10C (the first connected node) is the second child node of the node 10D.
  • the target descendant nodes of the node 10D may include the node
  • each of the backup paths corresponding to the node 10D, the node 10E, the node 10F, and the node 10G (that is, the backup paths 8, 10, 11, and 12 in Table 2) has two forward nodes, the node 10C and the node 10D.
  • the grandparent node of the first connected node (the node 10C), the node 10A only has one child node. Therefore, there is one backup path corresponding to the node 10A (that is, the backup path 9 shown in Table 2), and the backup path 9 has three forward nodes, the node 10C, the node 10D, and the node 10A. If the node 10B receives the packet destined for the node 10C, the path is 10B— *10C; if the node 10B receives the packet destined for the node
  • the path is 10B— »10C— *10D— >10E— >10F; and if the node 10B receives the packet destined from the node 10 A, the path is 10B— +10C— *10D— >10A.
  • the tree 106 shown in FIG. 5(a) is the default tree
  • the tree 107 shown in FIG. 5(b) is the backup tree.
  • the node 10D may determine the backup path for each primary next-hop link of the backup tree.
  • the tree 107 includes two primary next-hop links, one of the links is configured to connect the node 10D with the node 10C (hereinafter referred to as “the first primary next-hop link”), and the other one is configured to connect the node 10D with the node 10E (hereinafter referred to as “the second primary next-hop link”).
  • the node 10D may determine a first subtree and a second subtree.
  • the first subtree includes the node 10D, the node 10E, the node 10F, and the node 10G; and the second subtree includes the node IOC, the node 10B, and the node 10A.
  • there are six links that is, the link 1 IF, the link 11C, the link 11G, the link 11H, the link 111, and the link HE. Since the link I IF is the primary next-hop link, the node 10D may determine five edges which correspond to the link 11C, the link 11G, the link 11H, the link 111, and the link HE.
  • the node 10D may determine three candidate nodes for determining the first connected node.
  • the three candidate nodes are the node IOC, 10B, and 10A.
  • the distance from the node 10D to the node IOC is 1, the distance from the node 10D to the node 10B is 2, and the distance from the node 10D to the node 10A is 3. Therefore, the first connected node is the node IOC.
  • the second subtree corresponding to the first primary next-hop link only includes three nodes, so the node 10D may determine three backup paths for the first primary next-hop link.
  • the backup paths for the first primary next-hop link are illustrated in Table 3.
  • the first connected node 10C has two descendant nodes. So, there are three first backup paths, that is, the backup paths 13 to 15 shown in Table 3, and each of the tree first backup paths includes two forward nodes, the node 10E and the node 10C.
  • the node 10D does not need to determine the second backup path since the first connected node (the node 10C) has no ancestor node. According to the backup paths shown in Table 3, if the destination node of the packet received by the node 10D is the node 10B, the path is 10D— HOE— HOC— HOB.
  • the node 10D may determine a first subtree and a second subtree.
  • the first subtree includes the node 10D, the node 10C, the node 10B, and the node 10A
  • the second subtree includes the node 10E, the node 10F, and the node 10G.
  • there are five links that is, the link 11 J, the link 11G, the link 11H, the link 111, and the link HE. Since the link 11 J is the primary next-hop link, the node 10D may determine four edges which correspond to the link 11G, the link 11H, the link 111, and the link 11E.
  • the node 10D may determine three candidate nodes for determining the first connected node.
  • the three candidate nodes are the node 10E, 10F, and 10G.
  • the distance from the node 10D to the node 10E is 1, the distance from the node 10D to the node 10F is 2, and the distance from the node 10D to the node 10F is 3. Therefore, the first connected node is the node 10E.
  • the second subtree corresponding to the second primary next-hop link only includes three nodes, so the node 1 OD may determine three backup paths for the second primary next-hop link.
  • the backup paths for the second primary next-hop link are illustrated in Table 4.
  • the first connected node 10E has two descendant nodes. So, there are three first backup paths, that is, the backup paths 16 to 18 shown in Table 4, and each of the tree first backup paths includes two forward nodes, the node 10C and the node 10E.
  • the node 10D does not need to determine the second backup path since the first connected node (the node 10E) has no ancestor node. For example, according to the backup paths shown in Table 4, if the destination node of the packet received by the node 1 OD is the node 1 OF, the path is lOD-HOC-lOE-HOF.
  • the node 10A may forward the received packet according to the default tree, the backup tree, or the backup path.
  • Each node of the network 100 may determine a default tree routing table, a backup tree routing table, and a backup path routing table. Similarly, According to the above-mentioned routing table, the nodes of the network 100 may process the following scenarios:
  • scenario 1 none of the nodes or the links in the network 100 occurs a failure
  • scenario 2 the primary next-hop link of the default tree and/or the primary next-hop of the default tree occurs a failure
  • scenario 3 the primary next-hop link of the default tree and/or the primary next-hop of the default tree occurs a failure, and the primary next-hop link of the backup tree and/or the primary next-hop of the backup tree occurs a failure, at almost the same time.
  • the resource node of a packet of a data flow is the node 10A and the destination node of the packet is the node 10F.
  • the path for transmitting the packet is the path 13 A.
  • a value of a flag (also called a packet forwarding flag) in the packet is the first value. The first value is used to indicate that neither the primary next-hop link of the default tree nor the primary next-hop occurs a failure.
  • the source node of the packet is the node 10D
  • the destination node is the node 10G.
  • the link 11 J that is, the link for connecting the node 10D with the node 10E, also called the links D-E
  • the link HE that is, the link for connecting the node 10B with the node 10G, also called the links B-G
  • the packet is forwarded along the tree 106 by default, when the packet is on the node 10D, the failure of the link 11 J does not affect the path in the tree 106, so the packet is forwarded along the tree 106, and the value of the packet forwarding flag is the first value.
  • the node 10B checks that the value of the packet forwarding flag is the first value, and the default tree routing table is queried to know that the packet needs to be sent along the link HE. However, due to the failure of the link 11E, the node 10B cannot forward the packet to the node 10G. Therefore, the value of the flag is set to the second value (the second value is used to indicate that the primary next-hop link of the default tree or the primary next-hop occurs a failure), and the routing table of the tree 105 (that is, the backup tree routing table) is queried, and the node 10B may forward the packet to the destination node 10E along the path 13C in the tree 105.
  • the second value is used to indicate that the primary next-hop link of the default tree or the primary next-hop occurs a failure
  • the nodes along the route path identify the packet forwarding flag and forward the packet according to their respective backup tree routing table (e.g., the node 10A may forward the packet according to the backup tree (that is, the tree 103) routing table), so the packet is transmitted to the destination node 10E along the path 13C: 10B— H0A— HOD— HOE— HOF— HOG, and the entire path for transmit the packet is 1 OD— 10 A— * 1 OB- 10 A— > 1 OD— > 1 OE- 1 OF ⁇ 1 OG.
  • the nodes along the route path identify the packet forwarding flag and forward the packet according to their respective backup tree routing table (e.g., the node 10A may forward the packet according to the backup tree (that is, the tree 103) routing table), so the packet is transmitted to the destination node 10E along the path 13C: 10B— H0A— HOD— HOE— HOF— HOG, and the entire path for transmit the packet is 1 OD— 10 A— * 1 OB- 10 A
  • the source node of the packet is the node 10A and the destination node is the node 10E.
  • the link 11A that is, the link for connecting the node 10A with the node 10B, also called the links A-B
  • the link 11 J that is, the link for connecting the node 10D with the node 10E, also called the links D-E
  • the link 11 A affects the path in the default tree of the node 10A (that is, the tree 102), so the packet forwarding flag is set to the second value, and the packet is forwarded along a path in the backup tree of the node 10A (that is, the tree 103).
  • the node 10D checks the packet forwarding flag and finds that the flag is the second value, and the backup tree (that is, the tree 107) routing table is queried to know that the packet needs to be sent along the link 11 J. However, due to the failure of the link 11 J, the backup tree of the node 10D cannot be used.
  • the routing table of the backup path of the backup tree of the node 10D is queried, the SR label [node SID 10C, adjacency SID 10E] required for the packet is added to reach the destination node 10E, and the forwarding along the backup path to node label 10C is queried.
  • the packet forwarding flag is the second value, so the SR label is queried and the adjacent label 10E is found, so the packet is forwarded to the adjacent label 10E. After that, the message has been delivered to the destination node 10E.
  • the flag may be one or more reserved bits in the packet.
  • the flag may occupy 1 reserved bit in the packet, e.g., the first value of the flag may be 0 and the second value of the flag may be 1.
  • the flag may occupy two reserved bits in the packet, e.g., the first value of the flag may be 00 and the second value of the flag is 11.
  • the source node may send an independent indication to the subsequent node.
  • the indication is used to indicate a status of the primary next-hop link of the default tree and the primary next-hop.
  • the subsequent node may know the status of the primary next-hop link of the default tree and the primary next-hop.
  • the node 10D may send the packet and the indication (hereinafter referred to as “the first indication”) to the node 10A, and the first indication is used to indicate that neither the link for connecting the node 10D and the node 10A nor the node 10A fails.
  • the node 10A send the packet and the indication to the node 10B, and the indication is used to indicate that neither the link for connecting the node 10A and the node 10B nor the node 10B fails. Due to the failure of the link 11E, the node 10B cannot forward the packet to the node 10G. Therefore, the node 10B sends an indication which is used to indicate that the primary next-hop link of the default tree or the primary next-hop occurs a failure to the node 10 A, and the packet may be forwarded along the path 13C in the tree 105.
  • the node along the route path identifies the indication and forwards the packet according to their respective backup tree routing table (e.g., the node 10A may forward the packet according to the backup tree (that is, the tree 103) routing table), so the packet is transmitted to the destination node 10E along the path 13C: 10B— HOA— HOD— HOE— HOF— HOG, and the entire path for transmit the packet is 10D— HOA— HOB— HOA— HOD— HOE— HOF— HOG.
  • FIG. 7 is a schematic block diagram of a network device 700 according to an embodiment of the present application.
  • the network device 700 includes: a processing unit 701 and a communicating unit 702.
  • the processing unit (701) is configured to determine a pair of trees according to a network including a first node corresponding to the network device 700, where the pair of trees includes a first tree and a second tree, and where a path from any node X to the first node along the first tree is node-disjoint with a path from the node X to the first node along the second tree, and where both a root of the first tree and a root of the second are the first node.
  • the processing unit (701) being further configured to determine a backup path for each primary next-hop link of the second tree according to the second tree and the network.
  • the communicating unit (702) being configured to receive a packet and forward the packet according to the first tree, the second tree, or the backup path.
  • the node 10A may be the first node corresponding to the network device 700.
  • the processing unit (701) is specifically configured to split the second tree into a first subtree and a second subtree, where the second subtree includes a second node and a descendant node of the second node, and where the first subtree includes node belonging to the second tree but not to the second subtree, and where the second node and the first node are endpoints of a first primary next-hop link; determine a first connected node in the second subtree according to the first subtree, the second subtree, and a network graph corresponding to the network, where the first connected node is an endpoint of a connecting edge in the network graph, and another endpoint of the connecting edge is a node belonging to the first subtree; and determine the backup path of the first primary next-hop link according to the second subtree and the first connected node, where each of the backup path corresponds to a node in the second subtree.
  • the backup path corresponding to the first connected node or the descendant node of the first connected node includes at least one forward node, and the at least one forward node includes the first connected node.
  • the backup path corresponding to an ancestor node of the first connected node in the second subtree or a target descendant node of the ancestor node includes K forward nodes, where the K forward nodes include nodes in a path from the ancestor node to the first connected node, and where the target descendant node is a first child node of the ancestor node or the descendant node of the first child node of the ancestor node, and the first connected node is a second child node of the ancestor node or a descendant node of the second child node, and where K is a positive integer greater than 1.
  • the processing unit (701) is specifically configured to determine the backup path of the first primary next-hop link by using segment routing technology.
  • the processing unit (701) is specifically configured to determine at least two candidate nodes in the second subtree according to the first subtree, the second subtree, and the network graph, where each of the at least two candidate nodes is the endpoint of the edge connecting the second subtree with the first subtree except an edge corresponding to the first primary next-hop link; determine distances between the first node and each of the at least two candidate nodes in the second subtree; and determine the first connected node from the at least two candidate nodes according to the distances between the first node and each of the at least two candidate nodes in the second subtree, where a distance between the first node and the first connected node is less than or equals to a distance between the first node and other candidate nodes except the first connected node.
  • the processing unit (701) is specifically configured to determine at least one almost directed acyclic graph, AD AG, according to the network graph by using the depth-first search; combine all of the at least one ADAG to construct a generalized ADAG, GAD AG; and determine the pair of trees according to the GAD AG.
  • the communicating unit (702) is specifically configured to determine whether the second node or a first link fails, where the first link is configured to determine whether a third node or a first link fails, wherein the first link is configured to connect the first node with the third node in the first tree; if the first link and the third node do not fail, forward the packet according to the first tree; if the first link or the third node fails, determine whether a second link or a fourth node fails, wherein the second link is used to connect the first node with the fourth node in the second tree; if the second link and the fourth node do not fail, forward the packet according to the second tree; and if the second link or the fourth node fails, forward the packet according to the backup path.
  • the communicating unit (702) is further configured to set a flag in the received packet into the first value if the first link and the third node do not fail, wherein the first value is used to indicate that the first link and the third node do not fail; and set the flag in the received packet into the second value if the first link or the third node fails, wherein the second value is used to indicate that the first link or the third node fails.
  • a network device 800 may include a transceiver 801, a processor 802, and a memory 803.
  • the memory 803 may be configured to store a code, an instruction, and the like executed by the processor 802.
  • the processor is enabled to perform the methods, the steps, and the logical block diagrams that are disclosed in the embodiments of the present application.
  • the network device 800 may be the node 10A in the above-mentioned embodiments.
  • FIG. 9 is a schematic block diagram of a network device according to an embodiment of the present application.
  • a network device 900 may include a main control board 910 and an interface board 920.
  • the main control board 910 includes a processor 911 and a memory 912.
  • the interface board 920 includes a processor 921, a memory 922 and an interface card 923.
  • the processor 921 of the interface board 920 is used for invoking program instructions in the memory 922 of the interface board to perform message reception and transmission.
  • the processor 911 of the main control board 910 is used to call the program in the memory 910 of the main control board to specify and execute the methods, the steps, and the logical block diagrams that are disclosed in the embodiments of the present application.
  • the network device 900 may be the node 10A in the above-mentioned embodiments.
  • the processor in the embodiments of the present application may be an integrated circuit chip having a signal processing capability.
  • steps of the foregoing method embodiments may be completed by using a hardware integrated logic circuit in the processor, or by using an instruction in a form of software.
  • the processor may be a general purpose processor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or another programmable logic device, a discrete gate or a transistor logic device, or a discrete hardware component.
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the processor may implement or perform the methods, the steps, and the logical block diagrams that are disclosed in the embodiments of the present application.
  • the general purpose processor may be a microprocessor, or the processor may be any conventional processor or the like.
  • the steps of the methods disclosed with reference to the embodiments of the present application may be directly performed and completed by a hardware decoding processor, or may be performed and completed by using a combination of the hardware in the decoding processor and a software module.
  • the software module may be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register.
  • the storage medium is located in the memory, and the processor reads information in the memory and completes the steps of the foregoing methods in combination with the hardware in the processor.
  • the memory in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both a volatile memory and a nonvolatile memory.
  • the nonvolatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), or a flash memory.
  • the volatile memory may be a random access memory (Random Access Memory, RAM) and is configured as an external cache.
  • RAMs may be used, and are, for example, a static random access memory (Static RAM, SRAM), a dynamic random access memory (Dynamic RAM, DRAM), a synchronous dynamic random access memory (Synchronous DRAM, SDRAM), a double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), an enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), a synchronous link dynamic random access memory (Synchronous link DRAM, SLDRAM), and a direct rambus random access memory (Direct Rambus RAM, DR RAM).
  • Static RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • Enhanced SDRAM, ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • Direct Rambus RAM Direct Rambus RAM
  • the memory in the systems and the methods described in this specification includes but is not limited to these memories and a memory of any other appropriate type.
  • An embodiment of the present application further provides a system chip, where the system chip includes an input/output interface, at least one processor, at least one memory, and a bus.
  • the at least one memory is configured to store an instruction
  • the at least one processor is configured to invoke the instruction of the at least one memory to perform an operation performed by the network device in the methods in the foregoing embodiments.
  • An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a program instruction for performing the steps performed by the network device in the foregoing methods.
  • the storage medium may be specifically the memory 803.
  • An embodiment of the present application further provides a computer program product, where when the computer program product runs on a network device, the electronic device is configured to perform the steps performed by the network device in the foregoing methods.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the described apparatus embodiment is merely an example.
  • the unit division is merely logical function division and may be other division in actual implementation.
  • a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed.
  • the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces.
  • the indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.
  • the units described as separate parts may be or may not be physically separate, and the parts displayed as units may be or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.
  • the computer software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or some of the steps of the methods described in the embodiments of the present application.
  • the foregoing storage medium includes: any medium that can store a program code, such as a USB flash drive, a removable hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, or an optical disc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Embodiments of the present application provide a method for determining a backup path and a related device, which includes: determining, by a first node, a pair of trees according to a network including the first node, where the pair of trees includes a first tree and a second tree, and where a path from any node X to the first node along the first tree is node-disjoint with a path from the node X to the first node along the second tree, and where both a root of the first tree and a root of the second are the first node; determining, by the first node, the backup path for each primary next-hop)ink of the second tree according to the second tree and the network; and forwarding, by the first node, a received packet according to the first tree, the second tree, or the backup path. According to the embodiments of the present application, the first node may determine at least one backup path for its backup tree (the second tree), and if the failure occurs in a main path and in the backup path at the same time, the first node may forward the packet according to the backup path. Therefore, the technical solution provided by the embodiments of the present application may provide fast traffic recovery when more than one failures occur on almost the same time.

Description

METHOD FOR DETERMINING BACKUP PATH AND RELATED
DEVICE
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of network technologies, and more specifically, to a method for determining a backup path and a related device.
BACKGROUND
[0002] When a link or node failure occurs in a network, there is inevitably a period of disruption to the delivery of traffic until the network is recovered from the failure. Network recovery efficiency in the event of the network failure is a key indicator for measuring network service quality. The network should be recovered from a failure as soon as possible. Therefore, it is desirable to provide fast traffic recovery an upon link or node failure.
SUMMARY
[0003] Embodiments of the present application provide a method for determining a backup path and a related device. The technical solution may provide fast traffic recovery when more than one failures occurr on almost the same time.
[0004] According to a first aspect, an embodiment of the present application provides a method for determining a backup path, including: determining, by a first node, a pair of trees according to a network including the first node, where the pair of trees includes a first tree and a second tree, and where a path from any node X to the first node along the first tree is node-disjoint with a path from the node X to the first node along the second tree, and where both a root of the first tree and a root of the second are the first node; determining, by the first node, the backup path for each primary next-hop link of the second tree according to the second tree and the network; and forwarding, by the first node, a received packet according to the first tree, the second tree, or the backup path.
[0005] According to the embodiments of the present application, the first node may determine at least one backup path for its backup tree (e.g., the second tree), and if the failure occurs in a main tree (e.g., the first tree) and in a backup tree at the same time, the first node may forward the packet according to the backup path. Therefore, the technical solution provided by the embodiments of the present application may protect against a dual link failure and provide fast traffic recovery when more than one failures occurr on almost the same time. Further, the first node may focus on the failure of the node and the failure of the primary next-hop link of the second tree. The first node does not need to consider the failure of each link in the network. Therefore, the complexity of the forwarding table of the first node may be O (N), where N is a number of nodes in the network including the first node.
[0006] In a possible design, where the determining, by the first node, the backup path for each primary next-hop link of the second tree according to the second tree and the network, includes: splitting, by the first node, the second tree into a first subtree and a second subtree, where the second subtree includes a second node and a descendant node of the second node, and where the first subtree includes a node belonging to the second tree but not to the second subtree, and where the second node and the first node are endpoints of a first primary next-hop link; determining, by the first node, a first connected node in the second subtree according to the first subtree, the second subtree, and a network graph corresponding to the network, where the first connected node is an endpoint of a connecting edge in the network graph, and another endpoint of the connecting edge is a node belonging to the first subtree; and determining, by the first node, the backup path of the first primary next-hop link according to the second subtree and the first connected node, where each of the backup path corresponds to a node in the second subtree.
[0007] In a possible design, where the backup path corresponding to the first connected node or the descendant node of the first connected node includes at least one forward node, and the at least one forward node includes the first connected node
[0008] In a possible design, where the backup path corresponding to an ancestor node of the first connected node in the second subtree or a target descendant node of the ancestor node includes K forward nodes, where the K forward nodes include nodes in a path from the ancestor node to the first connected node, and where the target descendant node is a first child node of the ancestor node or the descendant node of the first child node of the ancestor node, and the first connected node is a second child node of the ancestor node or the descendant node of the second child node, and where K is a positive integer greater than 1.
[0009] In a possible design, where the determining, by the first node, the backup path of the first primary next-hop link according to the second subtree and the first connected node, includes: determining, by the first node, the backup path of the first primary next-hop link by using segment routing technology.
[0010] By using the segment routing technology, the packet may be easily forwarded though the backup path and the packet may be forwarded through a specified node. In other words, the packet may be forwarded to a destination node through a specified sub-topology.
[0011] In a possible design, where the determining, by the first node, a first connected node in the second subtree according to the first subtree, the second subtree, and a network graph corresponding to the network, includes: determining, by the first node, at least two candidate nodes in the second subtree according to the first subtree, the second subtree, and the network graph, where each of the at least two candidate nodes is an endpoint of an edge connecting the second subtree with the first subtree except an edge corresponding to the first primary next-hop link; determining, by the first node, distances between the first node and each of the at least two candidate nodes in the second subtree; and determining, by the first node, the first connected node from the at least two candidate nodes according to the distances between the first node and each of the at least two candidate nodes in the second subtree, where a distance between the first node and the first connected node is less than or equals to a distance between the first node and other candidate nodes except the first connected node.
[0012] In a possible design, where the determining, by a first node, a pair of trees according to a network including the first node, includes: determining, by the first node, at least one almost directed acyclic graph, AD AG, according to the network graph by using a depth-first search; combining, by the first node, all of the at least one ADAG to construct a generalized ADAG, GAD AG; and determining, by the first node, the pair of trees according to the GAD AG.
[0013] Using the depth-first search may construct a larger ADAG as possible, thereby reducing the number of ears and the number of connecting edges. Therefore, the first node may spend less time to find the first connected node.
[0014] In a possible design, where the forwarding, by the first node, the received packet according to the first tree, the second tree, or the backup path, includes: determining, by the first node, whether a third node or a first link fails, where the first link is configured to connect the first node with the third node in the first tree; if the first link and the third node do not fail, forwarding the received packet according to the first tree; if the first link or the third node fails, determining whether a second link or a fourth node fails, where the second link is configured to connect the first node with the fourth node in the second tree; if the second link and the fourth node do not fail, forwarding the received packet according to the second tree; and if the second link or the fourth node fails, forwarding the received packet according to the backup path.
[0015] In a possible design, the method further including: if the first link and the second node do not fail, setting a flag in the received packet into a first value, where the first value is used to indicate that the first link and the second node do not fail; and if the first link or the second node fails, setting the flag in the received packet into a second value, where the second value is used to indicate that the first link or the second node fails.
[0016] According to a second aspect, an embodiment of the present application provides a network device, and the network device has a function of implementing the method in the first aspect. The function may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware of the software includes one or more modules corresponding to the function.
[0017] According to a third aspect, an embodiment of the present application provides a computer readable storage medium, including an instruction. When the instruction runs on a network device, the network device is configured to perform the method in the first aspect or any possible implementation of the first aspect.
[0018] According to a fourth aspect, a network device is provided, including a processor and a memory. The processor is connected to the memory. The memory is configured to store an instruction, and the processor is configured to execute the instruction. When the processor executes the instruction stored in the memory, the processor is configured to perform the method in the first aspect or any possible implementation of the first aspect.
[0019] According to a fifth aspect, a chip system is provided, where the chip systems includes a memory and a processor, where the memory is configured to store a computer program, and the processor is configured to invoke the computer program from the memory and run the computer program, so that a network device on which the chip is disposed performs the method in the first aspect or any possible implementation of the first aspect.
[0020] According to a sixth aspect, a computer program product is provided, where when the computer program product runs on a network device, the network device is configured to perform the method in the first aspect or any possible implementation of the first aspect.
DESCRIPTION OF DRAWINGS
[0021] FIG. 1 illustrates an example of a network 100.
[0022] FIG. 2 is a block diagram illustrating a GAD AG 101 associated with the network graph of FIG. 1.
[0023] FIG. 3 illustrates a pair of trees computed by a node 10A.
[0024] FIG. 4 illustrates a pair of trees computed by a node 10B.
[0025] FIG. 5 illustrates a pair of trees computed by a node 10D.
[0026] FIG. 6 illustrates a flowchart of a method for determining a backup path according to an embodiment of the present application.
[0027] FIG. 7 is a schematic block diagram of a network device according to an embodiment of the present application.
[0028] FIG. 8 is a schematic block diagram of a network device according to an embodiment of the present application.
[0029] FIG. 9 is a schematic block diagram of a network device according to an embodiment of the present application. DESCRIPTION OF EMBODIMENTS
[0030] The following describes the technical solutions in the present application with reference to the accompanying drawings.
[0031] For a better understanding of the embodiments of the present application, the following briefly describes some related basic concepts and terminologies.
[0032] 1. directed acyclic graph, almost directed acyclic graph, and generalized almost directed acyclic graph
[0033] A directed acyclic graph (DAG) is a graph where all links are directed and there are no cycles in it.
[0034] An almost directed acyclic graph (AD AG) is a graph with one node designated as a root. The graph has the property that if all links incoming to the root were removed, then the resulting graph would be a DAG.
[0035] A generalized almost directed acyclic graph (GAD AG) is a graph composed of the ADAGs of all blocks. The term “block” refers to either a 2-connected cluster, a cut-edge, or a cut-vertex. The 2-connected cluster is a maximal set of 2-connected nodes. The term “2-connected” is a graph that has no cut-vertices and requires two nodes to be removed before the network is partitioned. The cut-vertex is a vertex whose removal partitions a network graph.
[0036] 2. redundant trees, and maximally redundant trees
[0037] Redundant trees (RTs) is a pair of trees where a path from any node X to a root R along one of the pair of trees is node-disjoint with the path from the same node X to the root along another one of the pair of trees. The redundant trees can always be computed in the 2-connected graph.
[0038] Maximally redundant trees (MRTs) is a pair of trees where the path from any node X to the root R along one of the pair of trees and the path from the same node X to the root along another one of the pair of trees share a minimum number of nodes and a minimum number of links. Each such shared node is a cut-vertex. Any shared links are cut-links. In the graph that is not 2-connected, it is impossible to compute the RTs. However, it is possible to compute the MRTs. The MRTs are maximally redundant in a sense that they are as redundant as possible given the constraints of the network graph. One of the two MRTs is regarded as MRT-red, the other of the two MRTs is regarded as MRT-blue. Different MRTs may be computed on the same network graph, depending on what algorithm is used for MRT computation or depending on which neighbor node the computing node selects for a first cycle.
[0039] A cut-link is a link whose removal partitions the network. The cut-link by definition must be connected between two cut- vertices.
[0040] As used herein, a network device mentioned in the present application is a networking apparatus including hardware and software, which may communicatively interconnect other equipment in the network. The network device may be a router, a switch, or an electronic apparatus implementing routing function and/or switching function.
[0041] FIG. 1 illustrates an example of a network 100.
[0042] As shown in FIG. 1, the network 100 includes network devices 10A-10F (hereinafter referred to as “network devices 10” or “nodes 10”) configured to employ the techniques of the present application. The network devices 10 may use the techniques described herein to determine a backup path for rerouting a packet and to forward a received packet according to the determined backup path.
[0043] The network devices 10 are connected to one another by links 11A to 11L (hereinafter referred to as “links 11”). The network devices 10 may run a link state protocol (such as open shortest path first (OSPF) or intermediate system to intermediate system (IS-IS)) to realize basic routing intercommunication. For example, the network devices 10 may exchange link state routing information to learn a topology of the network 100 according to the link state protocol.
[0044] Although shown as including the network devices 10A to 10F for simplicity and purposes of example, the network 100 may include additional network devices and/or links (not shown).
[0045] Each of the network devices 10 may calculate a pair of trees for itself.
[0046] A network graph is a graph that reflects the network topology where all links are connected to exactly two nodes and broadcast links have been transformed into a standard pseudo-node representation. FIG. 1 illustrates an example arrangement of nodes 10 in a network graph that is a 2-connected graph.
[0047] An example in which a node 10A determines the pair of trees is used for detailed description in the followings.
[0048] FIG. 2 is a block diagram illustrating a GAD AG 101 associated with the network graph of FIG. 1.
[0049] The GAD AG 101 shown in FIG. 2 is a GAD AG determined by the nodes 10. As shown in FIG. 2, the GADAG 10 also includes the node 10, and the nodes 10 are connected by links 12A to 12H (hereinafter referred to as “links 12”). The direction of the links 12 shown in FIG. 2 is the direction of the GADAG 101.
[0050] The nodes 10 may determine at least one AD AG and combine the at least one AD AG to construct the GADAG 101. Details of GADAG are found in Enyedl, G., “An Algorithm for Computing IP/LDP Fast Reroute Using Maximally Redundant Trees (MRT-FRR)”, RFC 7811, June 2016.
[0051] FIG. 2 shows a pair of trees associated with the GADAG of FIG. 2. The pair of threes include a tree 102 shown in FIG. 2 (a) and a tree 103 shown in FIG. 2 (b).
[0052] A path from any node X to the root (that is, the node 10A) along the tree 102 is node-disjoint with a path from the node X to the root along the tree 103.
[0053] In some embodiments, the pair of trees may be the redundant trees.
[0054] In some embodiments, the tree 102 and the tree 103 may be the MRT, that is, the path from any node X to the root (that is, the node 10 A) along the tree 102 and the path from the same node X to the root along the tree 103 share the minimum number of nodes and the minimum number of links. By convention, the tree 102 may be called MRT-red, and the tree 103 may be called MRT-blue.
[0055] Each of the nodes 10 may compute the pair of trees for itself. For example, FIG. 4 illustrates the pair of trees computed by a node 10B, and FIG. 5 illustrates the pair of trees computed by the node 10D.
[0056] For ease of description, one of the pair of trees determined by the nodes 10 may be called a red tree or a first tree, and the other one of the pair of trees may be called a blue tree or a second tree. For example, the tree 102 is the red tree (or the first tree) determined by the node 10A, and the tree 103 is the blue tree (or the second tree) determined by the node 10A. A tree 104 shown in FIG. 4 (a) is the red tree (or the first tree) determined by the node 10B, and a tree 105 shown in FIG. 4 (b) is the blue tree (or the second tree) determined by the node 10B. A tree 106 shown in FIG. 5 (a) is the red tree (or the first tree) determined by the node 10D, and a tree 107 shown in FIG. 5 (b) is the blue tree (or the second tree) determined by the node 10D.
[0057] The nodes 10 may forward the packet according to the determined pair of trees. The nodes 10 may select one of the red tree and the blue tree as a default tree. Correspondingly, an unselected tree is a backup tree. The nodes 10 may forward the packet along the default tree by default. When a link or a node in the default tree fails, the nodes 10 may forward the packet along the backup tree. For example, on the tree 102, a path from a source node (e.g., the node 10A) to a destination node (e.g., a node 10F) is 10A— >10B— >10G— *10F (that is, a path 13A shown in FIG. 3 (a)); on the tree 103, a path from the node lOA to the node 10F is 10A— »10D— >10E— >10F (that is, a path 13B shown in FIG. 3 (b)). By convention, it is assumed that the red tree of the nodes 10 is the default tree and the blue tree of the nodes 10 is the backup tree in the following. The node 10A may forward the packet to the node 10F along the path 13 A. When a main next hop link or node in the default tree fails (e.g., the node 10B or the link 14A fails), the node 10A may forward the packet to the node 10F along the path 13B.
[0058] According to the pair of trees, the path will be switched to the path in the backup tree after a network failure occurs in the default tree. However, this method can merely provide fast traffic recovery when one link failure or one node failure occurs but cannot provide fast traffic recovery when more than one failures occurr at almost the same time. The path in the backup tree cannot be configured to forward the packet when a link or node in the default tree and a link or node in the backup tree fail at almost the same time. For example, for the node 10A, if the node 10B and the node 10D fail at almost the same time, the node 10A cannot forward the packet to the node 10F. Further, if a node associated with a failed link in the backup path starts its own backup path, then a re-backup path for the failure may also form a loop together with the original backup path. For example, if the link 14A fails, the node 10A may forward the packet along the path 13B. However, if the link 14A and the link 14J fail at the same time, the node 10D cannot forward the packet to a node 10E. Under this case, the node 10D may forward the packet according to its own default tree (that is, the tree 107 shown in FIG. 5 (a)), and yet a loop may be formed since the primary next-hop of the node 10D in the tree 107 is the node 10A.
[0059] The embodiments of the present application provide a method for solving the above-mentioned problem. According to the embodiments of the present application, each of the nodes in the network may determine at least one backup path for its backup tree, and if the failure occurs in a main path and in the backup path at the same time, the node may forward the packet according to the backup path.
[0060] The method provided by the embodiments of the present application may be performed by each of the nodes 10. An example in which the node 10A determines the backup path is used for detailed description in the followings.
[0061] FIG. 6 illustrates a flowchart of a method for determining a backup path according to an embodiment of the present application.
[0062] 601, the node 10A determines a pair of trees.
[0063] As described above, the node lOAmay determine at least one AD AG according to the network 100. Then the node lOAmay combine all of the at least one AD AG to construct a GAD AG (e.g., the GAD AG 101 shown in FIG 2) and determine the pair of trees (e.g., the trees shown in FIG 3) according to the determined GADAG.
[0064] In some embodiments, the node 10A may determine each of the at least one ADAG by using a depth-first search, thereby constructing the largest ADAG as possible and reducing the number of edges in the GADAQ so that the node 10A may spend less time determining the backup path.
[0065] 602, the node 10A determines the backup path for each primary next-hop link of the backup tree according to the backup tree and the network 100.
[0066] As described above, the pair of trees include a default tree and a backup tree. The node 10A may determine the backup path for each primary next-hop link of the backup tree. Therefore, the node 10A may determine the backup path according to the backup tree and the network including the node 10A (that is, the network 100). For ease of description, it is assumed that the tree 102 is the default tree and the tree 103 is the backup tree. Therefore, according to the step 602, the node 10A may determine the backup path according to the tree 103 and the network 100.
[0067] More specifically, the backup path is configured to protect the primary next-hop link, that is, a link connects the root of the backup tree with the child of the root. Two endpoints of the primary next-hop link may be called a first endpoint and a second endpoint. The first endpoint is the root of the backup tree and the second endpoint is the child of the root. Referring to FIG. 3 (b), as the node 10A merely includes one child, there is only one primary next-hop, that is, a link 14G. The first endpoint of the primary next-hop link is the node 10 A, and the second endpoint of the primary next-hop link is the node 10D. The backup path determined by the node 10A are used for protecting the link 14G.
[0068] The node 10A may split the tree 103 into two subtrees, a first subtree and a second subtree. The second subtree includes the second endpoint of the primary next-hop link and a descendant node of the child node. The first subtree include a node belonging to the tree 103 but not to the second subtree. Referring to FIG. 3 (b), the second endpoint of the primary next-hop link is the node 10D. Therefore, the second subtree includes the node 10D and the descendent node of the node 10D (that is, a node 10C, the node 10B, the node 10E, the node 10F, and a node 10G). The first subtree merely includes the node 10 A.
[0069] In order to determine the backup path for the link 14G, the node 10A may determine a first connected node in the second subtree according to the first subtree, the second subtree, and the network, and determine the backup path according to the second subtree and the first connected node. The first connected node is an endpoint of a connecting edge in the network, and another endpoint of the edge of the connecting edge is a node belonging to the first subtree.
[0070] In some embodiments, the node 10A may determine an edge which is used for connecting the first subtree and the second subtree in addition to an edge corresponding to the first primary next-hop link, determine one or more candidate nodes according to the determined edge, and determine the first connected node from the candidate node. The node 10A may determine at least one edge according to the network graph. The network graph may include at least one link. The at least one link and the at least one edge are in one-to-one correspondence. One of the at least one link is configured to connect two nodes in the network graph, the two nodes are the endpoints of the corresponding edge, and the two nodes belong to the first subtree and the second subtree respectively. According to the network graph shown in FIG. 1, there are three links which are configured to connect a node belonging to the first subtree and a node belonging to the second subtree. The three links include a link 11 A, a link 1 IB, and a link 11C. However, the link 11 A is the primary next-hop link, so there are only two edges which are configured to connect the node belonging to the first subtree with the node belonging to the second subtree. One of the two edges (hereinafter referred to as “the first edge”) is configured to connect the node 10A with the node IOC, and the other edge (hereinafter referred to as “the second edge”) is configured to connect the node 10A with the node 10B. The first edge corresponds to the link 11B, and the second edge corresponds to the link 11 A. The node 10A may determine candidate nodes according to the determined edges, the first edge and the second edge. The candidate nodes are the endpoints of the determined edges and belong to the second subtree. Therefore, there are two candidate nodes, the node 10B and the node IOC. The node 10A may determine the distance from the root of the backup tree (that is, the node 10A) to each candidate node and select the node with a shortest distance as the first connected node. Referring to FIG. 3 (b), the distance from the node 10A to the node IOC is 2, and the distance from the node 10A to the node 10B is 3. Therefore, the node IOC is the first connected node. Correspondingly, the connecting edge is the first edge, and another endpoint of the connecting edge is the node 10 A.
[0071] In some embodiments, more than two candidate nodes may have the same distance to the root node, and the distance is the shortest distance to the root node. Under this condition, the node 10A may select the candidate node with a minimum path cost as the first connected node. If there are more than two candidate nodes with the shortest distance and the minimum path cost, the node 10A may randomly select one of the nodes as the first connected node.
[0072] After determining the first connected node, the node 10A may determine the backup path according to the second subtree and the first connected node. Each of the backup paths corresponds to a node in the second subtree. The node corresponding to the backup path is a destination node of the packet forwarded by the node 10A. In other words, if the node 10A receives the packet destined for a node in the network 100, the node 10A may use a backup path corresponding to the node to forward the packet. The number of the backup paths may be equal to the number of the nodes in the second subtree. Referring to FIG. 3 (b), the second subtree includes six nodes, so the node 10A may determine six backup paths. Table 1 shows a relation between the backup path and the node in the network 100.
Table 1
Figure imgf000015_0001
[0073] Referring to table 1, if the node 10A receives the packet destined for the node 10B, the path is 10 A— >10C— >I0B; and if the node 10A receives the packet destined for the node 10F, the path is 10A^10C->10D- 10E- 10F.
[0074] Each backup path includes at least one forward node. The forward node is configured to transmit the received packet from a first reference node. The first reference node may be a source node of the packet or another forward node. In some embodiments, the forward node may be configured to forward the packet to a second reference node. The second reference node may be another forward node, the destination node of the packet, or a node that can forward the packet to the destination node along a path in the backup tree. In some embodiments, the forward node may be the destination node of the packet. If the packet is transmitted along a path in the backup tree, a node which is a forward node in the backup path will not receive the packet from the corresponding first reference node.
[0075] The backup path corresponding to the first connected node or a descendant node of the first connected node includes at least one forward node, and the at least one forward node includes the first connected node. There is an edge connecting the first connected node and a node belonging to the first subtree (hereinafter referred to as “the second connected node”). If the second connected node belonging to the first subtree is not the root of the backup tree, the at least one forward node may further include the second connected node. [0076] Referring to FIG. 3 (b) and table 1, for a backup path 1 and a backup path 2, each of the two backup paths includes one forward node, that is, the node 10C. The first reference node of the forward node (the node 10C) is the node 10 A. The node 10C may receive the packet from the node 10 A. If the destination node of the packet is the node 10B, the node 10C transmits the packet to the node 10B, and the node 10B is the second reference node of the node 10C; and if the destination node of the packet is the node 10C, the node 10C processes the packet by itself.
[0077] The backup path corresponding to an ancestor node of the node 10A in the tree 103 and a target descendant node of the ancestor node includes K forward nodes, K is a positive integer greater than 1. The target descendant node is a first child node of the ancestor node or a descendant node of the first child node of the ancestor node, and the first connected node is a second child node of the ancestor node or a descendant node of the second child node. The K forward nodes include the node in a path from the ancestor node to the first connected node. In other words, if distance from the ancestor node to the first connected node is 1 (that is, the ancestor node is the parent node of the first connected node), than the K forward nodes include the first connected node and its parent node. If the distance from the ancestor node to the first connected is greater than or equals to 2 (that is, the ancestor node is a grandparent node of the first connected node, the great grandparent node of the first connected node, or the like), than the K forward nodes include the first connected node, the ancestor node, and node between the ancestor node and the first connected node. For example, if the ancestor node is the grandparent node of the first connected node, the K forward nodes include the first connected node, the parent node of the first connected node, and the grandparent node of the first connected node. If the ancestor node is the great grandparent node of the first connected node, the K forward nodes include the first connected node, the parent node of the first connected node, the grandparent node of the first connected node, and the great grandparent node of the first connected node. Further, if the second connected node is not the root of the backup tree, the backup path corresponding to the ancestor node of the node lOAmay further include the second connected node.
[0078] Referring to FIG. 3 (b), the ancestor node of the first connected node (the node 10C) is the node 10D. The first child node of the node 10D is the node 10E and the second child node of the node 10D is the node IOC. So, the target descendant node of the ancestor node (the node 10D) may be the node 10E, the node 10F, or the node 10G. Referring to table 1 , for a backup path 3 to a backup path 6, each of the four backup paths includes two forward nodes, one of the forward nodes is the node IOC, and the other forward node is the node 10D. For the forward node IOC, the first reference node is the node 10 A, and the second reference node is the node 10D; and for the forward node 10D, the first reference node is the node 10C, and the second reference node is the node 10E.
[0079] In some embodiments, the node 10A may use segment routing (SR) technology to build the backup path. The SR technology may be SR-multi-protocol label switching (SR-MPLS) technology or SR internet protocol version 6 (SR-v6) technology. According to the SR technology, the node 10A merely needs to determine one or more key nodes, and then the packet may be transmitted along a shortest path. For the present application, the forward node is the key node. Therefore, the node 10A may determine SR information (also called SR label or routing information) for the forward node. In some embodiments, the SR information may include an adjacency segment ID (SID) of each forward node.
[0080] Referring to FIG. 3(b), if the node 10A receives the packet destined for the node 10F, the node 10A may add the SR information including the adjacency SID of the forward node (that is, the node 10C and the node 10D) to the packet and forward the packet to the node 10C. The node 10C may receive the packet from the node 10 A, remove the adjacency SID of the node 10C from the SR information, and forward the packet to the node 10D. The node 10D receives the packet from the node 10C, removes the SR information from the received packet, and forward the packet to the node 10E. The node 10E receives the packet from the node 10D and forwards the packet to the node 10F.
[0081] In some embodiments, the node 10A may also use multi-protocol label switching (MPLS) technology to build the backup path. The node 10A may add MPLS information to the packet and forward the packet to the forward node, and the forward node may forward the packet according to the MPLS information. The MPLS information may include MPLS label of the forward node. The detail for forwarding the packet by using the MPLS technology may refer to the current MPLS forward method.
[0082] As described above, each node may determine a default tree, a backup tree, and a backup path for each primary next-hop link of the backup tree.
[0083] For example, for the node 10B, the tree 104 shown in FIG. 4 (a) is the default tree, and the tree 105 shown in FIG. 4 (b) is the backup tree. The node 10B may determine the backup path for each primary next-hop link of the backup tree. A first subtree of the tree 105 includes the node 10B, and the second subtree of the tree 105 includes the node 10A, the node 10D, the node 10C, the node 10E, the node 10F, and the node 10G. According to the network graph shown in FIG. 1, there are three links which are configured to connect the node 10B with a node belonging to the second subtree, that is, the link 11 A, the link 11D, and the link 11E. The link 11A is the primary next-hop link of the tree 105, so there are two edges for connecting the node 10B with the node belonging to the second subtree. One of the two edges (hereinafter referred to as “the third edge”) is configured to connect the node 10B with the node 10C, and another edge (hereinafter referred to as “the fourth edge”) is configured to connect the node 10B with the node 10G. The third edge corresponds to the link 11D, and the fourth edge corresponds to the link 11E. The node 10B may determine two candidate nodes for determining the first connected node of the second subtree of the tree 105. The two candidate nodes are the node 10C and the node 10G. According to the tree 105, the distance from the node 10B to the node 10C is 3, and the distance from the node 10B to the node 10G is 5. Therefore, the first connected node is the node 10C. The second subtree of the tree 105 includes six nodes, so the node 10B may determine six backup paths as well. The backup paths determined by the node 10B are illustrated in Table 2.
Table 2
Figure imgf000018_0001
[0084] As described above, the backup path includes one or more backup paths corresponding to the first connected node or a descendant node of the first connected node and one or more backup path corresponding to the ancestor of the first connected node or a target descendant node of the ancestor node. For ease of description, the backup path corresponding to the first connected node or a descendant node of the first connected node may be called a first backup path, and the backup path corresponding to the ancestor node of the first connected node or the target descendant node of the ancestor node may be called a second backup path.
[0085] Referring to FIG. 4 (b), the first connected node 10C does not have a descendant node. So, there is only one first backup path, that is, the backup path 7 shown in Table 2, and the first backup path 7 has one forward node, the node 10C.
[0086] There are five second backup paths, that is, the backup paths 8-12. The parent node of the first connected node (the node 10D) has two child node, the node 10E is the first child node of the node 10D, and the node 10C (the first connected node) is the second child node of the node 10D. The target descendant nodes of the node 10D may include the node
IOE, the node 10F, and the node 10G. Therefore, each of the backup paths corresponding to the node 10D, the node 10E, the node 10F, and the node 10G (that is, the backup paths 8, 10, 11, and 12 in Table 2) has two forward nodes, the node 10C and the node 10D. The grandparent node of the first connected node (the node 10C), the node 10A, only has one child node. Therefore, there is one backup path corresponding to the node 10A (that is, the backup path 9 shown in Table 2), and the backup path 9 has three forward nodes, the node 10C, the node 10D, and the node 10A. If the node 10B receives the packet destined for the node 10C, the path is 10B— *10C; if the node 10B receives the packet destined for the node
IOF, the path is 10B— »10C— *10D— >10E— >10F; and if the node 10B receives the packet destined from the node 10 A, the path is 10B— +10C— *10D— >10A.
[0087] For another example, for the node 10D, the tree 106 shown in FIG. 5(a) is the default tree, and the tree 107 shown in FIG. 5(b) is the backup tree. The node 10D may determine the backup path for each primary next-hop link of the backup tree. As shown in FIG. 5(b), the tree 107 includes two primary next-hop links, one of the links is configured to connect the node 10D with the node 10C (hereinafter referred to as “the first primary next-hop link”), and the other one is configured to connect the node 10D with the node 10E (hereinafter referred to as “the second primary next-hop link”). For the first primary next-hop link, the node 10D may determine a first subtree and a second subtree. The first subtree includes the node 10D, the node 10E, the node 10F, and the node 10G; and the second subtree includes the node IOC, the node 10B, and the node 10A. According to the network graph shown in FIG. 1, there are six links, that is, the link 1 IF, the link 11C, the link 11G, the link 11H, the link 111, and the link HE. Since the link I IF is the primary next-hop link, the node 10D may determine five edges which correspond to the link 11C, the link 11G, the link 11H, the link 111, and the link HE. According to the five determined edges, the node 10D may determine three candidate nodes for determining the first connected node. The three candidate nodes are the node IOC, 10B, and 10A. The distance from the node 10D to the node IOC is 1, the distance from the node 10D to the node 10B is 2, and the distance from the node 10D to the node 10A is 3. Therefore, the first connected node is the node IOC. The second subtree corresponding to the first primary next-hop link only includes three nodes, so the node 10D may determine three backup paths for the first primary next-hop link. The backup paths for the first primary next-hop link are illustrated in Table 3.
Table 3
Figure imgf000020_0001
[0088] Referring to FIG. 5(b), the first connected node 10C has two descendant nodes. So, there are three first backup paths, that is, the backup paths 13 to 15 shown in Table 3, and each of the tree first backup paths includes two forward nodes, the node 10E and the node 10C. The node 10D does not need to determine the second backup path since the first connected node (the node 10C) has no ancestor node. According to the backup paths shown in Table 3, if the destination node of the packet received by the node 10D is the node 10B, the path is 10D— HOE— HOC— HOB.
[0089] For the second primary next-hop link, the node 10D may determine a first subtree and a second subtree. The first subtree includes the node 10D, the node 10C, the node 10B, and the node 10A, and the second subtree includes the node 10E, the node 10F, and the node 10G. According to the network graph shown in FIG. 1, there are five links, that is, the link 11 J, the link 11G, the link 11H, the link 111, and the link HE. Since the link 11 J is the primary next-hop link, the node 10D may determine four edges which correspond to the link 11G, the link 11H, the link 111, and the link 11E. According to the four determined edges, the node 10D may determine three candidate nodes for determining the first connected node. The three candidate nodes are the node 10E, 10F, and 10G. The distance from the node 10D to the node 10E is 1, the distance from the node 10D to the node 10F is 2, and the distance from the node 10D to the node 10F is 3. Therefore, the first connected node is the node 10E. The second subtree corresponding to the second primary next-hop link only includes three nodes, so the node 1 OD may determine three backup paths for the second primary next-hop link. The backup paths for the second primary next-hop link are illustrated in Table 4.
Table 4
Figure imgf000021_0001
[0090] Referring to FIG. 5 (b), the first connected node 10E has two descendant nodes. So, there are three first backup paths, that is, the backup paths 16 to 18 shown in Table 4, and each of the tree first backup paths includes two forward nodes, the node 10C and the node 10E. The node 10D does not need to determine the second backup path since the first connected node (the node 10E) has no ancestor node. For example, according to the backup paths shown in Table 4, if the destination node of the packet received by the node 1 OD is the node 1 OF, the path is lOD-HOC-lOE-HOF.
[0091] 603, the node 10A may forward the received packet according to the default tree, the backup tree, or the backup path.
[0092] Each node of the network 100 may determine a default tree routing table, a backup tree routing table, and a backup path routing table. Similarly, According to the above-mentioned routing table, the nodes of the network 100 may process the following scenarios:
[0093] scenario 1 : none of the nodes or the links in the network 100 occurs a failure;
[0094] scenario 2: the primary next-hop link of the default tree and/or the primary next-hop of the default tree occurs a failure; and
[0095] scenario 3: the primary next-hop link of the default tree and/or the primary next-hop of the default tree occurs a failure, and the primary next-hop link of the backup tree and/or the primary next-hop of the backup tree occurs a failure, at almost the same time.
[0096] For the scenario 1, for example, it is assumed that the resource node of a packet of a data flow is the node 10A and the destination node of the packet is the node 10F. According to the assumption, the path for transmitting the packet is the path 13 A. A value of a flag (also called a packet forwarding flag) in the packet is the first value. The first value is used to indicate that neither the primary next-hop link of the default tree nor the primary next-hop occurs a failure.
[0097] For the scenario 2, for example, it is assumed that there is the packet of data flow, the source node of the packet is the node 10D, and the destination node is the node 10G. The link 11 J (that is, the link for connecting the node 10D with the node 10E, also called the links D-E) and the link HE (that is, the link for connecting the node 10B with the node 10G, also called the links B-G) fail when forwarding this data flow. Since the packet is forwarded along the tree 106 by default, when the packet is on the node 10D, the failure of the link 11 J does not affect the path in the tree 106, so the packet is forwarded along the tree 106, and the value of the packet forwarding flag is the first value. When the packet arrives at the node 10B, the node 10B checks that the value of the packet forwarding flag is the first value, and the default tree routing table is queried to know that the packet needs to be sent along the link HE. However, due to the failure of the link 11E, the node 10B cannot forward the packet to the node 10G. Therefore, the value of the flag is set to the second value (the second value is used to indicate that the primary next-hop link of the default tree or the primary next-hop occurs a failure), and the routing table of the tree 105 (that is, the backup tree routing table) is queried, and the node 10B may forward the packet to the destination node 10E along the path 13C in the tree 105. After that, the nodes along the route path identify the packet forwarding flag and forward the packet according to their respective backup tree routing table (e.g., the node 10A may forward the packet according to the backup tree (that is, the tree 103) routing table), so the packet is transmitted to the destination node 10E along the path 13C: 10B— H0A— HOD— HOE— HOF— HOG, and the entire path for transmit the packet is 1 OD— 10 A— * 1 OB- 10 A— > 1 OD— > 1 OE- 1 OF^ 1 OG.
[0098] For the scenario 3, it is assumed that there is the packet of data flow, the source node of the packet is the node 10A and the destination node is the node 10E. The link 11A (that is, the link for connecting the node 10A with the node 10B, also called the links A-B) and the link 11 J (that is, the link for connecting the node 10D with the node 10E, also called the links D-E) fail when forwarding this data flow message. Since the packet is forwarded along the default tree, when the packet arrives at the node 10A, the link 11 A affects the path in the default tree of the node 10A (that is, the tree 102), so the packet forwarding flag is set to the second value, and the packet is forwarded along a path in the backup tree of the node 10A (that is, the tree 103). When the packet arrives at the node 10D, the node 10D checks the packet forwarding flag and finds that the flag is the second value, and the backup tree (that is, the tree 107) routing table is queried to know that the packet needs to be sent along the link 11 J. However, due to the failure of the link 11 J, the backup tree of the node 10D cannot be used. Since the packet forwarding flag is already the second value, the routing table of the backup path of the backup tree of the node 10D is queried, the SR label [node SID 10C, adjacency SID 10E] required for the packet is added to reach the destination node 10E, and the forwarding along the backup path to node label 10C is queried. After the packet arrives at the node 10C, it is checked that the packet forwarding flag is the second value, so the SR label is queried and the adjacent label 10E is found, so the packet is forwarded to the adjacent label 10E. After that, the message has been delivered to the destination node 10E.
[0099] The flag may be one or more reserved bits in the packet. For example, the flag may occupy 1 reserved bit in the packet, e.g., the first value of the flag may be 0 and the second value of the flag may be 1. For another example, the flag may occupy two reserved bits in the packet, e.g., the first value of the flag may be 00 and the second value of the flag is 11.
[00100] In some embodiments, the source node may send an independent indication to the subsequent node. The indication is used to indicate a status of the primary next-hop link of the default tree and the primary next-hop. The subsequent node may know the status of the primary next-hop link of the default tree and the primary next-hop. Taking the scenario 2 as an example, the node 10D may send the packet and the indication (hereinafter referred to as “the first indication”) to the node 10A, and the first indication is used to indicate that neither the link for connecting the node 10D and the node 10A nor the node 10A fails. Similarly, the node 10A send the packet and the indication to the node 10B, and the indication is used to indicate that neither the link for connecting the node 10A and the node 10B nor the node 10B fails. Due to the failure of the link 11E, the node 10B cannot forward the packet to the node 10G. Therefore, the node 10B sends an indication which is used to indicate that the primary next-hop link of the default tree or the primary next-hop occurs a failure to the node 10 A, and the packet may be forwarded along the path 13C in the tree 105. After that, the node along the route path identifies the indication and forwards the packet according to their respective backup tree routing table (e.g., the node 10A may forward the packet according to the backup tree (that is, the tree 103) routing table), so the packet is transmitted to the destination node 10E along the path 13C: 10B— HOA— HOD— HOE— HOF— HOG, and the entire path for transmit the packet is 10D— HOA— HOB— HOA— HOD— HOE— HOF— HOG.
[00101] FIG. 7 is a schematic block diagram of a network device 700 according to an embodiment of the present application. As shown in FIG. 7, the network device 700 includes: a processing unit 701 and a communicating unit 702.
[00102] The processing unit (701) is configured to determine a pair of trees according to a network including a first node corresponding to the network device 700, where the pair of trees includes a first tree and a second tree, and where a path from any node X to the first node along the first tree is node-disjoint with a path from the node X to the first node along the second tree, and where both a root of the first tree and a root of the second are the first node.
[00103] The processing unit (701) being further configured to determine a backup path for each primary next-hop link of the second tree according to the second tree and the network.
[00104] The communicating unit (702) being configured to receive a packet and forward the packet according to the first tree, the second tree, or the backup path.
[00105] In some embodiment, the node 10A may be the first node corresponding to the network device 700.
[00106] In some embodiments, the processing unit (701) is specifically configured to split the second tree into a first subtree and a second subtree, where the second subtree includes a second node and a descendant node of the second node, and where the first subtree includes node belonging to the second tree but not to the second subtree, and where the second node and the first node are endpoints of a first primary next-hop link; determine a first connected node in the second subtree according to the first subtree, the second subtree, and a network graph corresponding to the network, where the first connected node is an endpoint of a connecting edge in the network graph, and another endpoint of the connecting edge is a node belonging to the first subtree; and determine the backup path of the first primary next-hop link according to the second subtree and the first connected node, where each of the backup path corresponds to a node in the second subtree.
[00107] In some embodiments, the backup path corresponding to the first connected node or the descendant node of the first connected node includes at least one forward node, and the at least one forward node includes the first connected node.
[00108] In some embodiments, the backup path corresponding to an ancestor node of the first connected node in the second subtree or a target descendant node of the ancestor node includes K forward nodes, where the K forward nodes include nodes in a path from the ancestor node to the first connected node, and where the target descendant node is a first child node of the ancestor node or the descendant node of the first child node of the ancestor node, and the first connected node is a second child node of the ancestor node or a descendant node of the second child node, and where K is a positive integer greater than 1.
[00109] In some embodiments, the processing unit (701) is specifically configured to determine the backup path of the first primary next-hop link by using segment routing technology.
[00110] In some embodiments, the processing unit (701) is specifically configured to determine at least two candidate nodes in the second subtree according to the first subtree, the second subtree, and the network graph, where each of the at least two candidate nodes is the endpoint of the edge connecting the second subtree with the first subtree except an edge corresponding to the first primary next-hop link; determine distances between the first node and each of the at least two candidate nodes in the second subtree; and determine the first connected node from the at least two candidate nodes according to the distances between the first node and each of the at least two candidate nodes in the second subtree, where a distance between the first node and the first connected node is less than or equals to a distance between the first node and other candidate nodes except the first connected node.
[00111] In some embodiments, the processing unit (701) is specifically configured to determine at least one almost directed acyclic graph, AD AG, according to the network graph by using the depth-first search; combine all of the at least one ADAG to construct a generalized ADAG, GAD AG; and determine the pair of trees according to the GAD AG.
[00112] In some embodiments, the communicating unit (702) is specifically configured to determine whether the second node or a first link fails, where the first link is configured to determine whether a third node or a first link fails, wherein the first link is configured to connect the first node with the third node in the first tree; if the first link and the third node do not fail, forward the packet according to the first tree; if the first link or the third node fails, determine whether a second link or a fourth node fails, wherein the second link is used to connect the first node with the fourth node in the second tree; if the second link and the fourth node do not fail, forward the packet according to the second tree; and if the second link or the fourth node fails, forward the packet according to the backup path.
[00113] In some embodiments, the communicating unit (702) is further configured to set a flag in the received packet into the first value if the first link and the third node do not fail, wherein the first value is used to indicate that the first link and the third node do not fail; and set the flag in the received packet into the second value if the first link or the third node fails, wherein the second value is used to indicate that the first link or the third node fails.
[00114] As shown in FIG.8, a network device 800 may include a transceiver 801, a processor 802, and a memory 803. The memory 803 may be configured to store a code, an instruction, and the like executed by the processor 802. The processor is enabled to perform the methods, the steps, and the logical block diagrams that are disclosed in the embodiments of the present application.
[00115] The network device 800 may be the node 10A in the above-mentioned embodiments.
[00116] FIG. 9 is a schematic block diagram of a network device according to an embodiment of the present application.
[00117] As shown in FIG.9, a network device 900 may include a main control board 910 and an interface board 920. The main control board 910 includes a processor 911 and a memory 912. The interface board 920 includes a processor 921, a memory 922 and an interface card 923. The processor 921 of the interface board 920 is used for invoking program instructions in the memory 922 of the interface board to perform message reception and transmission. The processor 911 of the main control board 910 is used to call the program in the memory 910 of the main control board to specify and execute the methods, the steps, and the logical block diagrams that are disclosed in the embodiments of the present application.
[00118] The network device 900 may be the node 10A in the above-mentioned embodiments.
[00119] It should be understood that the processor in the embodiments of the present application may be an integrated circuit chip having a signal processing capability. In an implementation process, steps of the foregoing method embodiments may be completed by using a hardware integrated logic circuit in the processor, or by using an instruction in a form of software. The processor may be a general purpose processor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or another programmable logic device, a discrete gate or a transistor logic device, or a discrete hardware component. The processor may implement or perform the methods, the steps, and the logical block diagrams that are disclosed in the embodiments of the present application. The general purpose processor may be a microprocessor, or the processor may be any conventional processor or the like. The steps of the methods disclosed with reference to the embodiments of the present application may be directly performed and completed by a hardware decoding processor, or may be performed and completed by using a combination of the hardware in the decoding processor and a software module. The software module may be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory, and the processor reads information in the memory and completes the steps of the foregoing methods in combination with the hardware in the processor.
[00120] It may be understood that the memory in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both a volatile memory and a nonvolatile memory. The nonvolatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), or a flash memory. The volatile memory may be a random access memory (Random Access Memory, RAM) and is configured as an external cache. By way of example rather than limitation, many forms of RAMs may be used, and are, for example, a static random access memory (Static RAM, SRAM), a dynamic random access memory (Dynamic RAM, DRAM), a synchronous dynamic random access memory (Synchronous DRAM, SDRAM), a double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), an enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), a synchronous link dynamic random access memory (Synchronous link DRAM, SLDRAM), and a direct rambus random access memory (Direct Rambus RAM, DR RAM).
[00121] It should be noted that the memory in the systems and the methods described in this specification includes but is not limited to these memories and a memory of any other appropriate type.
[00122] An embodiment of the present application further provides a system chip, where the system chip includes an input/output interface, at least one processor, at least one memory, and a bus. The at least one memory is configured to store an instruction, and the at least one processor is configured to invoke the instruction of the at least one memory to perform an operation performed by the network device in the methods in the foregoing embodiments.
[00123] An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a program instruction for performing the steps performed by the network device in the foregoing methods.
[00124] Optionally, the storage medium may be specifically the memory 803.
[00125] An embodiment of the present application further provides a computer program product, where when the computer program product runs on a network device, the electronic device is configured to perform the steps performed by the network device in the foregoing methods. [00126] A person of ordinary skill in the art may be aware that, in combination with the examples described in the embodiments disclosed in this specification, units and algorithm steps can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraints of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of the present application.
[00127] It may be clearly understood by a person skilled in the art that, for the purpose of convenient and brief description, for a detailed working process of the foregoing system, apparatus, and unit, a corresponding process in the foregoing method embodiment may be referred. Details are not described herein again.
[00128] In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the described apparatus embodiment is merely an example. For example, the unit division is merely logical function division and may be other division in actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.
[00129] The units described as separate parts may be or may not be physically separate, and the parts displayed as units may be or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.
[00130] In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit. [00131] When the functions are implemented in a form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer readable storage medium. Based on such an understanding, the technical solutions in the present application essentially, or the part contributing to the prior art, or some of the technical solutions may be implemented in a form of a software product. The computer software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or some of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: any medium that can store a program code, such as a USB flash drive, a removable hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, or an optical disc.
[00132] The foregoing descriptions are merely specific implementations of the present application, but are not intended to limit the protection scope of the present application. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the present application shall fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

CLAIMS What is claimed is:
1. A method for determining a backup path, comprising: determining, by a first node, a pair of trees according to a network comprising the first node, wherein the pair of trees comprises a first tree and a second tree, and wherein a path from any node X to the first node along the first tree is node-disjoint with a path from the node X to the first node along the second tree, and wherein both a root of the first tree and a root of the second are the first node; determining, by the first node, the backup path for each primary next-hop link of the second tree according to the second tree and the network; and forwarding, by the first node, a received packet according to the first tree, the second tree, or the backup path.
2. The method according to claim 1, wherein the determining, by the first node, the backup path for each primary next-hop link of the second tree according to the second tree and the network, comprises: splitting, by the first node, the second tree into a first subtree and a second subtree, wherein the second subtree comprises a second node and a descendant node of the second node, and wherein the first subtree comprises a node belonging to the second tree but not to the second subtree, and wherein the second node and the first node are endpoints of a first primary next-hop link; determining, by the first node, a first connected node in the second subtree according to the first subtree, the second subtree, and a network graph corresponding to the network, wherein the first connected node is an endpoint of a connecting edge in the network graph, and another endpoint of the connecting edge is a node belonging to the first subtree; and determining, by the first node, the backup path of the first primary next-hop link according to the second subtree and the first connected node, wherein each of the backup path corresponds to a node in the second subtree.
3. The method according to claim 2, wherein the backup path corresponding to the first connected node or the descendant node of the first connected node comprises at least one forward node, and the at least one forward node comprises the first connected node
4. The method according to claim 2 or 3, wherein the backup path corresponding to an ancestor node of the first connected node in the second subtree or a target descendant node of the ancestor node comprises K forward nodes, wherein the K forward nodes comprise nodes in a path from the ancestor node to the first connected node, and wherein the target descendant node is a first child node of the ancestor node or the descendant node of the first child node of the ancestor node, and the first connected node is a second child node of the ancestor node or the descendant node of the second child node, and wherein K is a positive integer greater than 1.
5. The method according to any one of claims 2 to 4, wherein the determining, by the first node, the backup path of the first primary next-hop link according to the second subtree and the first connected node, comprises: determining, by the first node, the backup path of the first primary next-hop link by using segment routing technology.
6. The method according to any one of claims 2 to 5, wherein the determining, by the first node, a first connected node in the second subtree according to the first subtree, the second subtree, and a network graph corresponding to the network, comprises: determining, by the first node, at least two candidate nodes in the second subtree according to the first subtree, the second subtree, and the network graph, wherein each of the at least two candidate nodes is an endpoint of an edge connecting the second subtree with the first subtree except an edge corresponding to the first primary next-hop link; determining, by the first node, distances between the first node and each of the at least two candidate nodes in the second subtree; and determining, by the first node, the first connected node from the at least two candidate nodes according to the distances between the first node and each of the at least two candidate nodes in the second subtree, wherein a distance between the first node and the first connected node is less than or equals to a distance between the first node and other candidate nodes except the first connected node.
7. The method according to any one of claims 1 to 6, wherein the determining, by a first node, a pair of trees according to a network comprising the first node, comprises: determining, by the first node, at least one almost directed acyclic graph, ADAG, according to the network graph by using a depth-first search; combining, by the first node, all of the at least one ADAG to construct a generalized ADAG, GAD AG; and determining, by the first node, the pair of trees according to the GAD AG.
8. The method according to any one of claims 1-7, wherein the forwarding, by the first node, a received packet according to the first tree, the second tree, or the backup path, comprises: determining, by the first node, whether a third node or a first link fails, wherein the first link is configured to connect the first node with the third node in the first tree; if the first link and the third node do not fail, forwarding the received packet according to the first tree; if the first link or the third node fails, determining whether a second link or a fourth node fails, wherein the second link is configured to connect the first node with the fourth node in the second tree; if the second link and the fourth node do not fail, forwarding the received packet according to the second tree; and if the second link or the fourth node fails, forwarding the received packet according to the backup path.
9. The method according to claim 8, further comprising: if the first link and the third node do not fail, setting a flag in the received packet into a first value, wherein the first value is used to indicate that the first link and the third node do not fail; and if the first link or the third node fails, setting the flag in the received packet into a second value, wherein the second value is used to indicate that the first link or the third node fails.
10. A network device, comprising: a processing unit being configured to determine a pair of trees according to a network comprising a first node corresponding to the network device, wherein the pair of trees comprises a first tree and a second tree, and wherein a path from any node X to the first node along the first tree is node-disjoint with a path from the node X to the first node along the second tree, and wherein both a root of the first tree and a root of the second are the first node; the processing unit being further configured to determine a backup path for each primary next-hop link of the second tree according to the second tree and the network; and a communicating unit being configured to receive a packet and forward the packet according to the first tree, the second tree, or the backup path.
11. The network device according to claim 10, wherein the processing unit is specifically configured to split the second tree into a first subtree and a second subtree, wherein the second subtree comprises a second node and a descendant node of the second node, and wherein the first subtree comprises a node belonging to the second tree but not to the second subtree, and wherein the second node and the first node are endpoints of a first primary next-hop link; determine a first connected node in the second subtree according to the first subtree, the second subtree, and a network graph corresponding to the network, wherein the first connected node is an endpoint of a connecting edge in the network graph, and another endpoint of the connecting edge is a node belonging to the first subtree; and determine the backup path of the first primary next-hop link according to the second subtree and the first connected node, wherein each of the backup path corresponds to a node in the second subtree.
12. The network device according to claim 11, wherein the backup path corresponding to the first connected node or the descendant node of the first connected node comprises at least one forward node, and the at least one forward node comprises the first connected node
13. The network device according to claim 11 or 12, wherein the backup path corresponding to an ancestor node of the first connected node in the second subtree or a target descendant node of the ancestor node comprises K forward nodes, wherein the K forward nodes comprise nodes in a path from the ancestor node to the first connected node, and wherein the target descendant node is a first child node of the ancestor node or the descendant node of the first child node of the ancestor node, and the first connected node is a second child node of the ancestor node or the descendant node of the second child node, and wherein K is a positive integer greater than 1.
14. The network device according to any one of claims 11 to 13, wherein the processing unit is specifically configured to determine the backup path of the first primary next-hop link by using segment routing technology.
15. The network device according to any one of claims 11 to 14, wherein the processing unit is specifically configured to determine at least two candidate nodes in the second subtree according to the first subtree, the second subtree, and the network graph, wherein each of the at least two candidate nodes is an endpoint of an edge connecting the second subtree with the first subtree except an edge corresponding to the first primary next-hop link; determine distances between the first node and each of the at least two candidate nodes in the second subtree; and determine the first connected node from the at least two candidate nodes according to the distances between the first node and each of the at least two candidate nodes in the second subtree, wherein a distance between the first node and the first connected node is less than or equals to a distance between the first node and other candidate nodes except the first connected node.
16. The network device according to any one of claims 10 to 15, wherein the processing unit is specifically configured to determine at least one almost directed acyclic graph, AD AG, according to the network graph by using a depth-first search; combine all of the at least one AD AG to construct a generalized AD AG, GAD AG; and determine the pair of trees according to the GAD AG.
17. The network device according to any one of claims 10 to 16, wherein the communicating unit is specifically configured to determine whether a third node or a first link fails, wherein the first link is configured to connect the first node with the third node in the first tree; if the first link and the third node do not fail, forward the packet according to the first tree; if the first link or the third node fails, determine whether a second link or a fourth node fails, wherein the second link is used to connect the first node with the fourth node in the second tree; if the second link and the fourth node do not fail, forward the packet according to the second tree; and if the second link or the fourth node fails, forward the packet according to the backup path.
18. The network device according to claim 17, wherein the communicating unit is further configured to set a flag in the received packet into the first value if the first link and the third node do not fail, wherein the first value is used to indicate that the first link and the third node do not fail; and set the flag in the received packet into the second value if the first link or the third node fails, wherein the second value is used to indicate that the first link or the third node fails.
19. A computer readable storage medium, wherein the computer readable storage medium stores an instruction, and when the instruction runs on a network device, the network device is configured to perform the method according to any one of claims 1 to 9.
20. A network device, comprising a memory and a processor, wherein the memory is configured to store a computer program, and the processor is configured to invoke the computer program from the memory and run the computer program, so that the network device performs the method according to any one of claims 1 to 9.
21. A computer program product, wherein when the computer program product runs on a network device, the network device is configured to perform the method according to any one of claims 1 to 9.
22. A chip system, comprising a memory and a processor, wherein the memory is configured to store a computer program, and the processor is configured to invoke the computer program from the memory and run the computer program, so that a network device on which the chip system is disposed performs the method according to any one of claims 1 to 9.
PCT/RU2022/000257 2022-08-16 2022-08-16 Method for determining backup path and related device WO2024039262A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/RU2022/000257 WO2024039262A1 (en) 2022-08-16 2022-08-16 Method for determining backup path and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/RU2022/000257 WO2024039262A1 (en) 2022-08-16 2022-08-16 Method for determining backup path and related device

Publications (1)

Publication Number Publication Date
WO2024039262A1 true WO2024039262A1 (en) 2024-02-22

Family

ID=83995403

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/RU2022/000257 WO2024039262A1 (en) 2022-08-16 2022-08-16 Method for determining backup path and related device

Country Status (1)

Country Link
WO (1) WO2024039262A1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015059123A1 (en) * 2013-10-21 2015-04-30 Telefonaktiebolaget L M Ericsson (Publ) Packet rerouting techniques in a packet-switched communication network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015059123A1 (en) * 2013-10-21 2015-04-30 Telefonaktiebolaget L M Ericsson (Publ) Packet rerouting techniques in a packet-switched communication network

Similar Documents

Publication Publication Date Title
US11336565B2 (en) Method and node for packet transmission in network
EP3732894B1 (en) Interior gateway protocol flood minimization
US11929915B2 (en) Path calculation method, apparatus, and device
EP3691205B1 (en) Traffic forwarding method and traffic forwarding apparatus
WO2019105066A1 (en) Route processing method and apparatus, and data transmission method and apparatus
EP2124392B1 (en) Ring network routing method and ring network node
CN105453491B (en) Long-range LFA is extended quickly to re-route
US10439880B2 (en) Loop-free convergence in communication networks
JP2022186731A (en) Method, device, and system for handling transmission path failure
US7656792B2 (en) Method and apparatus for computing alternate multicast/broadcast paths in a routed network
US20160112255A1 (en) Pe device and method for advertising information about pe device
CN110535763B (en) Route backup method, device, server and readable storage medium
WO2020119644A1 (en) Forwarding entry generation method, apparatus, and device
US20140040477A1 (en) Connection mesh in mirroring asymmetric clustered multiprocessor systems
EP3827564A1 (en) Source routing tunnel ingress protection
TWI638550B (en) Tree recovery method, controller and recording medium for software-defined network
CN113615132A (en) Fast flooding topology protection
CN110838978A (en) Message forwarding method and device
US10979328B2 (en) Resource monitoring
CN104717143A (en) Method and equipment for many-one reducibility scene multicast data transmission
US8072908B2 (en) Partitioned forwarding of packets originated on a broadcast link among layer 2 forwarding devices of different adjacency networks
WO2024039262A1 (en) Method for determining backup path and related device
JP7273125B2 (en) Method and first network device for transmitting BIERv6 packets
WO2021083172A1 (en) Device virtualization method, apparatus, system, device, and storage medium
CN114531396A (en) Fault back-switching method and device in Ethernet virtual private network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22793889

Country of ref document: EP

Kind code of ref document: A1