CN109120449B - Method and device for detecting link failure - Google Patents

Method and device for detecting link failure Download PDF

Info

Publication number
CN109120449B
CN109120449B CN201810989819.3A CN201810989819A CN109120449B CN 109120449 B CN109120449 B CN 109120449B CN 201810989819 A CN201810989819 A CN 201810989819A CN 109120449 B CN109120449 B CN 109120449B
Authority
CN
China
Prior art keywords
tunnel
target
bfd
node
target tunnel
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
CN201810989819.3A
Other languages
Chinese (zh)
Other versions
CN109120449A (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
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201810989819.3A priority Critical patent/CN109120449B/en
Publication of CN109120449A publication Critical patent/CN109120449A/en
Application granted granted Critical
Publication of CN109120449B publication Critical patent/CN109120449B/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/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • 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
    • H04L43/0823Errors, e.g. transmission errors

Landscapes

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

Abstract

The embodiment of the application provides a link fault detection method and device, relates to the technical field of communication, and is used for solving the problem of service interruption caused by the adoption of the link fault detection method in the prior art. The scheme of the embodiment of the application comprises the following steps: the method comprises the steps that an ingress node carries out Bidirectional Forwarding Detection (BFD) on target tunnels in a target tunnel set, then if the target tunnels are determined to be in failure through the BFD, BFD is carried out on tunnels which are not carried out in the target tunnel set, and if the target tunnels are detected to be in failure through the BFD, the ingress node determines that a route between the ingress node and an egress node can be reached; and if all the tunnels of the target tunnel set are detected to be failed through BFD, the ingress node determines that the route between the ingress node and the egress node is unreachable.

Description

Method and device for detecting link failure
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for detecting a link failure.
Background
Multi-protocol Label Switching (MPLS) is a backbone network technology widely applied at present, and is a classification Forwarding technology, which can classify packets having the same characteristics (e.g., having the same destination address) into one Class, which is called Forwarding Equivalence Class (FEC), and packets having the same FEC can obtain the same processing in an MPLS network. Bidirectional Forwarding Detection (BFD) is a network protocol used to detect failures between two Forwarding points.
Currently, a Label Switched Path (LSP) tunnel in an MPLS network may be detected through a BFD protocol, and when multiple tunnels exist between an ingress node and an egress node of the MPLS network, if the ingress node detects a tunnel failure between the ingress node and the egress node, the ingress node notifies an upper layer protocol that a route between the ingress node and the egress node is not reachable, resulting in service interruption between the ingress node and the egress node.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for detecting a link failure, so as to solve a problem of service interruption caused by a method for detecting a link failure in the prior art. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for detecting a link failure, where the method is applied in a multi-protocol label switching MPLS network, and the method includes:
the method comprises the steps that an ingress node carries out Bidirectional Forwarding Detection (BFD) on target tunnels in a target tunnel set, wherein the target tunnel set is a set formed by tunnels which can be used by the same forwarding equivalence class FEC between the ingress node and an egress node;
if the access node determines that the target tunnel fails through BFD, performing BFD on a tunnel which is not subjected to BFD in the target tunnel set;
if a tunnel without fault exists in the target tunnel set through BFD detection, the ingress node determines that the route between the ingress node and the egress node is reachable;
and if the BFD detects that all the tunnels in the target tunnel set are failed, the ingress node determines that the route between the ingress node and the egress node is unreachable.
In one possible implementation, determining the target tunnel set includes:
the access node sends a loopback request message to the output node through a tunnel used by the same FEC between the access node and the output node;
the access node receives response messages sent by the access node through each tunnel;
and the access node determines the target tunnel set, wherein the target tunnel set comprises tunnels for transmitting the response messages received by the access node.
In one possible implementation, the method further includes:
the access node monitors whether the specified information of each tunnel in the target tunnel set meets a preset condition in real time;
if a problem tunnel which does not meet the preset condition is monitored, the access node sends a loopback request message to the exit node through the problem tunnel;
and if the access node does not receive a response message sent by the exit node through the problem tunnel within a first preset time, deleting the problem tunnel from the target tunnel set.
In a possible implementation manner, if the ingress node determines that the target tunnel fails through BFD, performing BFD on a tunnel that is not subjected to BFD in the target tunnel set includes:
if the access node determines that the target tunnel fails, judging whether a tunnel which is not subjected to BFD exists in the target tunnel set, wherein the target tunnel is a tunnel adopting a target protocol in the target tunnel set;
if the tunnel is not subjected to BFD in the target tunnel set, the access node serially performs BFD on the tunnels which are not subjected to BFD and adopt each protocol except the target protocol until a tunnel without fault is detected or the tunnel which is not subjected to BFD is determined to be absent in the target tunnel set.
In one possible implementation, the method further includes:
the access node sends a loopback request message to the output node through a tunnel which is not subjected to BFD in the target tunnel set;
the access node receives a response message sent by the egress node through the tunnel without BFD;
and the entry node deletes the tunnel which does not successfully transmit the response message within second preset time from the target tunnel set.
In a second aspect, an embodiment of the present application provides an apparatus for detecting a link failure, where the apparatus is applied in a multi-protocol label switching MPLS network, and the apparatus includes:
a detection module, configured to perform Bidirectional Forwarding Detection (BFD) on a target tunnel in a target tunnel set, where the target tunnel set is a set formed by tunnels between the apparatus and an egress node that can be used by the same forwarding equivalence class FEC; if the target tunnel fault is determined through BFD, performing BFD on a tunnel which is not subjected to BFD in the target tunnel set;
a determining module, configured to determine that a route between the device and the egress node is reachable if the detecting module detects, through BFD, that a tunnel without a failure exists in the target tunnel set; and if the detection module detects that all tunnels in the target tunnel set are failed through BFD, determining that the route between the device and the egress node is unreachable.
In one possible implementation, the apparatus further includes:
a sending module, configured to send a loopback request packet to the egress node through a tunnel used by the same FEC between the apparatus and the egress node;
a receiving module, configured to receive a response packet sent by the egress node through each tunnel;
the determining module is further configured to determine the target tunnel set, where the target tunnel set includes a tunnel for transmitting the response packet received by the access node.
In one possible implementation, the apparatus further includes: a deletion module;
the detection module is further used for monitoring whether the specified information of each tunnel in the target tunnel set meets a preset condition in real time;
the sending module is further configured to send a loopback request message to the egress node through the problem tunnel if the detection module monitors that the problem tunnel does not meet the preset condition;
the deleting module is configured to delete the problem tunnel from the target tunnel set if the receiving module does not receive a response packet sent by the egress node through the problem tunnel within a first preset time.
In a possible implementation manner, the detecting module is specifically configured to determine whether a tunnel that is not subjected to BFD exists in the target tunnel set if the determining module determines that the target tunnel is faulty, where the target tunnel is a tunnel that uses a target protocol in the target tunnel set; if the target tunnel set does not have the BFD, the tunnels of each protocol except the target protocol are adopted in the tunnels which do not have the BFD in the target tunnel set in a serial mode for BFD until a tunnel without a fault is detected or the tunnels which do not have the BFD in the target tunnel set are determined to be absent.
In a possible implementation manner, the sending module is further configured to send a loopback request packet to the egress node through a tunnel that is not BFD in the target tunnel set;
the receiving module is configured to receive a response packet sent by the egress node through the tunnel without BFD;
the deleting module is further configured to delete the tunnel in which the response packet is not successfully transmitted within the second preset time from the target tunnel set.
In a third aspect, an embodiment of the present application provides a router, where the router includes: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: the method of detecting a link failure in the first aspect is implemented.
In a fourth aspect, the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the method for detecting a link failure in the first aspect is implemented.
In a fifth aspect, embodiments of the present application further provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the method for detecting a link failure described in the first aspect.
By adopting the method and the device for detecting the link failure provided by the embodiment of the application, the ingress node can firstly detect the target tunnel in the target tunnel set through BFD, if the target tunnel fails, other tunnels in the target tunnel set can be continuously detected through BFD, only after all tunnels in the target tunnel set fail, the unreachable route between the ingress node and the egress node can be determined, and as long as the target tunnel set still has a tunnel without failure, the failure cannot be reported, and the reachable route between the ingress node and the egress node is still determined, so that the problem of service interruption caused by the fact that the communication between the ingress node and the egress node cannot be determined after one tunnel between the ingress node and the egress node fails is solved.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a diagram of a network architecture of MPLS according to an embodiment of the present application;
fig. 2 is an architecture diagram of another MPLS network according to an embodiment of the present application;
fig. 3 is a flowchart of a method for detecting a link failure according to an embodiment of the present application;
fig. 4 is a flowchart of another link failure detection method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a device for detecting a link failure according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a router according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As shown in fig. 1, an embodiment of the present application provides an MPLS network architecture diagram, where the network includes a Customer Edge device (CE) 1, a Provider Edge device (PE) 2, a PE3, a PE4, a PE5, and a CE 2.
PE2, PE3, and PE4 may be Label Switching Routers (LSRs). PE2 is an ingress node of the MPLS network, PE3 and PE5 are intermediate nodes of the MPLS network, and PE4 is an egress node of the MPLS network.
Multiple tunnels may exist on the link PE2-PE3-PE4, such as Label Distribution Protocol (LDP) LSP tunnel 1, Segment Routing based LSP tunnel (SRLSP) tunnel 2, and SRLSP tunnel 3 may exist on the link PE2-PE5-PE4, where SRLSP tunnel 3 may be a backup tunnel of SRLSP tunnel 2. Wherein, the messages transmitted by the LDP LSP tunnel 1, the SRLSP tunnel 2, and the SRLSP tunnel 3 belong to the same FEC.
Optionally, as shown in fig. 2, PE5 may not be included in the MPLS network architecture, that is, SRLSP tunnel 3 does not exist between the ingress node and the egress node. Illustratively, multiple tunnels, e.g., LDP LSP tunnel 1, SRLSP tunnel 2, may exist on the link PE2-PE3-PE 4. The tunnels shown in fig. 2 may be the same FEC-available tunnel.
It should be noted that fig. 1 and fig. 2 are only schematic diagrams of a simplified MPLS network, and the embodiments of the present application do not limit the number of types of devices in the MPLS network.
With the prior art scheme, taking the scenarios in fig. 1 and fig. 2 as an example, if a failure of SRLSP tunnel 2 between an ingress node and an egress node is detected, it is determined that the route between the ingress node and the egress node is not reachable, however, actually, at this time, LDP LSR tunnel 1 in fig. 1 and backup SRLSP tunnel 3 of SRLSP tunnel 2 are still available, and LDP LSR tunnel 1 in fig. 2 is still available, which may cause the traffic transmitted by LDP LSR tunnel 1 and SRLSP tunnel 3 in fig. 1 and LDP LSR tunnel 1 in fig. 2 to be also interrupted.
In order to solve the above problem, an embodiment of the present application provides a method for detecting a link failure, where an ingress node performs BFD on a target tunnel in a target tunnel set, and if a target tunnel failure is detected, the method does not report the link failure temporarily, but continues to detect whether other tunnels in the target tunnel set have a failure, and only when it is determined that all tunnels in the target tunnel set have a failure, it is determined that a route between the ingress node and an egress node is unreachable, and as long as a tunnel without a failure exists in the target tunnel set, it is considered that a route between the ingress node and the egress node is reachable, so that a situation of service interruption is avoided when an available tunnel exists.
Based on the MPLS network shown in fig. 2, an embodiment of the present application provides a method for detecting a link failure, as shown in fig. 3, the method includes:
s301, the ingress node performs BFD on the target tunnels in the target tunnel set.
And the target tunnel is a tunnel adopting a target protocol in the target tunnel set. The target tunnel set is a set composed of tunnels with the same ingress node and the same egress node in the MPLS network, which can be used by the same FEC. Illustratively, LDP LSP tunnel 1 and SRLSP tunnel 2 in fig. 2 may constitute one target tunnel set. The target tunnel may be an LDP LSP tunnel 1 or an SRLSP tunnel 2.
The method for the target tunnel to be BFD by the ingress node is that a BFD session is established between the ingress node and the egress node, and whether the route between the ingress node and the egress node is reachable or not is detected through the BFD session. Taking the LDP LSP tunnel as an example, one possible detection method is that an ingress node presses an LDP LSP tunnel label into a BFD control message, then sends a BFD control message to an egress node through the LDP LSP tunnel, after the egress node receives the BFD control message, the ingress node replies a BFD control message carrying the LDP LSP tunnel label to the ingress node through the LDP LSP tunnel, and then the ingress node determines whether the LDP LSP tunnel is faulty according to the received BFD control message, or determines whether the LDP LSP tunnel is faulty according to whether the BFD control message carrying the LDP LSP tunnel label is received within a preset time.
S302, if the access node determines that the target tunnel fails through BFD, performing BFD on the tunnel which is not subjected to BFD in the target tunnel set.
It can be understood that, under the condition of a failure of the target tunnel, there may be other available tunnels in the target tunnel set, so that a BFD failure between the ingress node and the egress node is not reported at this time, and other tunnels in the target tunnel set may be continuously detected by BFD.
Exemplarily, in fig. 2, if the ingress node detects that the LDP LSP tunnel 1 fails, it does not report the failure for the time being, and continues to detect whether the SRLSP tunnel 2 fails through BFD. For another example, if the ingress node detects that the LDP LSP tunnel 1 fails, and then detects the SRLSP tunnel 2, and if there is a tunnel 3 other than the LDP LSP tunnel and the SRLSP tunnel in the target tunnel set at this time, it continues to detect whether the tunnel 3 fails through BFD.
Optionally, if two tunnels using the same protocol exist in the target tunnel set, the ingress node may perform BFD on the two tunnels using the same protocol at the same time.
S303, if the target tunnel set is detected to have a tunnel without fault through BFD, the ingress node determines that the route between the ingress node and the egress node is reachable.
Each tunnel in the target tunnel set can be used by the same FEC, that is, after one tunnel fails, data can be transmitted by other available tunnels, so as long as a tunnel without failure still exists in the target tunnel set, the route between the ingress node and the egress node can be considered to be reachable, and service interruption caused by data transmission between the ingress node and the egress node after reporting the failure is avoided.
S304, if all the tunnels in the target tunnel set are detected to be failed through BFD, the ingress node determines that the route between the ingress node and the egress node is unreachable.
By adopting the method for detecting the link failure provided by the embodiment of the application, the ingress node can firstly detect the target tunnel in the target tunnel set through BFD, if the target tunnel fails, other tunnels in the target tunnel set can be continuously detected through BFD, only after all tunnels in the target tunnel set fail, the unreachable route between the ingress node and the egress node can be determined, and as long as the target tunnel set still has a tunnel without failure, the failure cannot be reported, the reachable route between the ingress node and the egress node is still determined, and the problem of service interruption caused by the fact that the communication between the ingress node and the egress node cannot be determined after the failure of one tunnel between the ingress node and the egress node is detected is solved.
On the basis of the embodiment corresponding to fig. 3, the following describes in detail a method for detecting a link failure according to the embodiment, with reference to a specific embodiment, as shown in fig. 4, the method includes:
s401, the ingress node sends a loopback request message to the egress node through a tunnel used by the same FEC between the ingress node and the egress node.
The tunnels between the ingress node and the egress node that can be used by the same FEC may be LDP LSP tunnel 1 and SRLSP tunnel 2 in fig. 2.
Optionally, the loopback request message may be an MPLS echo request message, and the ingress node may send the MPLS echo request message to the egress node through each tunnel, so as to preliminarily detect the availability of each LSP tunnel, for example, the ingress node may send the MPLS echo request message through the LDP LSP tunnel 1 and the SRLSP tunnel 2 in fig. 2, and correspondingly, the egress node may also receive the MPLS echo request message from the ingress node through the LDP LSP tunnel 1 and the SRLSP tunnel 2, respectively.
It can be understood that the MPLS echo request packet sent by the ingress node to the egress node through the LDP LSP tunnel carries an LDP LSP tunnel label, and the MPLS echo request packet sent by the ingress node to the egress node through the SRLSP tunnel carries an SRLSP tunnel label.
S402, the ingress node receives response messages sent by the egress node through each tunnel.
Optionally, the response packet may be an MPLS Echo Reply packet, and if all tunnels available for the same FEC between the ingress node and the egress node are available, the ingress node may receive the MPLS Echo Reply packet through each tunnel, and if there is an unavailable tunnel, the unavailable tunnel may not transmit the MPLS Echo Reply packet to the ingress node.
It can be understood that the MPLS Echo Reply message sent by the ingress node to the egress node through the LDP LSP tunnel carries the LDP LSP tunnel label, and the MPLS Echo Reply message sent by the ingress node to the egress node through the SRLSP tunnel carries the SRLSP tunnel label.
S403, the access node determines a target tunnel set.
The target tunnel set comprises tunnels for transmitting response messages received by the access node.
For example, if the ingress node receives the MPLS Echo Reply packet through the LDP LSP tunnel 1 and the SRLSP tunnel 2 in fig. 2, it indicates that both the LDP LSP tunnel 1 and the SRLSP tunnel 2 are available, and the target tunnel set includes the two tunnels. If the ingress node receives the MPLS Echo Reply message only through the LDP LSP tunnel 1 and does not receive the MPLS Echo Reply message through the SRLSP tunnel 2, it indicates that the SRLSP tunnel 2 is not available, and the target tunnel set does not include the SRLSP tunnel 2.
It should be noted that the tunnels in the target tunnel set are available tunnels determined through preliminary detection, and the application needs to further perform BFD on these tunnels, and the ingress node may store information of the tunnels in the target tunnel set in a table form, and use each tunnel in the table as one BFD available entry.
Optionally, after the target tunnel set is determined, each tunnel in the available tunnels may also be maintained in real time, and the specific method includes: the method comprises the steps that an access node monitors whether specified information of each tunnel in a target tunnel set meets a preset condition or not in real time, if a problem tunnel which does not meet the preset condition is monitored, the access node sends a return request message to an exit node through the problem tunnel, and if the access node does not receive a response message sent by the exit node through the problem tunnel within a first preset time, the problem tunnel is deleted from the target tunnel set; if the access node receives a response message sent by the output node through the problem tunnel within the preset time, the problem tunnel can be determined to be available, and the tunnel is still kept in the target tunnel set.
The specific information of each tunnel in the target tunnel set may be configurable, for example, the specific information may be neighbor information, and the preset condition is that the neighbor tunnel has no failure. For example, for tunnel 1 in the target tunnel set, if the access node detects that the neighbor tunnel of tunnel 1 is failed, tunnel 1 may be temporarily used as a problem tunnel, and an MPLS Echo request message carrying a tunnel 1 label is sent to the egress node through tunnel 1, if the access node receives an MPLS Echo Reply message carrying a tunnel 1 label sent by the egress node, tunnel 1 is considered not to be a problem tunnel, and if the access node does not receive an MPLS Echo Reply message carrying a tunnel 1 label sent by the egress node within a preset time, tunnel 1 is deleted from the target tunnel set.
As an optional implementation manner, the ingress node may send a request to send message to the egress node through a tunnel that is not subject to BFD in the target tunnel set at intervals, then receive a response message sent by the egress node through a tunnel that is not subject to BFD, and delete a tunnel that is not subject to successful transmission of the response message within a second preset time from the target tunnel set, so as to implement real-time maintenance on the target tunnel set.
S404, the ingress node performs BFD on the target tunnels in the target tunnel set.
The step is the same as S401, and reference may be made to the related description in S401, which is not repeated herein.
It should be noted that if the ingress node determines that the target tunnel has no failure through BFD, S408 is executed, otherwise S405 is executed.
S405, if the access node determines that the target tunnel fails through BFD, judging whether a tunnel which is not subjected to BFD exists in the target tunnel set.
If not, go to step S406; if so, then S407 is executed.
As a possible implementation manner, if the ingress node determines that the target tunnel fails through BFD, a loopback request message may be sent to the egress node through the tunnels without BFD in the target tunnel set, and then the ingress node receives the response message through the tunnels without BFD, deletes the tunnels which have not successfully transmitted the response message within the second preset time from the target tunnel set, and then determines whether the tunnels without BFD exist in the target tunnel set at this time.
For example, assuming that there are tunnels 1 to 4 in the target tunnel set, the ingress node determines that tunnel 1 has a fault through BFD, and at this time, the ingress node sends MPLS Echo request messages to the egress node through tunnels 2 to 4, and subsequently, within a preset time, the ingress node receives MPLS Echo Reply messages carrying labels of tunnels 2 and MPLS Echo Reply messages carrying labels of tunnels 3, and does not receive MPLS Echo Reply messages carrying labels of tunnels 4, and deletes tunnels 4 from the target tunnel set. At this time, there are tunnels 1 to 3 in the target tunnel set, and since tunnels 2 and 3 have not been BFD yet, the ingress node may determine that there is a tunnel that has not been BFD in the target tunnel set.
S406, the ingress node determines that the route between the ingress node and the egress node is not reachable.
If the target tunnel fails and no tunnel without BFD exists in the target tunnel set, it indicates that all tunnels in the target tunnel set have failed through detection, and at this time, service data cannot be transmitted between the ingress node and the egress node, so that the ingress node can determine that a link between the ingress node and the egress node is unreachable, and report to an upper-layer protocol that a BFD failure occurs between the ingress node and the egress node.
S407, the access node reselects a tunnel adopting one protocol except the target protocol from the tunnels which are not subjected to BFD in the target tunnel set as the target tunnel, and the BFD is performed on the target tunnel.
Optionally, the method of performing BFD on the new target tunnel is the same as the processing method in S404 described above.
In this step, if the target tunnel is detected to be failure-free by BFD, S408 is executed, otherwise, S405 is returned to.
S408, if the ingress node determines that the target tunnel has no fault through BFD, determining that the route between the ingress node and the egress node is reachable.
By adopting the method provided by the embodiment of the application, one tunnel can be selected from the target tunnel set as the target tunnel, the target tunnel is detected through BFD, the phenomenon that the BFD is carried out on all tunnels in the target tunnel set at the same time to cause excessive resource occupation is avoided, and before the tunnels are detected through the BFD, the tunnels in the target tunnel set can be screened through the local detection of the access node, and then the BFD can be carried out on the available tunnels through the primary detection, so that the faultless tunnels can be detected through the BFD more quickly, the service transmitted by the faulted tunnels is ensured to be taken over in time, and the service interruption is avoided as far as possible.
Corresponding to the foregoing method embodiment, an embodiment of the present application further provides a device for detecting a link failure, where as shown in fig. 5, the device is applied in a multi-protocol label switching MPLS network, and may specifically be an access node in the MPLS network, and the device includes: a detection module 501 and a determination module 502.
A detection module 501, configured to perform Bidirectional Forwarding Detection (BFD) on a target tunnel in a target tunnel set, where the target tunnel set is a set formed by tunnels between the apparatus and an egress node that can be used by the same forwarding equivalence class FEC; if the target tunnel fault is determined through BFD, carrying out BFD on the tunnel which is not subjected to BFD in the target tunnel set;
a determining module 502, configured to determine that a route between the apparatus and the egress node is reachable if the detecting module 501 detects, through BFD, that a tunnel without a failure exists in the target tunnel set; and if the detection module detects that all tunnels in the target tunnel set are failed through BFD, determining that the route between the device and the egress node is unreachable.
In one possible implementation, the apparatus further includes: a sending module 503 and a receiving module 504.
A sending module 503, configured to send a loopback request packet to the egress node through a tunnel used by the same FEC between the apparatus and the egress node;
a receiving module 504, configured to receive a response packet sent by an egress node through each tunnel;
the determining module 502 is further configured to determine a target tunnel set, where the target tunnel set includes a tunnel for transmitting the response packet received by the access node.
Optionally, the apparatus further comprises: a deletion module 505;
the detection module 501 is further configured to monitor whether the specified information of each tunnel in the target tunnel set meets a preset condition in real time;
the sending module 503 is further configured to send a loopback request message to the egress node through the problem tunnel if the detection module 501 detects that the problem tunnel does not meet the preset condition;
a deleting module 505, configured to delete the problem tunnel from the target tunnel set if the receiving module 504 does not receive the response packet sent by the egress node through the problem tunnel within the first preset time.
In a possible implementation manner, the detecting module 501 is specifically configured to, if the determining module 502 determines that the target tunnel fails, determine whether a tunnel that is not subjected to BFD exists in the target tunnel set, where the target tunnel is a tunnel that uses a target protocol in the target tunnel set; if the tunnel is not subjected to BFD in the target tunnel set, the tunnels adopting each protocol except the target protocol are subjected to BFD in series until a fault-free tunnel is detected or the tunnel which is not subjected to BFD is determined to be absent in the target tunnel set.
In a possible implementation manner, the sending module 503 is further configured to send a loopback request message to the egress node through a tunnel that is not BFD in the target tunnel set;
a receiving module 504, configured to receive a response packet sent by an egress node through a tunnel that is not configured with BFD;
the deleting module 505 is further configured to delete the tunnel in which the response packet is not successfully transmitted within the second preset time from the target tunnel set.
The embodiment of the present application further provides a router, which may specifically be an LSR, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete communication with each other through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the steps executed by the access node in the above method embodiment when executing the program stored in the memory 603.
The communication bus mentioned in the router may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the router and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above-mentioned link failure detection methods.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the method for detecting a link failure of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (8)

1. A method for detecting link failure is applied to a multi-protocol label switching (MPLS) network, and comprises the following steps:
the method comprises the steps that an ingress node carries out Bidirectional Forwarding Detection (BFD) on target tunnels in a target tunnel set, wherein the target tunnel set is a set formed by tunnels which can be used by the same forwarding equivalence class FEC between the ingress node and an egress node;
if the access node determines that the target tunnel fails through BFD, performing BFD on a tunnel which is not subjected to BFD in the target tunnel set;
if a tunnel without fault exists in the target tunnel set through BFD detection, the ingress node determines that the route between the ingress node and the egress node is reachable;
if all tunnels in the target tunnel set are detected to be failed through BFD, the ingress node determines that the route between the ingress node and the egress node is unreachable;
if the access node determines that the target tunnel fails through BFD, performing BFD on a tunnel which is not subjected to BFD in the target tunnel set, including:
if the access node determines that the target tunnel fails, judging whether a tunnel which is not subjected to BFD exists in the target tunnel set, wherein the target tunnel is a tunnel adopting a target protocol in the target tunnel set;
if the target tunnel set does not have the BFD, the access node serially carries out BFD on tunnels which do not carry out BFD and adopt each protocol except the target protocol in the tunnels of the target tunnel set until a tunnel without a fault is detected or the tunnels which do not carry out BFD do not exist in the target tunnel set;
acquiring the target tunnel set comprises:
the access node sends a loopback request message to the output node through a tunnel used by the same FEC between the access node and the output node;
the access node receives response messages sent by the access node through each tunnel;
and the access node determines the target tunnel set, wherein the target tunnel set comprises tunnels for transmitting the response messages received by the access node.
2. The method of claim 1, further comprising:
the access node monitors whether the specified information of each tunnel in the target tunnel set meets a preset condition in real time;
if a problem tunnel which does not meet the preset condition is monitored, the access node sends a loopback request message to the exit node through the problem tunnel;
and if the access node does not receive a response message sent by the exit node through the problem tunnel within a first preset time, deleting the problem tunnel from the target tunnel set.
3. The method of claim 1, further comprising:
the access node sends a loopback request message to the output node through a tunnel which is not subjected to BFD in the target tunnel set;
the access node receives a response message sent by the egress node through the tunnel without BFD;
and the entry node deletes the tunnel which does not successfully transmit the response message within second preset time from the target tunnel set.
4. An apparatus for detecting link failure, wherein the apparatus is applied in a multi-protocol label switching MPLS network, and the apparatus comprises:
a detection module, configured to perform Bidirectional Forwarding Detection (BFD) on a target tunnel in a target tunnel set, where the target tunnel set is a set formed by tunnels between the apparatus and an egress node that can be used by the same forwarding equivalence class FEC; if the target tunnel fault is determined through BFD, performing BFD on a tunnel which is not subjected to BFD in the target tunnel set;
a determining module, configured to determine that a route between the device and the egress node is reachable if the detecting module detects, through BFD, that a tunnel without a failure exists in the target tunnel set; if the detection module detects that all tunnels in the target tunnel set are failed through BFD, determining that the route between the device and the egress node is unreachable;
the detection module is specifically configured to, if the determination module determines that the target tunnel is faulty, determine whether a tunnel which is not subjected to BFD exists in the target tunnel set, where the target tunnel is a tunnel in which a target protocol is adopted in the target tunnel set; if the target tunnel set does not have the BFD, serially performing BFD on tunnels which do not perform BFD and adopt each protocol except the target protocol in the tunnels in the target tunnel set until a fault-free tunnel is detected or it is determined that no tunnels which do not perform BFD exist in the target tunnel set;
the device further comprises:
a sending module, configured to send a loopback request packet to the egress node through a tunnel used by the same FEC between the apparatus and the egress node;
a receiving module, configured to receive a response packet sent by the egress node through each tunnel;
the determining module is further configured to determine the target tunnel set, where the target tunnel set includes a tunnel for transmitting a response packet received by an access node.
5. The apparatus of claim 4, further comprising: a deletion module;
the detection module is further used for monitoring whether the specified information of each tunnel in the target tunnel set meets a preset condition in real time;
the sending module is further configured to send a loopback request message to the egress node through the problem tunnel if the detection module monitors that the problem tunnel does not meet the preset condition;
the deleting module is configured to delete the problem tunnel from the target tunnel set if the receiving module does not receive a response packet sent by the egress node through the problem tunnel within a first preset time.
6. The apparatus of claim 4, further comprising: a deletion module;
the sending module is further configured to send a loopback request message to the egress node through a tunnel which is not subjected to BFD in the target tunnel set;
the receiving module is configured to receive a response packet sent by the egress node through the tunnel without BFD;
the deleting module is further configured to delete the tunnel in which the response packet is not successfully transmitted within the second preset time from the target tunnel set.
7. A router comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: carrying out the method steps of any one of claims 1 to 3.
8. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: carrying out the method steps of any one of claims 1 to 3.
CN201810989819.3A 2018-08-28 2018-08-28 Method and device for detecting link failure Active CN109120449B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810989819.3A CN109120449B (en) 2018-08-28 2018-08-28 Method and device for detecting link failure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810989819.3A CN109120449B (en) 2018-08-28 2018-08-28 Method and device for detecting link failure

Publications (2)

Publication Number Publication Date
CN109120449A CN109120449A (en) 2019-01-01
CN109120449B true CN109120449B (en) 2022-04-22

Family

ID=64860406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810989819.3A Active CN109120449B (en) 2018-08-28 2018-08-28 Method and device for detecting link failure

Country Status (1)

Country Link
CN (1) CN109120449B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109787869B (en) * 2019-03-29 2020-11-06 新华三技术有限公司 Path fault detection method and device
CN113315701A (en) * 2020-02-27 2021-08-27 中兴通讯股份有限公司 Path detection method, electronic device and storage medium
CN113472642B (en) * 2021-06-10 2023-06-13 新华三信息安全技术有限公司 Protection switching method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136957B (en) * 2010-01-25 2014-03-12 华为技术有限公司 Label switched path monitoring realization method, device and system
CN101848155A (en) * 2010-05-12 2010-09-29 北京星网锐捷网络技术有限公司 Detection method of label switching path and label switching router
CN102437955B (en) * 2011-12-16 2016-05-04 杭州华三通信技术有限公司 A kind of LSP guard method and equipment
CN102769552B (en) * 2012-07-31 2016-06-08 杭州华三通信技术有限公司 A kind of method by transmission BFD message during BFD detection LSP and equipment
CN106549819B (en) * 2015-09-22 2019-12-17 华为技术有限公司 connectivity detection method, controller and equipment
CN106789438A (en) * 2016-12-29 2017-05-31 杭州迪普科技股份有限公司 A kind of device connectivity detection method and device
CN106878113B (en) * 2017-04-12 2020-04-03 杭州迪普科技股份有限公司 Link connectivity detection method and device

Also Published As

Publication number Publication date
CN109120449A (en) 2019-01-01

Similar Documents

Publication Publication Date Title
EP1817855B1 (en) System and methods for detecting network failure
US7995574B2 (en) Detection of forwarding problems for external prefixes
US9294369B2 (en) Method and device for processing location information of fault point
WO2021128977A1 (en) Fault diagnosis method and apparatus
CN109120449B (en) Method and device for detecting link failure
CN110011839B (en) Message forwarding method and device, SPE (solid phase extraction) and storage medium
CN109474495B (en) Tunnel detection method and device
CN109889441B (en) Data forwarding method and device
JP2015508631A (en) Redundant network connection
US20210092055A1 (en) Network communication method and apparatus
WO2008148334A1 (en) Method, system and apparatus thereof for detecting abnormal receipt of message
CN109150761B (en) Tunnel switching method and device
CN109088822B (en) Data flow forwarding method, device, system, computer equipment and storage medium
CN112737871A (en) Link fault detection method and device, computer equipment and storage medium
CN108235800B (en) Network fault detection method, control center equipment and computer storage medium
CN108259325B (en) Route maintenance method and route equipment
CN109995651B (en) Pseudo wire establishing method and device
CN113904972B (en) Path detection method and device, controller and PE (polyethylene) equipment
CN113872860B (en) Path switching method and device
CN108141406B (en) Method, device and equipment for processing service fault
CN110611620B (en) Link updating method and device
CN113872843B (en) Route generation method, route processing method and device
CN112637054B (en) Networking optimization method and device for IP bearing network, computing equipment and storage medium
CN109218199B (en) Message processing method and device
CN111901181A (en) Processing method for error rate detection and related equipment

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