Packet processing method, related device, and computer storage medium
By explicitly signaling and modifying segment identifiers in SRv6 networks, network nodes can enhance their programming capabilities to process packets according to specific service requirements, addressing the limitation of unrecognized SID formats.
Patent Information
- Application Number
- JP2023014876
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-10-27
- Filing Date
- 2023-02-02
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2039-10-14
AI Technical Summary
In SRv6 networks, the format of segment identifiers (SIDs) is not explicitly notified to network nodes, limiting their programming capabilities and ability to modify relevant fields based on service requirements, thereby reducing network programming effectiveness.
Network nodes explicitly obtain and modify the format and values of segment identifiers to include additional fields such as network slice identifiers or network performance parameters, allowing them to process packets according to specific service requirements.
Enhances network programming capabilities by enabling nodes to recognize and modify SID formats, improving packet processing based on actual service needs.
Smart Images

Figure 0007581395000001 
Figure 0007581395000002 
Figure 0007581395000003
Abstract
Description
[Technical field]
[0001] This application claims priority to Chinese Patent Application No. 201811262866.4, entitled "PACKET PROCESSING METHOD, RELATED DEVICE, AND COMPUTER STORAGE MEDIUM," filed with the State Intellectual Property Office of the People's Republic of China on October 27, 2018, which is incorporated herein by reference in its entirety.
[0002] The present invention relates to the field of communications technology, and in particular to packet processing methods, related devices, and computer storage media. [Background technology]
[0003] When segment routing (SR) is utilized in internet protocol version 6 (IPv6), it is called SRv6. SRv6 extends the segment routing header (SRH) based on IPv6 to perform data communication. The SRH contains a set of segment identifiers (SIDs) of network nodes. In the actual communication process, it can be seen that the format of the SID is not explicitly notified to the SRv6 network. This affects the network programmability of the network node. For example, the network node cannot recognize the format of the SID and cannot modify the relevant fields in the format of the SID based on the actual service requirements to carry the corresponding capability information. Therefore, this reduces the network programmability of the network node. Summary of the Invention
[0004] SUMMARY OF THE DISCLOSURE To solve problems in the prior art (eg, low network programmability), embodiments of the present invention disclose a packet processing method, related device, and computer storage medium.
[0005] According to a first aspect, an embodiment of the present invention discloses a packet processing method applied to a first network node side of a packet processing system, the method including: a first network node receiving a first packet transmitted by a second network node, the first packet including a format of a segment identifier of the second network node; a first network node acquiring a format of a segment identifier of the second network node based on the first packet, the segment identifier of the second network node including a locator field, a function field, and a first field; and a first network node determining a value of the first field in the segment identifier of the second network node according to a segment routing policy and adding the determined value of the first field to a second packet transmitted to the second network node, the determined value of the first field being used to instruct the second network node to process the second packet.
[0006] In some possible embodiments, the format of the segment identifier of the second network node may indicate the position and length of each field in the segment identifier of the second network node, but not the value of each field in the segment identifier of the second network node. In other words, the value of the first field is not indicated in the format of the segment identifier of the second network node. If necessary, the format of the segment identifier of the second network node may also indicate the value of each field in the segment identifier of the second network node, for example, the value of the first field. There may be one or more values of the first field. When there is one value of the first field, the value of the first field may also be referred to as a specific value. Specifically, the specific value may be a default value (e.g., 0) defined in the system, or may be a value of only one first field different from the default value.
[0007] In some possible embodiments, the first network node may receive a segment identifier for the second network node transmitted by the second network node, where the segment identifier for the second network node includes a value for the first field. There may be one or more values for the first field. If there are multiple values for the first field supported by the second network node, there are multiple corresponding segment identifiers for the second network node, where each second network node segment identifier includes one value for the first field.
[0008] In some possible embodiments, the first network node may obtain a value supported by the first field in the segment identifier of the second network node based on the segment identifier of the second network node and the format of the segment identifier of the second network node. There may be one or more values of the first field. Specifically, the second network node may indicate one or more values supported by the first field in the format of the segment identifier of the second network node. When the segment identifier of the second network node is signaled, the value of the first field included in the segment identifier of the second network node may be a specific value, for example a default value. Alternatively, the second network node may signal the value of the first field supported by the second network node using the segment identifier of the second network node. When there are multiple values of the first field, the second network node may signal multiple segment identifiers of the second network node, and correspondingly, one segment identifier carries one value of the first field. In this case, the format of the second network node's segment identifier notified by the second network node may not indicate a value supported by the first field in the second network node's segment identifier.
[0009] Optionally, to ensure security and reliability of information transmission, the second network node may use the segment identifier of the second network node and the format of the segment identifier of the second network node to signal the value of the first field supported by the second network node. In other words, the format of the segment identifier of the second network node signaled by the second network node indicates one or more values supported by the first field in the segment identifier of the second network node. Besides, when the second network node further signals the segment identifier of the second network node, it may add the value of the first field to the segment identifier of the second network node and signal the segment identifier again. Similarly, when there are multiple values of the first field, the second network node may signal multiple segment identifiers of the second network node and signal multiple values of the first field carried in multiple segment identifiers of the second network node correspondingly. One segment identifier of the second network node includes or carries one value of the first field.
[0010] In some possible embodiments, if the value of the first field included in the segment identifier of the second network node is a specific value, the first network node modifies the value of the first field in accordance with the segment routing policy and uses the modified value as the determined value of the first field.
[0011] Alternatively, if the segment identifier of the second network node includes a value for the first field and there are multiple values for the first field, the first network node selects a value from the multiple values for the first field that conforms to the segment routing policy in accordance with the segment routing policy, and uses that value as the determined value for the first field.
[0012] In some possible embodiments, the first field includes a flag field, which is used to indicate a type of the network performance parameter, and a value of the flag field is further used to instruct the second network node to add a network performance parameter corresponding to the type of the network performance parameter to the second packet.
[0013] In some possible embodiments, when the second network node supports segment routing in Internet Protocol version 6 (SRv6), the value of the flag field is specifically used to instruct the second network node to add a network performance parameter corresponding to a type of the network performance parameter of the second network node to the second packet, for example, to add the network performance parameter to the segment identifier of the second network node or to the segment identifier of a third network node, the third network node being a next-hop node of the second network node on the packet forwarding path. If necessary, the network performance parameter may further be added to another field of the second packet, for example, a TLV field.
[0014] In some possible embodiments, if the second network node supports Internet Protocol version 6 (IPv6), the value of the flags field is specifically used to instruct the second network node to add a network performance parameter corresponding to the type of the network performance parameter to a field (other than the segment identifier of the second network node) in the second packet, e.g., to add the network performance parameter to a TLV field or another field of the field identifier of the non-network node.
[0015] In some possible embodiments, the network performance parameters include at least one of the following: the time at which the second network node transmits the second packet; the number of service packets received by the second network node before transmitting the second packet (the service packet and the second packet belong to the same data flow); the queue length of a packet transmit queue of the second network node (the packet transmit queue is the queue in which the second packet is stored); and the communication interface used by the second network node to transmit the second packet.
[0016] In some possible embodiments, the first field includes a network slice field, where the value of the network slice field is used to indicate a network slice identifier, and the value of the network slice field is further used to instruct the second network node to process the second packet based on the network slice identifier, where the network slice identifier is used to identify a network slice to be used when transmitting the second packet.
[0017] In some possible embodiments, the first field occupies the 56th bit through the 63rd bit in the second network node's segment identifier format, the locator field occupies the first bit through the 55th bit in the second network node's segment identifier format, and the function field occupies the 64th bit through the 128th bit in the second network node's segment identifier format.
[0018] In some possible embodiments, the number of the first fields is not limited. When there are multiple first fields, one first field of the multiple first fields is a flag field, and another first field of the multiple first fields is a network slice field. A value of the flag field is used to indicate a type of the network performance parameter and is further used to instruct the second network node to add a network performance parameter corresponding to the type of the network performance parameter to the second packet. A value of the network slice field is used to indicate a network slice identifier and is further used to instruct the second network node to process the second packet based on the network slice identifier. The network slice identifier is used to identify a network slice to be used when transmitting the second packet.
[0019] According to a second aspect, an embodiment of the present invention provides another packet processing method applied to a second network node side of a packet processing system, the method including the steps of: determining, by the second network node, a format of a segment identifier of the second network node, where the segment identifier of the second network node includes a first field; and transmitting, by the second network node, a first packet to the first network node, where the first packet includes the format of the segment identifier of the second network node, the first network node determines a value of the first field in the segment identifier of the second network node according to a segment routing policy, and adds the determined value of the first field to a second packet transmitted to the second network node.
[0020] In some possible embodiments, if the value of the first field included in the segment identifier of the second network node is a specific value, the determined value of the first field is obtained by the first network node modifying the value of the first field in the format of the segment identifier of the second network node in accordance with the segment routing policy, or if the format of the segment identifier of the second network node includes a value of the first field and there are multiple values of the first field, the determined value of the first field is a value that complies with and is selected by the first network node from the multiple values of the first field in accordance with the segment routing policy.
[0021] In some possible embodiments, the first field includes a flag field, and a value of the flag field is used to indicate a type of the network performance parameter, and the value of the flag field is further used to instruct the second network node to add a network performance parameter corresponding to the type of the network performance parameter to the second packet.
[0022] In some possible embodiments, the first field includes a network slice field, and a value of the network slice field is used to indicate a network slice identifier, the value of the network slice field is further used to instruct the second network node to process the second packet based on the network slice identifier, and the network slice identifier is used to identify a network slice to be used when transmitting the second packet.
[0023] According to a third aspect, an embodiment of the present invention provides another packet processing method applied to a packet processing system including a first network node and a second network node, the method comprising: transmitting a first packet by the second network node to the first network node, the first packet including a format of a second network node segment identifier, the format being used to indicate a length and a position of each field in the second network node segment identifier, the second network node segment identifier including a network slice field, receiving a second packet transmitted by the first network node, the second packet including the second network node segment identifier and the second network node segment identifier including a value of the network slice field, the value of the network slice field being determined by the first network node according to a segment routing policy, and processing the second packet by the second network node based on the value of the network slice field.
[0024] In some possible embodiments, the value of the network slice field is used to indicate a network slice identifier, and the second network node processes the second packet based on the network service provided by the network slice corresponding to the network slice identifier.
[0025] In some possible embodiments, the network slice identifier is carried in a network slice field within a segment identifier of the second network node in the second packet.
[0026] According to a fourth aspect, an embodiment of the present invention provides another packet processing method applied to a packet processing system including a first network node and a second network node, the method including: a step of transmitting a first packet by the second network node to the first network node, the first packet including a format of a segment identifier of the second network node, the format being used to indicate a length and a position of each field in the segment identifier of the second network node, the segment identifier of the second network node including a flag field; a step of receiving a second packet transmitted by the first network node by the second network node, the second packet including a value of the flag field, the value being used to indicate a type of a network performance parameter, the value of the flag field being determined by the first network node based on the segment routing policy and the format of the segment identifier of the second network node; and a step of adding a network performance parameter of the second network node to the second packet by the second network node, the network performance parameter being a network performance parameter corresponding to the type of the network performance parameter.
[0027] In some possible embodiments, if the second network node supports segment routing in Internet Protocol version 6 (SRv6), the second network node adds a network performance parameter of the second network node to the segment identifier of the second network node in the second packet.
[0028] In some possible embodiments, if the second network node supports Internet Protocol version 6 (IPv6), the second network node adds network performance parameters of the second network node to bytes in the second packet other than the segment identifier of the second network node.
[0029] In some possible embodiments, the type of network performance parameter is carried in a flags field within a segment identifier of the second network node in the second packet.
[0030] In some possible embodiments, the network performance parameters include at least one of the following: the time at which the second network node transmits the second packet; the number of service packets received by the second network node before transmitting the second packet (the service packet and the second packet belong to the same data flow); the queue length of a packet transmit queue of the second network node (the packet transmit queue is the queue in which the second packet is stored); and the communication interface used by the second network node to transmit the second packet.
[0031] According to a fifth aspect, an embodiment of the present invention provides a first network device applied in a packet processing system, The first network device includes a communication module and a processing module.
[0032] The communication module is configured to receive a first packet transmitted by a second network node, the first packet including a second network node segment identifier format, the second network node segment identifier format being used to indicate a length and position of each field within the second network node segment identifier.
[0033] The processing module is configured to obtain a format of a segment identifier of the second network node based on the first packet, the segment identifier of the second network node including a first field.
[0034] The processing module is further configured to determine a value of a first field in the segment identifier of the second network node according to the segment routing policy and a format of the segment identifier of the second network node, and add the determined value of the first field to a second packet transmitted by the second network node, wherein the determined value of the first field is used to instruct the second network node to process the second packet.
[0035] For contents not described or shown in this embodiment of the present invention, please refer to the relevant description of the embodiment of the first aspect as appropriate, and the details will not be described again here.
[0036] According to a sixth aspect, an embodiment of the present invention provides a second network device applied in a packet processing system, The second network device includes a communication module and a processing module.
[0037] The processing module is configured to determine a format of a second network node segment identifier, the format of the second network node segment identifier being used to indicate a length and position of each field within the second network node segment identifier, the second network node segment identifier including the first field.
[0038] The communication module is configured to transmit a first packet to a first network node, the first packet including a format of a segment identifier of a second network node, the format of the segment identifier being used by the first network node to determine a value of a first field in the segment identifier of the second network node in accordance with a segment routing policy and to add the determined value of the first field to a second packet transmitted to the second network node.
[0039] For contents not shown or described in the present invention, please refer to the relevant description of the embodiment of the second aspect as appropriate, and the details will not be described again here.
[0040] According to a seventh aspect, an embodiment of the present invention provides another second network device applied in a packet processing system, The second network device includes a communication module and a processing module.
[0041] The communication module is configured to transmit a first packet for a first network node, the first packet including a format of a second network node segment identifier, the format of the second network node segment identifier being used to indicate a length and position of each field within the second network node segment identifier, the second network node segment identifier including a network slice field.
[0042] The communications module is further configured to receive a second packet transmitted by the first network node, the second packet including a segment identifier for the second network node, the segment identifier for the second network node including a value of a network slice field, the value of the network slice field being determined by the first network node according to a segment routing policy.
[0043] The processing module is configured to process the second packet based on a value of the network slice field.
[0044] For contents not shown or described in the present invention, please refer to the relevant description of the embodiments of the third aspect, and the details will not be described again here.
[0045] According to an eighth aspect, an embodiment of the present invention provides another second network device applied in a packet processing system including a communication module and a processing module.
[0046] The communication module is configured to transmit a first packet to a first network node, the first packet including a format of a second network node segment identifier, the format of the second network node segment identifier being used to indicate a length and position of each field within the second network node segment identifier, the second network node segment identifier including a flags field.
[0047] The communication module is further configured to receive a second packet transmitted by the first network node, the second packet including a value of a flags field, the value of the flags field being determined by the first network node according to the segment routing policy, and the value of the flags field being used to indicate a type of the network performance parameter.
[0048] The processing module is configured to add a network performance parameter of a second network node to the second packet, the network performance parameter being a network performance parameter corresponding to the network performance parameter type.
[0049] For contents not shown or described in the present invention, please refer to the relevant description of the embodiments of the fourth aspect, and the details will not be described again here.
[0050] According to a ninth aspect, an embodiment of the present invention provides a network device applied to a packet processing system. The network device may specifically be a first network device including a processor and a memory. The memory is configured to store instructions. The processor is configured to invoke the instructions in the memory and execute the method described in the first aspect or any one of the executable implementations of the first aspect. Optionally, the first network device may further include a communication interface and a bus. The processor, the communication interface, and the memory communicate with each other using the bus. The communication interface is configured to receive and transmit data.
[0051] According to a tenth aspect, an embodiment of the present invention provides a network device applied to a packet processing system. The network device may specifically be a second network device, and includes a processor and a memory. The memory is configured to store instructions. The processor is configured to call the instructions in the memory and execute the method described in any one of the second to fourth aspects and the executable implementation of the aspects. Optionally, the second network device may further include a communication interface and a bus. The processor, the communication interface, and the memory communicate with each other using the bus. The communication interface is configured to receive and transmit data.
[0052] According to an eleventh aspect, an embodiment of the present invention provides a packet processing system. The system includes a first network node and a second network node. The first network node is configured to perform the steps of the method described in the first aspect and any possible implementation of the first aspect. The second network node is configured to perform the steps of the method described in any one of the second to fourth aspects and any possible implementation of the second to fourth aspects. For example, the second network node is configured to send a first packet to the first network node, the first packet including a format of the second network node, the format being used to indicate a length and a position of each field in the segment identifier of the second network node, the first network node is configured to receive the first packet and obtain a format of the segment identifier of the second network node based on the first packet, the segment identifier of the second network node including the first field. The first network node is further configured to determine a value of a first field in the segment identifier of the second network node based on the segment routing policy and a format of the segment identifier of the second network node, and add the determined value of the first field to a second packet transmitted to the second network node.
[0053] The first packet may be a control packet, such as an IGP packet or an ICMP packet, transmitted in a control plane, and the second packet is a data packet transmitted in a data plane.
[0054] For parts not shown or described in this embodiment of the present invention, please refer to the relevant descriptions of the above method embodiments, and the details will not be described again here.
[0055] According to a twelfth aspect, there is provided a non-transitory computer storage medium storing program code for use in packet processing, the program code including instructions for use in performing the method of the first aspect or any one of the executable implementations of the first aspect.
[0056] According to a thirteenth aspect, there is provided a non-transitory computer storage medium, the non-transitory computer storage medium storing program code for use in packet processing, the program code including instructions for use in performing a method as described in any one of the second to fourth aspects.
[0057] According to a fourteenth aspect, there is provided a chip product for performing the method of the first aspect or any one of the viable implementations of the first aspect.
[0058] According to a fifteenth aspect, there is provided a chip product for performing the method of any one of the second to fourth aspects or any viable implementation of any one of the second to fourth aspects.
[0059] Based on each implementation provided in the above aspects, in the present invention, these implementations may be further combined to provide more implementations. [Brief description of the drawings]
[0060] In order to describe the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly describes the accompanying drawings for illustrating these embodiments or the prior art.
[0061] [Figure 1] FIG. 2 is a schematic diagram of a segment routing header format according to an embodiment of the present invention.
[0062] [Diagram 2] FIG. 2 is a schematic diagram of a segment identifier format according to one embodiment of the present invention;
[0063] [Figure 3A] FIG. 2 is a schematic diagram of the format of several fields within a segment identifier according to one embodiment of the present invention. [Figure 3B] FIG. 2 is a schematic diagram of the format of several fields within a segment identifier according to one embodiment of the present invention. [Figure 3C] FIG. 2 is a schematic diagram of the format of several fields within a segment identifier according to one embodiment of the present invention. [Figure 3D] FIG. 2 is a schematic diagram of the format of several fields within a segment identifier according to one embodiment of the present invention.
[0064] [Figure 4A] FIG. 2 is a schematic diagram of an application scenario according to an embodiment of the present invention. [Figure 4B] FIG. 2 is a schematic diagram of another application scenario according to an embodiment of the present invention.
[0065] [Diagram 5] 2 is a schematic flow chart of a packet processing method according to an embodiment of the present invention;
[0066] [Figure 6A] 4 is a schematic flow chart of another packet processing method according to an embodiment of the present invention; [Figure 6B] 4 is a schematic flow chart of another packet processing method according to an embodiment of the present invention;
[0067] [Figure 7A] FIG. 2 is a schematic diagram of a packet transmission scenario according to an embodiment of the present invention; [Figure 7B] FIG. 2 is a schematic diagram of a packet transmission scenario according to an embodiment of the present invention; [Figure 7C] FIG. 2 is a schematic diagram of a packet transmission scenario according to an embodiment of the present invention;
[0068] [Figure 8A] 4 is a schematic flow chart of another packet processing method according to an embodiment of the present invention; [Figure 8B] 4 is a schematic flow chart of another packet processing method according to an embodiment of the present invention;
[0069] [Figure 9A] FIG. 2 is a schematic diagram of another packet transmission scenario according to an embodiment of the present invention. [Figure 9B] FIG. 2 is a schematic diagram of another packet transmission scenario according to an embodiment of the present invention. [Figure 9C] FIG. 2 is a schematic diagram of another packet transmission scenario according to an embodiment of the present invention.
[0070] [Figure 10] 1 is a schematic structural diagram of a packet processing system according to an embodiment of the present invention; [Figure 11] 1 is a schematic structural diagram of a packet processing system according to an embodiment of the present invention; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0071] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.
[0072] The following describes some technical concepts or terminology used in the embodiments of the present application.
[0073] (1) Segment Routing Header (SRH)
[0074] 1 is a schematic diagram of the format of the SRH. As shown in FIG. 1, the SRH includes a next header field, a header length field, a routing type field, a remaining segments field, a last entry field, a flag field, a tag field, and a segment list field.
[0075] The next header field occupies 8 bits and is used to identify the type of the next header.
[0076] The Extended Header Length (Hdr Ext Len) field occupies 8 bits and indicates the length of the SRH in units of 8 bytes.
[0077] The Routing Type field occupies 8 bits and indicates that the information carried is source routing information.
[0078] The Segments Left field occupies 8 bits and identifies the number of the next segment identifier SID to be displayed. The initial value of the Segments Left field is [n-1], where n represents the number of segment identifiers in the SRH, in other words, the number of network nodes on the forwarding path of the SRH. Each time the SRH passes through a network node, the value of the Segments Left field is decreased by one until its value becomes 0. If the value of the Segments Left field is 0, this indicates that the SRH has been sent to the last hop node on the forwarding path.
[0079] The Last Entry field occupies 8 bits and indicates the number of the segment identifier SID of the last network node on the forwarding path of the SRH, and the number is 0.
[0080] The Flags field occupies 8 bits and indicates flag information.
[0081] The Tag field occupies 16 bits and is used to mark a group of packets (or SRHs) that have the same attribute.
[0082] The segment list (segment list[0] to segment list[n]) fields indicate that the network nodes on the packet forwarding path are arranged in descending order of distance. Segment list[0] is the segment identifier (SID) of the last network node on the packet forwarding path. Segment list[1] is the segment identifier of the penultimate network node on the packet forwarding path, and the others can be deduced by analogy. Segment list indicates the segment list.
[0083] If necessary, the SRH may further include options, which may also be called optional type-length-value objects. The options may be set by the system in a self-defined manner, and the meanings indicated by the options may be defined based on the actual service requirements, but this is not limited in the present invention.
[0084] (2) Segment Identifier SID
[0085] In the packet forwarding process on an SRv6 network, an ingress device of the SRv6 network adds a segment routing header (SRH) to the packet, and the SRH contains a segment list used to identify the forwarding path. The segment list contains the segment identifiers (SIDs) of network nodes that support SRv6 functionality on the packet forwarding path. The segment identifier is a 128-bit IPv6 address. Therefore, the segment identifier of a network node is sometimes also called the IPv6 address of the network node.
[0086] An ingress device that forwards packets on an SRv6 network may also be called an ingress node or an ingress provider edge (PE) device. A segment list may also be called a segment list or a SID list.
[0087] In the present invention, a SID includes a locator field, a function field, and a first field (sometimes called a self-defined field) defined by another system. The positions of the locator field, the function field, and the first field in the SID, and the number of bytes occupied by each of the locator field, the function field, and the first field are not limited in the present invention. The number of first fields is also not limited. For example, a SID may include n first fields, where n is a positive integer. An example in which a SID includes one first field is used below. Figure 2 is a schematic diagram of an executable format of a SID. As shown in Figure 2, a SID includes a locator field, a function field, and a first field.
[0088] The locator field occupies bits 0 to 55 and is used to store IPv6 address prefixes for packet forwarding and routing. The locator field can also be used to identify a network node. For example, a forwarding node may forward a packet to a network node corresponding to a SID based on the locator field included in the SID.
[0089] The first field occupies 56-63 bits. In different application scenarios, the first field may indicate different meanings. Specifically, the meaning indicated by the first field may be configured by a manager (or a management node) corresponding to the network node according to an actual service scenario or based on service requirements. This is not limited in the present invention.
[0090] For example, in a network slicing scenario, the first field may be configured as a network slice field and is used to carry a network slice identifier for service communication. In this way, when transmitting a packet, the network node processes the packet based on the network slice indicated by the network slice identifier in the first field. For example, the network node forwards the packet based on a network service provided by the network slice. The network service includes, but is not limited to, a transmission delay, a transmission speed, a transmission bandwidth, a network throughput rate, a network throughput, or another network service used to guarantee a certain quality of service (QoS) metric.
[0091] In a network performance measurement scenario, the first field may be configured as a flag field and is used to carry a type of network performance parameter. In this way, when transmitting a packet, the network node adds a network performance parameter of the network node corresponding to the type of network performance parameter to the packet, and sends the packet with the added network performance parameter to another network node. Correspondingly, the other network node may perform a corresponding network performance calculation based on the received network performance parameter. Details will be described below using an example of the present application.
[0092] The function field occupies 64 to 127 bits and is used to instruct the network node corresponding to the SID to perform a corresponding function (e.g., network performance calculation or packet forwarding), as described in detail below in this application. For example, when a network node receives a packet and determines the destination address of the packet as the IPv6 address of the network node, in other words, as the segment identifier of the network node, the network node performs the corresponding function based on the function in the segment identifier.
[0093] 3A-3D are schematic diagrams of specific formats of relevant fields in a SID according to an embodiment of the present application. FIG. 3A is a schematic diagram of a possible format of a locator field. As shown in FIG. 3A, the locator field includes a type subfield, a first length subfield, an offset subfield, a second length subfield, and a variable locator subfield. The position of each subfield included in the locator field and the number of bytes each subfield occupies are not limited in this embodiment of the present application.
[0094] The type subfield is used to define the type to which the current field belongs. If type=locator, this indicates that the field is defined as a locator field. The first length subfield is used to indicate the length that the current field occupies when it is represented using a type-length-value (TLV) format, which may also be called the length of the TLV. The offset subfield is used to define the starting position of the current field within the SID (e.g., starting from the first bit of the SID). The second length subfield is used to define the length (number of bits or bytes) that the current field occupies within the SID. Variable locators are used to store IPv6 address prefixes for packet forwarding and routing, and may be used to identify network nodes.
[0095] Figure 3B is a schematic diagram of a possible format of the first field. As shown in Figure 3B, the first field includes a type subfield, a first length subfield, an offset subfield, a second length subfield, and optional sub-type-length-value subfields. The position of each subfield included in the first field and the number of bytes each subfield occupies are not limited in this embodiment of the present application.
[0096] In the case of type=flag, this indicates that the first field is defined as a flag field. In the case of type=network sliceID, this indicates that the first field is defined as a network slice field. If necessary, in different application scenarios, a manager corresponding to the network node may appropriately define the function of the first field based on actual service requirements. This is not limited in this embodiment of the present application. The optional sub-type, length, and value subfields are used to carry the value of the first field, and correspondingly indicate the information indicated by the first field. For example, in a network slicing scenario, the first field may be a network slice field, and the value of the network slice field is used to indicate a network slice identifier, and this value may be specifically carried in the optional sub-type, length, and value subfields. In another example, in a network performance measurement scenario, the first field may be a flag field, and the value of the flag field is used to indicate a type of network performance parameter, and this value may be specifically carried in the optional sub-type, length, and value subfields. In practical applications, there may be multiple values of flag, which are used to distinguish different types of network performance parameters. For example, the values of flag may be as follows:
[0097] If flag=1, this indicates that the type of network performance parameter is time, and that a network node that forwards a packet using the segment identifier may add the time at which the packet is sent to the packet.
[0098] If flag=2, it indicates that the type of the network performance parameter is the type of the number of transmitted packets, and indicates that the network node that forwards the packet using the segment identifier may add the number of received service packets to the packet, where the service packet and the packet belong to the same data flow, and specifically may be identified using the segment list or the packet forwarding path.
[0099] When flag=3, this indicates that the type of the network performance parameter is a queue occupancy type, and indicates that a network node that forwards a packet using the segment identifier adds to the packet the queue depth (i.e., queue length) of the packet transmission queue that stores the packet. Here, the queue depth may be indicated by a queue occupancy rate or a queue length. The packet transmission queue may include, but is not limited to, a first-in-first-out queue and a first-in-last-out queue.
[0100] If flag=4, this indicates that the type of the network performance parameter is an interface type, and the network node that forwards the packet using the segment identifier adds the communication interface of the packet to the packet. Here, the communication interface may specifically be a receiving interface used to receive the packet, or a transmitting interface used to transmit the packet.
[0101] For related descriptions of other subfields in the first field, please refer to the related description of the embodiment of FIG. 3A. Details will not be described again here. Related embodiments related to the types of network performance parameters and network slice identifiers are specifically described in detail below in this application.
[0102] FIG. 3C is a schematic diagram of a possible format of the optional sub-tlvs field. As shown in FIG. 3C, this field includes type, length, and value. Type in this specification means the type supported by the first field, such as the above-mentioned type of time, type of number of packets sent, type of queue occupancy, and type of interface. Length is the length occupied by the optional sub-tlvs in the first field (e.g., 2 bytes). Value in this specification may specifically be the value of type. Different types correspond to different values and have different meanings. For example, in the above example, if the type value is 1, the type is specifically the type of time.
[0103] Figure 3D is a schematic diagram of a possible format of a capability field. As shown in Figure 3D, the capability field includes a type subfield, a first length subfield, an offset subfield, a second length subfield, and optional sub-type-length-values subfields. The position of each subfield included in the capability field and the number of bytes each subfield occupies are not limited in this embodiment of the present application.
[0104] If type=function, the current field is defined as a function field. The optional sub-tlvs is used to convey the functions that the function field defined by the system needs to implement, and may instruct the network node to perform the function corresponding to this field (e.g., network performance calculation). Details are described below using an example of this application. For details about other sub-fields related to the function field, please refer to the related description of the embodiment of FIG. 3A. Details will not be described again here.
[0105] The segment identifier of the network node in this embodiment of the present application may specifically include, but is not limited to, a node segment identifier and a neighbor segment identifier. For the definition of the segment list and SID, please refer to the SRv6-related draft (e.g., draft-filsfils-spring-srv6-network-programming-04) disclosed by the Internet Engineering Task Force (IETF). The relevant contents in this document appear to be copied in their entirety and are generally incorporated herein by reference. In the event of any contradiction or discrepancy with this specification, the description in this specification shall take precedence. The controller in this embodiment of the present application may be a network management device or a controller of a software-defined networking (SDN) architecture. This is not limited in the embodiment of the present application. The network node in this embodiment of the present application may specifically be a network device, and may include, but is not limited to, a router, a switch, a forwarder, etc. of an SDN network.
[0106] The following describes two schematic diagrams of a network framework to which the embodiments of the present application can be applied. Figure 4A is a schematic diagram of a possible network framework according to one embodiment of the present application. As shown in Figure 4A, the schematic diagram of the network framework is applied to an SRv6 network, which may include network nodes (e.g., network nodes 101 to 106 in Figure 4A) that support SRv6 functions.
[0107] On the SRv6 network, each network node supports SRv6 functionality. In other words, the network node supports IPv6 segment routing functionality. The segment identifier of the network node 101 is SID1, and SID1 is also the IPv6 address of the network node 101 (e.g., A::). The segment identifier of the network node 102 is SID2, and SID2 is also the IPv6 address of the network node 102 (e.g., B::). The segment identifier of the network node 103 is SID3, and SID3 is also the IPv6 address of the network node 103 (e.g., C::). The segment identifier of the network node 106 is SID6, and SID6 is also the IPv6 address of the network node 106 (e.g., D::). When a packet is forwarded from the network node 101 to the network node 106, the network node 101 is called an ingress node of the SRv6 network, and the network node 106 is called an egress node of the SRv6 network.
[0108] Optionally, this network framework schematic may further include user equipment 107 and user equipment 108. User equipment 107 may communicate with network node 101 via a network, and user equipment 108 may also communicate with network node 106 via a network.
[0109] 4B is a schematic diagram of another possible network framework according to an embodiment of the present application. As shown in FIG. 4B, the schematic diagram of the network framework is applied to an IPv6 network, and may include network nodes that support SRv6 functions and network nodes that do not support SRv6 functions. As shown in FIG. 4B, the network nodes that support SRv6 functions may include network nodes 101 to 106. For details, please refer to the related description of FIG. 4A. The network nodes that do not support SRv6 functions may include network node 109.
[0110] In an actual communication process, since the network nodes 101-106 support SRv6 function, in a packet forwarding process, the network node may modify a relevant field in the segment identifier of the network node in the packet to carry the corresponding information, and forward the modified packet to the next network node. However, the network node 109 does not support SRv6 function and does not have a segment identifier. Therefore, in a packet forwarding process, the network node 109 may add information about the network node to another field of the packet, and send the packet to the next network node. Alternatively, the network node 109 may directly forward the packet, and so on. The method in which the network node modifies or adds information to the packet is specifically described in detail below.
[0111] Optionally, the schematic diagram of the network framework in this embodiment of the present application also includes a user equipment 107 and a user equipment 108. The user equipment 107 may communicate with the network node 101 through a network, and the user equipment 108 may communicate with the network node 106 through a network. For contents not shown or described in this embodiment of the present application, please refer to the relevant description of the embodiment of FIG. 4A. Details will not be described again here.
[0112] The following describes a packet processing method provided in an embodiment of the present application. Figure 5 is a schematic flowchart of a packet processing method according to an embodiment of the present application. The method shown in Figure 5 may include the following execution steps:
[0113] Step S500: The second network node transmits the format of the segment identifier of the second network node to the first network node. In response, the first network node receives the format of the segment identifier of the second network node. The format of the segment identifier of the second network node is used to indicate the position and length of each field included in the segment identifier of the second network node.
[0114] In this embodiment of the present application, any network node supporting SRv6 functionality on a network may notify another node (e.g., an ingress node) on the network of the format of the segment identifier of that network node to a controller on the network. The format of the segment identifier of a network node is used to indicate the position and length of each field included in the segment identifier of a network node. If necessary, the format of the segment identifier of a network node may further indicate information, such as the value of a related field in the segment identifier of a network node. For example, in the format of the segment identifier of a network node, the 0th bit to the 55th bit in the segment identifier of a network node is a locator field, and the 56th bit to the 63rd bit is a first field. The first field is shown in a TLV format and includes multiple subfields. The value of the first field may be specifically carried in an optional sub-tlvs subfield. For the specific format of the segment identifier of a network node, please refer to the related description of the above embodiment. Details will not be described again here.
[0115] The formats of the segment identifiers of different network nodes may be the same or different, and may be determined based on the actual service requirements corresponding to the network nodes. For example, the format of the segment identifier of a network node may indicate a locator field, a function field, a first field, etc., included in the segment identifier of the network node. In different service scenarios, the first field may be configured based on the actual service requirements and indicate different meanings. In practical applications, in the same service scenario, the formats of the segment identifiers of all network nodes on the network are usually the same.
[0116] For example, in a network slicing scenario, the format of the segment identifier of the network node indicates a locator field, a function field, and a first field included in the segment identifier of the network node. The first field may specifically be a network slice field, which is used to indicate or carry a network slice identifier used when the network node communicates. In another example, in a network performance measurement scenario, the format of the segment identifier of the network node indicates a locator field, a function field, and a first field included in the segment identifier of the network node. The first field may specifically be a flag field, which is used to carry or indicate a type of network performance parameter. For the specific format of the segment identifier of the network node, please refer to the related description of the above embodiment. Details will not be described again here.
[0117] In this embodiment of the present application, a second network node on the network notifies the ingress node (first network node) of the format of the segment identifier, which is used here as an example. The second network node may notify the first network node of the format of the segment identifier of the second network node.
[0118] Specifically, the second network node transmits a first packet to the first network node, the first packet including a format of a second network node segment identifier. The format of the second network node segment identifier is specifically used to indicate a position and a length of each field included in the second network node segment identifier. For example, the format of the second network node segment identifier may indicate a locator field, a function field, and a first field included in the second network node segment identifier. The format of the second network node segment identifier may specifically be encapsulated in the first packet using a type-length-value (TLV) field.
[0119] If necessary, the format of the segment identifier of the second network node may further indicate values supported by a related field in the segment identifier of the second network node, for example, a value of the first field. In practical application, the first field may have one or more values. Correspondingly, the one or more values supported by the first field are indicated in the format of the segment identifier of the second network node. When the first field has one value, the value of the first field may be a specific value, for example, 0. When the first field has multiple values, the multiple values of the first field may be encapsulated in the first packet using multiple TLV fields, and the first packet is sent to the first network node.
[0120] For example, in a network slicing scenario, the format of the segment identifier of the second network node may be specifically used to indicate the locator field, the function field, and the network slice field included in the segment identifier of the second network node. If necessary, the format of the segment identifier of the second network node may further indicate the value of the network slice field. In practical applications, the format of the segment identifier of the second network node usually indicates that the value of the network slice field is a specific value, and the specific value is an initial setting value set by the system, for example, 0. If necessary, the format of the segment identifier of the second network node may also indicate multiple values supported by the network slice field, so that, during subsequent actual communication, one value is selected from the multiple values of the network slice field, and data transmission is performed using the network slice indicated by this value accordingly. The value of the network slice field is used to indicate a network slice identifier, indicating that a network slice corresponding to the network slice identifier is used for communication during data transmission.
[0121] In the network performance measurement scenario, the format of the segment identifier of the second network node is specifically used to indicate the locator field, the function field and the flag field contained in the segment identifier of the second network node. In addition, the format of the segment identifier of the second network node may further indicate the value of the flag field. In practical application, the format of the segment identifier of the second network node indicates a plurality of values supported by the flag field, and each value of the flag field represents one type of the types of network performance parameters. For the values of the flag field and the meanings of the values, please refer to the relevant description of the above embodiment. Details will not be described again here.
[0122] In practical applications, the first packet may specifically be a control packet, which may include, but is not limited to, an interior gateway protocol (IGP) packet, an internet control message protocol (ICMP), or another protocol packet related to the control plane.
[0123] Step S501: A second network node transmits a segment identifier of the second network node to a first network node. In response, the first network node receives a segment identifier of the second network node. The segment identifier of the second network node includes a value of each field, for example, a value of a locator field, a value of a function field, and a value of a first field.
[0124] As described in step S500, any network node supporting SRv6 functionality on the network may send the format of the network node's segment identifier to another node on the network to inform the other node of information such as the position and length of each field included in the network node's segment identifier. In an actual service communication process, any network node supporting SRv6 functionality on the network may send the network node's segment identifier to another node on the network. The network node's segment identifier includes a value of each field to indicate or inform the corresponding information. For example, the value of the locator field is used to indicate the next hop routing address of the packet. If a field in the network node's segment identifier supports multiple values, the multiple values can be informed using multiple segment identifiers of the network node. The multiple values of the first field are used as an example. The network node may send multiple segment identifiers of the network node, and each segment identifier of the network node includes one value of the first field.
[0125] In this application, an example of a second network node notifying a first network node of a segment identifier of the second network node is used to explain the relevant content. Specifically, the second network node transmits the segment identifiers of the second network node supported by the second network node to the first network node. The number of the segment identifiers of the second network node is not limited in this embodiment of the application. The segment identifier of the second network node includes a value of a related field, for example, a value of the first field. If there are multiple segment identifiers of the second network node, the second network node may use one or multiple packets to notify the multiple segment identifiers of the second network node. For example, if one packet is used to notify multiple segment identifiers of the second network node, the packet includes multiple TLV fields, and each TLV field is used to carry / notify one segment identifier of the second network node. If multiple packets are used to notify multiple segment identifiers of the second network node, each packet may be used to carry or notify one segment identifier of the second network node. In this specification, the packet may specifically be a control packet or a data packet. For details of the control packet, please refer to the relevant description of the above embodiment, which is not limited in this application.
[0126] In other words, the second network node may use step S500 and / or step S501 to inform the first network node of the values supported by a relevant field in the segment identifier of the second network node, for example the value of the first field. This field may support one or more values. In particular, there are several implementation forms listed below.
[0127] In a first implementation form, the format of the segment identifier of the second network node notified by the second network node does not indicate a value of the first field, or indicates that the value of the first field is a default value. The default value may also be called a default value, and may be specifically set by the system in a self-defined manner, for example, 0. The default value indicates a value that has no actual meaning by default. In this case, the segment identifier of the second network node notified by the second network node may include the value of the first field, and the value of the first field is not limited. Generally, the value of the first field is not the default value. If the second network node supports multiple values of the first field, the second network node may correspondingly notify multiple segment identifiers of the second network node and notify multiple values of the first field to the first network node. Each segment identifier of the second network node includes one value of the first field.
[0128] In a second implementation manner, the format of the segment identifier of the second network node notified by the second network node indicates the value supported by the first field (in other words, the value of the first field), and the value of the first field may be one or more. When there is one value of the first field, the value of the first field may be a specific value. This specific value may specifically be only one value of the first field different from the initial setting value. For example, when the initial setting value is 0, the specific value may be 1 or 2. In this case, when the second network node notifies the segment identifier of the second network node, the second network node may notify the segment identifier including the value of the first field having the initial setting value, so as to save transmission resources. Correspondingly, the first network node may obtain the segment identifier of the second network node based on the value of the first field indicated in the format of the segment identifier of the second network node and based on the segment identifier of the second network node including the value of the first field having the initial setting value. If there are multiple values of the first field, the first network node may obtain multiple segment identifiers of the second network node based on the multiple values of the first field indicated in the format and based on the segment identifier of the second network node including the value of the first field having a default value, where each second network node segment identifier includes one value of the first field, in other words, multiple segment identifiers of the second network node corresponding to the multiple values of the first field are obtained.
[0129] In a third implementation manner, the format of the segment identifier of the second network node signaled by the second network node indicates a value of the first field, and the value of the first field may be one or more. In this case, if the overhead of the transmission resource is not taken into account, when signaling the segment identifier of the second network node, the second network node may further signal one or more values of the first field indicated in the format using one or more corresponding segment identifiers of the second network node. Each segment identifier of the second network node includes one value of the first field. In other words, if there is one value of the first field, the second network node may signal one segment identifier of the second network node, and the segment identifier includes the value of the first field. If there are multiple values of the first field, the second network node may signal multiple segment identifiers of the second network node and signal multiple values of the first field to the first network node accordingly. If necessary, after the second network node has notified the segment identifier of the second network node, the second network node may again notify some or all of the values of the first field among the multiple values of the first field using the segment identifier of the second network node, which is not limited in this embodiment of the present application.
[0130] For example, in a network measurement scenario, the second network node usually indicates a value of a first field (i.e., a flag field) in the format of the segment identifier of the second network node. When the segment identifier of the second network node is signaled to the first network node, the value of the first field carried in the segment identifier of the network node is a default value. Correspondingly, the first network node may obtain one or more segment identifiers of the second network node based on one or more values of the first field indicated in the format and based on the signaled segment identifier of the second network node carrying a value of the first field having the default value, and each second network node's segment identifier includes one value of the first field, in other words, obtains one or more values of the first field.
[0131] In a network slicing scenario, the second network node may not indicate the value of the first field (network slice field) in the format of the segment identifier of the second network node. Correspondingly, when the second network node notifies the segment identifier of the second network node, it adds the value of the first field to the segment identifier of the second network node and notifies the first network node of this segment identifier. In case of multiple values of the first field, the second network node may notify the first network node of multiple segment identifiers of the second network node, each segment identifier including one value of the first field. In this way, the first network node can recognize multiple values of the first field supported by the second network node.
[0132] In practical applications, in order to save transmission resources, by default, the value of the first field in the segment identifier of the second network node may be an initial setting value, for example 0. In this case, the second network node sends one segment identifier of the second network node to the first network node, and the value of the first field in the segment identifier is the initial setting value. Correspondingly, in order to reduce flooding traffic, the segment identifier of the second network node may have multiple values of the first field, and the multiple values may be determined based on the frequency of use of the values supported in the actual service scenario. In this case, the second network node may send multiple segment identifiers of the second network node to the first network node, and inform the first network node of the multiple values of the first field supported by the segment identifier of the second network node.
[0133] For example, in a network slicing scenario, the packet processing system provides five network slices for transmitting packets, and the network slice identifiers of the five network slices are 0 to 5, respectively. In a low-latency service, in order to meet the low-latency requirements of packet transmission, the network slice identifiers used for packet transmission may be 0 to 3, and these are three network slices. Correspondingly, in order to reduce flooding (or to reduce transmission resources), the second network node may inform the first network node that there are four values of the first field, which may be 0 to 3 here, and may specifically indicate network slice identifiers 0 to 3. In other words, the second network node may inform the first network node of four segment identifiers of the second network node, and each segment identifier includes one value of the first field.
[0134] Step S502: The first network node determines a value of a first field in a segment identifier of a second network node according to a segment routing policy. The first network node adds the determined value of the first field to a second packet to be transmitted to the second network node. The determined value of the first field is used to instruct the second network node to process the second packet.
[0135] In this application, the segment routing policy may be specifically generated by a first network node (ingress node) or a controller based on actual service requirements. The segment routing policy is used to indicate packet configuration and routing. If the segment routing policy is generated by a controller, the first network node may obtain the segment routing policy from the controller.
[0136] According to need, the segment routing policy may specifically include a configuration policy and a routing policy. In practical application, the two policies may be combined or divided into one or more policies for implementation. The routing policy is specifically used to indicate the routing of a packet, for example, to indicate a forwarding path of the packet or to indicate a segment list of the packet, where the segment list includes the segment identifiers of the network nodes on the forwarding path of the packet. The configuration policy is used to indicate the configuration of a related field in the segment identifier of the network node on the forwarding path, for example, the configuration of the value of the first field. Details are described below.
[0137] In the following, an example is used in which a segment routing policy is generated by an ingress node (first network node). The first network node is the network node 101 in FIG. 4A. Assume that the first network node needs to forward a packet from the network node 101 to the network node 106. As shown in FIG. 4A, there are two paths from the network node 101 to the network node 106. The network nodes on the first path include the network node 102, the network node 103, and the network node 106. The network nodes on the second path include the network node 104, the network node 105, and the network node 106. The network node 101 selects an optimal first path from the two paths based on a service requirement for packet forwarding (e.g., shortest path and least load), and obtains a segment routing policy used to indicate a packet routing (forwarding) path. In this specification, the segment routing policy may specifically be a routing policy in the segment routing policy. The segment routing policy includes at least a correspondence relationship between a destination address of a packet (the address D:: of the network node 106) and a segment list. In this way, the first network node can add a segment list corresponding to the destination address of the packet to the packet to be transmitted based on the correspondence in the segment routing policy. The segment list includes segment identifiers of network nodes on a forwarding path of the packet. The segment identifiers in the segment list may be arranged in descending order of distance from the network node on the first path through which the packet passes, and the segment list can be specifically arranged as follows:<SID6、SID3、SID2> Optionally, the segment list may also include a segment identifier of the network node 101. For example, the segment list may be:<SID6、SID3、SID2、SID1> It may be.If the segment list includes a segment identifier of the network node 101, the segment identifier of the network node 101 may not be used for forwarding packets but may be used to carry information, such as network performance parameters of the network node 101. Details are described below using an example.
[0138] Optionally, the first network node may further obtain a segment routing policy used to configure the packet based on the actual service requirements of the packet. In this specification, the segment routing policy may specifically be a configuration policy in the segment routing policy. The segment routing policy is specifically used to indicate or configure the value of a related field of a segment identifier of a network node in the segment list of the packet to meet the actual service requirements of the packet. For example, in a delay-sensitive service or a low-latency service, the segment routing policy is used to indicate that the value of a first field in a segment identifier of a network node in the segment list may be 0 to 3, where 0 to 3 indicate network slice identifier 0 to network slice identifier 3. In other words, in a low-latency service, any one of network slices 0 to 3 may be used to meet the low-latency requirements of the service when transmitting the packet. In a conventional service (a service with low-latency requirements), the segment routing policy is used to indicate that the value of a first field in a segment identifier of a network node in the segment list is 4 to 6, etc. In other words, in a conventional service, the packet may be transmitted using any one of network slices 4 to 6.
[0139] In another example, in a delay measurement scenario, the segment routing policy may be used to indicate that the value of a first field of the network node's segment identifier in the segment list of the packet is 1, indicating that the type of the network performance parameter is a time type. In this way, the network node may add a transmission time at which the packet is transmitted to the packet, and then calculate the transmission delay of the packet. For example, when another network node receives a packet, it may obtain the transmission delay of the packet by a calculation based on the reception time of the packet and the transmission time carried in the packet.
[0140] After obtaining the segment identifiers of each network node on the network in S501, the first network node may obtain a second packet including a segment list according to the segment routing policy. The segment list includes the segment identifiers of the network nodes on the packet forwarding path, and the segment identifiers of the network nodes include values of a first field, and the values of the first field are determined according to the segment routing policy. The second packet of the present application may specifically be a data packet.
[0141] Specifically, the first network node may add a segment list corresponding to the destination address of the second packet to the second packet based on the correspondence between the destination address of the packet and the segment list in the segment routing policy. For example, if the destination address of the second packet is D::, the segment list corresponding to the destination address D:: is<SID6、SID3、SID2、SID1> Besides, the first network node may further reconfigure (or determine) a value of a relevant field in the segment identifier of each network node in the segment list according to the segment routing policy, for example, may determine a value of a first field in the segment identifier of each network node. In this way, the first network node adds the determined value of the first field to the second packet and transmits the second packet to another network node.
[0142] In this application, the value of the first field in the segment identifier of each network node in the segment list may be the same or different. In practical application, in the same service scenario, the value of the first field in the segment identifier of each network node in the segment list is usually the same. For example, in a delay measurement scenario, the value of the first field of the segment identifier of each network node indicated by the segment routing policy is 1, which indicates that the type of the network performance parameter is a time type, and instructs the network node to add the time point when the network node transmits the packet to the packet in order to calculate the transmission delay of the packet.
[0143] In this application, an example in which a first network node determines the value of a first field in a segment identifier of a second network node according to a segment routing policy is used to illustrate in two exemplary implementations S502.
[0144] In one example, in steps S500 and S501, the value of the first field in the segment identifier of the second network node is signaled as a specific value. This specific value may specifically be a default value defined by the system, or may be just one value of the first field different from the default value. Specifically, the format of the segment identifier of the second network node signaled in S500 does not indicate the value of the first field, or the format indicates that the value of the first field is the default value or just one specific value other than the default value. Furthermore, the value of the first field included in the segment identifier of the second network node signaled in S501 is also a specific value. In this case, the first network node may modify the value of the first field according to the segment routing policy, and add the modified value to the second packet transmitted to the second network node. Specifically, the first network node adds the modified value to the first field of the segment identifier of the second network node in the second packet. In this manner, the first network node may directly determine the value of the first field in accordance with the segment routing policy, and then simply and conveniently process the second packet based on the value of the first field in order to conveniently process the packet.
[0145] For example, in a network slicing scenario, the first field is a network slice field (sliceID), the value of the first field is used to indicate a network slice identifier, and the network slice identifier is used to identify a network slice used when transmitting a packet. Correspondingly, the first network node may modify the value of the first field based on a network slice identifier that meets a current service requirement and is indicated by a segment routing policy, to add the network slice identifier to the first field. For example, in a low-latency service scenario, the segment routing policy is used to indicate that a data packet of the low-latency service scenario needs to be transmitted through any one of network slices 1 to 3 to meet a low-latency requirement. In this case, the first network node selects an arbitrary network slice (e.g., network slice 3) from the three network slices indicated by the segment routing policy, and then modifies the value of the first field to 3 to indicate that the packet is transmitted through network slice 3.
[0146] In a network performance measurement scenario, the first field is a flag field, and the value of the flag field is used to indicate a type of network performance parameter. Correspondingly, the first network node modifies the value of the flag field based on a type of network performance parameter that meets a current service requirement and is indicated by a segment routing policy, so as to add the type of network performance parameter to the flag field. For example, in a scenario of calculating a transmission delay of a packet, the segment routing policy is used to indicate that the type of network performance parameter is a time type (or directly indicates that the value of the first field is 1). In this case, the first network node sets the value of the first field in the segment identifier of the network node in the packet to 1 according to the segment routing policy, and adds the time point when the first network node transmits the packet to the packet, so that the network node can then calculate the transmission delay of the packet.
[0147] In one example, there are multiple values of the first field in the second network node segment identifier, and these values are signaled in step S500 and / or step S501. In particular, the format of the second network node segment identifier signaled in S500 indicates multiple values of the first field, and / or the multiple second network node segment identifiers signaled in S501 include values of the first field, and these values of the first field are not specific values. In other words, there are multiple values of the first field, and the multiple values of the first field may be signaled using the format of the second network node segment identifier and / or the multiple second network node segment identifiers. In this case, the first network node may select one value that matches the segment routing policy from the multiple values of the first field according to the segment routing policy, use the selected value as a value of the first field determined by the first network node, and add the determined value of the first field to the second packet, specifically, may add the determined value of the first field to the first field of the segment identifier of the second network node in the second packet, or may add the determined value of the first field to another field (e.g., a TLV field) of the second packet. In this way, the second network node may use the segment identifier of the second network node or the format of the segment identifier of the second network node to announce in advance the multiple values of the first field supported by the second network node. Correspondingly, the first network node may know in advance the multiple values of the first field supported by the second network node, and then select one matching value from the multiple values of the first field to process the second packet according to the segment routing policy, improving the flexibility of packet processing.
[0148] Optionally, when the multiple values of the first field are signaled using multiple segment identifiers of the second network node, each of the second network node's segment identifiers includes one value of the first field. Correspondingly, the first network node may determine one of the second network node's segment identifiers that conforms to the segment routing policy from the multiple segment identifiers of the second network node according to the segment routing policy (in other words, determine the value of the first field included in the segment identifier of the second network node), add the determined segment identifier of the second network node to a second packet, and transmit the second packet to the second network node.
[0149] For example, assume that in a network slicing scenario, a second network node informs a first network node that a value of a first field in a segment identifier of the second network node may be 3-5 (in other words, a network slice identifier used for packet transmission and supported by the second network node may be 3-5). Correspondingly, a segment routing policy obtained by the first network node indicates that a network slice identifier that satisfies a current service requirement is 1-3. In this case, the first network node may determine a value (here, the network slice identifier is 3) that conforms to the segment routing policy from the multiple values of the notified first field according to the segment routing policy, and use the value as the determined value of the first field.
[0150] Step S503: The first network node transmits a second packet to the second network node, the second packet carrying the determined value of the first field in the segment identifier of the second network node, and in response, the second network node receives the second packet.
[0151] Step S504: The second network node processes the second packet based on the value of the first field.
[0152] In the present application, the first network node may obtain a second packet according to the segment routing policy. The second packet includes a segment identifier of the second network node, and the segment identifier of the second network node includes the determined value of the first field. Then, the first network node obtains a segment identifier SID2 of the second network node from the segment list of the second packet, modifies a destination address of the second packet to SID2, and sends the second packet to the second network node, so that the second network node processes the second packet based on the value of the first field. Optionally, the second network node may be a next-hop node on the packet forwarding path and closest to the first network node in the forwarding direction.
[0153] In the following, some exemplary implementation forms related to S504 will be specifically described.
[0154] In one example, in a network slicing scenario, the first field is a network slice field, and the value of the network slice field indicates a network slice identifier. Correspondingly, after receiving the second packet, the second network node determines whether the destination address of the second packet matches the segment identifier of the second network node. Specifically, the second network node determines whether the value of the destination address field in the second packet is the same as the value of the segment identifier of the second network node. If the value of the destination address field in the second packet is the same as the value of the segment identifier of the second network node, the second network node determines that the destination address of the second packet matches the segment identifier of the second network node. Furthermore, the second network node recognizes the network slice identifier corresponding to the value by analyzing the value of the network slice field in the segment identifier of the second network node in the second packet. Correspondingly, the second network node may forward the second packet based on a network service provided in the network slice corresponding to the network slice identifier. The network service includes metering services such as, but not limited to, delay, throughput, and bandwidth. For example, the second network node forwards the second packet based on a maximum bandwidth or a maximum transmission rate provided by the network slice.
[0155] In one example, in a network performance measurement scenario, the first field is a flag field, and a value of the flag field indicates a type of network performance parameter. Correspondingly, after receiving the second packet, the second network node determines whether a destination address of the second packet matches a segment identifier of the second network node. If the destination address of the second packet matches the segment identifier of the second network node, the second network node may recognize a type of network performance parameter corresponding to the value by analyzing the value of the flag field in the segment identifier of the second network node in the second packet. Furthermore, the second network node may add a network performance parameter corresponding to the type of network performance parameter of the second network node to the second packet, and send the second packet with the added network performance parameter to another network node, so that the other network node performs a corresponding network performance calculation based on the network performance parameter.
[0156] The type of network performance parameter may include any one of a time type, a number of transmitted packets type, a queue occupancy type, and an interface type. The network performance parameter corresponds to the type of network performance parameter and may include any one of the following items: a time when the second network node transmits the second packet, and a number of service packets received by the second network node before transmitting the second packet (the service packet and the second packet belong to the same data flow, in other words, both packets are transmitted using the same segment list or the same packet forwarding path), a queue occupancy rate of a packet transmission queue of the second network node (the packet transmission queue may be a queue that stores the second packet), and a communication interface used by the second network node to transmit the second packet (the communication interface may include a transmission interface for transmitting the second packet or a reception interface for receiving the second packet).
[0157] In the following, a related embodiment in which the second network node adds a network performance parameter to the second packet will be described. If the second network node supports SRv6 functionality, for example, if the second network node on the SRv6 network supports SRv6 functionality, the second network node may add a network performance parameter of the second network node corresponding to the type of the network performance parameter to the second packet. Specifically, the network performance parameter may be added to the segment identifier of the second network node in the second packet. For example, the network performance parameter is added to the function field of the segment identifier of the second network node, or added to the entire segment identifier of the second network node. If necessary, the network performance parameter may also be added to the segment identifier of a third network node in the second packet, where the third network node is the closest next hop node to the second network node on the packet forwarding path, in other words, the third network node is the next hop node of the second network node on the packet forwarding path. If necessary, the network performance parameter may further be added to another field in the second packet, for example, a TLV field. This is not limited in this embodiment of the present application.
[0158] For example, the second network node is the network node 102 in Figure 4A, and the network node 102 supports SRv6 functionality. In this case, after receiving the second packet carrying the value of the flag field, the second network node may obtain the network performance parameter of the second network node corresponding to the type of the network performance parameter indicated by the value of the flag field, and then add the network performance parameter of the second network node to the function field of the segment identifier of the second network node, and send the second packet with the network performance parameter added to the network node 103.
[0159] If the second network node does not support the SRv6 function, for example, if the second network node on the IPv6 network does not support the SRv6 function, the existing processing procedure of the second network node based on the IPv6 network is modified so that the second network node may detect the value of the first field (the value of the flag field), determine the type of the network performance parameter appropriately indicated by the value, and add the network performance parameter of the second network node corresponding to the type of the network performance parameter to the second packet. Specifically, the second network node may add the network performance parameter to another field in the second packet. The other field is a field other than the segment identifier of the second network node, for example, a TLV field.
[0160] It is used as an example that the second network node is the network node 109 in FIG. 4B. The network node 109 does not support SRv6 function. After receiving the second packet carrying the value of the flag field, the second network node may obtain the network performance parameter of the second network node corresponding to the type according to the type of the network performance parameter indicated by the value of the flag field, and then add the network performance parameter to the TLV field in the second packet, and send the second packet with the network performance parameter added to the network node 106, so that the network node 106 can perform the corresponding network performance calculation. For example, when the type of the network performance parameter is a time type, the network performance parameter may be a first time point when the network node 109 sends the second packet. Correspondingly, after receiving the second packet, the network node 106 may calculate the difference between the second time point and the first time point based on the second time point when the second packet is received, and use the difference as the second packet transmission delay between the network node 109 and the network node 106.
[0161] By implementing the embodiments of the present application, the problem in the prior art that the programmability of a network node is low due to the inability to explicitly notify the format of the segment identifier of the network node can be solved, thereby improving the programmability of the network node.
[0162] In the following, two specific examples are used to describe the relevant embodiments of the present application in detail.
[0163] Example 1: Network Slicing Scenario
[0164] 6A and 6B are schematic flow charts of another packet transmission method according to an embodiment of the present invention, which include the following execution steps:
[0165] Step S600: The network node 101 obtains a format of a segment identifier of at least one network node on the network. The format of the network node segment identifier is used to indicate information such as the position, length, and value of each field included in the network node segment identifier. The format of the network node segment identifier indicates a locator field, a function field, and a network slice field included in the network node segment identifier.
[0166] In the network framework shown in FIG. 4A or FIG. 4B, each of the network nodes supporting SRv6 functionality on the network may notify another network node on the network of the format of the segment identifier of the network node. Correspondingly, each network node may receive the format of the segment identifier of the other node notified by another node on the network. For example, as shown in FIG. 4A or FIG. 4B, the network node 101 may receive the format of each segment identifier of the network nodes 102 to 106. In the same network slicing scenario, each network node has the same segment identifier format, and the segment identifier format indicates the locator field, the function field, and the network slice field included in the segment identifier of the network node. If necessary, the segment identifier format of the network node may further indicate a value (sliceID) supported by the network slice field. Specifically, if the sliceID is 0, this may indicate an initial setting value, which may be referred to as a default value. If the sliceID is not 0, this indicates a network slice identifier supported by the network node. Correspondingly, in the actual communication process of the network node, the network node may select one network slice identifier from one or more supported network slice identifiers, and communicate using the network slice corresponding to the network slice identifier.
[0167] If desired, each network node on the network may support one or more sliceIDs, which may be the same or different, but this is not a limitation of this embodiment of the present application.
[0168] Step S601: The network node 101 obtains a segment identifier of at least one network node on the network. The segment identifier of the network node includes a value of a network slice field.
[0169] It will be understood that a network node supporting SRv6 functionality on a network may transmit the format of the network node's segment identifier to another node on the network, and inform the other node of information such as the location and length of each field in the network node's segment identifier. Besides, a network node supporting SRv6 functionality on a network may further transmit the segment identifiers supported by the network node to another node on the network. In this case, the segment identifier of the network node carries the value of each field to indicate / inform the corresponding information. For example, the value of the locator field is used to indicate the next hop routing address of the packet. In case there are multiple values of a field in the segment identifier, multiple segment identifiers of the network node may be used to publish multiple values supported by the field.
[0170] For example, if the network node 102 supports multiple values of the network slice field, the network node 102 may transmit multiple segment identifiers of the network node 102 to the network node 101, where one segment identifier includes one value of the network slice field. In this way, multiple values of the network slice field may be signaled to the network node 101.
[0171] For a detailed description of steps S600 and S601, please refer to the related description of steps S500 and S501, and the details will not be described again here.
[0172] Step S602: The network node 101 determines the value of the network slice field (sliceID) in the segment identifier of the network node included in the segment list of the packet according to the segment routing policy, and adds the determined sliceID to the packet. This packet includes an IPv6 packet header, an SRH, and a payload. FIG. 7A shows a schematic table of the packet format, for example, in which the IPv6 packet header indicates only the destination address (DA), and the SRH indicates only the segment list. The network node 101 replaces the destination address of the packet with SID2, and transmits the packet to the network node 102.
[0173] Specifically, the network node 101 may determine a segment list of a packet according to a segment routing policy, and add the determined segment list to the packet to be forwarded. Here, the packet is specifically a data packet. The segment list is used to indicate a forwarding path of the packet, and specifically includes a segment identifier SID of a network node on the packet forwarding path. The SID includes a sliceID determined according to the segment routing policy. For details on how to determine the segment list of a packet and the value of the network slice field of the network node in the segment list according to the segment routing policy, please refer to the relevant description of step S502 in FIG. 5. The details will not be described again here.
[0174] In one example, the network node 101 receives a format of the segment identifier of the network node. The format does not indicate a value of the network slice field in the segment identifier of the network node, or the format indicates that the value of the network slice field in the segment identifier of the network node is a specific value. Furthermore, the network node 101 receives the segment identifier of the network node. The value of the network slice field included in the segment identifier of the network node is also a specific value, and this specific value may specifically be an initial setting value (e.g., 0) defined in the system, or may be a value of the network slice field different from the initial setting value (e.g., network slice identifier 1). In this case, the network node 101 may determine the segment identifier SID of the network node included in the segment list of the packet according to the segment routing policy. The segment list includes the segment identifiers of all network nodes on the packet forwarding path. Then, the network node 101 may further determine a sliceID in the segment identifier of the network node in the segment list according to the segment routing policy, modify the value of the network slice field in the segment identifier SID of the network node based on the determined sliceID, and add the determined sliceID to the network slice field of the SID, in other words, add the determined sliceID to the packet to be forwarded. The packet in this embodiment of the present application may specifically be a data packet. For details about the method of determining the value of the network slice field in the segment identifier of the network node in the segment list according to the segment routing policy, please refer to the relevant description of step S502 in FIG. 5. The details will not be described again here.
[0175] In one example, the network node 101 receives a format of the segment identifier of the network node. The format indicates multiple values supported by the network slice field in the segment identifier of the network node. Optionally, in this case, no limitation is imposed on the segment identifier of the network node. For example, the value of the network slice field included in the segment identifier of the network node and notified by the network node to the network node 101 may be a default value or a specific value different from the default value. Alternatively, if there are multiple values of the network slice field supported by the network node, the network node may notify the network node 101 of multiple segment identifiers of the network node. Each network node's segment identifier includes one value of the network slice field, in other words, multiple values of the network slice field are notified. In this case, the network node 101 may select a slice ID of a network node that conforms to the segment routing policy and is on a packet forwarding path from the multiple values (slice ID) of the network slice field of the network node according to the segment routing policy, add the selected slice ID to the network slice field of the segment identifier of the network node in the segment list, and add the selected slice ID to the packet.
[0176] In one example, the network node 101 receives multiple segment identifiers of the network node. One segment identifier of the network node includes one value (sliceID) of the network slice field, in other words, the network node 101 receives multiple values of the network slice field supported by the network node. If necessary, in this case, the format of the segment identifier of the network node is not limited. For example, the format of the segment identifier of the network node notified to the network node 101 by the network node may not indicate a value of the network slice field in the segment identifier of the network node, but may indicate one or more values supported by the network slice field and in the segment identifier of the network node. In this case, the network node 101 may select a SID of a network node (i.e., a sliceID of the network node) that conforms to the segment routing policy and is on the packet forwarding path from the multiple SIDs (i.e., multiple sliceIDs) of each network node according to the segment routing policy, build a segment list of the packet based on the selected SID of the network node, and add the segment list to the packet to guide the packet forwarding.
[0177] In this example, the segment list is:<SID6、SID3、SID2> Alternatively, the segment list may further include a segment identifier of the network node 101, specifically<SID6、SID3、SID2、SID1> As shown in Figure 7A, the sliceIDs in the SID of each network node and determined by the network node 101 according to the segment routing policy are sliceID6, sliceID3, sliceID2, and sliceID1. Any two of these sliceIDs may be the same or different, which is not limited in this embodiment of the present application. In practical application, each network node in the segment list of the same service scenario usually has the same sliceID in the segment identifier.
[0178] Correspondingly, the network node 101 may process the packet based on the segment list of the packet after adding the determined sliceID to the packet. Specifically, if the segment list included in the SRH is:<SID6、SID3、SID2、SID1> If so, the network node 101 may modify the destination address of the packet to SID2, and further forward the packet to the second network node based on the network service provided in the network slice corresponding to sliceID1 of SID1. The network service includes, but is not limited to, a transmission bandwidth, a transmission speed, a network throughput rate, and a network throughput, etc. For example, as shown in FIG. 7A, the segment list includes a segment identifier SID1 of the network node 101. After modifying the destination address of the packet to SID2, the network node 101 may forward the packet to the network node 102 based on the network service provided in the corresponding sliceID1 of SID1.
[0179] The list of segments included in SRH is<SID6、SID3、SID2> If so, the network node 101 may modify the destination address of the packet to SID2, and may further forward the packet to the second network node in a default manner, for example, may forward the packet using a default network slice. For example, as shown in FIG. 7B, the segment list does not include the network node SID1 of the network node 101. After the network node 101 modifies the destination address of the packet to SID2, the segment list of the packet does not include the SID1 of the network node 101 (in other words, there is no network service indicated by the network slice identifier sliceID1 of SID1), so the network node 101 may forward the packet to the network node 102 using the network service provided by the default network slice. S603: When the network node 102 receives the packet and determines that the value of the destination address field of the packet matches the segment identifier of the network node 102, the network node 102 obtains SID3 from the segment list of the packet and replaces the destination address of the packet with SID3. The network node 102 transmits the packet to the network node 103 based on the network slice corresponding to sliceID2 of SID2. Specifically, the network node 102 may transmit the packet to the network node 103 based on the network service (e.g., an index service such as a transmission rate or a transmission bandwidth) provided in the network slice.
[0180] The network node 102 may determine whether the value of the destination address field of the packet is the same as the segment identifier value of the network node 102. If the value of the destination address field of the packet is the same as the segment identifier value of the network node 102, the network node 102 may determine that the value of the destination address field of the packet matches the segment identifier of the network node 102. If the value of the destination address field of the packet is not the same as the segment identifier value of the network node 102, the network node 102 may determine that the value of the destination address field of the packet does not match the segment identifier of the network node 102.
[0181] S604: The network node 103 receives the packet. When the network node 103 determines that the value of the destination address field of the packet matches the segment identifier of the network node 103, the network node 103 obtains SID6 from the segment list of the packet and replaces the destination address of the packet with SID6. The network node 103 transmits the packet to the network node 106 based on the network slice corresponding to sliceID3 of SID3. Specifically, the network node 103 may transmit the packet to the network node 106 based on the network service (e.g., an index service such as a transmission speed or a transmission bandwidth) provided by the network slice corresponding to sliceID3.
[0182] In one example, in the network framework shown in FIG. 4B, the network node 109 that does not support SRv6 function still exists between the network node 103 and the network node 106. In the actual communication process, the network node 103 may first send the packet to the network node 109 based on the network slice corresponding to sliceID3 of SID3 after replacing the destination address of the packet with SID6. Since the network node 109 does not support SRv6 function, as shown in FIG. 7C, after receiving the packet, the network node 109 may forward the packet to the network node 106 based on the destination address SID6 (IPv6 address of the network node 106) of the packet. How the network node 109 sends the packet to the network node 106 is not limited in this embodiment of the present application. For example, the network node 109 forwards the packet to the network node 106 using a network service such as a transmission rate or a transmission bandwidth provided in a default network slice.
[0183] S605: When the network node 106 receives a packet and determines that the value of the destination address field of the packet matches SID6, it processes the packet based on the network slice corresponding to sliceID6 of SID6.
[0184] Specifically, after receiving the packet, the network node 106 may process the packet based on a network service provided by a network slice corresponding to sliceID6 included in the segment identifier SID6 of the network node 106, for example, forwarding the packet or storing the packet, which is not limited in this embodiment of the present application.
[0185] By implementing the above embodiment, the network node's segment identifier is explicitly signaled using the network node's segment identifier format, so that the network node can modify the values of relevant fields in the network node's segment identifier based on actual service requirements and carry corresponding information, thereby improving the programmability of the network node.
[0186] Embodiment 2: Network performance measurement scenario
[0187] 8A and 8B are schematic flow charts of another packet processing method according to an embodiment of the present invention. The method shown in FIG. 8A and 8B includes the following execution steps:
[0188] S800: The network node 101 obtains a format of a segment identifier of at least one network node on the network. The format of the network node segment identifier indicates a locator field, a function field, and a flag field included in the network node segment identifier.
[0189] In this embodiment of the present application, the format of the segment identifier of the network node is used to indicate the information contained in the segment identifier of the network node, such as the position, length, and value of each field. The formats of the segment identifiers of different network nodes may be the same or different. In practical applications, in the same service scenario, for example, in a network performance measurement scenario, the formats of the segment identifiers of all network nodes on the network are generally the same, indicating the locator field, function field, and flag field contained in the segment identifier of the network node.
[0190] If necessary, the format of the segment identifier of the network node further indicates the value of each field, for example, the value of the flag field. Here, the value of the flag field is used to indicate the type of the network performance parameter. Specifically, when the flag is 0, this indicates that the flag is the initial setting value (or may be called the default value), and indicates that there is no need to measure the network performance. When the flag is not 0, this indicates the type of the network performance parameter. There are multiple values of the flag field to identify different types of network performance parameters. For example, in the above embodiment, when the flag is 1, this indicates that the type of the network performance parameter is a time type, and the network node may be indicated to add a time point of sending the packet to the packet, so that the calculation of the packet transmission delay is facilitated.
[0191] Step S801: The network node 101 obtains a segment identifier of at least one network node on the network. The segment identifier of the network node includes values of each field, for example, a value of a locator field, a value of a first field, and a value of a function field.
[0192] A network node on a network that supports SRv6 functionality may also transmit segment identifiers supported by the network node to other nodes on the network. The segment identifier of the network node includes a value for each field and is used to indicate or signal the corresponding information. For example, the value of the locator field may be used to indicate the next hop routing address of the packet, and the value of the function field may be used to instruct the network node to perform a function corresponding to the value. If a field within a segment identifier has multiple values, the multiple values supported for that field may be published using multiple segment identifiers of the network node, where each network node's segment identifier includes one value for the field.
[0193] In practical applications, for example, the first field has multiple values. In a network performance measurement scenario, the multiple values supported by the first field are usually published in the format of the segment identifier of the network node. In order to save traffic, when the segment identifier of the network node is notified, the segment identifier of the network node carrying the value of the first field having a specific value is usually notified. If necessary, the network node may further notify the value of the first field in the segment identifier of the network node, etc. This is not limited in this embodiment of the present application.
[0194] For a detailed description of steps S800 and S801, please refer to the related description of steps S500 and S501, and the details will not be described again here.
[0195] Step S802: The network node 101 determines the value of a flag field in the segment identifier of the network node included in the segment list of the packet according to the segment routing policy, and adds the value of the flag field to the packet. The packet includes an IPv6 packet header, an SRH, and a payload. FIG. 9A shows a schematic table of the packet format, for example, in which the IPv6 packet header indicates only a destination address (DA), and the SRH indicates only a segment list. The network node 101 replaces the destination address of the packet with SID2, adds network performance parameters (NPP) of the network node 101 to the packet, and transmits the packet to the network node 102.
[0196] Specifically, a segment routing policy is generated in advance by an ingress node (network node 101) or a controller, and is used to indicate the configuration and routing of a packet. After obtaining the segment routing policy, the network node 101 may determine a segment identifier SID of a network node included in a segment list of a packet according to the segment routing policy. The SID includes a value of a flag field (flag) determined according to the segment routing policy, and adds the determined value of the flag field to the packet. For details on how to determine a segment list of a packet and a value of a flag field of a network node in a segment list according to a segment routing policy, please refer to the related description of step S502 in FIG. 5. The details will not be described again here.
[0197] In one example, the network node 101 receives a format of a network node segment identifier. The format does not indicate a value of a flag field in the network node segment identifier or indicates that the value of the flag field is a specific value. Furthermore, the network node 101 receives a network node segment identifier, and the value of the flag field included in the segment identifier is a specific value. The specific value may specifically be a default value set by the system in a self-defined manner or a single value of the flag field different from the default value. For example, the format of the network node segment identifier does not indicate a value of the flag field or indicates that the value of the flag field is a default value. In this case, the value of the flag field included in the network node segment identifier may be a default value or a specific value other than the default value (e.g., 1). Alternatively, the format of the network node segment identifier indicates that the value of the flag field is a specific value other than the default value. In this case, the value of the flag field included in the network node segment identifier may be a default value or a specific value other than the default value.
[0198] In this case, the network node 101 may determine the segment identifier SID of the network node included in the segment list of the packet according to the segment routing policy. In this case, the flag value included in the segment identifier SID of the network node is a specific value. Besides, the network node 101 may further determine a flag value in the segment identifier of the network node in the segment list according to the segment routing policy, modify the flag value (specific value) included in the segment identifier SID of the network node based on the determined flag value, and add the determined flag value to the flag field included in the segment identifier SID of the network node to obtain the packet to be forwarded.
[0199] In one example, the network node 101 receives a format of the network node's segment identifier, and the format of the network node's segment identifier indicates multiple values supported by the flag field in the network node's segment identifier. Optionally, in this case, the network node's segment identifier is not limited. For example, the value of the network slice included in the network node's segment identifier notified to the network node 101 by the network node may be a default value, and may not be a specific value (only one value) different from the default value. Alternatively, if the network node supports multiple values of the flag field, the network node may notify the network node 101 of multiple segment identifiers of the network node, each of which includes one value of the flag field, in other words, notifying multiple values of the flag field supported by the network node. In this case, the network node 101 may select a flag value that conforms to the segment routing policy from the multiple values (flag values) of the network node's flag field according to the segment routing policy, and add the selected flag value to the flag field included in the network node's segment identifier SID, in other words, add the selected flag value to the packet to be forwarded.
[0200] In one example, the network node 101 receives a plurality of segment identifiers of the network node, and each of the segment identifiers of the network node includes one value of the flag field. Optionally, in this case, the format of the segment identifier of the network node is not limited. For example, when the network node informs the network node 101 of the format of the segment identifier of the network node, the format may not indicate the value of the flag field in the segment identifier of the network node, but may indicate one or more values supported by the flag field and in the segment identifier of the network node, for example, the default value 0 or one or more values of the flag field different from the default value (for example, 1, 2). In this case, the network node 101 may select, according to the segment routing policy, from the plurality of SIDs of each network node (in other words, the flag value in the SID), the SID of the network node that is on the packet forwarding path and conforms to the segment routing policy, build a segment list of the packet based on the SID of the selected network node, and add the segment list to the packet to guide the packet forwarding. In this example, the segment list is<SID6、SID3、SID2> Alternatively, the segment list may further include a segment identifier of the network node 101, specifically<SID6、SID3、SID2、SID1> As shown in FIG. 9A, the flag values in the SID of each network node determined by the network node 101 according to the segment routing policy are flag6, flag3, flag2, and flag1, respectively. Any two of these flag values may be the same or different. This is not limited in this embodiment of the present application. In practical applications, in the same network performance measurement scenario, flag1 to flag6 are generally the same. For example, when flag is all 1, this indicates that the type of network performance parameter is the type of time, and is used to calculate the delay of packet transmission.
[0201] In response to this, the network node 101 may process the packet based on the segment list of the packet after adding the determined flag value to the packet.<SID6、SID3、SID2、SID1> If so, the network node 101 may obtain flag1 in SID1, and further obtain a network performance parameter of the network node 101 corresponding to the type of the network performance parameter indicated by flag1. Furthermore, the network node 101 may obtain SID2 (a segment identifier of the next hop node of the network node 101) from the segment list, and modify the destination address of the packet to SID2. If necessary, the network performance parameter of the network node 101 may further be added to the packet. For example, the network performance parameter may be added to a function field of SID1 in the segment list of the packet, or may be added to another field of the packet, for example, a TLV field. For example, the network performance parameter NPP1 of the network node 101 is stored in a function field of SID1, as shown in FIG. 9A.
[0202] The list of segments included in SRH is<SID6、SID3、SID2> If so, the network node 101 may obtain flag2 in SID2, and further obtain the network performance parameter of the network node 101 corresponding to the type of the network performance parameter indicated by flag2. Furthermore, the network node 101 may modify the destination address of the packet to SID2, and add the network performance parameter of the network node 101 to the packet. For example, the network performance parameter may be added to a function field of SID2 in the segment list of the packet, or may be added to another field of the packet, for example, a TLV field. For example, the network performance parameter NPP1 of the network node 101 is stored in a function field of SID2, as shown in FIG. 9B.
[0203] S803: If network node 102 receives a packet and determines that the value of the destination address field of the packet matches the segment identifier of network node 102, network node 102 obtains SID3 from the segment list of the packet and replaces the destination address of the packet with SID3. Network performance parameters of network node 102 are added to the packet, and the packet with the added network performance parameters of network node 102 is sent to network node 103.
[0204] In one example, the segment list included in the SRH is<SID6、SID3、SID2、SID1> In this case, after receiving the packet, if the network node 102 determines that the value of the destination address field of the packet matches the segment identifier (SID2) published by the network node 102, it may analyze the value of flag2, which is the value of the flag field of SID2, to determine the type of network performance parameter indicated by flag2. Then, the network node 102 may obtain the network performance parameter of the corresponding network node 102 based on the type of the network performance parameter. If necessary, the network node 102 may further perform a corresponding operation based on the indication of another field of SID2, for example, a corresponding function operation (e.g., store the packet) based on the function field of SID2, which is not limited in this embodiment of the present application. Furthermore, the network node 102 may obtain SID3 from the segment list of the packet, modify the destination address of the packet to SID3, and add the network performance parameter NPP2 of the network node 102 to the packet. Specifically, the network performance parameter NPP2 of the network node 102 may be added to SID2 in the segment list (e.g., added to the capability field of SID2) or may be added to another field of the packet (e.g., the TLV field). As shown in Figure 9A, NPP2 is added to the capability field of SID2.
[0205] In one example, the segment list included in the SRH is<SID6、SID3、SID2> Similarly, if the network node 102 determines that the value of the destination address field of the packet matches the segment identifier (SID2) published by the network node 102 after receiving the packet, the network node 102 may obtain SID3 from the segment list of the packet. Furthermore, the network node 102 may obtain the type of network performance parameter indicated by flag3 of SID3, and obtain the network performance parameter NPP2 of the network node 102 based on the type of network performance parameter. NPP2 is a network performance parameter corresponding to the type of network performance parameter indicated by flag3 of SID3. Then, the network node 102 may modify the destination address of the packet to SID3, and add the network performance parameter NPP2 of the network node 102 to the packet. Specifically, the network performance parameter NPP2 may be added to SID3 (the capability field of SID3) of the segment list, or another field of the packet (e.g., the TLV field, etc.). As shown in FIG. 9B, NPP2 is added to the capability field of SID3.
[0206] S804: If network node 103 receives a packet and determines that the value of the destination address field of the packet matches the segment identifier of network node 103, network node 103 obtains SID6 from the segment list of the packet and replaces the destination address of the packet with SID6. Network performance parameters of network node 103 are added to the packet, and the packet with the added network performance parameters of network node 103 is sent to network node 106.
[0207] In one example, the segment list included in the SRH is<SID6、SID3、SID2、SID1> If so, the network node 103 may add the network performance parameter NPP3 of the network node 103 to the packet, for example, by adding the network performance parameter NPP3 to SID3 in the segment list of the packet, or by adding the network performance parameter NPP3 to another field of the packet (such as a TLV field). NPP3 is a network performance parameter corresponding to the type of network performance parameter indicated by flag3 of SID3. As shown in Figure 9A, NPP3 is added to the capability field of SID3.
[0208] In one example, the segment list included in the SRH is<SID6、SID3、SID2> If so, the network node 103 may add the network performance parameter NPP3 of the network node 103 to the packet, for example, may add the network performance parameter NPP3 to SID6 of the segment list of the packet, or may add the network performance parameter NPP3 to another field (such as a TLV field) of the packet. NPP3 is specifically a network performance parameter corresponding to the type of network performance parameter indicated by flag6 of SID6. As shown in FIG. 9B, NPP3 is added to the function field of SID6. For contents not shown or described in this example, please refer to the related description of S803. Details will not be described again here.
[0209] In a specific implementation, in the network framework shown in FIG. 4B, the network node 109 that does not support SRv6 function still exists between the network node 103 and the network node 106. In the actual communication process, the network node 103 may add the network performance parameters of the network node 103 to the packet after replacing the destination address of the packet with SID6, and further send the packet with the network performance parameters of the network node 103 added to the network node 109 to the network node 109. The network node 109 does not support SRv6 function, in other words, the network node 109 does not have the segment identifier of the network node 109. After receiving the packet, the network node 109 may modify the existing node processing procedure based on the IPv6 network. After the network node 109 finds the next hop node (i.e., the network node 106) based on the destination address of the packet, the network node 109 may inquire into the flag value carried in the packet (in actual service communication, since flag1 to flag6 are the same, the flag value inquired here may specifically be any one or more of flag1 to flag6), and add the network performance parameter NPP9 of the network node 109 to another field of the packet, for example, a TLV field. Specifically, as shown in FIG. 9C, the network performance parameter NPP9 of the network node 109 is added to the TLV field of the packet. The network performance parameter of the network node 109 is a network performance parameter corresponding to the type of the network performance parameter indicated by the flag value.
[0210] If necessary, the network node 109 may obtain network performance parameters of each network node by analyzing the packets after receiving the packets sent by the network node 103. Correspondingly, the network node 109 may perform corresponding network performance calculations based on the network performance parameters of each network node.
[0211] Step S805: If the network node 106 receives the packet and determines that the value of the destination address field of the packet matches the segment identifier of the network node 106, calculates network performance based on the network performance parameters of the packet.
[0212] Specifically, when the segment list includes the segment identifier of the ingress node, for example, the segment list is<SID6、SID3、SID2、SID1> 9A, the network performance parameters of each network node are stored in the segment identifier of the network node. For example, the network performance parameter NPP1 of the network node 101 is stored in the SID1 of the network node 101. If the segment list does not include the segment identifier of the ingress node, for example, if the segment list is<SID6、SID3、SID2> 9B, the network performance parameters of each network node are stored in the segment identifier of the next-hop segment node corresponding to the network node. For example, the network performance parameter NPP1 of the network node 101 is stored in the SID2 of the network node 102. After the network node 106 receives the packet, since the network node 106 is the last segment node indicated in the segment list, it is not necessary to include the network performance parameters of the network node 106 in the segment list, and it is only necessary to calculate the network performance based on the network performance parameters of each network node in the segment list. If necessary, the flag values of the SIDs in the segment list are the same. After the network node 106 receives the packet, it may calculate the network performance of the type of network performance parameter indicated by the flag value based on the flag value of the destination address field of the packet. For example, when the flag value of the destination address field of the packet is 1, in other words, when each SID in the segment list records the network performance parameter related to the packet transmission time, the network node 106 calculates the network performance related to the packet forwarding delay.
[0213] By implementing the embodiments of the present application, the problem in the prior art that the programmability of a network node is low due to the inability to explicitly notify the format of the segment identifier of the network node can be solved, thereby improving the programmability of the network node.
[0214] In conjunction with the above-mentioned related embodiments shown in Figures 1 to 9C, the following describes related apparatuses, devices, and systems in the embodiments of the present application. Figure 10 shows a packet processing system according to one embodiment of the present application. The system 100 may include a first network device 102 and a second network device 104. The first network device 102 includes a communication module 1021 and a processing module 1022. The second network device 104 includes a communication module 1041 and a processing module 1042.
[0215] The processing module 1022 is configured to control and manage the operation of the first network device 102. For example, the processing module 1022 may be configured to perform step S502 of FIG. 5, step S600, step S601, and step S602 of FIG. 6A, step S800, step S801, and step S802 of FIG. 8A, and / or other steps used to perform the techniques described herein. The communication module 1021 is configured to support the first network device 102 in communicating with another device or module. For example, the communication module 1021 is configured to support the first network device 102 in performing step S503 of FIG. 5 and / or other steps used to perform the techniques described herein.
[0216] The processing module 1042 is configured to control and manage the operation of the second network device 104. For example, the processing module 1042 may be configured to perform step S504 of FIG. 5, any of steps S603-S605 of FIG. 6A and FIG. 6B, any of steps S803-S805 of FIG. 8B, and / or other steps used to perform the techniques described herein. The communication module 1041 is configured to support the second network device 104 in communicating with another device or module. For example, the communication module 102 is configured to support the second network device 104 in performing steps S500 and S501 of FIG. 5, and / or other steps used to perform the techniques described herein.
[0217] Optionally, the first network device 102 may further include a storage module 1023. The storage module 1023 is configured to store program codes and data of the first network device 102. Correspondingly, the processing module 1022 may call the program codes included in the storage module 1023 to perform some or all of the execution steps described in any one of the method embodiments of Figures 5, 6A and 6B, or 8A and 8B, and executed by the first network node. The second network device 104 may further include a storage module 1043. The storage module 1043 is configured to store program codes and data of the second network device 104. Correspondingly, the processing module 1042 may call the program codes included in the storage module 1043 to perform some or all of the execution steps described in any one of the method embodiments of Figures 5, 6A and 6B, or 8A and 8B, and executed by the second network node (or any network node other than the first network node).
[0218] The processing module (specifically, the processing module 1022 or 1042) may be a processor or controller, such as a Central Processing Unit (CPU), a general-purpose processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The processor may implement or execute various exemplary logic blocks, modules, and circuits described with reference to the contents disclosed herein. The processor may be a combination of multiple processors that implement computing functions, such as a combination of one or more microprocessors, or a combination of a DSP and a microprocessor. The communication module (specifically, the communication module 1021 or 1041) may be a communication interface, a transceiver, or a transceiver circuit, etc. The communication interface is a general term and may include one or more interfaces, such as an interface between a communication module and a processing module, or an interface between a computing device and another device. The storage module (specifically, storage module 1023 or 1043) may be a memory or another service or module configured to provide storage functionality.
[0219] When the processing module is a processor, the communication module is a communication interface, and the storage module is a memory, the packet processing system in this embodiment of the present application may be the packet processing system shown in FIG.
[0220] Referring to FIG. 11, the packet processing system 110 includes a first network device 112 and a second network device 114. The first network device 112 includes a communication interface 1121, a processor 1122, and a memory 1123. If necessary, the first network device 112 may further include a bus 1124. The communication interface 1121, the processor 1122, and the memory 1123 may be connected to each other using the bus 1124. The bus 1124 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 1124 may be classified into an address bus, a data bus, a control bus, and the like. For ease of explanation, only one thick line is used to represent the bus in FIG. 11, but this does not mean that there is only one bus or only one type of bus.
[0221] Similarly, the second network device 114 includes a communication interface 1141, a processor 1142, and a memory 1143. If necessary, the second network device 114 may further include a bus 1144. The communication interface 1141, the processor 1142, and the memory 1143 may be connected to each other using the bus 1144. For the bus 1144, please refer to the related description above.
[0222] The processor (specifically, the processor 1122 or 1142) may include one or more general-purpose processors, for example, a central processing unit (CPU). The processor may be configured to execute a program related to the processing function of the associated program code. In other words, the processor may implement the function of the processing module by executing the program code. For details about the processing module, please refer to the related description of the above embodiment. Specifically, the processor 1122 may be configured to execute the associated program code included in the memory 1123 to implement the function of the processing module 1022, or to implement step S502 of FIG. 5, steps S601 and S602 of FIG. 6A, and steps S801 and S802 of FIG. 8A, and / or to perform other steps of the technology described herein.
[0223] The processor 1142 may be configured to execute associated program code contained in the memory 1143 to implement the functionality of the processing module 1042, or to implement step S504 of FIG. 5, any of steps S603-S605 of FIGS. 6A and 6B, or any of steps S803-S805 of FIG. 8B, and / or to perform other steps of the techniques described herein.
[0224] The communication interface (specifically, may be communication interface 1121 or 1141) may be a wired interface (e.g., an Ethernet interface) or a wireless interface (e.g., a cellular network interface or a wireless local area network interface) and is configured to communicate with another module or device. For example, the communication interface 1121 in this embodiment of the present application may be specifically configured to receive packets transmitted by the second network device or transmit packets to the second network device.
[0225] The memory (specifically, may be memory 1123 or 1143) may include a volatile memory, for example, a random access memory (RAM). The memory may also include a non-volatile memory, for example, a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). The memory 1003 may further include a combination of the above types of memory. The memory may be configured to store a set of program codes, so that the processor calls the program codes stored in the memory to realize the functions of the communication module and / or the processing module included in the embodiment of the present application. This is not limited in the embodiment of the present application.
[0226] Please note that Fig. 10 or Fig. 11 is merely a possible implementation form of this embodiment of the present application. In actual application, the packet processing system may further include more or less components, which is not limited in this specification. For contents not shown or described in this embodiment of the present application, please refer to the related description in the embodiment of Fig. 5, Fig. 6A and Fig. 6B, or Fig. 8A and Fig. 8B. Details will not be described again here.
[0227] An embodiment of the present invention further provides a computer non-transitory storage medium having instructions stored thereon that, when executed on a processor, perform steps of any of the methods described in Figures 5, 6A and 6B, or 8A and 8B.
[0228] An embodiment of the present invention further provides a computer program product which, when executed on a processor, performs steps of any of the methods described in Figures 5, 6A and 6B, or 8A and 8B.
[0229] The method or algorithm steps described in combination with the contents disclosed in this embodiment of the present invention may be implemented in hardware or may be implemented by a processor executing software instructions. The software instructions may include corresponding software modules. The software modules may be stored in a Random Access Memory (RAM), a flash memory, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a register, a hard disk, a portable hard disk, a Compact Disc Read Only Memory (CD-ROM), or any other form of storage medium well known in the art. For example, the storage medium is coupled to the processor, so that the processor can read information from the storage medium or write information to the storage medium. Of course, the storage medium may be a component of the processor. The processor and the storage medium may be located in an ASIC. Furthermore, the ASIC may be located on a computing device. Of course, the processor and the storage medium may exist in a computing device as separate components.
[0230] Those skilled in the art will understand that all or part of the processes and methods included in these embodiments may be realized in a computer program that instructs relevant hardware. The program may be stored in a computer-readable storage medium. When the program is executed, the processes of the methods included in these embodiments are performed. The aforementioned storage medium includes any medium (such as a ROM, a RAM, a magnetic disk, or an optical disk) that can store program code. [Other possible items] (Item 1) 1. A packet processing method, comprising: receiving, at a first network node, a first packet transmitted by a second network node, the first packet including a format of a segment identifier of the second network node, the format of the segment identifier of the second network node being used to indicate a length and position of each field within the segment identifier of the second network node; obtaining, by the first network node, the format of the segment identifier of the second network node based on the first packet, the segment identifier of the second network node including a first field; determining, by the first network node, a value of the first field in the segment identifier of the second network node based on a segment routing policy and the format of the segment identifier of the second network node, and adding the determined value of the first field to a second packet sent to the second network node, where the determined value of the first field is used to instruct the second network node to process the second packet; A method for providing the above. (Item 2) The step of the first network node determining a value of the first field in the segment identifier of the second network node in accordance with a segment routing policy, if the value of the first field included in the segment identifier of the second network node is a specific value, the first network node modifies the value of the first field according to the segment routing policy and uses the modified value as the determined value of the first field; or if the segment identifier of the second network node includes the value of the first field and there are multiple values of the first field, the first network node selects a value that conforms to the segment routing policy from the multiple values of the first field in accordance with the segment routing policy, and uses the value as the determined value of the first field. 2. The method according to item 1, comprising the steps of: (Item 3) 3. The method according to claim 1 or 2, wherein the first field is a flag field, the determined value of the first field is a determined value of the flag field, the determined value of the flag field is used to indicate a type of a network performance parameter, and the determined value of the flag field is further used to instruct the second network node to add a network performance parameter corresponding to the type of the network performance parameter to the second packet. (Item 4) The method according to item 3, wherein, when the second network node supports segment routing used in Internet Protocol version 6 SRv6, the determined value of the flag field is specifically used to instruct the second network node to add the network performance parameter corresponding to the type of the network performance parameter to the segment identifier of the second network node in the second packet. (Item 5) The method according to item 3, wherein, if the second network node supports Internet Protocol version 6 (IPv6), the determined value of the flag field is specifically used to instruct the second network node to add the network performance parameter corresponding to the type of the network performance parameter to a field in the second packet other than the segment identifier of the second network node. (Item 6) The above network performance parameters are: a time when the second network node transmits the second packet; and a number of service packets received by the second network node before transmitting the second packet, the service packet and the second packet belonging to the same data flow; and a queue length of a packet transmission queue of the second network node, the packet transmission queue being a queue in which the second packet is stored; and a communication interface through which the second network node transmits the second packet; 6. The method according to item 4 or 5, comprising at least one of the following: (Item 7) 3. The method according to claim 1, wherein the first field is a network slice field, the determined value of the first field is a determined value of the network slice field, the determined value of the network slice field is used to indicate a network slice identifier, the determined value of the network slice field is further used to instruct the second network node to process the second packet based on the network slice identifier, and the network slice identifier is used to identify a network slice to be used when transmitting the second packet. (Item 8) When there are a plurality of first fields, one first field of the plurality of first fields is a flag field, and another first field of the plurality of first fields is a network slice field; the determined value of the flags field is used to indicate a type of network performance parameter, and the determined value of the flags field is further used to instruct the second network node to add a network performance parameter corresponding to the type of network performance parameter to the second packet; 3. The method according to claim 1 or 2, wherein the determined value of the network slice field is used to indicate a network slice identifier, the determined value of the network slice field is further used to instruct the second network node to process the second packet based on the network slice identifier, the network slice identifier being used to identify a network slice to be used when transmitting the second packet. (Item 9) 1. A packet processing method, comprising: determining, by a second network node, a format of a segment identifier of the second network node, the format of the segment identifier of the second network node being used to indicate a length and position of each field within the segment identifier of the second network node, the segment identifier of the second network node including a first field; transmitting a first packet by the second network node to the first network node, the first packet including the format of the segment identifier of the second network node, the format of the segment identifier being used by the first network node to determine a value of the first field in the segment identifier of the second network node according to a segment routing policy and add the determined value of the first field to a second packet transmitted to the second network node; A method for providing the above. (Item 10) if the value of the first field included in the segment identifier of the second network node is a specific value, the determined value of the first field is obtained by the first network node modifying the value of the first field in the format of the segment identifier of the second network node according to the segment routing policy; or 10. The method of claim 9, wherein if the format of the segment identifier of the second network node includes the value of the first field and there are multiple values of the first field, the determined value of the first field is a value that complies with the segment routing policy and is selected by the first network node from the multiple values of the first field in accordance with the segment routing policy. (Item 11) 11. The method according to claim 9 or 10, wherein the first field includes a flag field, the determined value of the first field is the determined value of the flag field, the determined value of the flag field is used to indicate a type of a network performance parameter, and the determined value of the flag field is further used to instruct the second network node to add a network performance parameter corresponding to the type of the network performance parameter to the second packet. (Item 12) Item 11. The method according to item 9 or 10, wherein the first field includes a network slice field, the determined value of the first field is the determined value of the network slice field, the determined value of the network slice field is used to indicate a network slice identifier, the determined value of the network slice field is further used to instruct the second network node to process the second packet based on the network slice identifier, and the network slice identifier is used to identify a network slice to be used when transmitting the second packet. (Item 13) When there are a plurality of first fields, one first field of the plurality of first fields is a flag field, and another first field of the plurality of first fields is a network slice field; the determined value of the flags field is used to indicate a type of network performance parameter, and the determined value of the flags field is further used to instruct the second network node to add a network performance parameter corresponding to the type of network performance parameter to the second packet; Item 11. The method according to item 9 or 10, wherein the determined value of the network slice field is used to indicate a network slice identifier, the determined value of the network slice field is further used to instruct the second network node to process the second packet based on the network slice identifier, and the network slice identifier is used to identify a network slice to be used when transmitting the second packet. (Item 14) A packet processing method applied to a packet processing system, the packet processing system comprising a first network node and a second network node, the method comprising: transmitting a first packet by the second network node to the first network node, the first packet including a format of a segment identifier of the second network node, the format of the segment identifier of the second network node being used to indicate a length and position of each field within the segment identifier of the second network node, the segment identifier of the second network node including a network slice field; receiving, by the second network node, a second packet sent by the first network node, the second packet including the segment identifier of the second network node, the segment identifier of the second network node including a value of the network slice field, the value of the network slice field being determined by the first network node according to a segment routing policy; processing the second packet by the second network node based on the value of the network slice field; A method for providing the above. (Item 15) The step of processing the second packet by the second network node based on the value of the network slice field further comprises: 15. The method of claim 14, further comprising the step of the second network node processing the second packet based on a network slice identifier indicated by the value of the network slice field. (Item 16) A packet processing method applied to a packet processing system, the packet processing system comprising a first network node and a second network node, the method comprising: transmitting a first packet by the second network node to the first network node, the first packet including a format of a segment identifier of the second network node, the format of the segment identifier of the second network node being used to indicate a length and position of each field within the segment identifier of the second network node, the segment identifier of the second network node including a flags field; receiving, by the second network node, a second packet sent by the first network node, the second packet including a value of the flags field, the value of the flags field being determined by the first network node according to a segment routing policy, and the value of the flags field being used to indicate a type of network performance parameter; adding, by the second network node, a network performance parameter of the second network node to the second packet, the network performance parameter being a network performance parameter corresponding to a type of the network performance parameter; A method for providing the above. (Item 17) If the second network node supports segment routing used in Internet Protocol version 6 (SRv6), the step of the second network node adding a network performance parameter of the second network node to the second packet includes: 17. A method according to claim 16, comprising the step of the second network node adding the network performance parameters of the second network node to the segment identifier of the second network node in the second packet. (Item 18) If the second network node supports Internet Protocol version 6 (IPv6), the step of the second network node adding a network performance parameter of the second network node to the second packet comprises: 17. A method according to claim 16, comprising the step of the second network node adding the network performance parameters of the second network node to bytes in the second packet other than the segment identifier of the second network node. (Item 19) The above network performance parameters are: a time when the second network node transmits the second packet; and a number of service packets received by the second network node before transmitting the second packet, the service packet and the second packet belonging to the same data flow; and a queue length of a packet transmission queue of the second network node, the packet transmission queue being a queue in which the second packet is stored; and a communication interface through which the second network node transmits the second packet; 19. The method according to any one of items 16 to 18, comprising at least one of the following: (Item 20) A packet processing system comprising a first network node and a second network node, the second network node is configured to transmit a first packet to the first network node, the first packet including a format of a segment identifier of the second network node, the format of the segment identifier of the second network node being used to indicate a length and position of each field within the segment identifier of the second network node; the first network node is configured to receive the first packet and obtain the format of the segment identifier of the second network node based on the first packet, the segment identifier of the second network node including a first field; the first network node is further configured to determine a value of the first field in the segment identifier of the second network node based on the segment routing policy and the format of the segment identifier of the second network node, and add the determined value of the first field to a second packet sent to the second network node. (Item 21) The first network node is specifically configured to: when the value of the first field included in the segment identifier of the second network node is a specific value, modify the value of the first field according to the segment routing policy, and use the modified value as the determined value of the first field; or The system described in item 20, wherein the first network node is specifically configured to, when there are multiple values of the first field included in the format of the segment identifier of the second network node, select a value that conforms to the segment routing policy from the multiple values of the first field in accordance with the segment routing policy, and use the value as the determined value of the first field. (Item 22) the first network node is further configured to transmit the second packet carrying the determined value of the first field to the second network node; 22. The system of claim 20 or 21, wherein the second network node is further configured to receive the second packet and process the second packet based on the determined value of the first field in the second packet. (Item 23) the first field is a flag field, the determined value of the first field is the determined value of the flag field, and the determined value of the flag field is used to indicate a type of a network performance parameter; 23. The system of claim 22, wherein the second network node is specifically configured to add a network performance parameter of the second network node corresponding to a type of the network performance parameter to the second packet. (Item 24) 24. The system of claim 23, wherein, if the second network node supports segment routing utilized in Internet Protocol version 6 SRv6, the second network node is specifically configured to add the network performance parameter of the second network node corresponding to a type of the network performance parameter to the segment identifier of the second network node in the second packet. (Item 25) 24. The system of claim 23, wherein, if the second network node supports Internet Protocol version 6 (IPv6), the second network node is specifically configured to add a network performance parameter of the second network node corresponding to a type of the network performance parameter to a byte in the second packet other than the segment identifier of the second network node. (Item 26) The above network performance parameters are: a time when the second network node transmits the second packet; and a number of service packets received by the second network node before transmitting the second packet, the service packet and the second packet belonging to the same data flow; and a queue length of a packet transmission queue of the second network node, the packet transmission queue being a queue in which the second packet is stored; and a communication interface through which the second network node transmits the second packet; 26. The system of any one of items 23 to 25, comprising at least one of the following: (Item 27) the first field is a network slice field, the determined value of the first field is the determined value of the network slice field, and the determined value of the network slice field is used to indicate a network slice identifier; The system described in item 20 or 21, wherein the second network node is specifically configured to transmit the second packet based on a network service provided in a network slice corresponding to the network slice identifier. (Item 28) When there are a plurality of first fields, one first field of the plurality of first fields is a flag field, and another first field of the plurality of first fields is a network slice field; the determined value of the flags field is used to indicate a type of network performance parameter, and the determined value of the flags field is further used to instruct the second network node to add a network performance parameter corresponding to the type of network performance parameter to the second packet; 21. The system of claim 20, wherein the determined value of the network slice field is used to indicate a network slice identifier, the determined value of the network slice field is further used to instruct the second network node to process the second packet based on the network slice identifier, and the network slice identifier is used to identify a network slice to be used when the second packet is transmitted. (Item 29) A network device applicable to a packet processing system, the packet processing system comprising a first network node and a second network node, the network device being a first network device, the network device comprising a processor and a memory, the memory configured to store instructions, and the processor configured to invoke the instructions in the memory to execute the method according to any one of items 1 to 8. (Item 30) A network device applicable to a packet processing system, the packet processing system comprising a first network node and a second network node, the network device being a second network device, the network device comprising a processor and a memory, the memory configured to store instructions, and the processor configured to invoke the instructions in the memory to execute the method according to any one of items 9 to 13. (Item 31) A network device applicable to a packet processing system, the packet processing system comprising a first network node and a second network node, the network device being a second network device, the network device comprising a processor and a memory, the memory configured to store instructions, and the processor configured to invoke the instructions in the memory to execute the method according to any one of items 14 to 15. (Item 32) A network device applicable to a packet processing system, the packet processing system comprising a first network node and a second network node, the network device being a second network device, the network device comprising a processor and a memory, the memory configured to store instructions, and the processor configured to invoke the instructions in the memory to execute the method according to any one of items 16 to 19. (Item 33) A computer non-transitory storage medium, the computer non-transitory storage medium storing a computer program, the computer program being configured to, when executed on a computing device, cause the computing device to implement the method according to any one of items 1 to 8. (Item 34) A computer non-transitory storage medium, the computer non-transitory storage medium storing a computer program, the computer program being executed on a computing device, causing the computing device to implement the method according to any one of items 9 to 13. (Item 35) A computer non-transitory storage medium, the computer non-transitory storage medium storing a computer program, the computer program being executed on a computing device, causing the computing device to implement the method according to any one of items 14 to 15. (Item 36) 20. A computer non-transitory storage medium, the computer non-transitory storage medium storing a computer program, the computer program being configured to, when executed on a computing device, cause the computing device to implement the method according to any one of items 16 to 19.
Claims
1. 1. A packet processing method, comprising: receiving, at a first network device, a first packet indicating a format of a segment identifier of a second network device, the format of the segment identifier of the second network device indicating a length of a field within a Segment Routing using Internet Protocol version 6 (SRv6) segment identifier of the second network device; the first network device obtaining the format of the segment identifier of the second network device based on the first packet; A packet processing method comprising:
2. 2. The method of claim 1, wherein the format of the segment identifier of the second network device is encapsulated as a type-length-value (TLV) field in the first packet.
3. 3. The method of claim 1, wherein the format of the segment identifier of the second network device includes a first subfield that indicates a length of a locator field in the SRv6 segment identifier of the second network device, and wherein the format of the segment identifier of the second network device includes a second subfield that indicates a length of a function field in the SRv6 segment identifier of the second network device.
4. 4. The method of claim 3, wherein the format of the segment identifier of the second network device further includes a third subfield indicating a length of a first field indicating one or more values within the SRv6 segment identifier of the second network device.
5. 3. The method of claim 1, wherein the format of the segment identifier of the second network device indicates a length of a locator field in the SRv6 segment identifier of the second network device and further indicates a length of a function field in the SRv6 segment identifier of the second network device.
6. 6. The method of claim 5, wherein the format of the segment identifier of the second network device further indicates a length of a first field indicating one or more values within the SRv6 segment identifier of the second network device.
7. 3. The method of claim 1, wherein the step of the first network device obtaining the format of the segment identifier of the second network device based on the first packet includes the step of the first network device obtaining a length of a locator field in the SRv6 segment identifier of the second network device and a length of a function field in the SRv6 segment identifier of the second network device based on the first packet.
8. 3. The method of claim 1, wherein the step of the first network device obtaining the format of the segment identifier of the second network device based on the first packet includes the step of the first network device obtaining a length of a locator field in the SRv6 segment identifier of the second network device, a length of a function field in the SRv6 segment identifier of the second network device, and a length of a first field indicating one or more values in the SRv6 segment identifier of the second network device based on the first packet.
9. The method of claim 1 , wherein the first packet is transmitted by the second network device.
10. The method of claim 1 , wherein the length of the field in the SRv6 segment identifier of the second network device is a number of bits or bytes.
11. 1. A packet processing method, comprising: determining, by a second network device, a format of a segment identifier of the second network device, the format of the segment identifier of the second network device indicating a length of a field within a Segment Routing using Internet Protocol version 6 (SRv6) segment identifier of the second network device; transmitting a first packet from the second network device to the first network device, the first packet indicating the format of the segment identifier of the second network device, the format of the segment identifier being used by the first network device to obtain the format of the segment identifier of the second network device; A packet processing method comprising:
12. 1. A packet processing method, comprising: determining, by a second network device, a format of a segment identifier of the second network device, the format of the segment identifier of the second network device indicating a length of a field within a Segment Routing using Internet Protocol version 6 (SRv6) segment identifier of the second network device; transmitting a first packet from the second network device to the first network device, the first packet indicating the format of the segment identifier of the second network device; receiving the first packet by the first network device; the first network device obtaining the format of the segment identifier of the second network device based on the first packet; A packet processing method comprising:
13. A network device configured to perform the method according to any one of claims 1 to 11.
14. 1. A network system, comprising: A first network device configured to implement the method according to any one of claims 1 to 10; A second network device configured to implement the method of claim 11; A network system comprising:
15. A computer program for causing a computing device to perform the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
SID allocation method and SR node
CN105450437A
Scalable segment identifier allocation in segment routing
US20150326675A1
