CN114338459A - Path detection method, path detection device, network equipment and computer readable storage medium - Google Patents

Path detection method, path detection device, network equipment and computer readable storage medium Download PDF

Info

Publication number
CN114338459A
CN114338459A CN202111598871.4A CN202111598871A CN114338459A CN 114338459 A CN114338459 A CN 114338459A CN 202111598871 A CN202111598871 A CN 202111598871A CN 114338459 A CN114338459 A CN 114338459A
Authority
CN
China
Prior art keywords
network device
path
request message
bfd session
bfd
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111598871.4A
Other languages
Chinese (zh)
Other versions
CN114338459B (en
Inventor
黄浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN202111598871.4A priority Critical patent/CN114338459B/en
Publication of CN114338459A publication Critical patent/CN114338459A/en
Application granted granted Critical
Publication of CN114338459B publication Critical patent/CN114338459B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a path detection method, a path detection device, network equipment and a computer readable storage medium, and relates to the technical field of data communication. The method comprises the following steps: receiving a request message sent by upstream network equipment for establishing a BFD session; judging whether the destination equipment of the request message is the same as the network equipment at the outlet end; and when the destination equipment of the request message is the same as the exit-end network equipment, establishing a BFD session, wherein the BFD session is used for detecting the connectivity of a label switching path through which the request message passes. Therefore, the accuracy of BFD session creation can be improved, the reliability of path detection and the reliability of flow data transmission are further improved, and the phenomenon that the flow is switched to a fault path and discarded due to the fact that the BFD session is erroneously created due to the fault of the path because the destination device of the message is different from the network device is avoided.

Description

Path detection method, path detection device, network equipment and computer readable storage medium
Technical Field
The present application relates to the field of data communication technologies, and in particular, to a path detection method, an apparatus, a network device, and a computer-readable storage medium.
Background
MPLS (Multi-Protocol Label Switching) is a new generation of IP high-speed backbone network Switching standard, and performs packet forwarding by using a Label Switching method. MPLS OAM (Operation, Administration And Maintenance) is a tool for detecting LSP (Label Switch Path) failure in an MPLS network. Currently, there are many VPN (Virtual Private Network) services provided in an operator Network based on an MPLS Network, and in order to improve reliability of the VPN service, two paths, i.e., a main path and a standby path, are usually formed when the Network is deployed, and a traffic is switched to the standby path when a main path fails.
At present, when a failure of a main path is detected by using a Bidirectional Forwarding Detection (BFD) technology, the flow is switched to a backup path after the failure of the main path, and then a BFD session is created by mistake, and the flow is switched back to the main path after the BFD session is created by mistake, so that the flow cannot be normally transmitted.
Disclosure of Invention
An object of the embodiments of the present application is to provide a path detection method, an apparatus, a network device, and a computer-readable storage medium, which can ensure that a BFD session is normally created, and solve a problem that a flow cannot be normally transmitted due to a BFD session being incorrectly created.
In order to achieve the above object, embodiments of the present application are implemented as follows:
in a first aspect, an embodiment of the present application provides a path detection method, which is applied to an egress network device in a multi-protocol label switching MPLS network, where the method includes: receiving a request message sent by upstream network equipment for establishing a BFD session; judging whether the destination equipment of the request message is the same as the equipment or not; and when the destination equipment of the request message is the same as the equipment, a BFD session is established, wherein the BFD session is used for detecting the connectivity of a label switching path passed by the request message.
In the foregoing embodiment, the egress network device may perform identification detection on the destination device in the request message to determine whether the destination device of the request message is the same as the egress network device itself, and create the BFD session only when the destination device of the request message is the same as the egress network device itself, so as to improve accuracy of creating the BFD session, further improve reliability of path detection and reliability of traffic data transmission, and avoid that the BFD session is erroneously created due to a failure in a path because the destination device is different from the egress network device itself, so that the traffic is switched to a failed path and discarded.
With reference to the first aspect, in some optional embodiments, determining whether the destination device of the request packet is the same as the device includes: acquiring routing information corresponding to FEC information carried by the request message in advance; when the routing type of the routing information is the host routing, determining that the destination device of the request message is the same as the device; and when the routing type of the routing information is not the host routing, determining that the destination equipment of the request message is different from the equipment.
With reference to the first aspect, in some optional embodiments, the method further comprises:
when the destination device of the request message is different from the device and the communication between the device and the next hop network device is interrupted, the device does not create a BFD session, wherein the next hop network device is a network device in the MPLS network corresponding to the MPLS label carried in the request message.
In the foregoing embodiment, when there is a failure in a path, if a destination device of a request packet is different from the device, the device does not need to create a BFD session, so that the BFD session is prevented from being created by mistake.
With reference to the first aspect, in some optional embodiments, the method further comprises:
and sending a response message to the upstream network equipment, wherein the response message is used for representing that the connectivity of the label switching path passed by the request message is abnormal.
With reference to the first aspect, in some optional embodiments, the method further comprises:
sending a BFD message to an inlet end network device in the MPLS network through the BFD session;
and when receiving a response message sent by the inlet-end network equipment according to the BFD message, obtaining a detection result representing that the connectivity of the label switching path is normal.
In a second aspect, the present application further provides a path detection method, applied to an ingress network device in a multi-protocol label switching MPLS network, where the method includes:
sending a request message for establishing a BFD session to an exit-end network device in a label switching path based on the label switching path acquired in advance;
and when receiving a BFD message sent by the egress network device, obtaining a detection result representing that the connectivity of the label switching path is normal, wherein the BFD message is a request sent by the egress network device through a BFD session, and the BFD session is created by the egress network device when a target device of the request message is the same as the egress network device.
In a third aspect, the present application further provides a path detecting apparatus, applied to an egress network device in a multi-protocol label switching MPLS network, where the apparatus includes:
a receiving unit, configured to receive a request packet sent by an upstream network device and used for creating a BFD session;
a judging unit, configured to judge whether a destination device of the request packet is the same as the device;
and the session creating unit is used for creating a BFD session when the destination equipment of the request message is the same as the equipment, and the BFD session is used for detecting the connectivity of a label switching path passed by the request message.
In a fourth aspect, the present application further provides a path detecting apparatus, which is disposed in an ingress network device in a multi-protocol label switching MPLS network, and the apparatus includes:
a sending unit, configured to send a request packet for creating a BFD session to an egress network device in a label switched path based on the label switched path obtained in advance;
and the detection unit is configured to obtain a detection result indicating that the connectivity of the label switched path is normal when receiving a BFD packet sent by the egress network device, where the BFD packet is a request sent by the egress network device through a BFD session, and the BFD session is created by the egress network device when a destination device of the request packet is the same as the egress network device.
In a fifth aspect, the present application further provides a network device, which includes a processor and a memory coupled to each other, wherein the memory stores a computer program, and when the computer program is executed by the processor, the network device is caused to perform the method of the first aspect or the second aspect.
In a sixth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when run on a computer, causes the computer to perform the method of the first or second aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic diagram of communication connection of a network system according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of a path detection method according to an embodiment of the present application.
Fig. 3 is a block diagram of a path detection apparatus according to an embodiment of the present disclosure.
Fig. 4 is a second block diagram of a path detection apparatus according to an embodiment of the present application.
Icon: 10-a network system; 11-a network device; 12-a network device; 13-a network device; 14-a network device; 15-a network device; 16-a customer edge device; 17-customer edge equipment; 200-path detection means; 210-a receiving unit; 220-a judging unit; 230-a session creation unit; 300-path detection means; 310-a transmitting unit; 320-detection unit.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It should be noted that the terms "first," "second," and the like are used merely to distinguish one description from another, and are not intended to indicate or imply relative importance.
The applicant has found that after detecting a failure of an intermediate network device on a primary path LSP using BFD techniques, BFD will notify the MPLS OAM on the ingress-side network device that the LSP is failed. The MPLS OAM may notify the forwarding module in the ingress-side network device to switch traffic forwarded on this LSP onto the backup path. At this time, the MPLS OAM may still send an MPLS Echo Request message on the failed main path, the message may be received by the intermediate network device, and then the intermediate device may create a BFD session when the MPLS Echo Request message is no longer forwarded, and then the BFD session may be reestablished. At this time, if there is VPN traffic being forwarded through this global primary path, the VPN traffic will be discarded after being forwarded to the intermediate device.
In view of the above problems, the applicant of the present application proposes the following embodiments to solve the above problems. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, a network system 10 is provided that may include a plurality of network devices for establishing a communication connection between two VPN networks. Multiple forwarding paths may be established among multiple network devices, and each forwarding path is used to implement communication between customer edge devices in two VPN networks.
Illustratively, network system 10 includes network device 11, network device 12, network device 13, network device 14, and network device 15. Therein, the network device 11 can be connected to a customer edge device 16 in a VPN network. The network device 15 may be communicatively connected to a customer edge device 17 in another VPN network. The customer edge device 16 and the customer edge device 17 can be connected with corresponding customer terminals respectively to realize data interaction between the customer terminals.
Network device 11, network device 12, network device 13, network device 14, and network device 15 may form an MPLS network. In an MPLS network, network device 11 → network device 14 → network device 15 may form a forwarding path from customer edge device 16 to customer edge device 17, which may be the primary path. Network device 11 → network device 12 → network device 13 → network device 15 may form another forwarding path, which may be a backup path.
The application also provides a network device, which can comprise a processing module and a storage module. The storage module stores a computer program which, when executed by the processing module, enables the network device to perform the steps of the method described below.
Understandably, the network devices may be ingress network devices, downstream network devices in the MPLS network. The identities of the ingress network device and the downstream network device are determined relative to the transmission direction of the data. For example, when data needs to be transmitted from the customer edge device 16 to the customer edge device 17, the ingress network device in the MPLS network is the network device 11, the egress network device is the network device 15, and the downstream network devices are the network devices except the ingress network device, for example, the network device 12, the network device 13, the network device 14, and the network device 15 may all be downstream network devices.
As another example, when data needs to be transmitted from customer edge device 17 to customer edge device 16, the ingress network device in the MPLS network is network device 15 and the egress network device is network device 11.
Referring to fig. 2, the present application further provides a path detection method, which may be applied to the network device in the MPLS network, where the network devices in the MPLS network cooperate with each other to implement the steps in the method, and the method may include the following steps:
step S110, the inlet end network device sends a request message for establishing BFD session to the outlet end network device in the label switching path based on the label switching path obtained in advance;
step S120, the exit-end network device receives a request message for creating a BFD session, which is sent by an upstream network device;
step S130, the egress network device determines whether the destination device of the request packet is the same as the egress network device itself;
step S140, when the destination device of the request packet is the same as the egress network device, the egress network device creates a BFD session, where the BFD session is used to detect connectivity of a label switched path through which the request packet passes;
step S150, when receiving the BFD packet sent by the egress network device, the ingress network device obtains a detection result indicating that the connectivity of the label switched path is normal.
In the foregoing embodiment, the egress network device may perform identification detection on the destination device in the request message to determine whether the destination device of the request message is the same as the egress network device, and create the BFD session only when the destination device of the request message is the same as the egress network device, so as to improve accuracy of creating the BFD session, further improve reliability of path detection and reliability of traffic data transmission, and avoid that the BFD session is erroneously created due to a failure in a path because the destination device is different from the egress network device, so that the traffic is switched to a failed path and discarded.
The individual steps in the process are explained in detail below, as follows:
in the MPLS network, each network device is deployed with MPLS OAM, wherein an LSP (Label Switch Path) can be maintained and managed by using an MPLS OAM tool.
In addition, in the MPLS network, OSPF (Open Shortest Path First) Protocol and LDP (Label Distribution Protocol) are activated for all network devices.
Referring to fig. 1 again, for example, assuming that data is to be transmitted from the network device 11 to the network device 15, the OSPF protocol and the FRR (Fast Reroute) function of LDP are turned on the network device 11, and the host address on the network device 15 can be notified to the network device 11 through the OSPF protocol, and then corresponding primary path and backup path are formed, as follows:
main path: network device 11 → network device 14 → network device 15;
standby path: network device 11 → network device 12 → network device 13 → network device 15.
It should be noted that, in the label switching path, the egress network device is a last hop device in the label switching path, which is communicated with the ingress network device. The egress network device may be changed in one label switched path. For example, in the above-mentioned primary path, if the connectivity of the primary path is normal, the egress network device is the network device 15. If the link between network device 14 and network device 15 is abnormal in the primary path, the egress network device of the primary path is identified as network device 14. Wherein the network device 15 can be understood as the correct egress end of the main path; and network device 14 may understand that the egress port is mistaken for the correct egress port.
Before step S110, the ingress end network device stores the corresponding label switched path to the correct egress end device in advance, for example, the above-mentioned main path and backup path may be stored. In general, an ingress end network device may store two or more numbers of label switched paths. One of the stored plurality of label switched paths is used as a primary path, and the remaining paths excluding the primary path may be used as backup paths. The manner of acquiring the main path and the backup path by the ingress network device is well known to those skilled in the art, and will not be described herein.
In step S110, the ingress network device may periodically send a request message to the corresponding downstream network device through the label switched path of the primary path, where the request message is used to detect connectivity of the label switched path. The Request message may be an MPLS Echo Request message, which is used for a correct egress network device to create a BFD session. In addition, the period for sending the request message can be flexibly determined according to the actual situation, and is not described herein again.
In this embodiment, the request message may carry key information for verifying whether the network device receiving the request message is a correct egress network device. Wherein, the correct network device at the outlet end is the destination device of the request message in the MPLS network. The critical information may include, but is not limited to, the IP address of the destination device, the discrimination value of the BFD session created by the ingress end device, etc. Understandably, the key information may be set according to actual conditions, as long as it can be used to verify whether the egress network device receiving the request packet is the destination device of the request packet.
After the ingress network device issues the request message, the request message may be transmitted hop-by-hop according to the corresponding label switched path.
In step S120, the upstream network device may be determined according to actual situations, and may be an ingress network device on the label switching path, or an intermediate network device on the label switching path. The intermediate network device is other network devices except the ingress network device and the egress network device in the label switching path.
For example, referring to fig. 1 again, the network device 12 may receive the request message sent by the network device 11. At this time, the network device 11 is an upstream network device of the network device 12. Network device 13 may receive the request packet sent by network device 12, where network device 12 is an upstream device of network device 13.
In step S130, after receiving the request packet, the egress network device may perform parsing and checking on the request packet to determine whether the destination device of the request packet is the same as the device. The judging mode can be flexibly determined according to the actual situation.
It should be noted that when the intermediate network device receives the request packet, it is not necessary to perform IP address resolution and detection on the request packet, but only needs to forward the request packet according to the MPLS label.
As an alternative implementation, step S130 may include: acquiring routing information corresponding to FEC information carried by the request message in advance; when the routing type of the routing information is the host routing, determining that the destination device of the request message is the same as the device; and when the routing type of the routing information is not the host routing, determining that the destination equipment of the request message is different from the equipment.
For example, the request message may carry FEC (Forwarding Equivalence Class) information, for example, the IP address of the network device 15 may be encapsulated in the request message as FEC information on the network device 11. In addition, each network device may store an association relationship between FEC information and its own routing information. The routing information may include a type of route. The routing type may be a host route or a non-host route. For example, the egress network device (network device 15) with the correct LSP stores the association between FEC and host routes, and the intermediate network device (such as network device 14) stores the association between FEC and non-host routes.
If the network device 14 receives the request message, the FEC information in the request message may be obtained through parsing, and then the routing type may be read as a non-host routing based on the association relationship, at this time, it indicates that the destination device of the request message is not the device.
If the network device 15 receives the request message, the FEC information in the request message may be obtained through parsing, and then the routing type may be read as the host routing based on the association relationship, at this time, it indicates that the destination device of the request message is the device.
For another example, after receiving the request packet, the egress network device of the LSP may upload the request packet to the control plane of the egress network device for processing after processing the MPLS label carried in the request packet. Then, the control plane analyzes the FEC information carried in the request message, and then detects whether the IP address corresponding to the FEC information is the address of the equipment; if the IP address corresponding to the FEC information is the same as the address of the equipment, the target equipment of the request message is the equipment; and if the IP address corresponding to the FEC information is different from the address of the equipment, indicating that the target equipment of the request message is not the equipment.
In step S140, if the destination device of the request packet is the same as the egress network device, it indicates that the request packet is expected to be sent to the egress network device, so that the egress network device creates a BFD session.
After the device completes the creation of the BFD session, it may send a BFD packet to the ingress end network device based on the BFD session, so as to detect the connectivity of the path of the BFD session.
In step S150, if the ingress network device receives the BFD packet sent by the egress network device, it indicates that the connectivity of the label switched path corresponding to the BFD session is normal, and the data can be transmitted normally.
In this embodiment, both the ingress network device and the egress network device are deployed with session creation modules, and when the ingress network device starts sending a request packet, the ingress network device may create a BFD session at the ingress end through the session creation modules. After the egress network device receives the request packet, the session creation module in the egress network device may create a BFD session at the egress. When the LSP is detected to be failed subsequently, whether the LSP fails or not can be judged by whether the BFD session at the inlet end does not receive the BFD message sent by the outlet end in the detection period negotiated by the BFD. If the BFD session at the inlet end receives the BFD message sent by the outlet end in the checking period, the connectivity of the LSP is considered to be normal; otherwise, determining that the connectivity of the LSP has a fault.
In this embodiment, the method may further include:
when the destination device of the request message is different from the device and the communication between the device and the next hop network device is interrupted, the device does not create a BFD session, wherein the next hop network device is a network device in the MPLS network corresponding to the MPLS label carried in the request message. The determining method of the next hop network device of the present device is well known to those skilled in the art, and is not described herein again.
Referring to fig. 1 again, assuming that the destination device is the network device 15, in the main path, when the link between the network device 14 and the network device 15 is abnormal and data cannot be transmitted, the network device 14 is the egress network device. If the network device 14 receives the request packet sent by the network device 11, at this time, it may be determined that the destination device of the request packet is different from the network device 14 itself, and because the communication between the network device 14 and the network device 15 is interrupted, at this time, the request packet cannot be sent to the network device 15, and the network device 14 does not need to create a BFD session. At this time, the VPN traffic data is switched to the backup path for data forwarding. Thus, the problem that the network device 11 mistakenly thinks that the BFD session of the main path is restarted (UP), and then continues to switch the VPN traffic to the main path, which is actually an abnormal path, so that the data traffic cannot be transmitted can be avoided.
As an optional implementation, the method may further include:
and when the communication between the equipment and the next hop network equipment is interrupted, sending a response message to the upstream network equipment, wherein the response message is used for representing that the connectivity of the label switching path passed by the request message is abnormal.
Understandably, when the device is not the destination device of the request message and cannot send the request message to the next hop network device, it indicates that there is an abnormality in the communication between the device and the next hop network device. At this time, the device may send a response message to the ingress network device to notify that there is communication abnormality between the device and the next hop network device, so that the maintenance personnel can perform device maintenance based on the abnormal problem of positioning.
As an optional implementation, the method may further include:
when the egress network equipment completes the establishment of a BFD session, the egress network equipment sends a BFD message to the ingress network equipment in the MPLS network through the BFD session;
and when receiving a response message sent by the inlet end network equipment according to the BFD message, the outlet end network equipment obtains a detection result representing that the connectivity of the label switching path is normal.
Understandably, if the egress network device completes the creation of the BFD session, it indicates that the network device is the destination device of the request packet, and at this time, the BFD packet is sent to the ingress network device, which may be used to detect the connectivity of the label switched path. Wherein, the detected label switching path is the path for transmitting the request message.
Referring to fig. 3, an embodiment of the present invention further provides a path detection apparatus 200, which can be disposed in any of the above downstream network devices for executing the steps of the method. The path detection device comprises at least one software functional module which can be stored in a storage module in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the downstream network equipment. The processing module is used for executing executable modules stored in the storage module, such as software functional modules and computer programs included in the path detection device.
The path detection apparatus 200 may include a receiving unit 210, a determining unit 220, and a session creating unit 230, and each unit may have the following functions:
a receiving unit 210, configured to receive a request packet sent by an upstream network device for creating a BFD session;
a determining unit 220, configured to determine whether a destination device of the request packet is the same as the device;
a session creating unit 230, configured to create a BFD session when a destination device of the request packet is the same as the device, where the BFD session is used to detect connectivity of a label switched path through which the request packet passes.
Optionally, the determining unit 220 may be further configured to obtain routing information corresponding to the FEC information carried in the request packet in advance; when the routing type of the routing information is the host routing, determining that the destination device of the request message is the same as the device; and when the routing type of the routing information is not the host routing, determining that the destination equipment of the request message is different from the equipment.
Optionally, when the destination device of the request packet is different from the device and communication between the device and a next hop network device is interrupted, the creating unit does not create a BFD session, where the next hop network device is a network device in the MPLS network corresponding to the MPLS label carried in the request packet.
Optionally, the path detection apparatus may further include a sending unit, configured to send a response packet to the upstream network device when communication between the device and the next-hop network device is interrupted, where the response packet is used to characterize that connectivity of the label switching path through which the request packet passes is abnormal.
Optionally, the sending unit may be further configured to send a BFD packet to an ingress end network device in the MPLS network through the BFD session; the receiving unit may be further configured to obtain a detection result indicating that connectivity of the label switching path is normal when receiving a response packet sent by the ingress end network device according to the BFD packet.
Referring to fig. 4, an embodiment of the present invention further provides a path detection apparatus 300, which can be disposed in the ingress network device and used for executing the steps of the method. The path detection device comprises at least one software functional module which can be stored in a storage module in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the ingress-side network equipment. The processing module is used for executing executable modules stored in the storage module, such as software functional modules and computer programs included in the path detection device.
The path detection apparatus 300 may include a sending unit 310 and a detecting unit 320, and the functions of each unit may be as follows:
a sending unit 310, configured to send a request packet for creating a BFD session to an egress network device in a label switched path based on the label switched path obtained in advance;
a detecting unit 320, configured to obtain, when receiving a BFD packet sent by the egress network device, a detection result indicating that connectivity of the label switched path is normal, where the BFD packet is a request sent by the egress network device through a BFD session, and the BFD session is created by the egress network device when a destination device of the request packet is the same as the egress network device itself.
In this embodiment, the processing module may be an integrated circuit chip having signal processing capability. The processing module may be a general purpose processor. For example, the processor may be a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application.
The memory module may be, but is not limited to, a random access memory, a read only memory, a programmable read only memory, an erasable programmable read only memory, an electrically erasable programmable read only memory, and the like. In this embodiment, the storage module may be used to store the address of the device itself, the destination address in the message, and the like. Of course, the storage module may also be used to store a program, and the processing module executes the program after receiving the execution instruction.
It will be appreciated that the network device may also include further components. For example, the network device may further include a communication module for establishing a communication connection with other devices. The components may be implemented in hardware, software, or a combination thereof.
It should be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the network device, the path detection apparatus 200, and the path detection apparatus 300 described above may refer to the corresponding processes of the steps in the foregoing method, and are not described in detail herein.
The embodiment of the application also provides a computer readable storage medium. The computer-readable storage medium has stored therein a computer program which, when run on a computer, causes the computer to execute the path detection method as described in the above embodiments.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by hardware, or by software plus a necessary general hardware platform, and based on such understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments of the present application.
In summary, in the present solution, the egress network device may perform identification detection on the destination device in the request message to determine whether the destination device of the request message is the same as the egress network device, and create the BFD session only when the destination device of the request message is the same as the egress network device, so as to improve accuracy of creating the BFD session, further improve reliability of path detection and reliability of traffic data transmission, and avoid that the BFD session is erroneously created due to a failure in a path because the destination device is different from the egress network device, so that the traffic is switched to a failed path and discarded.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus, system, and method may be implemented in other ways. The apparatus, system, and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for detecting a path, applied to an egress network device in a multi-protocol label switching MPLS network, the method comprising:
receiving a request message sent by upstream network equipment for establishing a BFD session;
judging whether the destination equipment of the request message is the same as the equipment or not;
and when the destination equipment of the request message is the same as the equipment, a BFD session is established, wherein the BFD session is used for detecting the connectivity of a label switching path passed by the request message.
2. The method according to claim 1, wherein determining whether the destination device of the request packet is the same as the device comprises:
acquiring routing information corresponding to FEC information carried by the request message in advance;
when the routing type of the routing information is the host routing, determining that the destination device of the request message is the same as the device;
and when the routing type of the routing information is not the host routing, determining that the destination equipment of the request message is different from the equipment.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
when the destination device of the request message is different from the device and the communication between the device and the next hop network device is interrupted, the device does not create a BFD session, wherein the next hop network device is a network device in the MPLS network corresponding to the MPLS label carried in the request message.
4. The method of claim 3, further comprising:
and sending a response message to the upstream network equipment, wherein the response message is used for representing that the connectivity of the label switching path passed by the request message is abnormal.
5. The method of claim 1, further comprising:
sending a BFD message to an inlet end network device in the MPLS network through the BFD session;
and when receiving a response message sent by the inlet-end network equipment according to the BFD message, obtaining a detection result representing that the connectivity of the label switching path is normal.
6. A path detection method applied to an ingress network device in a multi-protocol label switching MPLS network, the method comprising:
sending a request message for establishing a BFD session to an exit-end network device in a label switching path based on the label switching path acquired in advance;
and when receiving a BFD message sent by the egress network device, obtaining a detection result representing that the connectivity of the label switching path is normal, wherein the BFD message is a request sent by the egress network device through a BFD session, and the BFD session is created by the egress network device when a target device of the request message is the same as the egress network device.
7. A path detection apparatus, provided in an egress network device in a multi-protocol label switching MPLS network, the apparatus comprising:
a receiving unit, configured to receive a request packet sent by an upstream network device and used for creating a BFD session;
a judging unit, configured to judge whether a destination device of the request packet is the same as the device;
and the session creating unit is used for creating a BFD session when the destination equipment of the request message is the same as the equipment, and the BFD session is used for detecting the connectivity of a label switching path passed by the request message.
8. A path detection apparatus, configured to be disposed in an ingress network device in a multi-protocol label switching MPLS network, the apparatus comprising:
a sending unit, configured to send a request packet for creating a BFD session to an egress network device in a label switched path based on the label switched path obtained in advance;
and the detection unit is configured to obtain a detection result indicating that the connectivity of the label switched path is normal when receiving a BFD packet sent by the egress network device, where the BFD packet is a request sent by the egress network device through a BFD session, and the BFD session is created by the egress network device when a destination device of the request packet is the same as the egress network device.
9. A network device, characterized in that the network device comprises a processor and a memory coupled to each other, in which memory a computer program is stored which, when executed by the processor, causes the network device to perform the method according to any one of claims 1-6 or to perform the method according to claim 7.
10. A computer-readable storage medium, in which a computer program is stored which, when run on a computer, causes the computer to perform the method of any one of claims 1-6, or to perform the method of claim 7.
CN202111598871.4A 2021-12-24 2021-12-24 Path detection method, path detection device, network equipment and computer readable storage medium Active CN114338459B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111598871.4A CN114338459B (en) 2021-12-24 2021-12-24 Path detection method, path detection device, network equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111598871.4A CN114338459B (en) 2021-12-24 2021-12-24 Path detection method, path detection device, network equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114338459A true CN114338459A (en) 2022-04-12
CN114338459B CN114338459B (en) 2024-02-13

Family

ID=81013908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111598871.4A Active CN114338459B (en) 2021-12-24 2021-12-24 Path detection method, path detection device, network equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114338459B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651582A (en) * 2009-09-24 2010-02-17 中兴通讯股份有限公司 Method and system for detecting link connectivity of multi-protocol label switching (MPLS) network
WO2010069175A1 (en) * 2008-12-15 2010-06-24 华为技术有限公司 Method, system and equipment for establishing bidirectional forwarding detection
CN101848155A (en) * 2010-05-12 2010-09-29 北京星网锐捷网络技术有限公司 Detection method of label switching path and label switching router
CN102223241A (en) * 2010-04-15 2011-10-19 杭州华三通信技术有限公司 Method and equipment for informing network change
CN102404145A (en) * 2011-11-17 2012-04-04 华为技术有限公司 Method, device and system for detecting multi-protocol label switching ring network
CN102769552A (en) * 2012-07-31 2012-11-07 杭州华三通信技术有限公司 Method and apparatus for transmitting BFD (bidirectional forwarding detection) message during LSP (label switched path) detection by BFD
EP3151486A1 (en) * 2015-10-01 2017-04-05 Juniper Networks, Inc. Fast convergence of evpn networks for multi homing topologies
WO2017128752A1 (en) * 2016-01-26 2017-08-03 中兴通讯股份有限公司 Link fault detection method and apparatus
CN107547383A (en) * 2017-07-26 2018-01-05 新华三技术有限公司 Path detection method and device
US20190158394A1 (en) * 2016-08-04 2019-05-23 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for updating multiple multiprotocol label switching (mpls) bidirectional forwarding detection (bfd) sessions
WO2021043086A1 (en) * 2019-09-05 2021-03-11 华为技术有限公司 Method, device and system for establishing sbfd session
US20210344567A1 (en) * 2019-01-16 2021-11-04 Huawei Technologies Co., Ltd. Connectivity detection session creation method, network device, and system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010069175A1 (en) * 2008-12-15 2010-06-24 华为技术有限公司 Method, system and equipment for establishing bidirectional forwarding detection
CN101651582A (en) * 2009-09-24 2010-02-17 中兴通讯股份有限公司 Method and system for detecting link connectivity of multi-protocol label switching (MPLS) network
CN102223241A (en) * 2010-04-15 2011-10-19 杭州华三通信技术有限公司 Method and equipment for informing network change
CN101848155A (en) * 2010-05-12 2010-09-29 北京星网锐捷网络技术有限公司 Detection method of label switching path and label switching router
CN102404145A (en) * 2011-11-17 2012-04-04 华为技术有限公司 Method, device and system for detecting multi-protocol label switching ring network
CN102769552A (en) * 2012-07-31 2012-11-07 杭州华三通信技术有限公司 Method and apparatus for transmitting BFD (bidirectional forwarding detection) message during LSP (label switched path) detection by BFD
EP3151486A1 (en) * 2015-10-01 2017-04-05 Juniper Networks, Inc. Fast convergence of evpn networks for multi homing topologies
WO2017128752A1 (en) * 2016-01-26 2017-08-03 中兴通讯股份有限公司 Link fault detection method and apparatus
US20190158394A1 (en) * 2016-08-04 2019-05-23 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for updating multiple multiprotocol label switching (mpls) bidirectional forwarding detection (bfd) sessions
CN107547383A (en) * 2017-07-26 2018-01-05 新华三技术有限公司 Path detection method and device
US20210344567A1 (en) * 2019-01-16 2021-11-04 Huawei Technologies Co., Ltd. Connectivity detection session creation method, network device, and system
WO2021043086A1 (en) * 2019-09-05 2021-03-11 华为技术有限公司 Method, device and system for establishing sbfd session

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SNLEKHASHREE, ETAL: "configuring and verifying bi-directional forwarding detection functionality in WCDMA base transceiver station", 2021 INTERNATIONAL CONFERENCE ON RECENT TRENDS ON ELECTRONICS,INFORMATION,COMMUNICATION &TECHNOLOGY (RTEICT)》, 29 October 2021 (2021-10-29) *
陈悦: "基于MPLS网络的故障检测及恢复的研究", 《中国优秀硕士学位论文全文数据库》, 15 June 2011 (2011-06-15) *

Also Published As

Publication number Publication date
CN114338459B (en) 2024-02-13

Similar Documents

Publication Publication Date Title
EP3005630B1 (en) Determining the operations performed along a service path/service chain
US8305882B2 (en) Methods, systems, and computer program products for detecting and/or correcting faults in a multiprotocol label switching network by using redundant paths between nodes
US7746793B2 (en) Consistency between MPLS forwarding and control planes
EP2698947B1 (en) Method and device for processing fault
US8886831B2 (en) System and methodology for fast link failover based on remote upstream failures
US8027247B2 (en) Method and router for controlling graceful restart status
US8948001B2 (en) Service plane triggered fast reroute protection
CN107078924B (en) Method, equipment and system for carrying out bidirectional forwarding detection on aggregation link
EP2645640A2 (en) Oam label switched path for fast reroute of protected label switched paths
EP2219329B1 (en) A fast reroute method and a label switch router
CN102571601A (en) Method for ensuring bidirectional forwarding detection reliability and label switching path equipment
WO2012037820A1 (en) Multi-protocol label switch system, node device and method for establishing bidirectional tunnel
WO2008148334A1 (en) Method, system and apparatus thereof for detecting abnormal receipt of message
CN106936656B (en) Method, device and system for realizing packet loss detection
US20200044964A1 (en) Defect detection in ip/mpls network tunnels
US8254271B1 (en) Point-to-multipoint connectivity verification
CN104468208A (en) Detection and recovery method and device for communication faults
EP2129042A1 (en) A multicast network system, node and a method for detecting a fault of a multicast network link
WO2021143524A1 (en) Fault detection method, and apparatus
CN109347717B (en) VXLAN tunnel switching method and device
CN114338459B (en) Path detection method, path detection device, network equipment and computer readable storage medium
CN113904972A (en) Path detection method, device, controller and PE equipment
CN109787797B (en) Link fault detection method, device and system
KR101562894B1 (en) Method and recording medium for monitoring misconnected link in mpls-tp based network

Legal Events

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