Cloud platform cross-regional layer 2 intercommunication method, device, equipment and readable storage medium

By expanding the virtual network card attributes in OpenStack, Vxlan tunnels are directly established between computing nodes, which solves the problems of poor message forwarding performance and high device dependence in cross-region network intercommunication of cloud platforms, and efficient cross-region layer-2 network communication and simplified security group rules management.

CN115914222BActive Publication Date: 2025-08-19FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211249248.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-12
Publication Date
2025-08-19
Estimated Expiration
2042-10-12

AI Technical Summary

Technical Problem

In the prior art, the cloud platform cross-region network interoperability scheme has problems such as poor packet forwarding performance, high device dependence and complex security group rules configuration.

Method used

By expanding the virtual network card attributes in OpenStack, adding the endpoint information of the remote Vxlan tunnel, directly establishing Vxlan tunnels between computing nodes, realizing cross-region layer two network communication, and reducing gateway equipment dependence.

Benefits of technology

Optimize message forwarding performance, reduce device dependency and construction costs, and simplify the complexity of cross-regional security group rules management and configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914222B_ABST
    Figure CN115914222B_ABST
Patent Text Reader

Abstract

The present application relates to a method, apparatus, device and readable storage medium for cross-regional Layer 2 intercommunication of a cloud platform, and relates to the field of network communication technology. The method includes: when it is detected that a request for creating a second virtual network card in the local area contains remote tunnel endpoint information, determining whether there is a remote virtual network card corresponding to the remote tunnel endpoint information in other areas and belonging to the first virtual network card of the same network; if so, generating a Layer 2 forwarding table of the second computing node corresponding to the second virtual network card in the local area according to the attribute information of each virtual network card in the network to which the second virtual network card belongs; creating a Vxlan tunnel between the second computing node and the first computing node corresponding to the first virtual network card according to the Layer 2 forwarding table, so as to realize cross-regional network Layer 2 intercommunication, thereby effectively improving the message forwarding performance, reducing the cloud platform's dependence on equipment and construction costs, and simplifying the complexity of cross-region security group rule management and configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to a cloud platform cross-regional Layer 2 intercommunication method, apparatus, device and readable storage medium. Background Art

[0002] At present, when cloud platforms are large in scale, cloud platform vendors often deploy them in multiple regions. Therefore, how to cross-region user services on cloud platforms is an urgent problem that cloud platform vendors need to solve, and network interoperability is the key to cross-region user services. Figure 1 As shown in the figure, the current cross-region network Layer 2 interconnection solution for OpenStack-based cloud platforms is generally achieved by using overlay technologies such as Vxlan (network virtualization technology) and GRE (Generic Routing Encapsulation Protocol). A Layer 2 gateway device (such as a DCI gateway) is installed at the exit of each region. The computing nodes within the region establish tunnels with this gateway device, and the gateway devices between regions establish tunnels with each other, thereby enabling business virtual machines in different regions to achieve cross-region network Layer 2 interconnection through the gateway device at the exit.

[0003] However, the solution of implementing cross-region Layer 2 network intercommunication by deploying Layer 2 gateway devices at the region egress in related technologies has the following problems:

[0004] 1) When business virtual machines communicate with each other at Layer 2 across region networks, network packets must undergo two rounds of Vxlan encapsulation and decapsulation on the compute node where the virtual machine is located and the gateway device at the region egress, which is detrimental to packet forwarding performance.

[0005] 2) Dedicated gateway devices must be deployed at the region egress, which increases the entire solution's dependence on the devices and increases the cost of building the cloud platform.

[0006] 3) Regarding the security group function in OpenStack, when multiple virtual machines of the same business are distributed in different regions, the security group in one region needs to obtain member information (such as IP addresses and MAC addresses) in other regions, making the configuration and management of security group rules more complicated. Summary of the Invention

[0007] The present application provides a cloud platform cross-regional Layer 2 intercommunication method, apparatus, device and readable storage medium to solve the problems existing in the related technology.

