ADDRESS CONFIGURATION METHOD, DEVICE, STORAGE MEDIUM AND PROGRAM PRODUCT

After the BMC application layer is started, the fixed physical address and network address are read and reset, and the IP address conflicts and network blockage caused by random MAC addresses are solved, and stable network connections and remote operation and maintenance are achieved.

CN119383170BActive Publication Date: 2025-03-14INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411947013.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-03-14
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

During server production, the management controller (BMC) may assign random MAC addresses, resulting in IP address conflicts and network blockage, especially in case of large-scale deployments.

Method used

After the application layer of the BMC is started, the network configuration is read to obtain the physical address, and when determining that the address is a random address, the network service is restarted to configure the fixed network address.

Benefits of technology

It realizes that when the BMC random MAC address occurs, the fixed physical address and network address are reconfigured, which avoids IP address conflicts, ensures smooth network operation and support remote operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383170B_ABST
    Figure CN119383170B_ABST
Patent Text Reader

Abstract

In the field of computer application technology, the present application discloses an address configuration method, device, storage medium and program product, the method comprising: after the application layer of the management controller is started, the network configuration of the management controller is read to obtain the physical address; when the physical address is determined to be a random physical address, the physical address in the network configuration is reset using a pre-assigned fixed physical address; the network service in the management controller is restarted, and a fixed network address is configured based on the fixed physical address. The technical effect of the present application: after the physical address of the management controller is randomized, it can be reconfigured to a fixed physical address, and out-of-band monitoring can be achieved through the network based on the fixed network address. Even if a large number of configurations are performed, there will be no address conflicts, and the network can be kept unobstructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer application technology, and in particular to an address configuration method, device, storage medium and program product. Background Art

[0002] When servers are manufactured in the factory, each machine is usually assigned a MAC (Media Access Control Address) address for the management controller port. This MAC address is usually fixed and refreshed to the motherboard's EEPROM (Electrically Erasable Programmable read only memory) through on-site tools.

[0003] After the server is powered on, the BMC will read the MAC address stored in the EEPROM through I2C (Inter-Integrated Circuit) during the uboot stage, and will set it to the MAC address of the BMC dedicated port after successful reading. Because the uboot stage starts too quickly, if the BMC fails to read the EEPROM MAC address at this stage, the BMC will be assigned a random MAC address. In this way, after the BMC starts up, the IP address assigned based on the random MAC address will be different from the IP address assigned based on the fixed MAC address. If the server is deployed over a large area, the random MAC address will cause IP address conflicts for the BMCs of different servers, and the address conflict will cause network inaccessibility. In addition, the random IP assigned based on the random MAC will make it impossible to implement out-of-band monitoring through the network.

[0004] In summary, how to effectively solve the problem of configuring a fixed address for a management controller is a technical problem that those skilled in the art urgently need to solve. Summary of the invention

[0005] The purpose of the present application is to provide an address configuration method, device, storage medium and program product, which can realize configuration address correction of a management controller assigned a random address, so that the management controller is configured with a fixed address.

[0006] In order to solve the above technical problems, this application provides the following technical solutions:

[0007] An address configuration method, comprising:

[0008] After the application layer of the management controller is started, the network configuration of the management controller is read to obtain the physical address;

[0009] In the case where it is determined that the physical address is a random physical address, resetting the physical address in the network configuration using a pre-assigned fixed physical address;

[0010] Restart the network service in the management controller, and configure a fixed network address based on the fixed physical address.

[0011] Preferably, determining that the physical address is a random physical address includes:

[0012] Reading the fixed physical address from the memory of the server mainboard;

[0013] Comparing the physical address with the fixed physical address to see if they match;

[0014] If yes, determining that the physical address is a fixed physical address;

[0015] If not, the physical address is determined to be the random physical address.

[0016] Preferably, reading the network configuration of the management controller to obtain the physical address comprises:

[0017] Reading the network configuration of the management controller N times to obtain a physical address;

[0018] Accordingly, reading the fixed physical address from the memory of the server mainboard includes:

[0019] Reading the fixed physical address from the memory N times;

[0020] Comparing the physical address with the fixed physical address to see whether they match, including:

[0021] Determine whether the physical address read with the same number of reads is consistent with the fixed physical address, and obtain N determination results;

[0022] Using the N judgment results, determine whether the physical address matches the fixed physical address.

[0023] Preferably, using the N judgment results to determine whether the physical address matches the fixed physical address includes:

[0024] If the number of inconsistencies in the N judgment results is greater than a preset value, it is determined that the physical address does not match the fixed physical address;

[0025] and / or,

[0026] If the inconsistency ratio among the N judgment results is greater than a preset ratio, it is determined that the physical address does not match the fixed physical address.

[0027] Preferably, it also includes:

[0028] The fixed network address is provided to the operation and maintenance end through the operation and maintenance information table, so that the operation and maintenance end can perform remote operation and maintenance on the management controller based on the fixed network address.

[0029] Preferably, restarting the network service in the management controller and configuring a fixed network address based on the fixed physical address includes:

[0030] Using the network service to perform address mapping on the fixed physical address to obtain the fixed network address;

[0031] The network configuration is updated using the fixed network address.

[0032] Preferably, it also includes:

[0033] Restarting the network service again, and using the network service to perform address mapping on the fixed physical address to obtain the fixed network address;

[0034] The network configuration is updated using the fixed network address.

[0035] Preferably, restarting the network service in the management controller and configuring a fixed network address based on the fixed physical address includes:

[0036] After restarting the network service in the management controller, determining whether the management controller has successfully configured the fixed physical address;

[0037] If yes, configuring a fixed network address based on the fixed physical address;

[0038] If not, the physical address in the network configuration is reset using a pre-assigned fixed physical address.

[0039] Preferably, determining whether the management controller has successfully configured the fixed physical address includes:

[0040] reading a network configuration of the management controller to obtain a new physical address;

[0041] Determining whether the new physical address is consistent with the fixed physical address;

[0042] If yes, determining that the management controller has successfully configured the fixed physical address;

[0043] If not, it is determined that the management controller has not successfully configured the fixed physical address.

[0044] Preferably, after restarting the network service in the management controller and configuring the fixed network address based on the fixed physical address, the method further includes:

[0045] Reading the network configuration of the management controller to obtain a new network address;

[0046] Read the fixed network address corresponding to the management controller in the operation and maintenance table;

[0047] Determining whether the fixed network address is consistent with the new network address;

[0048] If not, the physical address in the network configuration is reset using the fixed physical address.

[0049] Preferably, after the application layer of the management controller is started, the network configuration of the management controller is read to obtain the physical address, including:

[0050] After the application layer of the management controller is started, a monitoring thread is created;

[0051] Using the monitoring thread to read the network configuration of the management controller to obtain a physical address;

[0052] Correspondingly, after configuring the fixed network address based on the fixed physical address, the method further includes:

[0053] Exit the monitoring thread.

[0054] Preferably, before reading the network configuration of the management controller to obtain the physical address, the method further includes:

[0055] Reading a read flag corresponding to the fixed physical address from a memory of the server mainboard; wherein the read flag is a flag recorded according to a reading situation after reading the fixed physical address before the management controller is started into the kernel;

[0056] If the read flag indicates a read failure, the network configuration of the management controller is read to obtain a physical address.

[0057] An address configuration device, comprising:

[0058] An address reading module, used for reading the network configuration of the management controller to obtain the physical address after the application layer of the management controller is started;

[0059] A physical address reconfiguration module, configured to reset the physical address in the network configuration using a pre-assigned fixed physical address when the physical address is determined to be a random physical address;

[0060] The network address reconfiguration module is used to restart the network service in the management controller and configure a fixed network address based on the fixed physical address.

[0061] An electronic device, comprising:

[0062] Memory for storing computer programs;

[0063] A processor is used to implement the steps of the above-mentioned address configuration method when executing the computer program.

[0064] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned address configuration method are implemented.

[0065] A computer program product includes a computer program / instruction, which implements the steps of the above-mentioned address configuration method when executed by a processor.

[0066] By applying the method provided in the embodiment of the present application, after the application layer of the management controller is started, the network configuration of the management controller is read to obtain the physical address; when it is determined that the physical address is a random physical address, the physical address in the network configuration is reset using a pre-assigned fixed physical address; the network service in the management controller is restarted, and a fixed network address is configured based on the fixed physical address.

[0067] The technical effect of the present application is as follows: After the management controller is started to the application layer, the physical address currently configured by the management controller can be obtained by reading the network configuration of the management controller. Then, when it is determined that the physical address is a random physical address, the physical address in the network configuration can be reset using the pre-assigned fixed physical address. By restarting the network service in the management controller, a fixed network address can be assigned based on the fixed physical address. In other words, in the present application, even if the management controller is configured with a random physical address, the fixed physical address can be reconfigured, and the fixed network address can be configured based on the reconfigured fixed physical address. In this way, after the physical address of the management controller is randomized, it can be reconfigured to a fixed physical address, and out-of-band monitoring can be achieved through the network based on the fixed network address. Even in large-scale configuration, there will be no address conflict, and the network can be guaranteed to be unobstructed.

[0068] Correspondingly, the embodiments of the present application also provide address configuration devices, equipment, readable storage media and computer program products corresponding to the above-mentioned address configuration method, which have the above-mentioned technical effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0070] Figure 1 This is a flowchart of an implementation method of an address configuration method in an embodiment of the present application;

[0071] Figure 2 This is a specific implementation flow chart of an address configuration method in an embodiment of the present application;

[0072] Figure 3 This is a schematic diagram of the structure of an address configuration device in an embodiment of the present application;

[0073] Figure 4 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application;

[0074] Figure 5 This is a schematic diagram of the specific structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0075] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0076] Please refer to Figure 1 , Figure 1 This is a flowchart of an address configuration method in an embodiment of the present application, the method comprising the following steps:

[0077] S101 . After the application layer of the management controller is started, the network configuration of the management controller is read to obtain a physical address.

[0078] The management controller includes but is not limited to a baseboard management controller (BMC), and may also be a remote management controller (iLo) or other management controllers with server management functions. The following takes the BMC as an example to describe the method in detail. For executing the method on other types of management controllers, you can refer to this and will not elaborate on them one by one.

[0079] Generally, when the server is produced in the factory, a fixed MAC address of the BMC port is usually assigned to each machine. The MAC address is usually fixed and refreshed to the EEPROM of the motherboard through the on-site tool. After the server is powered on, the BMC will read the MAC address stored in the EEPROM through I2C in the uboot stage, and will set it to the MAC address of the BMC port after the read is successful. Because the uboot stage starts too quickly, if the BMC fails to read the EEPROM MAC address at this stage, the BMC will be assigned a random MAC address.

[0080] The general startup process of the server is as follows:

[0081] The server is powered on and the BMC uboot starts.

[0082] During the uboot startup phase, I2C is used to read the EEPROM on the motherboard. By reading the fixed offset data, the fixed MAC address assigned to the machine is obtained. If the data reading fails, a random MAC address will be assigned to the BMC.

[0083] After reading the MAC address, it will be set to the BMC dedicated port MAC address, and then the Kernel will be started.

[0084] That is to say, when the BMC is started to the application layer, the network configuration of the BMC can be read, thereby clarifying the physical address of the current BMC configuration.

[0085] S102: When it is determined that the physical address is a random physical address, the physical address in the network configuration is reset using a pre-assigned fixed physical address.

[0086] After reading the MAC address currently configured by the BMC, it can be determined whether the MAC address is a random MAC address. If it is a random MAC address, in order to avoid subsequent network conflicts and other problems caused by the random address, the physical address of the BMC can be reconfigured, so that the physical address of the BMC is configured as a fixed MAC address.

[0087] Among them, if the AMC address is not a fixed MAC address, it is a random MAC address.

[0088] In a specific implementation of the present application, determining that the physical address is a random physical address includes:

[0089] Read a fixed physical address from the memory of the server motherboard;

[0090] Compare the physical address with the fixed physical address to see if they match;

[0091] If yes, then determining the physical address is a fixed physical address;

[0092] If not, the physical address is determined to be a random physical address.

[0093] The step of reading the network configuration of the management controller to obtain the physical address includes:

[0094] Read the network configuration of the management controller N times to obtain the physical address;

[0095] Accordingly, the fixed physical address is read from the memory of the server motherboard, including:

[0096] Read N fixed physical addresses from memory;

[0097] Check whether the physical address matches the fixed physical address, including:

[0098] Determine whether the physical address read by the same number of reads is consistent with the fixed physical address, and obtain N determination results;

[0099] Using the N judgment results, determine whether the physical address matches the fixed physical address.

[0100] Wherein, using N judgment results to determine whether the physical address matches the fixed physical address includes:

[0101] If the number of inconsistencies among the N judgment results is greater than a preset value, it is determined that the physical address does not match the fixed physical address;

[0102] and / or,

[0103] If the inconsistency ratio among the N judgment results is greater than a preset ratio, it is determined that the physical address does not match the fixed physical address.

[0104] For ease of description, the above steps are combined for explanation below.

[0105] The EEPROM in the server motherboard stores a fixed MAC address that is pre-determined and assigned to the BMC. When determining whether the MAC configured by the current BMC is a random MAC address, the fixed MAC address in the EEPROM in the motherboard and the MAC address in the network configuration of the BMC can be read at the same time, and then the two can be compared to determine whether the currently configured MAC address is a random MAC.

[0106] Taking into account that a single read may result in a reading failure or other contingencies, multiple reads and comparisons can be performed to obtain more accurate results.

[0107] Specifically, the currently configured MAC address and the fixed MAC address may be read N times, and consistency judgment is performed on the addresses read from two locations each time to obtain N judgment results.

[0108] If the number of inconsistencies among the N judgment results reaches a preset value, it is determined that the two do not match and the currently configured MAC address is a random MAC address;

[0109] Alternatively, if the inconsistency ratio among the N judgment results reaches a preset ratio, it is determined that the two do not match, when the configured MAC address is a random MAC address.

[0110] In practical applications, the preset threshold value can be determined according to the actual situation, such as the preset threshold value can be N or NM (0≤M<N), and the corresponding preset ratio can also be determined according to the actual situation, such as 100%, 90%, etc. In addition, N is a natural number greater than 1, such as N can be 10, and of course it can be other values.

[0111] In practical applications, based on actual needs, at least one of the number and ratio of inconsistencies in the judgment results can be selected for matching judgment.

[0112] S103: Restart the network service in the management controller, and configure a fixed network address based on the fixed physical address.

[0113] After configuring the BMC's MAC address as a fixed MAC address, you can restart the BMC's network service to assign a fixed IP address based on the fixed MAC address.

[0114] In a specific implementation of the present application, restarting the network service in the management controller and configuring the fixed network address based on the fixed physical address includes:

[0115] Use network services to map fixed physical addresses to obtain fixed network addresses;

[0116] Update the network configuration with a fixed network address.

[0117] For ease of description, the above steps are combined for explanation below.

[0118] After the network service is restarted, the IP address can be reconfigured based on the MAC address currently configured by the BMC.

[0119] Specifically, address mapping is performed based on a fixed physical address, and the obtained IP address is also a fixed IP address, and then allocation is performed based on the fixed IP address, so that the IP address of the BMC is also fixed.

[0120] In a specific implementation of the present application, it also includes:

[0121] Restart the network service again, and use the network service to map the fixed physical address to obtain the fixed network address;

[0122] Update the network configuration with a fixed network address.

[0123] In this embodiment, if the network service is restarted again due to power failure, equipment failure, etc., the network service can still obtain a fixed IP address by performing address mapping based on the fixed MAC address. In other words, the IP address of the BMC will remain the same IP address for a long time due to the fixed MAC address, i.e., the fixed IP address.

[0124] In a specific implementation of the present application, restarting the network service in the management controller and configuring the fixed network address based on the fixed physical address includes:

[0125] After restarting the network service in the management controller, determine whether the management controller has successfully configured a fixed physical address;

[0126] If yes, then configure a fixed network address based on the fixed physical address;

[0127] If not, the physical address in the network configuration is reset using the pre-assigned fixed physical address.

[0128] The step of determining whether the management controller has successfully configured a fixed physical address includes:

[0129] Read the network configuration of the management controller to obtain the new physical address;

[0130] Determine whether the new physical address is consistent with the fixed physical address;

[0131] If yes, it is determined that the management controller has successfully configured the fixed physical address;

[0132] If not, it is determined that the management controller did not successfully configure the fixed physical address.

[0133] For ease of description, the above steps are combined and explained below.

[0134] In the present application, after restarting the network service, it is possible to first determine whether the BMC has successfully configured a fixed MAC address. If so, a fixed IP can be configured based on the fixed MAC address. If not, it is possible to return to reconfigure the MAC address, that is, to re-execute the step of resetting the physical address in the network configuration using the pre-assigned fixed physical address.

[0135] When judging whether the fixed physical address is successfully configured, it can obtain the new MAC address by reading the network configuration. If the new MAC address is consistent with the fixed MAC address, it indicates that the fixed MAC address configuration has been successfully completed. Otherwise, the configuration fails and needs to be returned for reconfiguration.

[0136] In actual applications, in order to avoid repeated return to configure the AMC address, resulting in abnormal server startup, a repetition threshold can be set. When the number of repetitions exceeds the repetition threshold, an error message can be directly output.

[0137] By applying the method provided in the embodiment of the present application, after the application layer of the management controller is started, the network configuration of the management controller is read to obtain the physical address; when it is determined that the physical address is a random physical address, the physical address in the network configuration is reset using a pre-assigned fixed physical address; the network service in the management controller is restarted, and a fixed network address is configured based on the fixed physical address.

[0138] The technical effect of the present application is as follows: After the management controller is started to the application layer, the physical address currently configured by the management controller can be obtained by reading the network configuration of the management controller. Then, when it is determined that the physical address is a random physical address, the physical address in the network configuration can be reset using the pre-assigned fixed physical address. By restarting the network service in the management controller, a fixed network address can be assigned based on the fixed physical address. In other words, in the present application, even if the management controller is configured with a random physical address, the fixed physical address can be reconfigured, and the fixed network address can be configured based on the reconfigured fixed physical address. In this way, after the physical address of the management controller is randomized, it can be reconfigured to a fixed physical address, and out-of-band monitoring can be achieved through the network based on the fixed network address. Even in large-scale configuration, there will be no address conflict, and the network can be guaranteed to be unobstructed.

[0139] It should be noted that, based on the above embodiments, the embodiments of the present application also provide corresponding improved solutions. In the preferred / improved embodiments, the same steps or corresponding steps as those in the above embodiments can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be described one by one in the preferred / improved embodiments of this article.

[0140] In a specific implementation of the present application, it also includes:

[0141] Through the operation and maintenance information table, a fixed network address is provided to the operation and maintenance end so that the operation and maintenance end can perform remote operation and maintenance on the management controller based on the fixed network address.

[0142] In this embodiment, since the random MAC address can be revised into a fixed MAC address, out-of-band operation and maintenance of the BMC based on the fixed IP address can be implemented through the operation and maintenance information table.

[0143] Specifically, how to add a fixed IP address to the operation and maintenance information table can refer to the specific definition and information acquisition of the operation and maintenance information table, which will not be repeated here. In addition, how to perform out-of-band operation and maintenance on the BMC can also refer to the specific operation and maintenance plan.

[0144] In a specific implementation of the present application, after restarting the network service in the management controller and configuring the fixed network address based on the fixed physical address, the method further includes:

[0145] Read the network configuration of the management controller to obtain the new network address;

[0146] Read the fixed network address corresponding to the management controller in the operation and maintenance table;

[0147] Determine whether the fixed network address is consistent with the new network address;

[0148] If not, the physical address in the network configuration is reset using the fixed physical address.

[0149] For ease of description, the above steps are combined for explanation below.

[0150] In this application, after the BMC's MAC is reconfigured, the new IP address can be determined by reading the BMC's network configuration. At the same time, the fixed IP address corresponding to the BMC in the operation and maintenance table can be read. If the two are consistent, it means that the fixed MAC configuration is successful, otherwise it indicates that the configuration failed. At this time, the BMC's physical address can be reconfigured based on the fixed MAC address to ensure that the BMC's IP address is a fixed IP address.

[0151] In a specific implementation of the present application, after the application layer of the management controller is started, the network configuration of the management controller is read to obtain the physical address, including:

[0152] After the application layer of the management controller is started, a monitoring thread is created;

[0153] Using the monitoring thread to read the network configuration of the management controller to obtain the physical address;

[0154] Accordingly, after configuring the fixed network address based on the fixed physical address, the following steps are also included:

[0155] Exit the monitoring thread.

[0156] In actual applications, after the application layer is started, a monitoring thread can be created, and then the monitoring thread can be used to read the currently configured MAC address of the BMC, as well as the subsequent comparison and reconfiguration process. After completing the fixed IP configuration, the monitoring thread can be exited.

[0157] In a specific implementation manner of the present application, before reading the network configuration of the management controller to obtain the physical address, the method further includes:

[0158] Reading a read flag corresponding to the fixed physical address from the memory of the server mainboard; wherein the read flag is a flag recorded according to the reading situation after the fixed physical address is read before the management controller is started into the kernel;

[0159] If the read flag indicates a read failure, the network configuration of the management controller is read to obtain the physical address.

[0160] For ease of description, the above steps are combined for explanation below.

[0161] In the uboot stage, the BMC reads the MAC address from the EEPROM of the server motherboard. After reading, the EEPROM will record whether the reading is successful. If the reading is successful, the MAC address configuration of the BMC will most likely be a fixed MAC address, so the address configuration does not need to be performed again later; if the reading fails, the MAC address configuration of the BMC will most likely be a random MAC address, so the address configuration needs to be performed later.

[0162] In order to avoid additional operations, in this embodiment, before reading the network configuration of the BMC, the read mark in the EEPROM in the server motherboard can be read first. The read mark will record whether the data is read successfully in the uboot stage.

[0163] If the read flag indicates that the read is successful, the process ends. If the read flag indicates that the read fails, the address configuration can continue, that is, step S101 and subsequent steps can be executed.

[0164] To facilitate those skilled in the art to better understand and implement the address configuration method provided in the embodiment of the present application, the address configuration method is described in detail below with reference to specific application scenarios and related technologies as examples.

[0165] Computing power is the ability of a data center server to process data and output results. With the development of AI (artificial intelligence) technology and the application of large models, the computing power requirements will become higher and higher, which will require more and more servers to be deployed. For example, many Internet customers will join the wave of artificial intelligence, increase data center construction, increase server investment, and thus increase the computing power of data centers. Then the rapid adaptation and compatibility of the computing power components in the server will greatly improve the R&D efficiency and deployment efficiency of the server, and further promote the construction of data centers.

[0166] With the update and iteration of server technology, the monitoring requirements for BMC are getting higher and higher. BMC is a management controller. The architecture adopts ARM (Advanced RISC Machine, a processor architecture). The operating system adopts embedded Linux operating system and carries WEB (web) service. It interacts with components on the server motherboard through IPMI protocol. At the same time, for the convenience of management, it outputs data interface to the outside and can realize remote operation and maintenance through the network. This is a method that combines in-band and out-of-band management. In in-band management, by introducing the specific implementation of KVM, the operation is made intelligent and visualized. By introducing the Redfish (Representational State Transfer, used to manage and monitor hardware equipment in the data center, such as servers, storage and network equipment) standard, the user's security is better guaranteed; in out-of-band management, a management method that does not rely on the server host is completed through the BMC chip.

[0167] As the monitoring and management controller of the server, BMC can monitor the health status of the server in real time to ensure the safe operation of the server. Platform management corresponds to a series of monitoring and control functions, and the object of operation is the system hardware. For example, by monitoring the system's temperature, voltage, fan, power supply, etc., and making corresponding adjustments, the system is ensured to be in a healthy state. If the system is abnormal, the system can also be restarted by resetting. At the same time, platform management is also responsible for recording various hardware information and log records to prompt users and locate subsequent problems. Operation and maintenance personnel can obtain one-click monitoring logs by logging into BMCWEB or obtain sensor values ​​in real time through in-band and out-of-band methods, thereby ensuring the safe operation of the server.

[0168] Because the server is stored in the data center, and the operation and maintenance personnel monitor the status of the server in real time through the BMC monitoring platform, the remote monitoring of the BMC is extremely important. The remote monitoring of the BMC mainly depends on the network, and the BMC network is based on the assigned MAC address and the assigned IP. If the BMC does not correctly obtain the specified MAC address during the startup process, the BMC system will assign a random MAC address to the BMC by default, which will cause the BMC IP to change, and the operation and maintenance personnel will not be able to know the changed IP address, resulting in the inability to remotely monitor the status of the server.

[0169] In addition, if the MAC address is randomized, it may cause problems such as IP address conflicts in the local area network, which will have a great impact on operation and maintenance.

[0170] Based on this, the present application proposes an address configuration method, which can effectively solve the MAC randomization of BMC. Specifically, the method can prevent the BMC network IP from changing due to the random MAC allocation after the BMC fails to read the MAC address, making it impossible for the operation and maintenance personnel to remotely monitor the server.

[0171] That is to say, in the above method embodiment, an address configuration method is proposed to prevent the BMC MAC address from being randomized, which can prevent the BMC from using a random MAC address when the MAC reading fails, causing the BMC network IP address to change, making the BMC unable to perform remote operation and maintenance through the network.

[0172] Specifically, when the server is produced in the factory, a fixed MAC address of the BMC port is usually assigned to each machine. The MAC address is generally fixed and refreshed to the EEPROM of the motherboard through the on-site tool. After the server is powered on, the BMC will read the MAC address stored in the EEPROM through I2C in the uboot stage, and will set it to the MAC address of the BMC port after the read is successful.

[0173] It should be noted that because the uboot stage starts too quickly, if the BMC fails to read the EEPROM MAC address at this stage, the BMC will be assigned a random MAC address. After the BMC starts, the IP address assigned by the random MAC address will be different from the IP address assigned by the fixed MAC address. This difference will cause IP address conflicts due to random MAC addresses when deploying servers on a large scale, and some servers may be disconnected due to address conflicts.

[0174] In addition, because the IP address randomly assigned by the MAC is not in the fixed allocation table (i.e., the operation and maintenance information table), the operation and maintenance personnel usually cannot obtain this IP address, so the operation and maintenance personnel cannot view the operation and maintenance status of the server through the BMC WEB, nor can they implement out-of-band monitoring through the network.

[0175] The specific implementation of the address configuration method provided in the embodiment of the present application to solve the above-mentioned problem is as follows: the BMC creates a monitoring thread in which the MAC address of the EEPROM is polled in real time. If the normal MAC address read multiple times is inconsistent with the one assigned by the BMC, the MAC address of the EEPROM is used as the basis, the MAC address is reassigned to the BMC, and the BMC is restarted, so that the BMC can assign an IP according to the address of the EEPROM, thereby preventing the IP assigned by the random MAC of the BMC from causing the BMC network to be unavailable.

[0176] Please refer to Figure 2 In practical applications, the following steps can be implemented:

[0177] Step 1. Power on the server and start the BMC uboot.

[0178] Step 2: During the uboot startup phase, use I2C to read the EEPROM on the motherboard, and obtain the MAC address assigned by the machine by reading the fixed offset data. If the data reading fails, a random MAC address is assigned to the BMC.

[0179] Step 3: After reading the MAC address, set it to the BMC dedicated port MAC address, and then start the Kernel.

[0180] Step 4: Read the flag in the EEPROM on the motherboard using I2C to determine whether there is a failure flag. If there is a failure flag, execute step 5, otherwise, end the process.

[0181] Step 5. When the BMC starts to the application layer, a monitoring thread is created. The monitoring thread reads the MAC address in the EEPROM every 1 minute and stores it in an array. After each reading, it is compared with the MAC address in the BMC network configuration. If they are different, it will continue to read. This process can last 10 times. If the two are different ten times, it is determined that the current BMC configuration is a random MAC address, which is invalid and needs to be reset to the MAC address assigned by the machine. At this time, the MAC address of the EEPROM will be set to the MAC address of the BMC network configuration.

[0182] Step 6. After writing the BMC network configuration, restart the BMC network service and reallocate the BMC IP address.

[0183] Step 7: Check whether the configuration is successful; if successful, exit the monitoring thread; if failed, return to reconfigure the BMC MAC address.

[0184] It can be seen that the method provided in the present application can prevent the BMC from using a random MAC address when the MAC reading fails, causing the BMC network IP address to change, making it impossible for the BMC to be remotely operated and maintained through the network.

[0185] Furthermore, the method has strong replicability and scalability, improves the operational security of the server and solves the problem of preventing the BMC IP from being lost due to the randomization of the BMC MAC address, thereby making it impossible for operation and maintenance personnel to remotely monitor the operating status of the service, which has a significant impact on the operation and maintenance of the server.

[0186] This method brings significant benefits in the server production process, because in the server production process, the service diag (diagonal matrix) test is performed through automation. If multiple IP addresses are lost due to MAC address randomization, then the automation will not be able to run, and the production line workers need to manually use tools to refresh the firmware or restart the machine to obtain the MAC address, which greatly reduces the pass rate of the production line, causing waste of production line resources and increasing the workload of production line workers. Especially in recent years, with the explosion of AI artificial intelligence technology, the demand for server products has also exploded, and the production line's production capacity has also been under great pressure. The ability to ensure delivery is particularly prominent. Increasing the pass rate of production line products, greatly enhancing the ability to ensure delivery, and improving the utilization rate of production line production capacity can bring considerable economic benefits.

[0187] This method can also be extended to various embedded products, improving the stability of product networks and reducing customer operation and maintenance costs.

[0188] Corresponding to the above method embodiment, the embodiment of the present application further provides an address configuration device. The address configuration device described below and the address configuration method described above can refer to each other.

[0189] See also Figure 3 As shown, the device includes the following modules:

[0190] An address reading module 101 is used to read the network configuration of the management controller to obtain the physical address after the application layer of the management controller is started;

[0191] A physical address reconfiguration module 102, for reconfiguring the physical address in the network configuration using a pre-assigned fixed physical address when the physical address is determined to be a random physical address;

[0192] The network address reconfiguration module 103 is used to restart the network service in the management controller and configure a fixed network address based on the fixed physical address.

[0193] Using the device provided in the embodiment of the present application, after the application layer of the management controller is started, the network configuration of the management controller is read to obtain the physical address; when it is determined that the physical address is a random physical address, the physical address in the network configuration is reset using a pre-assigned fixed physical address; the network service in the management controller is restarted, and a fixed network address is configured based on the fixed physical address.

[0194] The technical effect of the present application is as follows: After the management controller is started to the application layer, the physical address currently configured by the management controller can be obtained by reading the network configuration of the management controller. Then, when it is determined that the physical address is a random physical address, the physical address in the network configuration can be reset using the pre-assigned fixed physical address. By restarting the network service in the management controller, a fixed network address can be assigned based on the fixed physical address. In other words, in the present application, even if the management controller is configured with a random physical address, the fixed physical address can be reconfigured, and the fixed network address can be configured based on the reconfigured fixed physical address. In this way, after the physical address of the management controller is randomized, it can be reconfigured to a fixed physical address, and out-of-band monitoring can be achieved through the network based on the fixed network address. Even in large-scale configuration, there will be no address conflict, and the network can be guaranteed to be unobstructed.

[0195] In a specific implementation of the present application, the physical address reconfiguration module is specifically used to read a fixed physical address from a memory of a server mainboard;

[0196] Compare the physical address with the fixed physical address to see if they match;

[0197] If yes, then determining the physical address is a fixed physical address;

[0198] If not, the physical address is determined to be a random physical address.

[0199] In a specific implementation of the present application, the address reading module is specifically used to read the network configuration of the management controller N times to obtain the physical address;

[0200] Accordingly, the physical address reconfiguration module is specifically used to read N fixed physical addresses from the memory;

[0201] Check whether the physical address matches the fixed physical address, including:

[0202] Determine whether the physical address read by the same number of reads is consistent with the fixed physical address, and obtain N determination results;

[0203] Using the N judgment results, determine whether the physical address matches the fixed physical address.

[0204] In a specific implementation of the present application, the physical address reconfiguration module is specifically used to determine that the physical address does not match the fixed physical address if the number of inconsistencies in the N judgment results is greater than a preset value;

[0205] and / or,

[0206] If the inconsistency ratio among the N judgment results is greater than a preset ratio, it is determined that the physical address does not match the fixed physical address.

[0207] In a specific implementation of the present application, it also includes:

[0208] The operation and maintenance module is used to provide a fixed network address to the operation and maintenance end through the operation and maintenance information table, so that the operation and maintenance end can perform remote operation and maintenance on the management controller based on the fixed network address.

[0209] In a specific implementation of the present application, the network address reconfiguration module is specifically used to perform address mapping on a fixed physical address using a network service to obtain a fixed network address;

[0210] Update the network configuration with a fixed network address.

[0211] In a specific implementation of the present application, the network address reconfiguration module is further used to restart the network service again, and use the network service to perform address mapping on the fixed physical address to obtain a fixed network address;

[0212] Update the network configuration with a fixed network address.

[0213] In a specific implementation of the present application, the network address reconfiguration module is specifically used to determine whether the management controller has successfully configured a fixed physical address after restarting the network service in the management controller;

[0214] If yes, then configure a fixed network address based on the fixed physical address;

[0215] If not, the physical address in the network configuration is reset using the pre-assigned fixed physical address.

[0216] In a specific implementation of the present application, the physical address reconfiguration module is specifically used to read the network configuration of the management controller to obtain a new physical address;

[0217] Determine whether the new physical address is consistent with the fixed physical address;

[0218] If yes, it is determined that the management controller has successfully configured the fixed physical address;

[0219] If not, it is determined that the management controller did not successfully configure the fixed physical address.

[0220] In a specific implementation of the present application, the physical address reconfiguration module is further used to restart the network service in the management controller, and after configuring the fixed network address based on the fixed physical address, read the network configuration of the management controller to obtain the new network address;

[0221] Read the fixed network address corresponding to the management controller in the operation and maintenance table;

[0222] Determine whether the fixed network address is consistent with the new network address;

[0223] If not, the physical address in the network configuration is reset using the fixed physical address.

[0224] In a specific implementation of the present application, the address reading module is specifically used to create a monitoring thread after the application layer of the management controller is started;

[0225] Using the monitoring thread to read the network configuration of the management controller to obtain the physical address;

[0226] Accordingly, after configuring the fixed network address based on the fixed physical address, the monitoring thread is exited.

[0227] In a specific implementation of the present application, it also includes:

[0228] A prejudgment module is used to read a read flag corresponding to a fixed physical address from a memory of a server mainboard before reading the network configuration of the management controller to obtain the physical address; wherein the read flag is a flag recorded according to a read condition after reading the fixed physical address before the management controller is started into the kernel;

[0229] If the read flag indicates a read failure, the address reading module is triggered to read the network configuration of the management controller to obtain the physical address.

[0230] Corresponding to the above method embodiment, an embodiment of the present application further provides an electronic device, and the electronic device described below and the address configuration method described above can refer to each other.

[0231] See also Figure 4 As shown, the electronic device includes:

[0232] A memory 332, for storing computer programs;

[0233] The processor 322 is configured to implement the steps of the address configuration method of the above method embodiment when executing a computer program.

[0234] For details, please refer to Figure 5 , Figure 5A schematic diagram of the specific structure of an electronic device provided for this embodiment, which may have relatively large differences due to different configurations or performances, may include one or more processors (central processing units, CPU) (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 can be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the processor 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.

[0235] The electronic device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .

[0236] The steps in the address configuration method described above can be implemented by the structure of an electronic device.

[0237] Corresponding to the above method embodiment, the embodiment of the present application further provides a readable storage medium. The readable storage medium described below and the address configuration method described above can refer to each other.

[0238] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the address configuration method of the above method embodiment are implemented.

[0239] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.

[0240] Corresponding to the above method embodiment, the embodiment of the present application further provides a computer program product. The computer program product described below and the address configuration method described above can refer to each other.

[0241] A computer program product includes a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the above-mentioned address configuration method are implemented.

[0242] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0243] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0244] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0245] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms include, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0246] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An address configuration method, characterized in that: include: After the application layer of the management controller is started, the network configuration of the management controller is read to obtain the physical address; In the case where it is determined that the physical address is a random physical address, resetting the physical address in the network configuration using a pre-assigned fixed physical address; Restarting the network service in the management controller, and configuring a fixed network address based on the fixed physical address; Wherein, determining that the physical address is a random physical address includes: Reading the fixed physical address from the memory of the server mainboard; Comparing the physical address with the fixed physical address to see if they match; If yes, determining that the physical address is a fixed physical address; If not, determining that the physical address is the random physical address; Reading the network configuration of the management controller to obtain the physical address includes: Reading the network configuration of the management controller N times to obtain a physical address; Accordingly, reading the fixed physical address from the memory of the server mainboard includes: Reading the fixed physical address from the memory N times; Comparing the physical address with the fixed physical address to see whether they match, including: Determine whether the physical address read with the same number of reads is consistent with the fixed physical address, and obtain N determination results; Using the N judgment results, determine whether the physical address matches the fixed physical address.

2. The method according to claim 1, characterized in that Determining whether the physical address matches the fixed physical address by using the N judgment results includes: If the number of inconsistencies in the N judgment results is greater than a preset value, it is determined that the physical address does not match the fixed physical address; and / or, If the inconsistency ratio among the N judgment results is greater than a preset ratio, it is determined that the physical address does not match the fixed physical address.

3. The method according to claim 1, characterized in that Also includes: The fixed network address is provided to the operation and maintenance end through the operation and maintenance information table, so that the operation and maintenance end can perform remote operation and maintenance on the management controller based on the fixed network address.

4. The method according to claim 1, characterized in that: Restarting the network service in the management controller and configuring a fixed network address based on the fixed physical address includes: Using the network service to perform address mapping on the fixed physical address to obtain the fixed network address; The network configuration is updated using the fixed network address.

5. The method according to claim 4, characterized in that Also includes: Restarting the network service again, and using the network service to perform address mapping on the fixed physical address to obtain the fixed network address; The network configuration is updated using the fixed network address.

6. The method according to claim 1, characterized in that Restarting the network service in the management controller and configuring a fixed network address based on the fixed physical address includes: After restarting the network service in the management controller, determining whether the management controller has successfully configured the fixed physical address; If yes, configuring a fixed network address based on the fixed physical address; If not, the physical address in the network configuration is reset using a pre-assigned fixed physical address.

7. The method according to claim 6, characterized in that Determining whether the management controller has successfully configured the fixed physical address includes: reading a network configuration of the management controller to obtain a new physical address; Determining whether the new physical address is consistent with the fixed physical address; If yes, determining that the management controller has successfully configured the fixed physical address; If not, it is determined that the management controller has not successfully configured the fixed physical address.

8. The method according to claim 1, characterized in that After restarting the network service in the management controller and configuring the fixed network address based on the fixed physical address, the method further includes: Reading the network configuration of the management controller to obtain a new network address; Read the fixed network address corresponding to the management controller in the operation and maintenance table; Determining whether the fixed network address is consistent with the new network address; If not, the physical address in the network configuration is reset using the fixed physical address.

9. The method according to claim 1, characterized in that: After the application layer of the management controller is started, the network configuration of the management controller is read to obtain the physical address, including: After the application layer of the management controller is started, a monitoring thread is created; Using the monitoring thread to read the network configuration of the management controller to obtain a physical address; Correspondingly, after configuring the fixed network address based on the fixed physical address, the method further includes: Exit the monitoring thread.

10. The method according to any one of claims 1 to 9, characterized in that: Before reading the network configuration of the management controller to obtain the physical address, the method further includes: Reading a read flag corresponding to the fixed physical address from a memory of the server mainboard; wherein the read flag is a flag recorded according to a reading situation after reading the fixed physical address before the management controller is started into the kernel; If the read flag indicates a read failure, the network configuration of the management controller is read to obtain a physical address.

11. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the address configuration method according to any one of claims 1 to 10 when executing the computer program.

12. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the address configuration method according to any one of claims 1 to 10 are implemented.

13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the address configuration method described in any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • BMC Web network information display and verification automatic testing method

    CN109450723A