Network setting method, device, equipment and medium

By using IPMI commands to restore network configuration during the server firmware upgrade process, the problem of network configuration retention in the existing technology is solved, and automated network configuration management is realized, the development process is simplified and stability is improved.

CN119676083AActive Publication Date: 2025-03-21INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

During the server firmware version upgrade process, it is difficult for the existing technology to effectively retain network configuration, resulting in complex upgrade process and error-prone, and the need to customize the transition version, which increases development difficulty and time.

Method used

By receiving commands to obtain network information, obtain the current network configuration information and store it in memory, refresh the controller firmware version, and then use the IPMI command to judge and restore the network configuration, avoiding the need for a transitional version.

Benefits of technology

It realizes automatic retention and recovery of network configuration, simplifies the development process, reduces product development time, and improves the functional stability of the substrate management controller.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676083A_ABST
    Figure CN119676083A_ABST
Patent Text Reader

Abstract

The invention discloses a network setting method and device, equipment and a medium, and belongs to the technical field of network configuration, and the method comprises the steps: obtaining current network configuration information through a command for displaying 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 a second firmware version of the controller, and obtaining a flag bit for setting a network information command; judging whether the flag bit of the network information setting command is a first preset value or not; and in response to the fact that the flag bit of the network information setting command is a first preset value, acquiring current network configuration information in the memory, and performing network setting on the controller again according to the current network configuration information and the command for setting single network information. According to the method, a transition version does not need to be customized, the IPMI command is used for carrying out network configuration reservation setting on the controller, the development difficulty is reduced, and the product development time is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] At present, there are many servers in the customer's computer room, with different models and different firmware versions of the baseboard management controller BMC (Baseboard Management Controller). In order to manage the servers conveniently and effectively, out-of-band management is generally adopted, which depends on the network IP. Customers have customized configuration requirements for the network, such as setting static IP to manage the server in the computer room; when upgrading the firmware version with a large span, there is a situation where the network configuration cannot be retained normally. In order to avoid cumbersome operations and avoid the impact on business nodes, most servers now do not support the use of the method of developing in-band scripts to retain the network configuration. Therefore, the current method is mainly to retain the network first during the upgrade, refresh a transition version, transfer the network configuration to the transition version, and then upgrade from the transition version to the official version required by the customer. This method is not only time-consuming and labor-intensive, but also prone to errors in the process. That is, the transition version needs to be customized first, which takes a long time and manpower; it needs to be upgraded twice, which is time-consuming and labor-intensive; if there is a problem with the transition version, it is also easy to be transferred to the official version. Summary of the invention

[0003] In order to overcome the above technical defects, the purpose of the present 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 working in 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, obtaining a flag of the command to set network information; determining whether the flag of the command to set network information is a first preset value; in response to the flag of the command to set network information being a first preset value, obtaining the current network configuration information in the memory, and resetting the network of the controller according to the current network configuration information and the command to set a single network information. The present application does not require a customized transition version, and uses IPMI commands to retain the network configuration of the controller, which reduces the difficulty of development and shortens product development time.

[0004] The specific technical solutions provided by 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 through the command that displays all network information;

[0008] The acquired current network configuration information is stored in the 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] Determine 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 the 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 the single network information.

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

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

[0015] In one embodiment, re-setting 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 settings;

[0022] The verifying 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] Acquire network configuration information of the storage device;

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

[0026] If yes, the verification is passed, and the flag bit of the command for setting 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 single network information;

[0027] The verification of the set controller network 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 through the information in the customer 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 of the memory and the command for setting single network information.

[0031] In one embodiment, after storing the acquired current network configuration information in a memory, the method further comprises:

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

[0033] In response to the flag bit of the command to set the network information being not 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 settings on the controller is terminated.

[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] 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 a command for setting single network information executed by a manual script.

[0037] In one embodiment, the method further comprises:

[0038] Optimizing the network settings of the controller;

[0039] The optimizing process of the network setting of the controller includes:

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

[0041] View and configure the controller network through the system installation interface of the server; and / or

[0042] Using the Intelligent Platform Management Interface Tool and in-band batch configuration to configure the controller network; and / or

[0043] 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;

[0044] The process of optimizing the controller network configuration through script automation includes:

[0045] Add an exception handling mechanism to the controller network configuration, through which the script continues to run when the network is interrupted or the configuration is wrong;

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

[0047] 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.

[0048] In a second aspect, the present application further provides a network setting device, the device comprising:

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

[0050] A first acquisition module, used to acquire current network configuration information through a command to display all network information;

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

[0052] An upgrade module, used for updating the firmware version of the controller to a second firmware version;

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

[0054] A judging module, used for judging whether the flag bit of the command for setting 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, the 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 further 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 the network setting method described in any one of the first aspects are implemented.

[0065] Compared with the prior art, the method of the technical solution provided in the embodiment of the present application includes: responding to receiving a command for obtaining network information, wherein the command for obtaining network information is sent by the client to the controller working in the first firmware version; obtaining the 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 the second firmware version; starting the second firmware version of the controller, obtaining the flag of the command for setting network information; judging whether the flag of the command for setting network information is the first preset value; in response to the flag of the command for setting network information being the first preset value, obtaining the current network configuration information in the memory, and resetting the network of the controller according to the current network configuration information and the command for setting a single network information. The present application does not need to customize the transition version, and uses the IPMI command to retain the network configuration of the controller, which reduces the difficulty of development and shortens the 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, so there will be no compatibility problems, 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, and the choices are diverse, 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 drawings required for use in the description of the embodiments will be 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 any creative work.

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

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

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

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

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

[0074] In order to make the purpose, technical solutions and advantages of this application clearer, 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 them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work 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”, “including” and similar words throughout the specification and claims should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is “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 (Baseboard Management Controller) is the management controller of the server, which can improve the reliability, security and manageability of the system. BMC is usually regarded as a small operating system or a dedicated management system independent of the server computing node, and has greater authority than the host server. This enables the BMC to manage and monitor the business nodes in real time, ensuring the separation of business nodes and management nodes, thereby avoiding interference of business nodes on management nodes. BMC is used in conjunction with the Intelligent Platform Management Interface IPMI (Intelligent Platform Management Interface) to jointly take charge of the server's core 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 type of 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, which makes it suitable for applications where data needs to be updated or changed frequently.

[0079] Retaining configuration usually refers to saving user settings, parameters or status in an electronic device or system so that the device can be restored to the previous state after restart or power failure. This function is very important in many applications. By retaining configuration, devices and systems can provide a better user experience and reduce the user's re-setting work after restarting or power failure.

[0080] At the same time, the baseboard management controller is mainly to facilitate users to manage and understand the status of the server. Server out-of-band management is a hardware-based management method. The baseboard management controller provides a management interface and remotely maintains and manages the device through a dedicated data channel. It is completely independent of the device operating system and can perform remote monitoring and management when the device is turned off, such as starting up, shutting down, setting the server Bios, monitoring hardware, etc.

[0081] The customer's computer room needs to perform out-of-band monitoring of the BMC to achieve the effect of managing the entire computer room server, and BMC manufacturers will continue to iterate firmware and add functions to solve problems. When customers need to upgrade the firmware, they need to evaluate the difference between the current firmware and the required firmware to avoid abnormal BMC management after the firmware is refreshed as much as possible; in this way, it is necessary to retain the BMC network information so that the management program can smoothly take over the refreshed controller BMC.

[0082] Embodiment 1

[0083] The present application embodiment provides a network setting method, such as Figure 1 As shown, the method is applied to a controller, and the method comprises:

[0084] 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;

[0085] Get the current network configuration information through the command that displays all network information;

[0086] The acquired current network configuration information is stored in the memory;

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

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

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

[0090] In response to the flag bit of the command to set the 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 the single network information.

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

[0092] IPMI command for obtaining network information (IPMI_GET_LAN_PARAM). This command can be used to obtain the current network configuration and save it to a non-volatile, electrically erasable memory such as EEPROM.

[0093] IPMI command for setting network information (IPMI_SET_LAN_PARAM). This command can read the network configuration from EEPROM and 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, but 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 embodiment 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, reducing the difficulty of development and shortening 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, so there will be no compatibility problems, 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, and the choices are diverse, flexible and convenient.

[0099] Embodiment 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 in a first firmware version;

[0102] Get the current network configuration information by using the command to display all network information.

[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, the use of IPMI commands to retain and set network configurations includes: first, using the IPMI_GET_LAN_PARAM command (IPMI command for obtaining 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 storing the network configuration in the EEPROM.

[0106] In addition, the EEPROM in this application includes the EEPROM that comes with the BMC controller, the mainboard 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 the first preset value, the area storing the network configuration in the read-only memory is cleared again, the acquired current network configuration information is stored in the read-only memory or the operation process of performing network settings on the controller is terminated.

[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 an 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, starting the second firmware version of the controller, obtaining a flag bit of an IPMI command for setting network information, and determining 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 acquired, 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 also 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 set up the network on 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 information of the controller to 192.168.1.1;

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

[0123] The network gateway address information of the controller is set 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, the user can quickly restore to 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 can maintain the best network status under various circumstances.

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

[0127] The verifying 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] Acquire 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 set controller network 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 through the information in the customer 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 set network information, and then read the network information in the EEPROM for comparison. If the set network information is consistent with the network information in the EEPROM, it means that the verification is successful;

[0137] After the IPMI_GET_LAN_PARAM and IPMI_SET_LAN_PARAM command processes are completed, the customer 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 passes.

[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 obtained, 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 execution process fails, you can use the in-band manual execution of the ipmitool lan print command to view the network information and manually write the current network configuration information to the EEPROM to achieve fault repair;

[0142] If the execution of the IPMI_SET_LAN_PARAM command fails, you can also use the in-band manual IPMI command to read the network information stored in the EEPROM and use commands such as the ipmitool lan set command to set the current BMC network to fix the fault.

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

[0144] The optimizing process of the network setting of the controller includes:

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

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

[0147] Using the Intelligent Platform Management Interface Tool and in-band batch configuration to configure the controller network; and / or

[0148] Communicate with the controller through IPMI commands, configure server information in batches, and optimize the controller network configuration process through script automation;

[0149] The process of optimizing the controller network configuration through script automation includes:

[0150] Add an exception handling mechanism to the controller network configuration, through which the script continues to run when the network is interrupted or the configuration is wrong;

[0151] Recording a log of each configuration of the controller network, and troubleshooting the controller network according to the log;

[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 an 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 an 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 check the IPMI_SET_LAN_PARAM flag bit. If it is 1, it will automatically perform the IPMI_SET_LAN_PARAM command operation.

[0157] Use the IPMI_SET_LAN_PARAM command to read the current network configuration information in the EEPROM, use the ipmitoollan set command and other commands to set the current BMC network, 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 execute two operations: sending the IPMI_GET_LAN_PARAM command and refreshing the new BMC firmware version to implement the refresh operation of preserving the network configuration between versions.

[0159] In addition, performing network settings on the controller according to the current network configuration information further includes:

[0160] For Windows network, install the network controller in Server Manager;

[0161] Use the Install-NetworkController command to configure the network controller application;

[0162] Use the Set-NetworkControllerCluster and Set-NetworkController commands to modify the cluster and application settings of the network controller;

[0163] If the operating system is Linux, record the IP address, network mask and gateway information, then use the user switching tool su to switch to the root user and modify the network card information;

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

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

[0166] Use the text user interface nmtui tool to perform interactive interface configuration, edit IP address, subnet mask, gateway, DNS and other information, and restart network services.

[0167] According to the specific controller type and operating system, select the corresponding steps to perform network settings, which improves the flexibility and reliability of controller network settings.

[0168] The network setting method provided in the embodiment of the present application may be improved and optimized without departing from the technical solution of the present application, and these improvements and optimizations should also be regarded as within the scope of protection of the present application.

[0169] The beneficial effects of the technical solution provided by the embodiment 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, reducing the difficulty of development and shortening 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, so there will be no compatibility problems, 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, and the choices are diverse, flexible and convenient.

[0173] Embodiment 3

[0174] The present 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 used 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 in the first firmware version;

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

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

[0178] An upgrade module, used for updating the firmware version of the controller to a second firmware version;

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

[0180] A judging module, used for judging whether the flag bit of the command for setting 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 of the embodiments, a 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 of the embodiments, the verification module is used to verify the controller network after the network is set;

[0188] The verifying 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] Acquire 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 set controller network 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 through the information in the customer 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 of the embodiments, the setting module is used 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 the first preset value, the area storing the network configuration in the read-only memory is cleared again, the acquired current network configuration information is stored in the read-only memory or the operation process of performing network settings on the controller is terminated.

[0199] In one of the embodiments, a setting module is used to manually execute a command to display all network information through a script tool when a failure occurs in retaining the network configuration of the controller through the IPMI command to obtain network information, obtain the current network configuration information through the command to display 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 obtained, 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 of the embodiments, an optimization module is used to optimize the network settings of the controller;

[0202] The optimizing process of the network setting of the controller includes:

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

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

[0205] Using the Intelligent Platform Management Interface Tool and in-band batch configuration to configure the controller network; and / or

[0206] Communicate with the controller through IPMI commands, configure server information in batches, and optimize the controller network configuration process through script automation;

[0207] The process of optimizing the controller network configuration through script automation includes:

[0208] Add an exception handling mechanism to the controller network configuration, through which the script continues to run when the network is interrupted or the configuration is wrong;

[0209] Recording a log of each configuration of the controller network, and troubleshooting the controller network according to the log;

[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 embodiment 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, reducing the difficulty of development and shortening 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, so there will be no compatibility problems, 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, and the choices are diverse, flexible and convenient.

[0215] Embodiment 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 through the command that displays all network information;

[0222] The acquired current network configuration information is stored in the 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] Determine whether the flag bit of the command to set network information is a first preset value;

[0226] In response to the flag bit of the command to set the 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 the single network information.

[0227] The beneficial effects of the technical solution provided by the embodiment 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, reducing the difficulty of development and shortening 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] Embodiment 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 through the command that displays all network information;

[0234] The acquired current network configuration information is stored in the 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] Determine whether the flag bit of the command to set network information is a first preset value;

[0238] In response to the flag bit of the command to set the 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 the single network information.

[0239] The beneficial effects of the technical solution provided by the embodiment 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, reducing the difficulty of development and shortening 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, so there will be no compatibility problems, 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, and the choices are diverse, flexible and convenient.

[0242] Embodiment 6

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

[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 through the command that displays all network information;

[0246] The acquired current network configuration information is stored in the 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] Determine whether the flag bit of the command to set network information is a first preset value;

[0250] In response to the flag bit of the command to set the 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 the single network information.

[0251] The beneficial effects of the technical solution provided by the embodiment 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, so there will be no compatibility problems, 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, and the choices are diverse, flexible and convenient.

[0254] Embodiment 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 through the command that displays all network information;

[0258] The acquired current network configuration information is stored in the 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] Determine whether the flag bit of the command to set network information is a first preset value;

[0262] In response to the flag bit of the command to set the 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 the single network information.

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

[0264] The area storing the network configuration in the memory is cleared by the command for obtaining the 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 settings;

[0272] The verifying 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] Acquire network configuration information of the storage device;

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

[0276] If yes, the verification is passed, and the flag bit of the command for setting 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 single network information;

[0277] The verification of the set controller network 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 through the information in the customer 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 of the memory and the command for setting single network information.

[0281] In one embodiment, after storing the acquired current network configuration information in a memory, the method further comprises:

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

[0283] In response to the flag bit of the command to set the network information being not 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 settings on the controller is terminated.

[0284] In one embodiment, the method comprises:

[0285] 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;

[0286] 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 a command for setting single network information executed by a manual script.

[0287] In one embodiment, the method further comprises:

[0288] Optimizing the network settings of the controller;

[0289] The optimizing process of the network setting of the controller includes:

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

[0291] View and configure the controller network through the system installation interface of the server; and / or

[0292] Using the Intelligent Platform Management Interface Tool and in-band batch configuration to configure the controller network; and / or

[0293] 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;

[0294] The process of optimizing the controller network configuration through script automation includes:

[0295] Add an exception handling mechanism to the controller network configuration, through which the script continues to run when the network is interrupted or the configuration is wrong;

[0296] Recording a log of each configuration of the controller network, and troubleshooting the controller network according to the log;

[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, reducing the difficulty of development and shortening product development time.

[0299] Figure 5 An exemplary system provided for Embodiment 7 of the present application that can be used to implement 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 can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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. As an illustration and not limitation, RAM is available in many 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 may 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-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A network setting method, characterized in that: The method is applied to a controller, and the method comprises: 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 through the command that displays all network information; The acquired current network configuration information is stored in the 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; Determine 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 the 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 the single network information.

2. The network setting method according to claim 1, characterized in that: 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 the network information, wherein the memory is an erasable programmable read-only memory.

3. The network setting method according to claim 1, characterized in that: The re-setting 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, characterized in that: 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 settings; The verifying of the controller network after the network setting includes: Obtain the configured controller network information through the command to display all network information; Acquire network configuration information of the storage device; Comparing the network information of the controller after the network setting with the network configuration information of the storage device to determine whether the network information of the controller after the setting is consistent with the network configuration information of the storage device; If yes, the verification is passed, and the flag bit of the command for setting 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 single network information; The verification of the set controller network 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 through the information in the customer 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 of the memory and the command for setting single network information.

5. The network setting method according to claim 2, characterized in that: After storing the acquired current network configuration information in the memory, the method further comprises: Setting the flag bit of the command to set network information to a first preset value; In response to the flag bit of the command to set the network information being not 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 settings on the controller is terminated.

6. The network setting method according to claim 1, characterized in that: The method comprises: When a failure occurs in retaining the network configuration of the controller through the command for obtaining network information, a command for displaying all network information is manually executed through a script tool, current network configuration information is obtained through the command for displaying all network information, and the manually obtained current network configuration information is stored in a read-only memory; 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 a command for setting single network information executed by a manual script.

7. The network setting method according to claim 1, characterized in that: The method further comprises: Optimizing the network settings of the controller; The optimizing process of the network setting of the controller includes: After modifying the configuration file of the controller, resetting the controller network configuration by restarting the network configuration management service item; and / or View and configure the controller network through the system installation interface of the server; and / or Using the Intelligent Platform Management Interface Tool and in-band batch configuration to configure the controller network; 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 process of optimizing the controller network configuration through script automation includes: Add an exception handling mechanism to the controller network configuration, through which the script continues to run when the network is interrupted or the configuration is wrong; Recording a log of each configuration of the controller network, and troubleshooting the controller network according to the log; 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 for acquiring network information, wherein the command for acquiring network information is sent by the client to the controller operating in the first firmware version; A first acquisition module, used to acquire 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 upgrade module, used for updating the firmware version of the controller to a second firmware version; A second acquisition module, 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, used for judging whether the flag bit of the command for setting 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, characterized in that: 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

  • BMC firmware updating method and system, terminal and storage medium

    CN117348905A

  • Methods for upgrading firmware and electronic devices using the same

    US20140380294A1