Bare metal deployment method and apparatus based on three-layer network, and device and medium

By adopting a three-layer network structure and DHCP protocol in bare metal deployment, the problem of traditional two-layer network limiting cluster size is solved, achieving larger cluster support capabilities and reducing maintenance costs.

WO2024217061A1PCT designated stage expired Publication Date: 2024-10-24CHINA TELECOM CLOUD TECH CO LTD

Patent Information

Application Number
PCT/CN2023/143325
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-12
Filing Date
2023-12-29
Publication Date
2024-10-24

AI Technical Summary

Technical Problem

Traditional two-tier networks limit the scale of bare metal clusters, resulting in insufficient support capabilities for large-scale deployment.

Method used

Adopting a three-layer network structure, through Dynamic Host Configuration Protocol (DHCP) and cross-segment routing, cross-conflict domain communication between bare metal servers is achieved, improving cluster scale and support capabilities.

Benefits of technology

It achieves scale expansion of bare metal clusters, enhances support capabilities in ultra-large cluster scenarios, and reduces maintenance costs and resource overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023143325_24102024_PF_FP_ABST
    Figure CN2023143325_24102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of software development. In particular, disclosed are a bare metal deployment method and apparatus based on a three-layer network, and a device and a medium. In the present application, a deployment network of bare metal is divided into three layers, and is not limited to a traditional two-layer network architecture, and the capability of supporting a large scale of a cluster is improved at a network level, such that the problem of the scale of a bare metal cluster being limited is solved, the scale of a bare metal server can be greatly increased, and the support capability in an ultra-large cluster scenario is enhanced; in addition, a leaf is used as a unit to divide a three-layer network, such that a cluster deployment mode is more flexible; and leaves are mutually independent, and during subsequent capacity expansion, capacity expansion only needs to be performed on a corresponding bare metal cluster according to a leaf, thereby guaranteeing that the cluster is capacity-expandable and is prone to capacity expansion. Moreover, by means of a customized DHCP, cross-conflict-domain communication of the bare metal in an ultra-large cluster scale is realized; and only one set of DHCP services needs to be used under one cluster, thereby reducing the maintenance costs and the resource overheads.
Need to check novelty before this filing date? Find Prior Art

Description

Bare metal deployment method, device, equipment and medium based on three-layer network Technical Field

[0001] The present application relates to the field of software development technology, and in particular to a bare metal deployment method, apparatus, computer equipment, and storage medium based on a three-tier network. Background Art

[0002] In traditional bare metal scenarios, bare metal is typically deployed within a single Layer 2 network, allowing for inter-metal communication. Layer 2 networks can achieve communication solely through MAC addressing, but only within the same collision domain. Due to the inherent limitations of Layer 2 networks, a cluster can only support approximately 10,000 server nodes, limiting the scale of bare metal clusters. Therefore, increasing the scale of bare metal clusters has become a pressing issue.

[0003] Summary of the Invention

[0004] The present application provides a bare metal deployment method, apparatus, computer equipment, and storage medium based on a three-tier network to increase the scale of a bare metal cluster.

[0005] In a first aspect, the present application provides a bare metal deployment method based on a three-layer network, the method comprising:

[0006] Upon receiving the deployment instruction of the bare metal service, initiating a first dynamic host configuration protocol (DHCP) request based on the bare metal server in the bare metal service deployment system;

[0007] receiving the first DHCP request based on the uplink switch, and obtaining a response result of the first DHCP request based on the DHCP server;

[0008] Based on the bare metal server and the response result, configure an IP address and cross-segment routing;

[0009] Based on the IP address, the cross-segment route, and the image file address in the response result, the image file is requested from the image server, and the image file is installed to complete the bare metal deployment.

[0010] Furthermore, upon receiving the deployment instruction of the bare metal service, before initiating the first dynamic host configuration protocol DHCP request based on the bare metal server in the bare metal service deployment system, the method further includes:

[0011] Based on the aggregation switch, the uplink switch, the DHCP server and the bare metal server, a bare metal service deployment system based on a three-layer network structure is generated.

[0012] Furthermore, the aggregation switch is used to implement communication between the uplink switch, the DHCP server and the bare metal server.

[0013] Further, the receiving the first DHCP request based on the uplink switch and obtaining a response result of the first DHCP request based on the DHCP server includes:

[0014] The uplink switch receives the first DHCP request and adds the target gateway address to the first DHCP request to obtain a second DHCP request;

[0015] Based on the second DHCP request, obtaining an available IP address to be used;

[0016] Generate a response result of the first DHCP request based on the mirror file address and the IP address to be used;

[0017] Based on the DHCP server, a response result of the first DHCP request is returned to the bare metal server.

[0018] Furthermore, obtaining an available IP address to be used based on the second DHCP request includes:

[0019] forwarding the second DHCP request to a DHCP server based on the uplink switch;

[0020] parsing the second DHCP request based on the DHCP server, obtaining the target gateway address, and querying whether there is an address pool corresponding to the target gateway address in a database;

[0021] When there is an address pool corresponding to the target gateway address, the IP address to be used is obtained from the address pool.

[0022] Furthermore, after querying the database to see whether there is an address pool corresponding to the target gateway address, the method further includes:

[0023] When the address pool corresponding to the target gateway address does not exist in the database, obtaining a configuration file;

[0024] Based on the configuration file, obtaining the total classless inter-domain routes (cidr) and the length of the address segments corresponding to the target deployment network;

[0025] Based on the total cidr and the partition length, an address pool corresponding to the target gateway address is obtained, so as to obtain the IP address to be used from the address pool.

[0026] Furthermore, obtaining the address pool corresponding to the target gateway address based on the total cidr and the partition length includes:

[0027] Based on the division length, dividing the total cidr into at least one sub-address segment;

[0028] The last sub-address segment in at least one of the sub-address segments is used as the address pool corresponding to the target gateway address, and the corresponding relationship between the target gateway address and the last sub-address segment in the sub-address segments is stored in the database.

[0029] In a second aspect, the present application further provides a bare metal deployment device based on a three-layer network, the device comprising:

[0030] A first DHCP request initiating module is configured to initiate a first Dynamic Host Configuration Protocol (DHCP) request based on a bare metal server in the bare metal service deployment system upon receiving a deployment instruction of the bare metal service;

[0031] a response result obtaining module, configured to receive the first DHCP request based on the uplink switch, and obtain a response result of the first DHCP request based on the DHCP server;

[0032] A configuration module, configured to configure an IP address and cross-segment routing based on the bare metal server and the response result;

[0033] The image file installation module is used to request the image file from the image server based on the IP address, the cross-segment route, and the image file address in the response result, and install the image file to complete the bare metal deployment.

[0034] In a third aspect, the present application also provides a computer device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the bare metal deployment method based on the three-layer network as described above when executing the computer program.

[0035] In a fourth aspect, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the bare metal deployment method based on the three-layer network as described above.

[0036] The present application discloses a bare metal deployment method, device, computer equipment and storage medium based on a three-layer network. When receiving a deployment instruction of a bare metal service, a first dynamic host configuration protocol (DHCP) request is initiated based on a bare metal server in a bare metal service deployment system; the first DHCP request is received based on an uplink switch, and a response result of the first DHCP request is obtained based on a DHCP server; an IP address and a cross-segment route are configured based on the bare metal server and the response result; based on the IP address, the cross-segment route and the image file address in the response result, an image file is requested from the image server, and the image file is installed to complete the bare metal deployment. The bare metal service deployment system of the present application is based on a three-layer network. By three-layering the bare metal deployment network, the three-layer network needs to realize cross-segment communication through IP routing, so it can cross multiple conflict domains and improve the large-scale support capability of the cluster at the network level, thereby solving the problem of limited scale of the bare metal cluster, greatly increasing the scale of the bare metal server, and enhancing the support capability in the ultra-large cluster scenario. On the other hand, customized DHCP is used to achieve bare metal cross-collision domain communication in ultra-large clusters; only one set of DHCP services is needed in a cluster, reducing maintenance costs and resource overhead. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0038] FIG1 is a schematic flow chart of a first embodiment of a bare metal deployment method based on a three-tier network provided by an embodiment of the present application;

