Packet transmission method, apparatus, device, and system, and storage medium

JP7640707B2Active Publication Date: 2025-03-05HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023538837
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-02-27
Filing Date
2021-09-16
Publication Date
2025-03-05
Estimated Expiration
2041-09-16

AI Technical Summary

Benefits of technology

【0007】 技術的解決策で提供されるパケット伝送方法によれば、第1のデバイスは、第1のパケットで搬送される第1の部分およびノード情報リストを使用して、次のパケット処理デバイスを迅速に位置特定し、第1のパケットに基づいて、次のパケット処理デバイスによって受信される必要があるパケットを生成し、パケットを伝送することができる。これは、パケット伝送プロセスにおけるオーバーヘッドを低減し、パケット伝送効率を改善する。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007640707000001
    Figure 0007640707000001
  • Figure 0007640707000002
    Figure 0007640707000002
  • Figure 0007640707000003
    Figure 0007640707000003
Patent Text Reader

Abstract

A packet transmission method, apparatus, device, and system, as well as a storage medium, are provided. The method includes: a first device obtains a first packet, and uses a first portion carried in a destination address field of the first packet to determine node information of a second device and node information of a third device from a node information list of the first packet. The first device generates a second packet including node information of the second device and a third packet including node information of the third device based on the first packet. The first device transmits the second packet to the second device and transmits the third packet to the third device. According to the above method, a first portion of the first packet is used, which can efficiently locate a next packet receiving and processing device during packet transmission, and reduces overhead in the packet transmission process.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0002] The present application relates to the field of communication technologies, and in particular to packet transmission methods, apparatus, devices and systems, as well as storage media. [Background technology]

[0003] In a communication network, communication devices transmit information by transmitting packets. With the development of communication technology, there are an increasing number of ways to transmit packets between communication devices. For example, packets are transmitted in a segment routing over internet protocol version 6 (SRv6) scenario. For an SRv6 packet, a segment routing header (SRH) is inserted into an IPv6 packet, and the SRv6 is transmitted on the packet transmission path using a segment list. For example, in a multicast technology, the segment identifier (SID) of the SRH is extended, and the number of forks of the multicast tree and the number of subtree segment identifiers are defined to locate the position of the SID of the next node in the segment list. In addition, after the packet is duplicated, the SIDs of other nodes and the subtree SIDs of other nodes are deleted to transmit the packet on the packet transmission path.

[0004] However, in the segment list provided by the method, the SID corresponding to the duplication node and the SID corresponding to the subtree obtained after the duplication node performs duplication are arranged together for nested encoding. As a result, the encoding structure is complicated, and each node needs to process the SID after duplicating the packet. As a result, the overhead in the packet transmission process is excessively high, and the transmission efficiency is excessively low. Summary of the Invention [Means for solving the problem]

[0005] SUMMARY OF THE DISCLOSURE The embodiments of the present application provide a packet transmission method, apparatus, device and system, as well as a storage medium, to reduce overhead in a packet transmission process and improve transmission efficiency.

[0006] According to a first aspect, a packet transmission method is provided. An example in which a first device executes the method is used to explain the method. The first device obtains a first packet carrying a destination address field and a node information list. The node information list includes the node information of a second device and the node information of a third device. The second device and the third device are devices on the transmission path of the first packet, and may or may not be the next hop device of the first device. For example, the first packet is an SRv6 packet, the node information list is a segment list, the node information of the second device is the SID of the second device, and the node information of the third device is the SID of the third device. The destination address field includes a first part, and the first part identifies the position of the node information of the second device and the node information of the third device in the node information list. Similarly, an example in which the first packet is an SRv6 packet is used. The first part may be implemented by defining a pointer in an argument (Args) field of the SID. That is, the first part is a pointer. The first device determines node information of the second device and node information of the third device from the node information list based on the first portion, and generates a second packet and a third packet based on the first packet. The second packet includes the node information of the second device, and the third packet includes the node information of the third device. The first device transmits the second packet to the second device and transmits the third packet to the third device.

[0007] According to the packet transmission method provided in the technical solution, the first device can use the first part and the node information list carried in the first packet to quickly locate the next packet processing device, generate a packet that needs to be received by the next packet processing device based on the first packet, and transmit the packet, which reduces the overhead in the packet transmission process and improves the packet transmission efficiency.

[0008] In possible implementations, the node information list may or may not include the node information of the first device. When the node information list only includes the node information of the packet processing device located after the first device on the transmission path of the first packet, the space occupied by the node information list may be reduced, which may also improve the packet transmission efficiency.

[0009] In a possible implementation, the first portion indicates that the position of the node information of the second device in the node information list is a start position and the position of the node information of the third device in the node information list is an end position. Alternatively, the first portion indicates that the position of the node information of the second device in the node information list is a start position and indicates an offset of the position of the third device in the node information list relative to the position of the second device in the node information list. The manner in which the first portion identifies the node information of the second device and the position of the node information of the third device in the node information list is flexible. The information indicated by the first portion and the node information list is used to enable the first device to obtain the number of next packet processing devices and the position of the next packet processing device.

[0010] In a possible implementation, the first device generating the second packet based on the first packet includes the first device replicating the first packet based on the first portion to obtain a fourth packet. The first device adds node information of the second device to the fourth packet to obtain the second packet. Thus, the second packet carries node information of the second device and can indicate to the second device to receive and process the packet.

[0011] In a possible implementation, the first device is an ingress node on a transmission path of the first packet. The first device obtaining the first packet includes the first device receiving a fifth packet to obtain the first packet, and appending the first portion and the second portion to a destination address field of the fifth packet, the second portion identifying an address of the first device. The second portion identifying an address of the first device such that the first device can be indicated to process the first packet.

[0012] In a possible implementation, the first device is an intermediate node on a transmission path of the first packet. The destination address field further includes a second portion, and before the first device generates the second packet and the third packet based on the first packet, the method further includes the first device determining that the second portion matches an address of the first device. It is determined that the second portion matches an address of the first device, thereby causing the first device to process the first packet.

[0013] In a possible embodiment, the first packet is an SRv6 packet, the node information list is carried in a segment routing header SRH of the SRv6 packet, and the node information list is a segment list of the SRH. Alternatively, the first packet is an IPv6 packet, the node information list is carried in a routing header RH of the IPv6 packet, and the node information list is a segment list of the RH. Alternatively, the first packet is an IPv6 packet, the node information list is carried in a destination options header DOH of the IPv6 packet, and the node information list is an address list of the DOH. The method is applicable to multiple types of packets, which makes the application scenario range of the packet transmission method provided in the present application wider.

[0014] In a possible embodiment, the first packet, the second packet, and the third packet each further carry a first identifier, where the first identifier indicates a position of the node information of the current packet processing device within the node information list.

[0015] In a possible implementation, the first packet further carries a leaf identifier, where the leaf identifier indicates that the first device is a leaf node. After the first device obtains the first packet, the first device performs a processing operation, such as decapsulation, on the first packet obtained by the replication based on the leaf identifier and the first portion.

[0016] In a possible implementation, the node information list carries a leaf identifier. Optionally, the leaf identifier is at least 1 bit in length.

[0017] In a possible embodiment, the second portion includes a common prefix and a node identifier, where the common prefix includes the same portion of the node address in the node information of the packet processing device, and the node identifier indicates a different portion of the node address in the node information of the packet processing device. In this way, the size of the packet is reduced, and packet transmission efficiency is further improved.

[0018] In a possible implementation, the node information list includes a segment list, and one or more segment identifiers in the segment list do not include a common prefix.

[0019] In a possible implementation, when the node information list includes a segment list, any one of the one or more segment identifiers in the segment list is less than 128 bits in length.

[0020] In a possible implementation, the common prefix further comprises a function identifier, the function identifier indicating a function to be performed by the device.

[0021] According to a second aspect, a packet transmission device is provided. The device is applied to a first device, and includes an acquisition module and a transmission module. The acquisition module is configured to acquire a first packet, the first packet carrying a destination address field and a node information list, the node information list including the node information of a second device and the node information of a third device, the destination address field including a first portion, and determine the node information of the second device and the node information of the third device from the node information list based on the first portion, the first portion identifying a position of the node information of the second device and the node information of the third device in the node information list. The acquisition module is further configured to generate a second packet and a third packet based on the first packet, the second packet including the node information of the second device, and the third packet including the node information of the third device. The transmission module is configured to transmit the second packet to the second device and the third packet to the third device.

[0022] In a possible implementation, the first portion indicates that the position of the node information for the second device in the node information list is a starting position and that the position of the node information for the third device in the node information list is an ending position, or the first portion indicates that the position of the node information for the second device in the node information list is a starting position and indicates an offset of the position of the third device in the node information list relative to the position of the second device in the node information list.

[0023] In a possible implementation, the acquisition module is configured to duplicate the first packet based on the first portion to acquire a fourth packet, and add node information of the second device to the fourth packet to acquire a second packet.

[0024] In a possible implementation, the first device is an ingress node on a transmission path of the first packet. The acquisition module is configured to receive a fifth packet and add the first portion and the second portion to a destination address field of the fifth packet, where the second portion identifies an address of the first device, to acquire the first packet.

[0025] In a possible implementation, the first device is an intermediate node on a transmission path of the first packet, the destination address field further includes a second portion, and the apparatus further includes a determination module configured to determine that the second portion matches an address of the first device before the acquisition module is configured to generate the second packet and the third packet based on the first packet.

[0026] In a possible embodiment, the first packet is an SRv6 packet, the node information list is carried in a segment routing header SRH of the SRv6 packet, and the node information list is a segment list of the SRH. Alternatively, the first packet is an IPv6 packet, the node information list is carried in a routing header RH of the IPv6 packet, and the node information list is a segment list of the RH. Alternatively, the first packet is an IPv6 packet, the node information list is carried in a destination options header DOH of the IPv6 packet, and the node information list is an address list of the DOH.

[0027] In a possible embodiment, the first packet, the second packet, and the third packet each further carry a first identifier, where the first identifier indicates a position of the node information of the current packet processing device within the node information list.

[0028] In a possible implementation, the first packet further carries a leaf identifier, the leaf identifier indicating that the first device is a leaf node. The apparatus further includes a decapsulation module configured to decapsulate the first packet acquired by the duplication based on the leaf identifier and the first portion after the acquisition module acquires the first packet.

[0029] In a possible implementation, the node information list carries a leaf identifier. Optionally, the leaf identifier is at least 1 bit in length.

[0030] In a possible embodiment, the second portion includes a common prefix and a node identifier, where the common prefix includes the same portion of the node address in the node information of the packet processing device and the node identifier indicates a different portion of the node address in the node information of the packet processing device.

[0031] In a possible implementation, the node information list includes a segment list, and one or more segment identifiers in the segment list do not include a common prefix.

[0032] In a possible implementation, any one of the one or more segment identifiers is less than 128 bits in length.

[0033] In a possible implementation, the common prefix further comprises a function identifier, the function identifier indicating a function to be performed by the device.

[0034] According to a third aspect, there is provided a packet transmission device, comprising a processor, coupled to a memory, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to enable the packet transmission device to perform a packet transmission method according to the first aspect or any one of the possible implementations of the first aspect.

[0035] According to a fourth aspect, there is provided a computer readable storage medium, the computer readable storage medium storing at least one instruction, the instruction being loaded and executed by a processor to enable the computer to perform a packet transmission method according to the first aspect or any one of the possible implementations of the first aspect.

[0036] According to a fifth aspect, there is provided a computer program product, comprising a computer program which, when executed by a computer, performs a packet transmission method according to the first aspect or any one of the possible implementations of the first aspect.

[0037] According to a sixth aspect, a communication device is provided. The device includes a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other using an internal connection path. The memory is configured to store instructions. The processor is configured to execute the instructions stored in the memory to control the transceiver to receive a signal and to control the transceiver to transmit a signal. In addition, when the processor executes the instructions stored in the memory, the processor is enabled to perform a packet transmission method according to the first aspect or any one of the possible implementations of the first aspect.

[0038] In an exemplary embodiment, there are one or more processors and one or more memories.

[0039] In an exemplary embodiment, the memory may be integrated with the processor or the memory and processor may be separately located.

[0040] In a particular implementation process, the memory may be a non-transitory memory such as a read-only memory (ROM). The memory and the processor may be integrated as one chip or may be separately located on different chips. The type of memory and the method of arranging the memory and the processor are not limited in this embodiment of the present application.

[0041] According to a seventh aspect there is provided a chip, comprising a processor configured to retrieve from a memory and execute instructions stored in the memory so as to enable a communications device in which the chip is incorporated to perform a packet transmission method according to the first aspect or any one of the possible implementations of the first aspect.

[0042] According to an eighth aspect, another chip is provided, comprising an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected using an internal connection path. The processor is configured to execute code in the memory. When the code is executed, the processor is configured to execute a packet transmission method according to the first aspect or any one of the possible implementations of the first aspect.

[0043] According to a ninth aspect, a packet transmission system is provided. The packet transmission system includes a first device, a second device, and a third device. The first device executes the packet transmission method according to the first aspect or any one of the possible implementations of the first aspect, the second device receives a second packet transmitted by the first device, and the third device receives a third packet transmitted by the first device. Optionally, the second device may process the second packet in a manner in which the first device processes the first packet, and the third device may also process the third packet in a manner in which the first device processes the first packet. [Brief description of the drawings]

[0044] [Figure 1] FIG. 2 is a schematic diagram of a network scenario of a packet transmission method according to an embodiment of the present application; [Diagram 2] 1 is a schematic flowchart of a packet transmission method according to an embodiment of the present application; [Diagram 3] FIG. 2 is a schematic diagram of a structure of an SRH extension header according to an embodiment of the present application; [Figure 4] 2 is a schematic diagram of the structure of an extended SID according to an embodiment of the present application; [Diagram 5] FIG. 2 is a schematic diagram of an RH extension header according to an embodiment of the present application. [Figure 6] FIG. 2 is a schematic diagram of a DOH extension header according to an embodiment of the present application. [Figure 7]FIG. 2 is a schematic diagram of a packet transmission path according to an embodiment of the present application; [Figure 8] FIG. 2 is a schematic diagram of a hierarchical arrangement of a node information list according to an embodiment of the present application; [Figure 9] 2 is a schematic diagram of a structure of a packet transmitted by a node in a network architecture according to an embodiment of the present application; [Figure 10] FIG. 2 is a schematic diagram of a packet transmission path according to an embodiment of the present application; [Figure 11] FIG. 2 is a schematic diagram of a hierarchical arrangement of a node information list according to an embodiment of the present application; [Figure 12] 2 is a schematic diagram of a structure of a packet transmitted by a node in a network architecture according to an embodiment of the present application; [Figure 13] 2 is a schematic diagram of a structure of a packet transmitted by a node in a network architecture according to an embodiment of the present application; [Figure 14] 2 is a schematic diagram of a compression encoding scheme used in a packet transmission method according to an embodiment of the present application; [Figure 15] 2 is a schematic diagram of a compression encoding scheme used in a packet transmission method according to an embodiment of the present application; [Figure 16] 2 is a schematic diagram of a compression encoding scheme used in a packet transmission method according to an embodiment of the present application; [Figure 17] 1 is a schematic diagram of the structure of a packet transmission device according to an embodiment of the present application; [Figure 18] 1 is a schematic diagram of the structure of a packet transmission device according to an embodiment of the present application; [Figure 19] 1 is a schematic diagram of the structure of a packet transmission device according to an embodiment of the present application; [Figure 20] FIG. 2 is a schematic diagram of the structure of a packet transmission device according to an embodiment of the present application; [Figure 21] FIG. 2 is a schematic diagram of the structure of a packet transmission device according to an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0045] The following further describes the embodiments of the present application in detail with reference to the accompanying drawings.

