A network setting method, apparatus, device and medium

Obtaining and storing network configuration information through IPMI commands solves the problem of network configuration not being retained when the server firmware version is upgraded, achieving fast and stable network settings and reducing development time and operational complexity.

CN119676083BActive Publication Date: 2025-10-10INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411892672.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-10-10
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

In the existing technology, when the server firmware version is upgraded, the network configuration cannot be properly retained, resulting in the need to customize the transition version. This process is time-consuming, labor-intensive and error-prone, affecting business nodes.

Method used

The current network configuration information is obtained through IPMI commands and stored in EEPROM. After refreshing the controller firmware version, the network information is determined and reset to avoid customizing transition versions.

Benefits of technology

It reduces development difficulty and time, improves the flexibility and stability of network configuration, avoids compatibility issues, and simplifies the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676083B_ABST
    Figure CN119676083B_ABST
Patent Text Reader

Abstract

The application discloses a network setting method, device, equipment and medium, and belongs to the technical field of network configuration. The method comprises the following steps: obtaining current network configuration information through a command for displaying all network information; storing the obtained current network configuration information in a storage; refreshing the firmware version of a controller to a second firmware version; starting the second firmware version of the controller, obtaining a flag bit of a network information setting command; judging whether the flag bit of the network information setting command is a first preset value; in response to the flag bit of the network information setting command being the first preset value, obtaining the current network configuration information in the storage, and reconfiguring the network of the controller according to the current network configuration information and a command for setting single network information. The application does not need to customize a transition version, uses an IPMI command to reserve the network configuration of the controller, reduces the development difficulty, and shortens the product development time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network configuration technology, and in particular to a network setting method, apparatus, device and medium. Background Art

[0002] Currently, customers have a large number of servers in their data centers, each with a different model and firmware version of the baseboard management controller (BMC). To facilitate efficient server management, out-of-band management is typically used, relying on network IP addresses. Customers often have customized network configuration requirements, such as setting static IP addresses to manage their servers. During firmware upgrades spanning multiple versions, network configurations may not be retained. To avoid tedious operations and impacting business nodes, most servers currently do not support the use of in-band scripts to retain network configurations. Therefore, the current approach involves preserving the network configuration during the upgrade, refreshing a transitional version, transferring the network configuration to the transitional version, and then upgrading from the transitional version to the customer's desired release. This method is not only time-consuming and labor-intensive, but also prone to errors. This requires customizing the transitional version, which is a time-consuming and labor-intensive process. Furthermore, two upgrades are required, which is time-consuming and labor-intensive. Furthermore, any issues with the transitional version can easily be transferred to the release. Summary of the Invention

[0003] In order to overcome the above technical defects, the purpose of this application is to provide a network setting method, device, equipment and medium, the method comprising: responding to receiving a command to obtain network information, wherein the command to obtain network information is sent by a client to a controller operating on a first firmware version; obtaining current network configuration information through a command to display all network information; storing the obtained current network configuration information in a memory; refreshing the firmware version of the controller to a second firmware version; starting the second firmware version of the controller and obtaining a flag bit of a command to set network information; determining whether the flag bit of the command to set network information is a first preset value; in response to the flag bit of the command to set network information being the first preset value, obtaining the current network configuration information in the memory, and resetting the network of the controller based on the current network configuration information and the command to set a single network information. This application does not require a customized transition version and uses IPMI commands to retain the network configuration of the controller, reducing development difficulty and shortening product development time.

[0004] The specific technical solutions provided in the embodiments of this application are as follows:

[0005] In a first aspect, the present application provides a network setting method, which is applied to a controller and includes:

[0006] In response to receiving a command to obtain network information, wherein the command to obtain network information is sent by the client to the controller operating on the first firmware version;

[0007] Get the current network configuration information by displaying all network information commands;

[0008] Storing the acquired current network configuration information in a memory;

[0009] Refreshing the firmware version of the controller to a second firmware version;

[0010] Open the second firmware version of the controller and obtain the flag bit of the command to set network information;

[0011] Determining whether the flag bit of the command to set network information is a first preset value;

[0012] In response to the flag bit of the command to set network information being a first preset value, the current network configuration information in the memory is acquired, and the network settings of the controller are re-performed according to the current network configuration information and the command to set single network information.

[0013] In one embodiment, before storing the acquired current network configuration information in a memory, the method includes:

[0014] The area storing the network configuration in the memory is cleared by the command for obtaining network information, wherein the memory is an erasable programmable read-only memory.

[0015] In one embodiment, resetting the network of the controller according to the current network configuration information and the command for setting single network information includes:

[0016] Setting the network acquisition mode of the controller to a static mode according to the current network configuration information and a command for setting single network information;

[0017] Set the network IP address information of the controller;

[0018] Setting the network subnet mask information of the controller;

[0019] Set the network gateway address information of the controller.

[0020] In one embodiment, after resetting the network of the controller according to the current network configuration information and the command for setting single network information, the method includes:

[0021] Verify the controller network after network setting;

[0022] The verification of the controller network after the network setting includes:

[0023] Obtain the configured controller network information through the command to display all network information;

[0024] Obtaining network configuration information of the storage;

[0025] Comparing the network information of the controller after the network setting with the network configuration information of the memory to determine whether the network information of the controller after the setting is consistent with the network configuration information of the memory;

[0026] If yes, the verification is passed, and the flag of the setting network information command is set to a second preset value; if no, the network settings of the controller are performed again according to the current network configuration information and the command to set single network information;

[0027] The verification of the controller network after setting also includes:

[0028] The client compares the network information before the controller firmware version is updated with the network information after the controller firmware version is updated using information in the client database;

[0029] Determine whether the network information before the controller firmware version is updated is consistent with the network information after the controller firmware version is updated;

[0030] If so, the verification is passed; if not, the network settings of the controller are re-performed according to the current network configuration information in the memory and the command for setting single network information.

[0031] In one embodiment, storing the acquired current network configuration information in a memory includes:

[0032] Setting the flag bit of the setting network information command to a first preset value;

[0033] In response to the flag bit of the setting network information command not being the first preset value, the area storing the network configuration in the memory is cleared again, the acquired current network configuration information is stored in the memory or the operation process of performing network setting on the controller is ended.

[0034] In one embodiment, the method comprises:

[0035] When a failure occurs in retaining the network configuration of the controller through the command for obtaining network information, manually executing a command for displaying all network information through a script tool, obtaining current network configuration information through the command for displaying all network information, and storing the manually obtained current network configuration information in a read-only memory;

[0036] Obtaining current network configuration information in the read-only memory, and reconfiguring the network of the controller according to the current network configuration information and a command for setting single network information executed by a manual script.

[0037] In one of the embodiments, the method further comprises:

[0038] Optimizing the network configuration of the controller;

[0039] The optimizing the network configuration of the controller comprises:

[0040] After modifying the configuration file of the controller, resetting the network configuration of the controller by restarting a network configuration management service item; and / or

[0041] Viewing and configuring the network of the controller through a system installation interface of the server; and / or

[0042] Setting the network of the controller by using an intelligent platform management interface tool and an in-band batch configuration; and / or

[0043] Communicating with the controller by an intelligent platform management interface command, batch configuring server information, and automatically optimizing the network configuration process of the controller by a script;

[0044] The automatically optimizing the network configuration process of the controller by the script comprises:

[0045] Adding an exception handling mechanism in the network configuration of the controller, and continuing to run the script when the network is interrupted or a configuration error occurs by the exception handling mechanism;

[0046] Recording a log of each time of configuring the network of the controller, and troubleshooting the network of the controller according to the log;

[0047] Configuring multiple servers in parallel by a multi-thread or asynchronous IO technology strategy, and shortening the network configuration time of the controller by the multi-thread or asynchronous IO technology strategy.

[0048] In a second aspect, the application further provides a network configuration device, which comprises:

[0049] A receiving module, configured to respond to receiving a command for obtaining network information, wherein the command for obtaining network information is sent by a client to a controller working at a first firmware version;

[0050] A first obtaining module, configured to obtain current network configuration information by a command for displaying all network information;

[0051] A storage module, used to store the acquired current network configuration information in a memory;

[0052] An upgrading module, configured to update the firmware version of the controller to a second firmware version;

[0053] A second acquisition module is used to start the second firmware version of the controller and obtain the flag bit of the command to set network information;

[0054] A judging module, configured to judge whether the flag bit of the command to set network information is a first preset value;

[0055] The setting module is used to obtain the current network configuration information in the memory in response to the flag bit of the setting network information command being a first preset value, and re-set the network of the controller according to the current network configuration information and the command to set single network information.

[0056] In a third aspect, a network setting device is also provided, including:

[0057] one or more processors;

[0058] a storage device for storing one or more programs;

[0059] When the one or more programs are executed by the one or more processors, the one or more processors implement the network setting method as described in any one of the first aspects.

[0060] In a fourth aspect, the present application further provides a computer device, comprising:

[0061] A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the network setting method as described in any one of the first aspects.

[0062] In a fifth aspect, the present application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any of the network setting methods described in the first aspect.

[0063] In a sixth aspect, the present application further provides a computer storage medium, the medium comprising:

[0064] A computer program is stored thereon, and when the computer program is executed by a processor, the steps of any network setting method described in the first aspect are implemented.

[0065] Compared with the prior art, the method described in the technical solution provided by the embodiment of the present application includes: responding to receiving a command to obtain network information, wherein the command to obtain network information is sent by a client to a controller operating on a first firmware version; obtaining current network configuration information through a command to display all network information; storing the obtained current network configuration information in a memory; refreshing the firmware version of the controller to a second firmware version; starting the second firmware version of the controller and obtaining a flag bit of a command to set network information; determining whether the flag bit of the command to set network information is a first preset value; in response to the flag bit of the command to set network information being the first preset value, obtaining the current network configuration information in the memory, and resetting the network of the controller based on the current network configuration information and the command to set a single network information. This application does not require a customized transition version and uses IPMI commands to retain the network configuration settings of the controller, reducing development difficulty and shortening product development time.

[0066] The technical solution provided in the embodiment of the present application directly uses IPMI commands to perform configuration retention operations without the need to develop a transition version, which can greatly reduce development difficulty and shorten product development time. Compared with the transition version, the IPMI command only needs to refresh the controller firmware version once, which also makes client operations more convenient and quick.

[0067] The technical solution provided in the embodiment of the present application does not retain the network configuration by retaining the configuration file, but uses the configuration file that comes with the new version, which will not have compatibility issues and the baseboard management controller function is more stable; at the same time, different power-off non-volatile powered erasable memories can be selected according to the configuration of the BMC and the motherboard, which provides diverse choices and is flexible and convenient. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. 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 any creative work.

[0069] Figure 1 A first flow chart of the network setting method provided in Example 1 of the present application;

[0070] Figure 2 A second flow chart of the network setting method provided in Example 1 of the present application;

[0071] Figure 3 A third flow chart of the network setting method provided in Example 1 of the present application;

[0072] Figure 4A structural diagram of a network setting device provided in Example 3 of the present application;

[0073] Figure 5 The exemplary system provided for the seventh embodiment of the present application can be used to implement the various embodiments described in the present application. DETAILED DESCRIPTION

[0074] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0075] It should be noted that, unless the context clearly requires otherwise, words such as “include” and “comprising” throughout the specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, as “including but not limited to”.

