Method and system for cloud virtual machine and legacy network interworking
Patent Information
- Application Number
- CN202311722379.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-14
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-12-14
AI Technical Summary
[0003]集中式的网关集群一般使用X86的物理服务器,其性能和带宽吞吐有限制,在处理上Tbps的业务流量场景时会有性能瓶颈,即使网关集群能进行横向扩展,其在资源性价比上也是不可取的,其可能需要十几或者几十台X86物理服务器才能承载上Tbps的带宽流量;
[0025]提出一种云虚拟机和传统网络互通的方法及系统,可避免集中式网关集群在处理大带宽流量时性能不足、资源整体使用率低、网络转发性能降低、转发时延增加、以及资源故障时对整体业务的影响等问题,同时无需使用专有资源来部署相关的网关集群,分布式网关部署在计算节点上,分布式网关能力随计算资源规模的增加而动态增加,可以提升转发性能和减少时延,因而可操作性好、灵活性高、效率高。
Smart Images

Figure CN117857257B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud network technology, and in particular to a method and system for interconnecting cloud virtual machines and traditional networks. Background Technology
[0002] In current mainstream cloud network solutions, when cloud virtual machines and traditional networks interoperate, a centralized gateway cluster is typically used to handle the encapsulation and decapsulation of the overlay network, as well as the connection and forwarding of traditional routes for the traditional network. This solution has the following drawbacks:
[0003] Centralized gateway clusters typically use x86 physical servers, which have limited performance and bandwidth throughput. They will encounter performance bottlenecks when handling business traffic of up to Tbps. Even if the gateway cluster can be horizontally scaled, it is not cost-effective in terms of resource efficiency. It may require a dozen or dozens of x86 physical servers to handle bandwidth traffic of up to Tbps.
[0004] In centralized gateway cluster solutions, the encapsulation and decapsulation process of the overlay will affect the overall forwarding performance and increase forwarding latency.
[0005] A centralized gateway cluster can affect overall bandwidth capacity when resources fail. If sufficient resources are reserved for redundancy, it will affect resource utilization. At the same time, it may cause packet loss or latency in overall business traffic during a failure.
[0006] A distributed gateway approach is proposed to enable communication between cloud virtual machines and traditional networks, avoiding the aforementioned problems associated with centralized gateway clusters. Summary of the Invention
[0007] This method and system aim to enable interconnection between cloud virtual machines and traditional networks based on distributed gateways. It avoids the problems of insufficient performance, low overall resource utilization, reduced network forwarding performance, increased forwarding latency, and the impact of resource failures on overall business when centralized gateway clusters are handling large bandwidth traffic. At the same time, it does not require the use of dedicated resources to deploy related gateway clusters. The distributed gateway is deployed on computing nodes, and the capacity of the distributed gateway dynamically increases with the scale of computing resources, which can improve forwarding performance and reduce latency.
[0008] The technical solution of the present invention is as follows:
[0009] Firstly, a method for interconnecting cloud virtual machines and traditional networks is proposed, which includes the following steps:
[0010] S1, OVS of KVM physical servers enables network connectivity between cloud virtual machines and physical server system networks, and configures NAT rules as needed;
[0011] S2. Use dynamic routing components to implement dynamic route learning between the KVM physical server system network and switches. The KVM physical server side publishes / 32 host routes to the addresses of cloud virtual machines, realizing the interconnection between / 32 addresses on the KVM physical server and traditional network routes.
[0012] S3 combines OVS and dynamic routing to enable interoperability between cloud virtual machines and traditional networks.
[0013] A further improvement of the present invention is that, in S1, OVS on the KVM physical server mainly performs overlay encapsulation and decapsulation on data packets of cloud virtual machines. On this basis, flow table rules based on network segments are added to distinguish data packets whose destination address is a traditional network and to send these data packets directly to the system network of the KVM physical server without performing overlay encapsulation.
[0014] A further improvement of the present invention is that, in S1, the OVS of the KVM physical server enables network connectivity between the cloud virtual machine and the physical server system network to achieve a distributed gateway.
[0015] A further improvement of the present invention is that the distributed gateway implementation logic is as follows: sending data packets to the traditional network through a cloud virtual machine; and receiving data packets from the traditional network through the cloud virtual machine.
[0016] A further improvement of the present invention is that, in step S2, a dynamic routing component is deployed in the physical server system to realize dynamic routing between the KVM physical server system network and the corresponding switch. All cloud virtual machines scheduled to the KVM physical server publish / 32 host routes in the dynamic routing of their system. The switch side establishes communication with the traditional network through traditional routing methods. At the same time, in OVS, packets sent to the KVM physical server system network with a destination address of / 32 for the cloud virtual machine are forwarded to the flow table of the corresponding cloud virtual machine, thereby realizing bidirectional communication between the cloud virtual machine and the traditional network.
[0017] A further improvement of the present invention is that, in particular, if the cloud virtual machine uses a method where the VPC addresses of different tenants can overlap, then while the traditional network traffic is being diverted on OVS, NAT rules are set for the cloud virtual machine. The address after NAT is globally unique and used for communication with the traditional network, and the dynamic route is published as the / 32 host address after NAT.
[0018] A further improvement of the present invention is that, in step S3, OVS and dynamic routing are combined to realize the interoperability between cloud virtual machines and traditional networks. In the OVS flow table, data packets sent to the KVM physical server system network with a destination address of / 32 after NAT of the cloud virtual machine are NATed and forwarded to the corresponding cloud virtual machine.
[0019] Secondly, a system for interconnecting cloud virtual machines and traditional networks is proposed, which includes:
[0020] Configuration module, dynamic learning module, gateway interconnection module:
[0021] The configuration module is used to enable network connectivity between the cloud virtual machine and the physical server system network in the OVS of the KVM physical server, and to configure NAT rules as needed.
[0022] The dynamic learning module is used to implement dynamic route learning between the KVM physical server system network and the switch using the dynamic routing component. On the KVM physical server side, / 32 host routes are published for the addresses of cloud virtual machines, realizing the interconnection between / 32 addresses on the KVM physical server and traditional network routes.
[0023] The gateway interconnection module is used to enable interconnection between cloud virtual machines and traditional networks by combining OVS and dynamic routing.
[0024] The technical effects of this invention are as follows:
[0025] This paper proposes a method and system for interconnecting cloud virtual machines and traditional networks. This method avoids the problems of insufficient performance, low overall resource utilization, reduced network forwarding performance, increased forwarding latency, and the impact of resource failures on the overall business caused by centralized gateway clusters when handling large bandwidth traffic. At the same time, it eliminates the need to use dedicated resources to deploy related gateway clusters. The distributed gateways are deployed on computing nodes, and the capabilities of the distributed gateways dynamically increase with the scale of computing resources. This can improve forwarding performance and reduce latency, thus offering good operability, high flexibility, and high efficiency. Attached Figure Description
[0026] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0027] Figure 1 This is a flowchart illustrating a method for interconnecting a cloud virtual machine and a traditional network according to an embodiment of the present invention.
[0028] Figure 2 This is a schematic diagram of the structure of a system that interconnects a cloud virtual machine and a traditional network according to an embodiment of the present invention. Detailed Implementation
[0029] Example 1
[0030] This embodiment proposes a method for interconnecting cloud virtual machines and traditional networks. It avoids problems such as insufficient performance, low overall resource utilization, reduced network forwarding performance, increased forwarding latency, and the impact of resource failures on overall services when centralized gateway clusters are handling large bandwidth traffic. At the same time, it does not require dedicated resources to deploy related gateway clusters. The distributed gateway is deployed on computing nodes, and the capacity of the distributed gateway dynamically increases with the scale of computing resources, which can improve forwarding performance and reduce latency. Therefore, it has good operability, high flexibility, and high efficiency.
[0031] Specifically, such as Figure 1 As shown, the method for interconnection between cloud virtual machines and traditional networks proposed in this embodiment includes the following specific steps:
[0032] S1, OVS of KVM physical servers enables network connectivity between cloud virtual machines and physical server system networks, and configures NAT rules as needed;
[0033] S2. Use dynamic routing components to implement dynamic route learning between the KVM physical server system network and switches. The KVM physical server side publishes / 32 host routes to the addresses of cloud virtual machines, realizing the interconnection between / 32 addresses on the KVM physical server and traditional network routes.
[0034] S3 combines OVS and dynamic routing to enable interoperability between cloud virtual machines and traditional networks.
[0035] In this embodiment, in S1, OVS on the KVM physical server mainly performs overlay encapsulation and decapsulation on data packets of cloud virtual machines. On this basis, flow table rules based on network segments are added to distinguish data packets whose destination address is a traditional network and send these data packets directly to the system network of the KVM physical server without performing overlay encapsulation.
[0036] In this embodiment, the OVS of the KVM physical server in S1 enables network connectivity between the cloud virtual machine and the physical server system network to achieve a distributed gateway.
[0037] In this embodiment, the distributed gateway implementation logic is as follows: sending data packets to the traditional network via a cloud virtual machine; and receiving data packets from the traditional network via the cloud virtual machine.
[0038] In this embodiment, if the addresses of VPCs overlap, a NAT network segment is allocated globally for communication with the traditional network, such as the 100.64.0.0 / 16 network segment. An available IP address of the NAT network segment (such as 100.64.255.254 / 16) is configured on the veth peer interface of the system network as the address of a distributed gateway for Layer 2 communication between the system network and VMs behind the NAT address. This address can be configured with the same address on all corresponding KVMs, but it is not advertised in the dynamic routing.
[0039] In this embodiment, in step S2, a dynamic routing component is deployed in the physical server system to realize dynamic routing between the KVM physical server system network and the corresponding switch. All cloud virtual machines scheduled to the KVM physical server publish / 32 host routes in the dynamic routing of their system. The switch side establishes communication with the traditional network through traditional routing methods. At the same time, in OVS, data packets sent to the KVM physical server system network with a destination address of / 32 for the cloud virtual machine are forwarded to the flow table of the corresponding cloud virtual machine, thereby realizing bidirectional communication between the cloud virtual machine and the traditional network.
[0040] In this embodiment, specifically, if the cloud virtual machine uses overlapping VPC addresses for different tenants, then while the traditional network traffic is being split on OVS, NAT rules are set for the cloud virtual machine. The address behind the NAT is globally unique and used for communication with the traditional network, and the dynamic route is published as the / 32 host address behind the NAT.
[0041] In this embodiment, if the addresses of VPCs overlap, the OVS flow table modifies the corresponding destination MAC address to the MAC address of the system network veth peer interface and performs SNAT translation on the source IP address. Simultaneously, a flow table needs to be added to OVS to forward packets from the KVM physical server's system route to the cloud virtual machine to the corresponding cloud virtual machine's TAP interface. If the addresses of VPCs do not overlap, the OVS flow table only needs to match the cloud virtual machine's IP or MAC address and forward the packet to the cloud virtual machine's TAP interface. If the addresses of VPCs overlap, the OVS flow table needs to respond to ARP requests for the cloud virtual machine's IP NAT address, match the destination IP for the data sent to the cloud virtual machine, perform DNAT on the destination IP to update the packet's destination address from the NAT IP to the cloud virtual machine's real IP address, and also update the destination MAC address to the cloud virtual machine's real MAC address before forwarding the packet to the cloud virtual machine's TAP interface.
[0042] In this embodiment, S3 combines OVS and dynamic routing to achieve interoperability between cloud virtual machines and traditional networks. In the OVS flow table, data packets destined for the / 32 address after NAT of the cloud virtual machine are NATed and forwarded to the corresponding cloud virtual machine.
[0043] Example 2
[0044] This embodiment proposes a system for interconnecting cloud virtual machines and traditional networks, see [link / reference]. Figure 2 As shown, it includes: a configuration module, a dynamic learning module, and a gateway interconnection module.
[0045] The configuration module is used to enable network connectivity between the cloud virtual machine and the physical server system network in the OVS of the KVM physical server, and to configure NAT rules as needed.
[0046] The dynamic learning module is used to implement dynamic route learning between the KVM physical server system network and the switch using the dynamic routing component. On the KVM physical server side, / 32 host routes are published for the addresses of cloud virtual machines, realizing the interconnection between / 32 addresses on the KVM physical server and traditional network routes.
[0047] The gateway interconnection module is used to enable interconnection between cloud virtual machines and traditional networks by combining OVS and dynamic routing.
[0048] In this embodiment, OVS on the KVM physical server mainly performs overlay encapsulation and decapsulation on data packets of cloud virtual machines. On this basis, flow table rules based on network segments are added to distinguish data packets whose destination address is a traditional network and send these data packets directly to the system network of the KVM physical server without performing overlay encapsulation.
[0049] In this embodiment, the distributed gateway is implemented on the KVM physical server where the cloud virtual machine resides, using a combination of OVS and dynamic routing. It mainly enables traffic distribution for the cloud virtual machine and establishes connectivity with traditional routing. The OVS on the KVM physical server enables network connectivity between the cloud virtual machine and the physical server system network to achieve the distributed gateway.
[0050] In this embodiment, the distributed gateway implementation logic is as follows: data packets are sent to the traditional network through a cloud virtual machine; the cloud virtual machine receives data packets from the traditional network.
[0051] In this embodiment, if the addresses of VPCs overlap, a NAT network segment is allocated globally for communication with the traditional network, such as the 100.64.0.0 / 16 network segment. An available IP address of the NAT network segment (such as 100.64.255.254 / 16) is configured on the veth peer interface of the system network as the address of a distributed gateway for Layer 2 communication between the system network and VMs behind the NAT address. This address can be configured with the same address on all corresponding KVMs, but it is not advertised in the dynamic routing.
[0052] In this embodiment, a dynamic routing component is deployed in the physical server system to realize dynamic routing between the KVM physical server system network and the corresponding switch. All cloud virtual machines scheduled to the KVM physical server publish / 32 host routes in the dynamic routing of their system. The switch side establishes communication with the traditional network through traditional routing methods. At the same time, OVS forwards data packets sent to the KVM physical server system network with a destination address of / 32 to the flow table of the corresponding cloud virtual machine, thereby realizing bidirectional communication between the cloud virtual machine and the traditional network.
[0053] In this embodiment, specifically, if the cloud virtual machine uses overlapping VPC addresses for different tenants, then while the traditional network traffic is being split on OVS, NAT rules are set for the cloud virtual machine. The address behind the NAT is globally unique and used for communication with the traditional network, and the dynamic route is published as the / 32 host address behind the NAT.
[0054] In this embodiment, if the addresses of VPCs overlap, the OVS flow table modifies the corresponding destination MAC address to the MAC address of the system network veth peer interface and performs SNAT translation on the source IP address. Simultaneously, a flow table needs to be added to OVS to forward packets from the KVM physical server's system route to the cloud virtual machine to the corresponding cloud virtual machine's TAP interface. If the addresses of VPCs do not overlap, the OVS flow table only needs to match the cloud virtual machine's IP or MAC address and forward the packet to the cloud virtual machine's TAP interface. If the addresses of VPCs overlap, the OVS flow table needs to respond to ARP requests for the cloud virtual machine's IP NAT address, match the destination IP for the data sent to the cloud virtual machine, perform DNAT on the destination IP to update the packet's destination address from the NAT IP to the cloud virtual machine's real IP address, and also update the destination MAC address to the cloud virtual machine's real MAC address before forwarding the packet to the cloud virtual machine's TAP interface.
[0055] In this embodiment, OVS and dynamic routing are combined to achieve interoperability between cloud virtual machines and traditional networks. In the OVS flow table, data packets destined for the cloud virtual machine after NAT ( / 32) in the KVM physical server system network are NATed and forwarded to the corresponding cloud virtual machine.
[0056] In summary, OVS on the KVM physical server enables network connectivity between the cloud virtual machine and the physical server system network, while configuring NAT rules as needed; dynamic routing components are used to achieve dynamic route learning between the KVM physical server system network and the switch; the KVM physical server advertises / 32 host routes for the addresses of the cloud virtual machines (or the addresses behind NAT), enabling communication between the / 32 addresses on the KVM physical server and traditional network routes; and the combination of OVS and dynamic routing enables communication between the cloud virtual machines and the traditional network.
[0057] The parameters and steps of each unit module in the system for interconnecting a cloud virtual machine and a traditional network according to the present invention can be referred to the parameters and steps in the embodiment of the method for interconnecting a cloud virtual machine and a traditional network in Embodiment 1 above.
Claims
1. A method for interconnecting cloud virtual machines and traditional networks, characterized in that: The specific steps include the following: S1, OVS of KVM physical servers enables network connectivity between cloud virtual machines and physical server system networks, and configures NAT rules as needed; In this process, OVS on the KVM physical server performs overlay encapsulation and decapsulation on data packets of cloud virtual machines, and adds flow table rules based on network segments to distinguish data packets whose destination address is a traditional network. Data packets that are not overlay encapsulated are sent directly to the system network of the KVM physical server. S2. Use dynamic routing components to implement dynamic route learning between the KVM physical server system network and switches. The KVM physical server publishes / 32 host routes for the addresses of cloud virtual machines. All cloud virtual machines scheduled to the KVM physical server publish / 32 host routes in their system's dynamic routes, enabling the interconnection between / 32 addresses on the KVM physical server and traditional network routes. S3 combines OVS and dynamic routing to enable interoperability between cloud virtual machines and traditional networks.
2. The method for interconnection between a cloud virtual machine and a traditional network according to claim 1, characterized in that: In S1, the OVS of the KVM physical server enables network connectivity between the cloud virtual machine and the physical server system network to achieve a distributed gateway.
3. The method for interconnection between a cloud virtual machine and a traditional network according to claim 2, characterized in that: The distributed gateway implementation logic is as follows: data packets are sent to the traditional network through a cloud virtual machine; the cloud virtual machine receives data packets from the traditional network.
4. The method for interconnection between a cloud virtual machine and a traditional network according to claim 1, characterized in that: In step S1, a dynamic routing component is deployed in the physical server system to realize dynamic routing between the KVM physical server system network and the corresponding switch. On the switch side, communication with the traditional network is established through traditional routing methods. At the same time, in OVS, data packets sent to the KVM physical server system network with a destination address of / 32 of the cloud virtual machine are forwarded to the flow table of the corresponding cloud virtual machine, thereby realizing bidirectional communication between the cloud virtual machine and the traditional network.
5. The method for interconnection between a cloud virtual machine and a traditional network according to claim 4, characterized in that: Specifically, if the cloud virtual machine uses overlapping VPC addresses for different tenants, then while the traditional network traffic is being offloaded on OVS, NAT rules are set for the cloud virtual machine. The address behind the NAT is globally unique and used for communication with the traditional network. The dynamic route will publish the / 32 host address behind the NAT.
6. The method for interconnection between a cloud virtual machine and a traditional network according to claim 5, characterized in that: In S2, OVS and dynamic routing are combined to enable interoperability between cloud virtual machines and traditional networks. In the OVS flow table, data packets destined for the / 32 address after NAT of the cloud virtual machine are NATed and forwarded to the corresponding cloud virtual machine.
7. A system for interconnecting cloud virtual machines and traditional networks, implemented based on the method for interconnecting cloud virtual machines and traditional networks as described in any one of claims 1-6, characterized in that, include: Configuration module, dynamic learning module, gateway interconnection module: The configuration module is used by the OVS of the KVM physical server to enable network connectivity between the cloud virtual machine and the physical server system network, and to configure NAT rules as needed. The OVS on the KVM physical server performs overlay encapsulation and decapsulation on the data packets of the cloud virtual machine, and adds flow table rules based on network segments to distinguish data packets whose destination address is a traditional network. These data packets are not overlay encapsulated and are sent directly to the system network of the KVM physical server. The dynamic learning module is used to implement dynamic route learning between the KVM physical server system network and the switch using a dynamic routing component. The KVM physical server publishes / 32 host routes for the addresses of cloud virtual machines. All cloud virtual machines scheduled to the KVM physical server publish / 32 host routes in the dynamic routing of their system, realizing the interconnection between / 32 addresses on the KVM physical server and traditional network routes. The gateway interconnection module is used to enable interconnection between cloud virtual machines and traditional networks by combining OVS and dynamic routing.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a method for interconnecting a cloud virtual machine and a traditional network as described in any one of claims 1-6.
9. An electronic device, characterized in that, It includes a memory for storing instructions; and a processor for executing the instructions, causing the device to perform operations that implement the method for interconnecting a cloud virtual machine and a conventional network as described in any one of claims 1-6.
Citation Information
Patent Citations
Method for configuring distributed gateway, open virtual network and storage medium
CN115277349A