CN108768796B - Link fault detection method and device - Google Patents

Link fault detection method and device Download PDF

Info

Publication number
CN108768796B
CN108768796B CN201810988568.7A CN201810988568A CN108768796B CN 108768796 B CN108768796 B CN 108768796B CN 201810988568 A CN201810988568 A CN 201810988568A CN 108768796 B CN108768796 B CN 108768796B
Authority
CN
China
Prior art keywords
node
path
address
bfd
hop
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.)
Active
Application number
CN201810988568.7A
Other languages
Chinese (zh)
Other versions
CN108768796A (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.)
New H3C Technologies Co Ltd Hefei Branch
Original Assignee
New H3C Technologies Co Ltd Hefei Branch
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 New H3C Technologies Co Ltd Hefei Branch filed Critical New H3C Technologies Co Ltd Hefei Branch
Priority to CN201810988568.7A priority Critical patent/CN108768796B/en
Publication of CN108768796A publication Critical patent/CN108768796A/en
Application granted granted Critical
Publication of CN108768796B publication Critical patent/CN108768796B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Abstract

The invention provides a link fault detection method and a device, wherein a routing node in an IP (Internet protocol) networking receives a first BFD message sent by a target path, and if the first BFD message is a multi-hop BFD message comprising a multi-hop BFD mark, whether the address of an interface receiving the first BFD message is the same as the destination address of the first BFD message is judged; if the two BFD messages are the same, the destination address and the source address of the first BFD message are exchanged to obtain a second BFD message; and sending a second BFD message to the target node sending the first BFD message, so that the target node determines that the target path has a fault when the target node does not receive the second BFD message within a preset time. In this way, multi-hop BFD detection of the target path can be achieved.

Description

Link fault detection method and device
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a link fault detection method and apparatus.
Background
The basic principle of the FRR (Fast ReRoute) technology is to calculate a backup route (backup next hop) automatically in advance, and once a link failure is detected, the backup route is used to guide forwarding, and the traffic interruption time is equal to the sum of the time for detecting an adjacent failure and the time for replacing a failed route with the backup route, so that the time for calculating the route, synchronizing the forwarding table entries and the like is saved, and the traffic interruption time is greatly shortened.
At present, FRR technology generally adopts a BFD (Bidirectional Forwarding Detection) session continuous Detection link, however, the existing BFD session can only automatically establish a single-hop BFD session between directly connected neighbor devices. For two devices that are not directly connected, detection by the BFD session is not possible.
Disclosure of Invention
In view of the above, the present disclosure provides a link failure detection method and apparatus to at least partially improve the above problem.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, the present disclosure provides a link failure detection method, applied to a routing node in an IP networking, where the method includes:
receiving a first BFD message sent through a target path, and if the first BFD message is a multi-hop BFD message including a multi-hop BFD mark, judging whether the address of an interface receiving the first BFD message is the same as the target address of the first BFD message;
if the two BFD messages are the same, the destination address and the source address of the first BFD message are exchanged to obtain a second BFD message;
and sending the second BFD message to a target node sending the first BFD message, so that the target node determines that the target path has a fault when the target node does not receive the second BFD message within a preset time.
Optionally, in the above link failure detection method, the method further includes:
determining a first intersection node through which a main path and a backup path reaching a destination node pass;
determining an address of an ingress interface on the first rendezvous node and an address of an egress interface on the routing node for the data forwarded from the primary path;
and establishing a multi-hop BFD session with the address of the outgoing interface as a source address and the address of the incoming interface as a destination address, and sending a multi-hop BFD message carrying the multi-hop BFD mark to the first intersection node through the multi-hop BFD session.
Optionally, in the method for detecting a link failure, determining a first intersection node through which a primary path and a backup path reaching a destination node pass includes:
calculating nodes included in a main path reaching the destination node, and sequentially storing each calculated node to form a first path list;
calculating nodes included in the backup path reaching the destination node, and sequentially storing each calculated node to form a second path list;
and sequentially comparing each node in the first path list with each node in the second path list according to the arrangement order, and taking the first same node as the first intersection node.
Alternatively, in the above-described link failure detection method,
calculating nodes included in a main path reaching the destination node, including:
calculating to obtain nodes included in the main path through a Shortest Path First (SPF) algorithm according to link state information stored in a Link State Database (LSDB) of the routing equipment;
calculating nodes included in a backup path reaching the destination node, including:
and according to the link state information stored in the LSDB, calculating the nodes included by the backup path through a loop-free alternative LFA algorithm.
Optionally, in the above method for detecting a link failure, determining an address of an ingress interface of data forwarded from the active path on the first same node includes:
searching the last node of the first same node on the main path;
and taking the previous node as a root, calculating a main next hop from the previous node to the first same node, and determining the main next hop as the address of the incoming interface.
In a second aspect, the present disclosure further provides a link failure detection apparatus, applied to a routing node in an IP networking, where the apparatus includes:
the receiving module is used for receiving a first BFD message sent through a target path, and if the first BFD message is a multi-hop BFD message comprising a multi-hop BFD mark, judging whether the address of an interface receiving the first BFD message is the same as the target address of the first BFD message;
the detection module is used for exchanging a destination address and a source address of the first BFD message when the address of an interface receiving the first BFD message is the same as the destination address of the first BFD message, obtaining a second BFD message, and sending the second BFD message to a target node sending the first BFD message, so that when the target node does not receive the second BFD message within a preset time length, the target path is determined to have a fault.
Optionally, in the above link failure detection apparatus, the apparatus further includes:
the first determining module is used for determining a first intersection node through which a main path and a backup path reaching a destination node pass;
a second determining module, configured to determine an address of an ingress interface on the first same node and an address of an egress interface on the routing device of the data forwarded from the active path;
and the session establishing module is used for establishing a multi-hop BFD session with the address of the outgoing interface as a source address and the address of the incoming interface as a destination address, and sending a multi-hop BFD message carrying the multi-hop BFD mark to the first intersection node through the multi-hop BFD session.
Optionally, in the above link failure detection apparatus, the first determining module includes:
the first calculation submodule is used for calculating nodes included in the main path reaching the destination node and sequentially storing all the calculated nodes to form a first path list;
the second calculation submodule is used for calculating nodes included in the backup path reaching the destination node and sequentially storing each calculated node to form a second path list;
and the comparison submodule is used for sequentially comparing each node in the first path list with each node in the second path list according to the arrangement order, and taking the first same node as the first intersection node.
Alternatively, in the above-mentioned link failure detection apparatus,
the first computation submodule is specifically configured to compute, according to link state information stored in a link state database LSDB of the routing device, a node included in the active path through a shortest path first SPF algorithm;
and the second calculation submodule is specifically configured to calculate, according to the link state information stored in the LSDB, a node included in the backup path by using a loop-free alternative LFA algorithm.
Optionally, in the above link failure detection apparatus, the second determining module is specifically configured to search a previous node of the first same node on the active path, calculate an active next hop from the previous node to the first same node by using the previous node as a root, and determine the active next hop as the address of the ingress interface.
In a third aspect, the present disclosure also provides a routing node, including a processor and a machine-readable storage medium having stored thereon machine-executable instructions that, when executed, cause the processor to implement the link failure detection method provided by the present disclosure.
Compared with the prior art, the method has the following beneficial effects:
in the method and the device for detecting the link failure, a routing node in an IP networking receives a first BFD message sent through a target path, and if the first BFD message is a multi-hop BFD message including a multi-hop BFD mark, whether the address of an interface receiving the first BFD message is the same as the destination address of the first BFD message is judged. And if the target address and the source address of the first BFD message are the same, exchanging the target address and the source address of the first BFD message to obtain a second BFD message, and sending the second BFD message to a target node sending the first BFD message, so that the target node determines that the target path has a fault when the target node does not receive the second BFD message within a preset time. In this way, multi-hop BFD detection of the target path can be achieved.
Drawings
To more clearly illustrate the technical solutions of the present disclosure, the drawings needed for the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present disclosure, and therefore should not be considered as limiting the scope, and those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic connection diagram of an IP networking provided by the present disclosure;
fig. 2 is a block schematic diagram of a routing node according to the present disclosure;
fig. 3 is a schematic flow chart of a link failure detection method provided by the present disclosure;
fig. 4 is a schematic flow chart of a link failure detection method provided by the present disclosure;
FIG. 5 is a schematic diagram illustrating the sub-steps of step S41 shown in FIG. 4;
FIG. 6 is a schematic diagram illustrating the sub-steps of step S42 shown in FIG. 4;
fig. 7 is a functional block diagram of a link failure detection apparatus provided in the present disclosure.
Icon: 10-IP networking; 11. 12, 13, 14, 15-routing nodes; 121-a memory; 122-a processor; 123-network elements; 70-link failure detection means; 71-a receiving module; 72-a detection module; 73-a first determination module; 731-a first computation submodule; 732-a second computation submodule; 733 — contrast submodule; 74-a second determination module; session establishment module 75.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure clearer, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the present disclosure, and it is apparent that the described embodiments are some, but not all embodiments of the present disclosure. The components of the present disclosure, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Referring to fig. 1, fig. 1 is a connection diagram of an IP networking 10 according to the present disclosure. The IP networking includes a plurality of routing nodes, such as routing node 11, routing node 12, routing node 13, routing node 14, and routing node 15 shown in fig. 1, which are directly or indirectly communicatively connected to each other.
In the present disclosure, the routing node may be any router or three-layer switch supporting an IP (Internet Protocol) FRR function, and the routing node may automatically calculate an optimal next hop and a sub-optimal next hop to reach a corresponding destination address, where the optimal next hop is generally referred to as a primary next hop and the sub-optimal next hop is generally referred to as a backup next hop.
As shown in fig. 2, which is a block schematic diagram of a routing node 12 provided by the present disclosure, the routing node 12 includes a memory 121, a processor 122, a network unit 123, and a link failure detection device 70.
Wherein the link failure detection device 70 includes at least one software functional module which can be stored in the memory 121 in the form of software or firmware (firmware), and the processor 122 is configured to execute the executable module stored in the memory 121 to implement corresponding data processing or interaction.
The Memory 121 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 122 may be an integrated circuit chip having data processing capabilities. The processor 122 may be a general-purpose processor, such as a Central Processing Unit (CPU), a Network Processor (NP), and the like. Processor 122 may implement or perform the methods, steps, and logic blocks disclosed in this disclosure. Further, a general purpose processor may be a microprocessor, or the processor may be any conventional processor or the like.
The network element 123 is configured to establish a communication connection between the routing node 12 and another device (such as a user equipment or another routing node) through the network, so as to implement transceiving operation of network signals and data. The network signal may include a wireless signal or a wired signal.
It should be understood that the configuration shown in fig. 2 is merely illustrative, and that routing node 12 may include fewer components than shown in fig. 2 or may have a different configuration than shown in fig. 2. It is worth noting here that the components shown in fig. 2 may be implemented in software, hardware, or a combination thereof.
In the present disclosure, components included in other routing nodes in the IP networking 10 and connection relationships between the components are similar to those of the routing node 12, and are not described herein again.
Referring to fig. 3, a schematic flow chart of a link failure detection method according to the present disclosure is shown, where the link failure detection method is applied to any routing node shown in fig. 1.
A Link State DataBase (LSDB) is maintained in a routing node in the IP network 10, and Link information of the routing node and Link information advertised by a neighbor of the routing node are stored in the LSDB of the routing node. Running routing nodes of an IGP (Interior Gateway Protocol) such as OSPF (Open Shortest Path First), IS-IS (Intermediate system to Intermediate system), and the like, can calculate a route to a destination address according to link information in an LSDB maintained thereon, and specifically can calculate an optimal next hop reaching the destination address as an active next hop by adopting a Shortest Path First (SPF) algorithm. For a routing node supporting an IP FRR function, a Loop-Free Alternate (LFA) algorithm may also be used to calculate a suboptimal next hop to reach a destination address as a backup next hop, and the backup next hop does not cause a Loop to form.
The link failure detection method provided in this embodiment will be described in detail below by taking the application of the link failure detection method to the routing node 12 as an example.
Step S31, receiving a first BFD packet sent through a target path, and if the BFD packet is a multi-hop BFD packet including a multi-hop BFD label, determining whether an address of an interface receiving the first BFD packet is the same as a destination address of the first BFD packet.
In practical applications, link failure is usually detected through BFD sessions, and existing BFD sessions can only be automatically created between directly connected routing nodes.
For example, in the networking scenario shown in fig. 3, in the IP networking 10, the main path from the routing node 11 to the routing node 15 is: routing node 13 → routing node 12 → routing node 15, a single-hop BFD session can be created between routing node 11 and routing node 13, which can only be used to detect whether a link failure occurs between routing node 11 and routing node 13, and if a link failure occurs between routing node 13 and routing node 12, the single-hop BFD session cannot be detected, and routing node 11 will still forward the data to the primary next hop (i.e. to routing node 13). If a link failure between routing node 13 and routing node 12 is to be detected, additional BFD session functions may need to be deployed on routing node 12. In this way, on one hand, the BFD session function needs to be deployed on each routing node on the path, which is inconvenient to implement; on the other hand, data cannot be switched to the backup path for forwarding in a timely manner.
In the present disclosure, it is considered that a primary path and a backup path from a certain routing node to a destination address always have a junction node, for example, at least a junction occurs at the destination address. When the main path fails at any position before the first intersection point, the main path can be switched to a backup path to forward data, and based on the fact, the multi-hop BFD session for detecting the main path between the routing node and the first intersection point can be established, so that the main path is subjected to fault detection, and when the main path fails, the data is forwarded to the destination address through the backup path.
The process of creating the multi-hop BFD session will be described in detail below, taking the routing node 11 shown in fig. 1 as an example.
Step S41, determine the first intersection node through which the primary path and the backup path reaching the destination node pass.
Optionally, in an implementation manner, the address of the destination node may be a preset address, and in this case, the user may perform fault detection only on the active path reaching the preset address according to a requirement. Wherein, one, two or more preset addresses can be set according to requirements.
In another embodiment, considering that the routing node 11 usually stores a plurality of routes, the destination node in each route may be the destination node in step S41. In implementation, for a destination node in each route, the routing node 11 may determine a first intersection node of a primary path and a backup path reaching the destination node, respectively. In other words, the routing node 11 can detect a failure of the active path to the destination node in each route.
Alternatively, in the present disclosure, step S41 may include the sub-steps shown in fig. 5.
Step S51, calculating nodes included in the primary path to the destination node, and sequentially saving the calculated nodes to form a first path list.
The nodes included in the active path may be obtained by calculating according to the link state information stored in the LSDB of the routing node 11 through a shortest path first SPF algorithm.
Step S52, calculating nodes included in the backup path to the destination node, and sequentially saving the calculated nodes to form a second path list.
The nodes included in the backup path may be calculated by an LFA algorithm according to the link state information stored in the LSDB of the routing node 11.
It should be noted that, in the present disclosure, the execution order of step S51 and step S52 is not limited.
In some existing embodiments, each routing node in an IP networking usually calculates a route to a destination node according to an LSDB maintained by the routing node, where the route includes a primary next hop and a backup next hop. When each routing node receives the data to be forwarded, which is sent to the destination node, the data to be forwarded is forwarded according to the route on the node.
In the present disclosure, it is considered that the LSDBs maintained at each routing node in the network are the same, and the route at each routing node is calculated based on the link state information in the LSDB maintained by itself. Therefore, the routing node 11 may directly calculate, according to the link state information in the LSDB maintained at the node, a plurality of primary routes and a plurality of backup routes required for forwarding the data to be forwarded from the routing node 11 to the destination node, determine nodes included in the primary path according to the plurality of primary routes, and determine nodes included in the backup path according to the plurality of backup routes.
In detail, when implemented, step S51 can be implemented by:
taking the routing node 11 as a root, calculating a primary next hop reaching the destination node, and taking a node where the primary next hop obtained by calculation is located as the root, calculating the primary next hop reaching the destination node again until the calculated address of the node where the primary next hop is located is the address of the destination node;
and sequentially recording the nodes of the main next hops obtained by calculation according to the calculation sequence to obtain the first path list.
The step S52 can be implemented by the following steps:
calculating a backup next hop from the routing node 11 to the destination node, and recording a node where the backup next hop is located;
calculating a primary next hop reaching the destination node by taking the node where the backup next hop is located as a root, and calculating the primary next hop reaching the destination node by taking the calculated primary next hop as the root until the calculated address of the node where the primary next hop is located is the address of the destination node;
and after the nodes of the next hops are backed up, sequentially recording the nodes of the main next hops obtained by calculation according to the calculation sequence to obtain the second path list.
Wherein, taking a certain node as the root means taking the node as the root of the shortest path tree, and calculating the shortest path tree reaching the destination node.
Step S53, sequentially comparing each node in the first path list with each node in the second path list according to the arrangement order, and using the first same node as the first intersection node.
In implementation, one of the first path list and the second path list may be used as a target list, and nodes in the target list are sequentially traversed; and searching whether a node which is the same as the currently traversed node exists in another path list aiming at the currently traversed node, wherein the first searched node is the first same node, namely the first intersection node.
For example, assuming that the routing node 15 shown in fig. 1 is the destination node, it can be determined through the above steps that the first path list from the routing node 11 to the routing node 15 is:
{ routing node 13, routing node 12, routing node 15 };
the second list of paths from routing node 11 to routing node 15 is:
{ routing node 14, routing node 12, routing node 15 }.
In implementation, the first path list may be used as a target list, starting from the routing node 13 in the first path list, searching whether the same node exists in the second path list, if not, searching whether the same node as the routing node 12 in the first path list exists in the second path list, and if so, determining that the routing node 12 is the first same node in the first path list and the second path list, so as to determine that the first intersection node of the primary path and the backup path from the routing node 11 to the routing node 15 is the routing node 12.
Step S42, determining an address of an ingress interface on the first intersection node and an address of an egress interface on the routing node 11 of the data forwarded from the primary path.
Step S43, a multi-hop BFD session is established with the address of the egress interface as a source address and the address of the ingress interface as a destination address, and a multi-hop BFD packet carrying a multi-hop BFD label is sent to the first intersection node through the multi-hop BFD session.
Under the condition that the routing node 12 is determined to be the first intersection node, since link failure detection is only required to be performed on the primary path from the routing node 11 to the routing node 12 (the first intersection node), a multi-hop BFD session can be created by using the address of the primary path at the outgoing interface corresponding to the routing node 11 as a source address and the address of the primary path at the incoming interface corresponding to the routing node 12 as a destination address. An egress interface of the active path at the routing node 11 is an egress interface of the data forwarded from the active path at the routing node 11, and an ingress interface of the active path at the routing node 12 is an ingress interface of the data forwarded from the active path at the routing node 12.
Wherein the egress interface may be determined by:
determining a primary next hop from the routing node 11 to the routing node 15 (a node where the destination Address in step S41 is), searching for a MAC (Media Access Control or Medium Access Control) Address corresponding to the primary next hop in an ARP (Address Resolution Protocol) table, and then searching for an interface corresponding to the MAC Address in the MAC table, which is the egress interface.
Optionally, in this embodiment, step S42 may implement the determination of the address of the incoming interface through the sub-steps as shown in fig. 6:
step S61, finding the previous node of the first intersection node on the primary path.
Based on the foregoing design, if the routing node 11 records nodes included in the primary path from the routing node 11 to the destination address, after the first rendezvous node is determined, a node recorded before the first rendezvous node can be searched for from the nodes included in the recorded primary path and used as the previous node.
Step S62, taking the previous node as a root, calculating a primary next hop from the previous node to the first intersection node, and determining the primary next hop as the address of the ingress interface.
Since each node on the active path forwards data from the shortest path, step S62 may be implemented by an SPF algorithm, that is, a next hop corresponding to the shortest path to the first same node is calculated by using the previous node as a root, and the next hop is necessarily an address of an ingress interface of the active path at the first same node.
Through the above process, the routing node 11 may automatically create a multi-hop BFD session for the primary path to reach a destination address (such as the routing node 15), so as to detect whether a link failure occurs on the primary path through the multi-hop BFD session, thereby avoiding configuring BFD session functions at all nodes on the primary path.
An example of the foregoing steps is given below with reference to the networking scenario shown in fig. 1, where IP addresses corresponding to an outgoing interface and an incoming interface of the active path on a part of nodes are marked in fig. 1. In the IP networking 10, the routing node 11 may determine, by looking up a table, that the address of the primary path from the routing node 11 to the routing node 15 on the outgoing interface of the routing node 11 is 2.1.1.1. The primary next hop from the node immediately above the routing node 12 (routing node 13) to the routing node 12 may be determined by calculation to be 3.1.1.2, and thus the address of the primary path from routing node 11 to routing node 15 at the ingress interface of routing node 12 is 3.1.1.2.
In this disclosure, after the multi-hop BFD session is created on the routing node 11, the routing node 11 may send a multi-hop BFD packet to a first intersection node, that is, a node where a destination address of the multi-hop BFD session is located, through the multi-hop BFD session. After receiving the multi-hop BFD packet, the first intersection node exchanges the source address and the destination address of the multi-hop BFD packet to obtain a corresponding response packet, and returns the response packet to the routing node 11 along the primary path, and if the primary path fails, the routing node 11 can receive the response packet within a preset time. In other words, if the routing node 11 does not receive the response packet for a preset time, it may be determined that the active path fails.
The multi-hop BFD packet may be an echo packet carrying a preset multi-hop BFD tag, and may be configured on the routing node 11 to add a diag field in the echo packet and set the multi-hop BFD tag in the added diag field.
In this way, the first intersection node (routing node 12) may receive the multi-hop BFD packet sent by the routing node 11 through the main path. The active path may serve as a target path in the present disclosure, and the routing node 11 may serve as a target node in the present disclosure.
Referring back to fig. 3, in step S31, the first BFD packet refers to a BFD packet received by the routing node 12. In practical applications, besides the multi-hop BFD packet sent by the routing node 11, the routing node 12 may also receive a single-hop BFD packet sent by other devices, such as a neighboring node.
In the implementation process, if the multi-hop BFD mark is not identified in the received first BFD message, the first BFD message is forwarded according to the destination address of the first BFD message. If the multi-hop BFD mark is identified in the received first BFD message, the first BFD message can be determined to be a multi-hop BFD message sent out through a multi-hop BFD session. In this case, it is further determined whether the multi-hop BFD packet is sent to the node.
And step S32, if the first BFD message is the same as the second BFD message, the destination address and the source address of the first BFD message are exchanged to obtain a second BFD message.
Step S33, sending the second BFD packet to a target node that sends the first BFD packet, so that when the target node does not receive the second BFD packet for a preset duration, it is determined that the target path has a fault.
In implementation, since the second BFD packet is obtained by exchanging the destination address and the source address of the first BFD packet, the routing node 12 may forward the second BFD packet to the routing node 11 (i.e., the destination node) according to the primary path (i.e., the destination path). In this way, when the routing node 11 does not receive the second BFD packet returned by the routing node 12 for the preset time, it may be determined that the primary path has a fault.
Referring back to the networking scenario shown in fig. 1, the above-mentioned steps S31-S33 will be described in detail with reference to the scenario. In the IP networking 10, after the routing node 11 establishes the multi-hop BFD session with 2.1.1.1 as the source address and 3.1.1.2 as the destination address, the routing node 11 may periodically send an echo packet with 2.1.1.1 as the source address and 3.1.1.2 as the destination address, and when sending the echo packet, the routing node adds the multi-hop BFD tag to a flag field of the echo packet to form a first BFD packet X1, and forwards the first multi-hop BFD packet X1 according to the destination address 3.1.1.2. The routing node 13 receives the first BFD packet X1, and recognizes that the first BFD packet X1 is a multi-hop BFD packet carrying a multi-hop BFD label, at this time, the routing node 13 further determines that the address 2.1.1.2 of the first BFD packet X1 at the ingress interface of the node is different from the destination address 3.1.1.2 of the first BFD packet X1, so as to continue to forward the first BFD packet X1 according to the destination address 3.1.1.2.
Then, the routing node 12 receives the first BFD packet X1, and recognizes that the first BFD packet X1 is a multi-hop BFD packet carrying a multi-hop BFD label, so that it can further determine that the address 3.1.1.2 of the first BFD packet X1 at the ingress interface of the node is the same as the destination address 3.1.1.2 of the first BFD packet X1, and therefore, the destination address of the first BFD packet X1 may be set as its initial source address 2.1.1.1, and the source address of the first BFD packet X1 may be set as its initial destination address 3.1.1.2, that is, the source address and the destination address are exchanged, so that a second BFD packet X2 using 3.1.1.2 as the source address and 2.1.1.1 as the destination address is obtained, and the second BFD packet X2 is forwarded according to the destination address 2.1.1 of the second BFD packet X2. As long as the primary path between the routing node 11 and the routing node 12 does not fail, the second BFD packet X2 will be forwarded to the egress interface of the routing node 11 within a certain time period. If the routing node 11 does not receive the second BFD packet X2 within the time period, it may be determined that the primary path between the routing node 11 and the routing node 12 has failed.
Through the design, whether the target path has a fault or not can be detected through the multi-hop BFD session.
Optionally, in this disclosure, after determining the address of the ingress interface, a network administrator may perform configuration of a static multi-hop BFD session on the ingress interface of the routing node 12 (the first intersection node), so that the routing node 12 periodically sends a control packet using the address of the ingress interface as a source address and the address of the egress interface as a destination address, and thus, the routing node 11 may determine that the primary path fails when the BFD control packet using the address of the ingress interface as the source address and the address of the egress interface as the destination address is not received within a preset detection duration.
The preset detection duration is a time detection Interval (Detect Interval), and may be configured by a user according to a requirement.
In addition, in practical applications, the path from the routing node 12 to a certain destination address may include a primary path and a backup path, and the primary path and the backup path have at least one intersection node. In this case, the routing node 12 may automatically create a multi-hop BFD session for detecting the primary path through the steps shown in fig. 4 to fig. 6, and send a multi-hop BFD packet carrying a multi-hop BFD label to the first intersection node of the primary path and the backup path through the created multi-hop BFD session. The detailed description of the steps shown in fig. 4 to fig. 6 can be referred to for the specific implementation process, and will not be repeated herein.
Fig. 7 is a functional block diagram of a link failure detection apparatus 70 provided in the present disclosure, which can be applied to any routing node shown in fig. 1. The link failure detection apparatus 70 includes a receiving module 71 and a detection module 72.
The receiving module 71 is configured to receive a first BFD packet sent through a target path, and if the first BFD packet is a multi-hop BFD packet including a multi-hop BFD flag, determine whether an address of an interface receiving the first BFD packet is the same as a destination address of the first BFD packet.
In the present disclosure, the description of the receiving module 71 may specifically refer to the detailed description of step S31 shown in fig. 3.
The detection module 72 is configured to, when the address of the interface that receives the first BFD packet is the same as the destination address of the first BFD packet, exchange the destination address and the source address of the first BFD packet to obtain a second BFD packet, and send the second BFD packet to a target node that sends the first BFD packet, so that when the target node does not receive the second BFD packet for a preset time, it is determined that the target path fails.
In the present disclosure, the description of the detection module 72 may refer to the detailed description of step S32 and step S33 shown in fig. 3.
Optionally, in the present disclosure, the link failure detection apparatus 70 may further include a first determining module 73, a second determining module 74, and a session establishing module 75.
The first determining module 73 is configured to determine a first intersection node through which the primary path and the backup path reaching the destination node pass.
In the present disclosure, the description about the first determining module 73 may refer to the detailed description of step S41 shown in fig. 4, that is, step S41 may be performed by the first determining module 73.
Optionally, the first determination module 73 may include a first calculation sub-module 731, a second calculation sub-module 732, and a comparison sub-module 733.
The first calculating submodule 731 is configured to calculate nodes included in a primary path to a destination node, and sequentially store each calculated node to form a first path list.
Optionally, the first calculating sub-module 731 may be specifically configured to calculate, according to the link state information stored in the LSDB of the routing node, a node included in the active path through an SPF algorithm.
The second calculating sub-module 732 is configured to calculate nodes included in the backup path to the destination node, and sequentially store the calculated nodes to form a second path list.
Optionally, the second calculating sub-module 732 may be specifically configured to calculate, according to the link state information stored in the LSDB, a node included in the backup path through an LFA algorithm.
The comparison sub-module 733 is configured to sequentially compare each node in the first path list with each node in the second path list according to an arrangement order, and use a first same node as the first intersection node. The second determining module 74 is configured to determine an address of an ingress interface on the first same node and an address of an egress interface on the routing device of the data forwarded from the active path.
In the present disclosure, the description about the second determining module 74 may refer to the detailed description of step S42 shown in fig. 4, that is, step S42 may be performed by the second determining module 74.
Optionally, the second determining module 74 may be specifically configured to search a previous node of the first intersection node on the active path, calculate an active next hop from the previous node to the first intersection node with the previous node as a root, and determine the active next hop as the address of the ingress interface.
The session establishing module 75 is configured to establish a multi-hop BFD session with the address of the egress interface as a source address and the address of the ingress interface as a destination address, and send a multi-hop BFD packet carrying the multi-hop BFD label to the first intersection node through the multi-hop BFD session.
In the present embodiment, the description of the session establishing module 75 may refer to the detailed description of step S43 shown in fig. 4, that is, step S43 may be executed by the detecting module 72.
In summary, the present disclosure provides a link failure detection method and apparatus, where a routing node in an IP networking receives a first BFD packet sent through a target path, and if the first BFD packet is a multi-hop BFD packet including a multi-hop BFD flag, determines whether an address of an interface receiving the first BFD packet is the same as an address of the first BFD packet. And if the target address and the source address of the first BFD message are the same, exchanging the target address and the source address of the first BFD message to obtain a second BFD message, and sending the second BFD message to a target node sending the first BFD message, so that the target node determines that the target path has a fault when the target node does not receive the second BFD message within a preset time. In this way, multi-hop BFD detection of the target path can be achieved.
The above description is intended only for the selection of embodiments of the present disclosure and is not intended to limit the scope of the present disclosure, which is susceptible to various modifications and changes by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.

Claims (8)

1. A link failure detection method is applied to a routing node in IP networking, and comprises the following steps:
receiving a first BFD message sent through a target path, and if the first BFD message is a multi-hop BFD message including a multi-hop BFD mark, judging whether the address of an interface receiving the first BFD message is the same as the target address of the first BFD message;
if the two BFD messages are the same, the destination address and the source address of the first BFD message are exchanged to obtain a second BFD message;
sending the second BFD message to a target node which sends the first BFD message, so that the target node determines that the target path has a fault when the target node does not receive the second BFD message within a preset time;
the method further comprises the following steps:
determining a first intersection node through which a main path and a backup path reaching a destination node pass;
determining an address of an ingress interface on the first rendezvous node and an address of an egress interface on the routing node for the data forwarded from the primary path;
and establishing a multi-hop BFD session with the address of the outgoing interface as a source address and the address of the incoming interface as a destination address, and sending a multi-hop BFD message carrying the multi-hop BFD mark to the first intersection node through the multi-hop BFD session.
2. The method of claim 1, wherein determining the first intersection node through which the primary path and the backup path to the destination node pass comprises:
calculating nodes included in a main path reaching the destination node, and sequentially storing each calculated node to form a first path list;
calculating nodes included in the backup path reaching the destination node, and sequentially storing each calculated node to form a second path list;
and sequentially comparing each node in the first path list with each node in the second path list according to the arrangement order, and taking the first same node as the first intersection node.
3. The link failure detection method of claim 2,
calculating nodes included in a main path reaching the destination node, including:
calculating the nodes included in the main path by a Shortest Path First (SPF) algorithm according to the link state information stored in a Link State Database (LSDB) of the routing node;
calculating nodes included in a backup path reaching the destination node, including:
and according to the link state information stored in the LSDB, calculating the nodes included by the backup path through a loop-free alternative LFA algorithm.
4. The method according to any of claims 1-3, wherein determining the address of an ingress interface of the data forwarded from the active path on the first intersection node comprises:
searching the last node of the first intersection node on the main path;
and taking the previous node as a root, calculating a main next hop from the previous node to the first intersection node, and determining the main next hop as the address of the incoming interface.
5. A link failure detection device applied to a routing node in an IP networking, the device comprising:
the receiving module is used for receiving a first BFD message sent through a target path, and if the first BFD message is a multi-hop BFD message comprising a multi-hop BFD mark, judging whether the address of an interface receiving the first BFD message is the same as the target address of the first BFD message;
the detection module is used for exchanging a destination address and a source address of the first BFD message when the address of an interface receiving the first BFD message is the same as the destination address of the first BFD message to obtain a second BFD message, and sending the second BFD message to a target node sending the first BFD message, so that when the target node does not receive the second BFD message within a preset time length, the target path is determined to have a fault;
the device further comprises:
the first determining module is used for determining a first intersection node through which a main path and a backup path reaching a destination node pass;
a second determining module, configured to determine an address of an ingress interface on the first intersection node and an address of an egress interface on the routing node of the data forwarded from the active path;
and the session establishing module is used for establishing a multi-hop BFD session with the address of the outgoing interface as a source address and the address of the incoming interface as a destination address, and sending a multi-hop BFD message carrying the multi-hop BFD mark to the first intersection node through the multi-hop BFD session.
6. The link failure detection apparatus of claim 5, wherein the first determination module comprises:
the first calculation submodule is used for calculating nodes included in the main path reaching the destination node and sequentially storing all the calculated nodes to form a first path list;
the second calculation submodule is used for calculating nodes included in the backup path reaching the destination node and sequentially storing each calculated node to form a second path list;
and the comparison submodule is used for sequentially comparing each node in the first path list with each node in the second path list according to the arrangement order, and taking the first same node as the first intersection node.
7. The link failure detection apparatus according to claim 6,
the first computation submodule is specifically configured to compute, according to link state information stored in a link state database LSDB of the routing node, a node included in the active path through a shortest path first SPF algorithm;
and the second calculation submodule is specifically configured to calculate, according to the link state information stored in the LSDB, a node included in the backup path by using a loop-free alternative LFA algorithm.
8. The link failure detection apparatus according to any one of claims 5 to 7, wherein the second determining module is specifically configured to search a previous node of the first intersection node on the active path, calculate an active next hop from the previous node to the first intersection node by using the previous node as a root, and determine the active next hop as the address of the ingress interface.
CN201810988568.7A 2018-08-28 2018-08-28 Link fault detection method and device Active CN108768796B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810988568.7A CN108768796B (en) 2018-08-28 2018-08-28 Link fault detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810988568.7A CN108768796B (en) 2018-08-28 2018-08-28 Link fault detection method and device

Publications (2)

Publication Number Publication Date
CN108768796A CN108768796A (en) 2018-11-06
CN108768796B true CN108768796B (en) 2020-08-14

Family

ID=63967493

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810988568.7A Active CN108768796B (en) 2018-08-28 2018-08-28 Link fault detection method and device

Country Status (1)

Country Link
CN (1) CN108768796B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109889441B (en) * 2019-03-21 2021-05-14 新华三技术有限公司 Data forwarding method and device
CN111131021B (en) * 2020-01-17 2023-04-07 新华三信息安全技术有限公司 Forwarding method and network equipment for Bidirectional Forwarding Detection (BFD) message
CN111654406B (en) * 2020-02-29 2022-08-30 新华三信息安全技术有限公司 Bidirectional forwarding detection method and device
CN112073226A (en) * 2020-08-26 2020-12-11 内蒙古智诚物联股份有限公司 IP network recovery method and device based on 5G technology
CN114650242A (en) * 2020-12-21 2022-06-21 华为技术有限公司 Path fault detection method, device, related equipment and storage medium
CN114500366B (en) * 2022-01-28 2023-05-30 武汉烽火技术服务有限公司 Method and device for preventing routing loop between main node and standby node
CN115225462B (en) * 2022-07-21 2024-02-02 北京天融信网络安全技术有限公司 Network fault diagnosis method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468286A (en) * 2014-12-31 2015-03-25 迈普通信技术股份有限公司 Method and system for detecting multi-hop link
CN104639433A (en) * 2015-01-07 2015-05-20 烽火通信科技股份有限公司 Echo message-based multi-hop detection implementation method
CN106161246A (en) * 2016-06-15 2016-11-23 杭州华三通信技术有限公司 The implementation method of alternate routing and device
CN106209517A (en) * 2016-07-22 2016-12-07 安徽皖通邮电股份有限公司 A kind of method realizing multi-hop BFD single armed echo function
CN107547383A (en) * 2017-07-26 2018-01-05 新华三技术有限公司 Path detection method and device
CN107659448A (en) * 2017-09-27 2018-02-02 新华三技术有限公司 A kind of multi-hop detection method and device based on echo messages

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11032197B2 (en) * 2016-09-15 2021-06-08 Cisco Technology, Inc. Reroute detection in segment routing data plane

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468286A (en) * 2014-12-31 2015-03-25 迈普通信技术股份有限公司 Method and system for detecting multi-hop link
CN104639433A (en) * 2015-01-07 2015-05-20 烽火通信科技股份有限公司 Echo message-based multi-hop detection implementation method
CN106161246A (en) * 2016-06-15 2016-11-23 杭州华三通信技术有限公司 The implementation method of alternate routing and device
CN106209517A (en) * 2016-07-22 2016-12-07 安徽皖通邮电股份有限公司 A kind of method realizing multi-hop BFD single armed echo function
CN107547383A (en) * 2017-07-26 2018-01-05 新华三技术有限公司 Path detection method and device
CN107659448A (en) * 2017-09-27 2018-02-02 新华三技术有限公司 A kind of multi-hop detection method and device based on echo messages

