CN-115604159-B - Seamless bidirectional forwarding detection method, system, node and storage medium
Abstract
The embodiment of the application relates to the field of communication and discloses a seamless bidirectional forwarding detection method, a system, a node and a storage medium. In the application, the bits of the flag field in the SRH message header of SBFD detection messages are set at preset bits, so that nodes/devices receiving the target IPv6 message in the transmission process can identify that the target IPv6 message carries SBFD detection messages, further, the nodes can modify link addresses corresponding to all nodes in the transmission path recorded in the SRH message header corresponding to the SBFD detection messages, and after the SBDF detection messages reach the reflecting nodes, the reflecting nodes can generate corresponding return paths according to the modified transmission paths, thereby realizing the consistency of the back-and-forth paths.
Inventors
- CHENG ZHONGLIN
Assignees
- 中兴通讯股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20210628
Claims (11)
- 1. The seamless bidirectional forwarding detection method is characterized by being applied to an initiating node for detecting a message by seamless bidirectional forwarding detection SBFD, wherein the initiating node is configured with SRv-policy and comprises the following steps: Acquiring an initial IPv6 message generated according to the SRv-policy, wherein the initial IPv6 message comprises an IPv6 message header, a payload packaged with a SBFD detection message and an SRH message header corresponding to the SBFD detection message, and the SRH message header records link addresses corresponding to all nodes in a transmission path of the SBFD detection message; setting a preset bit of the flag field in the SRH message header to obtain a target IPv6 message; And forwarding the target IPv6 message according to a target link address in the IPv6 message header, so that a node receiving the target IPv6 message determines that the target IPv6 message carries the SBFD detection message according to the preset bit after setting processing in the Flags field, and determines a return path in a loop back process according to the link address of each node and the equipment address of each node in a transmission path recorded in the SRH message header.
- 2. The method for seamless bidirectional forwarding detection according to claim 1, wherein forwarding the target IPv6 packet according to the destination link address in the IPv6 packet header includes: judging whether the destination link address is the same as the link address of the node; If not, forwarding the target IPv6 message according to the target link address; if the link addresses are the same, modifying the destination link address according to the link address corresponding to each node in the transmission path recorded in the SRH message header; Acquiring the equipment address of the node, and modifying the link address corresponding to the node in the transmission path into the equipment address to obtain the updated target IPv6 message; and forwarding the modified target IPv6 message according to the modified target link address.
- 3. The seamless bidirectional forwarding detection method is characterized by being applied to a transmission node of SBFD detection messages, and comprises the following steps: Receiving a target IPv6 message sent by an initiating node of the SBFD detection message, wherein the target IPv6 message comprises an IPv6 message header, a payload encapsulating the SBFD detection message and an SRH message header corresponding to the SBFD detection message, and the SRH message header records link addresses corresponding to all nodes in a transmission path of the SBFD detection message; determining whether the IPv6 message carries the SBFD detection message according to a preset bit of the flag field in the SRH message header; if the IPv6 message is determined to carry the SBFD detection message, judging whether the destination link address in the IPv6 message header is the same as the link address of the node; if not, forwarding the target IPv6 message according to the target link address; If the link addresses are the same, modifying the destination link address according to the link address corresponding to each node in the transmission path recorded in the SRH message header; Acquiring the equipment address of the node, and modifying the link address corresponding to the node in the transmission path into the equipment address to obtain the updated target IPv6 message; and forwarding the modified target IPv6 message according to the modified target link address.
- 4. The method for seamless bidirectional forwarding detection as recited in claim 3 wherein forwarding the target IPv6 message according to the destination link address comprises: detecting whether the node supports SRv functions; if not, forwarding the target IPv6 message according to the target link address; if so, acquiring the equipment address of the node, adding the equipment address to the transmission path before the link address corresponding to the node, and forwarding the target IPv6 message according to the destination link address.
- 5. The seamless bidirectional forwarding detection method as recited in claim 4 wherein prior to the obtaining the device address of the present node, the method further comprises: Detecting whether the port of the node is configured with the equipment address; if not, configuring the equipment address for the port according to the service requirement, or receiving the equipment address manually configured by the user.
- 6. The seamless bidirectional forwarding detection method as recited in claim 3 wherein prior to forwarding the modified target IPv6 message according to the modified destination link address, the method further comprises: Extracting the number of nodes which do not reach the target IPv6 message from the SRH message header; Judging whether the number of the nodes is equal to 0; If not, executing the step of forwarding the modified target IPv6 message according to the modified target link address; if so, judging whether the modified destination link address is the same as the loop-back address of the node; If the same, generating a return path of the SBFD detection message according to the modified transmission path, and looping the SBFD detection message back to the initiating node according to the return path.
- 7. The method of seamless bidirectional forwarding detection as set forth in claim 6 wherein the generating a backhaul path of the SBFD probe packet according to the modified transmission path includes: performing de-duplication processing on adjacent and repeated addresses in the modified transmission path; and reversely sequencing the addresses in the transmission path after the de-duplication processing to obtain the backhaul path.
- 8. The seamless bidirectional forwarding detection method as recited in claim 6 or 7 wherein looping back the SBFD probe packet to the originating node according to the backhaul path comprises: extracting the SBFD detection message from the payload of the target IPv6 message; determining the number of nodes to be passed in the loop back process according to the number of addresses stored in the return path; Generating an SRH message header in the process of looping the SBFD detection message according to the backhaul path and the number of nodes required to pass in the process of looping; Taking the local loop address of the node as a source link address, and taking the address of the initiating node stored in the return path as a destination link address in the SBFD detection message loop process; generating an IPv6 message header in the SBFD detection message looping process according to the source link address and the destination link address in the SBFD detection message looping process; generating a payload according to the SBFD detection messages; Generating an IPv6 message forwarded among nodes in the process of looping the SBFD detection message according to the IPv6 message header in the process of looping the SBFD detection message, the SRH message header in the process of looping the SBFD detection message and the payload; And forwarding the IPv6 message to the IPv6 message reaching the initiating node according to the destination link address in the process of detecting the message loop back by SBFD.
- 9. A seamless bidirectional forwarding detection system is characterized by comprising SBFD initiating nodes for detecting messages and SBFD transmitting nodes for detecting the messages; the originating node being configured to perform the seamless bidirectional forwarding detection method according to claim 1 or 2; The transmission node configured to perform the seamless bidirectional forwarding detection method according to any one of claims 3 to 8.
- 10. A seamless bidirectional forwarding detection node, comprising: At least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the seamless bidirectional forwarding detection method of claim 1 or 2 or the seamless bidirectional forwarding detection method of any one of claims 3 to 8.
- 11. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the seamless bidirectional forwarding detection method of claim 1 or 2, or the seamless bidirectional forwarding detection method of any of claims 3 to 8.
Description
Seamless bidirectional forwarding detection method, system, node and storage medium Technical Field The embodiment of the application relates to the field of communication, in particular to a seamless bidirectional forwarding detection method, a system, a node and a storage medium. Background With the advent of 5G, the SRv-policy technology has been widely popularized and applied, and especially in the link inspection, the SRv-policy technology effectively shortens the negotiation time, improves the flexibility of the whole network, and can well support the detection of Segment Routing (Segment Routing) tunnels by combining with the seamless bidirectional forwarding detection (Seamless Bidirectional Forwarding Detection, SBFD) technology. SBFD is divided into an initiating terminal and a reflecting terminal, and before SRv-poll link detection, the initiating terminal and the reflecting terminal announce SBFD information such as a descriptor (Discriminator) by mutually sending SBFD control messages (SBFD Control Packet). When SRv-poll link is detected, the initiating terminal actively transmits SBFD detection message, the reflecting terminal loops back the message according to the condition of the home terminal, and the initiating terminal determines the state of the home terminal according to the reflection message. In the current SRv-policy link detection mode, an initiating terminal (called an initiating node in the following) encapsulates a SBFD detection message in a payload of an IPv6 message, and then forwards the detection message according to a forwarding path specified in a configured SRv 6-policy. Since SBFD probe messages are encapsulated in IPv6 messages for transmission, the transmission process of intermediate nodes is consistent with the forwarding behavior of normal data messages (without SBFD probe messages), and is not recognized. Therefore, after SBFD detection messages reach the reflecting end (hereinafter referred to as a reflecting node), the reflecting end does not know the transmission path of SBFD, and can only send and receive the detection messages back and forth on the ring SBFD in a route searching manner when looping. In the face of increasingly complex networks, the existing SRv-policy link detection mode obviously cannot ensure that the back and forth paths of SBFD detection messages are consistent, and if the back and forth paths of SBFD detection messages are inconsistent, the stability of a network environment can be affected, and the phenomena of miscut, instability and the like of service switching can be caused. Disclosure of Invention The embodiment of the application aims to provide a seamless bidirectional forwarding detection method, a system, a node and a storage medium, and aims to solve the technical problems that network environment and service switching are unstable because the consistency of the back and forth paths of SBFD detection messages cannot be guaranteed in the prior art. In order to solve the technical problems, the embodiment of the application provides a seamless bidirectional forwarding detection method, which is applied to an initiating node of a seamless bidirectional forwarding detection SBFD detection message, wherein the initiating node is configured with SRv6-policy, and comprises the steps of acquiring an initial IPv6 message generated according to the SRv-policy, wherein the initial IPv6 message comprises an IPv6 message header, a payload encapsulating the SBFD detection message and an SRH message header corresponding to the SBFD detection message, the SRH message header records link addresses corresponding to all nodes in a transmission path of the SBFD detection message, setting preset bit positions of flag fields in the SRH message header to obtain a target IPv6 message, forwarding the target IPv6 message according to a target link address in the IPv6 message header, enabling a node receiving the target IPv6 message to determine that the target IPv6 message carries the link address according to the preset bit positions after setting processing in the flag fields, and determining the backhaul path of the SRH message according to the SRH message record of all nodes in the transmission path of the SRH message. In order to achieve the above purpose, the embodiment of the application further provides a seamless bidirectional forwarding detection method applied to a transmission node of SBFD detection messages, which comprises the steps of receiving a target IPv6 message sent by an initiating node of the SBFD detection message, judging whether the target IPv6 message comprises an IPv6 message header, encapsulating a payload of the SBFD detection message and an SRH message header corresponding to the SBFD detection message, wherein the SRH message header records link addresses corresponding to nodes in a transmission path of the SBFD detection message, determining whether the IPv6 message carries the SBFD detection message according to preset