CN116418763A - Message processing method and related equipment - Google Patents

Message processing method and related equipment Download PDF

Info

Publication number
CN116418763A
CN116418763A CN202111640062.5A CN202111640062A CN116418763A CN 116418763 A CN116418763 A CN 116418763A CN 202111640062 A CN202111640062 A CN 202111640062A CN 116418763 A CN116418763 A CN 116418763A
Authority
CN
China
Prior art keywords
message
indication information
extension header
type
communication device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111640062.5A
Other languages
Chinese (zh)
Inventor
李广鹏
贾溢豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202111640062.5A priority Critical patent/CN116418763A/en
Publication of CN116418763A publication Critical patent/CN116418763A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2592Translation of Internet protocol [IP] addresses using tunnelling or encapsulation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/45Arrangements for providing or supporting expansion

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a message processing method and related equipment, which can be applied to message encapsulation and analysis scenes of a network layer. The method comprises the following steps: receiving a first message sent by first communication equipment, wherein the first message comprises first indication information, at least one extension header and user data, and the first indication information is used for indicating the type of the at least one extension header; determining whether an extension header to be processed by the second communication device exists in the at least one extension header based on the first indication information. Since the first indication information included in the first message is used to indicate the type of the at least one extension header. Thus, the second communication device may determine whether there is an extension header to be processed by the second communication device in the at least one extension header based on the first indication information. Compared with the prior art, the method can judge the specific extension header only by traversing all the next header fields, and can improve the efficiency of analyzing the first message by the second communication equipment in the mode of the first indication information.

Description

Message processing method and related equipment
Technical Field
The embodiment of the application relates to the technical field of networks, in particular to a message processing method and related equipment.
Background
With the rapid growth of emerging services such as artificial intelligence and big data, the demand for network devices capable of providing low-latency message forwarding capability is increasing. The main factors affecting the message forwarding delay include: the analysis efficiency and the encapsulation efficiency of the message, etc. The network layer protocol completes the data transfer task by the following process: and taking the transmitted data as a load, adding a header package for the load, and taking the packaged header and the load as a message to be sent outwards, wherein a routing node of the path finishes a data transmission task by analyzing the message header to read a transmission instruction. The network layer protocol header comprises a basic header and an extension header, wherein the basic header is an essential part required by the network to complete transmission; the extension header is an optional part, which is an additional part of the network that performs special network capabilities.
Currently, internet protocol version 6 (internet protocol version, ipv 6) indicates the presence of an extended Header in the manner of a Next Header. The basic Header of the IPv6 is fixed in length, and the basic Header comprises a Next Header field, when the Next Header field is a specific value, the subsequent field representing the basic Header is an extension Header. The extension Header represents the way the method is Next Header, length, options (Options). The semantics of the Next Header field in the extension Header and the Next Header field in the base Header are the same. That is, when the Next Header field in the extension Header is a specific value, the subsequent field is still the extension Header until the Next Header field value is not a specific field, which indicates that the subsequent field is a payload.
However, the above method of using the Next Header may result in that when parsing a message, it is necessary to traverse all the Next Header fields to determine a specific extension Header, which is inefficient.
Disclosure of Invention
The embodiment of the application provides a message processing method and related equipment, wherein network equipment can determine a specific extension header concerned by the network equipment through first indication information in a first message.
The first aspect of the embodiments of the present application provides a method for processing a message, which may be applied to a message encapsulation and parsing scenario of a network layer. The method comprises the following steps: receiving a first message sent by a first communication device, wherein the first message comprises first indication information, at least one extension header and user data, and the first indication information is used for indicating the type of the at least one extension header, and the type is related to the function realized by the communication device in a path for transmitting the user data; determining whether an extension header to be processed by the second communication device exists in the at least one extension header based on the first indication information.
In this embodiment of the present application, the second communication device receives a first packet sent by the first communication device, where the first indication information included in the first packet is used to indicate a type of at least one extension header. Thus, the second communication device may determine whether there is an extension header to be processed by the second communication device in the at least one extension header based on the first indication information. Compared with the prior art, the method can judge the specific extension Header only by traversing all Next Header fields, and can improve the efficiency of analyzing the first message by the second communication equipment in the mode of the first indication information.
Optionally, in a possible implementation manner of the first aspect, the extension header to be processed exists in the extension header, and the method further includes: and executing an operation corresponding to a target type based on the expansion head to be processed, wherein the target type is the type of the expansion head to be processed.
In this possible implementation manner, in the case that the first packet includes an extension header to be processed by the second communication device, the second communication device may execute an operation corresponding to the target type based on the extension header to be processed. Compared with the prior art that the specific extension Header can be judged by traversing all Next Header fields, and then corresponding operations are processed based on the specific extension Header, the second communication device in the embodiment of the application can execute the corresponding operations through the type of the extension Header indicated by the first indication information, so that the time for determining the specific extension Header is reduced, and the efficiency of analyzing the first message can be improved.
Optionally, in a possible implementation manner of the first aspect, the first packet includes at least two extension headers, and the first indication information is used to indicate a type of the at least two extension headers and a position of the at least two extension headers in the first packet.
In this possible implementation manner, in the case that the first message includes at least two extension headers, the second communication device may further determine positions of the at least two extension headers in the first message based on the first indication information, so that efficiency of the second communication device in processing the first message may be improved.
Optionally, in a possible implementation manner of the first aspect, the first indication information includes a plurality of bits, where each bit in the plurality of bits is used to indicate whether there is an extension header of a corresponding type in the first packet; the first indication information is used for indicating that a specific mapping relation exists between the sequence of each bit of the extension header with the corresponding type and the position sequence of at least two extension headers in the first message. For example, in a consistent order, in a reverse order, etc.
In this possible implementation manner, through the mapping relationship between each bit in the first indication information and the positions of at least two extension headers in the first message, the second communication device can quickly locate the positions of the extension headers based on the first indication information, so that the efficiency of the second communication device in analyzing the first message can be improved.
Optionally, in a possible implementation manner of the first aspect, a bit of 1 in the plurality of bits indicates that there is an extension header of a corresponding type in the first packet.
In this possible implementation manner, 1 bit in the first indication information is used for indicating the type of the extension header, specifically, a bit of 1 indicates that the extension header of the corresponding type exists in the first message, and in this manner, the number of bits occupied by the first indication information is smaller, so that the encapsulation efficiency of the first message can be improved.
Optionally, in a possible implementation manner of the first aspect, the type of the extension header includes at least one of a route type, a fragment type, an authentication header type, an encapsulation security payload type, a hop-by-hop option type, and a destination option type.
In this possible implementation manner, the type of the extension header may be a type related to the IPv6 protocol, or may be a type set according to actual needs, so that the method of the embodiment of the present application may be applied to the IPv6 protocol and other protocols.
Optionally, in a possible implementation manner of the first aspect, the first packet further includes second indication information, where the second indication information is used to indicate that at least one extension header exists in the first packet.
In this possible implementation manner, the second communication device may first determine, through the second indication information, whether the first packet includes the extension header. In the case of including the extension header, the type of the extension header is determined based on the first indication information. Under the condition that the extension head is not included, the first indication information can be not taken into consideration, and therefore the analysis efficiency of the second communication equipment can be improved.
Optionally, in one possible implementation manner of the first aspect, the first packet is encapsulated in a bitmap offset value BOV manner, where the first packet includes a base header and at least one extension header, the base header includes a bitmap, a time-to-live TTL field of the first packet, a source address field and a destination address field of the first packet, the bitmap includes third indication information, a first indication information and an extension indication bit, the third indication information is used to indicate that the TTL field, the source address field and the destination address field exist in the first packet, and the extension indication bit is used to determine a length of the bitmap.
In this possible implementation, an example of the first packet structure is illustrated in a BOV scenario. For original BOV mode, when the bitmap has disposed many bit functions of preamble, the newly designed function can only apply for the position behind the bitmap more and more, and the packaging efficiency will be very low (the bitmap is very long) at this moment, and the problem that the packaging efficiency drops rapidly due to overlong bitmap caused by the newly designed function can be avoided by introducing the first indication information into the BOV.
The second aspect of the embodiment of the application provides a message processing method, which can be applied to message encapsulation and analysis scenes of a network layer. The method comprises the following steps: generating a first message, wherein the header of the first message comprises first indication information, at least one extension header and user data, the first indication information is used for indicating the type of the at least one extension header, and the type is related to the function realized by communication equipment in a path for transmitting the user data; and sending the first message to the second communication equipment.
In this embodiment, on the one hand, in the process of generating the first packet, the first communication device adds the first indication information into the first packet, and since the first indication information is used for indicating the type of the extension header in the first packet, and the bits occupied by the first indication information are smaller, the encapsulation efficiency of the first packet can be improved. On the other hand, in the process of analyzing and/or forwarding the first message by the subsequent device (for example, the second communication device) on the transmission path, the type of the extension header, which indicates the existence of the first message, on the basis of the first indication information, of the subsequent device on the transmission path can be made to rapidly determine the extension header to be processed, so that the efficiency of analyzing the first message and forwarding the first message by the subsequent device is improved.
Optionally, in a possible implementation manner of the second aspect, the steps further include: receiving internet control message protocol ICMP information sent by second network equipment, wherein the ICMP information is used for indicating that the second network equipment cannot forward the first message; and fragmenting the first message and sending the fragmented first message to the second network equipment.
In this possible implementation manner, when the first message is too large, and the second communication device cannot forward, the first communication device also receives ICMP information, further fragments the first message, and sends the fragmented first message to the second communication device, so that the second communication device can forward the data in the first message normally.
Optionally, in a possible implementation manner of the second aspect, the first packet includes at least two extension headers, and the first indication information is used to indicate a type of the at least two extension headers and a position of the at least two extension headers in the first packet.
In this possible implementation manner, in the case that the first message includes at least two extension headers, the second communication device may further determine positions of the at least two extension headers in the first message based on the first indication information, so that efficiency of the second communication device in processing the first message may be improved.
Optionally, in a possible implementation manner of the second aspect, the first indication information includes a plurality of bits, where each bit in the plurality of bits is used to indicate whether there is an extension header of a corresponding type in the first packet; the first indication information is used for indicating that a specific mapping relation exists between the sequence of each bit of the extension header with the corresponding type and the position sequence of at least two extension headers in the first message. For example, in a consistent order, in a reverse order, etc.
In this possible implementation manner, through the mapping relationship between each bit in the first indication information and the positions of at least two extension headers in the first message, the second communication device can quickly locate the positions of the extension headers based on the first indication information, so that the efficiency of the second communication device in analyzing the first message can be improved.
Optionally, in a possible implementation manner of the second aspect, a bit of 1 in the plurality of bits indicates that there is an extension header of a corresponding type in the first packet.
In this possible implementation manner, 1 bit in the first indication information is used for indicating the type of the extension header, specifically, a bit of 1 indicates that the extension header of the corresponding type exists in the first message, and in this manner, the number of bits occupied by the first indication information is smaller, so that the encapsulation efficiency of the first message can be improved.
Optionally, in a possible implementation manner of the second aspect, the type of the extension header includes at least one of a route type, a fragment type, an authentication header type, an encapsulation security payload type, a hop-by-hop option type, and a destination option type.
In this possible implementation manner, the type of the extension header may be a type related to the IPv6 protocol, or may be a type set according to actual needs, so that the method of the embodiment of the present application may be applied to the IPv6 protocol and other protocols.
Optionally, in a possible implementation manner of the second aspect, the first packet further includes second indication information, where the second indication information is used to indicate that at least one extension header exists in the first packet.
In this possible implementation manner, the second communication device may first determine, through the second indication information, whether the first packet includes the extension header. In the case of including the extension header, the type of the extension header is determined based on the first indication information. Under the condition that the extension head is not included, the first indication information can be not taken into consideration, and therefore the analysis efficiency of the second communication equipment can be improved.
Optionally, in one possible implementation manner of the second aspect, the first packet is encapsulated in a bitmap offset value BOV manner, where the first packet includes a base header and at least one extension header, the base header includes a bitmap, a time-to-live TTL field of the first packet, a source address field and a destination address field of the first packet, the bitmap includes third indication information, a first indication information and an extension indication bit, the third indication information is used to indicate that the TTL field, the source address field and the destination address field exist in the first packet, and the extension indication bit is used to determine a length of the bitmap.
In this possible implementation, an example of the first packet structure is illustrated in a BOV scenario. For original BOV mode, when the bitmap has disposed many bit functions of preamble, the newly designed function can only apply for the position behind the bitmap more and more, and the packaging efficiency will be very low (the bitmap is very long) at this moment, and the problem that the packaging efficiency drops rapidly due to overlong bitmap caused by the newly designed function can be avoided by introducing the first indication information into the BOV.
A third aspect of the embodiments of the present application provides a method for processing a packet, which may be applied to packet encapsulation and parsing scenarios of a network layer. The method comprises the following steps: receiving a first message sent by first communication equipment, wherein the first message comprises second indication information and user data, and the second indication information is used for indicating whether the first message has an extension header or not; it is determined whether an extension header is included in the first message based on the second indication information.
In this embodiment of the present application, the second communication device may determine whether the first packet includes the extension header through the second indication information in the first packet. The second communication device can be enabled to quickly determine whether the first message comprises the extension header, and therefore efficiency of analyzing the first message is improved.
Optionally, in a possible implementation manner of the third aspect, the second indication information is used to indicate that the first packet has an extension header, and the first packet further includes first indication information, where the first indication information is used to indicate a type of at least one extension header, and the type is related to a function implemented by a communication device in a path for transmitting user data; the steps further comprise: determining whether an extension header to be processed by the second communication device exists in the at least one extension header based on the first indication information.
In this possible implementation manner, the second communication device may first determine, through the second indication information, whether the first packet includes the extension header. In the case of including the extension header, the type of the extension header is determined based on the first indication information. Under the condition that the extension head is not included, the first indication information can be not taken into consideration, and therefore the analysis efficiency of the second communication equipment can be improved.
The fourth aspect of the embodiment of the present application provides a method for processing a message, which can be applied to a message encapsulation and parsing scenario of a network layer. The method comprises the following steps: generating a first message, wherein the first message comprises second indication information and user data, and the second indication information is used for indicating whether the first message has an extension head; and sending the first message to the second communication equipment.
In this embodiment of the present application, the first communication device adds second indication information to the first message, so that the second communication device may determine whether the first message includes an extension header through the second indication information in the first message. The second communication device can be enabled to quickly determine whether the first message comprises the extension header, and therefore efficiency of analyzing the first message is improved.
A fifth aspect of the embodiments of the present application provides a second communication device, which may be applied to packet encapsulation and parsing scenarios of a network layer. The second communication device includes: a receiving unit, configured to receive a first packet sent by a first communication device, where the first packet includes first indication information, at least one extension header, and user data, where the first indication information is used to indicate a type of the at least one extension header, and the type is related to a function implemented by the communication device in a path for transmitting the user data; and the determining unit is used for determining whether an extension head to be processed by the second communication device exists in the at least one extension head based on the first indication information.
Optionally, in a possible implementation manner of the fifth aspect, the extension header to be processed exists in the extension header, and the second communication device further includes: and the execution unit is used for executing the operation corresponding to the target type based on the expansion head to be processed, wherein the target type is the type of the expansion head to be processed.
Optionally, in a possible implementation manner of the fifth aspect, the first packet includes at least two extension headers, and the first indication information is used to indicate a type of the at least two extension headers and a position of the at least two extension headers in the first packet.
Optionally, in a possible implementation manner of the fifth aspect, the first indication information includes a plurality of bits, where each bit in the plurality of bits is used to indicate whether there is an extension header of a corresponding type in the first packet; the first indication information is used for indicating that the mapping relation exists between the sequence of each bit of the extension header with the corresponding type and the position sequence of at least two extension headers in the first message.
Optionally, in a possible implementation manner of the fifth aspect, a bit of 1 in the plurality of bits indicates that there is an extension header of a corresponding type in the first packet.
Optionally, in a possible implementation manner of the fifth aspect, the type of the extension header includes at least one of a route type, a fragment type, an authentication header type, an encapsulation security payload type, a hop-by-hop option type, and a destination option type.
Optionally, in a possible implementation manner of the fifth aspect, the first packet further includes second indication information, where the second indication information is used to indicate that at least one extension header exists in the first packet.
Optionally, in one possible implementation manner of the fifth aspect, the first packet is encapsulated in a bitmap offset value BOV manner, where the first packet includes a base header and at least one extension header, the base header includes a bitmap, a time-to-live TTL field of the first packet, a source address field and a destination address field of the first packet, the bitmap includes third indication information, a first indication information and an extension indication bit, the third indication information is used to indicate that the TTL field, the source address field and the destination address field exist in the first packet, and the extension indication bit is used to determine a length of the bitmap.
A sixth aspect of the embodiments of the present application provides a first communication device, which may be applied to packet encapsulation and parsing scenarios of a network layer. The first communication device includes: the generating unit is used for generating a first message, and the head of the first message comprises first indication information, at least one extension head and user data, wherein the first indication information is used for indicating the type of the at least one extension head, and the type is related to the function realized by communication equipment in a path for transmitting the user data; and the sending unit is used for sending the first message to the second communication equipment.
Optionally, in a possible implementation manner of the sixth aspect, the first communication device further includes: the receiving unit is used for receiving Internet Control Message Protocol (ICMP) information sent by the second network equipment, and the ICMP information is used for indicating that the second network equipment cannot forward the first message; the slicing unit is used for slicing the first message and sending the sliced first message to the second network equipment.
Optionally, in a possible implementation manner of the sixth aspect, the first packet includes at least two extension headers, and the first indication information is used to indicate a type of the at least two extension headers and a position of the at least two extension headers in the first packet.
Optionally, in a possible implementation manner of the sixth aspect, the first indication information includes a plurality of bits, where each bit in the plurality of bits is used to indicate whether there is an extension header of a corresponding type in the first packet; the first indication information is used for indicating that the mapping relation exists between the sequence of each bit of the extension header with the corresponding type and the position sequence of at least two extension headers in the first message.
Optionally, in a possible implementation manner of the sixth aspect, a bit of the plurality of bits is 1, which indicates that there is an extension header of a corresponding type in the first packet.
Optionally, in a possible implementation manner of the sixth aspect, the type of the extension header includes at least one of a route type, a fragment type, an authentication header type, an encapsulation security payload type, a hop-by-hop option type, and a destination option type.
Optionally, in a possible implementation manner of the sixth aspect, the first packet further includes second indication information, where the second indication information is used to indicate that at least one extension header exists in the first packet.
Optionally, in one possible implementation manner of the sixth aspect, the first packet is encapsulated in a bitmap offset value BOV manner, where the first packet includes a base header and at least one extension header, the base header includes a bitmap, a time-to-live TTL field of the first packet, a source address field and a destination address field of the first packet, the bitmap includes third indication information, a first indication information and an extension indication bit, the third indication information is used to indicate that the TTL field, the source address field and the destination address field exist in the first packet, and the extension indication bit is used to determine a length of the bitmap.
A seventh aspect of the embodiments of the present application provides a second communication device, which may be applied to packet encapsulation and parsing scenarios of a network layer. The second communication device includes: the receiving unit is used for receiving a first message sent by the first communication equipment, wherein the first message comprises second indication information and user data, and the second indication information is used for indicating whether the first message has an extension head or not; and a determining unit configured to determine whether the extension header is included in the first packet based on the second indication information.
Optionally, in a possible implementation manner of the seventh aspect, the second indication information is used to indicate that the first packet has an extension header, and the first packet further includes first indication information, where the first indication information is used to indicate a type of at least one extension header, and the type is related to a function implemented by a communication device in a path for transmitting user data; the determining unit is further configured to determine whether an extension header to be processed by the second communication device exists in the at least one extension header based on the first indication information.
An eighth aspect of the present embodiment provides a first communication device, which may be applied to packet encapsulation and parsing scenarios of a network layer. The first communication device includes: the generating unit is used for generating a first message, wherein the first message comprises second indication information and user data, and the second indication information is used for indicating whether the first message has an extension head or not; and the sending unit is used for sending the first message to the second communication equipment.
A ninth aspect of the embodiments of the present application provides a second communication device, where the second communication device is configured to perform the method in the foregoing first aspect or any possible implementation manner of the first aspect, or perform the method in the foregoing third aspect or any possible implementation manner of the third aspect.
A tenth aspect of the embodiments of the present application provides a first communication device configured to perform the method in any possible implementation manner of the foregoing second aspect or the second aspect, or perform the method in any possible implementation manner of the foregoing fourth aspect or the fourth aspect.
An eleventh aspect of embodiments of the present application provides a communication system, including the second communication device of the ninth aspect, and/or the second communication device of the tenth aspect.
A twelfth aspect of the embodiments of the present application provides a chip, the chip including a processor and a data interface, wherein the processor reads instructions stored on a memory through the data interface to perform the method of the first aspect or any one of the possible implementation manners of the first aspect; or to perform the method of the second aspect or any one of the possible implementations of the second aspect; or to perform the method of the third aspect or any one of the possible implementations of the third aspect; or to perform the method of the fourth aspect or any one of the possible implementations of the fourth aspect. In a specific implementation, the chip may be implemented in the form of a central processing unit (central processing unit, CPU), microcontroller (micro controller unit, MCU), microprocessor (micro processing unit, MPU), digital signal processor (digital signal processing, DSP), system on chip (SoC), application-specific integrated circuit (ASIC), field programmable gate array (field programmable gate array, FPGA) or programmable logic device (programmable logic device, PLD).
A thirteenth aspect of the embodiments of the present application provides a computer readable medium having stored thereon a program code which, when run on a computer, causes the computer to perform the above-described first aspect or any one of the possible methods of the first aspect; causing a computer to perform the second aspect or any one of the possible methods of the second aspect described above; causing a computer to perform the method of the third aspect or any one of the possible executions of the third aspect; causing a computer to perform the method of the fourth aspect or any one of the possible executions of the fourth aspect. These computer-readable stores include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), flash memory, electrically EPROM (EEPROM), and hard disk drive (hard drive).
A fourteenth aspect of the embodiments of the present application provides a computer program product which, when executed on a computer, causes the computer to perform the method of the first aspect or any of the possible implementations of the first aspect; or cause a computer to perform the method of the second aspect or any possible implementation of the second aspect; or cause a computer to perform the method of the foregoing third aspect or any possible implementation of the third aspect; or cause a computer to perform the method of the fourth aspect or any possible implementation of the fourth aspect.
The technical effects of the fifth, ninth, eleventh, twelfth, thirteenth, fourteenth or any one of the possible implementation manners of the fifth, ninth, eleventh, twelfth, thirteenth or any one of the possible implementation manners of the first aspect may be referred to technical effects of the first aspect or technical effects of different possible implementation manners of the first aspect, which are not described herein.
The technical effects of the sixth, tenth, eleventh, twelfth, thirteenth, fourteenth or any one of the possible implementation manners may be referred to technical effects of the second aspect or different possible implementation manners of the second aspect, which are not described herein.
The technical effects of the seventh, ninth, eleventh, twelfth, thirteenth, fourteenth or any one of the possible implementation manners may be referred to technical effects of the third aspect or technical effects of different possible implementation manners of the third aspect, which are not described herein.
The technical effects of the eighth, tenth, eleventh, twelfth, thirteenth, fourteenth or any one of the possible implementation manners may be referred to technical effects of the fourth aspect or different possible implementation manners of the fourth aspect, which are not described herein.
From the above technical solutions, the embodiments of the present application have the following advantages: the second communication device receives the first message sent by the first communication device, and the first indication information included in the first message is used for indicating the type of at least one extension header. It is necessary to traverse all Next Header fields to determine a particular extension Header, as compared to the prior art. The second communication device in this embodiment may determine, based on the first indication information, whether there is an extension header to be processed by the second communication device in the at least one extension header. The time length for determining the specific extension header can be reduced, and the efficiency of the second communication device for analyzing the first message can be improved.
Drawings
Fig. 1 is a schematic diagram of a communication system according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a message processing method provided in an embodiment of the present application;
fig. 3 to fig. 8 are schematic structural diagrams of a first packet according to an embodiment of the present application;
FIG. 9 is a schematic flow chart of another message processing method according to an embodiment of the present application;
fig. 10 is another schematic structural diagram of a first packet according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a second communication device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a first communication device according to an embodiment of the present application;
fig. 13 is another schematic structural diagram of a second communication device according to an embodiment of the present application;
fig. 14 is another schematic structural diagram of the first communication device provided in the embodiment of the present application;
fig. 15 is a schematic structural diagram of a communication device according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a message processing method and related equipment, wherein network equipment can determine a specific extension header concerned by the network equipment through first indication information in a first message.
The following description of the technical solutions according to the embodiments of the present invention will be given with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, but not all embodiments. All other embodiments, which are derived by a person skilled in the art from the embodiments according to the invention without creative efforts, fall within the protection scope of the invention.
In addition, in the embodiments of the present application, words such as "exemplary," "for example," and the like are used to indicate an example, instance, or illustration. Any embodiment or design described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, the term use of an example is intended to present concepts in a concrete fashion.
In the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: including the cases where a alone, a and B together, and B alone, where a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
For ease of understanding, related terms and concepts primarily related to embodiments of the present application are described below.
1. Network layer
The network layer is the third layer in the open systems interconnection model (open system interconnection model, OSI model) { transport control protocol/internet protocol (transmission control protocol/internet protocol, TCP/IP) model }, providing routing and addressing functions, enabling the two-end systems to interconnect and determine the best path, and having some congestion control and flow control capabilities. In addition, since the network layer function in the TCP/IP protocol system is specified and implemented by the IP protocol, it is also called an IP layer. The router operates at the network layer.
2. IP protocol
The IP protocol is an important protocol in the TCP/IP protocol cluster and is the operation core of the TCP/IP protocol cluster. IP defines the addressing method and the encapsulation structure of the datagram. The IP protocol is a connectionless service responsible for transferring datagrams between source and destination addresses and its primary function is to transfer datagrams over an interconnected network, and to route datagrams between modules to the destination address via routing network addresses. In the IP protocol, for example, one host is identified by an IP address, and a line (route) for data transmission between two hosts is planned by way of a routing table. Common versions of the IP protocol include version four of IP (IPv 4) and version six of IP (IPv 6).
3. Internet control message protocol (internet control message protocol, ICMP)
The ICMP protocol is a connectionless-oriented protocol for transmitting error reporting control information. ICMP belongs to a network layer protocol and is mainly used for transferring control information between a host and a router, including reporting errors, exchanging limited control core status information, and the like. When the IP data cannot access the target, the IP router cannot forward the data packet according to the current transmission rate, and the like, the ICMP message is automatically sent. In addition, ICMP is an important member of the network layer in the TCP/IP model, and forms the network layer in the TCP/IP model together with the IP protocol, address resolution protocol (address resolution protocol, ARP), reverse address translation protocol (reverse address resolution Protocol, RARP) protocol, and internet group management protocol (internet group manage protocol, IGMP) protocol.
4. Packaging
Encapsulation refers to the process of adding additional protocol header information to the data prior to transmission. In general, the service data is mapped to the payload of a certain encapsulation protocol, then the packet header of the corresponding protocol is filled, a data packet of the encapsulation protocol is formed, and rate adaptation is completed.
5. Decapsulation
The unpacking, which is the inverse process of the packing, unpacks the protocol packet, processes the information in the packet header, and takes out the business information data packing and unpacking in the payload, which is a pair of inverse processes.
6. Foundation head (header)
The base header, which may also be referred to as a header, is referred to herein as a base header for purposes of distinction from the extension header. Mainly including control information for addressing and routing. It is also understood that the base header is control information that is fixedly present in the data packet. For example: for an IPv4 packet, the base header size is 20 octets, i.e., 160 bits. For an IPv6 packet, the base header size is 40 octets, i.e., 320 bits.
7. Extension head (extension header)
The extension header mainly includes a header for implementing special functions (e.g., routing, time stamping, fragmentation, and oversized packets, etc.). For example: the special function is achieved by adding an extension header after the base header of IPv 6. It is also understood that the extension header is optional control information in the data packet.
8. Type length value (tag/type length value, TLV)
The TLV refers to a structure body composed of a type tag/type of data, a length of data, and a value of data, and almost any data type can be described. In the definition of TLV, it is known that it includes three fields, respectively: tag field (tag), length field (length), content field (value). The value of the length field here is in fact the length of the content field.
9. Bit map offset value (bitmap offset value, BOV)
The BOV encapsulation is a new type of header encapsulation that does not distinguish between a base header and an extended header, all fields being indicated by a bitmap table. A bitmap is a set of binary sequences consisting of 0 and 1, the length of which is specified by a preamble specific field (bitmap length), which when a specific bit value of the bitmap is 1, indicates that a specific field is present next to it, and the position of this field is indicated by a corresponding offset field value, the value of this field being indicated by a value field value. In a particular scenario, the value field may be contracted to length, at which time the offset field may be omitted to save packaging overhead. It should be noted that the BOV mentioned later in the embodiments of the present application is an improvement on the basis of adding the first indication information and/or the second indication information to the bitmap of the base header. When the bitmap has configured the preamble with a plurality of bit functions, the newly designed function can only apply for the position of the bitmap more and more behind, and at this time, the packaging efficiency is very low (the bitmap is very long), and the problem that the packaging efficiency is rapidly reduced due to the newly designed function can be avoided by introducing the first indication information and/or the second indication information into the BOV.
Fig. 1 shows a schematic diagram of a communication system. The communication system may include: a first terminal device 101, a second terminal device 102, a first forwarding device 103 and a second forwarding device 104. Wherein the first terminal device 101 communicates with the second terminal device 102 via the first forwarding device 103 and the second forwarding device 104.
The specific process of transmitting data between the first terminal device 101 and the second terminal device 102 may include: the first terminal device 101 uses the data to be transmitted as a payload, adds a header encapsulation to the payload, and sends the header encapsulation and the payload as a message to the first forwarding device 103. The first forwarding device 103 receives the message sent by the first terminal device 101, parses the header of the message to obtain a transmission path, and forwards the message to the second forwarding device 104 based on the transmission path. The second forwarding device 104 performs similar operations as the first forwarding device 103. Finally, the second terminal device 102 receives the message forwarded by the second forwarding device 104, analyzes the message to obtain data in the load, and further realizes data transmission between the first terminal device 101 and the terminal device 103.
It will be appreciated that, in the process of transmitting data, the first forwarding device 103 and the second forwarding device 104 may also perform some processing (e.g., authentication header, encapsulation security payload, fragmentation, etc.) based on the extension header of the message, and may also add or modify the extension header (e.g., add routing type extension header) in the header of the message, and send the updated message to the next hop device.
In the embodiment of the present application, only two terminal devices (i.e., the first terminal device 101 and the second terminal device 102) and two forwarding devices (i.e., the first forwarding device 103 and the second forwarding device 104) are schematically illustrated as examples. In practical applications, the communication system in the embodiment of the present application may have more or fewer forwarding devices and terminal devices, and the number of forwarding devices and terminal devices in the embodiment of the present application is not limited.
The first forwarding device 103 and the second forwarding device 104 in the embodiments of the present application may be any intermediate network device having a wireless/wired transceiver function. For example, at the network layer, the first forwarding device 103 and the second forwarding device 104 may be routers.
The terminal device (i.e., the first terminal device 101 or the second terminal device 102) in the embodiment of the present application is a device with a wireless/wired transceiver function, which may be deployed on land, including indoor or outdoor, handheld, wearable or vehicle-mounted; can also be deployed on the water surface (such as ships, etc.); but may also be deployed in the air (e.g., on aircraft, balloon, satellite, etc.). The terminal device may be a mobile phone (mobile phone), a tablet computer (pad), a computer with a wireless transceiving function, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in industrial control (industrial control), a vehicle-mounted terminal device, a wireless terminal in unmanned driving (self driving), a wireless terminal in remote medical (remote medical), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation security (transportation safety), a wireless terminal in smart city (smart city), a wireless terminal in smart home (smart home), a wearable terminal device, or the like. The embodiments of the present application are not limited to application scenarios. A terminal device may also sometimes be referred to as a terminal, user Equipment (UE), access terminal device, vehicle terminal, industrial control terminal, UE unit, UE station, mobile station, remote terminal device, mobile device, UE agent, UE apparatus, or the like. The terminal device may also be fixed or mobile. In addition, the terminal device may also be a chip system for implementing the UE function.
In general, the processing to be performed by the first forwarding device 103 and the second forwarding device 104 is determined by the extension header in the message. Currently, internet protocol version 6 (internet protocol version, ipv 6) indicates the presence of an extended Header in the manner of a Next Header. The basic Header of the IPv6 is fixed in length, and the basic Header comprises a Next Header field, when the Next Header field is a specific value, the subsequent field representing the basic Header is an extension Header. The extension Header represents the way the method is Next Header, length, options (Options). The semantics of the Next Header field in the extension Header and the Next Header field in the base Header are the same. That is, when the Next Header field in the extension Header is a specific value, the subsequent field is still the extension Header until the Next Header field value is not a specific field, which indicates that the subsequent field is a payload.
However, the above method of using the Next Header may result in that when parsing a message, it is necessary to traverse all the Next Header fields to determine a specific extension Header, which is inefficient.
In order to solve the above-mentioned problems, the embodiments of the present application provide a method for processing a message, where a network device may determine a specific extension header of interest of the network device through first indication information in a first message.
The message processing method in the embodiment of the present application is described below with reference to the communication system shown in fig. 1. Referring to fig. 2, an embodiment of a message processing method provided in the present application includes steps 201 to 204. The first communication device and the second communication device may be any two devices in fig. 1, for example: the first communication device is the first terminal device 101 shown in the foregoing fig. 1, and the second communication device is the first forwarding device 103 shown in the foregoing fig. 1. Also for example: the first communication device is the first forwarding device 103 shown in fig. 1 described above and the second communication device is the second forwarding device 104 shown in fig. 1 described above. For another example: the first communication device is the second forwarding device 104 shown in the foregoing fig. 1, the second communication device is the second terminal device 102 shown in the foregoing fig. 1, and so on. The specific examples are not limited herein. In addition, the method may be performed by a communication device (either the first communication device or the second communication device) or by a component of a communication device (e.g., a processor, chip, or system-on-chip, etc.). It is understood that the first communication device and the second communication device may be chips or units or physical devices with transceiving functions. If the first communication equipment sends the message, the second communication equipment receives the message; if the second communication device sends the message, the first communication device receives the message. In this embodiment of the present application, the first communication device is taken as a transmitting end device, and the second communication device is taken as a receiving end device as an example.
In step 201, a first communication device generates a first message.
The first communication device and the second communication device in the embodiments of the present application may be any two devices in fig. 1, which is not limited herein. In the following, without explanation, only the first communication device is described as the first terminal device shown in the foregoing fig. 1, and the second communication device is described as the first forwarding device shown in the foregoing fig. 1.
Optionally, the first communication device is the first terminal device in fig. 1, and after the first terminal device obtains the user data that needs to be transmitted to the second terminal device, a base header and/or an extension header are added on the basis of the user data, and packaging is performed to obtain the first message. Wherein the user data may also be referred to as payload (payload). The length and coding mode of the extension header are set by a specific protocol or actual needs, and are not limited herein. In addition, if an extension head is present, the extension head is located between the base head and the load. For example, the structure of the first packet may be as shown in fig. 3, and it should be noted that the structure shown in fig. 3 is not limited to the base header, the extension header, and the bytes occupied by the payload, for example, the bytes occupied by the payload may be more or less than the bytes occupied by the base header.
The first message in the embodiment of the present application includes first indication information, at least one extension header, and a payload, where the first indication information is used to indicate a type of the at least one extension header, and the type is related to a function (such as routing, encryption, authentication, etc.) implemented by a communication device in a path for transmitting user data. Or it is understood that the type indicated by the first indication information is an extension header type existing in the first message, that is, the first indication information may be used to indicate whether an extension header of a corresponding type exists.
Optionally, in case the first message includes at least two extension headers, the first indication information may be used to indicate the positions of the at least two extension headers in the first message, in addition to the type of the at least two extension headers. Specifically, the order of the extension header types in the first indication information, which indicates that the first message exists, and the order of the positions of at least two extension headers in the first message have a specific mapping relationship (for example, the order is consistent, the order is opposite, etc.). The position of the extension header in the first message may be determined according to the first indication information, for example, the 1 st bit of the first indication information may correspond to the 1 st extension header position in the first message, or correspond to the 2 nd extension header position in the first message, or the like, which is not limited herein.
In this embodiment of the present application, the position of the extension header in the first packet may be determined based on at least one of the order in which the extension header types exist in the first indication information, the length in the extension header, and the preset extension header fixed length.
In addition, the number of bits in the first indication information corresponding to one extension header type is not limited. To facilitate reducing the message length and reducing the message transceiving overhead, only 1 bit is used to indicate the type of an extension header. For example: the first indication information includes 3 bits, the 3 bits are used for indicating types of three extension heads respectively, a first bit in the first indication information is used for indicating types of a first extension head in the first message, a second bit in the first indication information is used for indicating types of a second extension head in the first message, and a third bit in the first indication information is used for indicating types of a third extension head in the first message. It will be appreciated that 2 or more bits in the first indication information may be used to indicate the type of an extension header, which is not limited herein.
Alternatively, the type of the extension header and the first order in the embodiments of the present application may be as shown in table 1, where the first order is an indication order of the first indication information.
TABLE 1
Figure BDA0003442408990000131
Wherein, at least one extension header in the embodiments of the present application may be at least one of table 1 above. In addition, the types, the number and the first order of the 6 types of extension header are merely examples, and in practical applications, the types, the number of extension header types and the first order may be set according to actual needs. The first sequence is described below in connection with table 1. Specifically, the 1 st bit in the first indication information is used to indicate whether the extension header R (i.e., the routing type) exists. The 2 nd bit in the first indication information is used to indicate whether the extension header F (i.e., the slice type) exists. The 3 rd bit in the first indication information is used to indicate whether the extension header a (i.e. the authentication header type) is present. The 4 th bit in the first indication information is used to indicate whether the extension header E (i.e., the encapsulated security payload type) exists. The 5 th bit in the first indication information is used to indicate whether the extension header H (i.e., hop-by-hop type) exists. The 6 th bit in the first indication information is used to indicate whether the extension header D (i.e., destination type) exists.
In addition, one type may correspond to one or more extension headers in the message, such as: the hop-by-hop option type may correspond to one or more extension headers, and is not limited in particular herein.
Optionally, the first message includes a base header, at least one extension header, and a payload. The basic header includes first indication information and other fields. Other fields are header information necessary for transmitting the first message, such as: for IP messages, the other fields may include: version field, header length field, service type field, message total length field, time To Live (TTL) field, source IP address, destination IP address field, etc.
Optionally, the first indication information includes a plurality of bits, each bit in the plurality of bits being used to indicate whether there is an extension header of a corresponding type in the first message. For example: the first indication information includes 6 bits, each bit indicating whether there is an extension header of a corresponding type with "0" or "1". Specifically, a bit of 1 indicates that there is an extension header of a corresponding type, and a bit of 0 indicates that there is no extension header of a corresponding type.
Example 1: the structure of the first message is described taking the example that the first message includes 6 types of extension header types in table 1, the first indication information is 6 bits, each bit in the first indication information is used for indicating whether one type of extension header exists, the order of the first indication information indicating the 6 types of extension header types is consistent with the order of the 6 types of extension header types in the first message (for example, the bit order of table 1), and the number of extension header types in each type is 1. As shown in fig. 4, the first message includes a base header, an extension header, and a payload. The base header includes first indication information and other fields, and the extension header includes R, F, A, E, H, D six types of extension headers. The 6 bits of the first indication information are "11111" respectively, wherein the number of bits of "1" in the first indication information is used for indicating that the extension header of the corresponding type exists, and the number of bits of "0" in the first indication information is used for indicating that the extension header of the corresponding type does not exist. I.e. bit 1 of the first indication information is "1" for indicating that the extension header R (i.e. the routing type) is present. The 2 nd bit in the first indication information is "1" for indicating that the extension header F (i.e., the slice type) exists. The 3 rd bit in the first indication information is "1" for indicating that the extension header a (i.e. the authentication header type) is present. The 4 th bit in the first indication information is "1" for indicating that the extension header E (i.e., the encapsulated security payload type) exists. The 5 th bit in the first indication information is "1" for indicating that the extension header H (i.e., hop-by-hop type) exists. The 6 th bit in the first indication information is "1" for indicating that the extension header D (i.e., destination type) exists. It can be seen that there are six types of extension header in the first message, and the ordering of the six types of extension header in the first message is consistent with the order in which the first indication information indicates that there are six types of extension header.
Fig. 4 only takes an example in which 6 extension header types exist (i.e., 6 bits of the first indication information are "111111" respectively), and may be shown in fig. 5 for a case in which the first message does not include all 6 types. Only the differences between fig. 5 and fig. 4 are described below, and similar parts are not repeated.
Example 2: the 6 bits of the first indication information in fig. 5 are "111101", i.e., the 1 st bit in the first indication information is "1", for indicating that the extension header R (i.e., the routing type) exists. The 2 nd bit in the first indication information is "1" for indicating that the extension header F (i.e., the slice type) exists. The 3 rd bit in the first indication information is "1" for indicating that the extension header a (i.e. the authentication header type) is present. The 4 th bit in the first indication information is "1" for indicating that the extension header E (i.e., the encapsulated security payload type) exists. The 5 th bit in the first indication information is "0" for indicating that the extension header H (i.e., hop-by-hop type) does not exist. The 6 th bit in the first indication information is "1" for indicating that the extension header D (i.e., destination type) exists. It can be seen that there are five types of extension headers in the first message, and the ordering of the five types of extension headers in the first message is consistent with the order in which the first indication information indicates that there are five extension header types (i.e., without consideration of the individual bits indicating that there is no extension header type order). Or it is understood that, in determining the position of the extension header of the corresponding type, the number of bits of "0" in the first indication information is also combined, as can be seen in the example of fig. 5, since 1 bit in the first indication information is "0", the 6 th bit in the first indication information is used for indicating the 5 th position in the extension header in fact. The 5 th bit of the first indication information is 0, which is used to indicate that the extension header corresponding to the type indicated by the 5 th bit does not exist, and as can be seen from table 1, the 5 th bit is used to indicate the H type. I.e. the first message does not have an extension header of type H.
Optionally, the first message further includes second indication information, where the second indication information is used to indicate that the first message has at least one extension header. In this case, the communication device may first determine whether the first packet has an extension header based on the second indication information, and if it is determined that the second indication information indicates that the first packet exists in the first packet. The communication equipment further determines the type corresponding to the extension header in the first message through the first indication information, and further determines whether the extension header which needs to be processed by the communication equipment exists in the first message. It will be appreciated that in the case where the extension header is not present in the first message, the first indication information indicating the type of extension header is not necessarily present either. That is, when the second indication information indicates that the extension header does not exist in the first packet, the first packet may not exist in the first packet.
Optionally, the second indication information indicates that the first message has at least one extension header with 1 bit. For example: the 1 bit in the second indication information is "1", indicating that at least one extension header exists in the first message.
Example 3: as shown in fig. 6, the first message includes a base header, an extension header, and a payload. The base header includes second indication information, first indication information, and other fields. The first indication information is similar to the description of the other fields corresponding to fig. 4, and will not be repeated here.
In this embodiment of the present application, the positions of the first indication information and the second indication information in the base header and whether the plurality of bits in the first indication information are continuous are not limited, and may be set according to the actual needs and specifications of the used protocol, which is not limited in particular here.
Optionally, the first message is encapsulated in a Bitmap Offset Value (BOV) manner, where the first message includes a base header, at least one extension header and a payload, the base header includes a bitmap (bitmap), a time-to-live TTL field, a source address field and a destination address field, the bitmap includes third indication information, first indication information and an extension indication bit, the third indication information is used to indicate that the first message includes the TTL field, the source address field and the destination address field, and the extension indication bit is used to determine a length of the bitmap. The BOV mode may be described with reference to the foregoing description, and details thereof are not repeated herein. For example, the extension indicating bit may indicate whether to extend a preset byte after bitmap. The following description will be given by taking only an example in which the extension step size is 1 byte (i.e., 8 bits).
Example 4: taking the first message as an example, the first message is encapsulated in a BOV mode, and the expansion step length of the bitmap field is 8 bits (for example, the bitmap is 16 bits). Wherein, the extension step length is 8 bits can be understood as follows: the length of the bitmap field is 8 bits or a multiple of 8 bits, and the last bit (which may be referred to as an extension indicator bit) of each 8 bits in the bitmap is used to indicate whether the bitmap is extended. If the extension indicator bit is "1", it indicates that the bitmap extends 1-8 bits backward. If the extension indicator bit is "0", it indicates that the bitmap is no longer extended backward. The structure of the first message may be as shown in fig. 7. The first message includes a base header, an extension header, and a payload. The base header includes a bitmap, a time-to-live (TTL) field, a source address field, and a destination address field. The bitmap includes third indication information, first indication information, and extended indication bits. Wherein the third indication information is 3 bits ("111"). The 1 st bit in the third indication information is "1", which is used to indicate that the first message has a time-to-live field. The 2 nd bit in the third indication information is "1", which is used to indicate that the first message has a destination address field. The 3 rd bit in the third indication information is "1", which is used to indicate that the first message has a source address field. The 8 th bit and the 16 th bit in the bitmap are expansion indication bits, and the 16 th bit takes a value of 0 because the bitmap comprises 16 bits, which indicates that the 16 th bit is not expanded by the bitmap subsequently. Meanwhile, the 8 th bit takes a value of '1', which means that the 8 th bit is extended by 1 8 bits. The 10 th bit to the 15 th bit in the bitmap are the first indication information. The first indication information is 6 bits ("000001"). Wherein the first indication information indicates the order of extension types as described in the foregoing table 1. I.e. the 10 th bit in the bitmap is used to indicate whether an extension header R (i.e. the routing type) is present. The 11 th bit in the bitmap is used to indicate whether an extension header F (i.e., a slice type) exists. The 12 th bit in the bitmap is used to indicate whether extension header a (i.e. authentication header type) is present. The 13 th bit in the bitmap is used to indicate whether the extension header E (i.e., the encapsulated security payload type) is present. The 14 th bit in the bitmap is used to indicate whether an extension header H (i.e., hop-by-hop type) exists. The 15 th bit in the bitmap is used to indicate whether an extension header D (i.e., destination type) exists. Specifically, as can be seen from fig. 7, the 10 th bit in the bitmap is "0" for indicating that the extension header R (i.e., the routing type) does not exist. The 11 th bit in the bitmap is "0" to indicate that the extension header F (i.e., the slice type) does not exist. The 12 th bit in the bitmap is "0" to indicate that the extension header a (i.e., the authentication header type) does not exist. The 13 th bit in the bitmap is "0" to indicate that the extension header E (i.e., the encapsulated security payload type) does not exist. The 14 th bit in the bitmap is "0" to indicate that the extension header H (i.e., hop-by-hop type) does not exist. The 15 th bit in the bitmap is "1" to indicate that the extension header D (i.e., destination type) exists. And the extension header D takes the value shown as the extension header in fig. 7.
It will be appreciated that the length of the bitmap field, the extension step length, the position of the first indication information in the bitmap, etc. are merely examples, and may be set according to the needs or the protocol specification in practical applications, and are not limited herein.
Example 5: on the basis of example 4, the bitmap in the first packet may further include second indication information for indicating whether the extension header exists in the first packet. The first message is shown in fig. 8, and similar parts to those in fig. 7 will not be described here again. Fig. 8 is different from fig. 7 in that the 9 th bit of the bitmap takes the 9 th bit of the bitmap as an example, and the 9 th bit is "1" in this example, so as to indicate that the first packet has an extension header.
It can be understood that the positions of the third indication information, the second indication information, and the first indication information in the bitmap may be set according to actual needs, which is not limited herein.
Step 202, the first communication device sends a first message to the second communication device. Correspondingly, the second communication device receives the first message sent by the first communication device.
After the first communication device generates the first message, the first message is sent to the second communication device. Correspondingly, the second communication device receives the first message sent by the first communication device.
In step 203, the second communication device determines, based on the first indication information, whether there is an extension header to be processed by the second communication device in the at least one extension header.
After the second communication device receives the first message, the base header of the first message may be parsed to obtain the first indication information, where the first indication information is used to indicate the type of the extension header in the first message. The second communication device may determine whether an extension header to be processed by the second communication device exists in the first message based on a type of extension header that exists in the first message.
If there is an extension header to be processed by the second communication device, step 204 is performed. If the extension header to be processed by the second communication device does not exist, the second communication device forwards the first message to the next hop device.
The following describes, by way of example, how the second communication device determines whether there is an extension header to be processed by the second communication device in the first message based on the first indication information.
Optionally, since the first indication information indicates a type of extension header in the first message, the second communication device may determine the type of extension header in the first message based on the first indication information.
It will be appreciated that the order in which the first indication information indicates the type is preset by the first communication device and the second communication device, i.e. the second communication device has acquired the first order as shown in table 1.
Illustratively, continuing with example 1 above, after receiving the first message as shown in fig. 4, the second communication device may determine that the first indication information is "111111", and further determine that the first message includes six extension header types, that is, an extension header R, an extension header F, an extension header a, an extension header E, an extension header H, and an extension header D.
Illustratively, continuing with example 2 above, after receiving the first message as shown in fig. 5, the second communication device may determine that the first indication information is "111101", and further determine that the first message includes five extension header types, namely, an extension header R, an extension header F, an extension header a, an extension header E, and an extension header D.
Illustratively, continuing with example 4 above, the second communication device may determine that the first indication information is "000001" after receiving the first packet as shown in fig. 7, and further determine that the first packet includes an extension header type, which is extension header D.
Optionally, if the extension header of the routing type exists in the first packet and the destination address in the routing option is the address of the second communication device, the extension header of the routing type is an extension header to be processed by the second communication device. If the extension header of the routing type exists in the first message and the destination address in the routing option is not the address of the second communication device, the extension header of the routing type is not the extension header to be processed by the second communication device.
Optionally, if the first message has the extension header of the fragmentation type and the second communication device cannot send the first message to the next hop device completely, ICMP information is sent to the first communication device, where the ICMP information is used to instruct the source end to fragment the first message and resend the fragmented message. Of course, if the slice type extension header exists in the first packet, and the second communication device is the target node (i.e. the destination end on the transmission path), the slice type extension header is the extension header to be processed because the target node needs to integrate slices.
Optionally, if the extended header of the type of the authentication header exists in the first packet and the second communication device is an intermediate device (i.e. not a source end and a destination end) on the transmission path, the extended header of the type of the authentication header is not an extended header to be processed by the second communication device. If the first message has an extension header of the type of the authentication header and the second communication device is a source end or a destination end on the transmission path, the extension header of the type of the authentication header is an extension header to be processed by the second communication device.
Optionally, if the extension header of the encapsulated security payload type exists in the first packet and the second communication device is an intermediate device (i.e. not a source end and a destination end) on the transmission path, the extension header of the encapsulated security payload type is not an extension header to be processed by the second communication device. If the extension header of the encapsulation security payload type exists in the first message and the second communication device is a source end or a destination end on the transmission path, the extension header of the encapsulation security payload type is an extension header to be processed by the second communication device.
Optionally, if there is an extension header of the hop-by-hop option type in the first packet, the second communication device may determine that the extension header of the hop-by-hop option type in the first packet is an extension header to be processed, since the hop-by-hop option refers to an option that all nodes on a path for transmitting user data need to check.
Optionally, if there is an extension header of the destination option type in the first packet, the destination option is an option that the last hop device (i.e. the target node) will process on the path of the user data. If the second communication device is the last hop device, the second communication device may determine that the extension header of the destination option type in the first message is an extension header to be processed. If the second communication device is not the last hop device, the second communication device may determine that the extension header of the destination option type in the first message is not the extension header to be processed.
It will be appreciated that the extension header to be processed by the second communication device may be set according to actual needs, and the above description is merely exemplary, and is not limited thereto.
In step 204, the second communication device performs an operation corresponding to the target type based on the extension header to be processed. This step is optional.
Optionally, if the second communication device determines that there is an extension header to be processed by the second communication device in the first packet, the second communication device may determine a position of the extension header in the first packet based on at least one of an order in which extension header types exist, a length in the extension header, and a preset extension header fixed length in the first indication information. And executing the operation corresponding to the target type based on the expansion header to be processed.
Illustratively, continuing with example 1 above, after receiving the first message as shown in fig. 4, the second communication device may determine that the first indication information is "111111", and further determine that the first message includes six extension header types, that is, an extension header R, an extension header F, an extension header a, an extension header E, an extension header H, and an extension header D. In this case, the order in which the first indication information indicates the types coincides with the order in which the extension heads of the respective types appear in the extension heads.
Illustratively, continuing with example 2 above, after receiving the first message as shown in fig. 5, the second communication device may determine that the first indication information is "111101", and further determine that the first message includes five extension header types, namely, an extension header R, an extension header F, an extension header a, an extension header E, and an extension header D. Since 1 bit in the first indication information is "0", the position of the extension header for indication of the 6 th bit in the first indication information is actually 6-1=5 in the extension header, i.e., the 5 th position in the extension header.
Illustratively, continuing with example 4 above, the second communication device may determine that the first indication information is "000001" after receiving the first packet as shown in fig. 7, and further determine that the first packet includes an extension header type, which is extension header D. Since there are 5 bits in the first indication information as "0", the extension header for indication of the 6 th bit in the first indication information is actually located in the extension header at 6-5=1, i.e., the 1 st location in the extension header.
Similar to step 203, this step includes a plurality of cases, which are described below, respectively.
Optionally, if the extension header to be processed includes an extension header of a routing type, the second communication device fills the second communication device address (e.g., IP address) into the base header, so as to facilitate subsequent tracking of the transmission path of the first message.
Optionally, if the extension header to be processed includes a slice type extension header, and the second communication device cannot send the first message to the next hop device completely, sending fourth indication information to the first communication device, where the fourth indication information is used to instruct the source end to slice the first message, and resend the sliced message. Of course, if the fragmentation type extension header exists in the first packet and the second communication device is the target node (i.e., the destination end on the transmission path), the second communication device integrates a plurality of packets through the fragmentation type extension header, so as to obtain complete user data.
Optionally, if the extension header to be processed includes an extension header of an authentication header type and the second communication device is a source end or a destination end on the transmission path, the second communication device provides at least one of authentication, integrity check, replay protection, and the like for the first message.
Optionally, if the extension header to be processed includes an extension header of the encapsulated security payload type and the second communication device is a source or a destination on the transmission path, the second communication device provides at least one of authentication, integrity check, replay protection, encryption, and the like for the first message.
Optionally, if the extension header to be processed includes an extension header of the hop-by-hop option type, the second communication device adds or alters information in the base header to the first message. For example: and filling the time stamp for forwarding the first message in the basic header so as to facilitate the subsequent measurement of the transmission time length of the first message between the transmission path routes. For another example, the address of the second communication device is filled in the base header so as to track the transmission path of the first message subsequently. Also for example: the second communication device may determine the forwarding table based on the extension header of the hop-by-hop option type, and perform forwarding operation according to the forwarding table.
Optionally, if the extension header to be processed includes an extension header of a destination address type and the second communication device is a destination end on the transmission path, the second communication device processes the first message, where the processing is related to a function that can be implemented by the second communication device, and the disclosure is not limited herein.
In one possible implementation manner, the method for processing a message provided in the embodiment of the present application includes steps 201 to 203. In this manner, the second communication device may determine whether there is an extension header to be processed by the second communication device in the at least one extension header based on the first indication information. Compared with the prior art, the method can judge the specific extension Header only by traversing all Next Header fields, and can improve the efficiency of analyzing the first message by the second communication equipment in the mode of the first indication information.
In another possible implementation manner, the method for processing a message provided in the embodiment of the present application includes steps 201 to 204. In this way, the second communication device may determine, according to the first indication information, whether an extension header to be processed by the second communication device exists in the first packet, and further, in the case that the extension header to be processed exists, the second communication device may execute a corresponding operation. Compared with the prior art, the method and the device can improve the efficiency of the second communication equipment in analyzing the first message and forwarding the first message.
In this embodiment, on the one hand, in the process of generating the first packet, the first communication device adds the first indication information into the first packet, and since the first indication information is used for indicating the type of the extension header in the first packet, and the bits occupied by the first indication information are smaller, the encapsulation efficiency of the first packet can be improved. On the other hand, in the process of analyzing and/or forwarding the first message by the subsequent device (for example, the second communication device) on the transmission path, the type of the extension header, which indicates the existence of the first message, on the basis of the first indication information, of the subsequent device on the transmission path can be made to rapidly determine the extension header to be processed, so that the efficiency of analyzing the first message and forwarding the first message by the subsequent device is improved. On the other hand, for the original BOV mode, when the bitmap is configured with a plurality of bit functions in the preamble, the newly designed function can only apply for the position of the bitmap at the more and more rear, the packaging efficiency is very low (the bitmap is very long), and the problem that the packaging efficiency is rapidly reduced due to overlong bitmap caused by the newly designed function can be avoided by introducing the first indication information into the BOV.
Referring to fig. 9, another embodiment of a message processing method provided in the embodiments of the present application includes steps 901 to 904. The description of the first communication device and the second communication device is similar to that in the embodiment shown in fig. 2, and will not be repeated here.
In step 901, a first communication device generates a first message.
The first message in this step is similar to the description of the first message described in step 201 in fig. 2, and will not be repeated here. The difference is that the first message in this step includes the second indication information, and not necessarily includes the first indication information. The second indication information is used for indicating whether the first message has an extension header.
In one possible implementation, the second indication information indicates that the first message has an extended header, and the first message includes the first indication information in addition to the second indication information. In this case, reference may be made to the description and examples of the embodiment shown in fig. 2, in which the first message includes the second indication information, which are not described herein.
It will be appreciated that the second indication information may be 1 bit or more, i.e. 1 bit may be used to indicate whether the extension header exists in the first packet, or more bits may be used to indicate whether the extension header exists in the first packet. The embodiment of the application will be described by taking the example that the second indication information indicates whether the extension header exists in the first message by using 1 bit. In addition, the position of the second indication information in the first message may be set according to actual needs, which is not limited herein.
For example, if the second indication information is "1" and is used to indicate that the extension header exists in the first packet, the first packet is as shown in fig. 6, and further includes the second indication information, which is used to indicate the type of the extension header existing in the first packet. In another possible implementation, the second indication information indicates that the extension header does not exist in the first packet, and the first packet does not include the first indication information.
For example, if the second indication information is "0" and is used to indicate that there is no extension header in the first packet, the first packet is shown in fig. 10, where the first packet includes a base header and a payload, and the base header includes the second indication information and other fields. For descriptions of other fields and loads, reference may be made to the previous descriptions, and no further description is given here.
In step 902, the first communication device sends a first message to the second communication device. Correspondingly, the second communication device receives the first message sent by the first communication device.
This step is similar to that described above with respect to step 202 in the embodiment of fig. 2, and will not be repeated here.
In step 903, the second communication device determines whether the extension header exists in the first packet based on the second indication information.
After the second communication device receives the first message, it may determine whether an extension header exists in the first message based on second indication information in the first message.
Illustratively, continuing the above example, if the second indication information is "0", the second communication device determines that the extension header does not exist in the first message. If the second indication information is "1", the second communication device determines that the extension header exists in the first message.
If there is an extension header in the first message, step 904 is performed. If the second indication information does not exist in the first message, the second communication device forwards the first message to the next hop device.
Step 904, determining whether there is an extension header to be processed in the first message based on the first indication information. This step is optional.
This step is similar to step 203 in the embodiment shown in fig. 2 and will not be described here again.
In this embodiment, on the one hand, by introducing the second indication information into the first packet, the communication device on the transmission path may determine whether the extension header exists in the first packet. If the first message has an extension Header, the communication device may determine the type of the extension Header based on the first indication information, so as to determine whether the extension Header to be processed exists, so that the analysis efficiency is improved compared with the IPv6 or original BOV scheme, and the analysis efficiency of the communication device on the first message is improved, for example, compared with the IPv6 in the prior art, the calculation overhead of analyzing the Next Header is avoided. On the other hand, in the process of analyzing and/or forwarding the first message by the subsequent device (for example, the second communication device) on the transmission path, the type of the extension header existing in the first message can be indicated by the subsequent device on the transmission path based on the first indication information to quickly determine the extension header to be processed, so that the efficiency of analyzing the first message and forwarding the first message by the subsequent device is improved.
The method for processing a message in the embodiment of the present application is described above, and the communication device in the embodiment of the present application is described below, where the communication device (for example, the first communication device and the second communication device) provided in the embodiment of the present application may be applied to a packet encapsulation and parsing scenario of a network layer.
Referring to fig. 11, an embodiment of a second communication device provided in an embodiment of the present application includes:
a receiving unit 1101, configured to receive a first packet sent by a first communication device, where the first packet includes first indication information, at least one extension header, and user data, where the first indication information is used to indicate a type of the at least one extension header, and the type is related to a function implemented by the communication device in a path for transmitting the user data;
a determining unit 1102, configured to determine whether an extension header to be processed by the second communication device exists in the at least one extension header based on the first indication information.
Optionally, in the case where there is an extension header to be processed in the extension header, the second communication device of the present embodiment further includes: the executing unit 1103 is configured to execute an operation corresponding to a target type based on the extension header to be processed, where the target type is the type of the extension header to be processed.
In this embodiment, the operations performed by the units in the second communication device are similar to those described in the embodiments shown in fig. 2 to 8, and are not repeated here.
In this embodiment, the receiving unit 1101 receives a first packet sent by a first communication device, where the first indication information included in the first packet is used to indicate the type of at least one extension header. Accordingly, the determining unit 1102 may determine whether there is an extension header to be processed by the second communication device in the at least one extension header based on the first indication information. Compared with the prior art, the method can judge the specific extension Header only by traversing all Next Header fields, and can improve the efficiency of analyzing the first message by the second communication equipment in the mode of the first indication information.
Referring to fig. 12, an embodiment of a first communication device provided in an embodiment of the present application includes:
a generating unit 1201, configured to generate a first packet, where a header of the first packet includes first indication information, at least one extension header, and user data, where the first indication information is used to indicate a type of the at least one extension header, where the type is related to a function implemented by a communication device in a path for transmitting the user data;
A sending unit 1202, configured to send the first message to the second communication device.
Optionally, the first communication device in this embodiment further includes: a receiving unit 1203, configured to receive ICMP information of an internet control message protocol sent by the second network device, where the ICMP information is used to indicate that the second network device cannot forward the first message;
optionally, the first communication device in this embodiment further includes: and the slicing unit 1204 is configured to slice the first message and send the sliced first message to the second network device.
In this embodiment, the operations performed by the units in the first communication device are similar to those described in the embodiments shown in fig. 2 to 8, and are not repeated here.
In this embodiment, on the one hand, in the process of generating the first packet, the generating unit 1201 adds the first indication information into the first packet, and since the first indication information is used for indicating the type of the extension header in the first packet, and the bits occupied by the first indication information are smaller, the encapsulation efficiency of the first packet can be improved. On the other hand, in the process of analyzing and/or forwarding the first message by the subsequent device (for example, the second communication device) on the transmission path, the type of the extension header, which indicates the existence of the first message, on the basis of the first indication information, of the subsequent device on the transmission path can be made to rapidly determine the extension header to be processed, so that the efficiency of analyzing the first message and forwarding the first message by the subsequent device is improved.
Referring to fig. 13, another embodiment of a second communication device provided in an embodiment of the present application includes:
a receiving unit 1301, configured to receive a first packet sent by a first communication apparatus, where the first packet includes second indication information, and the second indication information is used to indicate whether the first packet has an extension header.
A determining unit 1302, configured to determine whether the extension header is included in the first packet based on the second indication information.
In this embodiment, the operations performed by the units in the second communication device are similar to those described in the embodiment shown in fig. 9, and will not be described here again.
In this embodiment, the second communication device may determine whether the first packet includes the extension header through the second indication information in the first packet. The second communication device can be enabled to quickly determine whether the first message comprises the extension header, and therefore efficiency of analyzing the first message is improved.
Referring to fig. 14, another embodiment of the first communication device provided in the embodiment of the present application includes:
a generating unit 1401 is configured to generate a first packet, where the first packet includes second indication information and user data, and the second indication information is used to indicate whether the first packet has an extension header.
A sending unit 1402 sends the first message to the second communication device.
In this embodiment, the operations performed by the units in the first communication device are similar to those described in the embodiment shown in fig. 9, and are not described here again.
In this embodiment, the first communication device adds the second mere information to the first message, so that the second communication device can quickly determine whether the first message includes the extension header or not through the second indication information, thereby improving the efficiency of analyzing the first message.
Referring to fig. 15, another communication device provided in the present application is a schematic structural diagram. The present invention may be applied to the packet encapsulation and parsing scenario of the network layer, and the communication device may be the first communication device or the second communication device in the embodiments shown in fig. 2 to 10. The communication device may include a processor 1501, a memory 1502 and a communication interface 1503. The processor 1501, memory 1502 and communication interface 1503 are interconnected by wires. Wherein program instructions and data are stored in memory 1502.
In a possible implementation manner, the memory 1502 stores program instructions and data corresponding to steps executed by the second communication device in the foregoing embodiment corresponding to fig. 2 to 10. A processor 1501 for executing the steps executed by the second communication device as shown in any of the embodiments shown in the foregoing fig. 2 to 10. The communication interface 1503 may be used to perform the steps related to acquiring, transmitting, and receiving performed by the second communication device in any of the embodiments shown in fig. 2 to 10.
In another possible implementation manner, the memory 1502 stores program instructions and data corresponding to steps executed by the first communication device in the foregoing embodiments corresponding to fig. 2 to 10. A processor 1501 for executing the steps executed by the first communication device as shown in any of the embodiments shown in the foregoing figures 2-10. The communication interface 1503 may be used to perform the receiving and sending of messages, and perform the steps related to acquiring, sending, and receiving performed by the first communication device in any of the embodiments shown in fig. 2 to 10.
It will be appreciated that the communication device may include more or fewer components than those of fig. 15, which is exemplary only and not limiting.
In addition, the present embodiment provides a communication system including the second communication device as shown in fig. 11 and/or the first communication device as shown in fig. 12. Or the communication system comprises a second communication device as shown in fig. 13 and/or a first communication device as shown in fig. 14.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units described above may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
When the integrated unit is implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present invention are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
The terms first, second and the like in the description and in the claims of the present application and in the above-described figures, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances and are merely illustrative of the manner in which the embodiments of the application described herein have been described for objects of the same nature. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.

Claims (25)

1. A method for processing a message, the method comprising:
receiving a first message sent by a first communication device, wherein the first message comprises first indication information, at least one extension header and user data, the first indication information is used for indicating the type of the at least one extension header, and the type is related to functions realized by the communication device in a path for transmitting the user data;
Determining whether an extension header to be processed by the second communication device exists in the at least one extension header based on the first indication information.
2. The method of claim 1, wherein the extension header to be processed is present in the extension header, the method further comprising:
and executing an operation corresponding to a target type based on the expansion head to be processed, wherein the target type is the type of the expansion head to be processed.
3. The method according to claim 1 or 2, wherein the first message comprises at least two extension headers, and the first indication information is used to indicate the type of the at least two extension headers and the positions of the at least two extension headers in the first message.
4. The method of claim 3, wherein the first indication information comprises a plurality of bits, each bit of the plurality of bits being used to indicate whether a corresponding type of extension header is present in the first message; the first indication information is used for indicating that the mapping relation exists between the sequence of each bit of the extension header of the corresponding type and the position sequence of the at least two extension headers in the first message.
5. The method of claim 4, wherein a bit of 1 in the plurality of bits indicates that there is a corresponding type of extension header in the first message.
6. The method of any of claims 1-5, wherein the type of the extension header comprises at least one of a route type, a fragment type, an authentication header type, a package security payload type, a hop-by-hop option type, a destination option type.
7. The method according to any one of claims 1 to 6, wherein the first message further comprises second indication information, the second indication information being used to indicate that the first message has the at least one extension header.
8. The method according to any one of claims 1 to 7, wherein the first message is encapsulated in a bitmap offset value BOV, the first message includes a base header and the at least one extension header, the base header includes a bitmap, a time-to-live TTL field of the first message, a source address field and a destination address field of the first message, the bitmap includes third indication information, the first indication information, and an extension indication bit, the third indication information is used to indicate that the TTL field, the source address field, and the destination address field exist in the first message, and the extension indication bit is used to determine a length of the bitmap.
9. A method for processing a message, the method comprising:
generating a first message, wherein a header of the first message comprises first indication information, at least one extension header and user data, the first indication information is used for indicating the type of the at least one extension header, and the type is related to a function realized by communication equipment in a path for transmitting the user data;
and sending the first message to the second communication equipment.
10. The method according to claim 9, wherein the method further comprises:
receiving Internet Control Message Protocol (ICMP) information sent by the second network equipment, wherein the ICMP information is used for indicating that the second network equipment cannot forward the first message;
and fragmenting the first message and sending the fragmented first message to the second network equipment.
11. The method according to claim 9 or 10, wherein the first message comprises at least two extension headers, and the first indication information is used to indicate the type of the at least two extension headers and the positions of the at least two extension headers in the first message.
12. The method of claim 11, wherein the first indication information comprises a plurality of bits, each bit of the plurality of bits being used to indicate whether a corresponding type of extension header is present in the first message; the first indication information is used for indicating that the mapping relation exists between the sequence of each bit of the extension header of the corresponding type and the position sequence of the at least two extension headers in the first message.
13. The method of claim 12, wherein a bit of 1 in the plurality of bits indicates that there is a corresponding type of extension header in the first message.
14. The method of any of claims 9 to 13, wherein the type of the extension header comprises at least one of a route type, a fragment type, an authentication header type, a package security payload type, a hop-by-hop option type, a destination option type.
15. The method according to any one of claims 9 to 14, wherein the first message further comprises second indication information, the second indication information being used to indicate that the first message has the at least one extension header.
16. The method according to any one of claims 9 to 15, wherein the first message is encapsulated in a bitmap offset value BOV, the first message includes a base header and the at least one extension header, the base header includes a bitmap, a time-to-live TTL field of the first message, a source address field and a destination address field of the first message, the bitmap includes third indication information, the first indication information, and an extension indication bit, the third indication information is used to indicate that the TTL field, the source address field, and the destination address field exist in the first message, and the extension indication bit is used to determine a length of the bitmap.
17. A second communication device, the second communication device comprising:
a receiving unit, configured to receive a first packet sent by a first communication device, where the first packet includes first indication information, at least one extension header, and user data, where the first indication information is used to indicate a type of the at least one extension header, where the type is related to a function implemented by the communication device in a path for transmitting the user data;
and the determining unit is used for determining whether an extension header to be processed by the second communication device exists in the at least one extension header based on the first indication information.
18. The device of claim 17, wherein the extension header to be processed is present in the extension header, the second communication device further comprising:
and the execution unit is used for executing the operation corresponding to the target type based on the expansion head to be processed, wherein the target type is the type of the expansion head to be processed.
19. A first communication device, the first communication device comprising:
a generating unit, configured to generate a first packet, where a header of the first packet includes first indication information, at least one extension header, and user data, where the first indication information is used to indicate a type of the at least one extension header, where the type is related to a function implemented by a communication device in a path for transmitting the user data;
And the sending unit is used for sending the first message to the second communication equipment.
20. The device of claim 19, wherein the first communication device further comprises:
a receiving unit, configured to receive ICMP information sent by the second network device, where the ICMP information is used to indicate that the second network device cannot forward the first packet;
the slicing unit is used for slicing the first message and sending the sliced first message to the second network equipment.
21. A second communication device, comprising: a processor coupled to a memory for storing a program or instructions that, when executed by the processor, cause the second communication device to perform the method of any of claims 1 to 8.
22. A first communication device, comprising: a processor coupled to a memory for storing a program or instructions that, when executed by the processor, cause the first communication device to perform the method of any of claims 9 to 16.
23. A communication system comprising a second communication device according to claim 21 and/or a first communication device according to claim 22.
24. A computer storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1 to 8.
25. A computer program product, characterized in that the computer program product, when run on a computer, causes the computer to perform the method of any of claims 9 to 16.
CN202111640062.5A 2021-12-29 2021-12-29 Message processing method and related equipment Pending CN116418763A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111640062.5A CN116418763A (en) 2021-12-29 2021-12-29 Message processing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111640062.5A CN116418763A (en) 2021-12-29 2021-12-29 Message processing method and related equipment

Publications (1)

Publication Number Publication Date
CN116418763A true CN116418763A (en) 2023-07-11

Family

ID=87056471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111640062.5A Pending CN116418763A (en) 2021-12-29 2021-12-29 Message processing method and related equipment

Country Status (1)

Country Link
CN (1) CN116418763A (en)

Similar Documents

Publication Publication Date Title
US7899048B1 (en) Method and apparatus for remotely monitoring network traffic through a generic network
CN107079017B (en) Message conversion method and device
CN113709057A (en) Network congestion notification method, proxy node, network node and computer equipment
CN109450875B (en) MAC layer packaging method and device
CN106559302A (en) Single tunnel method for building up, device and system
US20220255772A1 (en) Packet sending method, apparatus, and system
WO2022022229A1 (en) Method and device for processing message
EP3813318B1 (en) Packet transmission method, communication device, and system
WO2021088813A1 (en) Packet encapsulating method and apparatus, and packet decapsulating method and apparatus
CN106713183B (en) Interface board of network equipment, network equipment and message forwarding method
KR101558833B1 (en) Techniques for forwarding or receiving data segments associated with a large data packet
CN104579973B (en) Message forwarding method and device in a kind of Virtual Cluster
US20240073128A1 (en) Message encapsulation and de-encapsulation method and device, storage medium, and electronic device
CN113287285A (en) Data transmission method and device
CN109495366A (en) A kind of VXLAN message processing method, device and storage medium
CN116418763A (en) Message processing method and related equipment
CN106789440B (en) IP packet header detection method and device
CN116095197A (en) Data transmission method and related device
KR20230022251A (en) BIER OAM detection method, device, and system
CN106850386B (en) Message processing method and device
CN113497767A (en) Method and device for transmitting data, computing equipment and storage medium
CN110601948B (en) Network bandwidth superposition method and device and gateway equipment
WO2023078144A1 (en) Message processing method, apparatus and system
CN108881071B (en) Data packet transmission method and device storage medium under Ethernet content-centric networking mixing
CN117768970A (en) Method and device for transmitting data packet

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination