A message processing method, device and system

By executing the IPv6 extended header action in the data plane of network devices, the problem of IPv6 packets not being forwarded normally is solved, achieving stable and efficient IPv6 packet forwarding and reducing the pressure on the control plane and the risk of packet loss.

CN116192995BActive Publication Date: 2025-10-28HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211662006.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-06-05
Filing Date
2020-06-19
Publication Date
2025-10-28
Estimated Expiration
2040-06-19

AI Technical Summary

Technical Problem

In existing technologies, IPv6 packets cannot be forwarded normally in network devices, mainly because the proprietary configurations of network device manufacturers affect the forwarding process of IPv6 packets, leading to increased control plane pressure and potential packet loss.

Method used

By executing IPv6 extension header actions in the data plane of network devices, it is ensured that IPv6 packets can be forwarded normally in the data plane, avoiding sending packets to the control plane for processing and reducing the consumption of channel bandwidth resources.

Benefits of technology

It enables normal forwarding of IPv6 packets in network devices, reduces the pressure on the control plane, avoids packet loss due to insufficient channel bandwidth resources, and ensures stable forwarding of IPv6 packets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116192995B_ABST
    Figure CN116192995B_ABST
Patent Text Reader

Abstract

A packet processing method, apparatus, and system are disclosed. The method includes: a second network device receiving an IPv6 packet sent by a first network device. The IPv6 packet includes an IPv6 header and a first IPv6 extension header. The first IPv6 extension header instructs the network device receiving the IPv6 packet to perform an action in the first IPv6 extension header in its data plane. Furthermore, the second network device performs the action in the first IPv6 extension header in its data plane 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 correctly.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of Chinese Patent Application No. 202010566025.3, filed on June 19, 2020, entitled "A Message Processing Method, Apparatus and System", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of communication technology, and in particular to a message processing method, device and system. Background Technology

[0003] Internet Protocol version 6 (IPv6) is developed by the Internet Engineering Task Force (IETF).

[0004] IPv6 is a specification designed by the Internet Engineering Task Force (IETF), and is an upgrade to Internet Protocol version 4 (IPv4). IPv6 is the second-generation standard protocol for the network layer, also known as the next-generation Internet protocol (IPng).

[0005] IETF Request For Comments (RFC) 8200 defines IPv6, its message encapsulation format, and its functions. Compared to IPv4, IPv6 has the following characteristics: (1) IPv6 extends the Internet Protocol (IP) address length from 32 bits to 128 bits, thereby improving addressing capabilities; (2) the IPv6 message header is simplified; (3) IPv6 supports more flexible extensions and options; (4) IPv6 supports flow labeling capabilities; and (5) IPv6 supports authentication and privacy protection capabilities.

[0006] In practical applications, RFC 8200 currently does not explicitly specify the actions for extension headers in IPv6 packets, leaving each network equipment manufacturer to configure them proprietaryly based on their own business needs. However, these proprietary configurations by network equipment manufacturers may affect the normal packet forwarding process of network devices in IP networks. Summary of the Invention

[0007] This application provides a message processing method, device, and system to solve the problem in the prior art that IPv6 messages cannot be properly forwarded by network devices that receive the messages.

[0008] In a first aspect, a packet processing method is provided, the method comprising: 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 instructing the network device receiving the IPv6 packet to perform an action in the first IPv6 extension header in the data plane, the first IPv6 extension header being the next header after the IPv6 header; and the second network device performing the action 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.

[0009] Based on the solution provided in this application, the second network device executes the actions in the IPv6 extended header of the IPv6 packet in the corresponding processing plane, thereby ensuring that the IPv6 packet can be forwarded normally by the second network device.

[0010] In one possible implementation of the first aspect, the IPv6 header includes next header information, and the second network device performs the action 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, including: the second network device determines that the next header of the IPv6 header is the first IPv6 extension header based on the next header information, and performs the action in the first IPv6 extension header in the data plane of the second network device based on the first IPv6 extension header.

[0011] In another possible implementation of the first 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 the type of the option information and the length of the option data, the option length information indicating the length of the option data, and before the second network device performs the action 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, the method further includes: the second network device determining that it can recognize the option type information; and the second network device determining the length of the option data based on the option type information but not based on the option length information.

[0012] In another possible implementation of the first 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 the type of the option information and the length of the option data, the option length information indicating the length of the option data, and before the second network device performs the action 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, the method further includes: the second network device determining that it cannot recognize the option type information; and the second network device determining the length of the option data based on the option length information.

[0013] In another possible implementation of the first aspect, the IPv6 packet further includes a second IPv6 extension header, the second IPv6 extension header instructing the network device receiving the IPv6 packet to perform an action in the second IPv6 extension header in the control plane, the second IPv6 extension header being the next header after the first IPv6 extension header, and the method further includes: the second network device performing an action 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.

[0014] Secondly, a message processing method is provided, the method comprising: a first network device generating an IPv6 message, the IPv6 message including an IPv6 header and a first IPv6 extension header, the IPv6 header indicating that the protocol type of the IPv6 message is IPv6, the first IPv6 extension header instructing the network device receiving the IPv6 message to perform an action in the first IPv6 extension header in the data plane, the first IPv6 extension header being the next header after the IPv6 header; and the first network device sending the IPv6 message to a second network device.

[0015] Based on the solution provided in this application, a first network device sends an IPv6 packet carrying an IPv6 header and an IPv6 extension header to a second network device. The second network device then receives the IPv6 packet sent by the first network device and, according to the IPv6 header and IPv6 extension header in the IPv6 packet, executes the actions in the IPv6 extension header in the corresponding processing plane of the second network device, thereby ensuring that the IPv6 packet can be forwarded normally by the second network device.

[0016] In one possible implementation of the second aspect, the first IPv6 extension header includes option information, which includes option type information, option length information, and option data. The option type information indicates the type of the option information and the length of the option data, and the option length information indicates the length of the option data.

[0017] In another possible implementation of the second aspect, the IPv6 packet further includes a second IPv6 extension header, which instructs the network device receiving the IPv6 packet to perform the action in the second IPv6 extension header in the control plane, and the second IPv6 extension header is the next header after the first IPv6 extension header.

[0018] Optionally, in the first or second aspect described above, the IPv6 header includes next header information indicating that the next header of the IPv6 header is the first IPv6 extension header.

[0019] Optionally, in either the first or second aspect described above, the next header information further instructs the network device receiving the IPv6 message to process the first IPv6 extended header in the data plane.

[0020] Optionally, in the first or second aspect described above, the first IPv6 extension header includes option information, which includes option type information and option data, wherein the option type information indicates the type of the option information and the length of the option data.

[0021] Optionally, in the first or second aspect described above, the first IPv6 extension header includes first option information and second option information, the first option information including first option type information and first option data, the second option information including second option type information and second option data, the first option type information indicating the type of the first option information and the length of the first option data, and the second option type information indicating the type of the second option information and the length of the second option data.

[0022] Optionally, in either the first or second aspect described above, the first IPv6 extended 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.

[0023] Optionally, in either the first or second aspect described above, the first IPv6 extension header includes processing plane information that instructs the network device receiving the IPv6 packet to perform the action in the first IPv6 extension header in the data plane.

[0024] Optionally, in the first or second aspect described above, the first IPv6 extension header includes processing policy information, which instructs the network device receiving the IPv6 packet to perform an action on at least one option information included in the first IPv6 extension header.

[0025] In either the first or second aspect described above, optionally, the first IPv6 extended header is processed by each hop network device on the path through which the IPv6 packet is transmitted.

[0026] Thirdly, a network device is provided, which has the function of implementing the behavior of the first network device in the above method. The function can be implemented in hardware or in software executed from hardware. The hardware or software includes one or more modules corresponding to the above function.

[0027] In one possible design, the network device includes a processor and an interface. The processor is configured to support the network device in performing the corresponding functions described in the above methods. The interface supports communication between the network device and another network device, receiving information or instructions involved in the above methods from the other network device. The network device may also include a memory coupled to the processor, which stores necessary program instructions and data for the network device.

[0028] In another possible design, the network device includes a processor, a transmitter, a receiver, random access memory (RAM), read-only memory (ROM), and a bus. The processor is coupled to the transmitter, receiver, RAM, and ROM via the bus. When the network device needs to operate, it is booted by a bootloader embedded in the ROM or a basic input / output system, guiding the network device into normal operation. After the network device enters normal operation, an application program and action system are run in the RAM, causing the processor to execute the methods of the first aspect or any possible implementation thereof.

[0029] Fourthly, a network device is provided, comprising: a main control board and an interface board, and further, a switching board. The network device is used to execute the methods of the first aspect or any possible implementation thereof. Specifically, the network device includes modules for executing the methods of the first aspect or any possible implementation thereof.

[0030] Fifthly, a network device is provided, comprising a controller and a first forwarding sub-device. The first forwarding sub-device includes an interface board, and further may include a switching board. The first forwarding sub-device performs the functions of the interface board in the fourth aspect, and further may perform the functions of the switching board in the fourth aspect. The controller includes a receiver, a processor, a transmitter, random access memory (RAM), read-only memory (ROM), and a bus. The processor is coupled to the receiver, transmitter, RAM, and ROM via the bus. When the controller needs to run, it is booted by a bootloader embedded in the ROM or a basic input / output system, or an embedded system, to enter normal operation. After the controller enters normal operation, an application program and an action system run in the RAM, enabling the processor to perform the functions of the main control board in the fourth aspect.

[0031] In a sixth aspect, a computer storage medium is provided for storing programs, code, or instructions used by the aforementioned network device, which, when executed by a processor or hardware device, can perform the functions or steps of the first network device described in the first aspect.

[0032] In a seventh aspect, a network device is provided, which has the function of implementing the second network device behavior in the above method. The function can be implemented in hardware or in software. The hardware or software includes one or more modules corresponding to the above function.

[0033] In one possible design, the network device includes a processor and an interface. The processor is configured to support the network device in performing the corresponding functions described in the above methods. The interface is used to support communication between the network device and another network device, sending the information or instructions involved in the above methods to the other network device. The network device may also include a memory coupled to the processor, which stores necessary program instructions and data for the network device.

[0034] In another possible design, the network device includes a processor, a transmitter, a receiver, random access memory (RAM), read-only memory (ROM), and a bus. The processor is coupled to the transmitter, receiver, RAM, and ROM via the bus. When the network device needs to operate, it is booted by a bootloader embedded in the ROM or a basic input / output system, or in the embedded system, to enter normal operation. After the network device enters normal operation, an application program and action system are run in the RAM, causing the processor to execute the methods in the second aspect or any possible implementation thereof.

[0035] Eighthly, a network device is provided, the network device comprising: a main control board and an interface board, and further comprising a switching board. The network device is used to perform the methods of the second aspect or any possible implementation thereof. Specifically, the network device includes modules for performing the methods of the second aspect or any possible implementation thereof.

[0036] A ninth aspect provides a network device, the network device including a controller and a second forwarding sub-device. The second forwarding sub-device includes an interface board, and further may include a switching board. The second forwarding sub-device is used to perform the functions of the interface board in the eighth aspect, and further may also perform the functions of the switching board in the eighth aspect. The controller includes a receiver, a processor, a transmitter, random access memory, read-only memory, and a bus. The processor is coupled to the receiver, transmitter, random access memory, and read-only memory via the bus. When the controller needs to run, it is booted by a bootloader embedded in the read-only memory or a basic input / output system, guiding the controller into normal operation. After the controller enters normal operation, an application program and an action system run in the random access memory, enabling the processor to perform the functions of the main control board in the eighth aspect.

[0037] In a tenth aspect, a computer storage medium is provided for storing programs, code, or instructions used by the aforementioned network device, which, when executed by a processor or hardware device, can perform the functions or steps of the network device described in the second aspect.

[0038] Eleventhly, a network system is provided, the network system comprising a first network device and a second network device, wherein the first network device is a network device as described in the third, fourth, or fifth aspects above, and the second network device is a network device as described in the seventh, eighth, or ninth aspects above.

[0039] Through the above scheme, after receiving the IPv6 packet sent by the first network device, the second network device executes the actions in the IPv6 extension header in the corresponding processing plane of the second network device according to the IPv6 header and IPv6 extension header in the IPv6 packet, thereby ensuring that the IPv6 packet can be forwarded normally by the second network device. Attached Figure Description

[0040] Figure 1 This is a schematic diagram of a communication network structure according to an embodiment of this application;

[0041] Figure 2 This is a schematic diagram of another communication network structure according to an embodiment of this application;

[0042] Figure 3 This is a flowchart of a message processing method according to an embodiment of this application;

[0043] Figure 4 This is a format of the header of an IPv6 packet according to an embodiment of this application;

[0044] Figure 5 This is a format of an IPv6 extended header according to an embodiment of this application;

[0045] Figures 6a-6c The format of the options in the IPv6 extended header for embodiments of this application;

[0046] Figure 7 This is a schematic diagram of the structure of the second network device according to an embodiment of this application;

[0047] Figure 8 This is a schematic diagram of the hardware structure of the second network device according to an embodiment of this application;

[0048] Figure 9 This is a schematic diagram of the hardware structure of another second network device according to an embodiment of this application;

[0049] Figure 10 This is a schematic diagram of the structure of the first network device according to an embodiment of this application;

[0050] Figure 11 This is a schematic diagram of the hardware structure of the first network device according to an embodiment of this application;

[0051] Figure 12 This is a schematic diagram of the hardware structure of another first network device according to an embodiment of this application. Detailed Implementation

[0052] The technical solution of this application will be described in detail below through specific embodiments.

[0053] Figure 1This is a schematic diagram of a communication network structure according to an embodiment of this application. Figure 1 The communication network can be an IP network. The communication network includes a first network device and a second network device. The first network device can send IPv6 packets to the second network device; therefore, the communication network can 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 or second network device can be a hardware device, such as a router or switch, or a virtual network device deployed on a hardware device. When the first or second network device is a hardware device, it can include one or more forwarding cards, each forwarding card including a physical port for communicating with other network devices, and each forwarding card can include a central processing unit (CPU).

[0054] The first network device can send IPv6 packets to the second network device via a wired link, for example, both the first and second network devices are routers. The first network device can also send IPv6 packets to the second network device via a wireless link, for example, the first network device is a terminal device and the second network device is a base station. The IPv6 packets can be generated by the first network device. For example, the first network device generates IPv6 packets and then sends them to the second network device. The IPv6 packets can also be forwarded via the first network device. For example, the first network device receives an IPv6 packet sent by its upstream network device, processes the IPv6 packet, and forwards the processed IPv6 packet to the second network device. The second network device receives the IPv6 packet sent by the first network device and processes it. If the second network device is connected to a next-hop network device, it can also forward the processed IPv6 packet to that next-hop device.

[0055] like Figure 1As shown, the second network device may include a control plane and a data plane. The control plane controls and manages the operation of network protocols in the communication network, providing various network information and forwarding entries necessary for the data plane. The data plane, also known as the forwarding plane or user plane, is used to process and forward various types of data on the network device's interface. Additionally, the second network device may include a management plane. The management plane is for system maintenance personnel, providing input / output, user management, licenses, monitoring, configuration, alarms, and statistics for managed objects. In one possible implementation, the management plane is not established separately; instead, its functions are included in the control plane.

