A communication method, device, equipment and system
By creating a loopback interface for the Overlay virtual network instance of the client device in the SD-WAN environment, and configure the IP address, the IP address caused by multiple WAN ports is uniform, and the server's unique identification and access to the client device.
Patent Information
- Application Number
- CN202010895959.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-31
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2040-08-31
AI Technical Summary
In the SD-WAN deployment scenario, when there are multiple WAN ports on the client device (CPE), different WAN ports correspond to different IP addresses, resulting in the server being unable to access the CPE using the same IP address, and thus the CPE cannot be calibrated based on the IP address.
The client device creates a loop loopback interface in the Overlay virtual network instance and configures the IP address for the interface. Based on the Overlay virtual network instance, the transmission channel is established to the server side. The IP address of the loopback interface can recognize the client device according to the IP address.
By using the LoopBack interface IP address in the Overlay virtual network instance to register with the server, it solves the problem that the server cannot calibrate CPE according to the IP address to achieve the only identification and access to the client device.
Smart Images

Figure CN114124617B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication method, device, equipment and system. Background Art
[0002] Software-defined wide area network (SD-WAN) is an important practice of the concept and design of software-defined network (SDN) in the field of wide area network (WAN). Through software-defined methods, SD-WAN can provide a simple, intelligent and flexible WAN interconnection capability. With the trend of enterprise business cloudification and WAN connection Internetization, it helps enterprises obtain high-quality wide area Internet anytime, anywhere, flexibly and conveniently.
[0003] The actual deployment scenario of SD-WAN usually involves the registration and connection of the customer premise equipment (CPE) in SD-WAN to the operator server. Usually, CPE uses its corresponding WAN port Internet Protocol (IP) address to access the server, and the server identifies the CPE by the IP address. However, when the CPE has multiple WAN ports, different WAN ports correspond to different IP addresses. The CPE may not be able to uniformly use the same IP address to access the server, resulting in the server being unable to identify the CPE based on the IP address. Summary of the invention
[0004] The embodiments of the present application provide a communication method, apparatus, device and system, which can solve the problem that the server cannot calibrate the CPE according to the IP address.
[0005] In a first aspect of an embodiment of the present application, a communication method is provided, the method comprising: a client device creates a loopback interface in an overlay virtual network instance and configures an IP address for the loopback interface; the client device establishes a transmission channel to a server side based on the overlay virtual network instance; the client device uses the transmission channel to send a message to the server side, wherein the message at least includes the IP address. In this embodiment, when the client device sends a message to the server side, the IP address used is the IP address of the loopback interface created in the overlay virtual network instance, so as to register with the server using the IP address, so that the server can identify the client device according to the IP address.
[0006] In a specific implementation, the client device establishes a transmission channel to the server side based on the overlay virtual network instance, including: the client device establishes an overlay tunnel from the overlay virtual network instance to the server side; and / or the client device establishes an inner ring tunnel between the overlay virtual network instance and the virtual network instance that communicates with the server side. In this embodiment, the transmission channel that can be established by the client device includes an overlay transmission channel and / or an inner ring tunnel. Among them, the overlay tunnel is established based on the overlay virtual network instance, and the message transmission in the overlay tunnel is independent of the underlay virtual network. When the overlay tunnel is used to transmit the message, the IP of the loopback interface can be encapsulated as an inner IP, and the IP address of the WAN port can be encapsulated as an outer IP. Regardless of which WAN port the message is transmitted to the server through, the inner IP address is the IP address of the loopback interface, so that the client device can register the server using the IP address of the loopback interface. The inner ring tunnel is built based on the overlay virtual network instance and underlay virtual network instance of the client device. When the client device registers with the server, it can send a message to the server through the established inner ring tunnel and the WAN port. The source address of the message is the IP address of the loopback interface, so as to register with the server through the IP address.
[0007] In a specific implementation, when there is a gateway corresponding to the server on the server side, the client device establishes an overlay tunnel from the overlay virtual network instance to the server side, including: the client device establishes an overlay tunnel from the overlay virtual network instance to the gateway corresponding to the server; the client device uses the transmission channel to send a message to the server side, including: the client device uses the overlay tunnel to send a message to the gateway. In this embodiment, when there is a corresponding gateway on the server, the overlay tunnel established by the client device is an overlay tunnel from the overlay virtual network instance to the gateway corresponding to the server, so as to send a message to the gateway corresponding to the server through the overlay tunnel, and then the gateway forwards the message to the server.
[0008] In a specific implementation, when there are at least two servers on the server side and each server corresponds to a different gateway, the client device establishes an overlay tunnel from the overlay virtual network instance to the gateway corresponding to the server, including: the client device establishes overlay tunnels with the gateways corresponding to each server based on the overlay virtual network instance; the client device uses the overlay tunnel to send a message to the gateway, including: the client device uses at least one of the overlay tunnels to send a message to the corresponding gateway. In this embodiment, when there are multiple servers on the server side and each server corresponds to a different gateway, the client device can establish an overlay tunnel to the gateway corresponding to each server based on the overlay virtual network instance, so that multiple overlay tunnels can be obtained. When the client device sends a message to the server side, it can use one or more of the established overlay tunnels to send a message to the corresponding gateway. When one of the overlay tunnels fails, other overlay tunnels can be used to transmit messages to increase the fault tolerance mechanism.
[0009] In a specific implementation, the at least two servers include a primary server and a backup server, and the client device uses at least one of the overlay tunnels to send a message to the corresponding gateway, including: the client device uses the overlay tunnel established with the gateway corresponding to the primary server to send a message to the gateway corresponding to the primary server, and when the primary server and / or the gateway corresponding to the primary server fails, the client device uses the overlay tunnel established with the gateway corresponding to the backup server to send a message to the gateway corresponding to the backup server. In this embodiment, when there are multiple servers on the server side, a primary server and a backup server can be configured, and the client device can preferentially use the overlay tunnel established with the gateway corresponding to the primary server to send a message to the gateway corresponding to the primary server, and when the primary server and / or the gateway corresponding to the primary server fails, the client device can use the overlay tunnel established with the gateway corresponding to the backup server to send a message to the gateway corresponding to the backup server, thereby improving the reliability of message transmission.
[0010] In a specific implementation, when a server corresponds to at least two gateways, the client device establishes an overlay tunnel from the overlay virtual network instance to the gateway corresponding to the server, including: the client device establishes overlay tunnels with each gateway corresponding to the server based on the overlay virtual network instance; the client device uses the overlay tunnel to send a message to the server, including: the client device uses at least one of the overlay tunnels to send a message to the corresponding gateway. In this embodiment, when a server corresponds to multiple gateways, the client device can establish an overlay tunnel with each gateway corresponding to the server based on the overlay virtual network instance. The client device can use one or more overlay tunnels to send a message to the corresponding gateway.
[0011] In a specific implementation, the at least two gateways include a primary gateway and a backup gateway, and the client device uses at least one of the overlay tunnels to send a message to the corresponding gateway, including: the client device uses the overlay tunnel established with the primary gateway to send a message to the primary gateway, and when the primary gateway fails, the client device uses the overlay tunnel established with the backup gateway to send a message to the backup gateway. In this embodiment, when a server corresponds to multiple gateways, a primary gateway and a backup gateway can be configured, and the client device preferentially uses the overlay tunnel established with the primary gateway to send a message to the primary gateway. When the primary gateway fails, the client device uses the overlay tunnel established with the backup gateway to send a message to the backup gateway.
[0012] In a specific implementation, when the client device has at least two WAN ports, each of the WAN ports has a corresponding underlay virtual network instance, and the client device establishes an overlay tunnel from the overlay virtual network instance to the gateway corresponding to the server, including: the client device uses each WAN port to establish an overlay tunnel with the gateway corresponding to the server based on the overlay virtual network instance; the client device uses the overlay tunnel to send a message to the gateway, including: the client device uses at least one of the overlay tunnels to send a message to the gateway. In this embodiment, when the client device corresponds to multiple WAN ports, an overlay tunnel can be established with the gateway corresponding to the server for each WAN port, so as to use the overlay tunnel to send a message to the gateway.
[0013] In a specific implementation, when at least two WAN ports include a primary WAN port and a backup WAN port, the client device uses the overlay tunnel to send a message to the gateway, including: the client device uses the overlay tunnel established between the primary WAN port and the gateway to send a message to the gateway, and when the link of the primary WAN port fails, the client device uses the overlay tunnel established between the backup WAN port and the gateway to send a message to the gateway. In this implementation, when there are multiple WAN ports on the client device, a primary WAN port and a backup WAN port can be configured, and the client device can preferentially use the overlay tunnel established between the primary WAN port and the gateway to send a message to the gateway. When a link failure occurs on the primary WAN port, the client device can use the overlay tunnel established between the backup WAN port and the gateway to send a message to the gateway.
[0014] In a specific implementation, to ensure the security of message transmission, when the underlying underlay network type corresponding to the WAN port of the client device is a preset network type, before the client device uses the overlay tunnel to send a message to the gateway, the method also includes: the client device encrypts the message to obtain an encrypted message.
[0015] In a specific implementation, the client device establishes an inner ring tunnel between the overlay virtual network instance and the virtual network instance that communicates with the server side, including: the client device establishes an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance, the underlay virtual network instance is associated with the WAN port of the client device, and the WAN port communicates with the server through the underlay network; the client uses the transmission channel to send a message to the server side, including: the client device uses the inner ring tunnel and the underlay network to send a message to the server. In this embodiment, when the client device exists in the underlay virtual network instance that communicates with the server side, the client device can establish an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance to send a message to the server through the inner ring tunnel and the underlay virtual network.
[0016] In a specific implementation, when the client device has at least two WAN ports and different WAN ports are bound to different underlay virtual network instances, the client device establishes an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance, including: the client device establishes an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance corresponding to each WAN port; the client device uses the inner ring tunnel and the underlay network to send a message to the server, including: the client device uses at least one of the inner ring tunnels and its corresponding underlay network to send a message to the server. In this embodiment, when the client device has multiple WAN ports, the client device can establish an inner ring tunnel between the overlay virtual network instance and the underlay virtual network instance corresponding to the WAN port for each WAN port. The client device can use one or more inner ring tunnels and the underlay network corresponding to the inner ring tunnel to send a message to the server.
[0017] In a specific implementation, the at least two WAN ports include a primary WAN port and a backup WAN port, the inner ring tunnel established by the underlay virtual network instance corresponding to the primary WAN port is a primary inner ring tunnel, and the inner ring tunnel established by the underlay virtual network instance corresponding to the backup WAN port is a backup inner ring tunnel, and the client uses at least one of the inner ring tunnels and its corresponding underlay network to send a message to the server, including: the client device uses the primary inner ring tunnel and the underlay network corresponding to the primary WAN port to send a message to the server, and when the link of the primary WAN port fails, the client device uses the backup inner ring tunnel and the underlay network corresponding to the backup WAN port to send a message to the server. In this embodiment, when the client device corresponds to multiple WAN ports, the primary WAN port and the backup WAN port can be configured, wherein the inner ring tunnel corresponding to the primary WAN port is the primary inner ring tunnel, and the inner ring tunnel corresponding to the backup WAN port is the backup inner ring tunnel. The client device preferentially uses the primary inner ring tunnel and the underlay network corresponding to the primary WAN port to send a message to the server. When the link of the primary WAN port fails, the client device will use the backup inner ring tunnel and the underlay network corresponding to the backup WAN port to send messages to the server.
[0018] In a specific implementation, when the client device has both an overlay tunnel and an inner ring tunnel, the overlay tunnel is used first to send messages to the server side, that is, the overlay tunnel has a higher priority than the inner ring tunnel.
[0019] In a specific implementation, when a gateway corresponding to the server side fails, the method further includes: the client device switches from the overlay tunnel to the inner ring tunnel.
[0020] In a specific implementation, the overlay virtual network instance is a business virtual network instance in the client device, the business virtual network instance is an overlay virtual network instance, or the overlay virtual network instance is a newly created overlay virtual network instance of the client device. In this embodiment, when the client device establishes an overlay tunnel or an inner ring tunnel, the overlay virtual network instance used can be an overlay virtual network instance existing in the client device itself, or a newly created overlay virtual network instance.
[0021] In a specific implementation manner, the message also includes an IP address corresponding to the WAN port.
[0022] In a specific implementation, when the network to which the WAN port corresponding to the client device is connected has network address translation, the IP address configured by the loopback interface is a public IP address. In this embodiment, in order to avoid the problem that the IP address in the message is converted into a public IP address due to network address translation, causing the server to still be unable to identify the client device, the IP address of the loopback interface can be directly configured as a public IP address without network address translation.
[0023] In a second aspect of an embodiment of the present application, a communication method is provided, the method comprising: a gateway receiving a message sent by a client device, the message comprising an IP address of a loopback interface in the client device, the loopback interface being located in an overlay virtual network instance in the client device; the gateway parsing the message to obtain the IP address, and sending the IP address to a server, so that the server identifies the client device according to the IP address.
[0024] In a specific implementation, when the message is an encrypted message, before the gateway parses the message, the method further includes: the gateway decrypting the message.
[0025] In a third aspect of an embodiment of the present application, a communication device is provided, comprising a creation unit for creating a loopback interface in an overlay virtual network instance and configuring an IP address for the loopback interface; an establishment unit for establishing a transmission channel to a server side based on the overlay virtual network instance; and a sending unit for sending a message to the server side using the transmission channel, wherein the message includes at least the IP address.
[0026] In a specific implementation, the establishing unit is specifically used to establish an overlay tunnel from the overlay virtual network instance to the server side; and / or to establish an inner ring tunnel between the overlay virtual network instance and the virtual network instance that communicates with the server side.
[0027] In a specific implementation, when a corresponding gateway exists on the server side, the establishing unit is specifically used to establish an overlay tunnel from the overlay virtual network instance to the corresponding gateway on the server side;
[0028] The sending unit is specifically configured to send a message to the gateway by using the overlay tunnel.
[0029] In a specific implementation, when there are at least two servers on the server side and each server corresponds to a different gateway, the establishing unit is specifically used to establish overlay tunnels based on the overlay virtual network instance and the gateway corresponding to each server; the sending unit is specifically used to use at least one of the overlay tunnels to send a message to the corresponding gateway.
[0030] In a specific implementation, when the at least two servers include a primary server and a backup server, the sending unit is specifically used to send a message to the gateway corresponding to the primary server by using the overlay tunnel established with the gateway corresponding to the primary server; when the primary server and / or the gateway corresponding to the primary server fails, the client device sends a message to the gateway corresponding to the backup server by using the overlay tunnel established with the gateway corresponding to the backup server.
[0031] In a specific implementation, when a server corresponds to at least two gateways, the establishing unit is specifically used to establish overlay tunnels based on the overlay virtual network instance and each gateway corresponding to the server; the sending unit is specifically used to use at least one of the overlay tunnels to send a message to a corresponding gateway.
[0032] In a specific implementation, the at least two gateways include a primary gateway and a backup gateway, and the sending unit is specifically used to send a message to the primary gateway using an overlay tunnel established with the primary gateway. When the primary gateway fails, the overlay tunnel established with the backup gateway is used to send a message to the backup gateway.
[0033] In a specific embodiment, when the device has at least two WAN ports, each of the WAN ports has a corresponding underlay virtual network instance, and the establishing unit is specifically used to establish an overlay tunnel based on the overlay virtual network instance using each WAN port and the gateway corresponding to the server; the sending unit is specifically used to use at least one of the overlay tunnels to send a message to the gateway.
[0034] In a specific implementation, when the two WAN ports include a primary WAN port and a backup WAN port, the sending unit is specifically used to send messages to the gateway using the overlay tunnel established between the primary WAN port and the gateway; when the primary WAN port fails, the overlay tunnel established between the backup WAN port and the gateway is used to send messages to the gateway.
[0035] In a specific implementation, when the underlay network type corresponding to the WAN port of the client device is a preset network type, the device further includes: an encryption unit, which is used to encrypt the message before sending the message to the gateway using the overlay tunnel to obtain an encrypted message.
[0036] In a specific implementation, the establishing unit is specifically used to establish an inner-ring tunnel based on the overlay virtual network instance and the underlay virtual network instance, the underlay virtual network instance is associated with the WAN port of the client device, and the WAN port is interconnected with the server through the underlay network; the sending unit is specifically used to use the inner-ring tunnel and the underlay network to send messages to the server.
[0037] In a specific implementation, when the client device has at least two WAN ports and different WAN ports are bound to different underlay virtual network instances, the establishing unit is specifically used to establish an inner-ring tunnel based on the overlay virtual network instance and the underlay virtual network instance corresponding to each WAN port; the sending unit is specifically used to use at least one of the inner-ring tunnels and its corresponding underlay network to send a message to the server.
[0038] In a specific implementation, the at least two WAN ports include a primary WAN port and a backup WAN port, the inner ring tunnel established with the underlay virtual network instance corresponding to the primary WAN port is a primary inner ring tunnel, and the inner ring tunnel established with the underlay virtual network instance corresponding to the backup WAN port is a backup inner ring tunnel. The sending unit is specifically used to send messages to the server using the primary inner ring tunnel and the underlay network corresponding to the primary WAN port. When the primary WAN port fails, the backup inner ring tunnel and the underlay network corresponding to the backup WAN port are used to send messages to the server.
[0039] In a specific implementation, when an overlay tunnel and an inner ring tunnel exist, the overlay tunnel has a higher priority than the inner ring tunnel.
[0040] In a specific implementation, when the gateway corresponding to the server side fails, the device further includes: a switching unit, configured to switch from the overlay tunnel to the inner ring tunnel.
[0041] In a specific implementation, the overlay virtual network instance is a business virtual network instance in the communication device, the business virtual network instance is an overlay virtual network instance, or the overlay virtual network instance is a newly created overlay virtual network instance of the communication device.
[0042] In a specific implementation manner, the message also includes an IP address corresponding to the WAN port.
[0043] In a specific implementation, when a network to which the WAN port corresponding to the communication device is connected has a network address translation, the IP address configured by the loopback interface is a public network IP address.
[0044] In a fourth aspect of an embodiment of the present application, a communication device is provided, comprising: a receiving unit, configured to receive a message sent by a client device, the message comprising an IP address of a loopback interface in the client device, the loopback interface being located in the overlay virtual network instance in the client device; a parsing unit, configured to parse the message to obtain the IP address; and a sending unit, configured to send the IP address to a server, so that the server identifies the client device based on the IP address.
[0045] In a specific implementation, when the message is an encrypted message, the device further includes: a decryption unit, configured to decrypt the message before parsing the message.
[0046] In a fifth aspect of an embodiment of the present application, a communication device is provided, the device comprising: a processor and a memory; the memory is used to store instructions; the processor is used to execute the instructions in the memory to execute the method described in the first aspect.
[0047] In a sixth aspect of an embodiment of the present application, a gateway is provided, the gateway comprising: a processor and a memory; the memory is used to store instructions; the processor is used to execute the instructions in the memory to execute the method described in the second aspect.
[0048] In a seventh aspect of the embodiments of the present application, a communication system is provided, the system comprising: a client device and a server, the client device being configured to create a loopback interface in an overlay virtual network instance and configure an IP address for the loopback interface; establishing a transmission channel to a server side based on the overlay virtual network instance; using the transmission channel to send a message to the server, the message at least including the IP address; and the server being configured to identify the client device according to the IP address in the message.
[0049] In a specific implementation, the client device is specifically used to establish an overlay tunnel from the overlay virtual network instance to the server side; and / or to establish an inner ring tunnel between the overlay virtual network instance and the virtual network instance that communicates with the server side.
[0050] In a specific embodiment, the system also includes: a gateway, which communicates with the server; the client device is specifically used to establish an overlay tunnel from the overlay virtual network instance to the gateway corresponding to the server; using the overlay tunnel to send a message to the gateway; the gateway is used to parse the message to obtain the IP address, and send the IP address to the server.
[0051] In a specific implementation, the system includes a primary gateway and a backup gateway, both of which communicate with the server, and the client device is specifically used to send messages to the primary gateway using an overlay tunnel established with the primary gateway. When the primary gateway fails, the client device sends messages to the backup gateway using the overlay tunnel established with the backup gateway.
[0052] In a specific implementation, the client device is specifically used to establish an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance, the underlay virtual network instance is associated with the WAN port of the client device, and the WAN port is interconnected with the server through the underlay network; and the inner ring tunnel and the underlay network are used to send messages to the server.
[0053] In a specific implementation, when a gateway corresponding to the server side fails, the client device is further used to switch from the overlay tunnel to the inner ring tunnel.
[0054] In an eighth aspect of the embodiments of the present application, a computer-readable storage medium is provided, comprising instructions, which, when executed on a computer, enable the computer to execute the method described in the first aspect and / or the second aspect above.
[0055] Through the communication method provided by the embodiment of the present application, when there is an overlay virtual network instance in the client device, a loopback interface is established in the overlay virtual network instance, and an IP address is assigned to the loopback interface. At the same time, the client device establishes a transmission channel to the server side based on the overlay virtual network instance, and uses the transmission channel to send a message to the server side. The message includes the IP address of the loopback interface, so that the IP address is used to register with the server, so that the server can identify the client device according to the IP address.
[0056] Among them, the transmission channel may include an overlay tunnel and / or an inner ring tunnel. The overlay tunnel is established based on the overlay virtual network instance. The message transmission in the overlay tunnel is independent of the underlay virtual network. When the overlay tunnel is used to transmit the message, the IP of the loopback interface can be encapsulated as the inner IP, and the IP address of the WAN port can be encapsulated as the outer IP. Regardless of which WAN port the message is transmitted to the server through, the inner IP address is the IP address of the loopback interface, so that the client device can register the server using the IP address of the loopback interface. The inner ring tunnel is constructed based on the overlay virtual network instance and the underlay virtual network instance of the client device. When the client device registers with the server, it can send a message to the server through the established inner ring tunnel and the WAN port. The source address of the message is the IP address of the loopback interface, so as to register with the server through the IP address. When a client device has multiple WAN ports, regardless of whether the multiple WAN ports correspond to the same underlay virtual network instance, an inner ring tunnel can be established for each WAN port corresponding to the underlay virtual network instance. Regardless of which inner ring tunnel is used to register with the server, the source address of the sent message is the IP address of the loopback interface in the overlay virtual network instance, so that the client device can use the same IP address to register with the server, thereby enabling the server to uniquely identify the client device. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0058] Figure 1 This is a schematic diagram of the traditional registration scenario;
[0059] Figure 2 A flow chart of a communication method provided in an embodiment of the present application;
[0060] Figure 3 A flow chart of another communication method provided in an embodiment of the present application;
[0061] Figure 4a A schematic diagram of establishing an overlay tunnel provided in an embodiment of the present application;
[0062] Figure 4bAnother schematic diagram of establishing an overlay tunnel provided in an embodiment of the present application;
[0063] Figure 4c A schematic diagram of establishing an overlay tunnel provided in another embodiment of the present application;
[0064] Figure 4d A schematic diagram of establishing an overlay tunnel provided in another embodiment of the present application;
[0065] Figure 4e Another schematic diagram of establishing an overlay tunnel provided in an embodiment of the present application;
[0066] Figure 5 A flow chart of another communication method provided in an embodiment of the present application;
[0067] Figure 6a A schematic diagram of establishing an inner ring tunnel provided in an embodiment of the present application;
[0068] Figure 6b Another schematic diagram of establishing an inner ring tunnel provided in an embodiment of the present application;
[0069] Figure 6c A schematic diagram of another method for establishing an inner ring tunnel provided in an embodiment of the present application;
[0070] Figure 6d A schematic diagram of another method for establishing an inner ring tunnel provided in an embodiment of the present application;
[0071] Figure 7 A structural diagram of a communication device provided in an embodiment of the present application;
[0072] Figure 8 A structural diagram of another communication device provided in an embodiment of the present application;
[0073] Fig. 9 A communication system structure diagram provided in an embodiment of the present application;
[0074] Fig.10 A structural diagram of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0075] In order to enable those skilled in the art to better understand the solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments.
[0076] When a traditional CPE registers with a server, in addition to using the IP address of the WAN port to register, the CPE can also create a loopback interface in the underlying virtual network VPN instance and register using the IP address corresponding to the loopback interface. Figure 1 As shown, loopback interface 1 is created in underlay VPN1, and the IP address corresponding to loopback interface 1 is used to register with the server through WAN port 1. That is, registration with the server can be performed through the link formed by WAN port 1-underlay network 1. However, when the CPE has multiple WAN ports and each WAN port corresponds to a different underlay virtual network instance, the loopback interface only corresponds to one underlay virtual network instance. In this case, when WAN port 1 fails, the CPE will switch to WAN port 2 to register using the IP address of loopback interface 2 in the underlay virtual network instance corresponding to WAN port 2. The problem of IP address switching still occurs, making it impossible for the server to uniquely identify the CPE.
[0077] In addition, when the network corresponding to the WAN port has network address translation (NAT), the IP address of the message sent to the server after NAT processing is not the IP address of the loopback interface, and the CPE cannot be calibrated. NAT refers to the method of using a small number of public IP addresses to represent more private IP addresses, that is, multiple private IP addresses can be mapped to the same public IP address.
[0078] Based on this, an embodiment of the present application provides a communication method for solving the problem that when a CPE registers with a server, the server is unable to identify the CPE due to the switching of the source IP address.
[0079] To facilitate understanding of the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained below.
[0080] The underlying network is the network of the current data center network basic forwarding architecture. As long as any two points on the data center network are reachable, it refers to the physical basic layer.
[0081] In the field of network technology, an overlay network refers to a virtualization technology model superimposed on a network architecture. Its general framework is to realize the carrying of applications on the network without large-scale modification of the basic network, and to separate it from other network services, and it is mainly based on IP-based basic network technology. An overlay network is a virtual network built on an underlay network. The nodes of an overlay network communicate through virtual or logical links. Each virtual or logical link corresponds to a path in the underlay network, which is composed of multiple links connected before and after. It should be noted that the overlay network and the underlay network are independent of each other. The overlay network uses the underlay network to transmit messages point-to-point (peer-to-peer), and how the message is transmitted to the destination node of the overlay network depends entirely on the control plane and data plane of the underlay network. The processing of the message at the ingress and egress nodes of the overlay network (such as discarding, forwarding) is completely determined by the encapsulation protocol of the overlay network.
[0082] The loopback interface is a virtual interface of pure software nature. After the loopback interface is created, the physical layer status and link layer protocol are always in the up state. The loopback interface can be configured with an IP address. In order to save IP addresses, the system will automatically configure a 32-bit subnet mask for the IP address of the loopback interface. Set the loopback interface address as the source address of all IP packets generated by the device. Because the loopback interface address is stable and is a unicast address, the loopback interface address is usually regarded as the device's logo. Setting the permission or prohibition of packets carrying the loopback interface address on the authentication or security server is equivalent to allowing or prohibiting the passage of packets generated by a certain device, which can simplify the packet filtering rules. However, it should be noted that when the loopback interface is used for source address binding, it is necessary to ensure that the route from the loopback interface to the peer end is reachable, and any network data packets sent to the loopback interface will be considered to be sent to the device itself, and the device will no longer forward these packets.
[0083] To facilitate understanding of the specific implementation of the embodiments of the present application, a description will be given below with reference to the accompanying drawings.
[0084] See also Figure 2 , which is a flow chart of a communication method provided in an embodiment of the present application, such as Figure 2 As shown, the method may include:
[0085] S201: The client device creates a loopback interface in the overlay virtual network instance and configures an IP address for the loopback interface.
[0086] In this embodiment, when an overlay virtual network instance exists in the client equipment CPE, a loopback interface may be created in the overlay virtual network instance, and an IP address may be configured for the loopback interface.
[0087] The overlay virtual network instance for creating the loopback interface can be an overlay virtual network instance that already exists in the client device for service inter-access, that is, an overlay virtual network instance associated with the LAN port. At the same time, it can also be a newly created overlay virtual network instance that is independent of the overlay virtual network instance associated with the LAN port.
[0088] S202: The client device establishes a transmission channel to the server side based on the overlay virtual network instance.
[0089] In this embodiment, the client device can establish a transmission channel to the server side based on the overlay virtual network instance. The transmission channel may include an overlay tunnel and / or an inner ring tunnel. The overlay tunnel refers to a tunnel established by an overlay virtual network instance between two different devices. In this embodiment, the client device can establish an overlay tunnel from the overlay virtual network instance to the server side. The two different devices may be two different CPEs, each CPE deployed at a different SD-WAN site; or, one is a CPE and the other is a server. The inner ring tunnel refers to a tunnel established between an overlay virtual network instance and an underlay virtual network instance of the same device. That is, the client device establishes an inner ring tunnel in the overlay virtual network instance and the virtual network instance that communicates with the server side. The establishment of the overlay tunnel and / or the inner ring tunnel will be described in subsequent embodiments.
[0090] S203: The client device sends a message to the server side using the transmission channel.
[0091] In this embodiment, when the client device establishes a transmission channel to the server side, the transmission channel can be used to send a message to the server side, and the message can include the IP address of the loopback interface, so that the server can identify the client device according to the IP address. When the transmission channel includes an overlay tunnel and / or an inner ring tunnel, the client device can use the overlay tunnel and / or the inner ring tunnel to send a message to the server, and the message includes the IP address of the loopback interface.
[0092] When the client device has only an overlay tunnel or an inner ring tunnel, the client device uses the overlay tunnel or the inner ring tunnel to send a message to the server to register with the server using the IP address in the message. When the client device includes both an overlay tunnel and an inner ring tunnel, the overlay tunnel or the inner ring tunnel can be selected according to actual needs to send a message to the server to register using the IP address in the message. Specifically, in some implementations, the priority of the overlay tunnel is higher than that of the inner ring tunnel, and the CPE preferentially uses the overlay tunnel to send a message to the server.
[0093] It can be seen that through the communication method provided in the embodiment of the present application, no matter whether the client device uses the overlay tunnel or the inner ring tunnel to send a message to the server for registration, the IP address of the loopback interface established in the overlay virtual network instance is used as the source address of the message, and the IP address of the WAN port or the IP address of the loopback interface in the underlay virtual network instance corresponding to the WAN port is no longer used for registration. There is no problem of IP address switching caused by WAN link failure, thereby achieving that the client device can use the same IP address to register with the server.
[0094] The above embodiment introduces that the client device can establish an overlay tunnel and / or an inner ring tunnel to send a message to the server. For ease of understanding, the following will illustrate how to establish an overlay tunnel and an inner ring tunnel to send a message to the server in conjunction with the accompanying drawings.
[0095] See also Figure 3 , which is a flowchart of an implementation of building an overlay tunnel provided by an embodiment of the present application, such as Figure 3 As shown, the method may include:
[0096] S301: The client device establishes an overlay tunnel from the overlay virtual network instance to the gateway corresponding to the server.
[0097] In this embodiment, when a corresponding gateway exists on the server, the client establishes an overlay tunnel based on its own overlay virtual network instance and the overlay virtual network instance on the gateway.
[0098] The overlay virtual network instance of the client device itself may be a service virtual network instance currently existing on the client device, and the service virtual network instance is an overlay virtual network instance. Figure 4a As shown in the figure, the client device creates a loopback interface in the service overlay virtual network instance associated with the LAN port and configures an IP address for the loopback interface. An overlay tunnel is established with the gateway based on the service overlay virtual network instance. Of course, the client device's own overlay virtual network instance can also be a newly created overlay virtual network instance, which is independent of the service overlay virtual network instance. Figure 4b As shown, a new overlay virtual network instance is created, a loopback interface is created in the overlay virtual network instance, an IP address is configured for the loopback interface, and an overlay tunnel is established with the gateway based on the overlay virtual network instance.
[0099] S302: The client device sends a message to the gateway using the overlay tunnel.
[0100] After the client device establishes an overlay tunnel with the gateway, the client device can use the overlay tunnel to send a message to the gateway, which includes the IP address of the loopback interface, so as to register with the server using the IP address. After receiving the message, the gateway parses the message to obtain the IP address in the message, and sends the IP address to the server, so that the server can uniquely identify the client device based on the IP address.
[0101] In a specific implementation, when establishing an overlay tunnel, the client device can also determine whether to encrypt the message passing through the overlay tunnel according to the underlay network type corresponding to the WAN port to prevent a third party from intercepting it at will. The underlay network type corresponding to the WAN port can be multi-protocol label switching (MPLS), internet, and other types. When the underlay network type corresponding to the WAN port is a preset network type, when the client sends a message to the gateway using the overlay tunnel, the client device encrypts the message, obtains the encrypted message, and sends the encrypted message to the gateway. The encryption key used by the client device to encrypt the message can be negotiated with the gateway in advance, so that when the gateway receives the encrypted message, it can decrypt the message according to the negotiated key to obtain the plaintext. The gateway device then parses the decrypted message to obtain the IP address, and sends the IP address to the server. For example, when the underlay network type is an internet network, after generating the message, the client device encrypts the message to send the encrypted message to the gateway.
[0102] In a specific implementation, when the client device sends a message to the gateway using the overlay tunnel, the message may also include the IP address corresponding to the WAN port. Specifically, when the client device sends a message using the overlay tunnel, the message is encapsulated using the encapsulation protocol, with the IP address of the loopback interface as the inner address and the IP address of the WAN port as the outer address. When the gateway receives the message, it decapsulates it to obtain the inner IP address, and sends the inner IP address to the server, so that the server can identify the client device through the inner IP address.
[0103] In a specific implementation, when there are at least two servers on the server side and each server corresponds to a different gateway, such as Figure 4c As shown, the client device can establish an overlay tunnel based on the gateway corresponding to each server, thereby obtaining multiple overlay tunnels, so that when one overlay tunnel fails, another overlay tunnel can be used to transmit messages. Specifically, the client device establishes overlay tunnels based on the overlay virtual network instance and the gateway corresponding to each server; the client device uses at least one of the established overlay tunnels to send messages to the corresponding gateway. For ease of understanding, the following is an example of two servers, specifically:
[0104] 1) The client device establishes an overlay tunnel with the gateway corresponding to the first server based on the overlay virtual network instance.
[0105] 2) The client device establishes an overlay tunnel with the gateway corresponding to the first server based on the overlay virtual network instance.
[0106] 3) The client device uses the overlay tunnel of the gateway corresponding to the first server to send a message to the gateway corresponding to the first server, or uses the overlay tunnel of the gateway corresponding to the second server to send a message to the gateway corresponding to the second server.
[0107] In this embodiment, when there are multiple servers on the server side, the client device can establish an overlay tunnel based on the gateway corresponding to each server, so as to use one or more overlay tunnels to send messages to the gateway corresponding to the overlay tunnel. It should be noted that the situation where there are multiple servers on the server side involved in the embodiment of the present invention refers to the situation where there are multiple servers on the server side that can implement the embodiment of the present invention.
[0108] In a specific implementation, when there are multiple servers on the server side, a primary server and a backup server can be configured, and the client device can use the overlay tunnel established with the gateway corresponding to the primary server to send messages to the gateway corresponding to the primary server. When the primary server and / or the gateway corresponding to the primary server fails, the client device can use the overlay tunnel of the gateway corresponding to the backup server to send messages to the gateway corresponding to the backup server.
[0109] In a specific implementation, when a server corresponds to at least two gateways, the client device can establish an overlay tunnel for each gateway, thereby obtaining multiple overlay tunnels, so that when one overlay tunnel fails, another overlay tunnel can be used to transmit messages. Specifically, the client device establishes overlay tunnels with each gateway corresponding to the server based on the overlay virtual network instance; the client device uses at least one of the established overlay tunnels to send messages to the corresponding gateway. Figure 4d As shown, the server corresponds to the first gateway and the second gateway, specifically including:
[0110] 1) The client device establishes a first overlay tunnel with the first gateway based on the overlay virtual network instance.
[0111] 2) The client device establishes a second overlay tunnel with the second gateway based on the overlay virtual network instance.
[0112] 3) The client device sends a message to the first gateway using the first overlay tunnel, and / or sends a message to the second gateway using the second overlay tunnel.
[0113] In this embodiment, when one server corresponds to multiple gateways, the client device may establish an overlay tunnel based on each gateway, so as to use one or more overlay tunnels to send messages to the gateway corresponding to the overlay tunnel.
[0114] In some implementations, when a server corresponds to multiple gateways, a primary gateway and a backup gateway may be preconfigured, and the client device uses the overlay tunnel established with the primary gateway to send messages to the primary gateway. When the primary gateway fails, the client device may use the overlay tunnel established with the backup gateway to send messages to the backup gateway.
[0115] The above embodiment illustrates that when there are multiple servers or multiple gateways on the server side, multiple overlay tunnels can be established to increase the fault tolerance mechanism. In addition, when there are multiple WAN ports on the client device, different overlay tunnels can be established based on different WAN ports. Specifically, the client device uses each WAN port to establish an overlay tunnel with the gateway corresponding to the server based on the overlay virtual network instance; the client device uses at least one of the established overlay tunnels to send a message to the gateway. Figure 4e As shown, the client device has two WAN ports, and the client device establishes different tunnels based on the overlay virtual network instance and different WAN ports. Specifically:
[0116] 1) The client device establishes a third overlay tunnel based on the overlay virtual network instance by using the first WAN port and the gateway corresponding to the server.
[0117] 2) The client device establishes a fourth overlay tunnel based on the overlay virtual network instance by using the second WAN port and the gateway corresponding to the server.
[0118] 3) The client device sends a message to the gateway using the third overlay tunnel and / or the fourth overlay tunnel.
[0119] In this embodiment, when the client device has multiple WAN ports, multiple overlay tunnels can be established through different WAN ports, so as to use one or more overlay tunnels to send messages to the gateway corresponding to the overlay tunnel. Different WAN ports can correspond to the same underlay network or different underlay networks. Figure 4e In the example, the first WAN port corresponds to underlay network 1, and the second WAN port corresponds to underlay network 2.
[0120] In a specific implementation, when a client device has multiple WAN ports, a primary WAN port and a backup WAN port can be pre-configured, and the client device preferentially uses the overlay tunnel established between the primary WAN port and the gateway to send messages to the gateway. When the link of the primary WAN port fails, the client device can use the overlay tunnel established between the backup WAN port and the gateway to send messages to the gateway, thereby improving the message transmission efficiency and increasing the fault tolerance of the client device. The link failure of the WAN port can include a link failure caused by a WAN port failure, or a link failure between the WAN port of the client device and the WAN port of the gateway.
[0121] The above embodiment illustrates the specific implementation of establishing an overlay tunnel between a client device and a server gateway and sending messages using the overlay tunnel. The implementation of establishing an inner ring tunnel between a client device and sending messages using the inner ring tunnel will be described below in conjunction with the accompanying drawings.
[0122] See also Figure 5 , which is a flowchart of establishing an inner ring tunnel provided by an embodiment of the present application, such as Figure 5 As shown, the method may include:
[0123] S501: The client device establishes an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance.
[0124] In this embodiment, when the client device has an overlay virtual network instance and an underlay virtual network instance, an inner ring tunnel is established between the two virtual network instances, wherein the underlay virtual network instance is associated with the WAN port of the client device, and the WAN port communicates with the server through the underlay network.
[0125] Among them, the overlay virtual network instance corresponding to the client device itself can be a business virtual network instance currently existing on the client device, and the business virtual network instance is an overlay virtual network instance. Figure 6aAs shown, a loopback interface is created in the service overlay virtual network instance associated with the LAN port, and an IP address is configured for the loopback interface. An inner ring tunnel is established based on the service overlay virtual network instance and the underlay virtual network instance associated with the WAN port. Of course, the overlay virtual network instance corresponding to the client device itself can be a newly created overlay virtual network instance, which is independent of the service overlay virtual network instance. Figure 6b As shown, the CPE newly creates an overlay virtual network instance, creates a loopback interface in the overlay virtual network instance, configures an IP address for the loopback interface, and establishes an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance corresponding to the WAN port.
[0126] S502: The client device sends a message to the server by using the inner ring tunnel and the underlay network.
[0127] In this embodiment, after the client device establishes the inner ring tunnel, it can use the inner ring tunnel and the underlay network corresponding to the WAN port to send a message to the server.
[0128] In a specific implementation, when a client device has multiple WAN ports, if the multiple WAN ports correspond to the same underlay virtual network instance, the client device establishes an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance. If multiple WAN ports are associated with different underlay virtual network instances, the client device can establish an inner ring tunnel based on the overlay virtual network and the underlay virtual network associated with each WAN port, thereby obtaining multiple inner ring tunnels and implementing a fault-tolerant mechanism. Specifically, the client device establishes an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance corresponding to each WAN port; the client device uses at least one of the established inner ring tunnels and its corresponding underlay network to send a message to the server. Figure 6c As shown, when the client device includes a first WAN port and a second WAN port, the first WAN port corresponds to the underlay virtual network instance virtual network instance 1, and the second WAN port corresponds to the underlay virtual network instance 2.
[0129] When a client device has multiple WAN ports and the multiple WAN ports are associated with different underlay virtual network instances, the specific implementation of establishing an inner ring tunnel and using the inner ring tunnel to send messages is as follows:
[0130] 1) The client device establishes a first inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance corresponding to the first WAN port.
[0131] For example, the client device establishes a first inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance 1.
[0132] 2) The client device establishes a second inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance corresponding to the second WAN port.
[0133] For example, the client device establishes a second inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance 2.
[0134] 3) The client device sends a message to the server using the first inner ring tunnel and the underlay network corresponding to the first WAN port, and / or sends a message to the server using the second inner ring tunnel and the underlay network corresponding to the second WAN port.
[0135] In this embodiment, when the client device establishes inner ring tunnels with different WAN ports respectively, it can use the inner ring tunnel corresponding to each WAN port and the underlay network corresponding to the WAN port to send messages to the server. Each WAN port can correspond to the same underlay network or to different underlay networks. For example, Figure 6c In the example, the first WAN port corresponds to underlay network 1, and the second WAN port corresponds to underlay network 2.
[0136] In a specific implementation, when a client device has multiple WAN ports, a primary WAN port and a backup WAN port can be configured so that when the link of the primary WAN port fails, the link of the backup WAN port can be used to transmit messages to ensure the quality of message transmission. Among them, the inner ring tunnel established by the underlay virtual network instance corresponding to the primary WAN port is the primary inner ring tunnel, and the inner ring tunnel established by the underlay virtual network instance corresponding to the backup WAN port is the backup inner ring tunnel. The client device can preferentially use the primary inner ring tunnel and the underlay network corresponding to the primary WAN port to send messages to the server. When the link of the primary WAN port fails, the client device can use the backup inner ring tunnel and the underlay network corresponding to the backup WAN port to send messages to the server. The link failure of the WAN port can include a link failure caused by a WAN port failure, or it can be a link failure between the WAN port of the client device and the WAN port of the gateway.
[0137] In a specific implementation, when NAT exists in the network corresponding to the WAN port, such as the Internet network, in order to avoid the IP address of the loopback interface being converted into a public IP address due to address translation, the IP address of the loopback interface can be directly configured as a public IP address, thereby avoiding the IP address of the loopback interface being converted due to NAT mapping, so that the client device can use the IP address of the loopback interface to register the server.
[0138] The above embodiments respectively illustrate the specific implementation of the client device establishing an overlay tunnel and an inner ring tunnel based on an overlay virtual network instance, and using the overlay tunnel and the inner ring tunnel to send a message to the server. In some implementations, when the client device establishes an overlay tunnel and an inner ring tunnel at the same time, the use priority of the overlay tunnel can be set higher than that of the inner ring tunnel. That is, the overlay tunnel can be used as the main path, and the inner ring tunnel can be used as the backup path. Figure 6d As shown, the client device CPE establishes an overlay tunnel with the gateway using the WAN port based on the overlay virtual network instance, and at the same time, the CPE establishes an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance corresponding to the WAN port.
[0139] In a specific implementation, when the gateway on the server side fails, it is impossible to use the overlay tunnel to send messages to the gateway. The client device can switch from the overlay tunnel to the inner ring tunnel, and use the inner ring tunnel and the underlay network to send messages to the server, so that the server can identify the client device based on the IP address in the message.
[0140] Based on the above method embodiment, the embodiment of the present application also provides a communication device, which will be described below in conjunction with the accompanying drawings.
[0141] See also Figure 7 , which is a structural diagram of a communication device provided in an embodiment of the present application, the device 700 can be applied to a client device to execute Figure 2 -The functions of the client device in the embodiment shown in FIG6 may include:
[0142] The creation unit 701 is used to create a loopback interface in the overlay virtual network instance and configure an IP address for the loopback interface. For the specific implementation of the creation unit 701, please refer to Figure 2 Detailed description of S201 in the illustrated embodiment.
[0143] The establishment unit 702 is used to establish a transmission channel to the server side based on the overlay virtual network instance. For the specific implementation of the establishment unit 702, please refer to Figure 2 A detailed description of S202 in the illustrated embodiment, or Figure 3 A detailed description of S301 in the illustrated embodiment, or Figure 5 Detailed description of S501 in the illustrated embodiment.
[0144] The sending unit 703 is used to send a message to the server side by using the transmission channel, wherein the message at least includes the IP address. For the specific implementation of the sending unit 703, please refer to Figure 2 A detailed description of S203 in the illustrated embodiment, or Figure 3 A detailed description of S302 in the illustrated embodiment, or Figure 5 Detailed description of S502 in the illustrated embodiment.
[0145] In a specific implementation, the establishment unit is specifically used to establish an overlay tunnel from the overlay virtual network instance to the server side; and / or, to establish an inner ring tunnel between the overlay virtual network instance and the virtual network instance that communicates with the server side. Figure 3 For a detailed description of S301 in the illustrated embodiment and a specific implementation of establishing the inner ring tunnel, see Figure 5 Detailed description of S501 in the illustrated embodiment.
[0146] In a specific implementation, when a corresponding gateway exists on the server side, the establishing unit is specifically used to establish an overlay tunnel from the overlay virtual network instance to the corresponding gateway on the server side;
[0147] The sending unit is specifically configured to send a message to the gateway by using the overlay tunnel.
[0148] The specific implementation of the establishment unit 702 and the sending unit 703 can be found in Figure 3 Detailed description of S301 - S302 in the illustrated embodiment.
[0149] In a specific implementation, when there are at least two servers on the server side and each server corresponds to a different gateway, the establishing unit is specifically used to establish overlay tunnels respectively based on the overlay virtual network instance and the gateway corresponding to each server;
[0150] The sending unit is specifically configured to send a message to a corresponding gateway using at least one of the overlay tunnels.
[0151] When there are multiple servers on the server side, the specific implementation of the establishing unit 702 and the sending unit 703 can be found in Figure 3 A detailed description of S302 in the embodiment.
[0152] In a specific implementation, when the at least two servers include a primary server and a backup server, the sending unit is specifically used to send a message to the gateway corresponding to the primary server by using the overlay tunnel established with the gateway corresponding to the primary server; when the primary server and / or the gateway corresponding to the primary server fails, the client device sends a message to the gateway corresponding to the backup server by using the overlay tunnel established with the gateway corresponding to the backup server.
[0153] For the specific implementation of the sending unit 703 using the main server and the backup server, please refer to Figure 3 A detailed description of S302 in the embodiment.
[0154] In a specific implementation, it is characterized in that when one server corresponds to at least two gateways, the establishing unit is specifically used to establish overlay tunnels respectively based on the overlay virtual network instance and each gateway corresponding to the server;
[0155] The sending unit is specifically configured to send a message to a corresponding gateway by using at least one of the overlay tunnels.
[0156] When one server corresponds to multiple gateways, the specific implementation of establishing unit 702 can be found in Figure 3 A detailed description of S302 in the embodiment.
[0157] In a specific implementation, the at least two gateways include a primary gateway and a backup gateway, and the sending unit is specifically used to send a message to the primary gateway using an overlay tunnel established with the primary gateway. When the primary gateway fails, the overlay tunnel established with the backup gateway is used to send a message to the backup gateway.
[0158] When the server corresponds to the primary gateway and the backup gateway, the specific implementation of the sending unit 703 using the primary gateway and the backup gateway can be found in Figure 3 Detailed description of S302 in the illustrated embodiment.
[0159] In a specific implementation, when the device has at least two WAN ports, each of the WAN ports has a corresponding underlay virtual network instance, and the establishing unit is specifically configured to establish an overlay tunnel with a gateway corresponding to the server using each WAN port based on the overlay virtual network instance;
[0160] The sending unit is specifically configured to send a message to the gateway using at least one of the overlay tunnels.
[0161] When the client device used by the apparatus 700 has multiple WAN ports, the specific implementation of the establishing unit 702 and the sending unit 703 can be found in Figure 3 Detailed description of S302 in .
[0162] In a specific implementation, when the two WAN ports include a primary WAN port and a backup WAN port, the sending unit is specifically used to send messages to the gateway using the overlay tunnel established between the primary WAN port and the gateway; when the primary WAN port fails, the overlay tunnel established between the backup WAN port and the gateway is used to send messages to the gateway.
[0163] For the specific implementation of the sending unit 703 using the primary WAN port and the backup WAN port, please refer to Figure 3 Detailed description of S302 in the illustrated embodiment.
[0164] In a specific implementation, when the underlay network type corresponding to the WAN port of the client device is a preset network type, the apparatus further includes:
[0165] The encryption unit is used to encrypt the message before sending the message to the gateway using the overlay tunnel to obtain the encrypted message.
[0166] For the specific implementation of the encryption unit, please refer to Figure 3 Detailed description of S302 in the illustrated embodiment.
[0167] In a specific implementation, it is characterized in that the establishment unit is specifically used to establish an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance, the underlay virtual network instance is associated with the WAN port of the client device, and the WAN port is interconnected with the server through the underlay network;
[0168] The sending unit is specifically configured to send a message to a server by using the inner ring tunnel and the underlay network.
[0169] For the specific implementation of the establishment unit 702, please refer to Figure 5 Detailed description of S501 in the illustrated embodiment.
[0170] In a specific implementation, when the client device has at least two WAN ports and different WAN ports are bound to different underlay virtual network instances, the establishing unit is specifically used to establish an inner ring tunnel with the underlay virtual network instance corresponding to each WAN port based on the overlay virtual network instance;
[0171] The sending unit is specifically configured to send a message to a server by using at least one of the inner ring tunnels and its corresponding underlay network.
[0172] When the client device has multiple WAN ports, the specific implementation of the establishing unit 702 and the sending unit 703 can be found in Figure 5 Detailed description of S502 in the illustrated embodiment.
[0173] In a specific implementation, the at least two WAN ports include a primary WAN port and a backup WAN port, the inner ring tunnel established with the underlay virtual network instance corresponding to the primary WAN port is a primary inner ring tunnel, and the inner ring tunnel established with the underlay virtual network instance corresponding to the backup WAN port is a backup inner ring tunnel. The sending unit is specifically used to send messages to the server using the primary inner ring tunnel and the underlay network corresponding to the primary WAN port. When the primary WAN port fails, the backup inner ring tunnel and the underlay network corresponding to the backup WAN port are used to send messages to the server.
[0174] For the specific implementation of the sending unit 703 using the primary WAN port and the backup WAN port, please refer to Figure 5 Detailed description of S502 in the illustrated embodiment.
[0175] In a specific implementation, when an overlay tunnel and an inner ring tunnel exist, the overlay tunnel has a higher priority than the inner ring tunnel.
[0176] In a specific implementation manner, when the gateway corresponding to the server side fails, the device further includes:
[0177] A switching unit is used to switch from the overlay tunnel to the inner ring tunnel.
[0178] For the specific implementation of the switching unit, please refer to Figure 5Detailed description of S502 in the illustrated embodiment.
[0179] In a specific implementation, the overlay virtual network instance is a business virtual network instance in the communication device, the business virtual network instance is an overlay virtual network instance, or the overlay virtual network instance is a newly created overlay virtual network instance of the communication device.
[0180] In a specific implementation manner, the message also includes an IP address corresponding to the WAN port.
[0181] In a specific implementation, when a network to which the WAN port corresponding to the communication device is connected has a network address translation, the IP address configured by the loopback interface is a public network IP address.
[0182] For specific executable functions and implementations of the communication device 700, please refer to Figure 2 -The corresponding description about the client device in the embodiment shown in FIG. 6 will not be repeated here.
[0183] See also Figure 8 , which is another communication device provided in an embodiment of the present application, the device 800 can be applied to a gateway to perform Figure 2 -The function of the gateway in the embodiment shown in FIG6 , the device includes:
[0184] The receiving unit 801 is configured to receive a message sent by a client device, wherein the message includes an IP address of a loopback interface in the client device, and the loopback interface is located in the overlay virtual network instance in the client device. Figure 2 A detailed description of S203 in the illustrated embodiment, or Figure 3 Detailed description of S302 in the illustrated embodiment.
[0185] The parsing unit 802 is used to parse the message to obtain the IP address. For the specific implementation of the parsing unit 802, please refer to Figure 3 Detailed description of S302 in the illustrated embodiment.
[0186] The sending unit 803 is used to send the IP address to the server so that the server can identify the client device according to the IP address. Figure 3 Detailed description of S302 in the illustrated embodiment.
[0187] In a specific implementation, when the message is an encrypted message, the device further includes:
[0188] The decryption unit is used to decrypt the message before parsing the message.
[0189] For the specific implementation of the decryption unit, please refer to Figure 3 Detailed description of S302 in the illustrated embodiment.
[0190] For specific executable functions and implementations of the communication device 800, please refer to Figure 2 -The corresponding description about the client device in the embodiment shown in FIG. 6 will not be repeated here.
[0191] See also Fig. 9 , which is a structure diagram of a communication system provided in an embodiment of the present application, such as Fig. 9 As shown, the system may include a client device 901 and a server 902;
[0192] The client device 901 is used to create a loopback interface in the overlay virtual network instance and configure an IP address for the loopback interface; establish a transmission channel to the server side based on the overlay virtual network instance; and use the transmission channel to send a message to the server, wherein the message includes at least the IP address.
[0193] For the specific implementation of the client device 901, please refer to Figure 2 A detailed description of the illustrated embodiments S201-S203, or, Figure 3 A detailed description of S301 and S302 in the illustrated embodiment, or Figure 5 Detailed description of S501 and S502 in the illustrated embodiment.
[0194] The server 902 is used to identify the client device according to the IP address in the message.
[0195] The specific implementation of server 902 can be found in Figure 2 A detailed description of S203 in the illustrated embodiment, or Figure 3 A detailed description of S302 in the illustrated embodiment, or Figure 5 Detailed description of S502 in the illustrated embodiment.
[0196] In a possible implementation, the client device is specifically used to establish an overlay tunnel from the overlay virtual network instance to the server side; and / or to establish an inner ring tunnel between the overlay virtual network instance and the virtual network instance interconnected by the server side. Figure 3A detailed description of S301-S302 in the illustrated embodiment, or Figure 5 Detailed description of S501 - S502 in the illustrated embodiment.
[0197] In a possible implementation, the system further includes: a gateway, the gateway communicating with the server, the client device being specifically configured to establish an overlay tunnel from the overlay virtual network instance to the gateway corresponding to the server; and sending a message to the gateway using the overlay tunnel;
[0198] The gateway is used to parse the message to obtain the IP address, and send the IP address to the server.
[0199] For the specific implementation of the gateway, see Figure 3 Detailed description of S302 in the illustrated embodiment.
[0200] In one possible implementation, the system includes a primary gateway and a backup gateway, both of which communicate with the server, and the client device is specifically used to send messages to the primary gateway using an overlay tunnel established with the primary gateway. When the primary gateway fails, the client device sends messages to the backup gateway using the overlay tunnel established with the backup gateway.
[0201] When the system includes a primary gateway and a backup gateway, the specific implementation of the client device can be found in Figure 3 Detailed description of S302 in the illustrated embodiment.
[0202] In one possible implementation, the client device is specifically used to establish an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance, the underlay virtual network instance is associated with the WAN port of the client device, and the WAN port is interconnected with the server through the underlay network; and the inner ring tunnel and the underlay network are used to send messages to the server.
[0203] The specific implementation of the client device establishing an inner ring tunnel can be found in Figure 5 Detailed description of S501 and S502 in the illustrated embodiment.
[0204] In a possible implementation, when a gateway corresponding to the server side fails, the client device is further configured to switch from the overlay tunnel to the inner ring tunnel.
[0205] For the specific implementation of switching of client devices, please refer to Figure 5Detailed description of S502 in the illustrated embodiment.
[0206] It should be noted that the specific implementation of the client device 901 in this embodiment can be found in Figure 2 -For the specific implementation of the embodiment described in FIG. 6, the server 902 can be found in Figure 2 -The embodiment described in FIG6 will not be described in detail here.
[0207] Fig.10 A schematic diagram of a communication device provided in an embodiment of the present application, the communication device may be Figure 2 - The client device or gateway device in the embodiment shown in FIG. 6 , or it may also be Figure 7 or Figure 8 The communication device in the illustrated embodiment is implemented as an apparatus.
[0208] See also Fig.10 As shown, the network device 1000 includes: a processor 1010, a communication interface 1020 and a memory 1030. The number of processors 1010 in the packet forwarding device 1000 can be one or more. Fig.10 In the embodiment of the present application, the processor 1010, the communication interface 1020 and the memory 1030 may be connected via a bus system or other means, wherein: Fig.10 The connection via bus system 1040 is taken as an example.
[0209] The processor 1010 may be a CPU, an NP, or a combination of a CPU and an NP. The processor 1010 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0210] The communication interface 1020 is used to receive and send messages. Specifically, the communication interface 1020 may include a receiving interface and a sending interface. The receiving interface may be used to receive messages, and the sending interface may be used to send messages. The number of the communication interface 1020 may be one or more.
[0211] The memory 1030 may include a volatile memory (English: volatile memory), such as a random-access memory (RAM); the memory 1030 may also include a non-volatile memory (English: non-volatile memory), such as a flash memory (English: flash memory), a hard disk drive (HDD) or a solid-state drive (SSD); the memory 1030 may also include a combination of the above-mentioned types of memory.
[0212] Optionally, the memory 1030 stores an operating system and a program, an executable module or a data structure, or a subset thereof, or an extended set thereof, wherein the program may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks. The processor 1010 may read the program in the memory 1030 to implement the communication transmission method provided in the embodiment of the present application.
[0213] The memory 1030 may be a storage device in the communication device 1000 , or may be a storage device independent of the communication device 1000 .
[0214] The bus system 1040 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus system 1040 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0215] In addition, an embodiment of the present application further provides a gateway, which includes: a processor and a memory; the memory is used to store instructions; the processor is used to execute the instructions in the memory to perform operations corresponding to the gateway in the embodiment of the present application.
[0216] The embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enable the computer to execute the communication method described above.
[0217] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0218] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0219] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical business division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0220] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0221] In addition, each business unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software business units.
[0222] If the integrated unit is implemented in the form of a software business unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0223] Those skilled in the art will appreciate that in one or more of the above examples, the services described in the present invention may be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, the services may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. Storage media may be any available media that can be accessed by a general-purpose or special-purpose computer.
[0224] The above specific implementation modes further describe the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation modes of the present invention.
[0225] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A communication method, characterized in that: The method comprises: The client device creates a loopback interface in the overlay virtual network instance and configures an IP address for the loopback interface; The client device establishes a transmission channel to the server side based on the overlay virtual network instance; The client device sends a message to the server side by using the transmission channel, and the message at least includes the IP address.
2. The method according to claim 1, characterized in that The client device establishes a transmission channel to the server side based on the overlay virtual network instance, including: The client device establishes an overlay tunnel from the overlay virtual network instance to the server side; and / or, The client device establishes an inner ring tunnel between the overlay virtual network instance and the virtual network instance that communicates with the server side.
3. The method according to claim 2, characterized in that When there is a gateway corresponding to the server on the server side, the client device establishes an overlay tunnel from the overlay virtual network instance to the server side, including: The client device establishes an overlay tunnel from the overlay virtual network instance to the gateway corresponding to the server; The client device sends a message to the server side by using the transmission channel, including: The client device sends a message to the gateway using the overlay tunnel.
4. The method according to claim 3, characterized in that: When there are at least two servers on the server side, and each server corresponds to a different gateway, the client device establishes an overlay tunnel from the overlay virtual network instance to the gateway corresponding to the server, including: The client device establishes overlay tunnels with the gateways corresponding to each server based on the overlay virtual network instance; The client device sends a message to the gateway by using the overlay tunnel, including: The client device sends a message to the corresponding gateway using at least one of the overlay tunnels.
5. The method according to claim 4, characterized in that The at least two servers include a primary server and a backup server, and the client device uses at least one of the overlay tunnels to send a message to a corresponding gateway, including: The client device uses the overlay tunnel established with the gateway corresponding to the primary server to send a message to the gateway corresponding to the primary server. When the primary server and / or the gateway corresponding to the primary server fails, the client device uses the overlay tunnel established with the gateway corresponding to the backup server to send a message to the gateway corresponding to the backup server.
6. The method according to any one of claims 3 to 5, characterized in that: When a server corresponds to at least two gateways, the client device establishes an overlay tunnel from the overlay virtual network instance to the gateway corresponding to the server, including: The client device establishes overlay tunnels respectively with each gateway corresponding to the server based on the overlay virtual network instance; The client device sends a message to the server by using the overlay tunnel, including: The client device sends a message to the corresponding gateway using at least one of the overlay tunnels.
7. The method according to claim 6, characterized in that The at least two gateways include a primary gateway and a backup gateway, and the client device uses at least one of the overlay tunnels to send a message to the corresponding gateway, including: The client device sends a message to the active gateway by using the overlay tunnel established with the active gateway. When the active gateway fails, the client device sends a message to the standby gateway by using the overlay tunnel established with the standby gateway.
8. The method according to claim 3, characterized in that When the client device has at least two WAN ports, each of the WAN ports has a corresponding underlay virtual network instance, and the client device establishes an overlay tunnel from the overlay virtual network instance to the gateway corresponding to the server, including: The client device establishes an overlay tunnel with the gateway corresponding to the server using each WAN port based on the overlay virtual network instance; The client device sends a message to the gateway by using the overlay tunnel, including: The client device sends a message to the gateway using at least one of the overlay tunnels.
9. The method according to claim 8, characterized in that The at least two WAN ports include a primary WAN port and a backup WAN port, and the client device sends a message to the gateway using the overlay tunnel, including: The client device uses the overlay tunnel established between the primary WAN port and the gateway to send a message to the gateway. When the link of the primary WAN port fails, the client device uses the overlay tunnel established between the backup WAN port and the gateway to send a message to the gateway.
10. The method according to claim 3, characterized in that: When the underlying underlay network type corresponding to the WAN port of the client device is a preset network type, before the client device sends a message to the gateway using the overlay tunnel, the method further includes: The client device encrypts the message to obtain the encrypted message.
11. The method according to claim 2, characterized in that The client device establishes an inner ring tunnel between the overlay virtual network instance and the virtual network instance intercommunication with the server side, including: The client device establishes an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance, the underlay virtual network instance is associated with the WAN port of the client device, and the WAN port communicates with the server through the underlay network; The client sends a message to the server side by using the transmission channel, including: The client device sends a message to the server by using the inner ring tunnel and the underlay network.
12. The method according to claim 11, characterized in that When the client device has at least two WAN ports and different WAN ports are bound to different underlay virtual network instances, the client device establishes an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance, including: The client device establishes an inner ring tunnel with the underlay virtual network instance corresponding to each WAN port based on the overlay virtual network instance; The client device sends a message to the server by using the inner ring tunnel and the underlay network, including: The client device sends a message to the server by using at least one of the inner ring tunnels and its corresponding underlay network.
13. The method according to claim 12, characterized in that The at least two WAN ports include a primary WAN port and a backup WAN port, an inner ring tunnel established by an underlay virtual network instance corresponding to the primary WAN port is a primary inner ring tunnel, and an inner ring tunnel established by an underlay virtual network instance corresponding to the backup WAN port is a backup inner ring tunnel, and the client uses at least one of the inner ring tunnels and its corresponding underlay network to send a message to the server, including: The client device uses the primary inner ring tunnel and the underlay network corresponding to the primary WAN port to send messages to the server. When the link of the primary WAN port fails, the client device uses the backup inner ring tunnel and the underlay network corresponding to the backup WAN port to send messages to the server.
14. The method according to claim 2, characterized in that When the client device has an overlay tunnel and an inner ring tunnel, the overlay tunnel has a higher priority than the inner ring tunnel.
15. The method according to claim 14, characterized in that When the gateway corresponding to the server side fails, the method further includes: The client device switches from the overlay tunnel to the inner ring tunnel.
16. The method according to claim 1, characterized in that The overlay virtual network instance is a service virtual network instance in the client device, the service virtual network instance is an overlay virtual network instance, or the overlay virtual network instance is a newly created overlay virtual network instance of the client device.
17. The method according to claim 1, characterized in that The message also includes the IP address corresponding to the WAN port.
18. The method according to claim 1, characterized in that When the network to which the WAN port corresponding to the client device is connected has network address translation, the IP address configured by the loopback interface is a public network IP address.
19. A communication method, characterized in that: The method comprises: The gateway receives a message sent by a client device, wherein the message includes an IP address of a loopback interface in the client device, and the loopback interface is located in an overlay virtual network instance in the client device; The gateway parses the message to obtain the IP address, and sends the IP address to the server, so that the server identifies the client device according to the IP address.
20. The method according to claim 19, characterized in that When the message is an encrypted message, before the gateway parses the message, the method further includes: The gateway decrypts the message.
21. A communication device, characterized in that: The device is applied to a client device, comprising: A creation unit, used to create a loopback interface in the overlay virtual network instance and configure an IP address for the loopback interface; An establishing unit, configured to establish a transmission channel to a server side based on the overlay virtual network instance; A sending unit is used to send a message to the server side by using the transmission channel, wherein the message at least includes the IP address.
22. The device according to claim 21, characterized in that The establishing unit is specifically used to establish an overlay tunnel from the overlay virtual network instance to the server side; and / or to establish an inner ring tunnel between the overlay virtual network instance and the virtual network instance interconnected with the server side.
23. The device according to claim 22, characterized in that When there is a corresponding gateway on the server side, the establishing unit is specifically used to establish an overlay tunnel from the overlay virtual network instance to the corresponding gateway on the server side; The sending unit is specifically configured to send a message to the gateway by using the overlay tunnel.
24. The device according to claim 23, characterized in that When there are at least two servers on the server side and each server corresponds to a different gateway, the establishing unit is specifically used to establish overlay tunnels respectively based on the overlay virtual network instance and the gateway corresponding to each server; The sending unit is specifically configured to send a message to a corresponding gateway using at least one of the overlay tunnels.
25. The device according to claim 24, characterized in that When the at least two servers include a primary server and a backup server, the sending unit is specifically used to send a message to the gateway corresponding to the primary server by using the overlay tunnel established with the gateway corresponding to the primary server; when the primary server and / or the gateway corresponding to the primary server fails, the client device sends a message to the gateway corresponding to the backup server by using the overlay tunnel established with the gateway corresponding to the backup server.
26. The device according to any one of claims 23 to 25, characterized in that When one server corresponds to at least two gateways, the establishing unit is specifically configured to establish overlay tunnels respectively based on the overlay virtual network instance and each gateway corresponding to the server; The sending unit is specifically configured to send a message to a corresponding gateway by using at least one of the overlay tunnels.
27. The device according to claim 26, characterized in that The at least two gateways include an active gateway and a standby gateway. The sending unit is specifically used to send a message to the active gateway using an overlay tunnel established with the active gateway. When the active gateway fails, the overlay tunnel established with the standby gateway is used to send a message to the standby gateway.
28. The device according to claim 24, characterized in that When the client device has at least two WAN ports, each of the WAN ports has a corresponding underlay virtual network instance, and the establishing unit is specifically configured to establish an overlay tunnel with a gateway corresponding to the server using each WAN port based on the overlay virtual network instance; The sending unit is specifically configured to send a message to the gateway using at least one of the overlay tunnels.
29. The device according to claim 28, characterized in that When the two WAN ports include a primary WAN port and a backup WAN port, the sending unit is specifically used to send messages to the gateway using the overlay tunnel established between the primary WAN port and the gateway; when the primary WAN port fails, the sending unit is used to send messages to the gateway using the overlay tunnel established between the backup WAN port and the gateway.
30. The device according to claim 23, characterized in that When the underlay network type corresponding to the WAN port of the client device is a preset network type, the device further includes: The encryption unit is used to encrypt the message before sending the message to the gateway using the overlay tunnel to obtain the encrypted message.
31. The device according to claim 22, characterized in that The establishing unit is specifically used to establish an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance, the underlay virtual network instance is associated with the WAN port of the client device, and the WAN port is interconnected with the server through the underlay network; The sending unit is specifically configured to send a message to a server by using the inner ring tunnel and the underlay network.
32. The device according to claim 31, characterized in that When the device has at least two WAN ports and different WAN ports are bound to different underlay virtual network instances, the establishing unit is specifically used to establish an inner ring tunnel with the underlay virtual network instance corresponding to each WAN port based on the overlay virtual network instance; The sending unit is specifically configured to send a message to a server by using at least one of the inner ring tunnels and its corresponding underlay network.
33. The device according to claim 32, characterized in that The at least two WAN ports include a primary WAN port and a backup WAN port, the inner ring tunnel established by the underlay virtual network instance corresponding to the primary WAN port is a primary inner ring tunnel, and the inner ring tunnel established by the underlay virtual network instance corresponding to the backup WAN port is a backup inner ring tunnel, and the sending unit is specifically used to send messages to the server by using the primary inner ring tunnel and the underlay network corresponding to the primary WAN port, and when the primary WAN port fails, the backup inner ring tunnel and the underlay network corresponding to the backup WAN port are used to send messages to the server.
34. The device according to claim 22, characterized in that When an overlay tunnel and an inner ring tunnel exist, the overlay tunnel has a higher priority than the inner ring tunnel.
35. The device according to claim 34, characterized in that When the gateway corresponding to the server side fails, the device further includes: A switching unit is used to switch from the overlay tunnel to the inner ring tunnel.
36. The device according to claim 21, characterized in that The overlay virtual network instance is a service virtual network instance in the communication device, the service virtual network instance is an overlay virtual network instance, or the overlay virtual network instance is a newly created overlay virtual network instance of the communication device.
37. The device according to claim 21, characterized in that The message also includes the IP address corresponding to the WAN port.
38. The device according to claim 21, characterized in that When the network to which the WAN port corresponding to the communication device is connected has network address translation, the IP address configured by the loopback interface is a public network IP address.
39. A communication device, characterized in that: The device is applied to a gateway, and includes: A receiving unit, configured to receive a message sent by a client device, wherein the message includes an IP address of a loopback interface in the client device, and the loopback interface is located in an overlay virtual network instance in the client device; A parsing unit, used for parsing the message to obtain the IP address; A sending unit is used to send the IP address to a server so that the server can identify the client device according to the IP address.
40. The device according to claim 39, characterized in that When the message is an encrypted message, the device further includes: The decryption unit is used to decrypt the message before parsing the message.
41. A communication device, the device comprising: Processor and memory; The memory is used to store instructions; The processor is used to execute the instructions in the memory and execute the method according to any one of claims 1 to 18.
42. A gateway, comprising: Processor and memory; The memory is used to store instructions; The processor is used to execute the instructions in the memory to perform the method according to claim 19 or 20.
43. A communication system, the system comprising: Client devices and servers, The client device is used to create a loopback interface in the overlay virtual network instance and configure an IP address for the loopback interface; Establishing a transmission channel to the server side based on the overlay virtual network instance; sending a message to the server using the transmission channel, wherein the message includes at least the IP address; The server is used to identify the client device according to the IP address in the message.
44. The system according to claim 43, characterized in that The client device is specifically used to establish an overlay tunnel from the overlay virtual network instance to the server side; and / or to establish an inner ring tunnel between the overlay virtual network instance and the virtual network instance interconnected with the server side.
45. The system according to claim 44, characterized in that The system further includes: a gateway, the gateway communicating with the server, the client device specifically used to establish an overlay tunnel from the overlay virtual network instance to the gateway corresponding to the server; and sending a message to the gateway using the overlay tunnel; The gateway is used to parse the message to obtain the IP address, and send the IP address to the server.
46. The system according to claim 45, characterized in that The system includes a primary gateway and a backup gateway, both of which communicate with the server. The client device is specifically used to send messages to the primary gateway using an overlay tunnel established with the primary gateway. When the primary gateway fails, the client device sends messages to the backup gateway using the overlay tunnel established with the backup gateway.
47. The system according to claim 44 or 45, characterized in that The client device is specifically used to establish an inner ring tunnel based on the overlay virtual network instance and the underlay virtual network instance, the underlay virtual network instance is associated with the WAN port of the client device, and the WAN port communicates with the server through the underlay network; The inner ring tunnel and the underlay network are used to send a message to the server.
48. The system according to claim 44, characterized in that When the gateway corresponding to the server side fails, the client device is also used to switch from the overlay tunnel to the inner ring tunnel.
49. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 20.
Citation Information
Patent Citations
Address allocation method and apparatus
CN108429824A