CN115842876A - Method, system, device and storage medium for processing message - Google Patents

Method, system, device and storage medium for processing message Download PDF

Info

Publication number
CN115842876A
CN115842876A CN202111467765.2A CN202111467765A CN115842876A CN 115842876 A CN115842876 A CN 115842876A CN 202111467765 A CN202111467765 A CN 202111467765A CN 115842876 A CN115842876 A CN 115842876A
Authority
CN
China
Prior art keywords
message
stream
information
instance
stream instance
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
CN202111467765.2A
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 PCT/CN2022/118234 priority Critical patent/WO2023040782A1/en
Publication of CN115842876A publication Critical patent/CN115842876A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The application provides a method, a system, equipment and a storage medium for processing messages, belonging to the technical field of networks. The method comprises the following steps: the method comprises the steps of obtaining a first message, wherein the first message comprises data transmitted by a stream instance based on a QUIC protocol, obtaining mark information corresponding to the stream instance, adding the mark information to the first message, obtaining a second message, and sending the second message, wherein the mark information is used for processing the second message by forwarding equipment receiving the second message based on the mark information. By the method and the device, the mark information is added in the first message and used for indicating the stream instance, so that the device for forwarding the first message can distinguish the stream instance based on the mark information.

Description

Method, system, device and storage medium for processing message
The present application claims priority from chinese patent application No. 202111112961.8 entitled "a method of explicitly identifying a QUIC stream" filed on 18/09/2021, the entire contents of which are incorporated herein by reference.
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a method, a system, a device, and a storage medium for processing a packet.
Background
The QUIC is a secure transport protocol based on a User Datagram Protocol (UDP), operates on the UDP, and is highly integrated with a Transport Layer Security (TLS) 1.3, and provides functions such as reliability and congestion control similar to a Transmission Control Protocol (TCP).
In the data transmission process based on the QUIC, all the QUIC messages are transmitted after being encrypted for safety, and forwarding devices on a data transmission path cannot distinguish stream (stream) examples in a QUIC protocol.
Disclosure of Invention
The application provides a method, a system, equipment and a storage medium for processing messages, so that forwarding equipment on a transmission path distinguishes stream instances in a QUIC protocol.
In a first aspect, the present application provides a method for processing a packet, which is applied to a first device, and the method includes: acquiring a first message, wherein the first message comprises data transmitted by a stream instance based on a QUIC protocol; obtaining mark information corresponding to the stream instance; adding mark information to the first message to obtain a second message; and sending a second message, wherein the marking information is used for processing the second message by the forwarding equipment receiving the second message based on the marking information.
According to the scheme, the first message is acquired, the first message comprises data transmitted by a stream instance based on a QUIC protocol, and the mark information of the stream instance is determined. And adding the marking information to the first message to obtain a second message, and sending the second message to enable the forwarding equipment receiving the second message to process the second message based on the marking information. Therefore, the forwarding device receiving the message can identify the mark information corresponding to the stream instance, so that the stream instance can be distinguished, and the message can be correspondingly processed based on the stream instance.
In one possible implementation, the flag information is used to mark the stream instance within a QUIC connection, or the flag information is used to mark the type of the stream instance within the QUIC connection, the stream instance belonging to the stream instance marked by the flag information. Thus, within a single QUIC connection, each piece of tag information indicates one stream instance, or each piece of tag information indicates a class of stream instances.
In a possible implementation manner, the adding the tag information to the first packet includes: the tag information is added to a first field of a first outer layer header of the first packet.
According to the scheme, the first message currently has a first outer layer message header, and a first field of the first outer layer message header is modified, so that the first field includes the mark information of the stream instance, or the first message does not currently have the first outer layer message header, the first outer layer message header is packaged for the first message, and the first field includes the mark information of the stream instance. In this way, the tag information may be carried in the outer layer header in a variety of ways.
In a possible implementation manner, the first outer layer header is an internet protocol version6 (IPv 6) header, and the first field is a flow label (flow label) field; or, the first outer layer header is an internet protocol version 4 (ipv 4) header, and the first field is an option field.
In one possible implementation, obtaining the tag information corresponding to the stream instance includes: the mark information of the stream instance is obtained, and the mark information of the stream instance comprises the relevant information of the stream instance. Thus, the flag information corresponding to the stream can be obtained using the information related to the stream instance.
In one possible implementation manner, the obtaining the flag information corresponding to the stream instance includes: the flag information is generated based on the information about the stream instance and a random algorithm. In this way, the tag information may be generated using a random algorithm.
In one possible implementation, the related information of the stream instance includes at least one of the following: the type of the data, the characteristic information of the stream instance, the path (path) identification associated with the stream instance, and the index information of the stream instance, which is used to indicate the stream instance within the QUIC connection.
In a possible implementation manner, the generating the tag information according to the related information of the stream instance and the random algorithm includes: generating the mark information according to the identification of the stream instance and the random algorithm; or, generating the tag information according to the identifier of the stream instance, the source address and the destination address of the first message, and the random algorithm; or, the mark information is generated according to the identification of the stream instance, the quintuple information of the first message and the random algorithm. Thus, the flag information of the stream instance can be obtained in various ways.
In one possible implementation, the stream instances are bidirectional stream instances; the obtaining of the mark information corresponding to the stream instance comprises the following steps: acquiring a third message transmitted based on the stream instance, wherein the third message is transmitted along a first direction, the second message is transmitted along a second direction, and the first direction is opposite to the second direction; and acquiring the mark information from the outer layer message header of the third message.
According to the scheme, under the condition that the stream instance is a bidirectional stream instance, the mark information of the stream instance can be acquired in the outer layer message header of the received message, and therefore the mark information does not need to be determined repeatedly.
In a possible implementation manner, the first message includes a QUIC message encapsulated with a header of the second outer layer message; the obtaining of the flag information corresponding to the stream instance includes: acquiring the content of a second field of the second outer layer message header, wherein the content of the second field is used for marking the stream instance; and obtaining the mark information of the stream instance according to the content of the second field.
According to the scheme, under the condition that the first message comprises the QUIC message packaged with the second outer layer message header, the content of the second field can be obtained in the second outer layer message header, and the mark information of the stream instance can be determined by using the content of the second field. In this way, the forwarding device on the forwarding path can also obtain the tag information of the stream instance based on the content of the second field.
In one possible implementation, the flag information includes related information of the stream instance, the related information including at least one of: the type of the data, the characteristic information of the stream instance, the path identification associated with the stream instance, and the index information of the stream instance, which is used to indicate the stream instance within the QUIC connection.
In a possible implementation manner, the obtaining the first packet includes: generating the first message, wherein the first message is a QUIC message based on a QUIC protocol; or receiving a first message, wherein the first message comprises a QUIC message encapsulated with a third outer layer message header.
According to the scheme, the host can generate the first message, or the device on the forwarding path can receive the first message.
In one possible implementation, the first device is a host or a network device.
In one possible implementation, the first device is a network leaf node, and the network leaf node is connected to a network spine node.
In one possible implementation, obtaining the tag information corresponding to the stream instance includes: based on the type of the data, the flag information of the stream instance is determined.
According to the scheme, when the mark information corresponding to the stream instance is determined, the type of data transmitted by the stream instance can be used, so that the mark information corresponding to the stream instance can be determined more flexibly.
In a second aspect, the present application provides a method for processing a packet, which is applied to a second device, and the method includes:
acquiring a message, wherein the message comprises data transmitted by a stream instance based on a QUIC protocol, and an outer layer message header of the message comprises mark information corresponding to the stream instance; and processing the message based on the marking information. Therefore, after the message is acquired, the mark information corresponding to the stream instance can be acquired in the outer layer message header. The stream instances are distinguished using the flag information, and the stream instances can be processed accordingly.
In a possible implementation manner, the processing the packet based on the tag information includes: and forwarding the message based on the marking information and the destination address in the outer layer message header. Thus, the flag information of the stream instance can be used to distinguish the stream instances, so that the stream instances can be accurately processed based on the flag information.
In a possible implementation manner, the processing the packet based on the tag information includes: performing hash calculation according to the marking information to obtain a hash value; determining a forwarding path for forwarding the message in a plurality of equivalent forwarding paths based on the hash value; and forwarding the message according to the determined forwarding path. Thus, load balance can be realized when the message is forwarded.
In one possible implementation, the flag information is used to mark the stream instance within a QUIC connection, or the flag information is used to mark the type of the stream instance within the QUIC connection, the stream instance belonging to the stream instance marked by the flag information.
In one possible implementation, the tag information is included in a field of an outer header of the packet; wherein, the outer layer message header is an IPv6 header, and the field is a flow label field; or, the outer layer message header is an IPv4 header, and the field is an option field.
In one possible implementation, the flag information includes related information of the stream instance, the related information including at least one of: the type of the data, the characteristic information of the stream instance, the path identification associated with the stream instance, and the index information of the stream instance, which is used to indicate the stream instance within the QUIC connection.
In one possible implementation, the second device is a host or a network device.
In one possible implementation, the second device is a network leaf node or a network spine node.
In a third aspect, the present application provides an apparatus for processing a packet, where the apparatus is applied to a first device, and the apparatus includes: the device comprises an acquisition module, a processing module and a sending module, wherein the acquisition module is used for acquiring a first message, and the first message comprises data transmitted by a stream instance based on a QUIC protocol; the determining module is used for obtaining mark information corresponding to the stream instance; the adding module is used for adding the marking information to the first message to obtain a second message; and a sending module, configured to send the second packet, where the tag information is used for a forwarding device that receives the second packet to process the second packet based on the tag information.
In a possible implementation, said flag information is used to mark said stream instances within a QUIC connection, or said flag information is used to mark the type of said stream instances within said QUIC connection, said stream instances belonging to the stream instances marked by said flag information.
In a possible implementation manner, the adding module is configured to:
and adding the marking information in a first field of a first outer layer message header of the first message.
In a possible implementation manner, the first outer layer packet header is an IPv6 header, and the first field is a flow label field; alternatively, the first and second electrodes may be,
the first outer layer message header is an IPv4 header, and the first field is an option field.
In one possible implementation manner, the determining module is configured to:
and obtaining the mark information of the stream instance, wherein the mark information of the stream instance comprises the related information of the stream instance.
In one possible implementation manner, the determining module is configured to:
and generating the mark information according to the related information of the stream instance and a random algorithm.
In one possible implementation, the related information includes at least one of: the type of the data, the characteristic information of the stream instance, the path identification associated with the stream instance and the index information of the stream instance, wherein the index information of the stream instance is used for indicating the stream instance in the QUIC connection.
In one possible implementation manner, the determining module is configured to:
generating the mark information according to the identification of the stream instance and the random algorithm; alternatively, the first and second electrodes may be,
generating the mark information according to the identification of the stream instance, the source address and the destination address of the first message and the random algorithm; alternatively, the first and second electrodes may be,
and generating the mark information according to the identification of the stream instance, the quintuple information of the first message and the random algorithm.
In one possible implementation, the stream instances are bidirectional stream instances; the determining module is configured to:
acquiring a third message transmitted based on the stream instance, wherein the third message is transmitted along a first direction, the second message is transmitted along a second direction, and the first direction is opposite to the second direction;
and acquiring the marking information in an outer layer message header of the third message.
In a possible implementation manner, the first message includes a QUIC message encapsulated with a header of a second outer layer message;
the determining module is configured to:
acquiring the content of a second field of the second outer layer message header, wherein the content of the second field is used for marking the stream instance;
and obtaining the mark information of the stream instance according to the content of the second field.
In one possible implementation manner, the flag information includes related information of the stream instance, and the related information includes at least one of the following: the type of the data, the characteristic information of the stream instance, the path identification associated with the stream instance and the index information of the stream instance, wherein the index information of the stream instance is used for indicating the stream instance in the QUIC connection.
In a possible implementation manner, the obtaining module is configured to generate the first packet, where the first packet is a QUIC packet based on a QUIC protocol; alternatively, the first and second electrodes may be,
and receiving a first message, wherein the first message comprises a QUIC message encapsulated with a third outer layer message header.
In one possible implementation, the first device is a host or a network device.
In one possible implementation, the first device is a network leaf node, and the network leaf node is connected to a network spine node.
In a fourth aspect, the present application provides an apparatus for processing a packet, where the apparatus is applied to a second device, and the apparatus includes: the message acquisition module is used for acquiring a message, wherein the message comprises data transmitted by a stream instance based on a QUIC protocol, and an outer layer message header of the message comprises mark information corresponding to the stream instance; and the processing module is used for processing the message based on the marking information.
In one possible implementation manner, the processing module is configured to:
and forwarding the message based on the marking information and the destination address in the outer layer message header.
In one possible implementation manner, the processing module is configured to:
performing hash calculation according to the marking information to obtain a hash value;
determining a forwarding path for forwarding the message in a plurality of equivalent forwarding paths based on the hash value;
and forwarding the message according to the determined forwarding path.
In a possible implementation, said flag information is used to mark said stream instances within a QUIC connection, or said flag information is used to mark the type of said stream instances within said QUIC connection, said stream instances belonging to the stream instances marked by said flag information.
In a possible implementation manner, the marking information is included in a field of an outer layer header of the message; wherein the content of the first and second substances,
the outer layer message header is an IPv6 header, and the field is a flow label field; alternatively, the first and second electrodes may be,
the outer layer message header is an IPv4 header, and the field is an option field.
In one possible implementation manner, the flag information includes related information of the stream instance, and the related information includes at least one of the following: the type of the data, the characteristic information of the stream instances, the path identification associated with the stream instances and the index information of the stream instances, and the index information of the stream instances is used for indicating the stream instances in QUIC connection.
In one possible implementation, the second device is a host or a network device.
In one possible implementation, the second device is a network leaf node or a network spine node.
In a fifth aspect, the present application provides a communication device, where the device includes a processor and a memory, where the memory stores at least one computer instruction, and the computer instruction is loaded by the processor and executed to implement the method for processing a packet provided in the first aspect or any one of the optional manners of the first aspect.
In a sixth aspect, the present application provides a computer-readable storage medium, where at least one computer instruction is stored, and the computer instruction is loaded and executed by a processor of a communication device to implement the method for processing a packet provided in the first aspect or any one of the optional manners of the first aspect.
In a seventh aspect, the present application provides a communication device, where the device includes a processor and a memory, where the memory stores at least one computer instruction, and the computer instruction is loaded and executed by the processor to implement the method for processing a packet provided in the second aspect or any optional manner of the second aspect.
In an eighth aspect, the present application provides a computer-readable storage medium, where at least one computer instruction is stored in the storage medium, and the computer instruction is loaded and executed by a processor of a communication device to implement the method for processing a packet provided in the second aspect or any optional manner of the second aspect.
In a ninth aspect, the present application provides a system for processing a packet, where the system includes a first device and a second device, where the first device is configured to: acquiring a first message, wherein the first message comprises data transmitted by a stream instance based on a QUIC protocol; obtaining mark information corresponding to the stream instance; adding the marking information to the first message to obtain a second message, wherein an outer layer message header of the second message comprises the marking information; sending the second message; the second device is for: acquiring the second message; and processing the second message based on the marking information.
In a tenth aspect, the present application provides a system for processing a packet, where the system includes a first device and a second device, where the first device is configured to implement the method for processing a packet provided in the first aspect or any optional manner of the first aspect;
the second device is configured to implement the method for processing a packet provided by the second aspect or any optional manner of the second aspect.
In an eleventh aspect, the present application provides a computer program product, where the computer program product includes at least one computer instruction, and when the computer program product is run on a first device, the device is caused to implement the method for processing a packet provided in the first aspect or any one of the optional manners of the first aspect.
In a twelfth aspect, the present application provides a computer program product, where the computer program product includes at least one computer instruction, and when the computer program product runs on a second device, the device is enabled to implement the method for processing a message provided in the second aspect or any optional manner of the second aspect.
In a thirteenth aspect, the present application provides a chip comprising a processor for calling up and executing instructions stored in a memory from the memory, so that a communication device in which the chip is installed performs the method in the above aspects.
In a fourteenth aspect, the present application provides another chip, comprising: the system comprises an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method in the aspects.
Drawings
FIG. 1 is a schematic diagram of a QUIC protocol stack format provided by an embodiment of the present application;
fig. 2 is a schematic view of a multipath scenario provided in an embodiment of the present application;
fig. 3 is a schematic diagram of an implementation architecture of multipath according to an embodiment of the present application;
fig. 4 is a schematic diagram of a format of an IPv6 header provided in an embodiment of the present application;
fig. 5 is a schematic diagram of network transmission of data according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of an apparatus provided in an embodiment of the present application;
FIG. 7 is a schematic structural diagram of an apparatus provided in an embodiment of the present application;
fig. 8 is a flowchart illustrating a method for processing a packet according to an embodiment of the present application;
fig. 9 is a flowchart illustrating a method for processing a packet according to an embodiment of the present application;
fig. 10 is a flowchart illustrating a method for processing a packet according to an embodiment of the present application;
fig. 11 is a flowchart illustrating a method for processing a packet according to an embodiment of the present application;
fig. 12 is a flowchart illustrating a method for processing a packet according to an embodiment of the present application;
fig. 13 is a flowchart illustrating a method for processing a packet according to an embodiment of the present application;
fig. 14 is a schematic diagram of load balancing provided in an embodiment of the present application;
FIG. 15 is a schematic diagram of load balancing provided in an embodiment of the present application;
fig. 16 is a schematic structural diagram of an apparatus for processing a packet according to an embodiment of the present application;
fig. 17 is a schematic structural diagram of an apparatus for processing a packet according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Some concepts of terms related to the embodiments of the present application are explained below.
(1)QUIC
QUIC is a UDP-based reliable secure transport protocol. QUIC this term was originally abbreviated by GOOGLE to fast UDP network Connections (Quick UDP Internet Connections), also known as gQUIC. However, when the Internet Engineering Task Force (IETF) is standardized, this abbreviation is no longer used, and QUIC is considered as a name and not an acronym (QUIC a name), and the specific explanation can be found in request for comments (RFC) 9000. It is understood that the method provided in the embodiments of the present application can be applied to gQUIC and also to IETF-standardized QUIC, i.e., the QUIC referred to in the embodiments of the present application can be gQUIC or IETF-standardized QUIC.
Fig. 1 shows the protocol stack of the QUIC, which runs on top of UDP, highly integrated with TLS1.3, providing similar functions of reliability, congestion control, etc. as TCP. On the left side of fig. 1, there is a conventional hypertext transfer protocol (HTTP) protocol stack, which is an application (HTTP/1.1, HTTP/2 or Border Gateway Protocol (BGP), in sequence from top to bottom. On the right side of fig. 1 is the protocol stack of the QUIC protocol, from top to bottom in sequence application, QUIC, UDP and IP, application being HTTP/3 or BGP, where TLS1.3 is integrated in the QUIC.
In addition to providing reliability, congestion control, etc. functions similar to TCP, QUIC provides some enhanced functions as follows:
a) Stream multiplexing refers to the possibility of transmitting multiple byte streams, each called a stream (stream), simultaneously in a single QUIC connection (connection). Where the QUIC connection is used to establish the shared state required for data transfer between the two entities. For example, the security context required for data transmission (such as identity authentication, confidentiality protection and integrity protection) is provided, and the security context may also be referred to as connection information. stream is used to provide data transfer services in the secure context provided by the QUIC connection.
b) A path (path) refers to a transmission route between a client and a server, and is uniquely identified by five-tuple information, where the five-tuple information includes a source address, a destination address, a source port, a destination port, and a protocol, and the address here may be an IP address. For QUIC, the protocol in the quintuple information is designated UDP.
The connection identifiers (connection IDs) are used for unique identification of the QUIC connections, the IDs are called identities in English, and the connection identifiers of the QUIC connections are different. The connection IDs of different QUIC connections are not the same. Within a QUIC connection, each stream is uniquely identified using a stream identification. The stream identification is 64 bits (bit) in length, and the lowest 2 bits identify the type of the stream. For simplicity, it can be said that a stream identification contains two parts, i.e., the type of stream (the lowest 2 bits) and the index (index) of stream (the remaining 62 bits), which means that each connection can create 4 different types of streams, the 4 different types of streams being respectively a bidirectional stream type created by the client, a bidirectional stream type created by the server, a unidirectional stream type created by the client, and a unidirectional stream type created by the server. Stre that can be created for each type of streamam is 2 in number 62 -1, each stream can independently provide data transmission services for one application.
A stream corresponds to a stream instance, which is a distributed entity and is distributed at both the client and the server, and the stream instance is uniquely identified by a (connection ID, stream ID) in the global scope, and the stream ID is uniquely identified by a stream ID in the connection scope. stream instances are used to transport an ordered stream of bytes. Each stream instance is similar to a node in a stream data structure, which is an internal data structure that specifies connection instances, which are also distributed entities of the QUIC connection, both at the client and at the server. When a stream instance is created, a node is added to the data structure, and when a stream instance is deleted, the node corresponding to the stream instance is deleted from the data structure. On the node corresponding to the stream instance, the connection ID, the stream type, the stream identifier, the receiving buffer, the transmitting buffer, the running state and other data of the connection instance are maintained. Subsequently, the stream identification of a stream instance can also be referred to simply as the identification of a stream instance.
Stream in this application is different from normal stream (flow). A stream in this application is a stream of bytes within a QUIC connection, identified with a stream ID, whereas a normal flow is mainly for the forwarding plane. Different flows may use different five-tuple information identifiers including a source address, a destination address, a protocol, a source port, and a destination port, and different triple information identifiers including a source address, a destination address, and a protocol.
Different flows at the forwarding level may be output from different ports when forwarded. For example, the forwarding device outputs the flow identified by the first quintuple information from the first port of the forwarding device and outputs the flow identified by the second quintuple information from the second port of the forwarding device.
In a QUIC, there are single-active paths (multi-active paths) and multi-active paths (multi-active paths) that can also be considered as QUIC multi-active paths, which can also be referred to simply as multipaths (multi-paths). A single live path means that only one path is allowed to transmit data at any time in one QUIC connection. The multi-active path means that in one QUIC connection, data can be transmitted on a plurality of paths at one time, and the multi-active path can more fully utilize network resources to obtain better transmission performance. For example, fig. 2 shows a multi-path scenario diagram, in which a User Equipment (UE) simultaneously accesses a mobile network and a cellular network (cellular network), the mobile network includes a fourth generation communication technology (4 g) or a fifth generation communication technology (5 g), and the cellular network includes a wireless-fidelity (WIFI) network. The method comprises the steps that a client of UE accesses a server by using different IP addresses under a mobile network and WIFI, quintuple information of the UE accessing the server under the mobile network is (1.1.1.1, xx, UDP,3.3.3.3, zz), quintuple information of the UE accessing the server under the WIFI is (2.2.2.2, yy, UDP, 3.3.3.3.3, zz), wherein 1.1.1.1.1 and 2.2.2.2 are IP addresses of the UE, 3.3.3.3 is an IP address of the server, xx and yy are UDP ports of the client, and zz is a UDP port of the server. Thus, using multipath, data can be transmitted simultaneously and in parallel over multiple paths by establishing only one QUIC connection between the client and the server.
In the QUIC, stream is responsible for data transmission, path is a data transmission path, and the transmission of stream data is realized by associating the data transmitted by the stream with the path. Alternatively, in the QUIC, the transmission of data can be realized by associating the data of a stream with a path by a multi-path scheduler. Fig. 3 shows a schematic diagram of an implementation architecture of multipath. As shown in fig. 3, 3 streams transmit data of an application to the multi-path scheduler, and the multi-path scheduler schedules the data transmitted by the 3 streams to two paths for transmission.
Illustratively, the way in which the multi-path scheduler associates data transmitted by a stream with a path includes the following:
traffic grooming (traffic grooming) for a multi-path scheduler to associate a stream with a path according to a policy when creating a new stream. For example, between stream and path is 1, P:1 or P: and Q, P and Q are positive integers larger than 1, and N is between stream and path: in the mapping relation of M, the multi-path scheduler can select a path with a smaller load to transmit stream data by using the current load condition of the path.
And service switching (traffic switching) is used for realizing load balancing of each path. For example, during the running of the QUIC, if the load or delay of a certain path changes, the multi-path scheduler can adjust the data of the stream associated with the path to other paths to realize the load balance of each path.
Traffic splitting (traffic splitting) is used to split a large amount of data to be sent to multiple paths. For example, a stream has a relatively large amount of data and requires relatively high transmission performance, and a plurality of paths can be used to simultaneously transmit the data of the stream, that is, the ratio of stream to path is 1: and P.
Note that the above is only one scheme for associating stream data with a path, and the present embodiment does not limit this scheme.
(2) Encapsulation format of QUIC message
The QUIC message comprises a Header (Header) and a payload (payload) part, wherein the Header of the QUIC message comprises a long Header (long Header) format and a short Header (short Header) format which are distinguished by the highest bit of the first valid byte. The Header part field of the QUIC message is encrypted, and the entire payload content of the QUIC message is encrypted.
During data transmission, the QUIC encapsulates application data (application data) by using a STREAM frame, and in one QUIC connection, one STREAM is uniquely identified by using a STREAM identifier, and the STREAM identifier is also encapsulated in the STREAM frame.
QUIC defines a variety of message types, including initial 0-round-trip time (RTT) and handshake 1-RTT, etc. Messages of the initial 0-RTT and 1-RTT handshake message types are allowed to carry STREAM frames. The STREAM frame is located in the payload section of the 0-RTT and 1-RTT messages.
It should be noted that the application data may be encapsulated using other QUIC frame types besides STREAM frames. For example, the functionality of QUIC to provide unreliable transport services (e.g., for transporting real-time video streams) is defined in the IETF draft Datagram 2 (draft-IETF-quick-DATAGRAM-02) for QUIC, where DATAGRAM (DATAGRAM) frames are used to encapsulate application data. Whether the QUIC message comprises a STREAM frame or a frame in other formats, the QUIC message is transmitted after being encrypted.
(3)IPv6 flow label
Fig. 4 shows the format of the IPv6 header of the IPv6 packet. As shown in fig. 4, the flow label is a field in the IPv6 header, and has a length of 20 bits. The flow label is not protected by checksum (checksum) security protocol, so that any modification in the forwarding process of the flow label plaintext transmission is not detected.
Generally, an IPv6 flow is identified by using quintuple information of a packet, but in a scenario such as packet fragmentation, not every IPv6 packet contains complete quintuple information. In order to identify the IPv6 flow under the condition that the quintuple information cannot be directly acquired, a flow label appears, and the flow label is used for identifying an IPv6 flow.
There are several basic application specifications for flow label:
(a) When the flow label value is 0, it indicates that the flow label-related function is not supported. If the forwarding device receives the IPv6 packet with the flow label value of 0, the forwarding device may set a nonzero value according to actual needs.
(b) An IPv6 flow may be uniquely identified using a flow label, source address and destination address.
(c) For an IPv6 flow, if a flow label is set, then the flow label is kept unchanged for the specified session.
(d) Once set to a non-zero value, the forwarding device prohibits modifying its value, but the firewall may modify the value of the flow label for security reasons.
Next, a procedure of transmitting the QUIC message in the related art is described.
In the data transmission process based on the QUIC protocol, due to the safety consideration, the QUIC messages are transmitted after being encrypted, and forwarding devices on a data transmission path cannot distinguish stream examples in the QUIC messages, so that certain strategy processing cannot be performed based on different stream examples. For example, the policy processing is load sharing, and with the STREAM multiplexing mechanism of the QUIC, the source host 1 sends data to the destination host 2 by using two STREAM instances (STREAM instance 1 and STREAM instance 2) at the same time, an equal-cost multi-path (ECMP) exists in the network between the source host 1 and the destination host 2, STREAM instances 1 and 2 are used for encapsulating STREAM frames of application data and are transmitted in an encrypted manner, and a forwarding device in the network cannot identify a STREAM instance and cannot perform load sharing based on a STREAM instance during forwarding of a QUIC message. As shown in fig. 5, a plurality of ECMPs exist in a network between a source host 1 and a destination host 2, and load sharing is generally performed based on quintuple information only, and since a packet corresponding to a stream instance 1 and a packet of a stream instance 2 have the same quintuple information, the two stream instances always select the same forwarding path (provider edge device (PE) 1- > provider device (provider, P) 1- > P3- > PE 2), see a dotted line in fig. 5.
In the embodiment of the application, the content capable of identifying the stream instance is mapped to the specified position of the message, and the forwarding device in the network can read the content at the specified position, so that the forwarding device can realize the processing strategy based on the stream instance. The forwarding device may also be referred to as a network device in the network, such as a router or a switch.
The execution subject of the embodiment of the present application is described next.
The execution main body of the embodiment of the application may be a device for processing a message. Optionally, the device for processing the packet is a hardware device, where the hardware device is a first device or a second device, the first device is a host, a mobile terminal, a server, a network device in a network, and the like, and the first device may also be a leaf node or a spine node, and the leaf node is connected to the spine node. The second device is a host, a mobile terminal, a server, and a network device in a network, and the second device may also be a network leaf node or a network spine node, where the network leaf node is connected to the network spine node, and the like. The network device here may be a switch or a router etc. in the network. Optionally, the device for processing the message is a software device, such as a set of software programs running on a hardware device.
Illustratively, the device for processing the message may be a device for generating the message or a device for forwarding the message. For example, the device for processing the message is a host, after the host generates the QUIC message, the host determines the mark information of the stream instance, adds the mark information to the flow label of the IPv6 header, and the device for processing the message is the device for generating the message. For another example, the device for processing the message is a forwarding device for forwarding the message in the network, the forwarding device is an end point device at the entry end of the tunnel, after the forwarding device receives the QUIC message encapsulated with the IP header, the forwarding device adds the flag information of the stream instance to the tunnel header, and the device for processing the message is the device for forwarding the message.
When the device for processing the packet is a hardware device, fig. 6 shows a schematic structural diagram of the device. The device 600 comprises at least one processor 601, a communication bus 602, a memory 603, and at least one network interface 604.
The processor 601 is, for example, a Central Processing Unit (CPU), a Network Processor (NP), a Graphics Processing Unit (GPU), a neural-Network Processing Unit (NPU), a Data Processing Unit (DPU), a microprocessor, or one or more integrated circuits for implementing the present disclosure. For example, the processor 601 includes an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. PLDs are, for example, complex Programmable Logic Devices (CPLDs), field-programmable gate arrays (FPGAs), general Array Logic (GAL), or any combination thereof.
A communication bus 602 is used to transfer information between the above components. The communication bus 602 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
Memory 603 is, for example, but not limited to, a read-only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only Memory (EEPROM), a compact disc read-only Memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 603 is, for example, separate and connected to the processor 601 via a communication bus 602. The memory 603 may also be integrated with the processor 601.
Optionally, the memory 603 is used to hold transferred data and the like.
The network interface 604 uses any transceiver or the like for communicating with other devices or a communication network. The network interface 604 includes a wired network interface and may also include a wireless network interface. The wired network interface may be, for example, an ethernet interface. The ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless network interface may be a Wireless Local Area Network (WLAN) interface, a network interface of a cellular network, or a combination thereof.
In particular implementations, processor 601 may include one or more CPUs, as one example.
In particular implementations, device 600 may include multiple processors, as one example. Each of these processors may be a single-Core Processor (CPU) or a multi-Core Processor (CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In particular implementations, device 600 may also include an output device and an input device, as one example. An output device is in communication with the processor 601 and may display information in a variety of ways. For example, the output device may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, a projector (projector), or the like. The input device is in communication with the processor 601 for receiving user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
In some embodiments, memory 603 is used to store program code 6031 for performing the processing of messages in the present application, and processor 601 executes program code 6031 stored in memory 603. That is, the apparatus 600 may implement the method for processing a packet according to the method embodiment through the processor 601 and the program code 6031 in the memory 603.
When the apparatus for processing a packet is a hardware device, fig. 7 shows another schematic structural diagram of the device. Device 700 includes a master control board 710 and an interface board 720.
The main control board 710 is also called a Main Processing Unit (MPU) or a route processor card (route processor card), and the main control board 710 is used for controlling and managing various components in the device 700, including routing computation, device management, device maintenance, and protocol processing functions. The main control board 710 includes: a first central processor 711 and a memory 712.
The interface board 720 is also referred to as a Line Processing Unit (LPU), a line card (line card), or a service board. The interface board 720 is used for providing various service interfaces and forwarding data packets. The service interface includes, but is not limited to, an ethernet interface, such as flexible ethernet services interfaces (FlexE clients), a POS (packet over son/SDH) interface, and the like. The interface board 720 includes: a second central processor 721, a network processor 722, a forwarding table entry memory 724, and a Physical Interface Card (PIC) 723.
The second central processor 721 is used for controlling and managing the interface board 720 and communicating with the first central processor 711.
The network processor 722 is configured to implement forwarding processing of the packet. The network processor 722 is in the form of, for example, a forwarding chip. Specifically, the network processor 722 is configured to forward the received message based on the forwarding table stored in the forwarding table entry memory 724, and if the destination address of the message is the address of the device 700, send the message to a CPU (e.g., the first central processing unit 711) for processing; if the destination address of the message is not the address of the device 700, the next hop and the outgoing interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the outgoing interface corresponding to the destination address. The processing of the uplink message comprises the following steps: processing a message input interface and searching a forwarding table; and (3) downlink message processing: forwarding table lookups, and the like.
The physical interface card 723 is used to implement the interfacing function of the physical layer, from which the original traffic enters the interface board 720, and the processed messages are sent out from the physical interface card 723. The physical interface card 723, also called a daughter card, may be installed on the interface board 720, and is responsible for converting the optical signal into a message, performing validity check on the message, and forwarding the message to the network processor 722 for processing. In some embodiments, the central processor may also perform the functions of network processor 722, such as implementing software forwarding based on a general purpose CPU, so that network processor 722 is not required in physical interface card 723.
Optionally, device 700 includes a plurality of interface boards 720.
Optionally, the device 700 further comprises a switch screen 730. The switch board 730 is also called a Switch Fabric Unit (SFU), for example. In the case of a network device having a plurality of interface boards 720, the switch board 730 is used to complete data exchange between the interface boards. For example, two interface boards 720 communicate between each other, for example, through a switch board 730.
Master control board 710 and interface board 720 are coupled. For example. The main control board 710, the two interface boards 720, and the switch network board 730 are connected to the system backplane through the system bus to realize intercommunication. In a possible implementation manner, an inter-process communication (IPC) channel is established between the main control board 710 and the interface board 720, and the main control board 710 and the interface board 720 communicate with each other through the IPC channel.
Logically, the apparatus 700 includes a control plane including a main control board 710 and a central processor, and a forwarding plane including various components performing forwarding, such as a forwarding table entry memory 724, a physical interface card 723, and a network processor 722. The control plane performs functions of a router, generating a forwarding table, processing signaling and protocol messages, configuring and maintaining the state of the device, and the like, and issues the generated forwarding table to the forwarding plane, and in the forwarding plane, the network processor 722 looks up the table of the message received by the physical interface card 723 and forwards the table based on the forwarding table issued by the control plane. The forwarding table issued by the control plane is stored in the forwarding table entry storage 724, for example. In some embodiments, the control plane and the forwarding plane are, for example, completely separate and not on the same device.
The operations of the interface boards 720 are consistent and will not be described again for brevity.
It should be noted that there may be one or more main control boards, and when there are multiple main control boards, for example, the main control board and the standby main control board are included. The interface board may have one or more blocks, and the stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on an interface board. The exchange network board may not have one or more blocks, and when there are more blocks, the load sharing redundancy backup can be realized together. Under the centralized forwarding architecture, the network device does not need a switching network board, and the interface board undertakes the processing function of the service data of the whole system. Under the distributed forwarding architecture, the network device can have at least one switching network board, and the data exchange among a plurality of interface boards is realized through the switching network board, so that the high-capacity data exchange and processing capacity is provided. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those of devices in a centralized architecture. Optionally, the form of the network device may also be that there is only one board card, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the one board card, at this time, the central processing unit on the interface board and the central processing unit on the main control board may be combined into one central processing unit on the one board card to perform the function after the two are superimposed, and the data exchange and processing capability of the network device is low (for example, network devices such as a low-end switch or a router, etc.). Which architecture is specifically adopted depends on the specific networking deployment scenario, and is not limited herein.
The execution main body of the method for processing the packet is described above, and then the flow of the method for processing the packet is described with reference to fig. 8, in fig. 8, the execution main body is taken as the first device, as described above, the first device is a host, a mobile terminal, a server, a network device in a network, and the like, and the first device may also be a network leaf node or a network spine node, and the network leaf node is connected to the network spine node, and the like. The first equipment adds the mark information corresponding to the stream instance to the message, so that other equipment processes the message based on the mark information corresponding to the stream instance added to the message. In addition, the first device may also process the packet based on the flag information corresponding to the stream instance added to the packet. Fig. 8 includes steps 801 to 804.
Step 801, acquiring a first message, wherein the first message comprises data transmitted by a stream instance based on a QUIC protocol.
For convenience of description, the embodiment of the present application exemplifies the first stream instance based on the QUIC protocol, where the first stream instance is any stream instance within a certain QUIC connection, and the QUIC connection is a connection created based on the QUIC protocol. The QUIC connection is a QUIC connection established between a data transmitting end and a data receiving end.
In this embodiment, the first device obtains the first packet. For example, a first device receives a first message. For another example, the first device generates a first message.
In step 802, tag information corresponding to a stream instance is obtained.
Illustratively, the flag information of the stream instances is used to distinguish the stream instances, different types of stream instances correspond to the flag information of the different stream instances, for example, the flag information of the first stream instance is used to flag a type of stream instance within the QUIC connection, the type of stream instance includes the first stream instance, each type of stream instance may include multiple stream instances, for example, each type of stream instance is used to transmit a type of data, the type of data includes video, voice, text, and so on. Alternatively, the tag information of the first stream instance uniquely tags the first stream instance within the QUIC connection.
Illustratively, for the first stream instance, the flag information of the first stream instance may include related information of the first stream instance, and the processing of step 802 may be:
the mark information of the first stream instance is obtained, and the mark information of the first stream instance comprises the relevant information of the first stream instance.
In this embodiment, the first device can obtain the flag information of the first stream instance by obtaining the related information of the first stream instance. For example, the flag information includes information related to the first stream instance.
For example, the related information includes at least one of: the type of data transmitted by the first stream instance (the type includes video, voice, text, etc.), the characteristic information of the first stream instance, the path identification associated with the first stream instance, and the index information of the first stream instance, which is used to indicate the first stream instance within the QUIC connection to which the first stream instance belongs. The optional characteristic information is a specific bit in the stream identifier of the first stream instance, and the optional characteristic information is content obtained by hashing the stream identifier of the first stream instance. The index information may be randomly allocated, may be a hash value, or may be a continuous value sequentially allocated to different stream instances.
Step 803, add mark information to the first message to obtain a second message.
In this embodiment, after determining the tag information associated with the first stream instance, the first device adds the tag information to the first packet to obtain a second packet. For example, the tag information added to the first packet is added to an outer header of the second packet, and a network device in the network that forwards the second packet can read the tag information. For example, the flag is set in the flow label field of the IPv6 message, and for example, the option field of the IPv4 message.
Step 804, sending a second message, where the tag information is used for the forwarding device receiving the second message to process the second message based on the tag information.
The forwarding device may be a router or a switch in the network.
In this embodiment, the first device sends the second packet to the outside after obtaining the second packet. The forwarding device in the network that receives the second packet processes the second packet based on the tag information, and this process refers to the flow shown in fig. 13 later.
Based on the flow shown in fig. 8, the tag information of the first stream instance is added to the position where the forwarding device can read the tag information, and is unencrypted, so that the forwarding device can make a corresponding policy on the packet in the forwarding process of the packet.
The flow shown in fig. 8 will be further explained based on the difference of the first device. Two possible scenarios are provided below.
Case 1: the first device is a device for generating a first message, and the first message is a QUIC message. For example, the first device is a host or the like.
Case 2: the first device is a forwarding device for forwarding a packet in a network. For example, the first device is a router or a switch in the network.
For case 1, the flow of the method for processing a message refers to the flow shown in fig. 9, and fig. 9 includes steps 901 to 904.
And step 901, generating a QUIC message, wherein the QUIC message comprises data transmitted by the first stream instance.
In this embodiment, the first device serves as a data sending end, and the first device establishes a QUIC connection with a data receiving end, where a process of establishing the QUIC connection is referred to RFC9000, and details thereof are not described herein. The first device creates a first STREAM instance in the QUIC connection and generates a QUIC message, wherein the QUIC message comprises data transmitted by the first STREAM instance in the QUIC connection, namely, a payload part of the QUIC message comprises a STREAM frame corresponding to the first STREAM instance, and the STREAM frame comprises the data to be transmitted and STREAM identification. And the first equipment encapsulates a UDP message header on the outer layer of the QUIC message to obtain the UDP message. In the flow shown in fig. 9, the first message is a QUIC message.
In step 902, tag information corresponding to a first stream instance is obtained.
In this embodiment, there are various ways of determining the flag information of the first stream instance, and ways one to four are provided as follows. One way is a structured allocation method, for example, specifying that the flag information occupies N bits, N being greater than 1, specifying the definition of the respective bit portions of the N bits. The second way is a random allocation method, for example, for the first stream instance, some random algorithm is used to generate random and unique mark information, and the random algorithm can be referred to RFC4096 and the like.
The method comprises the steps of determining the type of data transmitted by a first stream instance, and the characteristic information and the index information of the first stream instance, wherein the index information is used for uniquely indicating the first stream instance in the QUIC connection to which the first stream instance belongs, and determining the type of the data, the first characteristic information and the index information as the mark information of the first stream instance.
In this embodiment, the type of data transmitted by the first stream instance is determined, which type is used to indicate which of voice data, image data, and text data the data is. Determining the feature information and the index information of the first stream instance, where the feature information is optionally a specified bit in a stream identifier of the first stream instance, and the feature information is optionally obtained based on a hash of the stream identifier of the first stream instance. The index information uniquely indicates the first stream instance in the QUIC connection to which the first stream instance belongs, and the index information can be randomly allocated, can also be a hash value, and can also be a continuous value sequentially allocated to different stream instances. The number of bits occupied by the types of data is the same for the flag information of different stream instances, the number of bits occupied by the characteristic information of each stream instance is the same, and the number of bits occupied by the index information of each stream instance is the same. The first device determines the type of the data, the characteristic information, and the index information as the mark information of the first stream instance. Or the first device generates the mark information of the first stream instance according to the type, the characteristic information and the index information of the data. For example, the first device inputs the type of the data, the characteristic information, and the index information to a random algorithm, and generates the tag information of the first stream instance.
In the second mode, the flag information is generated based on the information related to the first stream instance and a random algorithm.
In this example, the first device obtains the relevant information of the first stream instance, inputs the relevant information into a preset random algorithm, and the output of the random algorithm is the mark information of the first stream instance.
Illustratively, the related information includes at least one of: the type of data transmitted by the first stream instance, the characteristic information of the first stream instance, the path identification associated with the first stream instance, and the index information of the first stream instance, which is used to indicate the first stream instance within the QUIC connection.
Illustratively, the information related to the first stream instance includes a stream identification of the first stream instance, which is generated when the first stream instance is created, uniquely indicating the first stream instance within the QUIC connection. Correspondingly, in the second mode, the stream identifier of the first stream instance is input into a preset random algorithm to obtain an output value, and the output value is the mark information of the first stream instance.
Illustratively, the related information of the first stream instance includes a stream identifier of the first stream instance, and a source address and a destination address of the first packet, where the source address of the first packet may be an IP address of a data sending end, and the destination address may be an IP address of a data receiving end of the first packet. Correspondingly, in the second mode, the stream identifier of the first stream instance, the source address and the destination address of the first message are input into a preset random algorithm to obtain an output value, and the output value is the mark information of the first stream instance.
Illustratively, the related information of the first stream instance includes an identifier of the first stream instance and five-tuple information of the first packet, where the five-tuple information includes a source address, a destination address, a protocol, a source port, and a destination port. Correspondingly, in the second mode, the stream identifier of the first stream instance and the quintuple information of the first message are input into a preset random algorithm to obtain an output value, and the output value is the mark information of the first stream instance.
Illustratively, the related information of the first stream instance includes the type of data transmitted by the first stream instance. Correspondingly, in the second mode, the type of the data is input into a preset random algorithm to obtain an output value, and the output value is the mark information of the first stream instance.
It should be noted that the above-mentioned related information about the first stream instance is only some illustrative examples, and all related information that can be used for distinguishing the first stream instance can be applied to the embodiments of the present application, and no example is given here. In addition, when the information related to the first stream instance includes the stream identifier of the first stream instance, the stream identifier is unique within the QUIC connection, and therefore the generated tag information of the first stream instance is also unique within the QUIC connection. When the related information of the first stream instance includes the type of data transmitted by the first stream instance, since it is possible that the types of data transmitted by different stream instances are the same, the mark information of the generated first stream instance is the same as each stream instance under the type to which it belongs.
In the third embodiment, the stream id of the first stream instance is determined as the flag information of the first stream instance.
In a fourth mode, the flag information of the first stream instance is determined based on the path associated with the first stream instance.
In this embodiment, the first device determines a path associated with the first stream instance, and processes five-tuple information of the path to obtain tag information of the first stream instance. For example, processing the five-tuple information of the path may include inputting the five-tuple information into a preset random algorithm.
It should be noted that, in the fourth embodiment, it is assumed that the path associated with the first stream instance is associated with only the first stream instance, and the flag information of the first stream instance is unique in the QUIC connection. Assuming that a path associated with a first stream instance is associated with another stream instance, the flag information of the first stream instance is the same as the flag information of the other stream instance, that is, the stream instance associated with the path belongs to one type of stream instance.
And step 903, adding the mark information of the first stream instance to the QUIC message to obtain a second message.
In this embodiment, the first device adds tag information to the UDP packet obtained in step 901, where the tag information is located in a first field in a first outer layer header of the packet.
For example, in the case that the first outer layer packet header is an IPv6 header, the first field may be a flow label field. In the case that the first outer header is an IPv4 header, the first field may be an option field.
Step 904, sending a second message, the tag information being used for the forwarding device receiving the second message to process the second message based on the tag information.
In this embodiment, after the first device obtains the second packet, the first device has different access modes to the network, and the process of sending the second packet also has some differences.
And under the condition that the first equipment is the single-homing access network, the first equipment is connected with one forwarding equipment, and the first equipment only needs to send the second message to the forwarding equipment. For example, in the network architecture shown in fig. 5, the first device is host 1, and the second message is sent from host 1 to host 2. Since the host 1 is connected to only PE1, the host 1 sends the second message to PE1.
In case the first device is a multi-homed access network, the first device connects at least two forwarding devices. And the first equipment performs hash calculation on the mark information of the first stream instance and the source address and the destination address of the second message to obtain a hash value, and the hash value is used for selecting the next hop forwarding equipment. Or, the first device performs hash calculation on the mark information of the first stream instance and the source address, the destination address, the source port and the destination port of the second packet to obtain a hash value, and selects the next hop forwarding device by using the hash value. Or, the first device performs hash calculation on the mark information of the first stream instance and the quintuple information of the second packet to obtain a hash value, and selects the next hop forwarding device by using the hash value.
The forwarding device receiving the second message can also identify the tag information carried therein, and can further process the second message.
As can be seen from the flow shown in fig. 9, the outer layer packet header of the second packet transmitted through the network includes the flag information of the stream instance, so that the forwarding device in the network can identify different stream instances or different types of stream instances, and further execute the processing policy based on the stream instances.
It should be noted that, in the flow shown in fig. 9, a first outer layer header is added to the first packet, and the flag information of the first stream instance is set in the first outer layer header. Or the first packet may already have the first outer header, and some fields in the first outer header are modified, so that the first outer header includes the tag information of the first stream instance. For example, an IPv6 header is added to the QUIC message, and then the tag information is added to the flow label field in the IPv6 header.
For case 2, the first device adds the tag information to the first packet in step 803, and there are multiple processing modes. For example, the first outer header does not exist in the first packet, and the first outer header is added to the first packet, and includes the tag information. For another example, the first packet itself has a first outer header, some fields in the first outer header of the first packet are modified to be the tag information, or the tag information is added to some reserved fields in the first outer header of the first packet.
For example, in the case of adding an outer header to the first packet, the flow of the method for processing the packet refers to the flow shown in fig. 10, and fig. 10 includes steps 1001 to 1004.
Step 1001, receiving a first message, where the first message includes a QUIC message encapsulated with a header of a second outer layer message.
In this embodiment, the first device, as a forwarding device for forwarding the first packet, receives the first packet from another forwarding device in the network, or receives the first packet from the data sending end, where the first packet includes a QUIC packet encapsulated with a second outer layer packet header, the second outer layer packet header includes a second field, and the content of the second field is used to mark the first stream instance. For example, the first packet is an IPv6 packet, the header of the second outer layer packet is an IPv6 header, the IPv6 header is used for encapsulating a UDP packet, and the UDP packet includes a QUIC packet. For another example, the first packet is an IPv4 packet, the header of the second outer layer packet is an IPv4 header, the IPv4 header is used to encapsulate a UDP packet, and the UDP packet includes a QUIC packet.
Step 1002, obtaining the content of a second field of a second outer layer message header, wherein the content of the second field is used for marking a first stream instance; the flag information of the first stream instance is obtained from the content of the second field.
In this embodiment, a management device exists in a network, and the management device issues configuration information and a mapping policy to a part or all of forwarding devices that forward a first packet in the network, where the configuration information is used to configure and read the content of a second field, and is further used to map the content of the second field to tag information of a first stream instance using the mapping policy, where the mapping policy indicates a policy for mapping the content of the second field to tag information of the first stream instance. The forwarding devices store the configuration information and the mapping policy.
And the first equipment receiving the first message reads the content of the second field and acquires the stored mapping strategy. And mapping the content of the second field into the mark information of the first stream instance by using a mapping strategy.
Illustratively, the content of the second field is obtained based on the related information of the first stream instance, and the related information includes the content described in the foregoing. For example, the second field is the related information, or the second field is an output value obtained by inputting the related information into a random algorithm, or the like.
Illustratively, the process of mapping the content of the second field to the flag information of the first stream instance is as follows:
in a first mode, the content of the second field is determined as the flag information of the first stream instance.
And in the second mode, the mapping strategy is a preset mapping algorithm, the content of the second field is input into the preset mapping algorithm to obtain an output value, and the output value is the mark information of the first stream instance.
And selecting the content of the preset bit in the content of the second field as the mark information of the first stream instance.
The three ways are exemplary ways, and the process is not limited in the embodiment of the present application.
Step 1003, adding a first outer layer packet header to the first packet to obtain a second packet, where a first field of the first outer layer packet header includes the tag information.
In this embodiment, the first device adds a first outer header to the first packet, which may also be referred to as encapsulating the first outer header for the first packet. The first field of the first outer layer header includes the tag information of the first stream instance.
Illustratively, the first device is an ingress end point device of a tunnel, and the first outer layer packet header added by the ingress end point device of the tunnel to the first packet is a tunnel header. For example, the tunnel header is a VXLAN packet header and the first field is a reserved field in a VXLAN header of the VXLAN packet header.
It should be noted that the tunnel endpoint device adds the first outer layer packet header, and when the second packet reaches the end point device of the tunnel, the end point device of the tunnel deletes the first outer layer packet header.
Step 1004, sending a second message, where the tag information is used for the forwarding device receiving the second message to process the second message based on the tag information.
In this embodiment, the first device may also process the second packet based on the tag information. For example, after the first device obtains the second message, if the egress interface of the first device is connected to only one device, the first device directly sends the second message. And if the output interface of the first device is connected with a plurality of devices, the first device performs hash calculation on the mark information of the first stream instance and the source address and the destination address of the second message to obtain a hash value, and the hash value is used for selecting the next hop forwarding device. Or, the first device performs hash calculation on the mark information of the first stream instance and the source address, the destination address, the source port and the destination port of the second packet to obtain a hash value, and selects the next hop forwarding device by using the hash value. Or, the first device performs hash calculation on the mark information of the first stream instance and the quintuple information of the second packet to obtain a hash value, and selects the next hop forwarding device by using the hash value.
As can be seen from the flow shown in fig. 10, after the forwarding device in the network receives the message, the tag information of the stream instance may also be added to the message and sent, so that the forwarding device in the network can make a processing policy based on the stream instance.
For the case 2, the adding of the mark information to the first packet in step 703 specifically includes: modifying some fields in the first outer header of the first packet to be the tag information, or adding the tag information in some reserved fields of the first outer header of the first packet, and referring to the flow shown in fig. 11, the flow of the method for processing the packet includes steps 1101 to 1104 in fig. 11.
Step 1101, receiving a first message, wherein the first message comprises a QUIC message encapsulated with a first outer layer message header.
Step 1101 refers to the description of step 1001, and is not described herein again.
In step 1102, the tag information corresponding to the first stream instance is obtained.
Illustratively, the first device may also determine the flag information of the first stream instance in a manner from the first manner to the third manner in step 1002.
Step 1103, add mark information to the first outer header of the first packet to obtain a second packet.
In this embodiment, the first device adds tag information to the first outer layer packet header of the first packet to obtain the second packet, where the tag information may be to modify some fields of the first outer layer packet header or to add the tag information to a reserved field of the first outer layer packet header, for example, the first outer layer packet header is an IPv6 header, a flow label of the IPv6 header has a value of 0, and the flow label has a value modified to tag information of the first stream instance.
Step 1104, sending a second message, where the tag information is used for the forwarding device that receives the second message to process the second message based on the tag information.
Step 1104 is described in reference to step 1004, and will not be described herein again.
In another possible implementation, the first stream instance is a bidirectional stream instance, and the stream identification of the first stream instance indicates a bidirectional stream instance. In this case, only one of the two parties to which the first stream instance belongs specifies the flag information corresponding to the first stream instance, and the other party uses the flag information. Referring to the flow shown in fig. 12, in the flow shown in fig. 12, the data transmitting end and the data receiving end are bidirectional to create the first stream instance, and the data receiving end is the first device mentioned in the foregoing.
Step 1201, the data sending end generates a first QUIC message based on a QUIC protocol, and the STREAM frame in the first QUIC message comprises the STREAM identification of the first STREAM instance.
In step 1202, the data transmitting end determines flag information corresponding to the first stream instance.
The processing procedure of steps 1201 to 1202 is similar to the processing procedure of steps 901 to 902, and is not described herein again.
And 1203, the data sending end adds an outer-layer message header to the first QUIC message to obtain a third message.
In this embodiment, since the QUIC message is based on UDP, the outer layer of the first QUIC message is encapsulated with a UDP header, and an outer layer header is added to the outer layer of the first QUIC message encapsulated with the UDP header, where the third field of the outer layer header includes the tag information.
For example, in the case that the outer header is an IPv6 header, the third field may be a flow label field. In the case that the outer header is an IPv4 header, the third field may be an option field.
Step 1204, the data sending end sends a third message, where the tag information in the third message is used by the forwarding device that receives the third message to process the third message based on the tag information.
The description in step 1204 refers to the description in step 904, and is not repeated here.
And step 1205, the data receiving end receives the third message and stores the mark information corresponding to the first stream instance.
In this embodiment, when the data receiving end receives the third packet, since the data receiving end receives the packet of the stream identifier of the first stream instance for the first time, the data receiving end also creates the distributed entity of the first stream instance. And the data receiving end stores the flag information corresponding to the first stream instance.
And step 1206, the data receiving end generates a second QUIC message based on the QUIC protocol.
In this embodiment, when a data receiving end wants to send data or control information to a data sending end, the data receiving end generates a second QUIC message based on the QUIC protocol, where a STREAM frame in the second QUIC message includes a STREAM identifier of a first STREAM instance, and the second QUIC message is the first message described above.
In step 1207, the data receiving end acquires the stored flag information of the first stream instance.
When the subsequent data receiving end uses the first stream instance to send data, the stored mark information corresponding to the first stream instance can be used.
And 1208, adding a first outer layer message header to the second QUIC message by the data receiving end to obtain a second message, wherein a first field of the first outer layer message header comprises the marking information.
In this embodiment, since the QUIC message is based on UDP, a UDP header is encapsulated in the outer layer of the second QUIC message, a first outer layer header is added to the outer layer of the UDP header encapsulating the second QUIC message, and a first field of the first outer layer header includes the tag information.
Step 1209, the data receiving end sends the second message, and the forwarding device receiving the second message processes the second message based on the label information.
The processing manner of step 1209 refers to the processing manner of step 804, and is not described herein again.
As can be seen from the flow shown in fig. 12, the first stream instance is a bidirectional stream instance, and the data receiving end does not need to calculate the tag information, which can save processing resources.
It should be noted that in the flow shown in fig. 12, the data sending end generates the flag information of the first stream instance, and in this embodiment of the application, the data receiving end may also generate the flag information of the first stream instance and send the flag information to the data sending end, which is not described herein again.
With respect to the flows shown in fig. 9 to fig. 12, it should be noted that when the flag information of each STREAM instance is unique in the corresponding QUIC connection, the STREAM frames included in a single QUIC message all belong to the same STREAM instance, and thus, each STREAM instance is processed. When the mark information of each type of STREAM instance is unique in the corresponding QUIC connection, the STREAM frame contained in a single QUIC message belongs to the same type of STREAM instance, and thus, each type of STREAM instance is processed. Processing herein includes, but is not limited to, load balancing processing.
For better understanding of the embodiment of the present application, a flow of performing message processing based on tag information is described next, referring to the flow shown in fig. 13, and an execution subject is taken as the second device in fig. 13 for example, as described above, the second device is a host, a mobile terminal, a server, a network device in a network, and may also be a network leaf node or a network spine node, and the network leaf node is connected to the network spine node, and the like. The network device here may be a switch or a router etc. in the network. And the second equipment processes the message based on the mark information added in the outer layer message header of the message, wherein the mark information is the mark information corresponding to the stream instance.
Step 1301, acquiring a message, wherein the message comprises data transmitted by a stream instance based on a QUIC protocol, and an outer layer message header of the message comprises mark information of the stream instance.
In this embodiment, the second device is specifically a forwarding device in the network, and the forwarding device receives a packet, where the packet is a packet sent by a device that creates the first stream instance, and the packet is the second packet described in step 903, step 1003, step 1103, and step 1203. And the second equipment acquires the mark information of the first stream in the first field of the outer layer message header of the message.
Illustratively, the flag information is used to flag a first stream instance within a QUIC connection, or the flag information is used to flag a stream instance of a certain type within a QUIC connection, the stream instance of the type including the first stream instance.
Step 1302, based on the label information, processes the message.
In this embodiment, the second device processes the packet using the flag information of the first stream instance. Illustratively, the processing of the message includes forwarding the message, performing classification collection on the message, collecting delay information of the message, and the like.
For example, when the packet is subjected to forwarding processing, the packet may be subjected to forwarding processing based on the flag information of the first stream instance and the destination IP address in the outer packet header.
Wherein the destination address may be a destination IP address.
In this embodiment, the second device obtains a destination address in an outer layer header of the packet, and performs forwarding processing on the packet by using the tag information of the first stream instance and the destination address. For example, the second device configures a path through which a message with different tag information passes, and finds a next hop using the tag information and the destination address of the first stream instance, and sends the message to the next hop.
For example, in step 1302, forwarding the packet may be performed based on the hash value of the flag information of the first stream instance, and the forwarding process is performed as follows:
performing hash calculation according to the marking information to obtain a hash value; determining a forwarding path for forwarding the message in a plurality of equivalent forwarding paths based on the hash value; and forwarding the message according to the determined forwarding path.
In this embodiment, when there are multiple equal cost routing paths, the second device performs hash processing on the flag information of the first stream instance to obtain a hash value. And determining the next hop in a plurality of equivalent routing paths by using the hash value, and sending a message to the next hop.
Or, under the condition that a plurality of equivalent routing paths exist, the second device obtains a hash value for one or more of the five-tuple information of the message and the mark information of the first stream instance. And determining the next hop in a plurality of equivalent routing paths by using the hash value, and sending a message to the next hop. For example, the second device performs hash processing on the destination address and the source address in the outer layer message information of the tag information of the first stream instance to obtain a hash value. For another example, the second device performs hash processing on the tag information of the first stream instance, the destination address, the source port, and the destination port of the packet, to obtain a hash value.
The flow in fig. 13 is described by taking the second device as a forwarding device as an example, and may also be a device that creates the first stream instance during actual processing, then in step 1201, a packet is obtained, specifically, a packet is generated, and the rest of processing is the same as that described in fig. 13.
Next, an example of the flow shown in fig. 13 is given, where a device for processing a message is PE1 in fig. 5, and two equivalent routing paths exist from PE1 to destination host 2, PE1- > P3- > PE2 and PE1- > P2- > P4- > PE2. A first stream instance and a second stream instance are created between the source host 1 and the destination host 2, and the flag information of the first stream instance is different from the flag information of the second stream instance. Assuming that the source host 1 simultaneously uses the first stream instance and the second stream instance to send two byte streams (e.g., data of two files) to the destination host 2, PE1 sends a packet corresponding to the first stream instance to P1, and PE2 is further performed through a path PE1- > P3- > PE2.PE2 sends the message corresponding to the second stream instance to P2, and refers to the load balancing diagram shown in fig. 14 through a path PE1- > P2- > P4- > PE2. Thus, the paths through which the messages of different stream instances pass are different, and load balancing of the mark information based on the stream instances can be realized.
For another example, fig. 15 shows a schematic diagram of load balancing in another scenario, as shown in fig. 15, the scenario involves a spin-leaf network, or referred to as a leaf-spin network. The scene comprises a host, a leaf node and a spine node. Wherein, the host can comprise a source host 1 and a destination host 2, the leaf nodes can comprise leaf1, leaf2, leaf3 and leaf4, and the spine node can comprise spine1 and spine2. The source host 1 is in dual access to the network, the destination host 2 is in dual access to the network, the source host 1 is in access to leaf1 and leaf2, the leaf1 and leaf2 are in access to spine1 and spine2, the destination host 2 is in access to leaf3 and leaf4, and the leaf3 and leaf4 are in access to spine1 and spine2. The source host 1 creates a first stream instance and a second stream instance, the flag information of the first stream instance being different from the flag information of the second stream instance. Assuming that the source host 1 simultaneously uses the first stream instance and the second stream instance to send two byte streams (e.g., data of two files) to the destination host 2, the tag information of the first stream instance and/or the tag information of the second stream instance may be added to a corresponding message by the source host, a leaf node, or a spine node, and the source host, the leaf node, or the spine node that obtains the message may perform message processing according to the tag information of the first stream instance and/or the tag information of the second stream instance in the message. The source host 1 may determine, in the two equal cost routing paths, that the packet corresponding to the first stream instance is sent to the leaf1 by using the flag information of the first stream instance. Or, the leaf1 determines that the message corresponding to the first stream instance is sent to the spine1 in the two equivalent routing paths by using the tag information of the first stream instance. Or, using the mark information of the first stream instance, the spine1 determines that the message corresponding to the first stream instance is sent to the leaf3 in the two equal cost routing paths. The leaf3 sends the message corresponding to the first stream instance to the destination host 2. And the source host 1 can determine that the message corresponding to the second stream instance is sent to the leaf2 in the two equal cost routing paths by using the flag information of the second stream instance. Or the Leaf2 determines that the message corresponding to the second stream instance is sent to the spine2 in the two equivalent routing paths by using the label information of the second stream instance. Or, using the mark information of the second stream instance, the Spine2 determines that the message corresponding to the second stream instance is sent to the leaf4 in the two equivalent routing paths. The Leaf4 sends the message corresponding to the second stream instance to the destination host 2. Thus, the message corresponding to the first stream instance reaches the destination host 2 through the path leaf1- > spine1- > leaf3, and the message corresponding to the second stream instance reaches the destination host 2 through the path leaf2- > spine2- > leaf4. Therefore, load balance can be realized through the mark information corresponding to the stream instance.
Here, the way that each node selects a path from two equal-cost routing paths refers to the flow shown in fig. 13, and is not described here again.
In fig. 14 and fig. 15, the load balancing process for the packets is described as an example, and for example, the number of packets with different tag information or the delay information of the packets with different tag information may be determined.
In the embodiment of the application, the mark information of the STREAM instance is added to the message, so that the forwarding device can realize a STREAM-based processing strategy under the condition that the STREAM frame is not decrypted. And when the processing strategy is a load balancing strategy, the transmission performance can be improved. The method is compatible with the existing standard specification, and has better deployability, for example, the flow label field is directly occupied in the IPv6 message to set the mark information of the stream instance. For another example, the reserved field of VXLAN Header is occupied in VXLAN message. For another example, the mark information of the stream instance is set in the option field directly occupied in the IPv4 message.
Fig. 16 is a block diagram of an apparatus for processing a message according to an embodiment of the present application. The apparatus may be implemented as part or all of the apparatus by software, hardware or a combination of both. The processing apparatus provided in the embodiment of the present application can implement the processes described in fig. 8 to fig. 12 in the embodiment of the present application, and specifically, the processing apparatus provided in the embodiment of the present application can implement the relevant steps executed by the first device shown in fig. 8 to fig. 12. The device for processing the message comprises an obtaining module 1610, a determining module 1620, an adding module 1630 and a sending module 1640, wherein:
an obtaining module 1610, configured to obtain a first packet, where the first packet includes data transmitted by a stream instance based on a QUIC protocol, and specifically may be used to implement obtaining functions of step 801, step 901, step 1001, step 1101, and step 1201 and execute implicit steps included in step 801, step 901, step 1001, step 1101, and step 1201;
a determining module 1620, configured to obtain flag information corresponding to the stream instance, where the determining module may be specifically configured to implement the determining function in step 802, step 902, step 1002, step 1102, and step 1202, and execute implicit steps included in step 802, step 902, step 1002, step 1102, and step 1202;
an adding module 1630, configured to add the marking information to the first packet to obtain a second packet, and specifically may be configured to implement the adding function of step 803, step 903, step 1003, step 1103, and step 1203 and execute implicit steps included in step 803, step 903, step 1003, step 1103, and step 1203;
a sending module 1640, configured to send the second packet, where the tag information is used for a forwarding device that receives the second packet to process the second packet based on the tag information, and specifically may be used to implement the sending function of step 804, step 904, step 1004, step 1104, and step 1204, and execute implicit steps included in step 804, step 904, step 1004, step 1104, and step 1204.
In a possible implementation, said flag information is used to mark said stream instances within a QUIC connection, or said flag information is used to mark the type of said stream instances within said QUIC connection, said stream instances belonging to the stream instances marked by said flag information.
In a possible implementation manner, the adding module 1630 is configured to:
and adding the marking information in a first field of a first outer layer message header of the first message.
In a possible implementation manner, the first outer layer packet header is an IPv6 header, and the first field is a flow label field; alternatively, the first and second electrodes may be,
the first outer layer message header is an IPv4 header, and the first field is an option field.
In a possible implementation manner, the determining module 1620 is configured to:
and obtaining the mark information of the stream instance, wherein the mark information of the stream instance comprises the related information of the stream instance.
In a possible implementation manner, the determining module 1620 is configured to:
and generating the mark information according to the related information of the stream instance and a random algorithm.
In one possible implementation, the related information includes at least one of: the stream instance information is used for indicating the stream instance in the QUIC connection.
In a possible implementation manner, the determining module 1620 is configured to:
generating the mark information according to the identification of the stream instance and the random algorithm; alternatively, the first and second electrodes may be,
generating the mark information according to the identification of the stream instance, the source address and the destination address of the first message and the random algorithm; alternatively, the first and second electrodes may be,
and generating the mark information according to the identification of the stream instance, the quintuple information of the first message and the random algorithm.
In one possible implementation, the stream instances are bidirectional stream instances; the determining module 1620 configured to:
acquiring a third message transmitted based on the stream instance, wherein the third message is transmitted along a first direction, the second message is transmitted along a second direction, and the first direction is opposite to the second direction;
and acquiring the marking information in an outer layer message header of the third message.
In a possible implementation manner, the first message includes a QUIC message encapsulated with a header of a second outer layer message;
the determining module 1620 configured to:
acquiring the content of a second field of the second outer layer message header, wherein the content of the second field is used for marking the stream instance;
and obtaining the mark information of the stream instance according to the content of the second field.
In one possible implementation manner, the flag information includes related information of the stream instance, and the related information includes at least one of the following: the type of the data, the characteristic information of the stream instance, the path identification associated with the stream instance and the index information of the stream instance, wherein the index information of the stream instance is used for uniquely indicating the stream instance in the QUIC connection.
In a possible implementation manner, the obtaining module 1610 is configured to generate the first packet, where the first packet is a QUIC packet based on a QUIC protocol; alternatively, the first and second electrodes may be,
and receiving a first message, wherein the first message comprises a QUIC message encapsulated with a third outer layer message header.
In one possible implementation, the first device is a host or a network device.
In one possible implementation, the first device is a network leaf node, and the network leaf node is connected to a network spine node.
Fig. 17 is a structural diagram of an apparatus for processing a packet according to an embodiment of the present application. The apparatus may be implemented as part or all of the apparatus by software, hardware or a combination of both. The message of the processing apparatus provided in the embodiment of the present application may implement the process described in fig. 13 in the embodiment of the present application, and specifically, the processing apparatus provided in the embodiment of the present application may implement the relevant steps executed by the second device shown in fig. 13. The apparatus for processing a packet includes a packet obtaining module 1710 and a processing module 1720, where:
a message obtaining module 1710, configured to obtain a message, where the message includes data transmitted by a stream instance based on a QUIC protocol, and an outer-layer message header of the message includes tag information corresponding to the stream instance, and specifically may be used to implement the message obtaining function in step 1301 and execute an implicit step included in step 1302;
the processing module 1720 is configured to process the packet based on the flag information, and specifically may be configured to implement the processing function of step 1302 and execute the implicit step included in step 1302.
In one possible implementation manner, the processing module 1720 is configured to:
and forwarding the message based on the marking information and the destination address in the outer layer message header.
In one possible implementation manner, the processing module 1720 is configured to:
performing hash calculation according to the marking information to obtain a hash value;
determining a forwarding path for forwarding the message in a plurality of equivalent forwarding paths based on the hash value;
and forwarding the message according to the determined forwarding path.
In a possible implementation, said flag information is used to mark said stream instances within a QUIC connection, or said flag information is used to mark the type of said stream instances within said QUIC connection, said stream instances belonging to the stream instances marked by said flag information.
In a possible implementation manner, the marking information is included in a field of an outer layer header of the message; wherein the content of the first and second substances,
the outer layer message header is an IPv6 header, and the field is a flow label field; alternatively, the first and second electrodes may be,
the outer layer message header is an IPv4 header, and the field is an option field.
In one possible implementation manner, the flag information includes related information of the stream instance, and the related information includes at least one of the following: the type of the data, the characteristic information of the stream instance, the path identification associated with the stream instance and the index information of the stream instance, wherein the index information of the stream instance is used for uniquely indicating the stream instance in the QUIC connection.
In one possible implementation, the second device is a host or a network device.
In one possible implementation, the second device is a network leaf node or a network spine node.
The detailed process of the device for processing a message shown in fig. 16 and 17 for executing the message processing refers to the description in the previous embodiments, and the description is not repeated here. Illustratively, the apparatus for processing a packet shown in fig. 16 is applied to the device shown in fig. 6 or fig. 7, or to the first device. The apparatus for processing a message shown in fig. 17 is applied to the device shown in fig. 6 or 7, or to the second device.
In addition, the module division manner in fig. 16 and 17 is an exemplary division manner, and the embodiment of the present application is not limited.
In some embodiments, a system for processing a message is provided, the system comprising a first device configured to perform a portion of a process for processing a message in a preamble, and a second device configured to perform a portion of a process for processing a message in a preamble.
In some embodiments, a computer program product is provided that includes computer instructions stored in a computer readable storage medium. The processor of the first device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the first device executes the flow shown in fig. 8 to 12.
In some embodiments, a computer program product is provided that includes computer instructions stored in a computer readable storage medium. The processor of the second device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the second device to perform the flow illustrated in fig. 13.
Those of ordinary skill in the art will appreciate that the various method steps and elements described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the steps and elements of the embodiments are generally described in the foregoing description as a function of function in order to clearly illustrate their interchangeability. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed system architecture, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the module is merely a logical division, and other divisions may be realized in practice, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may also be an electrical, mechanical or other form of connection.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
In addition, each module in the embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated module can be realized in a form of hardware or a form of software module.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may substantially or partially contribute to the prior art, or all or part of the technical solutions may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The terms "first," "second," and the like, in this application, are used for distinguishing between similar items and items that have substantially the same function or similar functionality, and it is to be understood that "first" and "second" do not have a logical or temporal dependency, nor do they define a quantity or order of execution. It will be further understood that, although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first stream instance can be referred to as a second stream instance, and similarly, a second stream instance can be referred to as a first stream instance, without departing from the scope of the various examples. Both the first stream instance and the second stream instance can be stream instances, and in some cases, can be separate and distinct stream instances.
The term "at least one" in this application means one or more, and the term "plurality" in this application means two or more.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (27)

1. A method for processing a packet, the method being applied to a first device, the method comprising:
acquiring a first message, wherein the first message comprises data transmitted by a stream instance based on a QUIC protocol;
obtaining mark information corresponding to the stream instance;
adding the marking information to the first message to obtain a second message;
and sending the second message, wherein the marking information is used for processing the second message by the forwarding equipment receiving the second message based on the marking information.
2. Method according to claim 1, characterized in that said marking information is used for marking said stream instances within a QUIC connection or said marking information is used for marking within said QUIC connection the type of said stream instances belonging to the stream instances marked by said marking information.
3. The method according to claim 1 or 2, wherein the adding the tag information to the first packet comprises:
and adding the marking information in a first field of a first outer layer message header of the first message.
4. The method according to claim 3, wherein the first outer header is an internet protocol version six IPv6 header, and the first field is a flow label field; alternatively, the first and second liquid crystal display panels may be,
the first outer layer message header is an internet protocol fourth version IPv4 header, and the first field is an option field.
5. The method according to any one of claims 1 to 4, wherein said obtaining the tag information corresponding to the stream instance comprises:
and obtaining the mark information of the stream instance, wherein the mark information of the stream instance comprises the related information of the stream instance.
6. The method according to any one of claims 1 to 4, wherein said obtaining the tag information corresponding to the stream instance comprises:
and generating the mark information according to the related information of the stream instance and a random algorithm.
7. The method according to claim 5 or 6, wherein the related information comprises at least one of: the type of the data, the characteristic information of the stream instance, the path identification associated with the stream instance and the index information of the stream instance, wherein the index information of the stream instance is used for indicating the stream instance in the QUIC connection.
8. The method according to claim 6, wherein said generating said tag information according to said stream instance related information and a random algorithm comprises:
generating the mark information according to the identification of the stream instance and the random algorithm; alternatively, the first and second electrodes may be,
generating the mark information according to the identification of the stream instance, the source address and the destination address of the first message and the random algorithm; alternatively, the first and second electrodes may be,
and generating the mark information according to the identification of the stream instance, the quintuple information of the first message and the random algorithm.
9. The method according to any one of claims 1 to 4, characterized in that said stream instances are bidirectional stream instances;
the obtaining of the mark information corresponding to the stream instance comprises:
acquiring a third message transmitted based on the stream instance, wherein the third message is transmitted along a first direction, the second message is transmitted along a second direction, and the first direction is opposite to the second direction;
and acquiring the marking information in an outer layer message header of the third message.
10. The method according to any of claims 1-4, wherein the first packet comprises a QUIC packet encapsulated with a second outer layer packet header;
the obtaining of the mark information corresponding to the stream instance comprises:
acquiring the content of a second field of the second outer layer message header, wherein the content of the second field is used for marking the stream instance;
and obtaining the mark information of the stream instance according to the content of the second field.
11. The method according to claim 9 or 10, characterized in that said flag information comprises information related to said stream instances, said related information comprising at least one of the following: the type of the data, the characteristic information of the stream instance, the path identification associated with the stream instance and the index information of the stream instance, wherein the index information of the stream instance is used for indicating the stream instance in the QUIC connection.
12. The method according to any of claims 1-11, wherein said obtaining a first message comprises:
generating the first message, wherein the first message is a QUIC message based on a QUIC protocol; alternatively, the first and second electrodes may be,
and receiving the first message, wherein the first message comprises a QUIC message encapsulated with a third outer layer message header.
13. The method of any of claims 1-12, wherein the first device is a host or a network device.
14. The method according to any of claims 1-13, wherein the first device is a network leaf node or a network spine node, the network leaf node being connected to the network spine node.
15. A method for processing a packet, the method being applied to a second device, the method comprising:
acquiring a message, wherein the message comprises data transmitted by a stream instance of a stream based on a QUIC protocol, and an outer layer message header of the message comprises mark information corresponding to the stream instance;
and processing the message based on the marking information.
16. The method of claim 15, wherein the processing the packet based on the tag information comprises:
and forwarding the message based on the marking information and the destination address in the outer layer message header.
17. The method of claim 15, wherein the processing the packet based on the tag information comprises:
performing hash calculation according to the marking information to obtain a hash value;
determining a forwarding path for forwarding the message in a plurality of equivalent forwarding paths based on the hash value;
and forwarding the message according to the determined forwarding path.
18. Method according to any of claims 15-17, characterized in that said marking information is used for marking said stream instances within a QUIC connection or said marking information is used for marking within said QUIC connection the type of said stream instances belonging to the stream instance marked by said marking information.
19. The method according to any of claims 15-18, wherein the label information is included in a field of an outer header of the packet; wherein the content of the first and second substances,
the outer layer message header is an internet protocol sixth version IPv6 header, and the field is a flow label field; alternatively, the first and second electrodes may be,
the outer layer message header is an IPv4 header of the fourth version of the Internet protocol, and the field is an option field.
20. The method of claim 19, wherein the tag information comprises information related to the stream instance, the information related to at least one of: the type of the data, the characteristic information of the stream instance, the path identification associated with the stream instance and the index information of the stream instance, wherein the index information of the stream instance is used for indicating the stream instance in the QUIC connection.
21. The method of any of claims 15-20, wherein the second device is a host or a network device.
22. The method according to any of claims 15-21, wherein the second device is a network leaf node or a network spine node.
23. A system for processing messages, the system comprising a first device and a second device, wherein,
the first device is used for acquiring a first message, wherein the first message comprises data transmitted by a stream instance based on a QUIC protocol; obtaining mark information corresponding to the stream instance; adding the marking information to the first message to obtain a second message, wherein an outer layer message header of the second message comprises the marking information; sending the second message;
the second device is configured to obtain the second packet; and processing the second message based on the marking information.
24. A communication device, characterized in that the device comprises a processor and a memory, in which at least one computer instruction is stored, which computer instruction is executed by the processor to trigger the communication device to implement the method of processing a message according to any one of claims 1-14.
25. A computer-readable storage medium having stored therein at least one computer instruction for execution by a processor of a communication device to trigger the communication device to implement a method of processing a message as claimed in any one of claims 1 to 14.
26. A communication device, characterized in that the device comprises a processor and a memory, in which at least one computer instruction is stored, which computer instruction is executed by the processor to trigger the communication device to implement the method of processing messages according to any one of claims 15-22.
27. A computer-readable storage medium having stored therein at least one computer instruction for execution by a processor of a communication device to trigger the communication device to implement a method of processing a message as claimed in any one of claims 15 to 22.
CN202111467765.2A 2021-09-18 2021-12-03 Method, system, device and storage medium for processing message Pending CN115842876A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/118234 WO2023040782A1 (en) 2021-09-18 2022-09-09 Message processing method and system, and device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2021111129618 2021-09-18
CN202111112961 2021-09-18

Publications (1)

Publication Number Publication Date
CN115842876A true CN115842876A (en) 2023-03-24

Family

ID=85574571

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111467765.2A Pending CN115842876A (en) 2021-09-18 2021-12-03 Method, system, device and storage medium for processing message

Country Status (2)

Country Link
CN (1) CN115842876A (en)
WO (1) WO2023040782A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10791485B2 (en) * 2018-10-16 2020-09-29 Cisco Technology, Inc. Systems and methods for quick user datagram protocol internet connection (QUIC) with multipath
CN113365267A (en) * 2020-03-06 2021-09-07 华为技术有限公司 Communication method and device
CN113365369A (en) * 2020-03-06 2021-09-07 华为技术有限公司 Communication method and device
CN112039884B (en) * 2020-08-31 2022-05-31 浪潮云信息技术股份公司 Application method of quick interconnection protocol QUIC in distributed database system

Also Published As

Publication number Publication date
WO2023040782A1 (en) 2023-03-23

Similar Documents

Publication Publication Date Title
CN109861924B (en) Message sending and processing method and device, PE node and node
US7738457B2 (en) Method and system for virtual routing using containers
US20220078114A1 (en) Method and Apparatus for Providing Service for Traffic Flow
WO2017137004A1 (en) Method and apparatus for service function forwarding in a service domain
US7486674B2 (en) Data mirroring in a service
CN112311673B (en) Use and processing per-slice segment identifiers in networks employing segment routing
RU2704714C1 (en) Technologies using ospf for providing maximum depth of node and/or communication link segment identifier
CN113691448B (en) SRv6 method for forwarding message in service chain, SFF and SF device
US9445384B2 (en) Mobile device to generate multiple maximum transfer units and data transfer method
WO2018036254A1 (en) Packet forwarding method and device
US11949590B1 (en) Maintaining processing core affinity for fragmented packets in network devices
JP2016508682A (en) Method and arrangement for differentiating VPN traffic across domains by QOS
US20220417323A1 (en) In-band protocol-based in-network computation offload framework
CN112134776A (en) Method for generating multicast forwarding table item and access gateway
US20170048103A1 (en) Communication apparatus, communication method, and communication system
WO2022048418A1 (en) Method, device and system for forwarding message
CN112822097A (en) Message forwarding method, first network device and first device group
US20150372924A1 (en) Network routing overlay
WO2021147372A1 (en) Method, apparatus, and system for transmitting sr message
US20230216792A1 (en) Method for Generating Routing Information, Method for Sending Location Information, Method for Forwarding Packet, and Device
CN113965518A (en) Message processing method and device
US11637775B2 (en) Methods and systems for location identifier based forwarding
WO2022007550A1 (en) Load balancing method, apparatus, network device, and system
WO2023040782A1 (en) Message processing method and system, and device and storage medium
CN116319535A (en) Path switching method, path switching device, network equipment and network system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication