A communication method, device and storage medium
By establishing virtual tunnels in CPE and routers and using MPTCP technology, the problem of bandwidth superposition and automatic switching of multiple WAN ports under a single connection session is solved, and automatic switching and bandwidth superposition between multiple WAN ports is realized, improving the efficiency of communication bandwidth utilization.
Patent Information
- Application Number
- CN202111224343.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-19
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2041-10-19
AI Technical Summary
Existing CPEs and routers support multi-WAN port bandwidth aggregation technology, but do not have the bandwidth overlay function of a single-connection session, and cannot automatically switch or overlay bandwidth resources between multiple WAN ports.
By establishing a virtual tunnel with the communication partner on the communication end, and using MPTCP connection to establish a communication channel, traffic that requires bandwidth superposition and/or switching is directed to the virtual network card of the peer for transmission.
Automatic switching and bandwidth superposition between multiple WAN ports are realized, and bandwidth resources of multiple WAN ports can be automatically superimposed, improving the efficiency of communication bandwidth utilization.
Smart Images

Figure CN116016025B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a communication method, device and storage medium. Background Art
[0002] With the development of technology, many devices have multiple network interfaces, while TCP (Transmission Control Protocol) is still a single-line protocol. During the TCP communication process, the sender and the receiver cannot change the address at will. At present, this feature of multiple network interfaces can be used to improve performance and effective redundancy. For example, when a mobile phone is connected to a WIFI (Wireless Fidelity) signal and a 3G signal at the same time, if the WIFI is turned off, the TCP connection using the WIFI will be disconnected, and the 3G network cannot be effectively used to continue to send and receive data. MPTCP (Multipath TCP) can include multiple paths in a TCP link to avoid the above problems. MPTCP allows multiple sub-channels to be established in a TCP link. When a channel is established in the manner of a three-way handshake, other sub-channels can be established in the manner of a three-way handshake. These channels are connected by a three-way handshake and disconnected by a four-way handshake. These channels are bound to an MPTCP session, and the data at the sender can choose one of the channels for transmission. 3GPP (3rd Generation Partnership Project) defines that wireless terminals can access multiple wireless networks at the same time to achieve higher bandwidth at a lower cost. This method is called multi-access bandwidth aggregation or multipath (single path is the opposite). Multi-WAN (Wide Area Network) port bandwidth aggregation technology is to assign different TCP connection sessions to different WAN ports, use multiple TCP sessions to transmit data simultaneously, and different sessions are carried on different WAN ports, so as to achieve the effect of total communication bandwidth superposition. It is more common to have multi-WAN routers forwarding IP (Internet Protocol) packets of different network sessions to different WAN links, so that multiple links can be shared by multiple network sessions. The current CPE (Customer Premises Equipment) also supports multi-WAN port bandwidth aggregation technology.
[0003] The shortcoming of the existing technology is that although the current CPE and router support multi-WAN port bandwidth aggregation technology, they do not have the bandwidth superposition function of a single connection session. Summary of the invention
[0004] The present invention provides a communication method, a device and a storage medium, which are used to solve the problem that CPE and a router support multi-WAN port bandwidth aggregation technology but do not have the bandwidth superposition function of a single connection session.
[0005] The present invention provides the following technical solutions:
[0006] A communication method, comprising:
[0007] The communication end and the communication peer end establish a virtual tunnel, and the virtual tunnel will be regarded as a virtual network card by the communication end and the communication peer end;
[0008] The communication end is between two virtual network cards, using MPTCP connection to establish a communication channel;
[0009] The communication end will direct the traffic that needs bandwidth superposition and / or switching to the virtual network card of the other end for transmission.
[0010] During implementation, it further includes:
[0011] The communication peer is authenticated, and after authentication, the traffic is directed to the peer's virtual network card for transmission.
[0012] During implementation, routing rules are set to direct traffic that requires bandwidth superposition and / or switching to the virtual network card on the other end for transmission.
[0013] In the implementation, an MPTCP connection is used to establish a communication channel between two virtual network cards, including:
[0014] Notify the communication peer of the list of IP addresses used to participate in MPTCP communication, so that the communication peer can establish sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm and build an MPTCP connection.
[0015] In the implementation, an MPTCP connection is used to establish a communication channel between two virtual network cards, including:
[0016] After receiving the IP address list for participating in MPTCP communication notified by the communication peer, the communication end establishes sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm to build an MPTCP connection.
[0017] During implementation, the communication end will direct the traffic that needs bandwidth superposition and / or switching to the virtual network card of the other end for transmission, including:
[0018] Convert the TCP data to be sent into UDP data packets;
[0019] Select the line, distribute the UDP data packets to different sub-streams and send them to the corresponding underlying network card for transmission.
[0020] In implementation, the communication end and / or the communication counterpart is a communication device having multiple WANs, multiple lines, multiple channels, or multiple paths.
[0021] In implementation, when allocating UDP data packets to different sub-streams for sending, the method further includes:
[0022] UDP data packets are distributed to different sub-flows for transmission according to the communication status and / or load of each WAN port.
[0023] During implementation, it further includes:
[0024] After converting the received UDP data packet into TCP data, it is sent to the MPTCP socket interface, restored to the original data and sent to the upper-layer application.
[0025] In practice, the virtual network card is configured through the ioctl interface.
[0026] A communication device, comprising:
[0027] The processor reads the program in the memory and performs the following processes:
[0028] Establishing a virtual tunnel with a communication peer, wherein the virtual tunnel is regarded as a virtual network card by the communication peer and the communication peer;
[0029] Between the two virtual network cards, a communication channel is established using MPTCP connection;
[0030] Direct the traffic that needs bandwidth superposition and / or switching to the peer virtual network card for transmission;
[0031] A transceiver is used to receive and send data under the control of the processor.
[0032] During implementation, it further includes:
[0033] The communication peer is authenticated, and after authentication, the traffic is directed to the peer's virtual network card for transmission.
[0034] During implementation, routing rules are set to direct traffic that requires bandwidth superposition and / or switching to the virtual network card on the other end for transmission.
[0035] In the implementation, an MPTCP connection is used to establish a communication channel between two virtual network cards, including:
[0036] Notify the communication peer of the list of IP addresses used to participate in MPTCP communication, so that the communication peer can establish sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm and build an MPTCP connection.
[0037] In the implementation, an MPTCP connection is used to establish a communication channel between two virtual network cards, including:
[0038] After receiving the IP address list for participating in MPTCP communication notified by the communication peer, the communication end establishes sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm to build an MPTCP connection.
[0039] During implementation, traffic that requires bandwidth superposition and / or switching is directed to the peer virtual network card for transmission, including:
[0040] Convert the TCP data to be sent into UDP data packets;
[0041] Select the line, distribute the UDP data packets to different sub-streams and send them to the corresponding underlying network card for transmission.
[0042] In implementation, the communication device is a communication device with multiple WANs, multiple lines, multiple channels, or multiple paths.
[0043] In implementation, when allocating UDP data packets to different sub-streams for sending, the method further includes:
[0044] UDP packets are distributed to different sub-flows for transmission according to the communication status and / or load of each WAN port.
[0045] During implementation, it further includes:
[0046] After converting the received UDP data packet into TCP data, it is sent to the MPTCP socket interface, restored to the original data and sent to the upper-layer application.
[0047] In practice, the virtual network card is configured through the ioctl interface.
[0048] A communication device, comprising:
[0049] A tunnel module, used to establish a virtual tunnel with a communication peer, wherein the virtual tunnel is regarded as a virtual network card by the communication peer and the communication peer;
[0050] A connection module is used to establish a communication channel between two virtual network cards using an MPTCP connection;
[0051] The transmission module is used to direct the traffic that needs bandwidth superposition and / or switching to the virtual network card of the other end for transmission.
[0052] During implementation, the transmission module is further used to perform identity authentication on the communication peer, and after the authentication is passed, the traffic is directed to the virtual network card of the peer for transmission.
[0053] During implementation, the transmission module is further used to direct the traffic that requires bandwidth superposition and / or switching to the virtual network card of the other end for transmission by setting routing rules.
[0054] During implementation, the connection module is further used to establish a communication channel between two virtual network cards using an MPTCP connection, including: notifying the communication counterpart of a list of IP addresses used to participate in MPTCP communication, so that the communication counterpart can establish sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm to build an MPTCP connection.
[0055] During implementation, the connection module is further used to establish a communication channel between two virtual network cards using an MPTCP connection, including: after receiving a list of IP addresses for participating in MPTCP communication notified by the communication peer, the communication end establishes sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm to build an MPTCP connection.
[0056] In implementation, the transmission module is further used to direct the traffic that needs bandwidth superposition and / or switching to the virtual network card of the other end for transmission, including:
[0057] Convert the TCP data to be sent into UDP data packets;
[0058] Select the line, distribute the UDP data packets to different sub-streams and send them to the corresponding underlying network card for transmission.
[0059] In implementation, the communication device is a communication device with multiple WANs, multiple lines, multiple channels, or multiple paths.
[0060] In implementation, the transmission module is further used to distribute the UDP data packets to different sub-streams for transmission according to the communication status and / or load of each WAN port.
[0061] During implementation, the transmission module is further used to convert the received UDP data packet into TCP data, send it to the MPTCP socket interface, and then restore it to the original data and send it to the upper-layer application.
[0062] In implementation, the tunnel module is further used to configure the virtual network card through the ioctl interface.
[0063] A computer-readable storage medium is also provided in an embodiment of the present invention. The computer-readable storage medium stores a computer program for executing the communication method.
[0064] The beneficial effects of the present invention are as follows:
[0065] In the technical solution provided by the embodiment of the present invention, a virtual tunnel is established between the communication end and the communication counterpart, and a communication channel is established using an MPTCP connection. Then, the traffic that requires bandwidth superposition and / or switching is directed to the virtual network card of the counterpart for transmission. Since only one tunnel is established between the two ends and MPTCP technology is used, and MPTCP can include multiple paths in one TCP link, even when there are multiple WANs at both ends, automatic switching between multiple WAN ports can be achieved, and / or the bandwidth resources of multiple WAN ports can be automatically superimposed. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0067] Figure 1 A schematic diagram of a communication method implementation flow in an embodiment of the present invention;
[0068] Figure 2 This is a schematic diagram of CPE data transmission in an embodiment of the present invention;
[0069] Figure 3 Schematic diagram of the structure of a communication device in an embodiment of the present invention. DETAILED DESCRIPTION
[0070] The inventors noticed during the invention process that:
[0071] Currently, CPE and routers support multi-WAN port bandwidth aggregation technology, but there is a serious obstacle. It can only achieve bandwidth superposition at the connection session level, but not at the packet level. This bandwidth superposition technology is only effective when there are multiple TCP sessions. If there is only one TCP session, the traffic of this session can only be carried on one WAN port, and bandwidth superposition cannot be achieved. For a certain TCP session, the communication bandwidth speed of this session can only reach the bandwidth of one WAN port at most. Even if there is idle bandwidth on other WAN ports, this TCP session cannot use the bandwidth resources of other WAN ports. If the data of a TCP connection session is forcibly distributed to multiple different WAN ports, the receiving end will face serious packet disorder problems, resulting in communication failure.
[0072] However, many current applications still use single TCP session communications. For example, in the video surveillance industry, this problem is particularly prominent. The real-time generation and transmission of video surveillance streams are all single TCP session communications. Even if the router has multiple WAN ports, it is impossible to fully utilize the bandwidth resources of multiple WAN ports. Another example is IPSec (Internet Protocol Security) tunnel communication, which is also single-connection session communication. It is impossible to distribute data packets of the same IPSec tunnel to different WAN ports for transmission. The communications of these applications cannot be modified and upgraded to multi-connection session communications. These communication applications cannot utilize the bandwidth resources of multiple WAN ports. It is necessary to solve the problem of superimposing the bandwidth resources of multiple WAN ports under the condition of a single connection session. In addition, automatic switching between multiple WAN ports is also an urgent problem that needs to be solved.
[0073] Based on this, an embodiment of the present invention provides a bandwidth aggregation solution, which uses tunnel technology at both ends of the communication to build a virtual tunnel. For a device, the tunnel is a virtual network card. Combined with MPTCP technology, the virtual network card has the bandwidth superposition function of a single connection session and / or the automatic switching function between multiple WAN ports. As long as it involves multi-WAN, multi-line, multi-channel, and multi-path communication problems, this solution can be implemented in it.
[0074] The specific implementation of the present invention will be described below in conjunction with the accompanying drawings.
[0075] Figure 1 A flow chart for implementing the communication method is shown in the figure, including:
[0076] Step 101: A communication end and a communication peer end establish a virtual tunnel, wherein the virtual tunnel is regarded as a virtual network card by the communication end and the communication peer end;
[0077] Step 102: The communication end uses MPTCP connection to establish a communication channel between two virtual network cards;
[0078] Step 103: The communication end directs the traffic that needs bandwidth superposition and / or switching to the virtual network card of the other end for transmission.
[0079] In implementation, the communication end and / or the communication counterpart is a communication device having multiple WANs, multiple lines, multiple channels, or multiple paths.
[0080] The technical solution provided in the embodiment is a bandwidth aggregation solution, which uses tunnel technology at both ends of the communication to build a virtual tunnel. For a device, the tunnel is a virtual network card; then combined with MPTCP technology, the virtual network card has the bandwidth superposition function of a single connection session and the automatic switching function between multiple WAN ports. As long as it involves multi-WAN, multi-line, multi-channel, and multi-path communication problems, this solution can play an important role in it.
[0081] Specifically, you can first use tunnel technology at both ends of the communication to build a virtual tunnel. For a device, the tunnel is a virtual network card. And use an MPTCP connection between the two virtual network cards to establish a communication channel. At both ends of the communication, one end is the server (communication end), which first listens on a port. The other end is the client (communication peer), which connects to the server. Each connected peer is called a peer (peer node), which is a virtual tunnel. Different peers are identified and managed by ID (identification) numbers.
[0082] During implementation, it may further include: authenticating the communication peer, and after the authentication is passed, directing the traffic to the virtual network card of the peer for transmission.
[0083] Specifically, for security reasons, the server can force the client to send an identity information, and the server will verify this identity information. Only after the verification is passed can data be transmitted. If the client fails to pass the verification within a short period of time, the server will close the client's connection and refuse to establish a tunnel connection. Therefore, the ID number of each client peer can be set on the server first. When the client initiates a connection, the socket connection is established. First, it must send a verification request packet to apply for identity authentication to the server. The server verifies and sends back a verification response. After the identity authentication is successful, other communications can be carried out.
[0084] During implementation, routing rules are set to direct traffic that requires bandwidth superposition and / or switching to the virtual network card on the other end for transmission.
[0085] Specifically, when the identity authentication is successful, the traffic that needs bandwidth superposition and switching can be directed to the client's virtual network card by setting routing rules. There is no restriction on the type of traffic that can be injected into the virtual network card. TCP, UDP (User Datagram Protocol), ICMP (Internet Control Message Protocol), IPSec, BGP (Border Gateway Protocol), etc. can all be supported. At the same time, the virtual network card encapsulates the imported traffic, such as adding protocol identifiers, frame types, frame lengths, etc., so that different IP packets can be distinguished when these traffic is transmitted in the tunnel.
[0086] In the implementation, an MPTCP connection is used to establish a communication channel between two virtual network cards, including:
[0087] Notify the communication peer of the list of IP addresses used to participate in MPTCP communication, so that the communication peer can establish sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm and build an MPTCP connection.
[0088] In the implementation, an MPTCP connection is used to establish a communication channel between two virtual network cards, including:
[0089] After receiving the IP address list for participating in MPTCP communication notified by the communication peer, the communication end establishes sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm to build an MPTCP connection.
[0090] Specifically, the encapsulated data is sent to the MPTCP socket interface. To establish an MPTCP connection, the client needs to support MPTCP communication. The client checks and determines whether the server supports MPTCP communication based on the reply packet from the server. If the server supports MPTCP, it can establish a substream and an MPTCP connection according to the MPTCP protocol. If the server does not support MPTCP, it can establish a connection according to standard TCP.
[0091] When the server receives the connection request packet from the client, it also checks whether the client supports MPTCP. If not, it responds according to the standard TCP process and establishes a standard TCP connection. If supported, it responds with MPTCP parameters and informs the other party of the IP address list that can participate in MPTCP communication.
[0092] The client receives this IP address list and then automatically establishes sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm, and finally builds a complete MPTCP connection. The traffic speed between multiple WAN ports has a bandwidth superposition effect. Bandwidth superposition has the fullmesh function. If the WAN ports of the CPEs at both ends can communicate with each other, NxM bandwidth superposition can be achieved.
[0093] During implementation, the communication end will direct the traffic that needs bandwidth superposition and / or switching to the virtual network card of the other end for transmission, including:
[0094] Convert the TCP data to be sent into UDP data packets;
[0095] Select the line, distribute the UDP data packets to different sub-streams and send them to the corresponding underlying network card for transmission.
[0096] In a specific implementation, when the UDP data packets are distributed to different sub-streams for sending, the method further includes:
[0097] UDP data packets are distributed to different sub-flows for transmission according to the communication status and / or load of each WAN port.
[0098] Figure 2 The following is a schematic diagram of CPE data transmission. As shown in the figure, the lower-layer TCP data is no longer sent directly to the underlying network card. Before the TCP data is sent to the underlying network card, the TCP / UDP conversion driver module first converts the sent TCP data packet into a UDP data packet, and then selects the line, distributes the data to different sub-streams, and sends data packets from different sub-streams, which corresponds to different paths. Data is transmitted from different paths and then sent to the selected underlying network card.
[0099] The TCP / UDP conversion driver module can also perform line fault detection and switching processing at the same time.
[0100] The total data traffic is evenly distributed among different WAN ports. There is a load balancing effect between different WAN ports. And the load balancing is intelligent and dynamic adjustment. If the communication speed of a certain WAN port is fast, it will carry more traffic. If the bandwidth of a certain WAN port is large, it will carry more traffic. For example, the RTT (Round Trip Time) algorithm is used to load traffic. The smaller the current RTT, the higher the current traffic priority. As the traffic load of the line increases, the RTT of the line will increase accordingly, the traffic priority of the line will gradually decrease, and the load will be more distributed to other lines. In this way, the load traffic is dynamically adjusted between multiple different lines. The communication status of each WAN port is detected in real time. If a WAN port fails, the data traffic will be immediately transferred and distributed to other WAN ports.
[0101] The construction of UDP data packets is very easy to process. There is no need to call the socket interface (a socket is an abstract endpoint for two-way communication between application processes on different hosts in a network). This can significantly reduce the system call overhead and CPU processing overhead, thereby realizing the bandwidth overlay function of a single connection session and the automatic switching function between multiple WAN ports.
[0102] During implementation, the method may further include:
[0103] After converting the received UDP data packet into TCP data, it is sent to the MPTCP socket interface, restored to the original data and sent to the upper-layer application.
[0104] The receiving end receives data packets of multiple sub-streams, and converts the sent UDP data packets into TCP data packets through the TCP / UDP conversion driver module, and then sends them to the MPTCP socket interface. The standard TCP protocol stack of the Linux (an operating system) system is used to implement and ensure the orderliness of the data packets at the receiving end, and then the original data is restored by decapsulating the data and sent to the upper-layer application.
[0105] In practice, the virtual network card is configured through the ioctl interface.
[0106] Specifically, the virtual network card has some special parameters that need to be modified and adjusted. The standard IP link command cannot modify and adjust these special parameters. Therefore, you can use the nw configuration application to execute the nw command to configure and manage the special parameters of the virtual network card. The nw application and the virtual network card exchange data through the Linux standard ioctl (device control interface function in the device driver) interface.
[0107] Based on the same inventive concept, a communication device and a computer-readable storage medium are also provided in an embodiment of the present invention. Since the principles of solving problems by these devices are similar to those of the communication methods, the implementation of these devices can refer to the implementation of the methods, and the repeated parts will not be repeated.
[0108] When implementing the technical solution provided by the embodiment of the present invention, it can be implemented as follows.
[0109] Figure 3 This is a schematic diagram of the communication device structure. As shown in the figure, the device includes:
[0110] The processor 300 is used to read the program in the memory 320 and execute the following process:
[0111] Establishing a virtual tunnel with a communication peer, wherein the virtual tunnel is regarded as a virtual network card by the communication peer and the communication peer;
[0112] Between the two virtual network cards, a communication channel is established using MPTCP connection;
[0113] Direct the traffic that needs bandwidth superposition and / or switching to the peer virtual network card for transmission;
[0114] The transceiver 310 is configured to receive and send data under the control of the processor 300 .
[0115] During implementation, it further includes:
[0116] The communication peer is authenticated, and after authentication, the traffic is directed to the peer's virtual network card for transmission.
[0117] During implementation, routing rules are set to direct traffic that requires bandwidth superposition and / or switching to the virtual network card on the other end for transmission.
[0118] In the implementation, an MPTCP connection is used to establish a communication channel between two virtual network cards, including:
[0119] Notify the communication peer of the list of IP addresses used to participate in MPTCP communication, so that the communication peer can establish sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm and build an MPTCP connection.
[0120] In the implementation, an MPTCP connection is used to establish a communication channel between two virtual network cards, including:
[0121] After receiving the IP address list for participating in MPTCP communication notified by the communication peer, the communication end establishes sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm to build an MPTCP connection.
[0122] During implementation, traffic that requires bandwidth superposition and / or switching is directed to the peer virtual network card for transmission, including:
[0123] Convert the TCP data to be sent into UDP data packets;
[0124] Select the line, distribute the UDP data packets to different sub-streams and send them to the corresponding underlying network card for transmission.
[0125] In implementation, the communication device is a communication device with multiple WANs, multiple lines, multiple channels, or multiple paths.
[0126] In implementation, when allocating UDP data packets to different sub-streams for sending, the method further includes:
[0127] UDP data packets are distributed to different sub-flows for transmission according to the communication status and / or load of each WAN port.
[0128] During implementation, it further includes:
[0129] After converting the received UDP data packet into TCP data, it is sent to the MPTCP socket interface, restored to the original data and sent to the upper-layer application.
[0130] In practice, the virtual network card is configured through the ioctl interface.
[0131] Among them, Figure 3 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 300 and memory represented by memory 320. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 310 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. The processor 300 is responsible for managing the bus architecture and general processing, and the memory 320 may store data used by the processor 300 when performing operations.
[0132] An embodiment of the present invention further provides a communication device, including:
[0133] A tunnel module, used to establish a virtual tunnel with a communication peer, wherein the virtual tunnel is regarded as a virtual network card by the communication peer and the communication peer;
[0134] A connection module is used to establish a communication channel between two virtual network cards using an MPTCP connection;
[0135] The transmission module is used to direct the traffic that needs bandwidth superposition and / or switching to the virtual network card of the other end for transmission.
[0136] During implementation, the transmission module is further used to perform identity authentication on the communication counterpart, and after the authentication is passed, the traffic is directed to the virtual network card of the counterpart for transmission.
[0137] During implementation, the transmission module is further used to direct the traffic that requires bandwidth superposition and / or switching to the virtual network card of the other end for transmission by setting routing rules.
[0138] During implementation, the connection module is further used to establish a communication channel between two virtual network cards using an MPTCP connection, including: notifying the communication counterpart of a list of IP addresses used to participate in MPTCP communication, so that the communication counterpart can establish sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm to build an MPTCP connection.
[0139] During implementation, the connection module is further used to establish a communication channel between two virtual network cards using an MPTCP connection, including: after receiving a list of IP addresses for participating in MPTCP communication notified by the communication peer, the communication end establishes sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm to build an MPTCP connection.
[0140] In implementation, the transmission module is further used to direct the traffic that needs bandwidth superposition and / or switching to the virtual network card of the other end for transmission, including:
[0141] Convert the TCP data to be sent into UDP data packets;
[0142] Select the line, distribute the UDP data packets to different sub-streams and send them to the corresponding underlying network card for transmission.
[0143] In implementation, the communication device is a communication device with multiple WANs, multiple lines, multiple channels, or multiple paths.
[0144] In implementation, the transmission module is further used to distribute the UDP data packets to different sub-streams for transmission according to the communication status and / or load of each WAN port.
[0145] During implementation, the transmission module is further used to convert the received UDP data packet into TCP data, send it to the MPTCP socket interface, and then restore it to the original data and send it to the upper-layer application.
[0146] In implementation, the tunnel module is further used to configure the virtual network card through the ioctl interface.
[0147] For the convenience of description, the various parts of the above-mentioned device are divided into various modules or units according to their functions and described separately. Of course, when implementing the present invention, the functions of each module or unit can be implemented in the same or multiple software or hardware.
[0148] A computer-readable storage medium is also provided in an embodiment of the present invention. The computer-readable storage medium stores a computer program for executing the communication method.
[0149] For specific implementation, please refer to the implementation of the communication method.
[0150] In summary, the technical solution provided in the embodiment of the present invention realizes bandwidth superposition of single connection sessions.
[0151] When both ends have multiple WAN ports, only one tunnel is established at both ends. That is, MPTCP technology is first used to build an MPTCP tunnel at both ends of the communication to achieve automatic switching between multiple WAN ports and / or automatically superimpose the bandwidth resources of multiple WAN ports.
[0152] Further, using the TCP / UDP conversion driver module, it can be implemented through the HOOK function of the Linux standard TCP / IP protocol stack, without the need for a third-party module. In the HOOK hook function, the processing of TCP / UDP data packet conversion is implemented.
[0153] This solution has the bandwidth superposition function of a single connection session and the automatic switching function between multiple WAN ports for any traffic type. As long as it involves multi-WAN, multi-line, multi-channel, and multi-path communication problems, this solution can be implemented in them.
[0154] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0155] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0156] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0158] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A communication method, characterized in that: include: The communication end and the communication peer end establish a virtual tunnel, and the virtual tunnel will be regarded as a virtual network card by the communication end and the communication peer end; The communication end is between two virtual network cards, using the Multipath Transmission Control Protocol MPTCP connection to establish a communication channel; The communication end will direct the traffic that needs bandwidth superposition and / or switching to the virtual network card of the other end for transmission; The communication end directs the traffic that needs bandwidth superposition and / or switching to the virtual network card of the other end for transmission, including: Convert the Transmission Control Protocol (TCP) data to be sent into User Datagram Protocol (UDP) data packets; Select the line, distribute the UDP data packets to different sub-streams and send them to the corresponding underlying network card for transmission.
2. The method according to claim 1, characterized in that Further including: The communication peer is authenticated, and after authentication, the traffic is directed to the peer's virtual network card for transmission.
3. The method according to claim 1, characterized in that By setting routing rules, the traffic that requires bandwidth superposition and / or switching can be directed to the virtual network card on the other end for transmission.
4. The method according to claim 1, characterized in that An MPTCP connection is used to establish a communication channel between two virtual network cards, including: Notify the communication peer of the list of Internet Protocol IP addresses used to participate in MPTCP communication, so that the communication peer can establish sub-flows on multiple paths between multiple wide area networks WANs according to the fullmesh algorithm to build an MPTCP connection.
5. The method according to claim 1, characterized in that An MPTCP connection is used to establish a communication channel between two virtual network cards, including: After receiving the IP address list for participating in MPTCP communication notified by the communication peer, the communication end establishes sub-flows on multiple paths between multiple WANs according to the fullmesh algorithm to build an MPTCP connection.
6. The method according to claim 5, characterized in that The communication end and / or the communication counterpart is a communication device having multiple WANs, multiple lines, multiple channels, or multiple paths.
7. The method according to claim 6, characterized in that When UDP data packets are distributed to different sub-flows for sending, the following steps are further included: UDP data packets are distributed to different sub-flows for transmission according to the communication status and / or load of each WAN port.
8. The method according to any one of claims 1 to 5, characterized in that: Further including: After converting the received UDP data packet into TCP data, it is sent to the multipath transmission control protocol socket MPTCP socket interface, and then restored to the original data and sent to the upper layer application.
9. The method according to any one of claims 1 to 5, characterized in that: The virtual network card is configured through the ioctl interface.
10. A communication device, characterized in that: include: The processor reads the program in the memory and performs the following processes: Establishing a virtual tunnel with a communication peer, wherein the virtual tunnel is regarded as a virtual network card by the communication peer and the communication peer; Between the two virtual network cards, a communication channel is established using MPTCP connection; Direct the traffic that needs bandwidth superposition and / or switching to the peer virtual network card for transmission; a transceiver for receiving and transmitting data under the control of the processor; The processor is specifically used to convert the transmission control protocol TCP data to be sent into the user datagram protocol UDP data packet; select the line, distribute the UDP data packet to different sub-streams and send it to the corresponding bottom network card for transmission.
11. A communication device, characterized in that: include: A tunnel module, used to establish a virtual tunnel with a communication peer, wherein the virtual tunnel is regarded as a virtual network card by the communication peer and the communication peer; A connection module is used to establish a communication channel between two virtual network cards using an MPTCP connection; The transmission module is used to direct the traffic that needs bandwidth superposition and / or switching to the virtual network card of the other end for transmission; The transmission module is specifically used to convert the transmission control protocol TCP data to be sent into the user datagram protocol UDP data packet; select the line, distribute the UDP data packet to different sub-streams and send it to the corresponding bottom network card for transmission.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Method for multi-path UDP communication method between two terminals
CN109644190A
KR20190073114A