Communication method and apparatus

By employing a dual SID list mechanism in the SRv6-TE Policy to detect forwarding and probe paths separately, the problem that single-arm BFD detection cannot support different path scenarios is solved, achieving efficient path detection and fault switching.

CN119402403BActive Publication Date: 2025-11-07NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing single-arm BFD detection cannot support scenarios where the detection path and the forwarding path are different, and cannot achieve complete path connectivity detection.

Method used

A dual SID list mechanism is adopted. A first BFD echo outbound message is sent on the first forwarding path represented by the first SID list, and a second BFD echo outbound message is sent on the second forwarding path represented by the second SID list. The path status is determined by receiving the return message.

Benefits of technology

It decouples BFD detection and data forwarding path in SRv6-TE Policy, provides millisecond-level fault detection speed, supports path detection in different scenarios, and improves data forwarding efficiency and fault switching speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402403B_ABST
    Figure CN119402403B_ABST
Patent Text Reader

Abstract

The application provides a communication method and device, the method comprises the following steps: according to a first SID list, sending a first BFD echo go message on a first forwarding path represented by the first SID list; according to a second SID list, sending a second BFD echo go message on a second forwarding path represented by the second SID list; when receiving a first BFD echo back message sent by a second network device corresponding to the last SID included in the first SID list within a first preset time, determining that the first forwarding path is in a normal state; when receiving a second BFD echo back message sent by a third network device corresponding to the last SID included in the second SID list 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 technical field of communication, and particularly relates to a communication method and device. BACKGROUND

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

[0003] When there are multiple forwarding paths between a source node and a destination node in an SR network, reasonable utilization of SRv6-TE Policy to select a forwarding path can not only facilitate network management and planning of management personnel, but also effectively reduce the forwarding pressure of network equipment.

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

[0005] At present, BFD provides two detection methods, one is Seamless BFD (SBFD) detection, and the other is BFD echo packet detection. The following briefly describes the BFD echo packet detection. BFD echo packet detection, also known as single-arm BFD detection. The head node on the forwarding path is configured with SRv6 TE Policy and single-arm BFD detection function. The head node generates a BFD packet with the source IP address and the destination IP address being the own IP address. The head node encapsulates a Segment Identifier (SID) list corresponding to the SRv6 TE Policy in the outer layer of the BFD packet to obtain a BFD echo packet.

[0006] The BFD echo packet is forwarded on the forwarding path indicated by the SID list, and after passing through the intermediate node to the tail node, the tail node performs routing lookup according to the destination Internet Protocol (IP) address included in the BFD packet, and loops back the BFD echo packet to the head node.

[0007] If the head node receives the BFD echo packet of the loopback, it is determined that the forwarding path indicated by the SID list is normal, otherwise, it is determined that the forwarding path indicated by the SID list is faulty. If all the SID lists under a candidate path (Candidate Paths) included in the SRv6 TE Policy indicate that the forwarding path fails, the single-arm BFD detection triggers candidate path switching or re-optimizes the path.

[0008] As can be seen from the description of the single-arm BFD detection process, the head node uses the SID list corresponding to the SRv6 TE Policy when encapsulating the BFD packet. The existing SID list is a list including packet forwarding path information, which is composed of the SID of each node on the forwarding path. Therefore, the detection of the connectivity of the forwarding path of the BFD echo packet obtained by encapsulating the BFD packet using the SID list cannot support some scenarios in which the path and the forwarding path need to be detected differently.

[0009] For example, in the strict path TE scenario, the SID list includes the SID of all nodes on the forwarding path. After the head node encapsulates the BFD packet using the SID list, the BFD echo packet can reach the tail node; and in the loose path TE scenario, when the SID list does not include the SID of the tail node, the BFD echo packet cannot reach the tail node, but only reaches the last node included in the SID list, that is, the connectivity of part of the links in the forwarding path is detected, but not the connectivity of the complete forwarding path. SUMMARY

[0010] Therefore, the present application provides a communication method and device to solve the problem that the existing single-arm BFD detection cannot support some scenarios in which the path and the forwarding path need to be detected differently.

[0011] In a first aspect, the present application provides a communication method, which is applied to a first network device, the first network device is configured with an SRv6 TE Policy, the SRv6 TE Policy includes a first SID list and a second SID list associated with the first SID list, and the method comprises:

[0012] According to the first SID list, a first BFD echo upstream packet is sent on a first forwarding path represented by the first SID list;

[0013] According to the second SID list, a second BFD echo upstream packet is sent on a second forwarding path represented by the second SID list;

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

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

[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 an IP address of a destination node included in the SRv6 TE Policy, the first forwarding path is used to implement forwarding of a service message, and the second forwarding path is used to implement BFD path detection.

[0017] In a second aspect, the present application provides a communication device, which is applied to a first network device, the first network device is configured with an SRv6 TE Policy, 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, a receiving unit, and a determining unit.

[0018] The sending unit is configured to send a first BFD echo upstream 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 upstream 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 back message sent by a second network device corresponding to a 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 back message sent by a third network device corresponding to a 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 an IP address of a destination node included in the SRv6 TE Policy, the first forwarding path is used to implement forwarding of a service message, and the second forwarding path is used to implement BFD path detection.

[0023] In a third aspect, the present application provides a network device, comprising a processor and a machine readable storage medium, the machine readable storage medium stores machine executable instructions capable of being 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 device provided in the present application, the first network device sends a first BFD echo go message on a first forwarding path represented by a first SID list according to the first SID list, and sends a second BFD echo go message on a second forwarding path represented by a second SID list according to the second SID list; when the first network device 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 first network device determines that the first forwarding path is in a normal state; when the first network device 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 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 an IP address of a destination node included in the SRv6 TE Policy, the first forwarding path is used to implement forwarding of a service message, and the second forwarding path is used to implement BFD path detection.

[0025] In this way, the present application realizes decoupling of the SID list used by the BFD detection in the SRv6-TE Policy and the SID list used by the data forwarding. The user can specify the SID list for data forwarding according to different networking scenarios, thereby improving the efficiency of data forwarding; at the same time, the user can also separately specify the corresponding BFD SID list for path detection, thereby detecting the connectivity of the actual network, providing millisecond-level fault detection speed for the SRv6-TE Policy, and realizing fast fault switching. The problem that the existing single-arm BFD detection cannot support the scenario where the path to be detected is different from the forwarding path is solved. BRIEF DESCRIPTION OF DRAWINGS

[0026] Figure 1 A flowchart of the communication method provided in the embodiments of the present application is shown;

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

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

[0029] Figure 4 A communication device structure diagram provided by an embodiment of the present application;

[0030] Figure 5 A network device hardware structure provided by an embodiment of the present application. DETAILED DESCRIPTION

[0031] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, the same numbers are used to indicate the same or similar components. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.

[0032] The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the present application and the appended claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0033] It should be understood that although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a particular order or hierarchy. These terms are used only to distinguish one from another. For example, a first information can be termed a second information, and similarly, a second information can be termed a first information, without departing from the scope of the present application. As used herein, the word "if" can be interpreted to mean "when" or "upon" or "in response to determining" depending on the context.

[0034] The communication method provided by an embodiment of the present application will be described in detail below. Referring to Figure 1 , Figure 1 A flowchart of the communication method provided by an embodiment of the present application. The method is applied to a first network device, which is a head node on a forwarding path. The communication method provided by an embodiment of the present application can include the following steps.

[0035] Step 110, according to the first SID list, sending a first BFD echo go message on a first forwarding path represented by the first SID list.

[0036] Specifically, the first network device configures an SRv6 TE Policy, which includes a first SID list and a second SID list associated with the first SID list. The second SID list can 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 and learn the connectivity of the SRv6-TE Policy in time. By detecting each SID list included in the SRv6 TE Policy through BFD, the detection of the SRv6-TE Policy can be achieved.

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

[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 forwarding devices on the first forwarding path.

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

[0041] Further, the user inputs a configuration instruction to the first network device, and the configuration instruction includes a configuration file used to configure the SRv6 TE Policy.

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

[0043] The SRv6 TE Policy is composed of three parts of identification, namely BSID, Color and End point. The BSID is the SID of the entry node; the 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; and the End point is the IPv6 address of the destination node included in the SRv6 TE Policy.

[0044] The SRv6 TE Policy is composed of multiple candidate paths with different priorities, each candidate path including one or more forwarding paths identified by a SID list. The SID list can also be configured with a weight, and after the SRv6 TE Policy selects a candidate path, load balancing can be performed among multiple SID lists of the candidate path according to the weight of the SID list.

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

[0046] SRv6 TE Policy to the 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, the Segment List is a first SID list, and the forwarding path (2001:A2::1, 2001:A3::1) indicated by the first SID list is a first forwarding path. The BFD Segment List is a second SID list, and the forwarding path (2001:A2::1, 2001:A3::1, 2001:A4::1) indicated by the second SID list is a second forwarding path.

[0056] The SID included in each SID list is a SID for identifying an interface, or a SID for identifying a link.

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

[0058] Step 120, according to the second SID list, sending a second BFD echo go message on a second forwarding path represented by the second SID list;

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

[0060] It can be understood that the above-mentioned BFD echo go messages are generated according to the existing SRv6 protocol and BFD protocol, which will not be described in detail here, and will be described in detail in subsequent embodiments. The above-mentioned sending of BFD echo go messages on the forwarding path is also sent according to the existing SRv6 protocol and BFD protocol, which will not be described in detail here, and will be described in detail in subsequent embodiments.

[0061] Optionally, in the embodiments of the present application, the first network device will also establish a BFD session after configuring the SRv6 TE Policy locally. The BFD echo messages to and from the BFD session are carried.

[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] Among them, the first BFD session is used to carry the first BFD echo go message and the first BFD echo back message, and the second BFD session is used to carry the second BFD echo go message and the second BFD echo back message.

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

[0065] Step 130, when receiving the first BFD echo back message sent by the second network device corresponding to the last SID included in the first preset time, determining that the first forwarding path is in a normal state;

[0066] Specifically, according to the description of steps 110 and 120, the first network device starts the corresponding timer after sending the BFD echo go message on different forwarding paths. Within the preset time set by the timer, it is judged whether the BFD echo back message is received.

[0067] When the first network device receives the first BFD echo backhaul packet 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 the normal state.

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

[0069] When the first network device receives the second BFD echo backhaul packet sent by the third network device corresponding to the last SID in the second SID list within the second preset time, the first network device determines that the second forwarding path is in the normal state.

[0070] Specifically, according to the description of steps 110 and 120, when the first network device receives the second BFD echo backhaul packet sent by the third network device within the second preset time, the first network device determines that the second forwarding path is in the normal state, that is, the second SID list is in the normal state.

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

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

[0073] Optionally, in the embodiment of the present application, the process in which the first network device forwards a service packet by using the first forwarding path is further included.

[0074] Further, when the first network device is a network-side device, the first network device receives a first service packet sent by a user side. According to a configured flow diversion policy (for example, a BSID-based flow diversion, a Color-based flow diversion, a tunnel policy-based flow diversion, a DSCP-based flow diversion, and the like), the first network device determines that the first service packet is forwarded by using the SRv6TE Policy.

[0075] In the 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 packets. The first network device acquires the first SID list. By the SID included in the first SID list, the first network device determines that the last SID (i.e., the SID of the second network device) included in the first SID list is different from the SID of the destination node (i.e., the third network device) included in the SRv6 TE Policy, and then the first network device acquires the VPN SID of the virtual private network (English: Virtual Private Network, referred to as: VPN) to which the SID of the destination node belongs.

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

[0077] On the first forwarding path, the first network device forwards the second service packet. After receiving the second service packet, the second network device can also forward the second service packet 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 TE Policy cannot reach the destination node included in the SRv6 TE Policy, the second service packet 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 packet 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.

[0079] Therefore, by applying the communication method provided in the present application, the first network device sends the first BFD echo go message on the first forwarding path represented by the first SID list according to the first SID list; the first network device sends the second BFD echo go message on the second forwarding path represented by the second SID list according to the second SID list; when the first BFD echo back message sent by the second network device corresponding to the last SID included in the first pre-set time is received, the first network device determines that the first forwarding path is in a normal state; when the second BFD echo back message sent by the third network device corresponding to the last SID included in the second pre-set time is received, 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 of service messages, and the second forwarding path is used to implement BFD path detection.

[0080] Thus, the present application realizes decoupling of the SID list used by the BFD detection in the SRv6-TE Policy and the SID list used for data forwarding. Users can specify the SID list for data forwarding according to different networking scenarios, thereby improving the efficiency of data forwarding; at the same time, the corresponding BFD SID list can also be specified for path detection, thereby detecting the connectivity of the actual network, providing millisecond-level fault detection speed for the SRv6-TE Policy, and realizing fast fault switching. The problem that the existing single-arm BFD detection cannot support some scenarios where the path to be detected and the forwarding path are different is solved.

[0081] The communication method provided in the embodiments of the present application will be described in detail below. Referring to Figure 2 , Figure 2 An SRv6 networking schematic diagram is provided in the embodiments of the present application. In Figure 2 , the SRv6 network includes network device A, network device B, network device C, and network device D.

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

[0083] The SIDs configured in each of the network devices above can be specifically SIDs of interfaces of the network devices (for example, SIDs of interfaces connected to next-hop network devices, SIDs of interfaces connected to previous-hop network devices), or SIDs used to identify a certain link (for example, SIDs of links between network devices).

[0084] An SRv6 TE Policy to D is created in the network device A, as follows.

[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 the network device A, and the destination node is the IPv6 address of the network device D. The candidate path includes two SID lists: SID list 1 and BFD SID list 2 associated with the SID list 1. The path 1 indicated by the SID list 1 is network device A-network device B-network device C, which can be used for forwarding service packets and also for BFD detection; the path 2 indicated by the BFD SID list 2 is network device A-network device B-network device C-network device D, which can be used for BFD detection but cannot be used for forwarding service packets.

[0095] After the single-arm BFD detection is configured in the network device A, a BFD session is created according to each SID list. The BFD session 1 is established between the network device A and the network device C; and the BFD session 2 is established between the network device A and the network device D.

[0096] The network device A wants to detect the SRv6-TE Policy in time to know the connectivity of the SRv6-TE Policy. The detection of the SRv6-TE Policy can be realized by performing BFD detection on each SID list included in the SRv6-TE Policy.

[0097] The network device A performs BFD detection on the SID list 1. The network device A generates a BFD echo go message 1, taking the Insert encapsulation mode as an example. The BFD echo go message 1 includes an IPv6 header, an SRH header, a UDP header and a BFD message.

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

[0099] The network device A sends the BFD echo go message 1 to the network device B and starts a timer. The network device A judges whether the BFD echo back message 1 is received within the preset time 1 set by the timer.

[0100] The network device B receives the BFD echo go message 1, 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 go message 1 to the network device C.

[0101] The network device C receives the BFD echo go message 1 and determines that the SL value will be changed to 0. According to the SID list 1, the IPv6 address of the network device A is obtained. According to the IPv6 address of the network device A, the network device C searches the routing table and obtains the matched routing table entry.

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

[0103] The IPv6 header includes a source address and a destination address, both of which are the IPv6 address of the network device A. According to the matched routing table entry, the network device C sends the BFD echo back message 1 to the network device B.

[0104] The network device B receives the BFD echo back message 1, searches the routing table according to the destination address and obtains the matched routing table entry. According to the matched routing table entry, the network device B sends the BFD echo back message 1 to the network device A.

[0105] If the network device A receives the BFD echo return message 1 within the preset time 1, it is determined that the path 1 is in a normal state, and at the same time, the state of the BFD session 1 can also be determined as UP. If the network device A does not receive the BFD echo return message 1 within the preset time 1, it is determined that the path 1 is in a fault state, and at the same time, the state of the BFD session 1 can also be determined as DOWN.

[0106] Referring to Figure 3 , Figure 3 Another SRv6 networking schematic diagram provided for an embodiment of the present application. In Figure 3 , the SRv6 TE Policy configured in the network device A, the connection relationship between the network devices, the IPv6 address configured in each network device, and the SID are the same as in Figure 2 , which will not be repeated here.

[0107] The network device A performs BFD detection on the SID list 2. The network device A generates a BFD echo forward message 2, taking the Insert encapsulation mode as an example. The BFD echo forward message 2 includes an IPv6 header, an SRH header, a UDP header, and a BFD message.

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

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

[0110] After the network device B receives the BFD echo forward message 2, it 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 forward message 2 to the network device C.

[0111] After the network device C receives the BFD echo forward message 2, it 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 forward message 2 to the network device D.

[0112] The network device D receives the BFD echo go message 1, determines that the SL value will be changed to 0, acquires the IPv6 address of the network device A according to the SID list 2, and finds the matching routing table item according to the IPv6 address of the network device A.

[0113] The network device D generates the BFD echo back 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 the network device A. According to the matching routing table item, the network device D sends the BFD echo back message 2 to the network device C.

[0115] The network device C receives the BFD echo back message 2, finds the matching routing table item according to the destination address, and sends the BFD echo back message 2 to the network device B according to the matching routing table item.

[0116] The network device B receives the BFD echo back message 2, finds the matching routing table item according to the destination address, and sends the BFD echo back message 2 to the network device A according to the matching routing table item.

[0117] If the network device A receives the BFD echo back message 2 within the preset time 2, it is determined that the path 2 is in a normal state, the state of the BFD session 2 is UP, and the SID list 2 is also in a normal state. If the network device A does not receive the BFD echo back message 2 within the preset time 2, it is determined that the path 2 is in a fault state, the state of the BFD session 2 is DOWN, and the SID list 2 is also in a fault state.

[0118] In the embodiments of the present application, when the path 1 and the path 2 are both in a normal state, the network device A determines that the SID list 1 is in a normal state, and when any of the path 1 and the path 2 is in a fault state, it is determined that the SID list 1 is in a normal state.

[0119] In the embodiments of the present application, the BFD detection is performed by associating the BFD SID list used for detection with the SID list indicating the forwarding path of the forwarding service message, the full-path detection is realized, and the path reliability and the fast fault switching are ensured.

[0120] In actual application, for scenarios such as SRv6 TE Policy carrying L3VPNv4 service, the SRv6-TE Policy is a public network tunnel, and the head node and the tail node of the public network tunnel are both PE devices. Each PE device is connected with a CE device on the user side. The tail node of the SID list is a PE device, and the BFD detection is also a detection on the public network tunnel between the PE devices. If the BFD SID list in the SRv6 TE Policy adds the SID information of the CE device connected with the tail node, the BFD detection can also detect the CE device. In this way, the fault between the tail node PE device and the CE device connected therewith can be quickly perceived, and the path fast switching of the head node PE device is realized.

[0121] It should be noted that, in actual application, the network device A can also generate the BFD echo go message 1 in an Encaps encapsulation mode, and the specific generation mode can be generated according to the existing SRv6 protocol, which 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 the Encaps encapsulation mode are the same as the source IPv6, destination IPv6 address and SRH header included in the IPv6 header generated in the Insert encapsulation mode.

[0122] Based on the same inventive concept, the communication method corresponding to the communication device is also provided in the embodiments of the present application. Referring to Figure 4 , Figure 4 The communication device provided in the embodiments of the present application is applied to a first network device, the first network device is configured with an SRv6 TE Policy, 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 go 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 go 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 back message sent by a second network device corresponding to a 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 back message sent by a third network device corresponding to a last SID 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 messages, 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, the configuration instruction including a configuration file used to configure the SRv6 TE Policy.

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

[0130] Optionally, the apparatus further includes:

[0131] The establishing unit (not shown in the figure) is 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 configured 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 forward message and the first BFD echo back message, and the second BFD session is used to carry the second BFD echo forward message and the second BFD echo back 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 the normal state.

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

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

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

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

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

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

[0141] Therefore, by applying the communication apparatus provided in the present application, the first network device sends a first BFD echo path message on a first forwarding path represented by a first SID list according to the first SID list, and sends a second BFD echo path message on a second forwarding path represented by a second SID list according to the second SID list; when a first BFD echo back message sent by a second network device corresponding to a last SID included in the first SID list is received within a first preset time, the first network device determines that the first forwarding path is in a normal state; when a second BFD echo back message sent by a third network device corresponding to a last SID included in the second SID list is received 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, and the third network device is a destination node included in the SRv6 TE Policy, the first forwarding path is used to implement forwarding of service packets, and the second forwarding path is used to implement BFD path detection.

[0142] In this way, the present application realizes decoupling of the SID list used by the BFD detection in the SRv6-TE Policy and the SID list used by the data forwarding. The user can specify the SID list for data forwarding according to different networking use scenarios, thereby improving the efficiency of data forwarding; at the same time, the user can also separately specify the corresponding BFD SID list for path detection, thereby detecting the connectivity of the actual network, providing millisecond-level fault detection speed for the SRv6-TE Policy, and realizing fast fault switching. The problem that the existing single-arm BFD detection cannot support some scenarios in which the path to be detected is different from the forwarding path is solved.

[0143] Based on the same inventive concept, embodiments of this application also provide a network device, such as... Figure 5 As shown, the system 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. The processor 510 is prompted by the machine-executable instructions to execute the communication method provided in the embodiments of this application. (The foregoing...) Figure 4 The communication device shown can be used as follows: Figure 5 The hardware structure of the network device shown is implemented.

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

[0145] The processor 510 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can 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 this embodiment, the processor 510 reads the machine-executable instructions stored in the machine-readable storage medium 530, and is prompted by the machine-executable instructions to enable the processor 510 itself and the transceiver 520 to execute the communication method described in the foregoing embodiment.

[0147] In addition, this application provides a machine-readable storage medium 530 that stores machine-executable instructions. When called and executed by the processor 510, the machine-executable instructions cause the processor 510 itself and the transceiver 520 to execute the communication method described in the aforementioned application.

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

[0149] For the device embodiment, since it basically corresponds to the method embodiment, the relevant part can be seen in the part of the method embodiment. The device embodiment described above is only illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present application according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0150] For the communication device and machine readable storage medium embodiment, since the method content involved is basically similar to the foregoing method embodiment, the description is relatively simple, and the relevant part can be seen in the part of the method embodiment.

[0151] The above description is only the preferred embodiment of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.

Claims

1. A communication method characterized by comprising: The method is applied to a first network device, a 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 method comprises the following steps of: sending a first BFD echo go message on a first forwarding path represented by the first SID list according to the first SID list; sending a second BFD echo go message on a second forwarding path represented by the second SID list according to the second SID list; when a first BFD echo back message sent by a second network device corresponding to a 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 back message sent by a third network device corresponding to a 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; 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 an IP address of a destination node included in the SRv6 TE Policy, the first forwarding path is used to implement forwarding of a service message, and the second forwarding path is used to implement BFD path detection.

2. The method of claim 1, wherein, Before the step of sending a first BFD echo go message on a first forwarding path represented by the first SID list according to the first SID list, the method further comprises the following steps of: receiving a configuration instruction input by a user, the configuration instruction including a configuration file used to configure the SRv6 TE Policy; locally configuring the SRv6 TE Policy, the SRv6 TE Policy including the destination node and a candidate path, and the candidate path including the first SID list and the second SID list.

3. The method of claim 2, wherein, After the step of locally configuring the SRv6 TE Policy, the method further comprises the following steps of: establishing a first BFD session with a second SRv6 node according to the first SID list; establishing a second BFD session with a third SRv6 node according to the second SID list; wherein the first BFD session is used to carry the first BFD echo go message and the first BFD echo back message, and the second BFD session is used to carry the second BFD echo go message and the second BFD echo back message.

4. The method of claim 2, wherein, The method further comprises the following steps of: if the first forwarding path and the second forwarding path are both in a normal state, determining that the first SID list is in a normal state; if any of the first forwarding path and the second forwarding path is in a fault state, determining that the first SID list is in a fault state.

5. The method of claim 1, wherein, The method further comprises the following steps of: receiving a first service message; If it is determined that the first service packet is forwarded through the first forwarding path, a VPN SID of a VPN to which the SID of the destination node belongs is acquired; The VPN SID is added at a first position in the first SID list; A second service packet is generated according to the first SID list after the VPN SID is added, the second service packet including an SRH header, and the SRH header including the first SID list after the VPN SID is added; The second service packet is forwarded on the first forwarding path.

6. A communication device, characterized by The device is applied to a first network device, and the first network device is configured with an SRv6 TE Policy, the SRv6 TE Policy including 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; The sending unit is configured to send a first BFD echo go packet 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 go packet 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 back packet sent by a second network device corresponding to a 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 back packet sent by a third network device corresponding to a 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 an IP address of 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.

7. The apparatus of claim 6, wherein, The receiving unit is further configured to receive a configuration instruction input by a user, the configuration instruction including a configuration file used to configure the SRv6 TE Policy. The device further includes a configuration unit configured to locally configure the SRv6 TE Policy, the SRv6 TE Policy including the destination node and a candidate path, and the candidate path including the first SID list and the second SID list.

8. The apparatus of claim 7, wherein, The device further includes: A establishing unit configured to establish a first BFD session with a second SRv6 node according to the first SID list. The establishing unit is further configured to establish a second BFD session with a third SRv6 node according to the second SID list. The first BFD session is used to carry the first BFD echo forward message and the first BFD echo back message, and the second BFD session is used to carry the second BFD echo forward message and the second BFD echo back message.

9. The apparatus of claim 7, wherein, The determining unit is further configured to determine that the first SID list is in a normal state if the first forwarding path and the second forwarding path are both in the normal state. The determining unit 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 the fault state.

10. The apparatus of claim 6, wherein, The receiving unit is further configured to receive a first service message. The apparatus further includes an obtaining unit configured to, if it is determined that the first service message is forwarded through the first forwarding path, obtain a VPN SID of a VPN to which a SID of the destination node belongs. An adding unit is configured to add the VPN SID at a first position in the first SID list. A generating unit is configured to generate a second service message according to the first SID list after the VPN SID is added, the second service message including an SRH header, and the SRH header including the first SID list after the VPN SID is added. The sending unit is further configured to forward the second service message on the first forwarding path.

Citation Information

Patent Citations

  • Path detection method and device

    CN113595897A

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

    EP4380128A1