CN114338459B - 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
CN114338459B
CN114338459B CN202111598871.4A CN202111598871A CN114338459B CN 114338459 B CN114338459 B CN 114338459B CN 202111598871 A CN202111598871 A CN 202111598871A CN 114338459 B CN114338459 B CN 114338459B
Authority
CN
China
Prior art keywords
network device
request message
path
network
bfd session
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111598871.4A
Other languages
Chinese (zh)
Other versions
CN114338459A (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

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 creating a BFD session; judging whether the destination equipment of the request message is the same as the network equipment of the outlet end; and when the destination equipment of the request message is the same as the network equipment of the outlet end, creating 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 creating the BFD session can be improved, the reliability of path detection and the reliability of traffic data transmission are further improved, and the problem that the traffic is switched to a fault path to be discarded because the BFD session is created by mistake due to the fact that the destination equipment of the message is different from the network equipment.

Description

Path detection method, path detection device, network equipment and computer readable storage medium
Technical Field
The present invention relates to the field of data communications technologies, and in particular, to a path detection method, a path detection device, a network device, and a computer readable storage medium.
Background
MPLS (Multi-Protocol Label Switching, multiprotocol label switching) is a new generation of IP high-speed backbone network switching standard, and uses label switching to forward messages. MPLS OAM (Operation, administration And Maintenance) is a tool in MPLS networks to detect LSP (Label Switch Path, label switched path) failures. There are many VPN (Virtual Private Network ) services provided by MPLS networks in the carrier network currently, and in order to improve the reliability of VPN services, two paths of primary and backup are usually formed when the network is deployed, and when the primary path fails, traffic is switched to the backup path.
Currently, when a failure of a main path is detected by using a BFD (Bidirectional Forwarding Detection ) technology, traffic is switched to a backup path after the failure of the main path, and then a BFD session is created in error, and the traffic is switched back to the main path after the BFD session is created in error, so that the traffic cannot be transmitted normally.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a path detection method, apparatus, network device, and computer readable storage medium, which can ensure that a BFD session is created normally, and solve the problem that traffic cannot be transmitted normally due to incorrect creation of the BFD session.
In order to achieve the above object, embodiments of the present application are realized by:
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 multiprotocol label switching MPLS network, where the method includes: receiving a request message sent by upstream network equipment for creating a BFD session; judging whether the destination equipment of the request message is the same as the equipment; and when the destination equipment of the request message is the same as the equipment, creating a BFD session, wherein the BFD session is used for detecting the connectivity of a label switching path through which the request message passes.
In the above embodiment, the network device at the exit end may identify and detect the destination device in the request packet, so as to determine whether the destination device of the request packet is the same as the network device at the exit end, and create the BFD session only when the destination device is the same as the network device at the exit end, thereby improving accuracy of creating the BFD session, further improving reliability of path detection and reliability of traffic data transmission, and avoiding that the BFD session is created erroneously due to a failure of the path caused by different destination devices and the network device at the exit end, so that the traffic is switched to the failure path to be discarded.
With reference to the first aspect, in some optional embodiments, determining whether the destination device and the device of the request packet are the same includes: acquiring routing information corresponding to FEC information carried in the request message in advance; when the route type of the route information is host route, determining that the destination equipment of the request message is the same as the equipment; when the route type of the route information is not host route, the destination device of the request message is determined to be different from the device.
With reference to the first aspect, in some optional embodiments, the method further includes:
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 the network device corresponding to the MPLS label carried in the request message in the MPLS network.
In the above embodiment, when the path has a fault, if the destination device of the request packet is different from the device, the device does not need to create a BFD session, so as to avoid creating the BFD session by mistake.
With reference to the first aspect, in some optional embodiments, the method further includes:
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 through which the request message passes is abnormal.
With reference to the first aspect, in some optional embodiments, the method further includes:
transmitting BFD messages to an inlet-side network device in the MPLS network through the BFD session;
and when receiving the response message sent by the network equipment at the inlet end 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 multiprotocol label switching MPLS network, where the method includes:
based on a pre-acquired label switching path, sending a request message for creating a BFD session to an outlet end network device in the label switching path;
and when receiving a BFD message sent by the outlet end network equipment, 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 outlet end network equipment through a BFD session, and the BFD session is created when the destination equipment of the request message is the same as the outlet end network equipment.
In a third aspect, the present application further provides a path detection apparatus, applied to an egress network device in a multiprotocol label switching MPLS network, the apparatus including:
a receiving unit, configured to receive a request packet sent by an upstream network device for creating a BFD session;
the judging unit is used for judging whether the target equipment of the request message is the same as the equipment;
and the session creation unit is used for creating a BFD session when the destination equipment of the request message is the same as the equipment, wherein the BFD session is used for detecting the connectivity of a label switching path through which the request message passes.
In a fourth aspect, the present application further provides a path detection apparatus, provided in an ingress network device in a multiprotocol label switching MPLS network, the apparatus including:
a sending unit, configured to send, based on a label switched path acquired in advance, a request packet for creating a BFD session to an egress network device in the label switched path;
and the detection unit is used for obtaining a detection result representing that the connectivity of the label switching path is normal when receiving the BFD message sent by the outlet end network device, wherein the BFD message is a request sent by the outlet end network device through a BFD session, and the BFD session is created when the destination device of the request message is the same as the outlet end network device.
In a fifth aspect, the present application also provides a network device comprising a processor and a memory coupled to each other, the memory storing a computer program which, when executed by the processor, causes the network device to perform the method of the first or second aspect described above.
In a sixth aspect, the present application also provides a computer readable storage medium having stored therein a computer program which, when run on a computer, causes the computer to perform the method of the first or second aspect described above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed 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 should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
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 flow chart of a path detection method according to an embodiment of the present application.
Fig. 3 is one of block diagrams of a path detection apparatus according to an embodiment of the present application.
Fig. 4 is a second block diagram of a path detection device 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-user edge device; 17-user edge device; 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 between descriptions and should not be construed as indicating or implying relative importance.
Applicants have found that upon detecting a failure of an intermediate network device on a primary path LSP using BFD techniques, BFD may notify MPLS OAM on the ingress network device that the LSP is in failure. The MPLS OAM informs a forwarding module in the ingress network device to switch traffic forwarded on this LSP onto the backup path. At this time, the MPLS OAM still sends a MPLS Echo Request packet on the failed primary path, the packet is received by the intermediate network device, then the intermediate device creates a BFD session when the MPLS Echo Request packet is no longer forwarded, and then the BFD session is re-established, where the ingress network device misunderstands that the failure of the primary path is recovered, and switches traffic to the primary path. At this point, if VPN traffic is being forwarded through this global main path, VPN traffic is discarded after being forwarded to the intermediate device.
In view of the above problems, the applicant of the present application proposes the following examples to solve the above problems. The following embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, a network system 10 is provided and may include a plurality of network devices for establishing a communication connection between two VPN networks. A plurality of forwarding paths may be established between the plurality of network devices, where each forwarding path is configured to implement communications between user 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. Wherein the network device 11 may 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 user edge device 16 and the user edge device 17 may be connected to corresponding user terminals, respectively, so as to implement data interaction between the user 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 can form another forwarding path, which can be used as a backup path.
The application also provides a network device, which can comprise a processing module and a storage module. The memory 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.
The network device may be an ingress network device, a downstream network device in an MPLS network. The identities of the entry 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 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.
For 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 devices in the MPLS network, and the network devices in the MPLS network cooperate with each other to implement steps in the method, where the method may include the following steps:
step S110, the network equipment at the inlet end sends a request message for creating BFD session to the network equipment at the outlet end in the label switching path based on the pre-acquired label switching path;
step S120, the outlet end network device receives a request message sent by an upstream network device for creating a BFD session;
step S130, the outlet end network device judges whether the destination device of the request message is the same as the outlet end 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 switching path through which the request packet passes;
step S150, when the ingress network device receives the BFD packet sent by the egress network device, the ingress network device obtains a detection result that characterizes that connectivity of the label switching path is normal.
In the above embodiment, the egress network device may identify and detect the destination device in the request packet, so as to determine whether the destination device and the egress network device of the request packet are the same, and create the BFD session only when the destination device and the egress network device are the same, thereby improving accuracy of creating the BFD session, further improving reliability of path detection and reliability of traffic data transmission, and avoiding that the BFD session is created erroneously due to a failure of a path, which is caused by a difference between the destination device and the egress network device, and the traffic is switched to the failure path and discarded.
The steps in the method will be described in detail as follows:
in an MPLS network, each network device is deployed with MPLS OAM, where an LSP (Label Switch Path, label switched path) may be maintained and managed using MPLS OAM tools.
In addition, in MPLS networks, OSPF (Open Shortest Path First, open path shortest first) protocol and LDP (Label Distribution Protocol ) are active on all network devices.
Referring again to fig. 1, for example, assuming that data is to be transmitted from network device 11 to network device 15, an OSPF protocol and an FRR (Fast Reroute) function of LDP are started on network device 11, a host address on network device 15 may be advertised to network device 11 through the OSPF protocol, and a corresponding main path and a standby path are formed at this time, 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 the last hop device in the label switching path that communicates with the ingress network device. In one label switched path, the egress network device may be variable. For example, in the above-mentioned main path, if the connectivity of the main path is normal, the egress network device is the network device 15. If the link between the network device 14 and the network device 15 is abnormal in the main path, the network device at the exit end of the main path is referred to as the network device 14. Wherein the network device 15 can be understood as the correct egress end of the main path; while the network device 14 may be understood as being the misinterpreted egress port and not the correct egress port.
Prior to step S110, the ingress network device has previously stored the corresponding label switched path to the correct egress device, e.g. the above described primary and backup paths may be stored. In general, the ingress network device may store two or more label switched paths. Among the stored label switched paths, one of the label switched paths serves as a main path, and the remaining paths except the main path can serve as standby paths. The method for acquiring the primary path and the backup path by the ingress network device is well known to those skilled in the art, and is not described herein.
In step S110, the ingress network device may periodically send a request packet to a corresponding downstream network device through the label switched path of the main path, where the request packet is used to detect connectivity of the label switched path. The request message may be a MPLS Echo Request message, which is used for the correct egress network device to create the BFD session. In addition, the period of sending the request message can be flexibly determined according to the actual situation, which is not described herein.
In this embodiment, the request message may carry key information for checking whether the network device that receives the request message is the correct network device at the egress end. The correct network device at the exit end is the destination device of the request message in the MPLS network. The key information may include, but is not limited to, the IP address of the destination device, the authentication value of the BFD session created by the ingress side device, and the like. It is understood that the key information may be set according to the actual situation, so long as the key information can be used to verify whether the network device at the outlet end that receives the request message is the destination device of the request message.
After the network device at the entry end issues the request message, the request message can be transmitted hop by hop according to the corresponding label switching path.
In step S120, the upstream network device may be determined according to the actual situation, and may be an ingress network device on the label switched path, or an intermediate network device on the label switched 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 again to fig. 1, the network device 12 may receive a 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. The network device 13 may receive the request message sent by the network device 12, where the network device 12 is an upstream device of the network device 13.
In step S130, after receiving the request message, the network device at the outlet end may perform parsing and checking on the request message to determine whether the destination device of the request message is the same as the device. The judging mode can be flexibly determined according to actual conditions.
When receiving the request message, the intermediate network device does not need to analyze and detect the IP address of the request message, and only needs to forward the request message according to the MPLS label.
As an alternative embodiment, step S130 may include: acquiring routing information corresponding to FEC information carried in the request message in advance; when the route type of the route information is host route, determining that the destination equipment of the request message is the same as the equipment; when the route type of the route information is not host route, the destination device of the request message is determined to be different from the device.
For example, FEC (Forwarding Equivalence Class ) information may be carried in the request packet, e.g., on the network device 11, the IP address of the network device 15 may be encapsulated as FEC information in the request packet. In addition, each network device may store an association relationship between FEC information and own routing information. The routing information may include a routing type. The route type may be a host route or a non-host route. For example, the association between FEC and host routes is stored in the network device (network device 15) at the correct exit of the LSP, and the association between FEC and non-host routes is stored in the intermediate network device (e.g., network device 14).
If the network device 14 receives the request message, it may parse the FEC information in the request message, and then, based on the association relationship, may read that the route type is a non-host route, where it indicates that the destination device of the request message is not the device.
If the network device 15 receives the request message, it may parse the FEC information in the request message, and then, based on the association relationship, it may read that the route type is the host route, where it indicates that the destination device of the request message is the device.
For another example, after the exit network device of the LSP receives the request packet, after the MPLS label carried in the request packet is processed, the request packet may be submitted to the control plane of the exit network device for processing. 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 destination equipment of the request message is the equipment; if the IP address corresponding to the FEC information is different from the address of the device, the destination device of the request message is not the device.
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 present device completes the creation of the BFD session, a BFD packet may be sent to the ingress network device based on the BFD session to detect connectivity of a 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 connectivity of the label switched path corresponding to the BFD session is normal, and data may be normally transmitted.
In this embodiment, both the ingress network device and the egress network device are deployed with a session creation module, and when the ingress network device starts to send a request packet, the ingress network device may create a BFD session of the ingress through the session creation module. After the egress network device receives the request message, a session creation module in the egress network device may create a BFD session for the egress. When the LSP fault is detected subsequently, whether the LSP is faulty or not can be judged by judging whether the BFD session of the inlet end does not receive the BFD message sent by the outlet end in the detection period of BFD negotiation. If BFD session at the inlet end receives BFD message sent by the outlet end in the checking period, then the LSP is considered to have normal connectivity; otherwise, determining that 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 the network device corresponding to the MPLS label carried in the request message in the MPLS network. The determination method of the next-hop network device of the present device is well known to those skilled in the art, and will not be described herein.
Referring to fig. 1 again, assume that the destination device is a network device 15, and in the main path, when a link between the network device 14 and the network device 15 is abnormal and data cannot be transmitted, the network device 14 is an egress network device. If the network device 14 receives the request message sent by the network device 11, at this time, it may be determined that the destination device of the request message 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 message cannot be sent to the network device 15, and the network device 14 does not need to create a BFD session. At this time, VPN traffic data is switched to the backup path for data forwarding. In this way, the problem that the network device 11 mistakenly considers that the BFD session of the main path is restarted (UP), and then continues to switch VPN traffic to the main path, where the main path is actually an abnormal path, and thus cannot transmit data traffic can be avoided.
As an alternative embodiment, the method may further comprise:
and when the communication between the device and the next hop network device is interrupted, sending a response message to the upstream network device, wherein the response message is used for representing that the connectivity of the label switching path through which the request message passes 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 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 inform that there is a communication abnormality between the device and the next hop network device, so that maintenance personnel may perform device maintenance based on the located abnormality problem.
As an alternative embodiment, the method may further comprise:
when the exit end network equipment completes the creation of the BFD session, the exit end network equipment sends a BFD message to the entrance end network equipment in the MPLS network through the BFD session;
and when receiving the response message sent by the network equipment at the inlet end according to the BFD message, the network equipment at the outlet end obtains a detection result representing that the connectivity of the label switching path is normal.
Understandably, when 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 egress network device sends the BFD packet to the ingress network device, so as to be used to detect connectivity of the label switched path. The detected label switching path is a path for transmitting the request message.
Referring to fig. 3, the embodiment of the present application further provides a path detection apparatus 200, which may be disposed in any of the above downstream network devices, for performing each step in the method. The path detection means comprise at least one software function module which may be stored in a memory module in the form of software or Firmware (Firmware) or cured in a downstream network device Operating System (OS). The processing module is configured to execute executable modules stored in the storage module, such as a software function module and a computer program included in the path detection device.
The path detecting apparatus 200 may include a receiving unit 210, a judging unit 220, and a session creating unit 230, and the functional roles of the respective units may be as follows:
a receiving unit 210, configured to receive a request packet sent by an upstream network device for creating a BFD session;
a judging unit 220, configured to judge whether the destination device and the local device of the request packet are the same;
and the session creation unit 230 is configured to create a BFD session when the 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 FEC information carried in the request packet in advance; when the route type of the route information is host route, determining that the destination equipment of the request message is the same as the equipment; when the route type of the route information is not host route, the destination device of the request message is determined to be different from the device.
Optionally, when the destination device of the request packet is different from the device, and communication between the device and the 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 that corresponds to the MPLS label carried in the request packet.
Optionally, the path detection device may further include a sending unit, configured to send a response packet to the upstream network device when the 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, through the BFD session, a BFD packet to an ingress network device in the MPLS network; the receiving unit may be further configured to obtain a detection result indicating that connectivity of the label switching path is normal when receiving the reply packet sent by the ingress network device according to the BFD packet.
Referring to fig. 4, the embodiment of the present application further provides a path detection apparatus 300, which may be disposed in the above-mentioned ingress network device, and is configured to perform each step in the method. The path detection means comprise at least one software function module which may be stored in a memory module in the form of software or Firmware (Firmware) or cured in an Operating System (OS) of the portal network device. The processing module is configured to execute executable modules stored in the storage module, such as a software function module and a computer program included in the path detection device.
The path detection device 300 may include a transmitting unit 310 and a detecting unit 320, and the functional roles of the respective units may be as follows:
a sending unit 310, configured to send, to an egress network device in a label switching path, a request packet for creating a BFD session based on a label switching path acquired in advance;
and the detecting unit 320 is configured to obtain a detection result indicating that connectivity of the label switching 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 when a destination device of the request packet of the egress network device is the same as the egress network device itself.
In this embodiment, the processing module may be an integrated circuit chip with signal processing capability. The processing module may be a general purpose processor. For example, the processor may be a central processing unit (Central Processing Unit, CPU), digital signal processor (Digital Signal Processing, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application.
The memory module may be, but is not limited to, random access memory, read only memory, programmable read only memory, erasable programmable read only memory, 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 so on. 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 comprise 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 noted that, for convenience and brevity of description, specific working processes of the network device, the path detection apparatus 200 and the path detection apparatus 300 described above may refer to corresponding processes of each step in the foregoing method, and will not be described in detail herein.
Embodiments of the present application also provide 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 perform the path detection method as described in the above embodiments.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that the present application may be implemented in hardware, or by means of software plus a necessary general hardware platform, and based on this understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disc, a mobile hard disk, etc.), and includes several instructions to cause a computer device (may be a personal computer, a server, or a network device, etc.) to perform the methods described in the respective implementation scenarios of the present application.
In summary, in the scheme, the egress network device may identify and detect the destination device in the request packet, so as to determine whether the destination device and the egress network device of the request packet are the same, and create the BFD session only when the destination device and the egress network device are the same, thereby improving accuracy of creating the BFD session, further improving reliability of path detection and reliability of traffic data transmission, and avoiding that the BFD session is created erroneously due to a failure of a path caused by a difference between the destination device and the egress network device, so that the traffic is switched to the failure 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 manners as well. The above-described apparatus, systems, and method embodiments are merely illustrative, for example, flow charts 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, the functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application, and various modifications and variations may be suggested to one skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims (10)

1. A path detection method, applied to an egress network device in a multiprotocol label switching MPLS network, the method comprising:
receiving a request message sent by upstream network equipment for creating a BFD session;
judging whether the destination equipment of the request message is the same as the equipment; the destination device is the correct exit end network device in the MPLS network;
and when the destination equipment of the request message is the same as the equipment, creating a BFD session, wherein the BFD session is used for detecting the connectivity of a label switching path through which the request message passes.
2. The method of claim 1, wherein determining whether the destination device and the own device of the request message are the same comprises:
acquiring routing information corresponding to FEC information carried in the request message in advance;
when the route type of the route information is host route, determining that the destination equipment of the request message is the same as the equipment;
when the route type of the route information is not host route, the destination device of the request message is determined to be different from the device.
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 the network device corresponding to the MPLS label carried in the request message in the MPLS network.
4. A method according to claim 3, characterized in that 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 through which the request message passes is abnormal.
5. The method according to claim 1, wherein the method further comprises:
transmitting BFD messages to an inlet-side network device in the MPLS network through the BFD session;
and when receiving the response message sent by the network equipment at the inlet end 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 multiprotocol label switching MPLS network, the method comprising:
based on a pre-acquired label switching path, sending a request message for creating a BFD session to an outlet end network device in the label switching path;
when receiving the BFD message sent by the outlet end network equipment, obtaining a detection result representing that the connectivity of the label switching path is normal; the BFD message is a request sent by the outlet end network device through a BFD session, wherein the BFD session is created when the destination device of the request message is the same as the outlet end network device; the destination device and the egress network device are the same as each other, and represent that the egress network device is the correct egress network device in the MPLS network.
7. A path detection apparatus, characterized by an egress network device disposed in a multiprotocol label switching MPLS network, the apparatus comprising:
a receiving unit, configured to receive a request packet sent by an upstream network device for creating a BFD session;
the judging unit is used for judging whether the target equipment of the request message is the same as the equipment; the destination device is the correct exit end network device in the MPLS network;
and the session creation unit is used for creating a BFD session when the destination equipment of the request message is the same as the equipment, wherein the BFD session is used for detecting the connectivity of a label switching path through which the request message passes.
8. A path detection apparatus, characterized by an ingress network device disposed in a multiprotocol label switching MPLS network, the apparatus comprising:
a sending unit, configured to send, based on a label switched path acquired in advance, a request packet for creating a BFD session to an egress network device in the label switched path;
the detection unit is used for obtaining a detection result representing that the connectivity of the label switching path is normal when receiving a BFD message sent by the outlet end network device, wherein the BFD message is a request sent by the outlet end network device through a BFD session, and the BFD session is created when the destination device of the request message is the same as the outlet end network device; the destination device and the egress network device are the same as each other, and represent that the egress network device is the correct egress network device in the MPLS network.
9. A network device comprising a processor and a memory coupled to each other, the memory storing a computer program that, when executed by the processor, causes the network device to perform the method of any one of claims 1-5 or to perform the method of claim 6.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when run on a computer, causes the computer to perform the method according to any of claims 1-5 or to perform the method according to claim 6.
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 CN114338459A (en) 2022-04-12
CN114338459B true 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 (10)

* 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
WO2021043086A1 (en) * 2019-09-05 2021-03-11 华为技术有限公司 Method, device and system for establishing sbfd session

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109691026B (en) * 2016-08-04 2022-06-10 瑞典爱立信有限公司 Method and device for updating multiple multi-protocol label switching bidirectional forwarding detection sessions
CN114363118A (en) * 2019-01-16 2022-04-15 华为技术有限公司 Method, network equipment and system for creating connectivity detection session

Patent Citations (10)

* 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
CN107547383A (en) * 2017-07-26 2018-01-05 新华三技术有限公司 Path detection method and device
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
configuring and verifying bi-directional forwarding detection functionality in WCDMA base transceiver station;SNLekhashree, etal;2021 International Conference on Recent Trends on Electronics,Information,Communication &Technology (RTEICT)》;20211029;全文 *
基于MPLS网络的故障检测及恢复的研究;陈悦;《中国优秀硕士学位论文全文数据库》;20110615;全文 *

Also Published As

Publication number Publication date
CN114338459A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
US8902762B2 (en) Troubleshooting method and apparatus
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
TWI586131B (en) Mpls fast re-route using ldp (ldp-frr)
EP3005630B1 (en) Determining the operations performed along a service path/service chain
EP1817855B1 (en) System and methods for detecting network failure
EP2645640B1 (en) Oam label switched path for fast reroute of protected label switched paths
CN101427501B (en) Method and apparatus for consistency between MPLS traffic engineering forwarding and control planes
US9485175B2 (en) Continuity check protocol optimization systems and methods
EP2119114B1 (en) Analyzing virtual private network failures
CN107078924B (en) Method, equipment and system for carrying out bidirectional forwarding detection on aggregation link
US20130148489A1 (en) Connection verification for mpls label switched paths and pseudowires
US9537846B2 (en) Integrity check optimization systems and methods in live connectivity frames
WO2014032435A1 (en) Method and device for processing location information about fault point
WO2008148334A1 (en) Method, system and apparatus thereof for detecting abnormal receipt of message
CN102571601A (en) Method for ensuring bidirectional forwarding detection reliability and label switching path equipment
US20100296412A1 (en) Method, Device, and System for Establishing Label Switching Path in Fast Rerouting Switching
CN104468208A (en) Detection and recovery method and device for communication faults
CN113615132A (en) Fast flooding topology protection
CN114338459B (en) Path detection method, path detection device, network equipment and computer readable storage medium
CN111131035A (en) Data transmission method and device
CN110838978B (en) Message forwarding method and device
CN113132223A (en) Fault detection method and equipment
CN109787797B (en) Link fault detection method, device and system
CN112637054B (en) Networking optimization method and device for IP bearing network, computing equipment and storage medium
CN111901181A (en) Processing method for error rate detection and related equipment

Legal Events

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