Communication method and device

By using two SID lists in SRv6 TE Policy, one for data forwarding paths and the other for BFD path detection, the problem that existing single-arm BFD detection cannot support path detection in different scenarios is solved, and efficient fault detection is achieved and fast failover.

CN119402403AActive Publication Date: 2025-02-07NEW H3C TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411505329.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-07
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

Existing single-arm BFD detection cannot support some scenarios where the detection path and forwarding path are different.

Method used

Decoupling of BFD detection and data forwarding path is achieved by using two SID lists in SRv6 TE Policy, one for data forwarding path and the other for BFD path detection.

Benefits of technology

It realizes millisecond fault detection speed for SRv6-TE Policy, supports path detection and forwarding in different scenarios, and improves the forwarding efficiency and failover speed of network equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402403A_ABST
    Figure CN119402403A_ABST
Patent Text Reader

Abstract

The invention provides a communication method and device, and the method comprises the steps: transmitting a first BFD echo outbound message on a first forwarding path represented by a first SID list according to the first SID list; according to the second SID list, a second BFD echo go message is sent on a second forwarding path represented by the second SID list; when a first BFD echo backhaul message sent by a second network device corresponding to the last SID included in the first SID list is received within a first preset time, determining that the first forwarding path is in a normal state; and when a second BFD echo backhaul message sent by a third network device corresponding to the last SID included in the second SID list is received within a second preset time, determining that the second forwarding path is in a normal state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication method and device. Background Art

[0002] Segment Routing Traffic Engineering Policy (SR-TE Policy) provides a flexible forwarding path selection method to meet different forwarding requirements of users.

[0003] When there are multiple forwarding paths between the source node and the destination node in the SR network, the reasonable use of SRv6-TEPolicy to select the forwarding path can not only facilitate the management personnel to manage and plan the network, but also effectively reduce the forwarding pressure of the network equipment.

[0004] Bidirectional Forwarding Detection (BFD) is used to detect communication failures between forwarding engines. BFD can provide millisecond-level fault detection speed for SRv6-TE Policy connectivity and achieve fast path switching.

[0005] Currently, BFD provides two detection methods, one is seamless BFD (English: Seamless BFD, abbreviated as: SBFD) detection, and the other is BFD echo message detection. The following is a brief description of BFD echo message detection. BFD echo message detection is also called one-arm BFD detection. Configure SRv6 TE Policy and one-arm BFD detection function in the head node on the forwarding path. The head node generates a BFD message with its own IP address as the source and destination IP addresses. The head node encapsulates the segment identifier (English: Segment Identifier, abbreviated as: SID) list corresponding to the SRv6 TE Policy in the outer layer of the BFD message to obtain a BFD echo message.

[0006] The BFD echo message is forwarded on the forwarding path indicated by the SID list. After passing through the intermediate nodes and reaching the tail node, the tail node performs a route lookup based on the destination Internet Protocol (IP) address included in the BFD message and loops the BFD echo message back to the head node.

[0007] If the head node receives the looped-back BFD echo message, it determines that the forwarding path indicated by the SID list is normal. Otherwise, it determines that the forwarding path indicated by the SID list is faulty. If all forwarding paths indicated by the SID list under a candidate path (Candidate Paths) included in the SRv6 TE Policy fail, the one-arm BFD detection triggers candidate path switching or re-optimization of the path.

[0008] From the description of the one-arm BFD detection process, we can see that when the head node encapsulates the BFD message, it uses the SID list corresponding to the SRv6 TE Policy. The existing SID list is a list that includes message forwarding path information, which is composed of the SIDs of each node on the forwarding path. Therefore, the BFD echo message obtained by encapsulating the BFD message using the SID list cannot be used to detect the connectivity of the forwarding path in some scenarios where the detection path and the forwarding path need to be different.

[0009] For example, in a strict path TE scenario, the SID list includes the SIDs of all nodes on the forwarding path. After the head node uses the SID list to encapsulate the BFD message, the BFD echo message can reach the tail node; in a loose path TE scenario, when the SID list does not include the SID of the tail node, the BFD echo message cannot reach the tail node and only reaches the last node included in the SID list, that is, the connectivity of some links in the forwarding path is detected, rather than the connectivity of the entire forwarding path. Summary of the invention

[0010] In view of this, the present application provides a communication method and apparatus to solve the problem that the existing single-arm BFD detection cannot support some scenarios where the detection path and the forwarding path need to be different.

[0011] In a first aspect, the present application provides a communication method, the method being applied to a first network device, wherein an SRv6 TE Policy is configured in the first network device, the SRv6 TE Policy including a first SID list and a second SID list associated with the first SID list, the method comprising:

[0012] Sending a first BFDecho outbound message on a first forwarding path represented by the first SID list according to the first SID list;

