CN115622937A - Route protection method based on disjoint paths and related equipment - Google Patents

Route protection method based on disjoint paths and related equipment Download PDF

Info

Publication number
CN115622937A
CN115622937A CN202211620906.4A CN202211620906A CN115622937A CN 115622937 A CN115622937 A CN 115622937A CN 202211620906 A CN202211620906 A CN 202211620906A CN 115622937 A CN115622937 A CN 115622937A
Authority
CN
China
Prior art keywords
node
source
destination
neighbor node
neighbor
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202211620906.4A
Other languages
Chinese (zh)
Other versions
CN115622937B (en
Inventor
张伊慧
肖琼
陈宇婷
刘振涛
刘巧利
高圆圆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peng Cheng Laboratory
Original Assignee
Peng Cheng Laboratory
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 Peng Cheng Laboratory filed Critical Peng Cheng Laboratory
Priority to CN202211620906.4A priority Critical patent/CN115622937B/en
Publication of CN115622937A publication Critical patent/CN115622937A/en
Application granted granted Critical
Publication of CN115622937B publication Critical patent/CN115622937B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/122Shortest path evaluation by minimising distances, e.g. by selecting a route with minimum of number of hops
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/128Shortest path evaluation for finding disjoint paths

Landscapes

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

Abstract

The invention discloses a route protection method based on a disjoint path and related equipment, wherein the method comprises the following steps: acquiring a destination node and a source node, calculating to obtain a first routing path from the source node to the destination node, taking the corresponding next hop as an optimal next hop, and calculating a bridge set of the destination node; the traversal bridge set calculates shortest path cost of neighbor node pairs, the shortest path cost is compared with the path cost of all the neighbor node pairs from the source node to the destination node to obtain the minimum path cost from the source node to the destination node, a second routing path from the source node to the destination node is obtained based on the minimum path cost, and the corresponding next hop is an alternative next hop; and obtaining a TOS field of the data packet, and forwarding the data packet to the optimal next hop or the alternative next hop based on the TOS field. The invention can realize higher fault protection rate of the routing node, has smaller algorithm complexity, and has important significance in shortening routing convergence time and enhancing reliability.

Description

Route protection method based on disjoint paths and related equipment
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, a system, a router, and a computer-readable storage medium for route protection based on disjoint paths.
Background
The internet rapidly evolved from a small network that initially supported the business of sending mail, etc., to a large infrastructure that supported social networking, video streaming, cloud computing, etc. Meanwhile, internet Service Providers (ISPs) face increasingly higher demands on quality of service, such as providing quality of service to end users, including uninterrupted service, low latency, high bandwidth, etc.
But failures in the network occur frequently and are unavoidable, and routing protocols need to go through a convergence process for a period of time during the failover. However, there are many real-time services in the internet, and their requirements for network performance are very strict, and the convergence of routing needs to be completed within 50 ms. In order to ensure effective network communication and reduce the message loss rate in the routing protocol convergence process, the prior art provides a routing protection scheme, and forwards messages affected by faults through a backup path calculated in advance, so that the message loss rate is reduced.
The current route protection algorithm can be divided into a non-hop-by-hop forwarding mode and a hop-by-hop forwarding mode. The non-hop-by-hop forwarding method requires the cooperation of an auxiliary scheme, introduces large overhead and is difficult to deploy, and is not suitable for practical use. In a hop-by-hop forwarding mode, the most frequently used LFA (loop-free alternatives, no loop backup) cannot effectively protect all faults to be solved, and the fault protection rate is strongly related to topology; the intersection degree of the backup path and the default path in the deflection routing scheme is higher; in the traditional method for constructing the disjoint route by utilizing the red-green tree idea, all links need to be traversed, and the algorithm complexity is high; in the improved red and green tree scheme, the red and green tree is constructed by utilizing breadth search, although the complexity is reduced, the obtained alternative path is not necessarily optimal, so that the application scenario has great limitation; therefore, how to achieve low complexity and higher failure protection rate of the routing node is an urgent problem to be solved in the current large environment.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
The invention mainly aims to provide a route protection method based on a disjoint path and related equipment, and aims to solve the problems that in the prior art, the complexity of a route protection strategy is high and the fault protection rate of a route node is low.
In order to achieve the above object, the present invention provides a method for protecting a route based on disjoint paths, which comprises the following steps:
acquiring a destination node and a source node, calculating to obtain a first routing path from the source node to the destination node, obtaining a next hop of the source node as an optimal next hop based on the first routing path, and calculating a bridge set of the destination node;
acquiring a target neighbor node and a source neighbor node which are not intersected with the first routing path, acquiring a neighbor node pair based on the target neighbor node and the source neighbor node, and traversing the bridge set to calculate the shortest path cost of the neighbor node;
comparing the shortest path cost with the path costs of all neighbor node pairs from the source node to the destination node to obtain the minimum path cost from the source node to the destination node, obtaining a second routing path from the source node to the destination node based on the minimum path cost, and obtaining a next hop of the source node as an alternative next hop based on the second routing path;
and after receiving a data packet sent by a link where the source node is located, acquiring a TOS field of the data packet, and forwarding the data packet to the optimal next hop or the alternative next hop based on the TOS field.
Optionally, the route protection method based on disjoint paths, where the obtaining a destination node and a source node, obtaining a first route path from the source node to the destination node by calculation, obtaining a next hop of the source node as an optimal next hop based on the first route path, and calculating a bridge set of the destination node specifically includes:
acquiring all nodes and edges of a topology file, generating an undirected graph based on the nodes and the edges, obtaining the node degree of the undirected graph according to the topology, and judging whether the node degree is greater than 1;
if the node degree is larger than 1, traversing all the node sets in the undirected graph to obtain a destination node and a source node, calculating to obtain a first routing path from the source node to the destination node, and obtaining the next hop of the source node as the optimal next hop based on the first routing path;
and after the optimal next hop is obtained, if a target edge meeting preset conditions exists in the undirected graph, taking the target edge as a bridge of the target node, and forming a bridge set by all bridges.
Optionally, the route protection method based on disjoint paths, where the preset condition includes a first condition and a second condition, the first condition is:
x ∈ Subtree (ndi, D) and y ∈ N-Subtree (ndi, D);
wherein x and y are nodes on the target edge, epsilon is a symbol, D is a destination node, and nd i Is the ith destination neighbor node, i is a natural number, subtree (nd) i D) is node nd in the shortest path tree i Subtree of root, N-Subtree (nd) i D) is node nd in the non-shortest path tree i A subtree that is a root;
the second condition is that:
x,y∉Path_dij(S,D);
wherein S is a source node, \ 8713, and is not a symbol, and Path _ dij (S, D) is a first routing Path from the source node S to a destination node D.
Optionally, the method for route protection based on disjoint paths, where the obtaining a destination neighbor node and a source neighbor node that are disjoint from the first route path, obtaining a neighbor node pair based on the destination neighbor node and the source neighbor node, and traversing the bridge set to calculate a shortest path cost of the neighbor node, further includes:
acquiring a target neighbor node and a source neighbor node which are not intersected with the first routing path, acquiring a neighbor node pair based on the target neighbor node and the source neighbor node, and judging whether the target neighbor node and the source neighbor node in the neighbor node pair are the same node or not;
if the destination neighbor node and the source neighbor node are the same node, the shortest path cost of the neighbor node pair is the combination of the path cost from the source node to the source neighbor node and the path cost from the destination neighbor node to the destination node;
if the target neighbor node and the source neighbor node are not the same node, judging whether the target neighbor node and the source neighbor node are neighbor nodes;
if the destination neighbor node and the source neighbor node are neighbor nodes, the shortest path cost of the neighbor node pair is the combination of the path cost from the source node to the source neighbor node, the path cost from the source neighbor node to the destination neighbor node and the path cost from the destination neighbor node to the destination node;
and if the target neighbor node and the source neighbor node are not neighbor nodes, traversing the bridge set to calculate the shortest path cost of the neighbor nodes to the passing bridge.
Optionally, the route protection method based on disjoint paths, where traversing the bridge set to calculate the shortest path cost of the neighbor node pair, specifically includes:
acquiring bridges of all destination nodes in the bridge set, and judging whether the source neighbor node is a node of the bridge;
if the source neighbor node is a node of the bridge, the shortest path cost of the neighbor node for passing through the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost of two nodes of the bridge, the path cost from the node of the bridge to the destination neighbor node obtained by using a shortest path algorithm and the path cost from the destination neighbor node to the destination node;
if the source neighbor node is not the node of the bridge, the shortest path cost of the neighbor node to the passing bridge is obtained by judging whether the target neighbor node is the node of the bridge.
Optionally, the method for route protection based on disjoint paths, where the obtaining of the shortest path cost of the neighbor node to the passing bridge by determining whether the destination neighbor node is a node of the bridge includes:
if the destination neighbor node is a node of a bridge, the shortest path cost of the neighbor node to pass through the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost of two nodes on the bridge, the path cost from the source neighbor node to the node on the bridge obtained by using a shortest path algorithm and the path cost from the destination neighbor node to the destination node;
and if the target neighbor node is not a node of the bridge, judging whether the edges of the source node and the source neighbor node or the edges of the target neighbor node and the target node are equal to the bridge of the target node or not to obtain the shortest path cost of the neighbor node for passing through the bridge.
Optionally, the method for route protection based on disjoint paths, where the obtaining of the shortest path cost of the neighboring node for passing through the bridge by determining whether an edge between the source node and the source neighboring node or an edge between the destination neighboring node and the destination node is equal to the bridge of the destination node, specifically includes:
if the edges of the source node and the source neighbor node or the edges of the destination neighbor node and the destination node are equal to the bridge of the destination node, the shortest path cost of the neighbor node for passing through the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost from the source neighbor node to the node on the bridge obtained by using the shortest path algorithm and the path cost from the destination neighbor node to the destination node;
and if the edges of the source node and the source neighbor node or the edges of the destination neighbor node and the destination node are not equal to the bridge of the destination node, the shortest path cost of the neighbor node for passing through the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost from the source neighbor node to the node on the bridge obtained by using the shortest path algorithm, the path cost from the two nodes on the bridge, the path cost from the node on the bridge to the destination neighbor node obtained by using the shortest path algorithm and the path cost from the destination neighbor node to the destination node.
Optionally, the method for route protection based on disjoint paths, where the obtaining a second route path from the source node to the destination node based on the minimum path cost and obtaining a next hop of the source node as an alternative next hop based on the second route path further includes:
acquiring shortest path cost of the neighbor node for passing through a bridge, and judging whether the shortest path cost is less than the minimum path cost from the source neighbor node to the destination neighbor node;
if the shortest path cost is less than the minimum path cost from the source neighbor node to the destination neighbor node, the new minimum path cost is the shortest path cost, and whether the bridge is traversed and ended is judged;
and if the bridge traversal is finished, the path cost of the second route is the new minimum path cost.
Optionally, the method for route protection based on disjoint paths, where, after receiving a packet sent by a link where the source node is located, obtaining a TOS field of the packet, and forwarding the packet to the optimal next hop or the alternative next hop based on the TOS field specifically includes:
obtaining values 0 and 1 of a TOS field of an IP message header, and selecting the optimal next hop when the value is set to be 0, and selecting the alternative next hop when the value is set to be 1;
receiving a data packet sent by a link where the source node is located, acquiring a TOS field of the data packet, and judging whether the TOS field is 0 and whether a next hop is a destination or not based on an IP message header;
if the TOS field of the data packet is 0 and the next hop is the destination, forwarding the data packet to the optimal next hop;
forwarding the data packet to the alternate next hop if the TOS field of the data packet is not 0 and the next hop is not the destination.
Optionally, the method for route protection based on disjoint paths, where after receiving a packet sent by a link where the source node is located, obtaining a TOS field of the packet, and forwarding the packet to the optimal next hop or the alternative next hop based on the TOS field, further includes:
and when the link where the source node is located is detected to be in failure, switching the data packet of the link from the optimal next hop to the alternative next hop, and setting the value of the TOS field of the data packet to be 1.
In addition, to achieve the above object, the present invention further provides a route protection system based on disjoint paths, wherein the route protection system based on disjoint paths comprises:
the optimal next hop acquisition module is used for acquiring a destination node and a source node, calculating to obtain a first routing path from the source node to the destination node, obtaining the next hop of the source node as the optimal next hop based on the first routing path, and calculating a bridge set of the destination node;
a neighbor node pair processing module, configured to obtain a destination neighbor node and a source neighbor node that are disjoint from the first routing path, obtain a neighbor node pair based on the destination neighbor node and the source neighbor node, and traverse the bridge set to calculate a shortest path cost of the neighbor node pair;
the alternative next hop acquisition module is used for comparing the shortest path cost with the path costs of all neighbor node pairs from the source node to the destination node to obtain the minimum path cost from the source node to the destination node, obtaining a second routing path from the source node to the destination node based on the minimum path cost, and obtaining the next hop of the source node as an alternative next hop based on the second routing path;
and the next hop selection module is used for acquiring a TOS field of the data packet after receiving the data packet sent by the link where the source node is located, and forwarding the data packet to the optimal next hop or the alternative next hop based on the TOS field.
In addition, to achieve the above object, the present invention further provides a router, wherein the router includes: a memory, a processor and a disjoint path based route protection program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the disjoint path based route protection method as described above.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium, wherein the computer readable storage medium stores a disjoint path based route protection program, and when executed by a processor, the computer readable storage medium implements the steps of the disjoint path based route protection method as described above.
In the invention, a destination node and a source node are obtained, a first routing path from the source node to the destination node is obtained through calculation, a corresponding next hop is an optimal next hop, and a bridge set of the destination node is calculated; the traversal bridge set calculates the shortest path cost of the neighbor node pairs, the shortest path cost is compared with the path cost of all the neighbor node pairs from the source node to the destination node to obtain the minimum path cost from the source node to the destination node, a second routing path from the source node to the destination node is obtained based on the minimum path cost, and the corresponding next hop is an alternative next hop; and obtaining a TOS field of the data packet, and forwarding the data packet to the optimal next hop or the alternative next hop based on the TOS field. The invention can realize higher fault protection rate of the routing node, has smaller algorithm complexity and has important significance for shortening the routing convergence time and enhancing the reliability.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of a disjoint path based route protection method of the present invention;
FIG. 2 is a flow chart of step S10 in the preferred embodiment of the route protection method based on disjoint paths in the present invention;
FIG. 3 is a diagram of a topology file in accordance with a preferred embodiment of the present invention;
FIG. 4 is a diagram illustrating a shortest path tree with node D as the destination node in the preferred embodiment of the present invention;
FIG. 5 is a flow chart of the path cost from the source node to the destination node in the preferred embodiment of the present invention;
FIG. 6 is a flow chart of step S40 in the preferred embodiment of the route protection method based on disjoint paths in the present invention;
FIG. 7 is a flowchart illustrating the overall operation of the route protection method based on disjoint paths according to the present invention;
FIG. 8 is a schematic diagram of a preferred embodiment of a disjoint path based route protection system in accordance with the present invention;
fig. 9 is a schematic diagram of an operating environment of a router according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
It should be noted that if the description of "first", "second", etc. is provided in the embodiment of the present invention, the description of "first", "second", etc. is only for descriptive purposes and is not to be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature.
As shown in fig. 1, the route protection method based on disjoint paths according to the preferred embodiment of the present invention includes the following steps:
step S10, a destination node and a source node are obtained, a first routing path from the source node to the destination node is obtained through calculation, the next hop of the source node is obtained as the optimal next hop based on the first routing path, and a bridge set of the destination node is calculated.
Please refer to fig. 2, which is a flowchart of step S10 in the method for route protection based on disjoint paths according to the present invention.
As shown in fig. 2, the step S10 includes:
s11, acquiring all nodes and edges of a topology file, generating an undirected graph based on the nodes and the edges, obtaining the node degree of the undirected graph according to topology, and judging whether the node degree is greater than 1;
step S12, if the node degree is larger than 1, traversing all node sets in the undirected graph to obtain a destination node and a source node, calculating to obtain a first routing path from the source node to the destination node, and obtaining the next hop of the source node as the optimal next hop based on the first routing path;
and S13, after the optimal next hop is obtained, if a target edge meeting preset conditions exists in the undirected graph, taking the target edge as a bridge of the target node, and forming a bridge set by all bridges.
Specifically, as shown in the topology file of fig. 3, the topology file includes a plurality of nodes (e.g., node a, node S, node ns) 1 Node nd 1 Etc.) and the edges between the nodes, wherein Path1 in the graph represents a first Path, and Path2 represents a second Path; acquiring all nodes and edges of the topology file, and generating an undirected graph G (N, E) based on the nodes and the edges, wherein N represents all nodes (routers in a network) in the undirected graph G, E represents all edges (links in the network) in the undirected graph G, and can also be represented as E (x, y), x and y both represent two nodes on the edges, and the two nodes both belong to the nodes in N, and the node degree of the undirected graph G is obtained according to the topology, and whether the node degree is greater than 1 is judged; if the node is in the N and smallIf the number of the nodes is equal to 1, not traversing all the node sets in the undirected graph G; if the node is in the N and is larger than 1, traversing all the node sets in the undirected graph G to obtain a destination node D and a source node S; if the destination node D is equal to the source node S, traversing again; if the destination node D is not equal to the source node S, calculating a shortest path tree (shown in fig. 4) from all nodes in N to the destination node D, which takes the destination node D as a root, as T (D) by using a Dijstra-based shortest path algorithm (shortest path dijkstra algorithm); wherein, subtree (n, D) represents a Subtree taking the node n as the root in the shortest path tree T (D); path (S, D) represents a Path list from the source node S to the destination node D; cost (S, D) represents the path cost from the source node S to the destination node D; path _ dij (S, D) represents a Path list from the source node S to the destination node D obtained by using a shortest Path algorithm; cost _ dij (S, D) represents the path cost from the source node S to the destination node D obtained by using the shortest path algorithm; easy to know, cost (S, D)>= cost _ dij (S, D), so that Path _ dij (S, D) is the first routing Path from the source node S to the destination node D, i.e. the main Path, and the next hop of the corresponding source node S is the optimal next hop.
After the optimal next hop is obtained, if a target edge E (x, y) meeting preset conditions exists in the undirected graph G, and the target edge E (x, y) meets the following two conditions, the first condition is: x ∈ Subtree (ndi, D) and y ∈ N-Subtree (ndi, D); wherein x and y are nodes on the target edge E, epsilon is a symbol, D is a target node, nd i Is the ith destination neighbor node, i is a natural number, subtree (nd) i D) is node nd in shortest path tree i Root Subtree, N-Subtree (nd) i D) is node nd in the non-shortest path tree i A subtree that is a root; the second condition is: x, y \8713; path _ dij (S, D); wherein S is a source node, \8713, and is not a symbol, and Path _ dij (S, D) is a first routing Path from the source node S to a destination node D; then the edge E (x, y) is called the Bridge of the destination node D and all bridges that satisfy the condition are made up into a Bridge set Bridge.
Step S20, a target neighbor node and a source neighbor node which are not intersected with the first routing path are obtained, a neighbor node pair is obtained based on the target neighbor node and the source neighbor node, and the shortest path cost of the neighbor node pair is calculated by traversing the bridge set.
In particular, assume that the source node S has NS Neighbors (NS) 0 ,…,ns NS-1 ) The destination node D has ND Neighbors (ND) 0 ,…,nd ND-1 ) Obtaining a source neighbor node ns which is not intersected with the first routing path i And destination neighbor node nd i In which ns i ∈(ns 0 ,…,ns NS-1 ) And nd j ∈(nd 0 ,…,nd ND-1 ) Traversing the destination neighbor node nd i And the source neighbor node ns i Acquiring a neighbor node pair (ns, nd); as shown in fig. 5, ns and nd in the neighbor node pair (ns, nd) are input, min _ cost2 is initialized (that is, the minimum cost from the source neighbor node to the destination neighbor node is initialized), whether ns ∈ Path _ dij (S, D) or nd ∈ Path _ dij (S, D) is established or not is judged, and if yes, the calculation of the Path cost from the source node S to the destination node D in the neighbor node pair (ns, nd) is finished; if not, judging whether the ns and the nd are the same node; if the ns and the nd are the same node, then cost _ total = cost (S, ns) + cost (nd, D), that is, the path cost of the second route is the combination of the path cost from the source node to the source neighbor node and the path cost from the destination neighbor node to the destination node; if the ns and the nd are not the same node, judging whether the ns and the nd are neighbor nodes or not; if ns and nd are neighbor nodes, cost _ total = cost (S, ns) + cost (ns, nd) + cost (nd, D), that is, the path cost of the second route is the combination of the path cost from the source node to the source neighbor node, the first path cost, and the path cost from the destination neighbor node to the destination node; if ns and nd are not neighbor nodes, then traversing bridges E (x, y) in the bridge set to calculate shortest path cost of neighbor nodes to the traversed bridges.
Judging whether the ns is a node x in the bridge or not based on the bridge E (x, y); if the ns is the node x, the cost _ total = cost (S, ns) + cost (x, y) + cost _ dij (y, nd) + cost (nd, D), namely the shortest path cost of the neighboring node passing through the bridge is the combination of the path cost from the source node to the source neighboring node, the path cost of two nodes of the bridge, the path cost from the node of the bridge to the destination neighboring node obtained by using the shortest path algorithm and the path cost from the destination neighboring node to the destination node; if the ns is not the node x, judging whether the nd is the node y of the bridge, if the nd is the node y, then cost _ total = cost (S, ns) + cost _ dij (ns, x) + cost (x, y) + cost (nd, D), namely the shortest path cost of the neighbor node passing through the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost of the two nodes on the bridge, the path cost from the source neighbor node to the node on the bridge obtained by using a shortest path algorithm and the path cost from the destination neighbor node to the destination node; if the nd is not the node y, judging whether E (S, ns) = E (x, y) or E (nd, D) = E (x, y), namely whether the edge of the source node and the source neighbor node or the edge of the destination neighbor node and the destination node is equal to the bridge of the destination node; if E (S, ns) = E (x, y) or E (nd, D) = E (x, y), then cost _ total = cost (S, ns) + cost _ dij (ns, x) + cost (nd, D), namely the shortest path cost of the neighboring node passing through the bridge is the combination of the path cost from the source node to the source neighboring node, the path cost from the source neighboring node to the node on the bridge obtained by using the shortest path algorithm, and the path cost from the destination neighboring node to the destination node; if E (S, ns) ≠ E (x, y) or E (nd, D) ≠ E (x, y), then cost _ total = cost (S, ns) + cost _ dij (ns, x) + cost (x, y) + cost _ dij (y, nd) + cost (nd, D), i.e. the path cost of the second route is the combination of the path cost from the source node to the source neighbor node, the path cost from the source neighbor node to the node on the bridge obtained by the shortest path algorithm, the path costs of two nodes on the bridge, the path cost from the node on the bridge to the destination neighbor node obtained by the shortest path algorithm and the path cost from the destination neighbor node to the destination node.
Further, acquiring shortest path cost of the neighbor node for passing through a bridge, and judging whether the shortest path cost is smaller than the minimum path cost from the source neighbor node to the destination neighbor node;
if the shortest path cost is smaller than the minimum path cost from the source neighbor node to the destination neighbor node, the new minimum path cost is the shortest path cost, and whether the bridge is traversed and ended is judged;
and if the bridge traversal is finished, the path cost of the second route is the new minimum path cost.
Step S30, comparing the shortest path costs of all the neighbor node pairs from the source node to the destination node to obtain the minimum path cost from the source node to the destination node, obtaining a second routing path from the source node to the destination node based on the minimum path cost, and obtaining the next hop of the source node as an alternative next hop based on the second routing path.
Specifically, shortest path costs of all neighbor node pairs from the source node to the destination node are obtained, the shortest path costs of all neighbor node pairs from the source node to the destination node are compared to obtain a minimum path cost from the source node to the destination node, and whether traversal of the neighbor nodes is finished when time is shared is judged; if not, continuously traversing the bridge set; if the traversal is finished, obtaining a second routing path from the source node to the destination node based on the minimum path cost, and obtaining a next hop of the source node as an alternative next hop based on the second routing path; then judging whether the source node finishes traversing or not, and if the source node does not finish traversing, continuing traversing; if the source node finishes traversing, judging whether the destination node finishes traversing, and if the destination node does not finish traversing, continuing traversing; and if the traversal of the destination node is finished, finishing all the traversal.
Further, the path cost _ bridge = cost (S, ns) + cost (ns, nd) + cost (nd, D) of the bridge is obtained, that is, the cost of the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost of the neighbor node pair, and the path cost from the destination neighbor node to the destination node; judging whether the path cost of the bridge is smaller than the minimum path cost (namely min _ cost 2) from the source neighbor node to the destination neighbor node, if the cost _ bridge is smaller than the min _ cost2, then min _ cost2= cost _ bridge, after the bridge traversal is completed, cost _ total = min _ cost2, and determining a second routing path from the source node S to the destination node D based on the new minimum path cost, wherein the corresponding ns is the alternative next hop from the source node S to the destination node D.
Step S40, after receiving the data packet sent by the link where the source node is located, obtaining the TOS field of the data packet, and forwarding the data packet to the optimal next hop or the candidate next hop based on the TOS field.
Please refer to fig. 6, which is a flowchart of step S40 in the method for route protection based on disjoint paths according to the present invention.
As shown in fig. 6, the step S40 includes:
s41, obtaining values 0 and 1 of a TOS field of an IP message header, and selecting the optimal next hop when the value is set to be 0, and selecting the alternative next hop when the value is set to be 1;
step S42, receiving a data packet sent by a link where the source node is located, acquiring a TOS field of the data packet, and judging whether the TOS field is 0 and whether a next hop is a destination or not based on an IP (Internet protocol) message header;
step S43, if the TOS field of the data packet is 0 and the next hop is the destination, forwarding the data packet to the optimal next hop;
and step S44, if the TOS field of the data packet is not 0 and the next hop is not the destination, forwarding the data packet to the alternative next hop.
Specifically, values 0 and 1 of a TOS field of an IP packet header are obtained, and the optimal next hop is selected when the value is set to 0, and the alternative next hop is selected when the value is set to 1; when each router receives a data packet sent by a link where the source node is located, a TOS field of the data packet is obtained, and whether the TOS field is 0 and whether a next hop is a destination or not are judged based on an IP message header; if the TOS field of the data packet is 0| | next hop is the destination (namely the TOS field is 0 and the next hop is the destination, the TOS field is 1 and the next hop is the destination, and the TOS field is 0 and the next hop is not the destination), forwarding the data packet to the optimal next hop; forwarding the packet to the alternate next hop if the TOS field of the packet is 1 and the next hop is not the destination.
Further, if the router detects a link failure, switching a routing entry affected by the failure in the node to an alternative next hop; when a router detects a link failure, switching a routing entry affected by the failure in a node to an alternative next hop, and if a data packet destined to the alternative next hop exists, setting a TOS field of the data packet to be 1; when the router receives the data packet from the optimal next hop, the failure occurs in the main path to the destination node, so that the data packet is forwarded to the alternative next hop, and the TOS field of the data packet header is set to be 1.
Further, the overall flow of the preferred embodiment of the route protection method based on disjoint paths in the present invention is shown in fig. 7, and the specific steps are as follows:
step S1, starting;
s2, reading the topology file to generate an undirected graph G (N, E) from all nodes and edges, wherein N represents all node sets in the undirected graph, and E represents all edge sets in the undirected graph;
s3, directly obtaining the degree of each node in the undirected graph G according to topology, judging whether a node x with the degree smaller than 2 exists in the undirected graph G, if so, entering a step S15, and if not, entering a step S4;
s4, traversing each node in the N to serve as a destination node D if the degree of the node x does not exist and is less than 2;
s5, traversing each node in the N as a destination node D, and then traversing each node in the N as a source node S;
s6, calculating a first routing Path Path _ dij (S, D) and an optimal next hop from the source node S to the destination node D by using a Dijstra-based shortest Path algorithm;
s7, calculating a bridge set B of the destination node D D
S8, traversing the neighbor node pairs (ns) of the source node S and the destination node D i ,nd j ) Calculating the cost _ total of a second route from the source node S to the destination node D;
s9, judging whether the cost _ total is smaller than the minimum cost min _ cost from the source node S to the destination node D, if not, entering a step S8, and if so, entering a step S10;
step S10, if the cost _ total is less than the min _ cost, the shortest path min _ cost from the source node S to the destination node D is the cost _ total of the path from the source node S to the destination node D;
step S11, after obtaining the shortest path min _ cost from the source node S to the destination node D, judging whether the traversal of the source node S and the destination node D is finished, if not, entering step S8, and if so, entering step 12;
s12, when the traversal of the source node S and the destination node D is finished, obtaining a second routing path from the source node S to the destination node D and an alternative next hop;
step S13, after a second routing path from the source node S to the destination node D and the alternative next hop are obtained, judging whether the traversal of the source node S is finished or not, if the traversal is not finished, entering step S5, and if the traversal is finished, entering step S14;
step S14, after the source node S finishes traversing, judging whether the destination node D finishes traversing, if not, entering step S4, and if so, entering step S15;
and S15, ending.
Compared with the conventional route protection technology LFA, the method can realize higher fault protection rate, and can realize 100% of node fault protection in a robust network (a network which can still realize full circulation under the condition of single node fault); the method provides a solution to the red-green tree problem, two disjoint routing paths can be obtained without traversing all links in the topology, and the algorithm complexity is smaller; if the two paths are used simultaneously, the functions of load balancing, multiple sending and selective receiving and the like of the flow can be realized, and the method has important significance in shortening the routing convergence time and enhancing the reliability.
Further, as shown in fig. 8, based on the foregoing method for route protection based on disjoint paths, the present invention further provides a route protection system based on disjoint paths, where the route protection system based on disjoint paths includes:
an optimal next hop acquiring module 51, configured to acquire a destination node and a source node, calculate a first routing path from the source node to the destination node, obtain, based on the first routing path, that a next hop of the source node is an optimal next hop, and calculate a bridge set of the destination node;
a neighbor node pair processing module 52, configured to obtain a destination neighbor node and a source neighbor node that are disjoint from the first routing path, obtain a neighbor node pair based on the destination neighbor node and the source neighbor node, and calculate a shortest path cost of the neighbor node pair by traversing the bridge set;
an alternative next hop acquiring module 53, configured to compare the shortest path cost with path costs of all neighbor node pairs from the source node to the destination node, obtain a minimum path cost from the source node to the destination node, obtain a second routing path from the source node to the destination node based on the minimum path cost, and obtain a next hop of the source node as an alternative next hop based on the second routing path;
a next hop selection module 54, configured to, after receiving a data packet sent by a link where the source node is located, obtain a TOS field of the data packet, and forward the data packet to the optimal next hop or the candidate next hop based on the TOS field.
Further, as shown in fig. 9, based on the above method and system for route protection based on disjoint paths, the present invention also provides a router, where the router includes a processor 10, a memory 20, and a display 30. Fig. 9 shows only some of the components of the router, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
The memory 20 may in some embodiments be an internal storage unit of the router, such as a hard disk or a memory of the router. The memory 20 may also be an external storage device of the router in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the router. Further, the memory 20 may also include both an internal storage unit of the router and an external storage device. The memory 20 is used for storing application software installed in the router and various data, such as program codes of the installed router. The memory 20 may also be used to temporarily store data that has been output or is to be output. In an embodiment, the memory 20 stores a disjoint path based route protection program 40, and the disjoint path based route protection program 40 can be executed by the processor 10, so as to implement the disjoint path based route protection method in the present application.
The processor 10 may be, in some embodiments, a Central Processing Unit (CPU), a microprocessor or other data Processing chip, and is configured to run program codes stored in the memory 20 or process data, such as executing the disjoint path-based route protection method.
The display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch panel, or the like in some embodiments. The display 30 is used to display information at the router and to display a visual user interface. The components 10-30 of the router communicate with each other via a system bus.
In one embodiment, the following steps are implemented when the processor 10 executes the disjoint path based route protection program 40 in the memory 20:
acquiring a destination node and a source node, calculating to obtain a first routing path from the source node to the destination node, obtaining the next hop of the source node as the optimal next hop based on the first routing path, and calculating a bridge set of the destination node;
acquiring a target neighbor node and a source neighbor node which are not intersected with the first routing path, acquiring neighbor node pairs based on the target neighbor node and the source neighbor node, and traversing the bridge set to calculate the shortest path cost of all the neighbor node pairs;
comparing the shortest path costs of all neighbor node pairs from the source node to the destination node to obtain the minimum path cost from the source node to the destination node, obtaining a second routing path from the source node to the destination node based on the minimum path cost, and obtaining a next hop of the source node as an alternative next hop based on the second routing path;
and after receiving a data packet sent by a link where the source node is located, acquiring a TOS field of the data packet, and forwarding the data packet to the optimal next hop or the alternative next hop based on the TOS field.
The obtaining of the destination node and the source node, calculating to obtain a first routing path from the source node to the destination node, obtaining a next hop of the source node as an optimal next hop based on the first routing path, and calculating a bridge set of the destination node specifically includes:
acquiring all nodes and edges of a topology file, generating an undirected graph based on the nodes and the edges, obtaining the node degree of the undirected graph according to topology, and judging whether the node degree is greater than 1;
if the node degree is larger than 1, traversing all the node sets in the undirected graph to obtain a destination node and a source node, calculating to obtain a first routing path from the source node to the destination node, and obtaining the next hop of the source node as the optimal next hop based on the first routing path;
and after the optimal next hop is obtained, if a target edge meeting preset conditions exists in the undirected graph, taking the target edge as a bridge of the target node, and forming a bridge set by all bridges.
The preset conditions comprise a first condition and a second condition, wherein the first condition is as follows:
x ∈ Subtree (ndi, D) and y ∈ N-Subtree (ndi, D);
wherein x and y are nodes on the target edge, epsilon is a symbol, D is a destination node, and nd i Is the ith destination neighbor node, i is a natural number, subtree (nd) i D) is node nd in shortest path tree i Root Subtree, N-Subtree (nd) i D) is node nd in non-shortest path tree i A subtree that is a root;
the second condition is that:
x,y∉Path_dij(S,D);
wherein S is the source node, \\ 8713, and is not a symbol, and Path _ dij (S, D) is the first routing Path from the source node S to the destination node D.
The method includes the steps of obtaining a destination neighbor node and a source neighbor node which are not intersected with the first routing path, obtaining a neighbor node pair based on the destination neighbor node and the source neighbor node, and traversing the bridge set to calculate a first path cost of the neighbor node pair and a second path cost from the source node to the destination node, and the method also includes the steps of:
acquiring a target neighbor node and a source neighbor node which are not intersected with the first routing path, acquiring a neighbor node pair based on the target neighbor node and the source neighbor node, and judging whether the target neighbor node and the source neighbor node in the neighbor node pair are the same node or not;
if the target neighbor node and the source neighbor node are the same node, the shortest path cost of the neighbor node pair is the combination of the path cost from the source node to the source neighbor node and the path cost from the target neighbor node to the target node;
if the target neighbor node and the source neighbor node are not the same node, judging whether the target neighbor node and the source neighbor node are neighbor nodes;
if the destination neighbor node and the source neighbor node are neighbor nodes, the shortest path cost of the neighbor node pair is the combination of the path cost from the source node to the source neighbor node, the path cost from the source neighbor node to the destination neighbor node and the path cost from the destination neighbor node to the destination node;
and if the target neighbor node and the source neighbor node are not neighbor nodes, traversing the bridge set to calculate the shortest path cost of the neighbor nodes to the passing bridge.
Wherein, the traversing the bridge set to calculate the shortest path cost of the neighbor node pair specifically includes:
acquiring bridges of all destination nodes in the bridge set, and judging whether the source neighbor node is a node of the bridge;
if the source neighbor node is the node of the bridge, the shortest path cost of the neighbor node to pass through the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost of two nodes of the bridge, the path cost from the node of the bridge to the destination neighbor node obtained by using a shortest path algorithm and the path cost from the destination neighbor node to the destination node;
if the source neighbor node is not the node of the bridge, the shortest path cost of the neighbor node to the passing bridge is obtained by judging whether the target neighbor node is the node of the bridge.
The obtaining of the shortest path cost of the neighbor node to the passing bridge by judging whether the destination neighbor node is a node of the bridge specifically includes:
if the target neighbor node is a node of a bridge, the shortest path cost of the neighbor node for passing through the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost of two nodes on the bridge, the path cost from the source neighbor node to the node on the bridge obtained by using a shortest path algorithm and the path cost from the target neighbor node to the target node;
and if the target neighbor node is not a node of the bridge, obtaining the shortest path cost of the neighbor node to the passing bridge by judging whether the edge of the source node and the source neighbor node or the edge of the target neighbor node and the target node is equal to the bridge of the target node.
Wherein, the obtaining of the shortest path cost of the neighboring node to the passing bridge by judging whether the edge of the source node and the source neighboring node or the edge of the destination neighboring node and the destination node is equal to the bridge of the destination node specifically comprises:
if the edges of the source node and the source neighbor node or the edges of the destination neighbor node and the destination node are equal to the bridge of the destination node, the shortest path cost of the neighbor node to pass through the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost from the source neighbor node to the node on the bridge obtained by using the shortest path algorithm and the path cost from the destination neighbor node to the destination node;
and if the edges of the source node and the source neighbor node or the edges of the destination neighbor node and the destination node are not equal to the bridge of the destination node, the shortest path cost of the neighbor node to pass through the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost from the source neighbor node to the node on the bridge obtained by using the shortest path algorithm, the path cost from two nodes on the bridge, the path cost from the node on the bridge to the destination neighbor node obtained by using the shortest path algorithm and the path cost from the destination neighbor node to the destination node.
Wherein, the obtaining a second routing path from the source node to the destination node based on the minimum path cost, and obtaining a next hop of the source node as an alternative next hop based on the second routing path further includes:
acquiring shortest path cost of the neighbor node for passing through a bridge, and judging whether the shortest path cost is smaller than the minimum path cost from the source neighbor node to the target neighbor node;
if the shortest path cost is smaller than the minimum path cost from the source neighbor node to the destination neighbor node, the new minimum path cost is the shortest path cost, and whether the bridge is traversed and ended is judged;
and if the bridge traversal is finished, the path cost of the second route is the new minimum path cost.
After receiving the data packet sent by the link where the source node is located, the method obtains the TOS field of the data packet, and forwards the data packet to the optimal next hop or the alternative next hop based on the TOS field, which specifically includes:
obtaining values 0 and 1 of a TOS field of an IP message header, and selecting the optimal next hop when the value is set to be 0, and selecting the alternative next hop when the value is set to be 1;
receiving a data packet sent by a link where the source node is located, acquiring a TOS field of the data packet, and judging whether the TOS field is 0 and whether a next hop is a destination or not based on an IP message header;
if the TOS field of the data packet is 0 and the next hop is the destination, forwarding the data packet to the optimal next hop;
and if the TOS field of the data packet is not 0 and the next hop is not the destination, forwarding the data packet to the alternative next hop.
Wherein, after receiving the data packet sent by the link where the source node is located, obtaining the TOS field of the data packet, and forwarding the data packet to the optimal next hop or the alternative next hop based on the TOS field, the method further includes:
and when the link where the source node is located is detected to have a fault, switching the data packet of the link from the optimal next hop to the alternative next hop, and setting the value of the TOS field of the data packet to 1.
The present invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a disjoint path based route protection program, and the disjoint path based route protection program, when executed by a processor, implements the steps of the disjoint path based route protection method as described above.
In summary, the present invention provides a method for route protection based on disjoint paths, where the method includes: acquiring a destination node and a source node, calculating to obtain a first routing path from the source node to the destination node, wherein a corresponding next hop is an optimal next hop, and calculating a bridge set of the destination node; the traversal bridge set calculates a first path cost of a neighbor node pair and a second path cost from a source node to a destination node, when the first path cost is smaller than the second path cost, the second path cost is the minimum path cost from the source node to the destination node, and the corresponding next hop is an alternative next hop; and obtaining a TOS field of a data packet, and forwarding the data packet to the optimal next hop or the alternative next hop based on the TOS field. The invention can realize higher fault protection rate of the routing node, has smaller algorithm complexity, and has important significance in shortening routing convergence time and enhancing reliability.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by instructing relevant hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer readable storage medium, and when executed, the program can include the processes of the embodiments of the methods described above. The computer readable storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (13)