[0046] In order to reduce the complexity of the packet transmission process, reduce the packet transmission overhead, and improve the packet transmission efficiency, the embodiment of the present application provides a packet transmission method. The method is applicable to the network scenario shown in FIG. 1. As shown in FIG. 1, the network scenario includes a packet transmitting device 1 and a plurality of packet receiving network devices RT1 to RT7. The packet transmitted by the device 1 is duplicated and forwarded among RT1 to RT7. For example, the device 1 in this embodiment of the present application includes, but is not limited to, a router, a switch, and a server, and the network devices RT1 to RT7 include, but are not limited to, a router, a switch, and a server, and the plurality of packet receiving network devices RT1 to RT7 include an ingress node, an intermediate node, and an egress node. The ingress node is a first-layer head node device that initiates transmission on a packet transmission path. The intermediate node receives a packet transmitted by a previous hop device on the packet transmission path, duplicates the packet, and then forwards the packet to a next packet processing device.

[0047] In this embodiment, the device processes the packet means that the device performs some operations, such as duplicating, forwarding, decapsulating, and continuing to send the packet to the upper layer device, not limited to only forwarding the packet. Optionally, the multiple receiving devices may alternatively include an intermediate device that only forwards the packet and does not further process the packet. The device does not process the packet means that the device directly forwards the packet to the next hop without performing any other operations. For simplicity, the intermediate devices are omitted in FIG. 1. The egress node is the last layer node device on the packet transmission path. After receiving the packet sent by the previous hop device, the egress node finishes the transmission of the packet on the path, decapsulates the packet, and forwards the packet to the next hop device. Optionally, the next hop device may be a user equipment, for example, a user host.

[0048] In FIG. 1, RT1 is used as an ingress node to receive the packet sent by device 1, duplicate the packet, and forward the packet to multiple next hop devices, i.e., RT2 and RT3. RT2 and RT3 are used as intermediate nodes to receive the packet sent by RT1, then duplicate the packet, and forward the packet to multiple corresponding next hop devices. Specifically, RT2 corresponds to RT4 and RT5, and RT3 corresponds to RT6 and RT7. RT4, RT5, RT6, and RT7 are used as final hop devices among multiple receiving devices to receive the packet sent by the corresponding previous hop device and complete the transmission of the packet on the path.

[0049] Optionally, the packet sent by RT1 carries a transmission path of the packet, and the transmission path is expressed in the form of a node information list. Optionally, the packet sent by RT1 further carries information indicating the location of the device in the node information list and indicating a processing function. Each hop of the network device performs processing such as duplicating, updating, and forwarding on the packet based on the information carried in the packet.

[0050] With reference to the network scenario shown in Fig. 1, an example in which a first device executes the method is used to describe a packet transmission method according to this embodiment of the present application. In order to reduce packet transmission overhead and improve packet transmission efficiency, in this embodiment of the present application, a node information list of a packet is carried in an extension header of the packet, and a pointer is added to indicate a next packet processing device. Fig. 2 is a flowchart of a packet transmission method according to an embodiment of the present application. The method includes, but is not limited to, several processes as follows:

[0051] Step 201: A first device obtains a first packet, where the first packet carries a destination address field and a node information list, and the destination address field includes a first portion.

[0052] In this embodiment of the present application, the node information list includes node information of a second device and node information of a third device. The second device and the third device are the next packet processing devices after the first device on the transmission path of the first packet. The device processes the packet means that the device performs some operations, such as duplicating, decapsulating, and continuing to send the packet to an upper layer device, which is not limited to only forwarding the packet.

[0053] In one embodiment, the node information list may include node information of the first device and the packet processing device located after the first device on the transmission path of the first packet, or may only include node information of the packet processing device located after the first device on the transmission path of the first packet. For example, the node information list includes node information of the first device, the second device, and the third device, or the node information list includes node information of the second device and the third device, but does not include node information of the first device. When the node information list includes only node information of the packet processing device located after the first device on the transmission path of the first packet, the space occupied by the node information list may be reduced, which may also improve packet transmission efficiency.

[0054] The first portion indicates that the position of the node information of the second device in the node information list is a start position and the position of the node information of the third device in the node information list is an end position. Alternatively, the first portion indicates the start position of the node information of the second device in the node information list and indicates an offset of the position of the third device in the node information list relative to the position of the second device in the node information list. The manner in which the first portion identifies the node information of the second device and the position of the node information of the third device in the node information list is flexible. The information indicated by the first portion and the node information list is used, thereby allowing the first device to obtain the number of next packet processing devices and the position information of the next packet processing device.

[0055] This embodiment of the present application does not impose any restrictions on the first packet and the method by which the first packet carries the node information list. The first packet and the method by which the first packet carries the node information list include, but are not limited to, the following several methods:

[0056] Method 1: The first packet is a segment routing over IPv6 (SRv6) packet, which includes an IPv6 packet header, which includes an IPv6 base header and an SRH. The SRH is an extension header and carries a node information list. In this case, the node information list is a segment list of the SRH.

[0057] FIG. 3 illustrates an SRH extension header according to an embodiment of the present application. The SRH extension header and the IPv6 base header form an IPv6 packet header in the first packet. As shown in FIG. 3, the next header has a length of 8 bits and identifies the type of packet header after the SRH. The extension header length has a length of 8 bits and identifies the length of the SRH header, which is the length occupied by the segment list. The routing type has a length of 8 bits and identifies the type of the routing header. The first identifier (segment left) has a length of 8 bits and indicates the position of the SID of the current packet processing device in the segment list. The last entry has a length of 8 bits and identifies the entry of the last element containing the segment list in the segment list. The flags has a length of 8 bits and is the flag of the data packet. The tag has a length of 8 bits and is the tag of the data packet in the same group.

[0058] The node information list in the SRH is called a segment list. The node information corresponding to the device on the packet transmission path in the segment list is called the segment identifier (SID) of the device. The segment list includes the SID of each device on the packet transmission path. Each SID is in the form of an IPv6 address and occupies 128 bits. The SID in the SRH includes three parts: a locator, a function, and an argument. The address is a node address assigned to the device in the network and can be used for routing and aggregation. The function is a function identifier and indicates a local command. For example, the local command may be a forwarding action that needs to be performed by the device. The argument stores the argument of the variable that is required when the device executes the command. In one embodiment, a pointer defined in the argument field of the SID is the first part of the destination field.

[0059] For example, the pointer is defined in the arguments (Argument, Args) field of the SID. The pointer in the SID corresponding to the first device indicates the positions of the SIDs of the second device and the third device in the segment list, specifically, the start and end positions of the next layer packet processing device after the first device. For example, the pointer of the first device may indicate that the position of the SID of the second device in the segment list is the start position and the position of the SID of the third device in the segment list is the end position, or indicate that the position of the SID of the second device in the segment list is the start position and may indicate the offset of the position of the SID of the third device in the segment list relative to the position of the SID of the second device in the segment list. The first device may determine the position of the next layer packet processing device based on the pointer, and further determine the number of packet copies required based on the offset.

[0060] In an embodiment of the present application, the SID is extended. The structure of the extended SID may be shown in FIG. 4. In FIG. 4, the extended SID still includes three parts: a locator, a segment type obtained by splitting, and a node pointer. The locator is still a node address and may be used for routing and aggregation. The segment type obtained by splitting stores a redefined field type of the extended SID. In this embodiment, the segment type obtained by splitting still stores a function identifier, which indicates a local command, and the local command indicates a forwarding action that needs to be performed by the device. The node pointer may include pointer1 and pointer2. An example in which the SID indicates a first device and the next layer packet processing devices located after the first device are a second device and a third device are still used. Pointer1 may indicate that the position of the SID of the second device in the segment list is the starting position, and pointer2 indicates that the position of the SID of the third device in the segment list is the ending position. Optionally, pointer1 may store the position of the SID of the second device in the segment list as the starting position, and pointer2 indicates the offset of the position of the third device in the segment list relative to the position of the second device in the segment list. The number of target devices including the second device and the third device may be determined based on pointer2. The number of target devices is the sum of the devices including the second device and the third device, in other words, the offset of the position of the third device in the node information list relative to the position of the second device in the node information list.

[0061] Method 2: The first packet is an IPv6 packet, the IPv6 packet header includes an IPv6 basic header and a routing header (RH), the RH extension header carries a node information list, and the node information list is a segment list of the RH. The structure of each node information in the segment list is similar to the structure of the node information shown in Figure 3. Figure 5 shows an IPv6 extension header, i.e., an RH, according to an embodiment of the present application.

[0062] Method 3: The first packet is an IPv6 packet, and the IPv6 packet header is I The IPv6 segment list includes an IPv6 basic header and a destination option header (DOH), and the DOH extension header carries a node information list, which is an address list of the DOH. The structure of each node information in the segment list is similar to the structure of the node information shown in Figure 3. Figure 6 shows an IPv6 extension header, i.e., DOH, according to an embodiment of the present application.

[0063] Regardless of the above method, an example is used in which the packet processing devices located after the first device include a second device and a third device. The node information list includes the node information of the second device and the node information of the third device. The second device and the third device are next-layer packet processing devices located after the first device on the transmission path of the first packet.

[0064] FIG. 7 is a schematic diagram of a packet transmission path according to an embodiment of the present application. The transmission path according to this embodiment is a point-to-multipoint path. In this embodiment, the packet transmission path is logically divided into layers, and the nodes through which the path passes the same number of branches are considered as nodes of the same layer. As shown in FIG. 7, A is a packet processing device of the first layer, B and C are packet processing devices of the second layer, and B1, B2, B3, C1, C2, and C3 are packet processing devices of the third layer. Furthermore, A is an ingress node on the packet transmission path, B and C are intermediate nodes on the packet transmission path, and B1, B2, B3, C1, C2, and C3 are egress nodes on the packet transmission path. From FIG. 7, it can be known that B and C are next-layer packet processing devices located after node A. B1, B2, and B3 are next-layer packet processing devices located after node B. Nodes C1, C2, and C3 are next-layer packet processing devices located after node C.

[0065] FIG. 7 is merely an exemplary description of transmission paths. Different transmission paths can be represented in the form of corresponding node information lists. The node information lists are arranged in descending order of logical layers, and the node information of packet processing devices of the same layer located after the same device are arranged consecutively together. For example, the schematic diagram of the hierarchical arrangement of the node information lists corresponding to the transmission paths shown in FIG. 7 is used. As shown in FIG. 8, node A is layer 1, nodes B and C are layer 2, and B1, B2, B3, C1, C2, and C3 are layer 3.

[0066] For example, the node information of each device in the node information list includes a locator and a node pointer. For any device, the node pointer in the node information of the any device indicates the location in the node information list of the node information of the packet processing device that is located after the any device on the transmission path. The node address in the node information of the any device indicates the location of the any device in the network.

[0067] Optionally, the node information of the packet processing device may further include a function identifier. The function identifier indicates an operation instruction for the packet processing device to perform an operation on the packet, i.e., a function to be performed. In this embodiment, the function identifier in each node information includes, but is not limited to, a duplication function. The node information list according to this embodiment of the present application is used to simplify the packet encoding process, and the operation specified in the node information list is used to control the explicit path for packet transmission. This reduces the maintenance work of the network node and improves the packet transmission efficiency.

[0068] In one embodiment, the destination address field includes a first portion, the first portion identifying the location of the node information of the second device and the node information of the third device in the node information list. In the case where the first device is an intermediate node on the transmission path of the first packet, the destination address field further includes a second portion, the second portion indicating the location of the first device in the network. For example, the second portion identifying the address of the first device. The node information of both the second device and the third device includes a node address and a node pointer, the node address indicating the location of either device in the network, and the node pointer indicating the location in the node information list of the node information of the packet processing device located after either device of the second device and the third device on the transmission path.

[0069] Note that the second portion of the destination address field matches the node address included in the node information of the first device, the first portion of the destination address field matches the node pointer of the first device, and the node information of the first device may be included in the node information list.

[0070] Optionally, the first device obtaining the first packet includes, but is not limited to, the following two cases:

[0071] Case 1: A first device is an ingress node on a transmission path of a first packet. To obtain the first packet, the first device receives a fifth packet and appends the first portion and the second portion to a destination address field of the fifth packet. The second portion identifies the address of the first device.

[0072] For example, the fifth packet is a packet received by an ingress node. For example, corresponding to the network scenario shown in FIG. 1, the fifth packet is a packet received from device 1 by RT1. In addition, in this embodiment, the node information list not only includes the node information of each packet processing device located after the first device on the transmission path of the first packet, but also includes the node information of the first device. Furthermore, in this embodiment, the first device is an ingress node on the transmission path of the first packet, in other words, the node information list includes the node information of the packet processing device located on the transmission path of the first packet.

[0073] For example, the first device further adding a node information list to the fifth packet includes adding an IPv6 extension header to the fifth packet, where the IPv6 extension header carries the node information list, and the node information list includes the node information of the first device and the node information of a packet processing device located after the first device. Optionally, the first device adding the second part and the first part to the fifth packet includes the first device placing the node information corresponding to the first device in the node information list carried in the IPv6 extension header in a destination address field of the fifth packet. In this case, the node address stored in the destination address field is the second part, and the stored node pointer is the first part. In this manner, the first packet is obtained based on the fifth packet.

[0074] Case 2: The first device is an intermediate node on the transmission path of the first packet. The first device obtaining the first packet includes receiving the first packet sent by the previous hop device. As an intermediate node, the first device does not need to add the first part, the second part, and the node information list to the received packet. The first packet received by the first device already carries the destination address field and the node information list, and the destination address field carries the first part and the second part. For example, corresponding to the network scenario shown in FIG. 1, RT2 is used as the first device to receive the first packet sent by RT1, and the first packet carries the second part, the first part, and the node information list.

[0075] Step 202: The first device determines node information of the second device and node information of the third device from the node information list based on the first portion.

[0076] As described above, the first part identifies the location of the node information of the second device and the node information of the third device in the node information list. After obtaining the first packet, the first device determines from the node information list the node information of the next packet processing device located after the first device on the transmission path of the packet, i.e., the node information of the second device and the node information of the third device, to generate a corresponding second packet that needs to be sent to the second device and a corresponding third packet that needs to be sent to the third device.

[0077] It should be noted that the second device and the third device in this embodiment indicate that the number of the next packet processing device located after the first device on the transmission path of the first packet is two, and the two devices can continue to forward the packet using the packet transmission method according to this embodiment of the present application. In other words, in actual implementation, after obtaining the first packet, the first device determines from the node information list that the next packet processing device located after the first device on the transmission path of the packet further includes the node information of the fourth device and the node information of the fifth device. In this case, the number of the next packet processing device located after the first device is four, and the first device needs to send the packet to the fourth device and the fifth device. Similarly, the fourth device and the fifth device can continue to forward the packet using the packet transmission method according to this embodiment of the present application.