[0008] In a first aspect, a method for cross-region Layer 2 intercommunication on a cloud platform is provided, comprising the following steps:

[0009] When it is detected in the local area that a request for creating a second virtual network card includes remote tunnel endpoint information, determining whether there is a first virtual network card in another area, where the first virtual network card and the remote virtual network card corresponding to the remote tunnel endpoint information belong to the same network;

[0010] If so, generate a layer 2 forwarding table of the second computing node corresponding to the second virtual network card in the local area according to the attribute information of each virtual network card in the network to which the second virtual network card belongs;

[0011] A Vxlan tunnel is created between the second computing node and the first computing node corresponding to the first virtual network card according to the second layer forwarding table, so that the virtual machine corresponding to the second computing node and the virtual machine corresponding to the first computing node can perform cross-regional second layer network communication based on the Vxlan tunnel.

[0012] In some embodiments, the remote tunnel endpoint information includes an IP address and a port number of the remote tunnel endpoint.

[0013] In some embodiments, before the step of detecting that the request for creating the second virtual network card in the local area includes remote tunnel endpoint information, the method further includes:

[0014] A remote virtual network card and its corresponding remote tunnel endpoint information are created in the local area according to basic information of the first virtual network card, wherein the basic information includes a MAC address, an IP address, and host information of the first virtual network card.

[0015] In some embodiments, creating a remote virtual network card and its corresponding remote tunnel endpoint information in the local area based on the basic information of the first virtual network card includes:

[0016] Creating a remote virtual network card in the local area based on the basic information of the first virtual network card;

[0017] Determine whether the remote virtual network card is used across regions;

[0018] If so, specify and set the remote tunnel endpoint information corresponding to the remote virtual network card according to the IP address of the first virtual network card;

[0019] If not, no specific setting is performed on the remote tunnel endpoint information corresponding to the remote virtual network card.

[0020] In some embodiments, generating a layer 2 forwarding table of a second computing node corresponding to the second virtual network card in the local area based on attribute information of each virtual network card in the network to which the second virtual network card belongs includes:

[0021] Determine all virtual network cards included in the network to which the second virtual network card belongs based on the network card attribute information of the second virtual network card, wherein the virtual network cards include remote virtual network cards;

[0022] A layer 2 forwarding table of the second computing node corresponding to the second virtual network card in this region is generated based on the attribute information of each virtual network card, wherein the attribute information includes the IP address, MAC address, and one of the node name and remote tunnel endpoint information of each virtual network card.

[0023] In some embodiments, the layer 2 forwarding table includes the ID value of the Vxlan tunnel, the Vxlan network type, the remote tunnel endpoint information, the MAC address and IP address of the first virtual network card.

[0024] In some embodiments, before the step of providing the virtual machine corresponding to the second computing node with the virtual machine corresponding to the first computing node with cross-region Layer 2 network communication based on the Vxlan tunnel, the method further includes:

[0025] Creating a first virtual machine based on the first virtual network card, and scheduling the first virtual machine to the first computing node where the first virtual network card is located;

[0026] A second virtual machine is created based on the second virtual network card, and the second virtual machine is scheduled to the second computing node where the second virtual network card is located.

[0027] In a second aspect, a cloud platform cross-region Layer 2 intercommunication device is provided, including:

[0028] a virtual network service module configured to, upon detecting that a request to create a second virtual network card in the local area includes remote tunnel endpoint information, determine whether a first virtual network card exists in another area, and that the first virtual network card and the remote virtual network card corresponding to the remote tunnel endpoint information belong to the same network; and if so, generate a layer 2 forwarding table for a second computing node corresponding to the second virtual network card in the local area based on attribute information of each virtual network card in the network to which the second virtual network card belongs;

[0029] A layer 2 proxy service module is used to create a Vxlan tunnel between the second computing node and the first computing node corresponding to the first virtual network card based on the layer 2 forwarding table, so that the virtual machine corresponding to the second computing node and the virtual machine corresponding to the first computing node can perform cross-regional layer 2 network communication based on the Vxlan tunnel.

[0030] In a third aspect, a cloud platform cross-regional Layer 2 intercommunication device is provided, comprising: a memory and a processor, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the aforementioned cloud platform cross-regional Layer 2 intercommunication method.

[0031] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer storage medium stores computer instructions. When the computer instructions are executed by a computer, the computer executes the aforementioned cloud platform cross-regional Layer 2 intercommunication method.

[0032] The beneficial effects of the technical solution provided in this application include: not only effectively improving message forwarding performance and reducing the cloud platform's dependence on equipment and construction costs, but also simplifying the complexity of cross-regional security group rule management and configuration.

[0033] The present application provides a cloud platform cross-regional Layer 2 intercommunication method, apparatus, device and readable storage medium, including: when it is detected that a request to create a second virtual network card contains remote tunnel endpoint information in the local area, determining whether there is a first virtual network card in other areas, and the remote virtual network card corresponding to the first virtual network card and the remote tunnel endpoint information belong to the same network; if so, generating a Layer 2 forwarding table of the second computing node corresponding to the second virtual network card in the local area according to the attribute information of each virtual network card in the network to which the second virtual network card belongs; creating a Vxlan tunnel between the second computing node and the first computing node corresponding to the first virtual network card according to the Layer 2 forwarding table, so that the virtual machine corresponding to the second computing node and the virtual machine corresponding to the first computing node can communicate with each other on the basis of the Vxlan tunnel. The present application realizes cross-regional network Layer 2 intercommunication by directly establishing a Vxlan tunnel between computing nodes across regions, so that no additional border gateway device is required, thereby not only eliminating the need for Vxlan packet encapsulation and decapsulation processes to optimize forwarding performance, but also reducing the cloud platform's dependence on equipment and the cloud platform's construction cost, and simplifying the complexity of cross-region security group rule management and configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0035] Figure 1 Schematic diagram of cross-region Layer 2 communication between two virtual machines in the existing technology

[0036] Figure 2 A flowchart of a cross-region Layer 2 intercommunication method for a cloud platform provided in an embodiment of the present application;

[0037] Figure 3 A schematic diagram of cross-region Layer 2 communication between two virtual machines provided in an embodiment of the present application;

[0038] Figure 4 A schematic diagram of the process of processing virtual network cards by neutron-server in a region provided in an embodiment of the present application;

[0039] Figure 5 A schematic diagram of the structure of a cross-regional Layer 2 intercommunication device on a cloud platform provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0041] See also Figures 2 to 4 As shown, the embodiment of the present application provides a cloud platform cross-region Layer 2 intercommunication method, including the following steps:

[0042] Step S10: When it is detected in this area that a request to create a second virtual network card contains remote tunnel endpoint information, determine whether there is a first virtual network card in other areas, and the first virtual network card and the remote virtual network card corresponding to the remote tunnel endpoint information belong to the same network; wherein the remote tunnel endpoint information includes the IP address and port number of the remote tunnel endpoint.

[0043] Exemplarily, in this embodiment, the Vxlan protocol is used to implement cross-region network message encapsulation. Specifically, the VTEP (i.e., Vxlan tunnel endpoint) information of the remote Vxlan can be added by extending the virtual network card (i.e., Port) attributes in OpenStack. For example, the original Port attributes include binding:host_id (i.e., the id of the node to which the virtual network card belongs), binding:vif_details (i.e., virtual network card backend details), binding:vif_type (i.e., virtual network card backend type), binding:vnic_type (i.e., virtual network card type), and binding:profile (i.e., virtual network card profile data). In this embodiment, after extending the binding attribute of the Port attribute, the Port attribute will add the attribute binding:remote_vtep (i.e., the Vxlan tunnel endpoint information of the node to which the virtual network card belongs, i.e., the remote tunnel endpoint information in this embodiment). The remote tunnel endpoint information remote_vtep includes but is not limited to the IP address and port number of the remote tunnel endpoint, that is, the value of remote_vtep can be in the format of IP address + port, which is determined according to actual needs.

[0044] After completing the setting of remote_vtep for the virtual network card, the neutronserver (i.e., virtual network service) in the region can obtain the VTEP information of the compute node to which the virtual machine in the remote region belongs and directly establish a Vxlan tunnel. Specifically, this embodiment modifies the port creation process in the neutron service of OpenStack: when the neutronserver receives a create port request in the region, it determines whether the binding attribute of the create port request contains binding:remote_vtep (i.e., tunnel endpoint information). If not, the port is created according to the original port creation process. If so, it is necessary to further determine whether there is a virtual network card in the same network as the remote virtual network card corresponding to remote_vtep in other regions. If not, the port is created according to the original port creation process. If so, it indicates that a Vxlan tunnel can be established with the virtual machine in the remote region based on remote_vtep.

[0045] Furthermore, before the step of providing the virtual machine corresponding to the second computing node with the virtual machine corresponding to the first computing node for cross-region Layer 2 network communication based on the Vxlan tunnel, the method further includes:

[0046] Creating a first virtual machine based on the first virtual network card, and scheduling the first virtual machine to the first computing node where the first virtual network card is located;

[0047] A second virtual machine is created based on the second virtual network card, and the second virtual machine is scheduled to the second computing node where the second virtual network card is located.

[0048] For example, in this embodiment, the entire process will be pulled through the cloud management platform (CMP). Figure 3 As shown in the figure, a Vxlan-type cross-region network networkA is created on the cloud management platform. In Region1 (that is, other regions), it corresponds to region1_networkA, and in Region2 (that is, this region), it corresponds to region2_networkA. That is, region1_networkA and region2_networkA correspond to one logical networkA, using the same Vxlanid, but region1_networkA and region2_networkA are created in different regions.

[0049] Then specify networkA to create a virtual network card portA (i.e., the first virtual network card, which does not have the remote_vtep attribute), and use portA to create the first virtual machine VM1. Assume that VM1 is scheduled to computeA (i.e., the first computing node) in Region1, and computeA is updated to portA through the neutron-server service in Region1, that is, computeA is written to the attribute in portA for storing the associated computing node name; at the same time, specify networkA to create a virtual network card portB (i.e., the second virtual network card, which does not have the remote_vtep attribute), and use portB to create the second virtual machine VM2. Assume that VM2 is scheduled to computeB (i.e., the second computing node) in Region2, and computeB is updated to portB through the neutron-server service in Region2.

[0050] Furthermore, before the step of detecting that the request for creating the second virtual network card in the local area includes remote tunnel endpoint information, the method further includes:

[0051] A remote virtual network card and its corresponding remote tunnel endpoint information are created in the local area according to basic information of the first virtual network card, wherein the basic information includes a MAC address, an IP address, and host information of the first virtual network card.

[0052] For example, in this embodiment, the basic information includes but is not limited to the MAC address, IP address and Host information of the first virtual network card. The Host information includes but is not limited to the name of the node and the IP address of the data plane network card configured on the node, and is set according to actual needs.

[0053] The cloud management platform instructs the neutron-server service on the control node in Region2 to create a remote_portA (i.e., a remote virtual network interface card) corresponding to portA in Region2 based on portA's MAC address, IP address, and host information. This remote_portA also includes a remote_vtep attribute. It should be noted that the IP address, MAC address, security group, and other information of remote_portA are the same as those in Region1, including its VTEP information in Region1. The remote_vtep value of remote_portA can be set to computeA_IP:4789, indicating that the IP address of remote_portA is the IP address of the service plane network interface card on the computeA node. The specific setting should be based on actual needs.

[0054] Furthermore, the step of creating a remote virtual network card and its corresponding remote tunnel endpoint information in the local area according to the basic information of the first virtual network card includes:

[0055] Creating a remote virtual network card in the local area based on the basic information of the first virtual network card;

[0056] Determine whether the remote virtual network card is used across regions;

[0057] If so, specify and set the remote tunnel endpoint information corresponding to the remote virtual network card according to the IP address of the first virtual network card;

[0058] If not, no specific setting is performed on the remote tunnel endpoint information corresponding to the remote virtual network card.

[0059] For example, in this embodiment, the remote tunnel endpoint information remote_vtep attribute is an optional attribute, that is, when creating a virtual network card, it is necessary to determine whether the virtual network card is used across regions. If not (that is, used in the same region), there is no need to specify the specific information of remote_vtep; but if it is used across regions, the specific information of remote_vtep must be specified. For example, when creating portA in Region1, since portA is only used in Region1, there is no need to specify the specific information of remote_vtep when creating portA; when creating a remote_portA corresponding to portA in Region2 based on the basic information of portA, since the IP address, MAC address, security group and other information of remote_portA are the same as those in Region1, remote_portA needs to be used across Regions in Region1 and Region2. Therefore, when creating portA, the specific information of remote_vtep corresponding to remote_portA needs to be specified. For example, the remote_vtep corresponding to remote_portA can be set to: computeA_IP:4789, indicating that the IP address of remote_portA is the IP address of the business plane network card on the computeA node, and the port number is 4789.

[0060] Step S20: If it exists, generate a layer 2 forwarding table of the second computing node corresponding to the second virtual network card in this area according to the attribute information of each virtual network card in the network to which the second virtual network card belongs; wherein the layer 2 forwarding table includes the ID value of the Vxlan tunnel, the Vxlan network type, the remote tunnel endpoint information, the MAC address and IP address of the first virtual network card.

[0061] For example, in this embodiment, when the neutron-server service in Region2 processes the creation request for portB, if it detects that portA exists in Region1 and belongs to the same network as remote_portA, it will generate a Layer 2 forwarding table fdb for computeB in Region2 based on the attribute information of each virtual network card in the network to which portB belongs, which includes the information of remote_portA, and send the Layer 2 forwarding table to the openvswith-agent service (i.e., the Layer 2 proxy service) on computeB to complete the creation of portB. The format of fdb is as follows:

[0062] {network_id:

[0063] {'segment_id': vxlan tunnel id value,

[0064] 'network_type': vxlan type network,

[0065] 'ports':{'remote VTEP IP address:port number':['network card MAC address:network card IP address']}}

[0066] }

[0067] The above fdb format is only a presentation of an embodiment, and the fields may be expanded and supplemented according to actual needs, which is not limited here.

[0068] Furthermore, generating a layer 2 forwarding table of a second computing node corresponding to the second virtual network card in the current region according to the attribute information of each virtual network card in the network to which the second virtual network card belongs includes:

[0069] Determine all virtual network cards included in the network to which the second virtual network card belongs based on the network card attribute information of the second virtual network card, wherein the virtual network cards include remote virtual network cards;

[0070] A layer 2 forwarding table of the second computing node corresponding to the second virtual network card in this region is generated based on the attribute information of each virtual network card, wherein the attribute information includes the IP address, MAC address, and one of the node name and remote tunnel endpoint information of each virtual network card.

[0071] For example, in this embodiment, the neutron-server in Region2 determines that the network to which PortB belongs is networkA based on the field used to record the network to which the virtual network card belongs in the network card attribute information of the current portB, and queries all ports (including remote ports) in networkA. Then, based on the attributes in each port (such as IP address, MAC address, and one of the two node names or remote_vtep, etc.), an fdb is generated.

[0072] Step S30: Create a Vxlan tunnel between the second computing node and the first computing node corresponding to the first virtual network card according to the second layer forwarding table, so that the virtual machine corresponding to the second computing node and the virtual machine corresponding to the first computing node can perform cross-regional second layer network communication based on the Vxlan tunnel.

[0073] For example, in this embodiment, after receiving the fdb request, the openvswith-agent service in Region2 calculates the IP address of remote_portA according to the information remote_vtep:computeA_IP:4789 in fdb (for example, the IP address of remote_portA is Figure 3 192.168.1.1 in Region 2, with port number 4789), a Vxlan tunnel can be established between computeB in Region 2 and computeA in Region 1, and the relevant Openflow flow table can be generated. ARP proxy can then be implemented through the Openflow flow table, and the security group function can be implemented through iptables, thereby achieving Layer 2 network interconnection between VM1 and VM2.

[0074] Similarly, when the cloud management platform needs to create a remote_portB corresponding to portB in Region1 based on the MAC address, IP address and Host information of portB, and the remote_vtep value of remote_portB is computeB_IP:4789 (for example, the IP address of remote_portB is Figure 3 In the example, the port number is 172.29.1.1, and the port number is 4789. It should be noted that the port numbers of remote_portB and remote_portA are generally 4789 by default, but they can be set to any value according to actual needs. That is, the port number of remote_portB can be the same as or different from the port number of remote_portA. When this happens, the cloud management platform will enable the neutron-server service on the control node in Region1 to process the creation request of remote_portB and generate the fdb of remote_portB (which includes the information of remote_portB). ), and the neutron-server service will send the fdb to the openvswith-agent service on computeA; after receiving the fdb request, the openvswith-agent service on computeA will establish a vxlan tunnel between computeA in Region1 and computeB in Region2 based on the remote_portB information remote_vtep: computeB_IP:4789 in the fdb, and generate the relevant openflow flow table, thereby realizing the Layer 2 network interconnection between VM1 and VM2.

[0075] As can be seen, portA and remote_portB are created in region1_networkA, while portB and remote_portA are created in region2_networkA. This means that these four ports are in the same virtual network and the same Layer 2 network domain. Since portA and remote_portB in Region1 are in the same network and security group, the neutron-server service in Region1 processes remote_portB in the same way as it processes portA. Similarly, the neutron-server service in Region2 processes remote_portA in the same way as it processes portB. Therefore, when implementing the security group function in OpenStack, this embodiment eliminates the need for security groups within a region to obtain member information from other regions. This effectively simplifies the processing of cross-region security group rules, making security group rule configuration and management easier.

[0076] In summary, for ports with remote_vtep, this embodiment only needs to calculate the Layer 2 forwarding table on the computing node where the port is located and send it to the relevant computing node. After the Layer 2 proxy service on the corresponding computing node receives the fdb request message, it will directly establish a Vxlan tunnel with the computing nodes in other regions, thereby realizing cross-region Layer 2 network communication. It can be seen that this embodiment enhances the network card, introduces the remote_vtep attribute, and connects it through the cloud management platform to achieve the establishment of a Vxlan tunnel between two computing nodes across the cloud platform, thereby realizing cross-region Layer 2 network communication of virtual machines without the need for additional gateway devices. This makes it possible that this embodiment not only does not require the Vxlan packaging and unpacking process, but also effectively optimizes the message forwarding performance, reduces the cloud platform's dependence on equipment and construction costs, and simplifies the complexity of cross-region security group rule management and configuration.

[0077] The present application also provides a cloud platform cross-region Layer 2 intercommunication device, including:

[0078] a virtual network service module configured to, upon detecting that a request to create a second virtual network card in the local area includes remote tunnel endpoint information, determine whether a first virtual network card exists in another area, and that the first virtual network card and the remote virtual network card corresponding to the remote tunnel endpoint information belong to the same network; and if so, generate a layer 2 forwarding table for a second computing node corresponding to the second virtual network card in the local area based on attribute information of each virtual network card in the network to which the second virtual network card belongs;

[0079] A layer 2 proxy service module is used to create a Vxlan tunnel between the second computing node and the first computing node corresponding to the first virtual network card based on the layer 2 forwarding table, so that the virtual machine corresponding to the second computing node and the virtual machine corresponding to the first computing node can perform cross-regional layer 2 network communication based on the Vxlan tunnel.

[0080] Furthermore, the remote tunnel endpoint information includes the IP address and port number of the remote tunnel endpoint.

[0081] Furthermore, the virtual network service module is further configured to:

[0082] A remote virtual network card and its corresponding remote tunnel endpoint information are created in the local area according to basic information of the first virtual network card, wherein the basic information includes a MAC address, an IP address, and host information of the first virtual network card.

[0083] Furthermore, the virtual network service module is specifically used to:

[0084] Creating a remote virtual network card in the local area based on the basic information of the first virtual network card;

[0085] Determine whether the remote virtual network card is used across regions;

[0086] If so, specify and set the remote tunnel endpoint information corresponding to the remote virtual network card according to the IP address of the first virtual network card;

[0087] If not, no specific setting is performed on the remote tunnel endpoint information corresponding to the remote virtual network card.

[0088] Furthermore, the virtual network service module is further configured to:

[0089] Determine all virtual network cards included in the network to which the second virtual network card belongs based on the network card attribute information of the second virtual network card, wherein the virtual network cards include remote virtual network cards;

[0090] A layer 2 forwarding table of the second computing node corresponding to the second virtual network card in this region is generated based on the attribute information of each virtual network card, wherein the attribute information includes the IP address, MAC address, and one of the node name and remote tunnel endpoint information of each virtual network card.

[0091] Furthermore, the layer 2 forwarding table includes the ID value of the Vxlan tunnel, the Vxlan network type, the remote tunnel endpoint information, the MAC address and IP address of the first virtual network card.

[0092] Furthermore, the virtual network service module is further configured to:

[0093] Creating a first virtual machine based on the first virtual network card, and scheduling the first virtual machine to the first computing node where the first virtual network card is located;

[0094] A second virtual machine is created based on the second virtual network card, and the second virtual machine is scheduled to the second computing node where the second virtual network card is located.

[0095] It should be noted that technical personnel in this field can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned cloud platform cross-regional Layer 2 intercommunication method embodiment, and will not be repeated here.

[0096] The apparatus provided in the above embodiment can be implemented in the form of a computer program. The computer program can be used in Figure 5 The cloud platform shown runs on cross-region Layer 2 interconnection devices.

[0097] An embodiment of the present application also provides a cloud platform cross-regional Layer 2 intercommunication device, including: a memory, a processor and a network interface connected via a system bus, at least one instruction stored in the memory, and at least one instruction loaded and executed by the processor to implement all or part of the steps of the aforementioned cloud platform cross-regional Layer 2 intercommunication method.

[0098] Among them, the network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0099] The processor may be a CPU, other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor, or any conventional processor. The processor is the control center of a computer device, connecting various parts of the entire computer device using various interfaces and lines.

[0100] The memory can be used to store computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store an operating system, at least one application required for a function (such as a video playback function, an image playback function, etc.), etc.; the data storage area can store data created based on the use of the mobile phone (such as video data, image data, etc.). In addition, the memory can include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0101] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, all or part of the steps of the aforementioned cloud platform cross-regional Layer 2 intercommunication method are implemented.

[0102] The embodiments of the present application implement all or part of the aforementioned processes, and may also be completed by instructing related hardware through a computer program. The computer program may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of each of the above methods may be implemented. Among them, the computer program includes computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0103] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, servers, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage) containing computer-usable program code.

[0104] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0105] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0106] The foregoing is merely a list of specific embodiments of the present application, intended to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the broadest scope consistent with the principles and novel features of the present application.

Claims

1. A cloud platform cross-regional Layer 2 intercommunication method, characterized in that: The following steps are involved: When it is detected in the local area that a request for creating a second virtual network card includes remote tunnel endpoint information, determining whether there is a first virtual network card in another area, where the first virtual network card and the remote virtual network card corresponding to the remote tunnel endpoint information belong to the same network; If so, generate a layer 2 forwarding table of the second computing node corresponding to the second virtual network card in the local area according to the attribute information of each virtual network card in the network to which the second virtual network card belongs; A Vxlan tunnel is created between the second computing node and the first computing node corresponding to the first virtual network card according to the second layer forwarding table, so that the virtual machine corresponding to the second computing node and the virtual machine corresponding to the first computing node can perform cross-regional second layer network communication based on the Vxlan tunnel.

2. The cloud platform cross-region Layer 2 intercommunication method according to claim 1, characterized in that: The remote tunnel endpoint information includes the IP address and port number of the remote tunnel endpoint.

3. The cloud platform cross-regional Layer 2 intercommunication method according to claim 1, characterized in that: Before the step of detecting that the request for creating the second virtual network card in the local area includes remote tunnel endpoint information, the method further includes: A remote virtual network card and its corresponding remote tunnel endpoint information are created in the local area according to basic information of the first virtual network card, wherein the basic information includes a MAC address, an IP address, and host information of the first virtual network card.

4. The cloud platform cross-region Layer 2 intercommunication method according to claim 3, characterized in that: The step of creating a remote virtual network card and its corresponding remote tunnel endpoint information in the local area according to the basic information of the first virtual network card includes: Creating a remote virtual network card in the local area based on the basic information of the first virtual network card; Determine whether the remote virtual network card is used across regions; If so, specify and set the remote tunnel endpoint information corresponding to the remote virtual network card according to the IP address of the first virtual network card; If not, no specific setting is performed on the remote tunnel endpoint information corresponding to the remote virtual network card.

5. The cloud platform cross-regional Layer 2 intercommunication method according to claim 1, characterized in that: The step of generating a layer 2 forwarding table of a second computing node corresponding to the second virtual network card in the current region according to the attribute information of each virtual network card in the network to which the second virtual network card belongs includes: Determine all virtual network cards included in the network to which the second virtual network card belongs based on the network card attribute information of the second virtual network card, wherein the virtual network cards include remote virtual network cards; A layer 2 forwarding table of the second computing node corresponding to the second virtual network card in this region is generated based on the attribute information of each virtual network card, wherein the attribute information includes the IP address, MAC address, and one of the node name and remote tunnel endpoint information of each virtual network card.

6. The cloud platform cross-region Layer 2 intercommunication method according to claim 5, characterized in that: The layer 2 forwarding table includes the ID value of the Vxlan tunnel, the Vxlan network type, the remote tunnel endpoint information, the MAC address and IP address of the first virtual network card.

7. The cloud platform cross-regional Layer 2 intercommunication method according to claim 1, characterized in that: Before the step of providing the virtual machine corresponding to the second computing node with the virtual machine corresponding to the first computing node with cross-region Layer 2 network communication based on the Vxlan tunnel, the method further includes: Creating a first virtual machine based on the first virtual network card, and scheduling the first virtual machine to the first computing node where the first virtual network card is located; A second virtual machine is created based on the second virtual network card, and the second virtual machine is scheduled to the second computing node where the second virtual network card is located.

8. A cloud platform cross-regional layer 2 intercommunication device, characterized in that: include: a virtual network service module configured to, upon detecting that a request to create a second virtual network card in the local area includes remote tunnel endpoint information, determine whether a first virtual network card exists in another area, wherein the first virtual network card and the remote virtual network card corresponding to the remote tunnel endpoint information belong to the same network; If so, generate a layer 2 forwarding table of the second computing node corresponding to the second virtual network card in the local area according to the attribute information of each virtual network card in the network to which the second virtual network card belongs; A layer 2 proxy service module is used to create a Vxlan tunnel between the second computing node and the first computing node corresponding to the first virtual network card based on the layer 2 forwarding table, so that the virtual machine corresponding to the second computing node and the virtual machine corresponding to the first computing node can perform cross-regional layer 2 network communication based on the Vxlan tunnel.

9. A cloud platform cross-regional Layer 2 intercommunication device, characterized in that: include: A memory and a processor, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the cloud platform cross-regional Layer 2 intercommunication method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer storage medium stores computer instructions, and when the computer instructions are executed by a computer, the computer executes the cloud platform cross-region Layer 2 intercommunication method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for realizing BUM packet forwarding through NVGRE unicast

    CN104410560A

  • Packet Forwarding Between Hybrid Tunnel Endpoints

    US20220294665A1