NODE PROTECTION METHOD, DEVICE, ELECTRONIC DEVICE, AND MEDIUM

The node protection method in SRv6 networks uses a preset flag bit in the SRH extension header to switch to a backup path when the primary tail node fails, ensuring continuous service delivery and improving network reliability for interactive multimedia applications.

JP2024545521AInactive Publication Date: 2024-12-09NEW H3C TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024536035
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2022-11-08
Publication Date
2024-12-09
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Interactive multimedia service applications are sensitive to network packet loss and experience service interruption when a link or node fails, requiring hundreds of milliseconds to resume transmission, which is not acceptable for their service requirements.

Method used

A node protection method is implemented in SRv6 networks by adding a preset flag bit to the SRH extension header to indicate a backup SID, allowing seamless switching to a backup tail node when the primary tail node becomes unreachable, ensuring continuous service delivery.

Benefits of technology

The method ensures uninterrupted service traffic by quickly switching to a backup path, enhancing network reliability and meeting the stringent requirements of interactive multimedia applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024545521000001_ABST
    Figure 2024545521000001_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a node protection method, device, electronic device, and medium applied to a first node, comprising: acquiring a first service packet, a first SRH extension header of the first service packet including a first SID list and a preset flag bit, the first SID list including a primary SID of a primary tail node and a backup SID of a backup tail node in a primary path for forwarding the first service packet, the preset flag bit being set to a first value indicating that the first SRH extension header carries a backup SID; and forwarding the first service packet. After the primary tail node becomes unreachable, traffic of a user connected to the CE device is not interrupted until routing converges again, thereby ensuring the reliability of the tail node and improving the reliability of the network.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present application relates to the field of communications technology, and in particular to a node protection method, device, electronic device, and medium. [Background technology]

[0002] Interactive multimedia service applications such as Voice over Internet Protocol (VoIP) applications are very sensitive to network packet loss and generally can only tolerate network packet loss of tens of milliseconds. When a link or node in the network fails, the time required to resume service transmission is usually hundreds of milliseconds, or even seconds, which cannot meet the service requirements. Summary of the Invention

[0003] The present invention provides a method, device, electronic device, and medium for protecting a node, for improving the reliability of an SRv6 end node and for improving the reliability of a network. Specific technical solutions are as follows:

[0004] In a first aspect, the present application provides a node protection method applied to a first node. The node protection method includes: obtaining a first service packet, a first SRH extension header of the first service packet including a first SID list and a preset flag bit, the first SID list including a primary SID of a primary tail node and a backup SID of a backup tail node in a primary path for forwarding the first service packet, the preset flag bit being set to a first value indicating that the first SRH extension header carries the backup SID; forwarding the first service packet; Includes.

[0005] In some embodiments, when the first node is a source node in the primary path, obtaining the first service packet includes: receiving an original packet transmitted from a customer edge device; When the primary tail node has a backup tail node, encapsulating the original packet as the first service packet; Includes.

[0006] In some embodiments, when the first node is an endpoint node or a relay node other than the primary tail node in the primary path, obtaining the first service packet includes: receiving a second service packet transmitted from a second node, the second service packet including a first IPv6 base header and a second SRH extension header, the second SRH extension header including a second SID list and the preset flag bit, the preset flag bit being set to a first value indicating that the second SRH extension header carries the backup SID; updating a destination address in the first IPv6 basic header based on the node state of the primary tail node, the node state of the backup tail node, and the second SID list, to obtain the first service packet; Includes.

[0007] In some embodiments, the step of updating a destination address in the first IPv6 basic header based on the node state of the primary tail node, the node state of the backup tail node, and the second SID list to obtain the first service packet includes: If the primary tail node is unreachable and the backup tail node is reachable, updating a destination address in the first IPv6 base header to the backup SID and acquiring the first service packet; If the primary tail node is reachable, and if the first node is an endpoint node, updating a destination address in the first IPv6 base header to a SID of a next hop endpoint node based on the second SID list to obtain the first service packet; Includes.

[0008] In some embodiments, the step of updating a destination address in the first IPv6 basic header based on the node state of the primary tail node, the node state of the backup tail node, and the second SID list to obtain the first service packet includes: If the first node is directly connected to the primary tail node, the primary tail node is unreachable, and the backup tail node is reachable, updating a destination address in the first IPv6 basic header to the backup SID and obtaining the first service packet; When the first node is indirectly connected to the primary end node, or when the first node is directly connected to the primary end node and the primary end node is reachable, if the first node is an end point node, update a destination address in the first IPv6 base header to a SID of a next hop end point node according to the second SID list, and obtain the first service packet; Includes.

[0009] In some embodiments, when the first node is the primary tail node or the backup tail node, forwarding the first service packet includes: Decapsulating the outer layer encapsulation of the first service packet to obtain an original packet; forwarding the original packet; Includes.

[0010] In some embodiments, the preset flag bit is set to a first value, a SID encapsulated in the penultimate element of the first SID list is the primary SID, a SID encapsulated in the last element is the backup SID, and The preset flag bit is set to a second value, and the SID encapsulated in the last element in the first SID list is the primary SID.

[0011] In some embodiments, the first value is one or zero.

[0012] In some embodiments, the first SRH extension header further includes a flag field, and one flag bit in the flag field is the preset flag bit.

[0013] In a second aspect, the present application provides a node protection device adapted to a first node, the node protection device comprising: an acquisition module for acquiring a first service packet, wherein a first SRH extension header of the first service packet includes a first SID list and a preset flag bit, the first SID list includes a primary SID of a primary tail node and a backup SID of a backup tail node in a primary path for forwarding the first service packet, and the preset flag bit is set to a first value indicating that the first SRH extension header carries the backup SID; a forwarding module for forwarding the first service packet; Includes.

[0014] In some embodiments, when the first node is a source node in the primary path, the acquisition module specifically: receiving an original packet transmitted from a customer edge device; When the primary tail node has a backup tail node, encapsulating the original packet as the first service packet; It is used in.

[0015] In some embodiments, when the first node is an endpoint node or a relay node other than the primary tail node in the primary path, the acquisition module specifically: receiving a second service packet transmitted from a second node, the second service packet including a first IPv6 base header and a second SRH extension header, the second SRH extension header including a second SID list and the preset flag bit, the preset flag bit being set to a first value indicating that the second SRH extension header carries the backup SID; Updating a destination address in the first IPv6 base header based on the node state of the primary tail node, the node state of the backup tail node, and the second SID list to obtain the first service packet; It is used in.

[0016] In some embodiments, the acquisition module specifically comprises: If the primary tail node is unreachable and the backup tail node is reachable, update a destination address in the first IPv6 base header to the backup SID and obtain the first service packet; If the primary tail node is reachable, and if the first node is an endpoint node, update a destination address in the first IPv6 base header to a SID of a next hop endpoint node based on the second SID list, and obtain the first service packet; It is used in.

[0017] In some embodiments, the acquisition module specifically comprises: If the first node is directly connected to the primary tail node, the primary tail node is unreachable, and the backup tail node is reachable, updating a destination address in the first IPv6 base header to the backup SID and obtaining the first service packet; When the first node is indirectly connected to the primary end node, or when the first node is directly connected to the primary end node and can reach the primary end node, if the first node is an end point node, update a destination address in the first IPv6 base header to a SID of a next hop end point node based on the second SID list to obtain the first service packet; It is used in.

[0018] In some embodiments, when the first node is the primary tail node or the backup tail node, the forwarding module specifically: Decapsulating the outer layer of the first service packet to obtain an original packet; forwarding the original packet; It is used in.

[0019] In some embodiments, the preset flag bit is set to a first value, a SID encapsulated in the penultimate element of the first SID list is the primary SID, a SID encapsulated in the last element is the backup SID, and The preset flag bit is set to a second value, and the SID encapsulated in the last element in the first SID list is the primary SID.

[0020] In some embodiments, the first value is one or zero.

[0021] In some embodiments, the first SRH extension header further includes a flag field, and one flag bit in the flag field is the preset flag bit.

[0022] In a third aspect, the present application provides an electronic device, the electronic device comprising: A processor; A transceiver; a machine-readable storage medium storing machine-executable instructions executable by said processor; The machine-executable instructions may be configured to cause the processor to: obtaining a first service packet, a first SRH extension header of the first service packet including a first SID list and a preset flag bit, the first SID list including a primary SID of a primary tail node and a backup SID of a backup tail node in a primary path for forwarding the first service packet, the preset flag bit being set to a first value indicating that the first SRH extension header carries the backup SID; forwarding the first service packet; Execute the command.

[0023] In some embodiments, when the electronic device is a source node in the primary path, the machine-executable instructions specifically include causing the processor to: receiving an original packet transmitted from a customer edge device; When the primary tail node has a backup tail node, encapsulating the original packet as the first service packet; Execute the command.

[0024] In some embodiments, when the electronic device is an endpoint node or a relay node other than the primary tail node in the primary path, the machine-executable instructions specifically include causing the processor to: receiving a second service packet transmitted from a second node, the second service packet including a first IPv6 base header and a second SRH extension header, the second SRH extension header including a second SID list and the preset flag bit, the preset flag bit being set to a first value indicating that the second SRH extension header carries the backup SID; updating a destination address in the first IPv6 basic header based on the node state of the primary tail node, the node state of the backup tail node, and the second SID list, to obtain the first service packet; Execute the command.

[0025] In some embodiments, the machine-executable instructions specifically instruct the processor to: If the primary tail node is unreachable and the backup tail node is reachable, updating a destination address in the first IPv6 base header to the backup SID and acquiring the first service packet; If the primary tail node is reachable, and if the electronic device is an endpoint node, updating a destination address in the first IPv6 base header to a SID of a next hop endpoint node based on the second SID list, and acquiring the first service packet; Execute the command.

[0026] In some embodiments, the machine-executable instructions specifically instruct the processor to: When the electronic device is directly connected to the primary tail node, the primary tail node is unreachable, and the backup tail node is reachable, updating a destination address in the first IPv6 basic header to the backup SID and acquiring the first service packet; When the electronic device is indirectly connected to the primary end node, or when the electronic device is directly connected to the primary end node and can reach the primary end node, if the electronic device is an end point node, updating a destination address in the first IPv6 basic header to a SID of a next hop end point node based on the second SID list to obtain the first service packet; Execute the command.

[0027] In some embodiments, when the electronic device is the primary tail node or the backup tail node, the machine executable instructions specifically include instructions to the processor: Decapsulating the outer layer encapsulation of the first service packet to obtain an original packet; forwarding the original packet; Execute the command.

[0028] In some embodiments, the preset flag bit is set to a first value, a SID encapsulated in the penultimate element of the first SID list is the primary SID, a SID encapsulated in the last element is the backup SID, and The preset flag bit is set to a second value, and the SID encapsulated in the last element in the first SID list is the primary SID.

[0029] In some embodiments, the first value is one or zero.

[0030] In some embodiments, the SRH extension header further includes a flag field, and one flag bit in the flag field is the preset flag bit.

[0031] In a fourth aspect, the present application provides a machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to implement steps of any of the node protection methods described above.

[0032] In the technical solution according to the embodiment of the present application, a preset flag bit is added to the SRH extension header, the preset flag bit indicates that the SRH extension header carries a backup SID, and the SID of the backup tail node is added to the SID list included in the SRH extension header. According to the preset flag bit and the SID of the backup tail node included in the SID list, if the primary tail node is unreachable and the backup tail node is reachable, the first node can send the first service packet to the backup tail node, and the backup tail node can send the first service packet to the destination device corresponding to the original packet. As can be seen, in the technical solution according to the embodiment of the present application, when a CE is multi-homed to multiple tail nodes, after the primary tail node becomes unreachable, the traffic of the user connected to the CE device is not interrupted until the routing converges again, so that the reliability of the tail node is ensured and the reliability of the network is improved. [Brief description of the drawings]

[0033] In order to more clearly explain the technical solutions of the embodiments of the present application and the prior art, the drawings used in the embodiments and the prior art will be briefly described below. Obviously, the drawings described below are merely according to some of the embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative labor. [Figure 1] Figure 1 is a schematic diagram of the SRv6 SID format. [Diagram 2] Figure 2 is a schematic diagram of the SRv6 packet format. [Diagram 3] FIG. 3 is an exemplary schematic diagram of an SRv6 packet forwarding process. [Figure 4] FIG. 4 is a schematic diagram of multihoming networking. [Diagram 5] FIG. 5 is a first schematic flowchart of a node protection method according to an embodiment of the present application. [Figure 6a] FIG. 6a is a first schematic diagram of an SRH format according to an embodiment of the present application. [Figure 6b] FIG. 6b is a second schematic diagram of an SRH format according to an embodiment of the present application. [Figure 7] FIG. 7 is a schematic diagram of preset flag bits in a flag field according to an embodiment of the present application. [Figure 8] FIG. 8 is a second schematic flowchart of a node protection method according to an embodiment of the present application. [Figure 9] FIG. 9 is a third schematic flowchart of a node protection method according to an embodiment of the present application. [Figure 10] FIG. 10 is a fourth schematic flowchart of a node protection method according to an embodiment of the present application. [Figure 11] FIG. 11 is a fifth schematic flowchart of a node protection method according to an embodiment of the present application. [Figure 12] FIG. 12 is an exemplary schematic diagram of an SRv6 packet forwarding process based on the multihoming networking shown in FIG. [Figure 13] FIG. 13 is a schematic structural diagram of a node protection device according to an embodiment of the present application. [Figure 14] FIG. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0034] In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be described in more detail below by way of examples with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments of the present application, all other embodiments that a person skilled in the art can obtain without creative labor fall within the scope of protection of the present application.

[0035] For ease of understanding, the relevant concepts of the embodiments of the present application will be explained below.

[0036] 1. Overview of SRv6. Segment Routing (SR) utilizes the path selection mechanism at the source node to pre-encapsulate the segment identifiers (SIDs) of the segments along the forwarding path at the source node. When a packet passes through an SR node, the SR node forwards the packet based on the packet's SID. No other nodes besides the source node need to maintain the state of the path.

[0037] Segment Routing IPv6 (SRv6) refers to realizing SR based on the IPv6 forwarding plane. SRv6 explicitly specifies the forwarding path of an IPv6 packet by inserting one routing extension header, i.e., Segment Routing Header (SRH), into the IPv6 packet and adding the SIDs of all segments to be passed through in the forwarding path, i.e., the SID list, to the SRH. SRv6 provides flexible and efficient control means for Software Defined Wide Area Networks (SD-WANs), and is characterized by easy deployment and scalability. It can better realize traffic scheduling and path optimization, ensure the quality of key services, balance traffic distribution, improve the utilization rate of leased lines, and reduce line costs.

[0038] Nodes in an SRv6 network are classified into several roles according to their different functions:

[0039] When it is a source node, it is responsible for inserting the SRH into the IPv6 base header of the IPv6 packet, or for encapsulating the IPv6 base header into the outer layer of the packet. The source node is used to direct the packet flow to the SRv6 path defined by the Segment List in the SRH.

[0040] If it is a relay node, it is located in the SRv6 path of the packet, does not participate in SRv6 processing, and only performs general IPv6 packet forwarding. A relay node may or may not support SRv6.

[0041] If it is an endpoint node, when the IPv6 destination address of the received SRv6 packet is an SRv6 SID assigned to the endpoint node, it executes processing according to the command of the SRv6 SID and updates the SRH.

[0042] If it is an end node, it is the last endpoint node in the SRv6 forwarding path.

[0043] The same node may play different roles in different SRv6 paths, for example, a node may be a source node in one SRv6 path and a relay node or an endpoint node in another SRv6 path.

[0044] In SRv6, SID defines a network function and indicates a network command. The format of SRv6 SID is the IPv6 address format, and as shown in Figure 1, SRv6 SID consists of four parts: Locator field, Function field, Arguments field, and MBZ (Must be zero) field.

[0045] Here, the Locator is used to identify the network segment to which the SID belongs, and is unique in the SR domain.

[0046] Function is to identify the local operation command bound to the SID. After a designated node in the SR domain receives the traffic, it will perform the associated operation according to the Function field of the SRv6 SID.

[0047] The Arguments are used to define information such as the packet flow and the service.

[0048] MBZ (Must be zero) fills other bits with 0 if the total number of bits in Locator, Function, and Arguments is less than 128 bits.

[0049] 2. SRv6 packet format. The encapsulation format of the SRv6 packet is that it carries a new IPv6 base header and an SRH in the case of the original layer 3 data packet. The SRH is a routing extension header with a routing type value of 4. The format of the SRv6 packet is shown in Figure 2. The SRv6 packet contains the IPv6 base header, the SRH, and the original packet.

[0050] Here, the IPv6 basic header includes a version number (Version, Ver), a traffic class, a flow label, a payload length, a next header, a hop limit, a source address (SA), and a destination address (DA). Here, the value of the next header is 43, which indicates that the next header is a routing extension header.

[0051] SRH includes the following: The Next Header is 8 bits in length and is used to identify the type of the next packet header. The SRH length (Hdr Ext Len) is 8 bits long and indicates the length of the SRH header in 8-byte units, not including the first 8 bytes. The Routing Type has a length of 8 bits and a value of 4, which indicates that the SRH is carried. The segment index (Segments Left, SL) is 8 bits long and represents the number of the next SID to search. Its initial value is n-1, where n represents the number of SIDs encapsulated in the SRH. Each time an endpoint node is passed through, the value of SL is decremented by 1. The last hop (Last Entry) is 8 bits long and its value is the number of the first SID in the actual forwarding path of the packet in the SRH. The flag bits (Flags) are 8 bits in length and are flag bit information. A tag is 16 bits in length and is used to mark a group of packets that have the same characteristics. A Segment List is a list of SIDs arranged in order of distance from the node in the packet forwarding path, i.e., Segment List [0] represents the last SID in the forwarding path, Segment List [1] represents the penultimate SID in the forwarding path, and so on. Optional Type Length Value objects(variable) are optional type length value object variables.

[0052] 3. SRv6 packet forwarding process. As shown in FIG. 3, device A in FIG. 3 is a source node, devices C and E are endpoint nodes, and devices B and D are relay nodes.

[0053] In step 1, after receiving the original packet as a source node, device A encapsulates the SRH and IPv6 base header for the original packet, and then forwards the encapsulated packet to device B by searching the routing table based on the destination address in the encapsulated IPv6 base header.

[0054] Since the path from device A to device D must pass through two endpoint nodes, device C and device E, SL=1 in the segment index field in the SRH, and the SID list in the SRH includes Segment List[0]=E and Segment List[1]=C.

[0055] In the IPv6 basic header, the source address is the address of device A, and the destination address is the address indicated by SL, that is, the address in the Segment List [1] indicated by SL=1, that is, the address of device C.

[0056] In step 2, after device B receives the packet, it searches its routing table based on the destination address in the IPv6 basic header and forwards the packet to device C.

[0057] In step 3, device C checks the SL in the SRH, and if SL>0, it decrements the value of SL by 1 and updates the destination address in the IPv6 basic header to the address indicated by SL, i.e., Segment List [0] corresponding to SL=0, that is, to the address of device E. Device C then forwards the packet to device D.

[0058] In step 4, after receiving the packet, device D searches its routing table based on the destination address in the IPv6 basic header and forwards the packet to device E.

[0059] In step 5, after receiving the packet as the tail node, device E checks the SL value in the SRH header. If it finds that SL=0, it decapsulates the packet, removes the encapsulated IPv6 basic header and SRH, obtains the original packet, and forwards the packet based on the destination address in the original packet.

[0060] In a multihoming scenario, a CE is multihomed to multiple tail nodes. After the source node learns the multihoming routing of the CE through a routing protocol, it determines the optimal path and the suboptimal path through a routing optimization policy. The egress device in the optimal path is the primary tail node, and the SID of the primary tail node is the primary SID, while the egress device in the suboptimal path is the backup tail node, and the SID of the backup tail node is the backup SID. Here, the optimal path is the primary path, and the suboptimal path is the backup path.

[0061] Multihoming networking is shown in Figure 4. In Figure 4, Customer Edge (CE) devices include CE1-CE2, Provider Edge (PE) devices include PE1-PE4, and Non-Provider Edge (P) devices include P1-P4. In Figure 4, in the direction from CE1 to CE2, PE1 is the source node. PE1 determines the optimal path PE1→P1→P2→PE3 and the suboptimal path PE1→P1→P2→P4→PE4 according to a routing protocol and a routing optimization policy. CE2 is multihomed to tail nodes PE3 and PE4. PE3 is the primary tail node, and the SID of PE3 is the primary SID, and PE4 is the backup tail node, and the SID of PE4 is the backup SID.

[0062] Interactive multimedia service applications are very sensitive to network packet loss, and generally can only tolerate network packet loss of tens of milliseconds. When a link or node in a network fails, the time required to resume service transmission is usually hundreds of milliseconds, or even seconds, which cannot meet the service requirements. In order to minimize traffic loss, the embodiment of the present application provides a node protection method to enhance the reliability of SRv6 multihoming tail nodes and improve network reliability.

[0063] As shown in Fig. 5, Fig. 5 is a first schematic flow chart of a node protection method according to an embodiment of the present application, which is applied to any node in an SRv6 network, such as any device in PE1-PE4 and P1-P4 in Fig. 4. In the following, for ease of distinction and understanding, the first node is taken as an example, but is not limited thereto. The above node protection method includes the following steps:

[0064] In step S51, a first service packet is obtained, a first SRH extension header of the first service packet includes a first SID list and a preset flag bit, the first SID list includes a primary SID of a primary tail node and a backup SID of a backup tail node in a primary path for forwarding the first service packet, and the preset flag bit is set to a first value indicating that the first SRH extension header carries a backup SID.

[0065] In step S52, the first service packet is transferred.

[0066] In the technical solution according to the embodiment of the present application, a preset flag bit is added to the SRH extension header, and the preset flag bit indicates that the SRH extension header carries a backup SID, and the SID of the backup tail node is added to the SID list included in the SRH extension header. If the primary tail node cannot be reached but the backup tail node can be reached based on the preset flag bit and the SID of the backup tail node included in the SID list, the first node sends the first service packet to the backup tail node, and the backup tail node sends the first service packet to the destination device corresponding to the original packet. As can be seen, in the technical solution according to the embodiment of the present application, when a CE is multi-homed to multiple tail nodes, after the primary tail node becomes unreachable, the traffic of the user connected to the CE device is not interrupted until the routing converges again, so that the reliability of the tail node is ensured and the reliability of the network is improved.

[0067] In the above step S51, the first service packet may be any SRv6 packet transmitted in the network. The first service packet includes an IPv6 basic header and an SRH extension header, and the SRH extension header includes an SID list and a preset flag bit. Hereinafter, for ease of distinction and understanding, the SRH extension header included in the first service packet is referred to as the first SRH extension header, and the SID list included in the first SRH extension header is referred to as the first SID list. In the embodiment of the present application, the preset flag bit included in the first SRH extension header is set to a first value indicating that the SRH extension header carries a backup SID, and the backup SID is an SID of a backup tail node. The first value may be 1 or 0. The primary SID is an SID of a primary tail node.

[0068] The first service packet may be a service packet received by the first node, or may be a service packet obtained after the first node performs a destination address update or SRv6 encapsulation process on the received service packet, but is not limited to these.

[0069] After obtaining the first service packet, the first node executes step S52 and forwards the first service packet.

[0070] In some embodiments, a preset flag bit may be used to indicate that the SRH extension header carries a backup SID, and a preset flag bit may indicate that the SRH extension header does not carry a backup SID.

[0071] When the preset flag bit is set to a first value, the SID encapsulated in the penultimate element of the SID list is the primary SID, and the SID encapsulated in the last element is the backup SID. Figure 6a shows the SRH extension header. In this SRH extension header, Segment List[0] is the backup SID, i.e., the SID encapsulated in the last element is the SID of the backup tail node, and Segment List[1]-Segment List[n] are the nodes arranged in order of furthest in the primary path. That is, Segment List[1] is the primary SID, i.e., the SID encapsulated in the penultimate element is the SID of the primary tail node. In this case, the initial value of SL in the SRH extension header is n, and the value of Last Entry is n.

[0072] When the preset flag bit is set to a second value, the SID encapsulated in the last element included in the SID list is the primary SID. Figure 6b shows the SRH extension header. In this SRH extension header, Segment List[0]-Segment List[n-1] are nodes arranged in order of furthest in the primary path. That is, Segment List[0] is the primary SID, that is, the SID encapsulated in the last element is the SID of the primary last node. In this case, the initial value of SL in the SRH extension header is n-1, and the value of Last Entry is n-1. When the preset flag bit is set to a second value, the SID list does not include a backup SID.

[0073] In the embodiment of the present application, since the SID of the backup tail node is encapsulated in the last element, there is no need to extend the control plane routing protocol. By making only a few changes to the SRv6 forwarding plane processing, such as setting it to pop up at the penultimate hop, a quick path switching can be realized when a tail node fails, and network reliability can be improved.

[0074] In some embodiments, to simplify the operation of node protection, the first node may determine whether the preset flag bit indicates that the SRH extension header carries a backup SID or that the SRH extension header does not carry a backup SID depending on whether the preset flag bit is set.

[0075] For example, if the preset flag bit is set, it indicates that the SRH extension header carries a backup SID, as shown in Figure 6a, where B-flag represents the preset flag bit and B-flag=1 indicates that the SRH extension header carries a backup SID, whereas if the preset flag bit is not set, it indicates that the SRH extension header does not carry a backup SID, as shown in Figure 6b, where B-flag represents the preset flag bit and B-flag=0.

[0076] In the embodiment of the present application, the preset flag bit only occupies one bit, which can realize the indication of whether the SRH extension header carries a backup SID, thereby reducing the consumption of network resources.

[0077] In order to further reduce the consumption of network resources, the preset flag bit may occupy one flag bit in the Flags field included in the SRH extension header. That is, one flag bit in the Flags field is a preset flag bit. As shown in FIG. 7, B in FIG. 7 represents a preset flag bit, and the preset flag bit in FIG. 7 occupies bit[4] in the 8 bits included in the Flags field, but is not limited thereto. That is, the preset flag bit may occupy any of the unoccupied flag bits in bit[0]-bit[7] included in the Flags field. In the embodiment of the present application, the consumption of network resources is further reduced by occupying one reserved bit in the Flags field without adding a preset flag bit to the service packet.

[0078] In the present embodiment, the first node may be a source node, an endpoint node or a relay node in the primary path.

[0079] When the first node is a source node in the primary path, as shown in FIG. 8, an embodiment of the present application further provides a node protection method, which may include the following steps:

[0080] In step S81, the original packet transmitted from the CE device is received.

[0081] In step S82, if the primary tail node has a backup tail node, it encapsulates the original packet as a first service packet, and a first SRH extension header of the first service packet includes a first SID list and a preset flag bit, the first SID list includes a primary SID of the primary tail node and a backup SID of the backup tail node in the primary path for forwarding the first service packet, and the preset flag bit is set to a first value indicating that the first SRH extension header carries the backup SID.

[0082] In step S83, the first service packet is transferred.

[0083] In the technical solution of the embodiment of the present application, when the source node detects that the primary tail node has a backup tail node, it encapsulates the original packet as a first service packet, so that the SID list included in the first service packet has the primary SID and the backup SID, and the preset flag bit is set to a first value indicating that the SRH extension header carries the backup SID, thereby ensuring accurate processing of the first service packet thereafter.

[0084] In the above step S81, the original packet may be any packet transmitted in a network, including, but not limited to, an SRv6 packet, an IPv4 packet, or an IPv6 packet.

[0085] After receiving the original packet sent from the CE device, the source node may extract packet features of the original packet. The packet features include, but are not limited to, information such as 5-tuple, input interface, and service type. The source node matches the extracted packet features with the pre-stored features of the packet to be forwarded on the SR path. If there is a match, it can be determined that the original packet is a service packet that needs to be forwarded on the SR path, that is, the original packet is a service packet that needs to be forwarded on the primary path.

[0086] If it is determined that the original packet needs to be forwarded via the primary path, the source node executes step S82.

[0087] In the above step S82, the source node determines whether the primary SID of the primary tail node has a backup SID according to the learned routing information. That is, it determines whether the primary tail node has a backup tail node. If the primary SID has a backup SID, that is, if the primary tail node has a backup tail node, the source node encapsulates an IPv6 basic header and an SRH extension header in the outer layer of the original packet to obtain a first service packet. For the structure of the first service packet, the description related to step S51, FIG. 6a and FIG. 7 may be referred to.

[0088] In the above step S83, the first service packet further includes an IPv6 basic header, and the source node forwards the first service packet according to the operation type of the destination address in the IPv6 basic header.

[0089] For example, if the operation type of the destination address in the IPv6 basic header is the End.X type, the source node determines an output interface corresponding to the destination address in the IPv6 basic header, and sends the first service packet to the next-hop node through the determined output interface. If the operation type of the destination address in the IPv6 basic header is the End type, the source node searches a forwarding table using the destination address in the IPv6 basic header, and sends the first service packet to the next-hop node based on the search result of the forwarding table.

[0090] In some embodiments, as shown in FIG. 9, FIG. 9 is a third schematic flowchart of node protection according to an embodiment of the present application, in which the node protection method is applied to a first node and may include the following steps:

[0091] In step S91, the original packet transmitted from the CE device is received. In step S92, when the primary tail node has a backup tail node, the original packet is encapsulated as a first service packet, and a first SRH extension header of the first service packet includes a first SID list and a preset flag bit, the first SID list includes a primary SID of the primary tail node and a backup SID of the backup tail node in the primary path for forwarding the first service packet, and the preset flag bit is set to a first value indicating that the first SRH extension header carries a backup SID. In step S93, the first service packet is transferred. The above steps S91-S93 are the same as the above steps S81-S83. In step S94, if the primary tail node does not have a backup tail node, the original packet is encapsulated as a common service packet, and the SRH extension header of the common service packet includes an SID list and a preset flag bit, the SID list includes the primary SID of the primary tail node in the primary path for forwarding the first service packet, and the preset flag bit is set to a second value indicating that the SRH extension header does not carry a backup SID. In step S95, the common service packet is transferred.

[0092] In the technical solution according to the embodiment of the present application, when the source node detects that the primary tail node does not have a backup tail node, it encapsulates the original packet as a common service packet, the SID list included in the common service packet has the primary SID but does not include the backup SID, and the preset flag bit is set to a second value indicating that the SRH extension header does not carry the backup SID, thereby ensuring correct processing of the common service packet thereafter. In the embodiment of the present application, the preset flag bit and detecting whether the primary tail node has a backup tail node allow the source node to simultaneously support packet forwarding in non-multihoming scenarios and multihoming scenarios, thereby expanding the scope of application of the technical solution according to the embodiment of the present application.

[0093] According to the learned routing information, the source node determines whether the primary SID of the primary tail node has a backup SID. That is, it determines whether the primary tail node has a backup tail node. If the primary SID does not have a backup SID, that is, if the primary tail node does not have a backup tail node, the source node executes step S94, and encapsulates an IPv6 basic header and an SRH extension header in the outer layer of the original packet to obtain a common service packet. For the structure of the common service packet, reference may be made to the description related to FIG. 6b and FIG. 7. In the embodiment of the present application, the common service packet is a service packet in which a preset flag bit is set to a second value.

[0094] In the above step S95, the common service packet further includes an IPv6 base header, and the source node forwards the common service packet according to the operation type of the destination address in the IPv6 base header.

[0095] For example, if the action type of the destination address in the IPv6 basic header is the End.X type, the source node determines the output interface corresponding to the destination address in the IPv6 basic header, and sends the common service packet to the next-hop node through the determined output interface. If the action type of the destination address in the IPv6 basic header is the End type, the source node searches the forwarding table using the destination address in the IPv6 basic header, and sends the common service packet to the next-hop node based on the search result of the forwarding table.

[0096] When the first node is an endpoint node or a relay node other than the primary tail node in the primary path, as shown in FIG. 10, an embodiment of the present application further provides a node protection method, which may include the following steps.

[0097] In step S101, a second service packet transmitted from a second node is received, the second service packet including a first IPv6 basic header and a second SRH extension header, the second SRH extension header including a second SID list and a preset flag bit, and the preset flag bit is set to a first value indicating that the second SRH extension header carries a backup SID. In step S102, update the destination address in the first IPv6 basic header based on the node state of the primary tail node, the node state of the backup tail node, and the second SID list, and obtain the first service packet. In step S103, the first service packet is forwarded, which is the same as step S52 above.

[0098] In the technical solution of the embodiments of the present application, based on the node state of the primary tail node and the node state of the backup tail node, the first service packet can be sent to a reachable primary tail node or backup tail node, further improving the reliability of the network.

[0099] In the above step S101, the second node may be a source node, or may be an endpoint node or a relay node. The first node may be an endpoint node or a relay node in an SRv6 Traffic Engineering (TE) path, or may be a relay node in an SRv6 Best-effort (BE) path. The second service packet is a first service packet sent from the second node. The first node receives the service packet sent from the second node, i.e., the second service packet. The structure of the second service packet may refer to the description of the structure of the first service packet.

[0100] For ease of distinction and understanding, in the embodiments of the present application, the SRH extension header included in the second service packet is referred to as the second SRH extension header, the IPv6 basic header included in the second service packet is referred to as the first IPv6 basic header, and the SID list included in the second SRH extension header is referred to as the second SID list.

[0101] In the above step S102, the node state is reachable or unreachable. The first node can determine whether the tail node forwarding the packet is the primary tail node or the backup tail node based on the node state of the primary tail node and the node state of the backup tail node. Here, the node state of the primary tail node and the node state of the backup tail node can be recorded in the forwarding table or the routing table. The first node can obtain the node state of the primary tail node and the node state of the backup tail node from the forwarding table or the routing table.

[0102] Based on this, the first node can accurately update the destination address in the IPv6 basic header to the SID of the reachable tail node based on the node state of the primary tail node and the node state of the backup tail node, ensuring that the first service packet can be forwarded to the destination CE device, thereby improving network reliability.

[0103] In the embodiment of the present application, the first node may perform the above step S102 in any of the following manners based on its role in the primary path:

[0104] If the node state of the primary tail node is unreachable and the node state of the backup tail node is reachable, i.e., if the primary tail node is unreachable and the backup tail node is reachable, the destination address in the first IPv6 basic header is updated to the backup SID and the first service packet is obtained.

[0105] If the node state of the primary tail node is reachable, i.e., the primary tail node is reachable, and if the first node is an endpoint node, update the destination address in the first IPv6 basic header to the SID of the next hop endpoint node based on the second SID list, and obtain the first service packet.

[0106] When the node state of the primary tail node is reachable, i.e., the primary tail node is reachable, if the first node is a relay node, it can directly search the forwarding table using the destination address in the first IPv6 basic header without updating the destination address in the first IPv6 basic header, and forward the second service packet based on the search result of the forwarding table.

[0107] In some embodiments, the first node detects the connection topology between the first node and the primary tail node, and further updates the destination address in the first IPv6 basic header based on the connection topology between the first node and the primary tail node, the node state of the primary tail node, the node state of the backup tail node, and the second SID list, to obtain the first service packet. However, the connection topology may be direct or indirect. The first node can determine whether the first node is the penultimate hop node in the primary path according to the connection topology between the first node and the primary tail node, and the penultimate hop node may be an endpoint node or a relay node. Here, the connection topology between the first node and the primary tail node may be recorded in a forwarding table or a routing table. The first node may obtain the connection topology between the first node and the primary tail node from the forwarding table or the routing table.

[0108] In the embodiment of the present application, the first node may perform the above step S102 in any of the following manners based on its role in the primary path:

[0109] For type 1, if the connection type between the first node and the primary tail node is a direct connection, the node state of the primary tail node is unreachable, and the node state of the backup tail node is reachable, i.e., if the first node is directly connected to the primary tail node, the primary tail node is unreachable, and the backup tail node is reachable, then the destination address in the first IPv6 basic header is updated to the backup SID and the first service packet is obtained.

[0110] In the present embodiment, the first node being directly connected to the primary tail node indicates that the first node is the penultimate hop node in the primary path. The penultimate hop node may be an endpoint node, for example, the destination address in the first IPv6 basic header of the second service packet is the SID of the first node. The penultimate hop node may be a forwarding node, for example, the destination address in the first IPv6 basic header of the second service packet is not the SID of the first node.

[0111] For example, the structure of the SRH extension header is shown in Figure 6a.

[0112] In this case, if the penultimate hop node is an endpoint node, SL=2 in the second SRH extension header. After the first node receives the second service packet, it decrements the SL in the second SRH extension header by 1, i.e., SL=1. The first node obtains the SID encapsulated in Segment List[1] from the second SID list, i.e., obtains the SID of the primary tail node. If the SID of the primary tail node cannot be accessed, i.e., the primary tail node is unreachable, it continues to decrement the SL in the second SRH extension header by 1, i.e., SL=0, and the first node obtains the SID encapsulated in Segment List[0] from the second SID list, i.e., obtains the SID of the backup tail node. If the SID of the backup tail node can be accessed, i.e., the backup tail node is reachable, it updates the destination address in the IPv6 basic header of the second service packet to the SID encapsulated in Segment List[0] in the second SID list, and obtains the first service packet.

[0113] If the penultimate hop node is a forwarding node, SL=1 in the second SRH extension header. After the first node receives the second service packet, if the destination address in the IPv6 base header of the second service packet cannot be accessed, i.e., the primary tail node is unreachable, the SL in the second SRH extension header is decremented by 1, i.e., SL=0, and the first node obtains the SID encapsulated in Segment List[0] from the second SID list, i.e., the SID of the backup tail node. If the SID of the backup tail node can be accessed, i.e., the backup tail node is reachable, the destination address in the IPv6 base header of the second service packet is updated to the SID encapsulated in Segment List[0] in the second SID list, and the first service packet is obtained.

[0114] As the second mode, if the connection mode between the first node and the primary end node is a direct connection and the node state of the primary end node is reachable, i.e., the first node is directly connected to the primary end node and the primary end node is reachable, if the first node is an endpoint node, update the destination address in the first IPv6 basic header to the primary SID and obtain the first service packet; if the first node is a relay node, directly forward the second service packet.

[0115] In the embodiment of the present application, the connection topology between the first node and the primary tail node is a direct connection, which indicates that the first node is the penultimate hop node in the primary path. The penultimate hop node may be an endpoint node or a forwarding node.

[0116] For example, the structure of the SRH extension header is shown in Figure 6a. If the penultimate hop node is an endpoint node, SL=2 in the second SRH extension header, and after the first node receives the second service packet, it decrements SL in the second SRH extension header by 1, i.e., SL=1. The first node obtains the SID encapsulated in Segment List[1] from the second SID list, i.e., obtains the SID of the primary tail node. If the SID of the primary tail node is accessible, i.e., the primary tail node is reachable, it updates the destination address in the IPv6 basic header of the second service packet to the SID encapsulated in Segment List[1] in the second SID list, and obtains the first service packet.

[0117] If the penultimate hop node is a forwarding node, SL = 1 in the second SRH extension header. After receiving the second service packet, if the first node can access the destination address in the IPv6 basic header of the second service packet, i.e., if the primary tail node is reachable, it searches the forwarding table using the destination address in the IPv6 basic header of the second service packet, and forwards the second service packet to the next hop node, i.e., forwards the second service packet to the primary tail node, based on the search result of the forwarding table.

[0118] As a third mode, when the connection mode between the first node and the primary tail node is an indirect connection, i.e., when the first node is indirectly connected to the primary tail node, if the first node is an endpoint node, the destination address in the first IPv6 basic header is updated to the SID of the next hop endpoint node based on the second SID list to obtain the first service packet, and if the first node is a relay node, the second service packet is directly forwarded.

[0119] In the embodiment of the present application, the connection topology between the first node and the primary end node is an indirect connection, which means that the first node is not a penultimate hop node excluding the source node and the end node in the primary path. The node that is not a penultimate hop node may be an endpoint node or a forwarding node.

[0120] When the connection type between the first node and the primary tail node is an indirect connection, the first node may update the destination address in the first IPv6 basic header and obtain the first service packet in the manner of device B or device C in Figure 3.

[0121] For example, when the first node is an endpoint node, SL = 4 in the second SRH extension header. After receiving the second service packet, the first node decrements SL in the second SRH extension header by 1, i.e., SL = 3. The first node obtains the SID encapsulated in Segment List [3] from the second SID list, updates the destination address in the IPv6 basic header of the second service packet to the SID encapsulated in Segment List [3] in the second SID list, and obtains the first service packet.

[0122] If the first node is a forwarding node, in the second SRH extension header, SL = 4. After receiving the second service packet, the first node searches a forwarding table using the destination address in the IPv6 basic header of the second service packet, and forwards the second service packet to a next-hop node based on the search result of the forwarding table.

[0123] In the embodiment of the present application, the connection between the first node and the primary tail node realizes switching between the primary tail node and the backup tail node at the penultimate hop node in the primary path. In this way, by extending the routing protocol of the control plane and making only a small change to the processing of the data forwarding plane, for example, by making a change such that the penultimate hop node in the primary path decreases SL by 1 according to the conventional SRv6 forwarding method, it is possible to realize switching between the primary tail node and the backup tail node, realize rapid path switching, and improve the reliability of the network.

[0124] In the above step S103, if the first node is an endpoint node, the first node forwards the first service packet according to the operation type of the destination address in the IPv6 basic header. If the first node is a relay node, the first node uses the destination address in the IPv6 basic header to search a forwarding table, and forwards the first service packet to a next-hop node based on the search result of the forwarding table.

[0125] In some embodiments, a first node may receive a common service packet sent from a second node, the common service packet including an IPv6 base header and an SRH extension header, the SRH extension header including a preset flag bit, the preset flag bit being set to a second value indicating that the SRH extension header does not carry a backup SID, update a destination address in the IPv6 base header of the common service packet based on the SID list included in the common service packet, and forward the common service packet with the updated destination address.

[0126] The common service packet is a service packet sent from the second node. The first node receives the common service packet sent from the second node. For the structure of the common service packet, reference may be made to the above related description.

[0127] After receiving the common service packet, the first node updates the destination address in the IPv6 basic header of the common service packet based on its own role, in combination with the SID list included in the common service packet, and forwards the updated common service packet.

[0128] For example, when the first node is an endpoint node, SL in the SRH extension header of the common service packet is 4. After receiving the common service packet, the first node decrements SL in the SRH extension header of the common service packet by 1, that is, SL is 3. The first node obtains the SID encapsulated in Segment List[3] from in the SID list included in the common service packet, and updates the destination address in the IPv6 basic header of the common service packet to the SID encapsulated in Segment List[3] in the fourth SID list.

