Seamless bidirectional forwarding detection method, system, node, and storage medium
By modifying the bit positions and link address in the SRH header of SBFD probe messages in the SRv6-policy, the problem of inconsistent SBFD probe message paths in the prior art is solved, thereby achieving network environment stability and service switching reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZTE CORP
- Filing Date
- 2021-06-28
- Publication Date
- 2026-05-08
AI Technical Summary
The existing SRv6-policy link detection method cannot guarantee the consistency of the round-trip path of SBFD probe packets, resulting in network instability and unstable service switching.
In the initiating and transmitting nodes of SBFD probe messages, the link address in the transmission path is identified and modified by setting the preset bit position of the Flags field in the SRH message header, thus ensuring the consistency of the transmission path of SBFD probe messages.
This ensures consistency in the round-trip paths of SBFD probe messages, improving network stability and the reliability of service switching.
Smart Images

Figure CN115604159B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and in particular to a seamless bidirectional forwarding detection method, system, node, and storage medium. Background Technology
[0002] With the advent of 5G, SRv6-policy technology has been widely adopted due to its numerous advantages, especially in link inspection. SRv6-policy, combined with Seamless Bidirectional Forwarding Detection (SBFD), effectively shortens negotiation time, improves network flexibility, and strongly supports the detection of segmented routing tunnels. SBFD consists of an initiator and a reflector. Before SRv6-policy link detection, the initiator and reflector exchange SBFD control packets to advertise SBFD discriminators and other information. During SRv6-policy link detection, the initiator actively sends SBFD probe packets, and the reflector loops back these packets based on its local status. The initiator then determines its local state based on the reflected packets.
[0003] The current SRv6-policy link detection method involves the initiating node (hereinafter referred to as the initiating node) encapsulating SBFD probe packets within the payload of IPv6 packets and then forwarding them according to the forwarding path specified in the configured SRv6-policy. Since the SBFD probe packets are transmitted encapsulated within IPv6 packets, their forwarding behavior during transmission at intermediate nodes is consistent with that of normal data packets (without carrying SBFD probe packets), and therefore does not require identification. Consequently, when the SBFD probe packets reach the reflecting node (hereinafter referred to as the reflecting node), the reflecting node has no way of knowing the SBFD transmission path and can only loop back the SBFD probe packets by looking up routes. With increasingly complex networks, the existing SRv6-policy link detection method can no longer guarantee the consistency of the round-trip paths for SBFD probe packets. Inconsistent round-trip paths not only affect the stability of the network environment but also lead to erroneous service switching and instability. Summary of the Invention
[0004] The purpose of this application is to provide a seamless bidirectional forwarding detection method, system, node, and storage medium, aiming to solve the technical problem that existing methods cannot guarantee the consistency of the round-trip path of SBFD probe packets, resulting in unstable network environment and service switching.
[0005] To address the aforementioned technical problems, embodiments of this application provide a seamless bidirectional forwarding detection method applied to the initiating node of a seamless bidirectional forwarding detection SBFD probe packet. The initiating node is configured with an SRv6-policy, comprising: acquiring an initial IPv6 packet generated according to the SRv6-policy; the initial IPv6 packet including an IPv6 header, a payload encapsulating the SBFD probe packet, and an SRH header corresponding to the SBFD probe packet; the SRH header recording the chain corresponding to each node in the transmission path of the SBFD probe packet. The target IPv6 packet is obtained by setting a preset bit in the Flags field of the SRH header. The target IPv6 packet is then forwarded according to the destination link address in the IPv6 header. This allows the node receiving the target IPv6 packet to determine that the target IPv6 packet carries the SBFD probe packet based on the preset bit after setting the Flags field, and to determine the loopback path based on the link addresses and device addresses of each node in the transmission path recorded in the SRH header.
[0006] To achieve the above objectives, this application also provides a seamless bidirectional forwarding detection method applied to a transmission node of an SBFD probe packet. The method includes: receiving a target IPv6 packet sent by the initiating node of the SBFD probe packet; the target IPv6 packet includes an IPv6 header, a payload encapsulating the SBFD probe packet, and an SRH header corresponding to the SBFD probe packet; the SRH header records the link addresses corresponding to each node in the transmission path of the SBFD probe packet; and determining whether the IPv6 packet carries the SBFD probe packet based on preset bits in the Flags field of the SRH header. If it is determined that the IPv6 packet carries the SBFD probe packet, determine whether the destination link address in the IPv6 packet header is the same as the link address of this node; if not, forward the target IPv6 packet according to the destination link address; if they are the same, modify the destination link address according to the link addresses corresponding to each node in the transmission path recorded in the SRH packet header; obtain the device address of this node, and modify the link address corresponding to this node in the transmission path to the device address to obtain the updated target IPv6 packet; forward the modified target IPv6 packet according to the modified destination link address.
[0007] To achieve the above objectives, embodiments of this application also provide a seamless bidirectional forwarding detection system, comprising: an initiating node for SBFD probe packets and a transmitting node for the SBFD probe packets; the initiating node is configured to execute the aforementioned seamless bidirectional forwarding detection method applied to the initiating node of the SBFD probe packets; and the transmitting node is configured to execute the aforementioned seamless bidirectional forwarding detection method applied to the transmitting node of the SBFD probe packets.
[0008] To achieve the above objectives, embodiments of this application also provide a seamless bidirectional forwarding detection node, comprising: a processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute the seamless bidirectional forwarding detection method applied to an SBFD probe packet initiating node, or the seamless bidirectional forwarding detection method applied to an SBFD probe packet transmitting node as described above.
[0009] To achieve the above objectives, embodiments of this application also provide a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the seamless bidirectional forwarding detection method applied to the SBFD probe packet initiating node, or the seamless bidirectional forwarding detection method applied to the SBFD probe packet transmitting node.
[0010] The seamless bidirectional forwarding detection method, system, node, and storage medium proposed in this application enable the preset bit position of the Flags field in the SRH header of the SBFD probe packet. This allows nodes / devices that receive the target IPv6 packet during transmission to recognize that the target IPv6 packet carries the SBFD probe packet. Consequently, these nodes can modify the link addresses of each node in the transmission path recorded in the SRH header corresponding to the SBFD probe packet. After the SBFD probe packet reaches the reflection node, the reflection node can generate the corresponding return path based on the modified transmission path, thus achieving consistency between the outbound and return paths. Attached Figure Description
[0011] One or more embodiments are illustrated by way of example with reference to the accompanying drawings, and these illustrative descriptions do not constitute a limitation on the embodiments.
[0012] Figure 1 This is a flowchart illustrating the seamless bidirectional conversion detection method for an initiating node that initiates SBFD probe messages, provided in an embodiment of this application.
[0013] Figure 2This is a flowchart illustrating the seamless bidirectional conversion detection method for intermediate nodes forwarding SBFD probe messages provided in this application embodiment;
[0014] Figure 3 This is another flowchart illustrating the seamless bidirectional conversion detection method for intermediate nodes forwarding SBFD probe messages provided in this application embodiment;
[0015] Figure 4 This is a flowchart illustrating the seamless bidirectional conversion detection method for reflection nodes applied to SBFD probe messages provided in this application embodiment;
[0016] Figure 5 This is a schematic diagram of the transmission of SBFD probe messages between the initiating node, intermediate node, and reflecting node in the seamless bidirectional conversion detection system provided in this application embodiment;
[0017] Figure 6 This is another schematic diagram of the transmission of SBFD probe messages between the initiating node, intermediate node, and reflecting node in the seamless bidirectional conversion detection system provided in this application embodiment;
[0018] Figure 7 This is a schematic diagram of the structure of the seamless bidirectional conversion detection node provided in the embodiments of this application. Detailed Implementation
[0019] In the embodiments of this application, the term "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.
[0020] In the embodiments of this application, the term "multiple" refers to two or more, and other quantifiers are similar.
[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been provided in the various embodiments of this application to help readers better understand this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for the convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.
[0022] See Figure 1 , Figure 1This is a flowchart illustrating the seamless bidirectional forwarding detection method provided in this application embodiment. In this embodiment, the method is mainly applied to the initiating node / device of SBFD probe packets.
[0023] Furthermore, it should be noted that the seamless bidirectional forwarding detection method improved in this application embodiment is based on the SRv6-policy. Therefore, the initiating node that initiates the SBFD probe message in this application is a node / device configured with the SRv6-policy, or in other words, a node / device that can or supports the SRv6-policy.
[0024] like Figure 1 As shown, the seamless bidirectional forwarding detection method provided in this embodiment includes the following steps:
[0025] Step 101: Obtain the initial IPv6 packet generated according to the SRv6-policy. The initial IPv6 packet includes an IPv6 packet header, a payload encapsulating the SBFD probe packet, and an SRH packet header corresponding to the SBFD probe packet. The SRH packet header records the link addresses corresponding to each node in the transmission path of the SBFD probe packet.
[0026] Specifically, the initial IPv6 packet generation method is largely the same as the existing SRv6-policy-based generation method, as follows:
[0027] (1) Based on the link addresses of each node in the transmission path of the SBFD probe message during the tunnel detection process specified by the SRv6-policy, encapsulate and store the segment list of the link addresses of each node in the order of arrival.
[0028] For example, if the initiating node of an SBFD probe message is A and the reflecting node is D, and the transmission path from A to D requires passing through the transmission nodes B and C once, then the transmission path is A->B->C->D.
[0029] Accordingly, according to the above arrival order, the specific positions of the link addresses corresponding to each node after node A in the Segment List are as follows: the link address SID_D corresponding to D is stored in the Segment List at the position with the subscript Segment List[0], the link address SID_C corresponding to C is stored in the Segment List at the position with the subscript Segment List[1], and the link address SID_B corresponding to B is stored in the Segment List at the position with the subscript Segment List[2].
[0030] It should be understood that the above examples are merely examples listed for the purpose of better understanding the technical solutions of this embodiment, and are not intended to be the only limitation of this embodiment.
[0031] (2) Determine the number of unreached nodes (SegmentLeft) based on the number of addresses stored in the Segment List.
[0032] It should be noted that in the SRv6-policy, Segment Left records the number of remaining segments, similar to a pointer. Every time a target IPv6 packet carrying an SBFD probe packet passes through a segment and arrives at a node / device, the value of Segment Left is decremented by 1.
[0033] Therefore, by default, when initiating a node, the value of Segment Left is 1 less than the number of addresses stored in the Segment List.
[0034] Based on this rule, taking the example of the Segment List storing the link addresses corresponding to 3 nodes, the value of Segment Left is 2.
[0035] (3) Generate the SRH header based on the Segment List and the Segment Left.
[0036] It should be noted that in practical applications, the SRH header corresponding to the SBFD probe message includes, in addition to the Segment List for storing link addresses in IPv6 format and the Segment Left for recording the number of remaining undelivered segments, the following content:
[0037] Next Header: Identifies the protocol type following the SRH header. SRv6 uses a new type of route extension message, and the Next Header value for this extension header is 43.
[0038] Hdr Ext Len: The length of the SRH header, excluding the first 8 bytes.
[0039] Routing Type: Routing Header type, 4 indicates SRH.
[0040] Last Entry: The index of the last entry in the Segment List, used to indicate the length of the list, starting from 0.
[0041] Flags: Records some special flags for SRH, which are 0 by default.
[0042] Tag: Group or category identifier for data messages.
[0043] (4) Use the local loopback address of this node as the source link address, and use the link address stored at the position pointed to by the largest index in the Segment List as the destination link address.
[0044] (5) Generate the IPv6 header based on the source link address and the destination link address.
[0045] (6) Generate the payload based on the SBFD probe message.
[0046] Understandably, SBFD probe messages are transmitted outward via IPv6 messages, so SBFD probe messages are essentially encapsulated in the payload of IPv6 messages.
[0047] (7) Generate the initial IPv6 packet based on the IPv6 packet header, the SRH packet header and the payload.
[0048] This enables the generation of an initial IPv6 packet carrying an SBFD probe message.
[0049] Step 102: Set the preset bit of the Flags field in the SRH header to obtain the target IPv6 packet.
[0050] Specifically, in practical applications, one or more bits in the Flags field of the SRH header can be pre-defined to be set to 1 from the default state, indicating that the payload of the forwarded IPv6 packet carries an SBFD probe packet.
[0051] Therefore, the aforementioned setting of the preset bits in the Flags field of the SRH header is essentially setting one or more bits in the Flags field of the SRH header from the default state to 1 according to pre-defined requirements.
[0052] In other words, compared to the initial IPv6 packet, the target IPv6 packet has a special flag in the Flags field of the SRH header, so that subsequent nodes that receive the target IPv6 packet can determine from this flag that the target IPv6 packet carries an SBFD probe packet, rather than a normal data packet.
[0053] Step 103: Forward the target IPv6 packet according to the destination link address in the IPv6 packet header.
[0054] Specifically, when forwarding a target IPv6 packet, the initiating node needs to determine whether the destination link address in the IPv6 packet header is the same as the local link address (Local SID).
[0055] Accordingly, if they are different, the target IPv6 packet is forwarded directly based on the destination link address; if they are the same, the destination link address is modified according to the transmission path recorded in the SRH header, i.e., the link address corresponding to each node in the Segment List. After completing the above operations, the modified target IPv6 packet is forwarded based on the modified destination link address.
[0056] The specific modification method is as follows:
[0057] (1) Decrement the value of Segment Left by 1 and point the pointer to the position of Segment List[n-1].
[0058] Understandably, n is the current largest index of the Segment List, which is an integer greater than 0.
[0059] (2) Copy the link address stored at the Segment List[n-1] position to the outer IPv6 header as the destination link address for the next forwarding operation.
[0060] (3) Obtain the device address of this node and modify the link address corresponding to this node in the transmission path to the device address, that is, modify the link address stored at the Segment List[n] position to the device address of this node (i.e., the commonly referred to END.X address), and obtain the updated target IPv6 packet.
[0061] This enables the forwarding of SBFD probe messages from the originating node to the outside.
[0062] As can be seen from the above description, the seamless bidirectional forwarding detection method provided in this embodiment sets a preset bit in the Flags field of the SRH header of the SBFD probe packet at the initiating node. This allows nodes / devices that receive the target IPv6 packet during transmission to identify that the target IPv6 packet carries an SBFD probe packet based on the preset bit set in the Flags field. Consequently, these nodes / devices can modify the link addresses of each node in the transmission path recorded in the SRH header of the SBFD probe packet. This enables the reflection node to generate the corresponding return path based on the modified transmission path after the SBFD probe packet reaches the reflection node, thus achieving consistency between the outbound and return paths.
[0063] See Figure 2 , Figure 2 This is a flowchart of the seamless bidirectional forwarding detection method provided in this application embodiment. In this embodiment, the method is mainly applied to intermediate nodes that forward SBFD probe messages.
[0064] like Figure 2 As shown, the seamless bidirectional forwarding detection method provided in this embodiment includes the following steps:
[0065] Step 201: Receive the target IPv6 packet sent by the initiating node of the SBFD probe packet. The target IPv6 packet includes an IPv6 packet header, a payload encapsulating the SBFD probe packet, and an SRH packet header corresponding to the SBFD probe packet. The SRH packet header records the link addresses corresponding to each node in the transmission path of the SBFD probe packet.
[0066] Step 202: Determine whether the IPv6 packet carries the SBFD probe packet based on the preset bit position of the Flags field in the SRH packet header.
[0067] For example, if the default bit in the Flags field is set from 0 to 1, it is determined that the IPv6 packet carries an SBFD probe packet.
[0068] Accordingly, if it is determined that the IPv6 packet carries the SBFD probe packet, then step 203 is executed; otherwise, step 204 is executed.
[0069] Step 203: Determine whether the destination link address in the IPv6 packet header is the same as the link address of this node.
[0070] Specifically, if they are different, proceed to step 204; if they are the same, proceed to step 205.
[0071] Step 204: Forward the target IPv6 packet according to the destination link address.
[0072] Understandably, this situation occurs when the destination link address in the outer IPv6 packet header does not match the local SID of this node. In this case, the node does not need to modify any content in the target IPv6 packet; it can simply forward the target IPv6 packet outward based on the current destination link address.
[0073] Step 205: Modify the destination link address according to the link addresses corresponding to each node in the transmission path recorded in the SRH header.
[0074] The specific modification method is as follows:
[0075] (1) Decrement the value of Segment Left by 1 and point the pointer to the position of Segment List[m-1].
[0076] Understandably, m is the index of the current destination link address in the IPv6 packet header, located in the Segment List, and is an integer greater than 0.
[0077] (2) Copy the link address stored at the Segment List[m-1] position to the outer IPv6 header as the destination link address for the next forwarding operation.
[0078] This allows for the modification of the destination link address.
[0079] Step 206: Obtain the device address of this node, and modify the link address corresponding to this node in the transmission path to the device address to obtain the updated target IPv6 packet.
[0080] The link address stored at the Segment List[m] position is modified to the device address of this node (i.e., the END.X address), resulting in the updated target IPv6 packet.
[0081] Step 207: Forward the modified target IPv6 packet according to the modified destination link address.
[0082] Regarding the operations in steps 205 to 207 above, and... Figure 1 The modification and forwarding methods given in the illustrated embodiments are similar and will not be repeated here.
[0083] Furthermore, in practical applications, if the destination link address in the modified outer IPv6 header matches its Local SID, then the operations in steps 205 to 207 above are repeated.
[0084] Therefore, the seamless bidirectional forwarding detection method provided in this embodiment, because the initiating node sets a preset bit in the Flags field of the SRH header of the SBFD probe packet, the node / device receiving the target IPv6 packet during transmission can identify that the target IPv6 packet carries an SBFD probe packet based on the preset bit set in the Flags field. This allows these nodes / devices to modify the link addresses of each node in the transmission path recorded in the SRH header of the SBFD probe packet. As a result, after the SBFD probe packet reaches the reflecting node, the reflecting node can generate the corresponding return path based on the modified transmission path, thus achieving consistency between the outbound and return paths.
[0085] See Figure 3 , Figure 3 This is a flowchart of the seamless bidirectional forwarding detection method provided in this application embodiment. In this embodiment, the method is mainly applied to intermediate nodes that forward SBFD probe messages.
[0086] like Figure 3 As shown, the seamless bidirectional forwarding detection method provided in this embodiment includes the following steps:
[0087] Step 301: Receive the target IPv6 packet sent by the initiating node of the SBFD probe packet. The target IPv6 packet includes an IPv6 packet header, a payload encapsulating the SBFD probe packet, and an SRH packet header corresponding to the SBFD probe packet. The SRH packet header records the link addresses corresponding to each node in the transmission path of the SBFD probe packet.
[0088] Step 302: Determine whether the IPv6 packet carries the SBFD probe packet based on the preset bit position of the Flags field in the SRH packet header.
[0089] Specifically, if it is determined that the IPv6 packet carries the SBFD probe packet, then proceed to step 303; otherwise, proceed to step 304.
[0090] Step 303: Determine whether the destination link address in the IPv6 packet header is the same as the link address of this node.
[0091] Specifically, if they are different, proceed to step 304; if they are the same, proceed to step 307.
[0092] It is not difficult to see that steps 301 to 303 in this embodiment are similar to... Figure 2 Steps 201 to 203 in the illustrated embodiment are largely the same and will not be described again here.
[0093] Step 304: Check whether this node supports SRv6 functionality.
[0094] Specifically, if supported, proceed to step 305; if not supported, proceed to step 306.
[0095] Step 305: Obtain the device address of this node and add the device address before the link address corresponding to this node in the transmission path.
[0096] Taking the index n of the link address corresponding to this node in the Segment List as an example, the index n+1 of the device address of this node in the Segment List is the location where the device address is stored.
[0097] Furthermore, it's worth noting that in practical applications, there might be situations where the local node doesn't have a device address. Therefore, to ensure that the local node's device address can be obtained, it's necessary to first check whether the local node's port is configured with a device address before performing the above operations.
[0098] Correspondingly, if not, the device address is configured for the port according to business needs, or the device address manually configured by the user is received.
[0099] It should be understood that the above examples are merely examples listed for the purpose of better understanding the technical solutions of this embodiment, and are not intended to be the only limitation of this embodiment.
[0100] Step 306: Forward the target IPv6 packet according to the destination link address.
[0101] Step 307: Modify the destination link address according to the link addresses corresponding to each node in the transmission path recorded in the SRH header.
[0102] Step 308: Obtain the device address of this node, and modify the link address corresponding to this node in the transmission path to the device address to obtain the updated target IPv6 packet.
[0103] Step 309: Forward the modified target IPv6 packet according to the modified destination link address.
[0104] It is not difficult to see that steps 306 to 309 in this embodiment are similar to... Figure 2 Steps 204 to 207 in the illustrated embodiment are largely the same and will not be described again here.
[0105] Therefore, the seamless bidirectional forwarding detection method provided in this embodiment allows IPv6 packets carrying SBFD probe messages to modify or modify the Segment List at each hop-enabled, or rather, SRv6-supporting node / device. This enables the IPv6 packets carrying SBFD probe messages to reach the reflecting node, and the reflecting node can generate a strict return path based on the current Segment List, thereby further ensuring the consistency of the round-trip path of the SBFD probe messages.
[0106] See Figure 4 , Figure 4 This is a flowchart of the seamless bidirectional forwarding detection method provided in this application embodiment. In this embodiment, the method is mainly applied to the reflection node that forwards SBFD probe packets.
[0107] like Figure 4 As shown, the seamless bidirectional forwarding detection method provided in this embodiment includes the following steps:
[0108] Step 401: Receive the target IPv6 packet sent by the initiating node of the SBFD probe packet. The target IPv6 packet includes an IPv6 packet header, a payload encapsulating the SBFD probe packet, and an SRH packet header corresponding to the SBFD probe packet. The SRH packet header records the link addresses corresponding to each node in the transmission path of the SBFD probe packet.
[0109] Step 402: Determine whether the IPv6 packet carries the SBFD probe packet based on the preset bit position of the Flags field in the SRH packet header.
[0110] Specifically, if it is determined that the IPv6 packet carries the SBFD probe packet, then step 403 is executed; otherwise, step 404 is executed.
[0111] Step 403: Determine whether the destination link address in the IPv6 packet header is the same as the link address of this node.
[0112] Specifically, if they are different, proceed to step 404; if they are the same, proceed to step 405.
[0113] Step 404: Forward the target IPv6 packet according to the destination link address.
[0114] Step 405: Modify the destination link address according to the link addresses corresponding to each node in the transmission path recorded in the SRH header.
[0115] Step 406: Obtain the device address of this node, and modify the link address corresponding to this node in the transmission path to the device address to obtain the updated target IPv6 packet.
[0116] It is not difficult to see that steps 401 to 406 in this embodiment are similar to... Figure 2 Steps 201 to 206 in the illustrated embodiment are largely the same and will not be described again here.
[0117] Step 407: Extract the number of nodes that the target IPv6 packet has not reached from the SRH packet header.
[0118] That is, the current value of Segment Left.
[0119] Step 408: Determine whether the number of nodes is equal to 0.
[0120] Specifically, if they are not equal, proceed to step 409; if they are equal, proceed to step 410.
[0121] Step 409: Forward the modified target IPv6 packet according to the modified destination link address.
[0122] It is not difficult to see that step 409 in this embodiment is the same as... Figure 2 Step 207 in the illustrated embodiment is largely the same and will not be repeated here.
[0123] Step 410: Determine whether the modified destination link address is the same as the loopback address of this node.
[0124] Specifically, if they are the same, proceed to step 411; otherwise, proceed to step 409.
[0125] Step 411: Generate the return path of the SBFD probe message according to the modified transmission path, and loop the SBFD probe message back to the initiating node according to the return path.
[0126] It should be noted that if the modified destination link address is the same as the loopback address of this node, it means that the current node is the reflection node of the SBFD probe message.
[0127] When the transmitting node is a reflection node, the IPv6 packet carrying the SBFD probe message needs to perform a loopback operation. Therefore, a return path for the SBFD probe message needs to be generated based on the modified transmission path, and the SBFD probe message needs to be looped back to the initiating node according to the return path.
[0128] To ensure loopback speed and consistency of the outbound and return paths, when generating the return path of the SBFD probe message based on the modified transmission path, adjacent and duplicate addresses in the modified transmission path can be deduplicated first, and then the addresses in the deduplicated transmission path can be reversed to obtain the return path.
[0129] Furthermore, in this embodiment, looping the SBFD probe message back to the initiating node according to the backhaul path includes:
[0130] Extract the SBFD probe packet from the payload of the target IPv6 packet;
[0131] Based on the number of addresses stored in the return path, determine the number of nodes that need to be traversed during the loopback process;
[0132] Based on the return path and the number of nodes that need to be traversed during the loopback process, the SRH header of the SBFD probe message loopback process is generated;
[0133] The local loopback address of this node is used as the source link address, and the address of the initiating node stored in the loopback path is used as the destination link address in the loopback process of the SBFD probe message.
[0134] Based on the source link address and the destination link address in the SBFD probe message loopback process, generate the IPv6 header in the SBFD probe message loopback process;
[0135] Generate a payload based on the SBFD probe message;
[0136] Based on the IPv6 packet header, the SRH packet header, and the payload in the SBFD probe packet loopback process, an IPv6 packet is generated that is forwarded between nodes during the SBFD probe packet loopback process.
[0137] Based on the destination link address during the loopback process of the SBFD probe message, the IPv6 message is forwarded to the initiating node.
[0138] It is not difficult to see that the method of generating IPv6 packets carrying SBFD probe messages during the loopback process is roughly the same as the method of generating the initial IPv6 packet in the initiating section, and will not be described in detail in this embodiment.
[0139] Therefore, the seamless bidirectional forwarding detection method provided in this embodiment, because the initiating node sets a preset bit in the Flags field of the SRH header of the SBFD probe packet, the node / device receiving the target IPv6 packet during transmission can identify that the target IPv6 packet carries an SBFD probe packet based on the preset bit set in the Flags field. This allows these nodes / devices to modify the link addresses of each node in the transmission path recorded in the SRH header of the SBFD probe packet. As a result, after the SBFD probe packet reaches the reflecting node, the reflecting node can generate the corresponding return path based on the modified transmission path, thus achieving consistency between the outbound and return paths.
[0140] Furthermore, it should be understood that the step divisions of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this patent.
[0141] This application also provides a seamless bidirectional conversion detection system, including an initiating node that initiates SBFD probe messages and a transmission node that forwards SBFD probe messages.
[0142] The initiating node is used to implement Figure 1 The seamless bidirectional forwarding detection method described in the corresponding embodiment.
[0143] Furthermore, the aforementioned transmission node may be an intermediate node, i.e., a node that does not need to extract the SBFD probe packet from the payload of the target IPv6 packet, but only needs to modify the IPv6 packet header and the SRH packet header; or it may be a reflection node, i.e. an intermediate node that needs to modify the IPv6 packet header and the SRH packet header, and at the same time needs to extract the SBFD probe packet from the payload of the target IPv6 packet, and determine the return path node based on the transmission path in the modified SRH packet header.
[0144] Accordingly, for the case where the seamless bidirectional forwarding detection node is an intermediate node, the following is executed: Figure 2 or Figure 3 The seamless bidirectional forwarding detection method described in the corresponding embodiment; for the case where the seamless bidirectional forwarding detection node is a reflection node, the following is executed: Figure 4 The seamless bidirectional forwarding detection method described in the corresponding embodiment.
[0145] To better understand the seamless bidirectional conversion detection system provided in the embodiments of this application, the following is combined with... Figure 5 and Figure 6 Please provide a detailed explanation.
[0146] See Figure 5 and Figure 6 , Figure 5 and Figure 6 This is a schematic diagram of the transmission of SBFD probe messages between the initiating node, intermediate node, and reflecting node in the seamless bidirectional conversion detection system provided in this application embodiment.
[0147] like Figure 5As shown, the initiating node A is configured with SRv6-policy. In the destination IPv6 packet, the link address encapsulated in the Segment List in the SRH header is: 2::2, A3::1, A2::1; Segment Left is: SL=2; The destination link address DA in the outer IPv6 header is: A2::1, which is copied from the Segment List[2] in the SRH header; The source link address in the outer IPv6 header is: 1::1, which is the loopback address of the initiating node A; The payload is the effective payload of the IPv6 packet, which encapsulates the SBFD probe packet. When the initiating node A forwards the IPv6 packet, it specifically forwards it according to the destination link address in the outer IPv6 header: A2::1.
[0148] Node B, as a transmission device, uses a destination link address that is not its own link address. It forwards packets directly based on the destination link address in the IPv6 header: A2::1, and the SRH header remains unchanged.
[0149] After receiving the IPv6 packet forwarded by node B, node C looks up the local SID table based on the destination link address A2::1 in the outer IPv6 packet header. If the local SID table is found, the following related actions are performed:
[0150] Decrement SL by 1, and set the pointer to Segment List[1];
[0151] Copy the address of Segment List[1]: A3::1 to the destination link address in the outer IPv6 header;
[0152] According to the message entry, look up the local SID table and determine that the device address NED.X of this node (C) is A2::101. Then modify the address of Segment List[2] to A2::101.
[0153] Based on the destination link address of the outer IPv6 packet header: A3::1, forward the modified IPv6 packet.
[0154] Node D receives the IPv6 packet forwarded by Node C, looks up the local Local SID table based on the destination link address A3::1 in the outer IPv6 packet header, finds a match in the local Local SID table, and performs the following related actions:
[0155] Decrement SL by 1, and set the pointer to Segment List[0].
[0156] Copy the address 2::2 of Segment List[0] to the destination link address in the outer IPv6 header;
[0157] According to the message entry, look up the local SID table and determine that the device address NED.X of this node (D) is A3::101. Then modify the address of Segment List[1] to A3::101.
[0158] Forward according to the destination link address 2::2 in the outer IPv6 header.
[0159] Furthermore, when forwarding, node D identifies the current destination link address 2::2, which is the loopback address of this node: 2::2. It strips the SRH header and IPv6 header and reads the SBFD probe packet. Then, based on the modified Segment List, it encapsulates the loopback Segment List of the SBFD probe packet: 1::1, A2::101, A3::101; SL=2.
[0160] During the loopback process, nodes C, B, and A forward the packet normally according to the backhaul Segment List. After reaching node A, the packet leaves the SRH header and IPv6 header, reads the SBFD probe packet, and completes a seamless bidirectional forwarding detection.
[0161] It is not hard to see that Figure 5 In the seamless bidirectional forwarding detection process shown, Node B is neither a hit node nor supports or enables SRv6 functionality. Therefore, when the target IPv6 packet arrives at Node B, Node B does not need to modify the IPv6 header or SRH header in the IPv6 packet. It can directly forward the target IPv6 packet based on the destination link address recorded in the IPv6 header of the received target IPv6 packet. However, in practical applications, the arriving node may not be a hit node, but the node supports or enables SRv6 functionality. In this case, it is necessary to modify the SRH header at that node to ensure absolute consistency between the return path and the transmission path used in the loopback process. To better understand this approach, the following will combine... Figure 6 Please provide an explanation.
[0162] like Figure 6As shown, the initiating node A is configured with SRv6-policy. In the destination IPv6 packet, the link address encapsulated in the Segment List in the SRH header is: 2::2, A3::1, A2::1; Segment Left is: SL=2; The destination link address DA in the outer IPv6 header is: A2::1, which is copied from the Segment List[2] in the SRH header; The source link address in the outer IPv6 header is: 1::1, which is the loopback address of the initiating node A; The payload is the effective payload of the IPv6 packet, which encapsulates the SBFD probe packet. When the initiating node A forwards the IPv6 packet, it specifically forwards it according to the destination link address in the outer IPv6 header: A2::1.
[0163] Node B receives an IPv6 packet forwarded by Node A, checks the destination link address (A2::1) in the outer IPv6 packet header, and determines that it is not the local link address. However, since SRv6 is enabled locally, Node B performs the following actions:
[0164] According to the message entry, look up the local SID table and determine the device address (NED.X address) of this node (B) as A::101. Add a Segment List [3] before Segment List [2]: A::101. The SL value and the destination link address in the outer IPv6 message remain unchanged.
[0165] Modify the Last Entry value in the SRH header to 3;
[0166] Forward based on the destination link address in the outer IPv6 header: A2::1.
[0167] Node C receives an IPv6 packet forwarded by Node B. Based on the destination link address A2::1 in the outer IPv6 packet header, it looks up the local Local SID table. If the local Local SID table is found, it performs the following actions:
[0168] Decrement SL by 1, and set the pointer to Segment List[1];
[0169] Copy the address of Segment List[1]: A3::1 to the destination link address in the outer IPv6 header;
[0170] According to the message entry, look up the local SID table and determine that the device address (NED.X address) of this node (C) is A2::101. Then modify the address of Segment List[2] to A2::101.
[0171] Forward based on the destination link address in the outer IPv6 header: A3::1.
[0172] Node D receives the IPv6 packet forwarded by Node C, looks up the local Local SID table based on the destination link address A3::1 in the outer IPv6 packet header, finds a match in the local Local SID table, and performs the following related actions:
[0173] Decrement SL by 1, and set the pointer to Segment List[0].
[0174] Copy the address 2::2 of Segment List[0] to the destination link address in the outer IPv6 header;
[0175] According to the message entry, look up the local SID table and determine that the device address (NED.X address) of this node (D) is A3::101. Modify the address of Segment List[1] to A3::101;
[0176] Forward based on the destination link address 2::2 in the outer IPv6 header.
[0177] Furthermore, when forwarding, node D identifies the current destination link address 2::2, which is the loopback address of this node: 2::2. It strips the SRH header and IPv6 header and reads the SBFD probe packet. Then, based on the modified Segment List, it encapsulates the loopback Segment List of the SBFD probe packet: 1::1, A::101, A2::101, A3::101; SL=2.
[0178] During the loopback process, nodes C, B, and A forward the packet normally according to the backhaul Segment List. After reaching node A, the packet leaves the SRH header and IPv6 header, reads the SBFD probe packet, and completes a seamless bidirectional forwarding detection.
[0179] It should be understood that the above examples are merely examples listed for the purpose of better understanding the technical solutions of this embodiment, and are not intended to be the only limitation of this embodiment.
[0180] Therefore, the seamless bidirectional forwarding detection system improved in this embodiment sets a preset bit in the Flags field of the SRH header of the SBFD probe packet at the initiating node. This allows nodes / devices that receive the target IPv6 packet during transmission to identify that the target IPv6 packet carries an SBFD probe packet based on the preset bit set in the Flags field. Consequently, these nodes / devices can modify the link addresses of each node in the transmission path recorded in the SRH header corresponding to the SBFD probe packet. This enables the reflecting node to generate the corresponding return path based on the modified transmission path after the SBFD probe packet reaches the reflecting node, thus achieving consistency between the outbound and return paths.
[0181] Furthermore, it is not difficult to see from the above description that this embodiment is a system embodiment corresponding to the above method embodiments, and this embodiment can be implemented in conjunction with the above method embodiments. The relevant technical details mentioned in the above method embodiments are still valid in this embodiment, and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above method embodiments.
[0182] See Figure 7 , Figure 7 This is a schematic diagram of the structure of the seamless bidirectional forwarding detection node provided in the embodiments of this application.
[0183] like Figure 7 As shown, the seamless bidirectional forwarding detection node provided in this embodiment includes: at least one processor 701; and a memory 702 communicatively connected to at least one processor 701.
[0184] The memory 702 stores instructions that can be executed by at least one processor 701, which are executed by at least one processor 701 to enable at least one processor 701 to execute the seamless bidirectional forwarding detection method described in the above method embodiments.
[0185] It should be noted that, in one example, the seamless bidirectional forwarding detection node is specifically the node that initiates the SBFD probe message.
[0186] Accordingly, processor 701 executes the following: Figure 1 The seamless bidirectional forwarding detection method described in the corresponding embodiment.
[0187] In another example, the seamless bidirectional forwarding detection node is specifically the node that transmits SBFD probe messages.
[0188] Understandably, the aforementioned transmission nodes may be intermediate nodes, i.e., nodes that do not need to extract SBFD probe packets from the payload of the target IPv6 packet, but only need to modify the IPv6 packet header and SRH packet header; or they may be reflection nodes, i.e., intermediate nodes that need to modify the IPv6 packet header and SRH packet header, and at the same time need to extract SBFD probe packets from the payload of the target IPv6 packet, and determine the return path node based on the transmission path in the modified SRH packet header.
[0189] Accordingly, for the case where the seamless bidirectional forwarding detection node is an intermediate node, processor 701 executes the following: Figure 2 or Figure 3 The seamless bidirectional forwarding detection method described in the corresponding embodiment; for the case where the seamless bidirectional forwarding detection node is a reflection node, the processor 701 executes the following: Figure 4 The seamless bidirectional forwarding detection method described in the corresponding embodiment.
[0190] Furthermore, it is worth mentioning that, in one example, the memory 702 and the processor 701 are connected via a bus. This bus can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors 701 and memory 702 together. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor 701 is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor 701.
[0191] Processor 701 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory 702 can be used to store data used by processor 701 during operation.
[0192] This application also relates to a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the seamless bidirectional forwarding detection method described in the above-described method embodiments.
[0193] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0194] Those skilled in the art will understand that the above embodiments are specific embodiments for implementing this application, and in practical applications, various changes can be made to them in form and detail without departing from the spirit and scope of this application.
Claims
1. A seamless bidirectional forwarding detection method, characterized in that, An initiating node used for seamless bidirectional forwarding and detection of SBFD probe packets, wherein the initiating node is configured with an SRv6-policy, including: Obtain the initial IPv6 packet generated according to the SRv6-policy. The initial IPv6 packet includes an IPv6 packet header, a payload encapsulating an SBFD probe packet, and an SRH packet header corresponding to the SBFD probe packet. The SRH packet header records the link addresses corresponding to each node in the transmission path of the SBFD probe packet. The preset bits of the Flags field in the SRH header are set to obtain the target IPv6 packet; The target IPv6 packet is forwarded according to the destination link address in the IPv6 packet header, so that the node receiving the target IPv6 packet can determine that the target IPv6 packet carries the SBFD probe packet according to the preset bit after setting the Flags field, and determine the return path of the loopback process according to the link address of each node in the transmission path and the device address of each node recorded in the SRH packet header.
2. The seamless bidirectional forwarding detection method as described in claim 1, characterized in that, The step of forwarding the target IPv6 packet according to the destination link address in the IPv6 packet header includes: Determine whether the destination link address is the same as the link address of this node; If they are different, the target IPv6 packet is forwarded according to the destination link address; If they are the same, modify the destination link address according to the link addresses corresponding to each node in the transmission path recorded in the SRH header; Obtain the device address of this node, and modify the link address corresponding to this node in the transmission path to the device address to obtain the updated target IPv6 packet; Based on the modified destination link address, the modified target IPv6 packet is forwarded.
3. A seamless bidirectional forwarding detection method, characterized in that, The transmission nodes used for SBFD probe messages include: The initiating node that receives the SBFD probe message sends a target IPv6 message, the target IPv6 message including an IPv6 message header, a payload encapsulating the SBFD probe message, and an SRH message header corresponding to the SBFD probe message. The SRH message header records the link addresses corresponding to each node in the transmission path of the SBFD probe message. Based on the preset bits of the Flags field in the SRH header, determine whether the IPv6 packet carries the SBFD probe packet; If it is determined that the IPv6 packet carries the SBFD probe packet, determine whether the destination link address in the IPv6 packet header is the same as the link address of this node; If they are different, the target IPv6 packet will be forwarded according to the destination link address. If they are the same, then the destination link address is modified according to the link addresses corresponding to each node in the transmission path recorded in the SRH header; Obtain the device address of this node, and modify the link address corresponding to this node in the transmission path to the device address to obtain the updated target IPv6 packet; Based on the modified destination link address, the modified target IPv6 packet is forwarded.
4. The seamless bidirectional forwarding detection method as described in claim 3, characterized in that, The forwarding of the target IPv6 packet based on the destination link address includes: Check if this node supports SRv6 functionality; If not supported, the target IPv6 packet is forwarded according to the destination link address; If supported, obtain the device address of this node, add the device address before the link address corresponding to this node in the transmission path, and forward the target IPv6 packet according to the destination link address.
5. The seamless bidirectional forwarding detection method as described in claim 4, characterized in that, Before obtaining the device address of this node, the method further includes: Check whether the port of this node is configured with the device address; If not, configure the device address for the port according to business requirements, or receive the device address manually configured by the user.
6. The seamless bidirectional forwarding detection method as described in claim 3, characterized in that, Before forwarding the modified target IPv6 packet based on the modified destination link address, the method further includes: Extract the number of nodes that the target IPv6 packet did not reach from the SRH packet header; Determine whether the number of nodes is equal to 0; If not equal, then perform the step of forwarding the modified target IPv6 packet according to the modified destination link address; If equal, determine whether the modified destination link address is the same as the loopback address of this node; If they are the same, the return path of the SBFD probe message is generated according to the modified transmission path, and the SBFD probe message is looped back to the initiating node according to the return path.
7. The seamless bidirectional forwarding detection method as described in claim 6, characterized in that, The step of generating the return path for the SBFD probe message based on the modified transmission path includes: The adjacent and duplicate addresses in the modified transmission path are deduplicated; The addresses in the deduplicated transmission path are sorted in reverse order to obtain the return path.
8. The seamless bidirectional forwarding detection method as described in claim 6 or 7, characterized in that, The step of looping the SBFD probe message back to the initiating node according to the return path includes: Extract the SBFD probe packet from the payload of the target IPv6 packet; Based on the number of addresses stored in the return path, determine the number of nodes that need to be traversed during the loopback process; Based on the return path and the number of nodes that need to be traversed during the loopback process, the SRH header of the SBFD probe message loopback process is generated; The local loopback address of this node is used as the source link address, and the address of the initiating node stored in the loopback path is used as the destination link address in the loopback process of the SBFD probe message. Based on the source link address and the destination link address in the SBFD probe message loopback process, generate the IPv6 header in the SBFD probe message loopback process; Generate a payload based on the SBFD probe message; Based on the IPv6 packet header, the SRH packet header, and the payload in the SBFD probe packet loopback process, an IPv6 packet is generated that is forwarded between nodes during the SBFD probe packet loopback process. Based on the destination link address during the loopback process of the SBFD probe message, the IPv6 message is forwarded to the initiating node.
9. A seamless bidirectional forwarding detection system, characterized in that, include: The node that initiates the SBFD probe message and the node that transmits the SBFD probe message; The initiating node is used to execute the seamless bidirectional forwarding detection method as described in claim 1 or 2; The transmission node is used to perform the seamless bidirectional forwarding detection method as described in any one of claims 3 to 8.
10. A seamless bidirectional forwarding detection node, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the seamless bidirectional forwarding detection method as described in claim 1 or 2, or the seamless bidirectional forwarding detection method as described in any one of claims 3 to 8.
11. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the seamless bidirectional forwarding detection method as described in claim 1 or 2, or the seamless bidirectional forwarding detection method as described in any one of claims 3 to 8.
Citation Information
Patent Citations
Communication method, device and system
CN111614574A
Data transmission processing method and device, network equipment and readable storage medium
CN112333094A