CN116302138A - Method, device, equipment and medium for dynamically adjusting DHCP identification field - Google Patents

Method, device, equipment and medium for dynamically adjusting DHCP identification field Download PDF

Info

Publication number
CN116302138A
CN116302138A CN202310302122.5A CN202310302122A CN116302138A CN 116302138 A CN116302138 A CN 116302138A CN 202310302122 A CN202310302122 A CN 202310302122A CN 116302138 A CN116302138 A CN 116302138A
Authority
CN
China
Prior art keywords
identification field
value
configuration protocol
host configuration
dynamic host
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.)
Pending
Application number
CN202310302122.5A
Other languages
Chinese (zh)
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310302122.5A priority Critical patent/CN116302138A/en
Publication of CN116302138A publication Critical patent/CN116302138A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4416Network booting; Remote initial program loading [RIPL]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention belongs to the technical field of servers, and particularly provides a method, a device, equipment and a medium for dynamically adjusting a DHCP identification field, wherein the method comprises the following steps: setting the value of a server-side dynamic host configuration protocol identification field to a static random access memory area of a baseboard management controller through an out-of-band command; the starting process of the basic input/output system finishes the initialization of the baseboard management controller and analyzes and obtains the value of the dynamic host configuration protocol identification field set in the static random storage area of the baseboard management controller; comparing the acquired value of the dynamic host configuration protocol identification field with a default value; when the values are inconsistent, modifying the values of the dynamic host configuration protocol identification fields of the local machine to the values obtained through analysis, then guiding the pre-starting execution environment, and remotely downloading the starting file. Under the condition that the PXE server side setting is not adjusted, the automatic adjustment of the DHCP identification field is realized through the BIOS.

Description

Method, device, equipment and medium for dynamically adjusting DHCP identification field
Technical Field
The present invention relates to the field of server technologies, and in particular, to a method, an apparatus, a device, and a medium for dynamically adjusting a DHCP identification field.
Background
In the current server field, when a local machine needs to download a start file from a remote PXE server through PXE, the remote PXE server can group the local machine according to the identification field of DHCP in a DHCP configuration file, and in the process of carrying out DHCP handshake with the local machine, different local machines can download different start files by matching the identification field in the DHCP packet. The BIOS adopts a fixed writing dead method for the DHCP identification field, and once the identification field set by the BIOS end of the local machine is not matched with the identification field set by the PXE server end, the BIOS must change the code again and issue a new version to realize the matching, which is very tedious and inconvenient.
In the operating system installation method provided by the related art, a Dynamic Host Configuration Protocol (DHCP) message sent by a computing device of an operating system to be installed is received, wherein the DHCP message comprises a device identifier of the computing device of the operating system to be installed; then searching a corresponding PXE bootstrap program according to the equipment identifier of the computing equipment of the operating system to be installed; and finally, sending a DHCP response message to the computing device of the operating system to be installed so that the computing device of the operating system to be installed downloads the PXE bootstrap program to guide the computing device of the operating system to be installed to complete the installation of the corresponding operating system.
The method is that the PXE server end distinguishes the identification field in the DHCP message of the local machine, thereby realizing the matching of different starting files. However, it still cannot be guaranteed that the DHCP identification field sent by the BIOS of the local machine is always included therein, and once the DHCP identification field cannot be matched, a failure occurs in downloading the boot file.
Disclosure of Invention
When unsuccessful matching occurs in the method disclosed in the related art, the method can only be solved by modifying the BIOS code or adjusting the identification field of the PXE server, has complicated process and low efficiency, and is not beneficial to the PXE guidance of a large number of machines. The invention provides a method, a device, equipment and a medium for dynamically adjusting a DHCP identification field, which solve the problem that the DHCP identification field sent by a BIOS is inconsistent with the DHCP identification field of a PXE server side in the process of guiding a local machine by the PXE, and realize the automatic adjustment of the DHCP identification field by the BIOS under the condition of not adjusting the setting of the PXE server side.
In a first aspect, the present invention provides a method for dynamically adjusting a DHCP identification field, including the following steps:
setting the value of a server-side dynamic host configuration protocol identification field to a static random access memory area of a baseboard management controller through an out-of-band command;
the starting process of the basic input/output system finishes the initialization of the baseboard management controller and analyzes and obtains the value of the dynamic host configuration protocol identification field set in the static random storage area of the baseboard management controller;
comparing the acquired value of the dynamic host configuration protocol identification field with a default value of the dynamic host configuration protocol identification field;
when the comparison results are inconsistent, modifying the value of the dynamic host configuration protocol identification field of the local machine to be the value obtained by analysis, and then performing the boot of the pre-boot execution environment.
As a further limitation of the technical solution of the present invention, the step of setting the value of the server-side dynamic host configuration protocol identification field to the static random access memory area of the baseboard management controller by the out-of-band command includes:
the value of the dynamic host configuration protocol identification field is stored in a serialization file manner in the static random access memory area of the baseboard management controller.
As a further limitation of the technical solution of the present invention, the step of storing the value of the server-side dynamic host configuration protocol identifier field in the base plate management controller static random storage area in a mode of serializing files specifically includes:
storing the value of the current dynamic host configuration protocol identification field and the default value of the dynamic host configuration protocol identification field in a static random storage area of the baseboard management controller in a mode of serializing files; wherein the value of the current dynamic host configuration protocol identification field is the same as the default value of the dynamic host configuration protocol identification field.
As a further limitation of the technical solution of the present invention, the step of setting the value of the server-side dynamic host configuration protocol identification field to the static random access memory area of the baseboard management controller by the out-of-band command includes:
and setting the value of the dynamic host configuration protocol identification field of the server side to a static random storage area of the baseboard management controller through an out-of-band command, and modifying the value of the current dynamic host configuration protocol identification field in the serialization file.
As a further limitation of the technical solution of the present invention, the step of completing the initialization of the baseboard management controller and analyzing and obtaining the value of the dynamic host configuration protocol identification field set to the static random access memory area of the baseboard management controller in the starting process of the basic input output system includes:
the starting process of the basic input/output system finishes the initialization of the baseboard management controller, so that the static random storage area is accessible;
analyzing a serialization file of a static random storage area of the baseboard management controller;
and acquiring the value of the dynamic host configuration protocol identification field modified by the out-of-band command in the serialization file.
As a further limitation of the technical solution of the present invention, the step of comparing the obtained value of the dynamic host configuration protocol identification field with the default value further includes:
and when the comparison results are consistent, keeping the value of the dynamic host configuration protocol identification field as the default value of the dynamic host configuration protocol identification field.
As a further limitation of the technical solution of the present invention, when the comparison result is consistent, the step of maintaining the value of the dynamic host configuration protocol identification field as the default value of the dynamic host configuration protocol identification field includes:
and guiding the pre-starting execution environment and remotely downloading the starting file.
The method utilizes a BMC static random storage area and provides a remote setting interface, thereby realizing dynamic adjustment of the PXE DHCP identification field.
In a second aspect, the present invention further provides a device for dynamically adjusting a DHCP identification field, which includes a storage setting module, a processing analysis acquisition module, a comparison judgment module, and an identification value modification module;
the storage setting module is used for setting the value of the server-side dynamic host configuration protocol identification field to the static random storage area of the baseboard management controller through an out-of-band command;
the processing analysis acquisition module is used for completing the initialization of the baseboard management controller in the starting process of the basic input/output system and analyzing and acquiring the value of the dynamic host configuration protocol identification field set in the static random storage area of the baseboard management controller;
the comparison judging module is used for comparing the acquired value of the dynamic host configuration protocol identification field with the default value of the dynamic host configuration protocol identification field;
and the identification value modification module is used for modifying the value of the dynamic host configuration protocol identification field of the local machine into the value obtained by analysis when the comparison results are inconsistent.
As a further limitation of the technical solution of the present invention, the apparatus further includes a pre-storage setting module, configured to store the value of the dynamic host configuration protocol identification field in a serialized file in the static random storage area of the baseboard management controller.
As a further limitation of the technical scheme of the invention, the pre-storage setting module is specifically configured to store the value of the current dynamic host configuration protocol identification field and the default value of the dynamic host configuration protocol identification field in a mode of serializing files in the static random storage area of the baseboard management controller; wherein the value of the current dynamic host configuration protocol identification field is the same as the default value of the dynamic host configuration protocol identification field.
As a further limitation of the technical solution of the present invention, the storage setting module is specifically configured to set the value of the server-side dynamic host configuration protocol identifier field to the static random access memory area of the baseboard management controller through an out-of-band command, and modify the value of the current dynamic host configuration protocol identifier field in the serialization file.
As a further limitation of the technical scheme of the invention, the processing analysis acquisition module comprises an initialization unit, a serialization file analysis unit and an identification field value acquisition unit;
the initialization unit is used for completing the initialization of the baseboard management controller in the starting process of the basic input/output system so that the static random storage area can be accessed;
the serialization file analysis unit is used for analyzing the serialization file of the static random storage area of the baseboard management controller;
the identification field value acquisition unit is used for acquiring the value of the dynamic host configuration protocol identification field modified by the out-of-band command in the serialized file.
As a further limitation of the technical solution of the present invention, the apparatus further includes an identifier field value holding module, configured to hold, when the comparison result is consistent, the value of the dynamic host configuration protocol identifier field as a default value of the dynamic host configuration protocol identifier field.
In a third aspect, the present invention further provides an electronic device, where the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores computer program instructions executable by the at least one processor to enable the at least one processor to perform the method of dynamically adjusting a DHCP identification field as described in the first aspect.
In a fourth aspect, the present disclosure further provides a non-transitory computer readable storage medium, where the non-transitory computer readable storage medium stores computer instructions, where the computer instructions cause the computer to perform the method for dynamically adjusting a DHCP identification field according to the first aspect.
From the above technical scheme, the invention has the following advantages:
the method provided by the invention changes the DHCP identification field which is fixedly written before in the BIOS into a value which can dynamically change along with the setting of the PXE server, thereby ensuring that the DHCP identification field sent by the BIOS and the DHCP identification field of the PXE server are kept consistent in the process of guiding the local machine by the PXE. The method is simple, practical, fast and efficient, and is very suitable for a large number of machines which need to carry out PXE downloading of different starting files.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
It can be seen that the present invention has outstanding substantial features and significant advances over the prior art, as well as its practical advantages.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention.
Fig. 2 is a schematic flow chart of a method of another embodiment of the invention.
Fig. 3 is a schematic block diagram of an apparatus of one embodiment of the present invention.
Fig. 4 is an overall architecture diagram of a method of an embodiment of the present invention.
Detailed Description
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
In the embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices, or elements, or may be an electrical, mechanical, or other form of connection.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the invention. In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention. In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that BIOS Basic Input Output System is basic input/output system; PXE Preboot Execute Environment pre-boot execution environment; DHCP: dynamic Host Configuration Protocol dynamic host configuration protocol; the H2B SRAM region is defined as a static random access memory region; JSON file is defined herein as a serialization file; BMC Baseboard Management Controller baseboard management controller.
When the local machine needs to download the starting file from the server side through PXE, the server side groups the local machine according to the identification field of the DHCP in the DHCP configuration file, and in the process of carrying out DHCP handshake with the local machine, different local machines download different starting files by matching the identification field in the DHCP packet. For example, when the DHCP identification field configured at the server side is the first group "pxectient" and the second group "AMPClient", the BIOS in the local machine may boot into the first group and download the corresponding boot file if the DHCP identification field is set to "pxectient", and the BIOS may boot into the second group and download the corresponding boot file if the DHCP identification field is set to "AMPClient". However, the current BIOS adopts a fixed-write method for such DHCP identification field, and once the identification field set at the BIOS end of the local machine is not matched with the identification field set at the server end, the BIOS must change the code again to release a new version to realize the matching, which is very tedious and inconvenient. Therefore, how to provide a method for enabling different local machines to download different startup files by matching the identification field in the DHCP packet in the DHCP handshake process with the local machine when the local machine needs to remotely download the startup file from the server side through PXE, the server side groups the local machines according to the identification field of DHCP in the DHCP configuration file. For example, when the DHCP identification field configured at the server side is the first group "pxectient" and the second group "AMPClient", the BIOS in the local machine may boot into the first group and download the corresponding boot file if the DHCP identification field is set to "pxectient", and the BIOS may boot into the second group and download the corresponding boot file if the DHCP identification field is set to "AMPClient". However, the current BIOS adopts a fixed-write method for such DHCP identification field, and once the identification field set at the BIOS end of the local machine is not matched with the identification field set at the server end, the BIOS must change the code again to release a new version to realize the matching, which is very tedious and inconvenient. In view of this, an embodiment of the present invention provides a method for dynamically adjusting a DHCP identification field, as shown in fig. 1, the method includes the following steps:
step 1: setting the value of a server-side dynamic host configuration protocol identification field to a static random access memory area of a baseboard management controller through an out-of-band command;
step 2: the starting process of the basic input/output system finishes the initialization of the baseboard management controller and analyzes and obtains the value of the dynamic host configuration protocol identification field set in the static random storage area of the baseboard management controller;
step 3: comparing the acquired value of the dynamic host configuration protocol identification field with a default value of the dynamic host configuration protocol identification field;
step 4: judging whether the comparison results are consistent;
if not, executing the step 5; if yes, executing the step 6;
step 5: modifying the value of the dynamic host configuration protocol identification field of the local machine into a value obtained by analysis; executing the step 7;
step 6: maintaining the value of the dynamic host configuration protocol identification field as a default value of the dynamic host configuration protocol identification field; executing the step 7;
step 7: and guiding the pre-starting execution environment, and remotely downloading the starting file from the server side.
The server side refers to a PXE server side; the method solves the problem that the DHCP identification field sent by the local machine is inconsistent with the DHCP identification field of the PXE server side in the PXE guiding process, and enables the DHCP identification field of the local machine to be matched with the DHCP identification field of the PXE server side by adjusting the value of the DHCP identification field under the condition that the setting of the PXE server side is not adjusted, then the PXE guiding is carried out, and the starting file is downloaded remotely from the server side.
The method provided by the invention specifically comprises the following steps: the BMC stores the current DHCP identification field value of the PXE server side in a H2B SRAM area (static random access memory area) in a JSON file (serialization file) mode. The user may set the value of the server-side DHCP identification field to the storage area via an out-of-band command, e.g., the user may modify the value of the area via an IPMI command under the system. And the BIOS completes the initialization of the BMC H2B device in the starting process, so that the SRAM area can be accessed, and the JSON file is analyzed to obtain the modified DHCP identification field. Because the default DHCP identification field in the BIOS is PXECLIENT, the BIOS compares the identification field obtained by analysis with the PXECLIENT, if the identification field is the same, the BIOS keeps the default value PXECLIENT of the DHCP identification field, does not modify, then performs PXE guiding, and downloads a starting file from a server side; if not, the BIOS modifies the value of the DHCP identification field to the value obtained by analysis, and then performs PXE boot to download the start file from the server side.
The method utilizes the BMC H2B storage area and provides a remote setting interface, thereby realizing dynamic adjustment of the BIOS PXE DHCP identification field.
As shown in fig. 2, another embodiment of the present invention provides a method for dynamically adjusting a DHCP identification field, the method including the steps of:
s1: storing the value of the current dynamic host configuration protocol identification field and the default value of the dynamic host configuration protocol identification field in a static random storage area of the baseboard management controller in a mode of serializing files; wherein, the value of the current dynamic host configuration protocol identification field is the same as the default value of the dynamic host configuration protocol identification field;
s2: setting the value of the dynamic host configuration protocol identification field of the server end to a static random storage area of the baseboard management controller through an out-of-band command, and modifying the value of the current dynamic host configuration protocol identification field in the serialization file;
s3: the starting process of the basic input/output system finishes the initialization of the baseboard management controller, so that the static random storage area is accessible;
s4: analyzing a serialization file of a static random storage area of the baseboard management controller;
s5: acquiring a value of a dynamic host configuration protocol identification field modified by an out-of-band command in a serialization file;
s6: comparing the acquired value of the dynamic host configuration protocol identification field with a default value;
s7: judging whether the comparison results are consistent;
if not, executing the step S8; if yes, executing step S9;
s8: modifying the value of the dynamic host configuration protocol identification field of the local machine into a value obtained by analysis; executing step S10;
s9: maintaining the value of the dynamic host configuration protocol identification field as a default value of the dynamic host configuration protocol identification field; executing step S10;
s10: and guiding the pre-starting execution environment, and remotely downloading the starting file from the server side.
Through the above, in the method provided by the embodiment of the present invention, firstly, the BMC stores the value of the DHCP identification field of the current PXE server in the H2B SRAM area in the manner of JSON file, and the user can set the value of the DHCP identification field of the server to the storage area through the out-of-band command, for example, the user can remotely modify the value of the area through the IPMI command. And the BIOS completes the initialization of the BMC H2B device in the starting process, so that the SRAM area can be accessed, and the JSON file is analyzed to obtain the modified DHCP identification field. Because the default DHCP identification field in the BIOS is pxectient, the BIOS compares the identification field obtained by parsing with the pxectient, if the default pxectient of the DHCP identification field is the same, the BIOS maintains the default pxectient of the DHCP identification field, does not modify, then performs PXE boot, downloads the start file from the server, if the default PXE is not the same, the BIOS modifies the value of the DHCP identification field to the value obtained by parsing, then performs PXE boot, and downloads the start file from the server. In this way, the DHCP identification field which is fixed and written before in the BIOS is changed into a value which can dynamically change along with the setting of the PXE server, so that the DHCP identification field sent by the BIOS and the DHCP identification field of the PXE server are ensured to be consistent in the PXE boot process of the local machine. The method is simple, practical, fast and efficient, and is very suitable for a large number of machines which need to carry out PXE downloading of different starting files.
As shown in fig. 3, the embodiment of the invention further provides a device for dynamically adjusting the DHCP identification field, which comprises a pre-storage setting module, a processing analysis acquisition module, a comparison judgment module and an identification value modification module;
the pre-storage setting module is used for storing the value of the dynamic host configuration protocol identification field in a mode of serializing files in a static random storage area of the baseboard management controller;
the storage setting module is used for setting the value of the server-side dynamic host configuration protocol identification field to the static random storage area of the baseboard management controller through an out-of-band command;
the processing analysis acquisition module is used for completing the initialization of the baseboard management controller in the starting process of the basic input/output system and analyzing and acquiring the value of the dynamic host configuration protocol identification field set in the static random storage area of the baseboard management controller;
the comparison judging module is used for comparing the acquired value of the dynamic host configuration protocol identification field with the default value of the dynamic host configuration protocol identification field;
and the identification value modification module is used for modifying the value of the dynamic host configuration protocol identification field of the local machine into the value obtained by analysis when the comparison results are inconsistent.
The embodiment of the invention also provides a device for dynamically adjusting the DHCP identification field, which comprises a pre-storage setting module, a processing analysis acquisition module, a comparison judgment module, an identification value modification module and an identification field value holding module;
the pre-storage setting module is used for storing the value of the dynamic host configuration protocol identification field in a mode of serializing files in a static random storage area of the baseboard management controller;
the storage setting module is used for setting the value of the server-side dynamic host configuration protocol identification field to the static random storage area of the baseboard management controller through an out-of-band command;
the processing analysis acquisition module is used for completing the initialization of the baseboard management controller in the starting process of the basic input/output system and analyzing and acquiring the value of the dynamic host configuration protocol identification field set in the static random storage area of the baseboard management controller;
the comparison judging module is used for comparing the acquired value of the dynamic host configuration protocol identification field with the default value of the dynamic host configuration protocol identification field;
the identification value modification module is used for modifying the value of the dynamic host configuration protocol identification field of the local machine into the value obtained by analysis when the comparison results are inconsistent;
and the identification field value maintaining module is used for maintaining the value of the dynamic host configuration protocol identification field as the default value of the dynamic host configuration protocol identification field when the comparison results are consistent, and not modifying.
The pre-storage setting module is specifically configured to store, in a static random storage area of the baseboard management controller, a value of a current dynamic host configuration protocol identification field and a default value of the dynamic host configuration protocol identification field in a mode of serializing files; wherein the value of the current dynamic host configuration protocol identification field is the same as the default value of the dynamic host configuration protocol identification field.
The storage setting module is specifically configured to set the value of the server-side dynamic host configuration protocol identification field to the static random storage area of the baseboard management controller through an out-of-band command, and modify the value of the current dynamic host configuration protocol identification field in the serialization file.
The processing analysis acquisition module comprises an initialization unit, a serialization file analysis unit and an identification field value acquisition unit;
the initialization unit is used for completing the initialization of the baseboard management controller in the starting process of the basic input/output system so that the static random storage area can be accessed;
the serialization file analysis unit is used for analyzing the serialization file of the static random storage area of the baseboard management controller;
the identification field value acquisition unit is used for acquiring the value of the dynamic host configuration protocol identification field modified by the out-of-band command in the serialized file.
In fact, the communication body of the application is a local machine and a PXE server, as shown in fig. 4, in some application scenarios, it may be that multiple local machines all communicate with the PXE server, and the BMC stores the value of the DHCP identification field of the current PXE server in the H2B SRAM area (static random access memory area) in the manner of JSON file (serialization file). That is, the BMC in the present application includes a pre-storage setting module, and a user may set the value of the DHCP identification field of the PXE server side to the storage area through an out-of-band command, for example, the user may modify the value of the area through an IPMI command under the system. And the BIOS completes the initialization of the BMC H2B device in the starting process, so that the SRAM area can be accessed, and the JSON file is analyzed to obtain the modified DHCP identification field. The BIOS comprises a processing analysis acquisition module, a comparison judgment module, an identification value modification module and an identification field value holding module, and because the default DHCP identification field in the BIOS is PXEClient, the BIOS compares the identification field obtained by analysis with the PXEClient, if the comparison result is the same, the BIOS holds the default value PXEClient of the DHCP identification field, does not modify, then performs PXE guiding, and downloads a starting file from a server side; if not, the BIOS modifies the value of the DHCP identification field to the value obtained by analysis, and then performs PXE boot to download the start file from the server side.
The method utilizes the BMC H2B storage area and provides a remote setting interface, thereby realizing dynamic adjustment of the BIOS PXE DHCP identification field.
The embodiment of the invention also provides electronic equipment, which comprises: the device comprises a processor, a communication interface, a memory and a bus, wherein the processor, the communication interface and the memory are in communication with each other through the bus. The bus may be used for information transfer between the electronic device and the sensor. The processor may call logic instructions in memory to perform the following method: s1: storing the value of the current dynamic host configuration protocol identification field and the default value of the dynamic host configuration protocol identification field in a static random storage area of the baseboard management controller in a mode of serializing files; wherein, the value of the current dynamic host configuration protocol identification field is the same as the default value of the dynamic host configuration protocol identification field; s2: setting the value of the dynamic host configuration protocol identification field of the server end to a static random storage area of the baseboard management controller through an out-of-band command, and modifying the value of the current dynamic host configuration protocol identification field in the serialization file; s3: the starting process of the basic input/output system finishes the initialization of the baseboard management controller, so that the static random storage area is accessible; s4: analyzing a serialization file of a static random storage area of the baseboard management controller; s5: acquiring a value of a dynamic host configuration protocol identification field modified by an out-of-band command in a serialization file; s6: comparing the acquired value of the dynamic host configuration protocol identification field with a default value of the dynamic host configuration protocol identification field; s7: judging whether the comparison results are consistent; if not, executing the step S8; if yes, executing step S9; s8: modifying the value of the dynamic host configuration protocol identification field of the local machine into a value obtained by analysis, and then guiding the pre-starting execution environment; executing step S10; s9: keeping the value of the dynamic host configuration protocol identification field as the default value of the dynamic host configuration protocol identification field, and not modifying; executing step S10; s10: and guiding the pre-starting execution environment, and remotely downloading the starting file from the server side.
Further, the logic instructions in the memory described above may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Embodiments of the present invention provide a non-transitory computer readable storage medium storing computer instructions that cause a computer to perform the methods provided by the method embodiments described above, for example, including: s1: storing the value of the current dynamic host configuration protocol identification field and the default value of the dynamic host configuration protocol identification field in a static random storage area of the baseboard management controller in a mode of serializing files; wherein, the value of the current dynamic host configuration protocol identification field is the same as the default value of the dynamic host configuration protocol identification field; s2: setting the value of the dynamic host configuration protocol identification field of the server end to a static random storage area of the baseboard management controller through an out-of-band command, and modifying the value of the current dynamic host configuration protocol identification field in the serialization file; s3: the starting process of the basic input/output system finishes the initialization of the baseboard management controller, so that the static random storage area is accessible; s4: analyzing a serialization file of a static random storage area of the baseboard management controller; s5: acquiring a value of a dynamic host configuration protocol identification field modified by an out-of-band command in a serialization file; s6: comparing the acquired value of the dynamic host configuration protocol identification field with a default value of the dynamic host configuration protocol identification field; s7: judging whether the comparison results are consistent; if not, executing the step S8; if yes, executing step S9; s8: modifying the value of the dynamic host configuration protocol identification field of the local machine into a value obtained by analysis, and then guiding the pre-starting execution environment; executing step S10; s9: keeping the value of the dynamic host configuration protocol identification field as the default value of the dynamic host configuration protocol identification field, and not modifying; executing step S10; s10: and guiding the pre-starting execution environment, and remotely downloading the starting file from the server side.
The method, apparatus, device and medium for dynamically adjusting DHCP identification fields of the present invention are elements and algorithm steps of the examples described in connection with the embodiments disclosed herein, and can be implemented as electronic hardware, computer software, or a combination of both, and to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described in terms of functionality in the foregoing description. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
Although the present invention has been described in detail by way of preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications and substitutions may be made in the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and it is intended that all such modifications and substitutions be within the scope of the present invention/be within the scope of the present invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for dynamically adjusting a DHCP identification field, comprising the steps of:
setting the value of a server-side dynamic host configuration protocol identification field to a static random access memory area of a baseboard management controller through an out-of-band command;
the starting process of the basic input/output system finishes the initialization of the baseboard management controller, and analyzes and obtains the value of the dynamic host configuration protocol identification field set in the static random storage area of the baseboard management controller;
comparing the acquired value of the dynamic host configuration protocol identification field with a default value of the dynamic host configuration protocol identification field;
when the comparison results are inconsistent, modifying the value of the dynamic host configuration protocol identification field of the local machine to be the value obtained by analysis, and then performing the boot of the pre-boot execution environment.
2. The method for dynamically adjusting DHCP identification field according to claim 1, wherein the step of setting the value of the server-side dynamic host configuration protocol identification field to the static random access memory area of the baseboard management controller by an out-of-band command comprises:
the value of the dynamic host configuration protocol identification field is stored in a serialization file manner in the static random access memory area of the baseboard management controller.
3. The method for dynamically adjusting DHCP identification field according to claim 2, wherein the step of storing the value of the server-side dynamic host configuration protocol identification field in a serialized file in the static random access memory area of the baseboard management controller specifically comprises:
storing the value of the current dynamic host configuration protocol identification field and the default value of the dynamic host configuration protocol identification field in a static random storage area of the baseboard management controller in a mode of serializing files; wherein the value of the current dynamic host configuration protocol identification field is the same as the default value of the dynamic host configuration protocol identification field.
4. A method for dynamically adjusting a DHCP identification field according to claim 3, wherein the step of setting the value of the server-side dynamic host configuration protocol identification field to the static random access memory area of the baseboard management controller by an out-of-band command comprises:
and setting the value of the dynamic host configuration protocol identification field of the server side to a static random storage area of the baseboard management controller through an out-of-band command, and modifying the value of the current dynamic host configuration protocol identification field in the serialization file.
5. The method for dynamically adjusting a DHCP identification field according to claim 4, wherein the step of completing the initialization of the baseboard management controller and parsing the value of the dynamic host configuration protocol identification field set to the static random access memory area of the baseboard management controller by the bios startup process comprises:
the starting process of the basic input/output system finishes the initialization of the baseboard management controller, so that the static random storage area is accessible;
analyzing a serialization file of a static random storage area of the baseboard management controller;
and acquiring the value of the dynamic host configuration protocol identification field modified by the out-of-band command in the serialization file.
6. The method for dynamically adjusting a DHCP identification field according to claim 1, further comprising, after the step of comparing the obtained value of the dynamic host configuration protocol identification field with a default value:
and when the comparison results are consistent, keeping the value of the dynamic host configuration protocol identification field as the default value of the dynamic host configuration protocol identification field.
7. The method for dynamically adjusting a DHCP identification field according to claim 6, wherein the step of maintaining the value of the dynamic host configuration protocol identification field as the default value of the dynamic host configuration protocol identification field when the comparison results are identical comprises:
and guiding the pre-starting execution environment, and remotely downloading the starting file from the server side.
8. The device for dynamically adjusting the DHCP identification field is characterized by comprising a storage setting module, a processing analysis acquisition module, a comparison judgment module and an identification value modification module;
the storage setting module is used for setting the value of the server-side dynamic host configuration protocol identification field to the static random storage area of the baseboard management controller through an out-of-band command;
the processing analysis acquisition module is used for completing the initialization of the baseboard management controller in the starting process of the basic input/output system and analyzing and acquiring the value of the dynamic host configuration protocol identification field set in the static random storage area of the baseboard management controller;
the comparison judging module is used for comparing the acquired value of the dynamic host configuration protocol identification field with the default value of the dynamic host configuration protocol identification field;
and the identification value modification module is used for modifying the value of the dynamic host configuration protocol identification field of the local machine into the value obtained by analysis when the comparison results are inconsistent.
9. An electronic device, the electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; memory stores computer program instructions executable by at least one processor to enable the at least one processor to perform the method of dynamically adjusting DHCP identification fields according to any one of claims 1 to 7.
10. A non-transitory computer readable storage medium storing computer instructions that cause the computer to perform the method of dynamically adjusting a DHCP identification field according to any one of claims 1 to 7.
CN202310302122.5A 2023-03-24 2023-03-24 Method, device, equipment and medium for dynamically adjusting DHCP identification field Pending CN116302138A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310302122.5A CN116302138A (en) 2023-03-24 2023-03-24 Method, device, equipment and medium for dynamically adjusting DHCP identification field

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310302122.5A CN116302138A (en) 2023-03-24 2023-03-24 Method, device, equipment and medium for dynamically adjusting DHCP identification field

