Virtual local area network cloud host dual-stack communication method, apparatus and device, and storage medium
By creating a virtual LAN that supports IPv4 and IPv6 on the cloud computing platform, the problem of high cost and poor flexibility during the VLAN network upgrade process is solved, and the interoperability of IPv4 and IPv6 protocols is realized, ensuring business continuity and system flexibility.
Patent Information
- Application Number
- CN202510131864.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-06
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2045-02-06
AI Technical Summary
During the upgrade process of VLAN network from IPv4 to IPv6, the existing dual-stack technology is expensive and cannot solve the problem of shortage of IPv4 addresses. It also depends on a single physical hardware device, and the system flexibility and compatibility are poor, resulting in the virtual machine business being unable to maintain efficient and stable communication capabilities during the upgrade process.
Through the dual-stack management control center, the target dual-stack application programming interface and the dual-stack northward interface are used to create a target virtual LAN on the target cloud computing platform, and create both IPv4 and IPv6 subnets under it to realize the interoperability of IPv4 and IPv6 protocols.
It realizes the smooth upgrade of VLAN network from IPv4 to IPv6, ensures business continuity, simplifies operational processes, improves operational speed, enhances system flexibility and compatibility, and supports diversified network application needs.
Smart Images

Figure CN119906606A_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 penetrated into all aspects of work and life, and the demand for IP addresses is also growing. In order to meet the needs of upgrading and transforming VLAN (Virtual Local Area Network) networks from IPv4 (Internet Protocol version 4) to IPv6 (Internet Protocol version 6) in cloud computing platforms, dual-stack technology is an effective transition technology. Dual-stack technology refers to running two sets of IPv4 and IPv6 protocol stacks on the same device at the same time, so that data packets of two different protocols, IPv4 and IPv6, can be processed at the same time to achieve intercommunication between IPv4 and IPv6 networks. However, the current implementation of dual-stack technology requires upgrading each IPv4 node, which is costly and does not solve the shortage of IPv4 addresses. It is highly dependent on a single physical hardware device, and the system flexibility and compatibility are poor, resulting in the inability of customers' virtual machine services to maintain efficient and stable communication capabilities during the upgrade process.
[0003] In summary, how to promote the smooth upgrade of VLAN network from IPv4 to IPv6 to ensure business continuity is an urgent problem 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 network from IPv4 to IPv6 to ensure business continuity. The specific scheme 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] 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;
[0008] Storing target information of the first cloud host and the elastic network 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 a 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, and 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 card under the target virtual local area network, the method further includes:
[0017] 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;
[0018] If the target virtual local area network does not exist on the target cloud computing platform, it is prohibited to create a first cloud host and an elastic network card under the target virtual local area network.
[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 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 is used to create 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 to 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 first target subnet and the second target subnet correspond to different Internet protocols;
[0024] A first host creation module, 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 card under the target virtual local area network;
[0025] a connection determination module, configured to 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;
[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 used 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 the present application, in order to realize IPv6 dual stack of virtual LAN, a target virtual LAN is created 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 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 a 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 a 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 LAN 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 LAN; the dual-stack northbound interface is mainly used to provide an interface for enabling dual stacks to the upper-level 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 a 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0033] Figure 1 A flow chart of a virtual local area network cloud host dual stack communication method disclosed in this application;
[0034] Figure 2A schematic diagram of a virtual local area network cloud host dual stack communication implementation architecture disclosed in this application;
[0035] Figure 3 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 A schematic diagram of a specific virtual local area network cloud host dual stack communication method disclosed in this application;
[0037] Figure 5 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 be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0040] At present, the implementation of dual-stack technology requires upgrading each IPv4 node, which is costly and does not solve the shortage of IPv4 addresses. It is highly dependent on a single physical hardware device, and the system flexibility and compatibility are poor, resulting in the inability of customers' virtual machine services to maintain efficient and stable communication capabilities during the upgrade process. In order to solve the above technical problems, the present application discloses a virtual local area network cloud host dual-stack communication method, which can promote the smooth upgrade of VLAN networks from IPv4 to IPv6 to ensure business 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 a target cloud computing platform through a dual-stack management and control center using a target dual-stack application programming interface and a 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 first target subnet and the second target subnet have different Internet protocols corresponding to them.
[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), etc. 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 VLAN network query list, view details, and modify, subnet query list, view details, and modify, cloud host creation, deletion, modification, query list, and view details, network card creation, deletion, modification, query list, and view details. It is understandable that the creation and deletion of VLAN networks requires operation and maintenance personnel (i.e. Figure 3 The developer in the cloud management platform (in the developer terminal) operates through the developer terminal, so it is not allowed to create and delete on the product side. The VLAN list interface displays the network ID, name, network segment and other information, and the subnet list interface displays the subnet ID, name, IPv4 network segment, IPv6 network segment and other information, ensuring the accuracy and efficiency of the operation, and avoiding the security risks that may be introduced through the product interface, ensuring the network security of the cloud platform. The dual stack management control center is mainly responsible for the core business logic processing of the dual stack. When the user creates a cloud host and turns on the dual stack through the cloud management platform interface or API interface, the dual stack northbound interface will trigger the dual stack management control center to perform specific dual stack operations, such as creation, modification, and deletion. The dual stack management control center records the user's cloud host and dual stack network card information into the target database for persistence. The target dual stack application programming interface can be the Neutron dual stack API, which is responsible for the comprehensive management of the VLAN network life cycle (including creation, deletion, modification, query), as well as the corresponding operations of the cloud host and network card. Therefore, the creation of the VLAN network can be performed through the console interface or by using the OpenStack command line tool.
[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 the target virtual LAN is created 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, the target subnet can be created in the target virtual LAN; the target subnet includes a first target subnet and a second target subnet, and the first target subnet and the second target subnet have different Internet protocols. 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 the first target subnets is not less than one, and the number of the 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, that is, the specific process of creating a target subnet in the target virtual LAN may include: setting the target attribute of the second target subnet to the target mode to create the target subnet in the target virtual LAN. In this embodiment, these two key attributes (i.e., target attributes) can be set to dhcpv6-stateful to ensure the correct allocation of IPv6 addresses. Among them, ipv6_ra_mode determines how the router in the subnet notifies the client of its existence and configuration information through ICMPv6 messages (Router Advertisement of type 134, referred to as RA). RA is not only the key to network connectivity, but also carries the important notification function of network parameters. ipv6_address_mode determines how the client obtains the IPv6 address. It directly affects the mechanism and efficiency of address allocation and is the core link in IPv6 network configuration.
[0046] In this embodiment, if the target attribute is configured as dhcpv6-stateful, that is, stateful DHCPv6 (a network protocol used to configure the IP address, IP prefix and / or other configurations required by IPv6 hosts working on an IPv6 network) mode, in this mode, the IPv6 address and other network parameters (such as DNS server address) are dynamically allocated through the DHCPv6 server. It provides higher configuration flexibility and management capabilities, but requires additional DHCPv6 service support. It is understandable that the target attribute can also be configured as SLAAC (Stateless Address AutoConfiguration, stateless automatic configuration mode) or dhcpv6-stateless (that is, stateless DHCPv6 mode). In SLAAC mode, the client parses the prefix information in RA and combines its own interface identifier (such as EUI-64 or randomly generated) to independently complete the configuration of IPv6 address. This method does not rely on additional server resources and is efficient and flexible. In dhcpv6-stateless mode, the generation of IPv6 address still follows the SLAAC principle, but only other network configuration information (such as DNS (Domain Name System) resolver) is obtained through DHCPv6 service. This mode combines the efficiency of SLAAC and the flexibility of DHCPv6, and is suitable for scenarios that require additional configuration but automatic address allocation. 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 diverse network application requirements.
[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 mainly responsible for the configuration of the switch, including the VLAN number, the ipv4 subnet segment and mask, and the ipv6 subnet segment and mask. Therefore, the target virtual LAN, the first target subnet and the second target subnet are configured on the dual stack switch, which may specifically include: allocating a target port for the target virtual LAN on the dual stack switch, and allocating a first target address and a first subnet mask for the first target subnet, and allocating a second target address and a second subnet mask for the second target subnet; activating the target port corresponding to the target virtual LAN through a target command. For example, create a VLAN named VLAN2000, and assign the FastEthernet0 / 1 port to VLAN 2000, then configure an IPv4 address 192.168.1.1 / 24 for VLAN 2000, and a subnet mask of 24 bits, and configure an IPv6 address 2402::1 / 64 for VLAN 2000, and a subnet mask of 64 bits; finally, activate the VLAN interface through the no shutdown command. It is understandable that the specific commands and configurations may vary depending on the switch and operating system of different manufacturers (such as Cisco IOS, H3C, Foundry, etc.). The above examples are applicable to Cisco devices. Devices of other manufacturers may require different commands or configuration methods.
[0049] In this embodiment, Figure 4As shown, before creating the first cloud host and elastic network card under the target virtual LAN, it is also necessary to verify whether the target virtual LAN exists on the target cloud computing platform based on the LAN ID of the target virtual LAN through the dual stack management control center using the target dual stack application programming interface, that is, whether the VLAN is available; if the target virtual LAN does not exist on the target cloud computing platform, it is prohibited to create the first cloud host and elastic network card under the target virtual LAN, and a prompt message indicating that the network information does not exist is returned. When creating a cloud host, it is necessary to select a network and a subnet. If the target virtual LAN exists on the target cloud computing platform, the VLAN can be selected on the target cloud computing platform. The network number is 2000, and there are two subnets under the corresponding VLAN network. 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 button to enable IPv6 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 interface of the elastic network card will be called when the dual stack is enabled when creating the cloud host, the dual stack northbound interface is called to create the elastic network card and encapsulate the parameters of the port creation. The IPv4 subnet can specify the IP address, and 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 is not allowed to be turned off. If the cloud host only needs to meet the IPv4 protocol stack, you can uncheck the button to enable IPv6 on the IPv4 subnet interface in the above steps. In this way, only the address of the IPv4 subnet will be assigned when creating the elastic network card, and the created cloud host will only have an IPv4 address. This embodiment not only simplifies the operation process and ensures the convenience of operation, but also allows users to freely configure the IPv4 and IPv6 network segments of the VLAN subnet according to 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. After IPv6 is enabled on the VLAN network, information exchange with IPv4 or IPv6 nodes is achieved, ensuring the normal communication of 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, the target information of the first cloud host and the elastic network card, such as network, subnet, eni (Elastic Network Interfaces, elastic network card), ecs (Elastic Compute Service, a simple, efficient, safe and reliable computing service with elastically scalable processing power), etc., is written into the target database, and then the IP address of the IPv6 subnet obtained in the above process is configured to the first cloud host. Taking the image type of Ubuntu 18 and above as an example, when configuring the target subnet address for the first cloud host, first enter the cd / etc / netplan directory, then configure the IP address, mask and gateway of the IPv6 subnet, and finally execute the netplan apply command to make the configuration effective. After the configuration is completed, in order to determine whether the first target connection between the first cloud host and the target subnet is normal, you can log in to the first cloud host and determine whether the first cloud host can ping the IPv4 gateway and the IPv6 gateway. If both can be pinged, it means that the first target connection is normal. Among them, there are two tables involving elastic network card information in the target database: the elastic network card table (port) and the elastic network card association table (port_reference_ip). The elastic network card table stores the network card ID, name, IPv4 address, MAC address, network ID, subnet ID, etc. The elastic network card association table stores the network card ID, IPv6 address, creation time, etc.
[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 a preset dual-stack communication condition is 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 it is determined whether the second cloud host meets the preset dual-stack communication conditions, that is, 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, that is, 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 perform dual-stack communication with the first cloud host. It is understandable that there is no less than one second cloud host, and a corresponding number of second cloud hosts can be created according to user needs to perform 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, thereby ensuring the availability of the user's dual-stack business.
[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 LAN 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 LAN; the dual-stack northbound interface is mainly used to provide an interface for enabling dual stacks to the upper-level 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 a 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, including:
[0057] The target subnet creation module 11 is used to create a target virtual local area network 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 and control center, 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 first target subnet and the second target subnet correspond to different Internet protocols;
[0058] A first host creation module 12, 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 card under the target virtual local area network;
[0059] A connection determination module 13 is used to 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;
[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 LAN 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 LAN; the dual-stack northbound interface is mainly used to provide an interface for enabling dual stacks to the upper-level 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 a 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 used to set the target attribute of the second target subnet to a target mode to create the target subnet in the target virtual local area network.
[0064] In a specific implementation, the first host creation module 12 may specifically include:
[0065] A mask allocation 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 used 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 LAN verification module, configured to verify whether the target VLAN exists on the target cloud computing platform based on the LAN ID of the target VLAN using the target dual-stack application programming interface;
[0069] The verification non-existence operation module 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 used to restore the first cloud host and the elastic network card by 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 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 cannot be regarded as any limitation on the scope of use of the present application.
[0073] Figure 6 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 in the virtual local area network cloud host dual stack communication method disclosed in any of the aforementioned embodiments. In addition, 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 working 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, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present 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, and 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 may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.
[0076] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the virtual local area network cloud host dual stack communication method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0077] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the virtual local area network cloud host dual stack communication method disclosed above is implemented. For the specific steps of the method, reference can be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.
[0078] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[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 composition and steps of each example have been generally described in the above description according to function. 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 to be beyond the scope of this application.
[0080] The steps of the method or algorithm 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 a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, 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 article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0082] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article 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 general technicians in this field, according to the idea of the present application, there will 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; 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; Storing target information of the first cloud host and the elastic network 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, 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.
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 comprises: The target attribute of the second target subnet is set to a 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, and 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 card under the target virtual local area network, the method further includes: 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; If the target virtual local area network does not exist on the target cloud computing platform, it is prohibited to create a first cloud host and an elastic network card under the target virtual local area network.
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 card are restored using the target information stored in the target database to continue the dual-stack communication process.
7. The virtual local area network cloud host dual stack communication method according to any one of claims 1 to 6, characterized in that: 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.
8. A virtual local area network cloud host dual stack communication device, characterized in that: include: A target subnet creation module is used to create 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 to 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 first target subnet and the second target subnet correspond to different Internet protocols; A first host creation module, 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 card under the target virtual local area network; a connection determination module, configured to 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; 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.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used 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 7.
10. 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 7 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