1. A method for route protection based on disjoint paths, wherein the method for route protection based on disjoint paths comprises:
acquiring a destination node and a source node, calculating to obtain a first routing path from the source node to the destination node, obtaining a next hop of the source node as an optimal next hop based on the first routing path, and calculating a bridge set of the destination node;
acquiring a target neighbor node and a source neighbor node which are not intersected with the first routing path, acquiring neighbor node pairs based on the target neighbor node and the source neighbor node, and traversing the bridge set to calculate shortest path cost of all the neighbor node pairs;
comparing the shortest path cost of all neighbor node pairs from the source node to the destination node to obtain the minimum path cost from the source node to the destination node, obtaining a second routing path from the source node to the destination node based on the minimum path cost, and obtaining a next hop of the source node as an alternative next hop based on the second routing path;
and after receiving a data packet sent by a link where the source node is located, acquiring a TOS field of the data packet, and forwarding the data packet to the optimal next hop or the alternative next hop based on the TOS field.
2. The method for route protection based on disjoint paths according to claim 1, wherein the obtaining a destination node and a source node, calculating a first route path from the source node to the destination node, obtaining a next hop of the source node as an optimal next hop based on the first route path, and calculating a bridge set of the destination node specifically includes:
acquiring all nodes and edges of a topology file, generating an undirected graph based on the nodes and the edges, obtaining the node degree of the undirected graph according to topology, and judging whether the node degree is greater than 1;
if the node degree is larger than 1, traversing all the node sets in the undirected graph to obtain a destination node and a source node, calculating to obtain a first routing path from the source node to the destination node, and obtaining the next hop of the source node as the optimal next hop based on the first routing path;
and after the optimal next hop is obtained, if a target edge meeting preset conditions exists in the undirected graph, taking the target edge as a bridge of the target node, and forming a bridge set by all bridges.
3. The disjoint path-based route protection method according to claim 2, wherein the preset condition comprises a first condition and a second condition, the first condition being:
x ∈ Subtree (ndi, D) and y ∈ N-Subtree (ndi, D);
wherein x and y are nodes on the target edge, epsilon is a symbol, D is a destination node, nd i Is the ith destination neighbor node, i is a natural number, subtree (nd) i D) is node nd in shortest path tree taking D as root i Subtree of root, N-Subtree (nd) i D) is node nd in the non-shortest path tree taking D as the root i A subtree that is a root;
the second condition is that:
x,y∉Path_dij(S,D);
wherein S is the source node, \\ 8713, and is not a symbol, and Path _ dij (S, D) is the first routing Path from the source node S to the destination node D.
4. The method of claim 1, wherein the obtaining a destination neighbor node and a source neighbor node that are disjoint to the first routing path, obtaining a neighbor node pair based on the destination neighbor node and the source neighbor node, and traversing the bridge set to calculate a shortest path cost of the neighbor node, further comprises:
acquiring a target neighbor node and a source neighbor node which are not intersected with the first routing path, acquiring a neighbor node pair based on the target neighbor node and the source neighbor node, and judging whether the target neighbor node and the source neighbor node in the neighbor node pair are the same node or not;
if the target neighbor node and the source neighbor node are the same node, the shortest path cost of the neighbor node pair is the combination of the path cost from the source node to the source neighbor node and the path cost from the target neighbor node to the target node;
if the target neighbor node and the source neighbor node are not the same node, judging whether the target neighbor node and the source neighbor node are neighbor nodes;
if the destination neighbor node and the source neighbor node are neighbor nodes, the shortest path cost of the neighbor node pair is the combination of the path cost from the source node to the source neighbor node, the path cost from the source neighbor node to the destination neighbor node and the path cost from the destination neighbor node to the destination node;
and if the target neighbor node and the source neighbor node are not neighbor nodes, traversing the bridge set to calculate the shortest path cost of the neighbor nodes to the passing bridge.
5. The method for route protection based on disjoint paths according to claim 1, wherein traversing the bridge set to calculate the shortest path cost of the neighbor node pair specifically comprises:
acquiring bridges of all destination nodes in the bridge set, and judging whether the source neighbor node is a node of the bridge;
if the source neighbor node is the node of the bridge, the shortest path cost of the neighbor node to pass through the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost of two nodes of the bridge, the path cost from the node of the bridge to the destination neighbor node obtained by using a shortest path algorithm and the path cost from the destination neighbor node to the destination node;
if the source neighbor node is not the node of the bridge, the shortest path cost of the neighbor node to the passing bridge is obtained by judging whether the target neighbor node is the node of the bridge or not.
6. The method for route protection based on disjoint paths according to claim 5, wherein the obtaining the shortest path cost of the neighboring node to the passing bridge by determining whether the destination neighboring node is a node of the bridge specifically comprises:
if the target neighbor node is a node of a bridge, the shortest path cost of the neighbor node for passing through the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost of two nodes on the bridge, the path cost from the source neighbor node to the node on the bridge obtained by using a shortest path algorithm and the path cost from the target neighbor node to the target node;
and if the target neighbor node is not a node of the bridge, obtaining the shortest path cost of the neighbor node to the passing bridge by judging whether the edge of the source node and the source neighbor node or the edge of the target neighbor node and the target node is equal to the bridge of the target node.
7. The method of claim 6, wherein the obtaining the shortest path cost of the neighboring node to the passing bridge by determining whether the edge between the source node and the source neighboring node or the edge between the destination neighboring node and the destination node is equal to the bridge of the destination node comprises:
if the edges of the source node and the source neighbor node or the edges of the destination neighbor node and the destination node are equal to the bridge of the destination node, the shortest path cost of the neighbor node for passing through the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost from the source neighbor node to the node on the bridge obtained by using the shortest path algorithm and the path cost from the destination neighbor node to the destination node;
and if the edges of the source node and the source neighbor node or the edges of the destination neighbor node and the destination node are not equal to the bridge of the destination node, the shortest path cost of the neighbor node to pass through the bridge is the combination of the path cost from the source node to the source neighbor node, the path cost from the source neighbor node to the node on the bridge obtained by using the shortest path algorithm, the path cost from two nodes on the bridge, the path cost from the node on the bridge to the destination neighbor node obtained by using the shortest path algorithm and the path cost from the destination neighbor node to the destination node.
8. The method for route protection based on disjoint paths of claim 1, wherein the obtaining a second route path from the source node to the destination node based on the minimum path cost and obtaining a next hop of the source node as an alternative next hop based on the second route path further comprises:
acquiring shortest path cost of the neighbor node for passing through a bridge, and judging whether the shortest path cost is less than the minimum path cost from the source neighbor node to the destination neighbor node;
if the shortest path cost is smaller than the minimum path cost from the source neighbor node to the destination neighbor node, the new minimum path cost is the shortest path cost, and whether the bridge is traversed and ended is judged;
and if the bridge traversal is finished, the path cost of the second route is the new minimum path cost.
9. The method according to claim 1, wherein the obtaining a TOS field of the packet after receiving the packet sent by the link where the source node is located, and forwarding the packet to the optimal next hop or the alternative next hop based on the TOS field specifically comprises:
obtaining values 0 and 1 of a TOS field of an IP message header, and selecting the optimal next hop when the value is set to be 0, and selecting the alternative next hop when the value is set to be 1;
receiving a data packet sent by a link where the source node is located, acquiring a TOS field of the data packet, and judging whether the TOS field is 0 and whether a next hop is a destination or not based on an IP message header;
if the TOS field of the data packet is 0 and the next hop is the destination, forwarding the data packet to the optimal next hop;
forwarding the data packet to the alternate next hop if the TOS field of the data packet is not 0 and the next hop is not the destination.
10. The method for route protection based on disjoint paths according to claim 1, wherein after receiving a packet sent by a link where the source node is located, the method obtains a TOS field of the packet, and forwards the packet to the optimal next hop or the alternative next hop based on the TOS field, and then further comprises:
and when the link where the source node is located is detected to be in failure, switching the data packet of the link from the optimal next hop to the alternative next hop, and setting the value of the TOS field of the data packet to be 1.
11. A disjoint path based route protection system, comprising:
the optimal next hop acquisition module is used for acquiring a destination node and a source node, calculating to obtain a first routing path from the source node to the destination node, obtaining the next hop of the source node as the optimal next hop based on the first routing path, and calculating a bridge set of the destination node;
a neighbor node pair processing module, configured to obtain a destination neighbor node and a source neighbor node that are disjoint from the first routing path, obtain a neighbor node pair based on the destination neighbor node and the source neighbor node, and traverse the bridge set to calculate a shortest path cost of the neighbor node pair;
the candidate next hop acquiring module is configured to compare the shortest path cost with path costs of all neighbor node pairs from the source node to the destination node to obtain a minimum path cost from the source node to the destination node, obtain a second routing path from the source node to the destination node based on the minimum path cost, and obtain a next hop of the source node as a candidate next hop based on the second routing path;
and the next hop selection module is used for acquiring a TOS field of the data packet after receiving the data packet sent by the link where the source node is located, and forwarding the data packet to the optimal next hop or the alternative next hop based on the TOS field.
12. A router, characterized in that the router comprises a memory, a processor and a program stored on the memory and executable on the processor, the program implementing the steps of the disjoint path based route protection method according to any of the claims 1-10 when executed by the processor.
13. A computer readable storage medium having stored thereon a computer program for executing by a processor the steps of implementing a disjoint path based route protection method as recited in any of claims 1-10.
CN202211620906.4A 2022-12-16 2022-12-16 Route protection method based on disjoint paths and related equipment Active CN115622937B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211620906.4A CN115622937B (en) 2022-12-16 2022-12-16 Route protection method based on disjoint paths and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211620906.4A CN115622937B (en) 2022-12-16 2022-12-16 Route protection method based on disjoint paths and related equipment

