CN109885398B - Distribution method and device of distributed PXE server - Google Patents

Distribution method and device of distributed PXE server Download PDF

Info

Publication number
CN109885398B
CN109885398B CN201910041374.0A CN201910041374A CN109885398B CN 109885398 B CN109885398 B CN 109885398B CN 201910041374 A CN201910041374 A CN 201910041374A CN 109885398 B CN109885398 B CN 109885398B
Authority
CN
China
Prior art keywords
pxe
mac address
server
client
pxe server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910041374.0A
Other languages
Chinese (zh)
Other versions
CN109885398A (en
Inventor
郭进先
苏楠
张鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Yunzhou Technology Co.,Ltd.
Original Assignee
Shanghai Zstack Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Zstack Information Technology Co ltd filed Critical Shanghai Zstack Information Technology Co ltd
Priority to CN201910041374.0A priority Critical patent/CN109885398B/en
Publication of CN109885398A publication Critical patent/CN109885398A/en
Application granted granted Critical
Publication of CN109885398B publication Critical patent/CN109885398B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention aims to provide a distribution method and equipment of a distributed PXE server, wherein different PXE clients access different PXE servers by controlling a DHCP service switch on the PXE server; the management node schedules the PXE servers, and the other stages can provide services in parallel except for the stage of IP allocation, so that the DHCP service with less occupied time provides services in series, the TFTP service with more occupied time provides services in parallel, and the PXE servers simultaneously provide different PXE services in parallel in a two-layer network.

Description

Distribution method and device of distributed PXE server
Technical Field
The invention relates to the field of computers, in particular to a distribution method and equipment of a distributed PXE server.
Background
PXE (Pre-boot Execution Environment), Pre-boot Execution Environment. Is a protocol designed by Intel that enables a computer to boot over a network. The protocol is divided into a client (client) and a server (server), the client application (PXE client) is stored in a ROM of the network card, when the computer is booted through a network, the BIOS calls the client application (PXE client) into the memory for execution, and the client application (PXE client) can load and run an operating system placed at a far end from the server (server) through the network according to the selection of a user.
Current applications are primarily the installation of operating systems and diskless workstations over a network. The general environment server and client end are in a two-layer network, when the client end is started by network, it can broadcast an address request, all computers in the whole two-layer network can receive the address request, after the server receives the request, it can distribute IP address to the client end, after the server confirms again, the client end can use the distributed IP to communicate with the server. If multiple servers exist in a network, multiple servers will assign IP to clients, which can lead to confusion and ultimately to PXE services being unavailable. In practice, there will only be one PXE server within a two-tier network.
In current applications, the PXE service is mainly used to install an operating system over a network or as a server of a diskless workstation. When the system is used for installing an operating system in a network, only one system is generally installed at the same time; when used as a diskless workstation, the same content is pushed for multiple workstations, and too many diskless workstations are serviced, which may be correspondingly slow.
Because only one PXE server exists, if a plurality of clients request services at the same time, TFTP service needs to simultaneously satisfy the plurality of clients, pressure is high, and response speed is slow.
If a plurality of client terminals need to install different operating systems, complex configuration needs to be carried out on the PXE server, and boot files needed by the different operating systems are pushed according to the MAC addresses of the network cards of the client terminals.
Because only one PXE server exists, when the server fails and cannot provide services, no standby server can be used as a substitute, and when the pressure becomes high and correspondingly becomes slow, no other server can share the pressure.
Disclosure of Invention
The invention aims to provide a method and equipment for distributing a distributed PXE service.
According to an aspect of the present invention, there is provided a method for distributing a distributed PXE service, the method including:
step S1, a PXE server pool is formed by obtaining a plurality of PXE servers, each PXE server in the PXE server pool is marked as free, each PXE server in the PXE server pool is initialized, so that a DHCP service is closed on each PXE server, and a TFTP service is opened;
step S2, an IP/MAC address pairing table is created for subsequent recording of the MAC address and the allocated IP address of the PXE client;
step S3, checking whether there is a PXE server marked as idle in the PXE server pool and all the DHCP services on the PXE servers are closed, taking one PXE server out of the idle PXE server, starting the DHCP service of the taken PXE server, obtaining a request of the PXE client, obtaining a MAC address corresponding to the PXE client based on the request, checking whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table,
if not, in step S4, after the taken-out PXE server allocates a corresponding IP address to the PXE client through the DHCP service, closing the DHCP service, and providing the service of installing the system for the PXE client through the TFTP service of the taken-out PXE server;
step S5, recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address pairing table, and modifying the selected PXE server mark from idle to service.
Further, in the above method, after modifying the mark of the selected PXE server from idle to in-service in step S5, the method further includes:
and after the PXE client installation system is completed, the taken out marks of the PXE server are changed from the service middle to idle and then are put into the PXE server pool again.
Further, in the above method, after the step S5, the method further includes:
step S3 to step S5 are executed in a loop.
Further, in the above method, in step S5, the recording the MAC address of the PXE client and the allocated corresponding IP address in the IP/MAC address matching table includes:
recording the MAC address of the PXE client, the allocated corresponding IP address and information of a PXE server correspondingly providing services into the IP/MAC address matching table;
after checking whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table, the method further includes:
if yes, the IP address corresponding to the MAC address and the information of the PXE server correspondingly providing the service are sent to the PXE client side according to the IP/MAC address matching table.
According to another aspect of the present invention, there is also provided a distribution apparatus for a distributed PXE server, wherein the apparatus includes:
the device comprises a first device, a second device and a third device, wherein the first device is used for acquiring a PXE server pool formed by a plurality of PXE servers, marking each PXE server in the PXE server pool as idle, initializing each PXE server in the PXE server pool so as to close a DHCP service on each PXE server and open a TFTP service;
the second device is used for creating an IP/MAC address pairing table for subsequent recording of the MAC address of the PXE client and the allocated IP address;
a third device, configured to check whether there is a PXE server marked as idle in the PXE server pool, and all the DHCP services on the PXE servers are closed, take out one PXE server from the idle PXE server, start the DHCP service of the taken-out PXE server, obtain a request of a PXE client, obtain a MAC address corresponding to the PXE client based on the request, check whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table,
a fourth device, configured to close the DHCP service of the taken-out PXE server after the MAC address corresponding to the PXE client is not recorded in the IP/MAC address matching table and the taken-out PXE server allocates the corresponding IP address to the PXE client through the DHCP service of the PXE server, and the taken-out PXE server provides a service for installing a system for the PXE client through the TFTP service of the PXE server;
and the fifth device is used for recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address matching table and modifying the mark of the selected PXE server from idle to service.
Further, in the foregoing apparatus, the fifth device is further configured to, after the PXE client installation system is completed, modify the taken out marker of the PXE server from in-service to idle, and then place the marker in the PXE server pool again.
Further, in the above apparatus, the third to fifth means are sequentially executed in a cycle.
Further, in the foregoing apparatus, the fifth means is configured to record the MAC address of the PXE client, the allocated corresponding IP address, and information corresponding to a PXE server providing a service in the IP/MAC address matching table;
the device further comprises a sixth device, configured to send, to the PXE client, the IP address corresponding to the MAC address of the PXE client and information of the PXE server providing the service correspondingly according to the IP/MAC address matching table when the MAC address corresponding to the PXE client is already recorded in the IP/MAC address matching table.
According to another aspect of the present invention, there is also provided a computing-based device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
step S1, a PXE server pool is formed by obtaining a plurality of PXE servers, each PXE server in the PXE server pool is marked as free, each PXE server in the PXE server pool is initialized, so that a DHCP service is closed on each PXE server, and a TFTP service is opened;
step S2, an IP/MAC address pairing table is created for subsequent recording of the MAC address and the allocated IP address of the PXE client;
step S3, checking whether there is a PXE server marked as idle in the PXE server pool and all the DHCP services on the PXE servers are closed, taking one PXE server out of the idle PXE server, starting the DHCP service of the taken PXE server, obtaining a request of the PXE client, obtaining a MAC address corresponding to the PXE client based on the request, checking whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table,
if not, in step S4, after the taken-out PXE server allocates a corresponding IP address to the PXE client through the DHCP service, closing the DHCP service, and providing the service of installing the system for the PXE client through the TFTP service of the taken-out PXE server;
step S5, recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address pairing table, and modifying the selected PXE server mark from idle to service.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
step S1, a PXE server pool is formed by obtaining a plurality of PXE servers, each PXE server in the PXE server pool is marked as free, each PXE server in the PXE server pool is initialized, so that a DHCP service is closed on each PXE server, and a TFTP service is opened;
step S2, an IP/MAC address pairing table is created for subsequent recording of the MAC address and the allocated IP address of the PXE client;
step S3, checking whether there is a PXE server marked as idle in the PXE server pool and all the DHCP services on the PXE servers are closed, taking one PXE server out of the idle PXE server, starting the DHCP service of the taken PXE server, obtaining a request of the PXE client, obtaining a MAC address corresponding to the PXE client based on the request, checking whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table,
if not, in step S4, after the taken-out PXE server allocates a corresponding IP address to the PXE client through the DHCP service, closing the DHCP service, and providing the service of installing the system for the PXE client through the TFTP service of the taken-out PXE server;
step S5, recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address pairing table, and modifying the selected PXE server mark from idle to service.
Compared with the prior art, the invention realizes that different PXE clients access different PXE servers by controlling the DHCP service switch on the PXE server; the management node schedules the PXE servers, and the other stages can provide services in parallel except for the stage of IP allocation, so that the DHCP service with less occupied time provides services in series, the TFTP service with more occupied time provides services in parallel, and the PXE servers simultaneously provide different PXE services in parallel in a two-layer network.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a flowchart illustrating a distribution method of a distributed PXE server according to an embodiment of the present invention.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present invention is described in further detail below with reference to the attached drawing figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As shown in fig. 1, the present invention provides a method for distributing a distributed PXE server, where the method includes:
step S1, a PXE server pool is formed by obtaining a plurality of PXE servers, each PXE server in the PXE server pool is marked as free, each PXE server in the PXE server pool is initialized, so that a DHCP service is closed on each PXE server, and a TFTP service is opened;
here, a plurality of PXE servers are provided in the same two-layer network, and during initialization, a DHCP (Dynamic Host Configuration Protocol) service on the PXE server is not started, but only a TFTP (simple File Transfer Protocol) service is started;
step S2, an IP/MAC address pairing table is created for subsequent recording of the MAC address and the allocated IP address of the PXE client;
here, a blank IP/MAC address pairing table may be created by the management node for subsequent recording of the MAC address and the allocated IP address of the PXE client;
step S3, checking whether there is a PXE server marked as idle in the PXE server pool and all the DHCP services on the PXE servers are closed, taking one PXE server out of the idle PXE server, starting the DHCP service of the taken PXE server, obtaining a request of the PXE client, obtaining a MAC address corresponding to the PXE client based on the request, checking whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table,
here, the management node may check whether there is a free server in the PXE server pool and check whether there is a PXE server providing a DHCP service in the network, and if there is a free PXE server and there is no PXE server providing the DHCP service in the network, may randomly select a server in one PXE server pool, start the DHCP service of the PXE server, wait for the request of the PXE client, check whether there is a recorded MAC address of the PXE client in the IP/MAC address pairing table through the DHCP service;
if not, in step S4, after the taken-out PXE server allocates a corresponding IP address to the PXE client through the DHCP service, closing the DHCP service, and providing the service of installing the system for the PXE client through the TFTP service of the taken-out PXE server;
when the IP/MAC address matching table does not record the MAC address of the PXE client, the taken-out PXE server allocates the IP address for the PXE client, then the taken-out PXE server DHCP service is closed, in addition, the taken-out PXE server can send the allocated IP address and the MAC address to a management node for recording, and the taken-out PXE server simultaneously provides TFTP service for the PXE client so that the PXE client can complete installation of the system;
step S5, recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address pairing table, and modifying the selected PXE server mark from idle to service.
Here, the PXE server may be marked as in-service by the management node including the IP address and MAC in an IP/MAC address pair table.
The invention realizes that different PXE clients access different PXE servers by controlling the DHCP service switch on the PXE server; the management node schedules the PXE servers, and the other stages can provide services in parallel except for the stage of IP allocation, so that the DHCP service with less occupied time provides services in series, the TFTP service with more occupied time provides services in parallel, and the PXE servers simultaneously provide different PXE services in parallel in a two-layer network.
In an embodiment of the distribution method for the distributed PXE server of the present invention, after modifying the mark of the selected PXE server from idle to service, the method further includes:
and after the PXE client installation system is completed, the taken out marks of the PXE server are changed from the service middle to idle and then are put into the PXE server pool again.
Here, when the installation of the PXE client is completed and the PXE service is no longer needed, the management node recovers the corresponding PXE server, rejoins the PXE server in the PXE server pool marked as free, and waits for re-scheduling.
In an embodiment of the distribution method for the distributed PXE server of the present invention, in step S5, after recording the MAC address of the PXE client and the allocated corresponding IP address in the IP/MAC address pairing table, and modifying the selected marker of the PXE server from idle to service, the method further includes:
and circularly executing the steps S3 to S5 to realize the distribution of different PXE servers for a plurality of different PXE clients.
In an embodiment of the distribution method of the distributed PXE server of the present invention, in step S5, the recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address matching table includes:
recording the MAC address of the PXE client, the allocated corresponding IP address and information of a PXE server correspondingly providing services into the IP/MAC address matching table;
after checking whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table, the method further includes:
if yes, the IP address corresponding to the MAC address and the information of the PXE server correspondingly providing the service are sent to the PXE client side according to the IP/MAC address matching table.
Here, when it is checked that the MAC address corresponding to the PXE client is already recorded in the IP/MAC address matching table, the IP address corresponding to the MAC address of the PXE client and information of the PXE server providing the service correspondingly may be provided to the PXE client in time according to the IP/MAC address matching table.
According to another aspect of the present invention, there is also provided a distribution apparatus for a distributed PXE server, wherein the apparatus includes:
the device comprises a first device, a second device and a third device, wherein the first device is used for acquiring a PXE server pool formed by a plurality of PXE servers, marking each PXE server in the PXE server pool as idle, initializing each PXE server in the PXE server pool so as to close a DHCP service on each PXE server and open a TFTP service;
the second device is used for creating an IP/MAC address pairing table for subsequent recording of the MAC address of the PXE client and the allocated IP address;
a third device, configured to check whether there is a PXE server marked as idle in the PXE server pool, and all the DHCP services on the PXE servers are closed, take out one PXE server from the idle PXE server, start the DHCP service of the taken-out PXE server, obtain a request of a PXE client, obtain a MAC address corresponding to the PXE client based on the request, check whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table,
a fourth device, configured to close the DHCP service of the taken-out PXE server after the MAC address corresponding to the PXE client is not recorded in the IP/MAC address matching table and the taken-out PXE server allocates the corresponding IP address to the PXE client through the DHCP service of the PXE server, and the taken-out PXE server provides a service for installing a system for the PXE client through the TFTP service of the PXE server;
and the fifth device is used for recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address matching table and modifying the mark of the selected PXE server from idle to service.
Further, in the foregoing apparatus, the fifth device is further configured to, after the PXE client installation system is completed, modify the taken out marker of the PXE server from in-service to idle, and then place the marker in the PXE server pool again.
Further, in the above apparatus, the third to fifth means are sequentially executed in a cycle.
Further, in the foregoing apparatus, the fifth means is configured to record the MAC address of the PXE client, the allocated corresponding IP address, and information corresponding to a PXE server providing a service in the IP/MAC address matching table;
the device further comprises a sixth device, configured to send, to the PXE client, the IP address corresponding to the MAC address of the PXE client and information of the PXE server providing the service correspondingly according to the IP/MAC address matching table when the MAC address corresponding to the PXE client is already recorded in the IP/MAC address matching table.
According to another aspect of the present invention, there is also provided a computing-based device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
step S1, a PXE server pool is formed by obtaining a plurality of PXE servers, each PXE server in the PXE server pool is marked as free, each PXE server in the PXE server pool is initialized, so that a DHCP service is closed on each PXE server, and a TFTP service is opened;
step S2, an IP/MAC address pairing table is created for subsequent recording of the MAC address and the allocated IP address of the PXE client;
step S3, checking whether there is a PXE server marked as idle in the PXE server pool and all the DHCP services on the PXE servers are closed, taking one PXE server out of the idle PXE server, starting the DHCP service of the taken PXE server, obtaining a request of the PXE client, obtaining a MAC address corresponding to the PXE client based on the request, checking whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table,
if not, in step S4, after the taken-out PXE server allocates a corresponding IP address to the PXE client through the DHCP service, closing the DHCP service, and providing the service of installing the system for the PXE client through the TFTP service of the taken-out PXE server;
step S5, recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address pairing table, and modifying the selected PXE server mark from idle to service.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
step S1, a PXE server pool is formed by obtaining a plurality of PXE servers, each PXE server in the PXE server pool is marked as free, each PXE server in the PXE server pool is initialized, so that a DHCP service is closed on each PXE server, and a TFTP service is opened;
step S2, an IP/MAC address pairing table is created for subsequent recording of the MAC address and the allocated IP address of the PXE client;
step S3, checking whether there is a PXE server marked as idle in the PXE server pool and all the DHCP services on the PXE servers are closed, taking one PXE server out of the idle PXE server, starting the DHCP service of the taken PXE server, obtaining a request of the PXE client, obtaining a MAC address corresponding to the PXE client based on the request, checking whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table,
if not, in step S4, after the taken-out PXE server allocates a corresponding IP address to the PXE client through the DHCP service, closing the DHCP service, and providing the service of installing the system for the PXE client through the TFTP service of the taken-out PXE server;
step S5, recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address pairing table, and modifying the selected PXE server mark from idle to service.
For details of embodiments of each device and storage medium of the present invention, reference may be made to corresponding parts of each method embodiment, and details are not described herein again.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
It should be noted that the present invention may be implemented in software and/or in a combination of software and hardware, for example, as an Application Specific Integrated Circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present invention may be executed by a processor to implement the steps or functions described above. Also, the software programs (including associated data structures) of the present invention can be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Further, some of the steps or functions of the present invention may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present invention can be applied as a computer program product, such as computer program instructions, which when executed by a computer, can invoke or provide the method and/or technical solution according to the present invention through the operation of the computer. Program instructions which invoke the methods of the present invention may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the invention herein comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or solution according to embodiments of the invention as described above.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (10)

1. A method for distributing a distributed PXE server, wherein the method comprises the following steps:
step S1, a PXE server pool is formed by obtaining a plurality of PXE servers, each PXE server in the PXE server pool is marked as free, each PXE server in the PXE server pool is initialized, so that a DHCP service is closed on each PXE server, and a TFTP service is opened;
step S2, an IP/MAC address pairing table is created for subsequent recording of the MAC address and the allocated IP address of the PXE client;
step S3, checking whether there is a PXE server marked as idle in the PXE server pool and all the DHCP services on the PXE servers are closed, taking one PXE server out of the idle PXE server, starting the DHCP service of the taken PXE server, obtaining a request of the PXE client, obtaining a MAC address corresponding to the PXE client based on the request, checking whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table,
if not, in step S4, after the taken-out PXE server allocates a corresponding IP address to the PXE client through the DHCP service, closing the DHCP service, and providing the service of installing the system for the PXE client through the TFTP service of the taken-out PXE server;
step S5, recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address pairing table, and modifying the selected PXE server mark from idle to service.
2. The method as claimed in claim 1, wherein in step S5, after modifying the selected PXE server mark from idle to in-service, the method further includes:
and after the PXE client installation system is completed, the taken out marks of the PXE server are changed from the service middle to idle and then are put into the PXE server pool again.
3. The method according to claim 1, wherein after step S5, further comprising:
step S3 to step S5 are executed in a loop.
4. The method as claimed in any one of claims 1 to 3, wherein in step S5, the recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address pairing table includes:
recording the MAC address of the PXE client, the allocated corresponding IP address and information of a PXE server correspondingly providing services into the IP/MAC address matching table;
after checking whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table, the method further includes:
if yes, the IP address corresponding to the MAC address and the information of the PXE server correspondingly providing the service are sent to the PXE client side according to the IP/MAC address matching table.
5. An apparatus for distributing a distributed PXE server, the apparatus comprising:
the device comprises a first device, a second device and a third device, wherein the first device is used for acquiring a PXE server pool formed by a plurality of PXE servers, marking each PXE server in the PXE server pool as idle, initializing each PXE server in the PXE server pool so as to close a DHCP service on each PXE server and open a TFTP service;
the second device is used for creating an IP/MAC address pairing table for subsequent recording of the MAC address of the PXE client and the allocated IP address;
a third device, configured to check whether there is a PXE server marked as idle in the PXE server pool, and all the DHCP services on the PXE servers are closed, take out one PXE server from the idle PXE server, start the DHCP service of the taken-out PXE server, obtain a request of a PXE client, obtain a MAC address corresponding to the PXE client based on the request, check whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table,
a fourth device, configured to close the DHCP service of the taken-out PXE server after the MAC address corresponding to the PXE client is not recorded in the IP/MAC address matching table and the taken-out PXE server allocates the corresponding IP address to the PXE client through the DHCP service of the PXE server, and the taken-out PXE server provides a service for installing a system for the PXE client through the TFTP service of the PXE server;
and the fifth device is used for recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address matching table and modifying the mark of the selected PXE server from idle to service.
6. The apparatus as claimed in claim 5, wherein the fifth means is further configured to, after the PXE client installation system is completed, modify the taken out PXE server mark from in-service to idle and then re-place the mark in the PXE server pool.
7. The apparatus of claim 5, wherein the third through fifth means are performed sequentially in a loop.
8. The apparatus as claimed in any one of claims 5 to 7, wherein the fifth means is configured to record the MAC address of the PXE client, the allocated corresponding IP address, and information corresponding to the serving PXE server in the IP/MAC address pairing table;
the device further comprises a sixth device, configured to send, to the PXE client, the IP address corresponding to the MAC address of the PXE client and information of the PXE server providing the service correspondingly according to the IP/MAC address matching table when the MAC address corresponding to the PXE client is already recorded in the IP/MAC address matching table.
9. A computing-based device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
step S1, a PXE server pool is formed by obtaining a plurality of PXE servers, each PXE server in the PXE server pool is marked as free, each PXE server in the PXE server pool is initialized, so that a DHCP service is closed on each PXE server, and a TFTP service is opened;
step S2, an IP/MAC address pairing table is created for subsequent recording of the MAC address and the allocated IP address of the PXE client;
step S3, checking whether there is a PXE server marked as idle in the PXE server pool and all the DHCP services on the PXE servers are closed, taking one PXE server out of the idle PXE server, starting the DHCP service of the taken PXE server, obtaining a request of the PXE client, obtaining a MAC address corresponding to the PXE client based on the request, checking whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table,
if not, in step S4, after the taken-out PXE server allocates a corresponding IP address to the PXE client through the DHCP service, closing the DHCP service, and providing the service of installing the system for the PXE client through the TFTP service of the taken-out PXE server;
step S5, recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address pairing table, and modifying the selected PXE server mark from idle to service.
10. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
step S1, a PXE server pool is formed by obtaining a plurality of PXE servers, each PXE server in the PXE server pool is marked as free, each PXE server in the PXE server pool is initialized, so that a DHCP service is closed on each PXE server, and a TFTP service is opened;
step S2, an IP/MAC address pairing table is created for subsequent recording of the MAC address and the allocated IP address of the PXE client;
step S3, checking whether there is a PXE server marked as idle in the PXE server pool and all the DHCP services on the PXE servers are closed, taking one PXE server out of the idle PXE server, starting the DHCP service of the taken PXE server, obtaining a request of the PXE client, obtaining a MAC address corresponding to the PXE client based on the request, checking whether the MAC address corresponding to the PXE client is already recorded in the IP/MAC address pairing table,
if not, in step S4, after the taken-out PXE server allocates a corresponding IP address to the PXE client through the DHCP service, closing the DHCP service, and providing the service of installing the system for the PXE client through the TFTP service of the taken-out PXE server;
step S5, recording the MAC address of the PXE client and the allocated corresponding IP address into the IP/MAC address pairing table, and modifying the selected PXE server mark from idle to service.
CN201910041374.0A 2019-01-16 2019-01-16 Distribution method and device of distributed PXE server Active CN109885398B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910041374.0A CN109885398B (en) 2019-01-16 2019-01-16 Distribution method and device of distributed PXE server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910041374.0A CN109885398B (en) 2019-01-16 2019-01-16 Distribution method and device of distributed PXE server

Publications (2)

Publication Number Publication Date
CN109885398A CN109885398A (en) 2019-06-14
CN109885398B true CN109885398B (en) 2020-10-13

Family

ID=66926123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910041374.0A Active CN109885398B (en) 2019-01-16 2019-01-16 Distribution method and device of distributed PXE server

Country Status (1)

Country Link
CN (1) CN109885398B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101778132A (en) * 2010-01-22 2010-07-14 杭州华三通信技术有限公司 Method, system and device for network installation based on load balance
US7953793B2 (en) * 2009-01-08 2011-05-31 International Business Machines Corporation Distributed preboot execution environment (PXE) server booting
US8126959B2 (en) * 2001-06-28 2012-02-28 International Business Machines Corporation Method and system for dynamic redistribution of remote computer boot service in a network containing multiple boot servers
CN103312809A (en) * 2013-06-24 2013-09-18 北京汉柏科技有限公司 Distributed management method for service in cloud platform
CN104219099A (en) * 2014-09-25 2014-12-17 浪潮(北京)电子信息产业有限公司 Automatic server cluster deploying method and device
US9032200B2 (en) * 2013-03-14 2015-05-12 American Megatrends, Inc. Method of installing virtual service processor (VSP) to computing device and application of the same
CN106572200A (en) * 2016-11-10 2017-04-19 郑州云海信息技术有限公司 IP address configuration method and IP address configuration device for baseboard management controller BMC
CN108958742A (en) * 2017-05-26 2018-12-07 华为技术有限公司 A kind of method of batch installing operating system, relevant device and system
CN109144607A (en) * 2018-08-06 2019-01-04 成都知道创宇信息技术有限公司 A kind of large-scale server automatic deployment and configuration method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9191460B2 (en) * 2006-12-14 2015-11-17 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Selective sub-net filtering in a pre-boot execution environment (PXE)

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8126959B2 (en) * 2001-06-28 2012-02-28 International Business Machines Corporation Method and system for dynamic redistribution of remote computer boot service in a network containing multiple boot servers
US7953793B2 (en) * 2009-01-08 2011-05-31 International Business Machines Corporation Distributed preboot execution environment (PXE) server booting
CN101778132A (en) * 2010-01-22 2010-07-14 杭州华三通信技术有限公司 Method, system and device for network installation based on load balance
US9032200B2 (en) * 2013-03-14 2015-05-12 American Megatrends, Inc. Method of installing virtual service processor (VSP) to computing device and application of the same
CN103312809A (en) * 2013-06-24 2013-09-18 北京汉柏科技有限公司 Distributed management method for service in cloud platform
CN104219099A (en) * 2014-09-25 2014-12-17 浪潮(北京)电子信息产业有限公司 Automatic server cluster deploying method and device
CN106572200A (en) * 2016-11-10 2017-04-19 郑州云海信息技术有限公司 IP address configuration method and IP address configuration device for baseboard management controller BMC
CN108958742A (en) * 2017-05-26 2018-12-07 华为技术有限公司 A kind of method of batch installing operating system, relevant device and system
CN109144607A (en) * 2018-08-06 2019-01-04 成都知道创宇信息技术有限公司 A kind of large-scale server automatic deployment and configuration method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Network center"s highly-efficient management solutions based on intel PXE-based remote cloning system;Li Jinhui,Zhang Ke,Zhang Fang;《2013 3rd International Conference on Advanced Computer Control》;20110912;408-411 *
云计算平台中裸金属物理服务器自动化批量部署方法研究;陈英达,钟苏生,周开东,黄恺彤,麦晓辉;《科技创新与应用》;20171028;96-97 *
异构虚拟化系统下资源池集成管理的设计与实现;刘化东;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180415;I138-648 *

Also Published As

Publication number Publication date
CN109885398A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
US7467295B2 (en) Determining a boot image based on a requesting client address
US8185905B2 (en) Resource allocation in computing systems according to permissible flexibilities in the recommended resource requirements
US9614931B2 (en) Identifying a resource set require for a requested application and launching the resource set in a container for execution in a host operating system
CN111857956B (en) Virtual machine starting method and equipment
US20180188990A1 (en) Method, apparatus and system for inserting disk
US20210377370A1 (en) Method for implementing high availability of bare metal node based on openstack and electronic device using the same
CN107689987B (en) Virtual network service exposure method and device
US20080082690A1 (en) System and method for the dynamic loading of protocol adapters
CN112527328A (en) System cloning method, device, electronic equipment and computer readable storage medium
US20140059314A1 (en) Preventing data loss during reboot and logical storage resource management device
US20240314021A1 (en) Method, apparatus, electronic device and storage medium for resource operation
CN111061496A (en) PXE installation method and device for Linux operating system
CN110968333B (en) Configuration information replacement method and device, machine-readable storage medium and processor
CN112328312B (en) Method and device for realizing diskless starting of bare computer equipment
US20220206836A1 (en) Method and Apparatus for Processing Virtual Machine Migration, Method and Apparatus for Generating Virtual Machine Migration Strategy, Device and Storage Medium
CN109885398B (en) Distribution method and device of distributed PXE server
CN110321077B (en) Method and device for managing centrally stored files
CN117255018A (en) Network configuration method and device for bare metal instance and computer equipment
CN106155910A (en) A kind of methods, devices and systems realizing internal storage access
CN105144073A (en) Removable storage device identity and configuration information
CN110096355B (en) Shared resource allocation method, device and equipment
US10572166B1 (en) Firmware download for a solid state storage card
US20230185464A1 (en) Method for determining a hard disk connection slot connected to a hard disk and terminal device
CN114679442A (en) Cloud desktop based user data synchronization method, device, equipment and storage medium
CN106681771B (en) System reinstallation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Room 502A, dinglou, 555 Dongchuan Road, Minhang District, Shanghai, 200241

Patentee after: Shanghai Yunzhou Technology Co.,Ltd.

Country or region after: China

Address before: Room 4159, building e, 555 Dongchuan Road, Minhang District, Shanghai 200241

Patentee before: SHANGHAI YUNZHOU INFORMATION TECHNOLOGY CO.,LTD.

Country or region before: China