[0039] FIG2 is a bare metal deployment flow chart of a bare metal deployment method based on a three-tier network provided in an embodiment of the present application;

[0040] FIG3 is a bare metal three-tier network architecture diagram of a bare metal deployment method based on a three-tier network provided in an embodiment of the present application;

[0041] FIG4 is a schematic flow chart of a second embodiment of a bare metal deployment method based on a three-tier network provided in an embodiment of the present application;

[0042] FIG5 is a DHCP service initialization process of a bare metal deployment method based on a three-layer network provided by an embodiment of the present application;

[0043] FIG6 is a schematic block diagram of a bare metal deployment device based on a three-layer network provided by an embodiment of the present application;

[0044] FIG7 is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0046] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0047] It should be understood that the terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0048] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0049] Embodiments of the present application provide a bare metal deployment method, apparatus, computer device, and storage medium based on a three-tier network. The bare metal deployment method based on a three-tier network can be applied to servers, deploying bare metal services through a three-tier network structure and increasing the scale of bare metal clusters. The servers can be standalone servers or server clusters.

[0050] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.

[0051] Please refer to Figure 1, which is a schematic flow chart of a bare metal deployment method based on a three-tier network provided in an embodiment of the present application. This bare metal deployment method based on a three-tier network can be applied to servers to deploy bare metal services through a three-tier network structure, thereby increasing the scale of bare metal clusters.

[0052] As shown in FIG1 , the bare metal deployment method based on a three-layer network specifically includes steps S101 to S104 .

[0053] S101: upon receiving a deployment instruction for a bare metal service, initiating a first dynamic host configuration protocol (DHCP) request based on a bare metal server in a bare metal service deployment system;

[0054] In a specific embodiment, as shown in FIG2 , when the bare metal server initiates a DHCP request through port 67, the gateway address will be added to the corresponding request when the request passes through the upstream leaf, and the request will be forwarded to the DHCP service address.

[0055] Furthermore, when receiving the deployment instruction of the bare metal service, before initiating the first dynamic host configuration protocol DHCP request based on the bare metal server in the bare metal service deployment system, it also includes: generating a bare metal service deployment system based on a three-layer network structure based on the aggregation switch, the uplink switch, the DHCP server and the bare metal server.

[0056] Furthermore, the aggregation switch is used to implement communication between the uplink switch, the DHCP server and the bare metal server.

[0057] In one embodiment, as shown in Figure 3, the deployment system architecture of the bare metal service is roughly as follows:

[0058] 1. Each leaf node is connected to a set of switches, and the switches are connected to the corresponding bare metal servers.

[0059] 2. Machines under different leaf nodes need to communicate through the aggregation switch.

[0060] 3. Configure the switch for each leaf group with a gateway address that has a deployment network IP address set, such as 192.168.64.0 / 26. Also, set the corresponding DHCP (Dynamic Host Configuration Protocol) server addresses on the switch, such as 192.168.0.1 and 192.168.0.2.

[0061] In one embodiment, a group of bare metal servers are placed under a single leaf, forming a two-tier network. Bare metal servers under different leaves are then grouped into a three-tier network. This three-tier network solution addresses the issue of bare metal servers being unable to support large-scale usage scenarios.

[0062] S102: receiving the first DHCP request based on the uplink switch, and obtaining a response result of the first DHCP request based on the DHCP server;

[0063] In one embodiment, after receiving the request, the uplink switch first modifies the corresponding request packet by adding the target gateway address, and then forwards it to the corresponding configured DHCP server according to the configuration of the switch.

[0064] In one embodiment, as shown in Figure 2, upon receiving the first DHCP request, the DHCP server parses the DHCP packet to obtain the corresponding gateway address. It then queries the database to see if the relay IP address corresponding to the gateway address exists in the corresponding IP address pool. If so, it retrieves the corresponding available IP address from the IP address pool. After obtaining the IP address, it adds the corresponding gateway address to the routing information returned by the DHCP server, along with the mirror path to be returned. The response to the first DHCP request is then returned to the bare metal server.

[0065] S103. Based on the bare metal server and the response result, configure an IP address and cross-segment routing;

[0066] In one embodiment, after receiving the response result of the first DHCP request, the bare metal server configures an IP address and cross-segment routing.

[0067] In a specific embodiment, when the bare metal server's online switch obtains the DHCP return result, it forwards the corresponding request to the bare metal's port 68. After obtaining the DHCP return result, the bare metal server configures an IP address and configures cross-segment routing.

[0068] S104: Based on the IP address, the cross-segment route, and the image file address in the response result, request the image file from the image server, and install the image file to complete the bare metal deployment.

[0069] In one embodiment, the image file is requested through the image file address returned by the first DHCP request to complete the bare metal deployment initialization process.

[0070] Please refer to Figure 4, which is a schematic flow chart of a bare metal deployment method based on a three-tier network provided in an embodiment of the present application. This bare metal deployment method based on a three-tier network can be applied to servers to deploy bare metal services through a three-tier network structure, thereby increasing the scale of bare metal clusters.

[0071] As shown in FIG4 , the bare metal deployment method based on a three-layer network specifically includes steps S201 to S204 .

[0072] S201: Receive the first DHCP request based on the uplink switch, and add the target gateway address to the first DHCP request to obtain a second DHCP request;

[0073] S202: Based on the second DHCP request, obtain an available IP address to be used;

[0074] Furthermore, obtaining an available IP address to be used based on the second DHCP request includes: forwarding the second DHCP request to a DHCP server based on the uplink switch; parsing the second DHCP request based on the DHCP server to obtain the target gateway address, and querying a database to see whether there is an address pool corresponding to the target gateway address; when an address pool corresponding to the target gateway address exists, obtaining the IP address to be used from the address pool.

[0075] Furthermore, after querying whether there is an address pool corresponding to the target gateway address in the database, it also includes: when there is no address pool corresponding to the target gateway address in the database, obtaining a configuration file; based on the configuration file, obtaining the total classless inter-domain routing cidr and the division length of the address segment corresponding to the target deployment network; based on the total cidr and the division length, obtaining the address pool corresponding to the target gateway address, so as to obtain the IP address to be used from the address pool.

[0076] Furthermore, the address pool corresponding to the target gateway address is obtained based on the total CIDR and the division length, including: dividing the total CIDR into at least one sub-address segment based on the division length; using the last sub-address segment in at least one of the sub-address segments as the address pool corresponding to the target gateway address, and storing the correspondence between the target gateway address and the last sub-address segment in the sub-address segments in the database.

[0077] In one embodiment, as shown in Figure 5, it is determined whether there is IP address pool information corresponding to the target gateway in the database. If there is, the service is started directly. If not, the IP pool is initialized, the configuration file is obtained, and the deployment network IP cidr that needs to be configured, such as 192.168.0.0 / 18, and the length configuration that needs to be split, such as 26 bits, are obtained. According to the total cidr and address segment length of the configuration, the IP address pool can be split into 192.168.0.0 / 26 and 192.168.0.63 / 26, etc. At the same time, the last sub-address segment is set as a relay IP (i.e., the address pool corresponding to the target gateway address), such as 192.168.0.62. The remaining available IPs are stored in the database as an allocable IP address pool.

[0078] S203: Generate a response result of the first DHCP request based on the mirror file address and the IP address to be used;

[0079] S204: Based on the DHCP server, a response result of the first DHCP request is returned to the bare metal server.

[0080] In one embodiment, when DHCP receives the second DHCP request, it parses the DHCP packet to obtain the corresponding gateway address. It then queries the database to see if the relay IP address corresponding to the gateway address exists in the corresponding IP address pool. If so, it retrieves the corresponding available IP address from the IP address pool. After obtaining the IP address, it adds the corresponding gateway address to the routing information in the DHCP response result, along with the mirror path to be returned. The corresponding DHCP request result is then returned to the bare metal server.

[0081] In a specific embodiment, after the bare metal server online switch receives the first DHCP request, it will modify the corresponding request packet, add the relay gateway address (i.e., the target gateway address) to the first DHCP request, generate a second DHCP request, and at the same time query the DHCP service configuration address configured in the switch, and forward the DHCP request to port 67 of the corresponding DHCP server.

