PACKAGE PROCESSING METHOD, APPARATUS AND SYSTEM

MX431178BActive Publication Date: 2026-02-25HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
MX2022008999
Authority / Receiving Office
MX · MX
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-03-23
Filing Date
2022-07-20
Publication Date
2026-02-25
Estimated Expiration
2041-01-22

AI Technical Summary

Technical Problem

The reliability of segment routing networks is compromised due to errors in forwarding paths indicated by segment identifiers, leading to delays or loss of data packets.

Method used

Implementing a backup secondary segment identifier list for each primary list to ensure continuous forwarding in segment routing networks by switching to the secondary list when the primary path fails, and utilizing location indication information to determine the availability of target SIDs.

Benefits of technology

Enhances the reliability and efficiency of segment routing networks by ensuring uninterrupted packet forwarding and reducing network overheads through backup segment identifier lists.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure MX431178B0
    Figure MX431178B0
Patent Text Reader

Abstract

This application discloses a method, apparatus, and packet processing system, and pertains to the field of communications. The method includes: A first network device receives a first packet, wherein the first packet includes a plurality of Segment Identifier (SID) lists, the plurality of SID lists includes a primary SID list and at least one secondary SID list, at least one secondary SID list includes a first secondary SID list, and the first secondary SID list is a backup of the primary SID list; and the first network device processes the first packet based on the primary SID list.This application is used to implement that, in a segment routing network, when a forwarding path indicated by a list of segment identifiers is incorrect, data packet forwarding processing can still be implemented in the segment routing network, thereby improving the network's transmission reliability.
Need to check novelty before this filing date? Find Prior Art

Description

PACKAGE PROCESSING METHOD, APPARATUS AND SYSTEM FIELD OF THE INVENTION The present application relates to the field of communications, and in particular, to a packet processing method, apparatus and system. BACKGROUND OF THE INVENTION Segment routing (SR) is a protocol designed based on source routing to control the forwarding of a data packet on a network. The SR is used to divide a network path into segments, assign segment identifiers to the segments or nodes, and add the segment identifiers that are arranged sequentially in a data packet, so that the data packet can be transmitted through of a forwarding path indicated by segment identifiers. In an SR network, a segment routing network ingress device inserts a set of ordered segment identifiers into a data packet to explicitly specify a forwarding path of the data packet. The ingress device may also be referred to as the head node. SR applied to a multi-protocol label switching (MPLS) data plane is called MPLS Segment Routing (MPLS-SR or SR-MPLS). SR applied to an Internet Protocol Version 6 (IPv6) data plane is called IPv6 Segment Routing (SRv6). A Head Node is a starting node in an SR forwarding path. In SRv6, the head node is responsible for encapsulating a segment routing header (SRH). In SR-MPLS, the head node is responsible for encapsulating a SID label in an MPLS packet header. A tail node is a last-hop network device in an SR forwarding path. In SRv6, the tail node is responsible for decapsulating an SRH and / or an IPv6 header. An intermediate node is a network device that is neither a head node nor a tail node in an SR forwarding path, and may be referred to as a transit node. A segment ID (SID) represents a node, a link, or a service provided by a network device. In SRv6, the SID is represented as a 128-bit value. In SR-MPLS, the SID is represented as a tag value. An SRv6 segment identifier may include a function part, and the function part indicates a corresponding action to be performed by a network device that advertises the segment identifier. For any node in an SR network, the node may include an endpoint Layer 3 cross-connect segment identifier (End.X SID, where End means endpoint, indicating an endpoint; layer 3 crossover; and SID indicates a segment identifier) ​​or an endpoint segment identifier that corresponds to at least one node (End SID, where End means endpoint, indicating an endpoint; and SID indicates a segment identifier ). The End.X SID is used to identify an IP layer link directly connected to the node, and the End SID is used to identify the node. A SID segment identifier list is a list that includes one or more segment identifiers. After receiving a data packet, a head node in a segment routing network can insert the list of SIDs into the data packet to indicate a forwarding path. A SID list may include only one SID or may include a plurality of SIDs. It should be noted that the SID list may indicate only some nodes in the path instead of all nodes. Alternatively, an END.X SID, an END SID, and a SID that has another function can be used together. The SIDs in the SID list are executed in sequence to ensure that the packet can be forwarded along the specified forwarding path. After the head node inserts the SID list into the packet and sends the packet, when the forwarding path indicated by the SID list is wrong, the delay in sending the packet may be long or the packet may be lost and , therefore, the reliability of the segment routing network is low. BRIEF DESCRIPTION OF THE INVENTION This application provides a method, apparatus, and packet processing system for implementing that, in a segment routing network, when a forwarding path indicated by a list of segment identifiers is in error, the forwarding processing of data packets still can be deployed in the segment routing network, thereby improving the reliability of the segment routing network. According to a first aspect, this application provides a packet processing method, applied to a segment routing network. In the method, a first network device receives a first packet, where the first packet includes a plurality of SID segment identifier lists, the plurality of SID lists includes a primary SID list and at least one secondary SID list, at least one secondary SID list includes a first secondary SID list, and the first secondary SID list is a backup copy of the primary SID list; and the first network device processes the first packet based on the primary SID list. Because the first secondary SID list in the first packet is a backup of the primary SID list, when a path indicated by or a service corresponding to the primary SID list is in error, the first packet can be processed in function of the first secondary SID list, so that the forwarding processing of the data packet continues in the routing network RRRQnn / zznz / E / YiAi segments, thereby improving the transmission reliability of the network. In a possible implementation, the primary SID list includes only one SID and the first secondary SID list also includes only one SID. In this way, the length of the primary SID list and the length of the first secondary SID list can be reduced, to further reduce the length of a packet header of the first packet, to reduce transmission resources. In another possible implementation, the first network device performs different processing on the first packet depending on whether a target SID is available, where the target SID is one or more unexecuted SIDs in the primary SID list. In another possible implementation, the fact that the target SID is available includes that a service corresponding to the target SID is available, or that the target SID is accessible to the first network device. Thus, whether the target SID is available is determined by determining whether the service corresponding to the target SID is available or whether the target SID is reachable by the first network device. In the above, the availability of one or more target SIDs is determined, so that a list of secondary SIDs can be used to provide a service or perform packet forwarding when it is determined in advance whether the target SID is available, thereby improving the reliability of the segment routing network. In another possible implementation, a forwarding path indicated by the first secondary SID list is a backup path of a forwarding path indicated by the primary SID list. In this way, when the forwarding path indicated by the primary SID list is in error, the forwarding path indicated by the first secondary SID list can be used to transmit the first packet, so that the forwarding processing of the data packet continues in the segment routing network, thereby improving the transmission reliability of the network. In another possible implementation, when the target SID is not available, the first network device sends the first packet based on a first SID, where the first SID is the 1st SID in the first secondary SID list. Because the target SID is a SID in the primary SID list, when the target SID is not available, the packet is sent based on the 1st SID in the first secondary SID list, to ensure that the forwarding processing of the Data packet continue in the network routing segments, to improve the network transmission reliability. In another possible implementation, the target SID being unreachable includes that a network device corresponding to the target SID is unreachable by the first network device, or that any network device or link between the first network device and a network device that corresponds to the target SID is wrong. In this way, whether the target SID is reachable can be determined by determining whether the network device corresponding to the target SID is reachable by the first network device, or whether any network device or link between the first network device and the device corresponding to the target SID is wrong. In another possible implementation, the first network device is an intermediate node in a primary end-to-end forwarding path indicated by the plurality of SID lists, the target SID is the last SID in the primary SID list and the target SID is a SID of the first network device. When the target SID is reachable, the first network device sends the first packet based on a first SID, where the first SID is the 1st SID after at least one secondary SID list in the plurality of SID lists. When the target SID is reachable, it indicates that the forwarding path indicated by the primary SID list is not in error, and since the first network device is an intermediate node in the primary forwarding path, the first packet is sent based on the first SID, so the first network device skips at least one secondary SID list and continues sending the first packet. In another possible implementation, the first network device is a tail node in a primary end-to-end forwarding path indicated by the plurality of SID lists, the target SID is the last SID in the primary SID list and the SID target is a SID of the first network device. When the target SID is reachable, the first network device performs a function corresponding to the target SID and removes the plurality of SID lists. When the target SID is reachable, it indicates that the primary forwarding path indicated by the primary SID list is not in error, and because the first network device is the tail node in the primary forwarding path, the plurality of lists of SIDs are removed, so that the first network device directly bypasses at least one list of secondary SIDs. This avoids a scenario where packet processing cannot continue due to a queue node failure. Additionally, when the tail node processes the packet and there is still at least one SID in the segment identifier list of the packet, that is, one SID in the secondary SID list, the SID lists can be quickly removed to improve speed. packet processing. In another possible implementation, a service corresponding to the first secondary SID list is a backup of a service corresponding to the primary SID list, and the target SID that is available includes that a service corresponding to the target SID is available. In this way, when the service corresponding to the primary SID list is in error, the service corresponding to the first secondary SID list can be used to process the first packet, so that the processing of the data packet continues in the network. segment routing, thereby improving network transmission reliability. RRRQnn / zznz / E / YiAi In another possible implementation, when the target SID is not available, the first network device provides a service for the first packet by using a first SID, where the first SID is the 1st SID in the first secondary SID list. When the target SID is not available, that is, the service corresponding to the target SID is not available, the service is provided for the first packet based on the first SID in the first secondary SID list, so that processing of the data packet continues in the network routing segments, thus improving network availability. In another possible implementation, the service corresponding to the target SID that is not available includes: a service resource is insufficient or the resource is busy; or the service is wrong. Therefore, whether the service corresponding to the target SID is available is determined by determining whether the service resource is sufficient, whether the resource is busy, or whether the service is in error. In another possible implementation, the first network device is an intermediate node in a primary end-to-end forwarding path indicated by the plurality of SID lists, and the target SID is the 1st SID in the non-executed SIDs. When the target SID is available, the first network device provides the service corresponding to the target SID and sends the first packet based on a first SID, where the first SID is the 1st SID after at least one list of secondary SIDs. in the plurality of SID lists. When the target SID is available, and the first SID is the 1st SID after at least one secondary SID list in the plurality of SID lists, the packet is sent based on the first SID, so that the first network directly skips at least one secondary SID list. The network device does not need to continue processing the packet based on at least a secondary SID list, to avoid repeated processing and low forwarding efficiency problems caused by processing. In another possible implementation, the first network device is a tail node in a primary end-to-end forwarding path indicated by the plurality of SID lists, and the target SID is the last SID in the non-executed SIDs. When the target SID is available, the first network device provides the service corresponding to the target SID and removes the plurality of SID lists. Because the first network device is the tail node in the primary forwarding path, when the target SID becomes available, the plurality of SID lists are removed, so that the first network device directly skips at least one secondary SID list. This avoids a scenario where packet processing cannot continue due to a queue node failure. Additionally, when the tail node processes the packet and there is still at least one SID in the segment identifier list of the packet, that is, one SID in the secondary SID list, the SID lists can be quickly removed to improve RRRQnn / zznz / E / YiAi a packet processing speed. In a way to directly remove the SID lists when using the SID, excessive indication information and the like carried in the packet can be reduced, to improve the availability of this solution and reduce network overheads. In another possible implementation, the first packet includes location indication information. In this way, the first network device obtains the first SID based on the location indication information, and the location indication information is used to indicate one or more of the following: a location of the primary SID list in the plurality of SID lists, a location of the first secondary SID list in the plurality of SID lists, and a location of at least one secondary SID list in the plurality of SIDs. In this way, the first network device can accurately obtain the first secondary SID list of the plurality of SID lists based on the location information, to accurately obtain the first SID. In one way of carrying the location indication information in the SID, the network device can obtain precise location information based on the SID in a plurality of request scenarios, such that a SID in the primary SID list or a SIDs in at least one secondary SID list may be accurately skipped based on whether the target SID is available, to ensure accurate processing of the packet in the network without repeated processing of the packet. In another possible implementation, the location indication information includes the last SID in the primary SID list and / or the 1st SID in the non-executed SIDs in the primary SID list. In a way of carrying the location indication information in the SID, the packet processing efficiency of the network device can be improved and the excessive indication information and the like carried in the packet can be reduced, to improve the availability of this solution and reduce network overloads. In another possible implementation, the location indication information is carried in metadata of a segment routing header of the first packet. In another possible implementation, the location indication information includes a number of SIDs in the M sub-SID lists. In another possible implementation, the location indication information includes a location of the tail SID of the primary SID list in the plurality of SID lists. In another possible implementation, the location indication information includes a location of the head SID of the first secondary SID list in the plurality of SID lists. In another possible implementation, the location indication information includes a location of the head SID of the primary SID list in the plurality of SID lists and a RRRQnn / zznz / E / YiAi number of SIDs in the primary SID list. In a way of transporting the location indication information in the packet, the packet processing efficiency of the network device can be improved. In another possible implementation, the first network device receives a configuration instruction; and the first network device performs, based on the configuration instruction, an action to obtain a second SID based on whether the target SID is available and processes the first packet based on the second SID, where the second SID includes: the SID in the primary SID list, the 1st SID in the first secondary SID list, or the 1st SID after at least one secondary SID list in the plurality of SID lists. In this way, whether the first network device enables a function of processing the first packet based on the target SID can be controlled by using the configuration statement. In another possible implementation, the plurality of SID lists are located in a segment routing header, SRH, of the first packet, or the plurality of SID lists are located in a multi-protocol label switching header of the first packet. . In another possible implementation, the primary SID list and the first secondary SID list are located in different SRHs of the first packet. In another possible implementation, the primary SID list is adjacent to the first secondary SID list, and the last SID in the primary SID list is located before the first secondary SID list. In this way, the first network device can determine the location of the primary SID list and the location of the first secondary SID list. In addition, a solution of a related technology is used to the maximum extent, so that the packet in the network can be processed correctly, thereby reducing the difficulty of using the technical solution in this application. In another possible implementation, at least one secondary SID list further includes a second secondary SID list, and the second secondary SID list is a backup of the first secondary SID list and / or the second secondary SID list is a backup of the primary SID list. In this way, the first packet may include a plurality of primary SID lists and a secondary SID list corresponding to each primary SID list, and each primary SID list is protected by using the secondary SID list corresponding to each primary SID list, to further improve the reliability of segment routing network. In another possible implementation, the plurality of SID lists further includes another primary SID list and another secondary SID list, and the other secondary SID list is a backup copy of the other primary SID list. When a plurality of important network nodes or services need to be protected in the network, the packet can carry more primary and secondary lists of SIDs to further improve network reliability. According to a second aspect, this application provides a packet processing method, applied to a segment routing network. In the method, a first network device sends a first packet, where the first packet includes a plurality of lists of segment identifiers, SIDs, the plurality of SID lists includes at least one list of primary SIDs and at least one list of Secondary SID, at least one secondary SID list includes a first secondary SID list, and the first secondary SID list is a backup copy of the primary SID list. Because the first secondary SID list in the first packet is a backup of the primary SID list, when a path indicated by the primary SID list is in error, the first packet is processed based on the first list of Secondary SID, so that the forwarding processing of the data packet continues in the segment routing network, thereby improving the transmission reliability of the network. In a possible implementation, the first network device receives a second packet and generates the first packet based on the second packet, where the second packet does not include the plurality of SID lists. Alternatively, the first network device generates the first packet. In a possible implementation, before sending the first packet, the first network device further obtains the plurality of segment identifier lists. In another possible implementation, the first packet includes location indication information, and the location indication information is used to indicate one or more of the following: a location of the primary SID list in the plurality of SID lists, a location of the first secondary SID list in the plurality of SID lists, and a location of at least one secondary SID list in the plurality of SIDs. In this way, the location of the primary SID list or the secondary SID list in the plurality of SID lists can be accurately determined by using the location information. In another possible implementation, the location indication information includes the last SID in the primary SID list and / or the 1st SID in the non-executed SIDs in the primary SID list. In another possible implementation, the location indication information is carried in metadata of a segment routing header of the first packet. In this way, location information is transported by using metadata, so that a network device located after the first network device can obtain the location information from the first packet. In another possible implementation, the plurality of SID lists are carried in a segment routing header, SRH, of the first packet, or the plurality of lists SID RRRQnn / zznz / E / YiAi is carried in a multi-protocol label switching, MPLS, header of the first packet. In another possible implementation, the primary SID list and the first secondary SID list are carried in different SRHs of the second packet. In another possible implementation, the primary SID list is adjacent to the first secondary SID list, and the last SID in the primary SID list is located before the first secondary SID list. In this way, the network device located after the first network device can determine the location of the primary SID list and the location of the first secondary SID list. In another possible implementation, at least one secondary SID list further includes a second secondary SID list, and the second secondary SID list is a backup of the first secondary SID list and / or the second secondary SID list is a backup of the primary SID list. Because the second secondary SID list is a backup of the first secondary SID list, when a path indicated by the first secondary SID list is in error, the first packet is processed based on the second secondary SID list , so that the forwarding processing of the data packet continues in the segment routing network, thereby improving the transmission reliability of the network. In another possible implementation, the plurality of SID lists further includes another primary SID list and another secondary SID list, and the other secondary SID list is a backup copy of the other primary SID list. According to a third aspect, this application provides a packet processing method, applied to a segment routing network. In the method, a first control device sends a first message to a first network device, where the first message includes a plurality of lists of segment identifiers, SID, the plurality of SID lists includes a list of primary SID and at at least one secondary SID list, at least one secondary SID list includes a first secondary SID list, and the first secondary SID list is a backup copy of the primary SID list. The first message allows the first network device to generate a first packet, and the first packet includes the plurality of SID lists. The first packet generated in this way includes the primary SID list and the first secondary SID list. Because the first secondary SID list is a backup of the primary SID list, when a path indicated by the primary SID list is in error, the first network device processes the first packet based on the first list of Secondary SID, so that the forwarding processing of the data packet continues in the segment routing network, thereby improving the transmission reliability of the network. RRRQnn / zznz / E / YiAi In a possible implementation, the first message further includes a packet characteristic or a routing characteristic and the first packet conforms to the packet characteristic or the routing characteristic. In this way, the first network device can add the primary SID list and the first secondary SID list to the packet that conforms to the packet characteristic and the routing characteristic. In another possible implementation, the first message further includes the location indication information, and the location indication information is used to indicate one or more of the following: a location of the primary SID list in the plurality of SID lists , a location of the first secondary SID list in the plurality of SID lists, and a location of at least one secondary SID list in the plurality of SIDs. In this way, the network device in the segment routing network can accurately determine the locations of the primary SID list and each secondary SID list based on the location indication information. In another possible implementation, the location indication information includes the last SID in the primary SID list and / or the 1st SID in the non-executed SIDs in the primary SID list. According to a fourth aspect, this application provides a packet processing apparatus, configured to perform the method in the first aspect or any possible implementation of the first aspect. Specifically, the apparatus includes units configured to perform the method in the first aspect or any possible implementation of the first aspect. According to a fifth aspect, this application provides a packet processing apparatus, configured to perform the method in the second aspect or any possible implementation of the second aspect. Specifically, the apparatus includes units configured to perform the method in the second aspect or any possible implementation of the second aspect. According to a sixth aspect, this application provides a packet processing apparatus configured to perform the method in the third aspect or any possible implementation of the third aspect. Specifically, the apparatus includes units configured to perform the method in the third aspect or any possible implementation of the third aspect. According to a seventh aspect, this application provides a packet processing apparatus. The device includes a processor, memory and a transceiver. The processor, memory and transceiver can be connected by using the bus system. The memory is configured to store one or more programs, and the processor is configured to execute one or more programs in the memory, so that the apparatus is enabled to complete the method in the first aspect or any possible implementation of the first aspect. According to an eighth aspect, this application provides a packet processing apparatus. The device includes a processor, memory and a transceiver. The processor, memory and transceiver can be connected by using the bus system. The memory is configured to store one or more programs, and the processor is configured to execute one or more programs in the memory, so that the apparatus is enabled to complete the method in the second aspect or any possible implementation of the second aspect. According to a ninth aspect, this application provides a packet processing apparatus. The device includes a processor, memory and a transceiver. The processor, memory and transceiver can be connected by using the bus system. The memory is configured to store one or more programs, and the processor is configured to execute one or more programs in the memory, so that the apparatus is enabled to complete the method in the third aspect or any possible implementation of the third aspect. According to a tenth aspect, this application provides a computer readable storage medium. The computer-readable storage medium stores program code. When the program code is executed on a computer, the computer is enabled to perform the method in the first aspect, the second aspect, the third aspect, any possible implementation of the first aspect, any possible implementation of the second aspect, or any possible implementation of the third aspect. According to an eleventh aspect, this application provides a computer program product that includes program code. When the computer program product is executed on a computer, the computer is enabled to perform the method in the first aspect, the second aspect, the third aspect, any possible implementation of the first aspect, any possible implementation of the second aspect or any possible implementation of the third aspect. According to a twelfth aspect, this application provides a packet processing system. The system includes the apparatus according to the fourth aspect and the apparatus according to the fifth aspect. Alternatively, the system includes the apparatus according to the seventh aspect and the apparatus according to the eighth aspect. In a possible implementation, the system further includes the apparatus according to the sixth aspect or the apparatus according to the ninth aspect. BRIEF DESCRIPTION OF THE DRAWINGS FIGURE 1 is a schematic diagram of a communication network architecture according to an embodiment of this application. FIGURE 2 is a schematic diagram of a structure of another network of RRRQnn / Z / nZ / E / YIAI communication in accordance with one modality of this request. FIGURE 3 is a schematic flowchart of a packet processing method according to an embodiment of this application. FIGURE 4 is a schematic diagram of a specific application of a method procedure according to an embodiment of this application. FIGURE 5 is a schematic diagram of a format of a type length value according to an embodiment of this application. FIGURE 6 is a schematic diagram of a format of a segment routing header according to an embodiment of this application. FIGURE 7 is a schematic diagram of a specific application of a method procedure according to an embodiment of this application. FIGURE 8 is a schematic diagram of a specific application of another method procedure according to an embodiment of this application. FIGURE 9 is a schematic diagram of a specific application of another method procedure according to an embodiment of this application. FIGURE 10 is a schematic diagram of a specific application of another method procedure according to an embodiment of this application. FIGURE 11 is a schematic diagram of a specific application of another method procedure according to an embodiment of this application. FIGURE 12 is a schematic diagram of a structure of a packet processing apparatus according to an embodiment of this application. FIGURE 13 is a schematic diagram of a structure of another packet processing apparatus according to an embodiment of this application. FIGURE 14 is a schematic diagram of a structure of another packet processing apparatus according to an embodiment of this application. FIGURE 15 is a schematic diagram of a structure of another packet processing apparatus according to an embodiment of this application. FIGURE 16 is a schematic diagram of a structure of another packet processing apparatus according to an embodiment of this application. FIGURE 17 is a schematic diagram of a structure of another packet processing apparatus according to an embodiment of this application. FIGURE 18 is a schematic diagram of a structure of another packet processing apparatus according to an embodiment of this application. FIGURE 19 is a schematic diagram of a structure of a packet processing system according to an embodiment of this application. FIGURE 20 is a schematic diagram of a structure of another system of RRRQnn / zznz / E / YiAi packet processing in accordance with an embodiment of this application. DETAILED DESCRIPTION OF THE MODALITIES The following further describes in detail the embodiments of this application with reference to the accompanying drawings. The terms included in this application are explained below. Segment routing header (SRH): An Internet Protocol version 6 (IPv6) packet includes a standard IPv6 header, extension headers (0...n), and a payload. useful (Payload). To implement SRv6 based on an IPv6 forwarding plane, a new IPv6 extension header is added, which is called the SRH extension header. The extension header specifies an IPv6 path and stores a plurality of IPv6 SIDs. The plurality of SIDs can form a Segment List, and the segment list has the same function as a segment routing multi-protocol label switching. SR-MPLS). A head node adds one or more SRH extension headers to the IPv6 packet, so that an intermediate node can forward the IPv6 packet based on the path information included in the SRH extension headers. For example, when the IPv6 packet is forwarded, a network device that supports SRv6 queries a local segment identifier table (local SID table) based on a destination address (DA) in the data packet. When the destination address in the data packet matches any SID in the local segment identifier table, according to a policy or function related to SID in the local segment identifier table, an operation corresponding to the policy or function. For example, the operation corresponding to the policy may be to forward the data packet through an output interface specified by the SID. If the destination address in the packet does not match any SID in the local segment identifier table, an IPv6 routing and forwarding table is additionally queried and the longest match forwarding is performed based on the routing and forwarding table of IPv6. A policy or function corresponding to a SID includes a forwarding path and / or a corresponding service. The forwarding path can include the End SID and End.X SID in the background, or another SID that has a forwarding or table lookup function. The service corresponding to the SID may include a function provided by a network device, for example, compression processing or encryption processing, or another function provided by another device connected through the network device, for example, services such as filtering anti-attack and traffic clearance provided by using a RRRQnn / zznz / E / YiAi firewall connected. In the above, there is also a case where a SID corresponds to both a forwarding path and a service. A network device only needs to perform processing operations on a packet based on a function that corresponds to the SID. In other words, the SID can be used to indicate the network device corresponding to the SID to perform a corresponding processing operation on the packet based on the SID. In embodiments of this request, the head node may insert one or more lists of segment identifiers, SIDs, into the packet, and the SID lists include at least two SIDs. One or more SID lists may be logically divided into a primary SID list and a secondary SID list. When there are still other SIDs in one or more SID lists that do not belong to the two lists, these SIDs can further be split as belonging to another SID list. In SRv6, a SID whose corresponding segment left (SL) has a smaller value in an SRH is considered later than a SID whose corresponding SL has a larger value. When a list of segment identifiers is represented by (SID 1, SID 2, SID 3), a front SID is considered to come before a back SID. For example, SID 1 is considered to be the 1st SID in the segment identifier list, SID 1 is adjacent to SID 2, SID 1 is before SID 2, SID 2 is adjacent to SID 1 and SID 3, SID 2 is before SID 3 and SID 3 is adjacent to SID 2. Therefore, SID 2 is after SID 1 and SID 3 is after SID 2. Primary SID List: One or more SIDs that must be protected and backed up in a packet's SID list are called the primary SID list. For example, when a list of segment identifiers is represented by (SID 1, SID 2, SID 3) and SID 3 is a backup of SID 2, that is, SID 2 is a SID that must be backed up, the SID 2 is considered as a list of primary SID. Secondary SID List: One or more SIDs for backup in a SID list of a packet are called secondary SID list. For example, when a list of segment identifiers is represented by (SID 1, SID 2, SID 3) and SID 3 is a backup copy of SID 2, SID 3 is considered a secondary SID list. Non-executed SID: In SRv6, a SID that corresponds to a destination address and a following SID that are in a primary SID list are considered non-executed SIDs. For example, the primary SID list is (SID 1, SID 2, SID 3). When a network device receives a packet and a SID that corresponds to a destination address of the packet is SID 2, non-executed SIDs include SID 2 and SID 3. In SR-MPLS, because SIDs (i.e., labels) in a list of segment identifiers, a primary list of segment identifiers at the top of a stack in an MPLS packet header can be considered a non-executed SID. For example, RRRQnn / zznz / E / YiAi When a head node sends the packet to a next hop device of the head node and the primary list of segment identifiers is (SID 1, SID 2, SID 3), non-executed SIDs include SID 1, SID 2, and SID 3. After the packet is processed by a network device that corresponds to SID 1, the primary list of segment identifiers can be changed to (SID 2, SID 3), and the SIDs not executed include SID 2 and SID 3. A target SID is one or more of the above non-executed SIDs, i.e. it can be SID 2, SID 3 or both SID 2 and SID 3. Generally, the target SID can be the 1st SID of the SIDs. not executed, that is, SID 2. A network device on a forwarding path indicated by the segment identifier list may determine the reachability of the SID in the primary SID list by actively determining whether a network device corresponding to the Target SID is reachable. Alternatively, when the target SID corresponds to a service, a network device corresponding to the target SID may determine the availability of the service, to determine the availability of the primary SID list. Primary Forwarding Path: A forwarding path indicated by the primary SID list above is called a primary forwarding path, and the forwarding path may alternatively include only one network node. Secondary forwarding path: A forwarding path indicated by the secondary SID list is called a secondary forwarding path, and the forwarding path may alternatively include only one network node. Primary end-to-end forwarding path: A forwarding path that corresponds to a primary list of segment identifiers or a forwarding path that corresponds to a list of SIDs other than a list of secondary SIDs is called a primary end-to-end forwarding path. to end, and the forwarding path may alternatively include only one network node. Secondary end-to-end forwarding path: A forwarding path other than a path indicated by a primary SID list in the SID lists is called a secondary end-to-end forwarding path, and the forwarding path may alternatively include only one Network node. The following describes a definition of a SID using an example. See Table 1. A SID defined in SRv6 can include three parts, and the three parts include a locator part, a function part, and an argument part. Table 1 RRRQnn / zznz / E / YiAi Locator Function Argument The locator part is used to route a packet to a network device that corresponds to the SID, to implement network addressing. The locator part has two important attributes: route and add. A length of the locator part in the SID is variable. The function part is used to represent an action that will be performed when using an instruction and is equivalent to the opcode of a computer instruction. In the SRv6 network, any processing operation can be represented by the function part or by the entire SID. Optionally, the death part in the SID is a random number assigned by a network device that executes the instruction and does not imply that a specific function is performed when using the instruction. Instead, the specific function to be performed by using the SID is determined by using the random number. The argument part is an argument, a service, or any other related information required for the execution of instructions. For example, a statement is defined to fragment a packet and the argument part carries a fragment length of the packet. In the SRv6 SID definition, the argument part is also optional. In other words, the SID may not include the argument part. In SR-MPLS, a SID is processed as a label, and a network device can also forward a packet or provide a corresponding service based on the label. Because SR-MPLS is similar to SRv6, details are not described again here. The following describes an application scenario of this request by using an example. FIGURE 1 is a schematic diagram of a communication network according to one embodiment of this application. In the communication network shown in FIGURE 1, network devices 1,2, 3, 4, 5, 6, 7 and 8 are located on the same communication network. The communication network may be an SRv6 network, an SR-MPLS network, or the like. Network device 1 connects to network device 2 and network device 6. Network device 2 connects to a service device 9 and network device 3. Network device 3 connects to network device 2 and network device 4. Network device 4 connects to network device 3 and network device 5. Network device 5 connects to network device 4 and network device 8. Network device 8 connects to network device 5 and network device 7. Network device 7 connects to network device 6 and network device 8. In the network, optionally, there is a control device or a computing element trajectory, and the control device or the trajectory calculation element may be connected to all network devices. Network devices 1,2, 3, 4, 5, 6, 7 and 8 can be router devices, or they can be switches or any other devices that have an SR function. One form of the device may be a physical appliance device, or it may be a virtualized device that has an SR function. The network device 3 may be a device that supports the SR function or a device that does not support the SR function. In other words, in the SR network, not all devices must support the SR function, and RRRQnn / zznz / E / YiAi should only support a normal routing or switching function if the SR function is not supported. This is not specifically limited in this application. A person skilled in the art may know that there may be more or fewer network devices in the communication network. For example, there may be dozens, hundreds of, or more network devices. A number of network devices and a type of device are not limited in the embodiments of this application. In the SR network, network device 1 may be configured as a head node of a forwarding path of the network, and network device 5 may be configured as a tail node of the forwarding path. Network device 1 includes a SID 1, network device 2 includes a SID 2, network device 4 includes a SID 4, network device 5 includes a SID 5, network device 6 includes a SID 6, The network device 7 includes a SID 7, and the network device 8 includes a SID 8. These SIDs include SIDs that correspond to paths / forwarding nodes, for example, SID 4, SID 5, SID 6, SID 7 and SID 8, and further include a SID corresponding to a service, for example, SID 2. Network device 2 may provide a corresponding service for a packet by using SID 2, and the service may be packet compression or similar. The network device 2 may further send the packet to the service device 9 by using the SID 2, to provide a service for the packet, for example, traffic cleaning or virus filtering. When network device 2 provides a service for a packet received by using service device 9, network device 2 sends the packet to service device 9. Service device 9 receives the packet, processes the packet based on a service provided by service device 9 and sends a processed packet to network device 2. For example, the service device 9 is assumed to be a firewall device, and the service provided by the firewall device 9 for a packet will perform anti-attack filtering on the packet. Network device 2 sends the packet to firewall device 9. Firewall device 9 performs anti-attack filtering on the packet and then sends a filtered packet to network device 2. The head node in the communication network, that is, the network device 1, may directly generate a first packet, where the first packet includes a list of segment identifiers indicating a forwarding path; and then send the first packet on the communication network, where the first packet may be a fault detection packet, a probe packet, or the like. Alternatively, after receiving a first packet sent by another device, for example, a customer edge (CE) device, network device 1 inserts a list of segment identifiers into the first packet after determining a path forwarding that corresponds to the first package, RRRQnn / zznz / E / YiAi to guide the forwarding of the first packet in the segment routing network. When the network shown in FIGURE 1 is SRv6, network device 1 can add a new IPvB header and a new SRH header to the first packet. The SRH includes the list of segment identifiers, and a destination address (DA) in the IPv6 header is the 1st SID in the list of segment identifiers, that is, a SID whose corresponding SL has the largest value . Optionally, the first package includes a plurality of SRHs. In other words, network device 1 adds the plurality of SRHs to the first packet, and each SRH includes one or more lists of segment identifiers. An example is as follows: Network device 1 can obtain a list of segment identifiers 1, for example, (SID 2, SID 4, SID 5), where a forwarding path indicated by the list of segment identifiers 1 is network device 2 - > network device 4 -> network device 5; and a list of segment identifiers 2, for example, (SID 6, SID 7, SID 8, SID 5), where a forwarding path indicated by the list of segment identifiers 2 is network device 6 -> device network device 7 -> network device 8 -> network device 5. Network device 1 can insert segment identifier list 1 or segment identifier list 2 into the first packet to guide the forwarding of the packet in the segment routing network. It should be noted that one or more SIDs in the segment identifier list 1 or in the segment identifier list 2 may not be available. In an SR-related technology, in a process of forwarding a packet through a network device in an SR network, when it is determined that a network device corresponding to a destination SID that corresponds to the packet to be sent over the network device is unreachable, a next SID can be selected from the destination SID, and the packet is sent based on the next SID. For example, when the list of segment identifiers inserted by network device 1 in the first packet is (SID 2, SID 4, SID 5), and network device 2 corresponding to SID 2 is unreachable, the segment identifier Network 1 can send the first packet based on the next SID in the SID list, that is, SID 4. However, when the unreachable SID is the last SID in the SID list, for example, when the network device 4 needs to forward the first packet to network device 5, the destination SID is SID 5. However, because the next SID does not exist in the segment identifier list, network device 4 cannot obtain a new SID. In this case, only best effort forwarding can be performed. Consequently, the forwarding of the first packet is affected, a transmission delay of the first packet may be long, or even the forwarding of the packet is interrupted or the packet is discarded, resulting in low reliability of the routing network. of segments. Specifically, SRv6 is used as an example. The head node receives the first packet and adds an IPv6 header and an SRH to the first packet. The SRH includes a list of segment identifiers and a value of SL, the list of segment identifiers includes the SIDs of n network devices and n is an integer greater than 0. The n network devices are devices other than the head node which pass a forwarding path used to transmit the first packet in the communication network, or may include the head node. An initial SL value is equal to n—1, and a DA of the IPv6 header is the 1st SID in the list of segment identifiers. The head node processes the first packet based on the DA, for example, it sends the packet to a network device that corresponds to the DA. For any other network device (which may be called the first network device) through which the forwarding path indicated by the list of segment identifiers passes, the first network device receives a second packet. If the first network device is not a last-hop device in the forwarding path, before forwarding the packet, the first network device sets SL-SL-1 on the packet, reads a SID from the list of segment identifiers of the packet based on the updated SL value and then sends the packet based on the SID. If the first network device is a last-hop device in the forwarding path and may also be called a tail node, the first network device removes the SRH from the second packet, including content such as the segment identifier list and the SL and removes the new IPv6 packet header added by the header node, or obtains an original destination address based on the first original packet and sends the first packet based on the destination address. When the first network device is not the wave node of the forwarding path, after obtaining a SID of a second network device, the first network device detects that the second network device is in error. In this case, the first network device can continue by setting SL=SL-1 in the second packet, then read, based on the SL, a SID from a next-hop device (which is called a third network device) of the second device. from the list of segment identifiers included in the second packet, and sends the second packet based on the SID of the third network device. In this way, the second network device can be bypassed. However, if the second network device is the last hop device in the transmission path, when the second network device fails, because the list of segment identifiers in the second packet does not include the SID of the third device network, a delay of sending the second packet by the first network device is long, or even the packet is discarded. In the above, when a SID is not available, a pre-hop device in a forwarding path may bypass the unavailable SID to send a packet. However, when the unavailable SID corresponds to a service, it indicates that the service is provided, and omitting the unavailable SID means that the service is omitted. For some services, the importance of services may be high. Even when there is an unavailable SID in the first packet, services are not expected to be bypassed. Alternatively, when the last SID in the plurality of SIDs of the first packet is not available, it is still expected that a long transmission delay, packet loss or the like of the first packet can be avoided as far as possible, to avoid the impact in a service that corresponds to the package. This request provides a means to resolve the technical issue. To be specific, a head node obtains a plurality of segment identifier lists, where the plurality of segment identifier lists include a primary SID list and at least one secondary SID list, at least one secondary SID list includes a first secondary SID list, and the list is a backup of the primary SID list. The plurality of segment identifier lists herein are simply used to divide a plurality of segment identifiers. In the present application, the plurality of segment identifiers may belong to the same list of segment identifiers, and there is no real distinction between a primary list of segment identifiers and a secondary list of segment identifiers. The first secondary SID list being a backup of the primary SID list means that a service that corresponds to a SID in the first secondary SID list is a backup of a service that corresponds to a SID in the Primary SID, or a forwarding path indicated by the first secondary SID list is a backup copy of a forwarding path indicated by the primary SID list. In this way, when one or more SIDs in the primary SID list are not available, the service that corresponds to the SID included in the first secondary SID list can be used to continue processing the first packet. This applies to the scenario shown in FIGURE 1. Network device 1 can add both segment identifier list 1 and segment identifier list 2 to the packet, and a segment identifier list can be registered as (SID 2 , SID 4, SID 6, SID 7, SID 8, SID 5). The segment identifier list can be logically divided into a primary SID list: (SID 2, SID 4), a first secondary SID list (SID 6, SID 7, SID 8) and another SID list (SID 5). In this case, a primary forwarding path indicated by the primary SID list is network device 2 -> network device 4, a secondary forwarding path corresponding to the first secondary SID list is network device 6 -> network device 7 -> network device 8, a primary end-to-end forwarding path is network device 2 -> network device 4 -> network device 5, and a forwarding path secondary end-to-end is network device 6 -> network device 7 -> network device 8 -> RRRQnn / zznz / E / YiAi network device 5. In this way, when the primary forwarding path indicated by the primary SID list is in error, the packet can be sent based on the secondary forwarding path indicated by the secondary SID list . In the above, network device 2 and network device 4 can be regarded as intermediate nodes in the primary end-to-end forwarding path, and network device 5 can be regarded as a tail node in the primary forwarding path end to end. In the above, when the segment identifier list is encapsulated in the packet, the primary SID list is adjacent to the secondary SID list and the first SID in the secondary SID list is after the last SID in the SID list primary. The primary SID list can also be considered to be a presequence list of the secondary SID list. In an SRv6 packet, an SL value corresponding to the first SID in a list of secondary SIDs is equal to an SL value corresponding to the last SID in a list of primary SIDs minus 1. A detailed implementation process for processing the packet based on the first secondary SID list when the SID in the primary SID list is not available, is described in detail in a subsequent embodiment shown in FIGURE 3, and is not described herein. Optionally, at least one secondary SID list further includes a second secondary SID list, and the second secondary SID list is a backup copy of the first secondary SID list and / or the second secondary SID list is a copy of security of the primary SID list. Optionally, the plurality of SID lists further includes another primary SID list and another secondary SID list. The other primary SID list is a presequence list of the other secondary SID list, the other primary SID list is after the M secondary SID lists and the other secondary SID list is a backup of the other primary SID list. Optionally, the first packet may include a plurality of primary SID lists and at least one secondary SID list corresponding to each primary SID list. For example, FIGURE 2 is a schematic diagram of an architecture of another communication network according to an embodiment of this application. In the network, a network device 1 connects to a network device 2, a network device 4, and a network device 6; network device 2 connects to network device 3 and network device 1; network device 4 connects to network device 1 and a network device 5; the network device 6 connects to the network device 5 and a network device 7; network device 3 connects to network device 2 and a network device 8; network device 5 connects to network device 4 and network device 8; network device 7 connects to network device 6 and network device 8; a network device 9 connects to a network device 12 and the device Network 8 RRRQnn / zznz / E / YiAi; a network device 10 connects to the network device 12 and the network device 8; and a network device 11 is connected to the network device 12 and the network device 8. A list of SIDs (SID 2, SID 3, SID 4, SID 5, SID 6, SID 7, SID 8, SID 9) may be displayed. , SID 10, SID 11, SID 12) into a first packet generated by network device 1 in the figure, and can be logically divided into a first primary SID list (SID 2, SID 3); at least one secondary SID list including a first secondary SID list (SID 4, SID 5) and a second secondary SID list (SID 6, SID 7), where the first secondary SID list is a backup of the first primary SID list, and the second secondary SID list is a backup copy of the first primary SID list and / or the first secondary SID list; other SID list (SID 8); a second primary SID list (SID 9), where at least one secondary SID list corresponding to the second primary SID list includes a first secondary SID list (SID 10) and a second secondary SID list (SID 11) , the first secondary SID list (SID 10) is a backup of the second primary SID list, and the second secondary SID list is a backup of the second primary SID list and / or the first list of Secondary SID (SID 10); and another SID list (SID 12). A network device that corresponds to a primary SID in the primary SID list (which is called a primary network device for ease of description) and a network device that corresponds to a secondary SID in the first secondary SID list (which is called called secondary network device for ease of description) can be the same network device or different network devices. A service that corresponds to the primary SID on the primary network device is the same as a service that corresponds to the secondary SID on the secondary network device. In this way, the service that corresponds to the secondary SID is a backup copy of the service that corresponds to the primary SID. See FIGURE 3. One embodiment of this request provides a packet processing method. The method can be applied to a communication network provided in any of the embodiments of FIGURE 1, FIGURE 2 and FIGURE 7, FIGURES, FIGURE 9, FIGURE 10 and FIGURE 11, and includes the following steps. S101: A first network device obtains a plurality of SID lists, where the plurality of SID lists includes a primary SID list and at least one secondary SID list, the at least one secondary SID list includes a first SID list secondary, and the first secondary SID list is a backup of the primary SID list. The first network device may be a head node in a forwarding path that is located in an SR network and is used to transmit a corresponding packet. The first network device may obtain the plurality of SID lists before sending the packet or after receiving a corresponding route advertised by another device on the network. The first network device may obtain the plurality of SID lists from the following RRRQnn / zznz / E / YiAi first form and second form. In the first form, the first network device receives a message sent by a control device, where the message includes the plurality of SID lists, and the plurality of SID lists includes the primary SID list and at least one list of Secondary SID. The message is used to instruct the first network device to process, based on the plurality of SID lists, a packet received by the first network device. In the first form, the message may be a response message sent by the control device to the first network device based on a forwarding path (i.e., a list of segment identifiers) requested by the network device to reach a destination address, or may be sent by the control device to the first network device after the control device obtains a list of segment identifiers based on preconfigured information. The control device may determine, based on the destination address and a topological structure of the segment routing network, the forwarding path used to transmit the service, determine the N SIDs in the forwarding path, and determine the N SIDs as the list of primary SIDs, where N is an integer greater than 0. For the primary SID list, the control device determines at least one secondary SID list that corresponds to the primary SID list. The primary SID list and at least one secondary SID list may be calculated by the controller, or may be preconfigured on the control device by an administrator. After determining the plurality of SID lists (including the primary SID list and the secondary SID list) corresponding to the corresponding forwarding path, the control device sends the information to the first network device. The information may be sent by the control device to the first network device at one time, or it may be sent to the first network device at a plurality of times. For example, see FIGURE 1. The control device obtains a source IP address and a destination IP address, and determines the forwarding path based on the source IP address and the destination IP address. used to transmit the packet. The SIDs that the forwarding path passes through include SID 1 of network device 1, SID 2 of network device 2, SID 4 of network device 4, and SID 5 of network device 5. It is assumed that The administrator has established a forwarding path that is to be protected on these SIDs such as (SID 2, SID 4). In this case, the controller obtains a secondary SID list that corresponds to the primary SID list, where the secondary SID list is (SID 6, SID 7, SID 8), and the control device can send the information to the device network 1. The control device can store the SIDs of all network devices in RRRQnn / zznz / E / YiAi the segment routing network. The network device in the segment routing network may advertise at least one SID of the network device to the control device, and may also receive a SID that is from the network device and that is configured by the control device. Optionally, the network device announces the SID to the control device in the following Form 1 to Form 3. Form 1 to Form 3 are, respectively, as follows: Way 1: The network device sends an advertising packet to the control device, where the advertising packet carries at least one SID of the network device. The advertising packet may be a border gateway protocol (BGP) packet, a border gateway protocol Ethernet virtual private network (BGP EVPN) packet, or a border gateway protocol Ethernet virtual private network (BGP EVPN) packet. or an interior gateway protocol (IGP) packet. This is not specifically limited in this application. Optionally, at least one SID of the network device is carried in a type length value (TLV) of the advertising packet. The TLV is an encoding format, and is primarily defined by using three types of information: a type field (type), a length field (length), and a value field (valué). A schematic diagram of the TLV format is shown in FIGURE 5. The type field in the figure identifies a type of the TLV, a value of the type field can identify that the TLV is a TLV used to advertise the SID, and the value The type field can be a newly applied type to advertise the SID, for example it can be 90. A value of the length field identifies a length of the TLV. The value field is used to carry at least one SID of the network device. Way 2: The network device can advertise at least one SID of the network device to the control device by using a border gateway protocol-llnk state (BGP-LS) link state. Form 3: The network device may advertise at least one SID of the network device to the control device by using a path computation element communication protocol (PCEP). Optionally, the control device is a controller or a path computation element (PCE), and may also be called a path computation unit. Optionally, the message sent by the control device to the first network device further includes a packet feature and / or a routing feature. For example, the message also includes the destination IP address, and the destination IP address can be regarded as the routing characteristic. The package feature can RRRQnn / zznz / E / YiAi be information such as a packet priority. The message is further used to instruct the first network device to process, based on the plurality of SID lists, a packet that conforms to the packet characteristic or the routing characteristic. For example, after receiving the packet that conforms to the packet characteristic or the routing characteristic, the first network device adds the plurality of segment identifier lists to the packet. Optionally, the message further carries the location indication information, and the location indication information is used to indicate one or more of the following: a location of the primary SID list in the plurality of SID lists, a location of the first secondary SID list in the plurality of SID lists, and a location of at least one secondary SID list in the plurality of SID lists. The location indication information may indicate the above information in a plurality of ways, for example, a location of the last SID of the primary SID list in the plurality of SIDs, a location of the 1st SID of the first secondary SID list in the plurality of SIDs, or a location of the 1st SID in the primary SID list in the plurality of SIDs, a number of SIDs in the primary SID list, and a number of SIDs in at least one secondary SID list. In this way, the network device can determine the location of the primary SID list, the location of the first secondary SID list, or the location of at least one secondary SID list based on the information. Generally, when the network device determines the location, the network device mainly determines the location of the last SID of the primary SID list, the location of the 1st SID of the first secondary SID list, and a location of the last SID of at minus a list of secondary SIDs. The information can be sent by the control device to the first network device using the same message, or it can be sent by the control device using different messages. When the control device sends the information to the first network device by using a plurality of messages, the control device further sends associated information of the information to the first network device, and associates the content by using the association information. After receiving the information, the first network device may assemble the plurality of segment identifier lists according to an SRv6 rule or an MPLS rule when a first packet is generated. In the second form, the first network device may automatically calculate a forwarding path to obtain the plurality of SID lists. For example, the form applies to the network shown in FIGURE 1. When network device 5 advertises a route to network device 1, network device 1 can automatically calculate a forwarding path after receiving the route. RARQnn / zznz / E / YiAi S102: The first network device generates the first packet, where the first packet includes the plurality of SID lists, the plurality of SID lists includes the primary SID list and at least one secondary SID list, at least one list of Secondary SID includes the first secondary SID list, and the first secondary SID list is a backup of the primary SID list. Optionally, the first network device may directly generate the first packet. For example, the first network device generates a failure detection packet. Optionally, the first network device receives a second packet, and generates the first packet based on the second packet. The first network device receives the second packet, and adds a packet header to the second packet to obtain the first packet, where the packet header includes the plurality of SID lists. In this case, the second packet can be a payload of the first packet. In one example, in an SRv6 network, the first network device adds an SRH to the second packet to obtain the first packet. Refer to an SRH format shown in FIGURE 6. The SRH includes information such as a list of segment identifiers and a SL, the list of segment identifiers includes the plurality of SID lists, and the SIDs in the plurality of lists of SIDs are transported separately in a segment list [n] to a segment list [0]. Alternatively, the first network device may add a plurality of SRHs to the second packet, and each SRH includes a list of segment identifiers. For example, a primary SID list is placed in the 1st SRH, and a secondary SID list is placed in the 2nd SRH. A format of each SRH is shown in FIGURE 6. Optionally, the first network device may further add a new IPv6 packet header to the first packet, and a DA in the new IPv6 packet header is the first SID in the list of segment identifiers. Optionally, the first network device may modify a DA in an original IPv6 packet header of the packet to the first SID in the segment identifier list. In another example, in SR-MPLS, the first network device adds an MPLS packet header to the second packet, to obtain the first packet. The MPLS packet header includes a label stack, and the label stack includes the plurality of SID lists. Optionally, the first packet includes the location indication information. The location indication information is used to indicate one or more of the following: the location of the primary SID list in the plurality of SIDs, the location of the first secondary SID list in the plurality of SID lists, and a location of at least one secondary SID list in the plurality of SID lists. RRRQnn / zznz / E / YiAi For detailed descriptions of location information, please refer to the above descriptions for sending the control message to the network device by the control device. The details are not described again here in this application. The first network device may directly encapsulate, in the first packet, the received location indication information sent by the control device, or may determine the location indication information based on the encapsulation of an SRH header by the first device. network, and then encapsulate the location indication information in the first packet. By encapsulating the first packet, the first network device encapsulates the location information in the packet. The information may be used to point the network device in the forwarding path indicated by the plurality of SID lists to determine the location of the primary SID list, the location of the first secondary SID list, or the location of at least a list of secondary SIDs. The main objectives are as follows: 1. When the network device determines that a forwarding path or service corresponding to any SID in the primary SID list is not available, after obtaining the first SID (which is later referred to as first secondary SID to abbreviate the subsequent description) in the first secondary SID list, the network device omits a non-executed SID in the primary SID list, forwards the packet, or provides a corresponding service for the packet by using the first Secondary SID, and forwards the packet based on the first secondary SID list. 2. When a service or a network device corresponding to the last SID in the primary SID list is available, and a function corresponding to the SID can be executed successfully, the network device may omit a SID in at least one secondary SID list, to obtain a SID after at least one secondary SID list in the plurality of SID lists, and forward the packet or provide a corresponding service for the packet based on the SID. 3. When the last SID in the primary SID list is the last SID in an end-to-end primary forwarding path, that is, when the network device corresponding to the SID is a tail node in the primary forwarding path end-to-end, when the service or network device corresponding to the SID is available, and the function corresponding to the SID can be executed successfully, the network device can omit the SID in at least one secondary SID list and resend the package. In some scenarios, for example, when the primary SID list includes only one SID, and at least one secondary SID list includes only the first secondary SID list, the location indication information may be only the SID in the list of Primary SID. When the SID is not available, the network device can use a method of related technology to obtain a next SID, that is, a SID in the first SID secondary RRRQnn / zznz / E / YiAi, and forward or provide a corresponding service based on the SID. When the SID is available, after the SID can be executed without a failure, the first secondary SID list can be omitted based on the SID, to obtain the 1st SID after the first secondary SID list in the plurality of SID lists, and the packet is processed based on the 1st SID after the first secondary SID list. When the first secondary SID list is the last list of the plurality of SID lists, the SID of the primary SID list may be a special SID, and the SID has a function to indicate the network device that corresponds to the SID for remove an SRH header. In this case, it is not necessary to further determine whether there is another SID in the plurality of SID lists or determine the locations of the primary and secondary SID list. Instead, the SRH header is directly removed, and then the plurality of SID lists are removed. Optionally, the location indication information includes the last SID in the primary SID list and / or the 1st SID in the non-executed SIDs in the primary SID list. In the following, the network device determines the first secondary SID based on the SID in the following plurality of ways. 1. The network device may search the network device for a match between an identifier of the SID and the first secondary SID or a location difference between the identifier of the SID and the first secondary SID based on the SID. The location difference can be understood as a number of SIDs after the SID in the primary SID list, or it can be understood as a difference between an SL value of the first secondary SID and an SL value of the SID. The first secondary SID is obtained based on the location difference. 2. The SID directly carries the location difference information, so that the network device can obtain the first secondary SID based on the location difference information. In one example, the location difference information may be carried in one argument part of the SID, or indeed, it may be carried in another part of the SID. This is not specifically limited in this application. In an SRv6 example, a value of the last SID in a list of primary SIDs may be A2::1:1, where A2 is a locator, ::1 is a function that corresponds to End.x, and :1 is Argu , indicating that SL-2 is required. In this way, a network device that corresponds to the SID can accurately bypass a secondary SID when using SL-2. Optionally, the location indication information may also include the SID in at least one secondary SID list. The network device may obtain, based on the SID of at least one secondary SID list, the SID following at least one secondary SID list, or determine, based on the SID of the first secondary SID list, the 1st SID of a backup secondary SID list that provides a backup for the first secondary SID list. The way the network device obtains a related SID based on the SID of at least one secondary SID list is similar to the way the network device obtains the first secondary SID based on the SID of the primary SID list . Details are not described again herein. Optionally, the location information may alternatively be in the metadata of an SRH of the first packet. A format of the metadata may be shown as TLV in FIGURE 5. The type field in the figure identifies a type of the TLV, a value of the type field may identify that the TLV is a TLV used to carry location indication information , and the value of the type field may be a newly applied type for location indication information, for example, it may be 91. A value of the length field identifies a length of the TLV. The value field may be used to indicate the location of the first SID in the first secondary SID and / or the location of the last SID in at least one list of secondary SIDs and / or a location of the SID after at least one list of secondary SIDs. . In an example, a metadata value that is m5b3 can be understood as a value of an SL that corresponds to the last SID in the primary SID list is 5, and a value of an SL that corresponds to the last SID in at least one list of secondary SID is 3. Herein, m is an abbreviation of a primary forwarding path, and b is an abbreviation of a secondary forwarding path. Alternatively, another way can be used such as defining, in the metadata, that different bits correspond to different forwarding paths. The manner of carrying location indication information in the metadata is not limited in this application. In this embodiment of this application, the location indication information may alternatively be a combination of the two or three of the above. To be specific, the location information to be determined may be indicated in a metadata manner + the tail SID in the primary SID list, a metadata manner + the SID in the first secondary SID list, or any other variable manner. , to get the corresponding first secondary SID or the 1st SID after at least one list of secondary SIDs. Optionally, at least one secondary SID list in the first packet further includes a second secondary SID list, and the second secondary SID list is a backup of the first secondary SID list and / or the second secondary SID list is a backup of the primary SID list. S103: The first network device sends the first packet to a second network device. When a first SID of the plurality of segment identifier lists is a SID of the second network device, the first network device sends the first packet to the second network device based on the SID. When the first SID is a SID of the first network device, and the first SID is not the last SID in a primary forwarding path that corresponds to the list of segment identifiers, the first network device provides a service that corresponds to the first SID for the first packet based on the first SID that is determined to be available. Furthermore, the first network device obtains a next SID from the first SID, and sends the first packet to the second network device based on the next SID. In the SRv6 network, the first network device obtains a SID that corresponds to the value of SL minus 1, sets the content carrying a destination address field of the first packet to the SID, and sends the first packet based on the SID. When the communication network is the SR-MPLS network, after skipping a SID at the top of the label stack of the first packet, the first network device sends the first packet based on a new SID at the top of the battery. In the above, the SID that corresponds to the DA in the packet header in the SRv6 network and the SID at the top of the label stack in the SR-MPLS network, each can be referred to as a first SID of destiny. The first destination SID may be a SID in the primary SID list, or it may not be a SID in the primary SID list. At this stage, when the first destination SID is a SID from the primary SID list, the first network device considers the first destination SID as a target SID before sending the first packet. Determines whether the first destination SID is available. The first destination SID that is available includes that a service corresponding to the first destination SID is available, or the first destination SID is reachable. When the first destination SID belongs to the first network device, that is, the first destination SID is the SID of the first network device, and the first destination SID corresponds to a service, the service corresponding to the first destination SID not available includes that the first network device determines that a resource required by the service cannot be provided, or that the first network device cannot provide a function required by the service. Otherwise, the service corresponding to the first destination SID is considered available. In other words, the first network device can execute the first target SID without a failure. The first destination SID that is unreachable includes that when the first destination SID is used as a destination address, the first network device determines that a route to the destination address is unreachable, or any network device or link between the first network device and destination address is wrong. When the first destination SID is available, the first network device RRRQnn / zznz / E / YiAi can send the first packet based on the first destination SID, that is, use the first destination SID as the destination address to send the first packet. For example, FIGURE 4 shows a specific example in which the method mode of this request is applied to the network scenario shown in FIGURE 1. Upon determining that SID 2 is available, the first network device sets the content in the destination address (DA) field of the first packet to SID 2, and sends the first packet to network device 2 that corresponds to SID 2. The network device in the SR network may be configured by default to process the packet based on the SID that corresponds to the destination address in the first packet or based on the availability of the first SID. In other words, in this case, the network device does not need to determine whether these SIDs are in the primary SID list. For example, see FIGURE 4. Assume that when SID 2 is determined to be available, network device 1 sends the first packet to network device 2 by using SID 2 as the destination address. A packet header may be shown briefly as Φ, and a list of segment identifiers in the packet header of the packet is (SID 2, SID 4, SID 6, SID 7, SID 8, SID 5), where a list of SIDs primary is (SID 2, SID 4), a secondary SID list is (SID 6, SID 7, SID 8), and another SID list is (SID 5). A primary forwarding path indicated by the primary SID list can be considered to be network device 2 -> network device 4. It can be learned from the network topology that the primary forwarding path also passes through the device network 3. In other words, the primary forwarding path can also be understood as network device 2 -> network device 3 -> network device 4. A secondary forwarding path indicated by the secondary SID list is network device 6 -> network device 7 -> network device 8. An end-to-end forwarding path is network device 1 -> network device 2 -> network device 4 -> network device 5 or network device 1 -> network device 2 -> network device 3 -> network device 4 -> network device 5. Network device 2 receives the first packet. In this case, the SL value in the first packet is 5. When determining whether the target SID is available, the first network device may use one or more SIDs from the primary SID list as the target SIDs. In this scenario, the network device needs to learn in advance which SIDs in the segment identifier list are SIDs in the primary SID list and which SIDs are SIDs in the secondary SID list. For example, in FIGURE 4, network device 1 can also use SID 4 as the target SID, and send the first packet to network device 2 based on SID 2 after determining that both SID 2 and SID 4 are accessible or only SID 4 is RRRQnn / zznz / E / YiAi accessible. For a case where the first destination SID is a SID from the primary SID list and the first destination SID is not available, see the descriptions of S104. No details are described herein. S104: The second network device receives the first packet and processes it based on whether the target SID is available. The target SID may be one or more SIDs in the list of primary segment identifiers in the packet when the second network device receives the first packet. Having the second network device process the first packet based on whether the target SID is available includes the following plurality of different solutions: Solution 1: When the second network device is a device upstream of the SID not executed in the primary SID list in the forwarding path indicated by the plurality of SID lists, the second network device receives the first packet, and obtains a second SID destination of the plurality of SIDs in the first packet, where the second destination SID is the 1st SID in the primary SID list. The upstream device includes an intermediate node or a head node in the end-to-end primary forwarding path indicated by the plurality of SID lists, or a network device through which the primary forwarding path passes. The target SID may include the second target SID, and may also include another SID in the primary SID list. When the target SID is available, the second network device sends the first packet to a third network device based on the second destination SID, where the third network device is a network device that corresponds to the second destination SID. The following explains a concept of the device upstream of the primary SID list with reference to FIGURE 4. As shown in FIGURE 4, the primary SID list in the network is (SID 2, SID 4). When network device 2 receives the first packet, SID 2 and SID 4 are unexecuted SIDs. In this case, the first network device can be considered as an upstream device that corresponds to the non-executed SIDs (SID 2 and SID 4). When network device 4 receives the first packet, SID 4 is a non-executing SID, and the second network device and the third network device can be considered as devices upstream of the non-executing SID (the SID 4). In one example, the communication network is the SRv6 network. When a device corresponding to the destination address of the first packet is the second network device, the second network device provides, based on the destination address of the first packet, a service corresponding to the SID of the destination address for the first package. RRRQnn / zznz / E / YiAi When the SID is a SID that includes a forwarding guidance function, for example, a node SID or a link SID, after receiving the first packet, the second network device reads, based on SL=SL-1, a SID corresponding to the SL value of the segment list as the second destination SID, uses the second destination SID as a destination address of the first packet, and sends the first packet based on the destination address. In another example, the communication network is the SRv6 network. When the network device corresponding to the destination address of the first packet is the third network device, and the network device 3 shown in FIGURE 4 receives the packet, the destination address of the packet is SID 4. In this In this case, network device 3 can process the first packet based on whether SID 4 is reachable. If SID 4 is reachable, network device 3 sends the first packet based on SID 4. If SID 4 is unreachable, network device 3 can obtain a SID that corresponds to SL minus 1, and send the first packet to network device 6 by using the SID as a destination address. In this case, network device 3 has to be a device that supports SR. When the communication network is the SR-MPLS network, the first packet received by the second network device includes the label stack. In this case, the SID at the top of the tag stack is the SID of the second network device. The second network device extracts the SID at the top of the label stack, provides a service that corresponds to the SID for the first packet based on the SID, and uses a SID currently at the top of the stack as the second SID. of destiny. Optionally, before the second network device determines whether the target SID is available, the second network device receives a configuration instruction sent by the control device, a management device, or the administrator through a management interface , and performs, based on the configuration statement, a processing action on the first packet by determining whether the target SID is available. The configuration instruction herein may be a configuration delivered by the administrator when the administrator turns on a switch of a function that is of the network device and that corresponds to this mode of this request. In this case, the configuration instruction can also be sent to all other devices in the segment routing network. This is not limited in this application. Optionally, when the second network device is the upstream device of the primary SID list, an operation of processing, by the second network device, the first packet based on whether the second destination SID is available includes the following operations in S1041 to S1043. S1041: The second network device determines whether the target SID is available. In this step, the second network device determines whether the target SID, that is, the second destination SID, is accessible to the second network device; and when the second destination SID is reachable by the second network device, determines that the second destination SID is available; or when the second destination SID is inaccessible to the second network device, determines that the second destination SID is not available. The second destination SID being inaccessible to the second network device includes that when the second destination SID is used as a destination address, the second network device determines that a route to the destination address is inaccessible, or that any device network or link between the second network device and the destination address is faulty. The second destination SID corresponds to a network device, which is called the third network device for ease of description. The route from the second network device to the destination address that is unreachable means that a route from the second network device to the third network device is unreachable. Alternatively, any network device or link between the second network device and the destination address that is in error means that any network device through which a link between the second network device and the third network device passes is in error, or a link between any two network devices through which the link passes is in error. Optionally, by using an egress local interface state or a link state of the second network device, the second network device senses whether any network device over which the link between the second network device and the third network device passes. network is faulty, or if the link between any two network devices through which the link passes is faulty. Alternatively, by using a detection protocol, the second network device detects whether any network device over which the link between the second network device and the third network device passes is faulty, or whether the link between any two devices passes. network through which the link passes is incorrect. The detection protocol may be a bidirectional forwarding detection (BFD) protocol. Optionally, in S1042, the second network device sends the first packet by using the second destination SID as the destination address, based on the second destination SID being available. In other words, the second network device sends the first packet to the third network device that corresponds to the second destination SID. When the communication network is the SRv6 network, the content in the destination address (DA) field of the first packet is set to the second destination SID, and the first packet is sent to the third network device. When the communication network is the SR network RRRQnn / zznz / E / YiAi MPLS, the first packet is sent to the third network device based on the second destination SID. Optionally, in S1043, when it is determined that the target SID is not available, the second network device obtains the 1st SID in the first secondary SID list, and processes the first packet based on the 1st SID (the first secondary SID). in the first secondary SID list. A way in which the second network device processes the first packet based on the first SID of the first secondary SID list includes: sending the first packet to a fourth network device based on the SID. For details on how to obtain the first secondary SID by the second network device, please refer to the descriptions in S102. The details are not described again herein, and the description is provided using simply an example. In an example, when the communication network is the SRv6 network, a process of implementing an operation of bypassing, by the second network device, the unexecuted SID in the primary SID list and processing the first packet based on The first secondary SID list is as follows: See FIGURE 4. The second destination SID is SID 2. When network device 1 determines that SID 2 is not available, the primary SID list in the first packet includes SID 2 and SID 4, and The first secondary SID list corresponding to the primary SID list includes SID 6, SID 7, and SID 8. The first packet includes the location indication information. The location indication information is assumed to include a number 2 of SIDs included in the primary SID list and location information of the head SID in the primary SID list. For example, the location of the head SID corresponds to a value of SL 5. In this way, the second network device determines a location from the primary SID list based on the location indication information, that is, it determines that the location of the last SID in the SID list is SL=5-2=3; learns, from the first packet based on SL=3, that a first secondary SID corresponding to SL=3 is SID 6; and sends the first packet to network device 6 using SID 6 as a destination address. A packet header of the first packet sent to network device 6 may be briefly displayed as ®. When the communication network is the SR-MPLS network, a process of implementing an operation of bypassing, by the second network device, the non-executed SID in the primary SID list and processing the first packet based on the first Secondary SID list is as follows: The top of the tag stack in the first packet includes the 1st unexecuted SID in the primary SID list, and x+1 SIDs are continuously popped from the stack. RRRQnn / zznz / E / YiAi tags, where x is a number of unexecuted SIDs in the primary SID list. In this case, a new SID at the top of the stack is a head SID in a first secondary SID list after the primary SID list, and the first packet is processed based on the head SID. For example, the head SID is used as the destination address to forward the first packet. In another example, the primary SID list includes only one SID, or the non-executed SID in the primary SID list includes only the last SID. When the second network device determines that the second destination SID (that is, the only SID in the primary SID list or the tail SID in the primary SID list) is not available, the second network device can obtain directly a next SID of the second destination SID according to a related technology, and process the first packet based on the next SID, for example, to obtain a corresponding SID based on SL--, or obtain a higher label after extracting a label. Solution 2: S105: The second network device obtains the target SID, that is, a third destination SID, from the first packet, and processes the first packet based on whether the third destination SID is available. When the target SID is the 1st SID in the non-executed SIDs in the primary SID list, the target SID is a SID of the second network device, and the SID includes a corresponding service, a processing operation, by the second device network, of the first packet based on whether the target SID is available specifically includes the following operations in S1051 to S1053. S1051: The second network device obtains the target SID from the first packet. At this stage, when the communication network is the SRv6 network, the destination address of the packet is the target SID. When the communication network is the SR-MPLS network, the top of the label stack of the first packet includes the target SID. For ease of description and distinction from another scenario, the target SID is called the third target SID. Because the third destination SID is the SID of the second network device, a service corresponding to the third destination SID is a service provided by the second network device. The second network device determines, based on the service corresponding to the third destination SID that is available, that the third destination SID is available; or determines, based on the service that corresponds to the third destination SID that is not available, that the third destination SID is not available. For descriptions of whether the third destination SID is available, see the descriptions above. The details are not described again in this form of this application. RRRQnn / zznz / E / YiAi S1052: The second network device provides the service corresponding to the third destination SID for the first packet based on the third destination SID that is available. As shown in FIGURE 4, when the network device is network device 2, network device 2 sends the first packet to network device 9. After providing a service for the packet, service device 9 returns the first packet to network device 2. When the third destination SID is not the last SID in the primary SID list, the second network device obtains, from the first packet, a SID located after the third destination SID, and sends the first packet to a third device corresponding network address by using the obtained SID as the destination address. When the communication network is the SRv6 network, the third network device sets SL=SL-1, reads a SID from the plurality of SIDs in the first packet based on the reduced SL, and sends the first packet to the third communication device. corresponding network by using the read SID as the destination address. For example, see FIGURE 4. When SID 2 is determined to be available, network device 2 provides a service corresponding to SID 2 for the first packet, sets SL=SL-1=4, reads SID 4 of the plurality of SIDs in the first packet based on the reduced SL, and sends the first packet to the network device 4 by using SID 4 as the destination address. When the communication network is the SR-MPLS network, the second network device extracts the SID from the top of the label stack of the first packet, and sends the first packet using a new SID from the top of the stack as destination address. When the third destination SID is the last SID of the primary SID list, detailed descriptions are provided in S106, and the details are not described herein. S1053: The second network device processes the first packet based on the 1st SID (the first secondary SID) in the first secondary SID list when it is determined that the third destination SID is not available. The second network device processing the first packet based on the first secondary SID list includes: The second network device sends the first packet to a fourth network device based on the first secondary SID. For a method to obtain the first SID in the first secondary SID list by the second network device, see the descriptions in S102 and S104. An example is mainly described here. In an example, when the communication network is the SRv6 network, a process of implementing a bypass operation by the second network device, the SID does not RRRQnn / zznz / E / YiAi executed on the primary SID list and process the first packet based on the first secondary SID list is as follows: For example, see FIGURE 4. Assume that network device 2 determines that SID 2 is not available, that is, the target SID is SID 2. The primary SID list in the first packet includes the SID 2 and SID 4, and the first secondary SID list corresponding to the primary SID list includes SID 6, SID 7, and SID 8. The first packet includes the location indication information. The location indication information is assumed to include a number 2 of SIDs included in the primary SID list and the location of the head SID in the primary SID list. For example, the location of the head SID is a value of SL, and the value of SL is 5. In this way, the third network device learns, from the first packet based on the location indication information, that the Head SID in the first secondary SID is SID 6, and it sends the first packet to network device 6 by using SID 6 as the destination address. When the communication network is the SR-MPLS network, a process of implementing an operation of bypassing, by the second network device, the non-executed SID in the primary SID list and processing the first packet based on the first Secondary SID list is as follows: The top of the tag stack in the first packet includes the 1st unexecuted SID in the primary SID list, and x+1 SIDs are continuously popped from the tag stack, where x is a number of unexecuted SIDs in the list. primary SID list. In this case, a new SID at the top of the stack is the first SID in a first secondary SID list after the primary SID list, and the first packet is processed based on the first secondary SID. For example, the first packet is sent to the third network device that corresponds to the first secondary SID. Solution 3: The target SID is the last SID in the primary SID list, and the target SID is a SID of the second network device. S106: The second network device obtains the target SID, that is, a fourth destination SID, from the first packet, and processes the first packet based on whether the fourth destination SID is available. The second network device receives the first packet and obtains the fourth destination SID from the first packet. When the communication network is the SRv6 network, the destination address of the first packet is the fourth destination SID. When the communication network is the SRMPLS network, the top of the label stack of the first packet is the fourth destination SID, and the SID at the top of the stack is popped to obtain the fourth destination SID. Optionally, the second network device receives a configuration instruction, and RRRQnn / zznz / E / YiAi performs, based on the configuration statement, an action of sending the first packet based on whether the fourth destination SID is available. Optionally, the configuration instruction may be sent by the control device, and is used to activate the second network device to enable a function. The function is to process the first packet based on whether the fourth destination SID is available. Optionally, the second network device processing the first packet based on whether the fourth destination SID is available includes the following operations at S1061 to S1063. S1061: The second network device determines whether the fourth destination SID is available. Because the fourth destination SID is the SID of the second network device, a service corresponding to the fourth destination SID is a service provided by the second network device. The second network device determines whether the service corresponding to the fourth destination SID is available, and when the service corresponding to the fourth destination SID is available, it determines that the fourth destination SID is available, or when the service corresponding to the fourth destination SID is not available, determines that the fourth destination SID is not available. For example, see FIGURE 4. Network device 4 is assumed to receive the first packet. In this case, the value of SL in the first packet is 4. SID 4 is obtained from the plurality of SIDs in the first packet based on the value of SL, and SID 4 is the fourth destination SID. It is determined if SID 4 is available. S1062: When the fourth destination SID is available, the second network device provides the service corresponding to the fourth destination SID for the first packet, skips at least one secondary SID list, and sends the first packet. The fourth network device bypasses at least one secondary SID list based on the location indication information, and sends the first packet. For the content of the location indication information carried in the first packet, please refer to the content in S102. The details are not described again here in this application. In the example shown in FIGURE 4, the network device 4 determines that SID 4 is available, and determines, based on the location indication information, that a number of SIDs included in the secondary SID list is 3. In In this case, the SL of the first packet is 4, set SL=SL-4=0, and skip the secondary SID list based on the reduced SL. SID 5 is obtained from the first packet, and the first packet is sent to network device 5 by using SID 5 as the destination address. Certainly, the location indication information may alternatively directly include a value of an SL corresponding to the 1st SID after at least one secondary SID list in the plurality of SID lists. The fourth network device can directly obtain SID 5 based on the SL value. In another example, when the communication network is the SR-MPLS network, the top of the label stack in the first packet includes the 1st SID in at least one secondary SID list, and the SIDs in at least one list of secondary SIDs are continually popped from the tag stack. In this case, a new SID at the top of the stack is the 1st SID after at least one list of secondary SIDs, and the first packet is processed based on the 1st SID. For example, the first SID is used as the destination address to forward the first packet. Particularly, when the plurality of segment identifiers in the first packet do not have any other SIDs after at least one secondary SID list, that is, when the second network device is the tail node corresponding to the primary forwarding path end-to-end indicated by the plurality of segment identifier lists, the second network device removes the plurality of segment identifier lists based on the fourth destination SID. In this scenario, the second network device may be a queue node connected to the third network device, and an operation indicated by the fourth destination SID is to remove the packet header from the first packet. To be specific, the second network device removes or decapsulates the SRH or MPLS packet header from the first packet to obtain the second packet, and sends the second packet to the third network device based on the destination address in the second packet. . For more application scenarios in which the network device corresponding to the third destination SID is the tail node corresponding to the primary end-to-end forwarding path indicated by the plurality of segment identifier lists, please refer to the modalities of application scenarios shown in FIGURE 8, FIGURE 10 and FIGURE 11. The details are not described again here in this application. S1063: The second network device processes the first packet based on the first secondary SID list when it determines that the fourth destination SID is not available. In the first packet, the first secondary SID list is placed after the fourth destination SID. The second network device processing the first packet based on the first secondary SID list includes: The second network device sends the first packet to a fourth network device based on the first SID of the first secondary SID list, i.e. , the first secondary SID. RRRQnn / zznz / E / YiAi Optionally, when the communication network is the SRv6 network, the SL in the first packet indicates the fourth destination SID, and the fourth network device sets SL=SL-1. The reduced SL indicates a head SID in a first secondary SID list after the primary SID list. An SID is read from the plurality of SIDs included in the first packet based on the reduced SL, to obtain the leading SID in the first secondary SID list. The first packet is processed based on the header SID. For example, the head SID is used as the destination address to forward the first packet. For example, see FIGURE 4. Network device 4 determines that SID 4 is not available. In this case, the SL of the first packet is equal to 4, and SL=SL1 is set. The head SID, in the first secondary SID, which is obtained from the first packet based on the reduced SL is SID 6, and the first packet is sent to the network device 6 by using SID 6 as the destination address. When the communication network is the SR-MPLS network, the top of the label stack of the first packet includes the head SID in the first list of secondary SIDs. A SID is popped from the tag stack to obtain the head SID in the first secondary SID list, and the first packet is processed based on the head SID. For example, the head SID is used as the destination address to forward the first packet. When the first packet further includes the second secondary SID list, and the second secondary SID list is a backup copy of the first secondary SID list, the first secondary SID list may be regarded as the primary SID list, and the second secondary SID list can be considered as the first secondary SID list. The technical solution provided in the previous method embodiments is used to provide protection to the first secondary SID list. When a plurality of secondary SID lists in at least one secondary SID list of the first packet are backup copies of the primary SID list, the network device may determine, randomly, in a random manner, or in a random manner. specify a selection sequence for the plurality of secondary SID lists, which secondary SID list is used as the first secondary SID list. In other words, when the SID in the primary SID list is not available, the first packet is processed based on the 1st SID in the secondary SID list. When there is a selection sequence specified for the plurality of secondary SID lists, a secondary SID list ranking first may be placed at a location adjacent to the primary SID list, and a secondary SID list ranking second may be placed at a location adjacent to the primary SID list. can be placed after the first secondary SID list. In this embodiment of this request, because the first packet generated by the first network device includes the primary SID list and at least one secondary SID list, RRRQnn / zznz / E / YiAi when the SID in the primary SID list is not available, the unexecuted SID is omitted from the primary SID list, to obtain the 1st SID in the first secondary SID list, and the first Packet is processed based on the first secondary SID list. In addition, because the first secondary SID list is a backup of the primary SID list, the first secondary SID list is used to process the first packet, to prevent the service provided by the SID list from being bypassed. primary. When the SID in the primary SID list is a SID of a tail node connected to a destination endpoint, and the SID in the primary SID list is not available, the first secondary SID list is used to process the first package. This avoids a long delay in transmitting the first packet or an additional problem of low network reliability, for example, packet transmission interruption. The above are detailed descriptions of step S104, including S1041 to S1043, S105, S106 and related substeps. The above briefly describes the method embodiments of this application with reference to the network scenario shown in FIGURE 1. The following provides specific application examples of the method embodiments shown in FIGURE 3 with reference to several different application scenarios, such as is shown in FIGURE 7, FIGURE 8, FIGURE 9, FIGURE 10 and FIGURE 11. FIGURE 7 is a specific application of the embodiments of the method shown in FIGURE 3. In the request, a primary SID list and a secondary SID list each have only one SID. The application particularly describes a backup protection scenario of a forwarding path or a service of an intermediate node in a forwarding path in a segment routing network according to an embodiment of this application. The details are as follows: In an SRv6 network shown in FIGURE 7, a network device 11 connects to a network device 12 and a network device 14; The network device 12 connects to a network device 15, to the network device 11 and to a network device 13; The network device 14 connects to the network device 11, to a network device 16 and to the network device 13; The network device 11 is a head node in the segment routing network; and the network device 13 is a tail node in the segment routing network. A SID 1 is a segment identifier of the network device 11, a SID 2 is a segment identifier of the network device 12, a SID 3 is a segment identifier of the network device 13, and a SID 4 is an identifier of network device segment 14. After receiving a second packet, the network device 11 (which is a first network device) adds an SRH to the second packet. As shown ®, the SRH includes a list of segment identifiers and a SL, the list of segment identifiers is (SID RARQnn / zznz / E / YiAi 2, SID 4, SID 3), SL=2, and the SL indicates SID 2 in the segment identifier list. The segment identifier list can be logically divided into a primary SID list (SID 2), a first secondary SID list (SID 4), and another SID list (SID 3). The secondary SID list is adjacent to the primary SID list. To be specific, a value of an SL that corresponds to the 1st SID of the secondary SID list is a value of an SL that corresponds to the last SID of the primary SID list minus 1. A service that corresponds to SID 2 of the network 12 is a service 2. To be specific, the network device provides, through SID 2, service 2 for a packet transmitted on the segment routing network, for example, antivirus filtering. A service corresponding to SID 4 of the network device 14 is also service 2. The segment identifier list is used so that the first secondary SID list can support the service provided by the primary SID list. Upon determining that SID 2 is available, network device 11 sends a first packet to network device 12 using SID 2 as the destination address. The network device 12 receives the first packet and provides service 2 that corresponds to SID 2 for the first packet, and can learn, from the segment list of the first packet based on an indication of SID 2, that a SID of destination is SID 3, and send the first packet to network device 13 by using SID 3 as the destination address. A packet header of the packet may be displayed briefly as ®. Alternatively, when it is determined that SID 2 is not available, the network device 11 obtains the secondary SID 4 in the first secondary SID list of the segment list of the first packet based on SL=SL-1, and sends the first packet to network device 14 when using SID 4 as the destination address. A packet header of the packet may be displayed briefly as ®. Network device 14 receives the first packet, where SL=1 is included in the first packet; obtains SID 4 in the first secondary SID list from the segment list of the first packet based on the SL; provides service 2 that corresponds to SID 4 for the first packet; set SL=SL-1=0; learns, from the segment list of the first packet based on the reduced SL, that a sixth destination SID is SID 3; and sends the first packet to network device 13 by using SID 3 as the destination address. A packet header of the packet may be displayed briefly as ®. The FIGURES is another specific application of the embodiments of the method shown in FIGURE 3. The application particularly describes a backup protection scenario of a tail node in a forwarding path in a segment routing network according to an embodiment of this application. In an SRv6 network shown in the FIGURES, a network device 11 connects to a network device 12 and a network device 15; Network device 12 connects to a RRRQnn / zznz / E / YiAi network device 13 and to network device 11; the network device 15 connects to the network device 11 and a network device 21; the network device 21 connects to a network device 22 and to the network device 15; and the network device 13 connects to the network device 12 and the network device 22. A SID 1 is a segment identifier of the network device 11, a SID 3 is a segment identifier of the network device 12, a SID 2 is a segment identifier of the network device 15, a SID 5 is a segment identifier of the network device 21, and a SID 6 is a segment identifier of the network device 22. Network device 11 sends a first packet to network device 15 by using SID 2 as the destination address. The packet includes a list of segment identifiers (SID 2, SID 3, SID 5, SID 6), and the list of segment identifiers can be logically divided into a first SID list (SID 2), a primary SID list ( SID 3) and a list of secondary SID (SID 5, SID 6). The secondary SID list is adjacent to the primary SID list. To be specific, the value of an SL that corresponds to the 1st SID in the secondary SID list is a value of the last SL in the primary SID list minus 1. A forwarding path indicated by the secondary SID list: the network 21 -> network device 22 is a backup of a primary forwarding path indicated by the primary SID list: network device 12. In other words, an end-to-end forwarding path indicated by the list of segment identifiers (SID 2, SID 3, SID 5, SID 6) is network device 11 -> network device 15 -> network device 12. The network device 15 receives the first packet, and a packet header is briefly displayed as Φ. The network device obtains SID 2, and provides a service that corresponds to SID 2 for the first packet. The network device 15 learns from the SID list of the first packet based on SL=SL-1 that a non-executed SID in the primary SID list is SID 3, and uses SID 3 as a target SID. , when it is determined that SID 3 is available, the network device 15 can use the SID 3 as the destination address, and send the first packet to the network device 12 based on the SID 3. A packet header of the packet can briefly show how Network device 12 receives the first packet and learns that the target SID is SID 3. In this case, when SID 3 is one of the Endpoint SIDs (END), a cross-connected Endpoint SID (Endpoint with Layer-3 cross-connect, End.X), or an Endpoint SID with Specific IPv6 table lookup (End.T), or another type of SID, the SID 3 may have a newly defined special ultimate segment decapsulation (USD) function, regardless of whether there is another SID in the plurality of segment identifier lists. After an external IPv6 header and SRH are removed, the packet is sent to a destination endpoint using table lookup based on a payload part RRRQnn / Z / nZ / E / YIAI Useful. Alternatively, when it is determined that SID 3 is not available, the network device 15 obtains the secondary SID 5 in the first secondary SID list of the SID list of the first packet based on SL=SL-2, and sends the first packet to network device 21 when using SID 5 as the destination address. Network device 21 receives the first packet. A packet header of the first packet may be displayed briefly as @, and SL=2. The network device 21 obtains the SID 5. The SID 5 is a node SID or a link SID of the network device 21, and is a SID for guiding the forwarding path. Therefore, after determining that SID 5 can be executed successfully, the network device 21 learns, from the list of segment identifiers based on SL=SL-1=1, that a next secondary SID in the first secondary SID list is SID 6, and sends the first packet to network device 22 by using SID 6 as the destination address. A packet header of the packet may be displayed briefly as ®. Network device 22 receives the first packet and obtains SID 6. In this case, when SID 6 is one of the Endpoint SIDs, a Layer 6 cross-connected Endpoint SID with Layer-3 cross-connect, End.X), or an Endpoint with Specific IPv6 table lookup (End.T), or another type of SID, SID 3 can have a special ultimate segment decapsulation (USD) function, regardless of whether there is another SID in the plurality of segment identifier lists. After removing the outer IPv6 header and SRH, the packet is sent to the destination endpoint using table lookup based on the payload part. The SID can be a newly defined SID type that has a new function. This type of SID is used to remove the outer IPv6 header, including the SRH, from the packet, look up a route on the network device based on a destination address in the lower layer IPv6 encapsulation, and forward the packet to a device. of corresponding CE. This type of SID is defined to be similar to an Endpoint with decapsulation and specific IPv6 table lookup (END.DT6) SID. One difference is that the SID of END.DT6 has to be the last SID in a list of SIDs of an SRH, but in this solution, this type of SID does not have to be the last SID in a list of SIDs of an SRH. FIGURE 9 is another specific application of the embodiments of the method shown in FIGURE 3. The application particularly describes a backup protection scenario of a service provided by a network device in a forwarding path in a segment routing network. according to a modality of this request. In an SRv6 network shown in FIGURE 9, a network device 11 connects to a RRRQnn / zznz / E / YiAi network device 12; the network device 12 connects to the network device 11, to a network device 15, to a network device 16 and to a network device 13; network device 15 connects to network device 12; network device 16 connects to network device 12; and the network device 13 connects to the network device 12. A SID 1 is a segment identifier of the network device 11, and a SID 2 and a SID 4 are segment identifiers of the network device 12. The SID 2 corresponds to the provision of a service through the network device 15, and SID 4 corresponds to the provision, through the network device 16, of the same service that is provided through the network device 15. A SID 3 is a network device segment identifier 13. Network device 11 receives a second packet sent by a source endpoint, and adds an SRH to the second packet. The SRH includes a list of SIDs and a SL. A packet header of the packet may be displayed briefly as ®. The SID list is (SID 2, SID 4, SID 3), and SL=2. The segment identifier list may be logically divided into a plurality of SID lists, including a primary SID list (SID 2), a secondary SID list (SID 4), and another SID list (SID 3). The secondary SID list is adjacent to the primary SID list. To be specific, the value of an SL that corresponds to the 1st SID in the secondary SID list is a value of the last SL in the primary SID list minus 1. The primary SID list and the secondary SID list are carried in the list of packet segment identifiers, so that the service corresponding to SID 4 provides a backup for the service corresponding to SID 2. The network device 11 sends the packet to the network device 12 based on SID 2. After receiving the packet, the network device 12 determines whether the service corresponding to SID 2 is available, and sends the packet to the network device 12. network 15 to provide the corresponding service. When no failure occurs during the execution of the corresponding service by network device 15, the packet is sent to network device 12. Network device 12 bypasses SID 4 based on an indication from SID 2, learning that a Destination SID is SID 3, and sends the packet to network device 13 by using SID 3 as the DA of the packet. A packet header of the packet may be displayed briefly as ®. If the network device 12 determines that the service corresponding to SID 2 is not available, the network device can obtain the 1st SID, that is, SID 4, in the secondary SID list based on SL-SL- - , and send the packet to network device 16 based on the SID. A packet header of the packet is displayed as ©. Furthermore, the network device 16 provides the corresponding service for the packet. After providing the corresponding service for the packet, the network device 16 can send the packet to the network device 12. The network device 12 learns, based on the SL- -, that a new RRRQnn / zznz / E / YiAi Destination SID is SID 3, and it sends the packet to network device 13 based on SID 3. A packet header of the packet may be briefly displayed as @. In the above examples of FIGURE 7, FIGURE 8 and FIGURE 9, because the primary SID list includes only one SID, the location information in the packet may include the SID in the primary SID list, that is, one SID unique in a list of primary SIDs in the application scenarios in FIGURE 7, FIGURE 8 and FIGURE 9. FIGURE 10 is another specific application of the embodiments of the method shown in FIGURE 3. The application particularly describes a backup protection scenario of a tail node in a forwarding path in a segment routing network according to an embodiment of this request. The details are as follows: In an SRv6 network shown in FIGURE 10, a network device 11 connects to a network device 12 and a network device 13, network device 12 connects to network device 11, and the network device 13 connects to the network device 11. A SID 1 is a segment identifier of the network device 11, a SID 2 is a segment identifier of the network device 12, and a SID 3 is an identifier of network device segment 13. Network device 11 receives a second packet sent by a source endpoint, and adds an SRH to the second packet. The SRH includes a list of SIDs and a SL. A packet header of the packet may be displayed briefly as ®. The SID list in the packet is (SID 2, SID 3), SL=1, and the SL indicates SID 2 in the SID list. The SID list can be logically divided into a primary SID list (SID 2) and a secondary SID list (SID 3). The secondary SID list is adjacent to the primary SID list. To be specific, the value of an SL that corresponds to the 1st SID in the secondary SID list is a value of the last SL in the primary SID list minus 1. The protection of a tail node in the segment routing network is implements a way to transport the primary and secondary SIDs in the SID list. To be specific, in the application scenario shown in FIGURE 10, a primary forwarding path is the network device 12, a secondary forwarding path is the network device 13, and a primary end-to-end forwarding path is network device 11 -> network device 12. Network device 11 learns that a target SID is SID 2, and determines whether SID 2 is available. In this scenario, SID 2 being available means that SID 2 is reachable. When SID 2 is determined to be available, the packet is sent to network device 12. A packet header of the packet may briefly display as ®. After receiving the packet, the network device 12 performs, based on the SID 2, an action of removing the SRH header from the packet, learns that a destination address is an IP 2, and sends the packet based on the IP 2. In other words, in this scenario, SID 2 is a SID that has a special function. The SID can be a newly defined SID type that has a new function. This type of SID is used to remove an outer IPv6 header, including the SRH, from the packet, look up a route on the network device based on a destination address in the lower layer IPv6 encapsulation, and forward the packet to a device. of corresponding CE. This type of SID is defined to be similar to an Endpointwith decapsulation and specific IPv6 table lookup (END.DT6) SID. One difference is that the SID of END.DT6 has to be the last SID in a list of SIDs of an SRH, but in this solution, this type of SID does not have to be the last SID in a list of SIDs of an SRH. Upon determining that SID 2 is not available, network device 11 selects SID 3 as the destination SID based on the SL- -, and sends the packet to network device 13 based on SID 3. A packet header on the package may be briefly displayed as ®. After receiving the packet, network device 12 determines that SID 3 is a SID of network device 12, removes the SRH header based on the SID, learns that a DA is IP 2, and sends the packet based on the IP 2. The SID can be the SID of END.DT6 or the newly defined SID type In the example shown in FIGURE 10, because the primary SID list includes only one SID, and the secondary SID also includes only one SID, the packet can be considered to not carry location indication information. That is, in this embodiment of this application, the location indication information is optional. FIGURE 11 is another specific application of the embodiments of the method shown in FIGURE 3. The application particularly describes a backup protection scenario in which the embodiments of this application are applied to SR-MPLS. The details are as follows: In the SR-MPLS network shown in FIGURE 11, a network device 11 connects to a network device 12; the network device 12 connects to the network device 11, to a network device 13 and to a network device 14; network device 13 connects to network device 12; and the network device 14 is connected to the network device 12. One SID 1101 is one SID of the network device 12, two SIDs of the network device 13 are respectively 10001 and 20000, and two SIDs of the network device 14 are respectively 1200 and 20001. Network device 11 receives a second packet sent by a source endpoint, and adds an MPLS packet header to the second packet. A stack of packet header labels, that is, a list of segment identifiers, is (1101, 10001, 20000, 1200, 20001), and the list can be logically divided into another list of SIDs (1101), a list of Primary SID (10001,20000), and a list of secondary SIDs (1200, 20001). In other words, a primary forwarding path is network device 13, a secondary forwarding path is network device 14, an end-to-end primary forwarding path RRRQnn / zznz / E / YiAi is network device 12 -> network device 13, and a secondary end-to-end forwarding path is network device 12 -> network device 14. The secondary SID list is adjacent to the primary SID list. To be specific, in the MPLS packet header tag stack, the secondary SID list is after the primary SID list. Network device 11 sends a first packet to network device 12 based on SID 1101 at the top of the stack. The MPLS packet header of the packet is briefly shown as Φ. Network device 12 receives the first packet; extracts label 1101, where a packet header obtained after extracting the label may be briefly displayed as ®; determines that a target SID in the primary SID list is 10001; and determines whether the target SID is available. When 10001 is determined to be available, the first packet is sent to network device 13 based on 10001. The network device 13 receives the first packet, and a packet header may be briefly displayed as ®. A SID at the top of the label stack is 20000. Therefore, the network device 13 removes the MPLS packet header from the first packet based on the SID at the top of the stack, and sends the second packet to a destination endpoint. When a virtual private network (VPN) private label 20000 is assigned on the protected node network device 13, the forwarding behavior of the same can be defined: three layers of labels are continuously extracted, a table is queried private network routing based on an internal private network IP address, and the packet is still forwarded to a destination device based on a private network route. If the destination end is unreachable, the SID 20000 is omitted to obtain the first secondary SID 1200, and the first packet is sent to the network device 14 based on the SID. A packet header of the packet may be displayed briefly as @. Alternatively, when 10001 is determined to be unavailable, the network device 12 learns that a number of unexecuted SIDs in the primary SID list is 1; pop on the tag stack twice consecutively or get the 1st SID in the secondary SID list, where in other words, a target SID is 1200; and sends the first packet to network device 14 based on SID 1200. A packet header of the packet may be briefly displayed as @. Network device 14 receives the first packet, pops SID 1200 at the top of the stack to obtain SID 20001, removes the MPLS packet header in the first packet based on 20001, and sends the second packet to the endpoint. of destiny. In the example shown in FIGURE 11, for an application in the SR-MPLS network, RRRQnn / zznz / E / YiAi location indication information in the packet includes the SID in the primary SID list. To facilitate the implementation of the technical solution in embodiments of this application in the SR-MPLS network, the segment routing global block (SRGB) of all nodes in the SR-MPLS network may be required to have the same margin, for example, 1000 to 10000, so that the meaning of a global label in the label stack carried in the packet can be understood consistently in different network locations. See FIGURE 12. One embodiment of this application provides a packet processing apparatus 1200 applied to a segment routing network. The apparatus 1200 may be implemented on any network device provided in the embodiment shown in FIGURE 1, FIGURE 2, FIGURE 3, FIGURE 4, FIGURE 7, FIGURE 8, FIGURE 9, FIGURE 10, or FIGURE 11. For example, the apparatus 1200 may be implemented on the first network device, the second network device, the third network device or the fourth network device provided in the embodiment shown in FIGURE 3, or may be implemented in the network device 1, the network device 2, the network device network 3, network device 4, network device 5, network device 6, network device 7, network device 8 or the like provided in the embodiment shown in FIGURE 4. The details are not described again here in this application. The 1200 device includes: a receiving unit 1201, configured to receive a first packet, wherein the first packet includes a plurality of segment identifier lists, SIDs, the plurality of SID lists including a primary SID list and at least one secondary SID list, at least one secondary SID list includes a first secondary SID list, and the first secondary SID list is a backup copy of the primary SID list; and a processing unit 1202, configured to process the first packet based on the primary SID list. Optionally, for a detailed implementation process in which the processing unit 1202 processes the first packet, see S104 and related content in the details of the step in the embodiment shown in FIGURE 3. Optionally, the processing unit 1202 is configured to: perform different processing on the first packet based on whether a target SID is available, where the target SID is one or more unexecuted SIDs in the primary SID list. Optionally, a forwarding path indicated by the first secondary SID list is a backup path of a forwarding path indicated by the primary SID list. Optionally, the target SID that is available includes: RRRQnn / zznz / E / YiAi a network device corresponding to the target SID is accessible to device 1200. Optionally, the apparatus further includes a first sending unit 1203. The first sending unit 1203 is configured to send the first packet based on a first SID when the target SID is not available. The first SID is the 1st SID in the first secondary SID list. Optionally, the appliance 1200 is an intermediate node in a primary end-to-end forwarding path indicated by the plurality of SID lists, the target SID is the last SID in the primary SID list, the target SID is a SID of the appliance 1200, and the apparatus 1200 further includes a second sending unit 1204. The second sending unit 1204 is configured to send the first packet based on a first SID, when the target ID is available, where the first SID is the 1st SID after at least one secondary SID list in the plurality of lists of SID. Optionally, the apparatus 1200 is a tail node in a primary end-to-end forwarding path indicated by the plurality of SID lists, the target SID is the last SID in the primary SID list and the target SID is a SID of the device 1200. The processing unit 1200 is configured to: when the target SID is available, perform a function corresponding to the target SID and remove the plurality of SID lists. Optionally, for a detailed implementation process in which the processing unit 1202 removes the plurality of SID lists, see the related content in S1062 in the embodiment shown in FIGURE 3. Optionally, a service corresponding to the first secondary SID list is a backup of a service corresponding to the primary SID list, and the target SID being available includes a service corresponding to the target SID being available. . Optionally, the processing unit 1202 is configured to: when the target SID is not available, provide a service for the first packet by using the first SID, where the first SID is the 1st SID in the first secondary SID list. Optionally, the device 1200 is an intermediate node in a primary end-to-end forwarding path indicated by the plurality of SID lists, the target SID is the 1st SID in the non-executed SIDs, and the device 1200 further includes a third unit shipping number 1205. The processing unit 1202 is configured to: when the target ID is available, provide the service corresponding to the target SID. The third sending unit 1205 is configured to send the first packet based on a first SID, where the first SID is the 1st SID after at least one list of SIDs. Secondary RRRQnn / zznz / E / YiAi in the plurality of SID lists. Optionally, for detailed implementation processes in which the processing unit 1202 provides the service corresponding to the target SID and the third sending unit 1205 sends the first packet, see S104 and related content in the step details in the mode shown in FIGURE 3. Optionally, the device 1200 is a tail node in a primary end-to-end forwarding path indicated by the plurality of SID lists, and the target SID is the last SID in the non-executed SIDs. The processing unit 1200 is configured to: when the target SID is available, provide the service corresponding to the target SID and remove the plurality of SID lists. Optionally, the first packet includes location indication information, and the processing unit 1202 is further configured to: obtain, the first SID based on the location indication information, where the location indication information is used to indicate one or more of the following: a location of the primary SID list in the plurality of SID lists, a location of the first secondary SID list in the plurality of SID lists, and a location of at least one secondary SID list in the plurality of SIDs. Optionally, the location indication information includes the last SID in the primary SID list and / or the 1st SID in the non-executed SIDs in the primary SID list. Optionally, the location indication information is carried in metadata of a segment routing header of the first packet. Optionally, the receiving unit 1201 is further configured to receive a configuration instruction. The processing unit 1202 is further configured to perform, based on the configuration instruction, an action to obtain a second SID based on whether the target SID is available. The processing unit 1202 is configured to process the first packet based on the second SID, where the second SID includes a SID in the primary SID list, the 1st SID in the first secondary SID list, or the 1st SID after at least a secondary SID list in the plurality of SID lists. Optionally, for a detailed implementation process in which the processing unit 1202 performs, based on the configuration instruction, the action to obtain the second SID based on whether the target SID is available, see S104 and related content in the details of the stage in the modality shown in FIGURE 3. Optionally, the plurality of SID lists are located in a segment routing header, SRH, of the first packet, or the plurality of SID lists are located in a multi-protocol label switching header of the first packet. Optionally, the primary SID list and the first secondary SID list are located in different SRHs of the first packet. Optionally, the primary SID list is adjacent to the first secondary SID list, and the last SID in the primary SID list is before the first secondary SID list. Optionally, at least one secondary SID list further includes a second secondary SID list, and the second secondary SID list is a backup copy of the first secondary SID list and / or the second secondary SID list is a copy of primary SID list security. Optionally, the plurality of SID lists further includes another primary SID list and another secondary SID list, and the other secondary SID list is a backup copy of the other primary SID list. Optionally, the other primary SID list and the primary SID list belong to different segments. In this mode of this request, the receiving unit receives the first packet. The first packet includes the plurality of segment identifier lists, SID, and the plurality of SID lists includes the primary SID list and at least one secondary SID list. At least one secondary SID list includes the first secondary SID list, and the first secondary SID list is a backup copy of the primary SID list. In a process in which the processing unit processes the first packet based on the primary SID list, when a path indicated by the primary SID list is in error, the processing unit processes the first packet based on the first SID list secondary, so that the forwarding processing of the data packet continues in the segment routing network, thereby improving the transmission reliability of the network. See FIGURE 13. One embodiment of this application provides a packet processing apparatus 1300 applied to a segment routing network. The apparatus 1300 may be implemented in the network device provided in the embodiment shown in FIGURE 1, FIGURE 2, FIGURE 3, FIGURE 4, FIGURE 7, FIGURE 8, FIGURE 9, FIGURE 10, or FIGURE 11. For example, the apparatus 1300 may be implemented in the first network device provided in the embodiment shown in FIGURE 3, or may be implemented in the network device 1 provided in the embodiment shown in FIGURE 4, or may be implemented in the network device 11 provided in the embodiment shown in FIGURE 7, or can be implemented in the network device 15 provided in the mode RARQnn / zznz / E / YiAi shown in FIGURE 8, or may be implemented in the network device 11 provided in the embodiment shown in FIGURE 9 or FIGURE 10, or may be implemented in the network device 12 provided in the embodiment shown in FIGURE 11. Apparatus 1300 includes: a sending unit 1301, configured for a first packet, wherein the first packet includes a plurality of segment identifier lists, SIDs, the plurality of SID lists including at least one primary SID list and at least one secondary SID list , at least one secondary SID list includes a first secondary SID list, and the first secondary SID list is a backup copy of the primary SID list. Optionally, the apparatus 1300 further includes a processing unit 1302, and the processing unit 1302 is configured to generate the first packet. For a detailed implementation process in which the processing unit 1302 generates the first packet, see the related content in S102 in the mode shown in FIGURE 3. For a detailed implementation process in which the sending unit 1301 sends the first package, please refer to the related content in S103 in the mode shown in FIGURE 3. Optionally, the apparatus 1300 further includes a obtaining unit 1303. The obtaining unit 1303 is configured to obtain the plurality of segment identifier lists. For a detailed implementation process in which the obtaining unit 1303 obtains the plurality of segment identifier lists, please refer to the related content in S101 in the embodiment shown in FIGURE 3. Optionally, the first packet includes the location indication information, and the location indication information is used to indicate one or more of the following: a location of the primary SID list in the plurality of SID lists, a location of the first secondary SID list in the plurality of SID lists, and a location of at least one secondary SID list in the plurality of SIDs. Optionally, the location indication information includes the last SID in the primary SID list and / or the 1st SID in the non-executed SIDs in the primary SID list. Optionally, the location indication information is carried in metadata of a segment routing header of the first packet. Optionally, the plurality of SID lists are carried in a segment routing header, SRH, of the first packet, or the plurality of SID lists are carried in a multi-protocol label switching header, MPLS, of the first packet. . Optionally, the primary SID list is adjacent to the first secondary SID list, and the last SID in the primary SID list is located before the first secondary list RRRQnn / zznz / E / YiAi by SID. Optionally, at least one secondary SID list further includes a second secondary SID list, and the second secondary SID list is a backup copy of the first secondary SID list and / or the second secondary SID list is a copy of primary SID list security. In this mode of this request, the sending unit sends the first packet. The first packet includes the plurality of segment identifier lists, SID, and the plurality of SID lists includes at least the primary SID list and at least one secondary SID list. At least one secondary SID list includes the first secondary SID list, and the first secondary SID list is a backup copy of the primary SID list. Because the first secondary SID list in the first packet is a backup of the primary SID list, when a path indicated by the primary SID list is in error, a network device in the segment routing network processes the first packet based on the first secondary SID list, so that the forwarding processing of the data packet continues in the segment routing network, thereby improving the transmission reliability of the network. See FIGURE 14. One embodiment of this application provides a packet processing apparatus 1400 applied to a segment routing network. The device 1400 may be implemented in the control device or the trajectory calculation element provided in the embodiment shown in FIGURE 1 or FIGURE 3. The apparatus 1400 includes: a sending unit 1401, configured to send a first message to a first network device, where the first message includes a plurality of segment identifier lists, SID, the plurality of SID lists includes a list of primary SID and at least a secondary SID list, at least one secondary SID list includes a first secondary SID list, and the first secondary SID list is a backup copy of the primary SID list. The first message allows the first network device to generate a first packet, and the first packet includes the plurality of SID lists. Optionally, the apparatus 1400 further includes a processing unit 1402, and the processing unit 1402 is configured to generate the first message. For detailed implementation processes in which the processing unit 1402 generates the first message and the sending unit 1401 sends the first message, please refer to the related content in S101 in the mode shown in FIGURE 3. Optionally, the first message further includes a packet characteristic or a routing characteristic and the first packet conforms to the packet characteristic or the routing characteristic. Optionally, the first message further includes the location indication information, and the location indication information is used to indicate one or more of the following: a location of the primary SID list in the plurality of SID lists, a location of the first secondary SID list in the plurality of SID lists, and a location of at least one secondary SID list in the plurality of SIDs. Optionally, the location indication information includes the last SID in the primary SID list and / or the 1st SID in the non-executed SIDs in the primary SID list. In this mode of this request, the sending unit sends the first message to the first network device. The first message includes the plurality of segment identifier lists, SID, and the plurality of SID lists includes the primary SID list and at least one secondary SID list. At least one secondary SID list includes the first secondary SID list, and the first secondary SID list is a backup copy of the primary SID list. In this way, when the first message generates the first packet, the first packet may include the plurality of SID lists. In other words, the first generated packet includes the primary SID list and the first secondary SID list. Because the first secondary SID list is a backup of the primary SID list, when a path indicated by the primary SID list is in error, the first network device processes the first packet based on the first list of Secondary SID, so that the forwarding processing of the data packet continues in the segment routing network, thereby improving the transmission reliability of the network. See FIGURE 15. One embodiment of this application provides a schematic diagram of a packet processing apparatus 1500 applied to a segment routing network. The apparatus 1500 may be the first network device, the second network device, the third network device or the fourth network device provided in the embodiment shown in FIGURE 3, or it may be the network device 1, the network 2, the network device 4, or the like provided in the embodiment shown in FIGURE 4, or it may be the network device 11, the network device 12, or the like provided in the embodiment shown in FIGURE 7, or it may be the network device 15, the network device 12, or the like provided in the embodiment shown in FIGURE 8, or it may be the network device 11 or the like provided in the embodiment shown in FIGURE 9, or it may be the network 11, the network device 12, or the like provided in the embodiment shown in FIGURE 10, or it may be the network device 12, the network device 13 or the like provided in the embodiment shown in FIGURE 11. The apparatus 1500 includes at least one processor 1501, a bus system 1502, a memory 1503, and at least one communication interface 1504. RRRQnn / zznz / E / YiAi The apparatus 1500 is an apparatus of a hardware structure and can be configured to implement function modules in the apparatus 1200 shown in FIGURE 12. For example, a person skilled in the art may realize that the processing unit 1202 in The apparatus 1200 shown in FIGURE 12 may be implemented by invoking code in the memory 1503 by at least one processor 1501, and the receiving unit 1201, the first sending unit 1203 and the second sending unit 1204 in the apparatus 1200 shown in FIGURE 12 can be implemented using communication interface 1504. Optionally, the processor 1501 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit, ASIC), or one or more integrated circuits configured to control the program execution of the solutions of this application. The bus system 1502 may include a path for transmitting information between the above components. Communication interface 1504 is configured to communicate with another device or with a communication network. The memory 1503 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, or a random access memory (RAM) or other type a dynamic read-only storage device that can store information and instructions, or it can be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory read-only memory, CD-ROM), or other compact disk storage, optical disk storage (including a compact disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, and the like) , a disk storage medium or other disk storage device, or any other medium that can be used to carry or store expected program code in the form of an instruction or a data structure and that can be accessed by a computer, but this is not limited herein. The memory can exist independently, and can be connected to the processor through a bus. Alternatively, the memory may be integrated with the processor. Memory 1503 may exist independently, and is connected to processor 1501 via communication bus 1502. Memory 1503 may alternatively be integrated into processor 1501. Optionally, memory 1503 is configured to store program code or instructions for executing the solutions of this request, and processor 1501 controls the RRRQnn / zznz / E / YiAi execution. Processor 1501 is configured to execute program code stored in memory 1503. The program code may include one or more software modules. Optionally, the processor 1501 may also store program code or instructions to execute the solutions of this application. In a specific implementation, in one embodiment, the processor 1501 may include one or more CPUs, for example, a CPU 0 and a CPU 1 in FIGURE 15. In a specific implementation, in one embodiment, the apparatus 1500 may include a plurality of processors, for example, processor 1501 and a processor 1507 in FIGURE 15. Each of the processors may be a single-core processor (single CPU ) or a multi-core processor (multi-CPU). Processor herein may refer to one or more devices, circuits and / or processing cores configured to process data (e.g., computer program instructions). Communication interface 1504 is configured to use any device such as a transceiver to communicate with another device or with a communication network. The communication network may be Ethernet, a radio access network (RAN), a wireless local area network (WLAN), or the like. In this embodiment of this application, the communication interface 1504 may be configured to receive a packet sent by another network device on a segment routing network, or send a packet to another network device on the segment routing network. The communication interface 504 may be an Ethernet interface (Ethernet), a Fast Ethernet (FE) interface, or a gigabit Ethernet (GE) interface. It should be understood that the above product forms of network devices have any function of network devices in the above embodiments of the packet processing method, and the details are not described herein. See FIGURE 16. One embodiment of this application provides a schematic diagram of a packet processing apparatus 1600. The apparatus 1600 may be any of the network devices provided in the embodiment shown in FIGURE 1, FIGURE 2, FIGURE 3, FIGURE 4, FIGURE 7, FIGURES, FIGURE 9, FIGURE 10, or FIGURE 11. For example, device 1600 may be the first network device provided in the embodiment shown in FIGURE 3, or it may be network device 1 provided in the embodiment shown in FIGURE 4, or it may be the network device 11 provided in the mode shown in FIGURE 7, or it may be the network device 15 provided in the mode shown in the FIGURES, or it may be the network device 11 provided in the mode shown in FIGURE 9 or FIGURE 10, or it may be the network device 12 provided in the embodiment shown in FIGURE 11. The apparatus 1600 includes at least one processor 1601, a bus system 1602, a RRRQnn / zznz / E / YiAi memory 1603 and at least one communication interface 1604. The apparatus 1600 is an apparatus of a hardware structure and can be configured to implement function modules in the apparatus 1300 shown in FIGURE 13. For example, a person skilled in the art may imagine that the processing unit 1302 in the apparatus 1300 shown in FIGURE 13 can be implemented by invoking a code in memory 1603 by at least one processor 1601, and the sending unit 1301 in the apparatus 1300 shown in FIGURE 13 can be implemented by using the communication interface 1604. Optionally, the processor 1601 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit, ASIC), or one or more integrated circuits configured to control the program execution of the solutions of this application. The bus system 1602 may include a path for transmitting information between the above components. Communication interface 1604 is configured to communicate with another device or with a communication network. The memory 1603 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, or a random access memory (RAM) or other type of dynamic read-only storage device that can store information and instructions, or it can be an electrically erasable programmable read-only memory (EEPROM), a read-only memory on compact disc (compact disc read-only memory, CD-ROM), or other compact disk storage, optical disk storage (including a compact disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, and the like) , a disk storage medium or other disk storage device, or any other medium that can be used to carry or store expected program code in the form of an instruction or a data structure and that can be accessed by a computer, but this is not limited herein. The memory can exist independently, and can be connected to the processor through a bus. Alternatively, the memory may be integrated with the processor. Memory 1603 may exist independently, and is connected to processor 1601 via communication bus 1602. Memory 1603 may alternatively be integrated into processor 1601. Optionally, memory 1603 is configured to store program code or RRRQnn / zznz / E / YiAi instructions to execute the solutions of this request, and the processor 1601 controls the execution. Processor 1601 is configured to execute program code stored in memory 1603. The program code may include one or more software modules. Optionally, the processor 1601 may also store program code or instructions to execute the solutions of this application. In a specific implementation, in one embodiment, the processor 1601 may include one or more CPUs, for example, a CPU 0 and a CPU 1 in FIGURE 16. In a specific implementation, in one embodiment, the apparatus 1600 may include a plurality of processors, for example, processor 1601 and a processor 1607 in FIGURE 16. Each of the processors may be a single-core processor (single CPU ) or a multi-core processor (multi-CPU). Processor herein may refer to one or more devices, circuits and / or processing cores configured to process data (e.g., computer program instructions). Communication interface 1604 is configured to use any device such as a transceiver to communicate with another device or with a communication network. The communication network may be Ethernet, a radio access network (RAN), a wireless local area network (WLAN), or the like. In this embodiment of this application, the communication interface 1604 may be configured to receive a packet sent by another network device on a segment routing network, or send a packet to another network device on the segment routing network. The communication interface 604 may be an Ethernet interface (Ethernet), a Fast Ethernet (FE) interface, or a gigabit Ethernet (GE) interface. It should be understood that the above product forms of network devices have any function of network devices in the above embodiments of the packet processing method, and the details are not described herein. See FIGURE 17. One embodiment of this application provides a schematic diagram of a packet processing apparatus 1700 applied to a segment routing network. The device 1700 may be the control device or the trajectory calculation element provided in the embodiment shown in FIGURE 1 or FIGURE 3. The apparatus 1700 includes at least a processor 1701, a bus system 1702, a memory 1703 and at least one minus one communication interface 1704. The apparatus 1700 is an apparatus of a hardware structure and can be configured to implement function modules in the apparatus 1400 shown in FIGURE 14. For example, a person skilled in the art may imagine that the processing unit 1402 in the apparatus 1400 shown in FIGURE 14 can be implemented by invoking a code in memory 1703 by at least one processor 1701, and the sending unit 1401 in the apparatus RRRQnn / zznz / E / YiAi 1400 shown in FIGURE 14 can be implemented by using the communication interface 1704. Optionally, the processor 1701 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit, ASIC), or one or more integrated circuits configured to control the program execution of the solutions of this application. The bus system 1702 may include a path for transmitting information between the above components. Communication interface 1704 is configured to communicate with another device or with a communication network. The memory 1703 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, or a random access memory (RAM) or other type a dynamic read-only storage device that can store information and instructions, or it can be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory read-only memory, CD-ROM), or other compact disk storage, optical disk storage (including a compact disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, and the like) , a disk storage medium or other disk storage device, or any other medium that can be used to carry or store expected program code in the form of an instruction or a data structure and that can be accessed by a computer, but this is not limited herein. The memory can exist independently, and can be connected to the processor through a bus. Alternatively, the memory may be integrated with the processor. Memory 1703 may exist independently, and is connected to processor 1701 via communication bus 1702. Memory 1703 may alternatively be integrated into processor 1701. Optionally, memory 1703 is configured to store program code or instructions for executing the solutions of this request, and processor 1701 controls execution. Processor 1701 is configured to execute program code stored in memory 1703. The program code may include one or more software modules. Optionally, the processor 1701 may also store program code or instructions to execute the solutions of this application. In a specific implementation, in one embodiment, the processor 1701 may include RRRQnn / zznz / E / YiAi one or more CPUs, for example, a CPU 0 and a CPU 1 in FIGURE 17. In a specific implementation, in one embodiment, the apparatus 1700 may include a plurality of processors, for example, processor 1701 and a processor 1707 in FIGURE 17. Each of the processors may be a single-core processor (single CPU ) or a multi-core processor (multi-CPU). Processor herein may refer to one or more devices, circuits and / or processing cores configured to process data (e.g., computer program instructions). Communication interface 1704 is configured to use any device such as a transceiver to communicate with another device or with a communication network. The communication network may be Ethernet, a radio access network (RAN), a wireless local area network (WLAN), or the like. In this embodiment of this application, the communication interface 1704 may be configured to receive a packet sent by another network device on a segment routing network, or send a packet to another network device on the segment routing network. The communication interface 1704 may be an Ethernet interface (Ethernet), a Fast Ethernet (FE) interface, or a gigabit Ethernet (GE) interface. FIGURE 18 is a schematic diagram of a structure of an apparatus 1800 according to an embodiment of this application. The apparatus 1800 may be any of the network devices provided in the embodiment shown in FIGURE 1, FIGURE 2, FIGURE 3, FIGURE 4, FIGURE 7, FIGURE 8, FIGURE 9, FIGURE 10, or FIGURE 11. See the schematic diagram of the structure of the device shown in FIGURE 18. Apparatus 1800 includes a main control board and one or more interface boards. The main control board and interface boards are connected to each other. The main control board is also called the main processing unit (MPU) or route processor card. The main control board is responsible for controlling and managing each component in the 1800 device, including route calculation, device management, and function maintenance. The interface board is also called a line processing unit (LPU) or line card, and is configured to forward data. In some embodiments, the apparatus 1800 may also include a switchboard. The switching board is communicatively connected to the main control board and interface boards. The switching board is configured to forward data between the interface boards. The switch board may also be called a switch fabric unit (SFU). The interface board includes a central processing unit, memory, a forwarding chip, and a physical interface card (PIC). The central processing unit communicates with memory, a network processor, and the physical interface card. The memory is RRRQnn / zznz / E / YiAi configures to store a forwarding table. The forwarding chip is configured to forward a received data packet based on the forwarding table stored in memory. If a destination address of the data packet is an address of the device 1800, the data packet is sent to the central processing unit (CPU), for example, a central processing unit 1831, for processing. If a destination address of the data packet is not an address of apparatus 1800, a next hop and egress interface corresponding to the destination address is found from the forwarding table based on the destination address, and the packet Data is forwarded to the output interface that corresponds to the destination address. The forwarding chip may be a network processor (NP). The PIC, also called a subcard, can be installed on the interface board. The PIC is responsible for converting an optical or electrical signal into a data packet, checking the validity of the data packet, and forwarding the data packet to the forwarding chip for processing. In some embodiments, the central processing unit may also perform a function of the forwarding chip, for example, implementing software forwarding based on a general-purpose CPU, so that the interface board does not need the forwarding chip. A communication connection between the main control board, the interface boards and the switching board can be implemented by using a bus. In some embodiments, the forwarding chip may be implemented as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Logically, apparatus 1800 includes a control plane and a forwarding plane. The control plane includes the main control board and the central processing unit. The forwarding plane includes components to perform forwarding, such as memory, PIC, and NP. The control plane performs functions such as a function of a router, generating a forwarding table, processing signaling and protocol packets, and configuring and maintaining a state of a device. The control plane delivers the generated forwarding table to the forwarding plane. In the forwarding plane, the NP looks up a table based on the forwarding table delivered by the control plane to forward a packet received by the PIC of apparatus 1800. The forwarding table delivered by the control plane may be stored in the memory. In some embodiments, the control plane and the forwarding plane may be completely separate, and are not on the same device. The following briefly describes the above process with reference to the modality shown in FIGURE 3. As shown in the method described in FIGURE 3, the second network device may transmit a plurality of first packets through a physical interface card 1833, and send the plurality of first packets to the CPU 1831 for processing. The CPU 1831 can process the first packets based on the availability of the SIDs RRRQnn / zznz / E / YiAi target in the first few packets. It should be noted that, there may be one or more main control boards, and when there are a plurality of main control boards, the main control boards may include a primary main control board and a secondary main control board. There may be one or more interface boards. A network device with greater data processing capacity provides more interface boards. There may also be one or more physical interface cards on the interface board. There may be no switchboard, or there may be one or more switchboards. When there are a plurality of switchboards, load sharing and redundancy support can be jointly implemented by the plurality of switchboards. In a centralized forwarding architecture, the network device may not need the switching board, and the interface board provides a service data processing function in an entire system. In a distributed forwarding architecture, the network device may have at least one switching board, and data exchange between a plurality of interface boards is implemented by using the switching board, to provide high-capacity data exchange and processing capacity. Therefore, a data access and processing capability of the network device in the distributed architecture is better than that of the device in the centralized architecture. Optionally, the network device may have a form in which there is only one card. To be specific, there is no switching board, and the functions of the interface board and the main control board are integrated into the card. In this case, the central processing unit on the interface board and the central processing unit on the main control board can be combined into one central processing unit on the card, to realize the functions obtained after the combination of two units. processing centers. The device of this form (for example, a network device such as a low-end switch or router) has a relatively weak data exchange and processing capability. Which architecture is used depends specifically on a specific network deployment scenario. This is not limited herein. The network device provided in this embodiment of the present invention may correspond to any network device in the method embodiments in FIGURE 1, FIGURE 2, FIGURE 3, FIGURE 4, FIGURE 5, FIGURE 6, FIGURE 7, FIGURE 8, FIGURE 9, FIGURE 10 and FIGURE 11, and may implement functions of the network device and / or various steps and methods implemented by the network device in the above method embodiments. The above is simply a brief exemplary description. For brevity, the details are not described herein again. FIGURE 19 is a schematic diagram of a data processing system. RRRQnn / zznz / E / YiAi packets 1900 in accordance with an embodiment of this application. The system 1900 provided in this embodiment of this application may include the apparatus 1200 provided in the embodiment shown in FIGURE 12, and the apparatus 1300 provided in the embodiment shown in FIGURE 13, or may include the apparatus 1500 provided in the embodiment shown in FIGURE 15 and the apparatus 1600 provided in the embodiment shown in FIGURE 16, or may include the apparatus 1800 provided in the embodiment shown in FIGURE 18. The apparatus 1200 provided in the embodiment shown in FIGURE 12, the apparatus 1500 provided in the embodiment shown in FIGURE 15, or the apparatus 1800 provided in the embodiment shown in FIGURE 18 may be referred to as first device 1901. The apparatus 1300 provided in 13, the apparatus 1600 provided in the embodiment shown in FIGURE 16, or the apparatus 1800 provided in the embodiment shown in FIGURE 18 may be referred to as second device 1902. The first device 1901 communicates with the second device 1902. In a possible implementation, the second device 1902 may perform method steps and related optional forms, performed by the first network device in the embodiment shown in FIGURE 3, and the first device 1901 may perform method steps and related optional forms, performed by the second network device, the third network device, or the fourth network device in the embodiment shown in FIGURE 3. 7, and the second device 1902 may perform steps of method and related optional forms, carried out by the network device 11 provided in the embodiment shown in FIGURE 7. In a possible implementation, the first device 1901 may perform method steps and optional related forms performed by the network device 15 or the network device 12 provided in the embodiment shown in the FIGURES, and the second device 1902 may perform steps of method and related optional forms, carried out by the network device 15 provided in the embodiment shown in the FIGURES. In a possible implementation, the first device 1901 may perform related optional method steps and forms, performed by the network device 11 or the network device 12 provided in the embodiment shown in FIGURE 9 or FIGURE 10, and the second device 1902 may perform method steps and related optional forms, performed by the network device 11 provided in the embodiment shown in FIGURE 9 or FIGURE 10. In a possible implementation, the first device 1901 may perform method steps and related optional forms, performed by the network device 12 or the network device 13 provided in the embodiment shown in FIGURE 11, and the second device 1902 may perform steps of method and related optional forms, carried out by the network device 12 provided in the embodiment shown in FIGURE 11. In one possible form, see FIGURE 20. The system 1900 further includes the apparatus 1400 provided in the embodiment shown in FIGURE 14 or the apparatus 1700 provided in the embodiment shown in FIGURE 17. The apparatus 1400 provided in the embodiment shown in FIGURE 14 or the apparatus 1700 provided in the embodiment shown in FIGURE 17 may be a control device 1903. The control device 1903 may perform method steps and related optional forms performed by the control device and the like in the embodiment shown in FIGURE 3. A person of ordinary skill in the art may be aware that, in combination with the examples described in the embodiments disclosed in this specification, the method steps and units may be implemented by electronic hardware, computer software or a combination of the themselves. In order to clearly describe the interchangeability between hardware and software, the above has generally described stages and compositions of each modality according to functions. Whether functions are performed by hardware or software depends on the particular application and a design constraint on the technical solutions. A person of ordinary skill in the art may use different methods to implement the described functions for each particular application, but the implementation should not be considered to be beyond the scope of the present application. It can be clearly understood by a person of ordinary skill in the art that, for the purpose of a convenient and brief description, for a detailed working process of the above system, apparatus and unit, refer to a corresponding process in the above embodiments of the method. Details are not described again herein. In the various embodiments provided in this application, it should be understood that the apparatus and methods described may be implemented in another manner. For example, embodiments of the apparatus described are merely examples. For example the division into units is simply a division of logical functions and may be another division in a real implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not realized. Furthermore, the mutual couplings or direct couplings or communication connections shown or discussed can be implemented by using some interfaces and RRRQnn / zznz / E / YiAi indirect couplings or communication connections between devices or units may be implemented in an electrical or other way. Units described as separate parts may or may not be physically separate and parts shown as units may or may not be physical units, may be located in one location, or may be distributed across a plurality of network drives. Some or all of the units may be selected based on an actual requirement to achieve an objective of the solutions of the modalities in the present application. Furthermore, the processing units in the embodiments of this application may be dispersed into a plurality of function units, or may be integrated into one processing unit. Each of the units can exist alone physically or two or more units can be integrated into one unit. The integrated unit may be implemented in the form of hardware, or it may be implemented in the form of a software functional unit. All or some of the above embodiments may be implemented using software, hardware, firmware or any combination thereof. When software, firmware, or a combination of software and hardware is used to implement the modalities, all or some of the modalities may be implemented in the form of a computer program product. The computer program product includes one or more computer program instructions. When computer program instructions are loaded and executed on a computer, procedures or functions in accordance with the embodiments of this application are generated in whole or in part. The computer may be a general purpose computer, a dedicated computer, a computer network, or other programmable device. Computer instructions may be stored on a computer-readable storage medium or may be transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired or wireless manner. The computer-readable storage medium may be any medium that can be accessed by a computer or may be a data storage device, such as a server or a data center, into which one or more media are integrated. The medium may be a magnetic medium (for example, a floppy diskette, a hard disk, or a magnetic tape), an optical medium (for example, an optical disk), a semiconductor medium (for example, a solid state drive) , or similar. The objectives, technical solutions and benefits of this application are also described in greater detail in the specific modalities above. It should be understood that the above descriptions are simply specific embodiments of the present application, but are not intended to limit the scope of protection of the present application. Any modification, equivalent replacement or improvement made based on the technical solutions of this application shall fall within the scope of protection of this application.

Claims

NOVELTY OF THE INVENTION Having described the present invention as above, the following claims are considered novel and are therefore claimed as property: CLAIMS 1. A packet processing method, applied to a segment routing network, the method characterized in that it comprises: receiving, by means of a first network device, a first packet, wherein the first packet comprises a plurality of segment identifier lists, SIDs, the plurality of SID lists comprising a primary SID list and at least one secondary SID list, at least one secondary SID list comprising a first secondary SID list, and the first secondary SID list is a backup of the primary SID list; and processing, by means of the first network device, the first packet based on the primary SID list.

2. The method according to claim 1, characterized in that the processing, by the first network device, of the first packet based on the primary SID list comprises: performing, by the first network device, different processing on the first packet depending on whether a target SID is available, wherein the target SID is one or more unexecuted SIDs in the primary SID list.

3. The method according to claim 2, characterized in that the first secondary SID list, which is a backup of the primary SID list, comprises a forwarding path indicated by the first secondary SID list, which is a backup path of a forwarding path indicated by the primary SID list.

4. The method according to claim 3, characterized in that the available target SID comprises a network device corresponding to the target SID being accessible to the first network device.

5. The method according to claim 3 or 4, characterized in that the processing, by the first network device, of the first packet when the target SID is not available, comprises: sending, by the first network device, the first packet based on a first SID, wherein the first SID is the 1st SID in the first list of secondary SIDs.

6. The method according to claim 3 or 4, characterized in that the first network device is an intermediate node in an end-to-end primary forwarding path indicated by the plurality of SID lists, the target SID is the last SID RRRonn / zznz / E / YiAi in the primary SID list, and the target SID is a SID of the first network device; and processing, by means of the first network device, the first packet when the target SID is not available, comprises: forwarding, by means of the first network device, the first packet based on a first SID, wherein the first SID is the 1st SID after at least one secondary SID list in the plurality of SID lists.

7. The method according to any of claims 3 to 5, characterized in that the first network device is a queue node in an end-to-end primary forwarding path indicated by the plurality of SID lists, the target SID is the last SID in the primary SID list, and the target SID is a SID of the first network device; and processing, by means of the first network device, the first packet when the target SID is not available, comprises: performing, by means of the first network device, a function corresponding to the target SID and removing the plurality of SID lists.

8. The method according to claim 2, characterized in that the first secondary SID list which is a backup of the primary SID list comprises that a service corresponding to the first secondary SID list is a backup of a service corresponding to the primary SID list, and the available target SID comprises that a service corresponding to the target SID is available.

9. The method according to claim 8, characterized in that the processing, by the first network device, of the first packet when the target SID is not available, comprises: providing, by the first network device, a service corresponding to a first SID for the first packet based on a first SID, wherein the first SID is the 1st SID in the first list of secondary SIDs.