[0076] Furthermore, in the description of the present application, unless otherwise specified, “plurality” means two or more.

[0077] The Baseboard Management Controller (BMC) is the server's management controller, improving system reliability, security, and manageability. A BMC is typically viewed as a small operating system or dedicated management system independent of the server's compute nodes, with greater authority than the host server. This enables the BMC to manage and monitor service nodes in real time, ensuring the separation of service and management nodes and preventing interference from service nodes on management nodes. The BMC, combined with the Intelligent Platform Management Interface (IPMI), manages core server functions such as hardware status management, operating system management, health status management, and power consumption management.

[0078] Electrically Erasable Programmable Read-Only Memory (EEPROM) is a non-volatile memory that allows data to be written and erased electrically. Unlike traditional ROM (Read-Only Memory), which is programmed during the manufacturing process and cannot be modified, EEPROM can be reprogrammed multiple times, making it suitable for applications where data needs to be frequently updated or changed.

[0079] And the reserved configuration usually refers to saving the user's settings, parameters or states in electronic devices or systems, so as to restore to the previous state after the device restarts or powers off; such a function is very important in many applications, through the reserved configuration, the device and system can provide better user experience, reduce the user's re-setting work after the device restarts or powers off.

[0080] At the same time, the baseboard management controller is mainly to facilitate users to manage and understand the server situation, the server out-of-band management is a hardware-based management method, using the baseboard management controller to provide a management interface, through a dedicated data channel to remotely maintain and manage the device, completely independent of the device operating system, can be in the device shutdown state to remotely monitor and manage, such as booting, shutting down, setting server Bios, monitoring hardware, etc.

[0081] The customer room needs to monitor the BMC out-of-band to achieve the effect of managing the entire server room, and the BMC manufacturer will continue to iterate the firmware to increase functions to solve problems, when the customer needs to upgrade the firmware, the difference between the current firmware and the required firmware needs to be evaluated, and the BMC management exception after the firmware refresh is avoided as much as possible; Therefore, it is necessary to retain the BMC network information, so that the management program can smoothly take over the refreshed controller BMC.

[0082] Embodiment one

[0083] The embodiment of the application provides a network setting method, as shown in the figure Figure 1 The method is applied to a controller, and the method comprises the following steps of:

[0084] In response to receiving a command for obtaining network information, wherein the command for obtaining network information is sent by a client to the controller working in a first firmware version;

[0085] The current network configuration information is obtained through a command for displaying all network information;

[0086] The obtained current network configuration information is stored in a storage;

[0087] The firmware version of the controller is refreshed to a second firmware version;

[0088] The flag bit of the setting network information command is obtained after the second firmware version of the controller is started;

[0089] It is judged whether the flag bit of the setting network information command is a first preset value;

[0090] In response to the flag bit of the command to set network information being a first preset value, the current network configuration information in the memory is acquired, and the network settings of the controller are re-performed according to the current network configuration information and the command to set single network information.

[0091] Specifically, this application does not require a customized transition version, but directly uses IPMI commands to retain and set network configurations;

[0092] IPMI command to obtain network information (IPMI_GET_LAN_PARAM), through this command you can get the current network configuration and save it to EEPROM or other non-volatile electrically erasable memory;

[0093] IPMI command for setting network information (IPMI_SET_LAN_PARAM). This command can read the network configuration from EEPROM or other non-volatile, electrically erasable memory and set it to the controller BMC;

[0094] Here, the network configuration is not retained by retaining the configuration file. Instead, the network configuration is retained by reading the current network configuration and then resetting the network. This can successfully retain the network configuration when there are major changes in the network configuration file.

[0095] The beneficial effects of the technical solution provided by the embodiments of the present application are:

[0096] This application does not require a customized transition version and uses IPMI commands to retain the network configuration settings of the controller, which reduces the development difficulty and shortens the product development time.

[0097] The technical solution provided in the embodiment of the present application directly uses IPMI commands to perform configuration retention operations without the need to develop a transition version, which can greatly reduce development difficulty and shorten product development time. Compared with the transition version, the IPMI command only needs to refresh the controller firmware version once, which also makes client operations more convenient and quick.

[0098] The technical solution provided in the embodiment of the present application does not retain the network configuration by retaining the configuration file, but uses the configuration file that comes with the new version, which will not have compatibility issues and the baseboard management controller function is more stable; at the same time, different power-off non-volatile powered erasable memories can be selected according to the configuration of the BMC and the motherboard, which provides diverse choices and is flexible and convenient.

[0099] Example 2

[0100] The present application embodiment provides a network setting method, such as Figure 1 As shown, the method includes:

[0101] Step S01, in response to receiving a command for obtaining network information, wherein the command for obtaining network information is sent by a client to a controller operating on a first firmware version;

[0102] Get the current network configuration information by displaying all network information commands.

[0103] Step S02: Clearing the area storing the network configuration in the memory through the IPMI command for obtaining network information, wherein the memory is an erasable programmable read-only memory.

[0104] Step S03: storing the acquired current network configuration information in a read-only memory.

[0105] Specifically, using IPMI commands to retain and set network configurations includes: first, using the IPMI_GET_LAN_PARAM command (IPMI command to obtain network information) to obtain the current network configuration; the main function of this command is to extract network-related parameters and settings from the management controller and save this information to the EEPROM (power-off non-volatile electrically erasable memory); the use of EEPROM ensures that the network configuration can still be retained after the system is restarted or powered off, thereby avoiding the information in the EEPROM from being erased after the configuration is not retained; in addition, in order to avoid the influence of the information in the previous memory EEPROM, before writing the network data to the EEPROM, the IPMI_GET_LAN_PARAM command will first erase the area in the EEPROM that stores the network configuration.

[0106] In addition, the EEPROM in this application includes the EEPROM of the BMC controller, the motherboard TF card and other non-volatile electrically erasable memories that are suitable for different memories.

[0107] Step S031, setting the flag bit of the IPMI command for setting network information to a first preset value;

[0108] In response to the flag bit of the IPMI command for setting the network information not being a first preset value, the area storing the network configuration in the read-only memory is cleared again, and the acquired current network configuration information is stored in the read-only memory or the operation process of performing network setting on the controller is ended.

[0109] Specifically, the flag bit of the IPMI command for setting the network information is set to 1, wherein the first preset value is 1.

[0110] Step S04: The network configuration is not retained, and the client updates the firmware version of the controller to the second firmware version.

[0111] Specifically, here, the network configuration is not retained by retaining the configuration file. The general way to retain the network configuration is to retain the configuration file, so that the new version can directly use the configuration file to complete the relevant settings; however, with the iteration of version functions, new functions are added and related configuration options are added. When the new version uses the older configuration file, there is a risk of missing some functions. The use of IPMI commands to read the version configuration and then retain it again will enable the new version to use its own configuration file, without compatibility issues, and at the same time make the baseboard management controller function more stable.

[0112] Step S05: start the second firmware version of the controller, obtain the flag bit of the IPMI command for setting network information, and determine whether the flag bit of the IPMI command for setting network information is a first preset value;

[0113] In response to the flag bit of the IPMI command for setting network information being a first preset value, the current network configuration information in the read-only memory is obtained, and the network settings of the controller are re-performed according to the current network configuration information and the command for setting single network information.

[0114] Step S05 further includes:

[0115] Step S051, setting the network acquisition mode of the controller to a static mode according to the current network configuration information and a command for setting single network information;

[0116] Set the network IP address information of the controller;

[0117] Setting the network subnet mask information of the controller;

[0118] Set the network gateway address information of the controller.

[0119] Specifically, use the following command to configure the network settings of the controller:

[0120] Set the network acquisition mode of the controller to static mode ipmitool lan set 1ipsrc static;

[0121] Set the network IP address of the controller to 192.168.1.1;

[0122] Set the network subnet mask information of the controller to 255.255.255.0;

[0123] Set the network gateway address information of the controller to 192.168.1.250.

[0124] Using the IPMI command for setting network information (IPMI_SET_LAN_PARAM command), the network configuration information previously saved in the EEPROM can be read out and applied to the baseboard management controller. Through this command, users can quickly restore the previous network settings to ensure the connectivity and stability of the management system. This method not only improves the flexibility of network configuration, but also simplifies the management process, making network maintenance more efficient.

[0125] In summary, IPMI commands provide a convenient way to manage and maintain network configurations, ensuring that the system maintains the best network status under various circumstances.

[0126] Step S06, verifying the controller network after network setting;

[0127] The verification of the controller network after the network setting includes:

[0128] Obtain the configured controller network information through the command to display all network information;

[0129] Obtaining network configuration information of the read-only memory;

[0130] Comparing the network information of the controller after the network setting with the network configuration information of the read-only memory to determine whether the network information of the controller after the setting is consistent with the network configuration information of the read-only memory;

[0131] If yes, the verification is passed, and the flag bit of the IPMI command for setting the network information is set to a second preset value (0); if no, the network settings of the controller are performed again according to the current network configuration information and the command for setting the single network information;

[0132] The verification of the controller network after setting also includes:

[0133] The client compares the network information before the controller firmware version is updated with the network information after the controller firmware version is updated using information in the client database;

[0134] Determine whether the network information before the controller firmware version is updated is consistent with the network information after the controller firmware version is updated;

[0135] If so, the verification is passed; if not, the network settings of the controller are re-performed according to the current network configuration information in the read-only memory and the command for setting single network information.

[0136] Specifically, use the command to display all network information (ipmitool lan print command) to view the configured network information, then read the network information in the EEPROM for comparison. If the configured network information is consistent with the network information in the EEPROM, verification is successful.

[0137] After completing the IPMI_GET_LAN_PARAM and IPMI_SET_LAN_PARAM command processes, customers can also use the information in the database to compare whether the network information before and after the refresh is consistent. If they are consistent, the verification is successful.

[0138] Among them, the second preset value is 0.

[0139] Step S07: When a failure occurs in retaining the network configuration of the controller through the IPMI command for obtaining network information, manually executing a command for displaying all network information through a script tool, obtaining current network configuration information through the command for displaying all network information, and storing the manually obtained current network configuration information in a read-only memory;

[0140] The current network configuration information in the read-only memory is acquired, and the network settings of the controller are re-performed according to the current network configuration information and a command for setting single network information executed by a manual script.

[0141] Specifically, if the IPMI_GET_LAN_PARAM command fails, you can manually execute the ipmitool lan print command in-band to view network information and manually write the current network configuration information to the EEPROM to repair the fault.

[0142] If the IPMI_SET_LAN_PARAM command fails to execute, you can also use the in-band manual IPMI command to read the network information stored in the EEPROM and use the command to set single network information (ipmitool lan set) to set the current BMC network to solve the problem.

[0143] Step S08, optimizing the network settings of the controller;

[0144] The optimizing the network settings of the controller includes:

[0145] After modifying the controller's configuration file, resetting the controller's network configuration by restarting the network configuration management service; and / or

[0146] View and configure the controller network through the server's system installation interface; and / or

[0147] Setting up the controller network using the Intelligent Platform Management Interface tool and in-band batch configuration; and / or

[0148] Communicate with the controller via IPMI commands, configure server information in batches, and automate and optimize the controller network configuration process via scripts;

[0149] The controller network configuration process is optimized through script automation, including:

[0150] Add an exception handling mechanism to the controller network configuration, through which the script continues to run in the event of network interruption or configuration error;

[0151] Recording logs for each configuration of the controller network and troubleshooting the controller network based on the logs;

[0152] Multiple servers are configured in parallel through multi-threading or asynchronous IO technology strategies, and the controller network configuration time is shortened through the multi-threading or asynchronous IO technology strategies.

[0153] like Figure 3 As shown, the present application sends the IPMI_GET_LAN_PARAM command out-of-band, which can start the operation of automatically retaining the configuration to a non-volatile electrically erasable memory such as EEPROM when power is off;

[0154] The controller BMC receives the IPMI_GET_LAN_PARAM command, uses the ipmitool lan print command to view the current network configuration information, clears the EEPROM, writes the queried current network configuration information to the read-only memory EEPROM, and finally sets the flag bit of the IPMI_SET_LAN_PARAM command to 1;

[0155] The client does not retain the configuration and refreshes the BMC to the new version;

[0156] After the new version is started, it will self-check the IPMI_SET_LAN_PARAM flag bit; if it is 1, it will automatically execute the IPMI_SET_LAN_PARAM command operation;

[0157] Read the current network configuration information in the EEPROM through the IPMI_SET_LAN_PARAM command, set the current BMC network using commands such as ipmitoollan set, verify the controller network after the network setting, and set the flag bit of the IPMI_SET_LAN_PARAM command to 0 after verification.

[0158] In this way, the client only needs to perform two operations of sending an IPMI_GET_LAN_PARAM command and refreshing the new BMC firmware version to realize the refreshing operation of retaining the network configuration between versions.

[0159] In addition, the network setting of the controller according to the current network configuration information further includes:

[0160] For the Windows network, install the network controller in the server manager;

[0161] Configure the network controller application using the Install-NetworkController command;

[0162] Modify the cluster and application settings of the network controller using the Set-NetworkControllerCluster and Set-NetworkController commands;

[0163] For the Linux system, record the IP address, network mask and gateway information, then switch to the root user using the su tool, and modify the network card information;

[0164] After modifying the network configuration, restart the network service using the systemctl restart network.service command;

[0165] For the CentOS 7 operating system, edit the / etc / sysconfig / network-scripts / ifcfg file to set the network parameters, wherein the network parameters include at least one of the specified network card IP address acquisition parameter BOOTPROTO, network configuration parameter ONBOOT, network protocol address parameter IPADDR, network mask NETMASK, gateway GATEWAY and domain name system DNS1 and domain name system DNS2.

[0166] Through the interactive interface configuration of the text user interface nmtui tool, edit the IP address, subnet mask, gateway, DNS and other information, and restart the network service.

[0167] According to the specific controller type and operating system, the corresponding steps are selected for network setting, which improves the flexibility and reliability of the controller network setting.

[0168] The network setting method provided by the embodiments of the present application can also be improved and optimized without departing from the technical scheme of the present application, and these improvements and optimizations should also be considered as the protection scope of the present application.

[0169] The beneficial effects of the technical solution provided by the embodiments of the present application are:

[0170] This application does not require a customized transition version and uses IPMI commands to retain the network configuration settings of the controller, which reduces the development difficulty and shortens the product development time.

[0171] The technical solution provided in the embodiment of the present application directly uses IPMI commands to perform configuration retention operations without the need to develop a transition version, which can greatly reduce development difficulty and shorten product development time. Compared with the transition version, the IPMI command only needs to refresh the controller firmware version once, which also makes client operations more convenient and quick.

[0172] The technical solution provided in the embodiment of the present application does not retain the network configuration by retaining the configuration file, but uses the configuration file that comes with the new version, which will not have compatibility issues and the baseboard management controller function is more stable; at the same time, different power-off non-volatile powered erasable memories can be selected according to the configuration of the BMC and the motherboard, which provides diverse choices and is flexible and convenient.

[0173] Example 3

[0174] This application provides a network setting device, such as Figure 4 As shown, the device includes: a receiving module, a first acquisition module, a storage module, an upgrade module, a second acquisition module, a judgment module, a setting module, a verification module, and an optimization module.

[0175] In this embodiment, the receiving module is configured to respond to receiving a command to obtain network information, wherein the command to obtain network information is sent by the client to the controller operating on the first firmware version;

[0176] A first acquisition module is used to obtain current network configuration information through a command to display all network information;

[0177] A storage module, configured to store the acquired current network configuration information in a memory;

[0178] An upgrading module, configured to update the firmware version of the controller to a second firmware version;

[0179] A second acquisition module is used to start the second firmware version of the controller and obtain the flag bit of the command to set network information;

[0180] A judging module, configured to judge whether the flag bit of the command to set network information is a first preset value;

[0181] The setting module is used to obtain the current network configuration information in the memory in response to the flag bit of the setting network information command being a first preset value, and re-set the network of the controller according to the current network configuration information and the command to set single network information.

[0182] In this embodiment, the setting module is used to clear the area storing the network configuration in the read-only memory through the IPMI command for obtaining network information.

[0183] In one embodiment, the setting module is used to set the network acquisition mode of the controller to a static mode according to the current network configuration information and a command for setting single network information;

[0184] Set the network IP address information of the controller;

[0185] Setting the network subnet mask information of the controller;

[0186] Set the network gateway address information of the controller.

[0187] In one embodiment, the verification module is used to verify the controller network after the network is set;

[0188] The verification of the controller network after the network setting includes:

[0189] Obtain the configured controller network information through the command to display all network information;

[0190] Obtaining network configuration information of the read-only memory;

[0191] Comparing the network information of the controller after the network setting with the network configuration information of the read-only memory to determine whether the network information of the controller after the setting is consistent with the network configuration information of the read-only memory;

[0192] If yes, the verification is passed, and the flag bit of the IPMI command for setting the network information is set to a second preset value; if no, the network settings of the controller are performed again according to the current network configuration information and the command for setting the single network information;

[0193] The verification of the controller network after setting also includes:

[0194] The client compares the network information before the controller firmware version is updated with the network information after the controller firmware version is updated using information in the client database;

[0195] Determine whether the network information before the controller firmware version is updated is consistent with the network information after the controller firmware version is updated;

[0196] If so, the verification is passed; if not, the network settings of the controller are re-performed according to the current network configuration information in the read-only memory and the command for setting single network information.

[0197] In one embodiment, the setting module is configured to set the flag bit of the set network information IPMI command to a first preset value;

[0198] In response to the flag bit of the IPMI command for setting the network information not being a first preset value, the area storing the network configuration in the read-only memory is cleared again, and the acquired current network configuration information is stored in the read-only memory or the operation process of performing network setting on the controller is ended.

[0199] In one embodiment, a setting module is configured to, when a failure occurs in retaining the network configuration of the controller through the IPMI command for obtaining network information, manually execute a command for displaying all network information through a script tool, obtain current network configuration information through the command for displaying all network information, and store the manually obtained current network configuration information in a read-only memory;

[0200] The current network configuration information in the read-only memory is acquired, and the network settings of the controller are re-performed according to the current network configuration information and a command for setting single network information executed by a manual script.

[0201] In one embodiment, an optimization module is used to optimize the network settings of the controller;

[0202] The optimizing the network settings of the controller includes:

[0203] After modifying the controller's configuration file, resetting the controller's network configuration by restarting the network configuration management service; and / or

[0204] View and configure the controller network through the server's system installation interface; and / or

[0205] Setting up the controller network using the Intelligent Platform Management Interface tool and in-band batch configuration; and / or

[0206] Communicate with the controller via IPMI commands, configure server information in batches, and automate and optimize the controller network configuration process via scripts;

[0207] The controller network configuration process is optimized through script automation, including:

[0208] Add an exception handling mechanism to the controller network configuration, through which the script continues to run in the event of network interruption or configuration error;

[0209] Recording logs for each configuration of the controller network and troubleshooting the controller network based on the logs;

[0210] Multiple servers are configured in parallel through multi-threading or asynchronous IO technology strategies, and the controller network configuration time is shortened through the multi-threading or asynchronous IO technology strategies.

[0211] The beneficial effects of the technical solution provided by the embodiments of the present application are:

[0212] This application does not require a customized transition version and uses IPMI commands to retain the network configuration settings of the controller, which reduces the development difficulty and shortens the product development time.

[0213] The technical solution provided in the embodiment of the present application directly uses IPMI commands to perform configuration retention operations without the need to develop a transition version, which can greatly reduce development difficulty and shorten product development time. Compared with the transition version, the IPMI command only needs to refresh the controller firmware version once, which also makes client operations more convenient and quick.

[0214] The technical solution provided in the embodiment of the present application does not retain the network configuration by retaining the configuration file, but uses the configuration file that comes with the new version, which will not have compatibility issues and the baseboard management controller function is more stable; at the same time, different power-off non-volatile powered erasable memories can be selected according to the configuration of the BMC and the motherboard, which provides diverse choices and is flexible and convenient.

[0215] Example 4

[0216] The present invention also provides a network configuration device, comprising:

[0217] one or more processors;

[0218] a storage device for storing one or more programs;

[0219] When the one or more programs are executed by the one or more processors, the one or more processors execute the following network configuration method:

[0220] In response to receiving a command to obtain network information, wherein the command to obtain network information is sent by the client to the controller operating on the first firmware version;

[0221] Get the current network configuration information by displaying all network information commands;

[0222] Storing the acquired current network configuration information in a memory;

[0223] Refreshing the firmware version of the controller to a second firmware version;

[0224] Open the second firmware version of the controller and obtain the flag bit of the command to set network information;

[0225] Determining whether the flag bit of the set network information command is a first preset value;

[0226] In response to the flag bit of the command to set network information being a first preset value, the current network configuration information in the memory is acquired, and the network settings of the controller are re-performed according to the current network configuration information and the command to set single network information.

[0227] The beneficial effects of the technical solution provided by the embodiments of the present application are:

[0228] This application does not require a customized transition version and uses IPMI commands to retain the network configuration settings of the controller, which reduces the development difficulty and shortens the product development time.

[0229] The technical solution provided in the embodiment of the present application directly uses IPMI commands to perform configuration retention operations without the need to develop a transition version, which can greatly reduce development difficulty and shorten product development time. Compared with the transition version, the IPMI command only needs to refresh the controller firmware version once, which also makes client operations more convenient and quick.

[0230] Example 5

[0231] The present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following network setting method can be executed:

[0232] In response to receiving a command to obtain network information, wherein the command to obtain network information is sent by the client to the controller operating on the first firmware version;

[0233] Get the current network configuration information by displaying all network information commands;

[0234] Storing the acquired current network configuration information in a memory;

[0235] Refreshing the firmware version of the controller to a second firmware version;

[0236] Open the second firmware version of the controller and obtain the flag bit of the command to set network information;

[0237] Determining whether the flag bit of the set network information command is a first preset value;

[0238] In response to the flag bit of the command to set network information being a first preset value, the current network configuration information in the memory is acquired, and the network settings of the controller are re-performed according to the current network configuration information and the command to set single network information.

[0239] The beneficial effects of the technical solution provided by the embodiments of the present application are:

[0240] This application does not require a customized transition version and uses IPMI commands to retain the network configuration settings of the controller, which reduces the development difficulty and shortens the product development time.

[0241] The technical solution provided in the embodiment of the present application does not retain the network configuration by retaining the configuration file, but uses the configuration file that comes with the new version, which will not have compatibility issues and the baseboard management controller function is more stable; at the same time, different power-off non-volatile powered erasable memories can be selected according to the configuration of the BMC and the motherboard, which provides diverse choices and is flexible and convenient.

[0242] Example 6

[0243] The present application also provides a computer program product, including a computer program, which, when executed by a processor, can implement the following network setting method:

[0244] In response to receiving a command to obtain network information, wherein the command to obtain network information is sent by the client to the controller operating on the first firmware version;

[0245] Get the current network configuration information by displaying all network information commands;

[0246] Storing the acquired current network configuration information in a memory;

[0247] Refreshing the firmware version of the controller to a second firmware version;

[0248] Open the second firmware version of the controller and obtain the flag bit of the command to set network information;

[0249] Determining whether the flag bit of the set network information command is a first preset value;

[0250] In response to the flag bit of the command to set network information being a first preset value, the current network configuration information in the memory is acquired, and the network settings of the controller are re-performed according to the current network configuration information and the command to set single network information.

[0251] The beneficial effects of the technical solution provided by the embodiments of the present application are:

[0252] The technical solution provided in the embodiment of the present application directly uses IPMI commands to perform configuration retention operations without the need to develop a transition version, which can greatly reduce development difficulty and shorten product development time. Compared with the transition version, the IPMI command only needs to refresh the controller firmware version once, which also makes client operations more convenient and quick.

[0253] The technical solution provided in the embodiment of the present application does not retain the network configuration by retaining the configuration file, but uses the configuration file that comes with the new version, which will not have compatibility issues and the baseboard management controller function is more stable; at the same time, different power-off non-volatile powered erasable memories can be selected according to the configuration of the BMC and the motherboard, which provides diverse choices and is flexible and convenient.

[0254] Example 7

[0255] The present application provides a computer storage medium, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0256] In response to receiving a command to obtain network information, wherein the command to obtain network information is sent by the client to the controller operating on the first firmware version;

[0257] Get the current network configuration information by displaying all network information commands;

[0258] Storing the acquired current network configuration information in a memory;

[0259] Refreshing the firmware version of the controller to a second firmware version;

[0260] Open the second firmware version of the controller and obtain the flag bit of the command to set network information;

[0261] Determining whether the flag bit of the set network information command is a first preset value;

[0262] In response to the flag bit of the command to set network information being a first preset value, the current network configuration information in the memory is acquired, and the network settings of the controller are re-performed according to the current network configuration information and the command to set single network information.

[0263] In one embodiment, before storing the acquired current network configuration information in a memory, the method includes:

[0264] The area storing the network configuration in the memory is cleared by the command for obtaining network information, wherein the memory is an erasable programmable read-only memory.

[0265] In one embodiment, resetting the network of the controller according to the current network configuration information and the command for setting single network information includes:

[0266] Setting the network acquisition mode of the controller to a static mode according to the current network configuration information and a command for setting single network information;

[0267] Set the network IP address information of the controller;

[0268] Setting the network subnet mask information of the controller;

[0269] Set the network gateway address information of the controller.

[0270] In one embodiment, after resetting the network of the controller according to the current network configuration information and the command for setting single network information, the method includes:

[0271] Verify the controller network after network setting;

[0272] The verification of the controller network after the network setting includes:

[0273] Obtain the configured controller network information through the command to display all network information;

[0274] Obtaining network configuration information of the storage;

[0275] Comparing the network information of the controller after the network setting with the network configuration information of the memory to determine whether the network information of the controller after the setting is consistent with the network configuration information of the memory;

[0276] If yes, the verification is passed, and the flag of the setting network information command is set to a second preset value; if no, the network settings of the controller are performed again according to the current network configuration information and the command to set single network information;

[0277] The verification of the controller network after setting also includes:

[0278] The client compares the network information before the controller firmware version is updated with the network information after the controller firmware version is updated using information in the client database;

[0279] Determine whether the network information before the controller firmware version is updated is consistent with the network information after the controller firmware version is updated;

[0280] If so, the verification is passed; if not, the network settings of the controller are re-performed according to the current network configuration information in the memory and the command for setting single network information.

[0281] In one of the embodiments, after storing the obtained current network configuration information in the memory, the method comprises:

[0282] setting a flag bit of the network information setting command to a first preset value;

[0283] in response to the flag bit of the network information setting command not being the first preset value, re-clearing the area in the memory storing the network configuration, storing the obtained current network configuration information in the memory, or ending the network setting operation of the controller.

[0284] In one of the embodiments, the method comprises:

[0285] when the network configuration reservation of the controller fails through the network information obtaining command, manually executing a command for displaying all network information through a script tool, obtaining current network configuration information through the command for displaying all network information, and storing the manually obtained current network configuration information in the read-only memory;

[0286] obtaining the current network configuration information in the read-only memory, and re-setting the network of the controller according to the current network configuration information and the manually executed network information setting command.

[0287] In one of the embodiments, the method further comprises:

[0288] optimizing the network setting of the controller;

[0289] the optimization of the network setting of the controller comprises:

[0290] after modifying the configuration file of the controller, resetting the network configuration of the controller by restarting a network configuration management service item; and / or

[0291] viewing and configuring the network of the controller through a system installation interface of the server; and / or

[0292] setting the network of the controller by using an intelligent platform management interface tool and an in-band batch configuration mode; and / or

[0293] communicating with the controller through an intelligent platform management interface command, batch configuring server information, and automatically optimizing the network configuration process of the controller through a script;

[0294] the automatic optimization of the network configuration process of the controller through the script comprises:

[0295] Add an exception handling mechanism to the controller network configuration, through which the script continues to run in the event of network interruption or configuration error;

