A fault detection method, network device and system
By carrying SID list indication information in the BFD message, the forwarding paths of the BFD message and the response message are ensured to be reversed and share the same path, which solves the problem of inaccurate detection results of the BFD mechanism in SR policy detection and achieves higher accuracy in fault detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-29
- Publication Date
- 2026-03-24
AI Technical Summary
The existing BFD mechanism suffers from insufficient accuracy in fault detection because the transmission paths of BFD messages and response messages are not shared, especially in SR policy fault detection, where misjudgments are prone to occur.
By carrying a segment identifier list (SID list) in the BFD message, the receiver can determine the reverse path of the forwarding path that transmits the BFD message and send a response message through that path. This ensures that the actual forwarding paths of the BFD message and the response message are reverse-path shared, thereby achieving accurate fault detection of the specific forwarding path in the SR policy.
This improves the accuracy and precision of the BFD mechanism in detecting faults in SR policies, ensuring the accuracy of the detection results.
Smart Images

Figure CN120185997B_ABST
Abstract
Description
[0001] This application is a divisional application of Chinese Patent Application No. 202110128378.X, filed on January 29, 2021, entitled "A Fault Detection Method, Network Device and System", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of communication technology, and in particular to a fault detection method, network device and system. Background Technology
[0003] Bidirectional forwarding detection (BFD), as a mechanism that can quickly perform end-to-end detection, is widely used for fault detection in segment routing policy (SR policy).
[0004] Currently, the fault detection process of the BFD mechanism includes: the sending end sending a BFD message to the reflecting end through the SR policy, and requesting the reflecting end to send back a response message for the BFD message to the sending end, thereby determining whether the SR policy is faulty. Since the SR policy is a unidirectional tunnel, the response message of the BFD message is usually transmitted via Internet Protocol (IP) routing. However, the transmission path of the response message determined by IP routing (also called the IP path) may not pass through the network devices traversed by the SR policy. That is, the BFD message and its response message do not share the same path. Therefore, when a device on the IP path fails, the response message may not reach the sending end, causing the sending end to mistakenly judge the SR policy as faulty, thus reducing the accuracy of the SR policy detection results.
[0005] Therefore, there is an urgent need to provide a fault detection method that can not only utilize the BFD mechanism to quickly complete the detection, but also overcome the problem that the BFD detection results are not accurate due to the non-co-path transmission of BFD messages and response messages, so as to achieve more accurate fault detection of SR policy by the BFD mechanism. Summary of the Invention
[0006] Based on this, this application provides a fault detection method, network device, and system. The BFD message carries a segment identification list (SID list) indication information, enabling the receiving end to determine the forwarding path that shares the reverse path with the forwarding path transmitting the BFD message based on the SID list indication information in the BFD message. The receiving end then sends a response message for the BFD message to the transmitting end based on the determined forwarding path, thereby achieving fault detection of the specific forwarding path in the SR policy and improving the accuracy and precision of fault detection by the BFD mechanism.
[0007] In this application, BFD detection may refer to, for example, static BFD detection, dynamic BFD detection, or seamless bidirectional forwarding detection (SBFD) detection.
[0008] Firstly, this application provides a fault detection method applied to a first network device. When a first SR policy exists between a second network device and the first network device, and the second network device needs to perform fault detection on a first forwarding path in the first SR policy, the method may include, for example, the following: the first network device receives a first BFD message containing indication information of a first SID list sent by the second network device through the first forwarding path of the first SR policy. At this time, the first network device can determine a second forwarding path that shares a reverse path with the first forwarding path based on the indication information of the first SID list in the first BFD message, and send a first response message of the first BFD message to the second network device through the second forwarding path. The first response message is used to instruct the second network device to perform fault detection on the first forwarding path. In this way, the transmitting end (i.e., the second network device) of BFD detection carries the indication information of the SID list in the BFD message, so that the receiving end (i.e., the first network device) can determine the forwarding path that is reverse-path common to the forwarding path of the transmitted BFD message based on the indication information of the SID list, and send the response message of the BFD message to the transmitting end based on the determined forwarding path. By ensuring that the real forwarding paths of the BFD message and the response message are reverse-path common, accurate fault detection of specific forwarding paths in the SR policy is achieved, thereby improving the accuracy and precision of the BFD mechanism in detecting faults in the SR policy.
[0009] The SR policy can be an SR-MPLS policy, corresponding to a multi-protocol label switching (MPLS) network scenario; or it can be an SRv6 policy, corresponding to Internet Protocol version 6 (IPv6). In the SR-MPLS policy scenario, the SID list corresponds to the MPLS label stack, and this SID list can include at least one MPLS label corresponding to a network device or link. In the SRv6 policy scenario, the SID list corresponds to a list of IPv6 addresses, and this SID list can include at least one IPv6 address corresponding to a network device or link.
[0010] For any two SR policies to be reverse-coordinated, it can mean that the order of network devices and links traversed by the two tunnels determined by the two SR policies is reversed. For any two forwarding paths in any two SR policies to be reverse-coordinated, it can mean that the order of network devices and links traversed by the two forwarding paths determined by the two SID lists corresponding to the two forwarding paths is reversed. In the current design, the two forwarding paths with reverse coordinated routing can belong to two separate SR policies. However, it is understandable that in other possible implementations, such as defining the round-trip path between two endpoints as belonging to a complete SR policy, the two forwarding paths can also be considered to belong to the same SR policy.
[0011] In one possible implementation, before the first network device receives the first BFD message sent by the second network device through the first forwarding path of the first SR policy, the method may further include: the first network device generating indication information for a first SID list. Alternatively, the first network device receives the indication information for the first SID list sent by the second network device. In this way, the first network device can store the indication information for the first SID list and the correspondence between the second forwarding path, thus preparing for determining the second forwarding path based on the indication information for the first SID list in the first BFD message after receiving it.
[0012] In another possible implementation, the method may further include: a first network device receiving a message sent by a control and management device, the message including indication information of a first SID list. Furthermore, the message also includes indication information of a second SID list, wherein the indication information of the second SID list indicates the first forwarding path, and the indication information of the first SID list indicates the second forwarding path; or, the indication information of the second SID list indicates the second forwarding path, and the indication information of the first SID list indicates the first forwarding path.
[0013] As an example, the message could be a Border Gateway Protocol Segment Routing Policy (BGPSR policy) message. This BGPSR policy message can carry the indication information for the first SID list through a sub-type length value (sub-TLV) field. If the BGPSR policy message also carries the indication information for a second SID list, then the indication information for both the first and second SID lists can be carried in one sub-TLV field within the BGPSR policy message, or they can be carried in two different sub-TLV fields within the BGPSR policy message. It should be noted that the message carrying the indication information for the first SID list can be a BGPSR policy message, or it can be a Network Configuration Protocol (NETCONF) or Path Computation Element Protocol (PCEP) message, etc.
[0014] In this implementation, the indication information for the first SID list can also be allocated and sent to the control and management device by the second network device, and then sent to the first network device by the control and management device. As an example, the second network device can send the indication information for the first SID list to the control and management device by carrying it in a Border Gateway Protocol Link State (BGP-LS) message, using the sub-TLV field of that BGP-LS message. If the BGP-LS message also carries the indication information for the second SID list, then the indication information for both the first and second SID lists can be carried in one sub-TLV field of the BGP-LS message, or they can be carried in two different sub-TLV fields within the BGP-LS message. It should be noted that when the second network device sends the indication information of the first SID list to the control and management device, the message used to carry the indication information of the first SID list can be a BGP-LS message, or a NETCONF or PCEP message, etc.
[0015] In one possible implementation, the indication information of the first SID list can be used to indicate the SID list corresponding to the second forwarding path. Then, after receiving the first BFD message, the first network device can directly determine the second forwarding path for transmitting the first response message corresponding to the first BFD message based on the indication information of the first SID list, making accurate BFD detection possible.
[0016] In another possible implementation, the indication information of the first SID list can also be used to indicate the SID list corresponding to the first forwarding path. In one scenario, the first network device can store the correspondence between the indication information of the first SID list and the second forwarding path. Then, after receiving the first BFD packet, the first network device can directly determine the second forwarding path corresponding to the indication information of the first SID list. In another scenario, the first network device can also store the correspondence between the indication information of the first SID list and the indication information of the second SID list, with the indication information of the second SID list used to indicate the SID list corresponding to the second forwarding path. Then, the first network device determines the second forwarding path based on the indication information of the first SID list. For example, this could include: the first network device determining the indication information of the second SID list based on the indication information of the first SID list; and then, the first network device determining the second forwarding path based on the indication information of the second SID list. This makes accurate BFD detection possible.
[0017] It should be noted that in some possible scenarios, if the network devices or links traversed by the second forwarding path are faulty, or if the network devices or links traversed by the first forwarding path are faulty, the second network device may not be able to receive the first response message. In this case, if the second network device does not receive the first response message through the second forwarding path within a preset time (e.g., 1 second), since the first and second forwarding paths share a common path in reverse, it can still be determined that the first forwarding path is faulty. In other possible scenarios, if the network devices and links traversed by both the first and second forwarding paths are normal, the second network device will be able to receive the first response message. In this case, based on the received first response message, the second network device determines that both the first and second forwarding paths transmitting the first BFD message and the first response message are normal, thus confirming that the first forwarding path is not faulty.
[0018] In some possible implementations, the method may further include: a first network device sending a second BFD message to a second network device via a second forwarding path of a second SR policy; the second BFD message including indication information of a third SID list, the indication information of which instructs the first network device to determine a first forwarding path for sending a second response message of the second BFD message; the first network device receiving the second response message from the first forwarding path; and the first network device performing fault detection on the second forwarding path based on the second response message. Thus, this method enables accurate bidirectional BFD detection of specific forwarding paths in the SR policy.
[0019] In other possible implementations, the method may further include: a first network device receiving a third BFD message sent by a second network device through a third forwarding path of a first SR policy, the third BFD message including indication information of a fourth SID list, the third forwarding path being different from the first forwarding path; the first network device determining a fourth forwarding path based on the indication information of the fourth SID list, the fourth forwarding path and the third forwarding path sharing a reverse path; the first network device sending a third response message of the third BFD message to the second network device through the fourth forwarding path, the third response message being used to instruct the second network device to perform fault detection on the third forwarding path. Thus, this method enables BFD detection of a specific forwarding path in an SR policy that includes multiple forwarding paths, improving the detection accuracy of BFD. In this embodiment, the indication information of the first SID list can be a path segment or a bonding segment identifier (BSID); or, the indication information of the first SID list can also be the first SID list itself. Similarly, the indication information of the second SID list can also be a path segment, a BSID, or the second SID list itself.
[0020] Secondly, this application also provides a fault detection method applied to a second network device. When a first SR policy exists between the second network device and the first network device, and the second network device needs to perform fault detection on a first forwarding path in the first SR policy, the method may include, for example, the second network device sending a BFD message including indication information of a first SID list to the first network device through the first forwarding path of the first SR policy. The indication information of the first SID list is used to instruct the first network device to determine a second forwarding path for sending a response message of the BFD message, the second forwarding path being the reverse path of the first forwarding path; if the second network device receives a response message of the BFD message from the second forwarding path, then the second network device performs fault detection on the first forwarding path based on the response message. In this way, the transmitting end (i.e., the second network device) of BFD detection carries the indication information of the SID list in the BFD message, so that the receiving end (i.e., the first network device) can determine the forwarding path that is reverse-path common to the forwarding path of the transmitted BFD message based on the indication information of the SID list, and send the response message of the BFD message to the transmitting end based on the determined forwarding path. By ensuring that the real forwarding paths of the BFD message and the response message are reverse-path common, accurate fault detection of the specific forwarding path in the SR policy is achieved, thereby improving the accuracy and precision of the BFD mechanism in detecting faults in the SR policy.
[0021] In one possible implementation, before the second network device sends a BFD message to the first network device through the first forwarding path of the first SR policy, the method may further include: the second network device receiving indication information of the first SID list sent by the first network device.
[0022] In another possible implementation, before the second network device sends a BFD message to the first network device through the first forwarding path of the first SR policy, the method may further include: the second network device generating indication information for a first SID list. In this implementation, the second network device may also send the indication information for the first SID list to the first network device, providing a guarantee for the implementation of the fault detection method provided in this application embodiment.
[0023] In another possible implementation, before the second network device sends a BFD message to the first network device through the first forwarding path of the first SR policy, the method may further include: the second network device receiving indication information of a first SID list sent by the control and management device. In one case, the control and management device may generate the indication information of the first SID list and send it to the second network device; in another case, the indication information of the first SID list may be generated and sent by the second network device to the control and management device, and then sent by the control and management device to the second network device. As an example, the second network device sending the indication information of the first SID list to the control and management device may include: the second network device sending a BGP-LS message to the control and management device, the BGP-LS message carrying the indication information of the first SID list through a sub-TLV field; the second network device receiving the indication information of the first SID list sent by the control and management device may include: the second network device receiving a BGPSR policy message sent by the control and management device, the BGPSR policy message carrying the indication information of the SID list through a sub-TLV field.
[0024] In this application, the indication information of the first SID list can be a Path Segment or a BSID; alternatively, the indication information of the first SID list can also be the first SID list itself. Similarly, the indication information of the second SID list can also be a Path Segment, a BSID, or the second SID list itself.
[0025] Thirdly, this application provides a fault detection device applied to a first network device. The device may include a receiving unit, a determining unit, and a sending unit. The receiving unit is configured to receive a first bidirectional link detection (BFD) message sent by a second network device via a first forwarding path of a first segmentation routing policy (SRpolicy). The first BFD message includes indication information of a first segment identifier list (SID list). The determining unit is configured to determine a second forwarding path based on the indication information of the first SID list. The second forwarding path and the first forwarding path share a reverse path. The sending unit is configured to send a first response message of the first BFD message to the second network device via the second forwarding path. The first response message instructs the second network device to perform fault detection on the first forwarding path.
[0026] In one possible implementation, the apparatus may further include a generation unit. This generation unit is configured to generate indication information for the first SID list before receiving a first BFD message sent by the second network device via a first forwarding path of the first SR policy.
[0027] In one possible implementation, the receiving unit is further configured to receive indication information of the first SID list sent by the second network device.
[0028] In one possible implementation, the receiving unit is further configured to receive a message sent by the control and management device, the message including indication information of the first SID list. As an example, the message also includes indication information of a second SID list, wherein the indication information of the second SID list indicates the first forwarding path, and the indication information of the first SID list indicates the second forwarding path; or, the indication information of the second SID list indicates the second forwarding path, and the indication information of the first SID list indicates the first forwarding path. The message may, for example, be a BGPSR policy message, which carries the indication information of the first SID list through a sub-TLV field.
[0029] As an example, the indication information of the first SID list is used to indicate the SID list corresponding to the second forwarding path.
[0030] As another example, the indication information of the first SID list is used to indicate the SID list corresponding to the first forwarding path. The determining unit is specifically used to: determine the indication information of the second SID list based on the indication information of the first SID list; and determine the second forwarding path based on the indication information of the second SID list.
[0031] In one possible implementation, the sending unit is further configured to send a second BFD message to the second network device via the second forwarding path of the second SR policy. The second BFD message includes indication information of a third SID list, which is used to instruct the first network device to determine the first forwarding path for sending the second response message of the second BFD message. The receiving unit is further configured to receive the second response message from the first forwarding path. In this case, the device further includes a detection unit configured to perform fault detection on the second forwarding path based on the second response message.
[0032] In one possible implementation, the receiving unit is further configured to receive a third BFD message sent by the second network device through a third forwarding path of the first SR policy, the third BFD message including indication information of a fourth SID list, the third forwarding path being different from the first forwarding path; the determining unit is further configured to determine a fourth forwarding path based on the indication information of the fourth SID list, the fourth forwarding path and the third forwarding path sharing a reverse path; the sending unit is further configured to send a third response message of the third BFD message to the second network device through the fourth forwarding path, the third response message being used to instruct the second network device to perform fault detection on the third forwarding path.
[0033] The indication information of the first SID list can be a Path Segment or a BSID; alternatively, the indication information of the first SID list can also be the first SID list itself. Similarly, the indication information of the second SID list can also be a Path Segment, a BSID, or the second SID list itself.
[0034] The fault detection device provided in the third aspect is used to perform the relevant operations mentioned in the first aspect above. Its specific implementation method and the effect achieved can be found in the relevant description in the first aspect above, and will not be repeated here.
[0035] Fourthly, this application also provides a fault detection device applied to a second network device. The device may include a sending unit, a receiving unit, and a detection unit. The sending unit is configured to send a BFD message to the first network device via a first forwarding path of a first SR policy. The BFD message includes indication information of a first SID list, which instructs the first network device to determine a second forwarding path for sending a response message to the BFD message. The second forwarding path shares the same path in reverse with the first forwarding path. The receiving unit is configured to receive a response message to the BFD message from the second forwarding path. The detection unit is configured to perform fault detection on the first forwarding path based on the response message.
[0036] In one possible implementation, the receiving unit is further configured to receive indication information of the first SIDlist sent by the first network device before sending a BFD message to the first network device through the first forwarding path of the first SR policy.
[0037] In one possible implementation, the receiving unit is further configured to receive indication information of the first SID list sent by the control and management device before sending a BFD message to the first network device via the first forwarding path of the first SR policy. As an example, the receiving unit is specifically configured to: receive a BGPSRpolicy message sent by the control and management device, the BGPSRpolicy message carrying the indication information of the SID list through a sub-TLV field. In this implementation, the sending unit is further configured to send the indication information of the first SID list to the control and management device before receiving the indication information of the first SID list sent by the control and management device. Specifically, the sending unit is configured to: send a BGP-LS message to the control and management device, the BGP-LS message carrying the indication information of the first SID list through a sub-TLV field.
[0038] In one possible implementation, the apparatus further includes a generation unit for generating indication information for the first SID list. Then, the sending unit is further configured to send the indication information of the SID list to the first network device.
[0039] The indication information of the first SID list can be a Path Segment or a BSID; alternatively, the indication information of the first SID list can also be the first SID list itself. Similarly, the indication information of the second SID list can also be a Path Segment, a BSID, or the second SID list itself.
[0040] The fault detection device provided in the fourth aspect is used to perform the relevant operations mentioned in the second aspect above. Its specific implementation method and the effect achieved can be found in the relevant description in the second aspect above, and will not be repeated here.
[0041] Fifthly, this application also provides a network device, comprising: a processor for enabling the network device to implement the methods provided in the first or second aspect. The network device may further include a memory coupled to the processor, wherein when the processor executes instructions stored in the memory, the network device can implement the methods provided in the first or second aspect. The network device may also include a communication interface for communicating with other devices; exemplaryly, the communication interface may be a transceiver, circuit, bus, module, or other type of communication interface. In this application, the instructions in the memory may be pre-stored or downloaded from the Internet and stored when using the network device; this application does not specifically limit the source of the instructions in the memory.
[0042] In a sixth aspect, this application also provides a network system, the network system including a first network device and a second network device, wherein: the first network device is used to perform the method provided in the first aspect; and the second network device is used to perform the method provided in the second aspect.
[0043] In a seventh aspect, this application provides a chip, including a processor and an interface circuit; the interface circuit is used to receive instructions and transmit them to the processor; the processor is used to execute instructions corresponding to the methods provided in the first or second aspect.
[0044] Eighthly, this application provides a computer-readable storage medium storing program code or instructions that, when run on a computer, cause the computer to perform the methods provided in the first or second aspect above.
[0045] Ninthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the first or second aspect above. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0047] Figure 1 This is a schematic diagram of the structure of a network system according to an embodiment of this application;
[0048] Figure 2 This is a schematic diagram of the structure of an SR policy in an embodiment of this application;
[0049] Figure 3 This is a flowchart of a fault detection method 100 in an embodiment of this application;
[0050] Figure 4a This is a schematic diagram illustrating the format of the sub-TLV field in a BGPSR policy message according to an embodiment of this application.
[0051] Figure 4b This is a schematic diagram illustrating the format of the sub-TLV field in another BGPSR policy message in this application embodiment;
[0052] Figure 4c Examples of embodiments in this application Figure 4a or Figure 4bA format diagram of the Value field in a sub-TLV field;
[0053] Figure 5a This is a schematic diagram illustrating the format of the SID list TLV field in a BGP-LS message according to an embodiment of this application;
[0054] Figure 5b This is a schematic diagram illustrating the format of the sub-TLV field in a SID list TLV field according to an embodiment of this application;
[0055] Figure 5c This is a schematic diagram illustrating the format of the sub-TLV field in another SID list TLV field in an embodiment of this application;
[0056] Figure 6a This is a schematic diagram illustrating the format of a BFD message c and a response message C in an embodiment of this application;
[0057] Figure 6b This is a schematic diagram illustrating the format of a BFD message d and a response message D in an embodiment of this application;
[0058] Figure 6c This is a schematic diagram illustrating the format of a BFD message e and a response message E in an embodiment of this application;
[0059] Figure 7 This is a schematic diagram of the structure of a fault detection device 700 in an embodiment of this application;
[0060] Figure 8 This is a schematic diagram of the structure of a fault detection device 800 in an embodiment of this application;
[0061] Figure 9 This is a schematic diagram of the structure of a network device 900 in an embodiment of this application;
[0062] Figure 10 This is a schematic diagram of the structure of a network device 1000 according to an embodiment of this application;
[0063] Figure 11 This is a schematic diagram of the structure of a network system 1100 in an embodiment of this application. Detailed Implementation
[0064] Currently, during the BFD detection process of SR policy, the BFD message is transmitted from the transmitter to the receiver through the SR policy to be detected. However, when the receiver sends the response message of the BFD message, it determines the path of the response message from the receiver to the transmitter through IP routing, and sends the response message to the transmitter through the path determined by IP routing. The transmitter then performs fault detection on the SR policy based on the response message.
[0065] For example, in Figure 1 The network system shown may include customer edge (CE) device 01, CE device 02, provider edge (PE) device 11, PE device 12, provider (P) device 21, P device 22, P device 23, and P device 24. PE device 11 is connected to CE device 01. PE device 11 is connected to PE device 12 via P device 21 and P device 22, and also via P device 23 and P device 24. PE device 12 is connected to CE device 02. Assume that there are SR policy 1 and SR policy 2 between PE device 11 and PE device 12, where PE device 11 is the ingress node for SR policy 1 and SR policy 2, and PE device 12 is the egress node for SR policy 1 and SR policy 2. For ease of description, the following two examples assume that both SR policy 1 and SR policy 2 include a forwarding path; therefore, BFD detection of this forwarding path can also be called BFD detection of the SR policy. SR policy 1 includes P device 21 and P device 22, and SR policy 2 includes P device 23 and P device 24.
[0066] As an example, when PE device 11 needs to perform BFD detection on SR policy 1, the operations performed may include: S11, PE device 11 sends a BFD message a to PE device 12 via SR policy 1; S12, PE device 12 sends a response message A corresponding to BFD message a to PE device 11 via IP routing, passing through P device 24 and P device 23 in sequence. That is, the IP path 1 traversed by the response message A passes through PE device 12, P device 24, P device 23, and PE device 11 in sequence. On the one hand, if the network devices or links traversed by IP path 1 fail, such as P device 23 failing, P device 24 failing, or at least one link included in IP path 1 failing, PE device 11 may not receive the response message A within a preset time, thus incorrectly determining that SR policy 1 is faulty. On the other hand, even if PE device 11 receives the response message A, in scenarios such as bidirectional detection, since BFD message a and response message A are not transmitted along the same path, it may incorrectly determine that SR policy 1 is normal even if IP path 1 is not faulty. In this example, since SR policy 1 and IP path 1 do not pass through the same network devices, the current BFD detection results cannot accurately reflect the fault status of SR policy 1.
[0067] As another example, the operation of BFD detection for SR policy 1 and SR policy 1' (not shown in the figure) may include: S21, PE device 11 sends BFD message a and BFD message a' to PE device 12 respectively through SR policy 1 and SR policy 1'; S22, PE device 12 sends response message A corresponding to BFD message a and response message A' corresponding to BFD message b to PE device 11 sequentially through P device 24 and P device 23 via IP routing, that is, response message A and response message A' are both transmitted through IP path 1. In this example, the IP path 1 determined based on IP routing is the same for SR policy 1 and SR policy 2. Thus, even if the device or link traversed by SR policy 1 is not faulty, but the device or link traversed by SR policy 1' is faulty, since the transmission path of the BFD response messages of SR policy 1 and SR policy 1' is IP path 1, as long as the device or link included in IP path 1 is faulty, PE11 will determine that SR policy 1 and SR policy 1' are faulty based on the lack of received response messages. This makes it impossible to achieve fine-grained path-level detection.
[0068] Based on this, embodiments of this application provide a fault detection method. If a second network device needs to perform BFD detection on a first forwarding path in a first SR policy to a first network device, the operation may include: the second network device sending a first BFD message to the first network device through the first forwarding path of the first SR policy, the first BFD message including indication information of a first SID list; when the first network device receives the first BFD message, it can determine a second forwarding path that shares the reverse path with the first forwarding path according to the indication information of the first SID list, and thus, the first network device can send a first response message of the first BFD message to the second network device through the second forwarding path, the first response message being used to instruct the second network device to perform fault detection on the first forwarding path. In this way, the transmitting end of BFD detection carries the SID list indication information in the BFD message, enabling the receiving end to determine the forwarding path that shares the reverse path with the forwarding path of the transmitted BFD message based on the SID list indication information. Based on the determined forwarding path, the receiving end sends a response message of the BFD message to the transmitting end. By ensuring that the actual forwarding paths of the BFD message and the response message share the reverse path, accurate fault detection of the specific forwarding path in the SR policy is achieved, improving the accuracy and precision of the BFD mechanism in detecting faults in the SR policy.
[0069] To facilitate understanding of the embodiments of this application, the meanings of some concepts involved in the embodiments of this application will be explained below.
[0070] An SR policy is a tunneling mechanism applicable to SR (Search Engine Response). An SR policy can include at least one candidate path, and each candidate path includes at least one forwarding path. When traffic is forwarded through an SR policy, the preference values of each candidate path are first checked, and the candidate path with the highest preference value is selected as the effective candidate path (also known as the active candidate path). Next, if the effective candidate path includes one forwarding path, the traffic is sent through the SID list corresponding to that forwarding path. If the effective candidate path includes at least two forwarding paths, the load balancing ratio of each forwarding path is determined by the weight corresponding to the SID list of each forwarding path, and the corresponding proportion of traffic is sent through the SID list corresponding to each forwarding path.
[0071] by Figure 1 Taking SR policy 1 as an example, assuming that SR policy 1 is as follows... Figure 2As shown, candidate paths 31 and 32 are included. Candidate path 31 includes forwarding paths 311 and 312, and candidate path 32 includes forwarding paths 321, 322, and 323. The preference value for candidate path 31 is 7, and the preference value for candidate path 32 is 2. The weights for forwarding paths 311 and 312 are 0.6 and 0.4, respectively, and the weights for forwarding paths 321, 322, and 323 are 0.3, 0.4, and 0.3, respectively. The SID lists for forwarding paths 311, 312, 321, 322, and 323 are SID list1 to SID list5, respectively. Therefore, for traffic transmitted through SR policy 1, under normal SR policy 1 conditions, the traffic will be divided into traffic x and traffic y in a 6:4 ratio. Traffic x is transmitted through forwarding path 311 in SR policy 1, and traffic y is transmitted through forwarding path 312 in SR policy 1.
[0072] The SR policy can be an SR-MPLS policy, corresponding to a multi-protocol label switching (MPLS) network scenario; or it can be an SRv6 policy, corresponding to Internet Protocol version 6 (IPv6). In the SR-MPLS policy scenario, the SID list corresponds to the MPLS label stack, and this SID list can include at least one MPLS label corresponding to a network device or link. In the SRv6 policy scenario, the SID list corresponds to a list of IPv6 addresses, and this SID list can include at least one IPv6 address corresponding to a network device or link. For traffic that needs to be transmitted through this SR Policy 1, the corresponding SID list will be pushed into the traffic header.
[0073] Reverse co-pathing can include SR policy reverse co-pathing (e.g., when the SR policy includes only one forwarding path) and reverse co-pathing of a specific forwarding path within an SR policy (e.g., when the SR policy includes multiple forwarding paths). For SR policy reverse co-pathing, it can refer to the reverse order of network devices and links determined by two SR policies. For example, in... Figure 1In the network system shown, SR policy 1 sequentially includes PE device 11, the link between PE device 11 and P device 21, P device 21, the link between P device 21 and P device 22, P device 22, the link between P device 22 and PE device 12, and PE device 12. SR policy 3 sequentially includes PE device 12, the link between PE device 12 and P device 22, P device 22, the link between P device 22 and P device 21, P device 21, the link between P device 21 and PE device 11, and PE device 11. Therefore, SR policy 1 and SR policy 3 are determined to be reverse-common tunnels. For reverse-common forwarding paths in SR policies, it can refer to two forwarding paths whose SIDs in the corresponding SID list are in reverse order. The reverse-common forwarding paths can belong to two separate reverse-common SR policies. For example, taking the SIDs in the SID list as the MPLS labels corresponding to the network devices as an example, in... Figure 1 In the network system shown, the SID list corresponding to forwarding path 41 in SRpolicy 1 is <41021, 41022, 41012>, where 41021, 41022, and 41012 are the SIDs corresponding to P device 21, P device 22, and PE device 12 in SRpolicy 1, respectively. The SID list corresponding to forwarding path 42 is <42022, 42021, 42011>, where 42022, 42021, and 42011 are the SIDs corresponding to P device 22, P device 21, and PE device 11 in SRpolicy 3, respectively. It can be seen that the network devices determined by the corresponding SID lists for forwarding paths 41 and 42 appear in reverse order. Forwarding path 42 can belong to SRpolicy 3, which shares a reverse path with SRpolicy 1. Therefore, forwarding paths 41 and 42 are determined to be reverse-path forwarding paths. It should be noted that the order of the SIDs in the two SID lists corresponding to the two reverse common-path forwarding paths is not necessarily reversed. The contents of the SIDs in the two SID lists can be completely different. Instead, the network devices and links traversed by the forwarding path are the same, determined by the SIDs included in each of the two SID lists. For example, in the example above, the SID list of forwarding path 42 is not <41012, 41022, 41021>, but <42022, 42021, 42011>. However, the order in which the network devices appear, indicated by <42022, 42021, 42011>, is the reverse of the order in which the network devices appear, indicated by the SID list of forwarding path 41.
[0074] It should be noted that the SIDs included in the SID list corresponding to the forwarding path can include the SIDs corresponding to the network devices on that forwarding path. For example, the SID list corresponding to forwarding path 41 includes: the SID corresponding to P device 21, the SID corresponding to P device 22, and the SID corresponding to PE device 12; or, the SIDs included in the SID list corresponding to the forwarding path can also include the SIDs corresponding to the links in that forwarding path. For example, the SID list corresponding to forwarding path 41 includes: the SIDs corresponding to the link from PE device 11 to P device 21, the SIDs corresponding to the link from P device 21 to P device 22, and the SIDs corresponding to the link from P device 22 to PE device 12; or, the SIDs included in the SID list corresponding to the forwarding path can also include both the SIDs corresponding to the network devices on that forwarding path and the SIDs corresponding to the links on that forwarding path. For example, the SID list corresponding to forwarding path 41 includes: the SIDs corresponding to the link from PE device 11 to P device 21, the SID corresponding to P device 22, and the SIDs corresponding to the link from P device 22 to PE device 12; or, the SIDs corresponding to forwarding path 41... The list includes: the SID corresponding to the link from PE device 11 to P device 21, the SID corresponding to P device 21, the SID corresponding to the link from P device 21 to P device 22, the SID corresponding to P device 22, the SID corresponding to the link from P device 22 to PE device 12, and the SID corresponding to PE device 12. Alternatively, the SID list corresponding to the forwarding path can also be other possible scenarios, such as other possible reasonable types, arrangements, or combinations of different types.
[0075] The SIDs included in the SID lists of the two forwarding paths that share a reverse path can be of the same or different types. For example, in a simple implementation, the SID list corresponding to forwarding path 41 includes the SIDs of each network device and each link in forwarding path 41, while the SID list corresponding to forwarding path 42, which shares a reverse path with forwarding path 41, includes the SIDs of each network device and each link in forwarding path 42. As another example, if the cost values of each link are the same, the SID list corresponding to forwarding path 41 may include the SIDs of each network device in forwarding path 41, but not the SIDs of each link, while the SID list corresponding to forwarding path 42, which shares a reverse path with forwarding path 41, includes the SIDs of each network device in forwarding path 42. For example, the SID list corresponding to forwarding path 41 includes the SIDs of each link in forwarding path 41, and the SID list corresponding to forwarding path 42, which shares a reverse path with forwarding path 41, includes the SIDs of each network device in forwarding path 42. Alternatively, the SID list corresponding to forwarding path 42 may include both the SIDs of network devices in forwarding path 42 and the SIDs of links in forwarding path 42. Furthermore, in some possible cases, it is permissible for the SID list corresponding to forwarding path 41 to carry only the SIDs indicating some network devices and / or links on forwarding path 41, and the SID list corresponding to forwarding path 42 to carry only the SIDs indicating some network devices and / or links on forwarding path 42. These SIDs may differ from those indicated in the SID list corresponding to forwarding path 41, but the reverse-path forwarding paths 41 and 42 can still be determined based on these two SID lists and the network topology. The above is just an example. The contents of the two SID lists can be designed in other ways according to the application scenario, as long as the two SID lists can determine the reverse common path forwarding paths of two network devices and links in opposite order.
[0076] The above description pertains to two reverse common-path forwarding paths that share the same network devices and links. In other possible configurations, the conditions for the two reverse common-path paths can be appropriately relaxed within a reasonable range, taking into account the actual application scenario, network structure, and device deployment. For example, a certain proportion of paths passing through the same network devices and / or links could be used as a condition, or passing through certain specific network devices and / or links could be used as a condition. These configurations should be reasonable within the corresponding network scenario and, compared to the method based entirely on IP forwarding response packets mentioned in the background of this application, should improve the detection accuracy of BFD.
[0077] For example, in Figure 1 In the network system shown, according to the fault detection method provided in this application embodiment, the process of performing BFD detection on the forwarding path 41 in SR policy 1 may include: S31, PE device 11 sends a BFD message c to PE device 12 through the forwarding path 41 of SR policy 1, the BFD message c including SID list indication information p; S32, after receiving the BFD message c, PE device 12, according to the SID in the BFD message c... The list's indication information determines that the forwarding path 42 is the reverse path of the forwarding path 41; S33, PE device 12 sends a response message C of BFD message c to PE device 11 through forwarding path 42; S34, if PE device 11 receives the response message C, it can perform fault detection on forwarding path 41 based on the response message C, for example, determining that forwarding path 41 is normal; S35, if PE device 11 does not receive the response message C within a preset time, it can determine that forwarding path 41 is faulty. Since the transmission paths of response message C and BFD message c are reverse paths, the accuracy of the BFD detection result can be guaranteed. Thus, in the BFD detection of SR policy, not only is it ensured that the transmission of BFD message and corresponding response message can be reverse paths to achieve accurate fault detection, but fault detection can also be performed on any forwarding path in SR policy, realizing more granular and accurate BFD detection.
[0078] exist Figure 1 In the network system shown, PE devices can be indirectly connected through one or more forwarding devices, where the forwarding devices include, but are not limited to, P devices.
[0079] It should be noted that the network devices in this application embodiment can refer to devices such as routers, switches, repeaters, and firewalls that can carry services.
[0080] It should be noted that the methods provided in the embodiments of this application can be applied to scenarios with bidirectional virtual private network (VPN) connection services. In this scenario, VPN services and tunnels are deployed between PE devices, and BFD detection is initiated in these tunnels to achieve rapid fault detection. The tunnels between PE devices can be, for example, SRv6 policies or SR-MPLS policies.
[0081] It should be noted that the method provided in this application embodiment can support, for example, static BFD detection, dynamic BFD detection, or seamless bidirectional forwarding detection (SBFD). BFD packets can be used to detect the connectivity of the path carrying services.
[0082] To facilitate understanding of the fault detection method provided in the embodiments of this application, the method will be described below in conjunction with the accompanying drawings.
[0083] Figure 3 This is a flowchart illustrating a fault detection method 100 provided in an embodiment of this application. The method 100 can be applied to a network scenario including a first network device and a second network device. As an example, the first network device can be the egress PE device of the SR policy to be detected, and the second network device is the ingress PE device of the SR policy. For ease of understanding, ... Figure 1 The network system structure shown illustrates the interaction between PE device 11 and PE device 12 when detecting forwarding path 41 in SR policy 1. This application embodiment describes the interaction method, where the first network device corresponds to... Figure 1 In the PE device 12, the second network device corresponds to the PE device 11. In a specific implementation, the method 100 may include, for example, the following steps S101 to S106:
[0084] S101, PE device 11 sends a BFD message c to PE device 12 through forwarding path 41 of SR policy 1. The BFD message c includes indication information of the first SID list.
[0085] S102, PE device 12 receives BFD message c sent by PE device 11 through forwarding path 41 of SR policy 1.
[0086] The indication information of the first SID list can be the first SID list itself. For example, the indication information of the first SID list can be the SID list corresponding to forwarding path 42: <42022, 42021, 42011>. Alternatively, the indication information of the first SID list can also be the identifier of the first SID list. The identifier of the first SID list can include, but is not limited to, the path segment corresponding to the first SID list or the binding segment identifier (BSID) corresponding to the first SID list. For example, the indication information of the first SID list can be the BSID 420 that can indicate <42022, 42021, 42011>.
[0087] Prior to S101, the PE device 11 and PE device 12 may store the indication information of the first SID list in order to cooperate in implementing the method 100.
[0088] In some possible implementations, if the network system does not include control and management devices, then the indication information of the first SID list may be generated by PE device 11 or PE device 12.
[0089] In one scenario, the indication information of the first SID list can be generated by PE device 11. In this case, PE device 11 can also send the indication information of the first SID list to PE device 12, so that PE device 12 can determine the forwarding path that shares the reverse path with forwarding path 41 for the response message C corresponding to BFD message c based on the indication information of the first SID list. In another scenario, the indication information of the first SID list can also be generated by PE device 12. In this case, PE device 12 can send the indication information of the first SID list to PE device 11, so that PE device 11 can carry the indication information of the first SID list in the sent BFD message c, ensuring that BFD detection of forwarding path 41 is effectively performed.
[0090] As an example, the indication information of the first SID list is the BSID corresponding to forwarding path 41. Both PE device 11 and PE device 12 can obtain the indication information corresponding to the first SID list: BSID 410. Thus, PE device 12 can store the mapping relationship between BSID 410 and forwarding path 42; or, PE device 12 can also store the mapping relationship between BSID 410 and BSID 420 corresponding to forwarding path 42, as well as the mapping relationship between BSID 420 and forwarding path 42, thereby ensuring that PE device 12 can determine forwarding path 42 based on the indication information of the first SID list in BFD message c. Here, BSID 420 can be the indication information of the SID list corresponding to forwarding path 42, and can be assigned by PE device 11 or PE device 12 for forwarding path 42.
[0091] As another example, the indication information of the first SID list can also be used to indicate the SID list corresponding to forwarding path 42. In one case, the indication information of the first SID list can be generated by PE device 12. In this case, PE device 12 can send the indication information of the first SID list to PE device 11 so that PE device 11 can carry the indication information of the first SID list in the sent BFD message c, ensuring that BFD detection of forwarding path 41 is effective. In another case, the indication information of the first SID list can also be generated by PE device 11. In this case, PE device 11 can also send the indication information of the first SID list to PE device 12 so that PE device 12 can determine the forwarding path that shares the reverse path with forwarding path 41 for the response message C corresponding to BFD message c based on the indication information of the first SID list. Taking the indication information of the first SID list as the Path Segment corresponding to the forwarding path 42 as an example, both PE device 11 and PE device 12 can obtain the indication information corresponding to the first SID list: Path Segment 420. In this way, PE device 12 can determine the forwarding path 42 based on the indication information of the first SID list in the BFD message c.
[0092] It should be noted that PE11 or PE12 can also generate indication information for a second SID list. If the indication information of the first SID list is used to indicate the SID list corresponding to forwarding path 41, then the indication information of the second SID list can be used to indicate the SID list corresponding to forwarding path 42; if the indication information of the first SID list is used to indicate the SID list corresponding to forwarding path 42, then the indication information of the second SID list can be used to indicate the SID list corresponding to forwarding path 41.
[0093] In some other possible implementations, if the network system includes a control and management device, then the indication information of the first SID list can be sent by the control and management device to PE device 11 and PE device 12.
[0094] As an example, the control and management device can generate indication information for a first SID list and send this information to PE devices 11 and 12. For instance, the control and management device sends message 51 to PE device 11 or PE device 12, which carries the indication information for the first SID list. Thus, the PE device receiving the indication information for the first SID list from the control and management device can forward this information to the other PE device in the SR policy 1. As another example, the control and management device sends message 52 to PE devices 11 and 12, which carries the indication information for the first SID list.
[0095] As another example, PE device 11 or PE device 12 can also generate indication information for the first SID list and send it to the control and management device. The control and management device then sends the indication information for the first SID list to PE devices 11 and 12. For example, PE device 11 or PE device 12 sends message 61 to the control and management device, which carries the indication information for the first SID list. After receiving message 61, the control and management device obtains the indication information for the first SID list from message 61 and sends message 53 to PE devices 11 and 12, which also carries the indication information for the first SID list. Before receiving message 61, the control and management device can also send relevant information about SR policy 1 and SR policy 3 to PE devices 11 and 12, and instruct PE device 11 or PE device 12 to allocate the corresponding SID list indication information (including the aforementioned indication information for the first SID list) for each forwarding path in SR policy 1 and SR policy 3, and send it to the control and management device in message 61.
[0096] In the two examples above, messages 51, 52, 53 or 61 may also include indication information of the second SID list, wherein the indication information of the second SID list can be used to indicate forwarding path 41 and the indication information of the first SID list can be used to indicate forwarding path 42; or, the indication information of the second SID list can also be used to indicate forwarding path 42 and the indication information of the first SID list indicates forwarding path 41.
[0097] Among them, messages 51, 52, and 53 could be, for example, border gateway protocol segment routing policy (BGPSR policy) messages. These BGPSR policy messages could carry indication information of the first SID list through an extended sub-type length value (sub-TLV) field. Figure 4a As shown, the sub-TLV field in this BGPSR policy message, used to carry indication information for the first SID list, may include: a Type field, a Length field, a Reserved field, and a Value field. The Type field indicates that the sub-TLV field carries indication information for the first SID list, the Length field indicates the length of the Value field within the sub-TLV field, and the Value field includes the indication information for the first SID list. If the BGPSR policy message also carries indication information for a second SID list, then in one scenario, the indication information for both the first and second SID lists can be carried in the same sub-TLV field, with the format as shown below. Figure 4bAs shown, in addition to the Type, Length, Reserved, and Value fields, a Flags field may also be included. The value of the Flags field is used to indicate the number of SID list indications carried in the sub-TLV field and the forwarding path indicated by the SID list indications. For example, one bit of the Flags field is used to indicate that the Value field of the sub-TLV field includes indications of the first SID list, and another bit of the Flags field is used to indicate that the Value field of the sub-TLV field includes indications of the second SID list. The Value field of the sub-TLV field includes indications of both the first and second SID lists. In another scenario, the indication information for the first SID list and the second SID list can be carried separately in two sub-TLV fields of the BGPSR policy message. The format of each sub-TLV field can be found in 4a. The Value field of the sub-TLV field carrying the indication information for the first SID list includes the indication information for the first SID list, and the Value field of the sub-TLV field carrying the indication information for the second SID list includes the indication information for the second SID list. Taking the SID list indication information as BSID as an example, if the SR policy is an SRv6 policy, then... Figure 4a or Figure 4b The Value field takes the value of an IPv6 address; if the SR policy is an SR-MPLS policy, then... Figure 4a or Figure 4b The Value field takes the value of an MPLS tag. The format of the Value field can be found in [reference needed]. Figure 4c As shown, it includes a Label field, a Traffic Level (Exp (also known as TC)) field, a Flag (S) field, and a Time to Live (TTL) field. Among them, the TC, S, and TTL fields are reserved fields and can be set to 0.
[0098] Message 61 could be, for example, a Border Gateway Protocol LinkState (BGP-LS) message. This BGP-LS message can use the sub-TLV field within the SID list TLV field defined by the BGP-LS protocol to carry indication information of the first SID list. The format of the SID list TLV field defined by the BGP-LS protocol in the BGP-LS message is as follows: Figure 5aAs shown, the SID list TLV fields may include: Type field, Length field, Flags field, Reserved field, Message Type Identifier (MT ID) field, Algorithm field, Reserved field, Weight field, and at least one sub-TLV field of variable length. Figure 5b As shown, the sub-TLV field in this BGP-LS message, used to carry indication information for the first SID list, may include: a Type field, a Length field, and a Value field. The Type field indicates that the sub-TLV field carries indication information for the first SID list, the Length field indicates the length of the Value field within the sub-TLV field, and the Value field includes the indication information for the first SID list. If the BGP-LS message also carries indication information for a second SID list, then in one scenario, the indication information for both the first and second SID lists can be carried in a single sub-TLV field, with the format as shown below. Figure 5c As shown, in addition to the Type, Length, and Value fields, a Flags field may also be included. The value of the Flags field is used to indicate the number of SID list indication information carried in the sub-TLV field and the forwarding path indicated by each SID list indication information. For example, the first value of the Flags field is used to indicate that the Value field of the sub-TLV field includes indication information of the first SID list, the second value of the Flags field is used to indicate that the Value field of the sub-TLV field includes indication information of the second SID list, and the Value field of the sub-TLV field includes indication information of both the first and second SID lists. In another scenario, the indication information for the first SID list and the second SID list can be carried separately in two sub-TLV fields of the BGP-LS message. The format of each sub-TLV field can be found in 5b. The Value field of the sub-TLV field carrying the indication information for the first SID list includes the indication information for the first SID list, and the Value field of the sub-TLV field carrying the indication information for the second SID list includes the indication information for the second SID list. Taking the SID list indication information as BSID as an example, if the SR policy is an SRv6 policy, then... Figure 5b or Figure 5c The Value field takes the value of an IPv6 address; if the SR policy is an SR-MPLS policy, then... Figure 5b or Figure 5c The Value field takes the value of an MPLS tag. The format of the Value field can be found in [reference needed]. Figure 4c As shown.
[0099] Assuming that messages 51, 52, 53, and 61 all include indication information for the first SID list and indication information for the second SID list, in one scenario, if the indication information for the first SID list and the second SID list in messages 51, 52, or 53 are carried in a single sub-TLV field, then the indication information for the first SID list and the second SID list in message 61 can also be carried in a single sub-TLV field. In another scenario, if the indication information for the first SID list and the second SID list in messages 51, 52, or 53 are carried in two separate sub-TLV fields, then the indication information for the first SID list and the second SID list in message 61 can also be carried in two separate sub-TLV fields.
[0100] In addition, messages 51, 52, 53 and 61 can also be network configuration protocol (NETCONF) or path computation element protocol (PCEP) messages used to carry indication information of the first SID list. The specific implementation is not described in the embodiments of this application.
[0101] It should be noted that when PE device 11 and PE device 12 exchange indication information of the first SID list, the indication information of the first SID list to be exchanged can be carried in the BGP message. For example, the indication information of the first SID list can be carried through the TLV field or sub-TLV field in the BGP message.
[0102] In this application's embodiments, the indication information of the SID list can be the BSID corresponding to the SID list. This BSID is different from the BSID assigned to candidate paths in the current SR policy. The BSID corresponding to the candidate path is used to indicate the candidate path but cannot identify the specific forwarding path under the candidate path; it can be called the Path BSID (abbreviated as P-BSID). The BSID corresponding to the forwarding path in this application is used to indicate the specific forwarding path; it can be called the SID list-level BSID (abbreviated as L-BSID). In this application's embodiments, the BSID used to indicate the forwarding path mainly refers to the L-BSID. The above explanation is mainly used to illustrate that the BSID used in this application to achieve reverse co-path detection is at the SID list level, but it does not mean that the contents of P-BSID and L-BSID cannot be the same in the same SR policy. For example, at least for the case where the candidate path of the SR policy includes only one SR list, the values of P-BSID and L-BSID can be the same. In this case, the indication information of the SID list can even be interpreted as the BSID corresponding to the candidate path.
[0103] For example, when the control and management device sends the indication information of the first SID list to PE device 11 and PE device 12, and the indication information of the first SID list is L-BSID, the operations to be performed before S101 may include: S41, the control and management device establishes SR policy 1 and SR policy 2 from PE device 11 to PE device 12, and SR policy 3 and SR policy 4 from PE device 12 to PE device 11;
[0104] S42, the control and management device assigns L-BSIDs to the forwarding paths in each SR policy, including, for example:
[0105] For the PE device 11 to PE device 12 direction, the configuration is as follows:
[0106] The main SR policy is SR policy 1. SR policy 1 includes forwarding path 41. The SID list of forwarding path 41 is <41021,41022,41012>. The L-BSID corresponding to forwarding path 41 is 410.
[0107] The backup SR policy is SR policy 2. SR policy 2 includes forwarding path 43. The SID list of forwarding path 43 is <43023,43024,43012>. The L-BSID corresponding to forwarding path 43 is 430.
[0108] For the direction from PE device 12 to PE device 11, the configuration is as follows:
[0109] The main SR policy is SR policy 3, which includes forwarding path 42. The SID list of forwarding path 42 is <42022,42021,42011>, and the L-BSID corresponding to forwarding path 42 is 420.
[0110] The backup SR policy is SR policy 4. SR policy 4 includes forwarding path 44. The SID list of forwarding path 44 is <44024,44023,44011>. The L-BSID corresponding to forwarding path 44 is 440.
[0111] S43, the control and management device sends the relevant configurations of SR policy 1 and SR policy 2 to the PE device 11, and sends the L-BSID of forwarding path 42, which shares the reverse path with forwarding path 41 in SR policy 1, and the L-BSID of forwarding path 44, which shares the reverse path with forwarding path 43 in SR policy 2; the control and management device sends the relevant configurations of SR policy 3 and SR policy 4 to the PE device 12, and sends the L-BSID of forwarding path 41, which shares the reverse path with forwarding path 42 in SR policy 3, and the L-BSID of forwarding path 42, which shares the reverse path with forwarding path 44 in SR policy 4, specifically including:
[0112] The content sent by the control and management equipment to PE device 11 is as follows:
[0113] In the main SR policy 1, the SID list of forwarding path 41 is <41021,41022,41012>, the L-BSID corresponding to forwarding path 41 is 410, and the L-BSID corresponding to the reverse common path forwarding path 42 is 420.
[0114] In SR policy 2, the SID list of forwarding path 43 is <43023,43024,43012>, the L-BSID corresponding to forwarding path 43 is 430, and the L-BSID corresponding to forwarding path 44 in the reverse common path is 440.
[0115] The content sent by the control and management equipment to PE device 12 is as follows:
[0116] In the main SR policy 3, the SID list of forwarding path 42 is <42022,42021,42011>, the L-BSID corresponding to forwarding path 42 is 420, and the L-BSID corresponding to the reverse common path forwarding path 41 is 410.
[0117] In SR policy 4, the SID list for forwarding path 44 is <44024,44023,44011>, the L-BSID corresponding to forwarding path 44 is 440, and the L-BSID corresponding to the reverse common path forwarding path 43 is 430.
[0118] Thus, the indication information of the first SID list is configured and carried in the BFD message c. The BFD message c is then sent to the PE device 12 via forwarding path 41 in SR policy 1. The PE device 11 initiates fault detection on forwarding path 41 in SR policy 1. Similarly, the method provided in this embodiment is also applicable to the PE device 11 for fault detection on other forwarding paths included in SR policy 1. The implementation method is the same as that for fault detection on forwarding path 41, and will not be described again here.
[0119] The control and management device in this application embodiment can be any device capable of controlling and managing devices in the network system, such as a software-defined network (SDN) controller.
[0120] S103, PE device 12 determines forwarding path 42 according to the indication information of the first SID list, and forwarding path 42 and forwarding path 41 share the same path in opposite directions.
[0121] The indication information of the first SID list is used to instruct the PE device 12 to determine the forwarding path 42 of the response message C that sends the BFD message c, and the forwarding path 42 is the reverse path of the forwarding path 41.
[0122] In specific implementation, after receiving the BFD message c sent by PE device 11 through forwarding path 41, PE device 12 obtains the indication information of the first SID list by parsing the BFD message c. Thus, PE device 12 can determine the forwarding path 42 that shares the reverse path with forwarding path 41 based on the indication information of the first SID list, which prepares for the BFD message c and the response message C to be transmitted through the reverse path and complete accurate fault detection.
[0123] As an example, if the indication information of the first SID list is used to indicate the SID list corresponding to the forwarding path 42, then in S103, the PE device 12 can directly determine the forwarding path 42 based on the indication information of the first SID list.
[0124] As another example, if the indication information of the first SID list is used to indicate the SID list corresponding to forwarding path 41, then, in one case, assuming that the PE device 12 stores the mapping relationship between the indication information of the first SID list and the indication information of the second SID list, and the indication information of the second SID list is used to indicate the SID list corresponding to forwarding path 42, then S103 may include, for example, PE device 12 determining the indication information of the second SID list based on the indication information of the first SID list; then, PE device 12 determining the forwarding path 42 based on the indication information of the second SID list. In another case, assuming that the PE device 12 stores the mapping relationship between the indication information of the first SID list and the forwarding path 42, then in S103, PE device 12 can also directly determine the forwarding path 42 based on the indication information of the first SID list.
[0125] S104, PE device 12 sends a response message C of BFD message c to PE device 11 through forwarding path 42. The response message C is used to instruct PE device 11 to perform fault detection on forwarding path 41.
[0126] In some possible scenarios, if the network device or link traversed by forwarding path 42 during the execution of S104 is faulty, or if the network device or link traversed by forwarding path 41 before S104 is faulty, then PE device 11 may not be able to receive the response message C. If PE device 11 does not receive the response message C through forwarding path 42 within a preset time (e.g., 1 second), since forwarding path 41 and forwarding path 42 share a common path in reverse, it can be determined that forwarding path 41 is faulty.
[0127] In other possible scenarios, if the network devices and links traversed by the forwarding path 42 are all normal when S104 is executed, then the embodiments of this application may further include the following S105 to S106 to determine that the forwarding path 41 is fault-free.
[0128] S105, PE device 11 receives response message C from BFD message c from forwarding path 42.
[0129] S106, PE device 11 performs fault detection on forwarding path 41 according to the response message C.
[0130] In specific implementation, S106 can refer to: PE device 11 determines, based on the received response message C, that both forwarding path 41 and forwarding path 42 for transmitting BFD message c and response message C are normal. Since forwarding path 41 and forwarding path 42 share the same path in reverse, it is determined that there is no fault in forwarding path 41.
[0131] As can be seen, through this method 100, the transmitting end of BFD detection carries the indication information of the SID list in the BFD message, enabling the receiving end to determine the forwarding path that shares the reverse path with the forwarding path of the transmitted BFD message based on the indication information of the SID list, and send the response message of the BFD message to the transmitting end based on the determined forwarding path. By ensuring that the real forwarding paths of the BFD message and the response message share the reverse path, accurate fault detection of the specific forwarding path in the SR policy is achieved, thereby improving the accuracy and precision of the BFD mechanism in detecting faults in the SR policy.
[0132] In some possible implementations, considering the establishment of a bidirectional shared SR policy, for example, the control and management device can create bidirectional shared SR Policy 1 and SR Policy 3, and associate SR Policy 1 and SR Policy 3 with forward and reverse forwarding paths. Thus, this BFD mechanism can achieve bidirectional fault detection. The above method 100 only describes the fault detection of forwarding path 41 in SR policy 1 by the PE device 11. Similarly, the embodiments of this application may also include the following method 200 to realize the fault detection of forwarding path 42 in SR policy 3 by the PE device 12, wherein forwarding path 42 shares a reverse path with forwarding path 41. Specifically, method 200 may include, for example:
[0133] S201, PE device 12 sends a BFD message d to PE device 11 through forwarding path 42 of SR policy 3. The BFD message d includes indication information of the third SID list.
[0134] S202, PE device 11 receives BFD message d sent by PE device 12 through forwarding path 42 of SR policy 3. The BFD message d includes indication information of the third SID list.
[0135] S203, PE device 11 determines forwarding path 41 according to the indication information of the third SID list, and forwarding path 42 and forwarding path 41 share the same path in opposite directions.
[0136] The indication information in the third SID list is used to instruct the PE device 11 to determine the forwarding path 41 for the response message D that sends the BFD message d, and the forwarding path 41 and the forwarding path 42 are reverse-oriented and share the same path.
[0137] S204, PE device 11 sends a response message D of BFD message d to PE device 12 through forwarding path 41.
[0138] In some possible scenarios, if the network device or link traversed by forwarding path 41 during the execution of S204 is faulty, or if the network device or link traversed by forwarding path 42 prior to S204 is faulty, then PE device 12 may fail to receive the response message D. Therefore, PE device 12 can determine that forwarding path 42 is faulty because it has not received the response message D.
[0139] In other possible scenarios, if the network devices and links traversed by the forwarding path 41 are all functioning normally when S204 is executed, then, optionally, the embodiments of this application may further include the following S205 to S206:
[0140] S205, PE device 12 receives response message D from forwarding path 41.
[0141] S206, PE device 12 performs fault detection on forwarding path 42 based on response message D.
[0142] Based on the received response message D, PE device 12 determines that the forwarding paths 42 and 41 for transmitting BFD message d and response message D are both normal. Therefore, it determines that there is no fault in forwarding path 42.
[0143] The specific implementation methods and effects of S201 to S206 mentioned above can be found in the relevant description in method 100, and will not be repeated here.
[0144] Method 200 can be implemented alone or together with method 100 as a whole. If method 100 and method 200 are implemented together as a whole, there is no specific restriction on the order in which they are implemented.
[0145] In some possible implementations, the SR policy from PE device 11 to PE device 12 is not limited to SR policy 1. For example, to improve the reliability of the network system, SR policy 2 from PE device 11 to PE device 12 can be constructed as a backup tunnel for SR policy 1. For example, the control and management device creates SR policy 1 and SR policy 2, and creates SR policy 3 and SR policy 4 that share a reverse path with both. After deployment, both the primary and backup SR policies are subjected to BFD detection according to the method provided in the embodiments of this application. The embodiments of this application may also include the following method 300 to realize fault detection of forwarding paths in other SR policies from PE device 11 to PE device 12. For example, PE device 11 can perform fault detection on forwarding path 43 in SR policy 2. In specific implementation, method 300 may include, for example, the following:
[0146] S301, PE device 11 sends a BFD message e to PE device 12 through forwarding path 43 of SR policy 2. The BFD message e includes indication information of the fourth SID list.
[0147] S302, PE device 12 receives BFD message e sent by PE device 11 through forwarding path 43 of SR policy 2. The BFD message e includes indication information of the fourth SID list.
[0148] S303, PE device 12 determines forwarding path 44 according to the indication information of the fourth SID list, and forwarding path 44 and forwarding path 43 share the same path in opposite directions.
[0149] The indication information in the fourth SID list is used to instruct the PE device 12 to determine the forwarding path 44 for the response message E that sends the BFD message e, and the forwarding path 44 is the reverse path of the forwarding path 43.
[0150] S304, PE device 12 sends a response message E to PE device 11 via forwarding path 44 for BFD message e.
[0151] In some possible scenarios, if the network device or link traversed by forwarding path 44 during the execution of S304 is faulty, or if the network device or link traversed by forwarding path 43 prior to S304 is faulty, then PE device 11 may fail to receive the response message E. Therefore, PE device 11 can determine that forwarding path 43 is faulty because it has not received the response message E.
[0152] In other possible scenarios, if the network devices and links traversed by the forwarding path 44 are all functioning normally when S304 is executed, then, optionally, the embodiments of this application may further include the following S305 to S306:
[0153] S305, PE device 11 receives response message E from BFD message e from forwarding path 44.
[0154] S306, PE device 11 performs fault detection on forwarding path 43 according to the response message E.
[0155] Based on the received response message E, PE device 11 determines that the forwarding paths 43 and 44 for transmitting BFD message e and response message E are both normal. Therefore, it determines that there is no fault in forwarding path 43.
[0156] The specific implementation methods and effects of S301 to S306 mentioned above can be found in the relevant description in method 100, and will not be repeated here.
[0157] Method 300 can be implemented alone, or as a whole with method 100, or as a whole with method 200, or as a whole with both method 100 and method 200. If method 300 is implemented as a whole with the other methods, then there is no specific restriction on the order of implementation.
[0158] The following example illustrates the format of BFD messages and corresponding response messages in the above methods, using the SR-MPLS policy scenario as an example, where the control and management device sends the indication information of the first SID list to PE device 11 and PE device 12, and the indication information of the first SID list is L-BSID.
[0159] The format of BFD message c can be found in [reference needed]. Figure 6a The BFD message c may include an MPLS label stack and a payload. The MPLS label stack may include: a list of SIDs corresponding to forwarding path 41: 41021, 41022, and 41012, and the indication information L-BSID 420 for the first SID list. The response message C may also include an MPLS label stack and a payload. The MPLS label stack may include: a list of SIDs corresponding to forwarding path 42: 42022, 42021, and 42011.
[0160] The format of the BFD message can be found in [reference]. Figure 6bThe BFD message d may include an MPLS label stack and payload. The MPLS label stack may include: a list of SIDs corresponding to forwarding path 42: 42022, 42021, and 42011, and the indication information L-BSID 410 for the third SID list. The response message C may include an MPLS label stack and payload. The MPLS label stack may include a list of SIDs corresponding to forwarding path 41: 41021, 41022, and 41012.
[0161] The format of the BFD message can be found in [reference]. Figure 6c The BFD message c may include an MPLS label stack and a payload. The MPLS label stack may include: a list of SIDs corresponding to forwarding path 43: 43023, 43024, and 43012, and the indication information L-BSID 440 for the fourth SID list. The response message C may also include an MPLS label stack and a payload. The MPLS label stack may include: a list of SIDs corresponding to forwarding path 44: 44024, 44023, and 44011.
[0162] In the aforementioned BFD messages c, d, e, response C, D, and E, the payload may include Internet Protocol (IP), User Datagram Protocol (UDP), and detection information, where the detection information is BFD information.
[0163] It should be noted that the SID list included in the MPLS label stack of the BFD message and response message can be the MPLS labels corresponding to each hop from the next-hop device to the outgoing PE device, as mentioned above. Figures 6a-6c As shown; or, the SID list included in the MPLS label stack of the BFD message and response message can also be the SID list obtained after removing the MPLS label corresponding to the next-hop device after determining the next hop at the ingress PE device, for example, Figure 6a The MPLS label stack of the BFD message c in the middle may include: the SID list corresponding to forwarding path 41: 41022 and 41012.
[0164] It should be noted that the above Figures 6a-6cThis paper uses the SR-MPLS policy scenario as an example to illustrate the packet format. In the SRv6 policy scenario, the segment routing header (SRH) in the packet carries the SID list indication information. The SID list indication information and the SID list corresponding to the forwarding path carried in the SRH can be IPv6 addresses. Furthermore, although this application mainly describes the scenario of SR policy as a tunneling implementation technology, this reverse co-path detection method can obviously be applied to other possible tunneling implementation technologies that can specify forwarding paths in some way. Therefore, this application also provides a fault detection method. In this method, a first network device receives a first detection packet sent by a second network device through a first forwarding path of a first tunnel. The first detection packet includes indication information of the first forwarding path. The first network device determines a second forwarding path based on the indication information of the first forwarding path. The second forwarding path and the first forwarding path are reverse co-pathed. The first network device sends a first response packet of the first detection packet to the second network device through the second forwarding path. The first response packet is used to instruct the second network device to detect the first forwarding path. The detection message can be a detection message used to implement path fault detection, such as a BFD message or other fault detection message, or it can be other types of detection messages, such as operation, administration and maintenance (OAM) messages.
[0165] Based on the above method embodiments, this application provides a fault detection device, which will be described below with reference to the accompanying drawings.
[0166] Figure 7 This is a schematic diagram of the structure of a fault detection device 700 provided in an embodiment of this application. The device 700 is applied to a first network device, for example, it can perform... Figure 1 The PE device 12 in the illustrated embodiment has the following functions. The device 700 may include: a receiving unit 701, a determining unit 702, and a sending unit 703.
[0167] The receiving unit 701 is configured to receive a first BFD message sent by the second network device through a first forwarding path of the first SR policy. The first BFD message includes indication information of a first segment identifier list (SID list).
[0168] When device 700 is applied Figure 1When the PE device 12 is shown, the specific implementation of the receiving unit 701 receiving the first BFD message sent by the second network device through the first forwarding path of the first SR policy can be found in [reference needed]. Figure 3 S101 and S102 in the embodiments described above.
[0169] The determining unit 702 is used to determine a second forwarding path based on the indication information of the first SID list, wherein the second forwarding path and the first forwarding path share a reverse path.
[0170] When device 700 is applied Figure 1 When the PE device 12 is shown, the specific implementation of the determination unit 702 determining the second forwarding path based on the indication information of the first SID list can be found in [reference needed]. Figure 3 S103 in the embodiment described above.
[0171] The sending unit 703 is used to send a first response message of the first BFD message to the second network device through the second forwarding path. The first response message is used to instruct the second network device to perform fault detection on the first forwarding path.
[0172] When device 700 is applied Figure 1 When the PE device 12 is shown, the specific implementation of the sending unit 703 sending the first response message of the first BFD message to the second network device through the second forwarding path can be found in [reference needed]. Figure 3 S104 in the embodiment.
[0173] In one possible implementation, the device 700 may further include a generation unit. This generation unit is configured to generate indication information for the first SID list before receiving a first BFD message sent by the second network device via a first forwarding path of the first SR policy.
[0174] In one possible implementation, the receiving unit 701 is further configured to receive indication information of the first SID list sent by the second network device.
[0175] In one possible implementation, the receiving unit 701 is further configured to receive a message sent by the control and management device, the message including indication information of the first SID list. As an example, the message also includes indication information of a second SID list, wherein the indication information of the second SID list indicates the first forwarding path, and the indication information of the first SID list indicates the second forwarding path; or, the indication information of the second SID list indicates the second forwarding path, and the indication information of the first SID list indicates the first forwarding path. The aforementioned message may, for example, be a BGPSR policy message, which carries the indication information of the first SID list through a sub-TLV field.
[0176] As an example, the indication information of the first SID list is used to indicate the SID list corresponding to the second forwarding path.
[0177] As another example, the indication information of the first SID list is used to indicate the SID list corresponding to the first forwarding path. The determining unit 702 is specifically used to: determine the indication information of the second SID list according to the indication information of the first SID list; and determine the second forwarding path according to the indication information of the second SID list.
[0178] In one possible implementation, the sending unit 703 is further configured to send a second BFD message to the second network device through the second forwarding path of the second SR policy. The second BFD message includes indication information of a third SID list, which is used to instruct the first network device to determine the first forwarding path for sending the second response message of the second BFD message. The receiving unit 701 is further configured to receive the second response message from the first forwarding path. Therefore, the device 700 further includes a detection unit, which is configured to perform fault detection on the second forwarding path based on the second response message.
[0179] In one possible implementation, the receiving unit 701 is further configured to receive a third BFD message sent by the second network device through a third forwarding path of the first SR policy, the third BFD message including indication information of a fourth SID list, the third forwarding path being different from the first forwarding path; the determining unit 702 is further configured to determine a fourth forwarding path based on the indication information of the fourth SID list, the fourth forwarding path being the reverse path of the third forwarding path; the sending unit 703 is further configured to send a third response message of the third BFD message to the second network device through the fourth forwarding path, the third response message being used to instruct the second network device to perform fault detection on the third forwarding path.
[0180] The indication information of the first SID list can be a Path Segment or a BSID; alternatively, the indication information of the first SID list can also be the first SID list itself. Similarly, the indication information of the second SID list can also be a Path Segment, a BSID, or the second SID list itself.
[0181] For details on the specific executable functions and implementation of the fault detection device 700, please refer to [link / reference needed]. Figure 3 The corresponding description of the PE device 12 in the illustrated embodiment will not be repeated here.
[0182] Furthermore, embodiments of this application also provide a fault detection device 800, such as... Figure 8 As shown, the device 800 is applied to a second network device, for example, it can perform... Figure 1 The PE device 11 in the illustrated embodiment has the following functions. The device 800 may include: a transmitting unit 801, a receiving unit 802, and a detection unit 803.
[0183] The sending unit 801 is used to send a BFD message to a first network device through a first forwarding path of a first SR policy. The BFD message includes indication information of a first SID list. The indication information of the first SID list is used to instruct the first network device to determine a second forwarding path for sending a response message of the BFD message. The second forwarding path is the reverse path of the first forwarding path.
[0184] When device 800 is applied Figure 1 When the PE device 11 is shown, the specific implementation of the sending unit 801 sending BFD messages to the first network device through the first forwarding path of the first SR policy can be found in [reference needed]. Figure 3 S101 in the embodiment described above.
[0185] The receiving unit 802 is used to receive a response message of the BFD message from the second forwarding path.
[0186] When device 800 is applied Figure 1 When the PE device 11 is shown, the specific implementation of the receiving unit 802 receiving the response message of the BFD message from the second forwarding path can be found in [reference needed]. Figure 3 S104 and S105 in the embodiment.
[0187] The detection unit 803 is used to perform fault detection on the first forwarding path based on the response message.
[0188] When device 800 is applied Figure 1 When the PE device 11 is shown, the specific implementation of the detection unit 803 performing fault detection on the first forwarding path based on the response message can be found in [reference needed]. Figure 3 S106 in the embodiment described above.
[0189] In one possible implementation, the receiving unit 802 is further configured to receive indication information of the first SIDlist sent by the first network device before sending a BFD message to the first network device through the first forwarding path of the first SR policy.
[0190] In one possible implementation, the receiving unit 802 is further configured to receive indication information of the first SID list sent by the control and management device before sending a BFD message to the first network device through the first forwarding path of the first SR policy. As an example, the receiving unit 802 is specifically configured to: receive a BGP SR policy message sent by the control and management device, wherein the BGP SR policy message carries the indication information of the SID list through a sub-TLV field. In this implementation, the sending unit 801 is further configured to send the indication information of the first SID list to the control and management device before receiving the indication information of the first SID list sent by the control and management device. Specifically, the sending unit 801 is configured to: send a BGP-LS message to the control and management device, wherein the BGP-LS message carries the indication information of the first SID list through a sub-TLV field.
[0191] In one possible implementation, the device 800 further includes a generation unit for generating indication information for the first SID list. Then, the sending unit 801 is further configured to send the indication information of the SID list to the first network device.
[0192] The indication information of the first SID list can be a Path Segment or a BSID; alternatively, the indication information of the first SID list can also be the first SID list itself. Similarly, the indication information of the second SID list can also be a Path Segment, a BSID, or the second SID list itself.
[0193] For details on the specific executable functions and implementation of the fault detection device 800, please refer to [link / reference needed]. Figure 3 The corresponding description of the PE device 11 in the illustrated embodiment will not be repeated here.
[0194] Figure 9 This is a schematic diagram of the structure of a network device 900 provided in an embodiment of this application. The network device 900 may be, for example, […]. Figure 1 Any of the PE devices shown in the embodiments, or it could be Figure 7 or Figure 8 The device implementation of the fault detection apparatus in the illustrated embodiment.
[0195] Please see Figure 9 As shown, the network device 900 includes a processor 910, a communication interface 920, and a memory 930. The network device 900 may contain one or more processors 910. Figure 9 Taking a processor as an example. In this embodiment, the processor 910, communication interface 920, and memory 930 can be connected via a bus system or other means. Figure 9 Taking the connection between China and Israel via the 940 bus system as an example.
[0196] Processor 910 may be a CPU, an NP, or a combination of a CPU and an NP. Processor 910 may further include hardware chips. These hardware chips may be application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The PLDs may be complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), generic array logic (GALs), or any combination thereof.
[0197] When network device 900 includes a first network device, processor 910 can perform related functions such as determining a second forwarding path based on the indication information of the first SID list in the above method embodiments. When network device 900 is a second network device, processor 910 can perform related functions such as fault detection of the first forwarding path based on the response message in the above method embodiments.
[0198] Communication interface 920 is used to receive and send messages. Specifically, communication interface 920 may include a receiving interface and a sending interface. The receiving interface can be used to receive messages, and the sending interface can be used to send messages. There can be one or more communication interfaces 920. As one possible implementation, communication interface 920 can be used to implement... Figure 7 The transmitting unit 703 shown is or Figure 8 The function of the receiving unit 802 is shown.
[0199] The memory 930 may include volatile memory, such as random-access memory (RAM); the memory 930 may also include non-volatile memory, such as flash memory, hard disk drive (HDD), or solid-state drive (SSD); the memory 930 may also include combinations of the above types of memory. The memory 930 may, for example, store indication information of the first SID list mentioned above.
[0200] Optionally, the memory 930 stores an operating system and programs, executable modules, or data structures, or subsets thereof, or extended sets thereof. The programs may include various operation instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and handling hardware-based tasks. The processor 910 can read the programs in the memory 930 to implement the fault detection method provided in this embodiment. As one possible implementation, the memory 930 may store items such as those for implementing... Figure 7 The shown determining unit 702 or Figure 8 The program code for the function of the detection unit 803 is shown.
[0201] The memory 930 can be a storage device in the network device 900, or it can be a storage device independent of the network device 900.
[0202] The bus system 940 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus system 940 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0203] Figure 10 This is a schematic diagram of another network device 1000 provided in this application embodiment. The network device 1000 can be configured as described above. Figure 1 Any of the PE devices shown in the embodiments, or it could be Figure 7 or Figure 8 The device implementation of the fault detection apparatus in the illustrated embodiment.
[0204] Network device 1000 includes: main control board 1010 and interface board 1030.
[0205] The main control board 1010, also known as the main processing unit (MPU) or route processor card, controls and manages the various components in the network device 1000, including route calculation, device management, device maintenance, and protocol processing functions. The main control board 1010 includes a central processing unit 1011 and a memory 1012.
[0206] Interface board 1030 is also known as a line processing unit (LPU), linecard, or service board. Interface board 1030 provides various service interfaces and implements packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, etc., with Ethernet interfaces including, for example, Flexible Ethernet Clients (FlexE Clients). Interface board 1030 includes: a central processing unit 1031, a network processor 1032, a forwarding table entry memory 1034, and a physical interface card (PIC) 1033.
[0207] The central processing unit 1031 on the interface board 1030 is used to control and manage the interface board 1030 and communicate with the central processing unit 1011 on the main control board 1010.
[0208] Network processor 1032 is used to implement packet forwarding processing. Network processor 1032 can be in the form of a forwarding chip. Specifically, uplink packet processing includes: processing of the packet ingress interface, forwarding table lookup; downlink packet processing includes: forwarding table lookup, etc.
[0209] The physical interface card 1033 is used to implement physical layer interfacing functions. Raw traffic enters the interface board 1030 through this card, and processed packets are sent out from the physical interface card 1033. The physical interface card 1033 includes at least one physical interface, also called a physical port. The physical interface card 1033 can also be called a daughter card and can be installed on the interface board 1030. It is responsible for converting photoelectric signals into packets, performing validity checks on the packets, and forwarding them to the network processor 1032 for processing. In some embodiments, the central processing unit 831 of the interface board 1030 can also perform the functions of the network processor 1032, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for the network processor 1032 in the physical interface card 1033.
[0210] Optionally, the network device 1000 includes multiple interface boards. For example, the network device 1000 also includes an interface board 1040, which includes a central processing unit 1041, a network processor 1042, a forwarding table entry memory 1044, and a physical interface card 1043.
[0211] Optionally, the network device 1000 also includes a switching fabric board 1020. The switching fabric board 1020 can also be referred to as a switch fabric unit (SFU). When the network device has multiple interface boards 1030, the switching fabric board 1020 is used to complete data exchange between the interface boards. For example, interface boards 1030 and 1040 can communicate through the switching fabric board 1020.
[0212] The main control board 1010 and the interface board 1030 are coupled. For example, the main control board 1010, interface boards 1030 and 1040, and the switching network board 1020 communicate with each other via a system bus connected to the system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 1010 and the interface board 1030, and the main control board 1010 and the interface board 1030 communicate with each other through the IPC channel.
[0213] Logically, network device 1000 includes a control plane and a forwarding plane. The control plane includes a main control board 1010 and a central processing unit 1031, while the forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 1034, a physical interface card 1033, and a network processor 1032. The control plane performs functions such as router operation, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the device's status. The control plane distributes the generated forwarding tables to the forwarding plane. In the forwarding plane, the network processor 1032 uses the forwarding tables distributed by the control plane to look up and forward messages received by the physical interface card 1033. The forwarding tables distributed by the control plane can be stored in the forwarding table entry memory 1034. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
[0214] If network device 1000 is configured as the first network device, the central processing unit 1011 can determine the second forwarding path based on the indication information of the first SID list. The network processor 1032 can trigger the physical interface card 1033 to send a first response message of the first BFD message to the second network device through the second forwarding path.
[0215] If network device 1000 is configured as a second network device, network processor 1032 can trigger physical interface card 1033 to send a BFD message to the first network device through the first forwarding path of the first SR policy, and receive a response message from the second forwarding path of the BFD message. Central processing unit 1011 can perform fault detection on the first forwarding path based on the response message.
[0216] It should be understood that the receiving unit 701, transmitting unit 703, etc. in the fault detection device 700 can be equivalent to the physical interface card 1033 or physical interface card 1043 in the network device 1000; the determining unit 702, etc. in the fault detection device 700 can be equivalent to the central processing unit 1011 or central processing unit 1031 in the network device 1000. The transmitting unit 801, receiving unit 802, etc. in the fault detection device 800 can be equivalent to the physical interface card 1033 or physical interface card 1043 in the network device 1000; the detection unit 803, etc. in the fault detection device 800 can be equivalent to the central processing unit 1011 or central processing unit 1031 in the network device 1000.
[0217] It should be understood that the operation on interface board 1040 in this embodiment is consistent with the operation on interface board 1030, and will not be described again for the sake of simplicity. It should be understood that the network device 1000 in this embodiment can correspond to any node in the above method embodiments. The main control board 1010, interface board 1030 and / or interface board 1040 in the network device 1000 can implement the functions and / or various steps implemented by any node in the above method embodiments, and will not be described again for the sake of simplicity.
[0218] It should be understood that a network device may have one or more main control boards, including a primary and a backup main control board. Similarly, it may have one or more interface boards; the more powerful the network device's data processing capabilities, the more interface boards it provides. Each interface board may also have one or more physical interface cards. A switching board may or may not exist; multiple switching boards can share the load and provide redundancy. In a centralized forwarding architecture, network devices may not need a switching board, as the interface boards handle the entire system's business data processing. In a distributed forwarding architecture, a network device can have at least one switching board, enabling data exchange between multiple interface boards and providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a distributed architecture network device are greater than those of a centralized architecture device. Alternatively, network devices can also consist of a single board, without a switching board. The functions of the interface board and the main control board are integrated on this one board. In this case, the central processing unit (CPU) on the interface board and the CPU on the main control board can be combined into a single CPU to perform the combined functions. This type of device has lower data exchange and processing capabilities (e.g., low-end switches or routers). The specific architecture adopted depends on the specific network deployment scenario.
[0219] In some possible embodiments, the nodes described above can be implemented as virtualized devices. For example, a virtualized device can be a virtual machine (VM) running a program for sending messages, deployed on hardware devices (e.g., a physical server). A virtual machine refers to a complete computer system simulated by software, possessing full hardware system functionality and running in a completely isolated environment. Virtual machines can be configured as nodes. For example, nodes can be implemented based on a general-purpose physical server combined with Network Functions Virtualization (NFV) technology. Each node can be a virtual host, virtual router, or virtual switch. Those skilled in the art can virtualize nodes with the above-mentioned functions on a general-purpose physical server using NFV technology by reading this application; further details are omitted here.
[0220] It should be understood that the network devices of the various product forms described above each have any of the functions of each node in the above method embodiments, which will not be elaborated here.
[0221] This application also provides a network system 1100, such as... Figure 11 As shown. The network system 1100 may include a first network device 1101 and a second network device 1102. The first network device 1101 may be... Figure 1 The PE equipment 12 shown Figure 7 The fault detection device 700 shown Figure 9 The network device 900 shown is configured as the first network device or Figure 10 The network device 1000 shown is configured as the first network device; the second network device 1102 may be... Figure 1 The PE equipment 11 shown Figure 8 The fault detection device 800 shown Figure 9 The network device 900 shown is configured as the second network device or Figure 10 The network device 1000 shown is configured as the second network device.
[0222] This application also provides a chip, including a processor and an interface circuit. The interface circuit is used to receive instructions and transmit them to the processor. The processor may be, for example, a... Figure 7 One specific implementation of the fault detection device 700 shown can be used to perform the above method; for example, it can be... Figure 8 One specific implementation of the fault detection device 800 shown can be used to execute the above-described method. The processor is coupled to a memory that stores programs or instructions. When the processor executes the programs or instructions, the chip system implements the method in any of the above-described method embodiments.
[0223] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0224] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application does not specifically limit the type of memory or the arrangement of the memory and processor.
[0225] For example, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.
[0226] This application also provides a computer-readable storage medium, including instructions or a computer program, which, when run on a computer, causes the computer to perform the fault detection method provided in the above embodiments.
[0227] This application also provides a computer program product containing instructions or computer programs, which, when run on a computer, causes the computer to execute the fault detection method provided in the above embodiments.
[0228] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0229] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0230] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical business division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0231] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0232] Furthermore, the various business units in the embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software business unit.
[0233] If the integrated unit is implemented as a software business unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0234] Those skilled in the art will recognize that, in one or more of the examples above, the services described in this invention can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these services can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium accessible to general-purpose or special-purpose computers.
[0235] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention.
[0236] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A fault detection method, characterized in that, include: The first network device receives a first bidirectional link detection (BFD) message sent by the second network device through a first forwarding path based on the first segmentation routing policy SRv6 based on Internet Protocol version 6. The first BFD message includes a first bound segment identifier (BSID), the first BSID is used to indicate a first segment identifier list (SID list), and the first SID list is stored in the first network device. The first network device determines the second forwarding path based on the first BSID, and the second forwarding path and the first forwarding path share the same path in reverse. The first network device sends a first response message of the first BFD message to the second network device through the second forwarding path.
2. The method according to claim 1, characterized in that, The first forwarding path is the forwarding path within the tunnel of the first SRv6policy.
3. The method according to claim 1, characterized in that, The method further includes: The first network device receives a message sent by the control and management device, the message including the first BSID.
4. The method according to claim 3, characterized in that, The message also includes a second BSID, which is used to indicate a second SID list, wherein the second BSID indicates the first forwarding path and the first BSID indicates the second forwarding path; or, the second BSID indicates the second forwarding path and the first BSID indicates the first forwarding path.
5. The method according to claim 3 or 4, characterized in that, The message is a Border Gateway Protocol Segmented Routing Policy (BGP SR policy) message, and the BGP SR policy message carries the first BSID through the sub-TLV field of the subtype length value.
6. The method according to any one of claims 1-3, characterized in that, The first BFD message also includes a second SID list, which is the SID list corresponding to the first forwarding path.
7. The method according to claim 6, characterized in that, The first BSID is encapsulated in the segmented routing header SRH.
8. The method according to claim 7, characterized in that, The SRH includes the second SID list.
9. The method according to any one of claims 1-3, characterized in that, The first network device determines the second forwarding path based on the first BSID, including: The first network device determines a first SID list based on the first BSID, and the first SID list is the SID list corresponding to the second forwarding path; The first network device determines the second forwarding path based on the first SID list.
10. A fault detection method, characterized in that, include: The second network device sends a bidirectional link detection (BFD) message to the first network device through a first forwarding path based on the first segmented routing policy SRv6 of the Internet Protocol version 6. The BFD message includes a first bound segment identifier (BSID), which is used to indicate a first segment identifier list (SID list). The first SID list is stored in the first network device. The first BSID is used to instruct the first network device to determine a second forwarding path for sending a response message to the BFD message. The second forwarding path is the reverse path of the first forwarding path. The second network device receives a response message from the BFD message from the second forwarding path.
11. The method according to claim 10, characterized in that, The first forwarding path is the forwarding path within the tunnel of the first SRv6policy.
12. The method according to claim 10 or 11, characterized in that, The first BFD message also includes a second SID list, which is the SID list corresponding to the first forwarding path.
13. The method according to claim 12, characterized in that, The first BSID is encapsulated in the segmented routing header SRH.
14. The method according to claim 13, characterized in that, The SRH includes the second SID list.
15. A network device, characterized in that, include: The memory includes computer-readable instructions; A processor communicating with the memory, the processor being configured to execute the computer-readable instructions, causing the network device to perform the method of any one of claims 1-14.
16. A network system, characterized in that, The network system includes: a first network device and a second network device, wherein the first network device is used to perform the method according to any one of claims 1-9; The second network device is configured to perform the method according to any one of claims 10-14.
17. A computer-readable storage medium, characterized in that, Includes a program or instructions that, when executed by a processor, implement the method as described in any one of claims 1-14.
18. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-14.
19. A fault detection device, applied to a first network device, characterized in that, include: The receiving unit is configured to receive a first bidirectional link detection (BFD) message sent by the second network device through a first forwarding path based on the first segmentation routing policy SRv6 based on the Internet Protocol version 6. The first BFD message includes a first bound segment identifier (BSID), the first BSID is used to indicate a first segment identifier list (SID list), and the first SID list is stored in the first network device. The determining unit is configured to determine a second forwarding path based on the first BSID, wherein the second forwarding path and the first forwarding path share a reverse path; The sending unit is configured to send a first response message of the first BFD message to the second network device through the second forwarding path.
20. The apparatus according to claim 19, characterized in that, The first forwarding path is the forwarding path within the tunnel of the first SRv6policy.
21. The apparatus according to claim 19, characterized in that, The receiving unit is also used to receive messages sent by the control and management device, the messages including the first BSID.
22. The apparatus according to claim 21, characterized in that, The message also includes a second BSID, which is used to indicate a second SID list, wherein the second BSID indicates the first forwarding path and the first BSID indicates the second forwarding path; or, the second BSID indicates the second forwarding path and the first BSID indicates the first forwarding path.
23. The apparatus according to claim 21 or 22, characterized in that, The message is a Border Gateway Protocol Segmented Routing Policy (BGP SR policy) message, and the BGP SR policy message carries the first BSID through the sub-TLV field of the subtype length value.
24. The apparatus according to any one of claims 19-21, characterized in that, The first BFD message also includes a second SID list, which is the SID list corresponding to the first forwarding path.
25. The apparatus according to claim 24, characterized in that, The first BSID is encapsulated in the segmented routing header SRH.
26. The apparatus according to claim 25, characterized in that, The SRH includes the second SID list.
27. The apparatus according to any one of claims 19-21, characterized in that, The determining unit is further configured to determine a first SID list based on the first BSID, wherein the first SID list is the SID list corresponding to the second forwarding path; The determining unit is further configured to determine the second forwarding path based on the first SID list.
28. A fault detection device, applied to a second network device, characterized in that, include: The sending unit is configured to send a bidirectional link detection (BFD) message to a first network device via a first forwarding path based on a first segmented routing policy (SRv6) of Internet Protocol version 6. The BFD message includes a first bound segment identifier (BSID), which indicates a first segment identifier list (SID list) stored in the first network device. The first BSID also indicates that the first network device determines a second forwarding path for sending a response message to the BFD message. The second forwarding path is the reverse path of the first forwarding path. The receiving unit is configured to receive a response message from the BFD message from the second forwarding path.
29. The apparatus according to claim 28, characterized in that, The first forwarding path is the forwarding path within the tunnel of the first SRv6policy.
30. The apparatus according to claim 28 or 29, characterized in that, The first BFD message also includes a second SID list, which is the SID list corresponding to the first forwarding path.
31. The apparatus according to claim 30, characterized in that, The first BSID is encapsulated in the segmented routing header SRH.
32. The apparatus according to claim 31, characterized in that, The SRH includes the second SID list.
Citation Information
Patent Citations
Control for bidirectional forwarding detection return path
CN107005481A
Forwarding path detection method and device
CN110855531A
Seamless bidirectional forwarding detection discriminator based return path determination
US20190238448A1