[0082] In one embodiment, when the DHCP service receives the second DHCP request, it parses the corresponding request packet to obtain the corresponding relay gateway address, queries the database based on the gateway address to see if there is an IP address pool corresponding to the gateway, and takes a valid IP address from the corresponding IP address pool.

[0083] At a certain time, the corresponding relay gateway will be set up for cross-segment routing, the IP address and mirror file address will be encapsulated into the DHCP request return packet, and the DHCP request will be returned through port 67.

[0084] In one embodiment, when the bare metal server online switch obtains the DHCP return result, it forwards the corresponding request to port 68 of the bare metal server.

[0085] In one embodiment, after the bare metal server obtains the DHCP return result, it configures an IP address and also configures cross-segment routing.

[0086] Please refer to Figure 6, which is a schematic block diagram of a bare metal deployment device based on a three-tier network, provided in accordance with an embodiment of the present application. The bare metal deployment device based on a three-tier network is used to execute the aforementioned bare metal deployment method based on a three-tier network. The bare metal deployment device based on a three-tier network can be configured on a server.

[0087] As shown in FIG6 , the bare metal deployment device 300 based on the three-layer network includes:

[0088] A first DHCP request initiating module 301 is configured to initiate a first Dynamic Host Configuration Protocol (DHCP) request based on a bare metal server in a bare metal service deployment system upon receiving a deployment instruction of the bare metal service;

[0089] a response result obtaining module 302, configured to receive the first DHCP request based on the uplink switch, and obtain a response result of the first DHCP request based on the DHCP server;

[0090] Configuration module 303, configured to configure IP addresses and cross-segment routing based on the bare metal server and the response result;

[0091] The image file installation module 304 is used to request the image file from the image server based on the IP address, the cross-segment route, and the image file address in the response result, and install the image file to complete the bare metal deployment.

[0092] Furthermore, the bare metal deployment device 300 based on the three-layer network further includes:

[0093] The bare metal service deployment system generation module is used to generate a bare metal service deployment system based on a three-layer network structure based on an aggregation switch, an uplink switch, a DHCP server and the bare metal server.

[0094] Furthermore, the aggregation switch is used to implement communication between the uplink switch, the DHCP server and the bare metal server.

[0095] Furthermore, the response result obtaining module 302 includes:

[0096] a second DHCP request obtaining submodule, configured to receive the first DHCP request based on the uplink switch, and add a target gateway address to the first DHCP request to obtain a second DHCP request;

[0097] An IP address to be used obtaining submodule, configured to obtain an available IP address to be used based on the second DHCP request;

[0098] A response result generating submodule, configured to generate a response result of the first DHCP request based on the mirror file address and the IP address to be used;

[0099] A response result returning submodule is used to return the response result of the first DHCP request to the bare metal server based on the DHCP server.

[0100] Furthermore, the submodule for obtaining the IP address to be used includes:

[0101] A second DHCP request forwarding unit is configured to forward the second DHCP request to a DHCP server based on the uplink switch;

[0102] An address pool query unit, configured to parse the second DHCP request based on the DHCP server, obtain the target gateway address, and query a database for an address pool corresponding to the target gateway address;

[0103] The IP address to be used acquiring unit is configured to acquire the IP address to be used from an address pool corresponding to the target gateway address when there is one.

[0104] Furthermore, after the submodule of obtaining the IP address to be used, the method further includes:

[0105] a configuration file obtaining unit, configured to obtain a configuration file when an address pool corresponding to the target gateway address does not exist in the database;

[0106] A partition length obtaining unit, configured to obtain, based on the configuration file, a total classless inter-domain routing cidr and a partition length of an address segment corresponding to a target deployment network;

[0107] The address pool obtaining unit is configured to obtain the address pool corresponding to the target gateway address based on the total cidr and the partition length, so as to obtain the IP address to be used from the address pool.

[0108] Furthermore, the address pool obtaining unit includes:

[0109] a division subunit, configured to divide the total cidr into at least one sub-address segment based on the division length;

[0110] The address pool determining unit is configured to use the last sub-address segment in at least one of the sub-address segments as the address pool corresponding to the target gateway address, and store the corresponding relationship between the target gateway address and the last sub-address segment in the sub-address segments in the database.

[0111] It should be noted that those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0112] The above-mentioned apparatus may be implemented in the form of a computer program, and the computer program may be run on a computer device as shown in FIG. 7 .

[0113] Please refer to Figure 7, which is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a server.

[0114] 7 , the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0115] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions that, when executed, enable a processor to perform any bare metal deployment method based on a three-tier network.

[0116] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0117] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any bare metal deployment method based on the three-layer network.

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

[0119] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0120] In one embodiment, the processor is configured to execute a computer program stored in the memory to implement the following steps:

[0121] Upon receiving the deployment instruction of the bare metal service, initiating a first dynamic host configuration protocol (DHCP) request based on the bare metal server in the bare metal service deployment system;

[0122] receiving the first DHCP request based on the uplink switch, and obtaining a response result of the first DHCP request based on the DHCP server;

[0123] Based on the bare metal server and the response result, configure an IP address and cross-segment routing;

[0124] Based on the IP address, the cross-segment route, and the image file address in the response result, the image file is requested from the image server, and the image file is installed to complete the bare metal deployment.

[0125] In one embodiment, the processor is further configured to implement, before initiating a first dynamic host configuration protocol (DHCP) request based on a bare metal server in a bare metal service deployment system upon receiving a deployment instruction of the bare metal service:

[0126] Based on the aggregation switch, the uplink switch, the DHCP server and the bare metal server, a bare metal service deployment system based on a three-layer network structure is generated.

[0127] In one embodiment, the aggregation switch is used to implement communication between the uplink switch, the DHCP server and the bare metal server.

[0128] In one embodiment, when the processor receives the first DHCP request based on the uplink switch and obtains a response result of the first DHCP request based on the DHCP server, it is configured to implement:

[0129] The uplink switch receives the first DHCP request and adds the target gateway address to the first DHCP request to obtain a second DHCP request;

[0130] Based on the second DHCP request, obtaining an available IP address to be used;

[0131] Generate a response result of the first DHCP request based on the mirror file address and the IP address to be used;

[0132] Based on the DHCP server, a response result of the first DHCP request is returned to the bare metal server.

[0133] In one embodiment, when obtaining the available IP address to be used based on the second DHCP request, the processor is configured to implement:

[0134] forwarding the second DHCP request to a DHCP server based on the uplink switch;

[0135] parsing the second DHCP request based on the DHCP server, obtaining the target gateway address, and querying whether there is an address pool corresponding to the target gateway address in a database;

[0136] When there is an address pool corresponding to the target gateway address, the IP address to be used is obtained from the address pool.

[0137] In one embodiment, after querying a database to see whether an address pool corresponding to the target gateway address exists, the processor is further configured to:

[0138] When the address pool corresponding to the target gateway address does not exist in the database, obtaining a configuration file;

[0139] Based on the configuration file, obtaining the total classless inter-domain routes (cidr) and the length of the address segments corresponding to the target deployment network;

[0140] Based on the total cidr and the partition length, an address pool corresponding to the target gateway address is obtained, so as to obtain the IP address to be used from the address pool.

[0141] In one embodiment, when obtaining the address pool corresponding to the target gateway address based on the total cidr and the partition length, the processor is configured to implement:

[0142] Based on the division length, dividing the total cidr into at least one sub-address segment;

[0143] The last sub-address segment in at least one of the sub-address segments is used as the address pool corresponding to the target gateway address, and the corresponding relationship between the target gateway address and the last sub-address segment in the sub-address segments is stored in the database.

[0144] A computer-readable storage medium is also provided in an embodiment of the present application, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement any bare metal deployment method based on a three-layer network provided in the embodiment of the present application.

[0145] The computer-readable storage medium may be an internal storage unit of the computer device described in the aforementioned embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the computer device.

[0146] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A bare metal deployment method based on a three-layer network, characterized in that: include: Upon receiving a deployment instruction of the bare metal service, initiating a first dynamic host configuration protocol DHCP request based on a bare metal server in the bare metal service deployment system; receiving the first DHCP request based on the uplink switch, and obtaining a response result of the first DHCP request based on the DHCP server; Based on the bare metal server and the response result, configure an IP address and cross-segment routing; Based on the IP address, the cross-segment routing, and the image file address in the response result, the image file is requested from the image server, and the image file is installed to complete the bare metal deployment.

2. The bare metal deployment method based on a three-layer network according to claim 1 is characterized in that: The method further includes: before initiating a first dynamic host configuration protocol DHCP request based on a bare metal server in the bare metal service deployment system when receiving a deployment instruction of the bare metal service, Based on the aggregation switch, the uplink switch, the DHCP server and the bare metal server, a bare metal service deployment system based on a three-layer network structure is generated.

3. The bare metal deployment method based on a three-layer network according to claim 2 is characterized in that: The aggregation switch is used to realize communication among the uplink switch, the DHCP server and the bare metal server.

4. The bare metal deployment method based on a three-layer network according to claim 1 is characterized in that: The receiving the first DHCP request based on the uplink switch and obtaining a response result of the first DHCP request based on the DHCP server includes: Based on the uplink switch receiving the first DHCP request and adding the target gateway address to the first DHCP request, obtaining a second DHCP request; Based on the second DHCP request, obtaining an available IP address to be used; Based on the mirror file address and the IP address to be used, generating a response result of the first DHCP request; Based on the DHCP server, a response result of the first DHCP request is returned to the bare metal server.

5. The bare metal deployment method based on a three-layer network according to claim 4 is characterized in that: The step of obtaining an available IP address to be used based on the second DHCP request comprises: forwarding the second DHCP request to a DHCP server based on the uplink switch; parsing the second DHCP request based on the DHCP server, obtaining the target gateway address, and querying whether there is an address pool corresponding to the target gateway address in a database; When there is an address pool corresponding to the target gateway address, the IP address to be used is obtained from the address pool.

6. The bare metal deployment method based on a three-layer network according to claim 5 is characterized in that: After querying whether there is an address pool corresponding to the target gateway address in the database, the method further includes: When the address pool corresponding to the target gateway address does not exist in the database, obtaining a configuration file; Based on the configuration file, obtaining the total classless inter-domain routing cidr and the division length of the address segment corresponding to the target deployment network; Based on the total cidr and the partition length, an address pool corresponding to the target gateway address is obtained, so as to obtain the IP address to be used from the address pool.

7. The bare metal deployment method based on a three-layer network according to claim 6 is characterized in that: The obtaining, based on the total cidr and the divided length, an address pool corresponding to the target gateway address comprises: Based on the partition length, the total cidr is divided into at least one sub-address segment; The last sub-address segment in at least one of the sub-address segments is used as the address pool corresponding to the target gateway address, and the corresponding relationship between the target gateway address and the last sub-address segment in the sub-address segments is stored in the database.

8. A bare metal deployment device based on a three-layer network, characterized in that: include: A first DHCP request initiating module is used to initiate a first dynamic host configuration protocol DHCP request based on a bare metal server in a bare metal service deployment system when receiving a deployment instruction of a bare metal service; a response result obtaining module, configured to receive the first DHCP request based on an uplink switch, and obtain a response result of the first DHCP request based on a DHCP server; A configuration module, configured to configure an IP address and cross-segment routing based on the bare metal server and the response result; The image file installation module is used to request the image file from the image server based on the IP address, the cross-segment routing, and the image file address in the response result, and install the image file to complete the bare metal deployment.

9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the bare metal deployment method based on a three-layer network as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the bare metal deployment method based on a three-layer network as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Bare metal server deployment method and device

    CN110532065A

  • Bare metal server network configuration method and system and related equipment

    CN111901177A

  • Automatic bare computer deployment method and device and cloud environment platform

    CN112491630A

  • Intelligent network card deployment method and device and medium

    CN114995888A

  • Bare metal disk backup method and device, and computer-readable storage medium

    WO2023184875A1

Cited By

  • Deployment method and system of bare metal server based on data processor, computer equipment and readable storage medium

    CN119621085A

  • Server management method and device, equipment, storage medium and program product

    CN120017480A