Publications (1)

Publication Number Publication Date
CN116302138A true CN116302138A (en) 2023-06-23

Family

ID=86790221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310302122.5A Pending CN116302138A (en) 2023-03-24 2023-03-24 Method, device, equipment and medium for dynamically adjusting DHCP identification field

Country Status (1)

Country Link
CN (1) CN116302138A (en)

Similar Documents

Publication Publication Date Title
WO2017166446A1 (en) Vulnerability-fixing method and device
CN112434278A (en) Bare computer authentication method, apparatus, device and medium
CN109492181A (en) Method for page jump, device, computer equipment and storage medium
CN112527397A (en) Method and device for modifying basic input output system options and computer equipment
CN113064625B (en) Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band
CN111124437A (en) Bare computer resource configuration information acquisition method, system and equipment based on OpenStack
CN111459558B (en) Video interface self-adaptive configuration method, device, equipment and storage medium
US11704105B2 (en) Method, device, and computer program product for managing virtual machine upgrade
US11431795B2 (en) Method, apparatus and storage medium for resource configuration
CN106126303B (en) Installation method, the apparatus and system of (SuSE) Linux OS
CN111651215A (en) BIOS setting self-adaption method and device, storage medium and computer equipment
CN111753309A (en) Display card switching method, server and storage medium
CN113467777A (en) Path identification method, device and system
CN116302138A (en) Method, device, equipment and medium for dynamically adjusting DHCP identification field
WO2019100704A1 (en) Starting method for multi-mode iot device, multi-mode iot device, and storage medium
CN113595762B (en) Network card configuration storage method and device
CN113419814B (en) Virtual machine creating method, device, equipment and storage medium in cloud platform
CN112241141B (en) Hardware configuration method, system, device and medium of PLC control system
CN115543460A (en) Initialization method and device of server mainboard
CN106681761B (en) Interactive upgrading method and system
CN106293620B (en) The method of parameter in intel detection of platform Flash Rom
CN114995888A (en) Intelligent network card deployment method, device and medium
US10089322B2 (en) Portable electronic device, method for sharing file between multiple operating systems, recording medium and computer program product
CN111414175A (en) Network installation method, system and device of operating system and readable storage medium
CN115495161B (en) BIOS option modification validation method and device and storage medium

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