Packet processing method, device and system

JP7636440B2Active Publication Date: 2025-02-26HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2022574595
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-06-19
Filing Date
2021-05-15
Publication Date
2025-02-26
Estimated Expiration
2041-05-15

AI Technical Summary

Benefits of technology

【0143】 本出願の目的、技術的解決策、および有益な効果は、前述の特定の実施態様で詳細にさらに説明されている。前述の説明は、本出願の特定の実施態様にすぎないことを理解されたい。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007636440000001
    Figure 0007636440000001
  • Figure 0007636440000002
    Figure 0007636440000002
  • Figure 0007636440000003
    Figure 0007636440000003
Patent Text Reader

Abstract

The present application provides a packet processing method, device, and system. The method includes: a second network device receiving an IPv6 packet transmitted by a first network device, the IPv6 packet including an IPv6 header and a first IPv6 extension header; the first IPv6 extension header indicating that the network device receiving the IPv6 packet should perform an operation in the first IPv6 extension header in a data plane; and the second network device performing the operation in the first IPv6 extension header in the data plane of the second network device based on the IPv6 header and the first IPv6 extension header. This ensures that the network device receiving the IPv6 packet can forward the IPv6 packet successfully.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to Chinese Patent Application No. CN202010508115.7, filed on June 5, 2020, and entitled "PACKET PROCESSING METHOD, DEVICE, AND SYSTEM," and claims priority to Chinese Patent Application No. CN202010566025.3, filed on June 19, 2020, and entitled "PACKET PROCESSING METHOD, DEVICE, AND SYSTEM," both of which are incorporated by reference in their entireties.

[0002] The present application relates to the field of communications technology, and in particular to packet processing methods, devices and systems. [Background technology]

[0003] Internet Protocol version 6 (IPv6) is a set of specifications designed by the Internet Engineering Task Force (IETF) as an upgraded version of Internet Protocol version 4 (IPv4). IPv6, also known as IP Next Generation (IPng), is the second generation of standard network layer protocols.

[0004] IETF Request For Comments (RFC) 8200 describes and explains the definition, packet encapsulation format, and functions of IPv6. Compared to IPv4, IPv6 has the following characteristics: (1) IPv6 extends the length of the Internet Protocol (IP) address from 32 bits to 128 bits, improving addressing capabilities; (2) IPv6 packet headers are simplified; (3) IPv6 supports more flexible extensions and options; (4) IPv6 supports flow label capabilities; and (5) IPv6 supports authentication and privacy protection capabilities.

[0005] In practical application scenarios, RFC8200 does not specify any specific behavior for extension headers in IPv6 packets. Each network device manufacturer performs private configuration based on the service requirements of the network device manufacturer. However, the private configuration of the network device manufacturer may affect the normal packet forwarding process of the network device in the IP network. Summary of the Invention

[0006] The present application provides a packet processing method, device and system to solve the problem in the prior art that an IPv6 packet cannot be forwarded successfully by a network device that receives the packet. [Means for solving the problem]

[0007] According to a first aspect, a packet processing method is provided, the method including: a second network device receiving an IPv6 packet sent by a first network device, the IPv6 packet including an IPv6 header and a first IPv6 extension header, the first IPv6 extension header indicating that a network device receiving the IPv6 packet should perform an operation in the first IPv6 extension header in a data plane, the first IPv6 extension header being a next header of the IPv6 header, and the second network device performing the operation in the first IPv6 extension header in a data plane of the second network device based on the IPv6 header and the first IPv6 extension header.

[0008] Based on the solution provided in the present application, the second network device performs an operation within an IPv6 extension header in the IPv6 packet in a corresponding processing plane to ensure that the IPv6 packet can be forwarded successfully by the second network device.

[0009] In a possible implementation of the first aspect, the IPv6 header includes next header information, and the second network device performing an operation in the first IPv6 extension header in a data plane of the second network device based on the IPv6 header and the first IPv6 extension header includes the second network device determining, based on the next header information, that the next header of the IPv6 header is the first IPv6 extension header, and performing an operation in the first IPv6 extension header in a data plane of the second network device based on the first IPv6 extension header.

[0010] In another possible implementation of the first aspect, the first IPv6 extension header includes option information, the option information includes option type information, option length information, and option data, the option type information indicates a type of the option information and a length of the option data, and the option length information indicates a length of the option data, and before the second network device performs an operation in the first IPv6 extension header at a data plane of the second network device based on the IPv6 header and the first IPv6 extension header, the method further includes the second network device determining that the option type information can be identified, and the second network device determining the length of the option data based on the option type information rather than based on the option length information.

[0011] In yet another possible implementation of the first aspect, the first IPv6 extension header includes option information, the option information includes option type information, option length information, and option data, the option type information indicates a type of the option information and a length of the option data, and the option length information indicates a length of the option data, and before the second network device performs an operation in the first IPv6 extension header at a data plane of the second network device based on the IPv6 header and the first IPv6 extension header, the method further includes the second network device determining that the option type information cannot be identified, and the second network device determining a length of the option data based on the option length information.

[0012] In yet another possible implementation of the first aspect, the IPv6 packet further includes a second IPv6 extension header, the second IPv6 extension header indicating that a network device receiving the IPv6 packet should perform an operation in the second IPv6 extension header in a control plane, the second IPv6 extension header being a next header to the first IPv6 extension header, and the method further includes the second network device performing the operation in the second IPv6 extension header in a control plane of the second network device based on the first IPv6 extension header and the second IPv6 extension header.

[0013] According to a second aspect, there is provided a packet processing method, the method including: a first network device generating an IPv6 packet, the IPv6 packet including an IPv6 header and a first IPv6 extension header, the IPv6 header indicating a protocol type of the IPv6 packet is IPv6, the first IPv6 extension header indicating that a network device receiving the IPv6 packet should perform an operation in the first IPv6 extension header in a data plane, the first IPv6 extension header being a next header to the IPv6 header, and the first network device transmitting the IPv6 packet to a second network device.

[0014] According to the solution provided in the present application, a first network device sends an IPv6 packet carrying an IPv6 header and an IPv6 extension header to a second network device. Correspondingly, in order to ensure that the IPv6 packet can be forwarded successfully by the second network device, the second network device receives the IPv6 packet sent by the first network device, and performs an operation in the IPv6 extension header in a corresponding processing plane of the second network device based on the IPv6 header and the IPv6 extension header in the IPv6 packet.

[0015] In a possible implementation of the second aspect, the first IPv6 extension header includes option information, the option information including option type information, option length information, and option data, the option type information indicating a type of the option information and a length of the option data, and the option length information indicating the length of the option data.

[0016] In another possible implementation of the second aspect, the IPv6 packet further includes a second IPv6 extension header, the second IPv6 extension header indicating that a network device receiving the IPv6 packet should perform an action in the second IPv6 extension header in a control plane, the second IPv6 extension header being a next header of the first IPv6 extension header.

[0017] In the first or second aspect, optionally, the IPv6 header includes next header information, where the next header information indicates that the next header of the IPv6 header is a first IPv6 extension header.

[0018] In the first or second aspect, optionally, the next header information further indicates that a network device receiving the IPv6 packet should process the first IPv6 extension header in the data plane.

[0019] In the first or second aspect, optionally, the first IPv6 extension header includes optional information, the optional information including option type information and optional data, and the option type information indicates a type of the optional information and a length of the optional data.

[0020] In the first or second aspect, optionally, the first IPv6 extension header includes first option information and second option information, the first option information includes first option type information and first option data, the second option information includes second option type information and second option data, the first option type information indicates a type of the first option information and a length of the first option data, and the second option type information indicates a type of the second option information and a length of the second option data.

[0021] In the first or second aspect, optionally, the first IPv6 extension header includes a bitmap, the bitmap including a first bit and a second bit, the first bit indicating the first option type information and the second bit indicating the second option type information.

[0022] In the first or second aspect, optionally, the first IPv6 extension header includes processing plane information, the processing plane information indicating that a network device receiving the IPv6 packet should perform an operation in the first IPv6 extension header in the data plane.

[0023] In the first or second aspect, optionally, the first IPv6 extension header includes processing policy information, the processing policy information indicating an action to be performed by a network device receiving the IPv6 packet with respect to at least one optional information included in the first IPv6 extension header.

[0024] In the first or second aspect, optionally, the first IPv6 extension header is processed by a network device at each hop in a path for transmitting the IPv6 packet.

[0025] According to a third aspect, a network device is provided. The network device has a function of implementing the behavior of the first network device in the aforementioned method. The function may be implemented based on hardware, or based on hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functions.

[0026] In a possible design, the structure of the network device includes a processor and an interface. The processor is configured to support the network device in performing corresponding functions in the aforementioned method. The interface is configured to support communication between the network device and another network device and to receive information or instructions used in the aforementioned method from the other network device. The network device may further include a memory. The memory is coupled to the processor and configured to store program instructions and data required for the network device.

[0027] In another possible design, the network device includes a processor, a transmitter, a receiver, a random access memory, a read-only memory, and a bus. The processor is separately coupled to the transmitter, the receiver, the random access memory, and the read-only memory via the bus. When the network device needs to operate, a basic input / output system pre-installed in the read-only memory or a bootloader in the embedded system in the read-only memory is used for booting to bootstrap the network device to enter a normal operating state. After the network device enters a normal operating state, an application and an operating system are operated in the random access memory to enable the processor to execute the method in the first aspect or any one of the possible implementations of the first aspect.

[0028] According to a fourth aspect, a network device is provided. The network device includes a main control board and an interface board, and may further include a switching board. The network device is configured to execute the method according to the first aspect or any one of the possible implementations of the first aspect. Specifically, the network device includes a module configured to execute the method according to the first aspect or any one of the possible implementations of the first aspect.

[0029] According to a fifth aspect, a network device is provided. The network device includes a controller and a first forwarding subdevice. The first forwarding subdevice includes an interface board and may further include a switching board. The first forwarding subdevice is configured to perform the function of the interface board in the fourth aspect and may further perform the function of the switching board in the fourth aspect. The controller includes a receiver, a processor, a transmitter, a random access memory, a read-only memory, and a bus. The processor is separately coupled to the receiver, the transmitter, the random access memory, and the read-only memory via the bus. When the controller needs to be operated, in order to boot the controller to enter a normal operating state, a bootloader of a basic input / output system or an embedded system pre-installed in the read-only memory is used to boot the system to be started. After the controller enters a normal operating state, an application and an operating system are operated in the random access memory to enable the processor to perform the function of the main control board in the fourth aspect.

[0030] According to a sixth aspect, a computer storage medium is provided. The computer storage medium is configured to store a program, code, or instruction used by the network device. When executing the program, code, or instruction, a processor or hardware device can perform the function or step of the first network device in the first aspect.

[0031] According to a seventh aspect, a network device is provided. The network device has a function of implementing the behavior of the second network device in the aforementioned method. This function may be implemented based on hardware, or based on hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functions.

[0032] In a possible design, the structure of the network device includes a processor and an interface. The processor is configured to support the network device in performing corresponding functions in the aforementioned method. The interface is configured to support communication between the network device and another network device and to transmit information or instructions used in the aforementioned method to the other network device. The network device may further include a memory. The memory is coupled to the processor and configured to store program instructions and data required for the network device.

[0033] In another possible design, the network device includes a processor, a transmitter, a receiver, a random access memory, a read-only memory, and a bus. The processor is separately coupled to the transmitter, the receiver, the random access memory, and the read-only memory via the bus. When the network device needs to be operated, in order to boot the network device to enter a normal operating state, a bootloader of a basic input / output system or an embedded system pre-installed in the read-only memory is used to boot the system to be started. After the network device enters a normal operating state, an application and an operating system are operated in the random access memory to enable the processor to execute the method in the second aspect or any one of the possible implementations of the second aspect.

[0034] According to an eighth aspect, a network device is provided. The network device includes a main control board and an interface board, and may further include a switching board. The network device is configured to execute the method according to the second aspect or any one of the possible implementations of the second aspect. Specifically, the network device includes a module configured to execute the method according to the second aspect or any one of the possible implementations of the second aspect.

[0035] According to a ninth aspect, a network device is provided. The network device includes a controller and a second forwarding subdevice. The second forwarding subdevice includes an interface board and may further include a switching board. The second forwarding subdevice is configured to perform the function of the interface board in the eighth aspect and may further perform the function of the switching board in the eighth aspect. The controller includes a receiver, a processor, a transmitter, a random access memory, a read-only memory, and a bus. The processor is separately coupled to the receiver, the transmitter, the random access memory, and the read-only memory via the bus. When the controller needs to be operated, in order to boot the controller to enter a normal operating state, a bootloader of a basic input / output system or an embedded system pre-installed in the read-only memory is used to boot the system to be started. After the controller enters a normal operating state, an application and an operating system are operated in the random access memory to enable the processor to perform the function of the main control board in the eighth aspect.

[0036] According to a tenth aspect, a computer storage medium is provided. The computer storage medium is configured to store a program, code, or instruction used by the network device described above. When executing the program, code, or instruction, a processor or hardware device can perform the functions or steps of the network device in the second aspect.

[0037] According to an eleventh aspect, there is provided a network system. The network system includes a first network device and a second network device. The first network device is the network device of the third, fourth, or fifth aspect, and the second network device is the network device of the seventh, eighth, or ninth aspect.

[0038] According to the aforementioned solution, after receiving an IPv6 packet sent by a first network device, the second network device performs an operation in the IPv6 extension header in a corresponding processing plane of the second network device based on the IPv6 header and the IPv6 extension header in the IPv6 packet, to ensure that the IPv6 packet can be forwarded successfully by the second network device. [Brief description of the drawings]

[0039] [Figure 1] FIG. 1 is a schematic diagram of the structure of a communication network according to an embodiment of the present application; [Diagram 2] FIG. 2 is a schematic diagram of the structure of another communication network according to an embodiment of the present application; [Diagram 3] 2 is a flowchart of a packet processing method according to an embodiment of the present application. [Figure 4] 2 illustrates a packet header format of an IPv6 packet according to an embodiment of the present application. [Diagram 5] 2 illustrates a format of an IPv6 extension header according to an embodiment of the present application. [Figure 6a] 1 illustrates a format of an option in an IPv6 extension header according to an embodiment of the present application. [Figure 6b] 1 illustrates a format of an option in an IPv6 extension header according to an embodiment of the present application. [Figure 6c] 1 illustrates a format of an option in an IPv6 extension header according to an embodiment of the present application. [Figure 7] FIG. 2 is a schematic diagram of the structure of a second network device according to an embodiment of the present application; [Figure 8] FIG. 2 is a schematic diagram of a hardware structure of a second network device according to an embodiment of the present application; [Figure 9] FIG. 13 is a schematic diagram of a hardware structure of another second network device according to an embodiment of the present application. [Figure 10] FIG. 2 is a schematic diagram of the structure of a first network device according to an embodiment of the present application; [Figure 11] FIG. 2 is a schematic diagram of a hardware structure of a first network device according to an embodiment of the present application; [Figure 12] FIG. 2 is a schematic diagram of a hardware structure of another first network device according to an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0040] The following uses specific embodiments to describe the technical solutions of the present application in detail.

[0041] FIG. 1 is a schematic diagram of a structure of a communication network according to an embodiment of the present application. As shown in FIG. 1, the communication network may be an IP network. The communication network includes a first network device and a second network device. The first network device may send an IPv6 packet to the second network device. Thus, the communication network may be an IPv6 network. The first network device includes a router, a layer 3 switch, a terminal device, or a server. The second network device includes a router, a layer 3 switch, a terminal device, or a server. The first network device or the second network device may be a hardware device, such as a router or a switch, or a virtual network device disposed in a hardware device. When the first network device or the second network device is a hardware device, the first network device or the second network device may include one or more forwarding boards, each forwarding board including a physical port used to communicate with another network device, and each forwarding board may include a central processing unit (CPU).

[0042] The first network device may transmit the IPv6 packet to the second network device using a wired link. For example, the first network device is a router, and the second network device is also a router. The first network device may transmit the IPv6 packet to the second network device using a wireless link. For example, the first network device is a terminal device, and the second network device is a base station. The IPv6 packet may be generated by the first network device. For example, the first network device generates the IPv6 packet and then transmits the IPv6 packet to the second network device. Alternatively, the IPv6 packet may be forwarded using the first network device. For example, the first network device receives an IPv6 packet sent by a network device of a previous hop of the first network device, processes the IPv6 packet, and forwards the processed IPv6 packet to the second network device. The second network device processes the IPv6 packet after receiving the IPv6 packet sent by the first network device. If the second network device is connected to a next-hop network device, the second network device may further forward the processed IPv6 packet to the next-hop device.

[0043] As shown in Fig. 1, the second network device may include a control plane and a data plane. The control plane is configured to control and manage the operation of network protocols in the communication network and provide various network information and forwarding entries required by the data plane. The data plane may also be called a forwarding plane or a user plane, and is configured to process and forward various types of data at the interface of the network device. In addition, the second network device may further include a management plane. The management plane is for system operation and maintenance personnel and provides input and output, user management, license, and monitoring, configuration, alarms, and statistics of managed objects. In a possible embodiment, the management plane is not configured separately, and the functions of the management plane are included in the control plane.

[0044] In a possible embodiment, the control plane and the data plane of the second network device are implemented in the same functional entity, for example, as shown in FIG. 8 of the present application. FIG. 8 illustrates a hardware implementation of the second network device. The processor of FIG. 8 is configured to implement the control plane and the data plane of the second network device. In another possible embodiment, the control plane and the data plane of the second network device are implemented in different functional entities, for example, as shown in FIG. 9 of the present application. FIG. 9 illustrates another hardware implementation of the second network device. In FIG. 9, the main control board is configured to implement the control plane of the second network device, and the interface board is configured to implement the data plane of the second network device. Specifically, the central processing unit on the main control board is configured to implement the control plane of the second network device, and the central processing unit on the interface board is configured to implement the data plane of the second network device. In addition, the main control board and the interface board of FIG. 9 may be implemented by two independent network devices. In other words, the second network device includes two independent network devices, and the two independent network devices respectively implement the control plane and the data plane.

[0045] The second network device receives the IPv6 packet sent by the first network device, where the IPv6 packet includes a packet header and a payload. According to the definition of RFC8200, the packet header of the IPv6 packet includes an IPv6 header (Section 3 of RFC8200). The IPv6 header includes Next Header information, which may also be referred to as a Next Header field. When the value of the Next Header information in the IPv6 header is 0, it indicates that the next header of the IPv6 header is a Hop-by-Hop Options Header. For ease of explanation, in this application, "HBH header" is used to represent the Hop-by-Hop Options Header. The HBH header being the next header of the IPv6 header means that the HBH header immediately follows the IPv6 header. Specifically, the HBH header is encapsulated between the IPv6 header and the payload of the IPv6 packet and is adjacent to the IPv6 header. As described in Section 4.3 of RFC8200, the HBH header is processed by the network device at each hop of the path for transmitting the IPv6 packet. Additionally, the HBH header contains optional information that is processed by network devices at each hop along the path for transmitting the IPv6 packet.

[0046] The HBH header includes option information. For details, please refer to section 4.2 of RFC8200. The option information includes option type information, option data length information, and option data. The length of the option type information is 8 bits. The two most significant bits of the option type information determine the operation to be performed by the network device when the network device receiving the IPv6 header cannot identify the option type information. For example, if the values ​​of the two most significant bits are 00, it indicates that the network device skips the option information and continues to process the header of the IPv6 packet. The specific processing process further includes processing the header indicated by the next header information in the HBH header in the IPv6 packet. If the values ​​of the two most significant bits are 01, it indicates that the network device discards the IPv6 packet. If the values ​​of the two most significant bits are 10 or 11, it indicates that the network device discards the IPv6 packet and sends a message including Internet Control Message Protocol (ICMP) parameters. Therefore, RFC8200 specifies a simple action (skipping the option information or discarding the packet) to be performed on an IPv6 packet containing an HBH header when the option type information in the HBH header cannot be identified. However, RFC8200 does not specify a specific action method for an IPv6 packet containing an HBH header. Currently, the processing method commonly used by network devices of various vendors is as follows: the network device determines that the value of the next header information in the IPv6 header in the IPv6 packet is 0, and the network device can determine that the next header of the IPv6 header is the HBH header. Then, the network device transmits the IPv6 packet from the data plane of the network device to the control plane of the network device.The network device processes all IPv6 packets including the HBH header in the control plane of the network device. As a result, not only the load on the control plane of the network device is increased, but also the normal forwarding of the IPv6 packets may be affected. For example, the option type information in the HBH header can be identified by the data plane of the network device, but cannot be identified by the control plane of the network device. After determining that the IPv6 packet includes the HBH header, the network device directly sends the IPv6 packet to the control plane of the network device. After receiving the IPv6 packet, the control plane of the network device may skip the HBH header or directly discard the IPv6 packet. As a result, this processing method affects the normal forwarding of the IPv6 packets. For example, the network device processes all IPv6 packets including the HBH header in the control plane of the network device. However, the bandwidth resource of the channel between the data plane and the control plane of the network device is limited. When a large amount of IPv6 packets are transmitted to the control plane through the channel, packets may be lost due to the insufficient bandwidth resource of the channel. As a result, this processing method affects the normal forwarding of the IPv6 packets.

[0047] In order to solve the aforementioned problem, the present application provides a corresponding solution. Please refer to FIG. 1. A first network device sends an IPv6 packet to a second network device, and the second network device receives the IPv6 packet. The IPv6 packet includes an IPv6 header and an IPv6 extension header, and the IPv6 extension header indicates that the network device receiving the IPv6 packet should perform an operation in the IPv6 extension header in a data plane or a control plane. After receiving the IPv6 packet sent by the first network device, the second network device performs the operation in the IPv6 extension header in a corresponding processing plane of the second network device based on the IPv6 header and the IPv6 extension header in the IPv6 packet. This ensures that the IPv6 packet can be forwarded successfully by the second network device.

[0048] 2 is a schematic diagram of the structure of another communication network according to an embodiment of the present application. As shown in FIG. 2, the communication network includes routers R0, R1, R2, R3, R4, and R5. The routers R0, R1, R2, and R3 are connected in sequence via links, and the router R4 is connected to the routers R2 and R3 via links. The router R0 is further connected to a server via a link, and the router R3 is further connected to a user equipment via a link. In addition, the communication network further includes a network management device, and the network management device is connected to the routers R1, R2, R3, and R4 via links. The communication network includes an In-situ Flow Information Telemetry (iFIT) network domain, and the iFIT network domain includes routers R1, R2, R3, and R4. The router R1 is an ingress node of the iFIT network domain, the routers R2 and R4 are intermediate nodes of the iFIT network domain, and the router R3 is an egress node of the iFIT network domain. Router R0 may be an edge router. The server may send IPv6 packets to the user equipment via router R0 and the iFIT network domain. The server may also receive IPv6 packets sent by the user equipment via router R0 and the iFIT network domain.

[0049] This embodiment of the present application provides an explanation using an example in which a server sends an IPv6 packet to a user equipment. A network device in the iFIT network domain may perform in situ flow service performance measurement on a data flow and report the measurement result to a network management device. In the network shown in FIG. 2, when a server sends a data flow including an IPv6 packet to a user equipment through routers R0, R1, R2, and R4, the reporting method of the iFIT network domain may be set to egress node reporting. Specifically, router R4 is responsible for reporting the measurement result to the network management device. In this way, the IPv6 extension header provided in the present application may be used to implement in situ flow service performance measurement in the iFIT network domain. The IPv6 extension header provided in the present application is an improvement of the HBH header defined in RFC8200, and therefore may be referred to as a "new HBH header". In this embodiment of the present application, unless a special explanation is added, the "HBH header" means the HBH header defined in RFC8200, and the "new HBH header" means the IPv6 extension header proposed in the present application.

[0050] Router R1 is an ingress node of the iFIT network domain and is responsible for initiating a corresponding measurement based on an in situ flow service performance measurement task received from a network management device. Specifically, router R1 receives a packet (which may be an IPv6 packet) sent by router R0. A first new HBH header is encapsulated in the packet to obtain an IPv6 packet. The IPv6 packet includes an IPv6 header and a first new HBH header. The first new HBH header is the next header of the IPv6 header. Router R1 sends the IPv6 packet to router R2. After receiving the IPv6 packet, router R2 may determine an operation in the first new HBH header to be performed by router R2 in the data plane based on the IPv6 header and the first new HBH header. Specifically, the first new HBH header includes option information, and the type indicated by the option type information in the option information is an in situ flow service performance measurement (e.g., detection in the iFIT network domain). The option data in the option information indicates a specific operation (e.g., delay detection) corresponding to the measurement task. Router R2 performs measurement tasks according to the instructions of the option type information, performs specific operations according to the instructions of the option data, and adds the measurement results to the option data in the option information. Router R2 then sends the updated IPv6 packet to router R3. Router R3 performs in situ flow service performance measurements in the same manner as router R2, and reports the measurement results to the network management device. The IPv6 packet further includes an iFIT header. Typically, the iFIT header can be encapsulated in the payload in the IPv6 packet.

[0051] In the embodiment shown in FIG. 2, in situ flow service performance measurement in the iFIT network domain may be performed based on the new HBH header. Conversely, if the new HBH header in this application is not used but the HBH header defined in RFC8200 is used as the next header of the IPv6 header, the router R1 may directly send the received IPv6 packet to the control plane of the router R1. The control plane of the router R1 may skip the HBH header or directly discard the IPv6 packet. As a result, the in situ flow service performance measurement cannot be performed and the IPv6 packet cannot be forwarded normally. In addition, the network devices in the network may be made by different vendors. According to RFC8200, the definition of the corresponding operation in the HBH header is determined based on the configuration of the network device. Therefore, due to different configurations from different vendors, the services may fail to be interconnected.

[0052] 3 is a flowchart of a packet processing method according to an embodiment of the present application. The method shown in FIG. 3 can be applied to the network structure shown in FIG. 1 or FIG. 2. In this embodiment of the present application, for ease of description, a "first network device" and a "second network device" are used in the description. It should be understood that the "first network device" may be the router R1 in FIG. 2, and the "second network device" may be the router R2 or the router R3 in FIG. 2. Specifically, the method includes the following steps:

[0053] S101: A first network device generates an IPv6 packet, the IPv6 packet including an IPv6 header and a first IPv6 extension header, the first IPv6 extension header indicating that a network device receiving the IPv6 packet should perform an operation in the first IPv6 extension header in a data plane.

[0054] S102: The first network device sends an IPv6 packet to the second network device.

[0055] In a possible embodiment, the first network device receives a first packet sent by a network device of a previous hop of the first network device. The first packet is not an IPv6 packet. The first network device then encapsulates the first packet as an IPv6 packet according to the IPv6 protocol. In another possible embodiment, the first network device receives a first packet sent by a network device of a previous hop of the first network device. The first packet is an IPv6 packet. The first network device then updates the first packet to obtain an IPv6 packet. The updating process includes adding a first IPv6 extension header to the first packet.

[0056] Referring to the above embodiment, the first IPv6 extension header may be a new HBH header. FIG. 4 shows the format of the IPv6 header and the first IPv6 extension header in the IPv6 packet. The IPv6 header indicates that the protocol type of the IPv6 packet is IPv6. The IPv6 header includes version information, traffic class information, flow label information, payload length information, next header information, hop limit information, source address information, and destination address information. For example, the value of the next header information in the IPv6 header (for ease of explanation, the next header information in the IPv6 header is hereinafter referred to as the "first next header information") is TBD. TBD indicates that the next header of the IPv6 header is the first IPv6 extension header. In other words, as shown in FIG. 4, the first IPv6 extension header is encapsulated between the IPv6 header and the payload of the IPv6 packet and is adjacent to the IPv6 header. "TBD" is merely an example representation and specific values ​​may be determined by the relevant standards body.

[0057] The value of the first next header information being TBD indicates that the next header of the IPv6 header is the first IPv6 extension header. In addition, the value of the first next header information being TBD may further indicate that the network device receiving the IPv6 packet should process the first IPv6 extension header in the data plane. In other words, if the network device receiving the IPv6 packet determines that the value of the first next header information is TBD, the network device processes the IPv6 packet in the data plane of the network device instead of sending the IPv6 packet to the control plane of the network device for processing. This is obviously different from the implementation of the HBH header specified in RFC8200 in the above-mentioned embodiment.

[0058] In one embodiment of the present application, the first IPv6 extension header is processed by a network device at each hop of the path for transmitting the IPv6 packet. In other words, the network device at each hop of the path for transmitting the IPv6 packet processes the first IPv6 extension header. header Additionally, the first IPv6 extension header contains optional information, which is processed by the network device at each hop along the path for transmitting the IPv6 packet.

[0059] Please refer to FIG. 4. The first IPv6 extension header includes next header information, header extension length (Hdr Ext Len) information, and option information. According to the above description, the value of the first next header information is TBD, which indicates that the next header of the IPv6 header is the first IPv6 extension header, and indicates that the network device receiving the IPv6 packet should process the first IPv6 extension header in the data plane. The option information in the first IPv6 extension header stores a specific operation that needs to be performed in the data plane. In addition, the option information includes option data, and the option data stores a specific operation that needs to be performed in the data plane. For specific implementations, please refer to the subsequent description of this embodiment. In a possible implementation, the value of the next header information in the first IPv6 extension header is 0, which indicates that the next header of the first IPv6 extension header is the HBH header. In other words, after the new HBH header, the HBH header defined in RFC8200 can be encapsulated. In this way, after processing the first IPv6 extension header in the data plane, the network device receiving the IPv6 packet transmits the IPv6 packet to the control plane of the network device and processes the HBH header in the control plane.

[0060] The IPv6 packet further includes a payload (not shown in FIG. 4). If the value of the next header information in the first IPv6 extension header indicates that there is no next header for the first IPv6 extension header, the payload immediately follows the first IPv6 extension header. If the next header for the first IPv6 extension header is an HBH header, the payload may immediately follow the HBH header. Optionally, there may be other headers before the payload.

[0061] S103: The second network device receives the IPv6 packet sent by the first network device.

[0062] S104: The second network device performs, based on the IPv6 header and the first IPv6 extension header, an operation in the first IPv6 extension header in a data plane of the second network device.

[0063] Referring to the foregoing description, the second network device receives an IPv6 packet sent by the first network device. For example, the IPv6 packet is a data packet. The second network device receives the IPv6 packet using a data plane of the second network device, for example, receives the IPv6 packet using an interface board. The IPv6 packet includes an IPv6 header and a first IPv6 extension header. After receiving the IPv6 packet, the second network device obtains the IPv6 header in the IPv6 packet. Then, the second network device processes the IPv6 header and obtains a first next header information in the IPv6 header. For example, the second network device may determine that the next header of the IPv6 header is the first IPv6 extension header based on the fact that the value of the first next header information is TBD, and determine to process the first IPv6 extension header in the data plane of the second network device. Correspondingly, the second network device does not send the IPv6 packet to the control plane of the second network device, and continues to process the next header of the IPv6 header, i.e., the first IPv6 extension header, in the data plane of the second network device.

[0064] After determining the first IPv6 extension header based on the IPv6 header, the second network device performs an operation in the first IPv6 extension header in the data plane based on the first IPv6 extension header to obtain option information in the first IPv6 extension header, such as shown in FIG. 4.

[0065] Next, further, Figures 6a, 6b, and 6c show implementations of optional information in the first IPv6 extension header of Figure 4. In other words, the optional information in the first IPv6 extension header may be implemented in the manner shown in Figure 6a, 6b, or 6c.

[0066] See Figure 6a. The option information includes option type information and option data. The length of the option type information may be 8 bits. The option type information not only indicates the type of the option information, but also indicates the length of the option data. For example, the value of the option type information is "11001100". "11001100" indicates that the type of the option information is "delay detection in iFIT network domain" and the length of the option data is AA bytes. Therefore, the second network device stores the correspondence between the values ​​"11001100", "delay detection in iFIT network domain", and "AA bytes". When the second network device determines that the value of the option type information is "11001100", the second network device may find the corresponding "delay detection in iFIT network domain" and "AA bytes". Therefore, the second network device may determine that the type of the option information is "delay detection in iFIT network domain" and the length of the option data is AA bytes. The second network device performs the operation indicated by the option type information (measurement of transmission delay) in the data plane and adds the measurement result to the option data. Thus, the second network device can process the first IPv6 extension header in the data plane of the second network device. In the embodiment shown in Fig. 6a, the length of the option information is shortened, and therefore the length of the IPv6 packet is shortened.

[0067] Please refer to Figure 6b. The option information includes option type information, option length information, and option data. The length of the option type information may be 8 bits. For the definition of the option type information in Figure 6b, please refer to the description of Figure 6a. That is, the option type information not only indicates the type of the option information, but also indicates the length of the option data. Compared with Figure 6a, the option information implemented in Figure 6b further includes option length information, and the option length information indicates the length of the option data. When the second network device processes the option information in the first IPv6 extension header in the data plane, the second network device obtains the option type information in the option information. The second network device determines whether the option type information can be identified. In other words, the second network device determines whether the second network device is capable of parsing and processing the option type information. Correspondingly, if the second network device determines that the option type information can be identified, the second network device determines the length of the option data based on the option type information, and does not need to determine the length of the option data based on the option length information. If the second network device determines that the option type information cannot be identified, the second network device determines the length of the option data based on the option length information. In the embodiment shown in Figure 6b, when the option type information cannot be identified, it is ensured that the second network device can skip the unidentifiable data portion in the packet and continue to process the identifiable portion in the packet.

[0068] Optionally, the first IPv6 extension header includes first option information and second option information, the first option information includes first option type information and first option data, the second option information includes second option type information and second option data, the first option type information indicates a type of the first option information and a length of the first option data, and the second option type information indicates a type of the second option information and a length of the second option data. Further, optionally, the first IPv6 extension header includes a bitmap, the bitmap includes a first bit and a second bit, the first bit indicates the first option type information, and the second bit indicates the second option type information.

[0069] Please refer to FIG. 6c. The option information includes a bitmap and a plurality of option data. The length of the bitmap may be 16 bits. In the embodiment shown in FIG. 6c, the plurality of option information may be implemented using a bitmap. Specifically, the 16 bits of the bitmap may respectively represent 16 option types, that is, each bit represents one option type. For example, the value of the bitmap is "0000000000000011", which indicates 16 option types. The least significant bit in the bitmap indicates option type 1, the second least significant bit in the bitmap indicates option type 2, ..., the most significant bit in the bitmap indicates option type 16. The value of each bit is 0 or 1. When the value of a bit is set to 0, the option type corresponding to the bit is disabled. When the value of a bit is set to 1, the option type corresponding to the bit is enabled. According to the above description, when the length of the bitmap is 16 bits, the maximum number of the plurality of option data is 16.

[0070] For example, the value of the bitmap is "0000000000000011". The values ​​of bit 3 to bit 16 are all 0, indicating that option type 3 to option type 16 are disabled. The value of bit 1 is 1, indicating that option type 1 (first option type information) is enabled. Thus, the option information further includes the first option data. In other words, the first option information includes the first option type information and the first option data. The position and value of the first option type information in the bitmap determine the type of the first option information and the length of the first option data, which are indicated by the first option type information. Similarly, the value of bit 2 is 1, indicating that option type 2 (second option type information) is enabled. Thus, the option information further includes the second option data. In other words, the second option information includes the second option type information and the second option data. The position and value of the second option type information in the bitmap determine the type of the second option information and the length of the second option data indicated by the second option type information. In the above method, aggregation of multiple sub-option information can be performed using one option information.

[0071] Optionally, the IPv6 packet further includes a second IPv6 extension header, the second IPv6 extension header indicating that a network device receiving the IPv6 packet should perform an operation in the second IPv6 extension header in a control plane, the second IPv6 extension header being a next header to the first IPv6 extension header, and the method further includes the second network device performing the operation in the second IPv6 extension header in a control plane of the second network device based on the first IPv6 extension header and the second IPv6 extension header.

[0072] According to the previous embodiment, the IPv6 packet includes an IPv6 header, and the first IPv6 extension header is a next header of the IPv6 header. The first IPv6 extension header includes first next header information. The value of the first next header information may be 0, indicating that the next header of the first IPv6 extension header is an HBH header (second IPv6 extension header) defined in RFC8200. The second network device processes the first IPv6 extension header in a data plane of the second network device according to the previous embodiment, and determines that the next header of the first IPv6 extension header is an HBH header based on the fact that the value of the first next header information in the first IPv6 extension header is 0. According to the previous embodiment, the second network device may send the IPv6 packet to a control plane of the second network device, and process the HBH header in the control plane.

[0073] Optionally, the first IPv6 extension header includes processing plane information, the processing plane information indicating that a network device receiving the IPv6 packet should perform an operation in the first IPv6 extension header in the data plane.

[0074] In the above embodiment, the new HBH header is provided as the next header of the IPv6 header in the IPv6 packet to ensure that the network device can process the IPv6 packet in the data plane. In a possible embodiment, the HBH header defined in RFC8200 can be extended so that the network device can determine to process the extended HBH header in the data plane or the control plane of the network device based on the extended HBH header.

[0075] For example, the second network device receives an IPv6 packet sent by the first network device. The IPv6 packet includes an IPv6 header and a first IPv6 extension header. The first IPv6 extension header is an extended HBH header. As shown in FIG. 5, compared with the HBH header defined in RFC8200, the extended HBH header includes reservation information, and the length of the reservation information may be 2 bytes. The reservation information includes processing plane information, and the second network device may determine to process the extended HBH header in the data plane of the second network device or to process the extended HBH header in the control plane of the second network device based on the value of the processing plane information. According to the aforementioned embodiment, the value of the first next header information in the IPv6 header indicates that the next header of the IPv6 header is an extended HBH header. After obtaining the first next header information in the IPv6 header, the second network device does not directly determine to keep the IPv6 packet in the data plane or to send the IPv6 packet to the control plane. The second network device further obtains the processing plane information in the reservation information in the extended HBH header. For example, the value of the processing plane information is 00, indicating a control plane. After the second network device determines that the value of the processing plane information is 00, the second network device sends the IPv6 packet to the control plane, and the second network device processes the extended HBH header in the control plane. In another example, the value of the processing plane information is 11, indicating a data plane. After the second network device determines that the value of the processing plane information is 11, the second network device keeps the IPv6 packet in the data plane, and the second network device processes the extended HBH header in the data plane.

[0076] Optionally, the first IPv6 extension header includes processing policy information, the processing policy information indicating an action to be taken by a network device receiving the IPv6 packet with respect to the at least one optional information included in the first IPv6 extension header.

[0077] The reservation information in the extended IPv6 header may further include processing policy information. The processing policy information indicates that the second network device should process multiple optional information in the first IPv6 extension header. For example, the first IPv6 extension header includes option information 1, option information 2, and option information 3. Option information 1, option information 2, and option information 3 are all implemented in a type-length-value (TLV) manner. The operation indicated by the processing policy information is applicable to option information 1, option information 2, and option information 3.

[0078] In a similar embodiment, the new HBH header described above may also include processing policy information to effect processing of multiple optional information.

[0079] In this embodiment of the present application, the first IPv6 extension header is processed by a network device at each hop of the path for transmitting the IPv6 packet. In other words, the network device at each hop of the path for transmitting the IPv6 packet processes the first IPv6 extension header. header Additionally, the first IPv6 extension header contains optional information, which is processed by the network device at each hop along the path for transmitting the IPv6 packet.

[0080] According to the aforementioned embodiment, the first IPv6 extension header is the next header of the IPv6 header, and when the IPv6 packet includes any other extension headers, the first IPv6 extension header is placed before any other extension headers.

[0081] According to the above-mentioned embodiment, after receiving the IPv6 packet sent by the first network device, the second network device performs an operation in the IPv6 extension header in a corresponding processing plane of the second network device based on the IPv6 header and the IPv6 extension header in the IPv6 packet, to ensure that the IPv6 packet can be forwarded successfully by the second network device.

[0082] Figure 7 is a schematic diagram of the structure of a second network device 1000 according to an embodiment of the present application. The second network device 1000 shown in Figure 7 may perform the corresponding steps performed by the second network device in the method of the previous embodiment. The second network device is disposed in a communication network, and the communication network further includes a first network device. As shown in Figure 7, the second network device 1000 includes a receiving unit 1002 and a processing unit 1004.

[0083] The receiving unit 1002 is configured to receive an IPv6 packet sent by a first network device, the IPv6 packet including an IPv6 header and a first IPv6 extension header, the first IPv6 extension header indicating that the network device receiving the IPv6 packet should perform an operation in the first IPv6 extension header in a data plane.

[0084] The processing unit 1004 is configured to perform an operation in the first IPv6 extension header at a data plane of the second network device based on the IPv6 header and the first IPv6 extension header.

[0085] Optionally, the IPv6 header includes next header information, where the next header information indicates that the next header of the IPv6 header is a first IPv6 extension header.

[0086] Optionally, the next header information further indicates that a network device receiving the IPv6 packet should process the first IPv6 extension header in the data plane.

[0087] Optionally, when performing an operation in the first IPv6 extension header in a data plane of the second network device based on the IPv6 header and the first IPv6 extension header, the processing unit 1004 is configured to determine, based on the next header information, that the next header of the IPv6 header is the first IPv6 extension header, and the processing unit 1004 is further configured to perform an operation in the first IPv6 extension header in the data plane of the second network device based on the first IPv6 extension header.

[0088] Optionally, the first IPv6 extension header includes option information, the option information including option type information and option data, where the option type information indicates a type of the option information and a length of the option data.

[0089] Optionally, the first IPv6 extension header includes option information, the option information includes option type information, option length information, and option data, the option type information indicating a type of the option information and a length of the option data, and the option length information indicating a length of the option data. Before the processing unit 1004 performs an operation in the first IPv6 extension header at a data plane of the second network device based on the IPv6 header and the first IPv6 extension header, the processing unit 1004 is further configured to determine that the option type information can be identified and to determine a length of the option data based on the option type information rather than based on the option length information.

[0090] Optionally, the first IPv6 extension header includes option information, the option information includes option type information, option length information, and option data, the option type information indicating a type of the option information and a length of the option data, and the option length information indicating a length of the option data. Before the processing unit 1004 performs an operation in the first IPv6 extension header at a data plane of the second network device based on the IPv6 header and the first IPv6 extension header, the processing unit 1004 is further configured to determine that the option type information cannot be identified and to determine a length of the option data based on the option length information.

[0091] Optionally, the first IPv6 extension header includes first option information and second option information, the first option information includes first option type information and first option data, the second option information includes second option type information and second option data, the first option type information indicates a type of the first option information and a length of the first option data, and the second option type information indicates a type of the second option information and a length of the second option data.

[0092] Optionally, the first IPv6 extension header includes a bitmap, the bitmap including a first bit and a second bit, the first bit indicating the first option type information and the second bit indicating the second option type information.

[0093] Optionally, the IPv6 packet further includes a second IPv6 extension header, the second IPv6 extension header indicating that a network device receiving the IPv6 packet should perform an operation in the second IPv6 extension header in a control plane, the second IPv6 extension header being a next header of the first IPv6 extension header, and the processing unit 1004 is further configured to perform the operation in the second IPv6 extension header in the control plane of the second network device based on the first IPv6 extension header and the second IPv6 extension header.

[0094] Optionally, the first IPv6 extension header includes processing plane information, the processing plane information indicating that a network device receiving the IPv6 packet should perform an operation in the first IPv6 extension header in the data plane.

[0095] Optionally, the first IPv6 extension header includes processing policy information, the processing policy information indicating an action to be taken by a network device receiving the IPv6 packet with respect to the at least one optional information included in the first IPv6 extension header.

[0096] Optionally, the second network device 1000 further includes a sending unit, where the sending unit is configured to send the processed IPv6 packet to a third network device.

[0097] The second network device shown in Figure 7 may perform the corresponding steps performed by the second network device in the method of the above embodiment. In order to ensure that the IPv6 packet can be forwarded successfully by the second network device, the second network device receives the IPv6 packet sent by the first network device, and performs an operation in the IPv6 extension header in the corresponding processing plane of the second network device based on the IPv6 header and the IPv6 extension header in the IPv6 packet.

[0098] Figure 8 is a schematic diagram of the hardware structure of a second network device 1100 according to an embodiment of the present application. The second network device 1100 shown in Figure 8 can perform the corresponding steps performed by the second network device in the method of the above embodiment.

[0099] 8, the second network device 1100 includes a processor 1101, a memory 1102, an interface 1103, and a bus 1104. The interface 1103 may be implemented in a wireless or wired manner. The processor 1101, the memory 1102, and the interface 1103 are connected via the bus 1104.

[0100] The interface 1103 may specifically include a transmitter and a receiver, and in the aforementioned embodiment, is used by the second network device to receive information from the first network device and transmit information to the first network device. For example, the interface 1103 is configured to support receiving an IPv6 packet sent by the first network device, or configured to support forwarding a processed IPv6 packet. For example, the interface 1103 is configured to support the process S103 of FIG. 3. The processor 1101 is configured to execute the processing performed by the second network device in the aforementioned embodiment. For example, the processor 1101 is configured to execute operations in an IPv6 extension header and / or support other processes for the techniques described herein. For example, the processor 1101 is configured to support the process S104 of FIG. 3. The memory 1102 is configured to store programs, codes, or instructions, for example, the operating system 11021 and the application 11022. When executing the programs, codes, or instructions, the processor or hardware device can perform the processing process related to the second network device in the embodiment of the method. Optionally, the memory 1102 may include a read-only memory (ROM) and a random access memory (RAM). The ROM includes a basic input / output system (BIOS) or an embedded system, and the RAM includes an application and an operating system. When the second network device 1100 needs to be operated, a bootloader of the BIOS or the embedded system fixed in the ROM is used to boot the system to be started, for the purpose of booting the second network device 1100 to enter a normal operating state.After entering the normal operating state, the second network device 1100 runs applications and operating systems in the RAM to perform processing processes related to the second network device in the method embodiment.

[0101] It should be understood that Figure 8 only shows a simplified design of the second network device 1100. In practical applications, the second network device may include any number of interfaces, processors, or memories.

[0102] 9 is a schematic diagram of the hardware structure of another second network device 1200 according to an embodiment of the present application. The second network device 1200 shown in FIG. 9 can perform the corresponding steps performed by the second network device in the method of the above embodiment.

[0103] As shown in FIG. 9, the second network device 1200 includes a main control board 1210, an interface board 1230, a switching board 1220, and an interface board 1240. The main control board 1210, the interface boards 1230 and 1240, and the switching board 1220 are connected to a system backboard via a system bus for intercommunication. The main control board 1210 is configured to perform functions such as system management, device maintenance, and protocol processing. The switching board 1220 is configured to implement data exchange between the interface boards (the interface boards are also called line cards or service boards). The interface boards 1230 and 1240 are configured to provide various service interfaces (e.g., a POS interface, a GE interface, and an ATM interface) and forward data packets.

[0104] The interface board 1230 may include a central processing unit 1231, a forwarding entry memory 1234, a physical interface card 1233, and a network processor 1232. The central processing unit 1231 is configured to control and manage the interface boards and communicate with a central processing unit on a main control board. The forwarding entry memory 1234 is configured to store forwarding entries. The physical interface card 1233 is configured to receive and transmit traffic. The network memory 1232 is configured to control the physical interface card 1233 to receive and transmit traffic based on the forwarding entries.

[0105] Specifically, the physical interface card 1233 is configured to receive an IPv6 packet sent by the first network device. The physical interface card 1233 is further configured to forward the processed IPv6 packet.

[0106] After receiving the IPv6 packet, the physical interface card 1233 sends the IPv6 packet to the central processing unit 1231. The central processing unit 1231 determines, based on the information in the packet header of the IPv6 packet, that the IPv6 packet needs to be processed by the central processing unit 1231. In response, the central processing unit 1231 processes the IPv6 packet.

[0107] Optionally, after receiving the IPv6 packet, the physical interface card 1233 sends the IPv6 packet to the central processing unit 1231, which determines based on information in a packet header of the IPv6 packet that the IPv6 packet needs to be processed by the central processing unit 1211. The central processing unit 1231 sends the IPv6 packet to the central processing unit 1211, and the central processing unit 1211 processes the IPv6 packet.

[0108] The central processing unit 1231 is further configured to control the network memory 1232 to retrieve a forwarding entry from the forwarding entry memory 1234, and the central processing unit 1231 is further configured to control the network memory 1232 to forward the processed IPv6 packet to a third network device using the physical interface card 1233.

[0109] It should be understood that the operation of the interface board 1240 is consistent with the operation of the interface board 1230 in this embodiment of the present invention. For the sake of brevity, the details will not be described again. It should be understood that the second network device 1200 in this embodiment may correspond to the functions and / or various steps performed in the embodiment of the method described above. The details will not be described again here.

[0110] In addition, it should be noted that there may be one or more main control boards, and when there are multiple main control boards, the main control board may include an active main control board and a standby main control board. There may be one or more interface boards, and the second network device with a 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 jointly. In the centralized forwarding architecture, the second network device may not require a switching board. The interface board implements the service data processing function of the entire system. In the distributed forwarding architecture, the second network device may have at least one switching board. In order to provide the exchange and processing capability of large-capacity data, data is exchanged between the multiple interface boards using the switching board. Therefore, the data access and processing capability of the second network device in the distributed architecture is superior to the data access and processing capability of the second network device in the centralized architecture. The specific architecture used depends on the specific networking deployment scenario, which is not limited here.

[0111] Additionally, an embodiment of the present application provides a computer storage medium configured to store computer software instructions for use by the second network device, the computer storage medium including a program designed to execute an embodiment of the method described above.

[0112] Figure 10 is a schematic diagram of a structure of a first network device 2000 according to an embodiment of the present application. The first network device 2000 shown in Figure 10 may perform the corresponding steps performed by the first network device in the method of the previous embodiment. The first network device is disposed in a communication network, and the communication network further includes a second network device. As shown in Figure 10, the first network device 2000 includes a processing unit 2004 and a sending unit 2006.

[0113] The processing unit 2004 is configured to generate an IPv6 packet, the IPv6 packet including an IPv6 header and a first IPv6 extension header, the first IPv6 extension header indicating that a network device receiving the IPv6 packet should perform an operation in the first IPv6 extension header in the data plane.

[0114] The sending unit 2006 is configured to send the IPv6 packet to the second network device.

[0115] Optionally, the IPv6 header includes next header information, where the next header information indicates that the next header of the IPv6 header is a first IPv6 extension header.

[0116] Optionally, the next header information further indicates that a network device receiving the IPv6 packet should process the first IPv6 extension header in the data plane.

[0117] Optionally, the first IPv6 extension header includes option information, the option information including option type information and option data, where the option type information indicates a type of the option information and a length of the option data.

[0118] Optionally, the first IPv6 extension header includes option information, the option information including option type information, option length information, and option data, the option type information indicating a type of the option information and a length of the option data, and the option length information indicating the length of the option data.

[0119] Optionally, the first IPv6 extension header includes first option information and second option information, the first option information includes first option type information and first option data, the second option information includes second option type information and second option data, the first option type information indicates a type of the first option information and a length of the first option data, and the second option type information indicates a type of the second option information and a length of the second option data.

[0120] Optionally, the first IPv6 extension header includes a bitmap, the bitmap including a first bit and a second bit, the first bit indicating the first option type information and the second bit indicating the second option type information.

[0121] Optionally, the IPv6 packet further includes a second IPv6 extension header, the second IPv6 extension header indicating that a network device receiving the IPv6 packet should perform an action in the second IPv6 extension header in a control plane, the second IPv6 extension header being a next header of the first IPv6 extension header.

[0122] Optionally, the first IPv6 extension header includes processing plane information, the processing plane information indicating that a network device receiving the IPv6 packet should perform an operation in the first IPv6 extension header in the data plane.

[0123] Optionally, the first IPv6 extension header includes processing policy information, the processing policy information indicating an action to be taken by a network device receiving the IPv6 packet with respect to the at least one optional information included in the first IPv6 extension header.

[0124] Optionally, the first network device further includes a receiving unit, the receiving unit configured to receive a packet from a previous-hop network device of the first network device.

[0125] The first network device shown in Figure 10 may perform the corresponding steps performed by the first network device in the method of the above embodiment. The first network device sends an IPv6 packet carrying an IPv6 header and an IPv6 extension header to the second network device. Correspondingly, in order to ensure that the IPv6 packet can be forwarded successfully by the second network device, the second network device receives the IPv6 packet sent by the first network device, and performs an operation in the IPv6 extension header in the corresponding processing plane of the second network device based on the IPv6 header and the IPv6 extension header in the IPv6 packet.

[0126] 11 is a schematic diagram of a hardware structure of a first network device 2100 according to an embodiment of the present application. The first network device 2100 shown in FIG. 11 can perform the corresponding steps performed by the first network device in the method of the above embodiment.

[0127] 11, the first network device 2100 includes a processor 2101, a memory 2102, an interface 2103, and a bus 2104. The interface 2103 may be implemented in a wireless or wired manner. The processor 2101, the memory 2102, and the interface 2103 are connected via the bus 2104.

[0128] The interface 2103 may specifically include a transmitter and a receiver, and in the aforementioned embodiment, is used by the first network device to receive information or data from the second network device and transmit information or data to the second network device. For example, the interface 2103 is configured to support the transmission of IPv6 packets to the second network device. In another example, the interface 2103 is configured to support the reception of packets transmitted by a previous-hop network device of the first network device. For example, the interface 2103 is configured to support the process S102 of FIG. 3. The processor 2101 is configured to execute the processing performed by the first network device in the aforementioned embodiment. For example, the processor 2101 is configured to process IPv6 packets and / or support another process used in the technology described herein. For example, the processor 2101 is configured to support the process S101 of FIG. 3. The memory 2102 includes an operating system 21021 and an application 21022, and is configured to store programs, codes, or instructions. When executing the program, code, or instruction, the processor or hardware device can perform the processing process related to the first network device in the above-mentioned method embodiment. Optionally, the memory 2102 may include a read-only memory (ROM) and a random access memory (RAM). The ROM includes a basic input / output system (BIOS) or an embedded system, and the RAM includes an application and an operating system. When the first network device 2100 needs to be operated, the bootloader of the BIOS or the embedded system fixed in the ROM is used to boot the system to be started, for the purpose of booting the first network device 2100 to enter a normal operating state.After entering the normal operating state, the first network device 2100 runs applications and operating systems in the RAM to perform processing processes related to the first network device in the method embodiment.

[0129] It should be understood that Fig. 11 only shows a simplified design of the first network device 2100. In practical applications, the first network device may include any number of interfaces, processors, or memories.

[0130] 12 is a schematic diagram of a hardware structure of another first network device 2200 according to an embodiment of the present application. The first network device 2200 shown in FIG. 12 can perform the corresponding steps performed by the first network device in the method of the above embodiment.

[0131] As shown in FIG. 12, the first network device 2200 includes a main control board 2210, an interface board 2230, a switching board 2220, and an interface board 2240. The main control board 2210, the interface boards 2230 and 2240, and the switching board 2220 are connected to a system backboard via a system bus for intercommunication. The main control board 2210 is configured to perform functions such as system management, device maintenance, and protocol processing. The switching board 2220 is configured to implement data exchange between the interface boards (the interface boards are also called line cards or service boards). The interface boards 2230 and 2240 are configured to provide various service interfaces (e.g., a POS interface, a GE interface, and an ATM interface) and forward data packets.

[0132] The interface board 2230 may include a central processing unit 2231, a forwarding entry memory 2234, a physical interface card 2233, and a network processor 2232. The central processing unit 2231 is configured to control and manage the interface boards and communicate with the central processing unit 2211 on the main control board 2210. The forwarding entry memory 2234 is configured to store forwarding entries. The physical interface card 2233 is configured to receive and transmit traffic. The network memory 2232 is configured to control the physical interface card 2233 to receive and transmit traffic based on the forwarding entries.

[0133] Specifically, the physical interface card 2233 transmits the IPv6 packet as 2 The physical interface card 2233 is further configured to receive packets sent by a previous-hop network device of the first network device.

[0134] In a possible implementation, the central processing unit 2211 generates an IPv6 packet and sends the IPv6 packet to the central processing unit 2231. The IPv6 packet is sent using the physical interface card 2233 to the second network device.

[0135] In another possible embodiment, the physical interface card 2233 receives a packet sent by a previous hop network device of the first network device, and the central processing unit 2231 processes the packet to obtain an IPv6 packet, which is sent to the second network device using the physical interface card 2233.

[0136] The central processing unit 2231 is further configured to control the network memory 2232 to retrieve forwarding entries from the forwarding entry memory 2234, and the central processing unit 2231 is further configured to control the network memory 2232 to receive and transmit traffic using the physical interface card 2233.

[0137] It should be understood that the operation of the interface board 2240 is consistent with the operation of the interface board 2230 in this embodiment of the present invention. For the sake of brevity, the details will not be described again. It should be understood that the first network device 2200 in this embodiment may correspond to the functions and / or various steps performed in the embodiments of the method described above. The details will not be described again here.

[0138] In addition, it should be noted that there may be one or more main control boards, and when there are multiple main control boards, the main control board may include an active main control board and a standby main control board. There may be one or more interface boards, and the first network device with a 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 jointly. In the centralized forwarding architecture, the first network device may not require a switching board. The interface board implements the service data processing function of the entire system. In the distributed forwarding architecture, the first network device may have at least one switching board. Data is exchanged between the multiple interface boards using the switching board to provide large-capacity data exchange and processing capabilities. Thus, the data access and processing capabilities of the first network device in the distributed architecture are superior to the data access and processing capabilities of the first network device in the centralized architecture. The specific architecture used depends on the specific networking deployment scenario, which is not limited here.

[0139] Additionally, an embodiment of the present application provides a computer storage medium configured to store computer software instructions for use by the first network device, the computer software instructions including a program designed to execute an embodiment of the method described above.

[0140] An embodiment of the present application further includes a network system, the network system including a second network device and a first network device, the second network device being the second network device of FIG. 7, FIG. 8, or FIG. 9, and the first network device being the first network device of FIG. 10, FIG. 11, or FIG. 12.

[0141] The steps of the method or algorithm described in conjunction with the contents disclosed in this application may be implemented by hardware or by a processor by executing software instructions. The software instructions may be formed by corresponding software modules. The software modules may be located in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable magnetic disk, CD-ROM, or any other form of storage medium known in the art. For example, the storage medium is coupled to the processor such that the processor can read information from the storage medium or write information to the storage medium. Of course, the storage medium may also be components of the processor. The processor and the storage medium may be located in an ASIC. In addition, the ASIC may be located in a user equipment. Of course, the processor and the storage medium may exist in the user equipment as separate components.

[0142] Those skilled in the art should recognize that in one or more of the above examples, the functions described in the present application may be implemented by hardware or software. When the present invention is implemented by software, the functions described above may be stored on a computer-readable medium or transmitted as one or more instructions or codes in the computer-readable medium. Computer-readable media include computer storage media and communication media. Communication media include any medium that facilitates the transmission of a computer program from one place to another. Storage media may be any available medium accessible to a general-purpose or special-purpose computer.

[0143] The objectives, technical solutions and beneficial effects of the present application are further described in detail in the above specific embodiments. It should be understood that the above description is only a specific embodiment of the present application. [Explanation of symbols]

[0144] 1000 Second Network Device 1002 Receiver Unit 1004 Processing unit 1100 Second Network Device 1101 Processor 1102 Memory 1103 Interface 1104 Bus 1200 Second Network Device 1210 Main control board 1211 Central Processing Unit 1220 Switching Board 1230 Interface Board 1231 Central Processing Unit 1232 Network Processor 1233 Physical Interface Card 1234 forwarding entry memory 1240 Interface Board 1241 Central Processing Unit 1242 Network Processor 1243 Physical Interface Card 1244 forwarding entry memory 2000 First Network Device 2004 Processing Unit 2006 Sending Unit 2100 First Network Device 2101 Processor 2102 Memory 2103 Interface 2104 Bus 2200 First Network Device 2210 Main control board 2211 Central Processing Unit 2220 Switching Board 2230 Interface Board 2231 Central Processing Unit 2232 Network Processor 2233 Physical Interface Card 2234 Forwarding Entry Memory 2240 Interface Board 11021 Operating System 11022 Application 21021 Operating System 21022 Application

Claims

1. 1. A packet processing method, comprising: receiving, by a second network device, an Internet Protocol version 6 (IPv6) packet sent by a first network device, the IPv6 packet including an IPv6 header and a first IPv6 extension header, the IPv6 header indicating a protocol type of the IPv6 packet is IPv6, the IPv6 header including next header information, the next header information indicating that a next header of the IPv6 header is the first IPv6 extension header; determining, by the second network device based on the next header, that the next header of the IPv6 header is the first IPv6 extension header; performing, by the second network device, an operation in the first IPv6 extension header based on the IPv6 header and the first IPv6 extension header on a forwarding plane of the second network device, the forwarding plane being used to process and forward the IPv6 packet on an interface of the second network device; A packet processing method comprising:

2. 2. The method of claim 1, wherein the next header information further indicates that the network device receiving the IPv6 packet should process the first IPv6 extension header on the forwarding plane.

3. The step of performing, by the second network device, the operation in the first IPv6 extension header on the forwarding plane of the second network device based on the IPv6 header and the first IPv6 extension header, further comprises: determining, by the second network device, based on the next header information, that the next header of the IPv6 header is the first IPv6 extension header; performing, by the second network device, the operation in the first IPv6 extension header on the forwarding plane of the second network device based on the first IPv6 extension header; 2. The method of claim 1, comprising:

4. 4. The method according to claim 1, wherein the first IPv6 extension header includes option information, the option information including option type information and option data, the option type information indicating a type of the option information and a length of the option data.

5. the first IPv6 extension header includes option information, the option information includes option type information, option length information, and option data, the option type information indicating a type of the option information and a length of the option data, and the option length information indicating the length of the option data; and prior to the step of performing, by the second network device, the operation on the forwarding plane of the second network device based on the IPv6 header and the first IPv6 extension header in the first IPv6 extension header, the method further comprising: determining, by the second network device, that the option type information can be identified; determining, by the second network device, the length of the optional data based on the option type information and not based on the option length information; 4. The method of claim 1, further comprising:

6. the first IPv6 extension header includes option information, the option information includes option type information, option length information, and option data, the option type information indicating a type of the option information and a length of the option data, and the option length information indicating the length of the option data; and prior to the step of performing, by the second network device, the operation on the forwarding plane of the second network device based on the IPv6 header and the first IPv6 extension header in the first IPv6 extension header, the method further comprising: determining, by the second network device, that the option type information cannot be identified; determining, by the second network device, the length of the optional data based on the option length information; 4. The method of claim 1, further comprising:

7. 4. The method of claim 1, wherein the first IPv6 extension header includes first option information and second option information, the first option information includes first option type information and first option data, the second option information includes second option type information and second option data, the first option type information indicates a type of the first option information and a length of the first option data, and the second option type information indicates a type of the second option information and a length of the second option data.

8. 8. The method of claim 7, wherein the first IPv6 extension header comprises a bitmap, the bitmap comprising a first bit and a second bit, the first bit indicating the first option type information and the second bit indicating the second option type information.

9. the IPv6 packet further includes a second IPv6 extension header, the second IPv6 extension header indicating that the network device receiving the IPv6 packet should perform an operation in the second IPv6 extension header in a control plane, the second IPv6 extension header being a next header of the first IPv6 extension header, and the method further includes: performing, by the second network device, the operation in the second IPv6 extension header in the control plane of the second network device based on the first IPv6 extension header and the second IPv6 extension header; 4. The method of claim 1, further comprising:

10. 2. The method of claim 1, wherein the first IPv6 extension header includes processing plane information, the processing plane information indicating that the network device receiving the IPv6 packet should perform the operation in the first IPv6 extension header on the forwarding plane.

11. 4. The method according to claim 1, wherein the first IPv6 extension header includes processing policy information, the processing policy information indicating an action to be performed by the network device receiving the IPv6 packet with respect to at least one optional information included in the first IPv6 extension header.

12. The method of claim 1 , wherein the first IPv6 extension header is processed by a network device at each hop along a path for transmitting the IPv6 packet.

13. 4. The method according to claim 1, wherein the first IPv6 extension header is a Hop-by-Hop (HBH) Options Header.

14. 1. A packet processing method, comprising: generating, by a first network device, an Internet Protocol version 6 (IPv6) packet, the IPv6 packet including an IPv6 header and a first IPv6 extension header, the IPv6 header indicating a protocol type of the IPv6 packet is IPv6, the IPv6 header including next header information, the next header information indicating that a next header of the IPv6 header is the first IPv6 extension header; sending, by the first network device, the IPv6 packet to a second network device, the IPv6 packet triggering the second network device to process the first IPv6 extension header on a forwarding plane of the second network device, the forwarding plane being used to process and forward the IPv6 packet on an interface of the second network device; A packet processing method comprising:

15. 15. The method of claim 14, wherein the next header information further indicates that the network device receiving the IPv6 packet should process the first IPv6 extension header on the forwarding plane.

16. 16. The method according to claim 14, wherein the first IPv6 extension header includes option information, the option information including option type information and option data, the option type information indicating a type of the option information and a length of the option data.

17. 16. The method of claim 14 or 15, wherein the first IPv6 extension header includes option information, the option information including option type information, option length information, and option data, the option type information indicating a type of the option information and a length of the option data, and the option length information indicating the length of the option data.

18. 16. The method of claim 14 or 15, wherein the first IPv6 extension header includes first option information and second option information, the first option information includes first option type information and first option data, the second option information includes second option type information and second option data, the first option type information indicates a type of the first option information and a length of the first option data, and the second option type information indicates a type of the second option information and a length of the second option data.

19. 20. The method of claim 18, wherein the first IPv6 extension header comprises a bitmap, the bitmap comprising a first bit and a second bit, the first bit indicating the first option type information and the second bit indicating the second option type information.

20. 15. The method of claim 14, wherein the first IPv6 extension header includes processing plane information, the processing plane information indicating that the network device receiving the IPv6 packet should perform an operation in the first IPv6 extension header on the forwarding plane.

21. 16. The method according to claim 14 or 15, wherein the first IPv6 extension header includes processing policy information, the processing policy information indicating an action to be performed by the network device receiving the IPv6 packet with respect to at least one optional information included in the first IPv6 extension header.

22. 16. The method of claim 14 or 15, wherein the first IPv6 extension header is a Hop-by-Hop (HBH) Options Header.

23. 1. A network device, comprising: a receiving unit configured to receive an Internet Protocol version 6 (IPv6) packet transmitted by another network device, the IPv6 packet including an IPv6 header and a first IPv6 extension header, the IPv6 header indicating a protocol type of the IPv6 packet is IPv6, the IPv6 header including next header information, the next header information indicating that a next header of the IPv6 header is the first IPv6 extension header; a processing unit configured to determine, based on the next header, that the next header of the IPv6 header is the first IPv6 extension header; the processing unit further configured to perform an operation in the first IPv6 extension header on a forwarding plane of the network device based on the IPv6 header and the first IPv6 extension header, the forwarding plane being used to process and forward the IPv6 packet on an interface of the network device; A network device comprising:

24. 24. The network device of claim 23, wherein the next header information further indicates that the network device receiving the IPv6 packet should process the first IPv6 extension header on the forwarding plane.

25. When performing the operation in the first IPv6 extension header on the forwarding plane of the network device based on the IPv6 header and the first IPv6 extension header, the processing unit: determining, based on the next header information, that the next header of the IPv6 header is the first IPv6 extension header; performing the action in the first IPv6 extension header on the forwarding plane of the network device based on the first IPv6 extension header; 24. The network device of claim 23, configured to:

26. 26. The network device of claim 23, wherein the first IPv6 extension header includes option information, the option information including option type information and option data, the option type information indicating a type of the option information and a length of the option data.

27. the first IPv6 extension header includes option information, the option information includes option type information, option length information, and option data, the option type information indicating a type of the option information and a length of the option data, the option length information indicating the length of the option data, and the processing unit: determining that the option type information can be identified; determining the length of the option data based on the option type information and not based on the option length information 26. The network device of claim 23, further configured to:

28. the first IPv6 extension header includes option information, the option information includes option type information, option length information, and option data, the option type information indicating a type of the option information and a length of the option data, the option length information indicating the length of the option data, and the processing unit: determining that the option type information cannot be identified; determining the length of the optional data based on the option length information 26. The network device of claim 23, further configured to:

29. 26. The network device of claim 23, wherein the first IPv6 extension header includes first option information and second option information, the first option information includes first option type information and first option data, the second option information includes second option type information and second option data, the first option type information indicates a type of the first option information and a length of the first option data, and the second option type information indicates a type of the second option information and a length of the second option data.

30. 30. The network device of claim 29, wherein the first IPv6 extension header comprises a bitmap, the bitmap comprising a first bit and a second bit, the first bit indicating the first option type information and the second bit indicating the second option type information.

31. 1. A network device, comprising: a processing unit configured to generate an Internet Protocol version 6 (IPv6) packet, the IPv6 packet including an IPv6 header and a first IPv6 extension header, the IPv6 header indicating a protocol type of the IPv6 packet is IPv6, the IPv6 header including next header information, the next header information indicating that a next header of the IPv6 header is the first IPv6 extension header; a sending unit configured to send the IPv6 packet to another network device, the IPv6 packet triggering the other network device to process the first IPv6 extension header on a forwarding plane of the other network device, the forwarding plane being used to process and forward the IPv6 packet on an interface of the other network device; A network device comprising:

32. 32. The network device of claim 31, wherein the next header information further indicates that the other network device receiving the IPv6 packet should process the first IPv6 extension header on the forwarding plane.

33. A network system comprising a first network device and a second network device, the first network device being a network device as defined in claim 31 or 32, and the second network device being a network device as defined in any one of claims 23 to 30.

Citation Information

Patent Citations

  • Method, device, and system for processing ipv6 packet

    US20120236864A1