[0296] Recording logs for each configuration of the controller network and troubleshooting the controller network based on the logs;

[0297] Multiple servers are configured in parallel through multi-threading or asynchronous IO technology strategies, and the controller network configuration time is shortened through the multi-threading or asynchronous IO technology strategies.

[0298] This application does not require a customized transition version and uses IPMI commands to retain the network configuration settings of the controller, which reduces the development difficulty and shortens the product development time.

[0299] Figure 5 The exemplary system provided in the seventh embodiment of the present application can be used to implement the various embodiments described in the present application;

[0300] like Figure 5 As shown, in some embodiments, the system can be used as any of the above-mentioned devices for network settings in each of the described embodiments. In some embodiments, the system may include one or more computer-readable media (e.g., system memory or NVM / storage device) having results and one or more processors (e.g., (one or more) processors) coupled to the one or more computer-readable media and configured to execute the results to implement the module to perform the actions described in this application.

[0301] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0302] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0303] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A network setting method, characterized in that: The method is applied to a controller, and the method includes: In response to receiving a command to obtain network information, wherein the command to obtain network information is sent by the client to the controller operating on the first firmware version; Get the current network configuration information by displaying all network information commands; Storing the acquired current network configuration information in a memory; Refreshing the firmware version of the controller to a second firmware version; Open the second firmware version of the controller and obtain the flag bit of the command to set network information; Determining whether the flag bit of the command to set network information is a first preset value; In response to the flag bit of the command to set network information being a first preset value, the current network configuration information in the memory is acquired, and the network settings of the controller are re-performed according to the current network configuration information and the command to set single network information.

2. The network setting method according to claim 1, wherein: Before storing the acquired current network configuration information in the memory, the method includes: The area storing the network configuration in the memory is cleared by the command for obtaining network information, wherein the memory is an erasable programmable read-only memory.

3. The network setting method according to claim 1, wherein: The resetting the network of the controller according to the current network configuration information and the command for setting single network information includes: Setting the network acquisition mode of the controller to a static mode according to the current network configuration information and a command for setting single network information; Set the network IP address information of the controller; Setting the network subnet mask information of the controller; Set the network gateway address information of the controller.

4. The network setting method according to claim 1, wherein: After resetting the network of the controller according to the current network configuration information and the command for setting single network information, the method includes: Verify the controller network after network setting; The verification of the controller network after the network setting includes: Obtain the configured controller network information through the command to display all network information; Obtaining network configuration information of the storage; Comparing the network information of the controller after the network setting with the network configuration information of the memory to determine whether the network information of the controller after the setting is consistent with the network configuration information of the memory; If yes, the verification is passed, and the flag of the setting network information command is set to a second preset value; if no, the network settings of the controller are performed again according to the current network configuration information and the command to set single network information; The verification of the controller network after the network setting also includes: The client compares the network information before the controller firmware version is updated with the network information after the controller firmware version is updated using information in the client database; Determine whether the network information before the controller firmware version is updated is consistent with the network information after the controller firmware version is updated; If so, the verification is passed; if not, the network settings of the controller are re-performed according to the current network configuration information in the memory and the command for setting single network information.

5. The network setting method according to claim 2, wherein: After storing the acquired current network configuration information in the memory, the method further includes: Setting the flag bit of the setting network information command to a first preset value; In response to the flag bit of the setting network information command not being the first preset value, the area storing the network configuration in the memory is cleared again, the acquired current network configuration information is stored in the memory or the operation process of performing network setting on the controller is ended.

6. The network setting method according to claim 1, wherein: The method comprises: When a failure occurs in retaining the network configuration of the controller through the command for obtaining network information, manually executing a command for displaying all network information through a script tool, obtaining current network configuration information through the command for displaying all network information, and storing the manually obtained current network configuration information in a read-only memory; The current network configuration information in the read-only memory is acquired, and the network settings of the controller are re-performed according to the current network configuration information and a command for setting single network information executed by a manual script.

7. The network setting method according to claim 1, wherein: The method further comprises: Optimizing the network settings of the controller; The optimizing the network settings of the controller includes: After modifying the controller's configuration file, resetting the controller's network configuration by restarting the network configuration management service; and / or View and configure the controller network through the server's system installation interface; and / or Setting up the controller network using the Intelligent Platform Management Interface tool and in-band batch configuration; and / or Communicate with the controller through intelligent platform management interface commands, configure server information in batches, and optimize the controller network configuration process through script automation; The controller network configuration process is optimized through script automation, including: Add an exception handling mechanism to the controller network configuration, through which the script continues to run in the event of network interruption or configuration error; Recording logs for each configuration of the controller network and troubleshooting the controller network based on the logs; Multiple servers are configured in parallel through multi-threading or asynchronous IO technology strategies, and the controller network configuration time is shortened through the multi-threading or asynchronous IO technology strategies.

8. A network setting device, characterized in that: The device comprises: a receiving module, configured to respond to receiving a command to obtain network information, wherein the command to obtain network information is sent by the client to the controller operating on the first firmware version; A first acquisition module is used to obtain current network configuration information through a command to display all network information; A storage module, used to store the acquired current network configuration information in a memory; An upgrading module, configured to update the firmware version of the controller to a second firmware version; A second acquisition module is used to start the second firmware version of the controller and obtain the flag bit of the command to set network information; A judging module, configured to judge whether the flag bit of the command to set network information is a first preset value; The setting module is used to obtain the current network configuration information in the memory in response to the flag bit of the setting network information command being a first preset value, and re-set the network of the controller according to the current network configuration information and the command to set single network information.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the network setting method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the network setting method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Firmware updating method, device and air conditioner

    CN109343881A

  • BIOS firmware refreshing test method and device, electronic equipment and storage medium

    CN113220332A