[0078] Step 203: The first device generates a second packet and a third packet based on the first packet, where the second packet includes node information of the second device, and the third packet includes node information of the third device.

[0079] In this embodiment, the first device may first obtain the second packet corresponding to the second device based on the first part and the node information list carried in the first packet, and then the first device obtains the third packet corresponding to the third device in the manner of obtaining the second packet. Of course, alternatively, the third packet may be obtained first, and then the second packet is obtained. The order of obtaining the second packet and the third packet is not limited in this embodiment of the present application.

[0080] In a possible implementation, the first device generating the second packet based on the first packet includes, but is not limited to, some of the following processes.

[0081] 2031: The first device replicates the first packet based on the first portion to obtain a fourth packet.

[0082] The first device determines the number of next-layer target packet processing devices based on the first portion carried in the first packet. For example, the target devices are the second device and the third device, and the number of target devices is the total number of devices including the second device and the third device. Then, the first device determines the number of first packet copies based on the determined number of target devices.

[0083] For example, the first device reads the destination address field of the first packet. Based on the second part of the destination address field, it is known that the current packet processing device is the first device. Then, based on the function identifier of the destination address field, an instruction to be executed by the first device is obtained. In this embodiment, the function identifier includes, but is not limited to, a duplication instruction. After obtaining the duplication instruction from the function identifier, the first device reads the first part from the destination address field. Optionally, the first part includes a start position and an end position of the node information of the second device and the node information of the third device in the node information list. The position of the node information of the second device in the node information list is a start position, and the position of the node information of the third device in the node information list is an end position. The node information list may further include node information of one or more fourth devices between the start position and the end position. The fourth device is a packet processing device located after the first device, other than the second device and the third device. The first device obtains, based on the information indicated by the first portion, the number of devices including the second device and the third device, in other words, the number of target devices to which the first packet needs to be replicated.

[0084] Optionally, the first device determines the number of target devices, including the second device and the third device, based on the first portion includes calculating an offset based on the first portion indicating the start position and the end position of the second device and the third device in the node information list, and using the offset as the number of target devices. Alternatively, when the first portion includes the start position indicated using the node information of the second device in the node information list and the offset of the position of the third device in the node information list relative to the position of the second device in the node information list, the first device reads the number of target devices, including the second device and the third device, carried in the first portion. For example, in this embodiment, the number of target devices is two. The packet obtained by duplicating the first packet is called the fourth packet.

[0085] The first device determines a location of the node information of the second device in the node information list based on the first portion, and obtains the node information of the second device based on the location of the node information of the second device in the node information list. In other words, since the first portion further indicates the locations of the node information of the second device and the node information of the third device in the node information list, after obtaining the number of target devices to which the first packet needs to be replicated, the first device locates and obtains the node information of the second device and the third device in the node information list based on the indication of the first portion.

[0086] 2032: The first device adds node information of the second device to the fourth packet to obtain the second packet.

[0087] In a possible embodiment, the first device adding the node information of the second device to the fourth packet to obtain the second packet includes the following steps.

[0088] 20321: The first device updates a destination address field in the fourth packet based on the node information of the second device.

[0089] After obtaining the node information of the second device and the node information of the third device, the first device updates a destination address field in the fourth packet based on the node information of the second device. The updated destination address field of the packet carries an updated second portion and an updated first portion, where the updated second portion is the node address of the second device and the updated first portion is the node pointer of the second device. The updated second portion indicates the location of the second device in the network and the updated first portion indicates the location in the node information list of the node information of the next packet processing device located after the second device on the transmission path of the packet.

[0090] Optionally, the first device updating a destination address field in the one fourth packet based on the node information of the second device includes the first device filling in the destination address field of the one fourth packet with the node information of the second device, in which case the first portion is overwritten by a new node pointer and the node pointer carried in the destination address field is recorded as the updated first portion, and the second portion is overwritten by a new node address and the node address carried in the destination address field is the updated second portion.

[0091] 20322: The first device acquires the second packet based on the updated fourth packet.

[0092] In a possible embodiment, the first device obtaining the second packet based on the updated fourth packet includes, but is not limited to, the following three processing methods:

[0093] Processing method 1: The first device obtaining the second packet based on the updated fourth packet includes: using the updated fourth packet as the second packet.

[0094] After updating the packet, the first device may directly use the updated fourth packet as the second packet to perform the next transmission operation. The first device may also further process the updated packet to reduce packet overhead.

[0095] Processing method 2: The first device obtains the second packet based on the updated fourth packet includes popping up an extension header in the updated fourth packet based on the updated first part in the updated fourth packet indicating that there is no packet processing device located after the second device on the transmission path, and using the packet as the second packet after popping up the extension header. For example, the IPv6 packet header includes an IPv6 base header and an IPv6 extension header. Regarding the process of popping up an IPv6 extension header in the processing method 2, the content of the popped up IPv6 extension header differs according to the structure of the updated fourth packet. For example, if the updated fourth packet is an IPv6 packet, the popped up IPv6 extension header is an RH. Or, if the updated fourth packet is an IPv6 packet, the popped up IPv6 extension header is a DOH. Or, if the updated fourth packet is an SRv6 packet, the popped up IPv6 extension header is an SRH.

[0096] Optionally, the first device determines whether there is a packet processing device located after the second device on the transmission path based on the value of the updated first part. For example, the value of the updated first part is used as a reference value, and there is no packet processing device after the second device. For example, the reference value may be 0. In this case, the updated first part is 0. This represents that there is no packet processing device after the second device on the transmission path of the packet. Therefore, the first device pops up an IPv6 extension header of the updated fourth packet to reduce packet overhead. For the structure of the IPv6 packet header, please refer to the description of the processing method 3 below. Details will not be described here.

[0097] Processing method 3: The first device obtaining the second packet based on the updated fourth packet includes processing the node information list in the updated fourth packet to obtain a processed packet, and obtaining the second packet based on the processed packet, where the node information list in the processed packet includes only node information of packet processing devices located after the first device on the transmission path.

[0098] In order to further reduce packet overhead, the first device may further process the node information list of the updated fourth packet. In a possible embodiment, the first device may further process the node information list of the processed fourth packet to the second device and the second device. rear The node information list of the branching devices that are not required is selectively deleted from the node information list so that the node information list only includes the node information of the packet processing devices of the second packet. In this way, the space occupied by the node information list carried in the second packet is greatly reduced, and the packet transmission efficiency is also improved.

[0099] Further, with respect to the processing method 3, after the processed packet is obtained, obtaining a second packet based on the processed packet includes, but is not limited to, using the processed packet as the second packet, or popping up an IPv6 extension header in the processed packet based on the updated first portion in the processed packet indicating that there is no packet processing device located after the second device on the transmission path, and using the packet as the second packet after popping up the IPv6 extension header. The IPv6 packet header includes an IPv6 base header and an IPv6 extension header. With respect to the process of popping up an IPv6 extension header in the processing method 3, the content of the popped up IPv6 extension header differs according to the structure of the processed packet. For example, if the processed packet is an IPv6 packet, the popped up IPv6 extension header is an RH. Alternatively, if the processed packet is an IPv6 packet, the popped up IPv6 extension header is a DOH. Alternatively, if the processed packet is an SRv6 packet, the popped up IPv6 extension header is an SRH.

[0100] Regardless of the above processing method, it should be noted that the address and pointer obtained by the first device based on the updated fourth packet and carried in the destination address field of the second packet are the same as the updated second part and the updated first part carried in the updated fourth packet, i.e., the second packet carries the updated second part and the updated first part.

[0101] Furthermore, for how the first device acquires the third packet corresponding to the third device, please refer to the above process of acquiring the second packet, and the details will not be described again here.

[0102] In a possible embodiment, the first packet, the second packet, and the third packet each further carry a first identifier, where the first identifier indicates the position of the node information of the current packet processing device in the node information list. Optionally, the first identifier may be the sequence of the node information of the current packet processing device in the node information list. For example, the node information of the current packet processing device is placed third in the node information list, and the sorting method starts from the first node information in ascending order from 0. In this case, the first identifier is 2. Optionally, when the first device acquires the second packet or the third packet based on the fourth packet, a process is included of updating the first identifier of the fourth packet, so that the acquired second packet or the acquired third packet can indicate the device that processes the second packet or the third packet using the first identifier. For example, after the first device updates the destination address field in one fourth packet based on the node information of the second device, the method further includes updating the first identifier of the fourth packet based on the node information of the second device.

[0103] In the packet transmission process, a designated device may be further configured. The designated device is not only used as an intermediate node on the current packet transmission path to connect to another router node, but also used as an edge device to connect to a user host. In other words, the device not only transmits a packet to a next-hop packet processing device, but also used as an egress node on another path to decapsulate the packet. A node having the aforementioned function is called a complex node. As explained above, the egress node on the current packet transmission path also needs to decapsulate the packet. In this case, in the packet transmission process, there are two types of packet decapsulation nodes, one is a complex node and the other is the aforementioned egress node. The two types of packet decapsulation nodes are called leaf nodes. Therefore, in the embodiment of the present application, an identifier is added to the packet to indicate whether the device is a complex node or an egress node, i.e., whether the device is a leaf node. After it is determined that the device is a leaf node, the first part is used to further determine whether the node is a complex node or an egress node. If the node is a complex node, the packet is duplicated once, and the duplicated packet is decapsulated. If the node is an egress node, the packet is directly decapsulated.

[0104] In a possible embodiment, the first packet further carries a leaf identifier, and the leaf identifier indicates that the first device is a leaf node. Optionally, after the first device acquires the first packet, the method further includes the first device duplicating the first packet at least once, and decapsulating the at least one duplicated first packet based on the leaf identifier carried in the first packet indicating that the first device is a leaf node and the first portion indicating that there is a packet processing device located after the first device on the transmission path. It should be noted that the at least one duplicated first packet is at least one duplicated first packet in addition to the second packet and the third packet acquired by the first device based on the first portion and the node information list. For example, after decapsulating the fourth packet, the first device executes the step of acquiring the second packet and the third packet based on the first portion and the node information list based on the original first packet. Alternatively, the first device decapsulates the first packet based on the leaf identifier carried in the first packet indicating that the first device is a leaf node and the first portion indicating that there is no packet processing device located after the first device on the transmission path. Optionally, after the first device updates the destination address field in one fourth packet based on the node information of the second device, the method further includes updating the leaf identifier of the fourth packet based on the node information of the second device.

[0105] Optionally, two leaf identifiers are configured for the first device, one of the two leaf identifiers indicates that the first device is a leaf node, and the other leaf identifier indicates that the first device is not a leaf node. The first packet carries one of the two leaf identifiers. For example, if the first device is a leaf node, the first packet carries a leaf identifier indicating that the first device is a leaf node. Alternatively, if the first device is not a leaf node, the first packet carries a leaf identifier indicating that the first device is not a leaf node. In this way, two leaf nodes need to be configured for one device, and different leaf identifiers are carried based on different situations. In addition to the case where two leaf identifiers are configured, the method according to this embodiment of the present application further supports the configuration of one leaf identifier for one device, and whether the device is a leaf node is indicated using different values. For example, a leaf identifier is configured for a first device, the leaf identifier has a first value and a second value, the first value indicates that the first device is a leaf node, and the second value indicates that the first device is not a leaf node, and the value of the leaf identifier carried in the first packet is the first value or the second value. For example, if the first device is a leaf node, the first packet carries a leaf identifier having the first value. Alternatively, if the first device is not a leaf node, the first packet carries a leaf identifier having the second value.

[0106] In the packet transmission process, in order to further reduce the size of the packet and improve the transmission efficiency, the packet may be further encoded using a common prefix, so that the packet encoded using the common prefix may be compressed and transmitted using a header compression technique, further reducing the packet overhead. In a possible embodiment, the second part includes a common prefix and a node identifier, where the common prefix includes the same part of the node address in the node information of the packet processing device on the transmission path, and the node identifier indicates a different part of the node address in the node information of the packet processing device on the transmission path. Optionally, the common prefix further includes the same function identifier of the packet processing device on the transmission path. The function identifier indicates the function to be performed by each device.

[0107] Additionally, in another possible implementation, the node information list includes a segment list, and one or more segment identifiers in the segment list do not include a common prefix. Optionally, any one of the one or more segment identifiers is less than 128 bits in length.

[0108] In the packet transmission process, there may be some devices that only forward packets and do not process packets according to the above method, as well as intermediate routers and switches that only forward packets. In order to improve packet transmission efficiency, the packet may be made to traverse these devices that only forward packets. In a possible embodiment, the first device is an intermediate node on the transmission path of the first packet, and before the first device obtains the second packet corresponding to the second device and the third packet corresponding to the third device based on the first packet, the method further includes the first device determining that the second part carried in the first packet is the address of the first device in the network. That is, the second part matches the address of the first device. If the second part matches the address of the first device in the network, the first device continues to perform the step of obtaining the second packet corresponding to the second device and the third packet corresponding to the third device based on the first part and the node information list.

[0109] Optionally, the first device is an intermediate node on a transmission path of the first packet, and before the first device obtains the second packet corresponding to the second device and the third packet corresponding to the third device based on the first portion and the node information list, the method further includes the first device determining that the second portion of the first packet is not an address of the first device in the network, i.e., the second portion does not match the address of the first device, and the first device forwarding the first packet based on the second portion of the first packet.

[0110] In a possible implementation, the first device is an egress node on a transmission path of the first packet, and after the first device obtains the first packet, the method further includes the first device decapsulating the first packet based on the first portion indicating that there is no packet processing device after the first device on the transmission path, i.e., the first device is an egress node on the transmission path.

[0111] In a possible embodiment, the node information list further includes node information of devices on the transmission path of the first packet that do not process the packet. In this embodiment, the node information of the devices that do not process the packet does not include a replication instruction, and the first portion only points to the location of the next hop device in the node information list.

[0112] Note that the first device locally stores a forwarding information base (FIB). The FIB provides routing information, instruction information, processing information, etc. corresponding to each identifier and pointer in the destination address field. Optionally, the FIB may be distributed to each device on the transmission path of the first packet by flooding.

[0113] Step 204: The first device sends the second packet to the second device, and sends the third packet to the third device.

[0114] The first device transmits the second packet to the second device after obtaining the second packet, and transmits the third packet to the third device after obtaining the third packet. Optionally, the first device may find the location of the second device in the network based on the updated second part carried in the destination address field of the second packet, and transmit the second packet to the second device. The order of transmitting the second packet and transmitting the third packet is not limited in this embodiment of the present application.

[0115] According to the method provided in this embodiment of the present application, the node information list and the first part are added to indicate the device to transmit the packet. For example, the packet is transmitted from the first device to the second device and the third device. The node information list includes the node information of the second device and the node information of the third device. The first part indicates the position of the node information of the second device and the node information of the third device in the node information list. According to the method provided in this embodiment of the present application, during packet transmission, the next packet receiving and processing device can be quickly located based on the position of the node information of the second device and the node information of the third device in the node information list, thereby simplifying the steps of the packet transmission process, reducing overhead, and improving transmission efficiency.

[0116] In addition, in this embodiment of the present application, by referring to the penultimate hop popping method, leaf identifiers, and further processing of the node information list, the size of the packets is reduced, the packet transmission overhead is further reduced, and the transmission efficiency is improved.

[0117] FIG. 9 is a schematic diagram of the structure of a packet transmitted by a node in a network architecture according to an embodiment of the present application. In this embodiment of the present application, an example is used in which a packet is transmitted on the packet transmission path shown in FIG. 7 and the IPv6 extension header used is the segment routing header SRH to explain the method according to this embodiment of the present application. In FIG. 9, the node in the second column of the packet represents the node address, and the leaf in the third column represents the node pointer. In the segment list in this embodiment, the actual packet does not have a sequence number, but represents the position of each SID in the segment list to be sequentially increased. Specifically, the "128bit" next to the tag field represents the SID with sequence number 0, and the SIDs with sequence numbers 1, 2, ..., 8 are sequentially displayed below. Please note that in this embodiment, the first identifier is the same as the sequence number of the SID. For example, in a packet sent by device A to device B, device B corresponds to a SID with sequence number 1. Therefore, the first identifier of the packet is 1. Similarly, in a packet sent by device A to device C, the first identifier is 2. In packets sent by device B to devices B1 through B3, the first identifiers are 3 through 5, respectively. In packets sent by device C to devices C1 through C3, the first identifiers are 6 through 8, respectively.

[0118] In the SRH header, each SID includes a node address, a function identifier, and a node pointer. In this embodiment, a node address 2001:db8:1:2:: with a 64-bit mask is configured for the SID of device A for routing and aggregation. The function identifier is configured in the 32 bits immediately following the address block, and the replication function in this embodiment is represented using 1234:1234. The node pointer is configured in the 32 bits immediately following the function identifier. The first 16 bits store the start position of the SID of the next packet processing device in the segment list, and the last 16 bits store the end position of the SID of the next packet processing device in the segment list. In this embodiment, ::1 indicates that the start position of the SID of the next packet processing device in the segment list is the position with the SID whose sequence number is 1, and ::2 indicates that the end position of the SID of the next packet processing device in the segment list is the position with the SID whose sequence number is 2. Thus, in this embodiment, a SID with sequence number 0 would be represented as follows: 2001:db8:1:2:1234:1234:1:2.

[0119] Similarly, the node address of device B is 2001:db8:1:3::. Therefore, an SID with sequence number 1 would be represented as 2001:db8:1:3:1234:1234:3:5, as shown below. The node address of device C is 2001:db8:1:4::. Therefore, an SID with sequence number 2 would be represented as 2001:db8:1:4:1234:1234:6:8. The node address of device B1 is 2001:db8:1:5::. Therefore, an SID with sequence number 3 would be represented as 2001:db8:1:5:1234:1234:0:0, as shown below. The node address of device B2 is 2001:db8:1:6::. Therefore, an SID with sequence number 4 is represented as follows: 2001:db8:1:6:1234:1234:0:0. The node address of device B3 is 2001:db8:1:7::. Therefore, an SID with sequence number 5 is represented as follows: 2001:db8:1:7:1234:1234:0:0. The node address of device C1 is 2001:db8:1:8::. Therefore, an SID with sequence number 6 is represented as follows: 2001:db8:1:8:1234:1234:0:0. The node address of device C2 is 2001:db8:1:9::. Therefore, an SID with sequence number 7 is represented as follows: 2001:db8:1:9:1234:1234:0:0. The node address of device C3 is 2001:db8:1:a::. Therefore, the SID with sequence number 8 is represented as follows: 2001:db8:1:a:1234:1234:0:0.

[0120] Corresponding to the flow chart of the packet transmission method shown in Fig. 2, it should be noted that any device on the packet transmission path in this embodiment may be considered as a first device when it obtains and transmits a packet, the received packet may be considered as a first packet when any device is used as an intermediate node, the transmitted packet may be considered as a second packet, and multiple next-hop packet processing devices corresponding to the device may be considered as a second device and a third device. That is, the packet transmission method shown in Fig. 2 is applicable to each device on the packet transmission path in this embodiment.

[0121] In this embodiment, A is used as the first device, and the packet transmission method performed by device A includes, but is not limited to, the following several steps:

[0122] 9011: Device A obtains a packet corresponding to device A, where the packet corresponding to device A carries a destination address field and a node information list, where the destination address field includes a second part and a first part.

[0123] Optionally, device A is used as an ingress node to obtain a packet corresponding to device A, including but not limited to: device A obtains a fifth packet, and the fifth packet is a packet to be transmitted that is received by device A. Device A adds a node information list to the fifth packet, specifically, in this embodiment, encapsulates the packet using an SRH that carries a segment list as an IPv6 extension header, and the segment list in this embodiment carries the SID of device A. Device A adds a first part and a second part to the fifth packet based on the node information of device A. In this embodiment, device A fills in the first SID (SID0) in the segment list, specifically, 2001:db8:1:2:1234:1234:1:2, in the destination address field of the encapsulated packet to obtain a packet corresponding to device A. In this case, ":1:2" in the destination address field is the first part, and "2001:db8:1:2:" is the second part.

[0124] 9012: Device A determines the node information of device B and the node information of device C from the node information list based on the first portion.

[0125] The first part is in the node information list. The Vice B Node information and By Vice C Identifies the location of the node information.

[0126] 9013: Device A obtains packets corresponding to device B and packets corresponding to device C based on the packets corresponding to device A.

[0127] After obtaining the packet corresponding to device A, device A generates a packet corresponding to device B and a packet corresponding to device C separately based on the first portion in the packet and the node information list.

[0128] Optionally, the step of device A generating a packet corresponding to device B includes device A determining the number and devices of next-layer target packet replication and processing devices based on the first portion. Device A replicates the packet a number of times equal to the number of target devices. Device A determines a position of device B's SID in a segment list based on the first portion, and obtains device B's SID based on the position of device B's SID in the segment list. Device A updates a destination address field in one replicated packet based on device B's SID. Device A updates the updated destination address field in one replicated packet. Duplicated Based on the packets, obtain the packets corresponding to device B.

[0129] Optionally, the packet further carries a first identifier, where the first identifier indicates a position of the SID of the current packet processing device in the segment list. After device A updates a destination address field in one duplicated packet based on device B's SID, device A further updates the first identifier of the duplicated packet corresponding to device A based on device B's SID.

[0130] For example, device A reads the destination address field (DA) field to obtain the following information: 1. The destination address field of the packet is the SID of device A. 2. 1234:1234 in the destination address field indicates a duplication instruction. 3. The first part indicates that the start and end positions of the SID of the next packet processing device in the segment list are 1 and 2, respectively. Based on the above information, device A determines that the number of target devices, including device B and device C, is 2. Specifically, the packet corresponding to device A needs to be duplicated twice, and the devices to which the duplicated packets should be sent are the devices indicated by the SIDs whose positions are 1 and 2, respectively, in the segment list. Device A duplicates the packet twice, locates the node information of device B and device C in the segment list based on the instruction of the first part, specifically SID1 and SID2, and fills in SID1, specifically 2001:db8:1:3:1234:1234:3:5, into the DA field of one duplicated packet corresponding to device A. In this case, the first part ":1:2" of the duplicated packet is updated to the updated first part ":3:5", and the second part "2001:db8:1:2:" is updated to the updated second part "2001:db8:1:3". Optionally, the packet corresponding to device A further carries a first identifier. After updating the packet, device A sets the first identifier (segment left) field in the packet from 0 to 1. Device A fills in SID2, specifically 2001:db8:1:4:1234:1234:6:8, into the DA field of another duplicated packet. In this case, the first part of the duplicated packet ":1:2" is updated to the updated first part ":6:8", the second part "2001:db8:1:2:" is updated to the third address "2001:db8:1:4:", and the first identifier in the packet is set from 0 to 2.

[0131] 9014: Device A sends a corresponding packet to device B and sends a corresponding packet to device C.

[0132] Based on the location information indicated by the node addresses in the DA fields, specifically 2001:db8:1:3: and 2001:db8:1:4:, device A separately transmits two duplicated packets carrying different DA fields to corresponding devices, specifically devices B and C, as packets corresponding to device B and device C, respectively.

[0133] When a packet is sent to device B, device B may perform the functions performed by the first device in the manner shown in Figure 2. Because device B is an intermediate node in the network architecture shown in Figure 9, the packet transmission method performed by device B includes, but is not limited to, the following several steps.

[0134] 9021: Device B obtains a packet corresponding to device B, where the packet corresponding to device B carries a destination address field and a node information list, where the destination address field includes the second part and the first part.

[0135] Device B directly receives the packet sent by device A, uses this packet as the packet corresponding to device B, and processes and transmits the packet corresponding to device B according to the packet transmission method shown in FIG. 2.

[0136] 9022: Device B determines node information of devices B1 to B3 from the node information list based on the first portion.

[0137] The first portion identifies the location of the node information for devices B1 through B3 within the node information list.

[0138] 9023: Device B acquires packets corresponding to devices B1 to B3, respectively, based on the packets corresponding to device B.

[0139] After receiving the packet sent by device A and corresponding to device B, device B obtains packets corresponding to devices B1 to B3, respectively, based on the first part and the node information list. Optionally, device B reads the DA field of the packet corresponding to device B to obtain the following information: 1. The destination address field of the packet is the SID of device B. 2. 1234:1234 in the destination address field indicates a duplication instruction. 3. The first part indicates that the start and end positions of the next packet processing device in the segment list are 3 and 5, respectively. Device B determines that the number of the next target packet processing devices is 3 based on the aforementioned information. Specifically, the packet corresponding to device B needs to be duplicated three times, and the devices to which the duplicated packet should be sent are the devices indicated by the SIDs whose sequence numbers are 3, 4, and 5, respectively. Device B duplicates the packet three times, and locates the node information of the next packet processing device in the segment list, specifically SID3, SID4, and SID5, based on the instruction of the first part. SID3 is filled in the DA field of one duplicated packet. In this case, to get one packet, the first part of the duplicated packet, ":3:5", is updated to ":0:0", the second part, "2001:db8:1:3:", is updated to "2001:db8:1:5:", and the first identifier in the packet (segment left) is set from 1 to 3. SID4 is filled in the DA field of another duplicated packet. In this case, to get one packet, the first part of the duplicated packet, ":3:5", is updated to ":0:0", the second part, "2001:db8:1:3:", is updated to "2001:db8:1:6:", and the first identifier in the packet (segment left) is set from 1 to 4. SID 5is filled in the DA field of the remaining duplicated packets. In this case, to get one packet, the first segment of the duplicated packet, ":3:5", is updated to ":0:0", the second segment, "2001:db8:1:3:", is updated to "2001:db8:1:7:", and the first identifier in the packet (segment left) is set from 1 to 5.

[0140] 9024: Device B sends corresponding packets to devices B1 to B3.

[0141] Then, device B transmits the obtained packets separately to devices indicated by SIDs whose positions are 3, 4, and 5 in the segment list, respectively, specifically devices B1 to B3. After receiving the packet transmitted by device A, device C also duplicates the packet three times according to the above-mentioned method, correspondingly modifies the DA field and the first identifier, and then transmits the corresponding packets separately to devices indicated by SIDs whose positions are 6, 7, and 8 in the segment list, respectively, specifically devices C1 to C3. In this embodiment of the present application, details are not described here.

[0142] After device B1 receives the packet sent by device B and corresponding to device B1, device B1 performs the function performed by the first device in the manner shown in Figure 2. Since device B is an egress node and is used as the first device in the network architecture shown in Figure 9, the packet transmission method performed by device B1 includes, but is not limited to, the following several steps:

[0143] 9031: The device B1 obtains a packet corresponding to the device B1, where the packet corresponding to the device B1 carries a destination address field and a node information list, where the destination address field includes a first part and a second part.

[0144] Device B1 receives the packet sent by device B.

[0145] 9032: Device B1 decapsulates the packet corresponding to device B1, based on the first portion indicating that there is no packet processing device after device B1, ie, device B1 is an egress node on the transmission path.

[0146] For example, device B1 reads the DA field of the packet corresponding to device B1 to obtain the following information: 1. The destination address field of the packet is the SID of device B1. 2. 1234:1234 in the destination address field indicates a duplication instruction. 3. The first part indicates that the device does not have a next packet processing device. Based on the above information, device B1 knows that the packet has been transmitted to the last device on the path, and does not further duplicate the packet, completing the transmission of the packet on the path. Optionally, because B1 is an egress node on the packet transmission path, B1 may further decapsulate the packet.

[0147] Similarly, after receiving the packet sent by device B, devices B2 and B3 also complete the transmission of the packet on the path according to the aforementioned packet processing method of device B1. After receiving the packet sent by device C, devices C1, C2, and C3 also complete the transmission of the packet on the path according to the aforementioned packet processing method of device B1. In this embodiment of the present application, details are not described here.

[0148] FIG. 10 illustrates a packet transmission path according to an embodiment of the present application. In this example, the packet transmission path is a multipath, i.e., point-to-multipoint-to-point, used in load balancing scenarios, active / standby protection scenarios, and redundant protection scenarios, etc. In this example, the packet transmission path is logically divided into layers, and the nodes through which the path passes through the same number of branches are used as nodes of the same layer. As shown in FIG. 10, node A is a packet processing device of the first layer, points B and C are packet processing devices of the second layer, D, E, F, and G are packet processing devices of the third layer, and H is a packet processing device of the fourth layer. FIG. 11 illustrates a hierarchical arrangement of a node information list according to an embodiment of the present application, and the node information list corresponds to the packet transmission path illustrated in FIG. 10. Optionally, the packet transmission method corresponding to FIG. 10 and FIG. 11 includes several steps as follows.

[0149] In this embodiment, A is used as the first device, and the packet transmission method performed by device A includes, but is not limited to, the following several steps:

[0150] 10011: Device A obtains a packet corresponding to device A, where the packet corresponding to device A carries a destination address field and a node information list, where the destination address field includes a second part and a first part.

[0151] Device A is used as an ingress node to obtain a packet corresponding to device A, including but not limited to device A obtaining a fifth packet, the fifth packet being a packet to be transmitted that is received by device A. Device A adds a node information list to the fifth packet, specifically, in this embodiment, encapsulates the packet using an SRH that carries a segment list as an IPv6 extension header, and the segment list in this embodiment carries the SID of device A. Device A adds a first part and a second part to the fifth packet based on the node information of device A. In this embodiment, device A fills in the first SID (SID0) in the segment list into the destination address field of the encapsulated packet to obtain a packet corresponding to device A.

[0152] 10012: Device A determines the node information of device B and the node information of device C from the node information list based on the first portion.

[0153] The first part identifies the location of device B's node information and device C's node information in the node information list.

[0154] 10013: The device A obtains the packets corresponding to the device B and the packets corresponding to the device C based on the packets corresponding to the device A.

[0155] After obtaining the packet corresponding to device A, device A obtains the packet corresponding to device B and the packet corresponding to device C based on the first portion and the node information list.

[0156] Optionally, the step of device A obtaining the packet corresponding to device B includes device A determining a number of target devices, including device B and device C, based on the first portion. Device A replicates the packet corresponding to device A a number of times equal to the number of target devices. Device A determines a position of device B's SID in a segment list based on the first portion, and obtains the SID of device B based on the position of device B's SID in the segment list. Device A updates a destination address field in one replicated packet corresponding to device A based on device B's SID. The first device updates the updated Duplicated Based on the packets, obtain the packets corresponding to device B.

[0157] Optionally, the packet further carries a first identifier, where the first identifier indicates a position of the SID of the current packet processing device in the segment list. After device A updates a destination address field in one duplicated packet corresponding to device A based on the SID of device B, device A further updates the first identifier of the duplicated packet corresponding to device A based on the SID of device B.

[0158] For example, device A reads the DA field to obtain the following information: there is a duplication instruction. The start and end positions of the SID of the next packet processing device in the segment list are 1 and 2, respectively. Based on the above information, device A knows that the packet needs to be duplicated twice and the devices to which the duplicated packets need to be sent are the devices indicated by the SIDs with sequence numbers 1 and 2, respectively. Device A duplicates the packet twice, locates SID1 and SID2 in the segment list, writes SID1 into the DA field of one duplicated packet and sets the first identifier in the packet (segment left) from 0 to 1. SID2 writes into the DA field of another duplicated packet and sets the first identifier in the packet from 0 to 2.

[0159] 10014: Device A sends a corresponding packet to device B and sends a corresponding packet to device C.

[0160] Device A sends two duplicated packets carrying different DA fields separately to corresponding devices, specifically devices B and C, based on their location in the network indicated by the node address in the DA field.

[0161] Similarly, after receiving the packet sent by device A, device B also copies the packet twice according to the above-mentioned method, correspondingly modifies the DA field and the first identifier, and then separately sends the corresponding packets to the devices indicated by the SIDs with sequence numbers 3 and 4, specifically to nodes D and E. After receiving the packet sent by node A, device C also copies the packet twice according to the above-mentioned method, correspondingly modifies the DA field and the first identifier, and then separately sends the corresponding packets to the devices indicated by the SIDs with sequence numbers 5 and 6, specifically to devices F and G.

[0162] After device D receives the packet corresponding to device D sent by device B, device D performs the function performed by the first device in the method shown in Figure 2. Since device D is an intermediate node and is used as the first device on the transmission path shown in Figure 10, the packet transmission method performed by device D includes, but is not limited to, the following several steps:

[0163] 10021: Device D obtains a packet corresponding to device D, where the packet corresponding to device D carries a destination address field and a node information list, where the destination address field includes a second part and a first part.

[0164] Device D directly receives the packet sent by device B and uses this packet as the packet corresponding to device D.

[0165] 10022: Device D determines node information of device H from the node information list based on the first portion.

[0166] The first part identifies the location of the node information for device H in the node information list.

[0167] 10023. The device D acquires the packet corresponding to the device H based on the packet corresponding to the device D.

[0168] After receiving the packet from device B, device D reads the DA field to obtain the following information: there is a duplication instruction. The device has only one next packet-processing device, specifically, the device indicated by the SID whose sequence number is 7. Device D duplicates the packet once based on the aforementioned information, and correspondingly modifies the DA field and the first identifier.

[0169] 10024: Device D sends a corresponding packet to device H.

[0170] Device D sends a packet to the device indicated by the SID whose sequence number is 7, i.e., device H. Similarly, E, F, and G also duplicate and update their corresponding packets according to the packet processing method of node D, and then send their corresponding packets to device H.

[0171] After receiving the packets respectively sent by D, E, F, and G, device H reads the DA field, knows that it is the last node on the packet transmission path, does not duplicate the packet, and completes the transmission of the packet on the path. Optionally, because device H is an egress node on the packet transmission path, device H may further decapsulate the packet.

[0172] Figure 12 is a schematic diagram of the structure of a packet transmitted by a node in a network architecture according to an embodiment of the present application. The packet transmission path in this embodiment is the path shown in Figure 7. In Figure 12, the "node" in the second column of the packet represents the node address, and the "leaf" in the third column represents the node pointer. As shown in Figure 12, in this embodiment, an ingress node device A is used as the first device, and the packet transmission method performed by device A includes, but is not limited to, the following several steps:

[0173] 12011: Device A obtains a packet corresponding to device A, where the packet corresponding to device A carries a destination address field and a node information list, where the destination address field includes a second part and a first part.

[0174] To obtain a packet corresponding to device A, device A first encapsulates the packet to be transmitted using the SRH as an IPv6 extension header, and then fills in the first SID (SID0) in the segment list into the destination address field of the encapsulated packet.

[0175] 12012: Device A determines the node information of device B and the node information of device C from the node information list based on the first part.

[0176] The first part identifies the location of device B's node information and device C's node information in the node information list.

[0177] 12013: Device A obtains packets corresponding to device B and packets corresponding to device C based on the packets corresponding to device A.

[0178] Optionally, the step of device A obtaining a packet corresponding to device B and a packet corresponding to device C includes device A determining a number of target devices, including device B and device C, based on the first portion. Device A replicates the packet corresponding to device A a number of times equal to the number of target devices. Device A determines a position of device B's SID in a segment list based on the first portion, and obtains the SID of device B based on the position of device B's SID in the segment list. Device A updates a destination address field in one replicated packet corresponding to device A based on the SID of device B. Device A updates the updated destination address field in one replicated packet corresponding to device A based on the SID of device B. Duplicated Based on the packet, device A obtains a packet corresponding to device B. Optionally, the packet further carries a first identifier, where the first identifier indicates the position of the SID of the current packet processing device in the segment list. After device A updates the destination address field in one replicated packet corresponding to device A based on the SID of device B, device A further updates the first identifier of the replicated packet corresponding to device A based on the SID of device B. Then, device A obtains another updated packet based on the position of the SID of device C in the segment list according to the same method.

[0179] Device A: Another Updated Tapa The SIDs in the packet are processed to obtain a processed packet. The node information list in the processed packet includes only the SIDs of packet processing devices that are located after device A on the transmission path.

[0180] For example, device A duplicates the packet twice based on a first portion in the destination address field of the packet corresponding to device A, then locates the SIDs of device B and device C in the segment list based on the first portion, and updates the destination address fields of the two duplicated packets separately based on the located SIDs. After the updated packet is obtained, device A performs the updated segment list to obtain the processed packet, so that the segment list in the processed packet only includes the node information of the packet processing device located after device A on the transmission path. Tapa Process the segment list in the packet.

[0181] For example, device A modifies the segment lists of two updated packets separately. In the packet sent by device A to device B, the packet transmission path in the segment list includes the path starting from device B to the egress node, and in the packet sent by device A to device C, the packet transmission path in the segment list includes the path starting from device C to the egress node. Then, the SIDs with sequence numbers of 0 in the modified packets are respectively filled in the destination address fields of the packets to form two packets sent to devices B and C, respectively.

[0182] 12014: Device A sends a corresponding packet to device B and sends a corresponding packet to device C.

[0183] Device A sends two packets with processed segment lists to corresponding devices, specifically devices B and C, separately based on the location information indicated by the node address in the DA field.

[0184] Note that in this case, the first identifiers of the two packets are both 0, indicating the position of the SID of the current packet processing device at number 1 in the segment list. However, in the packet sent by device A to device B, the first identifier 0, specifically the SID with sequence number 0 in the modified segment list, indicates device B. In the packet sent by A to C, the first identifier 0, specifically the SID with sequence number 0 in the modified segment list, indicates device C.

[0185] After device B receives the packet sent by device A and corresponding to device B, device B performs the function performed by the first device in the method shown in Figure 2. Since device B is an intermediate node and is used as the first device on the transmission path shown in Figure 12, the packet transmission method performed by device B includes, but is not limited to, the following several steps:

[0186] 12021: Device B obtains a packet corresponding to device B, where the packet corresponding to device B carries a destination address field and a node information list, where the destination address field includes the second part and the first part.

[0187] Device B directly receives the packet sent by device A and uses this packet as the corresponding packet for device B.

[0188] 12022: Device B determines node information of devices B1 to B3 from the node information list based on the first portion.

[0189] The first portion identifies the location of the node information for devices B1 through B3 within the node information list.

[0190] 12023: Device B obtains packets corresponding to devices B1 to B3, respectively, based on the packets corresponding to device B.

[0191] After receiving the packet sent by device A, device B reads the destination address field to obtain the duplication instruction, the number of next-hop packet processing devices, and the position of the next-hop device in the segment list. In this way, device B duplicates the packet three times to form three packets, respectively fills in SID1, SID2, and SID3 in the destination address fields of the duplicated packets, and then correspondingly modifies the first identifier of the packets.

[0192] 12024: Device B sends corresponding packets from devices B1 to B3.

[0193] Device B sends corresponding packets to devices B1, B2, and B3, respectively. Similarly, after receiving the packet sent by device A, device C also duplicates and updates the packet to form three packets, and then sends the three packets to devices C1, C2, and C3, respectively. This process is not described again here.

[0194] After receiving the packet sent by device B, device B1 reads the destination address field, learns that device B1 is an egress node on the packet transmission path, stops replicating, and completes the transmission of the packet on the path. Similarly, devices B2, B3, C1, C2, and C3 also learn that devices B2, B3, C1, C2, and C3 are egress nodes on the packet transmission path, and completes the transmission of the packet on the path.

[0195] Figure 13 is a schematic diagram of the structure of a packet transmitted by a node in a network architecture according to an embodiment of the present application. The method according to this embodiment can be implemented based on any one of the packet transmission methods described above. This is not limited in this embodiment of the present application. The packet transmission method in this example is implemented based on the method shown in Figure 12. In Figure 13, the "node" in the second column of the packet represents the node address, and the "leaf" in the third column represents the node pointer.

[0196] The packet transmission method performed by device A is the same as the packet transmission method performed by device A shown in Figure 12. After device B receives the packet sent by device A and corresponding to device B, device B performs the function performed by the first device in the method shown in Figure 2. Since device B is an intermediate node and is used as the first device on the transmission path shown in Figure 12, the packet transmission method performed by device B includes, but is not limited to, some of the following steps:

[0197] 13011: Device B obtains a packet corresponding to device B, where the packet corresponding to device B carries a destination address field and a node information list, where the destination address field includes the second part and the first part.

[0198] Device B directly receives the packet sent by device A and uses this packet as the corresponding packet for device B.

[0199] 13012: Device B determines node information of devices B1 to B3 from the node information list based on the first portion.

[0200] The first portion identifies the location of the node information for devices B1 through B3 within the node information list.

[0201] 13013: Based on the packet corresponding to device B, device B obtains packets corresponding to devices B1 to B3, respectively.

[0202] Device B receives the packet sent by device A based on the first portion, and determines the number of target devices, including devices B1 to B3. Device B replicates the packet corresponding to device B the same number of times as the number of target devices. Device B determines the positions of the node information of devices B1 to B3 in the node information list based on the first portion, and obtains the node information of device B1 based on the position of the node information of device B1 in the node information list. Device B updates the destination address field in one replicated packet corresponding to device B based on the node information of device B1. Device B updates the updated Duplicated Based on the packets, obtain the packets corresponding to device B1.

[0203] For example, device B reads the destination address field to obtain the duplication instruction, the number of the next packet processing device, and the position of the next device in the segment list. In this way, device B duplicates the packet three times to form three packets, writes SID1, SID2, and SID3 in the destination address fields of the duplicated packets, respectively, and then modifies the first identifier of the packets accordingly.

[0204] Optionally, device B is updated Duplicated Obtaining the packet corresponding to device B1 based on the packet is updated Duplicated The updated first portion of the packet indicates that there is no packet processing device located after device B1 on the transmission path. Duplicated popping an Internet Protocol version 6 IPv6 extension header in the packet; and using the packet as a packet corresponding to device B1 after popping the IPv6 extension header.

[0205] For example, based on the pointer carried in the destination address field of the updated packet indicating that there is no packet processing device after device B, e.g., the next packet processing devices after device B, i.e., B1 to B3, are egress nodes on the packet transmission path, device B pops up the IPv6 extension header of the updated packet and uses the packet that does not carry the IPv6 extension header as the packet corresponding to devices B1 to B3, respectively.

[0206] 13014: Device B sends corresponding packets to devices B1 to B3.

[0207] Device B uses packets that do not carry an IPv6 extension header as packets corresponding to devices B1 to B3, respectively, and transmits the packets to devices B1 to B3, respectively. Similarly, after receiving the packet transmitted by device A, device C replicates the packet three times, and then performs the same packet processing method as device B after replicating and updating the packet separately.

[0208] Next, the following examples are provided for compressing packet headers using a common prefix in the packet transmission method shown in FIG. 2, including but not limited to the following three compression schemes:

[0209] Compression Scheme 1: FIG. 14 is a schematic diagram of a compression encoding scheme used in a packet transmission method according to an embodiment of the present application.

[0210] The compression coding used in this embodiment of the present application is used for header compression. For a large amount of repeated field information in the header, a common prefix can be used to reduce the size of the header. In this embodiment of the present application, packet compression coding by using a common-prefix is ​​introduced to reduce redundant information in the header.

[0211] In the node information of each packet processing device, "one common prefix + one node identifier" may be used to represent the node address. In this compressed encoding scheme, only the node identifier needs to be carried, and the complete node address does not need to be carried in the node information, which reduces the size of the node information list. In addition, the node information may further carry a functional identifier and a node pointer. For example, in this example, the packet transmission path shown in FIG. 7 is used, and the IPv6 extension header used is SRH. In this example, one common prefix is ​​configured for the SID of the packet processing device in the segment list. The length of the common prefix is ​​96 bits, the length of the node identifier is 16 bits, the length of the functional identifier is 8 bits, the length of the node pointer is 8 bits, and the node pointer includes the start position and the end position of the next hop packet processing device, and the two fields occupy 4 bits each. In this encoding scheme in this example, the maximum number of node identifiers in the current network is 65535, the maximum number of SIDs in a packet is 15, and each device has a maximum of 15 next hop packet processing devices.

[0212] For example, in this example, the common prefix configured for the SIDs of the packet processing devices is as follows: 2001:db8:3:4:5:6:: / 96. The node identifiers of A / B / C / B1 / B2 / B3 / C1 / C2 / C3 are A0 / B0 / C0 / B1 / B2 / B3 / C1 / C2 / C3, respectively. When the SIDs of each device are configured to have 0xFE to represent the functional identifier, the packet sent by device A to device B may be the packet shown in FIG. 14. The "2001:db8:3:4:5:6:B0:FE35" in the destination address field of the IPv6 header indicates that the destination device is device B, the instruction is duplication, and the first portion points from 3 to 5. In the SRH extension header, the first identifier is set to 1. The "A0:FE12" in the segment list indicates the SID and device A with a sequence number of 0, the instruction is duplication, and the node pointer points from 1 to 2. "B0:FE35" refers to the SID and device B with sequence number 1, the instruction is a duplicate, and the node pointer points from 3 to 5. "C0:FE68" refers to the SID and device C with sequence number 2, the instruction is a duplicate, and the node pointer points from 6 to 8. "B1:FE00" refers to the SID and device B1 with sequence number 3, the instruction is a duplicate, and the node pointer points from 0 to 0. "B2:FE00" refers to the SID and device B2 with sequence number 4, the instruction is a duplicate, and the node pointer points from 0 to 0. "B3:FE00" refers to the SID and device B3 with sequence number 5, the instruction is a duplicate, and the node pointer points from 0 to 0. "C1:FE00" refers to the SID and device C1 with sequence number 6, the instruction is a duplicate, and the node pointer points from 0 to 0. "C2:FE00" refers to the SID and device C2 with sequence number 7, the command is a duplicate, and the node pointer points from 0 to 0. "C3:FE00" refers to the SID and device C3 with sequence number 8, the command is a duplicate, and the node pointer points from 0 to 0.From the compression encoding scheme shown in Fig. 14, it can be known that in the packet header compressed using the common prefix, the space of the node information list is reduced by half. In this way, the size of the packet is reduced, the response speed is increased, and the transmission efficiency of the packet on the packet transmission path is improved.

[0213] Compression Scheme 2: FIG. 15 is a schematic diagram of a compression encoding scheme used in a packet transmission method according to an embodiment of the present application.

[0214] On the packet transmission path, some devices may be designated as intermediate nodes and egress nodes. In this case, the device may be used as an intermediate node in a network domain to connect to other router nodes, and may also be used as an edge device to connect to user devices such as user hosts. The device used as an intermediate node and an egress node is called a composite node. For example, on the packet transmission path shown in FIG. 7, device B is designated as a composite node. Specifically, device B sends a packet to B1 / B2 / B3, and also duplicates the packet once, and continues to send the duplicated packet to an upper layer device or performs decapsulation processing. In other words, in the packet transmission method according to this embodiment, there are two types of packet decapsulation nodes, one is a composite node, and the other is the egress node described above. The two types of packet decapsulation nodes are called leaf nodes. In the method according to this embodiment of the present application, whether a node is a leaf node is indicated by carrying a leaf identifier in the node information of each device, in other words, whether a node needs to perform decapsulation is indicated using a leaf identifier. After determining that the device is a leaf node, the first part is used to further determine whether the node is a complex node or an egress node. If the node is a complex node, the packet is replicated once and the replicated packet is decapsulated. If the node is an egress node, the packet is directly decapsulated.

[0215] Optionally, two leaf identifiers may be assigned to the node information of a device, which are "node identifier + node used as leaf node" and "node identifier + node not used as leaf node", respectively. Optionally, the two leaf identifiers are combined with the node address of the device to form two types of node addresses of the device. For example, in the above compression encoding scheme, ::B001 and ::B002 are assigned to device B, indicating "node B identifier + node B used as leaf node" and "node B identifier + node B not used as leaf node", respectively.

[0216] Optionally, or alternatively, a separate leaf identifier may be assigned to the node information of a device, and the leaf identifier uses two values ​​to indicate whether the current node is a leaf node or not. For example, in a compressed encoding scheme, the encoding scheme of the node information is such that the common prefix occupies 96 bits, the node identifier occupies 16 bits, the function identifier occupies 7 bits, the leaf identifier occupies 1 bit, and the start and end positions of the next packet processing device in the node pointer occupy 4 bits respectively. If the leaf identifier bit has a value of "1", it indicates that the node is a leaf node. If the leaf identifier bit has a value of "0", it indicates that the node is not a leaf node.

[0217] For example, in the packet transmission path shown in FIG. 7, the IPv6 extension header is SRH. The packet sent by device A to device B may have the structure of the packet shown in FIG. 15. The common prefix of the packets is 2001:db8:3:4:5:6:: / 96. The node IDs of A / B / C / B1 / B2 / B3 / C1 / C2 / C3 are A0 / B0 / C0 / B1 / B2 / B3 / C1 / C2 / C3, respectively. The function identifier 0xFE is configured so that the node information of each device indicates a duplication command. "2001:db8:3:4:5:6:B0:FF35" in the destination address field of the IPv6 header indicates that the destination node is device B, the command is duplication, the leaf identifier indicates "the node is a leaf node", and the first part points from 3 to 5. Because the first part is not 0, device B is a composite node, and the packet needs to be duplicated once for decapsulation. In the SRH extension header, the first identifier is set to 1. "A0:FE12" in the segment list indicates SID and device A with sequence number 0, the instruction is a duplicate, the leaf identifier indicates "node is not a leaf node", and the first part points from 1 to 2. "B0:FF35" indicates SID and device B with sequence number 1, the instruction is a duplicate, the leaf identifier indicates "node is a leaf node", and the first part points from 3 to 5. Device B is a composite node because the first part is not 0. "C0:FE68" indicates SID and device C with sequence number 2, the instruction is a duplicate, the leaf identifier indicates "node is not a leaf node", and the first part points from 6 to 8.

[0218] In addition, in the segment list, "B1:FF00" indicates an SID with a sequence number of 3 and a device B1, the instruction is a duplication, the first part points from 0 to 0, and the leaf identifier indicates "the node is a leaf node". Since the first part is 0, B1 is an egress node and directly decapsulates the packet. "B2:FF00" indicates an SID with a sequence number of 4 and a device B2, the instruction is a duplication, the first part points from 0 to 0, and the leaf identifier indicates "the node is a leaf node". Since the first part is 0, B2 is an egress node. "B3:FF00" indicates an SID with a sequence number of 5 and a device B3, the instruction is a duplication, the first part points from 0 to 0, and the leaf identifier indicates "the node is a leaf node". Since the first part is 0, B3 is an egress node. "C1:FF00" indicates an SID and node C1 with sequence number 6, the instruction is a duplicate, the first part points from 0 to 0, and the leaf identifier indicates "the node is a leaf node". C1 is the exit node because the first part is 0. "C2:FF00" indicates an SID and device C2 with sequence number 7, the instruction is a duplicate, the first part points from 0 to 0, and the leaf identifier indicates "the node is a leaf node". C2 is the exit node because the first part is 0. "C3:FF00" indicates an SID and device C3 with sequence number 8, the instruction is a duplicate, the first part points from 0 to 0, and the leaf identifier indicates "the node is a leaf node". C3 is the exit node because the first part is 0.

[0219] The binary value of 0xFE is "1111,1110". The first 7 bits are all "1", which indicates the duplication function in this embodiment of the application. The 8th bit is 0, which indicates that the node is a leaf node, which indicates that the node is not a composite node. The binary value of 0xFF is "1111,1111". The first 7 bits are all "1", which indicates the duplication function in this embodiment of the application. The 8th bit is 1, which indicates that the node is a composite node. For example, device B has 0xFF, and the first part also indicates that device B has the following packet processing devices. Therefore, device B is a composite node. B1 / B2 / B3 / C1 / C2 / C3 is 0xF E where the first part indicates that B1 / B2 / B3 / C1 / C2 / C3 does not have a next packet processing device, and therefore B1 / B2 / B3 / C1 / C2 / C3 is an egress node.

[0220] Compression Scheme 3: FIG. 16 is a schematic diagram of a compression encoding scheme used in a packet transmission method according to an embodiment of the present application.

[0221] In this embodiment, the common prefix and the function identifier carried in the node information of each packet processing device shown in FIG. 14 are combined as a common prefix in this embodiment. For example, the 96-bit common prefix and the 8-bit function identifier shown in FIG. 14 are combined as a 104-bit common prefix in this embodiment, so that the original function identifier does not need to occupy the space of each node information, and the size of the node information list is further reduced. In another example, a length of 96 bits is still configured for the common prefix, and the common prefix carries the function identifier, so that the original function identifier does not need to occupy the space of each node information. In this example, the node information of each device further carries a leaf identifier and a node pointer. The leaf identifier occupies 8 bits, and the node pointer occupies 8 bits.

[0222] In the packet transmission path shown in FIG. 7, the IPv6 extension header is SRH. The packet sent by device A to device B may have the encoding scheme shown in FIG. 16. In this example, the common prefix configured for each device's SID is as follows, 2001:db8:3:4:5:6. The common prefix also identifies the function of this embodiment, that is, the command to be executed. The node IDs of A / B / C / B1 / B2 / B3 / C1 / C2 / C3 are A0 / B0 / C0 / B1 / B2 / B3 / C1 / C2 / C3, respectively. In the destination address field of the IPv6 header, "2001:db8:3:4:5:6:B0:0135" indicates that the destination node is device B, the command is duplication, the device is a leaf node, the first part points from 3 to 5, and the device is a composite node. In the SRH extension header, the current node identifier is set to 1. "A0:0012" in the address list indicates an SID and device A with sequence number 0, the instruction is a duplicate, the node is not a leaf node, and the node pointer points from 1 to 2. "B0:0135" indicates an SID and device B with sequence number 1, the instruction is a duplicate, the node is a leaf node, the node pointer points from 3 to 5, and the device is a composite device. "C0:0068" indicates an SID and device C with sequence number 2, the instruction is a duplicate, the node is not a leaf node, and the node pointer points from 6 to 8. "B1:0100" indicates an SID and device B1 with sequence number 3, the instruction is a duplicate, the node is a leaf node, the node pointer points from 0 to 0, and the node is an exit node. "B2:0100" indicates an SID and device B2 with sequence number 4, the instruction is a duplicate, the node is a leaf node, the node pointer points from 0 to 0, and the node is an exit node. "B3:0100" indicates SID and device B3 whose sequence number is 5, the instruction is a replica, the node is a leaf node, the node pointer points from 0 to 0, and the node is an exit node."C1:FF00" indicates an SID and device C1 with sequence number 6, the instruction is a duplicate, the node is a leaf node, the node pointer points from 0 to 0, and the node is an exit node. "C2:FF00" indicates an SID and device C2 with sequence number 7, the instruction is a duplicate, the node is a leaf node, the node pointer points from 0 to 0, and the node is an exit node. "C3:FF00" indicates an SID and device C3 with sequence number 8, the instruction is a duplicate, the node is a leaf node, the node pointer points from 0 to 0, and the node is an exit node.

[0223] Optionally, each packet processing device further acquires a forwarding information base (FIB), the FIB includes a configuration structure of a 128-bit IPv6 address, and a common prefix "2001:db8:3:4:5:6" indicates the same part of the node address and the copy and forward function of the packet processing device on the packet transmission path, and has a length of 96 bits. The node identifier has a length of 16 bits and is combined with the same part of the common prefix to form a complete node address indicating the location of the device in the network. The leaf identifier has a length of 8 bits and identifies whether the node is a leaf node. The start position and the end position of the SID of the next packet processing device in the segment list are 4 bits long respectively. After receiving the packet, each device reads the destination address field, queries the aforementioned information based on the FIB, and then copies, updates and transmits the packet accordingly.

[0224] Figure 17 shows a packet transmission device according to an embodiment of the present application. Based on the multiple modules shown in Figure 17 below, the packet transmission device shown in Figure 17 can perform all or part of the operations performed by the first device in the packet transmission method shown in Figures 2 to 16. It should be understood that the device may include more additional modules than the modules shown, or may omit some of the modules shown. This is not limited in this embodiment of the present application. The device according to this embodiment of the present application is used in the first device and includes an acquisition module 1701 and a transmission module 1704.

[0225] Optionally, the acquisition module 1701 is configured to acquire a first packet. The first packet carries a destination address field and a node information list. The node information list includes node information of a second device and node information of a third device. The second device and the third device are next packet processing devices located after the first device on the transmission path of the first packet. The destination address field includes a first part and a second part. The second part indicates the position of the first device in the network. The first part indicates the position of the node information of the second device and the third device in the node information list. The node information of both the second device and the third device includes a node address and a node pointer. The node address indicates the position of an arbitrary device in the network. The node pointer indicates the position of the node information of the next packet processing device located after the arbitrary device on the transmission path in the node information list.

[0226] Optionally, the acquisition module 1701 is configured to determine node information of the second device and node information of the third device from the node information list based on the first portion, the first portion identifying positions of the node information of the second device and the node information of the third device in the node information list.

[0227] Optionally, the acquisition module 1701 is further configured to generate a second packet and a third packet based on the first packet, where the second packet includes node information of the second device and the third packet includes node information of the third device.

[0228] Optionally, the transmitting module 1704 is configured to transmit the second packet to a second device and transmit the third packet to a third device.

[0229] Optionally, the first portion includes a start position and an end position of the node information of the second device and the node information of the third device in the node information list, where the position of the node information of the second device in the node information list is a start position and the position of the node information of the third device in the node information list is an end position. Alternatively, the first portion indicates a start position of the node information of the second device in the node information list and indicates an offset of the position of the third device in the node information list relative to the position of the second device in the node information list.

[0230] Optionally, the acquisition module 1701 is configured to duplicate the first packet based on the first portion to obtain a fourth packet, and add node information of the second device to the fourth packet to obtain a second packet.

[0231] Optionally, the acquisition module 1701 is configured to: determine a number of target devices, including the second device and the third device, based on the first portion, replicate the first packet a number of times equal to the number of target devices, acquire a second packet based on node information of the second device, the second packet carrying an updated second portion and an updated first portion, wherein the updated second portion indicates a position of the second device in the network, and the updated first portion indicates a position in the node information list of the node information of the next packet processing device after the second device on the transmission path.

[0232] Optionally, the acquisition module 1701 is configured to determine a position of the second device in the node information list based on the first portion, acquire node information of the second device based on the position of the second device in the node information list, update a destination address field in one fourth packet based on the node information of the second device, and acquire the second packet based on the updated fourth packet.

[0233] Optionally, the acquisition module 1701 is configured to use the updated fourth packet as the second packet, or, based on the updated first portion in the updated fourth packet indicating that there is no packet processing device located after the second device on the transmission path, pop-up an Internet Protocol version 6 IPv6 extension header in the updated fourth packet and use the packet as the second packet after popping up the IPv6 extension header.

[0234] Optionally, the acquisition module 1701 is configured to process the node information list in the updated fourth packet to obtain a processed packet, where the node information list in the processed packet includes only information about packet processing nodes located after the first device on the transmission path, and use the processed packet as the second packet, or pop-up an IPv6 extension header in the processed packet based on the updated first portion in the processed packet indicating that there is no packet processing device located after the second device on the transmission path, and use the packet as the second packet after popping up the IPv6 extension header.

[0235] In a possible embodiment, the first device is an ingress node on a transmission path of the first packet. To acquire the first packet, the acquiring module 1701 is configured to acquire a fifth packet, and add the second part, the first part, and a node information list to the fifth packet, where the node information list further includes node information of the first device, and the second part and the first part are acquired based on the node information of the first device.

[0236] For example, the first packet is an SRv6 packet, the node information list is carried in a segment routing header SRH of the SRv6 packet, and the node information list is a segment list of the SRH. Alternatively, the first packet is an IPv6 packet, the node information list is carried in a routing header RH of the IPv6 packet, and the node information list is a segment list of the RH. Alternatively, the first packet is an IPv6 packet, the node information list is carried in a destination options header DOH of the IPv6 packet, and the node information list is an address list of the DOH.

[0237] In a possible embodiment, the first packet, the second packet, and the third packet each further carry a first identifier, where the first identifier indicates a position of the node information of the current packet processing device within the node information list.

[0238] In a possible implementation, the first packet further carries a leaf identifier, and the leaf identifier indicates whether the first device is a leaf node, and the leaf node is a device that needs to decapsulate the first packet. FIG. 18 illustrates a packet transmission device according to an embodiment of the present application. Based on the device illustrated in FIG. 17, the device according to this embodiment of the present application further includes a decapsulation module 1702. The decapsulation module 1702 is configured to duplicate the first packet at least once to obtain a fourth packet, and decapsulate the fourth packet based on the leaf identifier carried in the first packet indicating that the first device is a leaf node and the first portion indicating that there is a packet processing device located after the first device on the transmission path. Alternatively, the decapsulation module 1702 decapsulates the first packet based on the leaf identifier carried in the first packet indicating that the first device is a leaf node and the first portion indicating that there is no packet processing device located after the first device on the transmission path.

[0239] For example, two identifiers are configured for a first device, one of the two leaf identifiers indicates that the first device is a leaf node and the other leaf identifier indicates that the first device is not a leaf node. The first packet carries one of the two leaf identifiers. Alternatively, one leaf identifier is configured for the first device, the leaf identifier has a first value and a second value, the first value indicates that the first device is a leaf node and the second value indicates that the first device is not a leaf node, and the value of the leaf identifier carried in the first packet is the first value or the second value.

[0240] In a possible embodiment, the second portion includes a common prefix and a node identifier, where the common prefix includes the same portion of the node address in the node information of the packet processing devices on the transmission path, and the node identifier indicates a different portion of the node address in the node information of the packet processing devices on the transmission path. The common prefix further includes the same function identifier of the packet processing devices on the transmission path. The function identifier indicates a function to be performed by each device.

[0241] In a possible implementation, the first device is an intermediate node on the transmission path of the first packet. Figure 19 shows a packet transmission device according to an embodiment of the present application. Based on the device shown in Figure 17, the device according to this embodiment of the present application further includes a determining module 1703. Optionally, the determining module 1703 is configured to determine that the second part carried in the first packet is the address of the first device in the network, i.e., the second part matches the address of the first device, before the acquiring module 1701 acquires the second packet corresponding to the second device and the third packet corresponding to the third device based on the first part and the node information list. Optionally, the sending module 1704 is further configured to determine, based on the determining module 1703, that the second portion of the first packet is not an address of the first device in the network before the acquiring module 1701 acquires the second packet corresponding to the second device and the third packet corresponding to the third device based on the first portion and the node information list, and forward the first packet based on the second portion carried in the first packet.

[0242] It should be understood that when the device provided in Figures 17 to 19 implements the functions of the device, the division into the above-mentioned functional modules is only used as an example for explanation. In actual application, the above-mentioned functions can be assigned to different functional modules for implementation based on requirements. In other words, the device is divided into different functional modules in terms of internal structure to implement all or part of the functions described above. In addition, the embodiments of the device and the method provided in the above-mentioned embodiments relate to the same concept. For the specific implementation process of the device, please refer to the embodiment of the method. Details will not be described again here.

[0243] Figure 20 is a schematic diagram of the structure of a packet transmission device 2000 according to an exemplary embodiment of the present application. The packet transmission device 2000 shown in Figure 20 may be configured to perform operations related to the first device in the packet transmission method shown in Figures 2 to 16. The packet transmission device 2000 is, for example, a switch or a router, and the packet transmission device 2000 may be implemented using a general bus architecture.

[0244] As shown in FIG. 20, the packet transmission device 2000 includes at least one processor 2001, a memory 2003, and at least one communication interface 2004.

[0245] The processor 2001 may be, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits configured to implement the solutions of the present application. For example, the processor 2001 may include an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or another programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The PLD may be, for example, a complex programmable logic device (CPLD), a field programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 2001 may implement or execute various logical blocks, modules, and circuits described with reference to the contents disclosed in the embodiments of the present invention. Alternatively, the processor may be a combination of processors that perform computing functions, such as a combination of one or more microprocessors, or a combination of a DSP and a microprocessor.

[0246] Optionally, the packet transmission device 2000 further includes a bus. The bus is configured to transmit information between components of the packet transmission device 2000. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be classified into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used for representation in FIG. 20, but this does not mean that there is only one bus or only one type of bus.

[0247] The memory 2003 may be, for example, but not limited to, a read-only memory (ROM) or another type of static storage device capable of storing static information and instructions, or a random access memory (RAM) or another type of dynamic storage device capable of storing information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or another type of compact disc storage, an optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, and Blu-ray discs, etc.), a magnetic disc storage medium or another magnetic storage device, or any other medium that can be used to hold or store appropriate program code in the form of instructions or data structures and that can be accessed by a computer. For example, the memory 2003 exists independently and is connected to the processor 2001 using a bus. Alternatively, the memory 2003 and the processor 2001 may be integrated together.

[0248] The communication interface 2004 is configured to communicate with another device or a communication network using any transceiver type device. The communication network may be an Ethernet, a radio access network (RAN), or a wireless local area network (WLAN), etc. The communication interface 2004 may include a wired communication interface and may further include a wireless communication interface. Specifically, the communication interface 2004 may be an Ethernet interface, a fast ethernet (FE) interface, a gigabit ethernet (GE) interface, an asynchronous transfer mode (ATM) interface, a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. In this embodiment of the present application, the communication interface 2004 may be used by the packet transmission device 2000 to communicate with another device.

[0249] In a particular implementation, in an embodiment, the processor 2001 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 20. Each of the processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may be one or more devices, circuits, and / or processing cores configured to process data (e.g., computer program instructions).

[0250] In a particular implementation, in an embodiment, the packet transmission device 2000 may include multiple processors, such as the processor 2001 and the processor 2005 shown in FIG. 20. Each of the processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor here may be one or more devices, circuits, and / or processing cores configured to process data (e.g., computer program instructions).

[0251] In a particular implementation, in an embodiment, the packet transmission device 2000 may further include an output device and an input device. The output device may communicate with the processor 2001 and display information in a number of ways. For example, the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device may communicate with the processor 2001 and receive input by a user in a number of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensing device, etc.

[0252] In some embodiments, the memory 2003 is configured to store a program code 2010 for executing the solution of the present application, and the processor 2001 may execute the program code 2010 stored in the memory 2003. In other words, the packet transmission device 2000 may use the processor 2001 and the program code 2010 in the memory 2003 to implement the packet transmission method provided in the method embodiment. The program code 2010 may include one or more software modules. Optionally, the processor 2001 may also store a program code or instruction for executing the solution of the present application.

[0253] In a specific embodiment, the packet transmission device 2000 in this embodiment of the present application may correspond to the first device in the above-mentioned embodiment of the packet transmission method. The processor 2001 in the packet transmission device 2000 reads the instruction in the memory 2003, so that the packet transmission device 2000 shown in FIG. 20 can perform all or part of the operations performed by the first device.

[0254] Specifically, the processor 2001 is configured to send a second packet to the second device using the communication interface, the second packet including the updated first portion and a node address list, and the updated first portion indicates a location of a next device in the node address list of the second device that processes the packet. For brevity, other optional embodiments will not be described again here.

[0255] In another example, the packet transmission device 2000 in this embodiment of the present application may correspond to the second device in the above-mentioned method embodiment. The processor 2001 in the packet transmission device 2000 reads the instruction in the memory 2003, so that the packet transmission device 2000 shown in FIG. 20 can perform all or part of the operations performed by the second device.

[0256] Specifically, the processor 2001 is configured to receive, using the communication interface, a second packet sent by the first device to the second device, the second packet including an updated first portion and a node address list, the updated first portion indicating a location of a next device of the second device in the node address list that processes the packet. For brevity, other optional embodiments will not be described again here.

[0257] The packet transmission device 2000 may further correspond to the packet transmission apparatus shown in Figures 17 to 19, and each functional module in the packet transmission apparatus is implemented using software of the packet transmission device 2000. In other words, the functional modules included in the packet transmission apparatus are generated after the processor 2001 of the packet transmission device 2000 reads the program code 2010 stored in the memory 2003.

[0258] The steps of the packet transmission method shown in Figures 2 to 16 are completed using instructions in the form of integrated logic circuits of hardware or software in the processor of the packet transmission device 2000. The steps of the method disclosed with reference to the embodiments of the present application may be directly executed by a hardware processor, or may be executed using a combination of hardware and software modules in the processor. The software modules may be arranged in a mature storage medium such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register in the art. The storage medium is arranged in the memory, and the processor reads the information in the memory and completes the steps in the aforementioned method together with the hardware in the processor. To avoid repetition, the details will not be described again here.

[0259] Figure 21 is a schematic diagram of the structure of a packet transmission device 2100 according to another exemplary embodiment of the present application. The packet transmission device 2100 shown in Figure 21 is configured to perform all or part of the operations in the packet transmission method shown in Figures 2 to 16. The packet transmission device 2100 is, for example, a switch or a router, and the packet transmission device 2100 can be implemented using a general bus architecture.

[0260] As shown in FIG. 21, the packet transmission device 2100 includes a main control board 2110 and an interface board 2130.

[0261] The main control board is also called a main processing unit (MPU) or a route processor card. The main control board 2110 is a multi-function peripheral including route calculation, device management, device maintenance, and protocol processing functions. Packet Transmission 21 is configured to control and manage the components within the device 2100. The main control board 2110 includes a central processing unit 2111 and a memory 2112.

[0262] The interface board 2130 is also called a line processing unit (LPU), a line card, or a service board. The interface board 2130 is configured to provide various service interfaces and transfer data packets. The service interfaces include, but are not limited to, an Ethernet interface, a packet over SONET / SDH (POS) interface, and the like. The Ethernet interface is, for example, a flexible Ethernet service interface (flexible ethernet clients, FlexE Clients). The interface board 2130 includes a central processing unit 2131, a network processor 2132, a forwarding entry memory 2134, and a physical interface card (PIC) 2133.

[0263] A central processing unit 2131 on the interface board 2130 is configured to control and manage the interface board 2130 and to communicate with the central processing unit 2111 on the main control board 2110.

[0264] The network processor 2132 is configured to perform packet forwarding processing. The network processor 2132 may take the form of a forwarding chip. The forwarding chip may be a network processor (NP). In some embodiments, the forwarding chip may be implemented using an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Specifically, the network processor 2132 is configured to forward the received packet based on a forwarding table stored in the forwarding entry memory 2134. If the destination address field of the packet is Packet Transmission If it is the address of the device 2100, the network processor 2132 continues to transmit the packet to a higher layer device for processing by a CPU (e.g., central processing unit 2131). Packet Transmission If it is not the address of the device 2100, the network processor 2132 finds the next hop and outbound interface corresponding to the destination address field in the forwarding table based on the destination address field, and forwards the packet to the outbound interface corresponding to the destination address field. Processing the uplink packet may include processing the packet by using the inbound interface and looking up the forwarding table. Processing the downlink packet may include looking up the forwarding table, etc. In some embodiments, the central processing unit may also perform the functions of a forwarding chip, for example, implementing software forwarding based on a general-purpose CPU, such that the interface board does not need a forwarding chip.

[0265] The physical interface card 2133 is configured to implement a physical layer interconnection function. Original traffic enters the interface board 2130 from the physical interface card 2133, and processed packets are sent out from the physical interface card 2133. The physical interface card 2133, also called a sub card, may be incorporated in the interface board 2130, and is responsible for converting optical / electrical signals into packets, performing validity checks on the packets, and then forwarding the packets to the network processor 2132 for processing. In some embodiments, the central processing unit 2131 may alternatively perform the functions of the network processor 2132, for example, implementing software forwarding based on a general-purpose CPU, so that the physical interface card 2133 does not require the network processor 2132.

[0266] Optionally, the packet transmission device 2100 includes multiple interface boards. For example, the packet transmission device 2100 further includes an interface board 2140, which includes a central processing unit 2141, a network processor 2142, a forwarding entry memory 2144, and a physical interface card 2143. The functions and implementations of the components in the interface board 2140 are the same as or similar to those of the interface board 2130, and the details will not be described again here.

[0267] Optionally, the packet transmission device 2100 further includes a switching substrate 2120. The switching substrate 2120 may also be referred to as a switch fabric unit (SFU). When the packet transmission device has multiple interface substrates, the switching substrate 2120 is configured to complete data exchange between the interface substrates. For example, the interface substrate 2130 and the interface substrate 2140 may communicate with each other through the switching substrate 2120.

[0268] The main control board 2110 is coupled to the interface board. For example, the main control board 2110, the interface board 2130, the interface board 2140, and the switching board 2120 are connected to a system backboard using a system bus for interworking. In a possible embodiment, an inter-process communication (IPC) channel is established between the main control board 2110 and the interface board 2130 and between the main control board 2110 and the interface board 2140, and the communication between the main control board 2110 and the interface board 2130 and between the main control board 2110 and the interface board 2140 is performed through the IPC channel.

[0269] Logically, the packet transmission device 2100 includes a control plane and a forwarding plane. The control plane includes a main control board 2110 and a central processing unit 2111. The forwarding plane includes components used for forwarding, such as a forwarding entry memory 2134, a physical interface card 2133, and a network processor 2132. The control plane performs the following functions: router functions, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining network device states. The control plane distributes the generated forwarding tables to the forwarding plane. On the forwarding plane, the network processor 2132 searches the forwarding table distributed by the control plane, and then forwards packets received by the physical interface card 2133 based on the table. The forwarding table distributed by the control plane may be stored in the forwarding entry memory 2134. In some embodiments, the control plane and the forwarding plane may be completely separate and are not on the same network device.

[0270] It should be noted that there may be one or more main control boards. When there are multiple main control boards, the main control board may include an active main control board and a standby main control board. There may be one or more interface boards. A packet transmission device with stronger data processing capability provides more interface boards. There may also be one or more physical interface cards on the interface board. There may be no switching board, or there may be one or more switching boards. When there are multiple switching boards, load balancing and redundant backup may be implemented together. In a centralized forwarding architecture, the packet transmission device may not require a switching board, and the interface board provides the function of processing service data of the entire system. In a distributed forwarding architecture, the packet transmission device may have at least one switching board, and data exchange between multiple interface boards is implemented using the switching board to provide large-capacity data exchange and processing capability. Therefore, the data access and processing capability of the packet transmission device in the distributed architecture is superior to that of the packet transmission device in the centralized architecture. Optionally, the packet transmission device may alternatively be in a form with only one card. Specifically, there is no switching board, and the functions of the interface board and the main control board are integrated on the card. In this case, the central processing unit on the interface board and the central processing unit on the main control board may be combined as one central processing unit on the card to execute the functions obtained after the two central processing units are combined. This form of packet transmission device (e.g., network devices such as low-end switches or routers) has weak data exchange and processing capabilities. The specific architecture to be used depends on the specific networking deployment scenario, which is not limited here.

[0271] In a particular embodiment, the packet transmission device 2100 corresponds to the packet transmission apparatus used in the first device shown in Figure 17. In some embodiments, the acquisition module 1701 and the transmission module 1704 in the packet transmission apparatus shown in Figure 17 correspond to the physical interface card 2133 in the packet transmission device 2100.

[0272] In some embodiments, the packet transmission device 2100 further corresponds to the packet transmission apparatus used in the first device shown in Figure 18. In some embodiments, the acquisition module 1701 and the transmission module 1704 in the packet transmission apparatus shown in Figure 18 correspond to the physical interface card 2133 in the packet transmission device 2100. The decapsulation module 1702 corresponds to the central processing unit 2111 or the network processor 2132 in the packet transmission device 2100.

[0273] In some embodiments, the packet transmission device 2100 further corresponds to the packet transmission apparatus used in the first device shown in Figure 19. In some embodiments, the acquisition module 1701 and the transmission module 1704 in the packet transmission apparatus shown in Figure 19 correspond to the physical interface card 2133 in the packet transmission device 2100. 2 corresponds to the central processing unit 2111 or the network processor 2132 in the packet transmission device 2100.

[0274] Based on the packet transmission device shown in Figure 20 and Figure 21, an embodiment of the present application further provides a packet transmission system. The system includes a first device and a second device. Optionally, the first device is the packet transmission device 2000 shown in Figure 20 or the packet transmission device 2100 shown in Figure 21, and the second device is the packet transmission device 2000 shown in Figure 20 or the packet transmission device 2100 shown in Figure 21.

[0275] For the packet transmission method performed by the first device and the second device, please refer to the relevant description of the first device and the second device in the embodiments shown in Figures 2 to 16. The details will not be described again here.

[0276] An embodiment of the present application further provides a communication device. The device includes a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other using an internal connection path. The memory is configured to store instructions. The processor is configured to execute the instructions stored in the memory to control the transceiver to receive a signal and to control the transceiver to transmit a signal. In addition, when the processor executes the instructions stored in the memory, the processor is enabled to execute a packet transmission method that needs to be performed by a first device.

[0277] An embodiment of the present application further provides a communication device. The device includes a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other using an internal connection path. The memory is configured to store instructions. The processor is configured to execute the instructions stored in the memory to control the transceiver to receive a signal and to control the transceiver to transmit a signal. In addition, when the processor executes the instructions stored in the memory, the processor is enabled to execute a packet transmission method that needs to be performed by a second device.

[0278] It is to be understood that the processor may be a central processing unit (CPU) or another 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 discrete gate or transistor logic device, or a discrete hardware component, or the like. The general-purpose processor may be a microprocessor or any conventional processor, or the like. It is noted that the processor may be a processor supporting the advanced reduced instruction set computing machines (ARM) architecture.

[0279] Further, in an optional embodiment, the memory may include read-only memory and random access memory to provide instructions and data to the processor. The memory may further include non-volatile random access memory. For example, the memory may further store device type information.

[0280] The memory may be volatile or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM) and is used as an external cache. By way of example and not limitation, many forms of RAM may be used, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM).

[0281] An embodiment of the present application further provides a computer-readable storage medium, the storage medium storing at least one instruction, the instruction being loaded and executed by a processor to implement any one of the aforementioned packet transmission methods.

[0282] The embodiments of the present application further provide a computer program (product). When the computer program is executed by a computer, the processor or the computer can be enabled to perform corresponding steps and / or procedures of the packet transmission method in the above-mentioned method embodiments.

[0283] An embodiment of the present application further provides a chip including a processor configured to retrieve from the memory and execute instructions stored in the memory so as to enable a communication device in which the chip is embedded to perform the packet transmission method of the aforementioned aspect.

[0284] An embodiment of the present application further provides another chip including an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected using an internal connection path. The processor is configured to execute a code in the memory. When the code is executed, the processor is configured to execute the packet transmission method in the aforementioned aspect.

[0285] All or part of the above-mentioned embodiments may be implemented using software, hardware, firmware, or any combination thereof. When software is used to implement the embodiments, some or all of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or another programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired (e.g., coaxial cable, optical fiber, or digital subscriber line) or wireless (e.g., infrared, radio, or microwave) manner. The computer-readable storage medium may be any available medium accessible by a computer, or may be a data storage device, such as a server or data center, incorporating one or more available media. The usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, or a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid-state disk), and the like.

[0286] Those skilled in the art may recognize that the implementation can be performed using software, hardware, firmware, or a combination thereof with reference to the method steps and modules described in the embodiments disclosed herein. In order to clearly describe the compatibility of hardware and software, the above generally describes the steps and configurations of each embodiment based on functions. Whether a function is performed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but the implementation should not be considered to go beyond the scope of this application.

[0287] Those skilled in the art may understand that all or part of the steps of the embodiment may be implemented by hardware or a program that instructs related hardware. The program may be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a magnetic disk, an optical disk, etc.

[0288] When software is used to implement the embodiments, some or all of the embodiments may be implemented in the form of a computer program product. A computer program product includes one or more computer program instructions. For example, the methods in the embodiments of the present application may be described in the context of machine-executable instructions. Machine-executable instructions are program modules that execute on devices, such as target real or virtual processors. Typically, program modules include routines, programs, libraries, objects, classes, components, and data structures, etc., that perform specific tasks or implement specific abstract data structures. In various embodiments, the functionality of the program modules may be combined or divided among the described program modules. The machine-executable instructions used in the program modules may be executed locally or in distributed devices. In distributed devices, the program modules may be located in both local and remote storage media.

[0289] The computer program code used to implement the methods in the embodiments of the present application may be written in one or more programming languages. The computer program code may be provided to a processor of a general purpose computer, a special purpose computer, or another programmable data processing apparatus, such that when the program code is executed by the computer or another programmable data processing apparatus, the functions / operations specified in the flowcharts and / or block diagrams are performed. The program code may be executed entirely on the computer, partially on the computer, as a separate software package, partially on the computer and partially on a remote computer, or entirely on a remote computer or server.

[0290] In the context of the embodiments of the present application, the computer program code or associated data may be carried by any suitable carrier to enable a device, an apparatus, or a processor to perform the various processes and operations described above. Examples of the carrier include signals and computer readable media, etc.

[0291] Examples of signals may include electrical, optical, radio, acoustic, or other forms of propagated signals, such as carrier and infrared signals.

[0292] A machine-readable medium may be any tangible medium that contains or stores a program used or associated with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More specific examples of machine-readable storage media include an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0293] For the sake of convenience, those skilled in the art may clearly understand that the detailed operation processes of the aforementioned systems, devices and modules may refer to the corresponding processes in the aforementioned method embodiments, and will not be described in detail herein.

[0294] In some embodiments provided in the present application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the described device embodiment is only an example. For example, the division into modules is only a logical division of functions, and may be other divisions in actual implementation. For example, multiple modules or components may be combined or integrated as another system, or some features may be ignored or not implemented. In addition, the shown or described mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between devices or modules may be electrical connections, mechanical connections, or other forms of connections.

[0295] The modules described as separate parts may or may not be physically separate, and the parts shown as modules may or may not be physical modules, and may be located in one location or distributed across multiple network modules. Some or all of the modules may be selected based on actual requirements to achieve the objectives of the solutions in the embodiments of the present application.

[0296] In addition, the functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist physically alone, or two or more modules may be integrated into one module. The integrated module may be implemented in the form of hardware or in the form of a software functional module.

[0297] When the integrated module is implemented in the form of a software function module and sold or used as an independent product, the integrated module may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be essentially implemented in the form of a software product, or the part that contributes to the prior art, or all or part of the technical solution. The computer software product is stored in a storage medium and includes some instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes any medium, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, that can store program code.

[0298] In this application, terms such as "first" and "second" are used to distinguish the same or similar items whose effects and functions are basically the same. It should be understood that there is no logical or chronological order dependency between "first", "second" and "nth", and the number and execution order are not limited. It should be further understood that terms such as "first" and "second" are used in the following description to describe various elements, and these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, the first image may be called the second image, and similarly, the second image may be called the first image, without departing from the scope of the various examples. Both the first image and the second image may be images, and in some cases, may be separate and different images.

[0299] It should be further understood that the sequence numbers of the processes do not mean the execution order in the embodiments of the present application. The execution order of the processes should be determined based on the functions and internal logic of the processes, and should not be construed as any limitation on the implementation process of the embodiments of the present application.

[0300] In this application, the term "at least one" means one or more, and the term "plurality" means two or more. For example, a plurality of second packets means two or more second packets. The terms "system" and "network" may be used interchangeably herein.

[0301] It should be understood that the terminology used in the description of the various examples herein is intended to describe particular examples only and is not intended to constitute a limitation. As used in the description of the various examples and the appended claims, the singular forms "one" ("a" and "an") and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise.

[0302] It is further understood that the term "and / or" as used herein indicates and includes any and all possible combinations of one or more of the associated enumerated items. The term "and / or" describes an association relationship between associated objects and represents that three relationships may exist. For example, A and / or B may represent the following three cases: only A is present, both A and B are present, and only B is present. In addition, the symbol " / " in this application generally indicates an "or" relationship between associated objects.

[0303] It is to be further understood that the term "including" (or alternatively referred to as "includes," "including," "comprises," and / or "comprising"), as used herein, specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0304] It is further understood that the term "if" can be interpreted as meaning "when" or "upon," "in response to determining," or "in response to detecting." Similarly, depending on the context, the phrase "when determined to be" or "when (a stated condition or event) is detected" can be interpreted as meaning "when determined to be" or "in response to determining" or "when (a stated condition or event) is detected" or "in response to detecting (a stated condition or event)."

[0305] It should be understood that determining B based on A does not mean that B is determined based only on A; B may alternatively be determined based on A and / or other information.

[0306] It should be further understood that the term "one embodiment," "an embodiment," or "possible implementation" referred to throughout this specification means that the particular features, structures, or characteristics associated with the embodiment or implementation are included in at least one embodiment of the present application. Thus, the terms "in one embodiment," "in an embodiment," or "in a possible implementation" appearing throughout this specification do not necessarily refer to the same embodiment. In addition, these particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0307] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Nohara Any modifications, equivalent replacements, or improvements made without departing from the principles thereof shall be within the scope of protection of this application. [Explanation of symbols]

[0308] 1701 Acquisition Module 1702 Decapsulation Module 1703 Decision Module 1704 Transmitting Module 2000 Packet Transmission Device 2001 Processor 2003 Memory 2004 Communication Interface 2005 Processor 2010 Program Code 2100 Packet Transmission Device 2110 Main control board 2111 Central Processing Unit 2112 Memory 2120 Switching Board 2130 Interface Board 2131 Central Processing Unit 2132 Network Processor 2133 Physical Interface Card 2134 Forwarding Entry Memory 2140 Interface Board 2141 Central Processor 2142 Network Processor 2143 Physical Interface Card 2144 forwarding entry memory

Claims

1. 1. A packet transmission method, comprising: obtaining, by a first device, a first packet, the first packet carrying a destination address field and a node information list, the node information list including node information of a second device and node information of a third device, and the destination address field including a first portion; determining, by the first device, the node information of the second device and the node information of the third device from the node information list based on the first portion, the first portion identifying a location of the node information of the second device and the node information of the third device in the node information list; generating, by the first device, a second packet and a third packet based on the first packet, the second packet including the node information of the second device, and the third packet including the node information of the third device; transmitting, by the first device, the second packet to the second device and the third packet to the third device; Including, the first portion indicates that the location of the node information of the second device in the node information list is a start location and the location of the node information of the third device in the node information list is an end location; or The first portion indicates that the position of the node information of the second device in the node information list is a starting position and indicates an offset of the position of the third device in the node information list relative to the position of the second device in the node information list. Packet transmission method.

2. The step of generating, by the first device, a second packet based on the first packet, further comprises: replicating, by the first device, the first packet based on the first portion to obtain a fourth packet; adding, by the first device, the node information of the second device to the fourth packet to obtain the second packet; 2. The method of claim 1, comprising:

3. the first device is an ingress node on a transmission path of the first packet; The step of acquiring a first packet by a first device includes: receiving, by the first device, a fifth packet to obtain the first packet, and adding the first portion and a second portion to a destination address field of the fifth packet, the second portion identifying an address of the first device; 3. The method of claim 1 or 2, comprising:

4. the first device is an intermediate node on a transmission path of the first packet, and the destination address field further includes a second portion; and prior to the step of generating, by the first device, a second packet and a third packet based on the first packet, the method further comprises: determining, by the first device, that the second portion matches an address of the first device; 3. The method of claim 1 or 2, further comprising:

5. the first packet is a Segment Routing over Internet Protocol version 6 (SRv6) packet, the node information list is carried in a Segment Routing Header (SRH) of the SRv6 packet, and the node information list is a segment list of the SRH; or the first packet is an IPv6 packet, the node information list is carried in a routing header (RH) of the IPv6 packet, and the node information list is a segment list of the RH; or 5. The method of claim 1, wherein the first packet is an IPv6 packet, the node information list is carried in a Destination Options Header (DOH) of the IPv6 packet, and the node information list is an address list of the DOH.

6. 6. The method of claim 1, wherein the first packet, the second packet, and the third packet each further carry a first identifier, the first identifier indicating a position of node information of a current packet processing device in the node information list.

7. A packet transmission apparatus, the apparatus being applied to a first device, the apparatus comprising: an acquiring module configured to acquire a first packet, the first packet carrying a destination address field and a node information list, the node information list including node information of a second device and node information of a third device, and the destination address field including a first portion; The acquisition module is further configured to determine the node information of the second device and the node information of the third device from the node information list based on the first portion, the first portion identifying a location of the node information of the second device and the node information of the third device in the node information list; an acquisition module further configured to generate a second packet and a third packet based on the first packet, the second packet including the node information of the second device, and the third packet including the node information of the third device; a transmission module configured to transmit the second packet to the second device and to transmit the third packet to the third device; Equipped with the first portion indicates that the location of the node information of the second device in the node information list is a start location and the location of the node information of the third device in the node information list is an end location; or the first portion indicates a position of the node information of the second device in the node information list as a starting position and indicates an offset of a position of the third device in the node information list relative to a position of the second device in the node information list; Packet transmission equipment.

8. 8. The apparatus of claim 7, wherein the acquisition module is configured to duplicate the first packet based on the first portion to acquire a fourth packet, and add the node information of the second device to the fourth packet to acquire the second packet.

9. the first device is an ingress node on a transmission path of the first packet; 9. The apparatus of claim 7 or 8, wherein the acquisition module is configured to: receive a fifth packet to acquire the first packet; and add the first portion and the second portion to a destination address field of the fifth packet, the second portion identifying an address of the first device.

10. The first device is an intermediate node on a transmission path of the first packet, and the destination address field further includes a second portion, and the apparatus further comprises: a determination module configured to determine that the second portion matches an address of the first device before the acquisition module is configured to generate the second packet and the third packet based on the first packet.

10. The apparatus of claim 7, further comprising:

11. the first packet is a Segment Routing over Internet Protocol version 6 (SRv6) packet, the node information list is carried in a Segment Routing Header (SRH) of the SRv6 packet, and the node information list is a segment list of the SRH; or the first packet is an IPv6 packet, the node information list is carried in a routing header (RH) of the IPv6 packet, and the node information list is a segment list of the RH; or 11. The apparatus of claim 7, wherein the first packet is an IPv6 packet, the node information list is carried in a destination options header (DOH) of the IPv6 packet, and the node information list is an address list of the DOH.

12. 12. The apparatus of claim 7, wherein the first packet, the second packet, and the third packet each further carry a first identifier, the first identifier indicating a position of node information of a current packet processing device in the node information list.

13. The first packet further carries a leaf identifier, the leaf identifier indicating that the first device is a leaf node, the apparatus further comprising: a decapsulation module; 13. The apparatus of claim 7, wherein the decapsulation module is configured to decapsulate a first packet acquired by duplication based on the leaf identifier and the first portion after the acquisition module acquires the first packet.

Citation Information

Patent Citations

  • Multicast delivery system of packet

    JP2000354063A

  • Packet transmission method, relay node and receiving node

    JP2007221521A

  • Method and network device for forwarding packets

    JP2020535712A

  • Stateless multicast in IP networks

    US20200119991A1