Network communication system, method and device

By setting up internal gateways and external gateways in the cloud platform and using VxLAN and VLAN identification, the problem of complex architecture of the existing IPv6 network platform is solved, and the free communication and external communication control between network terminals in the cloud platform is realized, simplifying the The management process is completed.

CN117914649BActive Publication Date: 2024-12-03DAWNING CLOUD COMPUTING TECH CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311787820.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2024-12-03
Estimated Expiration
2043-12-22

AI Technical Summary

Technical Problem

The existing IPv6 network platform uses traditional network architectures and complex protocols, resulting in complex deployment and management, making it difficult to design a simple network communication architecture suitable for cloud platform multi-tenant scenarios.

Method used

Design a network communication system. By setting up an internal gateway and an external gateway, each internal gateway corresponds to a subnet. When the network terminal communicates to the external subnet, the internal gateway forwards the message to the external gateway. , forward according to the destination IP address, realize control between different internal gateway terminals, and isolate it through VxLAN and VLAN identifiers.

Benefits of technology

It realizes free communication and external communication control between network terminals in the cloud platform, simplifies the network architecture, improves management efficiency, and ensures the isolation of different internal gateway terminals and the management of external connection permissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117914649B_ABST
    Figure CN117914649B_ABST
Patent Text Reader

Abstract

The present application relates to a network communication system, method and device. The system includes: an external gateway, at least one internal gateway and a network terminal, each internal gateway corresponds to a subnet, wherein the network terminal is used to send a first communication message to the first internal gateway of the target subnet where the network terminal is located when the first destination IP address of the first network message is an external IP address; the first internal gateway is used to send the first communication message to the external gateway; the external gateway is used to send the first communication message to the first destination IP address when the first destination IP address is an external network IP address; or when the first destination IP address is an intranet IP address, the first communication message is sent to the second internal gateway; the second internal gateway is used to send the first communication message to the target network terminal corresponding to the first destination IP address. This method can be used to control the communication between network terminals belonging to different internal gateways.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a network communication system, method and device. Background Art

[0002] In the current development of the Internet, due to the limitations of IPv4 (Internet Protocol Version 4), IPv6 (Internet Protocol Version 6) has begun to account for an increasing proportion of the Internet world. Cloud computing also needs to adapt to the development of IPv6 and use IPv6 as a stable network communication method based on the cloud platform. Currently, many IPv6 network platforms use traditional classic network architectures, or rely on complex network protocols such as BGP (BorderGateway Protocol) and EVPN (Ethernet Virtual Private Network), which are complex to deploy and manage.

[0003] Therefore, how to design a simple network communication architecture suitable for multi-tenant scenarios on cloud platforms is a problem that needs to be solved at present. Summary of the invention

[0004] Based on this, it is necessary to provide a network communication system, method and device to address the above technical problems, which can solve the communication problems of the cloud platform with a relatively simple architecture.

[0005] In a first aspect, the present application provides a network communication system.

[0006] The system includes an external gateway, at least one internal gateway and a network terminal, each of the internal gateways corresponds to a subnet, wherein:

[0007] The network terminal is used to send the first communication message to the first internal gateway corresponding to the target subnet where the network terminal is located when the first destination IP address of the first network message is an external IP address; the external IP address is an IP address other than the IP addresses in the target subnet;

[0008] The first internal gateway is used to send the first communication message to the external gateway;

[0009] The external gateway is used to send the first communication message to the first destination IP address when the first destination IP address is an external network IP address; or to send the first communication message to a second internal gateway corresponding to the first destination IP address when the first destination IP address is an internal network IP address;

[0010] The second internal gateway is used to send the first communication message to the target network terminal corresponding to the first destination IP address.

[0011] The above network communication system is provided with an internal gateway and an external gateway, each internal gateway corresponds to a subnet, and when the network terminal communicates outside the subnet, the communication message is sent to the internal gateway, and the internal gateway sends the communication message to the external gateway, and then the external gateway forwards the communication message accordingly according to whether the destination IP address of the communication message belongs to the external network IP address or the internal network IP address. The internal gateway can be used to realize the control of the communication between network terminals belonging to different internal gateways.

[0012] In a possible implementation, the network terminal is further configured to send the first communication message to a target network terminal corresponding to the first destination IP address when the first destination IP address is an internal IP address;

[0013] The internal IP addresses are the IP addresses in the target subnet.

[0014] The above-mentioned network communication system enables the network terminal to communicate directly with the target network terminal during internal communication and forward through the first internal gateway during external communication. It can realize free communication between network terminals belonging to the same internal gateway, and the communication between network terminals belonging to different internal gateways is controlled by the internal gateway.

[0015] In a possible implementation, the first internal gateway is further used to determine the external connection authority of the network terminal;

[0016] The first internal gateway is further configured to send the first communication message to the external gateway when the external connection authority indicates that the network terminal has the authority to communicate with the external network terminal.

[0017] The above-mentioned network communication system sets external connection permissions for network terminals, and the internal gateway verifies the external connection permissions of the network terminals. When the network terminals have the permission to communicate with the outside, the messages are forwarded to the external gateway. Different external communication controls can be performed on different network terminals in the same internal gateway.

[0018] In a possible implementation, the external gateway is further configured to send a query request to each of the internal gateways based on the first destination IP address;

[0019] The second internal gateway is further configured to send a response message to the external gateway in response to the query request, so that the external gateway sends the first communication message to the second internal gateway.

[0020] The above network communication system enables the external gateway to obtain the second internal gateway corresponding to the first destination IP address by sending a query request to each internal gateway, and then send the first communication message to the second internal gateway, which is then forwarded by the second internal gateway. This allows the external gateway to determine the internal gateway corresponding to the first destination IP address even if the corresponding relationship between the first destination IP address and the internal gateway is not stored.

[0021] In a possible implementation, the second internal gateway is further configured to determine, in response to the query request, the external connection permission of the target network terminal corresponding to the first destination IP address;

[0022] The second internal gateway is further configured to send a response message to the external gateway when the external connection authority indicates that the target network terminal has the authority to communicate with the external network terminal, so that the external gateway sends the first communication message to the second internal gateway.

[0023] The above-mentioned network communication system sets external connection permissions for network terminals, and the second internal gateway verifies the external connection permissions of the target network terminal. When the target network terminal has the permission to communicate with the outside, it responds to the query request of the external gateway so that the target network terminal can receive the first communication message, and different external communication controls can be performed on different network terminals in the same internal gateway.

[0024] In a possible implementation, each network terminal corresponding to the internal gateway uses a VxLAN network for communication, each of the internal gateways and the external gateway uses a VLAN network for communication, and the first communication message carries a VNI identifier of the VxLAN network corresponding to the first internal gateway.

[0025] The first internal gateway is further used to replace the VNI identifier with a VLAN identifier, and send the first communication message after replacing the VLAN identifier to the external gateway.

[0026] The above-mentioned network communication system enables network terminals belonging to the same internal gateway to communicate using the VxLAN network, and each internal gateway and external gateway to communicate using the VLAN network, and enables the messages sent by each network terminal to carry the VNI identifier corresponding to its internal gateway. Since network terminals with different corresponding VNI identifiers cannot communicate with each other, the isolation of network terminals belonging to different internal gateways can be achieved; when it is necessary to send communication messages to the outside, the VNI identifier is replaced with the VLAN identifier of the VLAN network, so that the communication messages can be transmitted normally in the VLAN network.

[0027] In a possible implementation, the second internal gateway is also used to replace the VLAN identifier of the first communication message with the VNI identifier corresponding to the second internal gateway, and send the first communication message after the VNI identifier is replaced to the target network terminal corresponding to the first destination IP address.

[0028] The above-mentioned network communication system enables the second internal gateway to replace the VLAN identifier with the VNI identifier corresponding to the second internal gateway after receiving the first communication message, so that the first communication message can be transmitted normally in the VxLAN network.

[0029] In a possible implementation, the external gateway is further configured to receive a second communication message sent by an external network IP address, and determine a second destination IP address corresponding to the second communication message;

[0030] The external gateway is further used to send the second communication message to a third internal gateway corresponding to the second destination IP address;

[0031] The third internal gateway is used to send the second communication message to the target network terminal corresponding to the second destination IP address.

[0032] The above-mentioned network communication system is provided with an internal gateway and an external gateway, each internal gateway corresponds to at least one network terminal, and when an external network IP address communicates with a network terminal, the communication message is first sent to the external gateway, and the external gateway sends the communication message to the internal gateway corresponding to the IP address according to the destination IP address of the communication message, and then the internal gateway forwards the communication message accordingly. The internal gateway can realize the control of the communication between the external network IP address and the network terminal.

[0033] In a second aspect, the present application further provides a network communication method, applied to a network terminal, the method comprising:

[0034] generating a first communication message;

[0035] When the first destination IP address of the first communication message is an external IP address, the first communication message is sent to the first internal gateway corresponding to the target subnet where the network terminal is located, so that the first internal gateway sends the first communication message to the external gateway, and the external gateway sends the first communication message to the first destination IP address when the first destination IP address of the first communication message is an external network IP address; or when the first destination IP address is an intranet IP address, the first communication message is sent to the second internal gateway corresponding to the first destination IP address, and the second internal gateway sends the first communication message to the target network terminal corresponding to the destination IP address.

[0036] In a third aspect, the present application further provides a network communication method, applied to a first internal gateway, the method comprising:

[0037] Receiving a first communication message sent by a network terminal corresponding to the first internal gateway;

[0038] The first communication message is sent to an external gateway, so that when the first destination IP address of the first communication message is an external network IP address, the external gateway sends the first communication message to the first destination IP address; or when the first destination IP address of the first communication message is an internal network IP address, the first communication message is sent to a second internal gateway corresponding to the first destination IP address, and the second internal gateway sends the first communication message to a target network terminal corresponding to the destination IP address.

[0039] In a fourth aspect, the present application further provides a network communication method, which is applied to an external gateway, and the method includes:

[0040] Receiving a first communication message sent by a first internal gateway;

[0041] In the case where the first destination IP address of the first communication message is an external network IP address, sending the first communication message to the first destination IP address; or,

[0042] When the first destination IP address of the first communication message is an intranet IP address, the first communication message is sent to the second internal gateway corresponding to the first destination IP address, so that the second internal gateway sends the first communication message to the target network terminal corresponding to the destination IP address.

[0043] In a fifth aspect, the present application further provides a network communication device, applied to a network terminal, the device comprising:

[0044] A generating module, used for generating a first communication message;

[0045] A sending module, used for sending the first communication message to the first internal gateway corresponding to the target subnet where the network terminal is located when the first destination IP address of the first communication message is an external IP address, so that the first internal gateway sends the first communication message to the external gateway, and the external gateway sends the first communication message to the first destination IP address when the first destination IP address of the first communication message is an external network IP address; or sending the first communication message to the second internal gateway corresponding to the first destination IP address when the first destination IP address is an intranet IP address, and the second internal gateway sends the first communication message to the target network terminal corresponding to the destination IP address.

[0046] In a sixth aspect, the present application further provides a network communication device, applied to a first internal gateway, the device comprising:

[0047] A receiving module, used for receiving a first communication message sent by a network terminal corresponding to the first internal gateway;

[0048] A sending module, used for sending the first communication message to an external gateway, so that when the first destination IP address of the first communication message is an external network IP address, the external gateway sends the first communication message to the first destination IP address; or when the first destination IP address of the first communication message is an internal network IP address, the first communication message is sent to a second internal gateway corresponding to the first destination IP address, and the second internal gateway sends the first communication message to a target network terminal corresponding to the destination IP address.

[0049] In a seventh aspect, the present application further provides a network communication device, applied to an external gateway, the device comprising:

[0050] A receiving module, used for receiving a first communication message sent by a first internal gateway;

[0051] A sending module, used for sending the first communication message to the first destination IP address when the first destination IP address of the first communication message is an external network IP address; or for sending the first communication message to the second internal gateway corresponding to the first destination IP address when the first destination IP address of the first communication message is an internal network IP address, so that the second internal gateway sends the first communication message to the target network terminal corresponding to the destination IP address.

[0052] In an eighth aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, any one of the above methods is implemented.

[0053] In a ninth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, any of the above methods is implemented.

[0054] In a tenth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, any of the above methods is implemented.

[0055] The above network communication system, method and device are provided with an internal gateway and an external gateway, each internal gateway corresponds to a subnet, and when the network terminal communicates outside the subnet, the communication message is sent to the internal gateway, and the internal gateway sends the communication message to the external gateway, and then the external gateway forwards the communication message accordingly according to whether the destination IP address of the communication message belongs to the external network IP address or the internal network IP address. The internal gateway can be used to realize the control of the communication between network terminals belonging to different internal gateways. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 is a schematic diagram of a network communication system in one embodiment;

[0057] Figure 2 A schematic diagram of a process of a network terminal sending a first communication message in an embodiment;

[0058] Figure 3 A schematic diagram of a process of communicating between an external network IP address and a network terminal in an embodiment;

[0059] Figure 4 A schematic diagram of a network communication system applied to a cloud platform in one embodiment;

[0060] Figure 5 A schematic diagram of a flow chart of a network communication method in one embodiment;

[0061] Figure 6 A schematic diagram of a flow chart of a network communication method in one embodiment;

[0062] Figure 7 A schematic diagram of a flow chart of a network communication method in one embodiment;

[0063] Figure 8 is a structural block diagram of a network communication device in one embodiment;

[0064] Fig. 9is a structural block diagram of a network communication device in one embodiment;

[0065] Fig.10 is a structural block diagram of a network communication device in one embodiment;

[0066] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0067] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0068] In one embodiment, Figure 1 As shown, a network communication system is provided, including an external gateway 110, at least one internal gateway 120 and a network terminal 130, each internal gateway 120 corresponding to a subnet, wherein the network terminal 130 is used to send a first communication message to a first internal gateway 121 corresponding to a target subnet where the network terminal 130 is located when the first destination IP address of the first network message is an external IP address; the external IP address is an IP address other than the IP addresses in the target subnet; the first internal gateway 121 is used to send the first communication message to the external gateway 110; the external gateway 110 is used to send the first communication message to the first destination IP address when the first destination IP address of the first communication message is an external network IP address; or when the first destination IP address is an intranet IP address, send the first communication message to the second internal gateway 122 corresponding to the first destination IP address; the second internal gateway 122 is used to send the first communication message to the target network terminal 131 corresponding to the first destination IP address.

[0069] In the embodiment of the present application, the network terminal 130 can be a virtual machine or a physical machine, and each network terminal 130 has a corresponding IP address. An internal gateway 120 corresponds to a subnet, and the IP address of each network terminal 130 is an IP address in a certain subnet. The internal gateway 120 is used to manage the communication between each corresponding network terminal 130 and the external IP address (for a certain network terminal 130, the external IP address refers to all IP addresses except the IP address of the subnet managed by the internal gateway 120 corresponding to the network terminal 130), and the external gateway 110 is used to manage the communication between each internal gateway 120 and the communication between each network terminal 130 and the external network. Taking the scenario of multi-tenants of the cloud platform as an example, the external gateway 110 can be the gateway of the large network segment corresponding to the entire cloud platform, the internal gateway 120 can be the gateway of the small network segment corresponding to each tenant in the cloud platform, and the network terminal 130 can be the virtual machine of each tenant.

[0070] In order to ensure that the network terminals 130 corresponding to different internal gateways 120 are in a strictly isolated state, the network terminal 130 needs to forward through its corresponding internal gateway 120 when it needs to communicate with an external network terminal with an external IP address. The network terminal 130 may record a rule for determining whether an IP address belongs to an internal IP address in the subnet of the internal gateway 120 (for example, the network terminal 130 may record the IP address range of the subnet corresponding to the internal gateway 120), and then determine whether the first destination IP address belongs to the internal IP address corresponding to the first internal gateway 121 of the network terminal 130, or an external IP address that does not belong to the internal IP address, according to the first destination IP address to which the network terminal 130 needs to send the first communication message. If the first destination IP address belongs to the external IP address, the network terminal 130 may send the first communication message to the first internal gateway 121, and the first internal gateway 121 then sends the first communication message to the external gateway 110. Exemplarily, the network terminal 130 can set the MAC address (Media Access Control Address) of the first communication message to the MAC address of the first internal gateway 121, and send the communication message to the first internal gateway 121. The first internal gateway 121 replaces the MAC address of the communication message with the MAC address of the external gateway 110, and sends the communication message to the external gateway 110.

[0071] In a possible implementation, the network terminal 130 is further configured to send the first communication message to the target network terminal 131 corresponding to the first destination IP address, and directly communicate with the target network terminal corresponding to the first destination IP address, when the first destination IP address of the first communication message is an internal IP address. Figure 2 As shown, the network terminal 130 can first determine whether the first destination IP address is an internal IP address or an external IP address. If it is an internal IP address, the first communication message is sent to the target network terminal 131. If it is an external IP address, the first communication message needs to be sent to the first internal gateway 121, and the first internal gateway 121 performs subsequent forwarding operations on the first communication message.

[0072] In a possible implementation, each network terminal 130 corresponding to the internal gateway 120 uses a VxLAN network (Virtual eXtensible Local Area Network) for communication, each internal gateway 120 and the external gateway 110 use a VLAN network (Virtual Local Area Network) for communication, and the first communication message carries a VNI identifier (VxLAN Network Identifier) ​​of the VxLAN network corresponding to the first internal gateway 121. The VNI identifier is used to distinguish different broadcast domains. Only when the two communicating parties belong to the same broadcast domain, that is, the two communicating parties correspond to the same VNI identifier, can the two parties communicate normally. Each internal gateway 120 can correspond to a VNI identifier, so that since the network terminals 130 of different internal gateways 120 have different VNI identifiers, only the network terminals 130 belonging to the same internal gateway 120 can communicate directly. In the scenario of multi-tenants on the cloud platform, strict isolation between virtual machines of different tenants can be achieved.

[0073] When the internal gateway 120 communicates with the external gateway 110, since the first communication message carries the VNI identifier, the first internal gateway 121 needs to replace the VNI identifier in the first communication message with the VLAN identifier corresponding to the VLAN network before sending the first communication message to the external gateway 110, and send the first communication message with the replaced VLAN identifier to the external gateway 110, so that the first communication message can be transmitted normally in the VLAN network.

[0074] In a possible implementation, the first internal gateway 121 is also used to determine the external connection authority of the network terminal 130; the first internal gateway 121 is also used to send the first communication message to the external gateway 110 when the external connection authority indicates that the network terminal 130 has the authority to communicate with the external network terminal. The external connection authority is used to indicate whether the network terminal 130 is allowed to communicate with the external network terminal. Different network terminals 130 corresponding to the first internal gateway 121 may have different external connection authorities. When the first internal gateway 121 receives the first communication message, the first internal gateway 121 may query the external connection authority of the network terminal 130 that sent the communication message. Exemplarily, the first internal gateway 121 may record the external connection authority of each corresponding network terminal 130, or the external connection authority of each network terminal 130 may also be recorded in other databases, and the first internal gateway 121 may obtain the external connection authority of the network terminal 130 by interacting with the database.

[0075] In the case where the network terminal 130 has the authority to communicate with the external network terminal, the first internal gateway 121 may send the first communication message to the external gateway 110. In the case where the network terminal 130 does not have the authority to communicate with the external network terminal, the first internal gateway 121 may refuse to continue to send the first communication message, and may also return an error message to the network terminal 130 to indicate that the network terminal 130 has insufficient external connection authority and cannot send a communication message whose destination IP address is an external IP address.

[0076] After receiving the first communication message, the external gateway 110 determines whether the first destination IP address is an IP address of a network terminal 130 corresponding to a certain internal gateway 120 (intranet IP address) or an IP address of the external Internet (extranet IP address). If the first destination IP address is an extranet IP address, the external gateway 110 can send the first communication message to the first destination IP address through the Internet. If the first destination IP address is an intranet IP address, the external gateway 110 needs to determine which internal gateway 120 the first destination IP address belongs to. The external gateway 110 can record the internal gateway 120 corresponding to each IP address, and determine the second internal gateway 122 corresponding to the first destination IP address accordingly.

[0077] In a possible implementation, if the external gateway 110 does not record the internal gateway 120 corresponding to each IP address, or if the second internal gateway 122 corresponding to the first destination IP address is not found after searching for the correspondence between each IP address recorded in the external gateway 110 and each internal gateway 120, the external gateway 110 may send a query request to each internal gateway 120 based on the first destination IP address; the second internal gateway 122 may send a response message to the external gateway 110 in response to the query request, so that the external gateway 110 sends the first communication message to the second internal gateway 122. The external gateway 110 may also record the correspondence between the first destination IP address and the internal gateway 120, so that the query request does not need to be sent again the next time a communication message with the destination IP address being the first destination IP address is received.

[0078] In a possible implementation, the second internal gateway 122 is further used to determine the external connection permission of the target network terminal 131 corresponding to the first destination IP address in response to the query request; the second internal gateway 122 is also used to send a response message to the external gateway 110 when the external connection permission indicates that the target network terminal 131 has the permission to communicate with the external network terminal, so that the external gateway 110 sends the first communication message to the second internal gateway 122. Similarly, the second internal gateway 122 can record the external connection permission corresponding to each network terminal 130, or the second internal gateway 122 can also communicate with a database that records the external connection permission corresponding to each network terminal 130, so as to obtain the external connection permission of the target network terminal 131. If the target network terminal 131 has the permission to communicate with the external network terminal, the second internal gateway 122 can send a response message to the external gateway 110 to indicate the second internal gateway 122 to which the first target IP address belongs. If the target network terminal 131 does not have the authority to communicate with the external network terminal, the second internal gateway 122 may not send a response message to the external gateway 110, so that the external gateway 110 cannot sense the location of the target network terminal 131 and cannot send the first communication message to the target network terminal 131. The second internal gateway 122 may also send an error message to the target network terminal 131 to indicate that the target network terminal 131 has insufficient external connection authority and cannot receive the communication message sent to it by the external IP address; the second internal gateway 122 may also send an error message to the network terminal 130 through the external gateway 110 and the first internal gateway 121 to indicate that the network terminal 130 cannot deliver its first communication message due to insufficient external connection authority of the target network terminal 131.

[0079] It should be noted that, when the external connection permission of the target network terminal 131 changes from being able to communicate with the external network terminal to being unable to communicate with the external network terminal, in order to prevent the external gateway 110 from sending communication messages whose target IP address is the first target IP address to the second internal gateway 122, the second internal gateway 122 can send a permission change request to the external gateway 110, so that the external gateway 110 deletes the correspondence between the first target IP address and the second internal gateway 122 recorded in itself.

[0080] In one possible implementation, if the external gateway 110 and each internal gateway 120 use a VLAN network for communication, and the network terminals 130 belonging to the same internal gateway 120 use a VxLAN network for communication, then in order to enable the first communication message to be transmitted in the VxLAN network, the second internal gateway 122 needs to replace the VLAN identifier of the first communication message with the VNI identifier corresponding to the second internal gateway 122 after receiving the first communication message, and then send the first communication message after the VNI identifier is replaced to the target network terminal 131 corresponding to the first destination IP address.

[0081] The above network communication system is provided with an internal gateway and an external gateway, each internal gateway corresponds to a subnet, and when the network terminal communicates outside the subnet, the communication message is sent to the internal gateway, and the internal gateway sends the communication message to the external gateway, and then the external gateway forwards the communication message accordingly according to whether the destination IP address of the communication message belongs to the external network IP address or the internal network IP address. The internal gateway can be used to realize the control of the communication between network terminals belonging to different internal gateways.

[0082] In one embodiment, Figure 3 As shown, the external gateway 110 is also used to receive a second communication message sent by the external network IP address and determine the second destination IP address corresponding to the second communication message; the external gateway 110 is also used to send the second communication message to the third internal gateway 123 corresponding to the second destination IP address; the third internal gateway 123 is used to send the second communication message to the target network terminal 132 corresponding to the second destination IP address.

[0083] In the embodiment of the present application, the external gateway 110 can receive the second communication message from the Internet, and forward the second communication message to the corresponding third internal gateway 120 according to its second destination IP address, so that the third internal gateway 120 sends the second communication message to the target network terminal 131 corresponding to the second destination IP address. The way in which the external gateway 110 determines the third internal gateway 120 can refer to the way in which the second internal gateway 122 is determined in the above embodiment, and the embodiment of the present application will not be repeated here.

[0084] After the external gateway 110 sends the second communication message to the third internal gateway 120, the third internal gateway 120 further sends the second communication message to the target network terminal 131 corresponding to the second destination IP address. If the network terminals 130 belonging to the same internal gateway 120 use the VxLAN network for communication, the third internal gateway 120 also needs to add the VNI identifier corresponding to the third internal gateway 120 to the second communication message so that the second communication message can be transmitted in the VxLAN network.

[0085] The above-mentioned network communication system is provided with an internal gateway and an external gateway, each internal gateway corresponds to at least one network terminal, and when an external network IP address communicates with a network terminal, the communication message is first sent to the external gateway, and the external gateway sends the communication message to the internal gateway corresponding to the IP address according to the destination IP address of the communication message, and then the internal gateway forwards the communication message accordingly. The internal gateway can realize the control of the communication between the external network IP address and the network terminal.

[0086] In order to enable those skilled in the art to better understand the embodiments of the present application, the embodiments of the present application are described below through specific examples. Figure 4 As shown, a schematic diagram of a network communication system applied to a cloud platform is shown. The external gateway is connected to the Internet through the EBPG protocol (External Border Gateway Protocol) and communicates with the Internet through the network provided by the network provider. The entire cloud platform uses an IPv6 large network segment provided by the network provider, such as Figure 4 The gateway of the large network segment is the external gateway, which can be placed on the physical switch of the entire cloud platform.

[0087] The large network segment is divided into small network segments (private networks) for multiple tenants to use. Each private network is a subnet of the large network segment and has an internal gateway. Each network terminal (virtual machine) of the tenant occupies an IP address within the private network. Figure 4 As shown, a private network 1 2000:d000:: / 64 can be divided from the large network segment, and the IP address of its internal gateway 1 is 2000:d000::1, the IP address of network terminal A is 2000:d000::2, and the IP address of network terminal B is 2000:d000::3; and a private network 2 2000:d000:0:1:: / 64 can be divided, and the IP address of its internal gateway 2 is 2000:d000:0:1::1, the IP address of network terminal C is 2000:d000:0:1::2, and the IP address of network terminal B is 2000:d000:0:1::3. It should be noted that the above are only two examples, and in fact, other private networks of different sizes can also be divided, and the IP address of the internal gateway of the private network can also be set by the user.

[0088] The private network uses VxLAN network for communication, and each private network has the VNI identifier of its corresponding VxLAN network. The internal gateway and external gateway of the private network use VLAN network for communication. Let's take the case where network terminal A needs to send a communication message as an example to continue the explanation. Network terminal A first determines whether the destination IP address of the communication message belongs to the internal IP address, that is, whether it belongs to private network one. If the destination IP address is 2000:d000::3, since the destination IP address belongs to the network segment of 2000:d000:: / 64, the destination IP address is an internal IP address, and network terminal A can communicate with network terminal B corresponding to the destination IP address through the VxLAN network. If the destination IP address is 2000:e000::1 (an external network IP address that does not belong to the cloud platform network segment), or 2000:d000:0:1::2 (that is, the IP address of network terminal C, which belongs to other private networks), network terminal A can send the communication message to internal gateway one.

[0089] The cloud platform has the ability to assign external connection permissions to each network terminal, that is, Figure 4 The elastic public network IPv6 capability in it. The internal gateway 1 verifies the external connection permission of the network terminal A. If the external connection permission indicates that the network terminal A has the permission to communicate with the external network terminal, the internal gateway 1 removes the VNI tag of the communication message, adds a VLAN network tag to it, and sends the communication message to the external gateway. If the destination IP address is an external network IP address, the external gateway sends the communication message through the Internet. If the destination IP address is an internal network IP address (assuming it is the IP address of the network terminal C), the external gateway sends the communication message to the internal gateway 2 corresponding to the network terminal C. It should be noted that if the network terminal C here does not have the permission to communicate with the external network terminal, the external gateway cannot determine which internal gateway corresponds to the network terminal C, and thus cannot send the communication message to the network terminal C.

[0090] Internal gateway 2 removes the VLAN network tag of the communication message, adds the VxLAN tag of private network 2 to the communication message, and then sends the communication message to network terminal C.

[0091] The process of sending communication messages from an external network IP address to a network terminal within the cloud platform can be referred to the above-mentioned external gateway determining the internal gateway corresponding to the destination IP address, sending the communication message to the internal gateway, and the internal gateway then forwarding the communication message. The embodiment of this application will not be repeated here.

[0092] The above network communication system sets up an internal gateway corresponding to a small network segment and an external gateway corresponding to a large network segment in the cloud platform. The small network segment uses a VxLAN network for communication. When a user terminal in the small network segment needs to communicate externally, the internal gateway of the small network segment needs to verify the external connection permission and replace the VNI tag of the communication message with a VLAN tag so that the communication message can be transmitted in the external VLAN network. The internal gateway can be used to achieve strict isolation between the network terminals of each tenant of the cloud platform.

[0093] In one embodiment, Figure 5 As shown, a network communication method is provided. This embodiment of the application is applied to Figure 1 The network terminal 130 in the example is used as an example to illustrate, and the following steps are included:

[0094] Step S501: Generate a first communication message.

[0095] Step S502, when the first destination IP address of the first communication message is an external IP address, the first communication message is sent to the first internal gateway corresponding to the target subnet where the network terminal is located, so that the first internal gateway sends the first communication message to the external gateway, and the external gateway sends the first communication message to the first destination IP address when the first destination IP address of the first communication message is an external network IP address; or when the first destination IP address is an intranet IP address, the first communication message is sent to the second internal gateway corresponding to the first destination IP address, and the second internal gateway sends the first communication message to the target network terminal corresponding to the destination IP address.

[0096] In the embodiment of the present application, when the network terminal needs to send the first communication message to the external IP address, it needs to first send the first communication message to the first internal gateway corresponding to the target subnet where it is located. The first internal gateway then sends the first communication message to the external gateway. The external gateway determines the first destination IP address corresponding to the communication message, and then determines the second internal gateway corresponding to the first destination IP address from each internal gateway, and sends the first communication message to the second internal gateway. The second internal gateway then sends the first communication message to the first destination IP address.

[0097] Among them, the interaction process and operations performed by the internal gateway, the network terminal and the external gateway can be referred to the description in the aforementioned embodiment, and the embodiments of the present application will not be repeated here.

[0098] The above network communication method sets an internal gateway and an external gateway, each internal gateway corresponds to a subnet, and when the network terminal communicates outside the subnet, it sends the communication message to the internal gateway, and the internal gateway sends the communication message to the external gateway, and then the external gateway forwards the communication message according to whether the destination IP address of the communication message belongs to the external network IP address or the internal network IP address. The internal gateway can be used to control the communication between network terminals belonging to different internal gateways.

[0099] In one embodiment, Figure 6 As shown, a network communication method is provided. This embodiment of the application is applied to Figure 1 Taking the first internal gateway 121 in the example as an example, the following steps are included:

[0100] S601, receiving a first communication message sent by a network terminal corresponding to a first internal gateway.

[0101] S602, sending the first communication message to the external gateway, so that when the first destination IP address of the first communication message is an external network IP address, the external gateway sends the first communication message to the first destination IP address; or when the first destination IP address of the first communication message is an internal network IP address, the first communication message is sent to the second internal gateway corresponding to the first destination IP address, and the second internal gateway sends the first communication message to the target network terminal corresponding to the destination IP address.

[0102] In an embodiment of the present application, when the first internal gateway receives the first communication message sent by the network terminal, it is necessary to forward the first communication message to the external gateway. If the network terminals belonging to the same first internal gateway use the VxLAN network for communication, and the first internal gateway and the external gateway use the VLAN network for communication, the first internal gateway also needs to remove the VNI identifier in the first communication message when forwarding the first communication message, and add a VLAN identifier to the first communication message. After receiving the first communication message, the external gateway sends the first communication message to the second internal gateway corresponding to the first destination IP address according to whether the first destination IP address is an intranet IP address or an external network IP address, and the second internal gateway forwards the first communication message, or sends the first communication message to the first destination IP address. Among them, the interaction process and operations performed by the internal gateway, the network terminal and the external gateway can be referred to the aforementioned embodiment, and the embodiment of the present application will not be repeated here.

[0103] The above network communication method sets an internal gateway and an external gateway, each internal gateway corresponds to a subnet, and when the network terminal communicates outside the subnet, it sends the communication message to the internal gateway, and the internal gateway sends the communication message to the external gateway, and then the external gateway forwards the communication message according to whether the destination IP address of the communication message belongs to the external network IP address or the internal network IP address. The internal gateway can be used to control the communication between network terminals belonging to different internal gateways.

[0104] In one embodiment, Figure 7 As shown, a network communication method is provided. This embodiment of the application is applied to Figure 1 The external gateway 110 in the example is used as an example to illustrate, including the following steps

[0105] S701: Receive a first communication message sent by a first internal gateway.

[0106] S702: When the first destination IP address of the first communication message is an external network IP address, send the first communication message to the first destination IP address; or

[0107] S703, when the first destination IP address of the first communication message is an intranet IP address, send the first communication message to the second internal gateway corresponding to the first destination IP address, so that the second internal gateway sends the first communication message to the target network terminal corresponding to the destination IP address.

[0108] In an embodiment of the present application, when the external gateway receives the first communication message, it determines whether the first destination IP address of the first communication message is an external network IP address or an internal network IP address. If the first destination IP address is an external network IP address, the external gateway sends the first communication message to the first destination IP address. If the first destination IP address is an internal network IP address, the external gateway queries the second internal gateway corresponding to the first destination IP address (for example, by sending a query request to each internal gateway, and the internal gateway that responds to the query request and sends a reply message to the external gateway is used as the second internal gateway), and sends the first communication message to the second internal gateway, so that the second internal gateway sends the first communication message to the first destination IP address. Among them, the interaction process and operations performed by the internal gateway, the network terminal and the external gateway can be referred to the description of the aforementioned embodiment, and the embodiment of the present application will not be repeated here.

[0109] The above network communication method sets an internal gateway and an external gateway, each internal gateway corresponds to at least one network terminal, and enables the network terminal to send the communication message to the internal gateway when communicating externally, and the internal gateway sends the communication message to the external gateway, and then the external gateway forwards the communication message accordingly according to whether the destination IP address of the communication message belongs to the external network IP address or the internal network IP address. The internal gateway can be used to control the communication between network terminals belonging to different internal gateways.

[0110] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0111] Based on the same inventive concept, the embodiment of the present application also provides a network communication device for implementing the network communication method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more network communication device embodiments provided below can refer to the limitations on the network communication method above, and will not be repeated here.

[0112] In one embodiment, Figure 8 As shown, a network communication device 800 is provided, which is applied to a network terminal, including: a generating module 802 and a sending module 804, wherein:

[0113] A generating module 802, used to generate a communication message;

[0114] The sending module 804 is used to send the first communication message to the first internal gateway corresponding to the target subnet where the network terminal is located when the first destination IP address of the first communication message is an external IP address, so that the first internal gateway sends the first communication message to the external gateway, and the external gateway sends the first communication message to the first destination IP address when the first destination IP address of the first communication message is an external network IP address; or when the first destination IP address is an intranet IP address, send the first communication message to the second internal gateway corresponding to the first destination IP address, and the second internal gateway sends the first communication message to the target network terminal corresponding to the destination IP address.

[0115] The above network communication device is provided with an internal gateway and an external gateway, each internal gateway corresponds to a subnet, and when the network terminal communicates outside the subnet, the communication message is sent to the internal gateway, and the internal gateway sends the communication message to the external gateway, and then the external gateway forwards the communication message accordingly according to whether the destination IP address of the communication message belongs to the external network IP address or the internal network IP address. The internal gateway can be used to realize the control of the communication between network terminals belonging to different internal gateways.

[0116] In one embodiment, Fig. 9 As shown, a network communication device 900 is provided, which is applied to a first internal gateway and includes: a receiving module 902 and a sending module 904, wherein:

[0117] A receiving module 902, configured to receive a first communication message sent by a network terminal corresponding to the first internal gateway;

[0118] The sending module 904 is used to send the first communication message to the external gateway, so that when the first destination IP address of the first communication message is an external network IP address, the external gateway sends the first communication message to the first destination IP address; or when the first destination IP address of the first communication message is an internal network IP address, the first communication message is sent to the second internal gateway corresponding to the first destination IP address, and the second internal gateway sends the first communication message to the target network terminal corresponding to the destination IP address.

[0119] The above network communication device is provided with an internal gateway and an external gateway, each internal gateway corresponds to at least one network terminal, and when the network terminal communicates externally, the communication message is sent to the internal gateway, and the internal gateway sends the communication message to the external gateway, and then the external gateway forwards the communication message accordingly according to whether the destination IP address of the communication message belongs to an external network IP address or an internal network IP address. The internal gateway can be used to control the communication between network terminals belonging to different internal gateways.

[0120] In one embodiment, Fig.10 As shown, a network communication device 1000 is provided, which is applied to an external gateway, including: a receiving module 1002 and a sending module 1004, wherein:

[0121] The receiving module 1002 is used to receive a first communication message sent by a first internal gateway;

[0122] The sending module 1004 is used to send the first communication message to the first destination IP address when the first destination IP address of the first communication message is an external network IP address; or to send the first communication message to the second internal gateway corresponding to the first destination IP address when the first destination IP address of the first communication message is an internal network IP address, so that the second internal gateway sends the first communication message to the target network terminal corresponding to the destination IP address.

[0123] The above network communication device is provided with an internal gateway and an external gateway, each internal gateway corresponds to at least one network terminal, and when the network terminal communicates externally, the communication message is sent to the internal gateway, and the internal gateway sends the communication message to the external gateway, and then the external gateway forwards the communication message accordingly according to whether the destination IP address of the communication message belongs to an external network IP address or an internal network IP address. The internal gateway can be used to control the communication between network terminals belonging to different internal gateways.

[0124] Each module in the above device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0125] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.11 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a network communication method is implemented.

[0126] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0127] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0128] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0129] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0130] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0131] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0132] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0133] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A network communication system, characterized in that: The system includes an external gateway, at least one internal gateway and a network terminal, each of the internal gateways corresponds to a subnet, each network terminal corresponding to the internal gateway communicates using a VxLAN network, and each of the internal gateways and the external gateway communicates using a VLAN network, wherein: The network terminal is used to send a first communication message to a first internal gateway corresponding to a target subnet where the network terminal is located when the first destination IP address of the first network message is an external IP address; the first communication message carries a VNI identifier of a VxLAN network corresponding to the first internal gateway, and the external IP address is an IP address other than the IP addresses in the target subnet; The first internal gateway is further configured to replace the VNI identifier with a VLAN identifier, and send the first communication message after the VLAN identifier is replaced to the external gateway; The external gateway is used to send the first communication message to the first destination IP address when the first destination IP address is an external network IP address; or to send the first communication message to a second internal gateway corresponding to the first destination IP address when the first destination IP address is an internal network IP address; The second internal gateway is used to send the first communication message to the target network terminal corresponding to the first destination IP address.

2. The system according to claim 1, characterized in that The network terminal is further configured to send the first communication message to a target network terminal corresponding to the first destination IP address when the first destination IP address is an internal IP address; The internal IP addresses are the IP addresses in the target subnet.

3. The system according to claim 2, characterized in that The first internal gateway is further used to determine the external connection authority of the network terminal; The first internal gateway is further configured to send the first communication message to the external gateway when the external connection authority indicates that the network terminal has the authority to communicate with the external network terminal.

4. The system according to claim 1, characterized in that The external gateway is further configured to send a query request to each of the internal gateways based on the first destination IP address; The second internal gateway is further configured to send a response message to the external gateway in response to the query request, so that the external gateway sends the first communication message to the second internal gateway.

5. The system according to claim 4, characterized in that The second internal gateway is further configured to determine, in response to the query request, the external connection authority of the target network terminal corresponding to the first destination IP address; The second internal gateway is further configured to send a response message to the external gateway when the external connection authority indicates that the target network terminal has the authority to communicate with the external network terminal, so that the external gateway sends the first communication message to the second internal gateway.

6. The system according to claim 1, characterized in that The first communication message also carries the MAC address of the first internal gateway; The first internal gateway is further used to replace the MAC address of the first internal gateway with the MAC address of the external gateway, and send the first communication message after the VLAN identifier and the MAC address are replaced to the external gateway.

7. The system according to claim 6, characterized in that The second internal gateway is also used to replace the VLAN identifier of the first communication message with the VNI identifier corresponding to the second internal gateway, and send the first communication message with the replaced VNI identifier to the target network terminal corresponding to the first destination IP address.

8. The system according to claim 1, characterized in that The external gateway is further configured to receive a second communication message sent by an external network IP address, and determine a second destination IP address corresponding to the second communication message; The external gateway is further used to send the second communication message to a third internal gateway corresponding to the second destination IP address; The third internal gateway is used to send the second communication message to the target network terminal corresponding to the second destination IP address.

9. A network communication method, characterized in that: Applied to a network terminal, the method comprises: Generate a first communication message, the first communication message carrying a VNI identifier of the VxLAN network corresponding to a first internal gateway, the first internal gateway being a gateway corresponding to a target subnet where the network terminal is located; When the first destination IP address of the first communication message is an external IP address, the first communication message is sent to the first internal gateway so that the first internal gateway replaces the VNI identifier with a VLAN identifier, and sends the first communication message after replacing the VLAN identifier to the external gateway. When the first destination IP address of the first communication message is an external network IP address, the external gateway sends the first communication message to the first destination IP address; or when the first destination IP address is an intranet IP address, the first communication message is sent to the second internal gateway corresponding to the first destination IP address, and the second internal gateway sends the first communication message to the target network terminal corresponding to the destination IP address.

10. A network communication device, characterized in that: Applied to a network terminal, the device comprises: A generation module, used to generate a first communication message, wherein the first communication message carries a VNI identifier of a VxLAN network corresponding to a first internal gateway, and the first internal gateway is a gateway corresponding to a target subnet where the network terminal is located; A sending module, used for sending the first communication message to the first internal gateway when the first destination IP address of the first communication message is an external IP address, so that the first internal gateway replaces the VNI identifier with a VLAN identifier, and sends the first communication message after replacing the VLAN identifier to the external gateway, and the external gateway sends the first communication message to the first destination IP address when the first destination IP address of the first communication message is an external network IP address; or when the first destination IP address is an intranet IP address, sending the first communication message to the second internal gateway corresponding to the first destination IP address, and the second internal gateway sends the first communication message to the target network terminal corresponding to the destination IP address.

Citation Information

Patent Citations

  • Message forwarding method, convergence gateway, access gateway and message forwarding system

    CN108924052A

  • Message transmission method, system and device and computer readable storage medium

    CN110557316A

  • Data transmission method, virtual network management apparatus, and data transmission system

    WO2017032300A1

  • Communication method and terminal

    WO2017166038A1

  • Communication method and apparatus based on plurality of networks, electronic device, and storage medium

    WO2021184551A1