WO2023040782A1 - 处理报文的方法、***、设备和存储介质 - Google Patents

处理报文的方法、***、设备和存储介质 Download PDF

Info

Publication number
WO2023040782A1
WO2023040782A1 PCT/CN2022/118234 CN2022118234W WO2023040782A1 WO 2023040782 A1 WO2023040782 A1 WO 2023040782A1 CN 2022118234 W CN2022118234 W CN 2022118234W WO 2023040782 A1 WO2023040782 A1 WO 2023040782A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
stream
stream instance
tag information
instance
Prior art date
Application number
PCT/CN2022/118234
Other languages
English (en)
French (fr)
Inventor
张永康
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023040782A1 publication Critical patent/WO2023040782A1/zh

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

Definitions

  • the present application relates to the technical field of data transmission, in particular to a method, system, device and storage medium for processing messages.
  • QUIC is a secure transport protocol based on User Datagram Protocol (UDP).
  • UDP User Datagram Protocol
  • QUIC runs on UDP and is highly integrated with Transport Layer Security (TLS) 1.3.
  • TLS Transport Layer Security
  • QUIC provides Control protocol (transmission control protocol, TCP) similar reliability, congestion control and other functions.
  • QUIC messages are encrypted before transmission, and forwarding devices on the data transmission path cannot distinguish stream instances in the QUIC protocol.
  • the present application provides a method, system, device and storage medium for processing messages, so that forwarding devices on a transmission path can distinguish stream instances in the QUIC protocol.
  • the present application provides a method for processing a message, which is applied to a first device.
  • the method includes: obtaining a first message, where the first message includes data transmitted by a stream instance based on the QUIC protocol; The tag information corresponding to the stream instance; add tag information to the first message to obtain the second message; send the second message, and the tag information is used by the forwarding device that receives the second message to process the second message based on the tag information .
  • the first message is obtained, the first message includes the data transmitted by the stream instance based on the QUIC protocol, and the tag information of the stream instance is determined. Adding the tag information to the first packet, obtaining the second packet, and sending the second packet so that the forwarding device that receives the second packet processes the second packet based on the tag information. In this way, since the forwarding device that receives the message can recognize the tag information corresponding to the stream instance, it can distinguish the stream instance, and then can process the message based on the stream instance.
  • the marking information is used to mark the stream instance in the QUIC connection, or the marking information is used to mark the type of the stream instance in the QUIC connection, and the stream instance belongs to the A marked stream instance.
  • each tag information indicates a stream instance, or each tag information indicates a class of stream instances.
  • adding the tag information to the first packet includes: adding the tag information to a first field of a first outer packet header of the first packet.
  • the first packet currently has a first outer packet header, and the first field of the first outer packet header is modified so that the first field includes the tag information of the stream instance, or the first packet
  • the first outer layer header does not currently exist in the text, and the first outer layer header is encapsulated for the first packet, and the first field includes the tag information of the stream instance.
  • the tag information can be carried in the outer packet header in various ways.
  • the first outer packet header is an Internet protocol version 6 (internet protocol version6, IPv6) packet header, and the first field is a flow label (flow label) field; or, the first outer packet
  • the layer header is an Internet protocol version 4 (IPv4) header, and the first field is an option field.
  • obtaining tag information corresponding to the stream instance includes: obtaining tag information of the stream instance, where the tag information of the stream instance includes related information of the stream instance. In this way, the relevant information of the stream instance can be used to obtain the tag information corresponding to the stream.
  • obtaining the tag information corresponding to the stream instance includes: generating the tag information according to the relevant information of the stream instance and a random algorithm. In this way, tag information can be generated using a random algorithm.
  • the relevant information of the stream instance includes at least one of the following: the type of the data, the feature information of the stream instance, the path (path) identifier associated with the stream instance, and the index information of the stream instance , the index information of the stream instance is used to indicate the stream instance in the QUIC connection.
  • generating the tag information according to the relevant information of the stream instance and a random algorithm includes: generating the tag information according to the identifier of the stream instance and the random algorithm; or, according to the stream instance the identifier of the first message, the source address of the first message, the destination address and the random algorithm to generate the tag information; or, according to the identifier of the stream instance, the quintuple information of the first message and the random algorithm, generate the Tag information.
  • multiple ways can be used to obtain the tag information of the stream instance.
  • the stream instance is a bidirectional stream instance; obtaining the tag information corresponding to the stream instance includes: obtaining a third message transmitted based on the stream instance, the third message along the first For transmission in one direction, the second message is transmitted in a second direction, and the first direction is opposite to the second direction; the tag information is acquired in the outer message header of the third message.
  • the tag information of the stream instance can be obtained from the outer packet header of the received message, so that there is no need to repeatedly determine the tag information.
  • the first message includes a QUIC message encapsulated with a second outer message header; obtaining the tag information corresponding to the stream instance includes: obtaining the second outer message The content of the second field of the header, the content of the second field is used to mark the stream instance; the mark information of the stream instance is obtained according to the content of the second field.
  • 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.
  • the tag information includes related information of the stream instance, and the related information includes at least one of the following: the type of the data, feature information of the stream instance, the path identifier associated with the stream instance, and the The index information of the stream instance, which is used to indicate the stream instance in the QUIC connection.
  • the obtaining the first message includes: generating the first message, the first message is a QUIC message based on the QUIC protocol; or receiving the first message, the first The message includes a QUIC message encapsulated with a third outer message header.
  • the host may generate the first packet, or the devices on the forwarding path may receive the first packet.
  • the first device is a host or a network device.
  • the first device is a network leaf node, and the network leaf node is connected to the network spine node.
  • obtaining the tag information corresponding to the stream instance includes: determining the tag information of the stream instance based on the type of the data.
  • the type of data transmitted by the stream instance can be used. In this way, the tag information corresponding to the stream instance can be determined more flexibly.
  • the present application provides a method for processing a message, which is applied to a second device, and the method includes:
  • the message includes data transmitted by a stream instance based on the QUIC protocol, and the outer header of the message includes tag information corresponding to the stream instance; based on the tag information, the message is processed.
  • the tag information corresponding to the stream instance can be obtained in the outer message header. Use the tag information to distinguish the stream instance, and then process the stream instance accordingly.
  • processing the packet based on the tag information includes: forwarding the packet based on the tag information and the destination address in the outer packet header.
  • the tag information of the stream instance can be used to distinguish the stream instance, so the stream instance can be accurately processed based on the tag information.
  • the processing of the message based on the tag information includes: performing hash calculation according to the tag information to obtain a hash value; Determine the forwarding path for forwarding the message in the computer; forward the message according to the determined forwarding path. In this way, load balancing can be achieved when forwarding packets.
  • the marking information is used to mark the stream instance in the QUIC connection, or the marking information is used to mark the type of the stream instance in the QUIC connection, and the stream instance belongs to the A marked stream instance.
  • the label information is included in the field of the outer message header of the message; wherein, the outer message header is an IPv6 header, and the field is a flow label field; or, the outer The layer header is an IPv4 header, and this field is an option field.
  • the tag information includes related information of the stream instance, and the related information includes at least one of the following: the type of the data, feature information of the stream instance, the path identifier associated with the stream instance, and the The index information of the stream instance, which is used to indicate the stream instance in the QUIC connection.
  • the second device is a host or a network device.
  • the second device is a network leaf node or a network spine node.
  • the present application provides a device for processing a message, the device is applied to a first device, and the device includes: an acquisition module for acquiring a first message, the first message includes a QUIC-based The data transmitted by the stream instance of the protocol; the determination module is used to obtain the tag information corresponding to the stream instance; the adding module is used to add the tag information to the first message to obtain the second message; send A module, configured to send the second packet, and the tag information is used by a forwarding device that receives the second packet to process the second packet based on the tag information.
  • the marking information is used to mark the stream instance in the QUIC connection, or the marking information is used to mark the type of the stream instance in the QUIC connection, and the stream The instance belongs to the stream instance marked by the mark information.
  • the adding module is used for:
  • the first outer packet header is an IPv6 header
  • the first field is a flow label field
  • the first outer packet header is an IPv4 header, and the first field is an option field.
  • the determining module is configured to:
  • the tag information of the stream instance is obtained, and the tag information of the stream instance includes related information of the stream instance.
  • the determining module is configured to:
  • the tag information is generated according to the relevant information of the stream instance and a random algorithm.
  • the relevant information includes at least one of the following: the type of the data, feature information of the stream instance, a path identifier associated with the stream instance, and index information of the stream instance,
  • the index information of the stream instance is used to indicate the stream instance in the QUIC connection.
  • the determining module is configured to:
  • the tag information is generated according to the identifier of the stream instance, the quintuple information of the first packet, and the random algorithm.
  • the stream instance is a bidirectional stream instance; the determining module is configured to:
  • the third packet is transmitted along a first direction
  • the second packet is transmitted along a second direction
  • the first direction and the second direction are in the opposite direction
  • the first packet includes a QUIC packet encapsulated with a second outer packet header
  • the determining module is used for:
  • the tag information of the stream instance is obtained according to the content of the second field.
  • the tag information includes related information of the stream instance, and the related information includes at least one of the following: the type of the data, feature information of the stream instance, and the stream instance
  • the associated path identifier and the index information of the stream instance, the index information of the stream instance is used to indicate the stream instance in the QUIC connection.
  • the acquiring module is configured to generate the first message, where the first message is a QUIC message based on the QUIC protocol; or,
  • the first device is a host or a network device.
  • the first device is a network leaf node, and the network leaf node is connected to a network spine node.
  • the present application provides a device for processing a message, the device is applied to a second device, the device includes: a message acquisition module, configured to obtain a message, and the message includes a stream based on the QUIC protocol For the data transmitted by the instance, the outer header of the message includes tag information corresponding to the stream instance; the processing module is configured to process the message based on the tag information.
  • the processing module is configured to:
  • the packet is forwarded.
  • the processing module is configured to:
  • the marking information is used to mark the stream instance in the QUIC connection, or the marking information is used to mark the type of the stream instance in the QUIC connection, and the stream The instance belongs to the stream instance marked by the mark information.
  • the tag information is included in a field of an outer packet header of the packet; wherein,
  • the outer packet header is an IPv6 header, and the field is a flow label field; or,
  • the outer packet header is an IPv4 header, and the field is an option field.
  • the tag information includes related information of the stream instance, and the related information includes at least one of the following: the type of the data, feature information of the stream instance, and the stream instance
  • the associated path identifier and the index information of the stream instance, the index information of the stream instance is used to indicate the stream instance in the QUIC connection.
  • the second device is a host or a network device.
  • the second device is a network leaf node or a network spine node.
  • the present application provides a communication device, the device includes a processor and a memory, and at least one computer instruction is stored in the memory, and the computer instruction is loaded and executed by the processor to implement the above-mentioned first A method for processing packets provided in any optional manner of the aspect or the first aspect.
  • the present application provides a computer-readable storage medium, wherein 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 above-mentioned first aspect or first A method for processing packets provided by any optional mode of the aspect.
  • the present application provides a communication device, the device includes a processor and a memory, at least one computer instruction is stored in the memory, and the computer instruction is loaded and executed by the processor to realize the above-mentioned second A method for processing packets provided in any optional manner of the aspect or the second aspect.
  • the present application provides a computer-readable storage medium, wherein 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 realize the above-mentioned second aspect or second A method for processing packets provided by any optional mode of the aspect.
  • the present application provides a system for processing messages, the system including a first device and a second device, wherein the first device is used to: obtain a first message, and the first message includes The data transmitted by the stream instance of the QUIC protocol; Obtain the tag information corresponding to the stream instance; Add the tag information to the first message to obtain a second message, the outer layer report of the second message The header includes the tag information; the second message is sent; the second device is configured to: acquire the second message; and process the second message based on the tag information.
  • the present application provides a system for processing messages.
  • the system includes a first device and a second device, wherein the first device is used to implement the first aspect or any possible The method of processing the message provided by the selected mode;
  • the second device is configured to implement the packet processing method provided in the second aspect or any optional manner of the second aspect.
  • the present application provides a computer program product, the computer program product includes at least one computer instruction, and when the computer program product is run on the first device, the device realizes the above first aspect or any of the first aspects.
  • a method for processing packets provided by an optional method.
  • the present application provides a computer program product, the computer program product includes at least one computer instruction, and when the computer program product runs on the second device, the device realizes the second aspect or any of the second aspects.
  • a method for processing packets provided by an optional method.
  • the present application provides a chip, including a processor, configured to call and execute instructions stored in the memory from the memory, so that the communication device installed with the chip executes the methods in the above aspects.
  • the present application provides another chip, including: an input interface, an output interface, a processor, and a memory.
  • the input interface, the output interface, the processor, and the memory are connected through an internal connection path, and the processor is used to execute the memory in the memory.
  • the processor is used to execute the methods in the above aspects.
  • Fig. 1 is a schematic format diagram of a QUIC protocol stack provided by the embodiment of the present application
  • FIG. 2 is a schematic diagram of a multipath scenario provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a multipath implementation architecture provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of the format of an IPv6 header provided by the embodiment of the present application.
  • FIG. 5 is a schematic diagram of network transmission of data provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a device provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a device provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a method for processing a message provided in an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of a method for processing a message provided in an embodiment of the present application.
  • FIG. 10 is a schematic flowchart of a method for processing a message provided in an embodiment of the present application.
  • FIG. 11 is a schematic flowchart of a method for processing a message provided in an embodiment of the present application.
  • FIG. 12 is a schematic flowchart of a method for processing a message provided in an embodiment of the present application.
  • FIG. 13 is a schematic flowchart of a method for processing a message provided in an embodiment of the present application.
  • FIG. 14 is a schematic diagram of a load balancing provided by an embodiment of the present application.
  • FIG. 15 is a schematic diagram of a load balancing provided by an embodiment of the present application.
  • FIG. 16 is a schematic structural diagram of a device for processing messages provided by an embodiment of the present application.
  • FIG. 17 is a schematic structural diagram of an apparatus for processing packets provided by an embodiment of the present application.
  • QUIC is a reliable and secure transport protocol based on UDP.
  • the term QUIC was originally an abbreviation for Quick UDP Internet Connections (Quick UDP Internet Connections) proposed by GOOGLE, also known as gQUIC.
  • IETF Internet Engineering Task Force
  • this abbreviation was no longer used, and QUIC was considered to be a name, not an acronym (QUIC is a name, not an acronym).
  • RRC Request for Comments
  • the method provided in the embodiment of the present application can be applied to gQUIC, and can also be applied to the QUIC standardized by the IETF, that is, the QUIC referred to in the embodiment of the present application, which can be gQUIC or the QUIC standardized by the IETF.
  • Figure 1 shows the protocol stack of QUIC.
  • QUIC runs on UDP, is highly integrated with TLS1.3, and provides functions such as reliability and congestion control similar to TCP.
  • the traditional hypertext transfer protocol hypertext transfer protocol (hyper text transfer protocol, HTTP) protocol stack, from top to bottom are application (application), TLS, TCP and Internet protocol (internet protocol, IP), application is HTTP/1.1, HTTP/2, or border gateway protocol (BGP).
  • application application
  • TLS Internet protocol
  • IP Internet protocol
  • IP Internet protocol
  • application Internet protocol
  • application Internet protocol
  • application is HTTP/1.1, HTTP/2, or border gateway protocol (BGP).
  • Border gateway protocol Border gateway protocol
  • the protocol stack of the QUIC protocol From top to bottom, it is application, QUIC, UDP, and IP.
  • the application is HTTP/3 or BGP.
  • TLS1.3 is integrated in QUIC.
  • QUIC In addition to providing reliability and congestion control functions similar to TCP, QUIC also provides the following enhancements:
  • Stream multiplexing refers to the simultaneous transmission of multiple byte streams in a single QUIC connection (connection), each byte stream is called a stream (stream).
  • the QUIC connection is used to establish the shared state required for data transfer between two subjects.
  • a security context required for data transmission such as identity authentication, confidentiality protection, and integrity protection
  • stream is used to provide data transmission services in the security context provided by the QUIC connection.
  • Path refers to a transmission route between the client and the server, which is uniquely identified by five-tuple information, which includes source address, destination address, source port, destination port and protocol, here The address can be an IP address.
  • the address can be an IP address.
  • the protocol in the five-tuple information is specified as UDP.
  • a QUIC connection uses a connection ID to uniquely identify it.
  • the full English name of ID is identity, that is, the connection ID of each QUIC connection is different.
  • the connection IDs of different QUIC connections are different.
  • each stream is uniquely identified using the stream identifier.
  • the length of the stream identifier is 64 bits (bit), wherein the lowest 2 bits identify the type of the stream.
  • the stream identifier consists of two parts, namely the type of stream (the lowest 2 bits) and the index of the stream (index) (the remaining 62 bits), which means that each connection can create 4 different types of streams, 4 types Different types of streams are the bidirectional stream type created by the client, the bidirectional stream type created by the server, the unidirectional stream type created by the client, and the unidirectional stream type created by the server.
  • the number of streams that can be created by each type of stream is 2 62 -1, and each stream can independently provide data transmission services for an application.
  • a stream corresponds to a stream instance.
  • the stream instance is a distributed entity, which is distributed on both the client and the server.
  • the stream instance is uniquely identified by (connection ID, stream ID). Within the scope of a connection, use the stream ID is uniquely identified.
  • the stream instance is used to transmit an ordered stream of bytes.
  • Each stream instance is similar to a node in the stream data structure, which is an internal data structure of the specified connection instance, and the connection instance is also a distributed entity of the QUIC connection, which is distributed on both the client and the server.
  • the connection ID, stream type, stream identifier, receiving buffer, sending buffer, and running status of the connection instance to which it belongs are maintained.
  • the stream identifier of the stream instance may also be simply referred to as the identifier of the stream instance.
  • the stream in this application is different from the usual flow.
  • the stream in this application is the byte stream in the QUIC connection, which is identified by the stream ID, while the usual flow is mainly for the forwarding layer.
  • Different flows can use different five-tuple information identifiers, and can also use different three-tuple information identifiers.
  • the five-tuple information includes source address, destination address, protocol, source port, and destination port.
  • the triple information includes source address , destination address and protocol.
  • 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.
  • FIG. 2 shows a schematic diagram of a multi-path scenario.
  • a user terminal user equipment, UE simultaneously accesses a mobile network and a cellular network (cellular network).
  • UE user equipment
  • the mobile network includes the 4Generation mobile communication technology (4Generation mobile communication technology, 4G ) or the fifth generation mobile communication technology (the 5Generation mobile communication technology, 5G), etc., and the cellular network includes a wireless-fidelity (wireless-fidelity, WIFI) network, etc.
  • the client of the UE uses different IP addresses to access the server under the mobile network and WIFI.
  • the five-tuple information for the UE to access the server under the mobile network is (1.1.1.1, xx, UDP, 3.3.3.3, zz), and the UE is in The five-tuple information for accessing the server under WIFI is (2.2.2.2, yy, UDP, 3.3.3.3, zz), where 1.1.1.1 and 2.2.2.2 are the IP addresses of the UE, and 3.3.3.3 is the IP address of the server. xx and yy are the UDP ports of the client, and zz is the UDP port of the server. In this way, using multi-path, only one QUIC connection is established between the client and the server, and data can be transmitted in parallel on multiple paths at the same time.
  • the stream is responsible for data transmission, and the path is the data transmission path.
  • the data transmitted by the stream is associated with the path to send the stream data.
  • the multi-path scheduler can be used to associate stream data with paths to send data.
  • FIG. 3 shows a schematic diagram of a multipath implementation architecture. As shown in Figure 3, the three streams transmit the application data to the multi-path scheduler, and the multi-path scheduler schedules the data transmitted by the three streams to two paths for transmission.
  • the ways in which the multi-path scheduler associates the data sent by the stream with the path include the following:
  • Traffic streering is used to associate the stream with the path by the multi-path scheduler according to the policy when creating a new stream.
  • the mapping relationship between stream and path is 1:1, P:1 or P:Q, and both P and Q are positive integers greater than 1.
  • the mapping relationship between stream and path is N:M
  • multi -The path scheduler can use the current load of the path to select a path with less load to send stream data.
  • Traffic switching is used to achieve load balancing of each path. For example, during the operation of 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 achieve load balancing of each path.
  • Traffic splitting which is used to split a large amount of data to be sent to multiple paths. For example, if a certain stream has a lot of data and requires relatively high transmission performance, multiple paths can be used to transmit the data of this stream at the same time, that is, the ratio of stream to path is 1:P.
  • a QUIC message includes a header (Header) and a payload (payload).
  • the header of a QUIC message includes a long header (long Header) format and a short header (short Header) format. highest bit to distinguish.
  • the header field of the QUIC message is encrypted, and the entire payload of the QUIC message is encrypted.
  • QUIC uses STREAM frames to encapsulate application data.
  • a stream identifier is used to uniquely identify a stream, and the stream identifier is also encapsulated in a STREAM frame.
  • QUIC defines a variety of message types, including initial (initial) 0-round-trip time (round-trip time, RTT) and handshake (handshake) 1-RTT.
  • the initial 0-RTT and handshake 1-RTT packets are allowed to carry STREAM frames.
  • the STREAM frame is located in the payload part of the 0-RTT and 1-RTT packets.
  • the application data can also be encapsulated using other QUIC frame types except the STREAM frame.
  • QUIC provides the function of unreliable transmission services (such as for transmitting real-time video streams).
  • the datagram (DATAGRAM ) frames encapsulate application data.
  • the QUIC message is encrypted before being transmitted.
  • Fig. 4 shows the format of the IPv6 header of the IPv6 packet.
  • the flow label is a field in the IPv6 header with a length of 20 bits.
  • the flow label is not protected by the checksum security protocol. Therefore, the flow label is transmitted in clear text, and any modification during the forwarding process will not be detected.
  • an IPv6flow is identified by the quintuple information of the packet, but in scenarios such as packet fragmentation, not every IPv6 packet contains complete quintuple information.
  • a flow label appears, which is used to identify an IPv6flow.
  • IPv6 flow can be uniquely identified using the flow label, source address, and destination address.
  • QUIC messages are encrypted before transmission, and the forwarding device on the data transmission path cannot distinguish the stream instances in the QUIC message, so it cannot be based on different stream instances
  • Do some policy processing is load sharing, and QUIC's stream multiplexing mechanism is adopted.
  • Source host 1 uses two stream instances (stream instance 1 and stream instance 2) to send data to destination host 2 at the same time.
  • ECMP equal-cost multi-path
  • the STREAM frame used to encapsulate application data in stream instance 1 and stream instance 2 is encrypted for transmission.
  • the forwarding device in the network is forwarding the QUIC message.
  • the stream instance cannot be identified, and load balancing cannot be performed based on the stream instance.
  • load sharing is usually performed only based on quintuple information. Since the packets corresponding to stream instance 1 and the packets of stream instance 2 Have the same quintuple information, so the two stream instances always choose the same forwarding path (provider edge device (provider edge, PE) 1--> provider device (provider, P) 1-->P3- ->PE2), see the dotted line in Figure 5.
  • the content that can identify the stream instance is mapped to the specified location of the message, and the forwarding device in the network can read the content at the specified location, so that the forwarding device can implement a processing strategy based on the stream instance.
  • the forwarding device here may also be referred to as a network device in the network, such as a router or a switch.
  • the device for processing a message may be a device for generating a message, or a device for forwarding a message.
  • the device that processes the message is the host. After the host generates the QUIC message, it determines the tag information of the stream instance and adds the tag information to the flow label of the IPv6 header. The device that processes the message is the device that generates the message.
  • the device for processing messages is a forwarding device that forwards messages in the network, and the forwarding device is the ingress device of the tunnel. After the forwarding device receives the QUIC message encapsulated with an IP header, the forwarding device will send the tag information of the stream instance, Added to the tunnel header, the device that processes the message is the device that forwards the message.
  • FIG. 6 shows a schematic structural diagram of the device.
  • the device 600 includes 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 general-purpose central processing unit (central processing unit, CPU), a network processor (network processor, NP), a graphics processing unit (Graphics Processing Unit, GPU), a neural network processor (neural-network processing units, NPU) ), a data processing unit (Data Processing Unit, DPU), a microprocessor, or one or more integrated circuits used to implement the solution of this application.
  • the processor 601 includes an application-specific integrated circuit (application-specific integrated circuit, ASIC), a programmable logic device (programmable logic device, PLD) or a combination thereof.
  • the PLD is, for example, a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), a general array logic (generic array logic, GAL) or any combination thereof.
  • complex programmable logic device complex programmable logic device, CPLD
  • field-programmable gate array field-programmable gate array
  • GAL general array logic
  • Communication bus 602 is used to transfer information between the above-described components.
  • the communication bus 602 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 6 , but it does not mean that there is only one bus or one type of bus.
  • Memory 603 is, for example, a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (random access memory, RAM) or a memory that can store information and instructions.
  • Other types of dynamic storage devices such as electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc Storage (including Compact Disc, Laser Disc, Optical Disc, Digital Versatile Disc, Blu-ray Disc, etc.), magnetic disk storage medium, or other magnetic storage device, or is capable of carrying or storing desired program code in the form of instructions or data structures and capable of Any other medium accessed by a computer, but not limited to.
  • the memory 603 exists independently, for example, and is connected to the processor 601 through the communication bus 602 .
  • the memory 603 can also be integrated with the processor 601 .
  • the memory 603 is used to store transmitted data and the like.
  • Network interface 604 uses any transceiver-like device 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 an Ethernet interface, for example.
  • the Ethernet interface can be an optical interface, an electrical interface or a combination thereof.
  • the wireless network interface may be a wireless local area network (wireless local area networks, WLAN) interface, a network interface of a cellular network, or a combination thereof.
  • the processor 601 may include one or more CPUs.
  • device 600 may include multiple processors. Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data such as computer program instructions.
  • the device 600 may further include an output device and an input device.
  • Output devices are in communication with processor 601 and can display information in a variety of ways.
  • the output device may be a liquid crystal display (liquid crystal display, LCD), a light emitting diode (light emitting diode, LED) display device, a cathode ray tube (cathode ray tube, CRT) display device, or a projector (projector).
  • the input device communicates with the processor 601 to receive user input in a variety of ways.
  • the input device may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
  • the memory 603 is used to store program code 6031 for executing message processing in this application, and the processor 601 executes the program code 6031 stored in the memory 603 . That is, the device 600 can use the processor 601 and the program code 6031 in the memory 603 to implement the method for processing packets provided by the method embodiment.
  • FIG. 7 shows another schematic structural diagram of the device.
  • the device 700 includes a main control board 710 and an interface board 720 .
  • the main control board 710 is also called a main processing unit (main processing unit, MPU) or a route processing card (route processor card). , equipment maintenance, protocol processing functions.
  • the main control board 710 includes: a first CPU 711 and a memory 712 .
  • the interface board 720 is also called a line interface unit card (line processing unit, LPU), a line card (line card), or a service board.
  • the interface board 720 is used to provide various service interfaces and implement forwarding of data packets.
  • the service interface includes but is not limited to an Ethernet interface, a POS (packet over sONET/SDH) interface, etc., and the Ethernet interface is, for example, a flexible ethernet service interface (flexible ethernet clients, FlexE clients).
  • the interface board 720 includes: a second central processing unit 721 , a network processor 722 , a forwarding entry storage 724 and a physical interface card (physical interface card, PIC) 723 .
  • the second CPU 721 is used to control and manage the interface board 720 and communicate with the first CPU 711 .
  • the network processor 722 is configured to implement message forwarding processing.
  • the form of the network processor 722 is, for example, a forwarding chip.
  • the network processor 722 is used to forward the received message based on the forwarding table stored in the forwarding table item memory 724, and if the destination address of the message is the address of the device 700, then send the message to the CPU (such as first central processing unit 711) 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 outbound interface corresponding to the destination address.
  • the processing of the uplink message includes: the processing of the inbound interface of the message, the forwarding table search; the processing of the downlink message: the forwarding table search and so on.
  • the physical interface card 723 is used to realize the interconnection function of the physical layer, through which the original traffic enters the interface board 720 , and the processed packets are sent out from the physical interface card 723 .
  • the physical interface card 723 is also called a daughter card, which can be installed on the interface board 720, and is responsible for converting the photoelectric signal into a message, checking the validity of the message and forwarding it to the network processor 722 for processing.
  • the central processor can also perform the functions of the network processor 722 , such as implementing software forwarding based on a general-purpose CPU, so that the physical interface card 723 does not need the network processor 722 .
  • the device 700 includes a plurality of interface boards 720 .
  • the device 700 further includes a switching fabric unit 730 .
  • the SFU 730 is also called, for example, a switch fabric unit (SFU).
  • SFU switch fabric unit
  • the switching fabric board 730 is used to complete data exchange between the interface boards.
  • the two interface boards 720 communicate through the switching fabric board 730 .
  • the main control board 710 is coupled to the interface board 720 .
  • the main control board 710, the two interface boards 720, and the switching fabric board 730 are connected to the system backplane through the system bus to realize intercommunication.
  • an inter-process communication protocol IPC
  • IPC inter-process communication
  • the device 700 includes a control plane and a forwarding plane.
  • the control plane includes a main control board 710 and a central processing unit.
  • the forwarding plane includes various components for performing forwarding, such as a forwarding entry storage 724, a physical interface card 723, and a network processor 722. .
  • the control plane executes routers, generates forwarding tables, processes signaling and protocol packets, configures and maintains device status, and other functions.
  • the control plane sends the generated forwarding tables to the forwarding plane.
  • the network processor 722 The issued forwarding table looks up and forwards the packets received by the physical interface card 723 .
  • the forwarding table delivered by the control plane is saved in the forwarding table item storage 724, for example.
  • the control plane and the forwarding plane are, for example, completely separated and not on the same device.
  • main control boards there may be one or more main control boards, and when there are multiple main control boards, for example, it includes an active main control board and a standby main control board.
  • the network device can have at least one SFU, through which the data exchange between multiple interface boards can be realized, and large-capacity data exchange and processing capabilities can be provided. Therefore, the data access and processing capabilities of network devices with a distributed architecture are greater than those with a centralized architecture.
  • the form of the network device can also be that there is only one board, that is, there is no switching fabric board, and the functions of the interface board and the main control board are integrated on this board.
  • the central processing unit and the main control board on the interface board The central processing unit on the board can be combined into one central processing unit on the board to perform the superimposed functions of the two.
  • the data exchange and processing capabilities of this form of equipment are low (for example, low-end switches or routers and other network equipment). Which architecture to use depends on the specific networking deployment scenario, and there is no limitation here.
  • the execution subject is the first device as an example for illustration.
  • the device is a host, a mobile terminal, a server, a network device in the network, etc., 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.
  • the first device adds tag information corresponding to the stream instance to the message, so that other devices process the message based on the tag information corresponding to the stream instance added in the message.
  • the first device may also process the message based on the tag information corresponding to the stream instance added in the message.
  • FIG. 8 includes step 801 to step 804 .
  • a first packet is acquired, and the first packet includes data transmitted by a stream instance based on the QUIC protocol.
  • the embodiment of the present application uses the first stream instance based on the QUIC protocol as an example for illustration.
  • the first stream instance is any stream instance in a certain QUIC connection, and the QUIC connection is a connection created based on the QUIC protocol.
  • a QUIC connection is a QUIC connection established between a data sender and a data receiver.
  • the first device acquires the first packet.
  • the first device receives the first packet.
  • the first device generates the first packet.
  • Step 802 obtain tag information corresponding to the stream instance.
  • the tag information of the stream instance is used to distinguish the stream instance, and different types of stream instances correspond to different tag information of the stream instance, for example, the tag information of the first stream instance is used to mark a type of stream in a QUIC connection Instance, the stream instance of this type includes the first stream instance, each type of stream instance can include multiple stream instances, for example, each type of stream instance is used to transmit a type of data, and the type of data includes video, voice and text etc.
  • the marking information of the first stream instance uniquely marks the first stream instance within the QUIC connection.
  • the tag information of the first stream instance may include relevant information of the first stream instance, and the processing of step 802 may be:
  • the tag information of the first stream instance is obtained, and the tag information of the first stream instance includes related information of the first stream instance.
  • the first device may obtain the tag information of the first stream instance by obtaining the relevant information of the first stream instance.
  • the tag information includes information about the first stream instance.
  • the relevant information includes at least one of the following items: the type of data transmitted by the first stream instance (the type includes video, voice and text, etc.), the feature information of the first stream instance, the path identifier associated with the first stream instance, and the first stream instance Index information of a stream instance.
  • the index information of the first stream instance is used to indicate the first stream instance in the QUIC connection to which the first stream instance belongs.
  • the feature information can optionally be the specified bit in the stream identifier of the first stream instance, and the feature information can optionally be the content obtained based on the stream identifier hash of the first stream instance.
  • the embodiment of the present application does not specify the content of the feature information limited.
  • the index information may be randomly assigned, or may be a hash value, or may be sequentially assigned to different stream instances.
  • Step 803 Add tag information to the first packet to obtain a second packet.
  • the first device after determining the tag information related to the first stream instance, adds the tag information to the first packet to obtain the second packet.
  • the tag information added to the first packet is added to the outer packet header of the second packet, and the network device forwarding the second packet in the network can read the tag information. For example, it is set in the flow label field of the IPv6 message, and for example, it is set in the option field of the IPv4 message.
  • Step 804 Send the second packet, and the tag information is used by the forwarding device that receives the second packet to process the second packet based on the tag information.
  • the forwarding device may be a router or a switch in the network.
  • the first device after obtaining the second packet, the first device sends the second packet outward.
  • the forwarding device in the network that receives the second packet processes the second packet based on the tag information. For this process, refer to the flow shown in FIG. 13 below.
  • the tag information of the first stream instance is added to the position that the forwarding device can read, and it is unencrypted, so that the forwarding device can implement corresponding policies on the message during the message forwarding process.
  • the first device is a device that generates the first packet, and the first packet is a QUIC packet.
  • the first device is a host or the like.
  • the first device is a forwarding device for forwarding packets in the network.
  • the first device is a router or a switch in the network.
  • FIG. 9 includes steps 901 to 904.
  • Step 901 generate a QUIC message, the QUIC message includes the data transmitted by the first stream instance.
  • the first device serves as the data sending end, and the first device establishes a QUIC connection with the data receiving end.
  • the first device creates the first stream instance in the QUIC connection and generates a QUIC message.
  • the QUIC message includes the data transmitted by the first stream instance in the QUIC connection. That is to say, the payload part of the QUIC message includes the first stream instance.
  • the STREAM frame which includes the data to be transmitted and the stream identifier.
  • the first device encapsulates the UDP packet header in the outer layer of the QUIC packet to obtain the UDP packet. In the process shown in FIG. 9, the first packet is a QUIC packet.
  • Step 902 obtain tag information corresponding to the first stream instance.
  • the first way is a structured allocation method, for example, it is specified that the tag information occupies N bits, and N is greater than 1, and the definition of each bit part in the N bits is specified.
  • the second method is a random allocation method. For example, for the first stream instance, use some random algorithm to generate random and unique tag information. The random algorithm can be found in RFC4096 and so on.
  • Method 1 Determine the type of data transmitted by the first stream instance, the feature information and index information of the first stream instance, the index information is used to uniquely indicate the first stream instance in the QUIC connection to which the first stream instance belongs, and the data
  • the type, the first characteristic information and the index information are determined as the tag information of the first stream instance.
  • the type of data transmitted by the first stream instance is determined, and the type is used to indicate which one of voice data, image data and text data the data is.
  • the feature information may optionally be a specified bit in the stream identifier of the first stream instance.
  • the feature information may be obtained based on the hash of the stream identifier of the first stream instance.
  • This application does not specifically limit the content of the characteristic information.
  • the index information uniquely indicates the first stream instance in the QUIC connection to which the first stream instance belongs.
  • the index information can be assigned randomly, or can be a hash value, or can be a continuous value assigned sequentially to different stream instances.
  • the number of bits occupied by the data type is the same, 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 data type, characteristic information and the index information as tag information of the first stream instance.
  • the first device generates tag information of the first stream instance according to the data type, characteristic information, and the index information. For example, the first device inputs the data type, feature information, and index information into a random algorithm to generate tag information of the first stream instance.
  • Method 2 Generate the tag information according to the relevant information of the first stream instance and a random algorithm.
  • the first device acquires relevant information of the first stream instance, and inputs the relevant information into a preset random algorithm, and the output of the random algorithm is the tag information of the first stream instance.
  • the relevant information includes at least one of the following: the type of data transmitted by the first stream instance, the feature information of the first stream instance, the path identifier associated with the first stream instance, and the index information of the first stream instance, the first The index information of the stream instance is used to indicate the first stream instance in the QUIC connection.
  • the relevant information of the first stream instance includes the stream identifier of the first stream instance, which is generated when the first stream instance is created, and uniquely indicates the first stream instance in the QUIC connection.
  • the stream identifier of the first stream instance is input into a preset random algorithm to obtain an output value, which is the tag information of the first stream instance.
  • the relevant information of the first stream instance includes the stream identifier of the first stream instance, the source address and the destination address of the first message
  • the source address of the first message may be the IP address of the data sender
  • the destination address may be The IP address of the data receiving end of the first packet.
  • the relevant information of the first stream instance includes an identifier of the first stream instance, 5-tuple information of the first packet, and the 5-tuple information includes source address, destination address, protocol, source port, and destination port.
  • the stream identifier of the first stream instance and the quintuple information of the first message into the preset random algorithm to obtain an output value, which is the tag information of the first stream instance .
  • the relevant information of the first stream instance includes the type of data transmitted by the first stream instance.
  • the type of data is input into a preset random algorithm to obtain an output value, which is the tag information of the first stream instance.
  • the above-mentioned relevant information about the first stream instance is only some illustrative examples, and any relevant information that can be used to distinguish the first stream instance can be applied to the embodiment of this application, and will not be repeated here An example.
  • the relevant information of the first stream instance includes the stream identifier of the first stream instance, since the stream identifier is unique within the QUIC connection, the tag information of the generated first stream instance is also in the QUIC connection to which it belongs only.
  • the relevant information of the first stream instance includes the type of data transmitted by the first stream instance, since the types of data transmitted by different stream instances may be the same, the generated tag information of the first stream instance and each The stream instance is the same.
  • Mode 3 The stream identifier of the first stream instance is determined as the tag information of the first stream instance.
  • Mode 4 Determine the tag information of the first stream instance based on the path associated with the first stream instance.
  • the first device determines the path associated with the first stream instance, processes the 5-tuple information of the path, and obtains the tag information of the first stream instance.
  • processing the five-tuple information of the path may include inputting the five-tuple information into a preset random algorithm.
  • the tag information of the first stream instance is unique within the QUIC connection. Assuming that the path associated with the first stream instance is associated with other stream instances, then the tag information of the first stream instance is the same as that of the other stream instances, that is to say, the stream instance associated with the path belongs to a type of stream instance.
  • Step 903 Add the tag information of the first stream instance to the QUIC message to obtain the second message.
  • the first device adds tag information to the UDP packet obtained in step 901, where the tag information is located in the first field of the first outer packet header of the packet.
  • the first field may be a flow label field.
  • the first field may be an option field.
  • Step 904 Send the second packet, and the tag information is used by the forwarding device that receives the second packet to process the second packet based on the tag information.
  • the way the first device accesses the network is different, and the process of sending the second message is also different.
  • the first device In the case that the first device is single-homed to the network, the first device is connected to a forwarding device, and the first device only needs to send the second packet to the forwarding device.
  • the first device is host 1, and the second packet is sent from host 1 to host 2. Since host 1 is only connected to PE1, host 1 sends the second packet to PE1.
  • the first device is connected to at least two forwarding devices.
  • the first device performs hash calculation on the tag information of the first stream instance and the source address and destination address of the second packet to obtain a hash value, and uses the hash value to select a next-hop forwarding device.
  • the first device performs hash calculation on the tag information of the first stream instance and the source address, destination address, source port, and destination port of the second packet to obtain a hash value, and uses the hash value to select the next hop forwarding device.
  • the first device performs hash calculation on the tag information of the first stream instance and the quintuple information of the second packet to obtain a hash value, and uses the hash value to select a next-hop forwarding device.
  • the forwarding device that receives the second message can also identify the tag information carried therein, and then can process the second message.
  • the outer header of the second packet transmitted through the network includes the tag information of the stream instance, so the forwarding device in the network can identify different stream instances or different types of stream instances, and then based on The stream instance executes the processing strategy.
  • the first outer packet header is added to the first packet, and the tag information of the first stream instance is set in the first outer packet header. It may also be that the first outer message header already exists in the first message, and some fields in the first outer message header are modified so that the first outer message header includes the tag information of the first stream instance . For example, first add an IPv6 header to the QUIC packet, and then add the label information in the flow label field in the IPv6 header.
  • the first device adds tag information to the first packet, and there are multiple processing methods.
  • the first outer packet header does not exist in the first packet, and the first outer packet header is added to the first packet, where the first outer packet header includes tag information.
  • the first message itself has a first outer message header, some fields in the first outer message header of the first message are modified as tag information, or in the first outer message header of the first message Add tag information to some reserved fields in the packet header.
  • FIG. 10 for the flow of the method for processing the packet, 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 second outer message header.
  • the first device receives the first message from other forwarding devices in the network, or receives the first message from the data sending end, and the first message includes the encapsulation
  • the second outer header includes a second field, and the content of the second field is used to mark the first stream instance.
  • the first packet is an IPv6 packet
  • the second outer packet header is an IPv6 header
  • the IPv6 header is used to encapsulate a UDP packet
  • the UDP packet includes a QUIC packet.
  • the first packet is an IPv4 packet
  • the second outer packet header is an IPv4 header
  • the IPv4 header is used to encapsulate a UDP packet
  • the UDP packet includes a QUIC packet.
  • Step 1002 acquire the content of the second field of the second outer packet header, the content of the second field is used to mark the first stream instance; obtain the marking information of the first stream instance according to the content of the second field.
  • the management device will send configuration information and mapping policies to some or all forwarding devices in the network that forward and process the first message.
  • the configuration information is used to configure and read the second
  • the content of the field is also used to map the content of the second field to the tag information of the first stream instance using the mapping strategy, and the mapping strategy indicates a strategy for mapping the content of the second field to the tag information of the first stream instance.
  • These forwarding devices store the configuration information and mapping policies.
  • the first device receiving the first message reads the content of the second field, and acquires the stored mapping policy. Use the mapping strategy to map the content of the second field to the tag information of the first stream instance.
  • the content of the second field is obtained based on the related information of the first stream instance, and the content included in the related information can refer to the above description.
  • the second field is the related information, or the second field is the output value obtained by inputting the related information into the random algorithm, etc.
  • the process of mapping the content of the second field to the tag information of the first stream instance is as follows:
  • Way 1 Determine the content of the second field as the tag information of the first stream instance.
  • Method 2 The mapping strategy is a preset mapping algorithm, and the content of the second field is input into the preset mapping algorithm to obtain an output value, which is the tag information of the first stream instance.
  • Mode 3 Select the content of the preset bits in the content of the second field as the tag information of the first stream instance.
  • Step 1003 adding a first outer message header to the first message to obtain a second message, the first field of the first outer message header includes tag information.
  • the first device adds the first outer packet header to the first packet, which can also be referred to as encapsulating the first outer packet header for the first packet.
  • the first field of the first outer packet header includes tag information of the first stream instance.
  • the first device is an ingress device of the tunnel
  • the first outer packet header added to the first packet by the tunnel ingress device is the tunnel header.
  • the tunnel header is a VXLAN packet header
  • the first field is a reserved field in the VXLAN header of the VXLAN packet header.
  • the tunnel endpoint device adds the first outer packet header, and when the second packet reaches the tunnel endpoint device, the tunnel endpoint device deletes the first outer packet header.
  • Step 1004 Send the second packet, and the tag information is used by the forwarding device that receives the second packet to process the second packet based on the tag information.
  • the first device may also process the second packet based on the tag information. For example, after the first device obtains the second packet, if the outgoing interface of the first device is only connected to one device, the first device directly sends the second packet. If the outgoing interface of the first device is connected to multiple devices, the first device performs hash calculation on the tag information of the first stream instance and the source address and destination address of the second packet to obtain a hash value, and use the hash The value selects the next-hop forwarding device. Alternatively, the first device performs hash calculation on the tag information of the first stream instance and the source address, destination address, source port, and destination port of the second packet to obtain a hash value, and uses the hash value to select the next hop forwarding device. Alternatively, the first device performs hash calculation on the tag information of the first stream instance and the quintuple information of the second packet to obtain a hash value, and uses the hash value to select a next-hop forwarding device.
  • adding tag information to the first message in step 703 is specifically: modifying some fields in the first outer message header of the first message as tag information, or Marking information is added to some reserved fields of the layer message header.
  • FIG. 11 includes steps 1101 to 1104.
  • Step 1101 Receive a first message, where the first message includes a QUIC message encapsulated with a first outer message header.
  • step 1101 refer to the description of step 1001, which will not be repeated here.
  • Step 1102 obtain tag information corresponding to the first stream instance.
  • the first device may also determine the tag information of the first stream instance by using methods 1 to 3 in step 1002.
  • Step 1103 adding tag information to the first outer packet header of the first packet to obtain the second packet.
  • the first device adds marking information to the first outer message header of the first message to obtain the second message
  • marking information may be some fields of the first outer message header Modify, or add in the reserved field of the first outer packet header, for example, the first outer packet header is an IPv6 header, the value of the flow label of the IPv6 header is 0, and the value of the flow label is modified to Marker information for the first stream instance.
  • Step 1104 Send the second packet, and the tag information is used by the forwarding device that receives the second packet to process the second packet based on the tag information.
  • step 1104 refer to the description of step 1004, which will not be repeated here.
  • the first stream instance is a bidirectional stream instance
  • the stream identifier of the first stream instance indicates the bidirectional stream instance.
  • only one of the two parties to which the first stream instance belongs determines the tag information corresponding to the first stream instance, and the other party uses the tag information.
  • the data sending end and the data receiving end are two-way to create the first stream instance, and the data receiving end is the first device mentioned above.
  • step 1201 the data sender generates a first QUIC message based on the QUIC protocol, and the STREAM frame in the first QUIC message includes the stream identifier of the first stream instance.
  • Step 1202 the data sender determines the tag information corresponding to the first stream instance.
  • step 1201 to step 1202 is similar to the processing process from step 901 to step 902, and will not be repeated here.
  • Step 1203 the data sender adds an outer packet header to the first QUIC packet to obtain a third packet.
  • the outer layer of the first QUIC message is encapsulated with a UDP message header, and an outer layer message is added to the outer layer of the first QUIC message encapsulated with the UDP message header.
  • a header, the third field of the outer header includes tag information.
  • the third field may be a flow label field.
  • the third field may be an option field.
  • step 1204 the data sender sends a third packet, and the tag information in the third packet is used by the forwarding device that receives the third packet to process the third packet based on the tag information.
  • step 1204 For the description in step 1204, refer to the description in step 904, which will not be repeated here.
  • Step 1205 the data receiver receives the third packet, and stores the tag information corresponding to the first stream instance.
  • the data receiving end when the data receiving end receives the third message, since it is the first time to receive the message with the stream identifier of the first stream instance, the data receiving end also creates a distributed entity of the first stream instance. And the data receiving end stores the tag information corresponding to the first stream instance.
  • Step 1206 the data receiving end generates a second QUIC packet based on the QUIC protocol.
  • the data receiving end when the data receiving end wants to send data or control information to the data sending end, the data receiving end generates a second QUIC message based on the QUIC protocol, and the STREAM frame in the second QUIC message includes the stream of the first stream instance indicates that the second QUIC packet is the first packet described above.
  • Step 1207 the data receiver obtains the stored tag information of the first stream instance.
  • the subsequent data receiving end uses the first stream instance to send data, it can use the stored tag information corresponding to the first stream instance.
  • Step 1208 the data receiving end adds the first outer message header to the second QUIC message to obtain the second message, and the first field of the first outer message header includes the tag information.
  • the outer layer of the second QUIC message is encapsulated with a UDP message header, and the first outer layer is added to the outer layer of the UDP message header encapsulated with the second QUIC message.
  • Layer message header, the first field of the first outer layer message header includes tag information.
  • Step 1209 the data receiving end sends the second packet, and the forwarding device that receives the second packet processes the second packet based on the tag information.
  • step 1209 For the processing method of step 1209, refer to the processing method of step 804, which will not be repeated here.
  • the first stream instance is a bidirectional stream instance, and the data receiving end does not need to calculate tag information, which can save processing resources.
  • the data sending end generates the tag information of the first stream instance.
  • the data receiving end may also generate the tag information of the first stream instance, and send To the data sender, no more details here.
  • the execution subject is the above-mentioned second device as an example for illustration, as before
  • the second device is a host, a mobile terminal, a server, or a network device in the network.
  • the second 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.
  • the network device may be a switch or a router in the network.
  • the second device processes the message based on the tag information added in the outer message header of the message, where the identification information is identification information corresponding to the stream instance.
  • Step 1301 obtain a message, the message includes the data transmitted by the stream instance based on the QUIC protocol, and the outer header of the message includes the tag information of the stream instance.
  • the second device is specifically a forwarding device in the network, and the forwarding device receives a message, the message is a message sent by the device that created the first stream instance, and the message is step 903, step 1003 and The second message described in step 1103 and step 1203.
  • the second device acquires the tag information of the first stream in the first field of the outer packet header of the packet.
  • the marking information is used to mark the first stream instance in a QUIC connection, or the marking information is used to mark a certain type of stream instance in a QUIC connection, and the stream instance of this type includes the first stream instance .
  • Step 1302 process the packet based on the tag information.
  • the second device uses the tag information of the first stream instance to process the message.
  • the processing of the message includes forwarding the message, classifying and collecting the message, collecting delay information of the message, and the like.
  • the message when the message is forwarded, the message may be forwarded based on the tag information of the first stream instance and the destination IP address in the outer message header.
  • the destination address may be a destination IP address.
  • the second device obtains the destination address in the outer header of the message, and uses the tag information of the first stream instance and the destination address to forward the message.
  • the second device is configured with a path along which packets with different tag information pass.
  • the second device uses the tag information and destination address of the first stream instance to find the next hop, and sends the message to the next hop.
  • the packet may be forwarded based on the hash value of the tag information of the first stream instance, and the processing is as follows:
  • the second device when there are multiple equal-cost routing paths, performs hash processing on the tag information of the first stream instance to obtain a hash value. Use the hash value to determine the next hop among multiple equal-cost routing paths, and send packets to the next hop.
  • the second device obtains a hash value from one or more of the five-tuple information in the message and the tag information of the first stream instance. Use the hash value to determine the next hop among multiple equal-cost routing paths, and send packets to the next hop. For example, the second device performs hash processing on the destination address and source address in the tag information outer packet 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 of the packet, the source address, the source port, and the destination port to obtain a hash value.
  • the process in Figure 13 is explained by taking the second device as a forwarding device as an example. In actual processing, it can also be the device that creates the first stream instance. Then in step 1201, obtain the message, specifically generate the message, and the rest Processing is the same as described in FIG. 13 .
  • PE2 sends the packet corresponding to the second stream instance to P2 through the path PE1-->P2-->P4-->PE2, see the load balancing diagram shown in Figure 14. In this way, packets of different stream instances go through different paths, and load balancing based on tag information of stream instances can be realized.
  • FIG. 15 shows a schematic diagram of load balancing in another scenario.
  • this scenario involves a spine-leaf network, or called a leaf-spine network.
  • the scenario includes hosts, leaf nodes, and spine nodes.
  • the host may include source host 1 and destination host 2, the leaf nodes may include leaf 1, leaf 2, leaf3, and leaf4, and the spine nodes may include spine1 and spine2.
  • Source host 1 is dual-homed to the network
  • destination host 2 is dual-homed to the network
  • source host 1 is connected to leaf1 and leaf2
  • leaf1 and leaf2 are connected to spine1 and spine2
  • destination host 2 is connected to leaf3 and leaf4, leaf3 and leaf4 are connected spine1 and spine2.
  • the source host 1 creates the first stream instance and the second stream instance, and the tag information of the first stream instance is different from the tag information of the second stream instance.
  • the source host 1 uses the first stream instance and the second stream instance to send two byte streams (such as the data of two files) to the destination host 2, the tag information of the first stream instance and/or the tag of the second stream instance
  • the information can be added to the corresponding message by the source host, leaf node or spine node, and the source host, leaf node or spine node that obtains the message can use the tag information of the first stream instance and/or the second stream instance in the message Instance tag information for packet processing.
  • Source host 1 can use the label information of the first stream instance to determine that the packet corresponding to the first stream instance is sent to leaf1 in the two equal-cost routing paths.
  • leaf1 uses the tag information of the first stream instance to determine that the message corresponding to the first stream instance is sent to spine1 in the two equal-cost routing paths.
  • spine1 uses the tag information of the first stream instance to determine that the packet corresponding to the first stream instance is sent to leaf3 in the two equal-cost routing paths.
  • leaf3 sends the packet corresponding to the first stream instance to the destination host 2.
  • the source host 1 can use the tag information of the second stream instance to determine that the packet corresponding to the second stream instance is sent to leaf2 in the two equal-cost routing paths.
  • Leaf2 uses the label information of the second stream instance to determine that the packet corresponding to the second stream instance is sent to spine2 in the two equal-cost routing paths.
  • Spine2 uses the label information of the second stream instance to determine that the packet corresponding to the second stream instance is sent to leaf4 in the two equal-cost routing paths.
  • Leaf4 sends the packet corresponding to the second stream instance to the destination host 2. In this way, the packet corresponding to the first stream instance reaches the destination host 2 through the path leaf1-->spine1-->leaf3, and the packet corresponding to the second stream instance reaches the destination host 2 through the path leaf2-->spine2-->leaf4. It can be seen that through the tag information corresponding to the stream instance, load balancing can be achieved.
  • each node selects a path among the two equal-cost routing paths refers to the process shown in FIG. 13 , which will not be repeated here.
  • load balancing processing on packets is taken as an example for illustration.
  • the number of packets with different tag information or the delay information of packets with different tag information may also be determined.
  • adding the tag information of the stream instance to the message can enable the forwarding device to implement a stream-based processing strategy without decrypting the STREAM frame.
  • the processing strategy is a load balancing strategy
  • transmission performance can be improved.
  • this application is compatible with existing standards and specifications, and has better deployability.
  • the flow label field is directly occupied in the IPv6 message to set the label information of the stream instance.
  • Another example is to occupy the reserved field of the VXLAN Header in the VXLAN packet.
  • FIG. 16 is a structural diagram of an apparatus for processing messages provided by an embodiment of the present application.
  • the device can be implemented as part or all of the device through software, hardware or a combination of the two.
  • the processing device provided in the embodiment of the present application can implement the processes described in Figure 8 to Figure 12 in the embodiment of the present application, specifically, the processing device provided in the embodiment of the present application can implement the execution of the first device shown in Figure 8 to Figure 12 related steps.
  • the device for processing messages includes an acquisition module 1610, a determination module 1620, an addition module 1630 and a sending module 1640, wherein:
  • the obtaining module 1610 is configured to obtain a first message, the first message includes data transmitted by a stream instance based on the QUIC protocol, and may be specifically used to implement steps 801, 901, 1001, 1101 and 1201 Acquiring functions and performing the implicit steps involved in step 801, step 901, step 1001, step 1101 and step 1201;
  • the determining module 1620 is configured to obtain tag information corresponding to the stream instance, and may specifically be used to implement the determining functions of steps 802, 902, 1002, 1102, and 1202 and execute steps 802, 902, 1002, The implicit steps involved in step 1102 and step 1202;
  • the adding module 1630 is configured to add the tag information to the first message to obtain a second message, specifically, it can be used to implement the adding function of step 803, step 903, step 1003, step 1103 and step 1203 and the execution steps 803, the implicit steps included in step 903, step 1003, step 1103 and step 1203;
  • the sending module 1640 is configured to send the second message, and the tag information is used by the forwarding device that receives the second message to process the second message based on the tag information, which can be specifically used to implement the step 804 , the sending function of step 904 , step 1004 , step 1104 and step 1204 and the implicit steps involved in performing step 804 , step 904 , step 1004 , step 1104 and step 1204 .
  • the marking information is used to mark the stream instance in the QUIC connection, or the marking information is used to mark the type of the stream instance in the QUIC connection, and the stream The instance belongs to the stream instance marked by the mark information.
  • the adding module 1630 is configured to:
  • the first outer packet header is an IPv6 header
  • the first field is a flow label field
  • the first outer packet header is an IPv4 header, and the first field is an option field.
  • the determining module 1620 is configured to:
  • the tag information of the stream instance is obtained, and the tag information of the stream instance includes related information of the stream instance.
  • the determining module 1620 is configured to:
  • the tag information is generated according to the relevant information of the stream instance and a random algorithm.
  • the relevant information includes at least one of the following: the type of the data, feature information of the stream instance, a path identifier associated with the stream instance, and index information of the stream instance,
  • the index information of the stream instance is used to indicate the stream instance in the QUIC connection.
  • the determining module 1620 is configured to:
  • the tag information is generated according to the identifier of the stream instance, the quintuple information of the first packet, and the random algorithm.
  • the stream instance is a bidirectional stream instance; the determining module 1620 is configured to:
  • the third packet is transmitted along a first direction
  • the second packet is transmitted along a second direction
  • the first direction and the second direction are in the opposite direction
  • the first packet includes a QUIC packet encapsulated with a second outer packet header
  • the determining module 1620 is configured to:
  • the tag information of the stream instance is obtained according to the content of the second field.
  • the tag information includes related information of the stream instance, and the related information includes at least one of the following: the type of the data, feature information of the stream instance, and the stream instance
  • the associated path identifier and the index information of the stream instance, the index information of the stream instance is used to uniquely indicate the stream instance within the QUIC connection.
  • the acquiring module 1610 is configured to generate the first message, where the first message is a QUIC message based on the QUIC protocol; or,
  • the first device is a host or a network device.
  • 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 a device for processing messages provided by an embodiment of the present application.
  • the device can be implemented as part or all of the device through software, hardware or a combination of the two.
  • the message of the processing device provided in the embodiment of the present application can realize the process described in Figure 13 of the embodiment of the present application, specifically, the processing device provided in the embodiment of the present application can realize the related steps performed by the second device shown in Figure 13 .
  • the device for processing messages includes a message acquisition module 1710 and a processing module 1720, wherein:
  • the message acquisition module 1710 is configured to acquire a message, the message includes data transmitted by a stream instance based on the QUIC protocol, and the outer message header of the message includes tag information corresponding to the stream instance, specifically It can be used to realize the message acquisition function in step 1301 and perform the implicit steps included in step 1302;
  • the processing module 1720 is configured to process the message based on the tag information, and may specifically be used to realize the processing function of step 1302 and execute the implicit steps included in step 1302 .
  • the processing module 1720 is configured to:
  • the packet is forwarded.
  • the processing module 1720 is configured to:
  • the marking information is used to mark the stream instance in the QUIC connection, or the marking information is used to mark the type of the stream instance in the QUIC connection, and the stream The instance belongs to the stream instance marked by the mark information.
  • the tag information is included in a field of an outer packet header of the packet; wherein,
  • the outer packet header is an IPv6 header, and the field is a flow label field; or,
  • the outer packet header is an IPv4 header, and the field is an option field.
  • the tag information includes related information of the stream instance, and the related information includes at least one of the following: the type of the data, feature information of the stream instance, and the stream instance
  • the associated path identifier and the index information of the stream instance, the index information of the stream instance is used to uniquely indicate the stream instance within the QUIC connection.
  • the second device is a host or a network device.
  • the second device is a network leaf node or a network spine node.
  • the device for processing packets shown in FIG. 16 is applied to the device shown in FIG. 6 or 7, or to the first device.
  • the device for processing packets shown in FIG. 17 is applied to the device shown in FIG. 6 or 7, or to the second device.
  • module division manners in FIG. 16 and FIG. 17 are exemplary division manners, which are not limited in this embodiment of the present application.
  • a system for processing a message includes a first device and a second device, the first device is used to perform part of the process of processing a message in the foregoing, and the second device is used to perform a part of the process of processing a message in the previous Part of the process of processing packets is performed in the text.
  • a computer program product comprising 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 processes shown in FIGS. 8 to 12 .
  • a computer program product comprising computer instructions stored in a computer readable storage medium.
  • the processor of the second device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the second device executes the process shown in FIG. 13 .
  • the disclosed system architecture, device and method can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices or modules, and may also be electrical, mechanical or other forms of connection.
  • the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present application.
  • each module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software modules.
  • the integrated module is realized in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of software products, and the computer software products are stored in a storage medium
  • several instructions are included to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.
  • first and second are used to distinguish the same or similar items with basically the same function and function. It should be understood that there is no logic or sequence between “first” and “second” Dependencies on the above, and there are no restrictions on the number and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, a first stream instance could be termed a second stream instance, and, similarly, a second stream instance could be termed a first stream instance, without departing from the scope of the various examples. Both the first stream instance and the second stream instance may be stream instances, and in some cases, separate and distinct stream instances.

Landscapes

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

Abstract

本申请提供了一种处理报文的方法、***、设备和存储介质,属于网络技术领域。该方法包括:获取第一报文,第一报文包括基于QUIC协议的stream实例所传输的数据(801),获得与该stream实例对应的标记信息(802),为该第一报文添加该标记信息,获得第二报文(803),发送该第二报文,该标记信息用于接收到该第二报文的转发设备基于该标记信息处理该第二报文(804)。采用本申请,由于在第一报文中添加标记信息,该标记信息用于指示stream实例,所以转发第一报文的设备能够基于该标记信息对stream实例进行区分。

Description

处理报文的方法、***、设备和存储介质
本申请要求于2021年09月18日提交的申请号为202111112961.8,发明名称为“一种显式标识QUIC流的方法”和2021年12月03日提交的申请号为202111467765.2、发明名称为“处理报文的方法、***、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据传输技术领域,特别涉及一种处理报文的方法、***、设备和存储介质。
背景技术
QUIC是一种基于用户数据报协议(user datagram protocol,UDP)的安全传输协议,QUIC运行在UDP之上,且与安全传输层协议(transport layer security,TLS)1.3高度集成,QUIC提供了与传输控制协议(transmission control protocol,TCP)类似的可靠性、拥塞控制等功能。
在基于QUIC的数据传输过程中,出于安全性考虑,QUIC报文均是加密后进行传输,数据传输路径上的转发设备无法区分QUIC协议中的流(stream)实例。
发明内容
本申请提供了一种处理报文的方法、***、设备和存储介质,以使得传输路径上的转发设备区分QUIC协议中的stream实例。
第一方面,本申请提供了一种处理报文的方法,应用于第一设备,该方法包括:获取第一报文,第一报文包括基于QUIC协议的stream实例所传输的数据;获得与该stream实例对应的标记信息;为第一报文添加标记信息,获得第二报文;发送第二报文,标记信息用于接收到第二报文的转发设备基于标记信息处理第二报文。
本申请所示的方案,获取到第一报文,第一报文包括基于QUIC协议的stream实例所传输的数据,确定该stream实例的标记信息。为第一报文添加该标记信息,获得第二报文,发送第二报文使得接收到第二报文的转发设备基于该标记信息处理第二报文。这样,由于接收到报文的转发设备能够识别到stream实例对应的标记信息,所以能够区分stream实例,进而能够基于stream实例对报文进行相应的处理。
在一种可能的实现方式中,该标记信息用于在QUIC连接内标记该stream实例,或者,该标记信息用于在该QUIC连接内标记该stream实例的类型,该stream实例属于该标记信息所标记的stream实例。这样,在单个QUIC连接内,每个标记信息指示一个stream实例,或者每个标记信息指示一类stream实例。
在一种可能的实现方式中,该为第一报文添加该标记信息,包括:在第一报文的第一外层报文头的第一字段中添加该标记信息。
本申请所示的方案,第一报文当前存在第一外层报文头,修改第一外层报文头的第一字段,使得第一字段包括stream实例的标记信息,或者,第一报文当前不存在第一外层报文头,为第一报文封装第一外层报文头,第一字段包括stream实例的标记信息。这样,可以通过多种方式在外层报文头中携带标记信息。
在一种可能的实现方式中,第一外层报文头为互联网协议第六版(internet protocol version6,IPv6)报文头,第一字段为流标签(flow label)字段;或者,第一外层报文头为互联网协议第四版(internet protocol version 4,IPv4)报文头,第一字段为选项(option)字段。
在一种可能的实现方式中,获得与该stream实例对应的标记信息,包括:获得该stream实例的标记信息,该stream实例的标记信息包括该stream实例的相关信息。这样,可以使用该stream实例的相关信息,获得与该stream对应的标记信息。
在一种可能的实现方式中,该获得与该stream实例对应的标记信息,包括:根据该stream实例的相关信息和随机算法,生成该标记信息。这样,可以使用随机算法生成标记信息。
在一种可能的实现方式中,该stream实例的相关信息包括以下至少一项:该数据的类型、该stream实例的特征信息、该stream实例关联的路径(path)标识和该stream实例的索引信息,该stream实例的索引信息用于在QUIC连接内指示该stream实例。
在一种可能的实现方式中,该根据该stream实例的相关信息和随机算法,生成该标记信息,包括:根据该stream实例的标识和该随机算法,生成该标记信息;或者,根据该stream实例的标识、该第一报文的源地址、目的地址和该随机算法,生成该标记信息;或者,根据该stream实例的标识、该第一报文的五元组信息和该随机算法,生成该标记信息。这样,可以使用多种方式,获得该stream实例的标记信息。
在一种可能的实现方式中,该stream实例为双向stream实例;该获得与该stream实例对应的标记信息,包括:获取基于该stream实例所传输的第三报文,该第三报文沿第一方向传输,该第二报文沿第二方向传输,该第一方向与该第二方向的方向相反;在该第三报文的外层报文头中获取该标记信息。
本申请所示的方案,在stream实例为双向stream实例的情况下,可以在接收到的报文的外层报文头中获取stream实例的标记信息,这样,无需重复确定标记信息。
在一种可能的实现方式中,该第一报文包括封装有第二外层报文头的QUIC报文;该获得与该stream实例对应的标记信息,包括:获取该第二外层报文头的第二字段的内容,该第二字段的内容用于标记该stream实例;根据该第二字段的内容获得该stream实例的标记信息。
本申请所示的方案,在第一报文包括封装有第二外层报文头的QUIC报文的情况下,可以在第二外层报文头中获取第二字段的内容,使用第二字段的内容,确定出stream实例的标记信息。这样,转发路径上的转发设备也能基于第二字段的内容,获得stream实例的标记信息。
在一种可能的实现方式中,该标记信息包括该stream实例的相关信息,该相关信息包括以下至少一项:该数据的类型、该stream实例的特征信息,该stream实例关联的path标识和该stream实例的索引信息,该stream实例的索引信息用于在QUIC连接内指示该stream实例。
在一种可能的实现方式中,该获取第一报文,包括:生成该第一报文,该第一报文为基 于QUIC协议的QUIC报文;或者,接收第一报文,该第一报文包括封装有第三外层报文头的QUIC报文。
本申请所示的方案,主机可以生成第一报文,或者转发路径上的设备可以接收到第一报文。
在一种可能的实现方式中,第一设备为主机或网络设备。
在一种可能的实现方式中,第一设备为网络叶节点,网络叶节点与网络脊节点连接。
在一种可能的实现方式中,获得与该stream实例对应的标记信息,包括:基于该数据的类型,确定该stream实例的标记信息。
本申请所示的方案,在确定stream实例对应的标记信息时,可以使用该stream实例所传输数据的类型,这样,能够更灵活确定该stream实例对应的标记信息。
第二方面,本申请提供了一种处理报文的方法,应用于第二设备,该方法包括:
获取报文,该报文包括基于QUIC协议的stream实例所传输的数据,该报文的外层报文头包括与该stream实例对应的标记信息;基于该标记信息,对该报文进行处理。这样,在获取到报文后,能够在外层报文头中获取到stream实例对应的标记信息。使用该标记信息区分出stream实例,进而能对该stream实例进行相应的处理。
在一种可能的实现方式中,该基于该标记信息,对该报文进行处理,包括:基于该标记信息和该外层报文头中目的地址,对该报文进行转发处理。这样,该stream实例的标记信息能够用于区分stream实例,所以基于该标记信息能够对该stream实例进行准确处理。
在一种可能的实现方式中,该基于该标记信息,对该报文进行处理,包括:根据该标记信息进行哈希计算,得到哈希值;基于该哈希值在多条等价转发路径中确定用于转发该报文的转发路径;根据确定的转发路径转发该报文。这样,在转发报文时能够实现负载均衡。
在一种可能的实现方式中,该标记信息用于在QUIC连接内标记该stream实例,或者,该标记信息用于在该QUIC连接内标记该stream实例的类型,该stream实例属于该标记信息所标记的stream实例。
在一种可能的实现方式中,该标记信息包括在该报文的外层报文头的字段中;其中,该外层报文头为IPv6头,该字段为flow label字段;或者,该外层报文头为IPv4头,该字段为option字段。
在一种可能的实现方式中,该标记信息包括该stream实例的相关信息,该相关信息包括以下至少一项:该数据的类型、该stream实例的特征信息,该stream实例关联的path标识和该stream实例的索引信息,该stream实例的索引信息用于在该QUIC连接内指示该stream实例。
在一种可能的实现方式中,该第二设备为主机或网络设备。
在一种可能的实现方式中,该第二设备为网络叶节点或网络脊节点。
第三方面,本申请提供了一种处理报文的装置,所述装置应用于第一设备,所述装置包括:获取模块,用于获取第一报文,所述第一报文包括基于QUIC协议的stream实例所传输的数据;确定模块,用于获得与所述stream实例对应的标记信息;添加模块,用于为所述第一报文添加所述标记信息,获得第二报文;发送模块,用于发送所述第二报文,所述标记信息用于接收到所述第二报文的转发设备基于所述标记信息处理所述第二报文。
在一种可能的实现方式中,所述标记信息用于在QUIC连接内标记所述stream实例,或 者,所述标记信息用于在所述QUIC连接内标记所述stream实例的类型,所述stream实例属于所述标记信息所标记的stream实例。
在一种可能的实现方式中,所述添加模块,用于:
在所述第一报文的第一外层报文头的第一字段中添加所述标记信息。
在一种可能的实现方式中,所述第一外层报文头为IPv6头,所述第一字段为flow label字段;或者,
所述第一外层报文头为IPv4头,所述第一字段为option字段。
在一种可能的实现方式中,所述确定模块,用于:
获得所述stream实例的标记信息,所述stream实例的标记信息包括所述stream实例的相关信息。
在一种可能的实现方式中,所述确定模块,用于:
根据所述stream实例的相关信息和随机算法,生成所述标记信息。
在一种可能的实现方式中,所述相关信息包括以下至少一项:所述数据的类型、所述stream实例的特征信息、所述stream实例关联的path标识和所述stream实例的索引信息,所述stream实例的索引信息用于在QUIC连接内指示所述stream实例。
在一种可能的实现方式中,所述确定模块,用于:
根据所述stream实例的标识和所述随机算法,生成所述标记信息;或者,
根据所述stream实例的标识、所述第一报文的源地址、目的地址和所述随机算法,生成所述标记信息;或者,
根据所述stream实例的标识、所述第一报文的五元组信息和所述随机算法,生成所述标记信息。
在一种可能的实现方式中,所述stream实例为双向stream实例;所述确定模块,用于:
获取基于所述stream实例所传输的第三报文,所述第三报文沿第一方向传输,所述第二报文沿第二方向传输,所述第一方向与所述第二方向的方向相反;
在所述第三报文的外层报文头中获取所述标记信息。
在一种可能的实现方式中,所述第一报文包括封装有第二外层报文头的QUIC报文;
所述确定模块,用于:
获取所述第二外层报文头的第二字段的内容,所述第二字段的内容用于标记所述stream实例;
根据所述第二字段的内容获得所述stream实例的标记信息。
在一种可能的实现方式中,所述标记信息包括所述stream实例的相关信息,所述相关信息包括以下至少一项:所述数据的类型、所述stream实例的特征信息,所述stream实例关联的path标识和所述stream实例的索引信息,所述stream实例的索引信息用于在QUIC连接内指示所述stream实例。
在一种可能的实现方式中,所述获取模块,用于生成所述第一报文,所述第一报文为基于QUIC协议的QUIC报文;或者,
接收第一报文,所述第一报文包括封装有第三外层报文头的QUIC报文。
在一种可能的实现方式中,所述第一设备为主机或网络设备。
在一种可能的实现方式中,所述第一设备为网络叶节点,所述网络叶节点与网络脊节点 连接。
第四方面,本申请提供了一种处理报文的装置,该装置应用于第二设备,所述装置包括:报文获取模块,用于获取报文,所述报文包括基于QUIC协议的stream实例所传输的数据,所述报文的外层报文头包括与所述stream实例对应的标记信息;处理模块,用于基于所述标记信息,对所述报文进行处理。
在一种可能的实现方式中,所述处理模块,用于:
基于所述标记信息和所述外层报文头中目的地址,对所述报文进行转发处理。
在一种可能的实现方式中,所述处理模块,用于:
根据所述标记信息进行哈希计算,得到哈希值;
基于所述哈希值在多条等价转发路径中确定用于转发所述报文的转发路径;
根据所确定的转发路径转发所述报文。
在一种可能的实现方式中,所述标记信息用于在QUIC连接内标记所述stream实例,或者,所述标记信息用于在所述QUIC连接内标记所述stream实例的类型,所述stream实例属于所述标记信息所标记的stream实例。
在一种可能的实现方式中,所述标记信息包括在所述报文的外层报文头的字段中;其中,
所述外层报文头为IPv6头,所述字段为flow label字段;或者,
所述外层报文头为IPv4头,所述字段为option字段。
在一种可能的实现方式中,所述标记信息包括所述stream实例的相关信息,所述相关信息包括以下至少一项:所述数据的类型、所述stream实例的特征信息,所述stream实例关联的path标识和所述stream实例的索引信息,所述stream实例的索引信息用于在QUIC连接内指示所述stream实例。
在一种可能的实现方式中,所述第二设备为主机或网络设备。
在一种可能的实现方式中,所述第二设备为网络叶节点或网络脊节点。
第五方面,本申请提供了一种通信设备,所述设备包括处理器和存储器,所述存储器中存储有至少一条计算机指令,所述计算机指令由所述处理器加载并执行以实现上述第一方面或第一方面任一种可选方式所提供的处理报文的方法。
第六方面,本申请提供了一种计算机可读存储介质,所述存储介质中存储有至少一条计算机指令,所述计算机指令由通信设备的处理器加载并执行以实现上述第一方面或第一方面任一种可选方式所提供的处理报文的方法。
第七方面,本申请提供了一种通信设备,所述设备包括处理器和存储器,所述存储器中存储有至少一条计算机指令,所述计算机指令由所述处理器加载并执行以实现上述第二方面或第二方面任一种可选方式所提供的处理报文的方法。
第八方面,本申请提供了一种计算机可读存储介质,所述存储介质中存储有至少一条计算机指令,所述计算机指令由通信设备的处理器加载并执行以实现上述第二方面或第二方面任一种可选方式所提供的处理报文的方法。
第九方面,本申请提供了一种处理报文的***,所述***包括第一设备和第二设备,其中,第一设备用于:获取第一报文,所述第一报文包括基于QUIC协议的stream实例所传输的数据;获得与所述stream实例对应的标记信息;为所述第一报文添加所述标记信息,获得第二报文,所述第二报文的外层报文头包括所述标记信息;发送所述第二报文;第二设备用 于:获取所述第二报文;基于所述标记信息,对所述第二报文进行处理。
第十方面,本申请提供了一种处理报文的***,所述***包括第一设备和第二设备,其中,所述第一设备用于实现上述第一方面或第一方面任一种可选方式所提供的处理报文的方法;
所述第二设备用于实现上述第二方面或第二方面任一种可选方式所提供的处理报文的方法。
第十一方面,本申请提供了一种计算机程序产品,该计算机程序产品包括至少一条计算机指令,该计算机程序产品在第一设备上运行时,使得该设备实现上述第一方面或第一方面任一种可选方式所提供的处理报文的方法。
第十二方面,本申请提供了一种计算机程序产品,该计算机程序产品包括至少一条计算机指令,该计算机程序产品在第二设备上运行时,使得该设备实现上述第二方面或第二方面任一种可选方式所提供的处理报文的方法。
第十三方面,本申请提供了一种芯片,包括处理器,用于从存储器中调用并运行存储器中存储的指令,使得安装有芯片的通信设备执行上述各方面中的方法。
第十四方面,本申请提供另一种芯片,包括:输入接口、输出接口、处理器和存储器,输入接口、输出接口、处理器以及存储器之间通过内部连接通路相连,处理器用于执行存储器中的代码,当代码被执行时,处理器用于执行上述各方面中的方法。
附图说明
图1是本申请实施例提供的一种QUIC协议栈的格式示意图;
图2是本申请实施例提供的一种多路径的场景示意图;
图3是本申请实施例提供的一种多路径的实现架构示意图;
图4是本申请实施例提供的一种IPv6头的格式示意图;
图5是本申请实施例提供的一种数据的网络传输示意图;
图6是本申请实施例提供的一种设备的结构示意图;
图7是本申请实施例提供的一种设备的结构示意图;
图8是本申请实施例提供的一种处理报文的方法的流程示意图;
图9是本申请实施例提供的一种处理报文的方法的流程示意图;
图10是本申请实施例提供的一种处理报文的方法的流程示意图;
图11是本申请实施例提供的一种处理报文的方法的流程示意图;
图12是本申请实施例提供的一种处理报文的方法的流程示意图;
图13是本申请实施例提供的一种处理报文的方法的流程示意图;
图14是本申请实施例提供的一种负载均衡的示意图;
图15是本申请实施例提供的一种负载均衡的示意图;
图16是本申请实施例提供的一种处理报文的装置的结构示意图;
图17是本申请实施例提供的一种处理报文的装置的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进 一步地详细描述。
下面对本申请实施例涉及的一些术语概念做解释说明。
(1)QUIC
QUIC是一种基于UDP的可靠的安全传输协议。QUIC这个术语最初是GOOGLE提出的快速UDP网络连接(Quick UDP Internet Connections)的缩写,也称为gQUIC。但是国际互联网工程任务组(internet engineering task force,IETF)标准化时,不再使用这个缩写,认为QUIC是一个名称,并不是一个首字母缩写(QUIC is a name,not an acronym),具体解释可参见征求意见(request for comments,RFC)9000。可以理解的是,本申请实施例所提供的方法可以适用于gQUIC,也可以适用于IETF标准化的QUIC,即本申请实施例所指的QUIC,可以是gQUIC,也可以是IETF标准化的QUIC。
图1示出了QUIC的协议栈,QUIC运行在UDP之上,与TLS1.3高度集成,提供了与TCP类似的可靠性、拥塞控制等功能。在图1的左侧是传统的超文本传输协议(hyper text transfer protocol,HTTP)协议栈,从上到下依次是应用(application)、TLS、TCP和互联网协议(internet protocol,IP),application是HTTP/1.1、HTTP/2或边界网关协议(border gateway protocol,BGP)。在图1的右侧是QUIC协议的协议栈,从上到下依次是application、QUIC、UDP和IP,application是HTTP/3或BGP,其中,QUIC中集成有TLS1.3。
QUIC除了提供与TCP类似的可靠性、拥塞控制等功能,此外,QUIC还提供了如下一些增强功能:
a)流复用(stream multiplexing),指的是在单个QUIC连接(connection)中可以同时传输多个字节流,每个字节流称为流(stream)。其中,QUIC连接用于在两个主体之间建立数据传输所需的共享状态。例如,提供了数据传输所需的安全上下文(如身份认证、机密性保护和完整性保护),安全上下文也可以称为是连接信息。stream用于在QUIC连接所提供的安全上下文中提供数据传输服务。
b)路径(path),是指客户端与服务端之间的一条传输路由,由五元组信息唯一标识,五元组信息包括源地址,目的地址、源端口、目的端口和协议,此处的地址可以是IP地址。对于QUIC而言,五元组信息中的协议指定为UDP。
QUIC连接使用连接标识(connection ID)来唯一标识,ID的英文全称为identity,即每个QUIC连接的连接标识不相同。不同QUIC连接的连接ID不相同。在一个QUIC连接内,每个stream使用stream标识来唯一标识。stream标识的长度为64比特(bit),其中,最低2bit标识stream的类型。为了简单起见,可以认为stream标识包含两个部分,即stream的类型(最低2bit)和stream的索引(index)(剩余的62bit),这说明每个connection可以创建4种不同类型的stream,4种不同类型的stream分别为客户端创建的双向stream类型、服务端创建的双向stream类型、客户端创建的单向stream类型和服务端创建的单向stream类型。每种类型的stream可创建的stream的数量为2 62-1,每个stream可以独立为一个应用提供数据传输服务。
一个stream对应有一个stream实例,该stream实例是分布性实体,同时分布在客户端和服务端,在全局范围内stream实例使用(connection ID,stream ID)唯一标识,在一个connection范围内,使用stream ID唯一标识。stream实例用于传输一个有序的字节流。每个stream实例类似于stream数据结构中的一个节点,该数据结构为指定connection实例的一个内部数据结 构,connection实例也是QUIC connection的分布性实体,同时分布在客户端和服务端。在创建stream实例时,在该数据结构中添加一个节点,在删除stream实例时,从该数据结构中删除该stream实例对应的节点。在该stream实例对应的节点上,维护了所属connection实例的connection ID、stream类型、stream标识、接收缓存区、发送缓存区和运行状态等数据。后续,stream实例的stream标识也可以简称为stream实例的标识。
本申请中的stream不同于通常的流(flow)。本申请中的stream是QUIC连接内的字节流,使用stream ID标识,而通常的flow主要是针对转发层面而言。不同的flow可以使用不同的五元组信息标识,还可以使用不同的三元组信息标识,五元组信息包括源地址、目的地址、协议、源端口和目的端口,三元组信息包括源地址、目的地址和协议。
在转发层面不同的flow在被转发时,可以从不同的端口输出。例如,转发设备将第一五元组信息标识的flow从转发设备的第一端口输出,将第二五元组信息标识的flow从转发设备的第二端口输出。
在QUIC中,path存在单活路径(single-active path)和多活路径(multi-active path),multi-active path也能认为是QUIC multi-active path,multi-active path也能简称为多路径(multi-path)。单活路径指在在一个QUIC连接中,任意时刻只允许一条path传输数据。多活路径指在一个QUIC连接中,一个时刻多个path上能够同时传输数据,多活路径可以更充分的利用网络资源,得到更好的传输性能。例如,图2示出了多路径的场景示意图,用户终端(user equipment,UE)同时接入移动网络和蜂窝网(cellular network),移动网络包括***通信技术(the 4Generation mobile communication technology,4G)或第五代通信技术(the 5Generation mobile communication technology,5G)等,蜂窝网包括无线保真(wireless-fidelity,WIFI)网等。UE的客户端在移动网络和WIFI下使用不同的IP地址访问服务端,UE在移动网络下访问服务端的五元组信息为(1.1.1.1,xx,UDP,3.3.3.3,zz),UE在WIFI下访问服务端的五元组信息为(2.2.2.2,yy,UDP,3.3.3.3,zz),其中,1.1.1.1和2.2.2.2为UE的IP地址,3.3.3.3为服务端的IP地址,xx和yy为客户端的UDP端口,zz为服务端的UDP端口。这样,使用多路径,在客户端和服务端之间仅建立一个QUIC连接,就能在多条path上同时并行传输数据。
在QUIC中,stream负责数据传输,path是数据传输路径,将stream传输的数据与path关联实现stream数据的发送。可选地,在QUIC中,可以通过multi-path调度器将stream的数据与path关联实现数据的发送。图3示出了多路径的实现架构示意图。如图3所示,3条stream将应用的数据传输给multi-path调度器,multi-path调度器将3条stream传输的数据调度至两条path进行传输。
示例性的,multi-path调度器将stream发送的数据与path关联的方式包括如下几种:
业务疏导(traffic streering),用于在创建一条新的stream时,multi-path调度器根据策略将stream与path关联。例如,stream与path之间是1:1、P:1或P:Q的映射关系,P和Q均为大于1的正整数,在stream与path之间是N:M的映射关系时,multi-path调度器可以使用path当前的负载情况选择负载较少的path发送stream的数据。
业务交换(traffic switching),用于实现各条path的负载均衡。例如,在QUIC运行过程中,若某条path的负载或时延发生变化,multi-path调度器可以将与该path关联的stream的数据调整到其它path,以实现各条path的负载均衡。
业务分流(traffic splitting),用于将大量待发送数据分流到多条path。例如,某个stream 的数据比较多,且要求比较高的传输性能,可以使用多条path同时传输该stream的数据,即stream与path的比例是1:P。
需要说明的,上述仅是一种将stream的数据与path关联的方案,本申请实施例对此不进行限定。
(2)QUIC报文的封装格式
QUIC报文包括头部(Header)和有效载荷(payload)部分,QUIC报文的头部包括长头部(long Header)格式和短头部(short Header)格式,通过第一个有效字节的最高位来区分。QUIC报文的Header部分字段加密,QUIC报文的payload全部内容加密。
在数据传输过程中,QUIC使用STREAM帧封装应用数据(application data),在一个QUIC连接内,使用stream标识唯一标识一个stream,stream标识也封装在STREAM帧中。
QUIC定义了多种报文类型,报文类型包括初始(initial)的0-往返时间(round-trip time,RTT)和握手(handshake)的1-RTT等。初始的0-RTT和握手的1-RTT报文类型的报文允许携带STREAM帧。STREAM帧位于0-RTT和1-RTT报文的payload部分。
需要说明的是,应用数据也可以使用除STREAM帧之外的其它QUIC帧类型封装。例如,在IETF关于QUIC的草案数据报2(draft-ietf-quic-datagram-02)中定义QUIC提供不可靠传输服务的功能(如用于传输实时视频流),此时,使用数据报(DATAGRAM)帧封装应用数据。不管QUIC报文中包括的是STREAM帧,还是其它格式的帧,QUIC报文均是加密后进行传输。
(3)IPv6flow label
图4示出了IPv6报文的IPv6头的格式。如图4所示,flow label是IPv6头中的一个字段,长度为20比特。flow label是不受校验和(checksum)安全协议保护的,因此,flow label明文传输的,在转发过程中的任何修改都不会被检测到。
一般情况下,使用报文的五元组信息标识一条IPv6flow,但是在报文分片等场景中,并非每个IPv6报文都包含完整的五元组信息。为了在无法直接获取五元组信息的情况下,还能够标识IPv6flow,出现了flow label,flow label用于标识一条IPv6flow。
关于flow label存在几种基础应用规范:
(a)flow label的值为0时,表示不支持flow label相关功能。若转发设备接收到flow label的值为0的IPv6报文,转发设备可以根据实际需要设置为非零值。
(b)可以使用flow label、源地址和目的地址唯一标识一条IPv6流。
(c)对于一条IPv6流,若设置了flow label,那么对于指定的会话中,保持flow label不变。
(d)flow label一旦被设置为非零值,转发设备禁止修改它的值,但是防火墙可以出于安全原因修改flow label的值。
接下来描述相关技术中传输QUIC报文的过程。
在基于QUIC协议的数据传输过程中,出于安全性考虑,QUIC报文均是加密后进行传输,数据传输路径上的转发设备无法区分QUIC报文中的stream实例,所以无法基于不同的stream实例做一些策略处理。例如,策略处理为负载分担,采用QUIC的流复用机制,源主机1同时使用两个stream实例(stream实例1和stream实例2)向目的主机2发送数据,源主机1和目的主机2之间的网络存在等价路由路径(equal-cost multi-path,ECMP),stream实 例1和stream实例2用于封装应用数据的STREAM帧是被加密传输的,网络中的转发设备在转发QUIC报文过程中,无法识别出stream实例,进而也无法基于stream实例执行负载分担。如图5所示,在源主机1和目的主机2之间的网络中存在多条ECMP,通常只基于五元组信息执行负载分担,由于stream实例1对应的报文和stream实例2的报文具有相同的五元组信息,因此这两个stream实例始终是选择相同的转发路径(提供商边缘设备(provider edge,PE)1-->提供商设备(provider,P)1-->P3-->PE2),见图5中的虚线。
本申请实施例中,将能标识stream实例的内容映射到报文的指定位置,网络中的转发设备能够读取该指定位置的内容,使得转发设备能够实现基于stream实例的处理策略。此处的转发设备也可以称为是网络中的网络设备,如路由器或交换机等。
接下来描述本申请实施例的执行主体。
本申请实施例的执行主体可以是处理报文的装置。可选的,处理报文的装置是硬件设备,该硬件设备是第一设备或者第二设备,第一设备是主机、移动终端、服务器、网络中的网络设备等,第一设备还可以是网络叶(leaf)节点或者网络脊(spine)节点,网络叶节点与网络脊节点连接等。第二设备是主机、移动终端、服务器、网络中的网络设备,第二设备还可以是网络叶节点或者网络脊节点,网络叶节点与网络脊节点连接等。此处网络设备可以是网络中的交换机或路由器等。可选的,处理报文的装置是一个软件装置,如运行在硬件装置上的一套软件程序。
示例性的,处理报文的装置既可以是生成报文的装置,也可以是转发报文的装置。例如,处理报文的装置是主机,主机在生成QUIC报文后,确定stream实例的标记信息,将标记信息添加到IPv6头的flow label中,处理报文的装置即为生成报文的装置。再例如,处理报文的装置是网络中转发报文的转发设备,转发设备是隧道的入端点设备,转发设备接收到封装有IP头的QUIC报文后,转发设备将stream实例的标记信息,添加到隧道头中,处理报文的装置即为转发报文的装置。
在处理报文的装置是硬件设备时,图6示出了设备的结构示意图。设备600包括至少一个处理器601、通信总线602、存储器603以及至少一个网络接口604。
处理器601例如是通用中央处理器(central processing unit,CPU)、网络处理器(network processer,NP)、图形处理器(Graphics Processing Unit,GPU)、神经网络处理器(neural-network processing units,NPU)、数据处理单元(Data Processing Unit,DPU)、微处理器或者一个或多个用于实现本申请方案的集成电路。例如,处理器601包括专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。PLD例如是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。
通信总线602用于在上述组件之间传送信息。通信总线602可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
存储器603例如是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,又如是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,又如是电可擦可编程只读存储器(electrically erasable  programmable read-only Memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器603例如是独立存在,并通过通信总线602与处理器601相连接。存储器603也可以和处理器601集成在一起。
可选地,存储器603用于保存传输的数据等。
网络接口604使用任何收发器一类的装置,用于与其它设备或通信网络通信。网络接口604包括有线网络接口,还可以包括无线网络接口。其中,有线网络接口例如可以为以太网接口。以太网接口可以是光接口,电接口或其组合。无线网络接口可以为无线局域网(wireless local area networks,WLAN)接口,蜂窝网络的网络接口或其组合等。
在具体实现中,作为一种示例,处理器601可以包括一个或多个CPU。
在具体实现中,作为一种示例,设备600可以包括多个处理器。这些处理器中的每一个可以是一个单核处理器(single-CPU),也可以是一个多核处理器(multi-CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。
在具体实现中,作为一种示例,设备600还可以包括输出设备和输入设备。输出设备和处理器601通信,可以以多种方式来显示信息。例如,输出设备可以是液晶显示器(liquid crystal display,LCD)、发光二级管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备和处理器601通信,以多种方式接收用户的输入。例如,输入设备可以是鼠标、键盘、触摸屏设备或传感设备等。
在一些实施例中,存储器603用于存储执行本申请中处理报文的程序代码6031,处理器601执行存储器603中存储的程序代码6031。也即是,设备600可以通过处理器601以及存储器603中的程序代码6031,来实现方法实施例提供的处理报文的方法。
在处理报文的装置是硬件设备时,图7示出了设备的另一种结构示意图。设备700包括主控板710和接口板720。
主控板710也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板710用于对设备700中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板710包括:第一中央处理器711和存储器712。
接口板720也称为线路接口单元卡(line processing unit,LPU)、线卡(line card)或业务板。接口板720用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(packet over sONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(flexible ethernet clients,FlexE clients)。接口板720包括:第二中央处理器721、网络处理器722、转发表项存储器724和物理接口卡(physical interface card,PIC)723。
第二中央处理器721用于对接口板720进行控制管理并与第一中央处理器711进行通信。
网络处理器722用于实现报文的转发处理。网络处理器722的形态例如是转发芯片。具体而言,网络处理器722用于基于转发表项存储器724保存的转发表转发接收到的报文,如果报文的目的地址为设备700的地址,则将该报文上送至CPU(如第一中央处理器711)处理;如果报文的目的地址不是设备700的地址,则根据该目的地址从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。其中,上行报文的 处理包括:报文入接口的处理,转发表查找;下行报文的处理:转发表查找等等。
物理接口卡723用于实现物理层的对接功能,原始的流量由此进入接口板720,以及处理后的报文从该物理接口卡723发出。物理接口卡723也称为子卡,可安装在接口板720上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器722处理。在一些实施例中,中央处理器也可执行网络处理器722的功能,比如基于通用CPU实现软件转发,从而物理接口卡723中不需要网络处理器722。
可选地,设备700包括多个接口板720。
可选地,设备700还包括交换网板730。交换网板730也例如称为交换网板单元(switch fabric unit,SFU)。在网络设备有多个接口板720的情况下,交换网板730用于完成各接口板之间的数据交换。例如,两个接口板720之间例如通过交换网板730通信。
主控板710和接口板720耦合。例如。主控板710、两个接口板720,以及交换网板730之间通过***总线与***背板相连实现互通。在一种可能的实现方式中,主控板710和接口板720之间建立进程间通信协议(inter-process communication,IPC)通道,主控板710和接口板720之间通过IPC通道进行通信。
在逻辑上,设备700包括控制面和转发面,控制面包括主控板710和中央处理器,转发面包括执行转发的各个组件,比如转发表项存储器724、物理接口卡723和网络处理器722。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器722基于控制面下发的转发表对物理接口卡723收到的报文查表转发。控制面下发的转发表例如保存在转发表项存储器724中。在有些实施例中,控制面和转发面例如完全分离,不在同一设备上。
多个接口板720的操作一致,为了简洁,不再赘述。
需要说明的是,主控板可能有一块或多块,有多块的时候例如包括主用主控板和备用主控板。接口板可能有一块或多块,网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,网络设备可以不需要交换网板,接口板承担整个***的业务数据的处理功能。在分布式转发架构下,网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的设备。可选地,网络设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
上述描述了处理报文的方法的执行主体,接下来结合图8描述处理报文的方法的流程,在图8中以执行主体为上述第一设备为例进行说明,如前所述,第一设备是主机、移动终端、服务器、网络中的网络设备等,第一设备还可以是网络叶节点或者网络脊节点,网络叶节点与网络脊节点连接等。第一设备为报文添加stream实例对应的标记信息,以使得其他设备基于报文中添加的stream实例对应的标记信息对报文进行处理。此外,第一设备也可以基于报文中添加的stream实例对应的标记信息对报文进行处理。图8包括步骤801至步骤804。
步骤801,获取第一报文,第一报文包括基于QUIC协议的stream实例所传输的数据。
其中,为了方便描述,本申请实施例以基于QUIC协议的第一stream实例为例进行说明,第一stream实例是某个QUIC连接内的任一stream实例,该QUIC连接是基于QUIC协议创建的连接。QUIC连接是数据发送端和数据接收端之间建立的QUIC连接。
在本实施例中,第一设备获取第一报文。例如,第一设备接收第一报文。再例如,第一设备生成第一报文。
步骤802,获得与stream实例对应的标记信息。
示例性的,stream实例的标记信息用于区分stream实例,不同类型的stream实例对应有不同的stream实例的标记信息,例如,第一stream实例的标记信息用于在QUIC连接内标记一个类型的stream实例,该类型的stream实例包括第一stream实例,每个类型的stream实例可以包括多个stream实例,例如,每个类型的stream实例用于传输一种类型的数据,数据的类型包括视频、语音和文本等。或者,第一stream实例的标记信息在QUIC连接内唯一标记第一stream实例。
示例性的,对于第一stream实例,第一stream实例的标记信息可以包括第一stream实例的相关信息,步骤802的处理可以为:
获得第一stream实例的标记信息,第一stream实例的标记信息包括第一stream实例的相关信息。
在本实施例中,第一设备可以通过获得第一stream实例的相关信息,获得第一stream实例的标记信息。例如,该标记信息包括第一stream实例的相关信息。
例如,该相关信息包括以下至少一项:第一stream实例传输的数据的类型(该类型包括视频、语音和文本等)、第一stream实例的特征信息、第一stream实例关联的path标识和第一stream实例的索引信息,第一stream实例的索引信息用于在第一stream实例所属QUIC连接内指示第一stream实例。特征信息可选的是第一stream实例的stream标识中的指定比特,特征信息可选的是基于第一stream实例的stream标识哈希得到的内容,本申请实施例对特征信息的内容不做具体限定。该索引信息可以是随机分配的,也可以是哈希值,还可以是对不同stream实例顺序分配的连续值。
步骤803,为第一报文添加标记信息,获得第二报文。
在本实施例中,第一设备在确定与第一stream实例的标记信息后,为第一报文添加该标记信息,获得第二报文。示例性的,为第一报文添加的该标记信息时添加在第二报文的外层报文头中,网络中转发第二报文的网络设备能够读取到该标记信息。例如,设置在IPv6报文的flow label字段中,再例如,设置在IPv4报文的option字段中。
步骤804,发送第二报文,标记信息用于接收到第二报文的转发设备基于标记信息处理第二报文。
其中,转发设备可以是网络中的路由器或者交换机等。
在本实施例中,第一设备在获得第二报文后,向外发送第二报文。网络中接收到第二报文的转发设备基于该标记信息处理第二报文,此过程参见后文中图13所示的流程。
基于图8所示的流程,将第一stream实例的标记信息添加到转发设备能够读取到的位置,且是非加密的,使得报文在转发过程,转发设备能够对报文做相应的策略。
接下来基于第一设备的不同对图8所示的流程进行进一步说明。如下提供两种可能的情 况。
情况1:第一设备为生成第一报文的装置,第一报文为QUIC报文。例如,第一设备为主机等。
情况2:第一设备为网络中用于转发报文的转发设备。例如,第一设备为网络中的路由器或交换机等。
对于情况1,处理报文的方法的流程参见图9所示的流程,图9包括步骤901至步骤904。
步骤901,生成QUIC报文,QUIC报文包括第一stream实例所传输的数据。
在本实施例中,第一设备作为数据发送端,第一设备与数据接收端建立QUIC连接,具体建立QUIC连接的过程参见RFC9000,此处不再赘述。第一设备在QUIC连接内创建第一stream实例,生成QUIC报文,该QUIC报文包括QUIC连接内第一stream实例所传输的数据,也就是说QUIC报文的payload部分包括第一stream实例对应的STREAM帧,STREAM帧包括所要传输的数据和stream标识。第一设备在QUIC报文的外层封装UDP报文头,得到UDP报文。在图9所示的流程中,第一报文为QUIC报文。
步骤902,获得与第一stream实例对应的标记信息。
在本实施例中,确定第一stream实例的标记信息的方式有多种,如下提供方式一至方式四。方式一是结构化分配方法,例如,规定标记信息占用N个比特,N大于1,规定N个比特中各个比特部分的定义。方式二是随机分配方法,例如,对于第一stream实例,使用某些随机算法生成随机且唯一的标记信息,随机算法可参见RFC4096等。
方式一,确定第一stream实例所传输的数据的类型、第一stream实例的特征信息和索引信息,索引信息用于在第一stream实例所属QUIC连接内唯一指示第一stream实例,将该数据的类型、该第一特征信息和该索引信息,确定为第一stream实例的标记信息。
在本实施例中,确定第一stream实例所传输的数据的类型,该类型用于指示数据是语音数据、图像数据和文本数据中的哪一种。确定第一stream实例的特征信息和索引信息,特征信息可选的是第一stream实例的stream标识中的指定比特,特征信息可选的是基于第一stream实例的stream标识哈希得到,本申请实施例对特征信息的内容不做具体限定。该索引信息在第一stream实例所属QUIC连接唯一指示第一stream实例,该索引信息可以是随机分配的,也可以是哈希值,还可以是对不同stream实例顺序分配的连续值。对于不同stream实例的标记信息,数据的类型占用的比特数是相同的,各stream实例的特征信息占用的比特数是相同的,各stream实例的索引信息占用的比特数是相同的。第一设备将该数据的类型、特征信息和该索引信息,确定为第一stream实例的标记信息。或者,第一设备根据该数据的类型、特征信息和该索引信息,生成第一stream实例的标记信息。例如,第一设备将该数据的类型、特征信息和该索引信息输入随机算法,生成第一stream实例的标记信息。
方式二,根据第一stream实例的相关信息和随机算法,生成该标记信息。
在本实例中,第一设备获取第一stream实例的相关信息,将该相关信息输入预设的随机算法,该随机算法的输出即为第一stream实例的标记信息。
示例性的,该相关信息包括以下至少一项:第一stream实例传输的数据的类型、第一stream实例的特征信息、第一stream实例关联的path标识和第一stream实例的索引信息,第一stream实例的索引信息用于在QUIC连接内指示第一stream实例。
示例性的,第一stream实例的相关信息包括第一stream实例的stream标识,该stream标 识是在创建第一stream实例时生成的,在QUIC连接内唯一指示第一stream实例。相应的,在方式二中,将第一stream实例的stream标识,输入预设的随机算法,得到一个输出值,该输出值为第一stream实例的标记信息。
示例性的,第一stream实例的相关信息包括第一stream实例的stream标识、第一报文的源地址和目的地址,第一报文的源地址可以为数据发送端的IP地址,目的地址可以为第一报文的数据接收端的IP地址。相应的,在方式二,将第一stream实例的stream标识、第一报文的源地址和目的地址,输入预设的随机算法,得到一个输出值,该输出值为第一stream实例的标记信息。
示例性的,第一stream实例的相关信息包括第一stream实例的标识、第一报文的五元组信息,五元组信息包括源地址、目的地址、协议、源端口和目的端口。相应的,在方式二中,将第一stream实例的stream标识和第一报文的五元组信息,输入预设的随机算法,得到一个输出值,该输出值为第一stream实例的标记信息。
示例性的,第一stream实例的相关信息包括第一stream实例所传输的数据的类型。相应的,在方式二中,将该数据的类型输入预设的随机算法,得到一个输出值,该输出值为第一stream实例的标记信息。
需要说明的是,上述关于第一stream实例的相关信息,仅是一些示例性的例子,凡是能用于区分第一stream实例的相关信息,均能应用于本申请实施例,此处不再一一举例。另外,该第一stream实例的相关信息包括该第一stream实例的stream标识时,由于stream标识在该QUIC连接内是唯一的,所以生成的第一stream实例的标记信息,在所属QUIC连接内也是唯一的。第一stream实例的相关信息包括第一stream实例所传输的数据的类型时,由于不同stream实例所传输的数据的类型有可能相同,所以生成的第一stream实例的标记信息与其所属类型下的各个stream实例相同。
方式三,将第一stream实例的stream标识,确定为第一stream实例的标记信息。
方式四,基于第一stream实例关联的path,确定第一stream实例的标记信息。
在本实施例中,第一设备确定第一stream实例关联的path,对该path的五元组信息进行处理,得到第一stream实例的标记信息。例如,对path的五元组信息进行处理可以包括将该五元组信息输入预设的随机算法中。
需要说明的是,在方式四中,假设第一stream实例关联的path仅关联第一stream实例,那么第一stream实例的标记信息在QUIC连接内是唯一的。假设第一stream实例关联的path关联其它stream实例,那么第一stream实例的标记信息与该其它stream实例的标记信息相同,也就是说该path关联的stream实例属于一个类型的stream实例。
步骤903,为QUIC报文添加第一stream实例的标记信息,得到第二报文。
在本实施例中,第一设备为步骤901得到的UDP报文添加标记信息,该标记信息位于报文的第一外层报文头中第一字段。
示例性的,在第一外层报文头为IPv6头的情况下,第一字段可以为flow label字段。在第一外层报文头为IPv4头的情况下,第一字段可以为option字段。
步骤904,发送第二报文,标记信息用于接收到第二报文的转发设备基于标记信息处理第二报文。
在本实施例中,第一设备在得到第二报文后,第一设备接入网络的方式不相同,发送第 二报文的处理也有一些区别。
在第一设备是单归接入网络的情况下,第一设备连接一个转发设备,第一设备接将第二报文发送给该转发设备即可。例如,在图5所示的网络架构中,第一设备为主机1,第二报文从主机1发往主机2。由于主机1只连接PE1,所以主机1将第二报文发往PE1。
在第一设备是多归接入网络的情况下,第一设备连接至少两个转发设备。第一设备对第一stream实例的标记信息和第二报文的源地址和目的地址进行哈希计算,得到一个哈希值,使用该哈希值选择下一跳转发设备。或者,第一设备对第一stream实例的标记信息和第二报文的源地址、目的地址、源端口和目的端口进行哈希计算,得到一个哈希值,使用该哈希值选择下一跳转发设备。或者,第一设备对第一stream实例的标记信息和第二报文的五元组信息进行哈希计算,得到一个哈希值,使用该哈希值选择下一跳转发设备。
接收到第二报文的转发设备也能识别其中携带的标记信息,进而能对第二报文进行处理。
从图9所示的流程可知,经过网络传输的第二报文的外层报文头包括stream实例的标记信息,所以网络中的转发设备能够识别不同stream实例或者不同类型的stream实例,进而基于stream实例执行处理策略。
需要说明的是,在图9所示的流程中,是为第一报文添加第一外层报文头,在第一外层报文头中设置第一stream实例的标记信息。也可以是第一报文已经存在第一外层报文头,对第一外层报文头中的某些字段进行修改,使得第一外层报文头中包括第一stream实例的标记信息。例如,先为QUIC报文添加IPv6头,然后在IPv6头中的flow label字段中添加该标记信息。
对于情况2,步骤803中第一设备为第一报文添加标记信息,有多种处理方式。例如,第一报文不存在第一外层报文头,为第一报文添加第一外层报文头,该第一外层报文头包括标记信息。再例如,第一报文本身存在第一外层报文头,修改第一报文的第一外层报文头中的某些字段为标记信息,或者在第一报文的第一外层报文头的某些预留字段中添加标记信息。
示例性的,为第一报文添加外层报文头的情况下,处理报文的方法的流程参见图10所示的流程,图10包括步骤1001至步骤1004。
步骤1001,接收第一报文,第一报文包括封装有第二外层报文头的QUIC报文。
在本实施例中,第一设备作为转发第一报文的转发设备,从网络中其它转发设备接收到第一报文,或者从数据发送端接收到第一报文,第一报文包括封装有第二外层报文头的QUIC报文,第二外层报文头包括第二字段,第二字段的内容用于标记第一stream实例。例如,第一报文为IPv6报文,第二外层报文头为IPv6头,IPv6头用于封装UDP报文,UDP报文中包括QUIC报文。再例如,第一报文为IPv4报文,第二外层报文头为IPv4头,IPv4头用于封装UDP报文,UDP报文中包括QUIC报文。
步骤1002,获取第二外层报文头的第二字段的内容,第二字段的内容用于标记第一stream实例;根据第二字段的内容获得第一stream实例的标记信息。
在本实施例中,网络中存在管理设备,管理设备会向网络中对第一报文转发处理的部分或全部转发设备下发配置信息,以及映射策略,该配置信息用于配置读取第二字段的内容,还用于使用该映射策略,将第二字段的内容映射为第一stream实例的标记信息,该映射策略指示将第二字段的内容映射为第一stream实例的标记信息的策略。这些转发设备存储该配置信息和映射策略。
接收第一报文的第一设备,读取第二字段的内容,并获取存储的映射策略。使用映射策略将第二字段的内容映射为第一stream实例的标记信息。
示例性的,第二字段的内容是基于第一stream实例的相关信息获得,相关信息包括的内容参见前文中的描述。例如,第二字段是该相关信息,或者第二字段是将该相关信息输入随机算法获得的输出值等。
示例性的,将第二字段的内容映射为第一stream实例的标记信息的处理为:
方式一,将第二字段的内容确定为第一stream实例的标记信息。
方式二,映射策略为预设的映射算法,将第二字段的内容输入预设的映射算法,得到输出值,该输出值即为第一stream实例的标记信息。
方式三,将第二字段的内容中预设比特位的内容,选取为第一stream实例的标记信息。
上述三种方式为示例性的方式,本申请实施例对该过程不做限定。
步骤1003,为第一报文添加第一外层报文头,得到第二报文,第一外层报文头的第一字段包括标记信息。
在本实施例中,第一设备为第一报文添加第一外层报文头,也能称为是为第一报文封装第一外层报文头。第一外层报文头的第一字段包括第一stream实例的标记信息。
示例性的,第一设备为隧道的入端点设备,隧道的入端点设备为第一报文添加的第一外层报文头为隧道头。例如,隧道头为VXLAN报文头,第一字段为VXLAN报文头的VXLAN header中的保留字段。
需要说明的是,隧道端点设备添加第一外层报文头,在第二报文到达隧道的末端点设备时,隧道的末端点设备删除第一外层报文头。
步骤1004,发送第二报文,标记信息用于接收到第二报文的转发设备基于标记信息处理第二报文。
在本实施例中,第一设备也可以基于标记信息对第二报文进行处理。例如,第一设备在得到第二报文后,若第一设备的出接口仅连接一个设备,则第一设备直接发送第二报文。若第一设备的出接口连接多个设备,则第一设备对第一stream实例的标记信息和第二报文的源地址和目的地址进行哈希计算,得到一个哈希值,使用该哈希值选择下一跳转发设备。或者,第一设备对第一stream实例的标记信息和第二报文的源地址、目的地址、源端口和目的端口进行哈希计算,得到一个哈希值,使用该哈希值选择下一跳转发设备。或者,第一设备对第一stream实例的标记信息和第二报文的五元组信息进行哈希计算,得到一个哈希值,使用该哈希值选择下一跳转发设备。
从图10所示的流程可知,在网络中的转发设备接收到报文后,也可以将stream实例的标记信息添加在报文中,进行发送,使得网络中的转发设备能够基于stream实例做处理策略。
对于情况2,步骤703中为第一报文添加标记信息具体为:修改第一报文的第一外层报文头中的某些字段为标记信息,或者在第一报文的第一外层报文头的某些预留字段中添加标记信息,处理报文的方法的流程参见图11所示的流程,图11包括步骤1101至步骤1104。
步骤1101,接收第一报文,第一报文包括封装有第一外层报文头的QUIC报文。
步骤1101参见步骤1001的描述,此处不再赘述。
步骤1102,获得与第一stream实例对应的标记信息。
示例性的,第一设备还可以使用步骤1002中方式一至方式三的方式,确定第一stream实 例的标记信息。
步骤1103,在第一报文的第一外层报文头添加标记信息,获得第二报文。
在本实施例中,第一设备在第一报文的第一外层报文头添加标记信息,获得第二报文,该标记信息可以是对第一外层报文头的某些字段进行修改,也可以是添加在第一外层报文头的预留字段中,例如,第一外层报文头为IPv6头,IPv6头的flow label的值为0,将flow label的值修改为第一stream实例的标记信息。
步骤1104,发送第二报文,标记信息用于接收到第二报文的转发设备基于标记信息处理第二报文。
步骤1104参见步骤1004的描述,此处不再赘述。
在另一种可能的实现方式中,第一stream实例是双向stream实例,第一stream实例的stream标识指示双向stream实例。此种情况下,第一stream实例所属的双方中仅一方确定第一stream实例对应的标记信息,另一方使用该标记信息。参见图12所示的流程,在图12所示的流程中,数据发送端和数据接收端为创建第一stream实例的双向,数据接收端为前文中提到的第一设备。
步骤1201,数据发送端生成基于QUIC协议的第一QUIC报文,该第一QUIC报文中STREAM帧包括第一stream实例的stream标识。
步骤1202,数据发送端确定与第一stream实例对应的标记信息。
步骤1201至步骤1202的处理过程与步骤901至步骤902处理过程类似,此处不再赘述。
步骤1203,数据发送端为第一QUIC报文添加外层报文头,得到第三报文。
在本实施例中,由于QUIC报文是基于UDP,所以第一QUIC报文的外层封装有UDP报文头,在封装有UDP报文头的第一QUIC报文的外层添加外层报文头,该外层报文头的第三字段包括标记信息。
示例性的,在该外层报文头为IPv6头的情况下,第三字段可以为flow label字段。在该外层报文头为IPv4头的情况下,第三字段可以为option字段。
步骤1204,数据发送端发送第三报文,第三报文中的标记信息用于接收到第三报文的转发设备基于该标记信息处理第三报文。
步骤1204中的描述参见步骤904中的描述,此处不再赘述。
步骤1205,数据接收端接收第三报文,存储与第一stream实例对应的标记信息。
在本实施例中,数据接收端接收到第三报文时,由于是第一次接收第一stream实例的stream标识的报文,则数据接收端也创建第一stream实例的分布性实体。并且数据接收端存储与第一stream实例对应的标记信息。
步骤1206,数据接收端生成基于QUIC协议的第二QUIC报文。
在本实施例中,数据接收端要向数据发送端发送数据或者控制信息时,数据接收端生成基于QUIC协议的第二QUIC报文,第二QUIC报文中STREAM帧包括第一stream实例的stream标识,第二QUIC报文为前文描述的第一报文。
步骤1207,数据接收端获取存储的第一stream实例的标记信息。
后续数据接收端使用第一stream实例发送数据时,均可以使用存储的与第一stream实例对应的标记信息。
步骤1208,数据接收端为第二QUIC报文添加第一外层报文头,获得第二报文,第一外 层报文头的第一字段包括该标记信息。
在本实施例中,由于QUIC报文是基于UDP,所以第二QUIC报文的外层封装有UDP报文头,在封装有第二QUIC报文的UDP报文头的外层添加第一外层报文头,第一外层报文头的第一字段包括标记信息。
步骤1209,数据接收端发送第二报文,接收到第二报文的转发设备基于标记信息处理第二报文。
步骤1209的处理方式参见步骤804的处理方式,此处不再赘述。
从图12所示的流程可知,第一stream实例是一个双向stream实例,数据接收端不需要计算标记信息,能够节约处理资源。
需要说明的是,在图12所示的流程中,是数据发送端生成第一stream实例的标记信息,在本申请实施例中,也可以是数据接收端生成第一stream实例的标记信息,发送给数据发送端,此处不再赘述。
针对图9至图12所示的流程,需要说明的是,在每个stream实例的标记信息在所属QUIC连接内唯一时,单个QUIC报文包括的STREAM帧均属于同一stream实例,这样,是对每个stream实例进行处理。在每个类型stream实例的标记信息在所属QUIC连接内唯一时,单个QUIC报文包括的STREAM帧属于同一类型的stream实例,这样,是对每一类stream实例进行处理。此处的处理包括但不限于负载均衡处理。
为了更好地理解本申请实施例,接下来描述基于标记信息进行报文处理的流程,参见图13所示的流程,在图13中以执行主体为上述第二设备为例进行说明,如前所述,第二设备是主机、移动终端、服务器、网络中的网络设备,第二设备还可以是网络叶节点或者网络脊节点,网络叶节点与网络脊节点连接等。此处网络设备可以是网络中的交换机或路由器等。第二设备基于报文的外层报文头中添加的标记信息对报文进行处理,该标识信息为stream实例对应的标识信息。
步骤1301,获取报文,该报文包括基于QUIC协议的stream实例所传输的数据,该报文的外层报文头包括该stream实例的标记信息。
在本实施例中,第二设备具体为网络中的转发设备,该转发设备接收报文,该报文为创建第一stream实例的设备发送的报文,该报文为步骤903、步骤1003和步骤1103和步骤1203中描述的第二报文。第二设备在该报文外层报文头的第一字段中获取第一stream的标记信息。
示例性的,该标记信息用于在一个QUIC连接内标记第一stream实例,或者,该标记信息用于在一个QUIC连接内标记某个类型的stream实例,该类型的stream实例包括第一stream实例。
步骤1302,基于该标记信息,对该报文进行处理。
在本实施例中,第二设备使用第一stream实例的标记信息,对该报文进行处理。示例性的,对该报文的处理包括对该报文进行转发、对该报文进行分类采集和采集该报文的时延信息等。
示例性的,在对该报文进行转发处理时,可以基于第一stream实例的标记信息和外层报文头中目的IP地址,对该报文进行转发处理。
其中,目的地址可以是目的IP地址。
在本实施例中,第二设备获取该报文的外层报文头中的目的地址,使用第一stream实例 的标记信息和该目的地址,对该报文进行转发处理。例如,第二设备中配置有不同标记信息的报文所经过的路径,第二设备使用第一stream实例的标记信息和目的地址,查找到下一跳,向该下一跳发送报文。
示例性的,在步骤1302中,可以基于第一stream实例的标记信息的哈希值对报文进行转发处理,处理为:
根据该标记信息进行哈希计算,得到哈希值;基于该哈希值在多条等价转发路径中确定用于转发该报文的转发路径;根据所确定的转发路径转发该报文。
在本实施例中,在存在多条等价路由路径的情况下,第二设备对第一stream实例的标记信息进行哈希处理,得到一个哈希值。使用该哈希值在多条等价路由路径中,确定下一跳,向该下一跳发送报文。
或者,在存在多条等价路由路径的情况下,第二设备对报文的五元组信息中的一种或多种和第一stream实例的标记信息,得到一个哈希值。使用该哈希值在多条等价路由路径中,确定下一跳,向该下一跳发送报文。例如,第二设备对第一stream实例的标记信息外层报文信息中的目的地址和源地址进行哈希处理,得到一个哈希值。再例如,第二设备对第一stream实例的标记信息、报文的目的地址、源地址、源端口和目的端口进行哈希处理,得到一个哈希值。
图13中的流程是以第二设备是转发设备为例进行说明,在实际处理时也可以是创建第一stream实例的设备,那么在步骤1201中,获取报文,具体为生成报文,其余处理与图13中的描述相同。
接下来对应图13所示的流程进行举例说明,假设处理报文的装置为图5中的PE1,PE1到目的主机2存在两条等价路由路径,PE1-->P1-->P3-->PE2和PE1-->P2-->P4-->PE2。源主机1和目的主机2之间创建第一stream实例和第二stream实例,第一stream实例的标记信息与第二stream实例的标记信息不相同。假设源主机1同时使用第一stream实例和第二stream实例向目的主机2发送两个字节流(如两个文件的数据),PE1将第一stream实例对应的报文发送至P1,经路径PE1-->P1-->P3-->PE2。PE2将第二stream实例对应的报文发送至P2,经路径PE1-->P2-->P4-->PE2,参见图14所示的负载均衡示意图。这样,不同的stream实例的报文经过的路径不相同,能够实现基于stream实例的标记信息的负载均衡。
再例如,图15示出了另一种场景下的负载均衡的示意图,如图15所示,该场景涉及spine-leaf网络,或称为leaf-spine网络。该场景包括主机、leaf节点和spine节点。其中,主机可以包括源主机1和目的主机2,leaf节点可以包括leaf 1、leaf 2、leaf3和leaf4,spine节点可以包括spine1和spine2。源主机1双归接入网络,目的主机2双归接入网络,源主机1接入leaf1和leaf2,leaf1和leaf2接入spine1和spine2,目的主机2接入leaf3和leaf4,leaf3和leaf4接入spine1和spine2。源主机1创建第一stream实例和第二stream实例,第一stream实例的标记信息与第二stream实例的标记信息不相同。假设源主机1同时使用第一stream实例和第二stream实例向目的主机2发送两个字节流(如两个文件的数据),第一stream实例的标记信息和/或第二stream实例的标记信息可以由源主机、leaf节点或spine节点添加至相应的报文中,获得报文的源主机、leaf节点或spine节点可以根据报文中的第一stream实例的标记信息和/或第二stream实例的标记信息进行报文处理。源主机1可以使用第一stream实例的标记信息在两条等价路由路径中,确定第一stream实例对应的报文发往leaf1。或者,leaf1使用 第一stream实例的标记信息,在两条等价路由路径中,确定第一stream实例对应的报文发往spine1。或者,spine1使用第一stream实例的标记信息,在两条等价路由路径中,确定第一stream实例对应的报文发往leaf3。leaf3将第一stream实例对应报文发往目的主机2。并且源主机1可以使用第二stream实例的标记信息,在两条等价路由路径中,确定第二stream实例对应的报文发往leaf2。或者,Leaf2使用第二stream实例的标记信息,在两条等价路由路径中,确定第二stream实例对应的报文发往spine2。或者,Spine2使用第二stream实例的标记信息,在两条等价路由路径中,确定第二stream实例对应的报文发往leaf4。Leaf4将第二stream实例对应报文发往目的主机2。这样,第一stream实例对应的报文经路径leaf1-->spine1-->leaf3到达目的主机2,第二stream实例对应的报文经路径leaf2-->spine2-->leaf4到达目的主机2。可见通过stream实例对应的标记信息,能实现负载均衡。
此处各个节点在两条等价路由路径中选择路径的方式参见图13所示的流程,此处不再赘述。
在图14和图15中,是以对报文进行负载均衡处理为例进行说明,例如,还可以是确定不同标记信息的报文的数目或不同标记信息的报文的时延信息等。
本申请实施例中,将stream实例的标记信息添加到报文中,可以使得转发设备在不对STREAM帧进行解密的情况下,实现基于stream的处理策略。而且在该处理策略为负载均衡策略时,能够提升传输性能。而且本申请与现有标准规范兼容,具有较好的可部署性,例如,在IPv6报文中直接占用flow label字段设置stream实例的标记信息。再例如,在VXLAN报文中占用VXLAN Header的保留字段。再例如,在IPv4报文中直接占用option字段设置stream实例的标记信息。
图16是本申请实施例提供的处理报文的装置的结构图。该装置可以通过软件、硬件或者两者的结合实现成为该装置中的部分或者全部。本申请实施例提供的处理装置可以实现本申请实施例图8至图12所述的流程,具体的,本申请实施例提供的处理装置能够实现图8至图12所示的第一设备所执行的相关步骤。该处理报文的装置包括获取模块1610、确定模块1620、添加模块1630和发送模块1640,其中:
获取模块1610,用于获取第一报文,所述第一报文包括基于QUIC协议的stream实例所传输的数据,具体可以用于实现步骤801、步骤901、步骤1001、步骤1101和步骤1201的获取功能以及执行步骤801、步骤901、步骤1001、步骤1101和步骤1201包含的隐含步骤;
确定模块1620,用于获得与所述stream实例对应的标记信息,具体可以用于实现步骤802、步骤902、步骤1002、步骤1102和步骤1202的确定功能以及执行步骤802、步骤902、步骤1002、步骤1102和步骤1202包含的隐含步骤;
添加模块1630,用于为所述第一报文添加所述标记信息,获得第二报文,具体可以用于实现步骤803、步骤903、步骤1003、步骤1103和步骤1203的添加功能以及执行步骤803、步骤903、步骤1003、步骤1103和步骤1203包含的隐含步骤;
发送模块1640,用于发送所述第二报文,所述标记信息用于接收到所述第二报文的转发设备基于所述标记信息处理所述第二报文,具体可以用于实现步骤804、步骤904、步骤1004、步骤1104和步骤1204的发送功能以及执行步骤804、步骤904、步骤1004、步骤1104和步骤1204包含的隐含步骤。
在一种可能的实现方式中,所述标记信息用于在QUIC连接内标记所述stream实例,或者,所述标记信息用于在所述QUIC连接内标记所述stream实例的类型,所述stream实例属于所述标记信息所标记的stream实例。
在一种可能的实现方式中,所述添加模块1630,用于:
在所述第一报文的第一外层报文头的第一字段中添加所述标记信息。
在一种可能的实现方式中,所述第一外层报文头为IPv6头,所述第一字段为flow label字段;或者,
所述第一外层报文头为IPv4头,所述第一字段为option字段。
在一种可能的实现方式中,所述确定模块1620,用于:
获得所述stream实例的标记信息,所述stream实例的标记信息包括所述stream实例的相关信息。
在一种可能的实现方式中,所述确定模块1620,用于:
根据所述stream实例的相关信息和随机算法,生成所述标记信息。
在一种可能的实现方式中,所述相关信息包括以下至少一项:所述数据的类型、所述stream实例的特征信息、所述stream实例关联的path标识和所述stream实例的索引信息,所述stream实例的索引信息用于在QUIC连接内指示所述stream实例。
在一种可能的实现方式中,所述确定模块1620,用于:
根据所述stream实例的标识和所述随机算法,生成所述标记信息;或者,
根据所述stream实例的标识、所述第一报文的源地址、目的地址和所述随机算法,生成所述标记信息;或者,
根据所述stream实例的标识、所述第一报文的五元组信息和所述随机算法,生成所述标记信息。
在一种可能的实现方式中,所述stream实例为双向stream实例;所述确定模块1620,用于:
获取基于所述stream实例所传输的第三报文,所述第三报文沿第一方向传输,所述第二报文沿第二方向传输,所述第一方向与所述第二方向的方向相反;
在所述第三报文的外层报文头中获取所述标记信息。
在一种可能的实现方式中,所述第一报文包括封装有第二外层报文头的QUIC报文;
所述确定模块1620,用于:
获取所述第二外层报文头的第二字段的内容,所述第二字段的内容用于标记所述stream实例;
根据所述第二字段的内容获得所述stream实例的标记信息。
在一种可能的实现方式中,所述标记信息包括所述stream实例的相关信息,所述相关信息包括以下至少一项:所述数据的类型、所述stream实例的特征信息,所述stream实例关联的path标识和所述stream实例的索引信息,所述stream实例的索引信息用于在QUIC连接内唯一指示所述stream实例。
在一种可能的实现方式中,所述获取模块1610,用于生成所述第一报文,所述第一报文为基于QUIC协议的QUIC报文;或者,
接收第一报文,所述第一报文包括封装有第三外层报文头的QUIC报文。
在一种可能的实现方式中,所述第一设备为主机或网络设备。
在一种可能的实现方式中,所述第一设备为网络叶节点,所述网络叶节点与网络脊节点连接。
图17是本申请实施例提供的处理报文的装置的结构图。该装置可以通过软件、硬件或者两者的结合实现成为该装置中的部分或者全部。本申请实施例提供的处理装置的报文可以实现本申请实施例图13所述的流程,具体的,本申请实施例提供的处理装置能够实现图13所示的第二设备所执行的相关步骤。该处理报文的装置包括报文获取模块1710和处理模块1720,其中:
报文获取模块1710,用于获取报文,所述报文包括基于QUIC协议的stream实例所传输的数据,所述报文的外层报文头包括与所述stream实例对应的标记信息,具体可以用于实现步骤1301的报文获取功能以及执行步骤1302包含的隐含步骤;
处理模块1720,用于基于所述标记信息,对所述报文进行处理,具体可以用于实现步骤1302的处理功能以及执行步骤1302包含的隐含步骤。
在一种可能的实现方式中,所述处理模块1720,用于:
基于所述标记信息和所述外层报文头中目的地址,对所述报文进行转发处理。
在一种可能的实现方式中,所述处理模块1720,用于:
根据所述标记信息进行哈希计算,得到哈希值;
基于所述哈希值在多条等价转发路径中确定用于转发所述报文的转发路径;
根据所确定的转发路径转发所述报文。
在一种可能的实现方式中,所述标记信息用于在QUIC连接内标记所述stream实例,或者,所述标记信息用于在所述QUIC连接内标记所述stream实例的类型,所述stream实例属于所述标记信息所标记的stream实例。
在一种可能的实现方式中,所述标记信息包括在所述报文的外层报文头的字段中;其中,
所述外层报文头为IPv6头,所述字段为flow label字段;或者,
所述外层报文头为IPv4头,所述字段为option字段。
在一种可能的实现方式中,所述标记信息包括所述stream实例的相关信息,所述相关信息包括以下至少一项:所述数据的类型、所述stream实例的特征信息,所述stream实例关联的path标识和所述stream实例的索引信息,所述stream实例的索引信息用于在QUIC连接内唯一指示所述stream实例。
在一种可能的实现方式中,所述第二设备为主机或网络设备。
在一种可能的实现方式中,所述第二设备为网络叶节点或网络脊节点。
图16和图17所示的处理报文的装置执行处理报文的详细过程请参照前面各个实施例中的描述,在这里不进行重复说明。示例性的,图16中所示的处理报文的装置应用于图6或图7中所示的设备,或者应用于第一设备。图17中所示的处理报文的装置应用于图6或图7中所示的设备,或者应用于第二设备。
另外,图16和图17中的模块划分方式是示例性的划分方式,本申请实施例不做限定。
在一些实施例中,提供了一种处理报文的***,该***包括第一设备和第二设备,第一设备用于在前文中执行处理报文的部分过程,第二设备用于在前文中执行处理报文的部分过 程。
在一些实施例中,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。第一设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得第一设备执行图8至图12所示的流程。
在一些实施例中,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。第二设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得第二设备执行图13所示的流程。
本领域普通技术人员可以意识到,结合本申请中所公开的实施例中描述的各方法步骤和单元,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的几个实施例中,应该理解到,所揭露的***架构、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或模块的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
该作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请实施例方案的目的。
另外,在本申请各个实施例中的各模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以是两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件模块的形式实现。
该集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例中方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
本申请中术语“第一”“第二”等字样用于对作用和功能基本相同的相同项或相似项进行区分,应理解,“第一”、“第二”之间不具有逻辑或时序上的依赖关系,也不对数量和执行顺序进行限定。还应理解,尽管以下描述使用术语第一、第二等来描述各种元素,但这些元素不应受术语的限制。这些术语只是用于将一元素与另一元素区别分开。例如,在不脱离各种示例的范围的情况下,第一stream实例可以被称为第二stream实例,并且类似地,第二stream实例可以被称为第一stream实例。第一stream实例和第二stream实例都可以是stream实例,并且在某些情况下,可以是单独且不同的stream实例。
本申请中术语“至少一个”的含义是指一个或多个,本申请中术语“多个”的含义是指两个或两个以上。
以上描述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (27)

  1. 一种处理报文的方法,所述方法应用于第一设备,其特征在于,所述方法包括:
    获取第一报文,所述第一报文包括基于QUIC协议的流stream实例所传输的数据;
    获得与所述stream实例对应的标记信息;
    为所述第一报文添加所述标记信息,获得第二报文;
    发送所述第二报文,所述标记信息用于接收到所述第二报文的转发设备基于所述标记信息处理所述第二报文。
  2. 根据权利要求1所述的方法,其特征在于,所述标记信息用于在QUIC连接内标记所述stream实例,或者,所述标记信息用于在所述QUIC连接内标记所述stream实例的类型,所述stream实例属于所述标记信息所标记的stream实例。
  3. 根据权利要求1或2所述的方法,其特征在于,所述为所述第一报文添加所述标记信息,包括:
    在所述第一报文的第一外层报文头的第一字段中添加所述标记信息。
  4. 根据权利要求3所述的方法,其特征在于,所述第一外层报文头为互联网协议第六版IPv6头,所述第一字段为流标签flow label字段;或者,
    所述第一外层报文头为互联网协议第四版IPv4头,所述第一字段为选项option字段。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述获得与所述stream实例对应的标记信息,包括:
    获得所述stream实例的标记信息,所述stream实例的标记信息包括所述stream实例的相关信息。
  6. 根据权利要求1-4任一项所述的方法,其特征在于,所述获得与所述stream实例对应的标记信息,包括:
    根据所述stream实例的相关信息和随机算法,生成所述标记信息。
  7. 根据权利要求5或6所述的方法,其特征在于,其中,所述相关信息包括以下至少一项:所述数据的类型、所述stream实例的特征信息、所述stream实例关联的路径path标识和所述stream实例的索引信息,所述stream实例的索引信息用于在QUIC连接内指示所述stream实例。
  8. 根据权利要求6所述的方法,其特征在于,所述根据所述stream实例的相关信息和随机算法,生成所述标记信息,包括:
    根据所述stream实例的标识和所述随机算法,生成所述标记信息;或者,
    根据所述stream实例的标识、所述第一报文的源地址、目的地址和所述随机算法,生成所述标记信息;或者,
    根据所述stream实例的标识、所述第一报文的五元组信息和所述随机算法,生成所述标记信息。
  9. 根据权利要求1-4任一项所述的方法,其特征在于,所述stream实例为双向stream实例;
    所述获得与所述stream实例对应的标记信息,包括:
    获取基于所述stream实例所传输的第三报文,所述第三报文沿第一方向传输,所述第二报文沿第二方向传输,所述第一方向与所述第二方向的方向相反;
    在所述第三报文的外层报文头中获取所述标记信息。
  10. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一报文包括封装有第二外层报文头的QUIC报文;
    所述获得与所述stream实例对应的标记信息,包括:
    获取所述第二外层报文头的第二字段的内容,所述第二字段的内容用于标记所述stream实例;
    根据所述第二字段的内容获得所述stream实例的标记信息。
  11. 根据权利要求9或10所述的方法,其特征在于,所述标记信息包括所述stream实例的相关信息,所述相关信息包括以下至少一项:所述数据的类型、所述stream实例的特征信息,所述stream实例关联的path标识和所述stream实例的索引信息,所述stream实例的索引信息用于在QUIC连接内指示所述stream实例。
  12. 根据权利要求1-11任一项所述的方法,其特征在于,所述获取第一报文,包括:
    生成所述第一报文,所述第一报文为基于QUIC协议的QUIC报文;或者,
    接收所述第一报文,所述第一报文包括封装有第三外层报文头的QUIC报文。
  13. 根据权利要求1-12任一项所述的方法,其特征在于,所述第一设备为主机或网络设备。
  14. 根据权利要求1-13任一项所述的方法,其特征在于,所述第一设备为网络叶节点或网络脊节点,所述网络叶节点与所述网络脊节点连接。
  15. 一种处理报文的方法,所述方法应用于第二设备,其特征在于,所述方法包括:
    获取报文,所述报文包括基于QUIC协议的流stream实例所传输的数据,所述报文的外层报文头包括与所述stream实例对应的标记信息;
    基于所述标记信息,对所述报文进行处理。
  16. 根据权利要求15所述的方法,其特征在于,所述基于所述标记信息,对所述报文进行处理,包括:
    基于所述标记信息和所述外层报文头中目的地址,对所述报文进行转发处理。
  17. 根据权利要求15所述的方法,其特征在于,所述基于所述标记信息,对所述报文进行处理,包括:
    根据所述标记信息进行哈希计算,得到哈希值;
    基于所述哈希值在多条等价转发路径中确定用于转发所述报文的转发路径;
    根据所确定的转发路径转发所述报文。
  18. 根据权利要求15-17任一项所述的方法,其特征在于,所述标记信息用于在QUIC连接内标记所述stream实例,或者,所述标记信息用于在所述QUIC连接内标记所述stream实例的类型,所述stream实例属于所述标记信息所标记的stream实例。
  19. 根据权利要求15-18任一项所述的方法,其特征在于,所述标记信息包括在所述报文的外层报文头的字段中;其中,
    所述外层报文头为互联网协议第六版IPv6头,所述字段为流标签flow label字段;或者,
    所述外层报文头为互联网协议第四版IPv4头,所述字段为选项option字段。
  20. 根据权利要求19所述的方法,其特征在于,所述标记信息包括所述stream实例的相关信息,所述相关信息包括以下至少一项:所述数据的类型、所述stream实例的特征信息,所述stream实例关联的路径path标识和所述stream实例的索引信息,所述stream实例的索引信息用于在QUIC连接内指示所述stream实例。
  21. 根据权利要求15-20任一项所述的方法,其特征在于,所述第二设备为主机或网络设备。
  22. 根据权利要求15-21任一项所述的方法,其特征在于,所述第二设备为网络叶节点或网络脊节点。
  23. 一种处理报文的***,其特征在于,所述***包括第一设备和第二设备,其中,
    所述第一设备,用于获取第一报文,所述第一报文包括基于QUIC协议的流stream实例所传输的数据;获得与所述stream实例对应的标记信息;为所述第一报文添加所述标记信息,获得第二报文,所述第二报文的外层报文头包括所述标记信息;发送所述第二报文;
    所述第二设备,用于获取所述第二报文;基于所述标记信息,对所述第二报文进行处理。
  24. 一种通信设备,其特征在于,所述设备包括处理器和存储器,所述存储器中存储有至少一条计算机指令,所述计算机指令由所述处理器执行以触发所述通信设备实现如权利要求1-14任一项所述的处理报文的方法。
  25. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有至少一条计算机指令,所述计算机指令由通信设备的处理器执行以触发所述通信设备实现如权利要求1-14任一项所述的处理报文的方法。
  26. 一种通信设备,其特征在于,所述设备包括处理器和存储器,所述存储器中存储有至少一条计算机指令,所述计算机指令由所述处理器执行以触发所述通信设备实现如权利要求15-22任一项所述的处理报文的方法。
  27. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有至少一条计算机指令,所述计算机指令由通信设备的处理器执行以触发所述通信设备实现如权利要求15-22任一项所述的处理报文的方法。
PCT/CN2022/118234 2021-09-18 2022-09-09 处理报文的方法、***、设备和存储介质 WO2023040782A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202111112961 2021-09-18
CN202111112961.8 2021-09-18
CN202111467765.2 2021-12-03
CN202111467765.2A CN115842876A (zh) 2021-09-18 2021-12-03 处理报文的方法、***、设备和存储介质

Publications (1)

Publication Number Publication Date
WO2023040782A1 true WO2023040782A1 (zh) 2023-03-23

Family

ID=85574571

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/118234 WO2023040782A1 (zh) 2021-09-18 2022-09-09 处理报文的方法、***、设备和存储介质

Country Status (2)

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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200120555A1 (en) * 2018-10-16 2020-04-16 Cisco Technology, Inc. Systems and Methods for Quick User Datagram Protocol Internet Connection (QUIC) with Multipath
CN112039884A (zh) * 2020-08-31 2020-12-04 浪潮云信息技术股份公司 一种快速互联协议quic在分布式数据库***中的应用
CN113365369A (zh) * 2020-03-06 2021-09-07 华为技术有限公司 通信方法和装置
CN113365267A (zh) * 2020-03-06 2021-09-07 华为技术有限公司 通信方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200120555A1 (en) * 2018-10-16 2020-04-16 Cisco Technology, Inc. Systems and Methods for Quick User Datagram Protocol Internet Connection (QUIC) with Multipath
CN113365369A (zh) * 2020-03-06 2021-09-07 华为技术有限公司 通信方法和装置
CN113365267A (zh) * 2020-03-06 2021-09-07 华为技术有限公司 通信方法和装置
CN112039884A (zh) * 2020-08-31 2020-12-04 浪潮云信息技术股份公司 一种快速互联协议quic在分布式数据库***中的应用

Also Published As

Publication number Publication date
CN115842876A (zh) 2023-03-24

Similar Documents

Publication Publication Date Title
RU2735725C1 (ru) Способ и устройство обработки и отправки пакетов, узел pe и узел
US11979322B2 (en) Method and apparatus for providing service for traffic flow
US7630368B2 (en) Virtual network interface card loopback fastpath
US8396954B2 (en) Routing and service performance management in an application acceleration environment
US20230078123A1 (en) Method for Forwarding Packet in SRV6 Service Function Chain and SF Device
WO2021073565A1 (zh) 业务服务提供方法及***
WO2022001835A1 (zh) 发送报文的方法、装置、网络设备、***及存储介质
US9445384B2 (en) Mobile device to generate multiple maximum transfer units and data transfer method
WO2021073555A1 (zh) 业务服务提供方法及***、远端加速网关
US11949590B1 (en) Maintaining processing core affinity for fragmented packets in network devices
WO2020259420A1 (zh) 生成组播转发表项的方法和接入网关
CN112468397A (zh) 一种IPv6报文的处理方法及装置
WO2017162117A1 (zh) 一种集群精确限速方法和装置
JP2016508682A (ja) ドメインにまたがるvpnトラフィックのqosによる区別のための方法および配置構成
WO2022117018A1 (zh) 报文传输的方法和装置
CN117240790A (zh) 流表规则的管理方法、流量管理方法、***及存储介质
WO2022048418A1 (zh) 一种转发报文的方法、设备和***
CN112637237B (zh) 基于SRoU的业务加密方法、***、设备及存储介质
US20230216792A1 (en) Method for Generating Routing Information, Method for Sending Location Information, Method for Forwarding Packet, and Device
WO2023040782A1 (zh) 处理报文的方法、***、设备和存储介质
WO2022111666A1 (zh) 一种路由通告方法、装置及***
US10257087B2 (en) Communication device and communication method
US7522601B1 (en) Filtered router alert hop-by-hop option
CN116319535A (zh) 路径切换方法、装置、网络设备、以及网络***
WO2024001701A1 (zh) 数据处理方法、装置及***

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22869151

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE