Method, device and equipment for implementing access of bare metal server to VPC and medium
By detecting the VPC network type using SDN, and combining OVS and TOR as VXLAN or VLAN gateways, bare metal servers can access the VPC via UNTAG or VLAN, which solves the performance problem of bare metal servers accessing the VPC, improves edge computing performance, and avoids ARP broadcast storms.
Patent Information
- Application Number
- CN202410691151.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-05-30
AI Technical Summary
Existing solutions for connecting bare-metal servers to a Virtual Private Cloud (VPC) suffer from reduced edge computing performance.
The network type of the VPC is detected by Software Defined Networking (SDN), and OVS and TOR are determined as the corresponding VXLAN or VLAN gateways based on the type. Bare metal servers are connected to TOR in UNTAG or UNTAG mode, and virtual devices are connected to OVS in local private VLAN mode. The configuration is converted through OVSDB protocol to achieve heterogeneous communication.
It enables bare metal servers to automatically connect to different VPC network types, improving the performance and stability of edge computing, avoiding ARP broadcast storms, and ensuring the consistency of configuration information.
Smart Images

Figure CN118555165B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication, and in particular to a method, apparatus, device, and medium for implementing bare metal server access to VPC. Background Technology
[0002] Virtualization technology has provided a platform and foundation for the development of cloud computing. With the advancement of virtualization technology, more and more cloud server (virtual machine) services based on virtualization have emerged. However, virtualization technology also has some shortcomings, such as the performance overhead caused by the virtualization layer. These shortcomings are particularly prominent in scenarios with high performance and stability requirements.
[0003] Bare metal servers can solve these problems. With the increasing development of edge computing, there is a need to deploy bare metal servers at the edge to provide high-performance computing resources. Edge cloud applications are diverse, and the application scenarios of different Virtual Private Cloud (VPC) network types are different. Therefore, the ability of bare metal servers to connect to VPCs directly affects the performance of edge computing. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and medium for connecting bare metal servers to a VPC, in order to solve the technical problem of reduced edge computing performance in existing bare metal server connection schemes to VPC.
[0005] This invention provides a method for enabling bare metal servers to access a Virtual Private Cloud (VPC), applied to a target system. The target system includes Software-Defined Networking (SDN), Virtual Private Cloud (VPC), Software Switch (OVS), Access Switch (TOR), virtual devices, and bare metal servers. The method for enabling bare metal servers to access the VPC includes:
[0006] The network type of the VPC is detected using the SDN;
[0007] When the network type of the VPC is Virtual Extended Local Area Network (VXLAN), the OVS and the TOR are determined to be VXLAN gateways.
[0008] The bare metal server is connected to the TOR in an untagged manner. The configuration of the VXLAN is converted from the untagged information and sent to the TOR through the open-source virtual switch database OVSDB protocol.
[0009] The virtual device is determined to be connected to the OVS via a local private virtual local area network (VLAN), and the OVS issues a flow table configuration to transfer the local private VLAN to the VXLAN.
[0010] According to the present invention, a method for implementing bare metal server access to a VPC includes, after detecting the network type of the VPC through the SDN, the method further includes:
[0011] If the network type of the VPC is VLAN, then the OVS and the TOR are determined to be VLAN gateways;
[0012] The bare metal server is connected to the TOR via the UNTAG method, and the configuration for converting the UNTAG into the VLAN is sent to the TOR via the Secure Shell SSH protocol;
[0013] The virtual device is determined to be connected to the OVS via a local private VLAN in a virtual local area network. The OVS then issues a flow table configuration to transfer the local private VLAN to the VLAN.
[0014] According to the present invention, a method for implementing bare metal server access to a VPC includes, prior to detecting the network type of the VPC via the SDN, the following steps:
[0015] Create a VLAN-type VPC network or a VXLAN-type VPC network;
[0016] The bare metal server and virtual device are instantiated based on the VPC network; the virtual device includes a virtual machine or a virtual gateway.
[0017] According to a method for implementing bare-metal server access to a VPC provided by the present invention, the step of sending the UNTAG to the TOR via the open-source virtual switch database OVSDB protocol to convert the configuration into the VXLAN configuration includes:
[0018] The MAC table of the virtual device is sent to the TOR;
[0019] If the MAC address of the virtual device is detected locally by the TOR, it is determined that the bare metal server and the virtual device communicate directly via VXLAN.
[0020] According to a method for implementing bare metal server access to a VPC provided by the present invention, the step of sending the Media Access Control Address (MAC) table of the virtual device to the TOR includes:
[0021] If the MAC address of the virtual device is not detected locally by the TOR, a broadcast frame is sent via the Address Resolution Protocol (ARP).
[0022] The MAC address of the virtual device is located based on the broadcast frame;
[0023] If the MAC address of the virtual device is found, it is determined that the bare metal server communicates with the virtual device via VXLAN.
[0024] According to the present invention, a method for implementing bare metal server access to VPC includes determining that the virtual device is accessed by the OVS via a local private virtual local area network (VLAN), issuing a flow table configuration for the local private VLAN to VXLAN in the OVS, and then including:
[0025] If the bare metal server successfully connects to the VPC, it is determined that the virtual device under the VPC and the bare metal server perform heterogeneous VXLAN communication.
[0026] According to a method for implementing bare metal server access to a VPC provided by the present invention, the method further includes determining that the virtual device is accessed by the OVS in the form of a local private VLAN in a virtual local area network, issuing a flow table configuration for the local private VLAN to the VXLAN in the OVS, and then further including:
[0027] The configuration information stored in the SDN is checked to see if it is consistent with the configuration information of the OVS, and a first detection result is obtained; the configuration information stored in the SDN is checked to see if it is consistent with the configuration information of the TOR, and a second detection result is obtained; if the first detection result is inconsistent, the configuration information of the OVS is updated.
[0028] If the second detection result is inconsistent, update the configuration information of the TOR.
[0029] The present invention also provides an apparatus for implementing bare metal server access to VPC, comprising:
[0030] The network type detection module is used to detect the network type of a VPC via SDN.
[0031] The VXLAN gateway determination module is used to determine OVS and TOR as VXLAN gateways when the network type of the VPC is Virtual Extended Local Area Network (VXLAN).
[0032] The first conversion configuration distribution module is used to determine that the bare metal server is connected to the TOR in a UNTAG-free manner, and to distribute the UNTAG to the TOR for conversion to the VXLAN via the open-source virtual switch database OVSDB protocol;
[0033] The second conversion configuration distribution module is used to determine that the virtual device is accessed by the OVS in the form of a local private virtual local area network (VLAN), and to distribute the flow table configuration of the local private VLAN to the VXLAN to the OVS.
[0034] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the bare metal server accessing the VPC as described above.
[0035] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the bare metal server access to VPC implementation method as described above.
[0036] This invention provides a method, apparatus, device, and medium for bare-metal servers to access a VPC. It detects the VPC's network type using SDN. When the VPC's network type is VXLAN, OVS and TOR act as VXLAN gateways. The bare-metal server connects to TOR via UNTAG, and the OVSDB protocol is used to send UNTAG to VXLAN configuration to TOR. Virtual devices connect to OVS via local private VLANs, and OVS sends flow table configurations for local private VLANs to VXLAN. The bare-metal server access method provided in this application can automatically connect bare-metal servers to both VLAN and VXLAN VPC networks to adapt to different application scenarios, thereby improving edge computing performance. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0038] Figure 1 This is one of the flowcharts illustrating the implementation method of bare metal server accessing VPC provided by the present invention;
[0039] Figure 2 This is the second flowchart illustrating the implementation method of bare metal server accessing VPC provided by the present invention;
[0040] Figure 3 This is the third flowchart illustrating the implementation method of bare metal server accessing VPC provided by the present invention;
[0041] Figure 4 This is the fourth flowchart illustrating the implementation method of bare metal server accessing VPC provided by the present invention;
[0042] Figure 5This is a schematic diagram of the overall process of the bare metal server accessing VPC provided by the present invention;
[0043] Figure 6 This is a schematic diagram of the structure of the device for implementing bare metal server access to VPC provided by the present invention;
[0044] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0046] The following is combined Figures 1-7 This invention describes a method, apparatus, device, storage medium, and computer program product for implementing bare metal server access to a VPC.
[0047] Please refer to Figure 1 This invention provides a method for implementing bare metal server access to a VPC, comprising:
[0048] Step 100: Detect the network type of the VPC using the SDN;
[0049] Specifically, based on the content mentioned in the background section above that "different VPC network types have different application scenarios", the bare metal server access method of the present invention first detects the network type of the VPC through Software Defined Network (SDN). Here, VPC can also be called a logically isolated network space. The network types of VPC include two types: Virtual Local Area Network (VLAN) and Virtual eXtensible Local Area Network (VXLAN).
[0050] Step 200: If the network type of the VPC is Virtual Extended Local Area Network (VXLAN), determine that the OVS and the TOR are VXLAN gateways;
[0051] In a VPC with VXLAN as the network type, a soft switch (Open vSwitch, OVS) is used as the VXLAN gateway for the virtual device; and an access switch (Top of Rack, TOR) is used as the VXLAN gateway for the bare metal server. The OVS virtual switch supports multiple standard management interfaces and protocols, including SDN, and is suitable for various virtualization architectures. TOR refers to deploying switches on a server rack, with servers directly connected to the switches in that rack, enabling interconnection between servers and switches within the rack. Switches deployed in a server rack using the TOR configuration are called TOR switches.
[0052] Step 300: Determine that the bare metal server is connected to the TOR in an untagged manner, and issue the configuration of converting the untagged information into the VXLAN to the TOR through the open-source virtual switch database OVSDB protocol;
[0053] When the VPC network type is VXLAN, the bare metal server connects to the TOR using an untagged packet. SDN uses the Open vSwitch Database (OVSDB) protocol to convert the bare metal server's UNTAG packets into VXLAN configuration information on the TOR. When the bare metal server sends an UNTAG packet to the TOR, the TOR converts it into a VXLAN packet, enabling the bare metal server to communicate directly with virtual devices over the VXLAN network, thus achieving heterogeneous interoperability between virtual devices and bare metal servers within the VPC (VXLAN network type).
[0054] Step 400: Determine that the virtual device is connected to the OVS in the form of a local private virtual local area network (VLAN), and issue the flow table configuration of the local private VLAN to the VXLAN to the OVS.
[0055] When the VPC network type is VXLAN, virtual devices connect to OVS via local private VLANs. OVS converts the virtual device's local private VLAN packets into VXLAN flow table configuration information. When the virtual device sends VLAN packets to OVS, OVS converts these packets into VXLAN packets, enabling the virtual device to communicate directly with the bare metal server over the VXLAN network, thus achieving heterogeneous interoperability between the virtual device and the bare metal server within the VPC (VXLAN network type).
[0056] This embodiment detects the VPC network type via SDN. When the VPC network type is VXLAN, OVS and TOR act as VXLAN gateways. The bare metal server connects to TOR via UNTAG, and the OVSDB protocol is used to send UNTAG to VXLAN configuration to TOR. The virtual device connects to OVS via a local private VLAN, and the OVS sends flow table configuration to VXLAN for local private VLAN conversion. The bare metal server access method provided in this application can automatically connect bare metal servers to both VLAN and VXLAN VPC networks to adapt to different application scenarios, thereby improving edge computing performance.
[0057] Please refer to Figure 2 In one embodiment, the method for implementing bare metal server access to a VPC provided in this application may further include:
[0058] Step 500: If the network type of the VPC is VLAN, determine that the OVS and the TOR are VLAN gateways;
[0059] Step 600: Determine that the bare metal server is connected to the TOR in the manner of the UNTAG, and send the configuration of converting the UNTAG to the VLAN to the TOR through the Secure Shell SSH protocol;
[0060] Step 700: Determine that the virtual device is connected to the OVS in the form of a local private VLAN, and issue the flow table configuration of the local private VLAN to the VLAN to the OVS.
[0061] Specifically, when the VPC network type is VLAN, SDN uniformly distributes VLAN configurations on both the TOR and OVS, achieving unified VLAN configuration for the uplink of virtual devices to OVS and the uplink of bare metal servers to the TOR, ensuring that the bare metal servers and cloud virtual devices are in the same VLAN. The OVS acts as the VLAN gateway for the virtual devices; the TOR acts as the VLAN gateway for the bare metal servers. The bare metal servers connect to the TOR via VLAN, the virtual devices connect to the OVS via VLAN, and both the bare metal servers and virtual devices connect to their respective switches using the same VLAN. The bare metal servers and virtual devices communicate heterogeneously through VLAN packets.
[0062] The bare metal server access method provided in this embodiment enables automatic access of bare metal servers with VLAN network type under VPC to adapt to corresponding application scenarios, thereby improving edge computing performance.
[0063] In one embodiment, the method for implementing bare metal server access to a VPC provided in this application may further include:
[0064] Step 10: Create a VLAN-type VPC network or a VXLAN-type VPC network;
[0065] Step 20: Instantiate the bare metal server and virtual device based on the VPC network; the virtual device includes a virtual machine or a virtual gateway.
[0066] Specifically, before executing step 100 in the bare metal server access VPC implementation method proposed in this invention, it is first necessary to create a VLAN-type VPC network or a VXLAN-type VPC network to facilitate the issuance of different conversion configuration information to OVS and TOR under different VPC network types. Then, the bare metal server and virtual devices are instantiated based on the VPC network, wherein the virtual devices include virtual machines or virtual gateways.
[0067] This embodiment lays the foundation for enabling bare metal servers to access VPCs of different network types by creating different types of VPC networks and instantiating bare metal servers and virtual devices.
[0068] In one embodiment, the method for implementing bare metal server access to a VPC provided in this application may further include:
[0069] Step 800: Send the Media Access Control Address (MAC) table of the virtual device to the TOR;
[0070] Step 900: If the MAC address of the virtual device is detected locally by the TOR, it is determined that the bare metal server and the virtual device directly communicate via VXLAN.
[0071] Please refer to Figure 3 In one embodiment, the method for implementing bare metal server access to a VPC provided in this application may further include:
[0072] Step 1000: If the MAC address of the virtual device is not detected locally by the TOR, a broadcast frame is sent via Address Resolution Protocol (ARP).
[0073] Step 1100: Find the MAC address of the virtual device based on the broadcast frame;
[0074] Step 1200: If the MAC address of the virtual device is found, determine that the bare metal server and the virtual device are communicating via VXLAN.
[0075] Specifically, after the VXLAN configuration is translated by UNTAG on the TOR via the OVSDB protocol, the Media Access Control Address (MAC) table of the virtual device is sent to the TOR to avoid Address Resolution Protocol (ARP) broadcast storms during VXLAN communication. The specific process is as follows:
[0076] When the MAC address of a virtual device under a VPC is sent to the TOR, if the bare metal server detects that the MAC address of the virtual device on the communication peer already exists locally when communicating with the virtual device, there is no need to send broadcast frames via ARP to find the MAC address of the virtual device on the communication peer. Therefore, ARP broadcast storms can be avoided during VXLAN communication.
[0077] This embodiment avoids ARP broadcast storms during VXLAN communication by distributing the MAC address of the virtual device.
[0078] In one embodiment, the method for implementing bare metal server access to a VPC provided in this application may further include:
[0079] Step 1300: If the bare metal server successfully connects to the VPC, determine that the virtual device and the bare metal server under the VPC are communicating via heterogeneous VXLAN.
[0080] Please refer to Figure 4 In one embodiment, the method for implementing bare metal server access to a VPC provided in this application may further include:
[0081] Step 1400: The configuration information stored in the SDN is checked to see if it is consistent with the configuration information of the OVS, and a first detection result is obtained;
[0082] Step 1500: The configuration information stored by the SDN is consistent with the configuration information of the TOR to obtain a second detection result;
[0083] Step 1600: If the first detection result is inconsistent, update the configuration information of the OVS;
[0084] Step 1700: If the second detection result is inconsistent, update the configuration information of the TOR.
[0085] Specifically, after the UNTAG-to-VXLAN configuration is sent to the TOR and the VLAN-to-VXLAN flow table configuration is sent to the OVS, the bare metal server successfully connects to the VPC, enabling heterogeneous communication between virtual devices and bare metal servers within the VPC. Simultaneously, SDN monitors the storage configuration information in real time to ensure consistency with the actual configuration on OVS and the TOR. If the storage configuration information is inconsistent with the actual configuration on OVS, the configuration on OVS is updated; similarly, if the storage configuration information is inconsistent with the actual configuration on TOR, the configuration on TOR is updated. The purpose of these updates is to ensure that the storage configuration information is consistent with the actual configuration on either OVS or TOR.
[0086] like Figure 5 As shown, in order to better understand the logical relationship between the above steps of the present invention, the present invention provides a schematic diagram of the overall process of the implementation method of bare metal server accessing VPC.
[0087] This embodiment ensures the consistency between the stored configuration information and the actual configuration information on OVS or TOR by monitoring the configuration information.
[0088] Please refer to Figure 6 The present invention also provides an implementation device for bare metal server access to VPC. The implementation device for bare metal server access to VPC provided by the present invention will be described below. The implementation device for bare metal server access to VPC described below can be referred to in correspondence with the implementation method for bare metal server access to VPC described above.
[0089] Network type detection module 601 is used to detect the network type of a VPC via SDN.
[0090] VXLAN gateway determination module 602 is used to determine OVS and TOR as VXLAN gateways when the network type of the VPC is Virtual Extended Local Area Network (VXLAN).
[0091] The first conversion configuration distribution module 603 is used to determine that the bare metal server is connected to the TOR in a UNTAG-free manner, and to distribute the UNTAG to the TOR to convert the configuration of the VXLAN through the open-source virtual switch database OVSDB protocol;
[0092] The second conversion configuration distribution module 604 is used to determine that the virtual device is accessed by the OVS in the form of a local private virtual local area network (VLAN), and to distribute the flow table configuration of the local private VLAN to the VXLAN to the OVS.
[0093] Optionally, the apparatus for implementing bare metal server access to VPC further includes:
[0094] The VLAN gateway determination module is used to determine that the OVS and the TOR are VLAN gateways when the network type of the VPC is VLAN;
[0095] The TOR module is used to determine that the bare metal server is connected to the TOR in the manner of the UNTAG, and to send the configuration of converting the UNTAG to the VLAN to the TOR via the Secure Shell SSH protocol;
[0096] The OVS access module is used to determine that the virtual device is connected to the OVS in the form of a local private VLAN, and to issue the flow table configuration of the local private VLAN to the VLAN under the OVS.
[0097] Optionally, the apparatus for implementing bare metal server access to VPC further includes:
[0098] A multi-type VPC network creation module is used to create VLAN-type VPC networks or VXLAN-type VPC networks; an instantiation module is used to instantiate the bare metal server and virtual devices based on the VPC network; the virtual devices include virtual machines or virtual gateways.
[0099] Optionally, the apparatus for implementing bare metal server access to VPC further includes:
[0100] The MAC table distribution module is used to distribute the Media Access Control Address (MAC) table of the virtual device to the TOR; the VXLAN communication module is used to determine that the bare metal server and the virtual device can directly communicate via VXLAN when the TOR detects the MAC address of the virtual device locally.
[0101] Optionally, the apparatus for implementing bare metal server access to VPC further includes:
[0102] The broadcast frame sending module is used to send broadcast frames via Address Resolution Protocol (ARP) when the MAC address of the virtual device is not detected locally by the TOR.
[0103] A MAC address lookup module is used to look up the MAC address of the virtual device based on the broadcast frame.
[0104] The VXLAN communication module is used to determine whether the bare metal server and the virtual device can communicate via VXLAN when the MAC address of the virtual device is found.
[0105] Optionally, the apparatus for implementing bare metal server access to VPC further includes:
[0106] A heterogeneous VXLAN communication module is used to determine, when the bare metal server successfully connects to the VPC, that the virtual device under the VPC and the bare metal server are conducting heterogeneous VXLAN communication.
[0107] Optionally, the apparatus for implementing bare metal server access to VPC further includes:
[0108] The first detection result determination module is used to determine whether the configuration information stored in the SDN is consistent with the configuration information of the OVS, and obtain the first detection result.
[0109] The second detection result determination module is used to determine whether the configuration information stored in the SDN is consistent with the configuration information of the TOR, and to obtain the second detection result.
[0110] The OVS configuration information update module is used to update the OVS configuration information when the first detection result is inconsistent.
[0111] The TOR configuration information update module is used to update the TOR configuration information when the second detection result is inconsistent.
[0112] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 can call logical instructions in the memory 730 to execute a method for bare metal server accessing a VPC. This method includes: detecting the network type of the VPC through the SDN; if the network type of the VPC is a Virtual Extended Local Area Network (VXLAN), determining that the OVS and the TOR are VXLAN gateways; determining that the bare metal server accesses the TOR in an untagged manner, and issuing a configuration to the TOR to convert the untagged information to VXLAN through the Open Source Virtual Switch Database (OVSDB) protocol; determining that the virtual device accesses the OVS in a local private virtual local area network (VLAN), and issuing a flow table configuration to the OVS to convert the local private VLAN to VXLAN.
[0113] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0114] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the implementation method for bare metal server accessing VPC provided by the above methods. The method includes: detecting the network type of the VPC through the SDN; if the network type of the VPC is Virtual Extended Local Area Network (VXLAN), determining that the OVS and the TOR are VXLAN gateways; determining that the bare metal server accesses the TOR in an untagged manner, and issuing the configuration for converting the untagged information to the VXLAN to the TOR through the Open Source Virtual Switch Database (OVSDB) protocol; determining that the virtual device accesses the OVS in a local private virtual local area network (VLAN), and issuing the flow table configuration for converting the local private VLAN to the VXLAN to the OVS.
[0115] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for accessing a bare metal server to a VPC provided by the above methods. This method includes: detecting the network type of the VPC via the SDN; if the network type of the VPC is a Virtual Extended Local Area Network (VXLAN), determining that the OVS and the TOR are VXLAN gateways; determining that the bare metal server accesses the TOR in an untagged manner, and issuing a configuration to the TOR to convert the untagged information to VXLAN via the Open Source Virtual Switch Database (OVSDB) protocol; determining that the virtual device accesses the OVS in a local private virtual local area network (VLAN), and issuing a flow table configuration to the OVS to convert the local private VLAN to VXLAN.
[0116] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0117] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An implementation method for accessing VPC by bare metal server, characterized in that, The application is applied to a target system, and the target system includes a software defined network (SDN), a virtual private cloud (VPC), a soft switch (OVS), an access switch (TOR), a virtual device, and a bare metal server; and the method for implementing the bare metal server to access the VPC comprises the following steps: detecting a network type of the VPC through the SDN; in a case where the network type of the VPC is a virtual extension local area network (VXLAN), determining that the OVS and the TOR are VXLAN gateways; determining that the bare metal server accesses the TOR in an untagged (UNTAG) manner, and issuing a configuration of converting the UNTAG into the VXLAN to the TOR through an open source virtual switch database (OVSDB) protocol; determining that the virtual device accesses the OVS in a local private virtual local area network (VLAN) manner, and issuing a flow table configuration of converting the local private VLAN into the VXLAN to the OVS; the step of detecting the network type of the VPC through the SDN further comprises the following steps: in a case where the network type of the VPC is a VLAN, determining that the OVS and the TOR are VLAN gateways; determining that the bare metal server accesses the TOR in the UNTAG manner, and issuing a configuration of converting the UNTAG into the VLAN to the TOR through a secure shell (SSH) protocol; determining that the virtual device accesses the OVS in the local private VLAN manner, and issuing a flow table configuration of converting the local private VLAN into the VLAN to the OVS; the step of issuing the configuration of converting the UNTAG into the VXLAN to the TOR through the OVSDB protocol further comprises the following steps: issuing a media access control (MAC) table of the virtual device to the TOR; in a case where the TOR locally detects a MAC address of the virtual device, determining that the bare metal server directly communicates with the virtual device in the VXLAN; the step of issuing the MAC table of the virtual device to the TOR further comprises the following steps: in a case where the TOR does not locally detect the MAC address of the virtual device, sending a broadcast frame through an address resolution protocol (ARP); finding the MAC address of the virtual device based on the broadcast frame; in a case where the MAC address of the virtual device is found, determining that the bare metal server communicates with the virtual device in the VXLAN. 2.The method of claim 1, wherein, the step of detecting the network type of the VPC through the SDN further comprises the following steps: creating a VPC network of a VLAN type or a VPC network of a VXLAN type; instantiating the bare metal server and a virtual device based on the VPC network; the virtual device includes a virtual machine or a virtual gateway. 3.The method of claim 1, wherein, the step of determining that the virtual device accesses the OVS in the local private VLAN manner, and issuing the flow table configuration of converting the local private VLAN into the VXLAN to the OVS further comprises the following steps: In a case that the bare metal server successfully accesses the VPC, it is determined that the virtual device and the bare metal server perform heterogeneous VXLAN communication under the VPC. 4.The method of claim 1, wherein, The determining the virtual device to access the OVS in a local private virtual local area network (VLAN) manner, and the OVS issuing a flow table configuration of converting the local private VLAN to the VXLAN, further includes: obtaining a first detection result by detecting whether the stored configuration information is consistent with the configuration information of the OVS through the SDN; obtaining a second detection result by detecting whether the stored configuration information is consistent with the configuration information of the TOR through the SDN; in a case that the first detection result is inconsistent, updating the configuration information of the OVS; in a case that the second detection result is inconsistent, updating the configuration information of the TOR. 5.An apparatus for implementing access of a bare metal server to a VPC, characterized in that, The apparatus is used to perform the implementation method of the bare metal server accessing the VPC according to any one of claims 1 to 4, and includes: a network type detection module configured to detect a network type of the VPC through an SDN; a VXLAN gateway determination module configured to, in a case that the network type of the VPC is a virtual extended local area network (VXLAN), determine that the OVS and the TOR are VXLAN gateways; a first conversion configuration issuing module configured to determine that the bare metal server accesses the TOR in an untagged (UNTAG) manner, and issue a configuration of converting the UNTAG to the VXLAN in the TOR through an open virtual switch database (OVSDB) protocol; a second conversion configuration issuing module configured to determine that the virtual device accesses the OVS in a local private virtual local area network (VLAN) manner, and issue a flow table configuration of converting the local private VLAN to the VXLAN in the OVS.
6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the implementation method of the bare metal server accessing the VPC according to any one of claims 1 to 4 when executing the program. 7.A non-transitory computer-readable storage medium having stored thereon a computer program. The computer program implements the implementation method of the bare metal server accessing the VPC according to any one of claims 1 to 4 when executed by the processor.
Citation Information
Patent Citations
Method for intercommunication of bare metal server and cloud host network and switch
CN109495405A
Virtual network configuration method and system of bare metal server and intelligent network card
CN114070723A