WO2021143524A1 - Fault detection method, and apparatus - Google Patents

Fault detection method, and apparatus Download PDF

Info

Publication number
WO2021143524A1
WO2021143524A1 PCT/CN2020/141140 CN2020141140W WO2021143524A1 WO 2021143524 A1 WO2021143524 A1 WO 2021143524A1 CN 2020141140 W CN2020141140 W CN 2020141140W WO 2021143524 A1 WO2021143524 A1 WO 2021143524A1
Authority
WO
WIPO (PCT)
Prior art keywords
lsp
network device
bfd
packet
message
Prior art date
Application number
PCT/CN2020/141140
Other languages
French (fr)
Chinese (zh)
Inventor
侯大威
邓建玺
李帅
王彬
王明谱
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021143524A1 publication Critical patent/WO2021143524A1/en

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/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • 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/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]

Definitions

  • This application relates to the field of communication technology, and in particular to a fault detection method and device used in the label switching path (English: Control Route Label Switched Path, abbreviation: Control Route Label Switched Path, abbreviation: In the CR-LSP scenario, a bidirectional link detection (English: Bidirectional Forwarding Detection, referred to as BFD) mechanism is used to detect whether there is a fault on the LSP.
  • a bidirectional link detection English: Bidirectional Forwarding Detection, referred to as BFD
  • the tunnel may include multiple CR-LSPs from a source node (English: Ingress) to a destination node (English: Egress).
  • BFD a mechanism that can quickly perform end-to-end detection, is usually used to detect whether the CR-LSP is faulty.
  • the process of detecting CR-LSP in the BFD mechanism includes: Ingress sends forward detection packets to Egress through LSP, and requires Egress to feed back reverse detection packets to Ingress, so as to determine whether the LSP is faulty. Since the LSP is a one-way path, the reverse detection message can only be determined by the Internet Protocol (English: Internet Protocol, referred to as: IP) routing method to determine its transmission path, and the IP path determined by the IP routing method is probably not After each label switching node in the LSP (English: Label Switching Router, LSR for short), that is, the forward detection packet and the reverse detection packet do not share the same path. In this way, the detection result reflects the determination of the LSP and the IP routing method The overall failure of the IP path cannot accurately reflect whether the LSP fails.
  • IP Internet Protocol
  • the embodiments of the present application provide a fault detection method and device.
  • a reverse LSP co-path with the LSP to be detected on the destination node side the bidirectionality of the BFD mechanism and the conflict of the unidirectional LSP are overcome, and optimization is achieved.
  • the BFD mechanism can perform more accurate fault detection on LSPs.
  • the embodiments of the present application provide a fault detection method, which is applied to the first network device of the first LSP to be detected in the CR-LSP scenario (that is, the destination node of the first LSP).
  • the fault detection process can be It includes: the second network device (ie, the source node of the first LSP) sends a first packet to the first network device via the first LSP, wherein the first packet carries path information of the first LSP, and
  • the first LSP includes multiple LSRs arranged in sequence; then, after the first network device receives the first message, it can establish a second LSP from the first network device to the second network device according to the path information.
  • the LSRs included in the two LSPs are the same as the LSRs included in the first LSP, and the sequence of multiple LSRs in the second LSP is opposite to the sequence of the multiple LSRs in the first LSP; based on this, the first network device is The first BFD packet may be fed back to the second network device via the second LSP that is in the reverse common path, so that the second network device can determine the failure condition of the first LSP based on the first BFD packet.
  • the source node informs the destination node of the path information of the LSP to be detected, and the destination node establishes an LSP that shares the reverse path with the LSP to be detected based on the path information, using the forward LSP and the established reverse LSP
  • the common path feature makes it possible to transmit forward BFD packets and reverse BFD packets in the same path in BFD detection.
  • the BFD detection result can accurately reflect the failure of the LSP to be detected, which overcomes the bidirectional and unidirectional BFD mechanism.
  • LSP conflicts that is, the current BFD detection of forward BFD packets and reverse BFD packets are likely to not share the same path, causing the detection result to fail to accurately reflect the problem of LSP failures, and achieve faster and more accurate fault detection for LSPs.
  • the first message may be, for example, an LSP-Ping message, specifically an LSP-Ping request message.
  • the path information of the first LSP may use the extended type length value (English: Type Length) in the LSP-Ping message. Value (abbreviated as: TLV) field carried.
  • the path information of the first LSP may be, for example, the IP address of each label switching node (English: Label Switched Router, LSR for short) through which the first LSP passes.
  • LSR Label Switched Router
  • the second network device can also send a second BFD packet to the first network device through the first LSP to meet the characteristics of the two-way detection of the BFD mechanism, and the first network device can also receive the second BFD packet according to whether it can receive the second BFD packet.
  • the second BFD packet sent by the network device via the first LSP determines the fault condition of the first LSP.
  • the embodiment of the present application may also determine at the first network device whether it has the ability to establish a second LSP, and inform the source node of the first LSP (ie, the second network device) of the capability. , So that the second network device determines its specific strategy for fault detection.
  • the first network device determines that it has the ability to establish a second LSP
  • the first network device can not only apply for and cooperate with the second network device to establish the second LSP, but also send the second LSP to the second network device.
  • a message the second message carries capability information, and the capability information is used to characterize that the first network device has the ability to establish a second LSP.
  • the second network device can determine that the BFD mechanism is used for fault detection, that is, based on the first LSP and the second LSP, the first network device and the second network device negotiate the configuration parameters of BFD; According to the configuration parameters, the second network device sends a BFD packet to the first network device via the first LSP.
  • the first network device After receiving the BFD packet via the first LSP, the first network device also sends the BFD packet based on the configuration parameters determined through negotiation. The second network device feeds back the response message.
  • the BFD mechanism provided by the embodiment of the present application can realize rapid and accurate fault detection of the first LSP.
  • the first network device determines that it does not have the ability to establish a second LSP
  • the first network device may not perform the process of applying and cooperating with the second network device to establish the second LSP, but may send the second packet to the second network device by way of IP routing, the capability information carried in the second packet, It is used to characterize that the first network device does not have the ability to establish a second LSP; or, after the first network device receives the first packet sent by the second network device through the first LSP to be detected, the second network device may not The first message is sent in response, and the second network device can also determine that the first network device does not have the ability to establish a second LSP when it does not get a response regarding the first message.
  • the second network device can choose not to use the BFD mechanism to perform fault detection on the first LSP, or, if it can tolerate the error in the detection result obtained by the current BFD mechanism to detect CR-LSP, it can also choose to use the current BFD mechanism to perform fault detection on the first LSP.
  • An LSP performs fault detection.
  • the method provided in the embodiments of the present application can allow the source node to perceive the ability of the destination node to establish the second LSP, so that the source node can configure its mechanism to detect the failure of the first LSP according to requirements, thereby achieving more flexibility for the first LSP Fault detection.
  • the embodiments of the present application also provide a fault detection method, which is applied to the second network device of the first LSP to be detected in the CR-LSP scenario (ie, the source node of the first LSP), and the process of fault detection It may include: the second network device sends a first packet to the first network device (that is, the destination node of the first LSP) through the first LSP to be detected, where the first packet carries path information of the first LSP ,
  • the first LSP includes a plurality of LSRs arranged in sequence; then, the second network device receives the first BFD packet sent by the first network device via the second LSP, where the second LSP is the second network device based on the received
  • the path information is established, the second LSP includes the multiple LSRs, and the sequence of the multiple LSRs in the second LSP is opposite to the sequence of the multiple LSRs in the first LSP; then, the second network The device can then determine the detection result of the first LSP based on the first BFD packet.
  • the source node informs the destination node of the path information of the LSP to be detected, and the destination node establishes an LSP that shares the reverse path with the LSP to be detected based on the path information, using the forward LSP and the established reverse LSP
  • the common path feature makes the forward BFD packets and the reverse BFD packets share the same path in the BFD detection.
  • the BFD detection results can accurately reflect the failure of the LSP to be detected, which overcomes the bidirectionality of the BFD mechanism and the conflict of unidirectional LSPs. That is, in the current BFD detection, the forward BFD packet and the reverse BFD packet are likely not to share the same path, resulting in the problem that the detection result cannot accurately reflect the LSP failure condition, and realizes the faster and more accurate failure detection of the LSP.
  • the first message may be, for example, an LSP-Ping message, specifically an LSP-Ping request message.
  • the path information of the first LSP may be carried by the extended TLV field in the LSP-Ping message.
  • the path information of the first LSP may be, for example, the IP addresses of each LSR passed by the first LSP.
  • the second network device sends the first packet carrying the path information of the first LSP, which is equivalent to providing the first network device with a basis for establishing a second LSP that shares the reverse path with the first LSP, so that the first network device It is possible to establish a second LSP.
  • the second network device can also send a second BFD packet to the first network device through the first LSP to meet the characteristics of the two-way detection of the BFD mechanism, and the first network device can also receive the second BFD packet according to whether it can receive the second BFD packet.
  • the second BFD packet sent by the network device via the first LSP determines the fault condition of the first LSP.
  • the embodiment of the present application may also determine at the first network device whether it has the ability to establish a second LSP, and inform the source node of the first LSP (ie, the second network device) of the capability. , So that the second network device can determine its specific strategy for fault detection.
  • the second network device can not only cooperate with the first network device to establish the second LSP, but also receive the second report sent by the first network device.
  • the second packet carries capability information, and the capability information is used to characterize that the first network device has the ability to establish a second LSP.
  • the second network device can determine that the BFD mechanism is used for fault detection, that is, based on the first LSP and the second LSP, the second network device and the first network device negotiate the BFD configuration parameters; and, based on all the negotiated parameters According to the configuration parameters, the second network device sends a BFD packet to the first network device via the first LSP.
  • the first network device After receiving the BFD packet via the first LSP, the first network device also sends the BFD packet based on the configuration parameters determined through negotiation. The second network device feeds back the response message.
  • the BFD mechanism provided by the embodiment of the present application can realize rapid and accurate fault detection of the first LSP.
  • the second network device can choose not to use the BFD mechanism to detect the failure of the first LSP, or, if the current BFD mechanism can tolerate the detection obtained by the CR-LSP If the result is incorrect, you can also choose to use the current BFD mechanism to perform fault detection on the first LSP.
  • the method provided in the embodiments of the present application can allow the source node to perceive the ability of the destination node to establish the second LSP, so that the source node can configure its mechanism to detect the failure of the first LSP according to requirements, thereby achieving more flexibility for the first LSP Fault detection.
  • the embodiment of the present application may further include: the second network device determines the detection result of the first LSP according to the response message.
  • the second network device determines that the first LSP is not faulty; on the contrary, if the second network device is sending the next BFD message If the response packet corresponding to the BFD packet is not received at the time of writing, it is determined that the first LSP is faulty.
  • a preset duration (for example, 10 milliseconds) can also be set, and the preset duration can be used to indicate the maximum time allowed to elapse between sending a BFD message and receiving its corresponding response message. Then, If the second network device receives the response message corresponding to the BFD message within the preset period of time, it is determined that the first LSP is not faulty; on the contrary, if the second network device has not received the BFD message for the preset period of time after sending it The response packet corresponding to the BFD packet determines that the first LSP is faulty.
  • the second network device may also switch the traffic carried by the first LSP to the backup LSP of the first LSP to ensure the normal transmission of traffic in the network; and
  • the second network device can also report an alarm message above, which is used to inform the control user that the first LSP has failed, so that the technicians can detect and repair it as soon as possible.
  • the second network device will restore the traffic from the backup. Switch back to the first LSP on the LSP.
  • CR-LSP management in MPLS TE tunnel so that traffic can be safely and reliably transmitted in the network.
  • the embodiments of the present application also provide a fault detection method, which is applied to the first network device (that is, the destination node of the first LSP) of the first LSP to be detected in the CR-LSP scenario, and the fault detection process It may include: the second network device (that is, the source node of the first LSP) sends a first packet to the first network device via the first LSP, where the first packet carries path information of the first LSP,
  • the first LSP includes a plurality of LSRs arranged in sequence; at this time, in one case, if the first network device determines that it has the ability to establish a reverse common path second LSP, it executes the establishment of the slave according to the received path information.
  • the second LSP from the second network device to the first network device, so as to subsequently perform BFD detection between the first network device and the second network device based on the first LSP and the second LSP.
  • the first network device determines that it does not have the ability to establish a reverse common path second LSP
  • the first network device can send a second message to the second network device through IP routing to inform the first network device
  • a network device does not have the ability to establish a second LSP, or the first network device does not reply.
  • the second network device does not receive a reply, it sends the first network device to the first network device every preset time period.
  • the source node can perceive the destination node to establish the reverse common-path LSP capability, so that the source node can decide the specific method to be used in subsequent failure detection, thereby enabling the failure detection of the LSP in the CR-LSP scenario More flexible.
  • the embodiments of the present application also provide a fault detection method, which is applied to the second network device of the first LSP to be detected in the CR-LSP scenario (ie, the source node of the first LSP), and the process of fault detection It may include: the second network device sends a first packet to the first network device (that is, the destination node of the first LSP) via the first LSP, where the first packet carries path information of the first LSP,
  • the first LSP includes a plurality of LSRs arranged in sequence; in this case, in one case, the second network device cooperates with the first network device to establish a reverse common-path second LSP, then the first network device and the second network Between devices, BFD detection is performed based on the first LSP and the second LSP.
  • the second network device receives the second packet sent by the first network device, it informs the first network device that it does not have the ability to establish a reverse common path second LSP, or the second network device is in advance. Assuming that no reply to the first message is received for the duration, then the first message is sent to the first network device every preset duration. When the number of consecutively sending the first message reaches the preset number of times, the first message is determined The network device does not have the ability to establish the second LSP; in this way, after the second network device determines that the first network device does not have the ability to establish the second LSP, it can choose to use the current BFD mechanism to detect the first LSP according to the actual detection needs of the user.
  • the failure condition of the LSP or the option to no longer use the BFD mechanism to perform failure detection on the first LSP. It can be seen that, in the embodiment of the present application, by allowing the source node to perceive the ability of the destination node to establish a reverse common-path LSP, the source node can decide the specific method to be used in subsequent failure detection, thereby achieving a more flexible response to the LSP in the CR-LSP scenario. Fault detection.
  • an embodiment of the present application also provides a first network device, which is applied to a label-switched path CR-LSP scenario of a constrained path.
  • the first network device includes a receiving unit, a sending unit, and a processing unit.
  • the receiving unit is configured to receive a first packet sent by the second network device through the first LSP to be detected, the first packet carries path information of the first LSP, and the source node of the first LSP is the first network device ,
  • the destination node of the first LSP is the second network device, and the first LSP includes a plurality of label switching node LSRs arranged in sequence.
  • the processing unit is configured to establish a second LSP from the first network device to the second network device according to the path information.
  • the second LSP includes multiple LSRs, and the sequence of the multiple LSRs in the second LSP is consistent with that of the multiple LSRs.
  • the sequence in the first LSP is reversed.
  • the sending unit is configured to send the first bidirectional link detection BFD packet to the second network device via the second LSP, so that the second network device determines the failure condition of the first LSP based on the first BFD packet.
  • the receiving unit in the first network device is further configured to receive the second BFD packet sent by the second network device via the first LSP.
  • the sending unit in the first network device is also used to send a second message to the second network device.
  • the second message carries capability information, and the capability information is used to characterize the capability of the first network device. The ability to establish a second LSP.
  • the processing unit in the first network device is further configured to, before sending the first bidirectional link detection BFD message to the second network device via the second LSP, based on the first LSP and the second The LSP negotiates BFD configuration parameters with the second network device; then, the sending unit is specifically configured to send the first BFD packet to the second network device via the second LSP based on the configuration parameters determined through the negotiation.
  • the first packet is an LSP-Ping packet
  • the path information is carried by the extended type length value TLV field in the LSP-Ping packet.
  • first network device provided by the fifth aspect is used to perform the related operations mentioned in the first aspect or the third aspect.
  • first aspect and the third aspect please refer to the first aspect and the third aspect. The relevant description of the three aspects will not be repeated here.
  • the embodiments of the present application also provide a second network device, which is applied to a label-switched path CR-LSP scenario of a constrained path.
  • the second network device includes a sending unit, a receiving unit, and a processing unit.
  • the sending unit is configured to send a first packet to the first network device via the first LSP to be detected, the first packet carrying path information of the first LSP, and the source node of the first LSP is the second network device ,
  • the destination node is the first network device, and the first LSP includes a plurality of label switching node LSRs arranged in sequence.
  • the receiving unit is configured to receive a first bidirectional link detection BFD message sent by the first network device via a second LSP, where the second LSP is established by the second network device based on path information, and the second LSP includes multiple LSRs, In addition, the sequence of the multiple LSRs in the second LSP is opposite to the sequence of the multiple LSRs in the first LSP.
  • the processing unit is configured to determine the detection result of the first LSP based on the first BFD packet.
  • the sending unit in the second network device is further configured to send the second BFD packet to the first network device via the first LSP.
  • the receiving unit in the second network device is also used to receive a second packet sent by the first network device, the second packet carries capability information, and the capability information is used to characterize the first network device Have the ability to establish a second LSP.
  • the processing unit in the second network device is further configured to, before receiving the first bidirectional link detection BFD message sent by the first network device via the second LSP, based on the first LSP and the first LSP
  • the second LSP negotiates BFD configuration parameters with the first network device; then, the receiving unit is specifically configured to: receive the first BFD message sent by the first network device via the second LSP based on the negotiated configuration parameters.
  • the processing unit in the second network device is further configured to switch the traffic carried on the first LSP to the third LSP if the detection result indicates that the first LSP is faulty.
  • the source node is the second network device, and the destination node of the third LSP is the first network device.
  • the first packet is an LSP-Ping packet
  • the path information is carried by the extended type length value TLV field in the LSP-Ping packet.
  • the second network device provided by the sixth aspect is used to perform the related operations mentioned in the second aspect or the fourth aspect.
  • the specific implementation and the achieved effects please refer to the second aspect and the first aspect. The description of the four aspects will not be repeated here.
  • an embodiment of the present application also provides a first network device, including: a memory and a processor.
  • the memory is used to store program codes or instructions;
  • the processor is used to run the program codes or instructions, so that the device executes the method provided in the first aspect or the third aspect.
  • an embodiment of the present application also provides a second network device, including: a memory and a processor.
  • the memory is used to store program codes or instructions;
  • the processor is used to run the program codes or instructions, so that the device executes the method provided in the above second or fourth aspect.
  • the embodiments of the present application also provide a network system.
  • the network system includes the first network device provided in the fifth aspect and the second network device provided in the sixth aspect; or, the network system may also include the seventh aspect Provide the first network device and the second network device provided in the eighth aspect.
  • the embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium stores program codes or instructions, which when run on a computer, cause the computer to execute the first and second aspects above. Aspect, the third aspect, or any one of the methods provided in the fourth aspect.
  • the embodiments of the present application also provide a computer program product.
  • the network device can execute the first aspect, the second aspect, the third aspect, or the fourth aspect.
  • the method provided in any one of the possible implementations.
  • FIG. 1 is a schematic diagram of a network system framework involved in an application scenario in an embodiment of this application;
  • Figure 2 is a signaling flow chart of a method for detecting LSP 1 in an embodiment of this application;
  • FIG. 3 is a signaling flowchart of another method for detecting LSP 1 in an embodiment of this application.
  • FIG. 4 is a signaling flowchart of a fault detection method 100 in an embodiment of the application
  • FIG. 5 is a schematic diagram of a format of a first message in an embodiment of this application.
  • FIG. 6a is a schematic diagram of the format of a TLV extended by a first message in an embodiment of this application.
  • FIG. 6b is a schematic diagram of the format of another TLV extended by the first message in an embodiment of this application.
  • FIG. 7 is a schematic structural diagram of a first network device 700 in an embodiment of this application.
  • FIG. 8 is a schematic structural diagram of a second network device 800 in an embodiment of this application.
  • FIG. 9 is a schematic structural diagram of another first network device 900 in an embodiment of this application.
  • FIG. 10 is a schematic structural diagram of another second network device 1000 in an embodiment of this application.
  • FIG. 11 is a schematic structural diagram of a network system 1100 in an embodiment of this application.
  • An MPLS TE tunnel usually includes multiple LSPs with the same source node and destination node. In order to ensure that the MPLS TE tunnel can effectively transmit service streams, it is necessary to perform fault detection on the LSPs and switch the service streams carried on the failed LSP. To other fault-free LSPs, the service flow can be effectively transmitted on the fault-free LSPs.
  • BFD is an end-to-end detection mechanism for quickly sending and receiving packets. It can quickly send BFD packets and receive BFD packets from the opposite end, and determine the fault condition of the link through which forward BFD packets and reverse BFD packets pass. . Since the BFD mechanism can realize the sending and receiving of BFD packets in milliseconds between the source node and the destination node, the BFD mechanism can meet the fast requirements for LSP fault detection in the MPLS TE tunnel.
  • the process of using the BFD mechanism to detect LSP failures can include: the source node sends forward BFD packets to the destination node through the LSP to be detected, and the destination node sends reverse BFD packets to the source node through IP routing. , The source node determines whether the LSP is faulty based on the received reverse BFD packet. Since the LSP is a unidirectional constrained path, the IP path determined by the IP routing method may not be exactly the same as the LSR of the label switching node that the LSP passes through. In this way, the detection result reflects the IP path determined by the LSP and the IP routing method. The overall failure situation, rather than just reflecting whether the LSP has failed.
  • FIG. 1 Take the MPLS TE scenario shown in Figure 1 as an example.
  • This scenario includes network equipment 110, network equipment 120, network equipment 130, network equipment 140, and network equipment 150, where LSP 1 passes through: network equipment 110-> Network equipment 120->network equipment 130; LSP 2 goes through in sequence: network equipment 110->network equipment 150->network equipment 140->network equipment 130. Then, as shown in FIG. 2, in the scenario shown in FIG.
  • the process of performing fault detection on the LSP 1 may specifically include: S11, the network device 110 sends a BFD message 1 to the network device 130 through the LSP 1; S12, Based on the IP routing method, the network device 130 sends the BFD message 2 to the network device 110 through the IP path 1, where the IP path 1 passes through the network device 130->network device 140->network device 150->network device 110 in turn; S13, The network device 110 determines the detection result according to the BFD message 2; S14, if the detection result indicates a failure, it switches the traffic carried on the LSP 1 to the LSP 2.
  • the detection result indicates the failure, which may be caused by the failure of the network equipment or link that LSP 1 passes through, or the link or network equipment that IP path 1 passes through. If IP path 1 passes through the link Or network equipment failure. Since all LSRs included in IP path 1 and LSP 2 are the same, LSP 2 is likely to fail. Then, after S14 is executed, it is likely that traffic will be switched from the normal LSP 1 to the failed LSP 2 by mistake. Therefore, the traffic cannot be effectively transmitted in the MPLS TE tunnel.
  • a fault detection method is provided, which is applied in a CR-LSP scenario.
  • the source node informs the destination node of the path information of the first LSP to be detected .
  • the destination node establishes a second LSP that is in the reverse direction with the first LSP to be detected based on the path information, so that the reverse BFD packet in the BFD detection can pass through the second LSP and the forward BFD packet in the reverse direction.
  • the transmission of the first LSP overcomes the conflict between the bidirectionality of the BFD mechanism and the unidirectionality of the LSP. That is, in the current BFD detection, the BFD message and the response message are likely to not share the same path, which causes the detection result to fail to accurately reflect the LSP failure situation. Problem, to achieve faster and more accurate fault detection for LSP.
  • the specific fault detection process may include: S21, the network device 110 sends an LSP-Ping to the network device 130 through the LSP 1 Message, the LSP-Ping message carries path information of LSP 1, for example: the IP address list of each node included in LSP 1, as shown in Figure 1, on the link from network device 110 to network device 120
  • the IP address corresponding to the device 110 is IP 1
  • the IP address corresponding to the network device 120 on the link from the network device 120 to the network device 130 is IP 3.
  • the path information of the LSP 1 includes: IP 1 and IP 3; S22,
  • the network device 130 establishes an LSP 1'according to the path information of the LSP 1, and the LSP 1'passes through: network device 130->network device 120->network device 110, as shown in Figure 1, from network device 130 to network device 120
  • the IP address corresponding to the network device 130 on the link is IP 4
  • the IP address corresponding to the network device 120 on the link from the network device 120 to the network device 110 is IP 2.
  • the path information of the LSP 1' can include: IP 4 and IP 2; S23, the network device 110 and the network device 130 negotiate to determine the configuration parameters of BFD, for example: BFD detection period; S24, the network device 110 sends a BFD packet to the network device 130 through the LSP 1 based on the configuration parameters determined by the negotiation 1; S25, the network device 130 sends a BFD packet 2 to the network device 110 via the LSP 1'based on the configuration parameters; S26, the network device 110 determines the detection result of the LSP 1 based on the BFD packet 2.
  • BFD detection period for example: BFD detection period
  • S24 the network device 110 sends a BFD packet to the network device 130 through the LSP 1 based on the configuration parameters determined by the negotiation 1
  • S25 the network device 130 sends a BFD packet 2 to the network device 110 via the LSP 1'based on the configuration parameters
  • S26 the network device 110 determines the detection result of the LSP 1 based on the BFD packet 2.
  • the network device 110 informs the network device 130 of the path information of the LSP 1, and the network device 130 can establish an LSP 1'that shares the reverse path with the LSP 1 based on the path information, so that the BFD message and response message in the BFD detection can be Transmission is carried out through the reverse common-path LSP 1 and LSP 1'. After the same LSR, the detection result can accurately reflect the failure detection of LSP 1.
  • network equipment and nodes refer to the same meaning in this application, and can be used interchangeably.
  • the network device may specifically include, but is not limited to, a switch, a router, or a firewall.
  • the LSP may be a CR-LSP determined between the source node and the destination node through constraints such as link costs or labels.
  • the CR-LSP is a unidirectional path and includes multiple Orderly arranged label switching node LSR. Adjacent LSRs can be directly connected or connected through a transit node. In the embodiment of this application, for the LSP to be detected and the established LSP in the reverse direction, only the LSRs included in it are concerned. Including transit nodes and whether the transit nodes are consistent will not be considered.
  • two LSPs are in the reverse common path, which means that all LSRs included in the two LSPs are the same, and the order of the LSRs in one LSP is opposite to the order of the LSRs in the other LSP.
  • the source node in an LSP is the destination node of another LSP
  • the destination node in an LSP is the source node of another LSP
  • the second LSR in an LSP is the penultimate LSR of another LSP, and so on .
  • FIG. 4 is a signaling flowchart of a fault detection method 100 in an embodiment of the application.
  • the method 100 is applied in a CR-LSP scenario, and the embodiment of the present application is introduced with the interaction between the source node and the destination node of the first LSP to be detected.
  • the method 100 may be applied to the network scenario shown in FIG.
  • the method 100 may be to perform fault detection on the LSP 1 from the network device 110 to the network device 130, where LSP 1 and LSP 1'respectively correspond to The first LSP and the second LSP in the method 100, the network device 110 and the network device 130 respectively correspond to the second network device and the first network device in the method 100; as another example, the method 100 can also be used for the network device 130 Perform fault detection on the LSP 1'of the network device 110, where LSP 1'and LSP 1 respectively correspond to the first LSP and the second LSP in the method 100, and the network device 130 and the network device 110 respectively correspond to the first LSP in the method 100.
  • the second network device and the first network device are examples of the LSP 1 from the network device 110 to the network device 130, where LSP 1 and LSP 1'respectively correspond to The first LSP and the second LSP in the method 100, the network device 110 and the network device 130 respectively correspond to the second network device and the first network device in the method 100; as another example, the method 100 can also be used for the
  • the method 100 may include the following S101 to S108, for example:
  • the second network device sends a first packet to the first network device via the first LSP to be detected, where the first packet carries path information of the first LSP, and the source node of the first LSP is the second network device, The destination node of the first LSP is the first network device, and the first LSP includes multiple LSRs arranged in sequence.
  • the first network device receives a first packet sent by the second network device through the first LSP to be detected.
  • the first LSP refers to the LSP created by the second network device from the second network device to the first network device.
  • the first LSP may include multiple LSRs.
  • the positions of the multiple LSRs in the first LSP are fixed, that is, the first LSP includes multiple LSRs arranged in sequence.
  • the first LSP includes a plurality of LSRs arranged in sequence, namely: network device 110, network device 120, and network device 130.
  • the multiple LSRs of the first LSP may also include at least one other LSR, such as: Among the multiple LSRs, the source node is the network device 110, the destination node is the network device 130, and other LSRs only include the network device 120.
  • the embodiment of the present application may further include: S31, the second network device applies to establish a CR-LSP from the second network device to the first network device, and establishes the CR-LSP through cooperation with the first network device The first LSP, and save the path information of the first LSP; S32, if the first LSP needs to be detected for failure, the second network device can enable BFD to trigger the establishment of a BFD session, for example: through configuration commands To enable the BFD capability on the second network device.
  • the path information is used to indicate the LSR experienced by the first LSP and the sequence in which each LSR appears in the first LSP.
  • the path information of the first LSP may be an IP address list composed of the IP addresses of each hop LSR, each The position of the IP address in the IP address list matches the position of the LSR corresponding to the IP address in the first LSP. Assuming that the first LSP is the LSP 1 in the scenario shown in FIG. 1, and the IP address of the network device 110 is IP 1, the IP address of the network device 120 is IP 2, and the IP address of the network device 130 is IP 3. Then, the first The path information of an LSP is as follows: IP 1, IP 2, and IP 3.
  • the second network device can generate a first message based on the configuration information, and send the first message to the first network device to inform the first network device of the first message to be detected.
  • the path information of an LSP provides a data basis for the first network device to establish a second LSP that is in the reverse direction with the first LSP in the subsequent S103.
  • the first message may be an LSP-Ping message.
  • the specific format is shown in Figure 5, and it may specifically include a version number (English: Version Number) field, which is used to identify the version number of the MPLS command, for example:
  • the version number field can be 1; the zero (English: Must Be Zero) field must be filled with all 0s, and this field can be ignored when the message is received;
  • the message type (English: Message Type) field is used to identify the MPLS command
  • the reply mode (English: Reply Mode) field, It is used to indicate the reply mode adopted by the node receiving the message.
  • IPv4 Internet Protocol version 4
  • UDP User Datagram Protocol
  • return subcode English: Return Subcode
  • the sender handle (English: Sender's Handle) field is used to identify a specific MPLS command, and its value can be randomly generated when an MPLS command request is sent;
  • the sequence number (English: Sequence Number) field, the same Used to identify a specific MPLS command, valid in a process;
  • the timestamp (English: Timestamp) field, specifically can use the time format defined by the Network Time Protocol (English: Network Time Protocol, abbreviated as: NTP), which can specifically include the sending time (For example: the field corresponding to the second and the field corresponding to the millisecond) and the receiving time (for example: the field corresponding to the second and the field corresponding to the millisecond); reserved area, the reserved area can be extended with multiple type length values (English: Type Length Value (abbreviation: TLV) field.
  • NTP Network Time Protocol
  • the path information of the first LSP is: IP 1 and IP 3 in order.
  • the first packet can be extended in the LSP-Ping packet
  • a TLV field carries path information.
  • the format of the extended TLV field can be seen in Figure 6a.
  • Type can be 127, which is used to identify that the TLV field carries path information of LSP 1, and the value of Length is equal to the extended TLV.
  • the length of the field; Value can include reserved fields, the number of addresses (English: Hop Num), and specific path information. Specifically, reserved fields can be filled with 0, Hop Num can be 2, and path information can include IP 1 and IP 3.
  • the first message can also extend multiple TLV fields in the LSP-Ping message, and multiple TLV fields collectively carry the path information, and each TLV field carries an IP address in the path information.
  • the format of the extended TLV field can be seen in Figure 6b.
  • the first network device establishes a second LSP from the first network device to the second network device according to the path information, the second LSP includes the multiple LSRs, and the arrangement of the multiple LSRs in the second LSP The sequence is opposite to the sequence of the multiple LSRs in the first LSP.
  • the first network device may first determine whether it has the first packet that carries the path information of the first LSP before performing the following S103. Second, if the LSP has the capability, S103 is executed; if not, S103 to S108 are not executed.
  • S103 may specifically include: the first network device determines, according to the path information, the LSRs that the second LSP that needs to be established in turn needs to pass through; the first network device cooperates with the second network device to create the second network device according to the determined LSR.
  • LSP refers to an LSP that is in the reverse direction of the first LSP created by the first network device, and the source node of the second LSP is the first network device, and the destination node is the second network device.
  • the path information of the second LSP is: IP 4 and IP 2 in order.
  • the first network device may enable BFD to trigger the establishment of a backhaul BFD session, for example, the BFD capability on the first network device may be enabled through a configuration command.
  • the first network device may also send a second packet to the second network device.
  • the second message carries capability information, which is used to characterize that the first network device has the ability to establish a second LSP. It should be noted that the timing for the first network device to send the second message to the second network device can be performed before S103, after S103, or simultaneously with S103, which will not be specified in this embodiment of the application. limited.
  • the first network device determines that it does not have the ability to create a second LSP that shares a reverse path with the first LSP, the first network device can perform different operations according to actual needs, for example: the first network The device may send a second packet to the second network device through IP routing.
  • the second packet carries capability information, and the capability information is used to indicate that the first network device does not have the ability to establish a second LSP, then the second The network device can make specific decisions about fault detection.
  • a preset time interval for example: 1 second
  • the second network device determines that the first network device does not have the ability to establish the second LSP, it can choose not to use the BFD mechanism that cannot accurately detect the failure to perform failure detection on the first LSP according to the actual failure detection requirements of the user; or, You can also choose to use the current BFD mechanism to detect the failure of the first LSP.
  • the current BFD mechanism for detecting the failure of the first LSP may include, for example: S41, the second network device sends an LSP-Ping request message to the first network device, which carries the identifier of the second network device; S42, A network device records the identifier of the second network device, carries both its own identifier and the identifier of the second network device in the LSP-Ping response message, and sends it to the second network device; S43, the second network device Record the identifier of the first network device; S44, the second network device negotiates with the first network device to determine BFD configuration parameters; S45, the second network device sends a forward BFD packet to the first network device through the first LSP; S46, the first network device sends a reverse BFD packet to the second network device via IP routing; S47, the second network device determines the fault condition of the first LSP according to the reverse BFD packet.
  • the unsuccessful establishment of the second LSP may be because the first network device does not support the establishment of the second LSP, or it may be due to other reasons, such as insufficient label resources.
  • the first network device does not have the ability to establish a second LSP in the embodiments of the present application may mean that the first network device does not support the establishment of the second LSP, or it may refer to a situation where the establishment of the second LSP is unsuccessful due to other reasons.
  • the source node can perceive the destination node to establish the reverse common-path LSP capability, so that the source node can decide the specific method used in subsequent failure detection, so that the failure of the LSP in the CR-LSP scenario Detection is more flexible.
  • a second LSP that is in the reverse direction of the first LSP to be detected is established, so that when the BFD mechanism is subsequently used to detect the first LSP, the response message of the BFD message and the BFD The message is transmitted through the reverse common-path LSP, thereby accurately detecting the failure of the first LSP, providing an indispensable data foundation.
  • S104 The second network device sends the first BFD packet to the first network device through the first LSP.
  • the first network device receives the first BFD packet sent by the second network device via the first LSP.
  • the first network device sends a second BFD packet to the second network device through the second LSP.
  • the second network device receives the second BFD packet sent by the first network device via the second LSP.
  • the second network device determines the detection result of the first LSP based on the second BFD packet.
  • the process of using the BFD mechanism to detect the failure of the LSP to be detected includes three parts: the first part is to establish an LSP that shares the reverse path with the LSP to be detected; the second part, The configuration parameters for sending and receiving BFD messages are determined through negotiation; the third part, based on the operation results of the first and second parts, performs fault detection on the LSP to be detected through the BFD message and its corresponding response message.
  • the first part can correspond to the above S101 to S103
  • the specific process implemented in the second part can be: between S103 and S104, based on the first LSP and the second LSP, the first network device and the second network device negotiate the configuration of BFD Parameters, the configuration parameters are used to standardize the parameters for subsequent execution of S104-S107, for example: the period of execution of S104 and S107 (for example: 10 seconds).
  • the third part may be: the second network device sends a forward first BFD packet to the first network device via the first LSP based on the configuration parameters determined through negotiation; and the first network device receives the first BFD packet Then, based on the configuration parameters determined through negotiation, a second reverse BFD packet is sent to the second network device via the second LSP; the second network device receives the second BFD packet to determine the detection result of the first LSP.
  • the detection result may be determined according to a configuration parameter manually set or negotiated in advance. As an example, as long as the second network device receives the second BFD packet, it determines that the first LSP is not faulty; on the contrary, if the second network device does not receive the second BFD packet, it determines that the first LSP is faulty.
  • a preset duration (for example: 30 milliseconds) can also be set, and the preset duration can be manually set, or it can be one of the configuration parameters determined through negotiation to indicate the first network device The longest period allowed to pass the second BFD packet, then, if the second network device receives the next second BFD packet within the preset time interval, it is determined that the first LSP is not faulty; on the contrary, if the second network device If the device does not receive the next second BFD packet within the preset interval, it determines that the first LSP is faulty.
  • the specific value of the preset duration can be flexibly set according to the actual situation.
  • S104-S108 may specifically include: network device 110 sends BFD packets 1 to network device 130 via LSP 1 every 10 milliseconds; network device 130 sends BFD packets 1 via LSP 1'every 20 milliseconds The network device 110 sends a BFD message 2.
  • the network device 110 receives the next BFD message 2 within 60 milliseconds (that is, 3 times of 20 milliseconds, and 3 is a preset multiple) after receiving a BFD message 2, then it determines LSP 1'is fault-free, thus confirming that the common LSP 1 is fault-free; if the network device 110 receives a BFD message 2 after 80 milliseconds before receiving the next BFD message 2, or, after receiving a BFD message If the next BFD message 2 is not received after message 2, it is determined that LSP 1'is faulty, and thus the common LSP 1 is faulty.
  • the network device 130 receives the next BFD message 1 within 40 milliseconds (that is, 4 times of 10 milliseconds, 4 being a preset multiple) after receiving a BFD message 1, then, Make sure that the LSP 1 is not faulty; if the network device 130 receives the next BFD packet 1 after 40 milliseconds after receiving a BFD packet 1, or it has not received the next BFD packet 1 Message 1, then it is determined that LSP 1 is faulty.
  • 10 milliseconds, 20 milliseconds, multiple 3, and multiple 4 may all be the configuration parameters negotiated in the second part.
  • the second network device may also switch the traffic carried by the first LSP to the backup LSP of the first LSP to ensure the normal transmission of traffic in the network; and
  • the second network device can also report an alarm message above, which is used to inform the control user that the first LSP has failed, so that the technicians can detect and repair it as soon as possible.
  • the second network device will restore the traffic from the backup. Switch back to the first LSP on the LSP.
  • the source node can inform the destination node of the path information of the LSP to be detected, and the destination node establishes an LSP that shares the reverse path with the LSP to be detected based on the path information, so that the forward and reverse directions in the BFD detection BFD packets can be transmitted through a common LSP, which overcomes the current BFD mechanism for forward and reverse BFD packets using CR-LSP and IP routing respectively to determine the transmission path transmission, and the transmission determined by the two methods
  • CR-LSP and IP routing respectively to determine the transmission path transmission, and the transmission determined by the two methods
  • the use of the BFD mechanism provided in the embodiments of this application to detect the failure of the LSP not only takes advantage of the feature that the BFD mechanism can quickly complete the detection, but also based on the construction of the reverse common path LSP makes the use of the BFD mechanism to detect the failure of the LSP more accurately .
  • the embodiment of the present application also allows the source node to perceive whether the destination node has the ability to establish a reverse common path LSP, so that the source node can decide the specific method to be used in subsequent failure detection, so as to prevent the failure of the LSP in the CR-LSP scenario. Detection is more flexible.
  • an embodiment of the present application also provides a first network device 700, as shown in FIG. 7.
  • the first network device 700 is applied to a label-switched path CR-LSP scenario where a path is restricted.
  • the first network device 700 includes a receiving unit 701, a sending unit 702, and a processing unit 703.
  • the receiving unit 701 is configured to receive a first packet sent by the second network device through the first LSP to be detected, the first packet carrying path information of the first LSP, and the source node of the first LSP is the first network Device, the destination node of the first LSP is the second network device, and the first LSP includes a plurality of label switching node LSRs arranged in sequence.
  • the processing unit 703 is configured to establish a second LSP from the first network device to the second network device according to the path information.
  • the second LSP includes multiple LSRs, and the arrangement order of the multiple LSRs in the second LSP is consistent with the multiple LSRs. The arrangement order in the first LSP is reversed.
  • the sending unit 702 is configured to send the first bidirectional link detection BFD packet to the second network device via the second LSP, so that the second network device determines the failure condition of the first LSP based on the first BFD packet.
  • the receiving unit 701 in the first network device 700 is further configured to receive the second BFD packet sent by the second network device via the first LSP.
  • the sending unit 702 in the first network device 700 is also used to send a second message to the second network device.
  • the second message carries capability information, and the capability information is used to characterize the capability of the first network device. The ability to establish a second LSP.
  • the processing unit 703 in the first network device 700 is further configured to, before sending the first bidirectional link detection BFD message to the second network device through the second LSP, based on the first LSP and the second The LSP negotiates BFD configuration parameters with the second network device; then, the sending unit 702 is specifically configured to send the first BFD packet to the second network device via the second LSP based on the configuration parameters determined through the negotiation.
  • the first packet is an LSP-Ping packet
  • the path information is carried by the extended type length value TLV field in the LSP-Ping packet.
  • the first network device 700 shown in FIG. 7 may be the network device 130 in the example shown in FIG. 3, or the first network device mentioned in the method 100 shown in FIG. 4. Therefore, for various specific embodiments of the first network device 700, reference may be made to the corresponding embodiment of FIG. 3 and the related introduction of the method 100, which will not be repeated in this embodiment.
  • an embodiment of the present application also provides a second network device 800, as shown in FIG. 8.
  • the second network device 800 is applied to a CR-LSP scenario of a label-switched path with restricted paths.
  • the second network device 800 includes a sending unit 801, a receiving unit 802, and a processing unit 803.
  • the sending unit 801 is configured to send a first packet to the first network device via the first LSP to be detected, the first packet carrying path information of the first LSP, and the source node of the first LSP is the second network Device, the destination node is a first network device, and the first LSP includes a plurality of label switching node LSRs arranged in sequence.
  • the receiving unit 802 is configured to receive a first bidirectional link detection BFD message sent by the first network device via a second LSP, where the second LSP is established by the second network device based on path information, and the second LSP includes multiple LSRs , And the arrangement order of the multiple LSRs in the second LSP is opposite to the arrangement order of the multiple LSRs in the first LSP.
  • the processing unit 803 is configured to determine the detection result of the first LSP based on the first BFD packet.
  • the sending unit 803 in the second network device 800 is further configured to send the second BFD packet to the first network device via the first LSP.
  • the receiving unit 802 in the second network device 800 is further configured to receive a second packet sent by the first network device.
  • the second packet carries capability information, and the capability information is used to characterize the first network device. Have the ability to establish a second LSP.
  • the processing unit 803 in the second network device 800 is further configured to, before receiving the first bidirectional link detection BFD message sent by the first network device via the second LSP, based on the first LSP and the first LSP
  • the second LSP negotiates BFD configuration parameters with the first network device; then, the receiving unit 802 is specifically configured to receive the first BFD message sent by the first network device via the second LSP based on the negotiated configuration parameters.
  • the processing unit 803 in the second network device 800 is further configured to switch the traffic carried on the first LSP to the third LSP if the detection result indicates that the first LSP is faulty.
  • the source node is the second network device, and the destination node of the third LSP is the first network device.
  • the first packet is an LSP-Ping packet
  • the path information is carried by the extended type length value TLV field in the LSP-Ping packet.
  • the second network device 800 shown in FIG. 8 may be the network device 110 in the example shown in FIG. 3, or the second network device mentioned in the method 100 shown in FIG. 4. Therefore, for various specific embodiments of the second network device 800, reference may be made to the corresponding embodiment of FIG. 3 and the related introduction of the method 100, which will not be repeated in this embodiment.
  • an embodiment of the present application provides a first network device 900.
  • the first network device 900 may be the destination node in any of the foregoing embodiments, for example, it may be the network device 130 in the embodiment shown in FIG. 3, or may be the first network device in the embodiment shown in FIG.
  • the first network device 900 includes at least one processor 901, a bus system 902, a memory 903, and at least one transceiver 904.
  • the first network device 900 is a device with a hardware structure, and can be used to implement the functional modules in the first network device 700 shown in FIG. 7.
  • the processing unit 703 in the first network device 700 shown in FIG. 7 can be implemented by calling the code in the memory 903 by the at least one processor 901.
  • the first network device 700 shown in FIG. 7 The receiving unit 701 and the sending unit 702 in can be implemented by the transceiver 904.
  • the first network device 900 may also be used to implement the function of the first network device in any of the foregoing embodiments.
  • processor 901 may be a general-purpose central processing unit (central processing unit, CPU), network processor (NP), microprocessor, application-specific integrated circuit (ASIC) , Or one or more integrated circuits used to control the execution of the program of this application.
  • CPU central processing unit
  • NP network processor
  • ASIC application-specific integrated circuit
  • the above-mentioned bus system 902 may include a path for transferring information between the above-mentioned components.
  • the aforementioned transceiver 904 is used to communicate with other devices or a communication network.
  • the aforementioned memory 903 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), or other types that can store information and instructions.
  • the type of dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical disk storage, optical discs Storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be used by Any other medium accessed by the computer, but not limited to this.
  • the memory can exist independently and is connected to the processor through a bus.
  • the memory can also be integrated with the processor.
  • the memory 903 is used to store application program codes for executing the solutions of the present application, and the processor 901 controls the execution.
  • the processor 901 is configured to execute the application program code stored in the memory 903, so as to realize the functions in the method of the present patent.
  • the processor 901 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 9.
  • the first network device 900 may include multiple processors, such as the processor 901 and the processor 907 in FIG. 9. Each of these processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
  • an embodiment of the present application provides a second network device 1000.
  • the second network device 1000 may be the source node in any of the foregoing embodiments, for example, it may be the network device 110 in the embodiment shown in FIG. 3, or may be the second network device in the embodiment shown in FIG. 4 .
  • the second network device 1000 includes at least one processor 1001, a bus system 1002, a memory 1003, and at least one transceiver 1004.
  • the second network device 1000 is a device with a hardware structure, and can be used to implement the functional modules in the second network device 800 described in FIG. 8.
  • the processing unit 803 in the second network device 800 shown in FIG. 8 can be implemented by calling the code in the memory 1003 by the at least one processor 1001.
  • the second network device 800 shown in FIG. 8 The receiving unit 802 and the sending unit 801 in can be implemented by the transceiver 1004.
  • the second network device 1000 may also be used to implement the function of the second network device in any of the foregoing embodiments.
  • the aforementioned processor 1001 may be a general-purpose central processing unit (central processing unit, CPU), network processor (network processor, NP), microprocessor, application-specific integrated circuit (ASIC) , Or one or more integrated circuits used to control the execution of the program of this application.
  • CPU central processing unit
  • NP network processor
  • ASIC application-specific integrated circuit
  • the above-mentioned bus system 1002 may include a path for transferring information between the above-mentioned components.
  • the above transceiver 1004 is used to communicate with other devices or communication networks.
  • the above-mentioned memory 1003 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions.
  • the type of dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical disk storage, optical discs Storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be used by Any other medium accessed by the computer, but not limited to this.
  • the memory can exist independently and is connected to the processor through a bus.
  • the memory can also be integrated with the processor.
  • the memory 1003 is used to store application program codes for executing the solutions of the present application, and the processor 1001 controls the execution.
  • the processor 1001 is configured to execute application program codes stored in the memory 1003, so as to realize the functions in the method of the present patent.
  • the processor 1001 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 10.
  • the apparatus 1000 may include multiple processors, such as the processor 1001 and the processor 1007 in FIG. 10. Each of these processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
  • the network system 1100 includes a first network device 1101 and a second network device 1102.
  • the first network device 1101 may specifically be the first network device 700 shown in FIG. 7 or the first network device 900 shown in FIG. 9; the second network device 1102 may specifically be the second network device 800 shown in FIG. Or the second network device 1000 shown in FIG. 10.
  • the first network device 1101 may be the first network device in the embodiment shown in FIG. 4 or the network device 130 in the embodiment shown in FIG. 3, and the second network device 1102 may be the implementation shown in FIG. 4.
  • the second network device in the example or the network device 110 in the embodiment shown in FIG. 3.
  • the embodiment of the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium stores program codes or instructions. When it runs on a computer, the computer executes the implementation shown in Figure 3 or Figure 4 above. The method in any implementation mode in the example.
  • embodiments of the present application also provide a computer program product, which when running on a computer, causes the computer to execute any one of the aforementioned methods 100.

Abstract

Embodiments of the present application disclose a fault detection method and an apparatus. The method comprises: a source node of a first LSP under test sending, via the first LSP, a first packet to a destination node, the first packet carrying path information of the first LSP, and the first LSP comprising multiple sequentially arranged LSRs; the destination node establishing, after receiving the first packet and according to the path information, a second LSP having a direction which is the reverse of that of the first LSP and sharing a common path with the first LSP; and accordingly, the destination node feeding back a first BFD packet to the source node via the second LSP having the reverse direction to and sharing the common path with the first LSP, such that the source node determines a fault condition of the first LSP on the basis of the first BFD packet. In this way, the invention enables a destination node to establish, on the basis of path information, an LSP having a direction which is the reverse of that of an LSP under test and sharing a common path with the LSP under test, and accordingly enables common path transmission of a forward BFD packet and a reverse BFD packet in BFD testing, thereby achieving fast and accurate fault detection of LSPs.

Description

一种故障检测方法及设备A fault detection method and equipment
本申请要求于2020年01月15日提交中国国家知识产权局、申请号为202010043122.4、申请名称为“一种故障检测方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office of China, the application number is 202010043122.4, and the application name is "a fault detection method and equipment" on January 15, 2020. The entire content is incorporated herein by reference. Applying.
技术领域Technical field
本申请涉及通信技术领域,特别是涉及一种故障检测方法及设备,用于流量工程(英文:Traffic Engineering,简称:TE)的约束路径的标签交换路径(英文:Control Route Label Switched Path,简称:CR-LSP)场景下,采用双向链路检测(英文:Bidirectional Forwarding Detection,简称:BFD)机制检测LSP上是否存在故障。This application relates to the field of communication technology, and in particular to a fault detection method and device used in the label switching path (English: Control Route Label Switched Path, abbreviation: Control Route Label Switched Path, abbreviation: In the CR-LSP scenario, a bidirectional link detection (English: Bidirectional Forwarding Detection, referred to as BFD) mechanism is used to detect whether there is a fault on the LSP.
背景技术Background technique
在多协议标签交换(英文:Multiprotocol Label Switching,简称:MPLS)TE中,隧道中可以包括多条从源节点(英文:Ingress)到目的节点(英文:Egress)的CR-LSP。为了确保CR-LSP能够安全和可靠的传输业务流,通常采用BFD这一能够快速进行端到端检测的机制,检测该CR-LSP是否存在故障。In Multiprotocol Label Switching (English: Multiprotocol Label Switching, MPLS for short) TE, the tunnel may include multiple CR-LSPs from a source node (English: Ingress) to a destination node (English: Egress). In order to ensure that the CR-LSP can safely and reliably transmit service streams, BFD, a mechanism that can quickly perform end-to-end detection, is usually used to detect whether the CR-LSP is faulty.
目前,BFD机制在检测CR-LSP的过程包括:Ingress通过LSP向Egress发出正向检测报文,并要求Egress向Ingress反馈反向检测报文,从而确定该LSP是否存在故障。由于LSP是单向路径,那么,反向检测报文只能通过互联网协议(英文:Internet Protocol,简称:IP)路由的方式确定其传输路径,而IP路由方式所确定的IP路径很可能并不经过LSP中的各标签交换节点(英文:Label Switching Router,简称:LSR),即,正向检测报文和反向检测报文并不共路,这样,检测结果反映LSP以及IP路由方式确定的IP路径的整体故障情况,无法准确反映LSP是否发生故障。At present, the process of detecting CR-LSP in the BFD mechanism includes: Ingress sends forward detection packets to Egress through LSP, and requires Egress to feed back reverse detection packets to Ingress, so as to determine whether the LSP is faulty. Since the LSP is a one-way path, the reverse detection message can only be determined by the Internet Protocol (English: Internet Protocol, referred to as: IP) routing method to determine its transmission path, and the IP path determined by the IP routing method is probably not After each label switching node in the LSP (English: Label Switching Router, LSR for short), that is, the forward detection packet and the reverse detection packet do not share the same path. In this way, the detection result reflects the determination of the LSP and the IP routing method The overall failure of the IP path cannot accurately reflect whether the LSP fails.
基于此,亟待提供一种故障检测方法,既利用到BFD机制可以快速完成检测的特点,又能够克服BFD机制的双向性和单向LSP的冲突,实现对LSP更加准确的故障检测。Based on this, it is urgent to provide a fault detection method that not only uses the feature of the BFD mechanism to quickly complete the detection, but also overcomes the bidirectionality of the BFD mechanism and the conflict of one-way LSPs, and achieves more accurate fault detection for LSPs.
发明内容Summary of the invention
基于此,本申请实施例提供了一种故障检测方法及设备,通过在目的节点侧建立与待检测LSP共路的反向LSP,克服了BFD机制的双向性和单向LSP的冲突,使得优化的BFD机制能够对LSP进行更加准确的故障检测。Based on this, the embodiments of the present application provide a fault detection method and device. By establishing a reverse LSP co-path with the LSP to be detected on the destination node side, the bidirectionality of the BFD mechanism and the conflict of the unidirectional LSP are overcome, and optimization is achieved. The BFD mechanism can perform more accurate fault detection on LSPs.
第一方面,本申请实施例提供了一种故障检测方法,应用于CR-LSP场景中待检测的第一LSP的第一网络设备(即,第一LSP的目的节点),故障检测的过程可以包括:第二网络设备(即,第一LSP的源节点)经过该第一LSP向第一网络设备发送第一报文,其中,该第一报文中携带该第一LSP的路径信息,该第一LSP包括依次排列的多个LSR;那么,第一网络设备接收到该第一报文后,即可根据路径信息,建立从第一网络设备到第二网络设备的第二LSP,该第二LSP包括的LSR均与第一LSP包括的LSR相同,且多个LSR在第二LSP中的排列顺序与该多个LSR在第一LSP中的排列顺序相反;基于此,第一网 络设备即可经过与之反向共路的第二LSP,向第二网络设备反馈第一BFD报文,以便第二网络设备基于该第一BFD报文确定第一LSP的故障情况。In the first aspect, the embodiments of the present application provide a fault detection method, which is applied to the first network device of the first LSP to be detected in the CR-LSP scenario (that is, the destination node of the first LSP). The fault detection process can be It includes: the second network device (ie, the source node of the first LSP) sends a first packet to the first network device via the first LSP, wherein the first packet carries path information of the first LSP, and The first LSP includes multiple LSRs arranged in sequence; then, after the first network device receives the first message, it can establish a second LSP from the first network device to the second network device according to the path information. The LSRs included in the two LSPs are the same as the LSRs included in the first LSP, and the sequence of multiple LSRs in the second LSP is opposite to the sequence of the multiple LSRs in the first LSP; based on this, the first network device is The first BFD packet may be fed back to the second network device via the second LSP that is in the reverse common path, so that the second network device can determine the failure condition of the first LSP based on the first BFD packet.
可见,本申请实施例中,通过源节点将待检测的LSP的路径信息告知目的节点,目的节点基于路径信息建立与待检测LSP反向共路的LSP,利用正向LSP和建立的反向LSP共路的特点,使得BFD检测中正向BFD报文和反向BFD报文共路传输成为可能,BFD检测结果能够准确的反映该待检测LSP的故障情况,克服了BFD机制的双向性和单向LSP的冲突,即,目前的BFD检测中正向BFD报文和反向BFD报文大概率不共路,导致检测结果无法准确反映LSP故障情况的问题,实现对LSP更加快速、准确的故障检测。It can be seen that in the embodiment of the present application, the source node informs the destination node of the path information of the LSP to be detected, and the destination node establishes an LSP that shares the reverse path with the LSP to be detected based on the path information, using the forward LSP and the established reverse LSP The common path feature makes it possible to transmit forward BFD packets and reverse BFD packets in the same path in BFD detection. The BFD detection result can accurately reflect the failure of the LSP to be detected, which overcomes the bidirectional and unidirectional BFD mechanism. LSP conflicts, that is, the current BFD detection of forward BFD packets and reverse BFD packets are likely to not share the same path, causing the detection result to fail to accurately reflect the problem of LSP failures, and achieve faster and more accurate fault detection for LSPs.
其中,第一报文例如可以是LSP-Ping报文,具体为LSP-Ping请求报文,那么,第一LSP的路径信息可以通过LSP-Ping报文中扩展的类型长度值(英文:Type Length Value,简称:TLV)字段携带。第一LSP的路径信息,例如可以是第一LSP所经过的各标签交换节点(英文:Label Switched Router,简称:LSR)的IP地址。这样,第一网络设备接收到该携带第一LSP的路径信息的第一报文,相当于获得了建立与第一LSP反向共路的第二LSP的依据,使得第一网络设备建立第二LSP成为可能。Among them, the first message may be, for example, an LSP-Ping message, specifically an LSP-Ping request message. Then, the path information of the first LSP may use the extended type length value (English: Type Length) in the LSP-Ping message. Value (abbreviated as: TLV) field carried. The path information of the first LSP may be, for example, the IP address of each label switching node (English: Label Switched Router, LSR for short) through which the first LSP passes. In this way, the first network device receives the first packet carrying the path information of the first LSP, which is equivalent to obtaining the basis for establishing the second LSP that is in the reverse direction with the first LSP, so that the first network device establishes the second LSP. LSP becomes possible.
可以理解的是,第二网络设备也可以经过第一LSP向第一网络设备发送第二BFD报文,以满足BFD机制双向检测的特点,第一网络设备也能够根据其是否可以接收到第二网络设备经过第一LSP发送的第二BFD报文,确定该第一LSP的故障情况。It is understandable that the second network device can also send a second BFD packet to the first network device through the first LSP to meet the characteristics of the two-way detection of the BFD mechanism, and the first network device can also receive the second BFD packet according to whether it can receive the second BFD packet. The second BFD packet sent by the network device via the first LSP determines the fault condition of the first LSP.
在一些可能的实现方式中,本申请实施例还可以在第一网络设备处确定其是否具有建立第二LSP的能力,并将该能力告知第一LSP的源节点(即,第二网络设备),以便第二网络设备确定其进行故障检测的具体策略。In some possible implementation manners, the embodiment of the present application may also determine at the first network device whether it has the ability to establish a second LSP, and inform the source node of the first LSP (ie, the second network device) of the capability. , So that the second network device determines its specific strategy for fault detection.
作为一个示例,若第一网络设备确定其具有建立第二LSP的能力,则,第一网络设备不仅可以申请并与第二网络设备配合建立第二LSP,还可以向第二网络设备发送第二报文,该第二报文携带能力信息,该能力信息用于表征第一网络设备具备建立第二LSP的能力。那么,第二网络设备可以确定采用BFD机制进行故障检测,即,基于第一LSP和所述第二LSP,第一网络设备和第二网络设备协商BFD的配置参数;并且,基于协商确定的所述配置参数,第二网络设备经过第一LSP向第一网络设备发送BFD报文,第一网络设备经过该第一LSP接收到该BFD报文后,也基于协商确定的所述配置参数,向第二网络设备反馈响应报文。这样,本申请实施例提供的BFD机制能够实现对第一LSP快速和准确的故障检测。As an example, if the first network device determines that it has the ability to establish a second LSP, the first network device can not only apply for and cooperate with the second network device to establish the second LSP, but also send the second LSP to the second network device. A message, the second message carries capability information, and the capability information is used to characterize that the first network device has the ability to establish a second LSP. Then, the second network device can determine that the BFD mechanism is used for fault detection, that is, based on the first LSP and the second LSP, the first network device and the second network device negotiate the configuration parameters of BFD; According to the configuration parameters, the second network device sends a BFD packet to the first network device via the first LSP. After receiving the BFD packet via the first LSP, the first network device also sends the BFD packet based on the configuration parameters determined through negotiation. The second network device feeds back the response message. In this way, the BFD mechanism provided by the embodiment of the present application can realize rapid and accurate fault detection of the first LSP.
作为另一个示例,若第一网络设备确定其不具有建立第二LSP的能力,则,在第一网络设备接收第二网络设备经过待检测的第一LSP发送的第一报文之后,第一网络设备可以不执行申请并与第二网络设备配合建立第二LSP的过程,而可以通过IP路由的方式,向第二网络设备发送第二报文,该第二报文中携带的能力信息,用于表征第一网络设备不具备建立第二LSP的能力;或者,在第一网络设备接收第二网络设备经过待检测的第一LSP发送的第一报文之后,也可以不对第二网络设备发送第一报文进行回应,第二网络设备在得不到关于第一报文的回应时,也可以确定第一网络设备不具备建立第二LSP的能力。那么,第二网络设备即可选择不采用BFD机制对第一LSP进行故障检测,或者,如果可以容忍目前的BFD机制检测CR-LSP得到的检测结果误差,也可以选择采用目前的BFD机制对第 一LSP进行故障检测。这样,本申请实施例提供方法能够让源节点感知到目的节点建立第二LSP的能力,使得源节点能够根据需求配置其对第一LSP故障情况进行检测的机制,实现了对第一LSP更加灵活的故障检测。As another example, if the first network device determines that it does not have the ability to establish a second LSP, after the first network device receives the first packet sent by the second network device through the first LSP to be detected, the first network device The network device may not perform the process of applying and cooperating with the second network device to establish the second LSP, but may send the second packet to the second network device by way of IP routing, the capability information carried in the second packet, It is used to characterize that the first network device does not have the ability to establish a second LSP; or, after the first network device receives the first packet sent by the second network device through the first LSP to be detected, the second network device may not The first message is sent in response, and the second network device can also determine that the first network device does not have the ability to establish a second LSP when it does not get a response regarding the first message. Then, the second network device can choose not to use the BFD mechanism to perform fault detection on the first LSP, or, if it can tolerate the error in the detection result obtained by the current BFD mechanism to detect CR-LSP, it can also choose to use the current BFD mechanism to perform fault detection on the first LSP. An LSP performs fault detection. In this way, the method provided in the embodiments of the present application can allow the source node to perceive the ability of the destination node to establish the second LSP, so that the source node can configure its mechanism to detect the failure of the first LSP according to requirements, thereby achieving more flexibility for the first LSP Fault detection.
第二方面,本申请实施例还提供了一种故障检测方法,应用于CR-LSP场景中待检测的第一LSP的第二网络设备(即,第一LSP的源节点),故障检测的过程可以包括:第二网络设备经过待检测的第一LSP向第一网络设备(即,第一LSP的目的节点)发送第一报文,其中,该第一报文中携带第一LSP的路径信息,该第一LSP包括依次排列的多个LSR;接着,第二网络设备接收第一网络设备经过第二LSP发送的第一BFD报文,其中,该第二LSP为第二网络设备基于所接收到的路径信息建立的,第二LSP包括该多个LSR,且该多个LSR在第二LSP中的排列顺序与该多个LSR在第一LSP中的排列顺序相反;那么,该第二网络设备即可基于该第一BFD报文,确定第一LSP的检测结果。In the second aspect, the embodiments of the present application also provide a fault detection method, which is applied to the second network device of the first LSP to be detected in the CR-LSP scenario (ie, the source node of the first LSP), and the process of fault detection It may include: the second network device sends a first packet to the first network device (that is, the destination node of the first LSP) through the first LSP to be detected, where the first packet carries path information of the first LSP , The first LSP includes a plurality of LSRs arranged in sequence; then, the second network device receives the first BFD packet sent by the first network device via the second LSP, where the second LSP is the second network device based on the received The path information is established, the second LSP includes the multiple LSRs, and the sequence of the multiple LSRs in the second LSP is opposite to the sequence of the multiple LSRs in the first LSP; then, the second network The device can then determine the detection result of the first LSP based on the first BFD packet.
可见,本申请实施例中,通过源节点将待检测的LSP的路径信息告知目的节点,目的节点基于路径信息建立与待检测LSP反向共路的LSP,利用正向LSP和建立的反向LSP共路的特点,使得BFD检测中正向BFD报文和反向BFD报文共路,BFD检测结果能够准确的反映该待检测LSP的故障情况,克服了BFD机制的双向性和单向LSP的冲突,即,目前的BFD检测中正向BFD报文和反向BFD报文大概率不共路,导致检测结果无法准确反映LSP故障情况的问题,实现对LSP更加快速、准确的故障检测。It can be seen that in the embodiment of the present application, the source node informs the destination node of the path information of the LSP to be detected, and the destination node establishes an LSP that shares the reverse path with the LSP to be detected based on the path information, using the forward LSP and the established reverse LSP The common path feature makes the forward BFD packets and the reverse BFD packets share the same path in the BFD detection. The BFD detection results can accurately reflect the failure of the LSP to be detected, which overcomes the bidirectionality of the BFD mechanism and the conflict of unidirectional LSPs. That is, in the current BFD detection, the forward BFD packet and the reverse BFD packet are likely not to share the same path, resulting in the problem that the detection result cannot accurately reflect the LSP failure condition, and realizes the faster and more accurate failure detection of the LSP.
其中,第一报文例如可以是LSP-Ping报文,具体为LSP-Ping请求报文,那么,第一LSP的路径信息可以通过LSP-Ping报文中扩展的TLV字段携带。第一LSP的路径信息,例如可以是第一LSP所经过的各LSR的IP地址。这样,第二网络设备发送携带第一LSP的路径信息的第一报文,相当于向第一网络设备提供了建立与第一LSP反向共路的第二LSP的依据,使得第一网络设备建立第二LSP成为可能。The first message may be, for example, an LSP-Ping message, specifically an LSP-Ping request message. Then, the path information of the first LSP may be carried by the extended TLV field in the LSP-Ping message. The path information of the first LSP may be, for example, the IP addresses of each LSR passed by the first LSP. In this way, the second network device sends the first packet carrying the path information of the first LSP, which is equivalent to providing the first network device with a basis for establishing a second LSP that shares the reverse path with the first LSP, so that the first network device It is possible to establish a second LSP.
可以理解的是,第二网络设备也可以经过第一LSP向第一网络设备发送第二BFD报文,以满足BFD机制双向检测的特点,第一网络设备也能够根据其是否可以接收到第二网络设备经过第一LSP发送的第二BFD报文,确定该第一LSP的故障情况。It is understandable that the second network device can also send a second BFD packet to the first network device through the first LSP to meet the characteristics of the two-way detection of the BFD mechanism, and the first network device can also receive the second BFD packet according to whether it can receive the second BFD packet. The second BFD packet sent by the network device via the first LSP determines the fault condition of the first LSP.
在一些可能的实现方式中,本申请实施例还可以在第一网络设备处确定其是否具有建立第二LSP的能力,并将该能力告知第一LSP的源节点(即,第二网络设备),从而第二网络设备可以确定其进行故障检测的具体策略。In some possible implementation manners, the embodiment of the present application may also determine at the first network device whether it has the ability to establish a second LSP, and inform the source node of the first LSP (ie, the second network device) of the capability. , So that the second network device can determine its specific strategy for fault detection.
作为一个示例,若第一网络设备确定其具有建立第二LSP的能力,则,第二网络设备不仅可以配合第一网络设备建立第二LSP,还可以接收到第一网络设备发送的第二报文,该第二报文携带能力信息,该能力信息用于表征第一网络设备具备建立第二LSP的能力。那么,第二网络设备可以确定采用BFD机制进行故障检测,即,基于第一LSP和所述第二LSP,第二网络设备和第一网络设备协商BFD的配置参数;并且,基于协商确定的所述配置参数,第二网络设备经过第一LSP向第一网络设备发送BFD报文,第一网络设备经过该第一LSP接收到该BFD报文后,也基于协商确定的所述配置参数,向第二网络设备反馈响应报文。这样,本申请实施例提供的BFD机制能够实现对第一LSP快速和准确的故障检测。As an example, if the first network device determines that it has the ability to establish a second LSP, the second network device can not only cooperate with the first network device to establish the second LSP, but also receive the second report sent by the first network device. The second packet carries capability information, and the capability information is used to characterize that the first network device has the ability to establish a second LSP. Then, the second network device can determine that the BFD mechanism is used for fault detection, that is, based on the first LSP and the second LSP, the second network device and the first network device negotiate the BFD configuration parameters; and, based on all the negotiated parameters According to the configuration parameters, the second network device sends a BFD packet to the first network device via the first LSP. After receiving the BFD packet via the first LSP, the first network device also sends the BFD packet based on the configuration parameters determined through negotiation. The second network device feeds back the response message. In this way, the BFD mechanism provided by the embodiment of the present application can realize rapid and accurate fault detection of the first LSP.
作为另一个示例,若第一网络设备确定其不具有建立第二LSP的能力,则,在第二网 络设备经过待检测的第一LSP向第一网络设备发送第一报文之后,第二网络设备可以不配合第一网络设备建立第二LSP,那么,第二网络设备即可选择不采用BFD机制对第一LSP进行故障检测,或者,如果可以容忍目前的BFD机制检测CR-LSP得到的检测结果误差,也可以选择采用目前的BFD机制对第一LSP进行故障检测。这样,本申请实施例提供方法能够让源节点感知到目的节点建立第二LSP的能力,使得源节点能够根据需求配置其对第一LSP故障情况进行检测的机制,实现了对第一LSP更加灵活的故障检测。As another example, if the first network device determines that it does not have the ability to establish a second LSP, then after the second network device sends the first packet to the first network device through the first LSP to be detected, the second network device The device does not need to cooperate with the first network device to establish the second LSP, then the second network device can choose not to use the BFD mechanism to detect the failure of the first LSP, or, if the current BFD mechanism can tolerate the detection obtained by the CR-LSP If the result is incorrect, you can also choose to use the current BFD mechanism to perform fault detection on the first LSP. In this way, the method provided in the embodiments of the present application can allow the source node to perceive the ability of the destination node to establish the second LSP, so that the source node can configure its mechanism to detect the failure of the first LSP according to requirements, thereby achieving more flexibility for the first LSP Fault detection.
在另一些可能的实现方式中,本申请实施例还可以包括:第二网络设备根据响应报文,确定第一LSP的检测结果。In other possible implementation manners, the embodiment of the present application may further include: the second network device determines the detection result of the first LSP according to the response message.
作为一个示例,第二网络设备只要在发送下一个BFD报文之前,接收到BFD报文对应的响应报文,则确定第一LSP无故障;相反,若第二网络设备在发送下一个BFD报文时未接收到BFD报文对应的响应报文,则确定第一LSP故障。As an example, as long as the second network device receives the response message corresponding to the BFD message before sending the next BFD message, it determines that the first LSP is not faulty; on the contrary, if the second network device is sending the next BFD message If the response packet corresponding to the BFD packet is not received at the time of writing, it is determined that the first LSP is faulty.
作为另一个示例,还可以设置预设时长(例如:10毫秒),该预设时长可以用于指示发送BFD报文和接收其对应的响应报文之间所允许经过的最长时间,那么,若第二网络设备在预设时长接收到BFD报文对应的响应报文,则确定第一LSP无故障;相反,若第二网络设备在发送BFD报文后,经过预设时长还未接收到BFD报文对应的响应报文,则确定第一LSP故障。As another example, a preset duration (for example, 10 milliseconds) can also be set, and the preset duration can be used to indicate the maximum time allowed to elapse between sending a BFD message and receiving its corresponding response message. Then, If the second network device receives the response message corresponding to the BFD message within the preset period of time, it is determined that the first LSP is not faulty; on the contrary, if the second network device has not received the BFD message for the preset period of time after sending it The response packet corresponding to the BFD packet determines that the first LSP is faulty.
可以理解的是,在确定第一LSP故障后,第二网络设备还可以将第一LSP承载的流量切换到该第一LSP的备份LSP上,以确保流量在网络中的正常传输;并且,该第二网络设备还可以上报告警消息,用于告知控用户该第一LSP发生故障,供技术人员尽快进行检测和维修,并在第一LSP修复后,第二网络设备再将该流量从备份的LSP上切回到该第一LSP上。如此,实现了对CR-LSP合理和有效的管理,例如:MPLS TE隧道中的CR-LSP的管理,使得流量能够在网络中被安全和可靠的传输。It is understandable that after determining that the first LSP is faulty, the second network device may also switch the traffic carried by the first LSP to the backup LSP of the first LSP to ensure the normal transmission of traffic in the network; and The second network device can also report an alarm message above, which is used to inform the control user that the first LSP has failed, so that the technicians can detect and repair it as soon as possible. After the first LSP is repaired, the second network device will restore the traffic from the backup. Switch back to the first LSP on the LSP. In this way, reasonable and effective management of CR-LSP is realized, for example: CR-LSP management in MPLS TE tunnel, so that traffic can be safely and reliably transmitted in the network.
第三方面,本申请实施例还提供了一种故障检测方法,应用于CR-LSP场景中待检测的第一LSP的第一网络设备(即,第一LSP的目的节点),故障检测的过程可以包括:第二网络设备(即,第一LSP的源节点)经过该第一LSP向第一网络设备发送第一报文,其中,该第一报文中携带该第一LSP的路径信息,该第一LSP包括依次排列的多个LSR;此时,一种情况下,若第一网络设备确定自身具备建立反向共路第二LSP的能力,则,执行根据所接收的路径信息建立从第二网络设备到第一网络设备的第二LSP,以便后续在第一网络设备和第二网络设备之间基于第一LSP和第二LSP进行BFD检测。另一种情况下,若第一网络设备确定自身不具备建立反向共路第二LSP的能力,则,第一网络设备可以通过IP路由方式向第二网络设备发送第二报文,告知第一网络设备不具备建立第二LSP的能力,或者,第一网络设备不进行回复,当第二网络设备在未收到回复的情况下,每隔预设时长向第一网络设备发送一次第一报文,在连续发送第一报文的次数达到预设次数时,确定第一网络设备不具备建立第二LSP的能力;这样,第二网络设备在确定第一网络设备不具备建立第二LSP的能力后,可以根据用户的实际检测需求,选择使用目前的BFD机制检测第一LSP的故障情况,或者,选择不再使用BFD机制对第一LSP进行故障检测。可见,本申请实施例中,通过让源节点感知到目的节点建立反向共路LSP能力,使得源节点能够 决策后续故障检测中采用的具体方式,从而使得对CR-LSP场景中LSP的故障检测更加灵活。In the third aspect, the embodiments of the present application also provide a fault detection method, which is applied to the first network device (that is, the destination node of the first LSP) of the first LSP to be detected in the CR-LSP scenario, and the fault detection process It may include: the second network device (that is, the source node of the first LSP) sends a first packet to the first network device via the first LSP, where the first packet carries path information of the first LSP, The first LSP includes a plurality of LSRs arranged in sequence; at this time, in one case, if the first network device determines that it has the ability to establish a reverse common path second LSP, it executes the establishment of the slave according to the received path information. The second LSP from the second network device to the first network device, so as to subsequently perform BFD detection between the first network device and the second network device based on the first LSP and the second LSP. In another case, if the first network device determines that it does not have the ability to establish a reverse common path second LSP, the first network device can send a second message to the second network device through IP routing to inform the first network device A network device does not have the ability to establish a second LSP, or the first network device does not reply. When the second network device does not receive a reply, it sends the first network device to the first network device every preset time period. Message, when the number of consecutively sending the first message reaches the preset number of times, it is determined that the first network device does not have the ability to establish a second LSP; in this way, the second network device determines that the first network device does not have the ability to establish a second LSP After the ability, you can choose to use the current BFD mechanism to detect the failure of the first LSP according to the actual detection requirements of the user, or choose to no longer use the BFD mechanism to detect the failure of the first LSP. It can be seen that, in the embodiment of the present application, the source node can perceive the destination node to establish the reverse common-path LSP capability, so that the source node can decide the specific method to be used in subsequent failure detection, thereby enabling the failure detection of the LSP in the CR-LSP scenario More flexible.
第四方面,本申请实施例还提供了一种故障检测方法,应用于CR-LSP场景中待检测的第一LSP的第二网络设备(即,第一LSP的源节点),故障检测的过程可以包括:第二网络设备经过该第一LSP向第一网络设备(即,第一LSP的目的节点)发送第一报文,其中,该第一报文中携带该第一LSP的路径信息,该第一LSP包括依次排列的多个LSR;此时,一种情况下,第二网络设备配合第一网络设备建立反向共路第二LSP,则,后续在第一网络设备和第二网络设备之间,基于第一LSP和第二LSP进行BFD检测。另一种情况下,若第二网络设备接收到第一网络设备发送的第二报文,告知第一网络设备不具备建立反向共路第二LSP的能力,或者,第二网络设备在预设时长未收到对第一报文的回复,接下来每隔预设时长向第一网络设备发送一次第一报文,在连续发送第一报文的次数达到预设次数时,确定第一网络设备不具备建立第二LSP的能力;这样,第二网络设备在确定第一网络设备不具备建立第二LSP的能力后,可以根据用户的实际检测需求,选择使用目前的BFD机制检测第一LSP的故障情况,或者,选择不再使用BFD机制对第一LSP进行故障检测。可见,本申请实施例中,通过让源节点感知到目的节点建立反向共路LSP能力,使得源节点能够决策后续故障检测中采用的具体方式,从而实现更加灵活的对CR-LSP场景中LSP的故障检测。In the fourth aspect, the embodiments of the present application also provide a fault detection method, which is applied to the second network device of the first LSP to be detected in the CR-LSP scenario (ie, the source node of the first LSP), and the process of fault detection It may include: the second network device sends a first packet to the first network device (that is, the destination node of the first LSP) via the first LSP, where the first packet carries path information of the first LSP, The first LSP includes a plurality of LSRs arranged in sequence; in this case, in one case, the second network device cooperates with the first network device to establish a reverse common-path second LSP, then the first network device and the second network Between devices, BFD detection is performed based on the first LSP and the second LSP. In another case, if the second network device receives the second packet sent by the first network device, it informs the first network device that it does not have the ability to establish a reverse common path second LSP, or the second network device is in advance. Assuming that no reply to the first message is received for the duration, then the first message is sent to the first network device every preset duration. When the number of consecutively sending the first message reaches the preset number of times, the first message is determined The network device does not have the ability to establish the second LSP; in this way, after the second network device determines that the first network device does not have the ability to establish the second LSP, it can choose to use the current BFD mechanism to detect the first LSP according to the actual detection needs of the user. The failure condition of the LSP, or the option to no longer use the BFD mechanism to perform failure detection on the first LSP. It can be seen that, in the embodiment of the present application, by allowing the source node to perceive the ability of the destination node to establish a reverse common-path LSP, the source node can decide the specific method to be used in subsequent failure detection, thereby achieving a more flexible response to the LSP in the CR-LSP scenario. Fault detection.
第五方面,本申请实施例还提供了一种第一网络设备,应用于约束路径的标签交换路径CR-LSP场景,第一网络设备包括:接收单元、发送单元和处理单元。其中,接收单元用于接收第二网络设备经过待检测的第一LSP发送的第一报文,该第一报文中携带第一LSP的路径信息,第一LSP的源节点为第一网络设备,第一LSP的目的节点为第二网络设备,第一LSP包括依次排列的多个标签交换节点LSR。处理单元用于根据路径信息,建立从第一网络设备到第二网络设备的第二LSP,该第二LSP包括多个LSR,且多个LSR在第二LSP中的排列顺序与多个LSR在第一LSP中的排列顺序相反。发送单元用于经过第二LSP向第二网络设备发送第一双向链路检测BFD报文,以便第二网络设备基于第一BFD报文确定第一LSP的故障情况。In a fifth aspect, an embodiment of the present application also provides a first network device, which is applied to a label-switched path CR-LSP scenario of a constrained path. The first network device includes a receiving unit, a sending unit, and a processing unit. The receiving unit is configured to receive a first packet sent by the second network device through the first LSP to be detected, the first packet carries path information of the first LSP, and the source node of the first LSP is the first network device , The destination node of the first LSP is the second network device, and the first LSP includes a plurality of label switching node LSRs arranged in sequence. The processing unit is configured to establish a second LSP from the first network device to the second network device according to the path information. The second LSP includes multiple LSRs, and the sequence of the multiple LSRs in the second LSP is consistent with that of the multiple LSRs. The sequence in the first LSP is reversed. The sending unit is configured to send the first bidirectional link detection BFD packet to the second network device via the second LSP, so that the second network device determines the failure condition of the first LSP based on the first BFD packet.
在一些可能的实现方式中,第一网络设备中的接收单元,还用于接收第二网络设备经过第一LSP发送的第二BFD报文。In some possible implementation manners, the receiving unit in the first network device is further configured to receive the second BFD packet sent by the second network device via the first LSP.
在另一些可能的实现方式中,第一网络设备中的发送单元,还用于向第二网络设备发送第二报文,第二报文携带能力信息,能力信息用于表征第一网络设备具备建立第二LSP的能力。In other possible implementation manners, the sending unit in the first network device is also used to send a second message to the second network device. The second message carries capability information, and the capability information is used to characterize the capability of the first network device. The ability to establish a second LSP.
在又一些可能的实现方式中,第一网络设备中的处理单元,还用于在经过第二LSP向第二网络设备发送第一双向链路检测BFD报文之前,基于第一LSP和第二LSP,和第二网络设备协商BFD的配置参数;那么,该发送单元,具体用于:基于协商确定的配置参数,经过第二LSP向第二网络设备发送第一BFD报文。In still other possible implementation manners, the processing unit in the first network device is further configured to, before sending the first bidirectional link detection BFD message to the second network device via the second LSP, based on the first LSP and the second The LSP negotiates BFD configuration parameters with the second network device; then, the sending unit is specifically configured to send the first BFD packet to the second network device via the second LSP based on the configuration parameters determined through the negotiation.
可以理解的是,第一报文为LSP-Ping报文,路径信息通过LSP-Ping报文中扩展的类型长度值TLV字段携带。It can be understood that the first packet is an LSP-Ping packet, and the path information is carried by the extended type length value TLV field in the LSP-Ping packet.
需要说明的是,该第五方面提供的第一网络设备用于执行上述第一方面或第三方面提及的相关操作,其具体实现方式以及达到的效果,均可以参见上述第一方面和第三方面的相关描述,在此不再赘述。It should be noted that the first network device provided by the fifth aspect is used to perform the related operations mentioned in the first aspect or the third aspect. For the specific implementation and the achieved effects, please refer to the first aspect and the third aspect. The relevant description of the three aspects will not be repeated here.
第六方面,本申请实施例还提供了一种第二网络设备,应用于约束路径的标签交换路径CR-LSP场景,第二网络设备包括:发送单元、接收单元和处理单元。其中,发送单元用于经过待检测的第一LSP向第一网络设备发送第一报文,该第一报文中携带第一LSP的路径信息,该第一LSP的源节点为第二网络设备,目的节点为第一网络设备,第一LSP包括依次排列的多个标签交换节点LSR。接收单元用于接收第一网络设备经过第二LSP发送的第一双向链路检测BFD报文,其中,该第二LSP为第二网络设备基于路径信息建立的,第二LSP包括多个LSR,且多个LSR在第二LSP中的排列顺序与多个LSR在第一LSP中的排列顺序相反。处理单元用于基于第一BFD报文,确定第一LSP的检测结果。In a sixth aspect, the embodiments of the present application also provide a second network device, which is applied to a label-switched path CR-LSP scenario of a constrained path. The second network device includes a sending unit, a receiving unit, and a processing unit. The sending unit is configured to send a first packet to the first network device via the first LSP to be detected, the first packet carrying path information of the first LSP, and the source node of the first LSP is the second network device , The destination node is the first network device, and the first LSP includes a plurality of label switching node LSRs arranged in sequence. The receiving unit is configured to receive a first bidirectional link detection BFD message sent by the first network device via a second LSP, where the second LSP is established by the second network device based on path information, and the second LSP includes multiple LSRs, In addition, the sequence of the multiple LSRs in the second LSP is opposite to the sequence of the multiple LSRs in the first LSP. The processing unit is configured to determine the detection result of the first LSP based on the first BFD packet.
在一些可能的实现方式中,第二网络设备中的发送单元,还用于经过第一LSP向第一网络设备发送第二BFD报文。In some possible implementation manners, the sending unit in the second network device is further configured to send the second BFD packet to the first network device via the first LSP.
在另一些可能的实现方式中,第二网络设备中的接收单元,还用于接收第一网络设备发送的第二报文,第二报文携带能力信息,能力信息用于表征第一网络设备具备建立第二LSP的能力。In other possible implementation manners, the receiving unit in the second network device is also used to receive a second packet sent by the first network device, the second packet carries capability information, and the capability information is used to characterize the first network device Have the ability to establish a second LSP.
在又一些可能的实现方式中,第二网络设备中的处理单元,还用于在接收第一网络设备经过第二LSP发送的第一双向链路检测BFD报文之前,基于第一LSP和第二LSP,和第一网络设备协商BFD的配置参数;那么,该接收单元,具体用于:基于协商确定的配置参数,接收第一网络设备经过第二LSP发送的第一BFD报文。In still other possible implementation manners, the processing unit in the second network device is further configured to, before receiving the first bidirectional link detection BFD message sent by the first network device via the second LSP, based on the first LSP and the first LSP The second LSP negotiates BFD configuration parameters with the first network device; then, the receiving unit is specifically configured to: receive the first BFD message sent by the first network device via the second LSP based on the negotiated configuration parameters.
在再一些可能的实现方式中,第二网络设备中的处理单元,还用于若检测结果表征第一LSP故障,则,将第一LSP上承载的流量切换到第三LSP,第三LSP的源节点为第二网络设备,第三LSP的目的节点为第一网络设备。In still other possible implementation manners, the processing unit in the second network device is further configured to switch the traffic carried on the first LSP to the third LSP if the detection result indicates that the first LSP is faulty. The source node is the second network device, and the destination node of the third LSP is the first network device.
可以理解的是,第一报文为LSP-Ping报文,路径信息通过LSP-Ping报文中扩展的类型长度值TLV字段携带。It can be understood that the first packet is an LSP-Ping packet, and the path information is carried by the extended type length value TLV field in the LSP-Ping packet.
需要说明的是,该第六方面提供的第二网络设备用于执行上述第二方面或第四方面提及的相关操作,其具体实现方式以及达到的效果,均可以参见上述第二方面和第四方面的相关描述,在此不再赘述。It should be noted that the second network device provided by the sixth aspect is used to perform the related operations mentioned in the second aspect or the fourth aspect. For the specific implementation and the achieved effects, please refer to the second aspect and the first aspect. The description of the four aspects will not be repeated here.
第七方面,本申请实施例还提供了一种第一网络设备,包括:存储器和处理器。其中,存储器用于存储程序代码或指令;处理器用于运行程序代码或指令,使得设备执行以上第一方面或第三方面提供的方法。In a seventh aspect, an embodiment of the present application also provides a first network device, including: a memory and a processor. Among them, the memory is used to store program codes or instructions; the processor is used to run the program codes or instructions, so that the device executes the method provided in the first aspect or the third aspect.
第八方面,本申请实施例还提供了一种第二网络设备,包括:存储器和处理器。其中,存储器用于存储程序代码或指令;处理器用于运行程序代码或指令,使得设备执行以上第二方面或第四方面提供的方法。In an eighth aspect, an embodiment of the present application also provides a second network device, including: a memory and a processor. Among them, the memory is used to store program codes or instructions; the processor is used to run the program codes or instructions, so that the device executes the method provided in the above second or fourth aspect.
第九方面,本申请实施例还提供了一种网络系统,网络系统包括第五方面提供第一网络设备和第六方面提供的第二网络设备;或者,所述网络系统也可以包括第七方面提供第一网络设备和第八方面提供的第二网络设备。In the ninth aspect, the embodiments of the present application also provide a network system. The network system includes the first network device provided in the fifth aspect and the second network device provided in the sixth aspect; or, the network system may also include the seventh aspect Provide the first network device and the second network device provided in the eighth aspect.
第十方面,本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质中存储有程序代码或指令,当其在计算机上运行时,使得计算机执行以上第一方面、第二方面、第三方面或第四方面提供的任一种方法。In a tenth aspect, the embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores program codes or instructions, which when run on a computer, cause the computer to execute the first and second aspects above. Aspect, the third aspect, or any one of the methods provided in the fourth aspect.
第十一方面,本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在网络设备上运行时,使得网络设备执行第一方面、第二方面、第三方面或第四方面的任意一种可能的实现方式中提供的方法。In the eleventh aspect, the embodiments of the present application also provide a computer program product. When the computer program product is run on a network device, the network device can execute the first aspect, the second aspect, the third aspect, or the fourth aspect. The method provided in any one of the possible implementations.
附图说明Description of the drawings
图1为本申请实施例中一应用场景所涉及的网络系统框架示意图;FIG. 1 is a schematic diagram of a network system framework involved in an application scenario in an embodiment of this application;
图2为本申请实施例中一种对LSP 1的检测方法的信令流程图;Figure 2 is a signaling flow chart of a method for detecting LSP 1 in an embodiment of this application;
图3为本申请实施例中另一种对LSP 1的检测方法的信令流程图;FIG. 3 is a signaling flowchart of another method for detecting LSP 1 in an embodiment of this application;
图4为本申请实施例中一种故障检测方法100的信令流程图;FIG. 4 is a signaling flowchart of a fault detection method 100 in an embodiment of the application;
图5为本申请实施例中一种第一报文的格式示意图;FIG. 5 is a schematic diagram of a format of a first message in an embodiment of this application;
图6a为本申请实施例中一种第一报文扩展的TLV的格式示意图;FIG. 6a is a schematic diagram of the format of a TLV extended by a first message in an embodiment of this application;
图6b为本申请实施例中另一种第一报文扩展的TLV的格式示意图;FIG. 6b is a schematic diagram of the format of another TLV extended by the first message in an embodiment of this application;
图7为本申请实施例中一种第一网络设备700的结构示意图;FIG. 7 is a schematic structural diagram of a first network device 700 in an embodiment of this application;
图8为本申请实施例中一种第二网络设备800的结构示意图;FIG. 8 is a schematic structural diagram of a second network device 800 in an embodiment of this application;
图9为本申请实施例中另一种第一网络设备900的结构示意图;FIG. 9 is a schematic structural diagram of another first network device 900 in an embodiment of this application;
图10为本申请实施例中另一种第二网络设备1000的结构示意图;FIG. 10 is a schematic structural diagram of another second network device 1000 in an embodiment of this application;
图11为本申请实施例中一种网络系统1100的结构示意图。FIG. 11 is a schematic structural diagram of a network system 1100 in an embodiment of this application.
具体实施方式Detailed ways
MPLS TE隧道中通常包括源节点和目的节点均相同的多条LSP,为了确保该MPLS TE隧道能够有效的传输业务流,需要对其中的LSP进行故障检测,将故障的LSP上承载的业务流切换到其他无故障的LSP上,使得业务流能够在无故障的LSP上进行有效传输。BFD是一种快速收发报文的端到端检测机制,能够快速发送BFD报文并接收对端发送的BFD报文,确定正向BFD报文以及反向BFD报文所经链路的故障情况。由于BFD机制在源节点和目的节点之间能够实现毫秒级的收发BFD报文,所以,该BFD机制能够满足MPLS TE隧道中对LSP的故障检测需要快速的要求。An MPLS TE tunnel usually includes multiple LSPs with the same source node and destination node. In order to ensure that the MPLS TE tunnel can effectively transmit service streams, it is necessary to perform fault detection on the LSPs and switch the service streams carried on the failed LSP. To other fault-free LSPs, the service flow can be effectively transmitted on the fault-free LSPs. BFD is an end-to-end detection mechanism for quickly sending and receiving packets. It can quickly send BFD packets and receive BFD packets from the opposite end, and determine the fault condition of the link through which forward BFD packets and reverse BFD packets pass. . Since the BFD mechanism can realize the sending and receiving of BFD packets in milliseconds between the source node and the destination node, the BFD mechanism can meet the fast requirements for LSP fault detection in the MPLS TE tunnel.
目前,采用BFD机制对LSP进行故障检测的过程可以包括:源节点通过待检测的LSP向目的节点发出正向的BFD报文,目的节点通过IP路由的方式向源节点发送反向的BFD报文,源节点基于所接收到的反向的BFD报文确定该LSP是否存在故障。由于LSP是单向的约束路径,IP路由方式所确定的IP路径很可能和该LSP经过的标签交换节点LSR并不完全相同,这样,检测结果反映的就是LSP以及IP路由方式确定的IP路径的整体故障情况,而不单反映LSP是否发生故障。Currently, the process of using the BFD mechanism to detect LSP failures can include: the source node sends forward BFD packets to the destination node through the LSP to be detected, and the destination node sends reverse BFD packets to the source node through IP routing. , The source node determines whether the LSP is faulty based on the received reverse BFD packet. Since the LSP is a unidirectional constrained path, the IP path determined by the IP routing method may not be exactly the same as the LSR of the label switching node that the LSP passes through. In this way, the detection result reflects the IP path determined by the LSP and the IP routing method. The overall failure situation, rather than just reflecting whether the LSP has failed.
例如:以图1所示的MPLS TE场景为例,该场景中包括网络设备110、网络设备120、网络设备130、网络设备140和网络设备150,其中,LSP 1依次经过:网络设备 110->网络设备120->网络设备130;LSP 2依次经过:网络设备110->网络设备150->网络设备140->网络设备130。那么,如图2所示,在图1所示的场景中,对该LSP 1进行故障检测的过程具体可以包括:S11,网络设备110经过LSP 1向网络设备130发送BFD报文1;S12,网络设备130基于IP路由方式,通过IP路径1向网络设备110发送BFD报文2,其中,IP路径1依次经过网络设备130->网络设备140->网络设备150->网络设备110;S13,网络设备110根据BFD报文2,确定检测结果;S14,若检测结果表征故障,则,将LSP 1上承载的流量切换到LSP 2上。需要说明的是,检测结果表征故障,可能是LSP 1经过的网络设备或链路故障导致的,也可能是IP路径1经过的链路或网络设备故障导致的,如果是IP路径1经过链路或网络设备故障,由于IP路径1和LSP 2包括的所有LSR均相同,LSP 2很可能发生故障,则,S14执行之后,很可能将流量从正常状态的LSP 1误切换到发生故障的LSP 2上,从而使得流量无法在MPLS TE隧道中有效传输。For example: Take the MPLS TE scenario shown in Figure 1 as an example. This scenario includes network equipment 110, network equipment 120, network equipment 130, network equipment 140, and network equipment 150, where LSP 1 passes through: network equipment 110-> Network equipment 120->network equipment 130; LSP 2 goes through in sequence: network equipment 110->network equipment 150->network equipment 140->network equipment 130. Then, as shown in FIG. 2, in the scenario shown in FIG. 1, the process of performing fault detection on the LSP 1 may specifically include: S11, the network device 110 sends a BFD message 1 to the network device 130 through the LSP 1; S12, Based on the IP routing method, the network device 130 sends the BFD message 2 to the network device 110 through the IP path 1, where the IP path 1 passes through the network device 130->network device 140->network device 150->network device 110 in turn; S13, The network device 110 determines the detection result according to the BFD message 2; S14, if the detection result indicates a failure, it switches the traffic carried on the LSP 1 to the LSP 2. It should be noted that the detection result indicates the failure, which may be caused by the failure of the network equipment or link that LSP 1 passes through, or the link or network equipment that IP path 1 passes through. If IP path 1 passes through the link Or network equipment failure. Since all LSRs included in IP path 1 and LSP 2 are the same, LSP 2 is likely to fail. Then, after S14 is executed, it is likely that traffic will be switched from the normal LSP 1 to the failed LSP 2 by mistake. Therefore, the traffic cannot be effectively transmitted in the MPLS TE tunnel.
基于此,在本申请实施例中,提供了一种故障检测方法,应用于CR-LSP场景中,对于待检测的第一LSP,通过源节点将待检测的第一LSP的路径信息告知目的节点,目的节点基于路径信息建立与待检测的第一LSP反向共路的第二LSP,使得BFD检测中反向的BFD报文能够和正向的BFD报文通过反向共路的第二LSP和第一LSP进行传输,克服了BFD机制的双向性和LSP单向性的冲突,即,目前的BFD检测中BFD报文和响应报文大概率不共路,导致检测结果无法准确反映LSP故障情况的问题,实现对LSP更加快速、准确的故障检测。Based on this, in the embodiment of the present application, a fault detection method is provided, which is applied in a CR-LSP scenario. For the first LSP to be detected, the source node informs the destination node of the path information of the first LSP to be detected , The destination node establishes a second LSP that is in the reverse direction with the first LSP to be detected based on the path information, so that the reverse BFD packet in the BFD detection can pass through the second LSP and the forward BFD packet in the reverse direction. The transmission of the first LSP overcomes the conflict between the bidirectionality of the BFD mechanism and the unidirectionality of the LSP. That is, in the current BFD detection, the BFD message and the response message are likely to not share the same path, which causes the detection result to fail to accurately reflect the LSP failure situation. Problem, to achieve faster and more accurate fault detection for LSP.
举例来说,仍然以图1所示的场景为例,在本申请实施例中,参见图3,具体的故障检测过程可以包括:S21,网络设备110经过LSP 1向网络设备130发送LSP-Ping报文,该LSP-Ping报文中携带LSP 1的路径信息,例如:LSP 1中包括的各节点的IP地址列表,如图1所示,在网络设备110到网络设备120的链路上网络设备110对应的IP地址为IP 1,在网络设备120到网络设备130的链路上网络设备120对应的IP地址为IP 3,那么,LSP 1的路径信息包括:IP 1和IP 3;S22,网络设备130根据LSP 1的路径信息,建立LSP 1’,该LSP 1’依次经过:网络设备130->网络设备120->网络设备110,如图1所示,在网络设备130到网络设备120的链路上网络设备130对应的IP地址为IP 4,在网络设备120到网络设备110的链路上网络设备120对应的IP地址为IP 2,那么,LSP 1’的路径信息可以包括:IP 4和IP 2;S23,网络设备110和网络设备130协商确定BFD的配置参数,例如:BFD检测周期;S24,网络设备110基于协商确定的配置参数,经过LSP 1向网络设备130发送BFD报文1;S25,网络设备130基于所述配置参数,经过LSP 1’向网络设备110发送BFD报文2;S26,网络设备110基于BFD报文2,确定对LSP 1的检测结果。这样,通过网络设备110将LSP 1的路径信息告知网络设备130,网络设备130基于该路径信息可以建立与LSP 1反向共路的LSP 1’,使得BFD检测中BFD报文和响应报文能够通过反向共路的LSP 1和LSP 1’进行传输,经过相同的LSR,检测结果能够准确反映LSP 1的故障检测。For example, still taking the scenario shown in FIG. 1 as an example, in the embodiment of the present application, referring to FIG. 3, the specific fault detection process may include: S21, the network device 110 sends an LSP-Ping to the network device 130 through the LSP 1 Message, the LSP-Ping message carries path information of LSP 1, for example: the IP address list of each node included in LSP 1, as shown in Figure 1, on the link from network device 110 to network device 120 The IP address corresponding to the device 110 is IP 1, and the IP address corresponding to the network device 120 on the link from the network device 120 to the network device 130 is IP 3. Then, the path information of the LSP 1 includes: IP 1 and IP 3; S22, The network device 130 establishes an LSP 1'according to the path information of the LSP 1, and the LSP 1'passes through: network device 130->network device 120->network device 110, as shown in Figure 1, from network device 130 to network device 120 The IP address corresponding to the network device 130 on the link is IP 4, and the IP address corresponding to the network device 120 on the link from the network device 120 to the network device 110 is IP 2. Then, the path information of the LSP 1'can include: IP 4 and IP 2; S23, the network device 110 and the network device 130 negotiate to determine the configuration parameters of BFD, for example: BFD detection period; S24, the network device 110 sends a BFD packet to the network device 130 through the LSP 1 based on the configuration parameters determined by the negotiation 1; S25, the network device 130 sends a BFD packet 2 to the network device 110 via the LSP 1'based on the configuration parameters; S26, the network device 110 determines the detection result of the LSP 1 based on the BFD packet 2. In this way, the network device 110 informs the network device 130 of the path information of the LSP 1, and the network device 130 can establish an LSP 1'that shares the reverse path with the LSP 1 based on the path information, so that the BFD message and response message in the BFD detection can be Transmission is carried out through the reverse common-path LSP 1 and LSP 1'. After the same LSR, the detection result can accurately reflect the failure detection of LSP 1.
可以理解的是,上述场景仅是本申请实施例提供的一个场景示例,本申请实施例并不限于此场景。It is understandable that the foregoing scenario is only an example of a scenario provided in an embodiment of the present application, and the embodiment of the present application is not limited to this scenario.
需要说明的是,本申请实施例中,网络设备和节点在本申请中指代相同的含义,可以相互替换使用。本申请实施例中,网络设备具体可以包括但不限于交换机、路由器或防火墙等。It should be noted that, in the embodiments of this application, network equipment and nodes refer to the same meaning in this application, and can be used interchangeably. In the embodiment of the present application, the network device may specifically include, but is not limited to, a switch, a router, or a firewall.
需要说明的是,本申请实施例中,LSP可以是源节点和目的节点之间通过链路开销或标签等约束后确定的CR-LSP,该CR-LSP是单向路径,其上包括多个有序排列的标签交换节点LSR。相邻的LSR之间可以是直接相连的,也可以通过中转节点相连,在本申请实施例中,对于待检测LSP以及建立的与其反向共路的LSP,只关注其包括的LSR,对于是否包括中转节点、中转节点是否一致不予考虑。It should be noted that, in this embodiment of the application, the LSP may be a CR-LSP determined between the source node and the destination node through constraints such as link costs or labels. The CR-LSP is a unidirectional path and includes multiple Orderly arranged label switching node LSR. Adjacent LSRs can be directly connected or connected through a transit node. In the embodiment of this application, for the LSP to be detected and the established LSP in the reverse direction, only the LSRs included in it are concerned. Including transit nodes and whether the transit nodes are consistent will not be considered.
可以理解的是,本申请实施例中,两条LSP反向共路,是指两条LSP包括的所有LSR均相同,且,一条LSP中LSR的排列顺序和另一条LSP中LSR的排列顺序相反,例如:一条LSP中源节点是另一条LSP的目的节点,一条LSP中目的节点是另一条LSP的源节点,一条LSP中第二个LSR是另一条LSP的倒数第二个LSR,以此类推。It is understandable that, in the embodiment of the present application, two LSPs are in the reverse common path, which means that all LSRs included in the two LSPs are the same, and the order of the LSRs in one LSP is opposite to the order of the LSRs in the other LSP. For example: the source node in an LSP is the destination node of another LSP, the destination node in an LSP is the source node of another LSP, the second LSR in an LSP is the penultimate LSR of another LSP, and so on .
下面结合附图,通过实施例来详细说明本申请实施例中一种故障检测方法的具体实现方式。The specific implementation of a fault detection method in the embodiment of the present application will be described in detail below with reference to the accompanying drawings and embodiments.
图4为本申请实施例中一种故障检测方法100的信令流程图。参见图4,该方法100应用于CR-LSP场景中,以待检测的第一LSP的源节点和目的节点之间的交互介绍本申请实施例。该方法100例如可以应用在图1所示的网络场景中,一个示例下,方法100可以是对网络设备110到网络设备130的LSP 1进行故障检测,其中,LSP 1、LSP 1’分别对应于方法100中的第一LSP和第二LSP,网络设备110、网络设备130分别对应于方法100中的第二网络设备和第一网络设备;作为另一个示例,方法100也可以是对网络设备130到网络设备110的LSP 1’进行故障检测,其中,LSP 1’、LSP 1分别对应于方法100中的第一LSP和第二LSP,网络设备130、网络设备110分别对应于方法100中的第二网络设备和第一网络设备。FIG. 4 is a signaling flowchart of a fault detection method 100 in an embodiment of the application. Referring to FIG. 4, the method 100 is applied in a CR-LSP scenario, and the embodiment of the present application is introduced with the interaction between the source node and the destination node of the first LSP to be detected. The method 100 may be applied to the network scenario shown in FIG. 1, for example, in an example, the method 100 may be to perform fault detection on the LSP 1 from the network device 110 to the network device 130, where LSP 1 and LSP 1'respectively correspond to The first LSP and the second LSP in the method 100, the network device 110 and the network device 130 respectively correspond to the second network device and the first network device in the method 100; as another example, the method 100 can also be used for the network device 130 Perform fault detection on the LSP 1'of the network device 110, where LSP 1'and LSP 1 respectively correspond to the first LSP and the second LSP in the method 100, and the network device 130 and the network device 110 respectively correspond to the first LSP in the method 100. The second network device and the first network device.
具体实现时,该方法100例如可以包括下述S101~S108:During specific implementation, the method 100 may include the following S101 to S108, for example:
S101,第二网络设备经过待检测的第一LSP向第一网络设备发送第一报文,该第一报文中携带第一LSP的路径信息,第一LSP的源节点为第二网络设备,第一LSP的目的节点为所述第一网络设备,且该第一LSP包括依次排列的多个LSR。S101: The second network device sends a first packet to the first network device via the first LSP to be detected, where the first packet carries path information of the first LSP, and the source node of the first LSP is the second network device, The destination node of the first LSP is the first network device, and the first LSP includes multiple LSRs arranged in sequence.
S102,第一网络设备接收第二网络设备经过待检测的第一LSP发送的第一报文。S102: The first network device receives a first packet sent by the second network device through the first LSP to be detected.
第一LSP,是指第二网络设备申请创建的,从第二网络设备到第一网络设备的LSP。该第一LSP可以包括多个LSR,对于创建好的第一LSP,该多个LSR在第一LSP中的位置固定,即,第一LSP包括依次排列的多个LSR。例如:假设第一LSP为图1所示的场景中的LSP 1,那么,第一LSP包括依次排列的多个LSR,分别为:网络设备110、网络设备120和网络设备130。该第一LSP的多个LSR中除了包括第一LSP的源节点(即,第二网络设备)和目的节点(即,第一网络设备),还可以包括其他至少一个LSR,例如:LSP 1的多个LSR中,源节点为网络设备110,目的节点为网络设备130,其他LSR仅包括网络设备120。The first LSP refers to the LSP created by the second network device from the second network device to the first network device. The first LSP may include multiple LSRs. For the created first LSP, the positions of the multiple LSRs in the first LSP are fixed, that is, the first LSP includes multiple LSRs arranged in sequence. For example, assuming that the first LSP is LSP 1 in the scenario shown in FIG. 1, the first LSP includes a plurality of LSRs arranged in sequence, namely: network device 110, network device 120, and network device 130. In addition to the source node (ie, the second network device) and the destination node (ie, the first network device) of the first LSP, the multiple LSRs of the first LSP may also include at least one other LSR, such as: Among the multiple LSRs, the source node is the network device 110, the destination node is the network device 130, and other LSRs only include the network device 120.
作为一个示例,在执行S101之前,本申请实施例还可以包括:S31,第二网络设备申请建立从该第二网络设备到第一网络设备的CR-LSP,通过与第一网络设备的配合建立第一LSP,并保存该第一LSP的路径信息;S32,若需要对第一LSP进行故障检测,则,第二网络设备可以使能BFD,触发建立BFD会话,例如:可以通过配置命令的方式,使能第二网络设备上的BFD能力。As an example, before performing S101, the embodiment of the present application may further include: S31, the second network device applies to establish a CR-LSP from the second network device to the first network device, and establishes the CR-LSP through cooperation with the first network device The first LSP, and save the path information of the first LSP; S32, if the first LSP needs to be detected for failure, the second network device can enable BFD to trigger the establishment of a BFD session, for example: through configuration commands To enable the BFD capability on the second network device.
其中,路径信息用于指示第一LSP所经历的LSR以及各LSR在第一LSP中出现的先后顺序,例如:第一LSP的路径信息可以是各跳LSR的IP地址组成的IP地址列表,各IP地址在该IP地址列表中的位置和该IP地址对应的LSR在第一LSP中的位置匹配。假设第一LSP为图1所示场景中的LSP 1,而且,网络设备110的IP地址为IP 1,网络设备120的IP地址为IP 2,网络设备130的IP地址为IP 3,那么,第一LSP的路径信息中,依次为:IP 1、IP 2和IP 3。The path information is used to indicate the LSR experienced by the first LSP and the sequence in which each LSR appears in the first LSP. For example, the path information of the first LSP may be an IP address list composed of the IP addresses of each hop LSR, each The position of the IP address in the IP address list matches the position of the LSR corresponding to the IP address in the first LSP. Assuming that the first LSP is the LSP 1 in the scenario shown in FIG. 1, and the IP address of the network device 110 is IP 1, the IP address of the network device 120 is IP 2, and the IP address of the network device 130 is IP 3. Then, the first The path information of an LSP is as follows: IP 1, IP 2, and IP 3.
具体实现时,当执行上述S32之后,第二网络设备即可基于配置信息,生成第一报文,并将第一报文发送给第一网络设备,用于告知第一网络设备待检测的第一LSP的路径信息,为后续S103中第一网络设备建立与第一LSP反向共路的第二LSP提供了数据基础。In specific implementation, after the above S32 is executed, the second network device can generate a first message based on the configuration information, and send the first message to the first network device to inform the first network device of the first message to be detected. The path information of an LSP provides a data basis for the first network device to establish a second LSP that is in the reverse direction with the first LSP in the subsequent S103.
作为一个示例,第一报文可以是LSP-Ping报文,具体格式参见图5所示,具体可以包括:版本号(英文:Version Number)字段,用于标识MPLS命令的版本号,例如:该版本号字段可以取1;填零(英文:Must Be Zero)字段,必须全部填0,接收到该报文时可以忽略该字段;消息类型(英文:Message Type)字段,用于标识该MPLS命令消息的类型,例如:当Message Type=1,表征该LSP-Ping报文为请求消息,当Message Type=2,表征该LSP-Ping报文为响应消息;答复模式(英文:Reply Mode)字段,用于指示接收该报文的节点采用的回复方式,例如:当Reply Mode=1,表征不需要回复,当Reply Mode=2,表征通过第四版互联网协议(英文:Internet Protocol version 4,简称:IPv4)用户数据报协议(英文:User Datagram Protocol,简称:UDP)数据包进行回复,当Reply Mode=3,表征通过带有路由器报警的IPv4UDP数据包进行回复;返回代码(英文:Return Code)字段,发送端可以设置该字段的取值为0,接收端可以设置该字段的取值为0-7,具体取值和表征的含义可以根据需求灵活设置,在此不再赘述;返回子代码(英文:Return Subcode)字段,用于标识标签栈的处理结束的指针,例如:当Return Subcode=0,表征该报文未携带标签,不需要处理标签,当Return Subcode取其它值,表征该报文携带了标签;发送者句柄(英文:Sender’s Handle)字段,用于标识具体的MPLS命令,其取值可以是发送一个MPLS命令请求时的随机产生的;序列号(英文:Sequence Number)字段,同样用于标识具体的MPLS命令,在一个进程内有效;时间戳(英文:Timestamp)字段,具体可以采用网络时间协议(英文:Network Time Protocol,简称:NTP)定义的时间格式,具体可以包括发送时间(如:秒对应的字段和毫秒对应的字段)和接收时间(如:秒对应的字段和毫秒对应的字段);预留区域,该预留区域可以扩展多个类型长度值(英文:Type Length Value,简称:TLV)字段。As an example, the first message may be an LSP-Ping message. The specific format is shown in Figure 5, and it may specifically include a version number (English: Version Number) field, which is used to identify the version number of the MPLS command, for example: The version number field can be 1; the zero (English: Must Be Zero) field must be filled with all 0s, and this field can be ignored when the message is received; the message type (English: Message Type) field is used to identify the MPLS command The type of the message, for example: when Message Type=1, it indicates that the LSP-Ping message is a request message; when Message Type=2, it indicates that the LSP-Ping message is a response message; the reply mode (English: Reply Mode) field, It is used to indicate the reply mode adopted by the node receiving the message. For example, when Reply Mode=1, it means that no reply is required. When Reply Mode=2, it means that the fourth version of the Internet Protocol (English: Internet Protocol version 4, abbreviated as: IPv4) User Datagram Protocol (English: User Datagram Protocol, abbreviated as: UDP) data packet to reply, when Reply Mode=3, it means that the reply is made through the IPv4UDP data packet with router alarm; the return code (English: Return Code) field , The sending end can set the value of this field to 0, and the receiving end can set the value of this field to 0-7. The specific value and the meaning of the characterization can be flexibly set according to requirements, and will not be repeated here; return subcode ( English: Return Subcode) field, a pointer used to identify the end of the processing of the label stack, for example: when Return Subcode = 0, it means that the message does not carry a label and does not need to process the label. When Return Subcode takes other values, it represents the message Carries a label; the sender handle (English: Sender's Handle) field is used to identify a specific MPLS command, and its value can be randomly generated when an MPLS command request is sent; the sequence number (English: Sequence Number) field, the same Used to identify a specific MPLS command, valid in a process; the timestamp (English: Timestamp) field, specifically can use the time format defined by the Network Time Protocol (English: Network Time Protocol, abbreviated as: NTP), which can specifically include the sending time (For example: the field corresponding to the second and the field corresponding to the millisecond) and the receiving time (for example: the field corresponding to the second and the field corresponding to the millisecond); reserved area, the reserved area can be extended with multiple type length values (English: Type Length Value (abbreviation: TLV) field.
本申请实施例中,第一报文具体可以是LSP-Ping报文中的LSP-Ping请求报文,即, 在图5所示的LSP-Ping报文格式中,设置Message Type=1,Reply Mode=2,并在预留区域扩展TLV字段,携带第一LSP对应的路径信息。仍然以图1所示的LSP 1为第一LSP为例,第一LSP的路径信息依次为:IP 1和IP 3,一种情况下,第一报文可以通过在LSP-Ping报文中扩展一个TLV字段携带路径信息。例如:扩展的TLV字段的格式可以参见图6a所示,在该扩展的TLV中,Type可以取127,用于标识该TLV字段携带的是LSP 1的路径信息,Length的取值等于该扩展TLV字段的长度;Value可以包括保留字段、地址个数(英文:Hop Num)以及具体的路径信息,具体而言,保留字段可以全部填0,Hop Num可以取2,路径信息可以包括IP 1和IP 3。另一种情况下,第一报文也可以通过在LSP-Ping报文中扩展多个TLV字段,多个TLV字段共同携带该路径信息,每个TLV字段携带路径信息中的一个IP地址。又例如:扩展的TLV字段的格式可以参见图6b所示,扩展2个TLV:TLV 1和TLV 2,其中,TLV 1中的Type 1可以取127,用于标识该TLV 1字段携带的是LSP 1的路径信息,Length 1的取值等于该扩展TLV 1字段的长度;Value 1可以包括保留字段(可以全部填0)、Hop Num=1以及IP 1;TLV 2中的Type 2可以取127,用于标识该TLV 2字段携带的是LSP 1的路径信息,Length 2的取值等于该扩展TLV 2字段的长度;Value 2可以包括保留字段(可以全部填0)、Hop Num=1以及IP 3。需要说明的是,该LSP-Ping报文的格式以及相关字段含义,可在日期为2006年2月的题为“Detecting Multi-Protocol Label Switched(MPLS)Data Plane Failures”的RFC4379中找到,其全部内容通过引证结合于此,犹如全部陈述的一样,在此不再赘述。In the embodiment of this application, the first message may specifically be the LSP-Ping request message in the LSP-Ping message, that is, in the LSP-Ping message format shown in FIG. 5, Message Type=1, Reply Mode=2, and extend the TLV field in the reserved area to carry path information corresponding to the first LSP. Still taking the LSP 1 shown in Figure 1 as the first LSP as an example, the path information of the first LSP is: IP 1 and IP 3 in order. In one case, the first packet can be extended in the LSP-Ping packet A TLV field carries path information. For example, the format of the extended TLV field can be seen in Figure 6a. In the extended TLV, Type can be 127, which is used to identify that the TLV field carries path information of LSP 1, and the value of Length is equal to the extended TLV. The length of the field; Value can include reserved fields, the number of addresses (English: Hop Num), and specific path information. Specifically, reserved fields can be filled with 0, Hop Num can be 2, and path information can include IP 1 and IP 3. In another case, the first message can also extend multiple TLV fields in the LSP-Ping message, and multiple TLV fields collectively carry the path information, and each TLV field carries an IP address in the path information. For another example, the format of the extended TLV field can be seen in Figure 6b. Two TLVs are extended: TLV 1 and TLV 2, where Type 1 in TLV 1 can be 127, which is used to identify that the TLV 1 field carries LSP Path information of 1, the value of Length 1 is equal to the length of the extended TLV 1 field; Value 1 can include reserved fields (all 0s can be filled in), Hop Num = 1, and IP 1; Type 2 in TLV 2 can be 127, It is used to identify that the TLV 2 field carries the path information of LSP 1, and the value of Length 2 is equal to the length of the extended TLV 2 field; Value 2 can include reserved fields (all 0s can be filled in), Hop Num = 1, and IP 3 . It should be noted that the format of the LSP-Ping message and the meaning of related fields can be found in RFC4379 entitled "Detecting Multi-Protocol Label Switched (MPLS) Data Plane Failures" dated February 2006, all of which The content is incorporated here by citation, just like all statements, so I won’t repeat it here.
S103,第一网络设备根据路径信息,建立从第一网络设备到第二网络设备的第二LSP,该第二LSP包括所述多个LSR,且所述多个LSR在第二LSP中的排列顺序与所述多个LSR在第一LSP中的排列顺序相反。S103: The first network device establishes a second LSP from the first network device to the second network device according to the path information, the second LSP includes the multiple LSRs, and the arrangement of the multiple LSRs in the second LSP The sequence is opposite to the sequence of the multiple LSRs in the first LSP.
可以理解的是,第一网络设备在接收到携带第一LSP的路径信息的第一报文后,在执行下述S103之前,可以先判断自身是否具有创建与第一LSP反向共路的第二LSP的能力,如果有,则,执行S103;如果没有,则,不执行S103~S108。It is understandable that, after receiving the first packet carrying the path information of the first LSP, the first network device may first determine whether it has the first packet that carries the path information of the first LSP before performing the following S103. Second, if the LSP has the capability, S103 is executed; if not, S103 to S108 are not executed.
作为一个示例,S103具体可以包括:第一网络设备根据路径信息,确定需要建立的第二LSP依次需要经过的LSR;第一网络设备根据所确定的LSR,与第二网络设备配合创建该第二LSP。第二LSP,是指第一网络设备申请创建的与第一LSP反向共路的LSP,该第二LSP的源节点为第一网络设备,目的节点为第二网络设备。以图1所示的LSP 1为第一LSP,LSP 1’为第二LSP为例,第二LSP的路径信息依次为:IP 4和IP 2。As an example, S103 may specifically include: the first network device determines, according to the path information, the LSRs that the second LSP that needs to be established in turn needs to pass through; the first network device cooperates with the second network device to create the second network device according to the determined LSR. LSP. The second LSP refers to an LSP that is in the reverse direction of the first LSP created by the first network device, and the source node of the second LSP is the first network device, and the destination node is the second network device. Taking LSP 1 shown in Figure 1 as the first LSP and LSP 1'as the second LSP as an example, the path information of the second LSP is: IP 4 and IP 2 in order.
在本申请实施例中,S103之后,还可以包括:第一网络设备可以使能BFD,触发建立回程BFD会话,例如:可以通过配置命令的方式,使能第一网络设备上的BFD能力。In the embodiment of the present application, after S103, it may further include: the first network device may enable BFD to trigger the establishment of a backhaul BFD session, for example, the BFD capability on the first network device may be enabled through a configuration command.
此外,为了能够让第二网络设备知晓第一网络设备具有建立与第一LSP反向共路的第二LSP的能力,第一网络设备还可以向第二网络设备发送第二报文,该第二报文携带能力信息,该能力信息用于表征第一网络设备具备建立第二LSP的能力。需要说明的是,第一网络设备向第二网络设备发送第二报文的时机,可以在S103之前执行,也可以在S103之后执行,还可以和S103同时执行,在本申请实施例中不作具体限定。In addition, in order to let the second network device know that the first network device has the ability to establish a second LSP that is in the reverse common path with the first LSP, the first network device may also send a second packet to the second network device. The second message carries capability information, which is used to characterize that the first network device has the ability to establish a second LSP. It should be noted that the timing for the first network device to send the second message to the second network device can be performed before S103, after S103, or simultaneously with S103, which will not be specified in this embodiment of the application. limited.
例如,第二报文具体可以是LSP-Ping报文中的LSP-Ping响应报文,即,在图5所示 的LSP-Ping报文格式中,设置Message Type=2,Return Code=8(即,表征第一网络设备已经收第一LSP的路径信息且支持建立与第一LSP反向共路的LSP)。For example, the second message may specifically be the LSP-Ping response message in the LSP-Ping message, that is, in the LSP-Ping message format shown in FIG. 5, set Message Type=2 and Return Code=8( That is, it indicates that the first network device has received the path information of the first LSP and supports the establishment of an LSP that shares a reverse path with the first LSP).
需要说明的是,如果第一网络设备确定自身不具有创建与第一LSP反向共路的第二LSP的能力,则第一网络设备可以根据实际需求,进行不同的操作,例如:第一网络设备可以通过IP路由方式向第二网络设备发送第二报文,该第二报文中携带能力信息,该能力信息用于指示第一网络设备不具备建立第二LSP的能力,那么,第二网络设备可以作出故障检测的具体决策,如:第二报文具体为LSP-Ping报文中的LSP-Ping响应报文,即,在图5所示的LSP-Ping报文格式中,设置Message Type=2,Return Code=2(即,表征第一网络设备已经收第一LSP的路径信息但不支持建立与第一LSP反向共路的LSP);又例如:第一网络设备也可以不对第一报文作回复,那么,第二网络设备可以设置其在开始发送BFD报文之前,每隔预设时长(如:1秒)向第一网络设备发送一次第一报文,在连续发送第一报文的次数达到预设次数(如:3次)时,确定第一网络设备不具备建立第二LSP的能力。It should be noted that if the first network device determines that it does not have the ability to create a second LSP that shares a reverse path with the first LSP, the first network device can perform different operations according to actual needs, for example: the first network The device may send a second packet to the second network device through IP routing. The second packet carries capability information, and the capability information is used to indicate that the first network device does not have the ability to establish a second LSP, then the second The network device can make specific decisions about fault detection. For example, the second message is specifically the LSP-Ping response message in the LSP-Ping message, that is, in the LSP-Ping message format shown in Figure 5, set Message Type=2, Return Code=2 (that is, it indicates that the first network device has received the path information of the first LSP but does not support the establishment of an LSP that shares a reverse path with the first LSP); another example: the first network device may be wrong Reply to the first message, then the second network device can set it to send the first message to the first network device at a preset time interval (for example: 1 second) before it starts to send the BFD message. When the number of first messages reaches the preset number (for example, 3 times), it is determined that the first network device does not have the ability to establish a second LSP.
当第二网络设备确定第一网络设备不具备建立第二LSP的能力后,根据用户的实际故障检测需求,可以选择不再使用无法准确检测故障的BFD机制对第一LSP进行故障检测;或者,也可以选择使用目前的BFD机制检测第一LSP的故障情况。其中,目前的BFD机制检测第一LSP的故障的过程例如可以包括:S41,第二网络设备向第一网络设备发送LSP-Ping请求报文,其中携带第二网络设备的标识符;S42,第一网络设备记录第二网络设备的标识符,并将自己的标识符和第二网络设备的标识符均携带在LSP-Ping响应报文中,发送给第二网络设备;S43,第二网络设备记录第一网络设备的标识符;S44,第二网络设备和第一网络设备协商确定BFD的配置参数;S45,第二网络设备经过第一LSP向第一网络设备发送正向的BFD报文;S46,第一网络设备经过IP路由的方式向第二网络设备发送反向的BFD报文;S47,第二网络设备根据该反向的BFD报文确定第一LSP的故障情况。When the second network device determines that the first network device does not have the ability to establish the second LSP, it can choose not to use the BFD mechanism that cannot accurately detect the failure to perform failure detection on the first LSP according to the actual failure detection requirements of the user; or, You can also choose to use the current BFD mechanism to detect the failure of the first LSP. Wherein, the current BFD mechanism for detecting the failure of the first LSP may include, for example: S41, the second network device sends an LSP-Ping request message to the first network device, which carries the identifier of the second network device; S42, A network device records the identifier of the second network device, carries both its own identifier and the identifier of the second network device in the LSP-Ping response message, and sends it to the second network device; S43, the second network device Record the identifier of the first network device; S44, the second network device negotiates with the first network device to determine BFD configuration parameters; S45, the second network device sends a forward BFD packet to the first network device through the first LSP; S46, the first network device sends a reverse BFD packet to the second network device via IP routing; S47, the second network device determines the fault condition of the first LSP according to the reverse BFD packet.
需要说明的是,建立第二LSP不成功,可能是由于第一网络设备不支持建立第二LSP,也可能是由于其他原因,例如:标签资源不足。本申请实施例中的“第一网络设备不具备建立第二LSP的能力”,可以指第一网络设备不支持建立第二LSP,也可以指由于其他原因导致建立第二LSP不成功的情况。It should be noted that the unsuccessful establishment of the second LSP may be because the first network device does not support the establishment of the second LSP, or it may be due to other reasons, such as insufficient label resources. "The first network device does not have the ability to establish a second LSP" in the embodiments of the present application may mean that the first network device does not support the establishment of the second LSP, or it may refer to a situation where the establishment of the second LSP is unsuccessful due to other reasons.
可见,本申请实施例中,可以通过让源节点感知到目的节点建立反向共路LSP能力,使得源节点能够决策后续故障检测中采用的具体方式,从而使得对CR-LSP场景中LSP的故障检测更加灵活。It can be seen that in the embodiment of the present application, the source node can perceive the destination node to establish the reverse common-path LSP capability, so that the source node can decide the specific method used in subsequent failure detection, so that the failure of the LSP in the CR-LSP scenario Detection is more flexible.
需要说明的是,本申请实施例中,建立与待检测的第一LSP反向共路的第二LSP,为后续采用BFD机制检测第一LSP时,能够让BFD报文的响应报文和BFD报文经过反向共路的LSP传输,从而准确的检测出第一LSP的故障情况,提供了必不可少的数据基础。It should be noted that, in the embodiment of the present application, a second LSP that is in the reverse direction of the first LSP to be detected is established, so that when the BFD mechanism is subsequently used to detect the first LSP, the response message of the BFD message and the BFD The message is transmitted through the reverse common-path LSP, thereby accurately detecting the failure of the first LSP, providing an indispensable data foundation.
S104,第二网络设备经过第一LSP向第一网络设备发送第一BFD报文。S104: The second network device sends the first BFD packet to the first network device through the first LSP.
S105,第一网络设备接收第二网络设备经过第一LSP发送的第一BFD报文。S105: The first network device receives the first BFD packet sent by the second network device via the first LSP.
S106,第一网络设备经过第二LSP向第二网络设备发送第二BFD报文。S106: The first network device sends a second BFD packet to the second network device through the second LSP.
S107,第二网络设备接收第一网络设备经过第二LSP发送的所述第二BFD报文。S107: The second network device receives the second BFD packet sent by the first network device via the second LSP.
S108,第二网络设备基于该第二BFD报文,确定第一LSP的检测结果。S108: The second network device determines the detection result of the first LSP based on the second BFD packet.
可以理解的是,本申请实施例中,采用BFD机制检测待检测的LSP的故障情况的过程,包括三个部分:第一部分,建立与待检测的LSP反向共路的LSP;第二部分,协商确定收发BFD报文的配置参数;第三部分,基于第一部分和第二部分的操作结果,通过BFD报文以及其对应的响应报文,对待检测的LSP进行故障检测。其中,第一部分可以对应上述S101~S103,第二部分实施的具体过程可以是:在S103和S104之间,基于第一LSP和第二LSP,第一网络设备和第二网络设备协商BFD的配置参数,该配置参数用于规范后续执行S104-S107的参数,例如:执行S104和S107的周期(例如:10秒)。第三部分可以是:第二网络设备基于协商确定的所述配置参数,经过第一LSP向第一网络设备发送正向的第一BFD报文;而第一网络设备接收到第一BFD报文后,也基于协商确定的所述配置参数,经过第二LSP向第二网络设备发送反向的第二BFD报文;第二网络设备接收到第二BFD报文确定第一LSP的检测结果。It is understandable that, in the embodiment of the present application, the process of using the BFD mechanism to detect the failure of the LSP to be detected includes three parts: the first part is to establish an LSP that shares the reverse path with the LSP to be detected; the second part, The configuration parameters for sending and receiving BFD messages are determined through negotiation; the third part, based on the operation results of the first and second parts, performs fault detection on the LSP to be detected through the BFD message and its corresponding response message. Among them, the first part can correspond to the above S101 to S103, and the specific process implemented in the second part can be: between S103 and S104, based on the first LSP and the second LSP, the first network device and the second network device negotiate the configuration of BFD Parameters, the configuration parameters are used to standardize the parameters for subsequent execution of S104-S107, for example: the period of execution of S104 and S107 (for example: 10 seconds). The third part may be: the second network device sends a forward first BFD packet to the first network device via the first LSP based on the configuration parameters determined through negotiation; and the first network device receives the first BFD packet Then, based on the configuration parameters determined through negotiation, a second reverse BFD packet is sent to the second network device via the second LSP; the second network device receives the second BFD packet to determine the detection result of the first LSP.
对于S108中第二网络设备基于该第二BFD报文确定第一LSP的检测结果,具体可以根据预先人为设置或者协商确定的配置参数,确定检测结果。作为一个示例,第二网络设备只要接收到第二BFD报文,则确定第一LSP无故障;相反,若第二网络设备未接收到第二BFD报文,则确定第一LSP故障。作为另一个示例,还可以设置预设时长(例如:30毫秒),该预设时长可以是人为设置的,或者,也可以是协商确定的配置参数中的一个参数,用于指示第一网络设备发送第二BFD报文所允许经过的最长周期,那么,若第二网络设备在间隔预设时长接收到下一个第二BFD报文,则确定第一LSP无故障;相反,若第二网络设备在间隔预设时长仍未接收到下一个第二BFD报文,则确定第一LSP故障。其中,预设时长的具体取值可以根据实际情况进行灵活设置。For the second network device in S108 to determine the detection result of the first LSP based on the second BFD packet, the detection result may be determined according to a configuration parameter manually set or negotiated in advance. As an example, as long as the second network device receives the second BFD packet, it determines that the first LSP is not faulty; on the contrary, if the second network device does not receive the second BFD packet, it determines that the first LSP is faulty. As another example, a preset duration (for example: 30 milliseconds) can also be set, and the preset duration can be manually set, or it can be one of the configuration parameters determined through negotiation to indicate the first network device The longest period allowed to pass the second BFD packet, then, if the second network device receives the next second BFD packet within the preset time interval, it is determined that the first LSP is not faulty; on the contrary, if the second network device If the device does not receive the next second BFD packet within the preset interval, it determines that the first LSP is faulty. Among them, the specific value of the preset duration can be flexibly set according to the actual situation.
例如:以图1所示的场景,S104~S108具体可以包括:网络设备110每隔10毫秒通过LSP 1向网络设备130发送BFD报文1;网络设备130每隔20毫秒,经过LSP 1’向网络设备110发送BFD报文2。一种情况下,如果网络设备110在接收到一个BFD报文2后的60毫秒(即,20毫秒的3倍,3为预设倍数)内,接收到下一个BFD报文2,则,确定LSP 1’无故障,从而确定共路的LSP 1无故障;如果网络设备110在接收到一个BFD报文2后经过80毫秒才接收到下一个BFD报文2,或者,在接收到一个BFD报文2后一直未接收到下一个BFD报文2,则,确定LSP 1’故障,从而确定共路的LSP 1故障。另一种情况下,如果网络设备130在接收到一个BFD报文1后的40毫秒(即,10毫秒的4倍,4为预设倍数)内,接收到下一个BFD报文1,则,确定LSP 1无故障;如果网络设备130在接收到一个BFD报文1后经过40毫秒才接收到下一个BFD报文1,或者,在接收到一个BFD报文1后一直未接收到下一个BFD报文1,则,确定LSP 1故障。其中,10毫秒、20毫秒、倍数3和倍数4均可以是第二部分中协商确定的配置参数。For example, in the scenario shown in Figure 1, S104-S108 may specifically include: network device 110 sends BFD packets 1 to network device 130 via LSP 1 every 10 milliseconds; network device 130 sends BFD packets 1 via LSP 1'every 20 milliseconds The network device 110 sends a BFD message 2. In one case, if the network device 110 receives the next BFD message 2 within 60 milliseconds (that is, 3 times of 20 milliseconds, and 3 is a preset multiple) after receiving a BFD message 2, then it determines LSP 1'is fault-free, thus confirming that the common LSP 1 is fault-free; if the network device 110 receives a BFD message 2 after 80 milliseconds before receiving the next BFD message 2, or, after receiving a BFD message If the next BFD message 2 is not received after message 2, it is determined that LSP 1'is faulty, and thus the common LSP 1 is faulty. In another case, if the network device 130 receives the next BFD message 1 within 40 milliseconds (that is, 4 times of 10 milliseconds, 4 being a preset multiple) after receiving a BFD message 1, then, Make sure that the LSP 1 is not faulty; if the network device 130 receives the next BFD packet 1 after 40 milliseconds after receiving a BFD packet 1, or it has not received the next BFD packet 1 Message 1, then it is determined that LSP 1 is faulty. Among them, 10 milliseconds, 20 milliseconds, multiple 3, and multiple 4 may all be the configuration parameters negotiated in the second part.
需要说明的是,在确定第一LSP故障后,第二网络设备还可以将第一LSP承载的流量切换到该第一LSP的备份LSP上,以确保流量在网络中的正常传输;并且,该第二网络设备还可以上报告警消息,用于告知控用户该第一LSP发生故障,供技术人员尽快进行检测 和维修,并在第一LSP修复后,第二网络设备再将该流量从备份的LSP上切回到该第一LSP上。It should be noted that after determining that the first LSP is faulty, the second network device may also switch the traffic carried by the first LSP to the backup LSP of the first LSP to ensure the normal transmission of traffic in the network; and The second network device can also report an alarm message above, which is used to inform the control user that the first LSP has failed, so that the technicians can detect and repair it as soon as possible. After the first LSP is repaired, the second network device will restore the traffic from the backup. Switch back to the first LSP on the LSP.
如此,在本申请实施例中,源节点能够将待检测的LSP的路径信息告知目的节点,目的节点基于路径信息建立与待检测LSP反向共路的LSP,使得BFD检测中正向和反向的BFD报文能够通过共路的LSP进行传输,克服了目前BFD机制中正向和反向的BFD报文分别采用CR-LSP和IP路由两种方式确定传输路径传输,而两种方式所确定的传输路径大概率不共路,导致检测结果反映的是整个环路(即,IP路由方式确定的传输路径和CR-LSP两部分)的故障情况,而无法准确反映待检测的单向LSP故障情况的问题,解决了BFD机制双向性和LSP单向性的冲突。可见,采用本申请实施例提供的BFD机制,检测LSP的故障情况,既利用到BFD机制可以快速完成检测的特点,又基于构建的反向共路LSP使得采用BFD机制对LSP的故障检测更加准确。而且,本申请实施例还通过让源节点感知到目的节点是否具有建立反向共路LSP能力,使得源节点能够决策后续故障检测中采用的具体方式,从而使得对CR-LSP场景中LSP的故障检测更加灵活。In this way, in the embodiment of the present application, the source node can inform the destination node of the path information of the LSP to be detected, and the destination node establishes an LSP that shares the reverse path with the LSP to be detected based on the path information, so that the forward and reverse directions in the BFD detection BFD packets can be transmitted through a common LSP, which overcomes the current BFD mechanism for forward and reverse BFD packets using CR-LSP and IP routing respectively to determine the transmission path transmission, and the transmission determined by the two methods There is a high probability that the paths are not co-routed, resulting in the detection result reflecting the failure of the entire loop (that is, the transmission path determined by the IP routing method and the two parts of the CR-LSP), but cannot accurately reflect the failure of the unidirectional LSP to be detected The problem solves the conflict between the bidirectionality of the BFD mechanism and the unidirectionality of the LSP. It can be seen that the use of the BFD mechanism provided in the embodiments of this application to detect the failure of the LSP not only takes advantage of the feature that the BFD mechanism can quickly complete the detection, but also based on the construction of the reverse common path LSP makes the use of the BFD mechanism to detect the failure of the LSP more accurately . Moreover, the embodiment of the present application also allows the source node to perceive whether the destination node has the ability to establish a reverse common path LSP, so that the source node can decide the specific method to be used in subsequent failure detection, so as to prevent the failure of the LSP in the CR-LSP scenario. Detection is more flexible.
相应的,本申请实施例还提供了一种第一网络设备700,如图7。该第一网络设备700应用于约束路径的标签交换路径CR-LSP场景,第一网络设备700包括:接收单元701、发送单元702和处理单元703。Correspondingly, an embodiment of the present application also provides a first network device 700, as shown in FIG. 7. The first network device 700 is applied to a label-switched path CR-LSP scenario where a path is restricted. The first network device 700 includes a receiving unit 701, a sending unit 702, and a processing unit 703.
其中,接收单元701用于接收第二网络设备经过待检测的第一LSP发送的第一报文,该第一报文中携带第一LSP的路径信息,第一LSP的源节点为第一网络设备,第一LSP的目的节点为第二网络设备,第一LSP包括依次排列的多个标签交换节点LSR。The receiving unit 701 is configured to receive a first packet sent by the second network device through the first LSP to be detected, the first packet carrying path information of the first LSP, and the source node of the first LSP is the first network Device, the destination node of the first LSP is the second network device, and the first LSP includes a plurality of label switching node LSRs arranged in sequence.
处理单元703用于根据路径信息,建立从第一网络设备到第二网络设备的第二LSP,该第二LSP包括多个LSR,且多个LSR在第二LSP中的排列顺序与多个LSR在第一LSP中的排列顺序相反。The processing unit 703 is configured to establish a second LSP from the first network device to the second network device according to the path information. The second LSP includes multiple LSRs, and the arrangement order of the multiple LSRs in the second LSP is consistent with the multiple LSRs. The arrangement order in the first LSP is reversed.
发送单元702用于经过第二LSP向第二网络设备发送第一双向链路检测BFD报文,以便第二网络设备基于第一BFD报文确定第一LSP的故障情况。The sending unit 702 is configured to send the first bidirectional link detection BFD packet to the second network device via the second LSP, so that the second network device determines the failure condition of the first LSP based on the first BFD packet.
在一些实现方式中,第一网络设备700中的接收单元701,还用于接收第二网络设备经过第一LSP发送的第二BFD报文。In some implementation manners, the receiving unit 701 in the first network device 700 is further configured to receive the second BFD packet sent by the second network device via the first LSP.
在另一些实现方式中,第一网络设备700中的发送单元702,还用于向第二网络设备发送第二报文,第二报文携带能力信息,能力信息用于表征第一网络设备具备建立第二LSP的能力。In other implementations, the sending unit 702 in the first network device 700 is also used to send a second message to the second network device. The second message carries capability information, and the capability information is used to characterize the capability of the first network device. The ability to establish a second LSP.
在又一些实现方式中,第一网络设备700中的处理单元703,还用于在经过第二LSP向第二网络设备发送第一双向链路检测BFD报文之前,基于第一LSP和第二LSP,和第二网络设备协商BFD的配置参数;那么,该发送单元702,具体用于:基于协商确定的配置参数,经过第二LSP向第二网络设备发送第一BFD报文。In still other implementation manners, the processing unit 703 in the first network device 700 is further configured to, before sending the first bidirectional link detection BFD message to the second network device through the second LSP, based on the first LSP and the second The LSP negotiates BFD configuration parameters with the second network device; then, the sending unit 702 is specifically configured to send the first BFD packet to the second network device via the second LSP based on the configuration parameters determined through the negotiation.
可以理解的是,第一报文为LSP-Ping报文,路径信息通过LSP-Ping报文中扩展的类型长度值TLV字段携带。It can be understood that the first packet is an LSP-Ping packet, and the path information is carried by the extended type length value TLV field in the LSP-Ping packet.
需要说明的是,图7所示的第一网络设备700可以是图3所示的示例中的网络设备 130,也可以是图4所示的方法100中提及的第一网络设备,因此,第一网络设备700的各种具体实施例方式,可以参见图3对应实施例以及方法100的相关介绍,本实施例不再赘述。It should be noted that the first network device 700 shown in FIG. 7 may be the network device 130 in the example shown in FIG. 3, or the first network device mentioned in the method 100 shown in FIG. 4. Therefore, For various specific embodiments of the first network device 700, reference may be made to the corresponding embodiment of FIG. 3 and the related introduction of the method 100, which will not be repeated in this embodiment.
相应的,本申请实施例还提供了一种第二网络设备800,如图8。该第二网络设备800应用于约束路径的标签交换路径CR-LSP场景,第二网络设备800包括:发送单元801、接收单元802和处理单元803。Correspondingly, an embodiment of the present application also provides a second network device 800, as shown in FIG. 8. The second network device 800 is applied to a CR-LSP scenario of a label-switched path with restricted paths. The second network device 800 includes a sending unit 801, a receiving unit 802, and a processing unit 803.
其中,发送单元801用于经过待检测的第一LSP向第一网络设备发送第一报文,该第一报文中携带第一LSP的路径信息,该第一LSP的源节点为第二网络设备,目的节点为第一网络设备,第一LSP包括依次排列的多个标签交换节点LSR。The sending unit 801 is configured to send a first packet to the first network device via the first LSP to be detected, the first packet carrying path information of the first LSP, and the source node of the first LSP is the second network Device, the destination node is a first network device, and the first LSP includes a plurality of label switching node LSRs arranged in sequence.
接收单元802用于接收第一网络设备经过第二LSP发送的第一双向链路检测BFD报文,其中,该第二LSP为第二网络设备基于路径信息建立的,第二LSP包括多个LSR,且多个LSR在第二LSP中的排列顺序与多个LSR在第一LSP中的排列顺序相反。The receiving unit 802 is configured to receive a first bidirectional link detection BFD message sent by the first network device via a second LSP, where the second LSP is established by the second network device based on path information, and the second LSP includes multiple LSRs , And the arrangement order of the multiple LSRs in the second LSP is opposite to the arrangement order of the multiple LSRs in the first LSP.
处理单元803用于基于第一BFD报文,确定第一LSP的检测结果。The processing unit 803 is configured to determine the detection result of the first LSP based on the first BFD packet.
在一些实现方式中,第二网络设备800中的发送单元803,还用于经过第一LSP向第一网络设备发送第二BFD报文。In some implementation manners, the sending unit 803 in the second network device 800 is further configured to send the second BFD packet to the first network device via the first LSP.
在另一些实现方式中,第二网络设备中800的接收单元802,还用于接收第一网络设备发送的第二报文,第二报文携带能力信息,能力信息用于表征第一网络设备具备建立第二LSP的能力。In other implementation manners, the receiving unit 802 in the second network device 800 is further configured to receive a second packet sent by the first network device. The second packet carries capability information, and the capability information is used to characterize the first network device. Have the ability to establish a second LSP.
在又一些实现方式中,第二网络设备800中的处理单元803,还用于在接收第一网络设备经过第二LSP发送的第一双向链路检测BFD报文之前,基于第一LSP和第二LSP,和第一网络设备协商BFD的配置参数;那么,该接收单元802,具体用于:基于协商确定的配置参数,接收第一网络设备经过第二LSP发送的第一BFD报文。In still other implementation manners, the processing unit 803 in the second network device 800 is further configured to, before receiving the first bidirectional link detection BFD message sent by the first network device via the second LSP, based on the first LSP and the first LSP The second LSP negotiates BFD configuration parameters with the first network device; then, the receiving unit 802 is specifically configured to receive the first BFD message sent by the first network device via the second LSP based on the negotiated configuration parameters.
在再一些实现方式中,第二网络设备800中的处理单元803,还用于若检测结果表征第一LSP故障,则,将第一LSP上承载的流量切换到第三LSP,第三LSP的源节点为第二网络设备,第三LSP的目的节点为第一网络设备。In still other implementation manners, the processing unit 803 in the second network device 800 is further configured to switch the traffic carried on the first LSP to the third LSP if the detection result indicates that the first LSP is faulty. The source node is the second network device, and the destination node of the third LSP is the first network device.
可以理解的是,第一报文为LSP-Ping报文,路径信息通过LSP-Ping报文中扩展的类型长度值TLV字段携带。It can be understood that the first packet is an LSP-Ping packet, and the path information is carried by the extended type length value TLV field in the LSP-Ping packet.
需要说明的是,图8所示的第二网络设备800可以是图3所示的示例中的网络设备110,也可以是图4所示的方法100中提及的第二网络设备,因此,第二网络设备800的各种具体实施例方式,可以参见图3对应实施例以及方法100的相关介绍,本实施例不再赘述。It should be noted that the second network device 800 shown in FIG. 8 may be the network device 110 in the example shown in FIG. 3, or the second network device mentioned in the method 100 shown in FIG. 4. Therefore, For various specific embodiments of the second network device 800, reference may be made to the corresponding embodiment of FIG. 3 and the related introduction of the method 100, which will not be repeated in this embodiment.
参见图9,本申请实施例提供了一种第一网络设备900。该第一网络设备900可以是上述任一实施例中目的节点,例如可以是图3所示所示实施例中的网络设备130,也可以是图4所示实施例中的第一网络设备。该第一网络设备900包括至少一个处理器901,总线系统902,存储器903以及至少一个收发器904。Referring to FIG. 9, an embodiment of the present application provides a first network device 900. The first network device 900 may be the destination node in any of the foregoing embodiments, for example, it may be the network device 130 in the embodiment shown in FIG. 3, or may be the first network device in the embodiment shown in FIG. The first network device 900 includes at least one processor 901, a bus system 902, a memory 903, and at least one transceiver 904.
该第一网络设备900是一种硬件结构的装置,可以用于实现图7所示的第一网络设备700中的功能模块。例如,本领域技术人员可以想到图7所示的第一网络设备700中的处理单元703可以通过该至少一个处理器901调用存储器903中的代码来实现,图7所示的第一网络设备700中的接收单元701和发送单元702可以通过该收发器904来实现。The first network device 900 is a device with a hardware structure, and can be used to implement the functional modules in the first network device 700 shown in FIG. 7. For example, those skilled in the art can imagine that the processing unit 703 in the first network device 700 shown in FIG. 7 can be implemented by calling the code in the memory 903 by the at least one processor 901. The first network device 700 shown in FIG. 7 The receiving unit 701 and the sending unit 702 in can be implemented by the transceiver 904.
可选的,该第一网络设备900还可用于实现上述任一实施例中第一网络设备的功能。Optionally, the first network device 900 may also be used to implement the function of the first network device in any of the foregoing embodiments.
可选的,上述处理器901可以是一个通用中央处理器(central processing unit,CPU),网络处理器(network processor,NP),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。Optionally, the aforementioned processor 901 may be a general-purpose central processing unit (central processing unit, CPU), network processor (NP), microprocessor, application-specific integrated circuit (ASIC) , Or one or more integrated circuits used to control the execution of the program of this application.
上述总线系统902可包括一通路,在上述组件之间传送信息。The above-mentioned bus system 902 may include a path for transferring information between the above-mentioned components.
上述收发器904,用于与其他设备或通信网络通信。The aforementioned transceiver 904 is used to communicate with other devices or a communication network.
上述存储器903可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。The aforementioned memory 903 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), or other types that can store information and instructions. The type of dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical disk storage, optical discs Storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be used by Any other medium accessed by the computer, but not limited to this. The memory can exist independently and is connected to the processor through a bus. The memory can also be integrated with the processor.
其中,存储器903用于存储执行本申请方案的应用程序代码,并由处理器901来控制执行。处理器901用于执行存储器903中存储的应用程序代码,从而实现本专利方法中的功能。Among them, the memory 903 is used to store application program codes for executing the solutions of the present application, and the processor 901 controls the execution. The processor 901 is configured to execute the application program code stored in the memory 903, so as to realize the functions in the method of the present patent.
在具体实现中,作为一种实施例,处理器901可以包括一个或多个CPU,例如图9中的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 901 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 9.
在具体实现中,作为一种实施例,该第一网络设备900可以包括多个处理器,例如图9中的处理器901和处理器907。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the first network device 900 may include multiple processors, such as the processor 901 and the processor 907 in FIG. 9. Each of these processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
参见图10,本申请实施例提供了一种第二网络设备1000。该第二网络设备1000可以是上述任一实施例中的源节点,例如可以是图3所示所示实施例中的网络设备110,也可以是图4所示实施例中的第二网络设备。该第二网络设备1000包括至少一个处理器1001,总线系统1002,存储器1003以及至少一个收发器1004。Referring to FIG. 10, an embodiment of the present application provides a second network device 1000. The second network device 1000 may be the source node in any of the foregoing embodiments, for example, it may be the network device 110 in the embodiment shown in FIG. 3, or may be the second network device in the embodiment shown in FIG. 4 . The second network device 1000 includes at least one processor 1001, a bus system 1002, a memory 1003, and at least one transceiver 1004.
该第二网络设备1000是一种硬件结构的装置,可以用于实现图8所述的第二网络设备800中的功能模块。例如,本领域技术人员可以想到图8所示的第二网络设备800中的处理单元803可以通过该至少一个处理器1001调用存储器1003中的代码来实现,图8所示的第二网络设备800中的接收单元802和发送单元801可以通过该收发器1004来实现。The second network device 1000 is a device with a hardware structure, and can be used to implement the functional modules in the second network device 800 described in FIG. 8. For example, those skilled in the art can imagine that the processing unit 803 in the second network device 800 shown in FIG. 8 can be implemented by calling the code in the memory 1003 by the at least one processor 1001. The second network device 800 shown in FIG. 8 The receiving unit 802 and the sending unit 801 in can be implemented by the transceiver 1004.
可选的,该第二网络设备1000还可用于实现上述任一实施例中第二网络设备的功能。Optionally, the second network device 1000 may also be used to implement the function of the second network device in any of the foregoing embodiments.
可选的,上述处理器1001可以是一个通用中央处理器(central processing unit,CPU),网络处理器(network processor,NP),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。Optionally, the aforementioned processor 1001 may be a general-purpose central processing unit (central processing unit, CPU), network processor (network processor, NP), microprocessor, application-specific integrated circuit (ASIC) , Or one or more integrated circuits used to control the execution of the program of this application.
上述总线系统1002可包括一通路,在上述组件之间传送信息。The above-mentioned bus system 1002 may include a path for transferring information between the above-mentioned components.
上述收发器1004,用于与其他设备或通信网络通信。The above transceiver 1004 is used to communicate with other devices or communication networks.
上述存储器1003可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。The above-mentioned memory 1003 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions. The type of dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical disk storage, optical discs Storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be used by Any other medium accessed by the computer, but not limited to this. The memory can exist independently and is connected to the processor through a bus. The memory can also be integrated with the processor.
其中,存储器1003用于存储执行本申请方案的应用程序代码,并由处理器1001来控制执行。处理器1001用于执行存储器1003中存储的应用程序代码,从而实现本专利方法中的功能。The memory 1003 is used to store application program codes for executing the solutions of the present application, and the processor 1001 controls the execution. The processor 1001 is configured to execute application program codes stored in the memory 1003, so as to realize the functions in the method of the present patent.
在具体实现中,作为一种实施例,处理器1001可以包括一个或多个CPU,例如图10中的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 1001 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 10.
在具体实现中,作为一种实施例,该装置1000可以包括多个处理器,例如图10中的处理器1001和处理器1007。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the apparatus 1000 may include multiple processors, such as the processor 1001 and the processor 1007 in FIG. 10. Each of these processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
参见图11,本申请实施例提供了一种网络系统1100,所述网络系统1100包括:第一网络设备1101和第二网络设备1102。其中,第一网络设备1101具体可以是图7所示的第一网络设备700或图9所示的第一网络设备900;第二网络设备1102具体可以是图8所示的第二网络设备800或图10所示的第二网络设备1000。Referring to FIG. 11, an embodiment of the present application provides a network system 1100. The network system 1100 includes a first network device 1101 and a second network device 1102. The first network device 1101 may specifically be the first network device 700 shown in FIG. 7 or the first network device 900 shown in FIG. 9; the second network device 1102 may specifically be the second network device 800 shown in FIG. Or the second network device 1000 shown in FIG. 10.
可选的,第一网络设备1101可以是图4所示实施例中的第一网络设备或在如图3所示实施例中的网络设备130,第二网络设备1102可以是图4所示实施例中的第二网络设备或在如图3所示实施例中的网络设备110。Optionally, the first network device 1101 may be the first network device in the embodiment shown in FIG. 4 or the network device 130 in the embodiment shown in FIG. 3, and the second network device 1102 may be the implementation shown in FIG. 4. The second network device in the example or the network device 110 in the embodiment shown in FIG. 3.
此外,本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质中存储有程序代码或指令,当其在计算机上运行时,使得计算机执行以上图3或图4所示实施例中任意一种实现方式下的方法。In addition, the embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores program codes or instructions. When it runs on a computer, the computer executes the implementation shown in Figure 3 or Figure 4 above. The method in any implementation mode in the example.
此外,本申请实施例还提供了一种计算机程序产品,当其在计算机上运行时,使得计算机执行前述方法100中任意一种实现方式的方法。In addition, the embodiments of the present application also provide a computer program product, which when running on a computer, causes the computer to execute any one of the aforementioned methods 100.
需要说明的是,本申请中,该采用BFD机制进行故障检测的过程以及相关定义,可在日期为2010年6月的题为“Bidirectional Forwarding Detection(BFD)for MPLS Label Switched Paths(LSPs)”的RFC5884中找到,其全部内容通过引证结合于此,犹如全部陈述的一样,在此不再赘述。It should be noted that, in this application, the process of using the BFD mechanism for fault detection and related definitions can be found in the “Bidirectional Forwarding Detection (BFD) for MPLS Label Switched Paths (LSPs)” dated June 2010. Found in RFC5884, the entire content is incorporated here by reference, just like all statements, so I won’t repeat it here.
本申请实施例中提到的“第一报文”、“第一LSP”等名称中的“第一”只是用来做名字标识,并不代表顺序上的第一。该规则同样适用于“第二”等。The "first" in the names of "first message" and "first LSP" mentioned in the embodiments of the present application is only used for name identification, and does not represent the first in order. This rule also applies to "second" and so on.
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到上述实施例方法中的全部或部分步骤可借助软件加通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如只读存储器(英文:read-only memory,ROM)/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者诸如路由器等网络通信设备)执行本申请各个实施例或者实施例的某些部分所述的方法。From the description of the foregoing implementation manners, it can be understood that those skilled in the art can clearly understand that all or part of the steps in the foregoing embodiment methods can be implemented by means of software and a general hardware platform. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as read-only memory (English: read-only memory, ROM)/RAM, magnetic disk, An optical disc, etc., includes a number of instructions to enable a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the methods described in the various embodiments or some parts of the embodiments of the present application.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例和设备实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的设备及系统实施例仅仅是示意性的,其中作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the difference from other embodiments. In particular, as for the system embodiment and the device embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment. The above-described device and system embodiments are only illustrative. The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement without creative work.
以上所述仅是本申请的优选实施方式,并非用于限定本申请的保护范围。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above descriptions are only the preferred embodiments of the present application, and are not used to limit the protection scope of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from this application, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the scope of protection of this application.

Claims (18)

  1. 一种故障检测方法,其特征在于,应用于约束路径的标签交换路径CR-LSP场景的第一网络设备,所述方法包括:A fault detection method, characterized in that it is applied to a first network device in a CR-LSP scenario of a label-switched path of a restricted path, and the method includes:
    接收第二网络设备经过待检测的第一LSP发送的第一报文,所述第一报文中携带所述第一LSP的路径信息,所述第一LSP的源节点为所述第一网络设备,所述第一LSP的目的节点为所述第二网络设备,所述第一LSP包括依次排列的多个标签交换节点LSR;Receive a first packet sent by a second network device via a first LSP to be detected, where the first packet carries path information of the first LSP, and the source node of the first LSP is the first network Device, the destination node of the first LSP is the second network device, and the first LSP includes a plurality of label switching node LSRs arranged in sequence;
    根据所述路径信息,建立从所述第一网络设备到所述第二网络设备的第二LSP,所述第二LSP包括所述多个LSR,且所述多个LSR在所述第二LSP中的排列顺序与所述多个LSR在所述第一LSP中的排列顺序相反;According to the path information, a second LSP from the first network device to the second network device is established, the second LSP includes the multiple LSRs, and the multiple LSRs are in the second LSP The arrangement order in is opposite to the arrangement order of the multiple LSRs in the first LSP;
    经过所述第二LSP向所述第二网络设备发送第一双向链路检测BFD报文,以便所述第二网络设备基于所述第一BFD报文确定所述第一LSP的故障情况。Send a first bidirectional link detection BFD packet to the second network device through the second LSP, so that the second network device determines the failure condition of the first LSP based on the first BFD packet.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    接收所述第二网络设备经过所述第一LSP发送的第二BFD报文。Receiving a second BFD packet sent by the second network device through the first LSP.
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    向所述第二网络设备发送第二报文,所述第二报文携带能力信息,所述能力信息用于表征所述第一网络设备具备建立所述第二LSP的能力。Sending a second message to the second network device, the second message carrying capability information, and the capability information is used to characterize that the first network device has the ability to establish the second LSP.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,在经过所述第二LSP向所述第二网络设备发送第一双向链路检测BFD报文之前,所述方法还包括:The method according to any one of claims 1-3, wherein before sending a first bidirectional link detection BFD message to the second network device via the second LSP, the method further comprises:
    基于所述第一LSP和所述第二LSP,和所述第二网络设备协商BFD的配置参数;Negotiate BFD configuration parameters with the second network device based on the first LSP and the second LSP;
    所述经过所述第二LSP向所述第二网络设备发送第一双向链路检测BFD报文,具体为:The sending a first bidirectional link detection BFD message to the second network device through the second LSP is specifically:
    基于协商确定的所述配置参数,经过所述第二LSP向所述第二网络设备发送所述第一BFD报文。Based on the configuration parameters determined through negotiation, the first BFD packet is sent to the second network device through the second LSP.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一报文为LSP-Ping报文,所述路径信息通过所述LSP-Ping报文中扩展的类型长度值TLV字段携带。The method according to any one of claims 1 to 4, wherein the first message is an LSP-Ping message, and the path information uses the type length value TLV extended in the LSP-Ping message Field carry.
  6. 一种故障检测方法,其特征在于,应用于约束路径的标签交换路径CR-LSP场景的第二网络设备,所述方法包括:A fault detection method, characterized in that it is applied to a second network device in a CR-LSP scenario of a label-switched path of a restricted path, and the method includes:
    经过待检测的第一LSP向第一网络设备发送第一报文,所述第一报文中携带所述第一LSP的路径信息,所述第一LSP的源节点为所述第二网络设备,目的节点为所述第一网络设备,所述第一LSP包括依次排列的多个标签交换节点LSR;Send a first packet to the first network device through the first LSP to be detected, the first packet carrying path information of the first LSP, and the source node of the first LSP is the second network device , The destination node is the first network device, and the first LSP includes a plurality of label switching node LSRs arranged in sequence;
    接收所述第一网络设备经过第二LSP发送的第一双向链路检测BFD报文,所述第二LSP为所述第二网络设备基于所述路径信息建立的,所述第二LSP包括所述多个LSR,且所述多个LSR在所述第二LSP中的排列顺序与所述多个LSR在所述第一LSP中的排列顺序相反;Receive a first bidirectional link detection BFD message sent by the first network device via a second LSP, where the second LSP is established by the second network device based on the path information, and the second LSP includes all The multiple LSRs, and the sequence of the multiple LSRs in the second LSP is opposite to the sequence of the multiple LSRs in the first LSP;
    基于所述第一BFD报文,确定所述第一LSP的检测结果。Determine the detection result of the first LSP based on the first BFD packet.
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method according to claim 6, wherein the method further comprises:
    经过所述第一LSP向所述第一网络设备发送第二BFD报文。Sending a second BFD packet to the first network device through the first LSP.
  8. 根据权利要求6或7所述的方法,其特征在于,所述方法还包括:The method according to claim 6 or 7, wherein the method further comprises:
    接收所述第一网络设备发送的第二报文,所述第二报文携带能力信息,所述能力信息用于表征所述第一网络设备具备建立所述第二LSP的能力。Receiving a second message sent by the first network device, the second message carrying capability information, and the capability information is used to characterize that the first network device is capable of establishing the second LSP.
  9. 根据权利要求6-8任一项所述的方法,其特征在于,在所述接收所述第一网络设备经过第二LSP发送的第一双向链路检测BFD报文之前,所述方法还包括:The method according to any one of claims 6-8, wherein before the receiving the first bidirectional link detection BFD message sent by the first network device via the second LSP, the method further comprises :
    基于所述第一LSP和所述第二LSP,和所述第一网络设备协商BFD的配置参数;Negotiate BFD configuration parameters with the first network device based on the first LSP and the second LSP;
    所述接收所述第一网络设备经过第二LSP发送的第一双向链路检测BFD报文,具体为:The receiving the first bidirectional link detection BFD message sent by the first network device via the second LSP is specifically:
    基于协商确定的所述配置参数,接收所述第一网络设备经过所述第二LSP发送的所述第一BFD报文。Receiving the first BFD packet sent by the first network device via the second LSP based on the configuration parameter determined through negotiation.
  10. 根据权利要求6-9任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 6-9, wherein the method further comprises:
    若所述检测结果表征所述第一LSP故障,则,将所述第一LSP上承载的流量切换到第三LSP,所述第三LSP的源节点为所述第二网络设备,所述第三LSP的目的节点为所述第一网络设备。If the detection result indicates that the first LSP is faulty, the traffic carried on the first LSP is switched to a third LSP, and the source node of the third LSP is the second network device, and the first LSP is The destination node of the third LSP is the first network device.
  11. 一种网络设备,其特征在于,应用于约束路径的标签交换路径CR-LSP场景,所述网络设备是所述CR-LSP场景中的第一网络设备,所述CR-LSP场景还包括第二网络设备,所述第一网络设备包括:A network device, characterized in that it is applied to a label-switched path CR-LSP scenario of a restricted path, the network device is the first network device in the CR-LSP scenario, and the CR-LSP scenario further includes a second Network equipment, the first network equipment includes:
    接收单元,用于接收所述第二网络设备经过待检测的第一LSP发送的第一报文,所述第一报文中携带所述第一LSP的路径信息,所述第一LSP的源节点为所述第一网络设备,所述第一LSP的目的节点为所述第二网络设备,所述第一LSP包括依次排列的多个标签交换节点LSR;The receiving unit is configured to receive a first packet sent by the second network device via the first LSP to be detected, where the first packet carries path information of the first LSP, and the source of the first LSP The node is the first network device, the destination node of the first LSP is the second network device, and the first LSP includes a plurality of label switching node LSRs arranged in sequence;
    处理单元,用于根据所述路径信息,建立从所述第一网络设备到所述第二网络设备的第二LSP,所述第二LSP包括所述多个LSR,且所述多个LSR在所述第二LSP中的排列顺序与所述多个LSR在所述第一LSP中的排列顺序相反;A processing unit, configured to establish a second LSP from the first network device to the second network device according to the path information, the second LSP includes the multiple LSRs, and the multiple LSRs are in The arrangement order in the second LSP is opposite to the arrangement order of the multiple LSRs in the first LSP;
    发送单元,用于经过所述第二LSP向所述第二网络设备发送第一双向链路检测BFD报文,以便所述第二网络设备基于所述第一BFD报文确定所述第一LSP的故障情况。A sending unit, configured to send a first bidirectional link detection BFD packet to the second network device via the second LSP, so that the second network device determines the first LSP based on the first BFD packet The failure situation.
  12. 根据权利要求11所述的网络设备,其特征在于,The network device according to claim 11, wherein:
    所述接收单元,还用于接收所述第二网络设备经过所述第一LSP发送的第二BFD报文。The receiving unit is further configured to receive a second BFD packet sent by the second network device via the first LSP.
  13. 根据权利要求11或12所述的网络设备,其特征在于,The network device according to claim 11 or 12, wherein:
    所述发送单元,还用于向所述第二网络设备发送第二报文,所述第二报文携带能力信息,所述能力信息用于表征所述第一网络设备具备建立所述第二LSP的能力。The sending unit is further configured to send a second message to the second network device, the second message carrying capability information, and the capability information is used to characterize that the first network device is capable of establishing the second network device. LSP capabilities.
  14. 根据权利要求11-13任一项所述的网络设备,其特征在于,The network device according to any one of claims 11-13, wherein:
    所述处理单元,还用于在经过所述第二LSP向所述第二网络设备发送第一双向链路检测BFD报文之前,基于所述第一LSP和所述第二LSP,和所述第二网络设备协商BFD的配置参数;The processing unit is further configured to, before sending a first bidirectional link detection BFD message to the second network device via the second LSP, based on the first LSP and the second LSP, and the The second network device negotiates BFD configuration parameters;
    则,所述发送单元,具体用于:Then, the sending unit is specifically used for:
    基于协商确定的所述配置参数,经过所述第二LSP向所述第二网络设备发送所述第一BFD报文。Based on the configuration parameters determined through negotiation, the first BFD packet is sent to the second network device through the second LSP.
  15. 一种网络设备,其特征在于,应用于约束路径的标签交换路径CR-LSP场景,所述 网络设备是所述CR-LSP场景中的第二网络设备,所述CR-LSP场景还包括第一网络设备,所述第二网络设备包括:A network device, characterized in that it is applied to a label-switched path CR-LSP scenario of a restricted path, the network device is the second network device in the CR-LSP scenario, and the CR-LSP scenario further includes a first Network equipment, the second network equipment includes:
    发送单元,用于经过待检测的第一LSP向所述第一网络设备发送第一报文,所述第一报文中携带所述第一LSP的路径信息,所述第一LSP的源节点为所述第二网络设备,目的节点为所述第一网络设备,所述第一LSP包括依次排列的多个标签交换节点LSR;The sending unit is configured to send a first packet to the first network device via the first LSP to be detected, the first packet carrying path information of the first LSP, and the source node of the first LSP Is the second network device, the destination node is the first network device, and the first LSP includes a plurality of label switching node LSRs arranged in sequence;
    接收单元,用于接收所述第一网络设备经过第二LSP发送的第一双向链路检测BFD报文,所述第二LSP为所述第二网络设备基于所述路径信息建立的,所述第二LSP包括所述多个LSR,且所述多个LSR在所述第二LSP中的排列顺序与所述多个LSR在所述第一LSP中的排列顺序相反;The receiving unit is configured to receive a first bidirectional link detection BFD message sent by the first network device via a second LSP, the second LSP being established by the second network device based on the path information, the The second LSP includes the multiple LSRs, and the sequence of the multiple LSRs in the second LSP is opposite to the sequence of the multiple LSRs in the first LSP;
    处理单元,用于基于所述第一BFD报文,确定所述第一LSP的检测结果。The processing unit is configured to determine the detection result of the first LSP based on the first BFD packet.
  16. 根据权利要求15所述的网络设备,其特征在于,The network device according to claim 15, wherein:
    所述处理单元,还用于若所述检测结果表征所述第一LSP故障,则,将所述第一LSP上承载的流量切换到第三LSP,所述第三LSP的源节点为所述第二网络设备,所述第三LSP的目的节点为所述第一网络设备。The processing unit is further configured to switch the traffic carried on the first LSP to a third LSP if the detection result indicates that the first LSP is faulty, and the source node of the third LSP is the For the second network device, the destination node of the third LSP is the first network device.
  17. 一种网络系统,其特征在于,所述网络系统包括权利要求11-14任一项所述的网络设备以及权利要求15或16所述的网络设备。A network system, characterized in that, the network system comprises the network device according to any one of claims 11-14 and the network device according to claim 15 or 16.
  18. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有程序代码或指令,当其在计算机上运行时,使得所述计算机执行以上权利要求1-5中任意一项所述的方法或者权利要求6-10中任意一项所述的方法。A computer-readable storage medium, wherein the computer-readable storage medium stores program codes or instructions, which when run on a computer, causes the computer to execute any one of the above claims 1-5 The method or the method of any one of claims 6-10.
PCT/CN2020/141140 2020-01-15 2020-12-30 Fault detection method, and apparatus WO2021143524A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010043122.4A CN113132223A (en) 2020-01-15 2020-01-15 Fault detection method and equipment
CN202010043122.4 2020-01-15

Publications (1)

Publication Number Publication Date
WO2021143524A1 true WO2021143524A1 (en) 2021-07-22

Family

ID=76771610

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/141140 WO2021143524A1 (en) 2020-01-15 2020-12-30 Fault detection method, and apparatus

Country Status (2)

Country Link
CN (1) CN113132223A (en)
WO (1) WO2021143524A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114915538A (en) * 2021-01-29 2022-08-16 华为技术有限公司 Fault detection method, network device and system
WO2023197644A1 (en) * 2022-04-15 2023-10-19 华为技术有限公司 Cross-segmented network fault detection method, and communication system and related apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102769543A (en) * 2012-07-20 2012-11-07 杭州华三通信技术有限公司 BFD (Bidirectional Forwarding Detection) method and equipment based on LSP (Label Switching Path)
CN108768788A (en) * 2018-06-26 2018-11-06 新华三技术有限公司合肥分公司 Path failure detection method and device
WO2019079961A1 (en) * 2017-10-24 2019-05-02 华为技术有限公司 Method and device for determining shared risk link group

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771577B (en) * 2008-12-31 2012-10-17 华为技术有限公司 Method, system and equipment for establishing bidirectional forwarding detection (BFD) for bidirectional LSP
CN102571601B (en) * 2012-02-13 2018-05-15 中兴通讯股份有限公司 A kind of method and label switched path equipment for ensureing two-way converting detection reliability
CN102624609A (en) * 2012-02-28 2012-08-01 华为技术有限公司 Method for transmitting reverse bidirectional forwarding detection (BFD) messages, method for notifying paths and device for notifying paths
US8964570B2 (en) * 2013-01-11 2015-02-24 Cisco Technology, Inc. Detecting failures of backup label switched paths in a network environment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102769543A (en) * 2012-07-20 2012-11-07 杭州华三通信技术有限公司 BFD (Bidirectional Forwarding Detection) method and equipment based on LSP (Label Switching Path)
WO2019079961A1 (en) * 2017-10-24 2019-05-02 华为技术有限公司 Method and device for determining shared risk link group
CN108768788A (en) * 2018-06-26 2018-11-06 新华三技术有限公司合肥分公司 Path failure detection method and device

Also Published As

Publication number Publication date
CN113132223A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
JP4840236B2 (en) Network system and node device
US9860161B2 (en) System and method for computing a backup ingress of a point-to-multipoint label switched path
US9537712B2 (en) Detecting failures of backup label switched paths in a network environment
US8902780B1 (en) Forwarding detection for point-to-multipoint label switched paths
US7746796B2 (en) Directed echo requests and reverse traceroute
US8976682B2 (en) Connection verification for MPLS label switched paths and pseudowires
US7746793B2 (en) Consistency between MPLS forwarding and control planes
EP2761829B1 (en) Point-to-point based multicast label distribution protocol local protection solution
EP1779568B1 (en) Graceful shutdown of ldp on specific interfaces between label switched routers
US8218432B2 (en) Routing method in a label switching network
WO2008148334A1 (en) Method, system and apparatus thereof for detecting abnormal receipt of message
WO2021143524A1 (en) Fault detection method, and apparatus
US8971195B2 (en) Querying health of full-meshed forwarding planes
US8254271B1 (en) Point-to-multipoint connectivity verification
US10447586B2 (en) Defect detection in IP/MPLS network tunnels
US20080267080A1 (en) Fault Verification for an Unpaired Unidirectional Switched-Path
JP2006033124A (en) Tunnel fault notification device and method
WO2017143958A1 (en) System, method and apparatus for implementing fast reroute (frr)
CN108702321B (en) System, method and apparatus for implementing fast reroute (FRR)
JP6017037B2 (en) System and method for using RSVPHELLO suppression for graceful restart capable neighbors
JP6017037B6 (en) System and method for using RSVP HELLO suppression for graceful restart capable neighbors
CN115134283A (en) Ring network protection method and device
JP5734896B2 (en) COMMUNICATION SYSTEM, COMMUNICATION DEVICE, PATH GENERATION CONTROL METHOD, AND PROGRAM

Legal Events

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

Ref document number: 20913490

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20913490

Country of ref document: EP

Kind code of ref document: A1