Publications (2)

Publication Number Publication Date
CN115622937A true CN115622937A (en) 2023-01-17
CN115622937B CN115622937B (en) 2023-03-10

Family

ID=84879816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211620906.4A Active CN115622937B (en) 2022-12-16 2022-12-16 Route protection method based on disjoint paths and related equipment

Country Status (1)

Country Link
CN (1) CN115622937B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090228575A1 (en) * 2008-03-07 2009-09-10 Pascal Thubert Computing disjoint paths for reactive routing mesh networks
CN107302500A (en) * 2017-06-12 2017-10-27 山西大学 A kind of single node failure guard method based on hop-by-hop mode

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090228575A1 (en) * 2008-03-07 2009-09-10 Pascal Thubert Computing disjoint paths for reactive routing mesh networks
CN107302500A (en) * 2017-06-12 2017-10-27 山西大学 A kind of single node failure guard method based on hop-by-hop mode

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
于磊磊: "无线传感器网络不相交多路径容错路由研究", 《中国博士学位论文全文数据库 信息科技辑 2014年》 *

Also Published As

Publication number Publication date
CN115622937B (en) 2023-03-10

Similar Documents

Publication Publication Date Title
US9088485B2 (en) System, method and apparatus for signaling and responding to ERO expansion failure in inter-domain TE LSP
US11848823B2 (en) System and method to recover from link or node failure in a network
US9401858B2 (en) Loop avoidance during network convergence in switched networks
CA2706581C (en) System, method and program for determining failed routers in a network
US8559414B2 (en) Automatically detecting best paths from shadow route reflectors
TWI472191B (en) Disjoint path computation algorithm
WO2013045084A1 (en) Incremental deployment of mrt based ipfrr
WO2013017979A1 (en) Method and apparatus for resilient routing of control traffic in a split-architecture system
US11646960B2 (en) Controller provided protection paths
EP2761832A1 (en) Optimizing endpoint selection of mrt-frr detour paths
CN102197625A (en) Provider link state bridging (PLSB) computation method
CN113316918B (en) System and method for reducing the size of pan Hong Tapu
CN108243102B (en) Method for realizing fast rerouting and PE equipment
CN113615132A (en) Fast flooding topology protection
CN112039765B (en) Method for transmitting route information, method and device for selecting route
CN115622937B (en) Route protection method based on disjoint paths and related equipment
US10992573B2 (en) Multi-layer LSP control method and apparatus
CN113872843A (en) Route generation method, route processing method and device
Risso et al. A combined bgp and ip/mpls resilient transit backbone design
CN112039770B (en) Routing method and device
US11838201B1 (en) Optimized protected segment-list determination for weighted SRLG TI-LFA protection
US20230068443A1 (en) Dynamic packet routing using prioritized groups
US11811611B2 (en) System and method for backup flooding topology split
JP6307031B2 (en) Route reflector and route control method of route reflector
CN113691447A (en) SR local micro-ring prevention method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant