A centralized multifunctional VPC gateway data plane implementation method

Through the centralized multi-functional VPC gateway data plane implementation method, VLAN mode, VPC mode and ARP mode are used to identify and forward virtual machine messages, which solves the problem of difficult IP address identification in the VPC network structure and improves network identification. Efficiency and security, achieving efficient and safe network operation.

CN118612015BActive Publication Date: 2024-10-29北京志凌海纳科技股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411081559.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-10-29
Estimated Expiration
2044-08-08

AI Technical Summary

Technical Problem

The routing quota restrictions and complex configuration management of the VPC network structure lead to restrictions on the number of nodes and difficulties in IP address identification. It is impossible to implement multi-functional gateway nodes that identify IP addresses, affecting network connectivity and resource utilization efficiency.

Method used

A centralized multi-functional VPC gateway data plane implementation method is adopted. Virtual machine messages are sent through the VPC virtual machine, encapsulated by the virtualization host and forwarded to the gateway service node. VLAN mode, VPC mode and ARP mode are used to classify and classify network traffic. Verification to achieve correct identification and forwarding of virtual machine messages.

Benefits of technology

It improves the identification efficiency and security of the VPC network, reduces resource occupation, enhances network availability and flexibility, reduces security risks, and achieves efficient, safe and reliable network operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118612015B_ABST
    Figure CN118612015B_ABST
Patent Text Reader

Abstract

The present invention discloses a centralized multifunctional VPC gateway data plane implementation method, comprising the following operation steps: sending a virtual machine message to a VLAN virtual machine through a VPC virtual machine of a VPC network; encapsulating the virtual machine message through a virtualized host machine and sending it to a gateway service node; the gateway service node decapsulates the virtual machine message, and forwards the decapsulated virtual machine message to a VLAN virtual machine of a VLAN network through a gateway service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of gateway data, and in particular to a method for realizing a centralized multifunctional VPC gateway data plane. Background Art

[0002] VPC (Virtual Private Cloud): A virtual private cloud is a user-defined logically isolated network space.

[0003] Users can manage their own subnet structure, IP address range and allocation method, gateway service, security service, etc. in VPC;

[0004] However, after research, it was found that the network structure of VPC is based on the routing quota of the virtual private cloud (VPC), which may lead to the limitation of the number of nodes. The segment size of the IP address allocated to each node is different. The inability of VPC to identify the IP address will cause network connectivity problems;

[0005] At the same time, due to the relative complexity of VPC configuration and management, the deployment of nodes is relatively simple, which will occupy too many resources when identifying IP addresses. In addition, when identifying different IP addresses, it is not optimistic, and it is impossible to implement a gateway node with multi-functional IP address identification.

[0006] Therefore, there is an urgent need for a method for identifying different IP addresses at multiple levels. Summary of the invention

[0007] The purpose of the present invention is to provide a centralized multi-functional VPC gateway data plane implementation method to solve the above-mentioned technical problems pointed out in the prior art.

[0008] The present invention provides a centralized multifunctional VPC gateway data plane implementation method, comprising the following steps:

[0009] The VPC virtual machine in the VPC network sends virtual machine packets to the VLAN virtual machine.

[0010] The virtual machine message is encapsulated by the virtualized host machine and sent to the gateway service node;

[0011] The gateway service node decapsulates the virtual machine message, and forwards the decapsulated virtual machine message to the VLAN virtual machine of the VLAN network through the gateway service.

[0012] Preferably, the decapsulated virtual machine message is forwarded to the VLAN virtual machine of the VLAN network through the gateway service of the gateway service node, and the specific operation steps are as follows:

[0013] The virtual machine message is classified into a network traffic pattern through a gateway service of the gateway service node;

[0014] The classification of the network traffic mode includes: VLAN mode, VPC mode, and ARP mode;

[0015] If a VLAN virtual machine running through a VLAN network sends a virtual machine message to a VPC virtual machine, the VLAN mode is used to determine the address of the virtual machine message;

[0016] If a VPC virtual machine running through the VPC network sends a virtual machine message to a VLAN virtual machine, the VPC mode is used to determine the address of the virtual machine message;

[0017] Performing an ARP request on the virtual machine message sent by the VLAN network and the VPC network through the ARP mode to determine the MAC address of the destination IP address of the virtual machine message;

[0018] The virtual machine message is sent to the VLAN virtual machine of the VLAN network through the network traffic mode.

[0019] Preferably, the VLAN mode includes: CT mapping mode, service processing mode, subnet mapping mode and destination IP mapping mode, and VPC forwarding mode.

[0020] Preferably, the VPC mode includes an isolation mapping mode, a service processing mode, an external subnet routing mode, a CT state reset mode, and a VLAN forwarding mode.

[0021] Preferably, the VPC mode includes a response processing mode, a transparent transmission mode and an ARP learning mode.

[0022] Preferably, if a VLAN virtual machine running through a VLAN network sends a virtual machine message to a VPC virtual machine, the VLAN mode is used to determine the address of the virtual machine message, and the specific operation steps are as follows:

[0023] Using the VLAN mode to determine whether the virtual machine message is marked with a VLAN tag;

[0024] If yes, the VLAN tag is stripped and mapped and saved in the OVS register;

[0025] If not, the virtual machine message is directly sent to the VLAN network;

[0026] Classify and verify the saved virtual machine messages through the gateway service node;

[0027] The gateway service node includes a NAT gateway, a routing gateway, and an L2 gateway;

[0028] Mapping the virtual machine messages classified and verified by the gateway service node to the corresponding VPC CT area through connection tracking in CT mapping mode;

[0029] Classify and verify the virtual machine messages of the gateway service node using the OVS flow table through the service processing mode;

[0030] The virtual machine message is mapped according to the subnet mapping mode and the destination IP mapping mode, and finally sent to the VPC virtual machine through the VPC forwarding mode.

[0031] Preferably, the service processing mode includes NAT mode, routing mode, and L2 mode.

[0032] Preferably, if a VPC virtual machine running through a VPC network sends a virtual machine message to a VLAN virtual machine, the VPC mode is used to determine the address of the virtual machine message, and the specific operation steps are as follows:

[0033] When the virtual machine message is sent to the VLAN virtual machine through the VPC virtual machine running on the VPC network, the virtual machine message is VPC isolated and mapped to the CT area using the isolation mapping mode in the VPC mode;

[0034] Classifying the virtual machine message by gateway service node;

[0035] Classify and verify the virtual machine messages of the gateway service node using the OVS flow table through the service processing mode;

[0036] The service processing modes include NAT mode, routing mode and L2 mode;

[0037] The virtual machine message is sent to the VLAN virtual machine running in the VLAN network using the external subnet routing mode, the CT state reset mode, and the VLAN forwarding mode.

[0038] Preferably, the virtual machine message is sent between the VLAN network and the VPC network through the ARP mode, and the specific operation steps are as follows:

[0039] If the virtual machine message is sent through the VLAN network, the virtual machine message is sent to the ARP virtual machine in the response processing mode and the transparent transmission mode respectively;

[0040] The response processing modes include: NAT gateway, routing gateway;

[0041] The transparent transmission mode includes L2 gateway;

[0042] If the virtual machine message is sent through the ARP network, the virtual machine message is sent to the VLAN virtual machine only through the L2 gateway;

[0043] If the VPC network sends a virtual machine message to an external network, an address of the external network is obtained through an ARP learning mode, and the virtual machine message is sent.

[0044] Preferably, the network traffic mode also includes an ARP request mode to obtain a MAC address of an unknown destination IP address from a virtual machine message, and the specific operation steps are as follows:

[0045] The received virtual machine message is matched to see whether the current destination IP address of the virtual machine message exists in the OVS flow table;

[0046] If yes, forward the virtual machine message according to the current destination IP address of the virtual machine message in the OVS flow table;

[0047] If not, the virtual machine message is encapsulated and sent to the OVS controller via an OpenFlow Packet-In message;

[0048] The OVS controller generates a corresponding ARP request according to the current destination IP address of the virtual machine message and sends it;

[0049] Setting a time delay for the OVS controller; and re-injecting the current destination IP address of the virtual machine message;

[0050] If the virtual machine message received by the OVS controller has been injected into the destination IP address, an exponential backoff is performed to re-inject the current destination IP address of the virtual machine message;

[0051] When the virtual machine message obtains the MAC address corresponding to the destination IP address according to the ARP request, the OVS flow table learns and updates the MAC address corresponding to the destination IP address to obtain an updated OVS flow table;

[0052] The virtual machine message is sent according to the updated OVS flow table.

[0053] Compared with the prior art, the embodiments of the present invention have at least the following technical advantages:

[0054] By analyzing the above-mentioned centralized multifunctional VPC gateway data plane implementation method provided by the present invention, it can be known that in specific applications, when a virtual machine receives a virtual machine message from a different network, the VLAN mode, VPC mode, and ARP mode of the virtual machine message are identified;

[0055] First, through the VLAN mode, when the VLAN virtual machine running on the VLAN network sends a virtual machine message to the VPC virtual machine, it is determined whether the virtual machine message is marked with a VLAN tag. In this way, the virtual machine message can be correctly classified and verified in the VPC network service. The virtual machine message is classified and verified through the NAT gateway, routing gateway, and L2 gateway of the gateway service node, and the IP address of the virtual machine message can be quickly determined, thereby realizing the efficient, safe and reliable operation of the VLAN network service. Then, the virtual machine message is mapped to the corresponding VPCCT area through the CT mapping mode, and isolated through the VPC CT area to improve the security of the network. Then, the service processing mode is used to reduce network failure points and improve the availability and stability of the network. The virtual machine message is mapped according to the subnet mapping mode and the destination IP mapping mode, and sent to the VPC virtual machine through the VPC forwarding mode, which can improve network efficiency and enhance network security and flexibility.

[0056] Further, through the VPC mode, the isolation mapping mode in the VPC mode is used to perform VPC isolation and mapping of the CT area on the virtual machine message. VPC isolation can reduce security risks, and mapping of the CT area can timely discover and prevent potential security threats in the virtual machine message; the virtual machine message is classified and verified through the same service processing mode; finally, the virtual machine message is sent using the external subnet routing mode, the CT state reset mode, and the VLAN forwarding mode. The external subnet routing mode increases the flexibility and controllability of the network, and the CT state reset mode can also clear the CT state information to prevent potential network security risks. Finally, the virtual machine message is sent through the VLAN forwarding mode;

[0057] Furthermore, the virtual machine messages sent between the VLAN network and the VPC network are identified through the reply processing mode and the transparent transmission mode of the ARP mode respectively. Both the reply processing mode and the transparent transmission mode can adapt to different network requirements and provide flexible network conditions. Then, only the L2 gateway is used to process the forwarding of the MAC address to reduce network latency and increase the communication speed between virtual machines. Finally, the ARP learning mode is used to obtain the address of the external network and send the virtual machine message. The MAC address of the IP address of the external network is learned, which can reduce the network congestion caused by directly sending ARP requests to obtain the MAC address. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0059] Figure 1 A flowchart of a centralized multi-functional VPC gateway data plane implementation method provided in Embodiment 1 of the present invention;

[0060] Figure 2 A flow chart of transmission of virtual machine messages of a centralized multi-functional VPC gateway data plane implementation method provided in the first embodiment of the present invention;

[0061] Figure 3 A transmission flow chart of different modes of a centralized multi-functional VPC gateway data plane implementation method provided in the first embodiment of the present invention;

[0062] Figure 4 A flowchart of a VLAN mode of a centralized multi-functional VPC gateway data plane implementation method provided in the first embodiment of the present invention;

[0063] Figure 5 A flowchart of a VPC mode of a centralized multi-functional VPC gateway data plane implementation method provided in the first embodiment of the present invention;

[0064] Figure 6 A flowchart of an ARP mode of a centralized multi-functional VPC gateway data plane implementation method provided in the first embodiment of the present invention;

[0065] Figure 7 A flowchart of an ARP request mode for an unknown destination IP address in a centralized multi-functional VPC gateway data plane implementation method provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0066] The technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments.

[0067] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making any creative work shall fall within the scope of protection of the present invention.

[0068] The present invention is further described in detail below through specific embodiments in conjunction with the accompanying drawings. Embodiment 1

[0069] like Figure 1 As shown, the present invention proposes a centralized multi-functional VPC gateway data plane implementation method, including the following steps:

[0070] S10: The VPC virtual machine in the VPC network sends a virtual machine message to the VLAN virtual machine (or the VLAN virtual machine in the VLAN network sends a virtual machine message to the VPC virtual machine);

[0071] It should be noted that a VPC virtual machine runs in a VPC network. When a VPC virtual machine sends data to a VLAN virtual machine, a virtual machine message is generated (i.e., a virtual machine message may refer to a collection of virtual machine messages (packets) transmitted in the network, which includes various types of data transmission); the above virtual machine message may contain information such as data payload, source IP address, source MAC address, destination IP address, and destination MAC address.

[0072] S20: The virtual machine message is encapsulated by the virtualized host machine and sent to the gateway service node;

[0073] It should be noted that during the transmission of the virtual machine message, the VPC service of the virtualized host encapsulates the virtual machine message into a tunnel and forwards it to the gateway service node:

[0074] In a virtualized environment, the VPC service is responsible for managing and configuring virtual networks.

[0075] When a VPC VM sends a VM message, the VPC service will encapsulate the VM message in a tunnel protocol (such as VXLAN (Virtual Extensible LAN)). The encapsulated message will be transmitted at the virtual network layer of the host machine.

[0076] The VPC service forwards the encapsulated virtual machine message to the gateway service node; the gateway service node is usually a network device or a virtual machine, responsible for processing the traffic in and out of the VPC network (that is, the traffic can be the transmitted virtual machine message);

[0077] S30: The gateway service node decapsulates the virtual machine message, and forwards the decapsulated virtual machine message to the VLAN virtual machine of the VLAN network (that is, or forwards it to the VPC virtual machine of the VPC network) through the gateway service;

[0078] It should be noted that after receiving the encapsulated virtual machine message, the gateway service node will perform a decapsulation operation (ie, restore the encapsulated virtual machine message to the original virtual machine message).

[0079] The decapsulated virtual machine message is forwarded by the gateway service according to the user-configured gateway service (that is, the gateway service performs IP, MAC and other address conversion according to the user-configured gateway service, and then forwards the message to the VLAN virtual machine running on the VLAN network).

[0080] Specifically, in step S30, the decapsulated virtual machine message is forwarded to the VLAN virtual machine of the VLAN network (that is, or forwarded to the VPC virtual machine of the VPC network) through the gateway service of the gateway service node. The specific operation steps are as follows:

[0081] S31: The virtual machine message is classified into a network traffic pattern through the gateway service of the gateway service node;

[0082] The classification of the network traffic mode includes: VLAN mode, VPC mode, and ARP mode;

[0083] S32: If the VLAN virtual machine running through the VLAN network sends a virtual machine message to the VPC virtual machine, the VLAN mode is used to determine the address of the virtual machine message (that is, the MAC address of the destination IP address of the sent virtual machine message, which is sent to the VPC virtual machine through the address of the virtual machine message);

[0084] The VLAN modes include: CT mapping mode, service processing mode, subnet mapping mode and destination IP mapping mode, and VPC forwarding mode;

[0085] It should be noted that when processing virtual machine messages sent from a VLAN network in VLAN mode, the MAC address of the destination IP address of the virtual machine message may be determined through the patch port of the VLAN bridge in VLAN mode; a patch port usually refers to a logical or physical interface used to connect two VLAN networks;

[0086] S33: If the VPC virtual machine running through the VPC network sends a virtual machine message to the VLAN virtual machine, the VPC mode is used to determine the address of the virtual machine message (that is, the MAC address of the destination IP address of the sent virtual machine message, which is sent to the VLAN virtual machine through the address of the virtual machine message);

[0087] The VPC mode includes isolation mapping mode, service processing mode, external subnet routing mode, CT state reset mode, and VLAN forwarding mode;

[0088] It should be noted that the virtual machine message sent from the VPC network is processed through the VPC mode, and the destination (that is, the VLAN virtual machine) of the virtual machine message is determined according to the encapsulation (that is, it can be tunnel encapsulation);

[0089] S34: Performing an ARP request on the virtual machine message sent by the VLAN network and the VPC network through the ARP mode to determine the MAC address of the destination IP address of the virtual machine message;

[0090] The VPC mode includes a response processing mode, a transparent transmission mode and an ARP learning mode.

[0091] It should be noted that the ARP mode resolves the destination IP address of the virtual machine message into a MAC address; when the virtual machine receives the MAC address corresponding to the destination IP address of the unknown virtual machine message, the OVS controller sends an ARP request; when the virtual machine receives an ARP request that matches its own IP address, it sends a response to the ARP request to obtain the MAC address of the destination IP address of the unknown virtual machine message;

[0092] S35: Send the virtual machine message to the VLAN virtual machine in the VLAN network (that is, or forward it to the VPC virtual machine in the VPC network) through the network traffic mode.

[0093] Specifically, in step S32, if the VLAN virtual machine running through the VLAN network sends a virtual machine message to the VPC virtual machine, the address of the virtual machine message is determined using the VLAN mode, and the specific operation steps are as follows:

[0094] S321: using the VLAN mode to determine whether the virtual machine message is marked with a VLAN tag (i.e., VLANTag, used to identify the address of the VLAN virtual machine to which the virtual machine message belongs);

[0095] If yes, the VLAN tag is stripped and mapped and saved in the OVS register;

[0096] If not, the virtual machine message is directly sent to the VLAN network (that is, the virtual machine message can be directly routed or forwarded without any VLAN network processing);

[0097] It should be noted that the VLAN mode is used to determine whether the virtual machine message is marked with a VLAN tag; the virtual machine message sometimes carries a VLAN tag when it is transmitted. When the virtual machine message enters the VPC network service, the VLAN Tag needs to be stripped first, and the stripped information is mapped to the corresponding Open vSwitch (OVS) register; this can correctly classify and verify the virtual machine message in the VPC network service; if there is no VLAN tag, the virtual machine message is directly sent to the VLAN network (that is, the virtual machine message can be directly routed or forwarded without any VLAN network processing);

[0098] S322: Classify and verify the stored virtual machine message through the gateway service node;

[0099] The gateway service node includes a NAT gateway, a routing gateway, and an L2 gateway;

[0100] It should be noted that, based on the traffic's IP and MAC address information, the gateway service needs to determine which gateway service node's gateway should process, classify, and verify the virtual machine message;

[0101] NAT (Network Address Translation) gateway is used to implement network address translation. In NAT gateway, the destination MAC address and destination IP address are usually distinguished and verified. This ensures that the virtual machine message can be correctly forwarded to its destination address, and address translation may be required.

[0102] The routing gateway is responsible for forwarding virtual machine messages between different networks inside or outside the VPC network service. In the routing gateway, the destination MAC address is usually used for differentiation and verification. The MAC address is unique within the local area network (LAN), so it can be used to determine the destination location of the traffic.

[0103] L2 gateway usually refers to the gateway working at the data link layer (Layer 2), which may involve VLAN transparent transmission, bridging and other functions; in L2 gateway, it is usually distinguished and verified based on the source IP address and the destination IP address, because the IP address can determine the source and destination location of the virtual machine message when it is transmitted across the network;

[0104] When a virtual machine message is sent from a VLAN virtual machine running on a VLAN network to a VPC network service, it will go through processes such as VLANTag stripping and mapping, service classification, and verification. The virtual machine message can be correctly identified, classified, and processed, thus achieving efficient, secure, and reliable operation of the VLAN network service.

[0105] S323: Mapping the virtual machine message classified and verified by the gateway service node to the corresponding VPC CT area through connection tracking (i.e., CT) in CT mapping mode;

[0106] It should be noted that VPC usually uses connection tracking (CT) to manage the connection status in the network; different VPCs may have different CT zones to isolate virtual machine messages; on the VLAN side, the system will map virtual machine messages to the corresponding VPC CT zone according to the classified gateway service; different VPCs have different CT zones, which allows the system to isolate virtual machines according to their network requirements and service types. This isolation improves the security of the network and reduces potential conflicts and interference between different VPCs.

[0107] S324: Classify and verify the virtual machine message of the gateway service node using the OVS (Open vSwitch) flow table in the service processing mode;

[0108] The service processing modes include NAT mode, routing mode and L2 mode;

[0109] It should be noted that the OVS flow table stores the rules on how to forward specific virtual machine messages, which can achieve high-performance message forwarding and processing to meet the needs of large-scale network traffic; it supports the functions of various gateways (i.e., NAT gateway, routing gateway, L2 gateway) of the gateway service node through the NAT mode, routing mode, and L2 mode of the service processing mode;

[0110] NAT mode: handles NAT-related translations, such as DNAT (destination NAT), reverse SNAT, and FIP 1:1 NAT; these translations are usually implemented through the conntrack mode of the Linux kernel. Routing mode: routes external traffic to the correct VPC subnet based on the routing table. L2 mode: transparently transmits or bridges L2 traffic, keeping the MAC address and VLAN tag unchanged; only simple bridging or transparent transmission settings are required, making network configuration simpler and more efficient; at the same time, reducing network failure points and improving network availability and stability.

[0111] S325: Map the virtual machine message according to the subnet mapping mode and the destination IP mapping mode, and finally send it to the VPC virtual machine through the VPC forwarding mode;

[0112] It should be noted that the subnet mapping mode may need to modify the MAC address of the virtual machine message according to the destination IP address of the virtual machine message to ensure that the virtual machine message can be correctly routed within the target VPC subnet. Through accurate routing and forwarding, unnecessary network traffic and delay are reduced, the efficiency of network transmission is improved, and the possibility of network congestion is reduced;

[0113] The destination IP mapping mode can be a specific virtual machine (i.e., VPC virtual machine) according to the VPC target (the address of the receiving VPC virtual machine) to which the virtual machine message is ultimately forwarded, accurately forwarding the message to a specific VPC virtual machine to achieve accurate message routing and transmission; it can be flexibly configured and adjusted according to the network structure and business needs to adapt to different network environments and scenarios;

[0114] Forwarded to the VPC virtual machine running in the VPC network through the VPC forwarding mode: After the above processing, the virtual machine message is forwarded to the VPC network and finally reaches the user's physical network or other target network;

[0115] When a virtual machine message is sent through the above VLAN network, the VLAN tag is first stripped and classified. Based on the classification result, the virtual machine message is sent to the appropriate gateway service node for processing (such as NAT gateway, routing gateway or L2 gateway bridging). Then, the virtual machine message is mapped according to the information of the target VPC, and the MAC address is modified or other conversions are performed when necessary. Finally, the virtual machine message is forwarded to the VPC virtual machine running in the target VPC network. The entire process ensures that the virtual machine message sent by the VLAN virtual machine of the VLAN network can efficiently and securely reach the target in the VPC (that is, the VPC virtual machine running in the VPC network).

[0116] Specifically, in step S33, if the VPC virtual machine running through the VPC network sends a virtual machine message to the VLAN virtual machine, the address of the virtual machine message is determined using the VPC mode, and the specific operation steps are as follows:

[0117] S331: When the virtual machine message is sent to the VLAN virtual machine through the VPC virtual machine running on the VPC network, the virtual machine message is VPC isolated and mapped to a CT area using the isolation mapping mode in the VPC mode;

[0118] It should be noted that VPC isolation provides a completely isolated network environment (i.e., network isolation of virtual machine messages). Each VPC has its own network configuration and routing strategy, which ensures that virtual machine messages between different VPCs will not interfere with each other, thereby improving network security and stability.

[0119] Connection Tracking (CT) is also used to record the transmission status of VM messages. Different VM messages are distinguished by specific identifiers (such as tunnel ID) and mapped to different CT zones to ensure the isolation and processing of VM messages between VPCs, reduce unnecessary forwarding and delay, and improve network performance.

[0120] S332: Classifying the virtual machine message by gateway service node;

[0121] It should be noted that the VM messages sent by the VPC VMs use different MAC addresses to distinguish the target services (that is, each service instance (such as a VM, container, etc.) has a unique MAC address in the VPC, which enables the VM messages to be accurately routed to the corresponding service;

[0122] S333: Classify and verify the virtual machine message of the gateway service node using the OVS (Open vSwitch) flow table through the service processing mode;

[0123] The service processing modes include NAT mode, routing mode and L2 mode;

[0124] It should be noted that the functions of each gateway (i.e., NAT gateway, routing gateway, L2 gateway) of the gateway service node are supported through the NAT mode, routing mode, and L2 mode of the service processing mode;

[0125] NAT mode: Three NAT forms are provided: SNAT (source NAT), reverse DNAT (destination NAT) and FIP 1:1 NAT; NAT function is implemented through the conntrack mode of the Linux kernel; NAT behavior and corresponding addresses are marked in the OVS flow table, and the Linux kernel is responsible for the specific IP address conversion operation;

[0126] Routing mode: Determine the next-hop address of the VM message based on the user-defined routing rules; mark the expected next-hop network address to ensure the correct routing of the VM message within or across VPCs;

[0127] L2 mode: transparently transmit or bridge L2 traffic, keeping the MAC address and VLAN tag unchanged;

[0128] S334: Use the external subnet routing mode, the CT state reset mode, and the VLAN forwarding mode to send the virtual machine message to the VLAN virtual machine running in the VLAN network;

[0129] It should be noted that for the external subnet, the routing mode is based on the default gateway or user-defined routing rules, and the virtual machine packets are forwarded to the destination IP address of the external subnet; if the user defines specific routing rules, the virtual machine packets will be forwarded according to these rules, and the virtual machine packets can be flexibly forwarded to the destination IP address of the external subnet;

[0130] The CT state reset mode can clear the CT state information. When a virtual machine message is sent from a VPC virtual machine to a VLAN virtual machine, if the gateway service node of the destination address (i.e., VLAN virtual machine) is different, the CT state information of the current virtual machine message needs to be cleared; prepare for the next address translation. After clearing the CT state information, the virtual machine message can be prepared for the next address translation operation, ensuring the correct routing and transmission of the virtual machine message in the network, and preventing potential network security risks.

[0131] Forwarded to the VLAN virtual machine running on the VLAN network through the VLAN forwarding mode: After the above processing, the virtual machine message is forwarded to the VLAN network and finally reaches the user physical network or other target network;

[0132] The above steps can ensure the secure and efficient transmission of virtual machine messages from VPC virtual machines running in the VPC network to VLAN virtual machines, while ensuring the isolation between different VPCs and the correct routing of virtual machine messages.

[0133] Specifically, in step S34, the virtual machine message is sent between the VLAN network and the VPC network through the ARP mode, and the specific operation steps are as follows:

[0134] S341: If the virtual machine message is sent through the VLAN network, the virtual machine message is sent to the ARP virtual machine in the response processing mode and the transparent transmission mode respectively;

[0135] The response processing mode includes: NAT gateway, routing gateway (i.e., the NAT gateway and routing gateway in step S34 are response processing modes, which are not related to the gateways or modes in the remaining steps);

[0136] The transparent transmission mode includes the L2 gateway (i.e., the L2 gateway in step S34 is in the transparent transmission mode, which is not related to the gateway or mode in the remaining steps);

[0137] It should be noted that when a virtual machine message comes from the VLAN network, first, the NAT gateway and routing gateway in the request response processing mode are served: when the virtual machine in the VLAN network sends a virtual machine message, it needs to be served by the NAT gateway (network address translation) or routing gateway, and may send an ARP request to obtain the MAC address of the gateway;

[0138] The ARP mode will capture this ARP request and check whether the target IP address is the IP address of the NAT gateway or routing gateway;

[0139] If so, the response processing mode will respond on behalf of the target device (i.e., the receiving device VPC virtual machine) to respond to the ARP request, that is, return the MAC address of the NAT gateway or routing gateway to the requester. In this way, the MAC address can be quickly determined for the subsequent sending of virtual machine messages.

[0140] For L2 gateway service in transparent mode (destination IP is a VM in the VPC subnet), if a VLAN VM wants to access a VPC VM and there is an L2 (Layer 2) gateway service connection between the two networks, the VLAN VM will send an ARP request to obtain the MAC address of the VPC VM.

[0141] ARP mode captures this ARP request and checks whether the target IP address is within the subnet range of the VPC.

[0142] If so, the transparent mode will forward the ARP request to the VPC virtual machine in the VPC network to complete the request; if the VPC virtual machine responds to the ARP request, the ARP mode will quickly respond back to the VLAN virtual machine. The transparent mode can enable transparent data transmission and reduce processing delays, ensuring the efficiency and reliability of data transmission.

[0143] S342: If the virtual machine message is sent through the ARP network, the virtual machine message is sent to the VLAN virtual machine only through the L2 gateway;

[0144] It should be noted that if the virtual machine message is sent from the VPC virtual direction running in the VPC network, only the L2 gateway service is used to request the VLAN virtual machine:

[0145] If a VPC VM accesses a VLAN VM, and there is only an L2 gateway service connecting the two networks, the VPC VM will send an ARP request to obtain the MAC address of the VLAN VM.

[0146] Since the ARP request comes from the VPC network, the ARP mode will directly transparently transmit the ARP request to the VLAN network, allowing the ARP mode processing mechanism in the VLAN network to process the ARP request. By transparently transmitting the ARP request through the L2 gateway, it can ensure that the ARP request is correctly processed and responded to, thereby supporting normal communication between virtual machines and adapting to this complex network environment.

[0147] S343: If the VPC network sends a virtual machine message to the external network, obtain an address from the external network through an ARP learning mode and send the virtual machine message;

[0148] It should be noted that when the VPC network wants to send a virtual machine message to the external network, it first needs to know the MAC address corresponding to the target IP address; if the ARP request cache in the VPC network does not have the external network, it will send an ARP request to obtain this MAC address.

[0149] The ARP processing module in the VPC captures this ARP request and obtains the target MAC address by communicating with the external network (possibly through NAT or a routing gateway); ensuring that the virtual machines in the network can correctly send and receive virtual machine messages, and reducing the direct sending of ARP requests to obtain MAC addresses, which may cause network congestion.

[0150] Specifically, in S31, the network traffic mode also includes an ARP request mode to obtain a MAC address of an unknown destination IP address from a virtual machine message, and the specific operation steps are as follows:

[0151] After research, it was found that in network communication, when a switch or router receives an unknown virtual machine message, it first checks the destination IP address of the virtual machine message. In an OpenFlow network, this is usually done on the OpenFlow switch of Open vSwitch (OVS). The OVS flow table stores the rules on how to forward specific virtual machine messages. The OVS flow table records the destination IP address of the unknown virtual machine message and the forwarding of the unknown virtual machine message. The specific steps are as follows:

[0152] S311: Match the received virtual machine message to see if the OVS flow table contains the current destination IP address of the virtual machine message;

[0153] If yes, forward the virtual machine message according to the current destination IP address of the virtual machine message in the OVS flow table;

[0154] If not, the virtual machine message is encapsulated and sent to the OVS controller via an OpenFlow Packet-In message;

[0155] It should be noted that after receiving the destination IP, the virtual machine (i.e., VPC virtual machine or VLAN virtual machine) searches the OVS flow table for a record of the current destination IP;

[0156] When receiving a VM message, the ARP request mode checks whether there is a rule in the OVS flow table that matches the VM message (such as source IP, destination IP, source MAC, destination MAC);

[0157] If there is a match, the virtual machine (VPC virtual machine or VLAN virtual machine) directly modifies the MAC address of the virtual machine message according to the rules in the OVS flow table and forwards the virtual machine message to the corresponding port;

[0158] If there is no match: the VM (VPC VM or VLAN VM) encapsulates the VM message in an OpenFlow Packet-In message and sends it to the OVS controller; the OVS controller is usually a software program that is responsible for deciding how to handle the VM message;

[0159] S312: The OVS controller generates a corresponding ARP request according to the current destination IP address of the virtual machine message and sends it (that is, it may be sent to the VPC virtual machine or the VLAN virtual machine);

[0160] It should be noted that after receiving the OpenFlow Packet-In message, the OVS controller will parse the virtual machine message to obtain its destination IP address; since the destination IP address has no matching item in the OVS flow table, the OVS controller will obtain the MAC address corresponding to the destination IP address based on the ARP request;

[0161] S313: Setting a time delay for the OVS controller; and re-injecting the current destination IP address of the virtual machine message;

[0162] If the virtual machine message received by the OVS controller has been injected into the destination IP address, an exponential backoff is performed to re-inject the current destination IP address of the virtual machine message;

[0163] It should be noted that when obtaining the MAC address corresponding to the destination IP address according to the ARP request mode, the OVS controller may re-inject the current destination IP address of the virtual machine message during the ARP request response; the OVS controller will set a time delay to avoid immediately resending the virtual machine message, which may cause network congestion;

[0164] If the OVS controller receives a VM packet after re-injecting the destination IP address (i.e., a VM packet it has already processed), it uses a strategy called "exponential backoff". Exponential backoff means waiting longer to resend the VM packet to avoid further congestion; the backoff time usually increases exponentially to give the network more time to recover after consecutive errors.

[0165] S314: When the virtual machine message obtains the MAC address corresponding to the destination IP address according to the ARP request, the OVS flow table learns and updates the MAC address corresponding to the destination IP address to obtain an updated OVS flow table (that is, the OVS flow table records the MAC address corresponding to the destination IP address of the virtual machine message, so as to facilitate the subsequent search for the destination IP address);

[0166] It should be noted that when the ARP request gets a response (that is, the ARP response of the "destination IP address"), the OVS controller will parse the response of the ARP request and obtain the MAC address corresponding to the destination IP address; then, a new rule (the MAC address corresponding to the destination IP address) is added to the OVS flow table;

[0167] S315: Send the virtual machine message according to the updated OVS flow table (that is, it may be sent to the VPC virtual machine or the VLAN virtual machine);

[0168] It should be noted that the updated OVS flow table knows the MAC address corresponding to the destination IP address of the virtual machine message, and can directly modify the MAC address of the virtual machine message according to the destination IP address of the virtual machine message, and forward the virtual machine message to the correct port.

[0169] This process ensures that when the destination MAC address is unknown, the virtual machine message can still be correctly forwarded to the destination virtual machine (that is, it may be sent to a VPC virtual machine or a VLAN virtual machine).

[0170] In summary, the centralized multi-functional VPC gateway data plane implementation method proposed in the example of the present invention can identify the sending of different virtual machine messages through VLAN mode, VPC mode, and ARP mode;

[0171] First, through the VLAN mode, when the VLAN virtual machine running on the VLAN network sends a virtual machine message to the VPC virtual machine, it is determined whether the virtual machine message is marked with a VLAN tag. In this way, the virtual machine message can be correctly classified and verified in the VPC network service. The virtual machine message is classified and verified through the NAT gateway, routing gateway, and L2 gateway of the gateway service node, and the IP address of the virtual machine message can be quickly determined, thereby realizing the efficient, safe and reliable operation of the VLAN network service. Then, the virtual machine message is mapped to the corresponding VPCCT area through the CT mapping mode, and isolated through the VPC CT area to improve the security of the network. Then, the service processing mode is used to reduce network failure points and improve the availability and stability of the network. The virtual machine message is mapped according to the subnet mapping mode and the destination IP mapping mode, and sent to the VPC virtual machine through the VPC forwarding mode, which can improve network efficiency and enhance network security and flexibility.

[0172] Further, through the VPC mode, the isolation mapping mode in the VPC mode is used to perform VPC isolation and mapping of the CT area on the virtual machine message. VPC isolation can reduce security risks, and mapping of the CT area can timely discover and prevent potential security threats in the virtual machine message; the virtual machine message is classified and verified through the same service processing mode; finally, the virtual machine message is sent using the external subnet routing mode, the CT state reset mode, and the VLAN forwarding mode. The external subnet routing mode increases the flexibility and controllability of the network, and the CT state reset mode can also clear the CT state information to prevent potential network security risks. Finally, the virtual machine message is sent through the VLAN forwarding mode;

[0173] Furthermore, the virtual machine messages sent between the VLAN network and the VPC network are identified through the reply processing mode and the transparent transmission mode of the ARP mode respectively. Both the reply processing mode and the transparent transmission mode can adapt to different network requirements and provide flexible network conditions. Then, only the L2 gateway is used to process the forwarding of the MAC address to reduce network latency and increase the communication speed between virtual machines. Finally, the ARP learning mode is used to obtain the address of the external network and send the virtual machine message. The MAC address of the IP address of the external network is learned, which can reduce the network congestion caused by directly sending ARP requests to obtain the MAC address.

[0174] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. A person skilled in the art may modify the technical solutions described in the above embodiments, or replace part or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A centralized multi-functional VPC gateway data plane implementation method, It is characterized in that The steps include: The VPC virtual machine in the VPC network sends virtual machine packets to the VLAN virtual machine. The virtual machine message is encapsulated by the virtualized host machine and sent to the gateway service node; The gateway service node decapsulates the virtual machine message, and forwards the decapsulated virtual machine message to the VLAN virtual machine of the VLAN network through the gateway service; The decapsulated virtual machine message is forwarded to the VLAN virtual machine of the VLAN network through the gateway service of the gateway service node. The specific operation steps are as follows: The virtual machine message is classified into a network traffic pattern through a gateway service of the gateway service node; The classification of the network traffic mode includes: VLAN mode, VPC mode, and ARP mode; If a VLAN virtual machine running through a VLAN network sends a virtual machine message to a VPC virtual machine, the VLAN mode is used to determine the address of the virtual machine message; If a VPC virtual machine running through the VPC network sends a virtual machine message to a VLAN virtual machine, the VPC mode is used to determine the address of the virtual machine message; Performing an ARP request on the virtual machine message sent by the VLAN network and the VPC network through the ARP mode to determine the MAC address of the destination IP address of the virtual machine message; The virtual machine message is sent to the VLAN virtual machine of the VLAN network through the network traffic mode.

2. According to the method for implementing a centralized multifunctional VPC gateway data plane according to claim 1, It is characterized in that The VLAN modes include: CT mapping mode, service processing mode, subnet mapping mode and destination IP mapping mode, and VPC forwarding mode.

3. According to the method for implementing a centralized multi-functional VPC gateway data plane according to claim 1, It is characterized in that The VPC modes include isolation mapping mode, service processing mode, external subnet routing mode, CT state reset mode, and VLAN forwarding mode.

4. According to claim 1, a centralized multi-functional VPC gateway data plane implementation method, It is characterized in that The VPC mode includes a response processing mode, a transparent transmission mode and an ARP learning mode.

5. According to the method for implementing a centralized multi-functional VPC gateway data plane according to claim 1, It is characterized in that If a VLAN virtual machine running on a VLAN network sends a virtual machine message to a VPC virtual machine, the VLAN mode is used to determine the address of the virtual machine message. The specific operation steps are as follows: Using the VLAN mode to determine whether the virtual machine message is marked with a VLAN tag; If yes, the VLAN tag is stripped and mapped and saved in the OVS register; If not, the virtual machine message is directly sent to the VLAN network; Classify and verify the saved virtual machine messages through the gateway service node; The gateway service node includes a NAT gateway, a routing gateway, and an L2 gateway; Mapping the virtual machine messages classified and verified by the gateway service node to the corresponding VPC CT area through connection tracking in CT mapping mode; Classify and verify the virtual machine messages of the gateway service node using the OVS flow table through the service processing mode; The virtual machine message is mapped according to the subnet mapping mode and the destination IP mapping mode, and finally sent to the VPC virtual machine through the VPC forwarding mode.

6. According to claim 5, a centralized multi-functional VPC gateway data plane implementation method, It is characterized in that The service processing modes include NAT mode, routing mode and L2 mode.

7. According to claim 1, a centralized multi-functional VPC gateway data plane implementation method, It is characterized in that If a VPC virtual machine running on a VPC network sends a virtual machine message to a VLAN virtual machine, the VPC mode is used to determine the address of the virtual machine message. The specific operation steps are as follows: When the virtual machine message is sent to the VLAN virtual machine through the VPC virtual machine running on the VPC network, the virtual machine message is VPC isolated and mapped to the CT area using the isolation mapping mode in the VPC mode; Classifying the virtual machine message by gateway service node; Classify and verify the virtual machine messages of the gateway service node using the OVS flow table through the service processing mode; The service processing modes include NAT mode, routing mode and L2 mode; The virtual machine message is sent to the VLAN virtual machine running in the VLAN network using the external subnet routing mode, the CT state reset mode, and the VLAN forwarding mode.

8. According to claim 1, a centralized multi-functional VPC gateway data plane implementation method, It is characterized in that The virtual machine message is sent between the VLAN network and the VPC network through the ARP mode, and the specific operation steps are as follows: If the virtual machine message is sent through the VLAN network, the virtual machine message is sent to the ARP virtual machine in the response processing mode and the transparent transmission mode respectively; The response processing modes include: NAT gateway, routing gateway; The transparent transmission mode includes L2 gateway; If the virtual machine message is sent through the ARP network, the virtual machine message is sent to the VLAN virtual machine only through the L2 gateway; If the VPC network sends a virtual machine message to an external network, an address of the external network is obtained through an ARP learning mode, and the virtual machine message is sent.

9. According to claim 1, a centralized multi-functional VPC gateway data plane implementation method, It is characterized in that The network traffic mode also includes an ARP request mode to obtain the MAC address of the unknown destination IP address from the virtual machine message. The specific operation steps are as follows: The received virtual machine message is matched to see whether the current destination IP address of the virtual machine message exists in the OVS flow table; If yes, forward the virtual machine message according to the current destination IP address of the virtual machine message in the OVS flow table; If not, the virtual machine message is encapsulated and sent to the OVS controller via an OpenFlow Packet-In message; The OVS controller generates a corresponding ARP request according to the current destination IP address of the virtual machine message and sends it; Setting a time delay for the OVS controller; and re-injecting the current destination IP address of the virtual machine message; If the virtual machine message received by the OVS controller has been injected into the destination IP address, an exponential backoff is performed to re-inject the current destination IP address of the virtual machine message; When the virtual machine message obtains the MAC address corresponding to the destination IP address according to the ARP request, the OVS flow table learns and updates the MAC address corresponding to the destination IP address to obtain an updated OVS flow table; The virtual machine message is sent according to the updated OVS flow table.

Citation Information

Patent Citations

  • Message processing method and device

    CN103200069A

  • Method, apparatus and system for transmitting data

    CN109450905A