[0056] In one possible implementation, the control plane and data plane of the second network device are implemented in the same functional entity, such as in this application. Figure 8 As shown. Figure 8 This is one hardware implementation of the second network device, in which the processor is used to implement the control plane and data plane of the second network device. In another possible implementation, the control plane and data plane of the second network device are implemented in different functional entities, such as those described in this application. Figure 9 As shown. Figure 9 This is another hardware implementation of the second network device, in which the main control board implements the control plane of the second network device, and the interface board implements the data plane of the second network device. Specifically, the central processing unit in the main control board implements the control plane of the second network device, and the central processing unit in the interface board implements the data plane of the second network device. Additionally, in Figure 9 The main control board and interface board can be implemented by two independent network devices. That is, the second network device includes two independent network devices, which respectively implement the control plane and the data plane.

[0057] The second network device receives an IPv6 packet sent by the first network device. The IPv6 packet includes a header and a payload. According to RFC 8200, the header of the IPv6 packet includes an IPv6 header (Section 3 of RFC 8200). The IPv6 header includes Next Header information, also known as the Next Header field. If the value of the Next Header information in the IPv6 header is 0, it indicates that the next header in the IPv6 header is a Hop-by-Hop Options Header. For ease of explanation, this application uses "HBH header" to represent the Hop-by-Hop Options Header. Here, "HBH header is the next header in 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. According to Section 4.3 of RFC 8200, the HBH header is processed by each hop network device along the path in which the IPv6 packet is transmitted. Furthermore, the HBH header includes option information, which is also processed by each hop network device along the path in which the IPv6 packet is transmitted.

[0058] The HBH header includes option information, which can be found in Section 4.2 of RFC 8200. This option information includes option type information, option data length information, and option data. The option type information is 8 bits long. The highest two bits of the option type information determine the action taken by the network device receiving the IPv6 header when it cannot recognize the option type information. For example, a value of 00 for the highest two bits indicates that the network device skips the option information and continues processing the IPv6 packet header. This processing also includes processing the header indicated by the next header information in the HBH header of the IPv6 packet. A value of 01 for the highest two bits indicates that the network device discards the IPv6 packet. A value of 10 or 11 for the highest two bits indicates that the network device discards the IPv6 packet and sends a message containing Internet Control Message Protocol (ICMP) parameters. Therefore, RFC 8200 provides a simple action (skipping the option information or dropping the packet) for IPv6 packets containing HBH headers when the option type information cannot be recognized. However, RFC 8200 does not specify a concrete action for IPv6 packets containing HBH headers. Currently, network devices from various vendors often handle this by determining that the next header information in the IPv6 header of the IPv6 packet has a value of 0, thus indicating that the next header is an HBH header. Then, the network device sends the IPv6 packet from its data plane to its control plane. Consequently, the network device processes all IPv6 packets containing HBH headers using its control plane. This not only increases the load on the network device's control plane but may also affect the normal forwarding of IPv6 packets. For example, the option type information in the HBH header can be recognized by the network device's data plane but not by its control plane. Because network devices, upon confirming the presence of an HBH header in an IPv6 packet, directly forward it to their control plane, this process can disrupt normal IPv6 packet forwarding. For example, a network device might process all IPv6 packets containing an HBH header using its control plane. However, the bandwidth between the data plane and control plane is limited. A large number of IPv6 packets being forwarded to the control plane through this channel could lead to packet loss due to insufficient bandwidth.Therefore, this processing method affects normal IPv6 packet forwarding.

[0059] To address the above problems, this application proposes corresponding solutions. See [link / reference] Figure 1 A first network device sends an IPv6 packet to a second network device, which then receives the IPv6 packet. The IPv6 packet includes an IPv6 header and an IPv6 extension header. The IPv6 extension header instructs the receiving network device to perform the actions specified in the IPv6 extension header in either the data plane or the control plane. Upon receiving the IPv6 packet from the first network device, the second network device, based on the IPv6 header and IPv6 extension header, performs the actions specified in the IPv6 extension header in its corresponding processing plane, thereby ensuring that the IPv6 packet can be forwarded correctly by the second network device.

[0060] Figure 2 This is a schematic diagram of another communication network structure according to an embodiment of this application. Figure 2 As shown, the communication network includes routers R0, R1, R2, R3, R4, and R5. Routers R0, R1, R2, and R3 are connected sequentially via links, and router R4 is connected to routers R2 and R3 via links. Router R0 is also connected to a server via a link, and router R3 is also connected to user equipment via a link. Additionally, the communication network includes network management equipment, which is connected to routers R1, R2, R3, and R4 via links. The communication network includes an In-situ Flow Information Telemetry (iFIT) network domain, which includes routers R1, R2, R3, and R4. Router R1 is the head node of the iFIT network domain, routers R2 and R4 are intermediate nodes, and router R3 is the tail node. Router R0 can be an edge router. The server can send IPv6 packets to user equipment via router R0 and the iFIT network domain. The server can also receive IPv6 packets sent by user equipment via router R0 and the iFIT network domain.

[0061] In this embodiment, the example illustrates a server sending IPv6 packets to a user equipment. Network devices within the iFIT network domain can perform on-demand service performance testing on data streams and report the results to the network management device. Figure 2In the network shown, assuming the server sends a data stream including IPv6 packets to the user equipment via routers R0, R1, R2, and R4, the reporting method of the iFIT network domain can be set to tail node reporting, meaning router R4 is responsible for reporting the detection results to the network management device. Thus, the IPv6 extended header proposed in this application can be used to implement performance detection of streaming services in the iFIT network domain. The IPv6 extended header proposed in this application is an improvement on the HBH header defined in RFC8200, and therefore can be referred to as the "new HBH header." In the embodiments of this application, unless otherwise specified, "HBH header" refers to the HBH header defined in RFC8200, and "new HBH header" refers to the IPv6 extended header proposed in this application.

[0062] Router R1 is the head node of the iFIT network domain and is responsible for initiating corresponding detection based on the flow-based service performance detection task received from the network management device. Specifically, Router R1 receives a packet (possibly an IPv6 packet) sent by Router R0. It encapsulates a first new HBH header into this 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 after the IPv6 header. Router R1 sends the IPv6 packet to Router R2. After receiving the IPv6 packet, Router R2 determines, based on the IPv6 header and the first new HBH header, that it needs to execute the action in the first new HBH header in its data plane. Specifically, the first new HBH header includes option information, where the option type information indicates the type of flow-based service performance detection (e.g., detection in the iFIT network domain). The option data in the option information indicates the specific action corresponding to the detection task (e.g., delay detection). Router R2 runs a detection task according to the instructions in the option type information, performs specific actions according to the instructions in the option data, and adds the detection results to the option data in the option information. Then, router R2 sends the updated IPv6 packet to router R3. Router R3 performs the flow service performance detection in the same way as router R2 and reports the detection results to the network management device. The IPv6 packet also includes an iFIT header, which is typically encapsulated in the payload of the IPv6 packet.

[0063] exist Figure 2In the implementation shown, the new HBH header enables performance detection of in-stream services in the iFIT network domain. Conversely, if the new HBH header in this application is not used, but instead the HBH header defined in RFC8200 is used as the next header after the IPv6 header, router R1 may directly send the received IPv6 packets to its control plane. Router R1's control plane may skip the HBH header or directly discard the IPv6 packets, thus preventing in-stream service performance detection and potentially affecting normal IPv6 packet forwarding. Furthermore, network devices in the network may come from different vendors. According to RFC8200, the definition of the corresponding action of the HBH header is determined by the network device configuration; therefore, different configurations from different vendors may lead to service incompatibility.

[0064] Figure 3 This is a flowchart of a message processing method according to an embodiment of this application. Figure 3 The method shown can be applied to Figure 1 or Figure 2 In the network structure shown, for ease of explanation in this application embodiment, "first network device" and "second network device" are used. It should be understood that "first network device" can be... Figure 2 In the context of router R1, the "second network device" can be... Figure 2 Router R2 or router R3 in the system. Specifically, the method includes:

[0065] S101. The 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 instructing the network device receiving the IPv6 packet to perform the action in the first IPv6 extension header in the data plane.

[0066] S102, the first network device sends the IPv6 message to the second network device.

[0067] In one possible implementation, the first network device receives a first packet sent by its upstream network device. The first packet is not an IPv6 packet. Then, the first network device encapsulates the first packet into an IPv6 packet based on the IPv6 protocol. In another possible implementation, the first network device receives a first packet sent by its upstream network device. The first packet is an IPv6 packet. Then, the first network device updates the first packet to obtain the IPv6 packet. The updating process includes adding the first IPv6 extension header to the first packet.

[0068] In conjunction with the aforementioned implementation methods, the first IPv6 extended header can be a new HBH header. Figure 4 The image shows the packet 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 will be referred to as the "first next header information" below) is TBD. TBD indicates that the next header of the IPv6 header is the first IPv6 extension header. That is, 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, such as... Figure 4 As shown. "TBD" is merely an exemplary representation; the specific value can be determined by the relevant standards organization.

[0069] The value of the first next header information being TBD not only indicates that the next header after the IPv6 header is the first IPv6 extension header, but also instructs the network device receiving the IPv6 packet to 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, it will keep the IPv6 packet processed in its data plane instead of sending it to its control plane for processing. This is significantly different from the implementation of the HBH header in RFC8200 described above.

[0070] In this embodiment, the first IPv6 extension header is processed by each hop network device along the path that transmits the IPv6 packet. That is, each hop network device along the IPv6 packet transmission path checks and processes the first IPv6 extension packet. Furthermore, the first IPv6 extension header includes option information, which is processed by each hop network device along the path that transmits the IPv6 packet.

[0071] See Figure 4The first IPv6 extended header includes next header information, header extension length (HdrExtLen) information, and option information. As described above, the value of the first next header information (TBD) indicates that the next header after the IPv6 header is the first IPv6 extended header, and instructs the network device receiving the IPv6 packet to process the first IPv6 extended header in the data plane. The option information in the first IPv6 extended header stores the specific actions to be performed in the data plane. Further, the option information includes option data, which stores the specific actions to be performed in the data plane. For specific implementation details, please refer to the subsequent description of this embodiment. In one possible implementation, the value of the next header information in the first IPv6 extended header is 0, indicating that the next header after the first IPv6 extended header is an HBH header. That is, an HBH header as defined in RFC8200 can be encapsulated after a new HBH header. In this way, after the network device receiving the IPv6 packet processes the first IPv6 extended header in the data plane, it sends the IPv6 packet to the control plane of the network device and processes the HBH header in the control plane.

[0072] The IPv6 message also includes a payload (not shown). Figure 4 (In the context of the first IPv6 extension header). If the value of the next header information in the first IPv6 extension header indicates that there is no next header after the first IPv6 extension header, the payload will immediately follow the first IPv6 extension header. If the next header after the first IPv6 extension header is an HBH header, the payload may immediately follow the HBH header. Optionally, other headers may precede the payload.

[0073] S103, the second network device receives the IPv6 message sent by the first network device.

[0074] S104. The second network device executes the action in the first IPv6 extension header in the data plane of the second network device according to the IPv6 header and the first IPv6 extension header.

[0075] In conjunction with the foregoing, the second network device receives the 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 through its data plane, for example, through an interface board. The IPv6 packet includes the IPv6 header and the first IPv6 extension header. After receiving the IPv6 packet, the second network device obtains the IPv6 header. Then, the second network device processes the IPv6 header and obtains the first next header information from the IPv6 header. For example, based on the value of the first next header information being TBD, the second network device can determine that the next header of the IPv6 header is the first IPv6 extension header, and determine to process the first IPv6 extension header in its data plane. Accordingly, the second network device will not send the IPv6 packet to the control plane of the second network device, but will continue to process the next header of the IPv6 header, namely the first IPv6 extension header, in the data plane of the second network device.

[0076] After the second network device determines the first IPv6 extension header based on the IPv6 header, it executes the action in the first IPv6 extension header in the data plane based on the first IPv6 extension header.

[0077] Retrieve the option information from the first IPv6 extended header, such as Figure 4 As shown. Then, further, Figure 6a , Figure 6b and Figure 6c It shows Figure 4 The implementation method of the option information in the first IPv6 extension header. That is, the option information in the first IPv6 extension header can be implemented according to... Figure 6a , Figure 6b or Figure 6c This is achieved in the following way.

[0078] See Figure 6aThe option information includes option type information and option data. The length of the option type information can be 8 bits. The option type information indicates not only the type of option information but also the length of the option data. For example, the value of the option type information is "11001100". "11001100" simultaneously indicates that the type of option information is "latency detection in the iFIT network domain" and the length of the option data is AA bytes. Therefore, the second network device stores the correspondence between the value "11001100" and "latency detection in the 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 can find the corresponding "latency detection in the iFIT network domain" and "AA bytes". Thus, the second network device can determine that the type of option information is "latency detection in the iFIT network domain" and the length of the option data is AA bytes. The second network device performs the action indicated by the option type information (detecting transmission delay) in the data plane and adds the detection result to the option data. Thus, the second network device can process the first IPv6 extension header in its data plane. Figure 6a The implementation shown reduces the length of the option information, thereby reducing the length of the IPv6 message.

[0079] See Figure 6b The option information includes option type information, option length information, and option data. The length of the option type information can be 8 bits. Figure 6b The definition of option type information can be found in [link to documentation]. Figure 6a The explanation is that the option type information indicates not only the type of option information but also the length of the option data. Relative to... Figure 6a , Figure 6bThe implemented option information also includes option length information, which 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 from the option information. The second network device determines whether it can recognize the option type information, that is, whether it has the capability to parse and process the option type information. Accordingly, if the second network device determines that it can recognize the option type information, it determines the length of the option data based on the option type information, without needing to determine the length of the option data based on the option length information. If the second network device determines that it cannot recognize the option type information, it determines the length of the option data based on the option length information. Figure 6b The implementation shown ensures that when option type information cannot be recognized, the second network device can skip the unrecognizable packet data portion and continue processing the recognizable portion of the packet.

[0080] 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 the type of the first option information and the length of the first option data. The second option type information indicates the type of the second option information and the length of the second option data. Further optionally, the first IPv6 extension header includes a bitmap, which includes first bits and second bits. The first bits indicate the first option type information, and the second bits indicate the second option type information.

[0081] See Figure 6c The option information includes a bitmap and multiple option data. The bitmap can be 16 bits long. Figure 6c The illustrated implementation uses a bitmap to represent multiple option information. Specifically, the 16 bits of the bitmap can represent 16 option types, meaning each bit represents one option type. For example, a bitmap value of "0000000000000011" represents 16 option types. The least significant bit in the bitmap represents option type 1, the second least significant bit represents option type 2, and so on, with the most significant bit representing option type 16. Each bit has a value of either 0 or 1. When a bit is 0, the corresponding option type is disabled; when a bit is 1, the corresponding option type is enabled. As described above, when the bitmap length is 16 bits, the maximum number of option data is 16.

[0082] For example, the bitmap value is "0000000000000011". Bits 3 through 16 are all 0, indicating that option type 3 through option type 16 are not enabled. A value of 1 for bit 1 indicates that option type 1 (first option type information) is enabled. Therefore, the option information also includes first option data. That is, 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 indicated by the first option type information and the length of the first option data. Similarly, a value of 1 for bit 2 indicates that option type 2 (second option type information) is enabled. Therefore, the option information also includes second option data. That is, 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 indicated by the second option type information and the length of the second option data. In this way, multiple sub-option information can be aggregated using a single option information.

[0083] Optionally, the IPv6 packet further includes a second IPv6 extension header, the second IPv6 extension header instructing the network device receiving the IPv6 packet to perform the action in the second IPv6 extension header in the control plane, the second IPv6 extension header being the next header after the first IPv6 extension header, and the method further includes: the second network device performing the action 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.

[0084] According to the foregoing embodiments, the IPv6 packet includes an IPv6 header, and a first IPv6 extension header is the next header following the IPv6 header. The first IPv6 extension header includes first next header information, the value of which can be 0, indicating that the next header following the first IPv6 extension header is the HBH header (second IPv6 extension header) defined in RFC 8200. The second network device processes the first IPv6 extension header in its data plane according to the foregoing embodiments, and determines that the next header following the first IPv6 extension header is an HBH header based on the value of the first next header information in the first IPv6 extension header being 0. According to the foregoing embodiments, the second network device may upload the IPv6 packet to its control plane and process the HBH header in the control plane.

[0085] Optionally, the first IPv6 extension header includes processing plane information, which instructs the network device receiving the IPv6 packet to perform the action in the first IPv6 extension header in the data plane.

[0086] In the foregoing embodiments, a new HBH header is provided as the next header after the IPv6 header in an IPv6 packet. This ensures that network devices can process IPv6 packets in the data plane. In one possible implementation, the HBH header defined in RFC 8200 can be extended, allowing the network device to determine whether to process the extended HBH header in its data plane or control plane.

[0087] For example, a second network device receives an IPv6 packet sent by a first network device. The IPv6 packet includes an IPv6 header and a first IPv6 extended header. The first IPv6 extended header is an extended HBH header. Figure 5 As shown, the extended HBH header, compared to the HBH header defined in RFC8200, adds reserved information, the length of which can be 2 bytes. The reserved information includes processing plane information. The second network device can determine whether to process the extended HBH header in its data plane or its control plane 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 in 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 decide whether to keep the IPv6 packet in the data plane or send it to the control plane. The second network device will further obtain the processing plane information from the reserved information in the extended HBH header. For example, a value of 00 for the processing plane information indicates the control plane. The second network device determines that the value of the processing plane information is 00, and then sends the IPv6 packet to the control plane, where it processes the extended HBH header. Alternatively, if the value of the processing plane information is 11, indicating the data plane, the second network device determines that the value of the processing plane information is 11, and then holds the IPv6 packet in the data plane, where it processes the extended HBH header.

[0088] Optionally, the first IPv6 extension header includes processing policy information, which instructs the network device receiving the IPv6 packet to perform an action on at least one option information included in the first IPv6 extension header.

[0089] The reserved information in the extended HBH header may further include processing policy information. This processing policy information instructs the second network device to process multiple option information in the first IPv6 extended header. For example, the first IPv6 extended 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 using type-length-value (TLV) methods. The action indicated by the processing policy information is valid for option information 1, option information 2, and option information 3.

[0090] Similarly, the new HBH header shown above can also include processing strategy information to enable the processing of multiple option information.

[0091] In this embodiment, the first IPv6 extension header is processed by each hop network device along the path that transmits the IPv6 packet. That is, each hop network device along the IPv6 packet transmission path checks and processes the first IPv6 extension packet. Furthermore, the first IPv6 extension header includes option information, which is processed by each hop network device along the path that transmits the IPv6 packet.

[0092] According to the aforementioned implementation, the first IPv6 extension header is the next header after the IPv6 header, and when there is any other extension header in the IPv6 packet, the first IPv6 extension header is located before any other extension header.

[0093] Through the above implementation, after receiving the IPv6 packet sent by the first network device, the second network device executes the actions in the IPv6 extension header in the corresponding processing plane of the second network device according to the IPv6 header and IPv6 extension header in the IPv6 packet, thereby ensuring that the IPv6 packet can be forwarded normally by the second network device.

[0094] Figure 7 This is a schematic diagram of the structure of the second network device 1000 according to an embodiment of this application. Figure 7 The second network device 1000 shown can perform the corresponding steps executed by the second network device in the method of the above embodiments. The second network device is deployed in a communication network, which also includes the first network device. Figure 7As shown, the second network device 1000 includes a receiving unit 1002 and a processing unit 1004.

[0095] The receiving unit 1002 is configured to receive an IPv6 packet sent by a first network device. The IPv6 packet includes an IPv6 header and a first IPv6 extension header. The first IPv6 extension header instructs the network device receiving the IPv6 packet to perform the action in the first IPv6 extension header in the data plane.

[0096] The processing unit 1004 is configured to execute the action in the first IPv6 extension header in the data plane of the second network device according to the IPv6 header and the first IPv6 extension header.

[0097] Optionally, the IPv6 header includes next header information, which indicates that the next header of the IPv6 header is the first IPv6 extension header.

[0098] Optionally, the next header information further instructs the network device receiving the IPv6 packet to process the first IPv6 extended header in the data plane.

[0099] Optionally, when performing the action in the first IPv6 extended header in the data plane of the second network device according to the IPv6 header and the first IPv6 extended 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 extended header; and the processing unit 1004 is further configured to perform the action in the first IPv6 extended header in the data plane of the second network device according to the first IPv6 extended header.

[0100] Optionally, the first IPv6 extension header includes option information, which includes option type information and option data, wherein the option type information indicates the type of the option information and the length of the option data.

[0101] Optionally, the first IPv6 extension header includes option information, which includes option type information, option length information, and option data. The option type information indicates the type of the option information and the length of the option data, and the option length information indicates the length of the option data. Before the processing unit 1004 performs the action 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, the processing unit 1004 is further configured to: determine that the option type information can be identified; and determine the length of the option data based on the option type information but not based on the option length information.

[0102] Optionally, the first IPv6 extended header includes option information, which includes option type information, option length information, and option data. The option type information indicates the type of the option information and the length of the option data, and the option length information indicates the length of the option data. Before the processing unit 1004 performs the action in the first IPv6 extended header in the data plane of the second network device based on the IPv6 header and the first IPv6 extended header, the processing unit 1004 is further configured to: determine that the option type information cannot be recognized; and determine the length of the option data based on the option length information.

[0103] 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 the type of the first option information and the length of the first option data. The second option type information indicates the type of the second option information and the length of the second option data.

[0104] Optionally, the first IPv6 extended 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.

[0105] Optionally, the IPv6 packet further includes a second IPv6 extension header, which instructs the network device receiving the IPv6 packet to perform the action in the second IPv6 extension header in the control plane. The second IPv6 extension header is the next header after the first IPv6 extension header. The processing unit 1004 is further configured to perform the action 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.

[0106] Optionally, the first IPv6 extension header includes processing plane information, which instructs the network device receiving the IPv6 packet to perform the action in the first IPv6 extension header in the data plane.

[0107] Optionally, the first IPv6 extension header includes processing policy information, which instructs the network device receiving the IPv6 packet to perform an action on at least one option information included in the first IPv6 extension header.

[0108] Optionally, the second network device 1000 further includes a sending unit for sending processed IPv6 packets to the third network device.

[0109] Figure 7 The second network device shown can perform the corresponding steps executed by the second network device in the method of the above embodiments. The second network device receives IPv6 packets sent by the first network device, and performs the actions in the IPv6 extension header in the corresponding processing plane of the second network device according to the IPv6 header and IPv6 extension header in the IPv6 packet, thereby ensuring that the IPv6 packet can be forwarded normally by the second network device.

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

[0111] like Figure 8 As shown, the second network device 1100 includes a processor 1101, a memory 1102, an interface 1103, and a bus 1104. The interface 1103 can be implemented wirelessly or via a wired connection. The processor 1101, memory 1102, and interface 1103 are connected via the bus 1104.

[0112] The interface 1103 may specifically include a transmitter and a receiver, used for sending and receiving information between the second network device and the first network device in the above embodiment. For example, the interface 1103 is used to support receiving IPv6 packets sent by the first network device, or to support forwarding processed IPv6 packets. As an example, the interface 1103 is used to support... Figure 3 The process S103 is described above. The processor 1101 is used to perform the processing performed by the second network device in the above embodiments. For example, the processor 1101 is used to perform actions in the IPv6 extended header; and / or other processes used in the techniques described herein. As an example, the processor 1101 is used to support... Figure 3 The process S104 is described above. Memory 1102 stores programs, code, or instructions, such as an action system 11021 and an application program 11022. When the processor or hardware device executes these programs, code, or instructions, the processing involving the second network device in the method embodiment can be completed. Optionally, the memory 1102 may include read-only memory (ROM) and random access memory (RAM). The ROM includes a Basic Input / Output System (BIOS) or an embedded system; the RAM includes the application program and the action system. When the second network device 1100 needs to be run, the system is booted through the BIOS embedded in the ROM or the bootloader in the embedded system, guiding the second network device 1100 into normal operation. After the second network device 1100 enters normal operation, the application program and the action system running in the RAM complete the processing involving the second network device in the method embodiment.

[0113] Understandable Figure 8 Only a simplified design of the second network device 1100 is shown. In practical applications, the second network device can contain any number of interfaces, processors, or memory.

[0114] Figure 9 This is a schematic diagram of the hardware structure of another second network device 1200 according to an embodiment of this application. Figure 9 The second network device 1200 shown can perform the corresponding steps executed by the second network device in the method of the above embodiments.

[0115] like Figure 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, interface boards 1230 and 1240, and the switching board 1220 are interconnected via a system bus and a system backplane. The main control board 1210 performs system management, equipment maintenance, and protocol processing functions. The switching board 1220 performs data exchange between the interface boards (also called line cards or service boards). Interface boards 1230 and 1240 provide various service interfaces (e.g., POS interface, GE interface, ATM interface, etc.) and forward data packets.

[0116] The interface board 1230 may include a central processing unit 1231, a forwarding table entry memory 1234, a physical interface card 1233, and a network processor 1232. The central processing unit 1231 is used to control and manage the interface board and communicate with the central processing unit on the main control board. The forwarding table entry memory 1234 is used to store forwarding table entries. The physical interface card 1233 is used to receive and send traffic. The network memory 1232 is used to control the physical interface card 1233 to send and receive traffic according to the forwarding table entries.

[0117] Specifically, physical interface card 1233 is used to receive IPv6 packets sent by the first network device. Physical interface card 1233 is also used to forward processed IPv6 packets.

[0118] 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 that the IPv6 packet needs to be processed by the central processing unit 1231 based on the information in the packet header. Accordingly, the central processing unit 1231 processes the IPv6 packet.

[0119] Optionally, 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 that the IPv6 packet needs to be processed by the central processing unit 1211 based on the information in the packet header. The central processing unit 1231 then uploads the IPv6 packet to the central processing unit 1211, which processes the IPv6 packet.

[0120] The central processing unit 1231 is also used to control the network memory 1232 to retrieve forwarding entries from the forwarding entry memory 1234, and the central processing unit 1231 is also used to control the network memory 1232 to forward the processed IPv6 packets to the third network device via the physical interface card 1233.

[0121] It should be understood that the actions on interface board 1240 in this embodiment are consistent with the actions on interface board 1230, and will not be described again for the sake of brevity. It should also be understood that the second network device 1200 in this embodiment may correspond to the functions and / or various steps implemented in the above method embodiments, and will not be described again here.

[0122] Furthermore, it should be noted that there may be one or more main control boards, including a primary and a backup main control board. There may also be one or more interface boards; the stronger the data processing capability of the second network device, the more interface boards it provides. Each interface board may also have one or more physical interface cards. There may be no switching network board, or one or more; multiple boards can share the load for redundancy and backup. In a centralized forwarding architecture, the second network device may not need a switching network board, with the interface boards handling the entire system's business data processing. In a distributed forwarding architecture, the second network device can have at least one switching network board, enabling data exchange between multiple interface boards and providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a distributed architecture second network device are greater than those of a centralized architecture device. The specific architecture adopted depends on the specific network deployment scenario, and no limitations are made here.

[0123] In addition, this application provides a computer storage medium for storing computer software instructions for use by the second network device described above, which includes a program designed to execute the method embodiments described above.

[0124] Figure 10 This is a schematic diagram of the structure of the first network device 2000 according to an embodiment of this application. Figure 10 The first network device 2000 shown can perform the corresponding steps executed by the first network device in the method of the above embodiments. The first network device is deployed in a communication network, which also includes a second network device. Figure 10 As shown, the first network device 2000 includes a processing unit 2004 and a sending unit 2006.

[0125] The processing unit 2004 is used to generate an IPv6 packet, the IPv6 packet including an IPv6 header and a first IPv6 extension header, the first IPv6 extension header instructing the network device receiving the IPv6 packet to perform the action in the first IPv6 extension header in the data plane;

[0126] The sending unit 2006 is used to send the IPv6 message to the second network device.

[0127] Optionally, the IPv6 header includes next header information, which indicates that the next header of the IPv6 header is the first IPv6 extension header.

[0128] Optionally, the next header information further instructs the network device receiving the IPv6 packet to process the first IPv6 extended header in the data plane.

[0129] Optionally, the first IPv6 extension header includes option information, which includes option type information and option data, wherein the option type information indicates the type of the option information and the length of the option data.

[0130] Optionally, the first IPv6 extended header includes option information, which includes option type information, option length information, and option data. The option type information indicates the type of the option information and the length of the option data, and the option length information indicates the length of the option data.

[0131] 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 the type of the first option information and the length of the first option data. The second option type information indicates the type of the second option information and the length of the second option data.

[0132] Optionally, the first IPv6 extended 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.

[0133] Optionally, the IPv6 packet further includes a second IPv6 extension header, which instructs the network device receiving the IPv6 packet to perform the action in the second IPv6 extension header in the control plane, and the second IPv6 extension header is the next header after the first IPv6 extension header.

[0134] Optionally, the first IPv6 extension header includes processing plane information, which instructs the network device receiving the IPv6 packet to perform the action in the first IPv6 extension header in the data plane.

[0135] Optionally, the first IPv6 extension header includes processing policy information, which instructs the network device receiving the IPv6 packet to perform an action on at least one option information included in the first IPv6 extension header.

[0136] Optionally, the first network device further includes a receiving unit, which is configured to receive packets from the previous-hop network device of the first network device.

[0137] Figure 10The first network device shown can perform the corresponding steps executed by the first network device in the method of the above embodiments. The first network device sends an IPv6 packet carrying an IPv6 header and an IPv6 extension header to the second network device. The second network device receives the IPv6 packet sent by the first network device and, based on the IPv6 header and IPv6 extension header in the IPv6 packet, executes the actions in the IPv6 extension header in the corresponding processing plane of the second network device, thereby ensuring that the IPv6 packet can be forwarded normally by the second network device.

[0138] Figure 11 This is a schematic diagram of the hardware structure of the first network device 2100 according to an embodiment of this application. Figure 11 The first network device 2100 shown can perform the corresponding steps executed by the first network device in the method of the above embodiments.

[0139] like Figure 11 As shown, the first network device 2100 includes a processor 2101, a memory 2102, an interface 2103, and a bus 2104. The interface 2103 can be implemented wirelessly or via a wired connection. The processor 2101, memory 2102, and interface 2103 are connected via the bus 2104.

[0140] The interface 2103 may specifically include a transmitter and a receiver, used for sending and receiving information or data between the first network device and the second network device in the above embodiments. For example, the interface 2103 is used to support sending IPv6 packets to the second network device; as another example, the interface 2103 is used to support receiving packets sent by the upstream network device of the first network device. As an example, the interface 2103 is used to support... Figure 3 The process S102 in the above embodiment. The processor 2101 is used to perform the processing performed by the first network device in the above embodiment. For example, the processor 2101 is used for IPv6 packets; and / or other processes for the techniques described herein. As an example, the processor 2101 is used to support Figure 3The process S101 is described above. The memory 2102 includes an operating system 21021 and an application program 21022, used to store programs, code, or instructions. When the processor or hardware device executes these programs, code, or instructions, the processing involving the first network device in the method embodiment can be completed. Optionally, the memory 2102 may include read-only memory (ROM) and random access memory (RAM). The ROM includes a Basic Input / Output System (BIOS) or an embedded system; the RAM includes the application program and the operating system. When the first network device 2100 needs to be run, the system is booted through the BIOS embedded in the ROM or the bootloader in the embedded system, guiding the first network device 2100 into normal operation. After the first network device 2100 enters normal operation, the application program and the operating system running in the RAM complete the processing involving the first network device in the method embodiment.

[0141] It is understandable that Figure 11 Only a simplified design of the first network device 2100 is shown. In practical applications, the first network device can contain any number of interfaces, processors, or memory.

[0142] Figure 12 This is a schematic diagram of the hardware structure of another first network device 2200 according to an embodiment of this application. Figure 12 The first network device 2200 shown can perform the corresponding steps executed by the first network device in the method of the above embodiments.

[0143] like Figure 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, interface boards 2230 and 2240, and the switching board 2220 are interconnected with the system backplane via a system bus. The main control board 2210 performs system management, equipment maintenance, and protocol processing functions. The switching board 2220 performs data exchange between the interface boards (also called line cards or service boards). Interface boards 2230 and 2240 provide various service interfaces (e.g., POS interface, GE interface, ATM interface, etc.) and forward data packets.

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

[0145] Specifically, physical interface card 2233 is used to send IPv6 to the first network device. Physical interface card 2233 is also used to receive packets sent by the upstream network device of the first network device.

[0146] In one 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 then sent to the second network device via the physical interface card 2233.

[0147] In another possible implementation, the physical interface card 2233 receives a message sent by the upstream network device of the first network device, the central processing unit 2231 processes the message to obtain an IPv6 message, and the IPv6 message is sent to the second network device via the physical interface card 2233.

[0148] The central processing unit 2231 is also used to control the network memory 2232 to retrieve forwarding entries from the forwarding entry memory 2234, and the central processing unit 2231 is also used to control the network memory 2232 to complete the reception and transmission of traffic via the physical interface card 2233.

[0149] It should be understood that the actions on interface board 2240 in this embodiment are consistent with the actions on interface board 2230, and will not be described again for the sake of brevity. It should also be understood that the first network device 2200 in this embodiment may correspond to the functions and / or steps implemented in the above method embodiments, and will not be described again here.

[0150] Furthermore, it should be noted that there may be one or more main control boards, including a primary and a backup main control board. There may also be one or more interface boards; the stronger the data processing capability of the first network device, the more interface boards it provides. Each interface board may also have one or more physical interface cards. There may be no switching network board, or one or more; multiple boards can share the load for redundancy and backup. In a centralized forwarding architecture, the first network device may not need a switching network board, with the interface boards handling the entire system's business data processing. In a distributed forwarding architecture, the first network device can have at least one switching network board, enabling data exchange between multiple interface boards and providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a distributed architecture first network device are greater than those of a centralized architecture device. The specific architecture adopted depends on the specific network deployment scenario, and no limitations are made here.

[0151] In addition, embodiments of this application provide a computer storage medium for storing computer software instructions used by the first network device described above, which includes a program designed to execute the method embodiments described above.

[0152] This application embodiment also includes a network system, the network system comprising a second network device and a first network device, wherein the second network device is the aforementioned... Figure 7 or Figure 8 or Figure 9 The second network device in the process, wherein the first network device is the aforementioned Figure 10 or Figure 11 or Figure 12 The first network device in the system.

[0153] The steps of the methods or algorithms described in this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in RAM, flash memory, ROM, EPROM, EEPROM, registers, hard disk, portable hard disk, CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Alternatively, the ASIC can reside in a user device. Of course, the processor and storage medium can also exist as discrete components in the user device.

[0154] Those skilled in the art will recognize that, in one or more of the examples above, the functionality described in this application can be implemented using hardware or a combination of hardware and software. When implemented using a combination of hardware and software, the software can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium accessible to a general-purpose or special-purpose computer.

[0155] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application.

Claims

1. A message processing method, characterized in that, The method includes: The second network device receives an Internet Protocol version 6 (IPv6) message sent by the first network device. The IPv6 message includes an IPv6 header and a first hop-by-hop (HBH) option header. The IPv6 header indicates that the protocol type of the IPv6 message is IPv6. The IPv6 header includes next header information, which indicates that the next header of the IPv6 header is the first HBH option header. The second network device determines, based on the next header information, that the next header of the IPv6 header is the first HBH option header; The second network device processes the first HBH option header in the forwarding plane of the second network device.

2. The method as described in claim 1, characterized in that, The second network device processes the first HBH option header in its forwarding plane, including: The second network device executes the action in the first HBH option header in the forwarding plane of the second network device.

3. The method as described in claim 1, characterized in that, The first HBH option header includes first option information, which includes first type information and first option data. The second network device processes the first HBH option header in its forwarding plane, including: The second network device executes the action in the first option data in the forwarding plane of the second network device according to the first type information.

4. The method as described in claim 3, characterized in that, The first HBH option header also includes second option information, which further includes second type information and second option data.

5. The method as described in claim 1, characterized in that, The first HBH option header includes option information, which includes type information, option length information, and option data. The type information indicates the type of the option information and the length of the option data, and the option length information indicates the length of the option data. Before the second network device processes the first HBH option header in the forwarding plane of the second network device, the method further includes: The second network device determines that it can identify the type information; The second network device determines the length of the option data based on the type information and not on the option length information.

6. The method as described in claim 1, characterized in that, The first HBH option header includes option information, which includes type information, option length information, and option data. The type information indicates the type of the option information and the length of the option data, and the option length information indicates the length of the option data. Before the second network device processes the first HBH option header in the forwarding plane of the second network device, the method further includes: The second network device determines that it cannot recognize the type of information; The second network device determines the length of the option data based on the option length information.

7. The method as described in claim 1, characterized in that, The first HBH option header includes first option information and second option information. The first option information includes first type information and first option data. The second option information includes second type information and second option data. The first type information indicates the type of the first option information and the length of the first option data. The second type information indicates the type of the second option information and the length of the second option data.

8. The method as described in claim 7, characterized in that, The first HBH option header includes a bitmap, which includes a first bit and a second bit. The first bit indicates the first option type information, and the second bit indicates the second type information.

9. The method as described in claim 8, characterized in that, The IPv6 packet further includes a second HBH option header, which instructs the network device receiving the IPv6 packet to process the second HBH option header in the control plane. The second HBH option header is the next header after the first HBH option header. The method further includes: The second network device processes the second HBH option header in its control plane based on the first HBH option header and the second HBH option header.

10. The method as described in claim 1 or 2, characterized in that, The first HBH option header includes processing plane information, which instructs the network device receiving the IPv6 packet to process the first HBH option header in the forwarding plane.

11. The method as described in claim 1 or 2, characterized in that, The first HBH option header includes processing policy information, which instructs the network device receiving the IPv6 packet to perform an action on at least one option information included in the first HBH option header.

12. The method as described in claim 11, characterized in that, The first HBH option header is passed to each hop network device along the path of the IPv6 packet for processing.

13. The method as described in claim 1, characterized in that, The first HBH option header includes multiple option data. The second network device processes the first HBH option header in the forwarding plane of the second network device, specifically including: the second network device executes the action of the specified option data among the multiple option data in the first HBH option header in the forwarding plane of the second network device.

14. A message processing method, characterized in that, The method includes: The first network device generates an Internet Protocol version 6 (IPv6) packet. The IPv6 packet includes an IPv6 header and a first hop-by-hop HBH option header. The IPv6 header indicates that the protocol type of the IPv6 packet is IPv6. The IPv6 header includes next header information, which indicates that the next header of the IPv6 header is the first HBH option header. The first network device sends the IPv6 packet to the second network device, and the IPv6 packet triggers the second network device to process the first HBH option header in the forwarding plane of the second network device.

15. The method as described in claim 14, characterized in that, The IPv6 packet triggers the second network device to process the first HBH option header in the forwarding plane of the second network device, specifically including: The IPv6 message triggers the second network device to execute the action in the first HBH option header in the forwarding plane of the second network device.

16. The method as described in claim 14, characterized in that, The first HBH option header includes first option information, which includes first type information and first option data. The IPv6 packet triggers the second network device to process the first HBH option header in the forwarding plane of the second network device, specifically including: The IPv6 packet triggers the second network device to execute the action in the first option data in the forwarding plane of the second network device according to the first type information.

17. The method as described in claim 16, characterized in that, The first HBH option header also includes second option information, which further includes second type information and second option data.

18. The method as described in claim 14 or 15, characterized in that, The first HBH option header includes processing plane information, which instructs the network device receiving the IPv6 packet to process the first HBH option header in the forwarding plane.

19. The method as described in claim 14 or 15, characterized in that, The first HBH option header includes processing policy information, which instructs the network device receiving the IPv6 packet to perform an action on at least one option information included in the first HBH option header.

20. The method according to any one of claims 15-17, characterized in that, The first HBH option header includes multiple option data. Specifically, the IPv6 packet triggers the second network device to process the first HBH option header in the forwarding plane of the second network device. This includes the IPv6 packet triggering the second network device to execute the action of the specified option data among the multiple option data in the first HBH option header in the forwarding plane of the second network device.

21. A second network device, characterized in that, The second network device includes: The receiving unit is configured to receive an Internet Protocol version 6 (IPv6) message sent by a first network device. The IPv6 message includes an IPv6 header and a first hop-by-hop (HBH) option header. The IPv6 header indicates that the protocol type of the IPv6 message is IPv6. The IPv6 header includes next header information, which indicates that the next header of the IPv6 header is the first HBH option header. The processing unit is configured to determine, based on the next header information, that the next header of the IPv6 header is the first HBH option header; The processing unit is also configured to process the first HBH option header in the forwarding plane of the second network device.

22. The second network device as claimed in claim 21, characterized in that, The processing unit is specifically used to: execute the action in the first HBH option header in the forwarding plane of the second network device.

23. The second network device as claimed in claim 21, characterized in that, The first HBH option header includes first option information, which includes first type information and first option data. The processing unit is specifically used for: Based on the first type of information, the action in the first option data is executed in the forwarding plane of the second network device.

24. The second network device as claimed in claim 23, characterized in that, The first HBH option header also includes second option information, which further includes second type information and second option data.

25. The second network device as described in claim 21 or 22, characterized in that, The first HBH option header includes processing plane information, which instructs the network device receiving the IPv6 packet to process the first HBH option header in the forwarding plane.

26. The second network device as described in claim 21 or 22, characterized in that, The first HBH option header includes processing policy information, which instructs the network device receiving the IPv6 packet to perform an action on at least one option information included in the first HBH option header.

27. The second network device as claimed in claim 21, characterized in that, The first HBH option header includes multiple option data, and the processing unit is specifically used to: execute the action of the specified option data among the multiple option data in the first HBH option header in the forwarding plane of the second network device.

28. A first network device, characterized in that, The first network device includes: The processing unit is configured to generate Internet Protocol version 6 (IPv6) packets, wherein the IPv6 packets include an IPv6 header and a first hop-by-hop HBH option header, the IPv6 header indicating that the protocol type of the IPv6 packets is IPv6, the IPv6 header including next header information, the next header information indicating that the next header of the IPv6 header is the first HBH option header; The sending unit is configured to send the IPv6 packet to the second network device, and the IPv6 packet triggers the second network device to process the first HBH option header in the forwarding plane of the second network device.

29. The first network device as described in claim 28, characterized in that, The IPv6 packet triggers the second network device to process the first HBH option header in the forwarding plane of the second network device, specifically including: The IPv6 message triggers the second network device to execute the action in the first HBH option header in the forwarding plane of the second network device.

30. The first network device as described in claim 28, characterized in that, The first HBH option header includes first option information, which includes first type information and first option data. The IPv6 packet triggers the second network device to process the first HBH option header in the forwarding plane of the second network device, specifically including: The IPv6 packet triggers the second network device to execute the action in the first option data in the forwarding plane of the second network device according to the first type information.

31. The first network device as described in claim 30, characterized in that, The first HBH option header also includes second option information, which further includes second type information and second option data.

32. The first network device as described in claim 28 or 29, characterized in that, The first HBH option header includes processing plane information, which instructs the network device receiving the IPv6 packet to process the first HBH option header in the forwarding plane.

33. The first network device as described in claim 28 or 29, characterized in that, The first HBH option header includes processing policy information, which instructs the network device receiving the IPv6 packet to perform an action on at least one option information included in the first HBH option header.

34. The first network device as described in claim 28 or 29, characterized in that, The first HBH option header includes multiple option data. Specifically, the IPv6 packet triggers the second network device to process the first HBH option header in the forwarding plane of the second network device. This includes the IPv6 packet triggering the second network device to execute the action of the specified option data among the multiple option data in the first HBH option header in the forwarding plane of the second network device.

35. A computer-readable storage medium, characterized in that, Includes a computer program that, when run on a computer, causes the computer to perform the method of any one of claims 1 to 13, or causes the computer to perform the method of any one of claims 14 to 20.

36. A network system comprising a first network device and a second network device, wherein the first network device is the network device according to any one of claims 28-34, and the second network device is the network device according to any one of claims 21-27.

Citation Information

Patent Citations

  • Data transmission method and system and related equipment

    CN111147379A

  • Segment routing extension headers

    US20150256456A1