Also Published As

Publication number Publication date
CN108768796A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
CN108768796B (en) Link fault detection method and device
CN107409093B (en) Automatic optimal route reflector root address assignment and fast failover for route reflector clients in a network environment
CN102598599B (en) RSVP-TE graceful restart under fast re-route conditions
US9264322B2 (en) Method and apparatus for handling network resource failures in a router
US7813265B2 (en) Backup BGP paths for non-multipath BGP fast convergence
US8004967B2 (en) Ring network routing method and ring network node
US8842522B2 (en) Incremental deployment of MRT based IPFRR
US7957306B2 (en) Providing reachability information in a routing domain of an external destination address in a data communications network
US20210203562A1 (en) System and method to recover from link or node failure in a network
US8055791B2 (en) Protecting connection traffic using filters
US8780696B2 (en) System and method of implementing lightweight not-via IP fast reroutes in a telecommunications network
US8165121B1 (en) Fast computation of loop free alternate next hops
US8456982B2 (en) System and method for fast network restoration
US9853854B1 (en) Node-protection and path attribute collection with remote loop free alternates
US20100085972A1 (en) Method and routing device for advertising routing information
US9923803B2 (en) Method of routing and a device for an autonomous system
CN102594657B (en) A kind of route iteration method and route exchange device
US20120124238A1 (en) Prioritization of routing information updates
US20230116548A1 (en) Route Processing Method and Related Device
CN113615132A (en) Fast flooding topology protection
CN108768850B (en) Routing information processing method and device
EP4020927A1 (en) Packet forwarding on non-coherent paths
US10735252B2 (en) Outside router fault detection
US9143399B2 (en) Minimizing the number of not-via addresses
US11870684B2 (en) Micro-loop avoidance in networks

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