Fault detection method, network device and system
By carrying the SID list indication information in the BFD message, ensuring that the forwarding path of the BFD message and the response message is reversed and common, solving the problem of inaccurate BFD detection results and improving the fault detection accuracy of the SR policy.
Patent Information
- Application Number
- CN202110128378.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-29
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2041-01-29
AI Technical Summary
The BFD message and response message transmission are not common, resulting in the BFD detection result that it is not accurate enough, affecting the fault detection accuracy of SR policy.
The BFD message carries the indication information of the SID list, so that the receiver can determine the forwarding path in the opposite direction to the forwarding path of the forwarding path of the transmitted BFD message, and send the response message based on the path.
By ensuring that the true forwarding path of BFD messages and response messages are reversely common, accurate fault detection of specific forwarding paths in SR policy is achieved, and the detection accuracy and accuracy of the BFD mechanism are improved.
Smart Images

Figure CN114915538B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a fault detection method, network equipment and system. Background Art
[0002] Bidirectional forwarding detection (BFD), as a mechanism that can quickly perform end-to-end detection, is widely used for fault detection of segment routing policy (SRpolicy).
[0003] At present, the process of fault detection by the BFD mechanism includes: the sender sends a BFD message to the reflector through the SR policy, and requires the reflector to feed back the response message of the BFD message to the sender, so as to determine whether the SR policy has a fault. Since the SR policy is a unidirectional tunnel, the response message of the BFD message is usually transmitted through the Internet Protocol (IP) routing, and the transmission path of the response message determined by the IP routing method (also called the IP path) is likely not to pass through the network device through which the SR policy passes, that is, the transmission of the BFD message and the response message of the BFD message do not share the same path. In this way, when a device on the IP path fails, the response message will not be able to reach the sending segment, so that the sender will misjudge that the SR policy has a fault based on this, thereby reducing the accuracy of the detection result for the SR policy.
[0004] Based on this, it is urgent to provide a fault detection method that can not only utilize the characteristic of the BFD mechanism that can quickly complete detection, but also overcome the problem that the BFD detection result is not accurate due to the fact that the BFD message and the response message are not transmitted on the same path, so as to achieve more accurate fault detection of the SR policy by the BFD mechanism. Summary of the invention
[0005] Based on this, the present application provides a fault detection method, network equipment and system, which carries indication information of a segment identification list (SID list) in a BFD message, so that the receiving end can determine a forwarding path that is in the opposite direction to the forwarding path of the transmitted BFD message based on the indication information of the SID list in the BFD message, and send a response message of the BFD message to the transmitting end based on the determined forwarding path, thereby realizing fault detection of a specific forwarding path in the SR policy, thereby improving the precision and accuracy of the BFD mechanism for fault detection.
[0006] In the present application, BFD detection may refer to, for example, static BFD detection, dynamic BFD detection, or seamless bidirectional forwarding detection (SBFD) detection.
[0007] In the first aspect, the present application provides a fault detection method, which is applied to a first network device. When a first SR policy exists between a second network device and a first network device and the second network device needs to perform fault detection on a first forwarding path in the first SRpolicy, the method may, for example, include: the first network device receives a first BFD message including indication information of a first SID list sent by the second network device through the first forwarding path of the first SR policy, at which time the first network device can determine a second forwarding path that is in reverse common 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 to the first BFD message to the second network device through the second forwarding path, where the first response message is used to instruct the second network device to perform fault detection on the first forwarding path. In this way, through this method, the transmitting end of the BFD detection (i.e., the second network device) 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 in the opposite direction to the forwarding path of the transmitted BFD message based on the indication information of the SID list, and send a 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 in the opposite direction, accurate fault detection of the specific forwarding path in the SRpolicy is achieved, thereby improving the precision and accuracy of the BFD mechanism in fault detection of the SR policy.
[0008] Among them, the SR policy can be an SR-MPLS policy, corresponding to the multi-protocol label switching (MPLS) network scenario; or, the SR policy can also be an SRv6 policy, corresponding to the sixth version of the Internet Protocol (internet protocol version 6, IPv6). In the SR-MPLS policy scenario, the SID list corresponds to the MPLS label stack, and the 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 the SID list can include at least one IPv6 address corresponding to a network device or link.
[0009] For any two SR policies to co-route in the opposite direction, it may mean that the order of network devices and links that the two tunnels determined by the two SR policies pass through in sequence is opposite. For any two forwarding paths in any two SR policies to co-route in the opposite direction, it may mean that the order of network devices and links that the two forwarding paths determined by the two SID lists corresponding to the two forwarding paths pass through in sequence is opposite. For example, according to the existing design, the two forwarding paths of the reverse co-route may belong to two SR policies respectively. However, it can be understood that in other possible implementations, for example, when the round-trip path between two endpoints is defined as belonging to a complete SR policy, the two forwarding paths can also be considered to belong to the same SRpolicy.
[0010] In a 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 also include: the first network device generates indication information of the first SID list. Alternatively, the first network device receives the indication information of the first SID list sent by the second network device. In this way, the first network device can save the correspondence between the indication information of the first SID list and the second forwarding path, and is prepared to determine the second forwarding path according to the indication information of the first SID list in the first BFD message after receiving the first BFD message.
[0011] In another possible implementation, the method may further include: the first network device receives a message sent by the control management device, the message including indication information of the first SID list. In addition, the message also includes indication information of the 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.
[0012] As an example, the message may be a border gateway protocol segment routing policy (BGP SR policy) message, and the BGP SR policy message may carry the indication information of the first SID list through the sub type length value (sub-TLV) field. If the BGP SR policy message also carries the indication information of the second SID list, then the indication information of the first SID list and the indication information of the second SID list may be carried in a sub-TLV field in the BGP SR policy message, or the indication information of the first SID list and the indication information of the second SID list may also be carried in two different sub-TLV fields in the BGP SR policy message, respectively. It should be noted that the message used to carry the indication information of the first SID list may be, in addition to the BGP SR policy message, a network configuration protocol (NETCONF) or a path computation element protocol (PCEP) message, etc.
[0013] In this implementation, the indication information of the first SID list may also be allocated by the second network device and sent to the control management device, and then sent by the control management device to the first network device. As an example, the second network device sends the indication information of the first SID list to the control management device, for example, the indication information of the first SID list may be carried in a border gateway protocol link state (BGP-LS) message, and the indication information of the first SID list may be carried by a sub-TLV field in the BGP-LS message. If the BGP-LS message also carries the indication information of the second SID list, then the indication information of the first SID list and the indication information of the second SID list may be carried in a sub-TLV field in the BGP-LS message, or the indication information of the first SID list and the indication information of the second SID list may be carried in two different sub-TLV fields in the BGP-LS message, respectively. 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 may be a BGP-LS message, a NETCONF or PCEP message, etc.
[0014] In a 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 according to the indication information of the first SID list, so that accurate BFD detection can be achieved.
[0015] 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 case, the first network device can save the correspondence between the indication information of the first SID list and the second forwarding path. Then, after receiving the first BFD message, the first network device can directly determine the second forwarding path corresponding to the indication information of the first SID list according to the indication information of the first SID list. In another case, the first network device can also save the correspondence between the indication information of the first SID list and the indication information of the second SID list. The indication information of the second SID list is used to indicate the SID list corresponding to the second forwarding path. Then, the first network device determines the second forwarding path according to the indication information of the first SID list. For example, it may include: the first network device determines the indication information of the second SID list according to the indication information of the first SID list; then, the first network device determines the second forwarding path according to the indication information of the second SID list. In this way, it is possible to achieve accurate BFD detection.
[0016] It should be noted that, in some possible situations, if the network device or link through which the second forwarding path passes fails, or if the network device or link through which the first forwarding path passes fails, then the second network device may not be able to receive the first response message. Then, if the second network device does not receive the first response message through the second forwarding path within a preset time (such as 1 second), since the first forwarding path and the second forwarding path are in reverse common path, it can still be determined that the first forwarding path is faulty. In other possible situations, if the network devices and links through which the first forwarding path and the second forwarding path pass are normal, then the second network device can receive the first response message. In this situation, the second network device determines that the first forwarding path and the second forwarding path for transmitting the first BFD message and the first response message are normal based on the received first response message, and that it can be determined that there is no fault in the first forwarding path.
[0017] In some possible implementations, the method may also include: the first network device sends 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 the third SID list, and the indication information of the third SID list is used to instruct the first network device to determine the first forwarding path of the second response message for sending the second BFD message; the first network device receives the second response message from the first forwarding path; the first network device performs fault detection on the second forwarding path according to the second response message. In this way, through this method, accurate bidirectional BFD detection of specific forwarding paths in the SR policy can be achieved.
[0018] In some other possible implementations, the method may also include: the first network device receives a third BFD message sent by the second network device through the third forwarding path of the first SRpolicy, the third BFD message includes indication information of the fourth SID list, and the third forwarding path is different from the first forwarding path; the first network device determines the fourth forwarding path according to the indication information of the fourth SIDlist, and the fourth forwarding path and the third forwarding path are reverse co-paths; the first network device sends a third response message of the third BFD message to the second network device through the fourth forwarding path, and the third response message is used to instruct the second network device to perform fault detection on the third forwarding path. In this way, through this method, BFD detection of a specific forwarding path in an SR policy including multiple forwarding paths can be implemented, thereby improving the detection accuracy of BFD detection. In an embodiment of the present application, the indication information of the first SID list may be a path segment (Path Segment) or a binding segment identifier (bonding SID, BSID); or, the indication information of the first SID list may also be the first SIDlist itself. Similarly, the indication information of the second SID list may also be a Path Segment or a BSID or a second SIDlist itself.
[0019] In the second aspect, the present application also provides a fault detection method, which is 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 the first forwarding path in the first SRpolicy, the method may, for example, include: the second network device sends 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, and the second forwarding path is in the reverse direction of the first forwarding path; if the second network device receives a response message to the BFD message from the second forwarding path, then the second network device performs fault detection on the first forwarding path according to the response message. In this way, through this method, the transmitting end of the BFD detection (i.e., the second network device) 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 in the opposite direction to the forwarding path of the transmitted BFD message based on the indication information of the SID list, and send a 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 in the opposite direction, accurate fault detection of the specific forwarding path in the SR policy is achieved, thereby improving the precision and accuracy of the BFD mechanism in fault detection of the SR policy.
[0020] In a 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 receives indication information of the first SID list sent by the first network device.
[0021] 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 also include: the second network device generates indication information of the first SID list. In this implementation, the second network device may also send indication information of the first SID list to the first network device, which provides a guarantee for the implementation of the fault detection method provided in the embodiment of the present application.
[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 receives the indication information of the first SID list sent by the control management device. In one case, the control 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 also be generated by the second network device and sent to the control management device, and then sent by the control management device to the second network device, where, as an example, the second network device sends the indication information of the first SID list to the control management device, which may include: the second network device sends a BGP-LS message to the control management device, and the BGP-LS message carries the indication information of the first SID list through the sub-TLV field; the second network device receives the indication information of the first SID list sent by the control management device, which may include: the second network device receives the BGP SR policy message sent by the control management device, and the BGP SR policy message carries the indication information of the SID list through the sub-TLV field.
[0023] In the present application, the indication information of the first SID list may be Path Segment or BSID; or, the indication information of the first SID list may be the first SID list itself. Similarly, the indication information of the second SID list may be Path Segment or BSID or the second SID list itself.
[0024] In the third aspect, the present application provides a fault detection device, which is applied to a first network device, and the device may include: a receiving unit, a determining unit, and a sending unit. Among them, the receiving unit is used to receive a first bidirectional link detection BFD message sent by a second network device through a first forwarding path of a first segment routing policy SRpolicy, and the first BFD message includes indication information of a first segment identification list SID list; the determining unit is used to determine a second forwarding path according to the indication information of the first SIDlist, and the second forwarding path and the first forwarding path are reverse co-paths; the sending unit is used to send a first response message of the first BFD message to the second network device through the second forwarding path, and the first response message is used to instruct the second network device to perform fault detection on the first forwarding path.
[0025] In a possible implementation, the apparatus may further include a generating unit, wherein the generating unit is configured to generate indication information of the first SID list before receiving a first BFD message sent by a second network device through a first forwarding path of a first SR policy.
[0026] In a possible implementation manner, the receiving unit is further configured to receive indication information of the first SID list sent by the second network device.
[0027] In a possible implementation, the receiving unit is further used to receive a message sent by a control management device, wherein the message includes 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 above-mentioned message may be, for example, a BGP SR policy message, and the BGP SR policy message carries the indication information of the first SID list through a sub-TLV field.
[0028] As an example, the indication information of the first SID list is used to indicate the SID list corresponding to the second forwarding path.
[0029] As another example, the indication information of the first SID list is used to indicate the SID list corresponding to the first forwarding path, and the determination unit 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.
[0030] In a possible implementation, the sending unit is also used to send a second BFD message to the second network device through the second forwarding path of the second SR policy, and the second BFD message includes indication information of a third SID list, and the indication information of the third SID list is used to indicate the first network device to determine the first forwarding path for sending a second response message for the second BFD message; the receiving unit is also used to receive the second response message from the first forwarding path; then, the device also includes a detection unit, which is used to perform fault detection on the second forwarding path according to the second response message.
[0031] In a possible implementation, the receiving unit is further used to receive a third BFD message sent by the second network device through the third forwarding path of the first SR policy, the third BFD message including indication information of a fourth SIDlist, and the third forwarding path is different from the first forwarding path; the determining unit is further used to determine a fourth forwarding path according to the indication information of the fourth SID list, and the fourth forwarding path and the third forwarding path are in reverse common path; the sending unit is further used to send a third response message to the third BFD message to the second network device through the fourth forwarding path, and the third response message is used to instruct the second network device to perform fault detection on the third forwarding path.
[0032] The indication information of the first SID list may be Path Segment or BSID; or, the indication information of the first SID list may be the first SID list itself. Similarly, the indication information of the second SID list may be Path Segment or BSID or the second SID list itself.
[0033] 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 effects achieved can all be found in the relevant description of the first aspect above, and will not be repeated here.
[0034] In a fourth aspect, the present application also provides a fault detection device, which is applied to a second network device, and the device may include: a sending unit, a receiving unit, and a detection unit. Among them, the sending unit is used to send a BFD message to the first network device through the first forwarding path of the first SR policy, and the BFD message includes indication information of the first SID list, and the indication information of the first SID list is used to indicate that the first network device determines a second forwarding path for sending a response message of the BFD message, and the second forwarding path is in the reverse direction of the first forwarding path; the receiving unit is used to receive a response message of the BFD message from the second forwarding path; the detection unit is used to perform fault detection on the first forwarding path according to the response message.
[0035] In a possible implementation manner, the receiving unit is further configured to receive indication information of the first SIDlist sent by the first network device before sending the BFD message to the first network device through the first forwarding path of the first SR policy.
[0036] In a possible implementation, the receiving unit is further used to receive the indication information of the first SID list sent by the control and management device before sending the BFD message to the first network device through the first forwarding path of the first SR policy. As an example, the receiving unit is specifically used to: receive the BGP SRpolicy message sent by the control and management device, and the BGP SR policy message carries the indication information of the SID list through the sub-TLV field. In this implementation, the sending unit is further used 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. Among them, the sending unit is specifically used to: send a BGP-LS message to the control and management device, and the BGP-LS message carries the indication information of the first SIDlist through the sub-TLV field.
[0037] In a possible implementation, the apparatus further includes a generating unit, the generating unit being configured to generate indication information of 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.
[0038] The indication information of the first SID list may be Path Segment or BSID; or, the indication information of the first SID list may be the first SID list itself. Similarly, the indication information of the second SID list may be Path Segment or BSID or the second SID list itself.
[0039] 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 of the second aspect above, and will not be repeated here.
[0040] In a fifth aspect, the present application also provides a network device, the network device comprising: a processor, used to enable the network device to implement the method provided in the first aspect or the second aspect above. The network device may also include a memory, the memory is coupled to the processor, and when the processor executes the instructions stored in the memory, the network device may implement the method provided in the first aspect or the second aspect above. The network device may also include a communication interface, the communication interface is used for the network device to communicate with other devices, and illustratively, the communication interface may be a transceiver, circuit, bus, module or other type of communication interface. In the present application, the instructions in the memory may be pre-stored, or they may be downloaded from the Internet and stored when the network device is used. The present application does not specifically limit the source of the instructions in the memory.
[0041] In a sixth aspect, the present application also provides a network system, comprising a first network device and a second network device, wherein: the first network device is used to execute the method provided in the first aspect; the second network device is used to execute the method provided in the second aspect.
[0042] In the seventh aspect, the present 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 method provided in the first aspect or the second aspect.
[0043] In an eighth aspect, the present application provides a computer-readable storage medium, which stores program code or instructions, and when the computer-readable storage medium is run on a computer, enables the computer to execute the method provided in the first or second aspect above.
[0044] In a ninth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method provided in the first or second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0046] Figure 1 This is a schematic diagram of the structure of a network system in an embodiment of the present application;
[0047] Figure 2 This is a schematic diagram of the structure of an SR policy in an embodiment of the present application;
[0048] Figure 3 This is a flow chart of a fault detection method 100 in an embodiment of the present application;
[0049] Figure 4a A schematic diagram of the format of a sub-TLV field in a BGP SR policy message in an embodiment of the present application;
[0050] Figure 4b This is a schematic diagram of the format of the sub-TLV field in another BGP SR policy message in an embodiment of the present application;
[0051] Figure 4c In the embodiment of this application Figure 4a or Figure 4bA schematic diagram of the format of the Value field in the sub-TLV field;
[0052] Figure 5a A schematic diagram of the format of a SID list TLV field in a BGP-LS message in an embodiment of the present application;
[0053] Figure 5b A schematic diagram of the format of a sub-TLV field in a SID list TLV field in an embodiment of the present application;
[0054] Figure 5c A schematic diagram of the format of a sub-TLV field in another SID list TLV field in an embodiment of the present application;
[0055] Figure 6a A schematic diagram of the format of a BFD message c and a response message C in an embodiment of the present application;
[0056] Figure 6b A schematic diagram of the format of a BFD message d and a response message D in an embodiment of the present application;
[0057] Figure 6c This is a schematic diagram of the format of a BFD message e and a response message E in an embodiment of the present application;
[0058] Figure 7 This is a structural schematic diagram of a fault detection device 700 in an embodiment of the present application;
[0059] Figure 8 This is a structural schematic diagram of a fault detection device 800 in an embodiment of the present application;
[0060] Fig. 9 This is a schematic diagram of the structure of a network device 900 according to an embodiment of the present application;
[0061] Fig.10 This is a schematic diagram of the structure of a network device 1000 in an embodiment of the present application;
[0062] Fig.11 11 is a schematic diagram of the structure of a network system 1100 in an embodiment of the present application. DETAILED DESCRIPTION
[0063] Currently, during the BFD detection of an SR policy, a BFD message is transmitted from the transmitter to the receiver through the SR policy to be detected. However, when the receiver sends a response message to the BFD message, the path of the response message from the receiver to the transmitter is determined by IP routing, and the response message is sent to the transmitter through the path determined by the IP routing method. The transmitter then performs fault detection on the SR policy based on the response message.
[0064] For example, in Figure 1 The network system shown may include a customer edge (CE) device 01, a CE device 02, a provider edge (PE) device 11, a PE device 12, a provider (P) device 21, a P device 22, a P device 23, and a P device 24, wherein the PE device 11 is connected to the CE device 01, the PE device 11 is connected to the PE device 12 through the P device 21 and the P device 22 in turn, the PE device 11 is also connected to the PE device 12 through the P device 23 and the P device 24 in turn, and the PE device 12 is connected to the CE device 02. Assume that there are SR policy 1 and SR policy 2 between the PE device 11 and the PE device 12, wherein the PE device 11 is the ingress node of the SR policy 1 and the SR policy 2, and the PE device 12 is the egress node of the SR policy 1 and the SR policy 2. For ease of description, the following two examples take the case where both SR policy 1 and SR policy 2 include a forwarding path as an example, and the BFD detection of the forwarding path can also be referred to as the 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 .
[0065] 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 BFD message a to PE device 12 through SR policy 1; S12, PE device 12 sends response message A corresponding to BFD message a to PE device 11 through P device 24 and P device 23 in sequence through IP routing, that is, the IP path 1 through which the response message A passes passes through PE device 12, P device 24, P device 23 and PE device 11 in sequence. On the one hand, if the network device or link through which IP path 1 passes fails, such as P device 23 failure, P device 24 failure or at least one link included in IP path 1 failure, PE device 11 may fail to receive response message A within a preset time, thereby erroneously determining that SR policy 1 fails. On the other hand, even if PE device 11 receives response message A, for scenarios such as bidirectional detection, since BFD message a and response message A are not transmitted on the same path, SR policy 1 may be erroneously determined to be normal when there is no failure in IP path 1. In this example, because the network devices that SR policy 1 and IP path 1 pass through are not exactly the same, the current BFD detection result cannot accurately reflect the fault condition of SR policy 1.
[0066] As another example, the operations performed on SR policy 1 and SR policy 1' (not shown in the figure) for BFD detection 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 through P device 24 and P device 23 in sequence through IP routing, that is, response message A and response message A' are both transmitted through IP path 1. In this example, for SR policy 1 and SR policy 2, the IP path 1 determined based on the IP routing method is the same. In this way, even if the device or link through which SR policy 1 passes is not faulty, but the device or link through which SR policy 1' passes 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 fails, PE11 will determine that SR policy 1 and SR policy 1' are faulty based on the failure to receive the response message. As a result, fine-grained detection at the path level cannot be achieved.
[0067] Based on this, an embodiment of the present application provides a fault detection method. If the second network device needs to perform BFD detection on the first forwarding path in the first SR policy to the first network device, the operations performed may, for example, include: the second network device sends a first BFD message to the first network device through the first forwarding path of the first SR policy, and the first BFD message includes indication information of the first SID list; when the first network device receives the first BFD message, it can determine a second forwarding path that is reversely connected to the first forwarding path according to the indication information of the first SID list, so that the first network device can send a first response message to the first BFD message to the second network device through the second forwarding path, and 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 transmitter of the BFD detection carries the indication information of the SID list in the BFD message, so that the receiving end can determine the forwarding path that is in the opposite direction to the forwarding path of the transmitted BFD message based on the indication information of the SID list, and send a response message of the BFD message to the transmitter based on the determined forwarding path. By ensuring that the real forwarding paths of the BFD message and the response message are in the opposite direction, accurate fault detection of the specific forwarding path in the SR policy is achieved, thereby improving the precision and accuracy of the BFD mechanism in fault detection of the SR policy.
[0068] To facilitate understanding of the embodiments of the present application, the meanings of some concepts involved in the embodiments of the present application are first explained below.
[0069] SR policy is a tunnel applicable to SR. SR policy can include at least one candidate path, and each candidate path includes at least one forwarding path. When traffic is forwarded through SR policy, the preference values of each candidate path of the SR policy can be checked first, and the candidate path with the highest preference value can be selected as the valid candidate path (also called active candidate path); then, if the valid candidate path includes a forwarding path, the traffic is sent through the SID list corresponding to the forwarding path. If the valid candidate path includes at least two forwarding paths, the load sharing ratio of each forwarding path to the traffic is determined through the weight corresponding to the SID list of each forwarding path, so that the corresponding proportion of traffic is sent through the SID list corresponding to each forwarding path.
[0070] by Figure 1 Take the SR policy 1 shown in the figure as an example. Assume that the SR policy 1 is Figure 2As shown, candidate paths 31 and 32 are included, wherein candidate path 31 includes forwarding path 311 and forwarding path 312, and candidate path 32 includes forwarding path 321, forwarding path 322, and forwarding path 323. The preference value corresponding to candidate path 31 is 7, the preference value corresponding to candidate path 32 is 2, the weights corresponding to forwarding path 311 and forwarding path 312 are 0.6 and 0.4 respectively, the weights corresponding to forwarding path 321, forwarding path 322, and forwarding path 323 are 0.3, 0.4, and 0.3 respectively, and the SID lists corresponding to forwarding path 311, forwarding path 312, forwarding path 321, forwarding path 322, and forwarding path 323 are SID list 1 to SID list 5 respectively. Then, for the traffic transmitted through SR policy 1, when SR policy 1 is normal, the traffic will be divided into traffic x and traffic y in a ratio of 6:4, wherein traffic x is transmitted through forwarding path 311 in SR policy 1, and traffic y is transmitted through forwarding path 312 in SRpolicy 1.
[0071] Among them, the SR policy can be an SR-MPLS policy, corresponding to the multi-protocol label switching (MPLS) network scenario; or, the SR policy can also be an SRv6 policy, corresponding to the sixth version of the Internet Protocol (internet protocol version 6, IPv6). In the SR-MPLS policy scenario, the SID list corresponds to the MPLS label stack, and the SID list may 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 the SID list may include at least one IPv6 address corresponding to a network device or link. For traffic that needs to be transmitted through the SR Policy 1, the corresponding SIDlist will be pushed into the packet header of the traffic.
[0072] Reverse co-pathing may include reverse co-pathing of SR policy (e.g., SR policy includes only one forwarding path) and reverse co-pathing of a forwarding path in SR policy (e.g., SR policy includes multiple forwarding paths). Reverse co-pathing of SR policy may refer to the reverse order of the network devices and links passed in sequence according to the two SR policies. For example, Figure 1In the network system shown, SR policy 1 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 in sequence, while SR policy 3 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 in sequence, thereby determining that SR policy 1 and SR policy 3 are reverse co-path tunnels. Reverse co-path of the forwarding path in the SRpolicy may refer to two forwarding paths with opposite SIDs in the SID list corresponding to the forwarding path, and the reverse co-path forwarding paths may belong to two reverse co-path SR policies respectively. For example, taking the MPLS label corresponding to the network device as an example, in Figure 1 In the network system shown, the SID list corresponding to the forwarding path 41 in SRpolicy 1 is <41021, 41022, 41012>, where 41021, 41022 and 41012 are the SIDs corresponding to the P device 21, P device 22 and PE device 12 in SR policy 1 respectively, and the SID list corresponding to the forwarding path 42 is <42022, 42021, 42011>, where 42022, 42021 and 42011 are the SIDs corresponding to the P device 22, P device 21 and PE device 11 in SR policy 3 respectively. It can be seen that the order in which the network devices determined by the corresponding SID lists of forwarding path 41 and forwarding path 42 appear is opposite, where forwarding path 42 can belong to SRpolicy 3 that is in the reverse co-path with SR policy 1, thereby determining that forwarding path 41 and forwarding path 42 are forwarding paths in the reverse co-path. It should be noted that the order of the SIDs included in the two SID lists corresponding to the two reverse co-path forwarding paths is not necessarily in reverse order, and the contents of the SIDs included in the two SID lists may be substantially completely different, but the network devices and links through which the forwarding paths are determined based on the SIDs included in the two SID lists are the same. For example, in the above example, the SID list of forwarding path 42 is not <41012, 41022, 41021>, but <42022, 42021, 42011>, but the order of network devices indicated by <42022, 42021, 42011> is opposite to the order of network devices indicated by the SID list of forwarding path 41.
[0073] It should be noted that the SIDs included in the SID list corresponding to the forwarding path may include the SIDs corresponding to the network devices on the forwarding path. For example, the SID list corresponding to the forwarding path 41 includes: the SID corresponding to the P device 21, the SID corresponding to the P device 22, and the SID corresponding to the PE device 12; or, the SIDs included in the SID list corresponding to the forwarding path may also include the SIDs corresponding to the links in the forwarding path. For example, the SID list corresponding to the forwarding path 41 includes: the SID corresponding to the link from the PE device 11 to the P device 21, the SID corresponding to the link from the P device 21 to the P device 22, and the SID corresponding to the link from the P device 22 to the PE device 12; or, the SIDs included in the SID list corresponding to the forwarding path may also include both the SIDs corresponding to the network devices on the forwarding path and the SIDs corresponding to the links on the forwarding path. For example, the SID list corresponding to the forwarding path 41 includes: the SID corresponding to the link from the PE device 11 to the P device 21, the SID corresponding to the P device 22, and the SID corresponding to the link from the P device 22 to the PE device 12; or, the SIDs included in the SID list corresponding to the forwarding path may also include both the SIDs corresponding to the network devices on the forwarding path and the SIDs corresponding to the links on the forwarding path. 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 may also be other possible situations, such as other possible reasonable types, arrangements, or combinations of different types.
[0074] The types of SIDs included in the SID lists corresponding to the two forwarding paths in the reverse common path may be the same or different. For example, as a simple implementation, the SID list corresponding to the forwarding path 41 includes the SIDs of each network device and each link in the forwarding path 41, and the SID list corresponding to the forwarding path 42 in the reverse common path with the forwarding path includes the SIDs of each network device and each link in the forwarding path 42. For another example, in the case where the cost values of each link are the same, the SID list corresponding to the forwarding path 41 may include the SIDs corresponding to each network device in the forwarding path 41, but not the SIDs of each link, and the SID list corresponding to the forwarding path 42 in the reverse common path with the forwarding path includes the SIDs of each network device in the forwarding path 42. For another example, the SID list corresponding to the forwarding path 41 includes the SID of each link in the forwarding path 41, and the SID list corresponding to the forwarding path 42 that is in the reverse direction of the forwarding path includes the SID of each network device in the forwarding path 42, or the SID list corresponding to the forwarding path 42 includes both the SIDs corresponding to the network devices in the forwarding path 42 and the SIDs corresponding to the links in the forwarding path 42. Even in some possible situations, it is also allowed that the SID list corresponding to the forwarding path 41 is only used to carry SIDs indicating some network devices and / or links on the forwarding path 41, and the SID list corresponding to the forwarding path 42 is also only used to carry SIDs indicating some network devices and / or links on the forwarding path 42, and the network devices and / or links indicated in the SID list corresponding to the forwarding path 41 are allowed to be different, but the reverse direction forwarding paths 41 and 42 that are in the reverse direction can still be determined based on the two SID lists and the network topology. The above is only an example, and the contents included in the two SID lists may also be designed in other ways in combination with application scenarios, as long as two reverse co-path forwarding paths in which two network devices and links appear in opposite orders can be determined according to the two SID lists.
[0075] The above description involves the situation of two reverse common forwarding paths with the same network devices and links. In other possible settings, it is also allowed to combine the actual application scenarios, networking structures, equipment deployment, etc., and appropriately relax the conditions that the two reverse common paths need to meet within a reasonable range, such as setting a certain proportion of passing through the same network devices and / or links as a setting condition, or setting passing through certain specific same network devices and / or links as a setting condition, etc. These settings should be reasonable in the corresponding network scenarios, and can improve the detection accuracy of BFD compared to the method mentioned in the background technology of this application that is completely based on IP forwarding response messages.
[0076] For example, in Figure 1 In the network system shown in the figure, according to the fault detection method provided in the embodiment of the present application, the process of performing BFD detection on the forwarding path 41 in the SR policy 1 may include: S31, the PE device 11 sends a BFD message c to the PE device 12 through the forwarding path 41 of the SR policy 1, and the BFD message c includes the indication information p of the SID list; S32, after the PE device 12 receives the BFD message c, according to the SID in the BFD message c The indication information of the list determines the forwarding path 42 that is in the reverse direction with the forwarding path 41; S33, PE device 12 sends a response message C to 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, determine that forwarding path 41 is normal; S35, if PE device 11 does not receive the response message C within the preset time, it can be determined that forwarding path 41 is faulty. Since the transmission paths of response message C and BFD message c are in the reverse direction, the accuracy of the BFD detection result can be guaranteed. In this way, in the BFD detection of SR policy, not only is it ensured that the transmission of BFD message and corresponding response message can be in the reverse direction to achieve accurate fault detection, but also it is possible to perform fault detection on any forwarding path in SR policy, thus achieving finer granularity and more accurate BFD detection.
[0077] exist Figure 1 In the network system shown, PE devices may be indirectly connected via one or more forwarding devices, where the forwarding devices include but are not limited to P devices.
[0078] It should be noted that the network device in the embodiments of the present application may refer to devices such as routers, switches, forwarders, firewalls, etc. that can carry services.
[0079] It should be noted that the methods provided in the embodiments of the present application can be applied to scenarios with bidirectional virtual private network (VPN) connection services, in which VPN services and carried tunnels are deployed between PE devices, and the tunnels start BFD detection to achieve rapid fault detection. Among them, the tunnels carried between PE devices can be types such as SRv6 policy or SR-MPLS policy.
[0080] It should be noted that the method provided in the embodiment of the present application can support, for example, static BFD detection, dynamic BFD detection or seamless bidirectional forwarding detection (SBFD) detection. BFD messages can be used to detect the connectivity of the path carrying the service.
[0081] To facilitate understanding of the fault detection method provided in the embodiment of the present application, the method will be described below with reference to the accompanying drawings.
[0082] Figure 3 The present invention provides a flowchart of a method 100 for fault detection. 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 an egress PE device of the SR policy to be detected, and the second network device can be an ingress PE device of the SR policy. Figure 1 In the structure of the network system shown in FIG. 1 , the interaction between the PE device 11 and the PE device 12 when detecting the forwarding path 41 in the SR policy 1 is described in the embodiment of the present application, wherein the first network device corresponds to Figure 1 The PE device 12 in the second network device corresponds to the PE device 11. In specific implementation, the method 100 may include the following S101 to S106:
[0083] S101, PE device 11 sends a BFD message c to PE device 12 through forwarding path 41 of SR policy 1, where the BFD message c includes indication information of a first SID list.
[0084] S102 , PE device 12 receives BFD packet c sent by PE device 11 through forwarding path 41 of SR policy 1 .
[0085] The indication information of the first SID list may be the first SID list itself, for example, the indication information of the first SID list may be the SID list corresponding to the forwarding path 42: <42022, 42021, 42011>. Alternatively, the indication information of the first SID list may also be an identifier of the first SID list, and the identifier of the first SID list may include but is not limited to: a path segment corresponding to the first SID list or a bonding segment identifier (bonding SID, BSID) corresponding to the first SID list, for example, the indication information of the first SID list may be a BSID: 420 that can indicate the <42022, 42021, 42011>.
[0086] Before S101 , the PE device 11 and the PE device 12 may store the indication information of the first SID list so as to cooperate in implementing the method 100 .
[0087] In some possible implementations, if the network system does not include a control management device, then the indication information of the first SID list may be generated by the PE device 11 or the PE device 12.
[0088] In one case, the indication information of the first SID list may be generated by the PE device 11, then the PE device 11 may also send the indication information of the first SID list to the PE device 12, so that the PE device 12 can determine the forwarding path that is reversely co-pathed with the forwarding path 41 for the response message C corresponding to the BFD message c based on the indication information of the first SID list. In another case, the indication information of the first SID list may also be generated by the PE device 12, then the PE device 12 may send the indication information of the first SID list to the PE device 11, so that the PE device 11 can carry the indication information of the first SID list in the sent BFD message c, to ensure that the BFD detection of the forwarding path 41 is effectively performed.
[0089] As an example, the indication information of the first SID list is the BSID corresponding to the forwarding path 41. Both PE device 11 and PE device 12 can obtain the indication information corresponding to the first SID list: BSID 410, so that PE device 12 can save the mapping relationship between BSID 410 and forwarding path 42; or, PE device 12 can also save the mapping relationship between BSID 410 and BSID 420 corresponding to forwarding path 42, and 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. Among them, BSID420 can be the indication information of the SID list corresponding to forwarding path 42, and can be allocated to the forwarding path 42 by PE device 11 or PE device 12.
[0090] As another example, the indication information of the first SID list may also be used to indicate the SID list corresponding to the forwarding path 42. In one case, the indication information of the first SID list may be generated by the PE device 12, then the PE device 12 may send the indication information of the first SID list to the PE device 11, so that the PE device 11 can carry the indication information of the first SID list in the sent BFD message c, and ensure that the BFD detection of the forwarding path 41 is effectively performed. In another case, the indication information of the first SID list may also be generated by the PE device 11, then the PE device 11 may also send the indication information of the first SID list to the PE device 12, so that the PE device 12 can determine the forwarding path that is in the reverse direction of the forwarding path 41 for the response message C corresponding to the BFD message c based on the indication information of the first SID list. Taking the Path Segment corresponding to the forwarding path 42 as an example, the indication information of the first SID list can obtain the indication information corresponding to the first SID list: Path Segment 420. In this way, the PE device 12 can determine the forwarding path 42 based on the indication information of the first SID list in the BFD message c.
[0091] It should be noted that PE11 or PE12 can also generate indication information of a second SID list. If the indication information of the first SID list is used to indicate the SID list corresponding to the forwarding path 41, then the indication information of the second SID list can be used to indicate the SID list corresponding to the forwarding path 42; if the indication information of the first SID list is used to indicate the SID list corresponding to the forwarding path 42, then the indication information of the second SID list can be used to indicate the SID list corresponding to the forwarding path 41.
[0092] In some other possible implementations, if the network system includes a control management device, then the indication information of the first SID list may be sent by the control management device to the PE device 11 and the PE device 12 .
[0093] As an example, the control and management device may generate indication information of the first SID list, and send the indication information of the first SID list to PE device 11 and PE device 12. For example, the control and management device sends message 51 to PE device 11 or PE device 12, and the message 51 carries the indication information of the first SID list, so that the PE device that receives the indication information of the first SID list from the control and management device can also forward the indication information of the first SID list to the other end PE device in the SR policy 1. For another example, the control and management device sends message 52 to PE device 11 and PE device 12, and the message 52 carries the indication information of the first SID list.
[0094] As another example, the PE device 11 or the PE device 12 may also generate indication information of the first SID list, send the indication information of the first SID list to the control management device, and the control management device sends the indication information of the first SID list to the PE device 11 and the PE device 12. For example, the PE device 11 or the PE device 12 sends a message 61 to the control management device, and the message 61 carries the indication information of the first SID list. After receiving the message 61, the control management device obtains the indication information of the first SID list from the message 61, and sends a message 53 to the PE device 11 and the PE device 12, and the message 53 carries the indication information of the first SID list. Before the control management device receives the message 61, it may also send relevant information of SR policy 1 and SR policy 3 to the PE device 11 and the PE device 12, and instruct the PE device 11 or the PE device 12 to allocate the corresponding SID list indication information (including the above-mentioned first SID list indication information) to each forwarding path in the SR policy 1 and the SR policy 3, and carry the indication information in the message 61 to the control management device.
[0095] In the above two examples, message 51, message 52, message 53 or message 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 the forwarding path 41, and the indication information of the first SID list is used to indicate the forwarding path 42; or, the indication information of the second SID list can also be used to indicate the forwarding path 42, and the indication information of the first SID list indicates the forwarding path 41.
[0096] Among them, message 51, message 52, and message 53 may be, for example, a border gateway protocol segment routing policy (BGP SR policy) message, and the BGP SR policy message may carry the indication information of the first SIDlist through an extended sub-type length value (sub-TLV) field. Figure 4a As shown, the sub-TLV field used to carry the indication information of the first SID list in the BGP SR policy message may include: a type (Type) field, a length (Length) field, a reserved (Reserved) field and a value (Value) field, wherein the value of the Type field is used to indicate that the sub-TLV field carries the indication information of the first SID list, the value of the Length field is used to indicate the length of the Value field in the sub-TLV field, and the value of the Value field includes the indication information of the first SID list. If the BGP SR policy message also carries the indication information of the second SID list, then, in one case, the indication information of the first SID list and the indication information of the second SID list can be carried in the same sub-TLV field, and the format of the sub-TLV field is as follows: Figure 4bAs shown, in addition to including: Type field, Length field, Reserved field and Value field, it can also include a Flags field, the value of the Flags field is used to indicate the number of indication information of the SID list carried in the sub-TLV field and the forwarding path indicated by the indication information of the SID list, such as, the value of one bit of the Flags field is used to indicate that the Value field of the sub-TLV field includes the indication information of the first SID list, the value of another bit of the Flags field is used to indicate that the Value field of the sub-TLV field includes the indication information of the second SID list, and the Value field of the sub-TLV field includes the indication information of the first SID list and the indication information of the second SID list. In another case, the indication information of the first SID list and the indication information of the second SID list can be carried in two sub-TLV fields of the BGP SR policy message respectively. The format of each sub-TLV field can refer to 4a. The Value field of the sub-TLV field used to carry the indication information of the first SID list includes the indication information of the first SID list, and the Value field of the sub-TLV field used to carry the indication information of the second SID list includes the indication information of the second SID list. Taking the indication information of the SID list as BSID as an example, if the SR policy is SRv6 policy, then, Figure 4a or Figure 4b The value of the Value field is an IPv6 address. If the SRpolicy is an SR-MPLS policy, then: Figure 4a or Figure 4b The value of the Value field is the MPLS label. The format of the Value field can be found in Figure 4c As shown, it includes a label field, a traffic level (Exp (also called TC)) field, a flag (S) and a survival time (TTL) field, wherein the TC field, S and TTL fields are reserved fields and can be set to 0.
[0097] Message 61 may be, for example, a border gateway protocol link state (BGP-LS) message, and the BGP-LS message may use the sub-TLV field in the SID list TLV field defined by the BGP-LS protocol to carry the 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 field 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 the BGP-LS message used to carry the indication information of the first SID list may include: a Type field, a Length field, and a Value field, wherein the value of the Type field is used to indicate that the sub-TLV field carries the indication information of the first SID list, the value of the Length field is used to indicate the length of the Value field in the sub-TLV field, and the value of the Value field includes the indication information of the first SID list. If the BGP-LS message also carries the indication information of the second SID list, then, in one case, the indication information of the first SID list and the indication information of the second SID list can be carried in a sub-TLV field, and the format of the sub-TLV field is as follows: Figure 5c As shown, in addition to including: Type field, Length field, and Value field, it can also include a Flags field, the value of the Flags field is used to indicate the number of indication information of the SIDlist carried in the sub-TLV field and the forwarding path indicated by the indication information of each SID list, such as, the value of the first bit of the Flags field is used to indicate that the Value field of the sub-TLV field includes the indication information of the first SID list, the value of the second bit of the Flags field is used to indicate that the Value field of the sub-TLV field includes the indication information of the second SID list, and the Value field of the sub-TLV field includes the indication information of the first SID list and the indication information of the second SID list. In another case, the indication information of the first SID list and the indication information of the second SID list can be carried in two sub-TLV fields of the BGP-LS message respectively. The format of each sub-TLV field can refer to 5b. The Value field of the sub-TLV field used to carry the indication information of the first SID list includes the indication information of the first SID list, and the Value field of the sub-TLV field used to carry the indication information of the second SID list includes the indication information of the second SID list. Taking the indication information of the SID list as BSID as an example, if the SR policy is SRv6 policy, then, Figure 5b or Figure 5c The value of the Value field is an IPv6 address. If the SR policy is an SR-MPLS policy, Figure 5b or Figure 5c The value of the Value field is the MPLS label. The format of the Value field can be found in Figure 4c shown.
[0098] Assuming that message 51, message 52, message 53 and message 61 all include indication information of the first SID list and indication information of the second SID list, in one case, if the indication information of the first SID list and the indication information of the second SID list in message 51, message 52 or message 53 are carried in one sub-TLV field, then the indication information of the first SID list and the indication information of the second SID list in message 61 can also be carried in one sub-TLV field; in another case, if the indication information of the first SID list and the indication information of the second SID list in message 51, message 52 or message 53 are carried in two sub-TLV fields, then the indication information of the first SID list and the indication information of the second SID list in message 61 can also be carried in two sub-TLV fields.
[0099] In addition, the message 51, message 52, message 53 and message 61 may also be a network configuration protocol (NETCONF) or path computation element protocol (PCEP) message for carrying indication information of the first SID list. The specific implementation is not described in detail in the embodiments of the present application.
[0100] It should be noted that when the indication information of the first SID list is exchanged between PE device 11 and PE device 12, 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.
[0101] In the embodiment of the present application, the indication information of the SID list may be the BSID corresponding to the SID list. The BSID is different from the BSID currently allocated to the candidate path in the 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. The BSID corresponding to the candidate path can be referred to as the Path BSID (abbreviated as: P-BSID); the BSID corresponding to the forwarding path in the present application is used to indicate the specific forwarding path, which can be referred to as the SID list-level BSID (abbreviated as: L-BSID). The BSID used to indicate the forwarding path that appears in the context of the embodiment of the present application mainly refers to the L-BSID. The above explanation is mainly used to illustrate that the BSID required for use in the present application to implement reverse co-path detection is at the SID list level, but it does not mean that the contents of the 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 SRpolicy only includes one SR list, the values of the P-BSID and the 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.
[0102] For example, when the control management device sends indication information of the first SID list to the PE device 11 and the PE device 12, and the indication information of the first SID list is the L-BSID, the operations to be performed before S101 may include: S41, the control management device establishes SR policy 1 and SR policy 2 from the PE device 11 to the PE device 12, and SR policy 3 and SR policy 4 from the PE device 12 to the PE device 11;
[0103] S42, controlling the management device to allocate an L-BSID to the forwarding path in each SR policy, for example, including:
[0104] For the direction from PE 11 to PE 12, the configuration is as follows:
[0105] The main SR policy is SR policy 1. SR policy 1 includes forwarding path 41. The SIDlist of forwarding path 41 is <41021,41022,41012>. The L-BSID corresponding to forwarding path 41 is 410.
[0106] The backup SR policy is SR policy 2. SR policy 2 includes forwarding path 43. The SIDlist of forwarding path 43 is <43023,43024,43012>. The L-BSID corresponding to forwarding path 43 is 430.
[0107] For the direction from PE 12 to PE 11, the configuration is as follows:
[0108] The main SR policy is SR policy 3. SR policy 3 includes forwarding path 42. The SIDlist of forwarding path 42 is <42022,42021,42011>. The L-BSID corresponding to forwarding path 42 is 420.
[0109] The backup SR policy is SR policy 4. SR policy 4 includes a forwarding path 44. The SIDlist of the forwarding path 44 is <44024, 44023, 44011>. The L-BSID corresponding to the forwarding path 44 is 440.
[0110] S43, the control management device sends the relevant configurations of SR policy 1 and SR policy 2 to PE device 11, and sends the L-BSID of the forwarding path 42 that is in the reverse path with the forwarding path 41 in SR policy 1, and the L-BSID of the forwarding path 44 that is in the reverse path with the forwarding path 43 in SR policy 2; the control management device sends the relevant configurations of SR policy3 and SR policy 4 to PE device 12, and sends the L-BSID of the forwarding path 41 that is in the reverse path with the forwarding path 42 in SR policy 3, and the L-BSID of the forwarding path 42 that is in the reverse path with the forwarding path 44 in SR policy 4, specifically including:
[0111] The content sent by the control management device to the PE device 11 is as follows:
[0112] The SID list of forwarding path 41 in the main SR policy 1 is <41021,41022,41012>. The L-BSID corresponding to forwarding path 41 is 410, and the L-BSID corresponding to forwarding path 42 of the reverse common path is 420.
[0113] The SID list of forwarding path 43 in standby SR policy 2 is <43023,43024,43012>. The L-BSID corresponding to forwarding path 43 is 430, and the L-BSID corresponding to forwarding path 44 of the reverse co-path is 440.
[0114] The content sent by the control management device to the PE device 12 is as follows:
[0115] The SID list of forwarding path 42 in the main SR policy 3 is <42022,42021,42011>. The L-BSID corresponding to forwarding path 42 is 420, and the L-BSID corresponding to forwarding path 41 of the reverse common path is 410.
[0116] The SID list of the forwarding path 44 in the backup SR policy 4 is <44024,44023,44011>, the L-BSID corresponding to the forwarding path 44 is 440, and the L-BSID corresponding to the forwarding path 43 of the reverse common path is 430.
[0117] In this way, the indication information of the first SID list is configured, the indication information of the first SID list is carried in the BFD message c, and the BFD message c is sent to the PE device 12 through the forwarding path 41 in the SR policy 1, and the PE device 11 initiates fault detection of the forwarding path 41 in the SR policy 1. Similarly, the method provided in the embodiment of the present application is also applicable to the PE device 11 performing fault detection on other forwarding paths included in the SR policy 1, and the implementation method is the same as the fault detection method for the forwarding path 41, which will not be repeated here.
[0118] The control and management device in the embodiment of the present application may be any device that can control and manage devices in a network system, for example, it may be a software defined network (SDN) controller.
[0119] S103, the PE device 12 determines a forwarding path 42 according to the indication information of the first SID list, and the forwarding path 42 and the forwarding path 41 are reverse paths.
[0120] The indication information of the first SID list is used to instruct the PE device 12 to determine a forwarding path 42 for sending a response message C of the BFD message c, and the forwarding path 42 is in the reverse direction of the forwarding path 41 .
[0121] In specific implementation, after PE device 12 receives BFD message c sent by PE device 11 through forwarding path 41, PE device 12 obtains indication information of the first SID list by parsing the BFD message c. Thus, PE device 12 can determine the forwarding path 42 that is in the reverse direction of the forwarding path 41 based on the indication information of the first SID list, so as to prepare for accurate fault detection by transmitting BFD message c and response message C through the forwarding path that is in the reverse direction.
[0122] 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 according to the indication information of the first SID list.
[0123] As another example, if the indication information of the first SID list is used to indicate the SIDlist corresponding to the forwarding path 41, then, in one case, assuming that the mapping relationship between the indication information of the first SID list and the indication information of the second SID list is stored on the PE device 12, and the indication information of the second SID list is used to indicate the SIDlist corresponding to the forwarding path 42, then, S103 may include, for example: the PE device 12 determines the indication information of the second SID list according to the indication information of the first SID list; then, the PE device 12 determines the forwarding path 42 according to the indication information of the second SID list. In another case, assuming that the mapping relationship between the indication information of the first SID list and the forwarding path 42 is stored on the PE device 12, then, in S103, the PE device 12 may also directly determine the forwarding path 42 according to the indication information of the first SID list.
[0124] S104 , the PE device 12 sends a response message C to the BFD message c to the PE device 11 through the forwarding path 42 . The response message C is used to instruct the PE device 11 to perform fault detection on the forwarding path 41 .
[0125] In some possible situations, if a network device or link that the forwarding path 42 passes through fails when S104 is executed, or if a network device or link that the forwarding path 41 passes through fails before S104, then the PE device 11 may not be able to receive the response message C. Then, if the PE device 11 does not receive the response message C through the forwarding path 42 within a preset time (such as 1 second), since the forwarding path 41 and the forwarding path 42 are in the same reverse direction, it can be determined that the forwarding path 41 fails.
[0126] In some other possible situations, if the network devices and links that the forwarding path 42 passes through are normal when S104 is executed, then the embodiment of the present application may further include the following S105 to S106 to determine that the forwarding path 41 has no faults.
[0127] S105 , the PE device 11 receives a response message C of the BFD message c from the forwarding path 42 .
[0128] S106 , the PE device 11 performs fault detection on the forwarding path 41 according to the response message C.
[0129] In specific implementation, S106 may mean that the PE device 11 determines that the forwarding path 41 and the forwarding path 42 for transmitting the BFD message c and the response message C are both normal according to the received response message C. Since the forwarding path 41 and the forwarding path 42 are in the same reverse path, it is determined that there is no fault in the forwarding path 41.
[0130] It can be seen that through this method 100, the transmitting end of the BFD detection carries the indication information of the SID list in the BFD message, so that the receiving end can determine the forwarding path that is reversely co-pathed with the forwarding path of the transmitted BFD message based on the indication information of the SID list, and send a 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 reversely co-pathed, accurate fault detection of the specific forwarding path in the SR policy is achieved, thereby improving the precision and accuracy of the BFD mechanism in fault detection of the SR policy.
[0131] In some possible implementations, considering the establishment of a bidirectional co-path SR policy, for example, the control management device can create bidirectional co-path SR Policy 1 and SR policy 3, and associate SR Policy 1 and SR policy 3 with the forward forwarding path and the reverse forwarding path, so that the BFD mechanism can be used to achieve bidirectional fault detection. The above method 100 only introduces the fault detection of the forwarding path 41 in SR policy 1 by the PE device 11. Similarly, the embodiment of the present application may also include the following method 200, which implements the fault detection of the forwarding path 42 in SR policy 3 by the PE device 12, where the forwarding path 42 is in the reverse co-path with the forwarding path 41. In specific implementation, the method 200 may, for example, include:
[0132] S201, PE device 12 sends a BFD message d to PE device 11 through forwarding path 42 of SR policy 3, where BFD message d includes indication information of a third SID list.
[0133] S202, the PE device 11 receives the BFD message d sent by the PE device 12 through the forwarding path 42 of the SR policy 3, where the BFD message d includes indication information of the third SID list.
[0134] S203, the PE device 11 determines the forwarding path 41 according to the indication information of the third SID list, and the forwarding path 42 and the forwarding path 41 are reversely connected.
[0135] The indication information of the third SID list is used to instruct the PE device 11 to determine a forwarding path 41 for sending a response message D to the BFD message d, and the forwarding path 41 and the forwarding path 42 are in the same reverse direction.
[0136] S204 , the PE device 11 sends a response message D to the BFD message d to the PE device 12 through the forwarding path 41 .
[0137] In some possible situations, if a network device or link that the forwarding path 41 passes through fails when S204 is executed, or if a network device or link that the forwarding path 42 passes through fails before S204, then the PE device 12 may not be able to receive the response message D. Then, since the PE device 12 does not receive the response message D, it can be determined that the forwarding path 42 fails.
[0138] In some other possible situations, if the network devices and links that the forwarding path 41 passes through are normal when S204 is executed, then, optionally, the embodiment of the present application may further include the following S205 to S206:
[0139] S205 , the PE device 12 receives a response message D from the forwarding path 41 .
[0140] S206 , the PE device 12 performs fault detection on the forwarding path 42 according to the response message D.
[0141] The PE device 12 determines, based on the received response message D, that the forwarding path 42 and the forwarding path 41 for transmitting the BFD message d and the response message D are both normal, and therefore determines that there is no fault in the forwarding path 42 .
[0142] The specific implementation manner and effects achieved by the above S201 to S206 can be found in the relevant description of method 100 and will not be repeated here.
[0143] The method 200 may be implemented separately or as a whole with the method 100. If the method 100 and the method 200 are implemented as a whole, the order in which the two methods are implemented is not specifically limited.
[0144] In some possible implementations, the SR policy from PE device 11 to PE device 12 is more than SR policy 1. For example, in order to improve the reliability of the network system, SR policy 2 from PE device 11 to PE device 12 can also be constructed as a backup tunnel for SR policy 1. For example, the control management device creates SR policy 1 and SR policy 2, and creates SR policy 3 and SR policy 4 that are in the reverse direction of the two. After deployment, both the primary and backup SR policies are subjected to BFD detection according to the method provided in the embodiment of the present application. The embodiment of the present application may also include the following method 300 to implement 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, the method 300 may, for example, include:
[0145] S301, the PE device 11 sends a BFD message e to the PE device 12 through the forwarding path 43 of the SR policy 2, where the BFD message e includes indication information of the fourth SID list.
[0146] S302, the PE device 12 receives the BFD message e sent by the PE device 11 through the forwarding path 43 of the SR policy 2, where the BFD message e includes indication information of the fourth SID list.
[0147] S303, the PE device 12 determines a forwarding path 44 according to the indication information of the fourth SID list, and the forwarding path 44 and the forwarding path 43 are in reverse order.
[0148] The indication information of the fourth SID list is used to instruct the PE device 12 to determine a forwarding path 44 for sending a response message E to the BFD message e, and the forwarding path 44 and the forwarding path 43 are in the reverse direction.
[0149] S304 , the PE device 12 sends a response message E to the BFD message e to the PE device 11 through the forwarding path 44 .
[0150] In some possible situations, if a network device or link that the forwarding path 44 passes through fails when S304 is executed, or if a network device or link that the forwarding path 43 passes through fails before S304, then the PE device 11 may not be able to receive the response message E. Then, since the PE device 11 does not receive the response message E, it can be determined that the forwarding path 43 fails.
[0151] In some other possible situations, if the network devices and links that the forwarding path 44 passes through are normal when S304 is executed, then, optionally, the embodiment of the present application may further include the following S305 to S306:
[0152] S305 , the PE device 11 receives a response packet E in response to the BFD packet e from the forwarding path 44 .
[0153] S306 , the PE device 11 performs fault detection on the forwarding path 43 according to the response message E.
[0154] The PE device 11 determines, based on the received response message E, that the forwarding path 43 and the forwarding path 44 for transmitting the BFD message e and the response message E are both normal, and therefore determines that there is no fault on the forwarding path 43 .
[0155] The specific implementation manner and effects achieved by the above S301 to S306 can be found in the relevant description of method 100 and will not be repeated here.
[0156] Method 300 may be implemented alone, or implemented as a whole with method 100, or implemented as a whole with method 200, or implemented as a whole with method 100 and method 200. If method 300 is implemented as a whole with the method, the order of implementation is not specifically limited.
[0157] Below, taking the SR-MPLS policy scenario, in which the control management device sends the indication information of the first SID list to the PE device 11 and the PE device 12, and the indication information of the first SID list is L-BSID as an example, the formats of the BFD messages and the response messages corresponding to the BFD messages in the above methods are exemplified.
[0158] The format of BFD message c can be found in Figure 6a The BFD message c may include an MPLS label stack and a payload, wherein the MPLS label stack may include: SID lists corresponding to the forwarding path 41: 41021, 41022, and 41012, and indication information L-BSID 420 of the first SID list. The response message C may include an MPLS label stack and a payload, wherein the MPLS label stack may include: SID lists corresponding to the forwarding path 42: 42022, 42021, and 42011.
[0159] The format of BFD message d can be found in Figure 6bThe BFD message d may include an MPLS label stack and a payload, wherein the MPLS label stack may include: SID lists corresponding to the forwarding path 42: 42022, 42021, and 42011, and indication information of the third SID list L-BSID 410. The response message C may include an MPLS label stack and a payload, wherein the MPLS label stack may include SID lists corresponding to the forwarding path 41: 41021, 41022, and 41012.
[0160] The format of BFD message e can be found in Figure 6c The BFD message c may include an MPLS label stack and a payload, wherein the MPLS label stack may include: SID lists corresponding to the forwarding path 43: 43023, 43024, and 43012, and indication information of the fourth SID list L-BSID 440. The response message C may include an MPLS label stack and a payload, wherein the MPLS label stack may include: SID lists corresponding to the forwarding path 44: 44024, 44023, and 44011.
[0161] In the above-mentioned BFD message c, BFD message d, BFD message e, response message C, response message D and response message E, the payload may include Internet protocol (internet protocol, IP), user datagram protocol (user datagram protocol, UDP) and detection information, wherein the detection information is BFD information.
[0162] It should be noted that the SID list included in the MPLS label stack in the BFD message and the response message can be the MPLS label corresponding to each hop from the next hop device to the egress PE device, as described above. Figure 6a to Figure 6c As shown; or, the SID list included in the MPLS label stack in the BFD message and the response message may also be the SID list obtained after the next hop is determined at the ingress PE device and the MPLS label corresponding to the next hop device is stripped off, for example, Figure 6a The MPLS label stack of the BFD packet c may include: SID lists corresponding to the forwarding path 41: 41022 and 41012.
[0163] It should be noted that the above Figure 6a to Figure 6cThe message format is described by taking the SR-MPLS policy scenario as an example. If in the SRv6 policy scenario, the indication information of the SID list is carried in the segment routing header (SRH) in the message, the indication information of the SID list carried in the SRH and the SID list corresponding to the forwarding path can be an IPv6 address. In addition, although the embodiment of the present application mainly describes the scenario of SR policy as a tunnel implementation technology, the reverse common path detection method can obviously be applied to other possible tunnel implementation technologies that can specify the forwarding path in some way. Therefore, the embodiment of the present application also provides a fault detection method, in which a first network device receives a first detection message sent by a second network device through a first forwarding path of a first tunnel, and the first detection message includes indication information of the first forwarding path; the first network device determines a second forwarding path according to the indication information of the first forwarding path, and the second forwarding path and the first forwarding path are reversely common; the first network device sends a first response message to the first detection message to the second network device through the second forwarding path, and the first response message is used to instruct the second network device to detect the first forwarding path. The detection message may be a detection message used to implement path fault detection, such as a BFD message or other fault detection message, or may be other types of detection messages, such as an operation, administration and maintenance (OAM) message.
[0164] Based on the above method embodiment, an embodiment of the present application provides a fault detection device, which will be described below in conjunction with the accompanying drawings.
[0165] Figure 7 FIG. 7 is a schematic diagram of a structure of a fault detection device 700 provided in an embodiment of the present application. The device 700 is applied to a first network device, for example, Figure 1 The function of the PE device 12 in the illustrated embodiment. The apparatus 700 may include: a receiving unit 701 , a determining unit 702 , and a sending unit 703 .
[0166] The receiving unit 701 is configured to receive a first BFD message sent by a second network device through a first forwarding path of a first SR policy, wherein the first BFD message includes indication information of a first segment identifier list SID list.
[0167] When the device 700 is applied to Figure 1For the specific implementation of the PE device 12 shown in FIG. 1 , the receiving unit 701 receives the first BFD message sent by the second network device through the first forwarding path of the first SR policy, see Figure 3 In the embodiment, S101 and S102.
[0168] The determining unit 702 is configured to determine a second forwarding path according to the indication information of the first SID list, where the second forwarding path and the first forwarding path are in reverse common path.
[0169] When the device 700 is applied to Figure 1 For the PE device 12 shown in FIG. 1 , the specific implementation of the determination unit 702 determining the second forwarding path according to the indication information of the first SID list can be referred to in Figure 3 In the embodiment, S103.
[0170] The sending unit 703 is configured to send a first response message to the first BFD message to the second network device through the second forwarding path, where the first response message is used to instruct the second network device to perform fault detection on the first forwarding path.
[0171] When the device 700 is applied to Figure 1 For a specific implementation of sending the first response message of the first BFD message to the second network device through the second forwarding path when the PE device 12 is shown, see Figure 3 In the embodiment, S104.
[0172] In a possible implementation, the apparatus 700 may further include a generating unit, wherein the generating unit is configured to generate indication information of the first SID list before receiving a first BFD message sent by a second network device through a first forwarding path of a first SR policy.
[0173] In a possible implementation manner, the receiving unit 701 is further configured to receive indication information of the first SID list sent by the second network device.
[0174] In a possible implementation, the receiving unit 701 is further used to receive a message sent by a control management device, wherein the message includes 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 above-mentioned message may be, for example, a BGP SR policy message, and the BGP SR policy message carries the indication information of the first SID list through a sub-TLV field.
[0175] As an example, the indication information of the first SID list is used to indicate the SID list corresponding to the second forwarding path.
[0176] As another example, the indication information of the first SID list is used to indicate the SID list corresponding to the first forwarding path, and the determination 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.
[0177] In a possible implementation, the sending unit 703 is also used to send a second BFD message to the second network device through the second forwarding path of the second SR policy, and the second BFD message includes indication information of a third SIDlist, and the indication information of the third SID list is used to indicate the first network device to determine the first forwarding path for sending a second response message for the second BFD message; the receiving unit 701 is also used to receive the second response message from the first forwarding path; then, the device 700 also includes a detection unit, which is used to perform fault detection on the second forwarding path according to the second response message.
[0178] In a possible implementation, the receiving unit 701 is also used to receive a third BFD message sent by the second network device through the third forwarding path of the first SR policy, the third BFD message including indication information of a fourth SID list, and the third forwarding path is different from the first forwarding path; the determining unit 702 is also used to determine a fourth forwarding path according to the indication information of the fourth SID list, and the fourth forwarding path and the third forwarding path are in reverse common path; the sending unit 703 is also used to send a third response message of the third BFD message to the second network device through the fourth forwarding path, and the third response message is used to instruct the second network device to perform fault detection on the third forwarding path.
[0179] The indication information of the first SID list may be Path Segment or BSID; or, the indication information of the first SID list may be the first SID list itself. Similarly, the indication information of the second SID list may be Path Segment or BSID or the second SID list itself.
[0180] For specific executable functions and implementations of the fault detection device 700, please refer to Figure 3 The corresponding description about the PE device 12 in the illustrated embodiment will not be repeated here.
[0181] In addition, the present application embodiment also provides a fault detection device 800, such as Figure 8 As shown, the apparatus 800 is applied to a second network device, for example, Figure 1 The function of the PE device 11 in the illustrated embodiment. The apparatus 800 may include: a sending unit 801 , a receiving unit 802 and a detecting unit 803 .
[0182] Among them, the sending unit 801 is used to send a BFD message to the first network device through the first forwarding path of the first SR policy, and the BFD message includes indication information of the first SID list, and 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 to the BFD message, and the second forwarding path is in the reverse direction of the first forwarding path.
[0183] When the device 800 is applied to Figure 1 For the specific implementation of the PE device 11 shown in FIG. 1 , the sending unit 801 sends the BFD message to the first network device through the first forwarding path of the first SR policy. Figure 3 In the embodiment, S101.
[0184] The receiving unit 802 is configured to receive a response message to the BFD message from the second forwarding path.
[0185] When the device 800 is applied to Figure 1 For the specific implementation of the receiving unit 802 receiving the response message of the BFD message from the second forwarding path when the PE device 11 is shown, please refer to Figure 3 S104 and S105 in the embodiment.
[0186] The detection unit 803 is configured to perform fault detection on the first forwarding path according to the response message.
[0187] When the device 800 is applied to 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 according to the response message can be seen in Figure 3 In the embodiment, S106.
[0188] In a possible implementation manner, the receiving unit 802 is further configured to receive indication information of the first SIDlist sent by the first network device before sending the BFD message to the first network device through the first forwarding path of the first SR policy.
[0189] In a possible implementation, the receiving unit 802 is further used to receive the indication information of the first SIDlist sent by the control and management device before sending the 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 used to: receive the BGP SR policy message sent by the control and management device, and the BGP SR policy message carries the indication information of the SID list through the sub-TLV field. In this implementation, the sending unit 801 is also used 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. Among them, the sending unit 801 is specifically used to: send a BGP-LS message to the control and management device, and the BGP-LS message carries the indication information of the first SID list through the sub-TLV field.
[0190] In a possible implementation, the apparatus 800 further includes a generating unit, the generating unit being configured to generate indication information of 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.
[0191] The indication information of the first SID list may be Path Segment or BSID; or, the indication information of the first SID list may be the first SID list itself. Similarly, the indication information of the second SID list may be Path Segment or BSID or the second SID list itself.
[0192] For specific executable functions and implementations of the fault detection device 800, please refer to Figure 3 The corresponding description about the PE device 11 in the illustrated embodiment will not be repeated here.
[0193] Fig. 9 A schematic diagram of a network device 900 provided in an embodiment of the present application, the network device 900 may be, for example, Figure 1 Any PE device in the embodiment shown, or it may be Figure 7 or Figure 8 The device implementation of the fault detection apparatus in the illustrated embodiment.
[0194] See also Fig. 9 As shown, the network device 900 includes: a processor 910, a communication interface 920 and a memory 930. The number of the processor 910 in the network device 900 can be one or more. Fig. 9 In the embodiment of the present application, the processor 910, the communication interface 920 and the memory 930 may be connected via a bus system or other means, wherein: Fig. 9 The connection via bus system 940 is taken as an example.
[0195] The processor 910 may be a CPU, an NP, or a combination of a CPU and an NP. The processor 910 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0196] When the network device 900 includes a first network device, the processor 910 may perform related functions such as determining the second forwarding path according to the indication information of the first SID list in the above method embodiment. When the network device 900 is a second network device, the processor 910 may perform related functions such as performing fault detection on the first forwarding path according to the response message in the above method embodiment.
[0197] The communication interface 920 is used to receive and send messages. Specifically, the communication interface 920 may include a receiving interface and a sending interface. The receiving interface may be used to receive messages, and the sending interface may be used to send messages. The number of the communication interface 920 may be one or more. As a possible implementation, the communication interface 920 may be used to implement Figure 7 The sending unit 703 or Figure 8 The functionality of the receiving unit 802 is shown.
[0198] The memory 930 may include a volatile memory (English: volatile memory), such as a random-access memory (RAM); the memory 930 may also include a non-volatile memory (English: non-volatile memory), such as a flash memory (English: flash memory), a hard disk drive (HDD) or a solid-state drive (SSD); the memory 930 may also include a combination of the above-mentioned types of memory. The memory 930 may, for example, store the indication information of the first SID list mentioned above.
[0199] Optionally, the memory 930 stores an operating system and a program, an executable module or a data structure, or a subset thereof, or an extended set thereof, wherein the program may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks. The processor 910 may read the program in the memory 930 to implement the fault detection method provided in the embodiment of the present application. As a possible implementation, the memory 930 may store programs such as for implementing Figure 7 The determination unit 702 or Figure 8 The program code of the detection unit 803 function is shown.
[0200] The memory 930 may be a storage device in the network device 900 , or may be a storage device independent of the network device 900 .
[0201] The bus system 940 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus system 940 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0202] Fig.10 is a schematic diagram of the structure of another network device 1000 provided in an embodiment of the present application. The network device 1000 can be configured as the aforementioned Figure 1 Any PE device in the embodiment shown, or it may be Figure 7 or Figure 8 The device implementation of the fault detection apparatus in the illustrated embodiment.
[0203] The network device 1000 includes: a main control board 1010 and an interface board 1030 .
[0204] The main control board 1010 is also called a main processing unit (MPU) or a route processor card. The main control board 1010 controls and manages various components in the network device 1000, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 1010 includes: a central processing unit 1011 and a memory 1012.
[0205] The interface board 1030 is also called a line processing unit (LPU), a line card or a service board. The interface board 1030 is used to provide various service interfaces and realize the forwarding of data packets. The service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET / SDH) interface, etc., and the Ethernet interface is, for example, a Flexible Ethernet Clients (FlexE Clients) service interface. The 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.
[0206] 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 .
[0207] The network processor 1032 is used to implement message forwarding processing. The network processor 832 can be in the form of a forwarding chip. Specifically, the processing of uplink messages includes: message inbound interface processing, forwarding table search; the processing of downlink messages: forwarding table search, etc.
[0208] The physical interface card 1033 is used to implement the docking function of the physical layer, and the original traffic enters the interface board 1030 from it, and the processed message is sent from the physical interface card 1033. The physical interface card 1033 includes at least one physical interface, which is also called a physical port. The physical interface card 1033 can also be called a daughter card, which can be installed on the interface board 1030 and is responsible for converting the optical signal into a message and forwarding the message to the network processor 1032 for processing after checking the legitimacy of the message. In some embodiments, the central processor 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, so that the network processor 1032 is not required in the physical interface card 1033.
[0209] Optionally, the network device 1000 includes a plurality of interface boards. For example, the network device 1000 further includes an interface board 1040 . The interface board 1040 includes a central processor 1041 , a network processor 1042 , a forwarding table entry memory 1044 , and a physical interface card 1043 .
[0210] Optionally, the network device 1000 further includes a switching fabric board 1020. The switching fabric board 1020 may 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, the interface board 1030 and the interface board 1040 may communicate through the switching fabric board 820.
[0211] The main control board 1010 is coupled to the interface board 1030. For example, the main control board 1010, the interface board 1030, the interface board 1040, and the switching network board 1020 are connected to the system backplane through a system bus to achieve intercommunication. In a 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 through the IPC channel.
[0212] Logically, the network device 1000 includes a control plane and a forwarding plane. The control plane includes a main control board 1010 and a central processor 1031. The forwarding plane includes various components for performing 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 a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 1032 forwards the message received by the physical interface card 1033 based on the forwarding table sent by the control plane. The forwarding table sent 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.
[0213] If the network device 1000 is configured as the first network device, the central processor 1011 may determine the second forwarding path according to the indication information of the first SID list. The network processor 1032 may 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.
[0214] If the network device 1000 is configured as a second network device, the network processor 1032 can trigger the 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 of the BFD message from the second forwarding path. The central processor 1011 can perform fault detection on the first forwarding path according to the response message.
[0215] It should be understood that the receiving unit 701, the sending unit 703, etc. in the fault detection device 700 may be equivalent to the physical interface card 1033 or the physical interface card 1043 in the network device 1000; the determining unit 702, etc. in the fault detection device 700 may be equivalent to the central processor 1011 or the central processor 1031 in the network device 1000. The sending unit 801, the receiving unit 802, etc. in the fault detection device 800 may be equivalent to the physical interface card 1033 or the physical interface card 1043 in the network device 1000; the detecting unit 803, etc. in the fault detection device 800 may be equivalent to the central processor 1011 or the central processor 1031 in the network device 1000.
[0216] It should be understood that the operation on the interface board 1040 in the embodiment of the present application is consistent with the operation of the interface board 1030, and for the sake of brevity, it will not be repeated. It should be understood that the network device 1000 of this embodiment can correspond to any one of the nodes in the above-mentioned various method embodiments, and the main control board 1010, the interface board 1030 and / or the interface board 1040 in the network device 1000 can implement the functions and / or various steps implemented by any one of the nodes in the above-mentioned various method embodiments, and for the sake of brevity, it will not be repeated here.
[0217] It should be understood that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. Under a centralized forwarding architecture, the network device may not need a switching network board, and the interface board is responsible for the processing function of the business data of the entire system. Under a distributed forwarding architecture, the network device may have at least one switching network board, and the switching network board is used to realize data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with a distributed architecture are greater than those of devices with a centralized architecture. Optionally, the network device may have only one board, that is, no switching board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two. This type of device has low data exchange and processing capabilities (for example, low-end switches or routers and other network devices). The specific architecture to be adopted depends on the specific networking deployment scenario.
[0218] In some possible embodiments, each of the above-mentioned nodes can be implemented as a virtualized device. For example, a virtualized device can be a virtual machine (English: Virtual Machine, VM) running a program for sending message functions, and the virtual machine is deployed on a hardware device (for example, a physical server). A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. The virtual machine can be configured as each node. For example, each node can be implemented based on a general physical server in combination with Network Function Virtualization (NFV) technology. Each node is a virtual host, a virtual router or a virtual switch. Those skilled in the art can virtualize each node with the above-mentioned functions on a general physical server in combination with NFV technology by reading this application, which will not be repeated here.
[0219] It should be understood that the network devices in the above-mentioned various product forms respectively have any functions of the nodes in the above-mentioned method embodiments, which will not be described in detail here.
[0220] The present application embodiment also provides a network system 1100, such as Fig.11 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 device 12 shown, Figure 7 The fault detection device 700 shown, Fig. 9 The network device 900 configured as a first network device or Fig.10 The network device 1000 shown is configured as a first network device; the second network device 1102 may be Figure 1 The PE device 11 shown, Figure 8 The fault detection device 800 shown, Fig. 9 The network device 900 configured as a second network device or Fig.10 The network device 1000 shown is configured as a second network device.
[0221] The present application also provides a chip including a processor and an interface circuit, wherein the interface circuit is used to receive instructions and transmit them to the processor; the processor may be, for example, Figure 7 A specific implementation form of the fault detection device 700 shown can be used to perform the above method; for example, it can be Figure 8 A specific implementation form of the fault detection device 800 shown can be used to execute the above method. The processor is coupled to a memory, and the memory is used to store programs or instructions. When the program or instructions are executed by the processor, the chip system implements the method in any of the above method embodiments.
[0222] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0223] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application. Exemplarily, 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 may be provided on different chips. The present application does not specifically limit the type of memory and the arrangement of the memory and the processor.
[0224] Exemplarily, the chip system can 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 microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0225] An embodiment of the present application also provides a computer-readable storage medium, including instructions or computer programs, which, when executed on a computer, enable the computer to execute the fault detection method provided in the above embodiment.
[0226] The embodiments of the present application also provide a computer program product including instructions or a computer program, which, when executed on a computer, enables the computer to execute the fault detection method provided in the above embodiments.
[0227] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0228] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0229] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical business division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0230] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0231] In addition, each business unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software business units.
[0232] If the integrated unit is implemented in the form of 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 the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0233] Those skilled in the art will appreciate that in one or more of the above examples, the services described in the present invention may be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, the services may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. Storage media may be any available media that can be accessed by a general-purpose or special-purpose computer.
[0234] The above specific implementation modes further describe the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation modes of the present invention.
[0235] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present 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 of a first segment routing policy SR policy, wherein the first BFD message includes indication information of a first segment identifier list SID list, and the indication information of the first SID list is a path segment Path Segment or a binding segment identifier BSID; The first network device determines a second forwarding path according to the indication information of the first SID list, the second forwarding path and the first forwarding path are reversely co-pathed, and the first network device stores a mapping relationship between the indication information of the first SID list and the second forwarding path; The first network device sends a first response message to the first BFD message to the second network device through the second forwarding path, where the first response message is used to instruct the second network device to perform fault detection on the first forwarding path; 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 further includes: The first network device receives a message sent by a control management device, where the message includes indication information of the first SID list; The message is a Border Gateway Protocol Segment Routing Policy BGP SR policy message, and the BGP SR policy message carries the indication information of the first SID list through the subtype length value sub-TLV field. The sub-TLV field includes a type field, a length field and a value field. The value of the type field is used to indicate that the sub-TLV field carries the indication information of the first SID list. The value of the length field is used to indicate the length of the value field. The value of the value field includes the indication information of the first SID list.
2. The method according to claim 1, characterized in that 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.
3. The method according to claim 1, characterized in that The indication information of the first SID list is used to indicate the SID list corresponding to the second forwarding path.
4. The method according to claim 1, characterized in that The indication information of the first SID list is used to indicate the SID list corresponding to the first forwarding path, and the first network device determines the second forwarding path according to the indication information of the first SID list, including: The first network device determines the indication information of the second SID list according to the indication information of the first SID list; The first network device determines the second forwarding path according to the indication information of the second SID list.
5. The method according to claim 1, characterized in that: The method further comprises: The first network device sends a second BFD message to the second network device through the second forwarding path of the second SR policy, where the second BFD message includes indication information of a third SID list, and the indication information of the third SID list is used to instruct the first network device to determine the first forwarding path for sending a second response message for the second BFD message; The first network device receives the second response message from the first forwarding path; The first network device performs fault detection on the second forwarding path according to the second response message.
6. The method according to claim 1, characterized in that The method further comprises: The first network device receives a third BFD message sent by the second network device through a third forwarding path of the first SR policy, where the third BFD message includes indication information of a fourth SID list, and the third forwarding path is different from the first forwarding path; The first network device determines a fourth forwarding path according to the indication information of the fourth SID list, and the fourth forwarding path and the third forwarding path are in reverse common path; The first network device sends a third response message to the third BFD message to the second network device through the fourth forwarding path, where the third response message is used to instruct the second network device to perform fault detection on the third forwarding path.
7. 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 the first forwarding path of the first segment routing policy SR policy, the BFD message includes indication information of a first segment identifier list SID list, the indication information of the first SID list is a path segment Path Segment or a binding segment identifier BSID, 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 to the BFD message, the second forwarding path is in reverse common with the first forwarding path, and the first network device stores a mapping relationship between the indication information of the first SID list and the second forwarding path; The second network device receives a response message to the BFD message from the second forwarding path; The second network device performs fault detection on the first forwarding path according to the response message; Before the second network device sends the BFD message to the first network device through the first forwarding path of the first SR policy, the method further includes: The second network device receives a message sent by the control management device, where the message includes indication information of the first SID list; The message is a Border Gateway Protocol Segment Routing Policy BGP SR policy message, and the BGP SR policy message carries the indication information of the first SID list through the subtype length value sub-TLV field. The sub-TLV field includes a type field, a length field and a value field. The value of the type field is used to indicate that the sub-TLV field carries the indication information of the first SID list. The value of the length field is used to indicate the length of the value field. The value of the value field includes the indication information of the first SID list.
8. A network device, characterized in that: include: a memory including computer-readable instructions; A processor in communication with the memory, the processor being configured to execute the computer-readable instructions so that the network device executes the method according to any one of claims 1 to 7.
9. A network system, characterized in that: The network system comprises: a first network device and a second network device, wherein the first network device is used to execute the method according to any one of claims 1 to 6; The second network device is used to execute the method described in claim 7.
10. A computer-readable storage medium, characterized in that: The method comprises a program or an instruction, which, when executed by a processor, implements the method according to any one of claims 1 to 7.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.
Citation Information
Patent Citations
Method for transmitting reverse bidirectional forwarding detection (BFD) messages, method for notifying paths and device for notifying paths
CN102624609A
Control for bidirectional forwarding detection return path
CN107005481A
Path fault detection method and device
CN108768788A
Cited By
Failure detection method, network device, and system
WO2022161061A1