[0129] If the first node is a forwarding node, SL=4 in the SRH extension header of the common service packet. After receiving the common service packet, the first node searches a forwarding table using the destination address in the IPv6 base header of the common service packet, and forwards the common service packet to a next-hop node based on the search result of the forwarding table.

[0130] When the first node is a primary tail node or a backup tail node, as shown in FIG. 11, an embodiment of the present application further provides a node protection method, which may include the following steps.

[0131] In step S111, a first service packet is obtained, and a first SRH extension header of the first service packet includes a first SID list and a preset flag bit, the first SID list includes a primary SID of a primary tail node and a backup SID of a backup tail node in a primary path for forwarding the first service packet, and the preset flag bit is set to a first value indicating that the first SRH extension header carries a backup SID, which is the same as step S51 above.

[0132] In step S112, the outer layer encapsulation of the first service packet is removed to obtain the original packet.

[0133] In step S113, the original packet is forwarded.

[0134] In the technical solution of the embodiment of the present application, a decapsulation process for the first service packet by the primary tail node or the backup tail node is supported, and the IPv6 basic header and SRH extension header encapsulated in the outer layer of the first service packet are removed. Thus, if the primary tail node is reachable, the primary tail node is responsible for forwarding the original packet to the destination CE device; if the primary tail node is unreachable, the backup tail node is responsible for forwarding the original packet to the destination CE device, thereby ensuring the reliability of the tail node and improving the reliability of the network while improving the flexibility of the node protection method.

[0135] When the first node determines that it is a primary tail node or a backup tail node, it performs a decapsulation process on the first service packet to obtain the original packet, and then searches a forwarding table based on the destination address in the original packet, and forwards the original packet to the destination CE device based on the search result of the forwarding table.

[0136] In one example, the structure of the SRH extension header is shown in Figure 6a. In this case, if SL=1 in the first SRH extension header and the destination address in the IPv6 basic header of the first service packet is the SID of the first node, the first node can determine that it is the primary tail node, and further perform a decapsulation process on the first service packet to obtain the original packet, and forward the original packet.

[0137] If SL=0 in the first SRH extension header and the destination address in the IPv6 basic header of the first service packet is the SID of the first node, the first node can determine that it is the backup tail node, and further perform a decapsulation process on the first service packet to obtain the original packet, and forward the original packet.

[0138] Hereinafter, a node protection method according to an embodiment of the present application will be described in detail in combination with the multihoming networking shown in Fig. 12. In Fig. 12, CE1-CE2, PE1-PE4 and P1-P4 are included. B-flag indicates a preset flag bit, and B-flag=1 indicates that a backup SID is carried in the SRH extension header.

[0139] PE1 has a locator prefix of A0:: / 64, P1 has a locator prefix of A1:: / 64, P2 has a locator prefix of A2:: / 64 and an SID of END.X type A2::1, PE3 has a locator prefix of A3:: / 64 and a VPN SID of A3::100, and PE4 has a locator prefix of A4:: / 64 and a VPN SID of A4::100.

[0140] When PE3 is normal, traffic from CE1 to CE2 is forwarded along the primary path PE1→P1→P2→PE3. After the configuration is completed, PE1 determines the backup path PE1→P1→P2→P4→PE4 according to the routing optimization policy, and the backup SID of PE3 is the VPN SID A4::100 of PE4.

[0141] In the above arrangement, the packet forwarding flow is as follows.

[0142] 1) When PE1 receives packet 1 sent from CE1 to CE2, it determines that packet 1 needs to be forwarded via the path PE1→P1→P2→PE3 specified in the IPv6 bearer network between PE1 and PE3. PE1 encapsulates an IPv6 basic header and an SRH extension header in the outer layer of packet 1 to obtain packet 2. As shown in Figure 12, in the SRH extension header of packet 2, SL=3, Last Entry=3, B-flag=1, and the SID list is {Segment List[0]=A4::100, Segment List[1]=A3::100, Segment List[2]=A2::1, Segment List[3]=A1::}. The destination address in the IPv6 basic header is the SID encapsulated in the Segment List[SL], that is, the destination address in the IPv6 basic header is the A1:: encapsulated in the Segment List[3].

[0143] 2) PE1 sends packet 2 to P1 based on the destination address A1:: in the IPv6 base header.

[0144] 3) P1 decrements the SL in the SRH extension header of packet 2 by 1 to obtain SL=2, and changes the destination address in the IPv6 base header of packet 2 to the SID encapsulated in the Segment List[SL], i.e., the destination address in the IPv6 base header is A2::1 encapsulated in the Segment List[2], and obtains packet 3.

[0145] 4) P1 sends packet 3 to P2 based on the destination address A2::1 in the IPv6 base header.

[0146] 5) P2 finds that B-flag=1 in the SRH extension header of packet 3, and decrements the SL in the SRH extension header of packet 3 by 1 to obtain SL=1. If it determines that the node indicated by the SID encapsulated in Segment List[1] is reachable, i.e., the primary tail node PE3 is reachable, it changes the destination address in the IPv6 basic header of packet 3 to the SID encapsulated in Segment List[SL], i.e., the destination address in the IPv6 basic header is A3::100 encapsulated in Segment List[1], obtains packet 4, and then executes step 6).

[0147] If the node indicated by the SID encapsulated in Segment List[1] is unreachable, i.e., the primary tail node PE3 is unreachable, the SL in the SRH extension header of packet 3 is decremented by 1 to obtain SL = 0. If the node indicated by the SID encapsulated in Segment List[0] is reachable, i.e., the backup tail node PE4 is reachable, the destination address in the IPv6 basic header of packet 3 is changed to the SID encapsulated in Segment List[SL], i.e., the destination address in the IPv6 basic header is A4::100 encapsulated in Segment List[0], packet 5 is obtained, and step 8) is then executed.

[0148] 6) P2 sends packet 4 to PE3 based on the destination address A3::100 in the IPv6 base header.

[0149] 7) When PE3 finds that B-flag=1 in the SRH extension header of packet 4 and that the current node is the destination address in the IPv6 base header and is A3::100 encapsulated in Segment List[1], it removes the outer layer encapsulation of packet 4, obtains packet 1, and sends packet 1 to CE2.

[0150] 8) P2 sends packet 5 to PE4 based on the destination address A4::100 in the IPv6 base header.

[0151] 9) When PE4 finds that the current node is the destination address in the IPv6 base header, which is A3::100 encapsulated in Segment List[0], it removes the outer layer encapsulation of packet 5, obtains packet 1, and sends packet 1 to CE2.

[0152] Corresponding to the above-mentioned node protection method, an embodiment of the present application provides a node protection device applied to a first node. As shown in FIG. 13, the node protection device includes: an acquisition module 131 for acquiring a first service packet, where a first SRH extension header of the first service packet includes a first SID list and a preset flag bit, where the first SID list includes a primary SID of a primary tail node and a backup SID of a backup tail node in a primary path for forwarding the first service packet, and the preset flag bit is set to a first value indicating that the first SRH extension header carries a backup SID; a forwarding module 132 for forwarding the first service packet; Includes.

[0153] In some embodiments, when the first node is a source node in the primary path, the acquisition module 131 specifically: receiving an original packet transmitted from a customer edge device; When the primary tail node has a backup tail node, encapsulating the original packet as a first service packet; may be used.

[0154] In some embodiments, when the first node is an endpoint node or a relay node other than the primary tail node in the primary path, the acquisition module 131 specifically: receiving a second service packet transmitted from a second node, the second service packet including a first IPv6 base header and a second SRH extension header, the second SRH extension header including a second SID list and a preset flag bit, the preset flag bit being set to a first value indicating that the second SRH extension header carries a backup SID; Update a destination address in a first IPv6 basic header according to a node state of the primary tail node, a node state of the backup tail node, and a second SID list to obtain a first service packet; may be used.

[0155] In some embodiments, the acquisition module 131 specifically: If the primary tail node is unreachable and the backup tail node is reachable, update a destination address in the first IPv6 base header to a backup SID and obtain a first service packet; If the primary tail node is reachable, and if the first node is an endpoint node, update a destination address in the first IPv6 base header to a SID of a next-hop endpoint node based on the second SID list to obtain a first service packet; may be used.

[0156] In some embodiments, the acquisition module 131 specifically: If the first node is directly connected to the primary tail node, the primary tail node is unreachable, and the backup tail node is reachable, update a destination address in the first IPv6 base header to a backup SID and obtain a first service packet; When the first node is indirectly connected to the primary tail node, or when the first node is directly connected to the primary tail node and can reach the primary tail node, if the first node is an endpoint node, update a destination address in the first IPv6 base header to a SID of a next-hop endpoint node according to the second SID list to obtain a first service packet; It is used in.

[0157] In some embodiments, if the first node is a primary tail node or a backup tail node, the forwarding module 132 specifically: Decapsulating an outer layer of the first service packet to obtain an original packet; forwarding the original packet; and may be used.

[0158] In some embodiments, the preset flag bit is set to a first value, a SID encapsulated in the penultimate element of the first SID list is the primary SID, a SID encapsulated in the last element is a backup SID, and The preset flag bit is set to a second value, and the SID encapsulated in the last element in the first SID list is the primary SID.

[0159] In some embodiments, the first value is one or zero.

[0160] In some embodiments, the first SRH extension header further includes a flag field, and one flag bit in the flag field is a preset flag bit.

[0161] In the technical solution according to the embodiment of the present application, a preset flag bit is added to the SRH extension header, the preset flag bit indicates that the SRH extension header carries a backup SID, and the SID of the backup tail node is added to the SID list included in the SRH extension header. Based on the preset flag bit and the SID of the backup tail node included in the SID list, if the primary tail node is unreachable and the backup tail node is reachable, the first node can send the first service packet to the backup tail node, and the backup tail node can send the first service packet to the destination device corresponding to the original packet. As can be seen, in the technical solution according to the embodiment of the present application, when a CE is multi-homed to multiple tail nodes, after the primary tail node becomes unreachable, the traffic of the user connected to the CE device is not interrupted until the routing converges again, so that the reliability of the tail node is ensured and the reliability of the network is improved.

[0162] Corresponding to the above-mentioned node protection method, an embodiment of the present application further provides an electronic device. The electronic device may be a first node, and as shown in FIG. 14, the electronic device includes a processor 141, a machine-readable storage medium 142, and a transceiver 144. The machine-readable storage medium 142 stores machine-executable instructions executable by the processor 141, the machine-executable instructions causing the processor 141 to: obtaining a first service packet, a first SRH extension header of the first service packet including a first SID list and a preset flag bit, the first SID list including a primary SID of a primary tail node and a backup SID of a backup tail node in a primary path for forwarding the first service packet, the preset flag bit being set to a first value indicating that the first SRH extension header carries a backup SID; forwarding a first service packet; Make this a reality.

[0163] In some embodiments, when the electronic device is a source node in a primary path, the machine-executable commands specifically cause the processor 141 to: receiving an original packet transmitted from a customer edge device; When the primary tail node has a backup tail node, encapsulating the original packet as a first service packet; may be executed.

[0164] In some embodiments, when the electronic device is an endpoint node or a relay node other than the primary tail node in a primary path, the machine executable instructions specifically include: receiving a second service packet transmitted from a second node, the second service packet including a first IPv6 base header and a second SRH extension header, the second SRH extension header including a second SID list and a preset flag bit, the preset flag bit being set to a first value indicating that the second SRH extension header carries a backup SID; Updating a destination address in a first IPv6 basic header according to a node state of the primary tail node, a node state of the backup tail node, and a second SID list to obtain a first service packet; may be executed.

[0165] In some embodiments, the machine-executable instructions specifically include instructions to a processor: If the primary tail node is unreachable and the backup tail node is reachable, updating a destination address in the first IPv6 base header to a backup SID and obtaining a first service packet; If the primary tail node is reachable, and if the electronic device is an endpoint node, update a destination address in the first IPv6 base header to a SID of a next-hop endpoint node based on the second SID list, and obtain a first service packet; may be executed.

[0166] In some embodiments, the machine-executable instructions specifically include instructions to a processor: When the electronic device is directly connected to the primary tail node, the primary tail node is unreachable, and the backup tail node is reachable, updating a destination address in a first IPv6 basic header to a backup SID and acquiring a first service packet; When the electronic device is indirectly connected to the primary end node, or when the electronic device is directly connected to the primary end node and can reach the primary end node, if the electronic device is an end node, update a destination address in the first IPv6 basic header to a SID of a next-hop end node according to a second SID list to obtain a first service packet; Execute the command.

[0167] In some embodiments, when the electronic device is a primary tail node or a backup tail node, the machine executable instructions specifically include: Decapsulating the outer layer of the first service packet to obtain an original packet; forwarding the original packet; Execute the command.

[0168] In some embodiments, the preset flag bit is set to a first value, a SID encapsulated in the penultimate element of the first SID list is the primary SID, a SID encapsulated in the last element is a backup SID, and The preset flag bit is set to a second value, and the SID encapsulated in the last element in the first SID list is the primary SID.

[0169] In some embodiments, the first value is one or zero.

[0170] In some embodiments, the first SRH extension header further includes a flag field, and one flag bit in the flag field is a preset flag bit.

[0171] In the technical solution according to the embodiment of the present application, a preset flag bit is added to the SRH extension header, the preset flag bit indicates that the SRH extension header carries a backup SID, and the SID of the backup tail node is added to the SID list included in the SRH extension header. According to the preset flag bit and the SID of the backup tail node included in the SID list, if the primary tail node is unreachable and the backup tail node is reachable, the first node can send the first service packet to the backup tail node, and the backup tail node can send the first service packet to the destination device corresponding to the original packet. As can be seen, in the technical solution according to the embodiment of the present application, when a CE is multi-homed to multiple tail nodes, after the primary tail node becomes unreachable, the traffic of the user connected to the CE device is not interrupted until the routing converges again, so that the reliability of the tail node is ensured and the reliability of the network is improved.

[0172] As shown in Fig. 14, the electronic device may further include a communication bus 143. The processor 141, the machine-readable storage medium 142, and the transceiver 144 communicate with each other through the communication bus 143, which may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 1003 may be divided into an address bus, a data bus, a control bus, etc.

[0173] The transceiver 144 may be a wireless communication module, and under the control of the processor 141, the transceiver 144 performs data interaction with other devices.

[0174] The machine-readable storage medium 142 may include Random Access Memory (RAM) and / or Non-Volatile Memory (NVM), such as at least one magnetic disk memory. Note that the machine-readable storage medium 142 may also include at least one storage device remote from the processor.

[0175] Processor 141 may be a general-purpose processor including a Central Processing Unit (CPU), a Network Processor (NP), etc., or may be a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.

[0176] In another embodiment of the present application, there is provided a machine-readable storage medium storing machine-executable instructions executable by a processor, the machine-executable instructions, when invoked and executed by the processor, causing the processor to implement steps of any of the node protection methods described above.

[0177] In another embodiment of the present application, there is further provided a computer program product including commands, which, when executed on a computer, cause the computer to implement steps of any of the node protection methods in the above embodiments.

[0178] In this document, relational terms such as "first" and "second" are merely used to distinguish one entity or operation from another and do not necessarily require or imply any actual relationship or order between these entities or operations. Additionally, the terms "comprise," "include," or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or device that includes a set of elements includes not only those elements, but also other elements not expressly listed, or elements inherent in such a sequence, method, product, or device. Unless otherwise specifically limited, an element defined by the phrase "including a ..." does not exclude the process, method, product, or device that includes the element from having other identical elements.

[0179] In addition, although the embodiments in this specification are described so as to be mutually related, identical or similar parts between the embodiments may be cross-referenced, and important explanations in each embodiment are the differences from other embodiments. In particular, the embodiments of the node protection device, electronic device, machine-readable storage medium, and computer program product are basically similar to the embodiments of the node protection method, so they have been briefly explained. For related parts, the explanation of the node protection method may be referred to.

[0180] The above description is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. 1. A node protection method applied to a first node, comprising: obtaining a first service packet, a first SRH extension header of the first service packet including a first SID list and a preset flag bit, the first SID list including a primary SID of a primary tail node and a backup SID of a backup tail node in a primary path for forwarding the first service packet, the preset flag bit being set to a first value indicating that the first SRH extension header carries the backup SID; forwarding the first service packet; A method for protecting a node, comprising:

2. 2. A method for protecting a node according to claim 1, comprising: When the first node is a source node in the primary path, acquiring the first service packet includes: receiving an original packet transmitted from a customer edge device; encapsulating the original packet as the first service packet when the primary tail node has a backup tail node; A method for protecting a node, comprising:

3. 2. A method for protecting a node according to claim 1, comprising: When the first node is an endpoint node or a relay node other than the primary tail node in the primary path, the step of acquiring the first service packet includes: receiving a second service packet transmitted from a second node, the second service packet including a first IPv6 base header and a second SRH extension header, the second SRH extension header including a second SID list and the preset flag bit, the preset flag bit being set to a first value indicating that the second SRH extension header carries the backup SID; updating a destination address in the first IPv6 base header based on a node state of the primary tail node, a node state of the backup tail node, and the second SID list, to obtain the first service packet; A node protection method comprising:

4. 4. A node protection method according to claim 3, comprising: The step of updating a destination address in the first IPv6 base header based on the node state of the primary tail node, the node state of the backup tail node, and the second SID list to obtain the first service packet includes: if the primary tail node is unreachable and the backup tail node is reachable, updating a destination address in the first IPv6 base header to the backup SID and acquiring the first service packet; If the primary tail node is reachable, and if the first node is an endpoint node, updating a destination address in the first IPv6 base header to a SID of a next hop endpoint node based on the second SID list to obtain the first service packet; A node protection method comprising:

5. 4. A node protection method according to claim 3, comprising: The step of updating a destination address in the first IPv6 base header based on the node state of the primary tail node, the node state of the backup tail node, and the second SID list to obtain the first service packet includes: If the first node is directly connected to the primary tail node, the primary tail node is unreachable, and the backup tail node is reachable, updating a destination address in the first IPv6 base header to the backup SID and obtaining the first service packet; When the first node is indirectly connected to the primary end node, or when the first node is directly connected to the primary end node and can reach the primary end node, if the first node is an end node, update a destination address in the first IPv6 base header to a SID of a next hop end node according to the second SID list, and obtain the first service packet; A node protection method comprising:

6. 2. A method for protecting a node according to claim 1, comprising: When the first node is the primary tail node or the backup tail node, the step of forwarding the first service packet includes: Decapsulating the outer layer of the first service packet to obtain an original packet; forwarding the original packet; A node protection method comprising:

7. A node protection method according to any one of claims 1 to 6, comprising: the preset flag bit is set to a first value, a SID encapsulated in the penultimate element of the first SID list is the primary SID, and a SID encapsulated in the last element is the backup SID; the preset flag bit is set to a second value, and the SID encapsulated in the last element included in the first SID list is the primary SID. A node protection method comprising:

8. A node protection method according to any one of claims 1 to 6, comprising: the first value is 1 or 0; A node protection method comprising:

9. A node protection method according to any one of claims 1 to 6, comprising: The first SRH extension header further includes a flag field, and one flag bit in the flag field is the preset flag bit. A node protection method comprising:

10. A node protection device applied to a first node, comprising: The node protection device includes: an acquisition module for acquiring a first service packet, wherein a first SRH extension header of the first service packet includes a first SID list and a preset flag bit, the first SID list includes a primary SID of a primary tail node and a backup SID of a backup tail node in a primary path for forwarding the first service packet, and the preset flag bit is set to a first value indicating that the first SRH extension header carries the backup SID; a forwarding module for forwarding the first service packet; A node protection device comprising:

11. 11. The node protection device according to claim 10, When the first node is a source node in the primary path, the acquisition module specifically: receiving an original packet transmitted from a customer edge device; When the primary tail node has a backup tail node, encapsulating the original packet as the first service packet; A node protection device for use in a network.

12. 11. The node protection device according to claim 10, When the first node is an endpoint node or a relay node other than the primary tail node in the primary path, the acquisition module specifically: receiving a second service packet transmitted from a second node, the second service packet including a first IPv6 base header and a second SRH extension header, the second SRH extension header including a second SID list and the preset flag bit, the preset flag bit being set to a first value indicating that the second SRH extension header carries the backup SID; Updating a destination address in the first IPv6 base header based on a node state of the primary tail node, a node state of the backup tail node, and the second SID list to obtain the first service packet; A node protection device for use in a network.

13. 13. A node protection device according to claim 12, comprising: The acquisition module specifically includes: If the primary tail node is unreachable and the backup tail node is reachable, update a destination address in the first IPv6 base header to the backup SID and obtain the first service packet; If the primary tail node is reachable, and if the first node is an endpoint node, update a destination address in the first IPv6 base header to a SID of a next hop endpoint node based on the second SID list to obtain the first service packet; A node protection device for use in a network.

14. 14. The node protection device according to claim 13, The acquisition module specifically includes: If the first node is directly connected to the primary tail node, the primary tail node is unreachable, and the backup tail node is reachable, updating a destination address in the first IPv6 base header to the backup SID and obtaining the first service packet; When the first node is indirectly connected to the primary end node, or when the first node is directly connected to the primary end node and the primary end node is reachable, if the first node is an end node, update a destination address in the first IPv6 base header to a SID of a next hop end node according to the second SID list, and obtain the first service packet; A node protection device for use in a network.

15. 11. The node protection device according to claim 10, When the first node is the primary tail node or the backup tail node, the forwarding module specifically: Decapsulating an outer layer encapsulation of the first service packet to obtain an original packet; forwarding the original packet; A node protection device for use in a network.

16. A node protection device according to any one of claims 10 to 15, the preset flag bit is set to a first value, a SID encapsulated in the penultimate element of the first SID list is the primary SID, and a SID encapsulated in the last element is the backup SID; the preset flag bit is set to a second value, and the SID encapsulated in the last element included in the first SID list is the primary SID. A node protection device comprising:

17. A node protection device according to any one of claims 10 to 15, the first value is 1 or 0; A node protection device comprising:

18. A node protection device according to any one of claims 10 to 15, The first SRH extension header further includes a flag field, and one flag bit in the flag field is the preset flag bit. A node protection device comprising:

19. An electronic device, A processor; A transceiver; a machine-readable storage medium for storing machine-executable instructions executable by said processor; The machine-executable instructions may be configured to cause the processor to: obtaining a first service packet, a first SRH extension header of the first service packet including a first SID list and a preset flag bit, the first SID list including a primary SID of a primary tail node and a backup SID of a backup tail node in a primary path for forwarding the first service packet, the preset flag bit being set to a first value indicating that the first SRH extension header carries the backup SID; forwarding the first service packet; An electronic device characterized by executing the above.

20. 20. The electronic device according to claim 19, If the electronic device is a source node in the primary path, the machine-executable commands specifically cause the processor to: receiving an original packet transmitted from a customer edge device; and when the primary tail node has a backup tail node, encapsulating the original packet as the first service packet. An electronic device characterized by executing

21. 20. The electronic device according to claim 19, If the electronic device is an endpoint node or a relay node other than the primary tail node in the primary path, the machine-executable commands specifically cause the processor to: receiving a second service packet transmitted from a second node, the second service packet including a first IPv6 base header and a second SRH extension header, the second SRH extension header including a second SID list and the preset flag bit, the preset flag bit being set to a first value indicating that the second SRH extension header carries the backup SID; updating a destination address in the first IPv6 base header based on a node state of the primary tail node, a node state of the backup tail node, and the second SID list, to obtain the first service packet; An electronic device characterized by executing the above.

22. 22. The electronic device according to claim 21, The machine-executable instructions specifically instruct the processor to: if the primary tail node is unreachable and the backup tail node is reachable, updating a destination address in the first IPv6 base header to the backup SID and acquiring the first service packet; If the primary tail node is reachable, and if the electronic device is an endpoint node, updating a destination address in the first IPv6 base header to a SID of a next hop endpoint node based on the second SID list to obtain the first service packet; An electronic device characterized by executing the above.

23. 23. The electronic device according to claim 22, The machine-executable instructions specifically instruct the processor to: When the electronic device is directly connected to the primary tail node, the primary tail node is unreachable, and the backup tail node is reachable, updating a destination address in the first IPv6 basic header to the backup SID and acquiring the first service packet; When the electronic device is indirectly connected to the primary end node, or when the electronic device is directly connected to the primary end node and the primary end node is reachable, if the electronic device is an endpoint node, update a destination address in the first IPv6 base header to a SID of a next hop endpoint node according to the second SID list, and obtain the first service packet; An electronic device characterized by executing the above.

24. 20. The electronic device according to claim 19, If the electronic device is the primary tail node or the backup tail node, the machine-executable instructions specifically include: Decapsulating the outer layer of the first service packet to obtain an original packet; forwarding the original packet; An electronic device characterized by executing the above.

25. The electronic device according to any one of claims 19 to 24, the preset flag bit is set to a first value, a SID encapsulated in the penultimate element of the first SID list is the primary SID, and a SID encapsulated in the last element is the backup SID; the preset flag bit is set to a second value, and the SID encapsulated in the last element included in the first SID list is the primary SID.

1. An electronic device comprising:

26. The electronic device according to any one of claims 19 to 24, the first value is 1 or 0; 1. An electronic device comprising:

27. The electronic device according to any one of claims 19 to 24, The first SRH extension header further includes a flag field, and one flag bit in the flag field is the preset flag bit.

1. An electronic device comprising:

28. 1. A machine-readable storage medium, comprising: storing machine executable instructions which, when invoked and executed by a processor, cause the processor to implement the steps of the node protection method of any one of claims 1 to 6; A machine-readable storage medium comprising: