Packet processing method and network device
By encapsulating MPLS packet headers with indication information for network slices and forwarding paths, the method addresses the resource-intensive labeling in SR-MPLS network slicing, achieving efficient resource conservation in MPLS and SID resources.
Patent Information
- Application Number
- JP2022581598
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-09-25
- Filing Date
- 2021-07-01
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2041-07-01
AI Technical Summary
In SR-MPLS-based network slicing, the extensive use of different MPLS labels for identifying network slices leads to significant consumption of MPLS label resources, especially in large network scenarios.
The method involves encapsulating MPLS packet headers with different indication information to indicate network slices and packet forwarding paths, allowing network devices to forward packets based on unified network slice indication without assigning distinct MPLS labels, thereby conserving MPLS label resources.
This approach efficiently saves MPLS label resources and effectively conserves SID resources in SR-MPLS networks by eliminating the need for multiple MPLS labels and SIDs to identify network slices and forwarding paths.
Smart Images

Figure 0007674401000001 
Figure 0007674401000002 
Figure 0007674401000003
Abstract
Description
[Technical field]
[0001] This application claims priority to Chinese Patent Application No. 202010638513.0, filed with the State Intellectual Property Office of China on July 6, 2020, and entitled "METHOD AND DEVICE FOR RETAINING A NETWORK SLICE IDENTIFIER," and claims priority to Chinese Patent Application No. 202011022649.5, filed with the State Intellectual Property Office of China on September 25, 2020, and entitled "PACKET PROCESSING METHOD AND NETWORK DEVICE," both of which are incorporated by reference in their entireties herein.
[0002] The present application relates to the field of communications technology, and in particular to a packet processing method and a network device. [Background technology]
[0003] Segment Routing (SR) is a source routing technology. The basic principle of SR is to encapsulate one or more segment identifiers (SIDs) into a data packet header, where each SID indicates a particular node, link, or service function to be performed in the network. Thus, each node in the network successively selects the node or link through which the packet needs to pass, or selects the service function to be performed according to the indication of the SID in the packet header. Multi-Protocol Label Switching (MPLS) may be used as a data plane technology for SR. In this case, the SIDs in SR are encapsulated and maintained on the data plane using the MPLS label stack. There are two basic SID types in SR-MPLS, prefix-SID and adj-SID, which are used to identify nodes and links in the SR network, respectively. The SID list obtained by combining the two types of SIDs can implement the function of indicating a forwarding path using SR.
[0004] Currently, in solutions implementing network slicing based on SR-MPLS, different SR SIDs are used to identify different network slices to which nodes and links belong. Specifically, each node needs to assign different prefix-SIDs to different network slices as identifiers of nodes in different network slices. In addition, each node is further required to assign different adj-SIDs to connected links in different network slices to identify resources assigned to different network slices on the same link. In other words, different nodes and links in the same network slice and the same node and link in different network slices all need to be identified by different MPLS labels.
[0005] As a result, many MPLS labels need to be allocated when the network slices are numerous and large, causing serious consumption of MPLS label resources. Summary of the Invention
[0006] The embodiments of the present application provide a packet processing method and a network device. An MPLS packet header is encapsulated for a packet on an MPLS data plane, and a network slice corresponding to the packet and a forwarding path of the packet are indicated in the MPLS packet header through different indication information, respectively. In this way, the network device on the forwarding path forwards the packet normally based on the unified network slice indication information without needing to assign different MPLS labels to the same network slice as the network slice identifier. This can effectively save MPLS label resources. In addition, the packet processing method can also be applied to an SR-MPLS network to effectively save SID resources.
[0007] According to a first aspect of the present application, a packet processing method is provided. The method includes a step of a first network device obtaining a packet, where the first network device may be a network device in an MPLS network or an SR-MPLS network. The first network device adds first indication information and second indication information to the packet to obtain an updated packet, where the first indication information and the second indication information are located in an MPLS packet header of the updated packet, where the first indication information may include, for example, a network slice identifier and may indicate a network slice corresponding to the packet, and the second indication information indicates a forwarding path of the packet. The first network device transmits the updated packet to a second network device.
[0008] In a possible case, if the packet acquired by the first network device already includes an MPLS packet header, the first network device may add the first indication information and the second indication information to the existing MPLS packet header, and obtain an updated packet. In another possible case, if the packet acquired by the first network device does not include an MPLS packet header, the first network device may add a new MPLS packet header, add the first indication information and the second indication information to the newly added MPLS packet header, and obtain an updated packet. The position for adding the first indication information and the second indication information may be set in the MPLS label stack or the MPLS extension header, for example, based on a specific design. The first network device capable of performing the operation of adding indication information may be a head node of the MPLS network.
[0009] In this solution, an MPLS packet header is encapsulated for a packet on an MPLS data plane, and a network slice corresponding to the packet and a forwarding path of the packet are indicated in the MPLS packet header through different indication information, respectively. In this way, a network device can forward a packet normally based on the same network slice indication information without needing to identify the network slice and the nodes and links on the forwarding path based on a single MPLS label, in other words, without needing to identify the network slice to which the nodes and links belong based on the MPLS label. This can effectively save MPLS label resources. By applying the packet processing method to an SR-MPLS network, SID resources can also be effectively saved.
[0010] Optionally, in a possible implementation, the MPLS packet header includes an MPLS label stack, the MPLS label stack includes a first label field and a second label field, the first label field indicates that the second label field includes the second indication information, and the second label field includes the second indication information, and the first indication information and the second indication information are respectively carried by using different label fields in the MPLS label stack, which can improve the scalability of the solution.
[0011] Optionally, in a possible implementation, the first label field includes an Extension Label (EL) and an Extended Special Purpose Label (ESPL).
[0012] Optionally, in a possible implementation, the MPLS packet header includes an MPLS special purpose label, and a reserved field in the MPLS special purpose label includes the first indication information.
[0013] Optionally, in a possible implementation, the MPLS special purpose label includes an entropy label or a flow identifier (Flow-ID) label.
[0014] Optionally, in a possible implementation, the reserved fields include one or more of a Traffic Class (TC) field and a Time to Live (TTL) field.
[0015] Optionally, in a possible implementation, the MPLS packet header includes an MPLS extension header, the MPLS extension header carrying the first indication information.
[0016] Optionally, in a possible implementation, the step of the first network device transmitting the updated packet to the second network device includes the step of the first network device determining, based on the network slice, a forwarding resource to be used for transmitting the updated packet, and the first network device transmits the updated packet by using the forwarding resource.
[0017] Optionally, in a possible implementation, the forwarding resources include one or more of a processing resource, an outbound interface resource, and a queue resource of the first network device.
[0018] Optionally, in a possible implementation, the updated packet sent by the first network device to the second network device is the first packet, and the method further includes the first network device further updating the packet and obtaining a second packet, where the second packet includes the first indication information and the third indication information, and the third indication information indicates a forwarding path of the second packet. The first network device transmits the second packet to the third network device. In other words, in addition to transmitting the packet to the second network device, the first network device may further transmit the packet to another adjacent network device, implementing multipath packet forwarding. This implementation may be applied to application scenarios such as reliable forwarding or multicast forwarding. The first network device copies the payload and / or other necessary data information of the obtained packet multiple times, for example, through copying, to generate at least a first packet and a second packet, and add network slice indication information and forwarding path indication information to each of the first packet and the second packet. The network slice indication information of the first packet and the network slice indication information of the second packet may be the same. In this case, the first packet and the second packet, both of which are multicast duplicate packets of the packet acquired by the first network device, may share the same network slice resource. However, the forwarding path indication information of the first packet and the forwarding path indication information of the second packet may be different to separately indicate that the first packet and the second packet used as duplicate packets are distributed along different forwarding paths. Thus, high reliability of multicast data distribution or network data distribution is ensured.
[0019] In another possible case, the network slice indication information of the first packet and the network slice indication information of the second packet may alternatively be different, and the forwarding path indication information of the first packet and the forwarding path indication information of the second packet may alternatively be the same.
[0020] Optionally, in a possible implementation, the first network device is a network device in an MPLS network or an SR-MPLS network.
[0021] According to a second aspect of the present application, a packet processing method is provided. The method includes a step in which a first network device receives a packet transmitted by a second network device, the packet includes a Multi-Protocol Label Switching (MPLS) packet header, the MPLS packet header includes first indication information and second indication information. The first network device determines a network slice corresponding to the packet based on the first indication information. The first network device forwards the updated packet to a third network device by using the network slice, the third network device being a device on a forwarding path of the packet and determined based on the second indication information. The first network device may be any transit node device or tail node device in the MPLS network. In the solution, the first network device may analyze the first indication information in the MPLS packet header, the first indication information may be a unified identifier used to identify a network slice in the MPLS network. The first network device may determine a network slice that needs to be used to forward the packet based on the unified identifier. In the solution, the network slice corresponding to the packet and the forwarding path of the packet are indicated in the MPLS packet header by adding different indication information, respectively. In this way, the network devices on the forwarding path forward the packet normally based on the unified network slice indication information without needing to assign different MPLS labels to the same network slice as the slice identifier. This can effectively save MPLS label resources. In addition, by applying the packet processing method to the SR-MPLS network, SID resources can also be effectively saved.
[0022] Optionally, in a possible implementation, the step of the first network device forwarding the updated packet to the third network device by using the network slice includes the step of the first network device determining a forwarding resource allocated to the network slice based on the network slice corresponding to the packet. The first network device forwards the updated packet to the third network device by using the forwarding resource. In another possible case, in addition to being associated with the forwarding resource, the network slice may further be associated with a network topology. In this case, the step of the first network device forwarding the updated packet to the third network device by using the network slice includes the step of the first network device determining a network topology and / or forwarding resource corresponding to the network slice based on the network slice corresponding to the packet, and forwarding the updated packet to the third network device based on the network topology and / or forwarding resource.
[0023] Optionally, in a possible implementation, the forwarding resources include one or more of a processing resource, an outbound interface resource, and a queue resource of the first network device.
[0024] Optionally, in a possible implementation, the updated packet includes the first indication information, or the packet includes updated first indication information, the updated first indication information being determined based on the first indication information, and the updated first indication information indicating a network slice corresponding to the updated packet.
[0025] Optionally, in a possible implementation, the updated packet includes updated second instruction information, where the updated second instruction information indicates a forwarding path of the updated packet.
[0026] Optionally, in a possible implementation, before the first network device forwards the packet based on the network slice corresponding to the packet, the method further includes the first network device decapsulating the packet and obtaining a decapsulated packet, the decapsulated packet not including MPLS packet header information added by, for example, a head node (e.g., the first network device capable of implementing the role of a head node described in the first aspect), the MPLS packet header information including the network slice indication information and the forwarding path indication information. In this scenario, in a possible case, before the head node adds the MPLS packet header information initially obtained by the head node to the packet, the packet does not include an MPLS packet header, whereby the head node may add a complete MPLS packet header including the MPLS packet header information. In this case, the first network device may remove the complete MPLS packet header through the decapsulation operation. In another possible case, before the head node adds the MPLS packet header information to the packet initially obtained by the head node, the packet already includes an MPLS packet header, whereby the head node adds the corresponding MPLS packet header information to the existing MPLS packet header. In this case, the first network device may remove at least remaining MPLS packet header information in the MPLS packet header added by the head node through the decapsulation operation, but retain the original MPLS packet header included in the packet originally obtained by the head node. The first network device may be a tail node of the MPLS network. When the first network device implements the role of a tail node, the MPLS packet header information removed through the decapsulation operation may include, for example, network slice indication information added by the head node and information that does not appear on a transit node (e.g., a tail node label) among the forwarding path indication information added by the head node.
[0027] Optionally, in a possible implementation, the MPLS packet header includes an MPLS label stack, the MPLS label stack includes a first label field and a second label field, the first label field indicates that the second label field includes the second indication information, and the second label field includes the second indication information.
[0028] Optionally, in a possible implementation, the first label includes an extended label and an extended special purpose label.
[0029] Optionally, in a possible implementation, the MPLS packet header includes an MPLS special purpose label, and a reserved field in the MPLS special purpose label includes the first indication information.
[0030] Optionally, in a possible implementation, the MPLS special purpose label includes an entropy label or a flow identifier label.
[0031] Optionally, in a possible implementation, the reserved fields include one or more of a priority field and a time-to-live field.
[0032] Optionally, in a possible implementation, the MPLS packet header includes an MPLS extension header, the MPLS extension header carrying the first indication information.
[0033] Optionally, in a possible implementation, the first network device is a network device in an MPLS network or a segment routing multi-protocol label switching (SR-MPLS) network.
[0034] According to a third aspect of the present application, there is provided a network device, the network device being a first network device, including: an acquiring unit configured to acquire a packet, a processing unit configured to add first and second indication information to the packet to acquire an updated packet, the first and second indication information being located in a Multi-Protocol Label Switching (MPLS) packet header of the updated packet, the first indication information indicating a network slice corresponding to the packet, and the second indication information indicating a forwarding path for the packet, and a transceiver unit configured to transmit the updated packet to a second network device.
[0035] Optionally, in a possible implementation, the MPLS packet header includes an MPLS label stack, the MPLS label stack includes a first label field and a second label field, the first label field indicates that the second label field includes the second indication information, and the second label field includes the second indication information.
[0036] Optionally, in a possible implementation, the first label field includes an extended label EL and an extended special purpose label ESPL.
[0037] Optionally, in a possible implementation, the MPLS packet header includes an MPLS special purpose label, and a reserved field in the MPLS special purpose label includes the first indication information.
[0038] Optionally, in a possible implementation, the MPLS special purpose label includes an entropy label or a flow identifier Flow-ID label.
[0039] Optionally, in a possible implementation, the reserved fields include one or more of a Priority TC field and a Time-to-Live TTL field.
[0040] Optionally, in a possible implementation, the MPLS packet header includes an MPLS extension header, the MPLS extension header carrying the first indication information.
[0041] Optionally, in a possible implementation, the processing unit is further configured to determine, based on the network slice, a forwarding resource to be used for transmitting the updated packet. The processing unit is specifically configured to transmit the updated packet by using the forwarding resource.
[0042] Optionally, in a possible implementation, the forwarding resources include one or more of a processing resource, an outbound interface resource, and a queue resource of the first network device.
[0043] Optionally, in a possible implementation, the processing unit is further configured to update the packet and obtain a second packet, the second packet including the first instruction information and the third instruction information, the third instruction information indicating a forwarding path of the second packet. The transceiver unit is further configured to send the second packet to a third network device.
[0044] Optionally, in a possible implementation, the first network device is a network device in an MPLS network or a segment routing multi-protocol label switching (SR-MPLS) network.
[0045] According to a fourth aspect of the present application, there is provided a network device, the network device being a first network device, comprising: a transceiver unit configured to receive a packet transmitted by a second network device, the packet including a Multi-Protocol Label Switching (MPLS) packet header, the MPLS packet header including first indication information and second indication information; and a processing unit configured to determine a network slice corresponding to the packet based on the first indication information. The transceiver unit is further configured to forward the updated packet to a third network device by using the network slice, the third network device being a device on a forwarding path of the packet and determined based on the second indication information.
[0046] Optionally, in a possible implementation, the processing unit is further configured to determine, based on the network slice corresponding to the packet, a forwarding resource allocated to the network slice. The transceiver unit is specifically configured to forward the updated packet to the third network device by using the forwarding resource.
[0047] Optionally, in a possible implementation, the forwarding resources include one or more of a processing resource, an outbound interface resource, and a queue resource of the first network device.
[0048] Optionally, in a possible implementation, the updated packet includes the first indication information, or the packet includes updated first indication information, the updated first indication information being determined based on the first indication information, and the updated first indication information indicating a network slice corresponding to the updated packet.
[0049] Optionally, in a possible implementation, the updated packet includes updated second instruction information, where the updated second instruction information indicates a forwarding path of the updated packet.
[0050] Optionally, in a possible implementation, the processing unit is further configured to decapsulate the packet and obtain the decapsulated packet.
[0051] Optionally, in a possible implementation, the MPLS packet header includes an MPLS label stack, the MPLS label stack includes a first label field and a second label field, the first label field indicates that the second label field includes the second indication information, and the second label field includes the second indication information.
[0052] Optionally, in a possible implementation, the first label includes an extended label and an extended special purpose label.
[0053] Optionally, in a possible implementation, the MPLS packet header includes an MPLS special purpose label, and a reserved field in the MPLS special purpose label includes the first indication information.
[0054] Optionally, in a possible implementation, the MPLS special purpose label includes an entropy label or a flow identifier label.
[0055] Optionally, in a possible implementation, the reserved fields include one or more of a priority field and a time-to-live field.
[0056] Optionally, in a possible implementation, the MPLS packet header includes an MPLS extension header, the MPLS extension header carrying the first indication information.
[0057] Optionally, in a possible implementation, the first network device is a network device in an MPLS network or a segment routing multi-protocol label switching (SR-MPLS) network.
[0058] According to a fifth aspect of the present application, a network device is provided. The network device includes a processor configured to enable the network device to implement a method according to any possible implementation of the first aspect. The device may further include a memory. The memory is coupled to the processor. When the processor executes instructions stored in the memory, the network device may be enabled to implement a method according to any possible implementation of the first aspect. The device may further include a communication interface. The communication interface is used by the apparatus to communicate with another device. For example, the communication interface may be a transceiver, a circuit, a bus, a module, or another type of communication interface.
[0059] According to a sixth aspect of the present application, a network device is provided. The network device includes a processor configured to enable the network device to implement a method according to any possible implementation of the second aspect. The device may further include a memory. The memory is coupled to the processor. When the processor executes instructions stored in the memory, the network device may be enabled to implement a method according to any possible implementation of the second aspect. The device may further include a communication interface. The communication interface is used by the apparatus to communicate with another device. For example, the communication interface may be a transceiver, a circuit, a bus, a module, or another type of communication interface.
[0060] In this application, the instructions in the memory may be pre-stored or may be downloaded from the Internet and then stored when a network device is used. The source of the instructions in the memory is not particularly limited in this application. A coupling in this application refers to an indirect coupling or a connection between devices, units, or modules, which may be in an electrical, mechanical, or other form, and is used for information exchange between the devices, units, or modules.
[0061] According to a seventh aspect of the present application, a computer storage medium is provided. The computer storage medium may be non-volatile. The computer storage medium stores computer readable instructions. When the computer readable instructions are executed by a processor, a method according to any of the possible implementations of the first or second aspect is implemented.
[0062] According to an eighth aspect of the present application there is provided a computer program product comprising instructions which, when executed on a computer, enable the computer to carry out a method according to any possible implementation of the first or second aspect.
[0063] According to a ninth aspect of the present application, there is provided a network system. The network system includes a network device according to any implementation of the third aspect and a network device according to any implementation of the fourth aspect. Alternatively, the network system includes a network device according to any implementation of the fifth aspect and a network device according to any implementation of the sixth aspect.
[0064] Optionally, in a possible implementation, the network system may include a plurality of network devices according to the implementation of either the fourth or sixth aspect.
[0065] The solutions provided in the third to ninth aspects are used to implement or cooperate to implement the methods provided in the first and second aspects, and thus can achieve the same or corresponding beneficial effects as those in the first and second aspects, and are not described in detail again in this specification. [Brief description of the drawings]
[0066] [Figure 1(a)] FIG. 1 is a schematic diagram of a network structure according to an embodiment of the present application;
[0067] [Figure 1(b)]FIG. 1 is a schematic diagram of a network slice structure according to an embodiment of the present application.
[0068] [Figure 1(c)] FIG. 13 is a schematic diagram of the structure of another network slice according to an embodiment of the present application.
[0069] [Figure 1(d)] FIG. 13 is a schematic diagram of the structure of another network slice according to an embodiment of the present application.
[0070] [Diagram 2] 2 is a schematic flow chart of a packet processing method 200 according to an embodiment of the present application.
[0071] [Diagram 3] FIG. 2 is a schematic diagram of packet forwarding according to an embodiment of the present application;
[0072] [Figure 4] FIG. 2 is a schematic diagram of an MPLS label structure according to an embodiment of the present application;
[0073] [Diagram 5] FIG. 2 is a schematic diagram of another MPLS label structure according to an embodiment of the present application;
[0074] [Figure 6] FIG. 2 is a schematic diagram of an MPLS packet header format according to an embodiment of the present application.
[0075] [Figure 7] FIG. 2 is a schematic diagram of an extension header format according to an embodiment of the present application;
[0076] [Figure 8] 8 is a schematic flow chart of a packet processing method 800 according to an embodiment of the present application.
[0077] [Figure 9] 9 is a schematic diagram of the structure of a network device 900 according to an embodiment of the present application.
[0078] [Figure 10] 1 is a schematic diagram of the structure of a network device 1000 according to an embodiment of the present application.
[0079] [Figure 11] FIG. 11 is a schematic diagram of the structure of a network system 1100 according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0080] In order to make the objectives, technical solutions and advantages of the present application clearer, the following describes the embodiments of the present application with reference to the accompanying drawings. It is clear that the described embodiments are only a part of the embodiments of the present application, not all of them. Those skilled in the art will recognize that the technical solutions provided in the embodiments of the present application can also be applied to similar technical problems when new application scenarios emerge.
[0081] In the present specification, claims, and accompanying drawings, the terms "first," "second," and the like are intended to distinguish between similar objects, but do not necessarily indicate a particular order or sequence. It is to be understood that data described in such a manner are interchangeable in appropriate circumstances, whereby the embodiments described herein can be implemented in an order other than that illustrated or described herein. Furthermore, the terms "comprise," "include," and any other variations are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a list of steps or modules is not necessarily limited to the explicitly listed steps or modules, but may include other steps or modules that are not explicitly listed or that are inherent to such process, method, product, or device. The names or numbers of steps in this application do not imply that the steps in a method procedure must be performed in the chronological / logical order indicated by the names or numbers. The order of execution of steps in a named or numbered procedure can be changed based on the technical objective to be achieved, if the same or similar technical effect can be achieved. In this application, the division into multiple units is a logical division, and may be other divisions in actual implementation. For example, multiple units may be combined or integrated into another system, or some features may be ignored or not implemented. Furthermore, the shown or described mutual couplings or direct couplings or communication connections may be implemented through some interfaces. Indirect couplings or communication connections between units may be implemented in an electrical form or another similar form. This is not limited in this application. Furthermore, units or sub-units described as separate parts may or may not be physically separated, may or may not be physical units, or may be distributed into multiple circuit units. Some or all of these units may be selected based on actual requirements to achieve the purpose of the solution of this application.
[0082] In 5G networks, diversified services have different requirements on the network in terms of speed, performance, security, reliability, latency, etc. For example, enhanced mobile broadband (eMBB) scenarios (e.g., virtual reality scenarios or augmented reality scenarios) have high requirements for bandwidth and require xGbps level bandwidth. In another example, massive machine type communication (mMTC) scenarios (e.g., wearable scenarios or smart grid scenarios) need to support the access of a large number of devices, e.g., hundreds of millions or billions of devices. In another example, ultra-reliable and low-latency communications (uRLLC) scenarios (e.g., autonomous driving scenarios, remote surgery scenarios, or industrial control scenarios) need to support ultra-low latency of 1 ms. Network slicing has emerged to meet different scenarios, different requirements, and ultimate experience requirements by flexibly constructing networks with different characteristics based on different scenarios and requirements.
[0083] A network slice is a customized logical network based on different service requirements on a physical or virtual network infrastructure. A network slice may be a complete end-to-end network including an access network, a transport network, a core network, and application servers, capable of providing complete communication services, and having specific network capabilities. Alternatively, a network slice may be any combination of an access network, a transport network, a core network, and application servers.
[0084] A network slice can be generally considered as an instantiated 5G network. Such a network structure allows operators to offer networks as a service to users, and physical networks can be freely combined based on metrics such as rate, capacity, coverage, delay, reliability, security, and availability to meet different user demands.
[0085] The SR technique is used to control packet forwarding by adding an ordered list of instructions to a packet. The list of instructions may be referred to as a segment list. Each label in the segment list may identify one link or node, and the entire label stack identifies a forwarding path from the top of the stack to the bottom of the stack. Each label in the segment list may be referred to as a segment identifier (SID). During packet forwarding, based on the top label of the label stack, the corresponding link is searched for, and the packet is forwarded on that link. After all the labels in the label stack have been encountered, the packet reaches its destination.
[0086] MPLS may be used as a data plane technology for SR (referred to as SR-MPLS). In this case, SIDs in SR are encapsulated and maintained on the data plane using an MPLS label stack. There are two basic SID types in SR-MPLS, prefix-SID and adj-SID, which are used to identify nodes and links in the SR network, respectively. The SID list obtained by combining the two types of SIDs can implement the source routing function of SR.
[0087] Currently, in solutions implementing network slicing based on SR-MPLS, different SR SIDs are used to identify different network slices to which nodes and links belong. Specifically, each node needs to assign different prefix-SIDs to different network slices as identifiers of the node in different network slices. In addition, each node is further required to assign different adj-SIDs to connected links to identify resources assigned to different network slices on the same link.
[0088] For example, Fig. 1(a) is a schematic diagram of a network structure according to an embodiment of the present application. As shown in Fig. 1(a), the network architecture is an SR-MPLS network architecture including multiple network devices, namely, network device 1 to network device 9.
[0089] FIG. 1(b) is a schematic diagram of a structure of a network slice according to an embodiment of the present application. As shown in FIG. 1(b), network devices 1 to 5 and network devices 7 to 9 in the SR-MPLS network architecture jointly constitute a network slice 1. Thus, one prefix-SID is assigned to each network device (e.g., network devices 101 to 105 and 107 to 109) in the network slice 1 and used as an identifier of the network device in the network slice 1. In addition, each network device needs to further assign a corresponding adj-SID to the connected link to identify the resources assigned to the network slice 1 on the link.
[0090] 1(c) is a schematic diagram of the structure of another network slice according to an embodiment of the present application. As shown in FIG. 1(c), network devices 2 to 4 and network devices 6 to 9 in the SR-MPLS network architecture jointly constitute the network slice 2. Similarly, one prefix-SID is assigned to each network device (e.g., network devices 202 to 204 and 206 to 209) in the network slice 2, and is used as an identifier of the network device in the network slice 2. In addition, each network device needs to further assign a corresponding adj-SID to the connected link to identify the resources assigned to the network slice 2 on the link.
[0091] As shown in FIG. 1(b) and FIG. 1(c), network slice 1 and network slice 2 correspond to different network topologies, meaning that different network slices may correspond to different network topologies. In some cases, different network slices may alternatively correspond to the same network topology, meaning that one network topology may correspond to multiple network slices. FIG. 1(d) is a schematic diagram of the structure of another network slice according to an embodiment of the present application. As shown in FIG. 1(d), network devices 2 to 4 and network devices 6 to 9 in the SR-MPLS network architecture jointly constitute network slice 3. In other words, the network topology corresponding to network slice 3 is the same as the network topology corresponding to network slice 2 in FIG. 1(c). Similarly, one prefix-SID also needs to be assigned to each network device in network slice 3 (e.g., network devices 302 to 304 and 306 to 309) to be used as an identifier of the network device in network slice 3. In addition, each network device further needs to assign a corresponding adj-SID to a connected link to identify resources assigned to network slice 3 on the link.
[0092] From the above description, it can be recognized that in a network, different network slices may be configured by classifying different network topologies, and the same network topology may correspond to multiple different network slices. Thus, multiple network slices may be formed in the network according to actual demands. Furthermore, each network device needs to assign different prefix-SIDs to different network slices and assign different adj-SIDs to links connected to the network device. In other words, the number of prefix-SIDs and adj-SIDs to be assigned has a positive correlation with the number of network slices. In other words, in the case of multiple network slices, if the current SR-MPLS data plane encapsulation technology is used for network slicing, multiple prefix-SIDs and multiple adj-SIDs need to be assigned to identify nodes and links in different network slices. As a result, SID resources are seriously consumed, and the complexity of SID planning and management increases. Furthermore, since the SIDs that can be assigned to each network device are limited, in the case of multiple network slices, multiple SID resources on the network device are consumed. As a result, the normal allocation of SID resources is affected.
[0093] Furthermore, since the SID is held in the MPLS label, a single MPLS label can be used to identify the network slice and the forwarding path. When the network slice is the same but the links are different, and when the network slice is different but the links are the same, different MPLS labels are needed for identification. As a result, many MPLS labels need to be assigned when the network slices are numerous and large, which causes serious consumption of MPLS label resources.
[0094] In view of this, an embodiment of the present application provides a packet processing method. An MPLS packet header is encapsulated for a packet on an MPLS data plane, and a network slice corresponding to the packet and a forwarding path of the packet are indicated in the MPLS packet header through different indication information, respectively. In this way, a network device can forward a packet normally based on a network slice without needing to identify a network slice and a forwarding path based on an MPLS label. This can effectively save MPLS label resources. In addition, SID resources can also be effectively saved by applying the packet processing method to an SR-MPLS network.
[0095] 2 is a schematic flowchart of a packet processing method 200 according to an embodiment of the present application. The packet processing method 200 may be applied to the network structure shown in FIG.
[0096] As shown in FIG. 2, a packet processing method 200 includes at least the following steps.
[0097] Step 201: A first network device receives a packet.
[0098] In this embodiment, the first network device may be a network device in an MPLS network or an SR-MPLS network. The first network device may obtain a packet in the following manner: receive a packet sent by another network device, for example, receive a data packet sent by a network device outside the MPLS network, and generate a packet by the first network device, or receive a packet from an access-side user equipment.
[0099] Step 202: The first network device adds the first indication information and the second indication information to the packet to obtain an updated packet, and the first indication information and the second indication information are located in an MPLS packet header of the updated packet, the first indication information indicates a network slice corresponding to the packet, and the second indication information indicates a forwarding path of the packet.
[0100] In this embodiment, after acquiring the packet, the first network device updates the packet, so that the MPLS packet header in the updated packet includes the first indication information and the second indication information. The packet acquired by the first network device may include an MPLS packet header. The first network device adds the first indication information and the second indication information to the MPLS packet header, and acquires the updated packet. Alternatively, the packet acquired by the first network device may not include an MPLS header. The first network device adds an MPLS packet header including the first indication information and the second indication information to the packet, and acquires the updated packet. The first network device that performs the operation of adding the first indication information and the second indication information may be a head node in the MPLS network. The head node may be, for example, a tunnel endpoint or a network boundary node.
[0101] Before adding the first indication information and the second indication information to the packet, the first network device may determine a network slice corresponding to the packet and a forwarding path of the packet to determine the first indication information and the second indication information.
[0102] In possible embodiments, the first network device may determine the network slice corresponding to the packet based on information carried in the packet, or the first network device may determine the network slice corresponding to the packet based on resource information used to receive the packet.
[0103] For example, a policy for determining a network slice may be pre-configured in the first network device. The first network device may determine a network slice corresponding to a packet, i.e., a network slice used to forward the packet, according to an instruction of the policy and based on a source address, a destination address, or a protocol number in the packet. The source address may be, for example, a source Internet Protocol (IP) address or a source Media Access Control (MAC) address for transmitting the packet, for example, an address of a user host or a base station. The destination address may be, for example, a destination IP address or a destination MAC address of the packet. Alternatively, the first network device may determine a network slice corresponding to a packet based on some other field in the packet, for example, a Differentiated Services Code Point (DSCP) field or a Traffic Class field in an Internet Protocol version 4 (IPv4) or IPv6 packet header, or a Virtual Local Area Network identifier (VLAN ID) in an Ethernet header. The first network device may specifically determine the network slice to which the packet belongs based on one of the aforementioned fields (e.g., source address, destination address, protocol number, DSCP field, or TC field) or a combination of several of the aforementioned fields.
[0104] The first network device may establish a correspondence between a source device address for sending a service packet and a network slice based on a service request of the user side. In this way, after receiving a service packet sent by the user side, the first network device may determine a corresponding network slice based on a source address in the service packet.
[0105] Similarly, the first network device may also pre-establish a correspondence between a destination address and a network slice. After receiving a service packet, the first network device may determine a corresponding network slice based on the destination address in the service packet.
[0106] Furthermore, the protocol number in the packet may indicate a data protocol used for the data carried in the packet. If a correspondence between the data protocol and the network slice is pre-established, the first network device may alternatively determine the network slice corresponding to the packet based on the protocol number in the packet.
[0107] For example, the first network device may alternatively determine a network slice corresponding to a packet based on resource information used to receive the packet, where the resource information is, for example, physical interface information or logical interface information for receiving the packet by the first network device. For example, if a network slice corresponding to an inbound interface of the first network device is configured and the packet is forwarded to the first network device by another network device, the other network device may forward the packet to the inbound interface corresponding to the first network device based on the network slice to which the packet belongs. Thus, the first network device may determine a network slice corresponding to a packet based on the inbound interface information for receiving the packet.
[0108] After determining the network slice corresponding to the packet, the first network device may generate first indication information. The first indication information may include a network slice identifier indicating the network slice corresponding to the packet. The network device receiving the packet may determine the network slice corresponding to the packet based on the network slice identifier in the first indication information.
[0109] In a possible embodiment, the first network device may determine a forwarding path for the packet in the MPLS network based on a destination address of the packet, and may generate the second indication information based on the forwarding path for the packet in the MPLS network.
[0110] The second instruction information may indicate the forwarding path of the packet in a number of ways.
[0111] Method 1: The second instruction information may indicate a complete forwarding path of the packet in the MPLS network.
[0112] For example, the second indication information may include information about all nodes through which the packet needs to pass in the forwarding process. The network in FIG. 1(a) is used as an example. After receiving the packet, the network device 1 may determine that the forwarding path of the packet in the MPLS network is "Network Device 1--Network Device 2--Network Device 3--Network Device 4--Network Device 5". When the method provided in this embodiment of the present application is applied to a traditional MPLS network, the MPLS label switching path may be pre-established using control signaling. The indication information generated by the network device 1 may only hold an MPLS label that identifies the path, and the node devices along the path switch the MPLS label hop-by-hop in the forwarding process of the packet (e.g., the node device replaces MPLS label A with MPLS label B). In the node devices along the path of the packet, the MPLS label A of the packet received by the node device is a label assigned by the node to the path to the destination node. The node device may perform a local table lookup based on the MPLS label A to obtain the corresponding MPLS label B and the outbound interface for sending the packet. MPLS label B is the label assigned by the next hop node to the route to the same destination node.
[0113] When the method provided in this embodiment of the present application is applied to an SR-MPLS network, the indication information generated by network device 1 may hold information about network device 2, network device 3, network device 4, and network device 5 to indicate a complete forwarding path of a packet in the MPLS network. For example, in the MPLS network, network device 1 may include identifiers of network device 2 to network device 5 among multiple MPLS labels. In the SR-MPLS network, network device 1 may include a segment list in an MPLS label stack, where the segment list includes multiple SIDs that separately indicate network device 2 to network device 5.
[0114] Method 2: The second instruction information may indicate a part of a forwarding path of the packet in the MPLS network.
[0115] For example, the second instruction information may include information about some nodes that the packet needs to pass through in the forwarding process. The network in FIG. 1(a) is used as an example. If the network device 1 determines that the forwarding path of the packet in the MPLS network is "network device 1--network device 2--...network device 5", the instruction information generated by the network device 1 may only hold information about the network device 2 and the network device 5 to indicate the network devices that the packet needs to pass through in the MPLS network (in other words, the packet needs to pass through the specific network device 2 and network device 5).
[0116] Method 3: The second indication information may indicate only the tail nodes through which the packet passes in the MPLS network.
[0117] For example, the second instruction information may include only information about the tail node through which the packet needs to pass in the forwarding process. In this way, in the process of forwarding the packet along the path, each network device receiving the packet may forward the packet based on the tail node indicated in the second instruction information and the default forwarding policy (e.g., the shortest path forwarding policy). In other words, the second instruction information may indicate the forwarding path of the packet by indicating the tail node through which the packet needs to pass. The forwarding path of the packet is the default path if the head node and the tail node are specified. The network of FIG. 1(a) is also used as an example. After the network device 1 receives the packet, the network device 1 determines to forward the packet using the default path. Therefore, the instruction information generated by the network device 1 may hold only information about the network device 5 to indicate the tail node through which the packet needs to pass in the MPLS network. In this way, in the process of forwarding the packet, each network device receiving the packet forwards the packet to the next network device on the default path based on the default forwarding policy, so that the packet can be finally forwarded based on the default path.
[0118] Method 4: The second instruction information may indicate the first half of the complete route and information indicating to update the second half of the complete route.
[0119] For example, when the forwarding path of the packet is long, the second indication information generated by the first network device may only indicate the first half of the complete path of the packet, and the second indication information may further indicate another node on the forwarding path of the packet to update the second half of the path of the packet. The network in FIG. 1(a) is also used as an example. After receiving the packet, the network device 1 may determine that the forwarding path of the packet is "Network Device 1--Network Device 2--Network Device 3--Network Device 4--Network Device 5". The indication information generated by the network device 1 may hold information about the network device 2 and the network device 3 to indicate the first half of the forwarding path of the packet in the MPLS network. Furthermore, the indication information may further hold information used to indicate the network device 3 to update the path information. For example, the indication information holds a binding segment identifier (binding-sid), and the binding-SID indicates the subsequent path information of the packet. The network device 3 may update the subsequent path information in the packet based on the binding-SID. The binding SID may indicate an intra-domain tunnel label stack, and the tunnel label stack may hold subsequent route information of the packet. In other words, the indication information generated by the network device 1 may hold identification information of the network device 2 and the network device 3 by using multiple MPLS labels, and the indication information may further hold a binding SID indicating the network device 3 to update the subsequent forwarding route. The binding SID indicates the subsequent route information, which can reduce the number of label stack layers encapsulated by the network device.
[0120] Step 203: The first network device sends the updated packet to the second network device.
[0121] After adding the first instruction information and the second instruction information to the packet, the first network device may send the updated packet to a next network device on a forwarding path. The second network device may be a network device on the forwarding path determined by the first network device, and the second network device is a neighboring network device of the first network device.
[0122] In a possible embodiment, the first network device may determine a forwarding resource used to transmit the updated packet based on the network slice, and the first network device transmits the updated packet by using the forwarding resource. The forwarding resource may include one or more of a processing resource, an outbound interface resource, and a queue resource of the first network device. The processing resource may be a resource used by the first network device to search for a forwarding entry used to forward the packet. More processing resources indicate a higher efficiency of searching for a forwarding entry by the first network device. Thus, more processing resources are configured for a network slice with low latency requirements. The outbound interface resource may be an outbound interface used by the first network device to forward the packet, and the queue resource may be a forwarding queue into which the packet can enter when the first network device forwards the packet.
[0123] It will be appreciated that since different network slices correspond to different service requirements, different forwarding resources may be configured for different network slices in the network device to meet the requirements of the network slices. In other words, the correspondence between the network slices and the forwarding resources may be pre-configured in the network device, so that the network device can determine the forwarding resources to be used to forward a packet based on the network slice corresponding to the packet.
[0124] In a possible embodiment, in addition to sending the packet to the second network device, the first network device may further send the packet to another adjacent network device. For example, in a scenario such as a high reliability scenario or a multicast distribution scenario, the first network device may copy the payload and / or other necessary data information of the acquired packet multiple times, and add corresponding network slice indication information and forwarding path indication information to each of the multiple packets generated through copying, so that the multiple packets are forwarded by using corresponding network slice resources along their respective forwarding paths.
[0125] For example, the updated packet sent by the first network device to the second network device may be the first packet. The first network device may further update the packet to obtain a second packet, and the second packet may include third instruction information, where the third instruction information indicates a forwarding path of the second packet. The second packet may further include the same first instruction information as that of the first packet, and the second packet and the first packet may use the same network slice resource. The first network device sends the second packet to the third network device. In other words, the first network device may determine multiple paths to be used for packet forwarding, and may generate multiple packets based on information about network devices on the corresponding paths. Different packets may hold different path instruction information to indicate forwarding of the packet on different paths.
[0126] FIG. 3 is a schematic diagram of packet forwarding according to an embodiment of the present application. As shown in FIG. 3, after receiving packet 1, network device 1 may determine a network slice (e.g., network slice 1) corresponding to packet 1 and two routes used to forward packet 1. The two routes may be route 1 "network device 1--network device 2--network device 3--network device 4--network device 5" and route 2 "network device 1--network device 7--network device 8--network device 9--network device 5". Network device 1 may generate packet 2 based on route 1 and send packet 2 to network device 2. Packet 2 includes an identifier of network slice 1 and information indicating route 1 (e.g., identifier of network device 2 to network device 5). Network device 1 may generate packet 3 based on route 2 and send packet 3 to network device 7. Packet 3 includes an identifier of network slice 1 and information indicating route 2 (e.g., identifier of network device 7 to network device 9 and network device 5). In this manner, network device 1 may copy packet 1 to generate packet 2 and packet 3, and then add the same network slice information and different route information to packet 2 and packet 3 to indicate forwarding packet 2 and packet 3 along paths 1 and 2, respectively, by using resources of the same network slice 1.
[0127] In the above example, the first packet and the second packet carry the same network slice indication information. For example, packet 2 and packet 3 carry the same identifier of network slice 1, in other words, network device 1 indicates the network devices that receive packet 2 and packet 3 on path 2 and path 3, respectively, and forwards packet 2 and packet 3 by using the same network slice 1. Furthermore, network device 1 may forward packet 2 and packet 3 by using the same network slice resource. For example, if the forwarding resource corresponding to the network slice is a processing resource allocated to network device 1 for packet forwarding, the processing resource used by network device 1 to forward packet 2 to network device 2 may be the same as the processing resource used by network device 1 to forward packet 3 to network device 7.
[0128] In another possible case, when the first network device determines multiple forwarding paths and forwards a packet to multiple adjacent network devices, the first network device may include different network slice indication information in the packet and use different network slice resources when forwarding the packet to different adjacent network devices. For example, when the forwarding resource corresponding to the network slice is an interface resource, the interface resource used by the first network device to forward the first packet to the second network device may be different from the interface resource used by the first network device to forward the second packet to the third network device.
[0129] The above describes the process in which a network device adds first indication information to a packet and forwards the packet. For ease of understanding, a specific example is taken below to describe in detail how to add the first indication information to an MPLS packet header.
[0130] In this embodiment, the MPLS packet header may hold the first indication information corresponding to the packet by using an MPLS label stack or an MPLS extension header.
[0131] There may be multiple ways to preserve the identifier of the network slice corresponding to a packet by using an MPLS label stack.
[0132] In a possible embodiment, the MPLS packet header may include an MPLS label stack, the MPLS label stack including first label information and second label information, the first label information indicating that the second label information holds an identification information corresponding to the network slice, and the second label information holds the first identification information. Both the first label information and the second label information are located in the MPLS label stack. Furthermore, in the MPLS label stack, the first label information may be located above the second label information. In this way, after reading the first label information, the network device may determine that the second label information located after the first label information holds an identification information corresponding to the network slice.
[0133] In an example, the first label information includes an extension label (EL) and an extended special purpose label (ESPL). The extension label may be located above the extended special purpose label, and the value of the extension label may be a value defined in a related standard, for example, 15, to indicate that the label located after the extension label is an extended special purpose label. The value of the extended special purpose label may be a predetermined value to indicate that the label located after the extended special purpose label holds identification information corresponding to a network slice. The label located after the extended special purpose label may also be referred to as a network slice label.
[0134] In other words, an MPLS label stack may include an extended label, an extended special purpose label, and a network slice label, where the extended special purpose label is located after the extended label, and the network slice label is located after the extended special purpose label. It will be understood that the extended label, the extended special purpose label, and the network slice label are three adjacent labels, and the three adjacent labels may be located anywhere in the entire MPLS label stack.
[0135] For example, FIG. 4 is a schematic diagram of the structure of an MPLS label according to an embodiment of the present application. As shown in FIG. 4, the lower layer of the extended label is the extended special purpose label, and the lower layer of the extended special purpose label is the network slice label. In addition to the label value field, each label may further include a priority (Traffic Class, TC) field, a stack field bottom, and a time to live (TTL) field. The TC field indicates the priority of the packet, which ranges from 0 to 7. The stack field bottom indicates the position of the label in the label stack. The value of the stack field bottom is equal to 0, indicating that the label is not at the lowest layer. The value of the stack field bottom is equal to 1, indicating that the label is at the lowest layer. The TTL field indicates the time to live of the label.
[0136] When the network device reads the label stack, the network device may first read the upper layer extended label, and determine that the lower layer label of the extended label is an extended special purpose label based on the value 15 of the extended label. When reading the extended special purpose label, the network device may determine that the lower layer label of the extended special purpose label is a network slice label based on the predetermined value of the extended special purpose label. Finally, the network device obtains an identifier corresponding to the network slice by reading the network slice label, and determines the network slice corresponding to the packet.
[0137] In another possible embodiment, the MPLS packet header includes an MPLS special purpose label, and a reserved field in the MPLS special purpose label includes the first indication information. The MPLS special purpose label may be a label predefined in a related standard, such as an Entropy Label (EL), a Router Alert Label, or a Flow-ID Label. The MPLS special purpose label has a reserved field, i.e., a field that is reserved and not for practical use. The field may be used to hold the first indication information. The reserved field may include one or more of the following fields: a label value field (i.e., a field indicating a specific value of the label), a TC field, and a TTL field.
[0138] For example, the MPLS special purpose label is an entropy label. Figure 5 is a schematic diagram of the structure of another MPLS label according to an embodiment of the present application. As shown in Figure 5, the MPLS packet header includes an entropy label indicator (ELI) and an entropy label. The entropy label indicator is a label before the entropy label, indicating the position of the entropy label, and the label value of the entropy label indicator may be 7. In other words, when reading the entropy label indicator, the network device may determine that the label next to the entropy label indicator is the entropy label.
[0139] In the entropy label, the format of the label value field of the entropy label may be modified to hold an identifier of a network slice. For example, in a 20-bit label value field, 12 bits of the label value field may indicate an identifier of a network slice, supporting the indication of 4,000 network slices, and the remaining 8 bits of the label value field are used for load balancing. In other words, the network device may perform a hash calculation based on the value indicated by the 8 bits of the label value field, and the obtained result may be used to select one of multiple equal-cost paths for forwarding. Different packets have different hash results. Thus, the network device selects different paths for forwarding the packet. In this way, traffic balancing and forwarding is implemented among multiple paths. Furthermore, the 3-bit TC field and the 8-bit TTL field of the entropy label may alternatively directly indicate the identifier of a network slice.
[0140] When the format of the label value field of the entropy label is modified to hold an identifier of a network slice, the field of the entropy label indicator may alternatively be used as an identifier indicating that the entropy label holds an identifier of a network slice. For example, a special value or bit of the TC field in the entropy label indicator may be used for identification. In this manner, the network device may determine that the label value field of the entropy label has been modified to indicate an identifier of a network slice based on a special value or bit of the TC field in the entropy label indicator.
[0141] In another possible embodiment, the MPLS packet header includes an MPLS extension header, and the MPLS extension header holds the first indication information. The MPLS packet header may include one or more MPLS extension headers. The MPLS extension header is located below the MPLS label stack and above the upper layer protocol header or the packet payload. The MPLS extension header holding the first indication information may be a newly defined MPLS extension header, specifically used to hold the first indication information. The MPLS extension header holding the first indication information may alternatively be an MPLS extension header defined in a related standard, and a new type, length, and value (TLV) are defined in the defined MPLS extension header to hold the first indication information.
[0142] FIG. 6 is a schematic diagram of a format of an MPLS packet header according to an embodiment of the present application. As shown in FIG. 6, the MPLS packet header includes a label stack, an extension header, and a payload. The label stack includes a plurality of MPLS labels, and the plurality of MPLS labels include an extension header label, and the extension header label indicates that an MPLS extension header is present in the MPLS packet header. A header of extension headers and a plurality of extension headers (extension header 1 to extension header N) are included between the label stack and the payload. The extension header holding the first indication information may be one of the extension headers 1 to N, for example, an extension header defined in a related standard, or a newly defined extension header. The defined MPLS extension header may hold the first indication information by holding a new TLV.
[0143] 7 is a schematic diagram of a format of an extension header according to an embodiment of the present application. As shown in FIG. 7, the extension header may include a header length field, a header specific data field, and a TLV field. The TLV field may indicate an identifier of a network slice that holds the first indication information.
[0144] The above details the packet forwarding process by the head node by using an example where the first network device is a head node. The following details the packet forwarding process by a transit node or a tail node.
[0145] FIG. 8 is a schematic flow chart of a packet processing method 800 according to an embodiment of the present application.
[0146] As shown in FIG. 8, a packet processing method 800 includes the following steps.
[0147] Step 801: A first network device receives a packet sent by a second network device, the packet including a Multi-Protocol Label Switching (MPLS) packet header, the MPLS packet header including first indication information and second indication information.
[0148] The first network device may be a transit node or a tail node in an MPLS network or an SR-MPLS network, and the second network device may be a head node or a transit node in an MPLS network or an SR-MPLS network. The packet received by the first network device includes first indication information and second indication information. The first indication information indicates a network slice corresponding to the packet, and the second indication information indicates a forwarding path corresponding to the packet.
[0149] In a possible case, the second instruction information carried in the packet received by the first network device may be a complete path instruction information that is initially added to the packet by the second network device, and the second network device may be, for example, a head node, e.g., the first network device is the next network device on a forwarding path determined by the second network device. 3 is used as an example. When the network device 1 is a head node, the network device 2 is the next network device on the forwarding path 1 of the packet 2 determined by the network device 1, i.e., the first transit node on the path 1. In this case, the second instruction information indicating the forwarding path received by the network device 2 is the complete information indicating the path 1 added by the network device 1. As described above, the complete information may be information indicating a hop-by-hop forwarding path in the MPLS network, information indicating a part of a designated node on the path for forwarding, information indicating a tail node, etc.
[0150] In another possible case, the second network device is a transit node, the first network device is the next network device located after the second network device on the forwarding path, and the second instruction information carried in the packet received by the first network device may be partial route instruction information, i.e., information indicating a portion of the path from the first network device to the destination device. FIG. 3 is used as an example. When the network device 1 is a head node, the network device 2 is the next network device on the forwarding path 1 of the packet 2 determined by the network device 1, i.e., the first transit node on the path 1, and the network device 3 is the next network device located after the network device 2 on the path 1, i.e., the second transit node on the path 1. The second indication information indicating the forwarding path received by the network device 2 may be complete information indicating the path 1 added by the network device 1, and the complete information may be information indicating a hop-by-hop forwarding path in the SR-MPLS network. For example, the complete information includes an identifier 2 indicating the network device 2, an identifier 3 indicating the network device 3, and an identifier 4 indicating the network device 4. The second indication information indicating the forwarding path received by the network device 3 may be information indicating a part of the path 1, and the information indicating the part of the path 1 may be information indicating a hop-by-hop forwarding path from the network device 3 to the network device 4 in the SR-MPLS network. For example, if network device 2 removes the identifier indicating network device 2 from the packet and then transmits the packet to network device 3, the second instruction information in the packet received by network device 3 may include identifier 3 indicating network device 3 and identifier 4 indicating network device 4, i.e., information indicating the portion of route 1.
[0151] In another possible case, the first network device is not the first transit node, but may receive complete route information added by the head node, for example, indication information added by the head node indicating only the tail node. In this case, the first network device receives a packet including the second indication information from the previous transit node, but other transit nodes including the previous transit node do not update the second indication information added by the head node. Therefore, in this case, the second indication information included in the packet received by the first network device is still the complete route information added by the head node.
[0152] In another possible case, the first network device may alternatively be a tail node. The second indication information received by the tail node may include an identifier of the tail node. The tail node may be an end point of a tunnel, an end point of several concatenated tunnels, or a domain boundary node of a network domain or an administrative domain.
[0153] Step 802: The first network device determines, based on the first indication information, a network slice corresponding to the packet.
[0154] The first indication information may include a network slice identifier indicating a network slice corresponding to the packet. After receiving the packet, the first network device may determine a network slice corresponding to the packet based on the network slice identifier in the first indication information. For the manner of including the first indication information in the packet, please refer to the description in the above embodiment. Details will not be described again in this specification.
[0155] Step 803: The first network device forwards the updated packet to a third network device by using a network slice, the third network device being a device on a forwarding path of the packet and determined based on the second instruction information.
[0156] In this embodiment, the first network device may determine, based on the packet forwarding path indicated by the second indication information, that the third network device is the next network device on the forwarding path. Thus, the first network device may determine, based on the network slice, a forwarding resource corresponding to the packet, i.e., a forwarding resource allocated to the network slice by the first network device corresponding to the packet, and may forward the updated packet to the third network device by using the forwarding resource corresponding to the network slice. The forwarding resource may include one or more of a processing resource, an outbound interface resource, and a queue resource of the first network device. The process of the first network device determining a forwarding resource corresponding to the network slice and forwarding the packet by using the forwarding resource is similar to that in the embodiment shown in FIG. 2. For details, please refer to the above-mentioned embodiment. Details will not be described again in this specification. In another possible case, the first network device may determine other information related to packet forwarding, such as network topology information, based on the network slice, and forward the packet based on the determined other information.
[0157] The second indication information may include a tunnel label used to identify a node or link on a forwarding path, and may further include a service label, for example, a Virtual Private Network (VPN) label used to identify a service. If the first network device is a tail node, the manner in which the tail node determines a third network device based on the second indication information may be to determine an outbound interface and a next-hop network device (i.e., the third network device) used to forward the service packet based on the VPN label.
[0158] In a possible embodiment, the first network device updates the received packet to obtain an updated packet, the updated packet including the first indication information or the updated packet including updated first indication information, the updated first indication information being determined based on the first indication information, and the updated first indication information indicating a network slice corresponding to the updated packet.
[0159] When a packet is forwarded through multiple network domains, for example, multiple MPLS networks, the network devices in the multiple network domains may form a complete network slice, and the number or type of resources allocated to the multiple network slices in the multiple network domains may be the same or different. However, regardless of the specific case described above, even if the resources configured for the network slices in the different network domains are the same, the network slice identifiers used in the different network domains may be different. Thus, when the first network device is a border device in one network domain and connected to another network domain, the first network device may update the first indication information in the received packet and obtain the updated first indication information. The updated first indication information indicates the corresponding network slice identifier in the next network domain.
[0160] For example, network devices in network domain 1 and network domain 2 form a complete network slice 1, and a network slice identifier corresponding to network slice 1 in network domain 1 is "001", and a network slice identifier corresponding to network slice 1 in network domain 2 is "002". A first network device is a border device in network domain 1 and connected to network domain 2. The first network device receives packet 1 forwarded by a network device in network domain 1, and packet 1 holds the network slice identifier "001". Before the first network device forwards packet 1 to a network device in network domain 2, the first network device may update packet 1 to obtain an updated packet 1. The updated packet 1 includes an updated network slice identifier, and the updated network slice identifier is "002".
[0161] In a possible embodiment, the updated packet includes updated second instruction information, and the updated second instruction information indicates a forwarding path of the updated packet. When the packet sent by the second network device includes the second instruction information, and the second instruction information indicates a first half of a complete path and information indicating updating a second half of the complete path, the first network device may update the second instruction information based on the instruction information indicating updating a second half of the complete path indicated in the second instruction information, and obtain the updated second instruction information, and the updated second instruction information indicates a forwarding path of the updated packet. In this way, when the first network device forwards the updated packet, the updated packet includes the updated second instruction information and indicates a subsequent forwarding path of the updated packet.
[0162] In a possible embodiment, the first network device may alternatively be a tail node in an MPLS network or an SR-MPLS network. If the first network device is a tail node, before the first network device forwards the packet based on the network slice corresponding to the packet, the first network device may decapsulate the packet and obtain a decapsulated packet, where the decapsulated packet does not include the MPLS packet header added by the head node. In other words, if the first network device is a tail node in an MPLS network or an SR-MPLS network, the first network device needs to forward the packet outside the MPLS network or the SR-MPLS network. Therefore, the first network device may decapsulate the packet and remove the MPLS packet header from the packet, thereby avoiding the case where a network device outside the MPLS network or the SR-MPLS network cannot identify the packet.
[0163] In some cases, a packet may retain an MPLS label stack before entering the MPLS network. In this case, the head node of the MPLS network adds a new MPLS label stack to the original MPLS label stack, indicating the network slice corresponding to the packet and the forwarding path of the packet. In this case, when decapsulating the packet, the tail node only decapsulates the MPLS label stack added by the head node and retains the original MPLS label stack in the packet. Therefore, the decapsulated packet obtained after the tail node decapsulates the packet still includes the MPLS label stack that was retained before the packet entered the MPLS network. In this case, the decapsulated packet forwarded by the tail node still includes the MPLS packet header retained by the original MPLS label stack.
[0164] In another embodiment, if the first network device is a tail node, the first network device does not need to perform the above steps 802 and 803. However, after performing step 801, the first network device performs a remove operation on the MPLS packet header information added by the head node, and then searches and determines a device for receiving the packet based on other information carried in the packet, such as a destination IP address, and forwards the packet to the device. The device for receiving the packet may be, for example, a device on the user access side.
[0165] The above embodiment uses an example in which the first network device is a network device in an MPLS network or an SR-MPLS network to describe a scenario in which the packet processing method provided in the embodiment of the present application is applied. However, it should be understood that the packet processing method provided in the embodiment of the present application may also be applied to a network scenario in which a network slice corresponding to a packet needs to be indicated. The network scenario in which the embodiment of the present application is applied is not uniquely limited in this specification.
[0166] To implement the above embodiment, the present application further provides a network device. Figure 9 is a schematic diagram of the structure of a network device 900 according to an embodiment of the present application.
[0167] The network device 900 shown in FIG. 9 illustrates some specific features, but those skilled in the art will recognize from the embodiments of the present application that FIG. 9 does not illustrate various other features for the sake of brevity, so as to avoid obscuring more relevant aspects of the implementations disclosed in the embodiments of the present application. To this end, for example, in some implementations, the network device 900 includes one or more processing units (CPUs) 901, a network interface 902, a programming interface 903, a memory 904, and one or more communication buses 905 configured to interconnect various components. In some other implementations, some functional components or units may be omitted or added to the network device 900 based on the foregoing examples.
[0168] In some implementations, among other purposes, the network interface 902 is configured to connect one or more other network devices / servers in the network system. In some implementations, the communication bus 905 includes circuitry for interconnecting and controlling communication between the system components. The memory 904 may include non-volatile memory, such as read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The memory 904 may include volatile memory. The volatile memory may be random access memory (RAM) and may be used as an external cache.
[0169] In some implementations, the memory 904 or the non-transitory computer-readable storage medium of the memory 904 stores the following programs, modules, data structures, or a subset thereof, including, for example, a transceiver unit (not shown), an acquisition unit 9041, and a processing unit 9042.
[0170] In a possible embodiment, the network device 900 may have the functionality of either the first network device in the method 200 or the first network device in the method 800. The transceiver unit in the network device 900 is configured to perform step 203, step 801 or step 803. The obtaining unit 9041 is configured to perform step 201. The processing unit 9042 is configured to perform step 202 or step 802.
[0171] It should be understood that the network device 900 corresponds to the first network device in the above-mentioned method embodiments, and the modules in the network device 900 and other operations and / or functions described above are separately used to implement various steps and methods implemented by the first network device in the method embodiments. For specific details, please refer to the method 200 or the method 800. For the sake of brevity, the details will not be described again in this specification.
[0172] It should be understood that the aforementioned functions of the transceiver unit may be implemented by a processor by invoking program codes in a memory, and performed, if necessary, in cooperation with the network interface 902. Alternatively, data receiving / transmitting operations may be completed on the network device 900 by the network interface 902.
[0173] In various implementations, the network device 900 is configured to perform a packet processing method provided in an embodiment of the present application, for example, a packet processing method corresponding to the embodiment shown in FIG. 2 or FIG.
[0174] In correspondence with the method embodiment and the virtual device embodiment provided in the present application, the embodiment of the present application further provides a network device, the hardware structure of which is described below.
[0175] 10 is a schematic diagram of the structure of a network device 1000 according to an embodiment of the present application. The network device 1000 may be configured as a first network device in the embodiment of the aforementioned method.
[0176] The network device 1000 may correspond to the first network device in the above-mentioned method embodiment. The hardware and modules in the network device 1000 and the above-mentioned other operations and / or functions are separately used to implement various steps and methods implemented by the first network device in the method embodiment. For specific details of the detailed procedure of how the network device 1000 forwards packets, please refer to the above-mentioned method embodiment. For the sake of brevity, the details will not be described again in this specification. The steps of the above-mentioned method 200 or method 800 are completed by using integrated logic circuits of hardware in the processor of the network device 1000 or by using instructions in the form of software. The steps in the method disclosed with reference to the embodiments of the present application may be directly performed and completed by a hardware processor, or may be performed and completed by using a combination of hardware and software modules in the processor. The software modules may be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above-mentioned method in combination with the hardware of the processor. To avoid repetition, details will not be described again in this specification.
[0177] The network device 1000 may also correspond to the network device 900 in the above-described embodiment of the virtual device, and each functional module in the network device 900 is implemented by using the software and hardware of the network device 1000. In a possible implementation, the functional modules included in the network device 900 are generated after the processor of the network device 1000 reads a program code stored in a memory, or are implemented by the processor of the network device 1000 reading the program code stored in a memory and cooperating with a communication interface.
[0178] The network device 1000 includes a main control board 1010 and an interface board 1030 .
[0179] The main control board 1010 is also referred to as a main processing unit (MPU) or route processor card. The main control board 1010 controls and manages the components in the network device 1000, and includes functions such as routing calculation, device management, device maintenance, and protocol processing. The main control board 1010 includes a central processing unit 1011 and a memory 1012.
[0180] The interface board 1030 is also referred to as a line interface unit (LPU), a line card, or a service board. The interface board 1030 is configured to provide various service interfaces and transfer data packets. The service interfaces include, but are not limited to, an Ethernet interface, a Packet over SONET / SDH (POS) interface, and the like. The Ethernet interface is, for example, a Flexible Ethernet service interface (Flexible Ethernet Client, FlexE Client). The interface board 1030 includes a central processing unit 1031, a network processor 1032, a forwarding entry memory 1034, and a physical interface card (PIC) 1033.
[0181] A central processing unit 1031 on the interface board 1030 is configured to control and manage the interface board 1030 and to communicate with the central processing unit 1011 on the main control board 1010 .
[0182] The network processor 1032 is configured to forward packets. The form of the network processor 1032 may be a forwarding chip. Specifically, the processing on the uplink packet includes processing at the packet input interface and forwarding table lookup, and the processing on the downlink packet includes forwarding table lookup, etc.
[0183] The physical interface card 1033 is configured to implement a physical layer interconnect function. Original traffic enters the interface board 1030 from the physical interface card 1033, and processed packets are sent out from the physical interface card 1033. The physical interface card 1033 includes at least one physical interface, which is also referred to as a physical port. The physical interface card 1033 corresponds to a FlexE physical interface in the system architecture. The physical interface card 1033 is also referred to as a sub card and may be mounted on the interface board 1030, and is responsible for converting optical / electrical signals into packets, performing validity checks on the packets, and forwarding the packets to the network processor 1032 for processing. In some embodiments, the central processing unit 1031 on the interface board 1030 may perform the functions of the network processor 1032, for example, implementing software forwarding based on a general-purpose CPU, thereby making the network processor 1032 unnecessary in the physical interface card 1033.
[0184] Optionally, the network device 1000 includes multiple interface boards. For example, the network device 1000 further includes an interface board 1040, which includes a central processing unit 1041, a network processor 1042, a forwarding entry memory 1044, and a physical interface card 1043.
[0185] Optionally, the network device 1000 further includes a switching board 1020. The switching board 1020 may also be referred to as a switch fabric unit (SFU). When the network device has multiple interface boards 1030, the switching board 1020 is configured to complete data exchange between the interface boards. For example, the interface board 1030 and the interface board 1040 may communicate with each other through the switching board 1020.
[0186] The main control board 1010 is coupled to the interface board 1030. For example, the main control board 1010, the interface boards 1030 and 1040, and the switching board 1020 are connected to a system backplane through a system bus and communicate with each other. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 1010 and the interface board 1030, and the main control board 1010 communicates with the interface board 1030 through the IPC channel.
[0187] Logically, the network device 1000 includes a control plane and a forwarding plane. The control plane includes a main control board 1010 and a central processing unit 1031. The forwarding plane includes components that perform forwarding, such as a forwarding entry memory 1034, a physical interface card 1033, and a network processor 1032. The control plane performs functions such as routing, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining device status. The control plane transmits the generated forwarding table to the forwarding plane. In the forwarding plane, the network processor 1032 forwards packets received by the physical interface card 1033 by performing a table lookup based on the forwarding table transmitted by the control plane. The forwarding table transmitted from the control plane may be stored in the forwarding entry memory 1034. In some embodiments, the control plane and the forwarding plane may be completely separate and are not on the same device.
[0188] When the network device 1000 is configured as the first network device in the method 200, the central processing unit 1011 may obtain a packet and add the first instruction information and the second instruction information to the packet to obtain an updated packet. The network processor 1032 triggers the physical interface card 1033 to send the updated packet to the second network device.
[0189] When the network device 1000 is configured as the first network device in the method 800, the central processing unit 1011 may obtain a packet and determine a network slice corresponding to the packet based on the first indication information in the packet. The network processor 1032 triggers the physical interface card 1033 to send the updated packet to the second network device.
[0190] It should be understood that the transceiver unit in the network device 900 may be equivalent to the physical interface card 1033 or the physical interface card 1043 in the network device 1000, and the acquisition unit 9041 and the processing unit 9042 in the network device 900 may be equivalent to the central processing unit 1011 or the central processing unit 1031 in the network device 1000.
[0191] It should be understood that the operation for the interface board 1040 is consistent with the operation for the interface board 1030 in this embodiment of the present application. For the sake of brevity, the details will not be described again. It should be understood that the network device 1000 in this embodiment may correspond to the first network device or the second network device in the above-mentioned method embodiment. The main control board 1010 and the interface board 1030 and / or the interface board 1040 in the network device 1000 may implement the functions and / or various steps implemented by the first network device or the second network device in the above-mentioned method embodiment. For the sake of brevity, the details will not be described again in this specification.
[0192] It should be noted that there may be one or more main control boards, and when there are multiple main control boards, the main control board may include an active main control board and a standby main control board. There may be one or more interface boards, and a network device with a larger 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 switching board, or there may be one or more switching boards. When there are multiple switching boards, load balancing and redundant backup may be implemented together. In a centralized forwarding architecture, the network device may not require a switching board, and the interface board provides the function of processing service data of the entire system. In a distributed forwarding architecture, the network device may have at least one switching board, and data exchange between multiple interface boards is implemented by using the switching board, providing large capacity data exchange and processing capacity. Thus, the data access and processing capacity of the network device in the distributed architecture is better than that of the device in the centralized architecture. Optionally, the network device may alternatively be in a form where there is only one card. Specifically, there is no switching board, and the functions of the interface board and the main control board are integrated on the card. In this case, the central processing unit on the interface board and the central processing unit on the main control board may be combined into one central processing unit on the card, which executes the functions obtained after the two central processing units are combined. This type of device (e.g., network devices such as low-end switches or routers) has weak data exchange and processing capabilities. Which architecture is specifically used depends on the specific network deployment scenario and is not uniquely limited in this specification.
[0193] In some possible embodiments, the first network device or the second network device may be implemented as a virtualization device. For example, the virtualization device may be a virtual machine (English: Virtual Machine, VM) on which a program having packet transmission function is executed, and the virtual machine is deployed on a hardware device (e.g., a physical server). A virtual machine is a complete software simulation computer system that has complete hardware system functions and runs in a completely isolated environment. The virtual machine may be configured as the first network device or the second network device. For example, the first network device or the second network device may be implemented based on a general-purpose physical server combined with Network Functions Virtualization (NFV) technology. The first network device or the second network device is a virtual host, a virtual router, or a virtual switch. After reading this application and with reference to NFV technology, a person skilled in the art can virtualize the first network device or the second network device having the aforementioned functions on a general-purpose physical server. Details will not be described in this specification.
[0194] It should be understood that the network device in the above-mentioned product form has the functions of either the first network device or the second network device in the above-mentioned method embodiments separately, and the details will not be described herein.
[0195] An embodiment of the present application provides a computer program product, which, when executed on a network device, enables the network device to execute the method executed by the first network device in method 200 or method 800.
[0196] Referring to FIG. 11, an embodiment of the present application provides a network system 1100. The system 1100 includes a network device 1101 and a network device 1102. Optionally, the network device 1101 may be the first network device in the method 200, and the network device 900 or the network device 1000 and the network device 1101 may be a head node in the network. The network device 1102 may be the first network device in the method 800, and the network device 900 or the network device 1000 and the network device 1102 may be a transit node in the network. Optionally, the system 1100 may further include a network device 1103, and the network device 1103 may be the network device 900 or the network device 1000, and the network device 1103 may be a tail node in the network.
[0197] The embodiment of the present application further provides a chip including a processor and an interface circuit. The interface circuit is configured to receive instructions and transmit instructions to the processor. The processor is coupled to a memory, the memory configured to store programs or instructions. When the programs or instructions are executed by the processor, the chip system is enabled to implement the method in any one of the embodiments of the method described above.
[0198] Optionally, there may be one or more processors in the chip system. The processor may be implemented by using hardware or by using software. When the processor is implemented by using hardware, the processor may be a logic circuit, an integrated circuit, etc. When the processor is implemented by using software, the processor may be a general-purpose processor and is implemented by reading software code stored in a memory.
[0199] Optionally, there may be one or more memories in the chip system. The memory may be integrated with the processor or may be located independently of the processor. This is not limited in the present application. For example, the memory may be a non-transitory processor, such as a read-only memory ROM. The memory and the processor may be integrated in the same chip or may be located separately on different chips. The type of memory and the arrangement of the memory and the processor are not particularly limited in the present application.
[0200] For example, the chip system may be a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a system on chip (SoC), a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or another integrated chip.
[0201] The above describes the embodiments of the present application in detail. The steps of the method in the embodiments of the present application can be scheduled, combined or deleted sequentially based on actual requirements. The modules of the apparatus in the embodiments of the present application can be divided, combined or deleted based on actual requirements.
[0202] It should be understood that "one embodiment" or "an embodiment" described throughout the specification means that a particular feature, structure, or characteristic associated with an embodiment is included in at least one embodiment of the present application. Thus, "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. Moreover, these particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that the sequence numbers of the processes described above do not imply an execution order in the embodiments of the present application. The execution order of the processes should be determined based on the functions and internal logic of the processes, and should not be interpreted as any limitation on the implementation process of the embodiments of the present application.
[0203] The term "and / or" in this specification only describes a correspondence relationship for describing related objects, and indicates that three relationships may exist. For example, A and / or B may represent the following three cases: only A is present, both A and B are present, and only B is present. Furthermore, the symbol " / " in this specification generally indicates an "or" relationship between related objects.
[0204] In the embodiments of the present application, it should be understood that "B corresponds to A" indicates that B is associated with A and B may be determined based on A. However, it should be further understood that determining B based on A does not mean that B is determined based only on A, and B may alternatively be determined based on A and / or other information.
[0205] Those skilled in the art may recognize that in combination with the examples described in the embodiments disclosed herein, the units and algorithm steps may be implemented by electronic hardware, computer software, or a combination thereof. In order to clearly describe the compatibility between hardware and software, the above content generally describes the components and steps of each example based on their functions. Whether these functions are implemented by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered as going beyond the scope of this application.
[0206] For the purpose of simple and easy description, those skilled in the art can clearly understand that the detailed operation processes of the above-mentioned systems, devices and units should be referred to the corresponding processes in the above-mentioned method embodiments, and will not be described in detail again in this specification.
[0207] In some embodiments provided in the present application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the described device embodiment is merely an example. For example, the division into multiple units is merely a logical division of functions, and may be divided in other ways in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not implemented. Furthermore, the shown or described mutual couplings or direct couplings or communication connections may be implemented through some interfaces. Indirect couplings or communication connections between devices or units may be implemented in electrical, mechanical, or other forms.
[0208] The units described as separate parts may or may not be physically separate, and the parts shown as units may or may not be physical units, in other words, they may be located in one location or distributed over multiple network units. Some or all of the units may be selected based on the actual requirements for achieving the objectives of the solutions of the embodiments.
[0209] Furthermore, the functional units in the embodiments of the present application may be integrated into one processing unit, or each of these units may exist physically alone, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0210] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, the integrated unit may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be essentially implemented in the form of a software product, or the part that contributes to the current technology, or all or part of the technical solution. The computer software product is stored in a storage medium and includes some instructions for instructing a computer device (which may be a personal computer, a server, a network device / server, etc.) to execute all or part of the steps of the method in the embodiment of the present application. The aforementioned storage medium includes any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk. [Other possible items] 1. A packet processing method comprising: capturing, by a first network device, a packet; adding, by the first network device, first indication information and second indication information to the packet to obtain an updated packet, the first indication information and the second indication information being located in a Multi-Protocol Label Switching (MPLS) packet header of the updated packet, the first indication information indicating a network slice corresponding to the packet, and the second indication information indicating a forwarding path of the packet; transmitting, by the first network device, the updated packet to a second network device; A method for providing the above. 2. The packet processing method of item 1, wherein the MPLS packet header includes an MPLS label stack, the MPLS label stack includes a first label field and a second label field, the first label field indicates that the second label field includes the first indication information, and the second label field includes the first indication information. 3. The packet processing method according to item 2, wherein the first label field includes an extended label EL and an extended special purpose label ESPL. 4. The packet processing method according to item 1, wherein the MPLS packet header includes an MPLS special purpose label, and a reserved field in the MPLS special purpose label includes the first indication information. 5. The packet processing method according to item 4, wherein the MPLS special purpose label includes an entropy label or a flow identifier Flow-ID label. 6. The packet processing method according to item 4 or 5, wherein the reserved field includes one or more of a priority TC field and a time-to-live TTL field. 7. The packet processing method according to item 1, wherein the MPLS packet header includes an MPLS extension header, and the MPLS extension header holds the first indication information. 8. The step of transmitting, by the first network device, the updated packet to a second network device, further comprising: determining, by the first network device, forwarding resources to be used for transmitting the updated packet based on the network slice; transmitting, by the first network device, the updated packet by using the forwarding resource; 8. The packet processing method according to any one of claims 1 to 7, comprising: 9. The packet processing method of claim 8, wherein the forwarding resources include one or more of processing resources, outbound interface resources, and queue resources of the first network device. 10. The updated packet transmitted by the first network device to the second network device is a first packet, and the method further comprises: updating the packet by the first network device to obtain a second packet, the second packet including the first indication information and third indication information, the third indication information indicating a forwarding path of the second packet; transmitting, by the first network device, the second packet to a third network device; 10. The packet processing method of any one of claims 1 to 9, further comprising: 11. The packet processing method according to any one of claims 1 to 10, wherein the first network device is a network device in an MPLS network or a segment routing multi-protocol label switching (SR-MPLS) network. 12. receiving, by a first network device, a packet transmitted by a second network device, the packet including a Multi-Protocol Label Switching (MPLS) packet header, the MPLS packet header including first indication information and second indication information; determining, by the first network device, a network slice corresponding to the packet based on the first indication information; forwarding, by the first network device, the updated packet to a third network device by using the network slice, the third network device being a device on a forwarding path of the packet and determined based on the second instruction information; A packet processing method comprising: 13. The step of forwarding, by the first network device, the updated packet to a third network device by using the network slice, further comprises: determining, by the first network device, forwarding resources to be allocated to the network slice by the first network device based on the network slice corresponding to the packet; forwarding, by the first network device, the updated packet to the third network device by using the forwarding resource; 13. The packet processing method according to item 12, comprising: 14. The packet processing method of claim 13, wherein the forwarding resources include one or more of processing resources, outbound interface resources, and queue resources of the first network device. 15. A packet processing method described in any one of items 12 to 14, wherein the updated packet includes the first instruction information, or the packet includes updated first instruction information, the updated first instruction information is determined based on the first instruction information, and the updated first instruction information indicates the network slice corresponding to the updated packet. 16. The packet processing method according to item 15, wherein the updated packet includes updated second instruction information, and the updated second instruction information indicates a forwarding path for the updated packet. 17. Before the first network device forwards the packet based on the network slice corresponding to the packet, the method further comprises: decapsulating, by the first network device, the packet to obtain a decapsulated packet. 17. The packet processing method of any one of claims 12 to 16, further comprising: 18. A packet processing method according to any one of items 12 to 17, wherein the MPLS packet header includes an MPLS label stack, the MPLS label stack includes a first label field and a second label field, the first label field indicates that the second label field includes the second indication information, and the second label field includes the second indication information. 19. The packet processing method according to item 18, wherein the first label includes an extended label and an extended special purpose label. 20. A packet processing method according to any one of items 12 to 17, wherein the MPLS packet header includes an MPLS special purpose label, and a reserved field in the MPLS special purpose label includes the first indication information. 21. The packet processing method according to item 20, wherein the MPLS special purpose label comprises an entropy label or a flow identifier label. 22. A packet processing method according to item 20 or 21, wherein the reserved field includes one or more of a priority field and a time-to-live field. 23. A packet processing method according to any one of items 12 to 22, wherein the MPLS packet header includes an MPLS extension header, the MPLS extension header holding the first indication information. 24. A packet processing method according to any one of items 12 to 23, wherein the first network device is a network device in an MPLS network or a segment routing multi-protocol label switching (SR-MPLS) network. 25. A network device comprising a processor and a memory, the memory configured to store instructions and the processor configured to execute the instructions in the memory, thereby causing the network device to perform the method of any one of items 1 to 11. 26. A network device comprising a processor and a memory, the memory configured to store instructions and the processor configured to execute the instructions in the memory, thereby causing the network device to perform the method of any one of items 12 to 24. 27. A network system comprising the network device according to item 25 and the network device according to item 26. 28. A computer-readable storage medium, the computer-readable storage medium storing computer-readable instructions, the computer-readable instructions, when executed by a processor, implementing a method according to any one of items 1 to 24.
Claims
1. 1. A packet processing method, comprising: obtaining, by a first network device, a data packet; adding, by the first network device, first indication information and second indication information to the data packet to obtain an updated data packet, the first indication information and the second indication information being located in a Multi-Protocol Label Switching (MPLS) packet header of the updated data packet, the first indication information indicating a network slice corresponding to the data packet, and the second indication information indicating a forwarding path of the data packet; transmitting, by the first network device, the updated data packet to a second network device; Equipped with the MPLS packet header includes an MPLS label stack, the MPLS label stack includes a first label field and a second label field, the first label field indicates that the second label field includes the first indication information, the second label field includes the first indication information, and information in the first label field is different from the second indication information.
2. The method of claim 1 , wherein the first label field includes an extended label (EL) and an extended special purpose label (ESPL).
3. The step of transmitting, by the first network device, the updated data packet to a second network device further comprises: determining, by the first network device, forwarding resources to be used for transmitting the updated data packet based on the network slice; transmitting, by the first network device, the updated data packet by using the forwarding resource; The packet processing method according to claim 1 or 2, comprising:
4. The method of claim 3 , wherein the forwarding resources include one or more of processing resources, outbound interface resources, and queue resources of the first network device.
5. A packet processing method, comprising: obtaining, by a first network device, a data packet; adding, by the first network device, first indication information and second indication information to the data packet to obtain an updated data packet, the first indication information and the second indication information being located in a Multi-Protocol Label Switching (MPLS) packet header of the updated data packet, the first indication information indicating a network slice corresponding to the data packet, and the second indication information indicating a forwarding path of the data packet; transmitting, by the first network device, the updated data packet to a second network device; Equipped with the updated data packet transmitted by the first network device to the second network device is a first data packet, and the packet processing method includes: updating the data packet by the first network device to obtain a second data packet, the second data packet including the first indication information and third indication information, the third indication information indicating a forwarding path of the second data packet; transmitting, by the first network device, the second data packet to a third network device; The packet processing method further comprises:
6. The packet processing method according to claim 1 , wherein the first network device is a network device in an MPLS network or a Segment Routing Multiprotocol Label Switching (SR-MPLS) network.
7. A packet processing method, comprising: obtaining, by a first network device, a data packet; adding, by the first network device, first indication information and second indication information to the data packet to obtain an updated data packet, the first indication information and the second indication information being located in a Multi-Protocol Label Switching (MPLS) packet header of the updated data packet, the first indication information indicating a network slice corresponding to the data packet, and the second indication information indicating a forwarding path of the data packet; transmitting, by the first network device, the updated data packet to a second network device; Equipped with A packet processing method, wherein the second instruction information indicates a single route through which the data packet is forwarded among multiple routes in the network slice indicated by the first instruction information.
8. receiving, by a first network device, a data packet transmitted by a second network device, the data packet including a Multi-Protocol Label Switching (MPLS) packet header, the MPLS packet header including first indication information and second indication information; determining, by the first network device, a network slice corresponding to the data packet based on the first indication information; forwarding, by the first network device, the updated data packet to a third network device by using the network slice, the third network device being a device on a forwarding path of the data packet and determined based on the second indication information; Equipped with the MPLS packet header includes an MPLS label stack, the MPLS label stack includes a first label field and a second label field, the first label field indicates that the second label field includes the first indication information, the second label field includes the first indication information, and information in the first label field is different from the second indication information.
9. The step of forwarding, by the first network device, the updated data packet to a third network device by using the network slice, further comprises: determining, by the first network device, forwarding resources to be allocated to the network slice by the first network device based on the network slice corresponding to the data packet; forwarding, by the first network device, the updated data packet to the third network device by using the forwarding resource; The packet processing method of claim 8 , comprising:
10. 10. The method of claim 9, wherein the forwarding resources include one or more of processing resources, outbound interface resources, and queue resources of the first network device.
11. A method for providing a network device comprising: receiving, by a first network device, a data packet transmitted by a second network device, the data packet including a Multi-Protocol Label Switching (MPLS) packet header, the MPLS packet header including first instruction information and second instruction information; determining, by the first network device, a network slice corresponding to the data packet based on the first indication information; forwarding, by the first network device, the updated data packet to a third network device by using the network slice, the third network device being a device on a forwarding path of the data packet and determined based on the second indication information; Equipped with The packet processing method, wherein the updated data packet includes the first indication information, or the updated data packet includes updated first indication information, the updated first indication information being determined based on the first indication information included in the data packet transmitted by the second network device, and the updated first indication information indicating the network slice corresponding to the updated data packet.
12. The packet processing method according to claim 11 , wherein the updated data packet includes updated second instruction information, the updated second instruction information indicating a forwarding path for the updated data packet.
13. Before the first network device forwards the data packet based on the network slice corresponding to the data packet, the packet processing method includes: decapsulating, by the first network device, the data packet when the first network device is a tail node in an MPLS network, to obtain a decapsulated data packet. The packet processing method according to claim 8 , further comprising:
14. 14. The method of claim 8, wherein the first label field includes an extended label and an extended special purpose label.
15. The packet processing method according to any one of claims 8 to 14, wherein the first network device is a network device in an MPLS network or a Segment Routing Multiprotocol Label Switching (SR-MPLS) network.
16. A method for providing a network device comprising: receiving, by a first network device, a data packet transmitted by a second network device, the data packet including a Multi-Protocol Label Switching (MPLS) packet header, the MPLS packet header including first instruction information and second instruction information; determining, by the first network device, a network slice corresponding to the data packet based on the first indication information; forwarding, by the first network device, the updated data packet to a third network device by using the network slice, the third network device being a device on a forwarding path of the data packet and determined based on the second indication information; Equipped with A packet processing method, wherein the first instruction information indicates the network slice corresponding to the data packet transmitted by the second network device, and the second instruction information indicates a single path among multiple paths in the network slice indicated by the first instruction information, along which the data packet transmitted by the second network device is forwarded.
17. 8. A network device comprising a processor and a memory, the memory configured to store instructions and the processor configured to execute the instructions in the memory, whereby the network device performs the packet processing method of any one of claims 1 to 7.
18. 17. A network device comprising a processor and a memory, the memory configured to store instructions and the processor configured to execute the instructions in the memory, whereby the network device performs the packet processing method of any one of claims 8 to 16.
19. A network system comprising: a network device according to claim 17; and a network device according to claim 18.
20. A program causing a processor to execute the packet processing method according to any one of claims 1 to 16.
Citation Information
Patent Citations
Transmission control method, node, network system and storage medium
CN110912795A
Message forwarding method and device for network slice
CN110932895A
Segment routing in MPLS network
WO2020048493A1