A virtual local area network cloud host dual stack communication method, device, equipment and storage medium
By creating target virtual LANs and subnets on the cloud computing platform and configuring them using the dual-stack management control center and interfaces, the high cost and poor compatibility issues during VLAN network upgrades were resolved, and smooth upgrades and stable communications between IPv4 and IPv6 were achieved.
Patent Information
- Application Number
- CN202510131864.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-06
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-02-06
AI Technical Summary
In the process of upgrading VLAN networks from IPv4 to IPv6, existing technologies are costly, rely on single hardware, and have poor flexibility and compatibility, resulting in unstable communications.
Create target virtual LANs and subnets on the cloud computing platform through the dual-stack management and control center, configure them using the dual-stack application programming interface and northbound interface to ensure the normal connection of IPv4 and IPv6 subnets and realize dual-stack communication.
It achieves smooth upgrade of VLAN network, ensures business continuity, improves system flexibility and compatibility, simplifies operation process, and improves operation speed and network adaptability.
Smart Images

Figure CN119906606B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a virtual local area network cloud host dual-stack communication method, device, equipment and storage medium. Background Art
[0002] With the rapid development of information technology, the internet has permeated every aspect of work and life, and the demand for IP addresses is growing. Dual-stack technology is an effective transitional technology for the migration of VLANs (Virtual Local Area Networks) from IPv4 (Internet Protocol version 4) to IPv6 (Internet Protocol version 6) in cloud computing platforms. Dual-stack technology involves running both IPv4 and IPv6 protocol stacks on the same device, enabling simultaneous processing of packets from both protocols and enabling interoperability between IPv4 and IPv6 networks. However, current implementation of dual-stack technology requires upgrading every IPv4 node, resulting in significant costs. It does not address the shortage of IPv4 addresses, is highly dependent on a single physical hardware device, and suffers from poor system flexibility and compatibility. This results in customers' virtual machine services being unable to maintain efficient and stable communication during the upgrade process.
[0003] In summary, how to promote the smooth upgrade of VLAN networks from IPv4 to IPv6 to ensure business continuity is an urgent problem that needs to be solved. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a virtual local area network cloud host dual-stack communication method, device, equipment and storage medium, which can promote the smooth upgrade of VLAN networks from IPv4 to IPv6 to ensure service continuity. The specific solution is as follows:
[0005] In a first aspect, the present application discloses a virtual local area network cloud host dual-stack communication method, comprising:
[0006] Creating a target virtual local area network on a target cloud computing platform by using a target dual-stack application programming interface and a dual-stack northbound interface through a dual-stack management and control center, and creating a target subnet in the target virtual local area network; the target subnet includes a first target subnet and a second target subnet, and the first target subnet and the second target subnet correspond to different Internet protocols;
[0007] Configuring the target virtual local area network, the first target subnet, and the second target subnet on the dual-stack switch, and creating a first cloud host and an elastic network card under the target virtual local area network;
[0008] Storing target information of the first cloud host and the elastic network interface card in a target database, configuring a target subnet address for the first cloud host, and determining whether a first target connection between the first cloud host and the target subnet is normal;
[0009] If the first target connection between the first cloud host and the target subnet is normal, a second cloud host is created under the target virtual local area network so that the second cloud host can perform dual-stack communication with the first cloud host when a preset dual-stack communication condition is met.
[0010] Optionally, creating a target subnet in the target virtual local area network includes:
[0011] The target attribute of the second target subnet is set to target mode to create the target subnet in the target virtual local area network.
[0012] Optionally, the number of the first target subnets is not less than one, and the number of the second target subnets is not less than one.
[0013] Optionally, configuring the target virtual local area network, the first target subnet, and the second target subnet on the dual-stack switch includes:
[0014] Allocating a target port to the target virtual local area network on the dual-stack switch, allocating a first target address and a first subnet mask to the first target subnet, and allocating a second target address and a second subnet mask to the second target subnet;
[0015] The target port corresponding to the target virtual local area network is activated through a target command.
[0016] Optionally, before creating the first cloud host and the elastic network interface card under the target virtual local area network, the method further includes:
[0017] Verifying, using the target dual-stack application programming interface based on the local area network ID of the target virtual local area network, whether the target virtual local area network exists on the target cloud computing platform;
[0018] If the target virtual local area network does not exist on the target cloud computing platform, creating the first cloud host and the elastic network card under the target virtual local area network is prohibited.
[0019] Optionally, the virtual local area network cloud host dual-stack communication method further includes:
[0020] If an exception occurs during the dual-stack communication process, the first cloud host and the elastic network interface card are restored using the target information stored in the target database to continue the dual-stack communication process.
[0021] Optionally, the preset dual-stack communication condition includes that a second target connection between the second cloud host and the target subnet is normal, and a third target connection between the second cloud host and the first cloud host is normal.
[0022] In a second aspect, the present application discloses a virtual local area network cloud host dual-stack communication device, comprising:
[0023] a target subnet creation module, configured to create a target virtual local area network on a target cloud computing platform using a target dual-stack application programming interface and a dual-stack northbound interface through a dual-stack management and control center, and to create a target subnet in the target virtual local area network; the target subnets include a first target subnet and a second target subnet, and the first target subnet and the second target subnet correspond to different Internet protocols;
[0024] A first host creation module is used to configure the target virtual local area network, the first target subnet and the second target subnet on the dual-stack switch, and create a first cloud host and an elastic network card under the target virtual local area network;
[0025] a connection determination module, configured to store target information of the first cloud host and the elastic network interface card in a target database, configure a target subnet address for the first cloud host, and determine whether a first target connection between the first cloud host and the target subnet is normal;
[0026] The second host creation module is used to create a second cloud host under the target virtual local area network if the first target connection between the first cloud host and the target subnet is normal, so that the second cloud host can perform dual-stack communication with the first cloud host when the preset dual-stack communication conditions are met.
[0027] In a third aspect, the present application discloses an electronic device, comprising:
[0028] Memory, used to store computer programs;
[0029] The processor is configured to execute the computer program to implement the aforementioned virtual local area network cloud host dual-stack communication method.
[0030] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned virtual local area network cloud host dual-stack communication method.
[0031] In this application, in order to realize the IPv6 dual stack of the virtual LAN, a target virtual LAN is created on the target cloud computing platform by using the target dual stack application programming interface and the dual stack northbound interface through the dual stack management control center, and a target subnet is created in the target virtual LAN; the target subnet includes a first target subnet and a second target subnet, and the Internet protocols corresponding to the first target subnet and the second target subnet are different; the target virtual LAN, the first target subnet and the second target subnet are configured on the dual stack switch, and a first cloud host and an elastic network card are created under the target virtual LAN; the target information of the first cloud host and the elastic network card is stored in the target database, the target subnet address is configured for the first cloud host, and it is determined whether the first target connection between the first cloud host and the target subnet is normal; if the first target connection between the first cloud host and the target subnet is normal, a second cloud host is created under the target virtual LAN so that the second cloud host can perform dual stack communication with the first cloud host when the preset dual stack communication conditions are met. It can be seen that this application uses the target dual-stack application programming interface and the dual-stack northbound interface to create a target virtual local area network on the target cloud computing platform to create a target subnet through the dual-stack management and control center, ensuring that there are both IPv6 subnets and IPv4 subnets under the target virtual local area network; the dual-stack northbound interface is mainly used to provide an interface for enabling dual stack to the upper platform or third-party system or platform. After the configuration of the VLAN network and each target subnet is completed, the interface can be used to enable the IPv6 dual-stack option corresponding to the IPv4 subnet when creating the cloud host. The dual-stack northbound interface will trigger the dual-stack management and control center to perform specific dual-stack operations. When the first target connection is normal and the second cloud host meets the preset dual-stack communication conditions, the first cloud host and the second cloud host can perform dual-stack communication, thereby realizing flexible and efficient planning of VLAN network segments, which not only simplifies the operation process, but also ensures the speed of operation, so that the target cloud computing platform can flexibly and efficiently support IPv6 dual-stack networks to meet diverse network application needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0033] Figure 1 This is a flow chart of a virtual local area network cloud host dual-stack communication method disclosed in this application;
[0034] Figure 2This is a schematic diagram of a virtual local area network cloud host dual-stack communication implementation architecture disclosed in this application;
[0035] Figure 3 This is a schematic diagram of the implementation principle of dual-stack communication of a virtual local area network cloud host disclosed in this application;
[0036] Figure 4 This is a flow chart of a specific virtual local area network cloud host dual-stack communication method disclosed in this application;
[0037] Figure 5 This is a schematic diagram of the structure of a virtual local area network cloud host dual-stack communication device disclosed in this application;
[0038] Figure 6 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0039] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0040] Currently, the implementation of dual-stack technology requires upgrading every IPv4 node, which is costly and does not address the shortage of IPv4 addresses. Furthermore, it is highly dependent on a single physical hardware device, resulting in poor system flexibility and compatibility. This results in customers' virtual machine services being unable to maintain efficient and stable communication capabilities during the upgrade process. To address the above technical issues, this application discloses a dual-stack communication method for virtual local area network (VLAN) cloud hosts, which can facilitate the smooth upgrade of VLAN networks from IPv4 to IPv6, thereby ensuring service continuity.
[0041] See also Figure 1 As shown, an embodiment of the present invention discloses a virtual local area network cloud host dual stack communication method, including:
[0042] Step S11: Create a target virtual local area network on the target cloud computing platform through the dual-stack management and control center using the target dual-stack application programming interface and the dual-stack northbound interface, and create a target subnet in the target virtual local area network; the target subnet includes a first target subnet and a second target subnet, and the Internet protocols corresponding to the first target subnet and the second target subnet are different.
[0043] In this embodiment, the implementation architecture of dual stack communication is as follows Figure 2As shown in the figure, it mainly includes dual-stack northbound interface, dual-stack management control center, target database, dual-stack switch and Neutron dual-stack API (Application Programming Interface) and other components. It is not dependent on the limitations of any single physical hardware device, thus enhancing the flexibility and compatibility of the system. Figure 3 As shown. The dual-stack northbound interface is mainly used to provide the upper-layer cloud management platform (including the target cloud computing platform) or third-party systems and third-party platforms with dual-stack interfaces. These interfaces include querying the list, viewing details, and modifying VLAN networks; querying the list, viewing details, and modifying subnets; creating, deleting, modifying, querying the list, and viewing details of cloud hosts; and creating, deleting, modifying, querying the list, and viewing details of network cards. It is understandable that since the creation and deletion of VLAN networks requires operation and maintenance personnel (i.e. Figure 3 Developers in the cloud management platform (likely a developer) operate through the developer terminal, so creation and deletion on the product side is not allowed. The VLAN list interface displays information such as network ID, name, and network segment, while the subnet list interface displays information such as subnet ID, name, IPv4 network segment, and IPv6 network segment. This ensures accurate and efficient operation, avoids security risks that may be introduced through product interfaces, and ensures the network security of the cloud platform. The Dual Stack Management and Control Center is primarily responsible for processing the core business logic of the Dual Stack. When a user creates a cloud host and enables Dual Stack through the cloud management platform interface or API, the Dual Stack northbound interface triggers the Dual Stack Management and Control Center to perform specific Dual Stack operations, such as creation, modification, and deletion. The Dual Stack Management and Control Center records the user's cloud host and dual stack network interface information in a target database for persistence. The target Dual Stack Application Programming Interface (API), such as the Neutron Dual Stack API, is responsible for comprehensive management of the VLAN network lifecycle (including creation, deletion, modification, and query), as well as related operations on cloud hosts and network interfaces. Therefore, VLAN network creation can be performed through the console interface or using OpenStack command-line tools.
[0044] In this embodiment, the target cloud computing platform may be a cloud computing management platform based on OpenStack, and the VLAN number of the created target virtual local area network may be 2000. Figure 3VLAN2000 in the target virtual LAN is created; then create two target subnets under the VLAN network, where the IPv4 subnet segment can be 192.168.1.0 / 24, and the IPv6 subnet segment can be 2402:: / 64. After creating the target virtual LAN on the target cloud computing platform through the dual-stack management control center using the target dual-stack application programming interface and the dual-stack northbound interface, you can create a target subnet in the target virtual LAN; the target subnet includes the first target subnet and the second target subnet, and the Internet protocols corresponding to the first target subnet and the second target subnet are different. Specifically, the first target subnet is an IPv4 subnet (that is, Figure 3 subnet-1 in the second target subnet is the IPv6 subnet (that is, Figure 3 It is understandable that the number of first target subnets is not less than one, and the number of second target subnets is not less than one.
[0045] In this embodiment, when creating an IPv6 subnet, special attention should be paid to the settings of the two key attributes, ipv6-ra-mode and ipv6-address-mode. Specifically, the specific process of creating a target subnet in a target virtual local area network (VLAN) may include setting the target attribute of the second target subnet to target-mode to create the target subnet in the target VLAN. In this embodiment, these two key attributes (i.e., target attributes) can be set to dhcpv6-stateful to ensure correct IPv6 address allocation. The ipv6_ra_mode attribute determines how routers within the subnet notify clients of their existence and configuration information via ICMPv6 messages (Type 134 Router Advertisement, or RA). RAs are not only critical for network connectivity but also carry the important function of notifying network parameters. The ipv6_address_mode attribute determines how clients obtain IPv6 addresses. It directly impacts the mechanism and efficiency of address allocation and is a core component of IPv6 network configuration.
[0046] In this embodiment, if the target attribute is configured as dhcpv6-stateful, which is stateful DHCPv6 (a network protocol used to configure the IP address, IP prefix, and / or other configuration required by IPv6 hosts operating on an IPv6 network), in this mode, IPv6 addresses and other network parameters (such as DNS server addresses) are dynamically allocated by a DHCPv6 server. This provides greater configuration flexibility and management capabilities, but requires additional DHCPv6 service support. It is understood that the target attribute can also be configured as SLAAC (Stateless Address AutoConfiguration) or dhcpv6-stateless (also known as stateless DHCPv6 mode). In SLAAC mode, clients independently configure IPv6 addresses by parsing prefix information from RAs and combining it with their own interface identifiers (such as EUI-64 or randomly generated). This method does not rely on additional server resources and is efficient and flexible. In DHCPv6-stateless mode, IPv6 address generation still follows SLAAC principles, but only obtains network configuration information other than the address (such as the DNS (Domain Name System) resolver) through the DHCPv6 service. This mode combines the efficiency of SLAAC with the flexibility of DHCPv6 and is suitable for scenarios where additional configuration is required but address allocation is automated. By properly configuring ipv6-ra-mode and ipv6-address-mode, the OpenStack platform can flexibly and efficiently support IPv6 dual-stack networks to meet the needs of diverse network applications.
[0047] Step S12: Configure the target virtual local area network, the first target subnet, and the second target subnet on the dual-stack switch, and create a first cloud host and an elastic network card under the target virtual local area network.
[0048] In this embodiment, the dual-stack switch is primarily responsible for switch configuration, including VLAN numbers, IPv4 subnet segments and masks, and IPv6 subnet segments and masks. Therefore, configuring the target virtual local area network (VLAN), the first target subnet, and the second target subnet on the dual-stack switch may include: allocating a target port to the target virtual local area network, allocating a first target address and a first subnet mask to the first target subnet, and allocating a second target address and a second subnet mask to the second target subnet; and activating the target port corresponding to the target virtual local area network using a target command. For example, a VLAN named VLAN2000 is created, and FastEthernet0 / 1 port is assigned to VLAN 2000. VLAN 2000 is then configured with an IPv4 address of 192.168.1.1 / 24 with a 24-bit subnet mask, and an IPv6 address of 2402::1 / 64 with a 64-bit subnet mask. Finally, the VLAN interface is activated using the no shutdown command. It's understood that specific commands and configurations may vary depending on the switch and operating system (e.g., Cisco IOS, H3C, Foundry, etc.) from different vendors. The above examples apply to Cisco devices. Devices from other vendors may require different commands or configuration methods.
[0049] In this embodiment, Figure 4As shown, before creating the first cloud host and elastic network interface card (ENIC) under the target virtual local area network (VLAN), the dual-stack management and control center must verify the existence of the target VLAN on the target cloud computing platform using the target dual-stack application programming interface (API) based on the LAN ID of the target VLAN. In other words, whether the VLAN is available. If the target VLAN does not exist on the target cloud computing platform, the creation of the first cloud host and ENIC under the target VLAN is prohibited, and a prompt message indicating that the network information does not exist is returned. When creating a cloud host, you need to select a network and subnet. If the target VLAN exists on the target cloud computing platform, you can select the VLAN on the target cloud computing platform with the network number 2000. The corresponding VLAN network has two subnets: the IPv4 subnet segment is 192.168.1.0 / 24, and the IPv6 subnet segment is 2402:: / 64. Select the IPv4 subnet and check the "Enable IPv6" button on the interface. You can see the IPv6 subnet segment under the current VLAN. At this time, you can check the IPv6 subnet and select the IPv4 subnet and IPv6 subnet to create the first cloud host. Since the elastic network card interface will be called when the dual stack is enabled when creating the cloud host, the dual stack northbound interface will be called to create the elastic network card and encapsulate the parameters for creating the port. The IPv4 subnet can specify the IP address, while the IPv6 subnet's IP address is automatically assigned and cannot be specified. It is understandable that once the VLAN network dual stack is enabled, it cannot be turned off. If the cloud host only needs to meet the IPv4 protocol stack, you can uncheck the "Enable IPv6" button on the IPv4 subnet interface in the above steps. In this way, only the IPv4 subnet address will be assigned when creating the elastic network card, and the created cloud host will only have an IPv4 address. This implementation not only simplifies the operational process and ensures quick operation, but also allows users to freely configure the IPv4 and IPv6 segments of VLAN subnets based on the specific needs of the cloud center, greatly improving the flexibility and adaptability of network deployment and optimizing the adaptability and scalability of the network architecture. With IPv6 enabled on the VLAN network, information exchange with either IPv4 or IPv6 nodes is achieved, ensuring normal communication between customer virtual machine services.
[0050] Step S13: Store the target information of the first cloud host and the elastic network card in a target database, configure a target subnet address for the first cloud host, and determine whether the first target connection between the first cloud host and the target subnet is normal.
[0051] In this embodiment, target information for the first cloud host and elastic network interface card (ENI), such as network, subnet, eni (Elastic Network Interfaces), and ecs (Elastic Compute Service, a simple, efficient, secure, reliable, and scalable computing service), is written to the target database. The IPv6 subnet IP address obtained in the preceding process is then configured for the first cloud host. For an Ubuntu 18 or later image, to configure the target subnet address for the first cloud host, first enter the cd / etc / netplan directory, then configure the IPv6 subnet IP address, mask, and gateway. Finally, execute the netplan apply command for the configuration to take effect. After the configuration is complete, to determine whether the first target connection between the first cloud host and the target subnet is functioning properly, log in to the first cloud host and determine whether the first cloud host can ping both the IPv4 gateway and the IPv6 gateway. If both can be pinged, the first target connection is functioning properly. The target database contains two tables containing ENI information: the ENI table (port) and the ENI association table (port_reference_ip). The ENI table stores the NI ID, name, IPv4 address, MAC address, network ID, and subnet ID. The ENI association table stores the NI ID, IPv6 address, and creation time.
[0052] Step S14: If the first target connection between the first cloud host and the target subnet is normal, create a second cloud host under the target virtual local area network so that the second cloud host can perform dual-stack communication with the first cloud host when the preset dual-stack communication conditions are met.
[0053] In this embodiment, if the first target connection is normal, a second cloud host can be created under the target virtual local area network and a determination is made as to whether the second cloud host meets the preset dual-stack communication conditions. Specifically, the second target connection between the second cloud host and the target subnet is normal, and the third target connection between the second cloud host and the first cloud host is normal, i.e., the second cloud host can ping the intranet address of the first cloud host. If the second cloud host meets the preset dual-stack communication conditions, the second cloud host can then engage in dual-stack communication with the first cloud host. It is understood that there should be at least one second cloud host, and a corresponding number of second cloud hosts can be created based on user needs to enable dual-stack communication with the first cloud host.
[0054] In addition, the target database is mainly responsible for the persistence of cloud host and dual-stack network card data. If an exception occurs during the dual-stack communication process, the target information stored in the target database can be used to restore the first cloud host and elastic network card to continue the dual-stack communication process, ensuring the availability of users' dual-stack services.
[0055] It can be seen that this application uses the target dual-stack application programming interface and the dual-stack northbound interface to create a target virtual local area network on the target cloud computing platform to create a target subnet through the dual-stack management and control center, ensuring that there are both IPv6 subnets and IPv4 subnets under the target virtual local area network; the dual-stack northbound interface is mainly used to provide an interface for enabling dual stack to the upper platform or third-party system or platform. After the configuration of the VLAN network and each target subnet is completed, the interface can be used to enable the IPv6 dual-stack option corresponding to the IPv4 subnet when creating the cloud host. The dual-stack northbound interface will trigger the dual-stack management and control center to perform specific dual-stack operations. When the first target connection is normal and the second cloud host meets the preset dual-stack communication conditions, the first cloud host and the second cloud host can perform dual-stack communication, thereby realizing flexible and efficient planning of VLAN network segments, which not only simplifies the operation process, but also ensures the speed of operation, so that the target cloud computing platform can flexibly and efficiently support IPv6 dual-stack networks to meet diverse network application needs.
[0056] See also Figure 5 As shown, the present application discloses a virtual local area network cloud host dual stack communication device, comprising:
[0057] The target subnet creation module 11 is configured to create a target virtual local area network (VLAN) on a target cloud computing platform using a target dual-stack application programming interface (API) and a dual-stack northbound interface (NBI) through a dual-stack management and control center, and to create a target subnet in the target VLAN; the target subnets include a first target subnet and a second target subnet, and the first target subnet and the second target subnet correspond to different Internet protocols;
[0058] A first host creation module 12 is configured to configure the target virtual local area network, the first target subnet, and the second target subnet on the dual-stack switch, and to create a first cloud host and an elastic network interface card under the target virtual local area network;
[0059] a connection determination module 13, configured to store target information of the first cloud host and the elastic network interface card in a target database, configure a target subnet address for the first cloud host, and determine whether the first target connection between the first cloud host and the target subnet is normal;
[0060] The second host creation module 14 is used to create a second cloud host under the target virtual local area network if the first target connection between the first cloud host and the target subnet is normal, so that the second cloud host can perform dual-stack communication with the first cloud host when the preset dual-stack communication conditions are met.
[0061] It can be seen that this application uses the target dual-stack application programming interface and the dual-stack northbound interface to create a target virtual local area network on the target cloud computing platform to create a target subnet through the dual-stack management and control center, ensuring that there are both IPv6 subnets and IPv4 subnets under the target virtual local area network; the dual-stack northbound interface is mainly used to provide an interface for enabling dual stack to the upper platform or third-party system or platform. After the configuration of the VLAN network and each target subnet is completed, the interface can be used to enable the IPv6 dual-stack option corresponding to the IPv4 subnet when creating the cloud host. The dual-stack northbound interface will trigger the dual-stack management and control center to perform specific dual-stack operations. When the first target connection is normal and the second cloud host meets the preset dual-stack communication conditions, the first cloud host and the second cloud host can perform dual-stack communication, thereby realizing flexible and efficient planning of VLAN network segments, which not only simplifies the operation process, but also ensures the speed of operation, so that the target cloud computing platform can flexibly and efficiently support IPv6 dual-stack networks to meet diverse network application needs.
[0062] In a specific implementation, the target subnet creation module 11 may specifically include:
[0063] The target subnet creating unit is configured to set the target attribute of the second target subnet to a target mode so as to create the target subnet in the target virtual local area network.
[0064] In a specific embodiment, the first host creation module 12 may specifically include:
[0065] a mask allocating unit, configured to allocate a target port to the target virtual local area network on the dual-stack switch, and allocate a first target address and a first subnet mask to the first target subnet, and allocate a second target address and a second subnet mask to the second target subnet;
[0066] The port activation unit is configured to activate the target port corresponding to the target virtual local area network through a target command.
[0067] In a specific embodiment, the device may further include:
[0068] a local area network verification module, configured to verify whether the target virtual local area network exists on the target cloud computing platform based on the local area network ID of the target virtual local area network using the target dual-stack application programming interface;
[0069] The verification operation module does not exist, and is used to prohibit the creation of the first cloud host and the elastic network card under the target virtual local area network if the target virtual local area network does not exist on the target cloud computing platform.
[0070] In a specific embodiment, the device may further include:
[0071] The information restoration module is configured to restore the first cloud host and the elastic network interface card using the target information stored in the target database to continue the dual-stack communication process if an exception occurs during the dual-stack communication process.
[0072] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram should not be considered as any limitation to the scope of application of the present application.
[0073] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the virtual local area network cloud host dual-stack communication method disclosed in any of the aforementioned embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0074] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0075] In addition, the memory 22 as a carrier for resource storage can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0076] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, and can be Windows Server, NetWare, Unix, Linux, etc. In addition to including a computer program capable of implementing the virtual local area network cloud host dual-stack communication method disclosed in any of the aforementioned embodiments and executed by the electronic device 20, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0077] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when executed by a processor, the computer program implements the aforementioned disclosed virtual local area network cloud host dual-stack communication method. The specific steps of this method can be referred to the corresponding content disclosed in the aforementioned embodiments and will not be repeated here.
[0078] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0079] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0080] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0081] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device 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 device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0082] The above is a detailed introduction to the technical solution provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A virtual local area network cloud host dual stack communication method, characterized in that: include: Creating a target virtual local area network on a target cloud computing platform by using a target dual-stack application programming interface and a dual-stack northbound interface through a dual-stack management and control center, and creating a target subnet in the target virtual local area network; the target subnet includes a first target subnet and a second target subnet, and the first target subnet and the second target subnet correspond to different Internet protocols; Configuring the target virtual local area network, the first target subnet, and the second target subnet on the dual-stack switch, and creating a first cloud host and an elastic network card under the target virtual local area network; Storing target information of the first cloud host and the elastic network interface card in a target database, configuring a target subnet address for the first cloud host, and determining whether a first target connection between the first cloud host and the target subnet is normal; If the first target connection between the first cloud host and the target subnet is normal, creating a second cloud host under the target virtual local area network so that the second cloud host can perform dual-stack communication with the first cloud host when a preset dual-stack communication condition is met; The preset dual-stack communication condition includes that the second target connection between the second cloud host and the target subnet is normal, and the third target connection between the second cloud host and the first cloud host is normal.
2. The virtual local area network cloud host dual stack communication method according to claim 1, characterized in that: The creating a target subnet in the target virtual local area network includes: The target attribute of the second target subnet is set to target mode to create the target subnet in the target virtual local area network.
3. The virtual local area network cloud host dual stack communication method according to claim 1, characterized in that: The number of the first target subnets is not less than one, and the number of the second target subnets is not less than one.
4. The virtual local area network cloud host dual stack communication method according to claim 1, characterized in that: The configuring the target virtual local area network, the first target subnet, and the second target subnet on the dual-stack switch includes: Allocating a target port to the target virtual local area network on the dual-stack switch, allocating a first target address and a first subnet mask to the first target subnet, and allocating a second target address and a second subnet mask to the second target subnet; The target port corresponding to the target virtual local area network is activated through a target command.
5. The virtual local area network cloud host dual stack communication method according to claim 1, characterized in that: Before creating the first cloud host and the elastic network interface card under the target virtual local area network, the method further includes: Verifying, using the target dual-stack application programming interface based on the local area network ID of the target virtual local area network, whether the target virtual local area network exists on the target cloud computing platform; If the target virtual local area network does not exist on the target cloud computing platform, creating the first cloud host and the elastic network card under the target virtual local area network is prohibited.
6. The virtual local area network cloud host dual stack communication method according to claim 1, characterized in that: Also includes: If an exception occurs during the dual-stack communication process, the first cloud host and the elastic network interface card are restored using the target information stored in the target database to continue the dual-stack communication process.
7. A virtual local area network cloud host dual stack communication device, characterized in that: include: a target subnet creation module, configured to create a target virtual local area network on a target cloud computing platform using a target dual-stack application programming interface and a dual-stack northbound interface through a dual-stack management and control center, and to create a target subnet in the target virtual local area network; the target subnets include a first target subnet and a second target subnet, and the first target subnet and the second target subnet correspond to different Internet protocols; A first host creation module is used to configure the target virtual local area network, the first target subnet and the second target subnet on the dual-stack switch, and create a first cloud host and an elastic network card under the target virtual local area network; a connection determination module, configured to store target information of the first cloud host and the elastic network interface card in a target database, configure a target subnet address for the first cloud host, and determine whether a first target connection between the first cloud host and the target subnet is normal; a second host creation module configured to create a second cloud host under the target virtual local area network if the first target connection between the first cloud host and the target subnet is normal, so that the second cloud host can perform dual-stack communication with the first cloud host when a preset dual-stack communication condition is met; The preset dual-stack communication condition includes that the second target connection between the second cloud host and the target subnet is normal, and the third target connection between the second cloud host and the first cloud host is normal.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the virtual local area network cloud host dual-stack communication method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that Used to store a computer program, wherein when the computer program is executed by a processor, the virtual local area network cloud host dual-stack communication method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
SDN-based IPv4 / IPv6 dual-stack conversion method and system
CN109688241A
Processing method for realizing dual-stack switching between IPV4 and IPV6 by cloud host
CN116319662A