[0013] Sending a second BFDecho outbound message on a second forwarding path represented by the second SID list according to the second SID list;

[0014] When a first BFD echo return message sent by a second network device corresponding to the last SID included in the first SID list is received within a first preset time, determining that the first forwarding path is in a normal state;

[0015] When a second BFD echo return message sent by a third network device corresponding to the last SID included in the second SID list is received within a second preset time, determining that the second forwarding path is in a normal state;

[0016] The second network device is an intermediate forwarding node on the second forwarding path, the third network device is a network device indicated by the IP address of the destination node included in the SRv6 TE Policy, the first forwarding path is used to forward service packets, and the second forwarding path is used to implement BFD path detection.

[0017] In a second aspect, the present application provides a communication device, the device is applied to a first network device, an SRv6 TE Policy is configured in the first network device, the SRv6 TE Policy includes a first SID list and a second SID list associated with the first SID list, the device includes: a sending unit, a receiving unit and a determining unit;

[0018] The sending unit is configured to send a first BFD echo outbound message on a first forwarding path represented by the first SID list according to the first SID list;

[0019] The sending unit is further configured to send a second BFD echo outbound message on a second forwarding path represented by the second SID list according to the second SID list;

[0020] The determining unit is configured to determine that the first forwarding path is in a normal state when the receiving unit receives a first BFD echo return message sent by a second network device corresponding to the last SID included in the first SID list within a first preset time;

[0021] The determining unit is further configured to determine that the second forwarding path is in a normal state when the receiving unit receives a second BFD echo return message sent by a third network device corresponding to the last SID included in the second SID list within a second preset time;

[0022] The second network device is an intermediate forwarding node on the second forwarding path, the third network device is a network device indicated by the IP address of the destination node included in the SRv6 TE Policy, the first forwarding path is used to forward service packets, and the second forwarding path is used to implement BFD path detection.

[0023] In a third aspect, the present application provides a network device, including a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the first aspect of the present application.

[0024] Therefore, by applying the communication method and apparatus provided by the present application, according to the first SID list, on the first forwarding path represented by the first SID list, the first network device sends a first BFD echo outbound message; according to the second SID list, on the second forwarding path represented by the second SID list, the first network device sends a second BFD echo outbound message; when receiving a first BFD Decho return message sent by a second network device corresponding to the last SID included in the first SID list within a first preset time, the first network device determines that the first forwarding path is in a normal state; when receiving a second BFD echo return message sent by a third network device corresponding to the last SID included in the second SID list within a second preset time, the first network device determines that the second forwarding path is in a normal state; wherein the second network device is an intermediate forwarding node on the second forwarding path, the third network device is a network device indicated by the IP address of the destination node included in the SRv6 TE Policy, the first forwarding path is used to implement forwarding service messages, and the second forwarding path is used to implement BFD path detection.

[0025] In this way, this application achieves the decoupling of the SID list used for BFD detection in SRv6-TE Policy from the SID list used for data forwarding. Users can specify the SID list for data forwarding according to different networking scenarios to improve the efficiency of data forwarding; at the same time, they can also specify the corresponding BFD SID list for path detection to detect the connectivity of the actual network, provide millisecond-level fault detection speed for SRv6-TE Policy, and achieve fast fault switching. This solves the problem that the existing single-arm BFD detection cannot support some scenarios where the detection path and forwarding path are different. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A flow chart of a communication method provided in an embodiment of the present application;

[0027] Figure 2A schematic diagram of a Spine device-Leaf device network provided in an embodiment of the present application;

[0028] Figure 3 A schematic diagram of another Spine device-Leaf device networking provided in an embodiment of the present application;

[0029] Figure 4 A structural diagram of a communication device provided in an embodiment of the present application;

[0030] Figure 5 The network device hardware structure provided in the embodiment of the present application. DETAILED DESCRIPTION

[0031] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0032] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more corresponding listed items.

[0033] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0034] The communication method provided in the embodiment of the present application is described in detail below. Figure 1 , Figure 1 A flow chart of a communication method provided in an embodiment of the present application. The method is applied to a first network device, and the first network device is a head node on a forwarding path. The communication method provided in an embodiment of the present application may include the following steps.

[0035] Step 110: Send a first BFD echo outbound message on a first forwarding path represented by the first SID list according to the first SID list;

[0036] Specifically, an SRv6 TE Policy is configured in the first network device, and the SRv6 TE Policy includes a first SID list and a second SID list associated with the first SID list, wherein the second SID list may also be referred to as a sub-SID list of the first SID list.

[0037] The first network device wants to detect the SRv6-TE Policy to timely understand the connectivity of the SRv6-TE Policy. The SRv6-TE Policy can be detected by performing BFD detection on each SID list included in the SRv6 TE Policy.

[0038] The first network device starts a single-arm BFD detection, and generates a first BFD echo outbound message according to the first SID list. On the first forwarding path represented by the first SID list, the first network device sends a first BFD echo outbound message.

[0039] It can be understood that the first SID list includes SIDs of multiple network devices, and the SIDs of the multiple network devices can be used to represent the first forwarding path, that is, the multiple network devices are all forwarding devices on the first forwarding path.

[0040] Optionally, before this step, the first network device will also locally configure the SRv6TE Policy according to the received configuration instruction.

[0041] Furthermore, the user inputs a configuration instruction to the first network device, where the configuration instruction includes a configuration file for configuring SRv6 TEPolicy.

[0042] After receiving the configuration instruction, the first network device obtains the configuration file from the configuration instruction and configures the SRv6 TE Policy locally according to the configuration file.

[0043] An SRv6 TE Policy consists of three identifiers: BSID, Color, and End point. BSID is the SID of the ingress node; Color is the color attribute of the forwarding path, which is used to distinguish multiple SRv6 TE Policies between the same source node and destination node; End point is the IPv6 address of the destination node included in the SRv6 TE Policy.

[0044] An SRv6 TE Policy consists of multiple candidate paths with different priorities. Each candidate path includes one or more forwarding paths identified by a SID list. A SID list can also be configured with a weight. After an SRv6 TE Policy selects a candidate path, it can perform load balancing among multiple SID lists of the candidate path based on the weight of the SID list.

[0045] In an example, the SRv6 TE Policy is as follows.

[0046] SRv6 TE Policy to destination device (the IP address of the destination device is: 2004::1)

[0047] BSID: 2001::1

[0048] Color: 123

[0049] End point: 2004::1

[0050] Candidate Path:

[0051] Segment List:

[0052] (2001:A2::1,2001:A3::1)

[0053] BFD Segment List:

[0054] (2001:A2::1,2001:A3::1,2001:A4::1)

[0055] Among them, Segment List is the first SID list, and the forwarding path indicated by it: (2001:A2::1,2001:A3::1) is the first forwarding path; BFD Segment List is the second SID list, and the forwarding path indicated by it: (2001:A2::1,2001:A3::1,2001:A4::1) is the second forwarding path.

[0056] The SID included in each SID list is a SID used to identify an interface, or a SID used to identify a link.

[0057] It can be seen from the above SRv6 TE Policy that the first forwarding path is a partially overlapping path of the second forwarding path. The first forwarding path can be used to forward service packets, and the connectivity of the forwarding path can be detected through BFD packets. The second forwarding path cannot be used to forward service packets, and the connectivity of the path to the destination device can be detected through BFD packets.

[0058] Step 120: Send a second BFD echo outbound message on a second forwarding path represented by the second SID list according to the second SID list;

[0059] Specifically, according to the second SID list, the first network device further generates a second BFD echo outbound message. On the second forwarding path represented by the second SID list, the first network device sends the second BFD echo outbound message.

[0060] It can be understood that the above BFD echo outbound messages are generated in accordance with the provisions of the existing SRv6 protocol and the BFD protocol, which will not be described in detail here, but will be described in detail in subsequent embodiments. The above BFD echo outbound messages sent on the forwarding path are also sent in accordance with the provisions of the existing SRv6 protocol and the BFD protocol, which will not be described in detail here, but will be described in detail in subsequent embodiments.

[0061] Optionally, in the embodiment of the present application, after configuring the SRv6 TE Policy locally, the first network device will also establish a BFD session, and carry the BFD echo messages sent and received via the BFD session.

[0062] Further, according to the first SID list, the first network device establishes a first BFD session with the second SRv6 node; according to the second SID list, the first network device establishes a second BFD session with the third SRv6 node;

[0063] The first BFD session is used to carry a first BFD echo outbound message and a first BFD echo return message, and the second BFD session is used to carry a second BFD echo outbound message and a second BFD echo return message.

[0064] It is understandable that the process of establishing a BFD session between network devices may be performed according to existing BFD protocol provisions, which will not be repeated here.

[0065] Step 130: When a first BFD echo return message sent by a second network device corresponding to the last SID included in the first SID list is received within a first preset time, determining that the first forwarding path is in a normal state;

[0066] Specifically, according to the description of step 110 and step 120, after the first network device sends the BFDecho outbound message on different forwarding paths, it starts the corresponding timer and determines whether the BFDecho return message is received within the preset time set by the timer.

[0067] When receiving the first BFD echo return message sent by the second network device within the first preset time, the first network device determines that the first forwarding path is in a normal state, that is, the first SID list is in a normal state.

[0068] The second network device is a device corresponding to the last SID included in the first SID list.

[0069] Step 140: When a second BFD echo return message sent by a third network device corresponding to the last SID included in the second SID list is received within a second preset time, it is determined that the second forwarding path is in a normal state.

[0070] Specifically, according to the description of step 110 and step 120, when receiving the second BFD echo return message sent by the third network device within the second preset time, the first network device determines that the second forwarding path is normal, that is, the second SID list is normal.

[0071] The third network device is a device corresponding to the last SID included in the second SID list.

[0072] Optionally, in an embodiment of the present application, if the first forwarding path and the second forwarding path are both in a normal state, the first network device determines that the first SID list is in a normal state; if either the first forwarding path or the second forwarding path is in a fault state, the first network device determines that the first SID list is in a fault state.

[0073] Optionally, in the embodiment of the present application, the process of the first network device forwarding the service message using the first forwarding path is also included.

[0074] Furthermore, when the first network device is used as a network side device, it receives the first service message sent by the user side. According to the configured diversion strategy (for example, BSID-based diversion, Color-based diversion, tunnel policy-based diversion, DSCP-based diversion, etc.), the first network device determines that the first service message is forwarded through SRv6TE Policy.

[0075] In an embodiment of the present application, there is a candidate path in the SRv6 TE Policy, and the candidate path includes a first SID list that can be used to forward service messages. The first network device obtains the first SID list. Through the SIDs included in the first SID list, the first network device determines that the last SID included in the first SID list (i.e., the SID of the second network device) is different from the SID of the destination node (i.e., the third network device) included in the SRv6 TE Policy, then the first network device obtains the VPN SID of the virtual private network (English: Virtual Private Network, abbreviated as: VPN) to which the SID of the destination node belongs.

[0076] The first network device adds the VPN SID to the first position (i.e., position [0]) of the first SID list. According to the first SID list after adding the VPN SID, the first network device generates a second service message, the second service message includes an SRH header, and the SRH header includes the first SID list after adding the VPN SID.

[0077] On the first forwarding path, the first network device forwards the second service message. After receiving the second service message, the second network device can also forward the second service message to the third network node according to the VPN SID. In this way, although the first forwarding path represented by the first SID list in the SRv6 TEPolicy cannot reach the destination node included in the SRv6 TE Policy, the second service message can also be forwarded to the destination node through the VPN SID, thereby completing the correct forwarding operation, which reduces the number of label stack layers and can reduce the SRv6 message header overhead.

[0078] In the embodiment of the present application, the above connectivity detection is not limited to BFD detection, and other OAM methods, such as PING and TRACERT SRv6-TE Policy, can also be implemented in the same way.

[0079] Therefore, by applying the communication method provided by the present application, according to the first SID list, on the first forwarding path represented by the first SID list, the first network device sends a first BFD echo outbound message; according to the second SID list, on the second forwarding path represented by the second SID list, the first network device sends a second BFD echo outbound message; when the first BFD echo return message sent by the second network device corresponding to the last SID included in the first SID list is received within the first preset time, the first network device determines that the first forwarding path is in a normal state; when the second BFD echo return message sent by the third network device corresponding to the last SID included in the second SID list is received within the second preset time, the first network device determines that the second forwarding path is in a normal state; wherein the second network device is an intermediate forwarding node on the second forwarding path, the third network device is a network device indicated by the IP address of the destination node included in the SRv6 TE Policy, the first forwarding path is used to implement forwarding service messages, and the second forwarding path is used to implement BFD path detection.

[0080] In this way, this application achieves the decoupling of the SID list used for BFD detection in SRv6-TE Policy from the SID list used for data forwarding. Users can specify the SID list for data forwarding according to different networking scenarios to improve the efficiency of data forwarding; at the same time, they can also specify the corresponding BFD SID list for path detection to detect the connectivity of the actual network, provide millisecond-level fault detection speed for SRv6-TE Policy, and achieve fast fault switching. This solves the problem that the existing single-arm BFD detection cannot support some scenarios where the detection path and forwarding path are different.

[0081] The communication method provided in the embodiment of the present application is described in detail below. Figure 2 , Figure 2 A schematic diagram of an SRv6 network provided in an embodiment of the present application. Figure 2 In the example, the SRv6 network includes network device A, network device B, network device C, and network device D.

[0082] The host IP address of network device A is 2001::1, and the configured SID is 2001:A1::1; the configured SID of network device B is 2001:A2::1; the configured SID of network device C is 2001:A3::1; the host IP address of network device D is 2004::1, and the configured SID is 2001:A4::1.

[0083] The SID configured for each of the above network devices may specifically be the SID of the network device interface (for example, the SID of the interface connected to the next-hop network device, the SID of the interface connected to the previous-hop network device), or the SID used to identify a certain link (for example, the SID of the link between network devices).

[0084] An SRv6 TE Policy is created on network device A to reach network device D, as shown below.

[0085] SRv6 TE Policy to D

[0086] BSID: 2001::1

[0087] Color: 123

[0088] End point: 2004::1

[0089] Candidate Path:

[0090] Segment List:

[0091] (2001:A2::1,2001:A3::1)

[0092] BFD Segment List:

[0093] (2001:A2::1,2001:A3::1,2001:A4::1)

[0094] In the SRv6 TE Policy, the BSID is the IPv6 address of network device A, and the destination node is the IPv6 address of network device D. The candidate path includes two SID lists: SID list 1 and BFD SID list 2 associated with SID list 1. Path 1 indicated by SID list 1 is network device A—network device B—network device C. Path 1 can be used to forward service packets and can also be used for BFD detection; Path 2 indicated by BFD SID list 2 is network device A—network device B—network device C—network device D. Path 2 can be used for BFD detection but cannot be used to forward service packets.

[0095] After one-arm BFD detection is configured in network device A, a BFD session is created based on each SID list. BFD session 1 is established between network device A and network device C; BFD session 2 is established between network device A and network device D.

[0096] Network device A wants to detect the SRv6-TE Policy to learn about the connectivity of the SRv6-TE Policy in a timely manner. The SRv6-TE Policy can be detected by performing BFD detection on each SID list included in the SRv6 TE Policy.

[0097] Network device A performs BFD detection on SID list 1. Network device A generates BFD echo outbound message 1, and the Insert encapsulation mode is used as an example for description. The BFD echo outbound message 1 includes an IPv6 header, an SRH header, a UDP header, and a BFD message.

[0098] The source address included in the IPv6 header is the IPv6 address of network device A, and the destination address is the SID of network device B. The SRH header includes an SL value (SL=2) and SID list 1. The IPv6 address of network device A is stored in position [0] in SID list 1.

[0099] Network device A sends BFD echo outbound message 1 to network device B and starts a timer. Network device A determines whether BFD echo return message 1 is received within a preset time 1 set by the timer.

[0100] After receiving the BFD echo outbound message 1 , the network device B updates the destination address (the SID of the network device C) and the SL value (SL=1) according to the SID list 1 , and continues to send the BFD echo outbound message 1 to the network device C.

[0101] After network device C receives BFD echo outbound packet 1, it determines that the SL value will be changed to 0. Based on SID list 1, it obtains the IPv6 address of network device A. Based on the IPv6 address of network device A, network device C searches the routing table and obtains the matching routing table entry.

[0102] The network device C generates a BFD echo return message 1, which includes an IPv6 header, a UDP header, and a BFD message.

[0103] The source address and the destination address included in the IPv6 header are both the IPv6 address of network device A. According to the matching routing table entry, network device C sends a BFD echo return packet 1 to network device B.

[0104] After receiving BFD echo return packet 1, network device B searches the routing table according to the destination address and obtains the matching routing table entry. Based on the matching routing table entry, network device B sends BFD echo return packet 1 to network device A.

[0105] If network device A receives BFD echo return packet 1 within preset time 1, path 1 is determined to be in normal state, and the state of BFD session 1 is also determined to be UP. If network device A does not receive BFD echo return packet 1 within preset time 1, path 1 is determined to be in fault state, and the state of BFD session 1 is also determined to be DOWN.

[0106] See also Figure 3 , Figure 3 Another SRv6 networking diagram provided in the embodiment of the present application. Figure 3 In the example, the SRv6 TE Policy configured in network device A, the connection relationship between network devices, the IPv6 address and SID configured on each network device are all the same as Figure 2 The same as in, no need to repeat here.

[0107] Network device A performs BFD detection on SID list 2. Network device A generates BFD echo outbound message 2, which is described using Insert encapsulation as an example. The BFD echo outbound message 2 includes an IPv6 header, an SRH header, a UDP header, and a BFD message.

[0108] The source address included in the IPv6 header is the IPv6 address of network device A, and the destination address is the SID of network device B. The SRH header includes an SL value (SL=3) and SID list 2. The IPv6 address of network device A is stored in position [0] in SID list 2.

[0109] Network device A sends BFD echo outbound message 2 to network device B and starts a timer. Network device A determines whether BFD echo return message 2 is received within a preset time 2 set by the timer.

[0110] After receiving the BFD echo outbound message 2 , the network device B updates the destination address (the SID of the network device C) and the SL value (SL=2) according to the SID list 2 , and continues to send the BFD echo outbound message 2 to the network device C .

[0111] After receiving the BFD echo outbound message 2 , the network device C updates the destination address (the SID of the network device D) and the SL value (SL=1) according to the SID list 2 , and continues to send the BFD echo outbound message 2 to the network device D.

[0112] After receiving BFD echo outbound packet 1, network device D determines that the SL value will be changed to 0. According to SID list 2, the IPv6 address of network device A is obtained. According to the IPv6 address of network device A, network device D searches the routing table and obtains the matching routing table entry.

[0113] The network device D generates a BFD echo return message 2, which includes an IPv6 header, a UDP header, and a BFD message.

[0114] The source address and the destination address included in the IPv6 header are both the IPv6 address of network device A. According to the matching routing table entry, network device D sends a BFD echo return packet 2 to network device C.

[0115] After receiving BFD echo return packet 2, network device C searches the routing table according to the destination address and obtains a matching routing table entry. Based on the matching routing table entry, network device C sends BFD echo return packet 2 to network device B.

[0116] After receiving BFD echo return packet 2, network device B searches the routing table according to the destination address and obtains the matching routing table entry. Based on the matching routing table entry, network device B sends BFD echo return packet 2 to network device A.

[0117] If network device A receives BFD echo return packet 2 within preset time 2, path 2 is determined to be in normal state, and the state of BFD session 2 is also determined to be UP, and SID list 2 is further determined to be in normal state. If network device A does not receive BFD echo return packet 2 within preset time 2, path 2 is determined to be in fault state, and the state of BFD session 2 is also determined to be DOWN, and SID list 2 is further determined to be in fault state.

[0118] In the embodiment of the present application, when both path 1 and path 2 are in normal state, network device A determines that SID list 1 is in normal state; if either path 1 or path 2 is in fault state, network device A determines that SID list 1 is in normal state.

[0119] In the embodiment of the present application, by associating the SID list indicating the forwarding path of the forwarding service message with the BFD SID list used for detection for BFD detection, the detection of the entire path is achieved, ensuring the path reliability and fast fault switching.

[0120] In actual applications, for scenarios such as SRv6 TE Policy carrying L3VPNv4 services, SRv6-TE Policy is used as a public network tunnel, and the head node and tail node of the public network tunnel are both PE devices. Each PE device is connected to the CE device on the user side. The tail node of the SID list is the PE device, and BFD detection also detects the public network tunnel between PE devices. If the BFD SID list in the SRv6TE Policy adds the SID information of the CE device connected to the tail node, BFD detection can also detect the CE device. In this way, the fault between the tail node PE device and the CE device connected to it can be quickly detected, and the head node PE device path can be quickly switched.

[0121] It should be noted that in actual applications, network device A can also generate BFDecho outbound message 1 in Encaps encapsulation mode. The specific generation method can be generated according to the existing SRv6 protocol regulations and will not be repeated again. It can be understood that the source IPv6, destination IPv6 address, and SRH header included in the IPv6 header generated in Encaps encapsulation mode are the same as the source IPv6, destination IPv6 address, and SRH header included in the IPv6 header generated in the aforementioned Insert encapsulation mode.

[0122] Based on the same inventive concept, the present application embodiment also provides a communication device corresponding to the communication method. Figure 4 , Figure 4 A communication device provided in an embodiment of the present application, the device is applied to a first network device, an SRv6 TE Policy is configured in the first network device, the SRv6 TE Policy includes a first SID list and a second SID list associated with the first SID list, and the device includes: a sending unit 410, a receiving unit 420, and a determining unit 430;

[0123] The sending unit 410 is configured to send a first BFD echo outbound message on a first forwarding path represented by the first SID list according to the first SID list;

[0124] The sending unit 410 is further configured to send a second BFD echo outbound message on a second forwarding path represented by the second SID list according to the second SID list;

[0125] The determining unit 430 is configured to determine that the first forwarding path is in a normal state when the receiving unit 420 receives a first BFD echo return message sent by a second network device corresponding to the last SID included in the first SID list within a first preset time;

[0126] The determining unit 430 is further configured to determine that the second forwarding path is in a normal state when the receiving unit 420 receives a second BFD echo return message sent by a third network device corresponding to the last SID included in the second SID list within a second preset time;

[0127] The second network device is an intermediate forwarding node on the second forwarding path, the third network device is a destination node included in the SRv6 TE Policy, the first forwarding path is used to forward service packets, and the second forwarding path is used to implement BFD path detection.

[0128] Optionally, the receiving unit 420 is further configured to receive a configuration instruction input by a user, where the configuration instruction includes a configuration file for configuring the SRv6 TE Policy;

[0129] The device further includes: a configuration unit (not shown in the figure), configured to locally configure the SRv6 TE Policy, wherein the SRv6 TE Policy includes the destination node and a candidate path, and the candidate path includes the first SID list and the second SID list.

[0130] Optionally, the device further comprises:

[0131] an establishing unit (not shown in the figure), configured to establish a first BFD session with the second SRv6 node according to the first SID list;

[0132] The establishing unit (not shown in the figure) is further used to establish a second BFD session with the third SRv6 node according to the second SID list;

[0133] The first BFD session is used to carry the first BFD echo outbound message and the first BFDecho return message, and the second BFD session is used to carry the second BFD echo outbound message and the second BFDecho return message.

[0134] Optionally, the determining unit 430 is further configured to determine that the first SID list is in a normal state if both the first forwarding path and the second forwarding path are in a normal state;

[0135] The determining unit 430 is further configured to determine that the first SID list is in a fault state if any one of the first forwarding path and the second forwarding path is in a fault state.

[0136] Optionally, the receiving unit 420 is further configured to receive a first service message;

[0137] The device further includes: an acquisition unit (not shown in the figure), configured to acquire a VPN SID of a VPN to which the SID of the destination node belongs if it is determined that the first service message is forwarded through the first forwarding path;

[0138] an adding unit (not shown in the figure), configured to add the VPN SID to the first position in the first SID list;

[0139] A generating unit (not shown in the figure), configured to generate a second service message according to the first SID list after adding the VPN SID, wherein the second service message includes an SRH header, and the SRH header includes the first SID list after adding the VPN SID;

[0140] The sending unit 410 is further configured to forward the second service message on the first forwarding path.

[0141] Therefore, by applying the communication device provided by the present application, according to the first SID list, on the first forwarding path represented by the first SID list, the first network device sends a first BFD echo outbound message; according to the second SID list, on the second forwarding path represented by the second SID list, the first network device sends a second BFD echo outbound message; when the first BFD echo return message sent by the second network device corresponding to the last SID included in the first SID list is received within the first preset time, the first network device determines that the first forwarding path is in a normal state; when the second BFD echo return message sent by the third network device corresponding to the last SID included in the second SID list is received within the second preset time, the first network device determines that the second forwarding path is in a normal state; wherein the second network device is an intermediate forwarding node on the second forwarding path, the third network device is a destination node included in the SRv6 TE Policy, the first forwarding path is used to implement forwarding service messages, and the second forwarding path is used to implement BFD path detection.

[0142] In this way, this application achieves the decoupling of the SID list used for BFD detection in SRv6-TE Policy from the SID list used for data forwarding. Users can specify the SID list for data forwarding according to different networking scenarios to improve the efficiency of data forwarding; at the same time, they can also specify the corresponding BFD SID list for path detection to detect the connectivity of the actual network, provide millisecond-level fault detection speed for SRv6-TE Policy, and achieve fast fault switching. This solves the problem that the existing single-arm BFD detection cannot support some scenarios where the detection path and forwarding path are different.

[0143] Based on the same inventive concept, the embodiment of the present application also provides a network device, such as Figure 5 As shown, it includes a processor 510, a transceiver 520 and a machine-readable storage medium 530, the machine-readable storage medium 530 stores machine-executable instructions that can be executed by the processor 510, and the processor 510 is prompted by the machine-executable instructions to execute the communication method provided in the embodiment of the present application. Figure 4 The communication device shown can be used as Figure 5 The network device hardware structure shown is implemented.

[0144] The computer-readable storage medium 530 may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk storage. Optionally, the computer-readable storage medium 530 may also be at least one storage device located away from the processor 510.

[0145] The processor 510 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0146] In the embodiment of the present application, the processor 510 reads the machine executable instructions stored in the machine readable storage medium 530, and the machine executable instructions enable the processor 510 itself and call the transceiver 520 to execute the communication method described in the aforementioned embodiment of the present application.

[0147] In addition, an embodiment of the present application provides a machine-readable storage medium 530, which stores machine-executable instructions. When called and executed by the processor 510, the machine-executable instructions prompt the processor 510 itself and the calling transceiver 520 to execute the communication method described in the aforementioned embodiment of the present application.

[0148] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0149] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0150] As for the communication device and machine-readable storage medium embodiments, since the method contents involved are basically similar to the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0151] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A communication method, characterized in that: The method is applied to a first network device, wherein an SRv6 TE Policy is configured in the first network device, wherein the SRv6 TE Policy includes a first SID list and a second SID list associated with the first SID list, and the method includes: Sending a first BFDecho outbound message on a first forwarding path represented by the first SID list according to the first SID list; Sending a second BFDecho outbound message on a second forwarding path represented by the second SID list according to the second SID list; When a first BFD echo return message sent by a second network device corresponding to the last SID included in the first SID list is received within a first preset time, determining that the first forwarding path is in a normal state; When a second BFD echo return message sent by a third network device corresponding to the last SID included in the second SID list is received within a second preset time, determining that the second forwarding path is in a normal state; The second network device is an intermediate forwarding node on the second forwarding path, the third network device is a network device indicated by the IP address of the destination node included in the SRv6 TE Policy, the first forwarding path is used to forward service packets, and the second forwarding path is used to implement BFD path detection.

2. The method according to claim 1, characterized in that Before sending a first BFD echo outbound message on a first forwarding path represented by the first SID list according to the first SID list, the method further includes: receiving a configuration instruction input by a user, where the configuration instruction includes a configuration file for configuring the SRv6 TE Policy; The SRv6 TE Policy is locally configured, where the SRv6 TE Policy includes the destination node and a candidate path, where the candidate path includes the first SID list and the second SID list.

3. The method according to claim 2, characterized in that After locally configuring the SRv6 TE Policy, the method further includes: Establishing a first BFD session with the second SRv6 node according to the first SID list; Establishing a second BFD session with the third SRv6 node according to the second SID list; The first BFD session is used to carry the first BFD echo outbound message and the first BFD echo return message, and the second BFD session is used to carry the second BFD echo outbound message and the second BFD echo return message.

4. The method according to claim 2, characterized in that: The method further comprises: If both the first forwarding path and the second forwarding path are in normal state, determining that the first SID list is in normal state; If any one of the first forwarding path and the second forwarding path is in a fault state, it is determined that the first SID list is in a fault state.

5. The method according to claim 1, characterized in that The method further comprises: Receiving a first service message; If it is determined that the first service message is forwarded through the first forwarding path, obtaining a VPN SID of the VPN to which the SID of the destination node belongs; Adding the VPN SID to the first position of the first SID list; Generate a second service message according to the first SID list after adding the VPN SID, wherein the second service message includes an SRH header, and the SRH header includes the first SID list after adding the VPN SID; The second service message is forwarded on the first forwarding path.

6. A communication device, characterized in that: The apparatus is applied to a first network device, an SRv6 TE Policy is configured in the first network device, the SRv6 TE Policy includes a first SID list and a second SID list associated with the first SID list, and the apparatus includes: a sending unit, a receiving unit, and a determining unit; The sending unit is configured to send a first BFD echo outbound message on a first forwarding path represented by the first SID list according to the first SID list; The sending unit is further configured to send a second BFD echo outbound message on a second forwarding path represented by the second SID list according to the second SID list; The determining unit is configured to determine that the first forwarding path is in a normal state when the receiving unit receives a first BFD echo return message sent by a second network device corresponding to the last SID included in the first SID list within a first preset time; The determining unit is further configured to determine that the second forwarding path is in a normal state when the receiving unit receives a second BFD echo return message sent by a third network device corresponding to the last SID included in the second SID list within a second preset time; The second network device is an intermediate forwarding node on the second forwarding path, the third network device is a network device indicated by the IP address of the destination node included in the SRv6 TE Policy, the first forwarding path is used to forward service packets, and the second forwarding path is used to implement BFD path detection.

7. The device according to claim 6, characterized in that The receiving unit is further configured to receive a configuration instruction input by a user, where the configuration instruction includes a configuration file for configuring the SRv6 TE Policy; The device further includes: a configuration unit, configured to locally configure the SRv6 TE Policy, wherein the SRv6 TE Policy includes the destination node and a candidate path, and the candidate path includes the first SID list and the second SID list.

8. The device according to claim 7, characterized in that The device also includes: An establishing unit, configured to establish a first BFD session with the second SRv6 node according to the first SID list; The establishing unit is further configured to establish a second BFD session with the third SRv6 node according to the second SID list; The first BFD session is used to carry the first BFD echo outbound message and the first BFD echo return message, and the second BFD session is used to carry the second BFD echo outbound message and the second BFD echo return message.

9. The device according to claim 7, characterized in that The determining unit is further configured to determine that the first SID list is in a normal state if both the first forwarding path and the second forwarding path are in a normal state; The determining unit is further configured to determine that the first SID list is in a fault state if either the first forwarding path or the second forwarding path is in a fault state.

10. The device according to claim 6, characterized in that The receiving unit is further used to receive a first service message; The device further includes: an acquisition unit, configured to acquire a VPN SID of a VPN to which the SID of the destination node belongs if it is determined that the first service message is forwarded through the first forwarding path; an adding unit, configured to add the VPN SID to the first position of the first SID list; A generating unit, configured to generate a second service message according to the first SID list after adding the VPN SID, wherein the second service message includes an SRH header, and the SRH header includes the first SID list after adding the VPN SID; The sending unit is further configured to forward the second service message on the first forwarding path.

Citation Information

Patent Citations

  • Path consistency detection method and device

    CN113472653A

  • Path detection method and device

    CN113595897A

  • Network state detection method and device, electronic equipment and storage medium

    CN116760765A

  • Message forwarding

    CN117643020A

  • Establishing forward and reverse segment routing (SR) tunnels for bidirectional forwarding detection (BFD) continuity checks

    EP4380128A1