A message processing method, device and system

By executing the IPv6 extended header action in the data plane of the network device, the problem of IPv6 packets not being forwarded normally is solved, ensuring the normal forwarding of IPv6 packets and improving device efficiency.

CN116233279BActive Publication Date: 2026-02-13HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211662287.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-06-05
Filing Date
2020-06-19
Publication Date
2026-02-13
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 IPv6 packets to the control plane for processing and reducing the pressure on the control plane.

Benefits of technology

It enables normal forwarding of IPv6 packets in network devices, reduces the burden on the control plane, and improves the forwarding efficiency and reliability of network devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233279B_ABST
    Figure CN116233279B_ABST
Patent Text Reader

Abstract

A message processing method, device and system, the method comprising: a second network device receiving an IPv6 message sent by a first network device, the IPv6 message comprising an IPv6 header and a first IPv6 extension header, the first IPv6 extension header indicating that a network device receiving the IPv6 message performs an action in the first IPv6 extension header in a data plane. And, the second network device performing 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. Thus, ensuring that the network device receiving the IPv6 message can normally forward the IPv6 message.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the Chinese Patent Application No. 202010566025.3, filed on June 19, 2020, entitled “A Packet Processing Method, Device and System”, the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the field of communication technology, and in particular to a packet processing method, device and system. BACKGROUND

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

[0004] Compared with IPv4, IPv6 has the following characteristics: (1) IPv6 extends the length of Internet Protocol (IP) address from 32 bits to 128 bits, thereby improving the addressing capability; (2) the header of IPv6 packet is simplified; (3) IPv6 supports more flexible extension and optional items; (4) IPv6 supports flow label capability; and (5) IPv6 supports authentication and privacy protection capability.

[0005] In actual application scenarios, the current RFC8200 does not explicitly specify the specific actions for the extension header in the IPv6 packet, and each network device manufacturer configures privately according to its own business needs. However, the private configuration of the network device manufacturer may affect the normal packet forwarding process of the network device in the IP network.

[0006] In actual application scenarios, the current RFC8200 does not explicitly specify the specific actions for the extension header in the IPv6 packet, and each network device manufacturer configures privately according to its own business needs. However, the private configuration of the network device manufacturer may affect the normal packet forwarding process of the network device in the IP network. SUMMARY

[0007] The present application provides a packet processing method, device and system to solve the problem that the IPv6 packet cannot be normally forwarded by the network device receiving the packet in the prior art.

[0008] In a first aspect, a packet processing method is provided. The method includes: receiving, by a second network device, an IPv6 packet sent by a first network device, the IPv6 packet comprising an IPv6 header and a first IPv6 extension header, the first IPv6 extension header indicating that a network device receiving the IPv6 packet performs an action in the first IPv6 extension header in a data plane, the first IPv6 extension header being a next header of the IPv6 header; and performing, by the second network device, the action in the first IPv6 extension header in a data plane of the second network device according to the IPv6 header and the first IPv6 extension header.

[0009] Based on the scheme provided in the present application, the second network device performs the action in the IPv6 extension header in the IPv6 packet in a corresponding processing plane, thereby ensuring that the IPv6 packet can be normally forwarded by the second network device.

[0010] In a possible implementation of the first aspect, the IPv6 header comprises next header information, and performing, by the second network device, the action in the first IPv6 extension header in a data plane of the second network device according to the IPv6 header and the first IPv6 extension header comprises: determining, by the second network device, according to the next header information, that the next header of the IPv6 header is the first IPv6 extension header, and performing, by the second network device, the action in the first IPv6 extension header in a data plane of the second network device according to the first IPv6 extension header.

[0011] In another possible implementation of the first aspect, the first IPv6 extension header comprises option information, the option information comprising option type information, option length information and option data, the option type information indicating a type of the option information and a length of the option data, and the option length information indicating a length of the option data. Before performing, by the second network device, the action in the first IPv6 extension header in a data plane of the second network device according to the IPv6 header and the first IPv6 extension header, the method further comprises: determining, by the second network device, that the option type information can be recognized; and determining, by the second network device, the length of the option data according to the option type information and without according to the option length information.

[0012] In a further possible implementation form of the first aspect, the first IPv6 extension header comprises option information, the option information comprising option type information, option length information and option data, the option type information indicating a type of the option information and a length of the option data, the option length information indicating the length of the option data, and the second network device determines that the option type information cannot be recognized according to the IPv6 header and the first IPv6 extension header before performing the action in the first IPv6 extension header in a data plane of the second network device, and determines the length of the option data according to the option length information.

[0013] In a further possible implementation form of the first aspect, the IPv6 packet further comprises a second IPv6 extension header, the second IPv6 extension header indicating that a network device receiving the IPv6 packet performs an action in the second IPv6 extension header in a control plane, and the second IPv6 extension header is a next header of the first IPv6 extension header, and the method further comprises: the second network device performing the action in the second IPv6 extension header in a control plane of the second network device according to the first IPv6 extension header and the second IPv6 extension header.

[0014] In a second aspect, a packet processing method is provided, the method comprising: a first network device generating an IPv6 packet, the IPv6 packet comprising an IPv6 header and a first IPv6 extension header, the IPv6 header indicating that a protocol type of the IPv6 packet is IPv6, and the first IPv6 extension header indicating that a network device receiving the IPv6 packet performs an action in the first IPv6 extension header in a data plane, and the first IPv6 extension header being a next header of the IPv6 header; and the first network device sending the IPv6 packet to a second network device.

[0015] Based on the scheme provided in the present application, the first network device sends an IPv6 packet carrying an IPv6 header and an IPv6 extension header to a second network device. Thus, the second network device receives the IPv6 packet sent by the first network device, and performs an action in the IPv6 extension header in a corresponding processing plane of the second network device according to the IPv6 header and the IPv6 extension header in the IPv6 packet, thereby ensuring that the IPv6 packet can be normally forwarded by the second network device.

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

[0017] In another possible implementation manner of the second aspect, the IPv6 packet further includes a second IPv6 extension header, the second IPv6 extension header indicates that a network device receiving the IPv6 packet performs an action in a control plane in the second IPv6 extension header, and the second IPv6 extension header is a next header of the first IPv6 extension header.

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

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

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

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

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

[0023] In the first or second aspect, optionally, the first IPv6 extension header includes processing plane information, the processing plane information indicating that a network device receiving the IPv6 packet performs the action in the data plane in the first IPv6 extension header.

[0024] In the first or second aspect, optionally, the first IPv6 extension header includes processing strategy information, the processing strategy information indicating that a network device receiving the IPv6 packet performs an action on at least one option information included in the first IPv6 extension header.

[0025] In the first or second aspect, optionally, the first IPv6 extension header is processed by each hop network device on a path of the IPv6 packet.

[0026] In a third aspect, a network device is provided, which has a function of implementing the behavior of the first network device in the above method. The function can be implemented based on hardware, or corresponding software is implemented based on 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 to perform the corresponding function in the above method. The interface is used to support the communication between the network device and another network device, and receive the information or instruction related to the above method from the another network device. The network device can further include a memory coupled with the processor, which stores the necessary program instruction and data of the network device.

[0028] In another possible design, the network device includes a processor, a transmitter, a receiver, a random access memory, a read-only memory and a bus. The processor is coupled with the transmitter, the receiver, the random access memory and the read-only memory through the bus. When the network device needs to be run, the system is started by a basic input / output system or a bootloader in an embedded system solidified in the read-only memory, and the network device is guided to a normal running state. After the network device enters the normal running state, an application program and an action system are run in the random access memory, so that the processor performs the method in the first aspect or any possible implementation manner of the first aspect.

[0029] In a fourth aspect, a network device is provided, which comprises a master board and an interface board, and further comprises a switching network board. The network device is configured to perform the method in the first aspect or any possible implementation of the first aspect. Specifically, the network device comprises modules configured to perform the method in the first aspect or any possible implementation of the first aspect.

[0030] In a fifth aspect, a network device is provided, which comprises a controller and a first forwarding sub-device. The first forwarding sub-device comprises an interface board, and further comprises a switching network board. The first forwarding sub-device is configured to perform the functions of the interface board in the fourth aspect, and further configured to perform the functions of the switching network board in the fourth aspect. The controller comprises a receiver, a processor, a transmitter, a random access memory, a read only memory and a bus. The processor is coupled to the receiver, the transmitter, the random access memory and the read only memory by the bus respectively. When the controller needs to be started, a basic input / output system or a bootloader in an embedded system solidified in the read only memory is used to boot the system, so as to guide the controller to enter a normal operation state. After the controller enters the normal operation state, an application program and an action system are run in the random access memory, so that the processor performs the functions of the master board in the fourth aspect.

[0031] In a sixth aspect, a computer storage medium is provided, which is configured to store programs, codes or instructions for the network device, and when a processor or a hardware device executes the programs, codes or instructions, the functions or steps of the first network device in the first aspect can be completed.

[0032] In a seventh aspect, a network device is provided, which has functions of implementing the behaviors of the second network device in the above method. The functions can be implemented based on hardware, or corresponding software is executed based on hardware. The hardware or software comprises one or more modules corresponding to the above functions.

[0033] In a possible design, the network device comprises a processor and an interface, the processor is configured to support the network device to perform the corresponding functions in the above method. The interface is configured to support the network device to communicate with another network device, and transmit information or instructions related to the above method to the other network device. The network device can further comprise a memory, which is coupled to the processor and stores necessary program instructions and data of the network device.

[0034] In another possible design, the network device includes a processor, a transmitter, a receiver, a random access memory, a read only memory, and a bus. The processor is coupled to the transmitter, the receiver, the random access memory, and the read only memory via the bus respectively. When the network device needs to be run, the network device is started by a basic input / output system or a bootloader in an embedded system solidified in the read only memory, and is guided to a normal operation state. After the network device enters the normal operation state, an application program and an action system are run in the random access memory, so that the processor executes the method in the second aspect or any possible implementation manner of the second aspect.

[0035] In an eighth aspect, a network device is provided. The network device includes a master board and an interface board, and further includes a switching network board. The network device is configured to execute the method in the second aspect or any possible implementation manner of the second aspect. Specifically, the network device includes modules configured to execute the method in the second aspect or any possible implementation manner of the second aspect.

[0036] In a ninth aspect, a network device is provided. The network device includes a controller and a second forwarding device. The second forwarding device includes an interface board, and further includes a switching network board. The second forwarding device is configured to execute the function of the interface board in the eighth aspect, and further configured to execute the function of the switching network board in the eighth aspect. The controller includes a receiver, a processor, a transmitter, a random access memory, a read only memory, and a bus. The processor is coupled to the receiver, the transmitter, the random access memory, and the read only memory via the bus respectively. When the controller needs to be run, the controller is started by a basic input / output system or a bootloader in an embedded system solidified in the read only memory, and is guided to a normal operation state. After the controller enters the normal operation state, an application program and an action system are run in the random access memory, so that the processor executes the function of the master board in the eighth aspect.

[0037] In a tenth aspect, a computer storage medium is provided. The computer storage medium is configured to store programs, codes, or instructions for the network device described above. When the processor or the hardware device executes the programs, codes, or instructions, the functions or steps of the network device in the second aspect described above can be completed.

[0038] In an eleventh aspect, a network system is provided. The network system includes a first network device and a second network device. The first network device is the network device in the third aspect, the fourth aspect, or the fifth aspect described above. The second network device is the network device in the seventh aspect, the eighth aspect, or the ninth aspect described above.

[0039] Through the above scheme, after the second network device receives the IPv6 packet sent by the first network device, the second network device performs the action in the IPv6 extension header in the corresponding processing plane of the second network device according to the IPv6 header and the IPv6 extension header in the IPv6 packet, thereby ensuring that the IPv6 packet can be normally forwarded by the second network device. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 A communication network structure schematic diagram of an embodiment of the present application;

[0041] Figure 2 Another communication network structure schematic diagram of an embodiment of the present application;

[0042] Figure 3 A message processing method flowchart of an embodiment of the present application;

[0043] Figure 4 A message header format of an IPv6 packet of an embodiment of the present application;

[0044] Figure 5 A format of an IPv6 extension header of an embodiment of the present application;

[0045] Figures 6a-6c A format of an option of the IPv6 extension header of an embodiment of the present application;

[0046] Figure 7 A structure schematic diagram of a second network device of an embodiment of the present application;

[0047] Figure 8 A hardware structure schematic diagram of the second network device of an embodiment of the present application;

[0048] Figure 9 Another hardware structure schematic diagram of the second network device of an embodiment of the present application;

[0049] Figure 10 A structure schematic diagram of a first network device of an embodiment of the present application;

[0050] Figure 11 A hardware structure schematic diagram of the first network device of an embodiment of the present application;

[0051] Figure 12 Another hardware structure schematic diagram of the first network device of an embodiment of the present application. DETAILED DESCRIPTION

[0052] The technical scheme of the present 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 can include a control plane and a data plane. The control plane is used to control and manage the running of network protocols in the communication network, and provides various network information and forwarding table entries necessary for the data plane. The data plane can also be referred to as a forwarding plane or a user plane, and is used to process and forward various types of data on the interfaces of the network device. In addition, the second network device can also include a management plane. The management plane is oriented towards system action maintenance personnel, and provides input and output, user management, license, monitoring of management objects, configuration, alarm, statistics, etc. In one possible implementation, the management plane is not separately established, and the functions of the management plane are included in the control plane.

[0056] In one possible implementation, the control plane and the data plane of the second network device are implemented in the same functional entity, for example, the second network device shown in Figure 8 . Figure 8 is a hardware implementation of the second network device, in which the processor is used to implement the control plane and the data plane of the second network device. In another possible implementation, the control plane and the data plane of the second network device are implemented in different functional entities, for example, the second network device shown in Figure 9 . Figure 9 is another hardware implementation of the second network device, in which the main control board is used to implement the control plane of the second network device, and the interface board is used to implement the data plane of the second network device. Specifically, the central processor in the main control board is used to implement the control plane of the second network device, and the central processor in the interface board is used to implement the data plane of the second network device. In addition, in Figure 9 , the main control board and the 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 the IPv6 packet sent by the first network device, and the IPv6 packet includes a packet header and a payload. According to the definition of RFC8200, the packet header of the IPv6 packet includes an IPv6 header (Section 3 of RFC8200). The IPv6 header includes next header (Next Header) information, which can also be referred to as a next header field. If the value of the next header information in the IPv6 header is 0, it indicates that the next header of the IPv6 header is a hop-by-hop options header (Hop-by-Hop Options Header). For convenience of description, the “HBH header” is used in the present application to represent the hop-by-hop options header. The HBH header is the next header of the IPv6 header, which 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 the explanation of Section 4.3 of RFC8200, the HBH header is processed by each hop network device on the path of the IPv6 packet. Further, the HBH header includes option information, which is processed by each hop network device on the path of the IPv6 packet.

[0058] The HBH header includes Option information, which can be referred to the explanation of section 4.2 of RFC8200. The Option information includes Option Type information, Opt Data Len information and Option data. The length of the Option Type information is 8 bits. The highest 2 bits of the Option Type information determine the action of the network device when the network device receiving the IPv6 header cannot recognize the Option Type information. For example, the value of the highest 2 bits is 00, which means that the network device skips the Option information and continues to process the header of the IPv6 packet. The specific processing process further includes processing the next header information indicated by the HBH header in the IPv6 packet. The value of the highest 2 bits is 01, which means that the network device discards the IPv6 packet. The value of the highest 2 bits is 10 or 11, which means that the network device discards the IPv6 packet and sends a message containing Internet Control Message Protocol (ICMP) parameters. Therefore, RFC8200 proposes simple actions (skipping the Option information or discarding the packet) for the IPv6 packet containing the HBH header when the Option Type information cannot be recognized. However, RFC8200 does not propose specific action modes for the IPv6 packet containing the HBH header. At present, the processing mode frequently used by network devices of various manufacturers is that the network device determines that the value of the next header information in the IPv6 header in the IPv6 packet is 0, so that the network device can determine that the next header of the IPv6 header is the HBH header. Then, the network device sends the IPv6 packet from the data plane of the network device to the control plane of the network device. Therefore, the network device uses the control plane of the network device to process all IPv6 packets containing the HBH header. In this way, not only the pressure of the control plane of the network device is increased, but also the normal forwarding of the IPv6 packet may be affected. For example, the Option Type information in the HBH header can be recognized by the data plane of the network device, but cannot be recognized by the control plane of the network device. Since the network device directly sends the IPv6 packet including the HBH header to the control plane of the network device. The control plane of the network device may skip the HBH header or directly discard the IPv6 packet after receiving the IPv6 packet. Therefore, this processing mode affects the normal forwarding of the IPv6 packet. For example, the network device uses the control plane of the network device to process all IPv6 packets containing the HBH header. However, the bandwidth resources of the channel between the data plane and the control plane of the network device are limited, and a large number of IPv6 packets are sent to the control plane through the channel, which may cause packet loss due to insufficient channel bandwidth resources.Therefore, the processing mode affects normal IPv6 packet forwarding.

[0059] To solve the above problems, the application provides corresponding solutions. Referring to Figure 1 , a first network device sends an IPv6 packet to a second network device, and the second network device receives the IPv6 packet. The IPv6 packet includes an IPv6 header and an IPv6 extension header, wherein the IPv6 extension header indicates that a network device receiving the IPv6 packet performs an action in the IPv6 extension header in a data plane or a control plane. After receiving the IPv6 packet sent by the first network device, the second network device performs the action in the IPv6 extension header in a corresponding processing plane of the second network device according to the IPv6 header and the IPv6 extension header in the IPv6 packet, thereby ensuring that the IPv6 packet can be normally forwarded by the second network device.

[0060] Figure 2 Another communication network structure diagram of an embodiment of the application is provided. As shown in Figure 2 , the communication network includes routers R0, R1, R2, R3, R4 and R5. Among them, the routers R0, R1, R2 and R3 are connected in turn through links, and the router R4 is connected to the router R2 and the router R3 through links respectively. The router R0 is further connected to a server through a link, and the router R3 is further connected to a user equipment through a link. In addition, the communication network further includes a network management device, and the network management device is connected to the routers R1, R2, R3 and R4 through links respectively. The communication network includes an In-situ Flow Information Telemetry (iFIT) network domain, and the iFIT network domain includes the routers R1, R2, R3 and R4. The router R1 is the head node of the iFIT network domain, the routers R2 and R4 are the intermediate nodes of the iFIT network domain, and the router R3 is the tail node of the iFIT network domain. The router R0 can be an edge router. The server can send an IPv6 packet to the user equipment via the router R0 and the iFIT network domain. The server can also receive an IPv6 packet sent by the user equipment via the router R0 and the iFIT network domain.

[0061] In an embodiment of the application, the server sending an IPv6 packet to the user equipment is described. The network devices in the iFIT network domain can perform in-situ service performance detection on the data flow, and report the detection results to the network management device. In Figure 2In the illustrated network, it is assumed that the server sends a data stream including IPv6 packets to the user equipment via routers R0, R1, R2 and R4, and the reporting mode of the iFIT network domain can be set to tail node reporting, that is, the router R4 is responsible for reporting the detection result to the network management device. In this way, the IPv6 extension header proposed in the present application can be used to implement the in-stream service performance detection in the iFIT network domain. The IPv6 extension header proposed in the present application is an improvement on the HBH header defined in RFC8200, and therefore can be referred to as a "new HBH header". In the embodiments of the present application, unless otherwise specified, "HBH header" refers to the HBH header defined in RFC8200, and "new HBH header" refers to the IPv6 extension header proposed in the present application.

[0062] The router R1 is the head node of the iFIT network domain, and is responsible for initiating corresponding detection according to the in-stream service performance detection task received from the network management device. Specifically, the router R1 receives the packet (which can be an IPv6 packet) sent by the router R0. The first new HBH header is encapsulated in the packet to obtain an IPv6 packet. The IPv6 packet includes an IPv6 header and the first new HBH header. The first new HBH header is the next header of the IPv6 header. The router R1 sends the IPv6 packet to the router R2. After receiving the IPv6 packet, the router R2 can determine from the IPv6 header and the first new HBH header that the action in the first new HBH header needs to be performed in the data plane of the router R2. Specifically, the first new HBH header includes option information, and the type indicated by the option type information in the option information is in-stream service performance detection (such as detection in the iFIT network domain). The option data in the option information indicates a specific action (such as delay detection) corresponding to the detection task. The router R2 runs the detection task according to the indication of the option type information, and performs the specific action according to the indication of the option data, and adds the detection result in the option data in the option information. Then the router R2 sends the updated IPv6 packet to the router R3. The router R3 performs in-stream service performance detection in the same manner as the router R2, and reports the detection result to the network management device. The IPv6 packet also includes an iFIT header, and generally the iFIT header can be encapsulated in the payload of the IPv6 packet.

[0063] In Figure 2In the implementation shown, based on the new HBH header, the iFIT network domain can achieve the detection of the performance of the service along the flow. Conversely, if the new HBH header in the present application is not used, and the HBH header defined in RFC8200 is used as the next header of the IPv6 header, the router R1 can directly send the received IPv6 message to the control plane of the router R1. The control plane of the router R1 can skip the HBH header or directly discard the IPv6 message, so that the detection of the performance of the service along the flow cannot be performed, and the normal forwarding of the IPv6 message can be affected. Further, the network devices in the network can come from different manufacturers. According to the description of RFC8200, the definition of the corresponding action of the HBH header is determined by the configuration of the network device, so that the services cannot be interworked due to different configurations of different manufacturers.

[0064] Figure 3 A flowchart of a message processing method according to an embodiment of the present application. Figure 3 The method shown can be applied in Figure 1 or Figure 2 The network structure shown. In the implementation of the present application, “first network device” and “second network device” are used for illustration. It should be understood that the “first network device” can be the router R1 in Figure 2 , and the “second network device” can be the router R2 or the router R3 in Figure 2 . Specifically, the method comprises:

[0065] S101, the first network device generates an IPv6 message, the IPv6 message comprising an IPv6 header and a first IPv6 extension header, the first IPv6 extension header indicating that a network device receiving the IPv6 message performs an 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 message sent by a previous-hop network device of the first network device. The first message is not an IPv6 message. Then, the first network device encapsulates the first message into the IPv6 message based on the IPv6 protocol. In another possible implementation, the first network device receives a first message sent by a previous-hop network device of the first network device. The first message is an IPv6 message. Then, the first network device updates the first message, thereby obtaining the IPv6 message. The updating process comprises adding the first IPv6 extension header in the first message.

[0068] In combination with the foregoing embodiments, the first IPv6 extension header can be a new HBH header. Figure 4 A packet format of the IPv6 header and the first IPv6 extension header in the IPv6 packet is shown. 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 (hereinafter, the Next Header information in the IPv6 header is referred to as the “first Next Header information” for convenience of description) 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, as shown in Figure 4 “TBD” is only an exemplary representation, and the specific value can be determined by a relevant standard organization.

[0069] The value of the first Next Header information not only indicates that the next header of the IPv6 header is the first IPv6 extension header. Moreover, the value of the first Next Header information can also indicate that a network device receiving the IPv6 packet processes the first IPv6 extension header in the data plane. That is, the network device receiving the IPv6 packet determines that the value of the first Next Header information is TBD, and then processes the IPv6 packet in the data plane of the network device, without sending the IPv6 packet to the control plane of the network device for processing. This is obviously different from the implementation of the HBH header in RFC8200 in the foregoing embodiments.

[0070] In the embodiments of the present application, the first IPv6 extension header is processed by each hop network device on the path of the IPv6 packet. That is, each hop network device on the path of the IPv6 packet inspects and processes the first IPv6 extension header. Further, the first IPv6 extension header includes option information, which is processed by each hop network device on the path of the IPv6 packet.

[0071] Referring to Figure 4The first IPv6 extension header includes next header information, header extension length (Hdr ExtLen) information, and option information. According to the foregoing, the value of the first next header information indicates that the next header of the IPv6 header is the first IPv6 extension header, and indicates that a network device receiving the IPv6 packet processes the first IPv6 extension header in a data plane. The option information in the first IPv6 extension header stores a specific action that needs to be performed in the data plane. Further, the option information includes option data that stores the specific action that needs to be performed in the data plane. For specific implementation, refer to the subsequent description of the embodiment. In a possible implementation, the value of the next header information in the first IPv6 extension header is 0, indicating that the next header of the first IPv6 extension header is an HBH header. That is, the HBH header defined in RFC8200 can be encapsulated after the new HBH header. In this way, after the network device receiving the IPv6 packet processes the first IPv6 extension header in the data plane, the network device uploads the IPv6 packet to a control plane of the network device and processes the HBH header in the control plane.

[0072] The IPv6 packet further includes a payload (not shown in Figure 4 If the value of the next header information in the first IPv6 extension header indicates that there is no next header of the first IPv6 extension header, the payload will follow the first IPv6 extension header. If the next header of the first IPv6 extension header is an HBH header, the payload can follow the HBH header. Optionally, other headers can exist before the payload.

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

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

[0075] In combination 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 a data plane of the second network device, 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 acquires the IPv6 header in the IPv6 packet. Then, the second network device processes the IPv6 header. And acquires the first next header information in the IPv6 header. For example, according to the value TBD of the first next header information, 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 the data plane of the second network device. Correspondingly, the second network device does not send the IPv6 packet to the control plane of the second network device, but continues to process the next header of the IPv6 header, that is, the first IPv6 extension header, in the data plane of the second network device.

[0076] After determining the first IPv6 extension header according to the IPv6 header, the second network device performs the action in the first IPv6 extension header in the data plane according to the first IPv6 extension header.

[0077] Acquires the option information in the first IPv6 extension header, as shown in Figure 4 Then, further, Figure 6a , Figure 6b And Figure 6c shows the implementation mode of the option information in the first IPv6 extension header in Figure 4 . That is, the option information in the first IPv6 extension header can be implemented in the manner of Figure 6a , Figure 6b Or Figure 6c .

[0078] Referring to 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 not only indicates the type of the option information, but also indicates the length of the option data. For example, the value of the option type information is "11001100". "11001100" indicates that the type of the option information is "delay detection in iFIT network domain" and the length of the option data is AA bytes. Therefore, the second network device stores the corresponding relationship between the value "11001100" and "delay detection in iFIT network domain" and "AA bytes". When the second network device determines that the value of the option type information is "11001100", the second network device can find the corresponding "delay detection in iFIT network domain" and "AA bytes". Thus, the second network device can determine that the type of the option information is "delay detection in iFIT network domain" and the length of the option data is AA bytes. The second network device performs the action (detecting the transmission delay) indicated by the option type information in the data plane, and adds the detection result in the option data. Thus, the second network device can implement processing the first IPv6 extension header in the data plane of the second network device. Through the implementation of the embodiment shown in Figure 6a , the length of the option information is reduced, and thus the length of the IPv6 packet is reduced.

[0079] Referring to 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 the option type information in the embodiment can refer to the explanation of the option type information in the embodiment Figure 6a , that is, the option type information not only indicates the type of the option information, but also indicates the length of the option data. Compared with Figure 6a , Figure 6bThe implemented option information further includes option length information, and the option length information indicates a length of the option data. When the second network device processes the option information in the first IPv6 extension header in a data plane, the second network device acquires the option type information in the option information. The second network device determines whether the option type information can be recognized, that is, the second network device determines whether the option type information can be parsed and processed. Accordingly, if the second network device determines that the option type information can be recognized, the second network device determines the length of the option data according to the option type information, without determining the length of the option data according to the option length information. If the second network device determines that the option type information cannot be recognized, the second network device determines the length of the option data according to the option length information. Through the implementation, when the option type information cannot be recognized, the second network device can skip the unrecognizable part of the packet data and continue processing the recognizable part of the packet. Figure 6b The implementation ensures that when the option type information cannot be recognized, the second network device can skip the unrecognizable part of the packet data and continue processing the recognizable part 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 a type of the first option information and a length of the first option data, and the second option type information indicates a type of the second option information and a length of the second option data. Further optionally, the first IPv6 extension header includes a bitmap, the bitmap includes a first bit and a second bit, the first bit indicates the first option type information, and the second bit indicates the second option type information.

[0081] Referring to Figure 6c , the option information includes a bitmap and a plurality of option data. The bitmap can have a length of 16 bits. Figure 6c The implementation can implement a plurality of option information by using a bitmap. Specifically, 16 bits of the bitmap can represent 16 types of option types, that is, each bit represents one type of option type. For example, the value of the bitmap is “0000000000000011”, which represents 16 types of option types. The lowest bit in the bitmap represents option type 1, the next lowest bit in the bitmap represents option type 2, and the highest bit in the bitmap represents option type 16. Each bit has a value of 0 or 1. When the bit has a value of 0, it means that the option type corresponding to the bit is disabled. When the bit has a value of 1, it means that the option type corresponding to the bit is enabled. According to the foregoing, when the bitmap has a length of 16 bits, the number of the plurality of option data is at most 16.

[0082] For example, the value of the bitmap is "0000000000000011". The values from the 3rd bit to the 16th bit are all 0, which means that the option types from 3 to 16 are not enabled. The value of the 1st bit is 1, which means that the option type 1 (the first option type information) is enabled. Therefore, the option information further includes the 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 and the length of the first option data indicated by the first option type information. In the same way, the value of the 2nd bit is 1, which means that the option type 2 (the second option type information) is enabled. Therefore, the option information further includes the 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 and the length of the second option data indicated by the second option type information. In the above manner, the aggregation of multiple sub-option information can be realized by one option information.

[0083] Optionally, the IPv6 packet further includes a second IPv6 extension header, the second IPv6 extension header instructs a network device receiving the IPv6 packet to perform an action in a control plane, the second IPv6 extension header is a next header of 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 according to the first IPv6 extension header and the second IPv6 extension header.

[0084] According to the foregoing embodiment, the IPv6 packet includes an IPv6 header, and the first IPv6 extension header is a next header of the IPv6 header. The first IPv6 extension header includes first next header information, and the value of the first next header information can be 0, indicating that the next header of the first IPv6 extension header is an HBH header (a second IPv6 extension header) defined in RFC8200. The second network device processes the first IPv6 extension header in the data plane of the second network device according to the foregoing embodiment, and determines that the next header of the first IPv6 extension header is the HBH header according to the value of the first next header information in the first IPv6 extension header being 0. According to the foregoing embodiment, the second network device can send the IPv6 packet to the control plane of the second network device, 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, the processing policy information indicating an action performed by a network device receiving the IPv6 packet on at least one option information included in the first IPv6 extension header.

[0089] The processing policy information indicates that the second network device processes multiple option information in the first IPv6 extension header. For example, the first IPv6 extension header includes option information 1, option information 2 and option information 3. The option information 1, the option information 2 and the option information 3 are implemented in a type-length-value (TLV) manner. The action indicated by the processing policy information is effective on the option information 1, the option information 2 and the option information 3.

[0090] Similarly, the new HBH header shown in the foregoing embodiment can also include processing policy information, thereby realizing processing of multiple option information.

[0091] In the embodiment of the present application, the first IPv6 extension header is processed by each hop network device on a path of the IPv6 packet. That is, each hop network device on the path of the IPv6 packet checks and processes the first IPv6 extension header. Further, the first IPv6 extension header includes option information, which is processed by each hop network device on the path of the IPv6 packet.

[0092] According to the foregoing embodiment, the first IPv6 extension header is a next header of the IPv6 header, and is located before any other extension header in the IPv6 packet.

[0093] Through the foregoing implementation, after the second network device receives the IPv6 packet sent by the first network device, the second network device performs an action in the IPv6 extension header in a corresponding processing plane of the second network device according to the IPv6 header and the IPv6 extension header in the IPv6 packet, thereby ensuring that the IPv6 packet can be normally forwarded by the second network device.

[0094] Figure 7 A structure diagram of the second network device 1000 of the embodiment of the present application. Figure 7 The second network device 1000 shown in the figure can perform the corresponding steps performed by the second network device in the method of the foregoing embodiment. The second network device is deployed in a communication network, and the communication network also includes a first network device. As shown in the figure, the second network device 1000 includes a processing plane 1001 and a forwarding plane 1002. 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 including an IPv6 header and a first IPv6 extension header, the first IPv6 extension header indicating that a network device receiving the IPv6 packet performs an action in the first IPv6 extension header in a data plane.

[0096] The processing unit 1004 is configured to perform the action in the first IPv6 extension header in a 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, the next header information indicating that a next header of the IPv6 header is the first IPv6 extension header.

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

[0099] Optionally, when performing the action in the first IPv6 extension header in a data plane of the second network device according to the IPv6 header and the first IPv6 extension header, the processing unit 1004 is configured to determine, according to the next header information, that the next header of the IPv6 header is the first IPv6 extension header; and the processing unit 1004 is further configured to perform the action in the first IPv6 extension header in a data plane of the second network device according to the first IPv6 extension header.

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

[0101] Optionally, the first IPv6 extension header includes option information, the option information includes option type information, option length information and option data, the option type information indicates a type of the option information and a length of the option data, 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 a data plane of the second network device according to 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 according to the option type information and not according to the option length information.

[0102] Optionally, the first IPv6 extension header includes option information, the option information includes option type information, option length information and option data, the option type information indicates a type of the option information and a length of the option data, 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 a data plane of the second network device according to the IPv6 header and the first IPv6 extension header, the processing unit 1004 is further configured to: determine that the option type information cannot be identified; and determine the length of the option data according to 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 a type of the first option information and a length of the first option data, the second option type information indicates a type of the second option information and a length of the second option data.

[0104] Optionally, the first IPv6 extension header includes a bitmap, the bitmap includes a first bit and a second bit, the first bit indicates the first option type information, and the second bit indicates the second option type information.

[0105] Optionally, the IPv6 packet further includes a second IPv6 extension header, the second IPv6 extension header indicates that a network device receiving the IPv6 packet performs an action in the second IPv6 extension header in a control plane, the second IPv6 extension header is a next header of the first IPv6 extension header, and 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 according to the first IPv6 extension header and the second IPv6 extension header.

[0106] Optionally, the first IPv6 extension header comprises processing plane information, the processing plane information indicating that a network device receiving the IPv6 packet performs the action in the first IPv6 extension header in a data plane.

[0107] Optionally, the first IPv6 extension header comprises processing strategy information, the processing strategy information indicating that a network device receiving the IPv6 packet performs an action on at least one option information included in the first IPv6 extension header.

[0108] Optionally, the second network device 1000 further comprises a sending unit, configured to send the processed IPv6 packet to a third network device.

[0109] Figure 7 The second network device shown can perform the corresponding steps performed by the second network device in the method of the above-mentioned embodiments. The second network device receives the IPv6 packet sent by the first network device, and performs the action in the IPv6 extension header in the corresponding processing plane of the second network device according to the IPv6 header and the IPv6 extension header in the IPv6 packet, so as to ensure that the IPv6 packet can be normally forwarded by the second network device.

[0110] Figure 8 The second network device 1100 of the embodiments of the present application is shown in a hardware structure diagram. Figure 8 The second network device 1100 shown can perform the corresponding steps performed by the second network device in the method of the above-mentioned embodiments.

[0111] As shown in the figure, Figure 8 The second network device 1100 shown can perform the corresponding steps performed by the second network device in the method of the above-mentioned embodiments.

[0112] The interface 1103 can specifically include a transmitter and a receiver, for transmitting and receiving information between the second network device and the first network device in the above-mentioned embodiments. For example, the interface 1103 is configured to support receiving the IPv6 packet sent by the first network device, or to support forwarding the processed IPv6 packet. As an example, the interface 1103 is configured to support the process S103 in the figure. Figure 3 The processor 1101 is configured to perform the processing performed by the second network device in the above-mentioned embodiments. For example, the processor 1101 is configured to perform the action in the IPv6 extension header; and / or other processes of the technology described herein. As an example, the processor 1101 is configured to support the process S103 in the figure.Figure 3 The memory 1102 is configured to store programs, codes or instructions, for example, the action system 11021 and the application 11022, which can be executed by the processor or the hardware device to complete the processing procedure of the second network device in the method embodiments. Optionally, the memory 1102 can include a read-only memory (ROM) and a random access memory (RAM). The ROM includes a basic input / output system (BIOS) or an embedded system, and the RAM includes an application and an action system. When the second network device 1100 needs to be run, the second network device 1100 is started by the BIOS or the bootloader in the embedded system, and is guided to a normal running state. After the second network device 1100 is in the normal running state, the application and the action system in the RAM are run, so that the processing procedure of the second network device in the method embodiments is completed.

[0113] It can be understood that, Figure 8 Only a simplified design of the second network device 1100 is shown. In actual applications, the second network device can include any number of interfaces, processors or memories.

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

[0115] As Figure 9 The second network device 1200 includes a main control board 1210, an interface board 1230, a switching network board 1220 and an interface board 1240. The main control board 1210, the interface boards 1230 and 1240 and the switching network board 1220 are connected to a system backboard through a system bus to realize intercommunication. The main control board 1210 is configured to complete system management, device maintenance, protocol processing and the like. The switching network board 1220 is configured to complete data exchange between the interface boards (the interface board is also called a line card or a service board). The interface boards 1230 and 1240 are configured to provide various service interfaces (for example, a POS interface, a GE interface, an ATM interface and the like) and implement data packet forwarding.

[0116] The interface board 1230 can include a central processor 1231, a forwarding table item storage 1234, a physical interface card 1233 and a network processor 1232. The central processor 1231 is configured to control and manage the interface board and communicate with the central processor on the master control board. The forwarding table item storage 1234 is configured to store forwarding table items. The physical interface card 1233 is configured to complete the receiving and sending of traffic. The network processor 1232 is configured to control the physical interface card 1233 to receive and send traffic according to the forwarding table items.

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

[0118] After the physical interface card 1233 receives the IPv6 packet, the physical interface card 1233 sends the IPv6 packet to the central processor 1231. The central processor 1231 determines that the IPv6 packet needs to be processed by the central processor 1231 according to the information in the packet header of the IPv6 packet. Accordingly, the central processor 1231 processes the IPv6 packet.

[0119] Alternatively, after the physical interface card 1233 receives the IPv6 packet, the physical interface card 1233 sends the IPv6 packet to the central processor 1231. The central processor 1231 determines that the IPv6 packet needs to be processed by the central processor 1211 according to the information in the packet header of the IPv6 packet. The central processor 1231 sends the IPv6 packet to the central processor 1211. The central processor 1211 processes the IPv6 packet.

[0120] The central processor 1231 is further configured to control the network processor 1232 to obtain the forwarding table items in the forwarding table item storage 1234. The central processor 1231 is further configured to control the network processor 1232 to forward the processed IPv6 packet to the third network device via the physical interface card 1233.

[0121] It should be understood that the actions of the interface board 1240 in the embodiment of the present application are consistent with the actions of the interface board 1230. For the sake of brevity, they will not be described again. It should be understood that the second network device 1200 in the embodiment can correspond to the functions and / or various steps implemented in the above-mentioned method embodiments. Here, they will not be described again.

[0122] Further, it should be noted that the master board can be one or more, and when there are multiple master boards, the master boards can include a main master board and a backup master board. The interface board can be one or more, and the more interface boards the second network device has, the stronger the data processing capability of the second network device. The physical interface card on the interface board can also be one or more. The switching network board can be none or one or more, and when there are multiple switching network boards, the switching network boards can collectively implement load sharing and redundancy. Under the centralized forwarding architecture, the second network device can not need a switching network board, and the interface board can undertake the processing function of the entire system of service data. Under the distributed forwarding architecture, the second network device can have at least one switching network board, and the switching network board can be used to realize data exchange between multiple interface boards and provide large-capacity data exchange and processing capability. Therefore, the data access and processing capability of the second network device of the distributed architecture is greater than that of the device of the centralized architecture. Whether to use which architecture depends on the specific networking deployment scenario, and no limitation is made herein.

[0123] In addition, the embodiment of the present application provides a computer storage medium for storing computer software instructions for the second network device, which contains a program designed to execute the method embodiments described above.

[0124] Figure 10 A structural schematic diagram of the first network device 2000 of the embodiment of the present application is shown. Figure 10 The first network device 2000 shown can execute the corresponding steps executed by the first network device in the method of the above-mentioned embodiments. The first network device is deployed in a communication network, and the communication network further includes a second network device. As shown in 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 configured to generate an IPv6 packet, the IPv6 packet including an IPv6 header and a first IPv6 extension header, the first IPv6 extension header indicating a network device receiving the IPv6 packet to execute an action in the first IPv6 extension header in a data plane.

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

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

[0128] Optionally, the next header information further indicates that the network device receiving the IPv6 packet processes the first IPv6 extension header in the data plane.

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

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

[0131] Optionally, 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 a type of the first option information and a length of the first option data, the second option type information indicating a type of the second option information and a length of the second option data.

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

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

[0134] Optionally, the first IPv6 extension header includes processing plane information, the processing plane information indicating that a network device receiving the IPv6 packet performs the action in a data plane in the first IPv6 extension header.

[0135] Optionally, the first IPv6 extension header includes processing policy information, the processing policy information indicating an action performed by a network device receiving the IPv6 packet on at least one option information included in the first IPv6 extension header.

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

[0137] Figure 10The first network device shown can perform the corresponding steps performed 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. Thus, the second network device receives the IPv6 packet sent by the first network device, and performs the action in the IPv6 extension header in the corresponding processing plane of the second network device according to the IPv6 header and the IPv6 extension header in the IPv6 packet, thereby ensuring that the IPv6 packet can be normally forwarded by the second network device.

[0138] Figure 11 The first network device 2100 of the embodiments of the present application is shown in the hardware structure diagram. Figure 11 The first network device 2100 shown can perform the corresponding steps performed by the first network device in the method of the above embodiments.

[0139] As Figure 11 The first network device 2100 shown can perform the corresponding steps performed by the first network device in the method of the above embodiments.

[0140] The interface 2103 can specifically include a transmitter and a receiver, for transmitting 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 configured to support sending an IPv6 packet to the second network device; for another example, the interface 2103 is configured to support receiving a packet sent by the previous hop network device of the first network device. As an example, the interface 2103 is configured to support the process S102 in the above embodiments. The processor 2101 is configured to perform the processing performed by the first network device in the above embodiments. For example, the processor 2101 is configured to support the IPv6 packet; and / or other processes of the technologies described herein. As an example, the processor 2101 is configured to support the process S102 in the above embodiments. Figure 3 Figure 3 ​The process S101 in the method embodiment. The memory 2102 includes an action system 21021 and an application 21022 for storing programs, codes or instructions, which can complete the process of the first network device in the method embodiment when the processor or hardware device executes the programs, codes or instructions. Optionally, the memory 2102 can include a read-only memory (ROM) and a random access memory (RAM). The ROM includes a basic input / output system (BIOS) or an embedded system; the RAM includes an application and an action system. When the first network device 2100 needs to be run, the first network device 2100 is started by the BIOS or the bootloader in the embedded system, and is guided to a normal running state. After the first network device 2100 enters the normal running state, the application and the action system in the RAM are run, so that the process of the first network device in the method embodiment is completed.

[0141] It can be understood that, Figure 11 Only a simplified design of the first network device 2100 is shown. In actual application, the first network device can include any number of interfaces, processors or memories.

[0142] Figure 12 A hardware structure schematic diagram of another first network device 2200 of the embodiment of the present application. Figure 12 The first network device 2200 shown can execute the corresponding steps executed by the first network device in the method of the above-mentioned embodiment.

[0143] As Figure 12 The first network device 2200 includes a main control board 2210, an interface board 2230, a switching network board 2220 and an interface board 2240. The main control board 2210, the interface boards 2230 and 2240 and the switching network board 2220 are connected to the system backboard through a system bus to realize intercommunication. The main control board 2210 is used to complete system management, device maintenance, protocol processing and the like. The switching network board 2220 is used to complete data exchange between the interface boards (the interface board is also called a line card or a service board). The interface boards 2230 and 2240 are used to provide various service interfaces (for example, a POS interface, a GE interface, an ATM interface and the like) and implement data packet forwarding.

[0144] The interface board 2230 can include a central processor 2231, a forwarding table item storage 2234, a physical interface card 2233 and a network processor 2232. The central processor 2231 is configured to control and manage the interface board and communicate with the central processor 2211 on the master control board 2210. The forwarding table item storage 2234 is configured to store forwarding table items. The physical interface card 2233 is configured to complete the receiving and sending of traffic. The network processor 2232 is configured to control the physical interface card 2233 to receive and send traffic according to the forwarding table items.

[0145] Specifically, the physical interface card 2233 is configured to send an IPv6 packet to the first network device. The physical interface card 2233 is also configured to receive a packet sent by a next-hop network device of the first network device.

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

[0147] In another possible implementation, the physical interface card 2233 receives a packet sent by a next-hop network device of the first network device. The central processor 2231 processes the packet to obtain an IPv6 packet. The IPv6 packet is sent to the second network device via the physical interface card 2233.

[0148] The central processor 2231 is also configured to control the network processor 2232 to obtain forwarding table items in the forwarding table item storage 2234. The central processor 2231 is also configured to control the network processor 2232 to complete the receiving and sending of traffic via the physical interface card 2233.

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

[0150] Further, it is to be noted that the master board can be one or more, and when there are more than one, it can include a master master board and a backup master board. The interface board can be one or more, and the more the data processing capability of the first network device, the more the interface board. The physical interface card on the interface board can also be one or more. The switching network board can be none or one or more, and when there are more than one, it can collectively implement load sharing and redundancy. Under the centralized forwarding architecture, the first network device can not need the switching network board, and the interface board undertakes the processing function of the entire system of service data. Under the distributed forwarding architecture, the first network device can have at least one switching network board, and the data exchange between the multiple interface boards is realized through the switching network board, and a large-capacity data exchange and processing capability is provided. Therefore, the data access and processing capability of the first network device of the distributed architecture is greater than that of the centralized architecture. Which architecture is specifically adopted depends on the specific networking deployment scenario, and no limitation is made here.

[0151] In addition, the embodiment of the present application provides a computer storage medium for storing computer software instructions for the first network device, which contains programs designed to execute the method embodiments described above.

[0152] The embodiment of the present application also includes a network system, which comprises a second network device and a first network device, the second network device is the second network device in the foregoing Figure 7 or Figure 8 or Figure 9 , and the first network device is the first network device in the foregoing Figure 10 or Figure 11 or Figure 12 .

[0153] The steps of the methods or algorithms described in connection with the present disclosure can be implemented in hardware, or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a mobile hard disk, a CD-ROM, or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in the user equipment. Of course, the processor and the storage medium can also exist as discrete components in the user equipment.

[0154] Those skilled in the art should understand that, in one or more examples described above, the functions described in the present application can be implemented by hardware or by a combination of hardware and software. When implemented by a combination of hardware and software, the software can be stored in a computer readable medium or transmitted as one or more instructions or codes on a computer readable medium. The computer readable medium includes computer storage medium and communication medium, wherein the communication medium includes any medium that facilitates the transfer of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0155] The above detailed description has further explained the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present 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 IPv6 extension header. The IPv6 header indicates that the protocol type of the IPv6 message is IPv6. The first IPv6 extension header is a hop-by-hop HBH option header. The HBH option header includes first option information, which includes first option type information and first option data. The second network device processes the first option data in the HBH option header in the data plane of the second network device according to the first option type information in the IPv6 header and the HBH option header.

2. The method as described in claim 1, characterized in that, The IPv6 header includes next header information, which indicates that the next header in the IPv6 header is the HBH option header.

3. The method as described in claim 2, characterized in that, The first option type information indicates the type to which the first option data in the HBH option header belongs.

4. The method as described in claim 3, characterized in that, The second network device processes the first option data in the HBH option header in its data plane according to the IPv6 header and the first option type information in the HBH option header, including: The second network device determines the type of the first option data based on the first option type information; The second network device processes the first option data in the HBH option header in the data plane of the second network device.

5. The method according to any one of claims 1-4, characterized in that, The HBH option header also includes second option information, which includes second option type information and second option data.

6. The method as described in claim 5, characterized in that, The 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 option type information.

7. The method according to any one of claims 1-4, characterized in that, The HBH option header is passed to each hop network device along the path of the IPv6 packet for processing.

8. 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) packet sent by a first network device. The IPv6 packet includes an IPv6 header and a first IPv6 extension header. The IPv6 header indicates that the protocol type of the IPv6 packet is IPv6. The first IPv6 extension header is a hop-by-hop HBH option header. The HBH option header includes first option information, which includes first option type information and first option data. The processing unit is configured to process the first option data in the HBH option header in the data plane of the second network device according to the first option type information in the IPv6 header and the HBH option header.

9. The second network device as described in claim 8, characterized in that, The IPv6 header includes next header information, which indicates that the next header in the IPv6 header is the HBH option header.

10. The second network device as described in claim 9, characterized in that, The first option type information indicates the type to which the first option data in the HBH option header belongs.

11. The second network device as claimed in claim 10, characterized in that, The processing unit is specifically used for: The type of the first option data is determined based on the first option type information; The first option data in the HBH option header is processed in the data plane of the second network device.

12. The second network device as described in any one of claims 8-11, characterized in that, The HBH option header also includes second option information, which further includes second option type information and second option data.

13. The second network device as described in claim 12, characterized in that, The 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 option type information.

14. The second network device as described in any one of claims 8-11, characterized in that, The HBH option header is passed to each hop network device along the path of the IPv6 packet for processing.

15. 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 7.

Citation Information

Patent Citations

  • Method and device for processing message by using unified SR label stack

    CN110224934A