Tunnel technology-based packet processing method and apparatus

By using tunnel technology to encapsulate and forward packets in the cloud management platform, the problem of business packet discarding or abnormality caused by network segment conflicts of NAT gateways in different network environments is solved, and network interoperability is improved.

WO2024188167A1PCT designated stage expired Publication Date: 2024-09-19HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD

Patent Information

Application Number
PCT/CN2024/080686
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-16
Filing Date
2024-03-08
Publication Date
2024-09-19

Smart Images

  • Figure CN2024080686_19092024_PF_FP_ABST
    Figure CN2024080686_19092024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in embodiments of the present application is a tunnel technology-based packet processing method, for use in improving the network interconnectivity when a network segment conflict occurs in different network environments. The method in the embodiments of the present application comprises: a cloud management platform acquires first tunnel information, wherein the first tunnel information comprises a first tunnel destination IP address, and the first tunnel destination IP address is an IP address of a gateway; the cloud management platform establishes a first tunnel between a first network and a gateway according to the first tunnel information, wherein a service packet generated by a first host in the running process is transmitted to the gateway by means of the first tunnel, and a destination IP address of the service packet is an IP address of a second host, the first host is deployed in the first network, the second host is deployed in a second network, and a network address conflict occurs between the first network and the second network; and the gateway forwards the service packet to the second host according to the first tunnel information and the IP address of the second host.
Need to check novelty before this filing date? Find Prior Art

Description

A message processing method and device based on tunnel technology

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on March 10, 2023, with application number 202310231707.2, and with the invention name “A gateway configuration method and cloud management platform based on tunnel technology”, and claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on November 16, 2023, with application number 202311531772.3, and with the invention name “A message processing method and device based on tunnel technology”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of computers, and in particular to a method and device for processing packets based on tunneling technology. Background Art

[0003] A network address translation (NAT) gateway is a network device or cloud service that implements network address translation. NAT gateways include public and private NAT gateways. Public NAT gateways translate private IP addresses within a virtual private cloud (VPC) into public IP addresses for internet communication. Private NAT gateways translate IP addresses within a VPC, translating private IP addresses and ports to other private IP addresses and ports.

[0004] When the current NAT gateway processes mutual access between two hosts in different network environments, if the network segments of the hosts in different network environments overlap, for example, because the network where the private VPC is located overlaps with the network where the public host is located, the service packets sent by the private VPC to the public host may be discarded or an exception may occur during the routing process, resulting in the service packets being unable to reach the NAT gateway and poor network interoperability between the two hosts in different network environments.

[0005] Summary of the Invention

[0006] Embodiments of the present application provide a message processing method based on tunneling technology. When a first network sends a service message to a second network in a different network environment from the first network through a NAT gateway, the first network performs tunnel encapsulation on the service message, allowing the service message to be routed to the NAT gateway corresponding to the second network, thereby improving network interoperability when network segments conflict between different network environments. Embodiments of the present application also provide a message processing device, computing device, computing device cluster, computer-readable storage medium, and computer program product corresponding to the message processing method based on tunneling technology.

[0007] In a first aspect, an embodiment of the present application provides a method for processing packets based on tunneling technology, which can be executed by a cloud management platform, or by a component of the cloud management platform, such as a processor, chip, or chip system of the cloud management platform, or by a logic module or software that can implement all or part of the functions of the cloud management platform. The method provided in the first aspect includes: the cloud management platform obtains first tunnel information, the first tunnel information includes a first tunnel destination IP address, and the first tunnel destination IP address is the IP address of the gateway. The cloud management platform is used to manage an infrastructure that provides cloud services, wherein a first network is deployed on the infrastructure, and the first network and a second network are connected through a gateway, wherein a first host is deployed in the first network and a second host is deployed in the second network, and there is a network address conflict between the first network and the second network; the cloud management platform establishes a first tunnel between the first network and the gateway according to the first tunnel information, and a service packet generated by the first host during operation is transmitted to the gateway via the first tunnel, and the destination IP address of the service packet is the IP address of the second host; the cloud management platform sends the first tunnel information to the gateway, and the gateway forwards the service packet to the second host according to the first tunnel information and the IP address of the second host.

[0008] In the embodiment of the present application, the cloud management platform can establish a first tunnel between the first network and the gateway, so that when there is a network segment conflict between the first network and the second network in different network environments, the business message can still be transmitted through the first tunnel to the gateway for network address conversion, thereby improving the network interoperability when there is a network segment conflict in different network environments.

[0009] In a possible implementation, the first tunnel information further includes a first tunnel identifier. The first tunnel identifier includes a tunnel destination IP address and / or a virtual network identifier (VNI).

[0010] In the embodiment of the present application, the cloud management platform can process the business messages transmitted between the first network and the second network based on the tunnel identifier, so that when there is a network segment conflict between the first network and the second network in different network environments, the business messages can also be routed to the gateway for network address conversion, thereby improving the network interoperability when there is a network segment conflict between different network environments.

[0011] In one possible implementation, the second network is a public network. In the process of the cloud management platform sending the business message to the second network according to the first tunnel identifier, the gateway of the cloud management platform converts the source IP address of the business message into a public IP address according to the gateway rules and the first tunnel identifier, and sends the business message to the second network based on the public IP address.

[0012] In the embodiment of the present application, the cloud management platform can process the business messages transmitted between the first network and the public network based on the tunnel identifier, so that when there is a network segment conflict between the first network and the public network, the business messages can also be routed to the gateway for network address conversion, thereby improving network interoperability when there is a network segment conflict in different network environments.

[0013] In one possible implementation, the second network is a private network. When the cloud management platform sends a service message to the second network according to the first tunnel identifier, the gateway of the cloud management platform converts the source IP address of the service message into the private IP address of the second network according to the gateway rules and the first tunnel identifier, and sends the service message to the second network based on the private IP address of the second network.

[0014] In the embodiment of the present application, the cloud management platform can process the business messages transmitted between the first network and the private network based on the tunnel identifier, so that when there is a network segment conflict between the first network and the private network, the business messages can also be routed to the gateway for network address conversion, thereby improving network interoperability when there is a network segment conflict in different network environments.

[0015] In one possible implementation, the first host is also used to generate a service message for accessing a third host. The third host is deployed in a third network. The third network is a private network. The first network and the third network are connected through a gateway. There is a network address conflict between the second network and the third network. The gateway sends the service message to the third network according to the second tunnel identifier in the second tunnel information. The second tunnel identifier includes the tunnel destination IP address and / or the virtual network identifier VNI. The second tunnel identifier is different from the first tunnel identifier.

[0016] In the embodiment of the present application, the cloud management platform can distinguish different private networks with conflicting network segments based on different tunnel identifiers, thereby improving network interoperability in different network environments.

[0017] In one possible implementation, when there is an IP address conflict between the second network and the third network, the gateway determines a first gateway interface based on the first tunnel identifier and sends service packets to the second network based on the first gateway interface. The gateway determines a second gateway interface based on the second tunnel identifier and sends service packets to the third network based on the second gateway interface, where the first gateway interface and the second gateway interface are different.

[0018] In the embodiment of the present application, the cloud management platform can configure the gateway to send business messages to different private networks with conflicting network segments based on different gateway interfaces, thereby improving network interoperability in different network environments.

[0019] In one possible implementation, the first network includes a virtual private cloud (VPC) network.

[0020] The embodiment of the present application provides a message processing method based on tunnel technology that can be applied to a virtual private cloud, thereby enhancing the richness of the solution.

[0021] In one possible implementation, the first host includes a virtual machine or a container.

[0022] The embodiment of the present application provides a message processing method based on tunnel technology that can be applied to different types of hosts, thereby improving the richness of the solution.

[0023] In one possible implementation, the cloud management platform creates a network address translation (NAT) gateway in the infrastructure. The NAT gateway is connected to the first network and is used to forward service packets between at least one host and a second network. The second network includes a public network and other private networks other than the first network, and the first and second networks are in different network environments. The cloud management platform determines a tunnel identifier between the first network and the NAT gateway. The tunnel identifier is used to distinguish the second network with a network segment conflict. The tunnel identifier includes a tunnel destination IP address or a virtual network identifier (VNI). The cloud management platform configures the gateway to process service packets based on the tunnel identifier.

[0024] In the embodiment of the present application, the cloud management platform can process the business messages transmitted between the first network and the second network based on the tunnel identifier, so that when there is a network segment conflict between the first network and the second network in different network environments, the business messages can also be routed to the NAT gateway for network address conversion, thereby improving network interoperability when there is a network segment conflict between different network environments.

[0025] In some possible implementations, the cloud management platform performs tunnel encapsulation on the business message based on the tunnel identifier during the process of processing the business message based on the tunnel identifier to obtain the tunnel-encapsulated business message, and the tunnel-encapsulated business message is used for transmission between the first network and the NAT gateway.

[0026] In the embodiment of the present application, the cloud management platform can perform tunnel encapsulation on the business messages transmitted by the first network and the NAT gateway based on the tunnel identifier, so that the tunnel-encapsulated business messages can be routed from the first network to the NAT gateway, thereby improving network interoperability when there are network segment conflicts in different network environments.

[0027] In some possible implementations, the service message is an outbound service message. When the first network sends the outbound service message to the second network through the NAT gateway, the first network performs tunnel encapsulation on the outbound service message based on the tunnel identifier to obtain the tunnel-encapsulated outbound service message.

[0028] In the embodiment of the present application, when the first network sends an outbound business message to the second network, the first network can perform tunnel encapsulation on the outbound business message based on the tunnel identifier, so that when there is a network segment conflict between the first network and the second network, the business message can be sent to the NAT gateway corresponding to the second network, thereby improving the network interoperability of the first network and the second network.

[0029] In some possible implementations, after the first network obtains the tunnel-encapsulated outbound service message, it sends the tunnel-encapsulated outbound service message to the NAT gateway. The NAT gateway de-tunnels the tunnel-encapsulated outbound service message to obtain the outbound service message. Based on a source address translation rule, the NAT gateway translates the source IP address of the outbound service message into a first IP address, where the first IP address is an IP address in the network environment where the second network resides. The NAT gateway then sends the outbound service message with the converted source address to the second network.

[0030] The NAT gateway provided in the embodiment of the present application can de-tunnel the outbound business message and convert the source IP address of the business message into an IP address in the network environment where the second network is located, thereby improving the network interoperability between the first network and the second network.

[0031] In some possible implementations, the service message is a return service message, and the NAT gateway receives the return service message sent by the second network. The NAT gateway converts the destination IP address of the return service message to a second IP address based on a destination address translation rule, where the second IP address is the IP address of the first network, thereby obtaining a return service message after address translation. The destination IP address of the return service message is the first IP address, and the second IP address is the source IP address of the outbound service message.

[0032] In the embodiment of the present application, when the second network sends a return service message to the first message, the NAT gateway can obtain the corresponding destination address conversion rule based on the source address conversion rule of the outbound service message. The NAT gateway converts the destination IP address of the return service message into the IP address of the first network, thereby improving the network interoperability between the first network and the second network.

[0033] In some possible implementations, when the first network receives a return service message sent by the second network through the NAT gateway, the NAT gateway performs tunnel encapsulation on the return service message after address conversion based on the tunnel identifier to obtain a tunnel-encapsulated return service message.

[0034] The NAT gateway provided in the embodiment of the present application can perform tunnel encapsulation on the return service message and send the tunnel-encapsulated service message to the first network, thereby improving the network interoperability between the first network and the second network.

[0035] In some possible implementations, the second network is a public network host, and there is a network segment conflict between the public network host and the first network. When the first network sends an outbound business message to the public network host through the NAT gateway, the first network performs tunnel encapsulation on the outbound business message based on the tunnel identifier to obtain the outbound business message after tunnel encapsulation. The first network sends the outbound business message after tunnel encapsulation to the NAT gateway. The NAT gateway de-tunnels the outbound business message after tunnel encapsulation to obtain the outbound business message. The NAT gateway converts the source IP address of the outbound business message to the first IP address based on the source address conversion rule, and the first IP address is the public network IP address. The NAT gateway sends the outbound business message after source address conversion to the public network host.

[0036] When the first network receives a return service message sent by a public network host through the NAT gateway, the NAT gateway converts the destination IP address of the return service message into the IP address of the first network based on the destination address translation rule, thereby obtaining a return service message after address translation. The NAT gateway performs tunnel encapsulation on the return service message after address translation based on the tunnel identifier, thereby obtaining a tunnel encapsulated return service message, and sends the return service message to the first network.

[0037] In an embodiment of the present application, when there is a network segment conflict between the network segment where the first network is located and the network segment where the public network host is located, the first network can tunnel encapsulate the business message based on the tunnel identifier and transmit it to the NAT gateway corresponding to the public network host, thereby avoiding transmission abnormalities of the business message caused by the network segment conflict and improving the network interoperability between the first network and the public network host.

[0038] In some possible implementations, the network address translation system further includes a third network, the first network, the second VPC, and the third network are in different network environments, the tunnel identifier includes a first tunnel destination IP address and a second tunnel destination IP address, the first tunnel destination IP address is used to identify the second network, and the second tunnel destination IP address is used to identify the third network, the first network sends a service message to the second network based on the first tunnel destination IP address, specifically, the first network performs tunnel encapsulation on the service message based on the first tunnel destination IP address, so that the tunnel-encapsulated service message can be routed to the NAT gateway corresponding to the second network based on the first tunnel destination IP address. The first network sends a service message to the third network based on the second tunnel destination IP address. The first network performs tunnel encapsulation on the service message based on the second tunnel destination IP address, so that the tunnel-encapsulated service message can be routed to the NAT gateway corresponding to the third network based on the second tunnel destination IP address.

[0039] In the embodiment of the present application, when the first network can send service packets to NAT gateways corresponding to different network pairs based on different tunnel destination IP addresses, the network interoperability between VPCs in different network environments is improved.

[0040] In some possible implementations, the network address translation system further includes a third network, an IP address conflict exists between the second network and the third network, the tunnel identifier includes a first VNI and a second VNI, the first VNI is used to identify the second network, the second VNI is used to identify the third network, and the first network sends a service message to the second network based on the first VNI. Specifically, the first network identifies the second network and the second network with the network segment conflict based on the first VNI identifier, and the first network sends the service message to the third network based on the second VNI.

[0041] In an embodiment of the present application, when the first network can identify a private network with a network segment conflict based on different VNI identifiers, and tunnel encapsulate the service message based on the VNI identifier, the NAT gateway can identify the destination VPC of the service message based on the VNI, thereby improving the accuracy of service message transmission.

[0042] In the second aspect, an embodiment of the present application provides a message processing device based on tunnel technology, which includes an acquisition unit and a processing unit. The acquisition unit is used to obtain first tunnel information, the first tunnel information includes a first tunnel destination IP address, and the first tunnel destination IP address is the IP address of the gateway. The cloud management platform is used to manage the infrastructure that provides cloud services. A first network is deployed on the infrastructure, and the first network and the second network are connected through a gateway. The first host is deployed in the first network, and the second host is deployed in the second network. There is a network address conflict between the first network and the second network. The processing unit is used to establish a first tunnel between the first network and the gateway according to the first tunnel information. The business message generated by the first host during operation is transmitted to the gateway via the first tunnel, and the destination IP address of the business message is the IP address of the second host. The processing unit is also used to forward the business message to the second host according to the first tunnel information and the second host IP address.

[0043] In a possible implementation, the first tunnel information further includes a first tunnel identifier, and the first tunnel identifier includes a tunnel destination IP address and / or a virtual network identifier VNI.

[0044] In one possible implementation, the second network is a public network, and the processing unit is further configured to convert a source IP address of the service message into a public IP address according to the first tunnel identifier, and send the service message to the second network based on the public IP address.

[0045] In one possible implementation, the second network is a private network, and the processing unit is further configured to convert the source IP address of the service message into the private IP address of the second network according to the first tunnel identifier, and send the service message to the second network based on the private IP address of the second network.

[0046] In one possible embodiment, the first host is also used to generate a business message to access a third host. The third host is deployed in a third network. The third network is a private network. The first network and the third network are connected through a gateway. There is a network address conflict between the second network and the third network. The processing unit is also used to establish a second tunnel between the first network and the gateway according to the second tunnel information, and send the business message to the third network according to the second tunnel identifier in the second tunnel information. The second tunnel identifier includes the tunnel destination IP address and / or the virtual network identifier VNI. The second tunnel identifier is different from the first tunnel identifier.

[0047] In one possible implementation, the processing unit is further configured to determine a first gateway interface based on the first tunnel identifier, and send the service packet to the second network based on the first gateway interface. Determine a second gateway interface based on the second tunnel identifier, and send the service packet to the third network based on the second gateway interface, wherein the first gateway interface and the second gateway interface are different.

[0048] In one possible implementation, the first network includes a virtual private cloud (VPC) network.

[0049] In one possible implementation, the first host includes a virtual machine or a container.

[0050] A third aspect of an embodiment of the present application provides a computing device, comprising a processor coupled to a memory, the processor being used to store instructions. When the instructions are executed by the processor, the computing device executes the method described in the first aspect or any possible implementation of the first aspect.

[0051] A fourth aspect of an embodiment of the present application provides a computing device cluster, which includes one or more computing devices. The computing device includes a processor, which is coupled to a memory. The processor is used to store instructions. When the instructions are executed by the processor, the computing device cluster executes the method described in the first aspect or any possible implementation method of the first aspect.

[0052] A fifth aspect of the embodiments of the present application provides a computer-readable storage medium having instructions stored thereon. When the instructions are executed, the computer executes the method described in the first aspect or any possible implementation of the first aspect.

[0053] A sixth aspect of the embodiments of the present application provides a computer program product, which includes instructions. When the instructions are executed, the computer implements the method described in the first aspect or any possible implementation method of the first aspect.

[0054] The seventh aspect of the embodiment of the present application provides a message processing method, which can be used for a cloud management platform. The method specifically includes the following steps: the cloud management platform obtains first tunnel information, the first tunnel information includes a first tunnel destination IP address, and the first tunnel destination IP address is the IP address of the gateway. The cloud management platform is used to manage the infrastructure that provides cloud services. A first network is deployed on the infrastructure, and the first network and the second network are connected through a gateway, wherein the first host is deployed in the first network and the second host is deployed in the second network. There is a network address conflict between the first network and the second network. The cloud management platform establishes a first tunnel between the first network and the gateway according to the first tunnel information. The business message generated by the first host during operation is transmitted to the gateway via the first tunnel. The destination IP address of the business message is the IP address of the second host. The cloud management platform configures the gateway to forward the business message to the second host according to the first tunnel destination IP address and the second host IP address.

[0055] It can be understood that the beneficial effects that can be achieved by any of the above-mentioned tunnel technology-based message processing devices, computing devices, computing device clusters, computer-readable media or computer program products can be referred to the beneficial effects in the corresponding methods and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] FIG1a is a schematic diagram of the system architecture of a network address translation system provided in an embodiment of the present application;

[0057] FIG1b is a schematic diagram of the system architecture of a network address translation system provided in an embodiment of the present application;

[0058] FIG2 is a flow chart of a method for processing packets based on tunneling technology according to an embodiment of the present application;

[0059] FIG3a is a schematic diagram of a configuration routing table provided in an embodiment of the present application;

[0060] FIG3b is a schematic diagram of message processing based on a tunnel identifier provided in an embodiment of the present application;

[0061] FIG4 is a schematic diagram of another embodiment of the present application for message processing based on a tunnel identifier;

[0062] FIG5 is a schematic diagram of another embodiment of the present application for message processing based on a tunnel identifier;

[0063] FIG6 is a schematic diagram of another embodiment of the present application for message processing based on a tunnel identifier;

[0064] FIG7 is a schematic structural diagram of a message processing device provided in an embodiment of the present application;

[0065] FIG8 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;

[0066] FIG9 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;

[0067] FIG10 is a schematic diagram of the structure of another computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The embodiments of the present application provide a message processing method and device based on tunnel technology, which are used to improve network interoperability when network segment conflicts occur in different network environments.

[0069] The terms "first," "second," "third," "fourth," and the like (if any) in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are 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, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0070] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0071] First, some terms involved in the embodiments of the present application are introduced to facilitate those skilled in the art to understand the technical solutions.

[0072] A virtual private cloud (VPC) is a virtual network environment created within a cloud management platform. Users can set up hosts within a VPC, including virtual machines and containers. VPC also provides flexible network configuration and isolation, enabling users to customize their network topology to meet application requirements.

[0073] Network address translation (NAT) is a technology used to convert IP addresses between different networks. NAT is often used to connect private and public networks, translating internal IP addresses in a private network into public IP addresses, or translating public IP addresses in a public network into private IP addresses.

[0074] Virtual routing and forwarding (VRF) creates multiple logically isolated routing instances on a single physical network device. Each VRF routing instance has its own routing table and forwarding rules, isolating network traffic between different VRF routing instances and allowing them to use the same IP address range.

[0075] In order to make the technical solution of the present application clearer and easier to understand, the system architecture of the present application is introduced below with reference to the accompanying drawings.

[0076] Please refer to Figure 1a, which is a schematic diagram of the system architecture of a network address translation system provided as an example in this application. In the example shown in Figure 1a, network address translation system 10 includes a first network 101, a NAT gateway 102, and a second network 103, wherein first network 101 is connected to second network 103 via NAT gateway 102. The functions of each component are described in detail below.

[0077] First network 101 is a virtual network environment deployed on a cloud service infrastructure. First network 101 includes at least one host, including a virtual machine (VM) and a container. At least one host in first network 101 can send service packets to second network 103 via NAT gateway 102, or receive service packets from second network 103 via NAT gateway 102.

[0078] The NAT gateway 102 is used to convert IP addresses of the first network to IP addresses of the second network. When both the first network and the second network are private networks, the NAT gateway 102 can be called a private network NAT gateway. When the first network is a private network and the second network is a public network, the NAT gateway 102 can be called a public network NAT gateway. The address translation functions provided by the NAT gateway 102 include source network address translation (SNAT) and destination network address translation (DNAT). The following describes each of these functions:

[0079] In source network address translation (SNAT), since SNAT rules are pre-configured in the NAT gateway 102 , the NAT gateway 102 converts the first network IP address into the second network IP address based on the SNAT rules, thereby enabling one or more hosts in the first network 101 to access the second network 103 using the second network IP address.

[0080] In the destination network address translation DNAT, the NAT gateway 102 may also translate the second network IP address into the first network IP address based on the pre-configured DNAT rules, thereby enabling the host in the second network 103 to access the first network 101 .

[0081] It should be noted that the first network 101 and NAT gateway 102 are deployed within the infrastructure that provides cloud services, which is managed by a cloud management platform. Infrastructure refers to the physical devices that comprise the cloud computing infrastructure, including servers, storage devices, and network equipment in cloud data centers. The cloud management platform manages this infrastructure to allocate, schedule, and monitor resources. The cloud management platform also provides a centralized interface through which users can control and monitor cloud resources. The second network 103 can be either a public or private network. A public network refers to a network connected to the public internet, consisting of various public hosts, such as web servers. Public hosts in a public network communicate using public IP addresses. When a host in the first network 101 needs to communicate with a public host in the public network, the host in the first network 101 sends a service message to the NAT gateway 102 corresponding to the public host. The NAT gateway 102 performs network address translation before transmitting the message to the public host in the public network.

[0082] When the second network 103 is a private network, the second network 103 may also be a virtual network environment deployed on a cloud service infrastructure. At least one host is provided in the second network 103, and the host includes a virtual machine VM and a container.

[0083] Please refer to Figure 1b, which is a schematic diagram of the system architecture of another network address translation system provided in an embodiment of the present application. In the example network address translation system shown in Figure 1b, the cloud service infrastructure is exemplified by a cloud computing data center, the first network is exemplified by a virtual private cloud (VPC1), and the second network can be either a virtual private cloud (VPC2) or a public network. Hosts in VPC1 can access VPC2 or the public network through a NAT gateway. Hosts in VPC1 include virtual machines VM1 and VM2, and hosts in VPC2 include virtual machines VM3 and VM4.

[0084] In the example shown in Figure 1b, VPC1, VPC2, and the public network are three different network environments. When hosts in VPC1 access VPC2 or the public network, a NAT gateway is required to perform network address translation. When hosts in VPC1 access the public network, the NAT gateway translates the private IP addresses in VPC1 to public IP addresses. When hosts in VPC1 access VPC2, the NAT gateway translates the private IP addresses in VPC1 to private IP addresses in VPC2.

[0085] It is understandable that VPC1 and VPC2 in the example shown in FIG1b may also be deployed as virtual private clouds in different cloud computing data centers, without specific limitation.

[0086] Based on the network address conversion system 10 shown in Figures 1a and 1b, the present application further provides a network address conversion method. The network address conversion method provided in the embodiment of the present application is introduced below in conjunction with an embodiment.

[0087] Please refer to Figure 2, which is a flow chart of a method for converting a network address provided in an embodiment of the present application. In the example shown in Figure 2, the method includes the following steps:

[0088] 201. The cloud management platform obtains the first tunnel information.

[0089] The cloud management platform obtains first tunnel information, including a first tunnel destination IP address, which is the IP address of the NAT gateway. The cloud management platform is capable of managing infrastructure that provides cloud services. A first network is deployed on the infrastructure, and the first network and a second network are connected via a gateway. A first host is deployed in the first network, and a second host is deployed in the second network. There is a network address conflict between the first network and the second network.

[0090] In the embodiments of the present application, since a network conflict may exist between the first network and the second network, a network conflict may also exist between multiple different second networks. The network conflict between the first network and the second network includes a network segment conflict between the first network and the second network, or a network address conflict between a host on the first network and a host on the second network.

[0091] For example, when the first network is the first VPC and the second network is the public network, the IP address of the first host in the first VPC is "11.1.0.3", and the IP address of the public host in the public network is "11.1.0.101". The first VPC and the public host are in different network environments, but the first host in the first VPC and the public host both belong to the "11.1.0.x / 24" network segment, that is, there is a network segment conflict between the network environment where the first VPC is located and the network environment where the public host is located.

[0092] For another example, when the second network is two different second VPCs and third VPCs, the network environments where the second VPC and the third VPC are located are different network environments. The IP address of the second host in the second VPC is "11.1.0.101", and the IP address of the third host in the third VPC is also "11.1.0.101". There is an IP address conflict between the IP address of the second VPC and the IP address of the third VPC.

[0093] 202. The cloud management platform establishes a first tunnel between the first network and the gateway according to the first tunnel information. During operation, the first host generates a service message for accessing the second host and transmits it to the gateway via the first tunnel.

[0094] When there is a network segment conflict between the first network and the second network, in order to enable the service message sent by the first host in the first network to the second network to be routed to the NAT gateway. The cloud management platform establishes a first tunnel between the first network and the NAT gateway based on the first tunnel information. The service message generated by the first host during operation to access the second host is transmitted to the gateway via the first tunnel. The first host in the first network sends the service message to the NAT gateway through the first tunnel. The details are as follows:

[0095] After the cloud management platform obtains the first tunnel information, it establishes a first tunnel between the first network and the gateway based on the first tunnel information. During operation, the first host generates service messages for accessing the second host and transmits them to the gateway via the first tunnel. Specifically, the first host in the first network encapsulates the service messages based on the first tunnel information to obtain encapsulated service messages, and then sends the encapsulated service messages to the NAT gateway. The first tunnel information is also used to instruct the service messages to be encapsulated into encapsulated service messages, which are then sent to the gateway via the first tunnel, wherein the first tunnel is connected to the NAT gateway. The first tunnel information includes one or more of the following: source and destination addresses, port numbers, protocol types, routing information, and tunnel identifiers.

[0096] In one possible implementation, before a first host in a first network sends a service message to a NAT gateway via a first tunnel, the cloud management platform creates a network address translation (NAT) gateway in the infrastructure. The NAT gateway is used to forward service messages between the first network and a second network, wherein the first network and the second network are different network environments, and the second network includes a public network and a private network. The NAT gateway includes a public network NAT gateway and a private network NAT gateway. When the second network is a public network host, the NAT gateway is a public network NAT gateway. When the second network is a private network, the NAT gateway is a private network NAT gateway.

[0097] In one possible implementation, the cloud management platform obtains gateway rules. The gateway rules include source network address translation (SNAT) rules and destination network address translation (DNAT) rules, wherein the source network address translation (SNAT) rule refers to converting the source address of the outbound service message into the address of the network where the second host is located, and the destination network address translation (DNAT) rule refers to converting the destination address of the return service message into the address of the network where the first host is located. The gateway rules are also used to instruct the NAT gateway to obtain the first tunnel identifier in the service message, where the first tunnel identifier includes the tunnel destination IP address and / or the virtual network identifier (VNI).

[0098] In one possible implementation, the cloud management platform sends a gateway rule to the NAT gateway, so that the NAT gateway forwards the service message according to the gateway rule. Specifically, the NAT gateway obtains a first tunnel identifier in the service message based on the gateway rule. The service message is an encapsulated service message encapsulated with the first tunnel identifier. The NAT gateway determines that the destination host of the service message is the second host based on the first tunnel identifier.

[0099] In one possible implementation, the cloud management platform sends the gateway rules to the NAT gateway and configures the NAT gateway according to the gateway rules. Specifically, when the first network needs to access the second network, the cloud management platform needs to configure the source address conversion SNAT rules of the NAT gateway. In the process of configuring the SNAT rules, the cloud management platform needs to specify the source IP address range for source address conversion, as well as the converted IP address. When the first network acts as a server to provide services to the second network, the cloud management platform needs to configure the destination address conversion DNAT rules of the NAT gateway. In the process of configuring the DNAT rules, the cloud management platform needs to specify the destination IP address and port for destination address conversion, as well as the IP address and port of the first network after conversion.

[0100] Please refer to Table 1, which is a schematic diagram of a source address translation (SNAT) rule provided in an embodiment of the present application. In the SNAT rule shown in Table 1, the NAT gateway converts a private IP address to a public IP address. The private IP address "11.1.0.3" corresponds to the public address "124.1.0.100" after translation. The NAT gateway's pre-translation port "10000" corresponds to the post-translation port "5001."

[0101] Table 1

[0102] Please refer to Table 2, which is a schematic diagram of a destination address translation DNAT rule provided in an embodiment of the present application. In the DNAT rule shown in Table 2, the NAT gateway translates a public IP address into a private IP address. The public IP address "124.1.0.101" corresponds to the private address "11.1.0.3" after translation. The NAT gateway's pre-translation port "443" corresponds to the post-translation port "5000."

[0103] Table 2

[0104] In one possible implementation, the NAT gateway can learn the source address conversion session of the outbound service message during the processing of the outbound service message from the first network to the second network, so that the return service message can be matched with the private IP address of the first network, thereby forwarding the return service message to the first network.

[0105] In one possible implementation, during the process of configuring the NAT gateway, the cloud management platform also needs to configure a tunnel identifier between the first network and the NAT gateway. The tunnel identifier is used to distinguish the second network with a network segment conflict. The tunnel identifier includes the tunnel destination IP address or the virtual network identifier VNI. The service message received by the NAT gateway is the encapsulated service message of the first host. The encapsulated service message includes the first tunnel identifier, which includes the tunnel destination IP address and / or the virtual network identifier VNI. For example, the tunnel destination IP address is "11.1.0.2" and the virtual network identifier is "1000".

[0106] The tunnel identifier is also used to determine the transmission tunnel for the service message between the first network and the NAT gateway. The transmission tunnel between the first network and the NAT gateway includes a virtual extensible LAN (VXLAN) tunnel. The configured NAT gateway can tunnel encapsulate or de-tunnel the service message based on the tunnel identifier.

[0107] 203. The gateway forwards the service message to the second host according to the first tunnel information and the second host IP address.

[0108] The first host in the first network and the NAT gateway process the service message based on the tunnel identifier. Specifically, the first host in the first network performs tunnel encapsulation on the service message based on the tunnel identifier to obtain a tunnel-encapsulated service message, i.e., an encapsulated service message. The encapsulated service message is then transmitted between the first network and the NAT gateway. The NAT gateway decapsulates the encapsulated service message and performs network address translation based on an address translation rule.

[0109] The NAT gateway sends the service message to the second network based on the first tunnel identifier. Specifically, after receiving the tunnel-encapsulated service message, the NAT gateway can determine that the tunnel-encapsulated service message comes from the first network based on the first tunnel identifier, which is the tunnel destination IP address. After the NAT gateway decapsulates the encapsulated service message sent by the first host in the first network through the first tunnel, it obtains a service message whose destination IP address is the IP address of the second host in the second network. The NAT gateway performs network address translation on the service message based on the address translation rule and sends the service message after address translation to the second network.

[0110] The following describes how the NAT gateway processes service packets based on tunnel identifiers, combining the transmission processes of outbound and return service packets.

[0111] When the first network sends an outbound service message to the second network through the NAT gateway, the first network performs tunnel encapsulation on the outbound service message based on the tunnel identifier to obtain the tunnel-encapsulated outbound service message. The first network sends the tunnel-encapsulated outbound service message to the NAT gateway. The NAT gateway de-tunnels the tunnel-encapsulated outbound service message to obtain the outbound service message. The NAT gateway converts the source IP address of the outbound service message to the first IP address based on the source address translation rule. The first IP address is the IP address in the second network. The NAT gateway sends the outbound service message with the source address translated to the second network.

[0112] It should be noted that before the first network sends an outbound service message to the second network, it is necessary to configure a routing table and create a tunnel between the first network and the NAT gateway. The tunnel between the first network and the NAT gateway can be a General Routing Encapsulation (GRE) tunnel or a VXLAN tunnel, which is not specifically limited. In the embodiments of this application, a VXLAN tunnel is used as an example for explanation.

[0113] Please refer to Figure 3a, which is a schematic diagram of configuring a routing table according to an embodiment of the application. In the example shown in Figure 3a, the first network is a first VPC, and the second network is a public network. Before the first VPC sends service packets to the public network host, the cloud management platform creates a custom routing table in the first VPC and adds a routing rule from the first VPC to the NAT gateway. Based on this custom routing table, the first VPC can send outbound service packets to the NAT gateway.

[0114] It should be noted that before the cloud management platform creates a custom routing table in the first VPC, the user needs to configure the custom routing table on the cloud management platform. The user also needs to configure the binding relationship between the socket of the first host in the first VPC and the tunnel port.

[0115] In the example shown in Figure 3a, the first VPC also includes a default routing table. The default routing table is a routing table that is automatically generated when the VPC is created. The default routing table provides initial routing rules for hosts within the VPC, enabling basic network communication between subnets and access to the Internet.

[0116] Please refer to Figure 3b, which is a schematic diagram of a message processing method based on tunnel technology provided in an embodiment of the application. In the example shown in Figure 3b, the first network takes the first VPC as an example, and the second network takes the public network as an example. Business messages need to be transmitted between the first VPC and the public network host, wherein the IP address of the first VPC is "11.1.0.3" and the IP address of the public network host is "11.1.0.101". Since the IP addresses of the first VPC and the public network host in different network environments are both in the "11.1.0.x / 24" network segment, there is a network segment conflict. Therefore, the business message sent by the first VPC cannot be routed to the NAT gateway corresponding to the public network host. The first VPC needs to perform tunnel encapsulation on the business message based on the tunnel identifier and send the business message to the NAT gateway.

[0117] In the example shown in FIG3b , when the first VPC sends an outbound service message to a public network host with a network segment conflict, the message format of the original outbound service message is as shown in Table 3:

[0118] Table 3

[0119] In the example shown in FIG3b , when the first VPC sends an outbound service message to a public network host with a network segment conflict, the original outbound service message needs to be tunnel-encapsulated based on the tunnel identifier. The message format of the outbound service message after tunnel encapsulation is shown in Table 4.

[0120] Table 4

[0121] It can be seen from the outbound business message after tunnel encapsulation shown in Table 4 that the tunnel source IP address of the outbound business message after tunnel encapsulation is "11.1.0.3", which is the IP address of the first VPC, and the tunnel destination IP address of the outbound business message after tunnel encapsulation is "11.1.0.2", which is the IP address of the NAT gateway. The first VPC can perform tunnel encapsulation on the outbound business message based on the tunnel destination IP address, so that the tunnel encapsulated business message can be routed to the NAT gateway corresponding to the public network host.

[0122] In the example shown in Figure 3b, after the NAT gateway receives the outbound business message after tunnel encapsulation, it de-tunnels the outbound business message after tunnel encapsulation, and performs address conversion on the de-tunneled outbound business message. Based on the pre-configured SNAT rules, the source IP address of the business message is converted to a public IP address, that is, the source IP address "11.1.0.3" of the outbound business message is converted to the public IP address "11.1.0.101", and the port "10000" of the outbound business message is converted to port "5001". The NAT gateway sends the outbound business message after address conversion to the public network host. The message format of the outbound business message after the NAT gateway de-tunnels and performs address conversion is shown in Table 5:

[0123] Table 5

[0124] When the second network sends a return service message to the first network through the NAT gateway, the NAT gateway receives the return service message sent by the second network. The NAT gateway converts the session based on the source address of the outbound service message, learns the destination address matching relationship of the return service message, and converts the destination IP address of the return service message to the IP address of the first VPC based on the destination address matching relationship, thereby obtaining the return service message after address conversion. The NAT gateway tunnel encapsulates the return service message after address conversion based on the tunnel identifier, thereby obtaining the tunnel encapsulated return service message. The NAT gateway sends the tunnel encapsulated service message to the first network.

[0125] Please continue to refer to Figure 3b. In the example shown in Figure 3b, the first network takes the first VPC as an example, and the second network takes the public network as an example. The public network host sends a return service message to the first VPC. The message format of the return service message is shown in Table 6, where the source IP address "11.1.0.101" of the return service message is the IP address of the public network host, and the destination IP address "124.1.0.100" of the return service message is the public network IP address corresponding to the first VPC.

[0126] Table 6

[0127] In the example shown in Figure 3b, after receiving the return service message sent by the public network host, the NAT gateway converts the public network IP address "124.1.0.100" to the private network IP address "11.1.0.3" of the first VPC based on the DNAT rule, and converts the port number "5001" corresponding to the public network IP address "124.1.0.100" to the port number "10000". The NAT gateway tunnel encapsulates the return service message after the destination address conversion. The message format of the tunnel encapsulated return service message is shown in Table 7:

[0128] Table 7

[0129] In the example shown in Figure 3b, after the first VPC receives the tunnel-encapsulated return traffic message sent by the NAT gateway, it detunnels the tunnel-encapsulated return traffic message to obtain the return traffic message, thus completing the two-way communication between the first VPC and the public network host. The message format of the detunneled return traffic message is shown in Table 8:

[0130] Table 8

[0131] The embodiment shown in Figure 3b introduces the process of the cloud management platform processing business packets transmitted between the first VPC and the public network host based on the tunnel identifier when there is a network segment conflict between the first VPC and the public network host. The following describes the message processing process of business packets transmitted between the first network and other private networks in conjunction with the accompanying drawings.

[0132] Please refer to Figure 4, which is a schematic diagram of another packet processing method based on tunneling technology provided in an embodiment of the present application. In the example shown in Figure 4, the first network is the first VPC, and the second and third networks are the second and third VPCs, respectively. The first VPC, the second VPC, and the third VPC are in different network environments. The IP address of the second VPC and the IP address of the third VPC are the same, for example, the IP addresses of the second VPC and the third VPC are "11.1.0.101".

[0133] In the example shown in Figure 4, when service packets are transmitted between the first VPC and the second or third VPC, because the second and third VPCs have the same IP address, the first VPC distinguishes the different VPCs based on different tunnel identifiers. For example, the tunnel identifier includes a first tunnel destination address ("11.1.0.4") and a second tunnel destination address ("11.1.0.5"). The first tunnel destination address identifies the second VPC, and the second tunnel destination address identifies the third VPC.

[0134] In one possible implementation, when there is an IP address conflict between the second network and the third network, the gateway determines a first gateway interface based on the first tunnel identifier and sends service packets to the second network based on the first gateway interface. The gateway determines a second gateway interface based on the second tunnel identifier and sends service packets to the third network based on the second gateway interface, where the first gateway interface and the second gateway interface are different.

[0135] In the example shown in Figure 4, when business messages are transmitted between the first VPC and the second VPC or the third VPC, since the IP addresses of the second VPC and the third VPC are the same, the first VPC distinguishes different VPCs based on different tunnel identifiers. At the same time, different tunnel identifiers correspond to different gateway interfaces. The NAT gateway sends business messages to the second VPC and the third VPC respectively based on different gateway interfaces.

[0136] In the example shown in Figure 4, the first VPC determines the tunnel identifier based on the target VPC to be sent, and tunnel encapsulates the service message based on the tunnel identifier. The NAT gateway can forward the service message whose tunnel destination address is the first tunnel destination IP address to the second VPC, and forward the service message whose tunnel destination address is the second tunnel destination address to the third VPC.

[0137] For example, when the first VPC sends a service message to the second VPC, the first VPC performs tunnel encapsulation on the service message based on the first tunnel destination address "11.1.0.4", obtains the tunnel-encapsulated service message, and sends the tunnel-encapsulated service message to the NAT gateway corresponding to the first tunnel destination address "11.1.0.4". The format of the tunnel-encapsulated message is shown in Table 9:

[0138] Table 9

[0139] In the example shown in Figure 4, the NAT gateway de-tunnels the tunnel-encapsulated service message and converts the source IP address of the service message to the private IP address "11.1.0.102" in the private network environment where the second VPC is located based on the SNAT rule. The NAT gateway sends the service message after address conversion to the second VPC.

[0140] In the embodiment of the present application, the cloud management platform can identify other VPCs with address conflicts by using the tunnel destination IP address, and can also identify other VPCs with address conflicts by using the virtual network identifier VNI. The following is an introduction with reference to the accompanying drawings:

[0141] Please refer to Figure 5, which is a schematic diagram of another packet processing method based on tunneling technology provided in an embodiment of the present application. In the example shown in Figure 5, the first network is the first VPC, and the second and third networks are the fourth and fifth VPCs, respectively. The first, fourth, and fifth VPCs are in different network environments, and the IP address of the fourth VPC is the same as the IP address of the fifth VPC. For example, the IP addresses of the fourth and fifth VPCs are both "11.1.0.101."

[0142] In the example shown in Figure 5, when service packets are transmitted between the first VPC and the fourth or fifth VPC, because the fourth and fifth VPCs have the same IP address, the first VPC distinguishes the different VPCs based on different tunnel identifiers. For example, the tunnel identifier includes a first VNI ("1000") and a second VNI ("1001"), where the first VNI is "1000" and the second VNI is "1001." The first VNI identifies the fourth VPC, and the second VNI identifies the fifth VPC.

[0143] In the example shown in Figure 5, the first VPC determines the tunnel identifier based on the target VPC to be sent, and performs tunnel encapsulation on the business message based on the tunnel identifier. The NAT gateway can forward the business message to the fourth VPC based on the first VNI in the business message after tunnel encapsulation, and forward the business message to the fifth VPC based on the first VNI in the business message after tunnel encapsulation.

[0144] For example, when the first VPC sends a service message to the fourth VPC, the first VPC performs tunnel encapsulation on the service message based on the first VNI "1000", obtains the tunnel-encapsulated service message, and sends the tunnel-encapsulated service message to the NAT gateway. The message format of the tunnel-encapsulated service message is shown in Table 10:

[0145] Table 10

[0146] In the example shown in Figure 5, the NAT gateway de-tunnels the business message after tunnel encapsulation, and converts the source IP address of the business message to the private IP address "11.1.0.102" in the private network environment where the fourth VPC is located based on the SNAT rule. The NAT gateway sends the business message after address conversion to the fourth VPC.

[0147] In one possible implementation, the host in the first network includes a container, and the container uses a namespace to achieve network isolation. When the container starts, the container creates an independent network namespace for it as the container's network environment. Each network namespace has its own network interface, IP address, routing table, etc. Multiple containers in the first network have different network environments. When the container in the first network sends a service message to the second network, the container in the first network uses the host network card as the tunnel starting point to tunnel encapsulate the service message and send the encapsulated service message to the NAT gateway.

[0148] Please refer to Figure 6, which shows a message processing method based on tunnel technology provided in an embodiment of the present application. In the embodiment shown in Figure 6, the first network takes the first VPC as an example. The first VPC includes one or more containers, each of which has its own namespace. Different containers are isolated from each other through different namespaces. The container in the first VPC can tunnel encapsulate the service message based on the tunnel identifier, thereby transmitting the service message to the NAT gateway corresponding to the second network with the network segment conflict based on the tunnel.

[0149] For example, in the example shown in Figure 6, when a container in the first VPC sends a service packet to the second network, the container in the first VPC uses the host network card as the tunnel starting point to tunnel encapsulate the service packet and send the encapsulated service packet to the NAT gateway corresponding to the second network. The container in the first VPC can identify the second network based on the tunnel destination IP address or by using the VNI, without limitation.

[0150] It can be seen from the above embodiments that the cloud management platform in the embodiments of the present application can process the business messages transmitted between the first network and the second network based on the tunnel identifier, so that when there is a network segment conflict between the first network and the second network in different network environments, the business messages can also be routed to the NAT gateway for network address conversion, thereby improving the network interoperability when there is a network segment conflict in different network environments.

[0151] The above introduces the message processing method based on tunnel technology provided by the embodiment of the present application. The following specifically introduces the message processing device provided by the embodiment of the present application.

[0152] Please refer to Figure 7, which is a schematic diagram of the structure of a message processing device provided in an embodiment of the present application. In the example shown in Figure 7, the message processing device is used to implement the various steps performed by the cloud management platform in the above embodiments. The message processing device 700 includes an acquisition unit 701 and a processing unit 702.

[0153] Among them, the acquisition unit 701 is used to obtain the first tunnel information, the first tunnel information includes the first tunnel destination IP address, the first tunnel destination IP address is the IP address of the gateway, the cloud management platform is used to manage the infrastructure that provides cloud services, a first network is deployed on the infrastructure, the first network and the second network are connected through a gateway, wherein the first host is deployed in the first network, the second host is deployed in the second network, and there is a network address conflict between the first network and the second network. The processing unit 702 is used to establish a first tunnel between the first network and the gateway according to the first tunnel information, and the business message generated by the first host during operation is transmitted to the gateway via the first tunnel, and the destination IP address of the business message is the IP address of the second host. The processing unit 702 is also used to forward the business message to the second host according to the first tunnel information and the second host IP address.

[0154] In a possible implementation, the first tunnel information further includes a first tunnel identifier, and the first tunnel identifier includes a tunnel destination IP address and / or a virtual network identifier VNI.

[0155] In one possible implementation, the second network is a public network, and the processing unit 702 is further configured to convert the source IP address of the service message into a public IP address according to the first tunnel identifier, and send the service message to the second network based on the public IP address.

[0156] In one possible implementation, the second network is a private network, and the processing unit 702 is further configured to convert the source IP address of the service message into the private IP address of the second network according to the first tunnel identifier, and send the service message to the second network based on the private IP address of the second network.

[0157] In one possible implementation, the first host is also used to generate a service message for accessing a third host. The third host is deployed in a third network. The third network is a private network. The first network and the third network are connected through a gateway. There is a network address conflict between the second network and the third network. The processing unit 702 is also used to send the service message to the third network according to the second tunnel identifier. The second tunnel identifier includes the tunnel destination IP address and / or the virtual network identifier VNI. The second tunnel identifier is different from the first tunnel identifier.

[0158] In one possible implementation, processing unit 702 is further configured to determine a first gateway interface based on the first tunnel identifier, and send the service packet to the second network based on the first gateway interface. Determine a second gateway interface based on the second tunnel identifier, and send the service packet to the third network based on the second gateway interface, where the first gateway interface and the second gateway interface are different.

[0159] In one possible implementation, the first network includes a virtual private cloud (VPC) network.

[0160] In one possible implementation, the first host includes a virtual machine or a container.

[0161] It should be understood that the division of units in the above device is merely a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. Moreover, the units in the device can all be implemented in the form of software called through processing elements; or they can all be implemented in the form of hardware; or some units can be implemented in the form of software called through processing elements, and some units can be implemented in the form of hardware. For example, each unit can be a separately established processing element, or it can be integrated into a certain chip of the device. In addition, it can also be stored in the memory in the form of a program, called by a certain processing element of the device and perform the function of the unit. In addition, all or part of these units can be integrated together, or they can be implemented independently. The processing element described here can also be a processor, which can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each unit above can be implemented by the integrated logic circuit of the hardware in the processor element or in the form of software called through the processing element.

[0162] It is worth noting that, for the sake of simplicity, the above method embodiments are expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited to the order of the actions described. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required for the present invention.

[0163] Other reasonable step combinations that can be thought of by those skilled in the art based on the above description also fall within the scope of protection of the present invention. Secondly, those skilled in the art should also be familiar with that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the present invention.

[0164] Please refer to Figure 8, which is a schematic diagram of the structure of a computing device provided in an embodiment of the present application. As shown in Figure 8, the computing device 800 includes: a processor 801, a memory 802, a communication interface 803, and a bus 804. The processor 801, the memory 802, and the communication interface 803 are coupled via a bus (not labeled in the figure). The memory 802 stores instructions. When the execution instructions in the memory 802 are executed, the computing device 800 performs the method performed by the computing device in the above method embodiment.

[0165] The computing device 800 may be one or more integrated circuits configured to implement the above method, such as one or more application specific integrated circuits (ASICs), one or more digital signal processors (DSPs), one or more field programmable gate arrays (FPGAs), or a combination of at least two of these integrated circuit forms. For example, when a unit in the device can be implemented in the form of a processing element scheduler, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call a program. For example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0166] The processor 801 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0167] Memory 802 may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. Nonvolatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0168] The memory 802 stores executable program code, and the processor 801 executes the executable program code to implement the functions of the aforementioned acquisition unit and processing unit, thereby implementing the above-mentioned message processing method based on tunneling technology. In other words, the memory 802 stores instructions for executing the above-mentioned message processing method based on tunneling technology.

[0169] The communication interface 803 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 800 and other devices or a communication network.

[0170] In addition to the data bus, bus 804 may also include a power bus, a control bus, and a status signal bus. The bus may be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a unified bus (Ubus or UB), a Compute Express Link (CXL), or a Cache Coherent Interconnect for Accelerators (CCIX). Buses can be categorized as address buses, data buses, and control buses.

[0171] Please refer to FIG9 , which is a schematic diagram of a computing device cluster provided in an embodiment of the present application. As shown in FIG9 , the computing device cluster 900 includes at least one computing device 800 .

[0172] As shown in Figure 9, the computing device cluster 900 includes at least one computing device 800. The memory 802 in one or more computing devices 800 in the computing device cluster 900 may store the same instructions for executing the above-mentioned packet processing method based on tunneling technology.

[0173] In some possible implementations, the memory 802 of one or more computing devices 800 in the computing device cluster 900 may also store partial instructions for executing the above-described tunneling-based packet processing method. In other words, the combination of one or more computing devices 800 may jointly execute the instructions for executing the above-described tunneling-based packet processing method.

[0174] It should be noted that the memory 802 in different computing devices 800 in the computing device cluster 900 can store different instructions, each for executing part of the functions of the above-mentioned message processing apparatus. In other words, the instructions stored in the memory 802 in different computing devices 800 can implement the functions of one or more modules in the processing unit and the acquisition unit.

[0175] In some possible implementations, one or more computing devices 800 in the computing device cluster 900 may be connected via a network, which may be a wide area network or a local area network.

[0176] Please refer to Figure 10, which is a schematic diagram of computer devices in a computer cluster provided by an embodiment of the present application connected via a network. As shown in Figure 10, two computing devices 800A and 800B are connected via a network. Specifically, the connection to the network is through a communication interface in each computing device.

[0177] In one possible implementation, the memory of the computing device 800A stores instructions for executing the functions of the acquisition unit, and the memory of the computing device 800B stores instructions for executing the functions of the processing unit.

[0178] It should be understood that the functions of the computing device 800A shown in Figure 10 may also be completed by multiple computing devices. Similarly, the functions of the computing device 800B may also be completed by multiple computing devices.

[0179] In another embodiment of the present application, a computer-readable storage medium is provided, in which computer-executable instructions are stored. When the processor of the device executes the computer-executable instructions, the device executes the method executed by the cloud management platform in the above method embodiment.

[0180] In another embodiment of the present application, a computer program product is provided, comprising computer-executable instructions stored in a computer-readable storage medium. When a processor of a device executes the computer-executable instructions, the device executes the method executed by the cloud management platform in the above method embodiment.

[0181] Those skilled in the art will 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.

[0182] In the several embodiments provided in this 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 merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as 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.

[0183] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0184] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0185] If the integrated unit is implemented in the form of a software functional 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 is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

Claims

1. A message processing method based on tunnel technology, characterized in that: The method comprises: The cloud management platform obtains first tunnel information, where the first tunnel information includes a first tunnel destination IP address, where the first tunnel destination IP address is the IP address of the gateway, where the cloud management platform is used to manage an infrastructure that provides cloud services, where a first network is deployed on the infrastructure, where the first network and the second network are connected through a gateway, where a first host is deployed in the first network, where a second host is deployed in the second network, and where a network address conflict exists between the first network and the second network; The cloud management platform establishes a first tunnel between the first network and the gateway according to the first tunnel information, and the service message generated by the first host during operation is transmitted to the gateway via the first tunnel, and the destination IP address of the service message is the IP address of the second host; The gateway forwards the service message to the second host according to the first tunnel information and the second host IP address.

2. The method according to claim 1, characterized in that The first tunnel information also includes a first tunnel identifier, which includes a tunnel destination IP address and / or a virtual network identifier VNI.

3. The method according to claim 2, characterized in that The second network is a public network, and the method further includes: The gateway converts the source IP address of the service message into a public network IP address according to the first tunnel identifier; The gateway sends the service message to the second network based on the public IP address.

4. The method according to claim 2, characterized in that: The second network is a private network, and the method further includes: The gateway converts the source IP address of the service message into a private IP address of the second network according to the first tunnel identifier; The gateway sends the service message to the second network based on the private IP address of the second network.

5. The method according to claim 4, characterized in that The first host is further used to generate a service message for accessing a third host, the third host is deployed in a third network, the third network is a private network, the first network and the third network are connected through a gateway, and there is a network address conflict between the second network and the third network, and the method further includes: The cloud management platform establishes a second tunnel between the first network and the gateway according to the second tunnel information; The gateway sends the service message to the third network according to the second tunnel information, the second tunnel information includes a second tunnel identifier, the second tunnel identifier includes a tunnel destination IP address and / or a virtual network identifier VNI, and the second tunnel identifier is different from the first tunnel identifier.

6. The method according to claim 5, characterized in that The method further comprises: The gateway determines the first gateway interface according to the first tunnel identifier, and sends the service message to the second network based on the first gateway interface; The gateway determines a second gateway interface according to the second tunnel identifier, and sends the service message to the third network based on the second gateway interface, and the first gateway interface is different from the second gateway interface.

7. The method according to any one of claims 1 to 6, characterized in that The first network includes a virtual private cloud (VPC) network.

8. The method according to any one of claims 1 to 7, characterized in that The first host includes a virtual machine or a container.

9. A message processing device based on tunnel technology, characterized in that: The device comprises: an acquiring unit, configured to acquire first tunnel information, wherein the first tunnel information includes a first tunnel destination IP address, wherein the first tunnel destination IP address is an IP address of the gateway, wherein the cloud management platform is configured to manage an infrastructure for providing cloud services, wherein a first network is deployed on the infrastructure, wherein the first network and the second network are connected via a gateway, wherein a first host is deployed in the first network, and a second host is deployed in the second network, and there is a network address conflict between the first network and the second network; a processing unit, configured to establish a first tunnel between the first network and the gateway according to the first tunnel information, wherein a service message generated by the first host during operation is transmitted to the gateway via the first tunnel, and a destination IP address of the service message is an IP address of the second host; The processing unit is further used to forward the service message to the second host according to the first tunnel information and the second host IP address.

10. The device according to claim 9, characterized in that The first tunnel information also includes a first tunnel identifier, which includes a tunnel destination IP address and / or a virtual network identifier VNI.

11. The device according to claim 10, characterized in that The second network is a public network, and the processing unit is further used for: Converting the source IP address of the service message into a public IP address according to the first tunnel identifier; The service message is sent to the second network based on the public IP address.

12. The device according to claim 10, characterized in that The second network is a private network, and the processing unit is further used for: Converting the source IP address of the service message into a private IP address of the second network according to the first tunnel identifier; The service message is sent to the second network based on the private IP address of the second network.

13. The device according to claim 12, characterized in that The first host is further used to generate a service message for accessing a third host, the third host is deployed in a third network, the third network is a private network, the first network and the third network are connected through a gateway, and there is a network address conflict between the second network and the third network, and the processing unit is further used to: establishing a second tunnel between the first network and the gateway according to the second tunnel information; The service message is sent to the third network according to the second tunnel information, the second tunnel information includes a second tunnel identifier, the second tunnel identifier includes a tunnel destination IP address and / or a virtual network identifier VNI, and the second tunnel identifier is different from the first tunnel identifier.

14. The device according to claim 13, characterized in that The processing unit is also used for: Determine a first gateway interface according to the first tunnel identifier, and send the service message to the second network based on the first gateway interface; A second gateway interface is determined according to the second tunnel identifier, and the service message is sent to the third network based on the second gateway interface, wherein the first gateway interface is different from the second gateway interface.

15. The device according to any one of claims 9 to 14, characterized in that The first network includes a virtual private cloud (VPC) network.

16. The device according to any one of claims 9 to 15, characterized in that The first host includes a virtual machine or a container.

17. A computing device, characterized in that The electronic device comprises a processor coupled to a memory, wherein the processor is used to store instructions. When the instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 8.

18. A computing device cluster, characterized in that: The system comprises at least one computing device, wherein the computing device comprises a processor, wherein the processor is coupled to a memory, and the processor is used to store instructions. When the instructions are executed by the processor, the computing device cluster executes the method according to any one of claims 1 to 8.

19. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed, the computer is caused to perform the method according to any one of claims 1 to 8.

20. A computer program product, comprising instructions, characterized in that: When the instructions are executed, the computer implements the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Message processing method and device based on tunnel technology

    CN118631609A

  • Massage forwarding method and equipment

    CN103369065A

  • Method for solving conflict of IP addresses of network devices and VPN server

    CN106210174A

  • Access system and method, access server, system and storage medium

    CN115442184A

  • Virtual private cloud and under-cloud data center communication and configuration method and related device

    CN115699699A

Cited By

  • Remote multi-network integration maintenance management method based on combination of NAT and L2TP technologies

    CN119172151A

  • Network configuration method and device, electronic equipment and storage medium

    CN119484132A