10. The method according to claim 8, characterized in that the first network device is an intermediate node in an end-to-end primary forwarding path indicated by the plurality of SID lists, the target SID is the 1st SID in the unexecuted SIDs, and the processing, by the first network device, of the first packet when the target SID is available, comprises: providing, by the first network device, the service corresponding to the target SID and forwarding the first packet based on a first SID, wherein the first SID is the 1st SID after at least one secondary SID list in the plurality of SID lists.

11. The method according to claim 8 or 9, characterized in that the first network device is a queue node in an end-to-end primary forwarding path indicated by the plurality of SID lists, the target SID is the last SID in the unexecuted SIDs, and the processing, by the first network device, of the first packet when the target SID is available, comprises: providing, by the first network device, the service corresponding to the target SID and removing the plurality of SID lists.

12. The method according to any of claims 5, 6, 9 and 10, characterized in that the first packet comprises location indication information, and the method further comprises: obtaining, by means of the first network device, the first SID based on the location indication information, wherein the location indication information is used to indicate one or more of the following: a location of the primary SID list in the plurality of SID lists, a location of the first secondary SID list in the plurality of SID lists, and a location of at least one secondary SID list in the plurality of SIDs.

13. The method according to any of claims 2 to 12, characterized in that prior to processing, by the first network device, the first packet based on the primary SID list, the method further comprises: receiving, by the first network device, a configuration instruction; and performing, by the first network device based on the configuration instruction, an action to obtain a second SID based on whether the target SID is available and processing the first packet based on the second SID, wherein the second SID comprises a SID in the primary SID list, the 1st SID in the first secondary SID list, or the 1st SID after at least one secondary SID list in the plurality of SID lists.

14. The apparatus according to any of claims 2 to 13, characterized in that the plurality of SID lists is located in a segment routing header, SRH, of the first packet, or the plurality of SID lists is located in a multi-protocol label switching header of the first packet.

15. The apparatus according to any of claims 1 to 13, 14, characterized in that the primary SID list and the first secondary SID list are located in different SRHs of the first package.

16. The apparatus according to any of claims 1 to 15, characterized in that the primary SID list is adjacent to the first secondary SID list, and the last SID in the primary SID list is located before the first secondary SID list. RRRQnn / zznz / E / YiAi 17. The method according to any of claims 1 to 16, characterized in that at least one secondary SID list further comprises a second secondary SID list, and the second secondary SID list is a backup copy of the first secondary SID list and / or the second secondary SID list is a backup copy of the primary SID list.

18. The apparatus according to any of claims 1 to 17, characterized in that the plurality of SID lists further comprises another primary SID list and another secondary SID list, and the other secondary SID list is a backup copy of the other primary SID list.

19. A network device, characterized in that the network device is configured to implement the method according to any of claims 1 to 18.

20. A network system, characterized in that it comprises a network device, wherein the network device is configured to implement the method according to any 15 of claims 1 to 18.