WO2021169471A1 - Bmc ip setting method and apparatus, electronic device and system - Google Patents

Bmc ip setting method and apparatus, electronic device and system Download PDF

Info

Publication number
WO2021169471A1
WO2021169471A1 PCT/CN2020/134580 CN2020134580W WO2021169471A1 WO 2021169471 A1 WO2021169471 A1 WO 2021169471A1 CN 2020134580 W CN2020134580 W CN 2020134580W WO 2021169471 A1 WO2021169471 A1 WO 2021169471A1
Authority
WO
WIPO (PCT)
Prior art keywords
bmc
setting
current system
configuration file
setting instruction
Prior art date
Application number
PCT/CN2020/134580
Other languages
French (fr)
Chinese (zh)
Inventor
安黎京
Original Assignee
浪潮电子信息产业股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浪潮电子信息产业股份有限公司 filed Critical 浪潮电子信息产业股份有限公司
Publication of WO2021169471A1 publication Critical patent/WO2021169471A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5076Update or notification mechanisms, e.g. DynDNS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Definitions

  • This application relates to the field of computer technology, and in particular to a BMC IP setting method, BMC IP setting device, electronic equipment, and BMC IP setting system.
  • the purpose of this application is to provide a BMC IP setting method, BMC IP setting device, electronic equipment, and BMC IP setting system, which can improve the efficiency of BMC IP setting.
  • the specific plan is as follows:
  • This application provides a BMC IP setting method, including:
  • the system operation module reads the OS configuration file
  • a setting instruction corresponding to the system IP is sent to the BMC in the current system, so that the BMC determines the corresponding BMC IP according to the setting instruction, and sets the BMC IP through an IPMI command.
  • the detecting the connection state with the current system includes:
  • it also includes:
  • the method further includes:
  • This application provides a BMC IP setting method, including:
  • the BMC receives the setting instruction sent by the system operation module, where the setting instruction is the instruction corresponding to the system IP determined according to the OS configuration file sent by the system operation module after it is connected to the current system;
  • the BMC IP is set through IPMI commands.
  • the determining the corresponding BMC IP according to the setting instruction includes:
  • This application provides a BMC IP setting device, including:
  • OS configuration file reading module used for system operation module to read OS configuration file
  • the system IP determination module is used to determine the system IP of the current system from the OS configuration file;
  • Connectivity status detection module used to detect the connectivity status with the current system
  • a setting instruction sending module configured to send a setting instruction corresponding to the system IP to the BMC in the current system, so that the BMC determines the BMC corresponding to the system IP according to the setting instruction IP, the BMC IP is set through an IPMI command.
  • This application provides a BMC IP setting device, including:
  • the setting instruction receiving module is used by the BMC to receive the setting instruction sent by the system operation module, where the setting instruction is the instruction corresponding to the system IP determined according to the OS configuration file sent by the system operation module after it is connected to the current system ;
  • the BMC IP determining module is used to determine the corresponding BMC IP according to the setting instruction
  • the BMC IP setting module is used to set the BMC IP through IPMI commands.
  • This application provides an electronic device, including:
  • Memory used to store computer programs
  • the processor is used to implement the steps of the above-mentioned BMC IP setting method when the computer program is executed.
  • This application provides a BMC IP setting system, including:
  • the system operation module is used to read the OS configuration file; determine the system IP of the current system from the OS configuration file; detect the connection status with the current system; if it is connected, send the data to the current system
  • the setting instructions corresponding to the system IP are sent to BMC;
  • the BMC is used to determine the corresponding BMC IP according to the setting instruction, and set the BMC IP through an IPMI command.
  • This application provides a BMC IP setting method, including: the system operation module reads the OS configuration file; determines the system IP of the current system from the OS configuration file; detects the connection status with the current system; if it is connected, it is in the current system Send the setting command corresponding to the system IP to the BMC, so that the BMC determines the corresponding BMC IP according to the setting command, and set the BMC IP through the IPMI command.
  • this application uses the system operation module to determine the system IP of the current system from the OS configuration file.
  • the system operation module When the system operation module is connected to the current system, it sends a setting instruction corresponding to the system IP to the BMC to realize the BMC automatically set the BMC IP, through
  • the above operations implement the BMC IP setting of all BMCs in sequence, avoiding the inefficiency of manually setting the BMC IP in related technologies, and improving the user experience.
  • This application also provides a BMC IP setting device, an electronic device, and a BMC IP setting system, all of which have the above-mentioned beneficial effects, and will not be repeated here.
  • Figure 1 is a flowchart of a BMC IP setting method provided by an embodiment of the application
  • Fig. 2 is a schematic structural diagram of a BMC IP setting device provided by an embodiment of the application
  • Fig. 3 is a flowchart of another BMC IP setting method provided by an embodiment of the application.
  • Fig. 4 is a schematic structural diagram of another BMC IP setting device provided by an embodiment of the application.
  • this embodiment provides a BMC IP setting method, which can improve the efficiency of BMC (Baseboard Management Controller, baseboard management controller) IP setting.
  • BMC Baseboard Management Controller
  • the system operation module reads the OS configuration file
  • the system operation module obtains the OS (operating system, operating system) configuration file OS_ip.txt through the communication module.
  • the specific embodiment does not limit the communication module, and it may be a wired network or a wireless network.
  • the OS configuration file includes the system IPs of multiple systems.
  • the OS configuration file includes the first system IP, the second system IP, the third system IP, and the fourth system IP. This embodiment does not limit the number of system IPs. Users can customize the settings. It can be understood that the BMC IP corresponding to the system IP in this embodiment is not set randomly, but is the only corresponding BMC IP determined by the user.
  • the specific method of determining the system IP can be based on the identification information of the current system and all of the OS configuration files. The identification information of the system IP of the system is matched, and the matching is successful, and the system IP of the current system is obtained.
  • step S140 The purpose of this step is to detect the connected state, and step S140 can be executed only after the connection is made.
  • the BMC system sends a setting command corresponding to the system IP to the BMC, where the setting command includes a setting command and the system IP.
  • the BMC can use the Shell script to perform the operation of setting the BMC IP.
  • the BMC can determine the BMC IP according to the setting instruction, and set the corresponding BMC IP to the BMC through the IPMI command.
  • the BMC IP settings of batches of BMC are performed based on the SHELL scripting language, and the system IP of the existing operating system is used to access the inside of the current system, and the BMC system is accessed through KCS in the IPMI protocol, and the BMC system is accessed through IPMI commands.
  • Each BMC sets the corresponding BMC IP.
  • the BMC configuration file with the BMC IP stored corresponding to the corresponding OS configuration file with the OS IP can be listed in the txt file, so that the corresponding BMC IP can be directly obtained from the corresponding list .
  • this embodiment uses the system operation module to determine the system IP of the current system from the OS configuration file.
  • the system operation module When the system operation module is connected to the current system, it sends a setting instruction corresponding to the system IP to the BMC to realize automatic BMC setting BMC IP, through the above operations, the BMC IP settings of all BMCs are implemented in turn, avoiding the inefficiency of manually setting BMC IP in related technologies and improving user experience.
  • detecting the connection status with the current system includes: sending a ping command to the current system; if the feedback information is received, the connection status is determined to be connected; if the feedback information is not received, then the connection status is determined The connected state is not connected.
  • a ping Packet Internet Groper
  • ICMP Internet Control Message Protocol, control message protocol
  • the feedback information indicates that it is connected.
  • determining that the connected state is connected including: if the feedback information is received, judging whether the time difference for receiving the feedback information is less than a preset threshold, and if it is less than the preset threshold, determining that the connected state is connected, If it is greater than the preset threshold, it is determined to be disconnected.
  • the calculation of the time difference is that the time stamp of sending the ping command is a, and the time stamp of receiving the feedback information is b, then the time difference is b-a. It is understandable that when the preset threshold is exceeded, it proves that the system connection may be faulty or unstable.
  • the BMC IP setting in this state may be stored in the occurrence of setting failure or long setting time. Therefore, the success rate of BMC IP setting can be guaranteed through the above method.
  • this application is to set BMC IP in large quantities. Therefore, after performing steps S110-S140, determine that the next system is the current system, and continue to perform steps S110-S140 until all BMC IP settings are completed.
  • the BMC IP setting results of all BMCs are displayed on the preset interface. Specifically, if the BMC IP setting results of all BMCs are displayed on the preset interface, the setting is successful. Print out "pass”, otherwise it will print out fail and distinguish it by different colors. It can be seen that the setting result can be obtained simply and clearly through the above method.
  • a schematic structural diagram of a BMC IP setting device includes:
  • the OS configuration file reading module 210 is used for the system operation module to read the OS configuration file
  • the system IP determining module 220 is used to determine the system IP of the current system from the OS configuration file;
  • connection state detection module 230 is used to detect the connection state with the current system
  • the setting instruction sending module 240 is configured to send a setting instruction corresponding to the system IP to the BMC in the current system, so that the BMC determines the BMC IP corresponding to the system IP according to the setting instruction, and sets the BMC IP through the IPMI command.
  • the connected state detection module 230 includes:
  • Ping command sending unit used to send ping command to the current system
  • the connected determining unit is configured to determine that the connected state is connected if the feedback information is received;
  • the disconnected determination unit is configured to determine that the connected state is disconnected if the feedback information is not received.
  • it further includes:
  • the new current system determination module is used to skip the current system if it is not connected, record the system IP, and determine the next system as the new current system;
  • the execution module is used to execute the step of determining the system IP of the current system from the OS configuration file.
  • it further includes:
  • the judgment module is used to judge whether all BMC IP settings are completed
  • the display module is used to display all the BMC IP setting results of the BMC on the preset interface if it is.
  • FIG. 3 is a flowchart of a BMC IP setting method provided by an embodiment of the application.
  • the BMC receives a setting instruction sent by the system operation module, where the setting instruction is an instruction corresponding to the system IP determined according to the OS configuration file sent by the system operation module after it is connected to the current system;
  • determining the corresponding BMC IP according to the setting instruction includes: parsing the setting instruction to obtain the first flag information corresponding to the system IP; determining the second flag information in the BMC configuration file according to the first flag information; determining according to the second flag information BMC IP.
  • each system IP corresponds to a mark information
  • each BMC IP corresponds to a mark information.
  • These two mark information are in a one-to-one correspondence, and the BMC IP can be determined through the mark information.
  • this embodiment please determine the system IP of the current system from the OS configuration file through the system operation module. After the system operation module is connected to the current system, send the setting instruction corresponding to the system IP to the BMC, and determine according to the setting instruction For the corresponding BMC IP, set the BMC IP through the IPMI command, and complete the BMC automatic setting of the BMC IP.
  • the BMC IP settings of all the BMCs are realized in turn, avoiding the inefficiency of manually setting the BMC IP in related technologies and improving users Experience.
  • the BMC IP setting device described below and the BMC IP setting method described above can be referred to each other.
  • the structure diagram of another BMC IP setting device includes:
  • the setting instruction receiving module 410 is used for the BMC to receive the setting instruction sent by the system operation module, where the setting instruction is the instruction corresponding to the system IP determined according to the OS configuration file sent by the system operation module when it is connected to the current system;
  • the BMC IP determining module 420 is configured to determine the corresponding BMC IP according to the setting instruction
  • the BMC IP setting module 430 is used to set the BMC IP through IPMI commands.
  • the BMC IP determining module 420 specifically includes:
  • the first logo information obtaining unit is configured to parse the setting instruction to obtain the first logo information corresponding to the system IP;
  • the second flag information determining unit is configured to determine the second flag information in the BMC configuration file according to the first flag information
  • the BMC IP determining unit is configured to determine the BMC IP according to the second flag information.
  • This embodiment provides a specific BMC IP setting method.
  • the whole process is mainly based on a shell script.
  • Two configuration files are set up, including the OS configuration file (OS_IP.txt) and the BMC configuration file, including the existing os_ip( System IP) and the corresponding BMC_ip (BMC IP) to be set.
  • OS_IP.txt the OS configuration file
  • BMC configuration file including the existing os_ip( System IP) and the corresponding BMC_ip (BMC IP) to be set.
  • this embodiment includes two scripts, one of which is applied to the system operation module, and the other is applied to the BMC;
  • the OS configuration file is read; the system IP of the current system is determined from the OS configuration file; the connection status with the current system is detected; if it is connected, the setting instruction corresponding to the system IP is sent to the BMC in the current system. It is understandable that detecting the connection state with the current system can be to determine whether the current system can be connected. Obtain the current os ip by reading OS_ip.txt. If it can be pinged, use the ssh command to enter the os. If it cannot be pinged, skip it and record the ip that cannot be pinged.
  • the BMC determines the corresponding BMC IP according to the setting command, and sets the BMC IP through the IPMI command.
  • the system operation module uses the ipmitool lan set 1ipaddr xxxx command to set the ip for the BMC under the current system, and the set ip must be the ip address corresponding to the system IP, that is, the BMC IP. If the setting is successful, the pass will be printed out, otherwise it will be printed out as fail and distinguished by different colors.
  • test script is shown below.
  • the following introduces an electronic device provided by an embodiment of the present application.
  • the electronic device described below and the BMC IP setting method described above may be referenced correspondingly.
  • This embodiment provides an electronic device, including:
  • Memory used to store computer programs
  • the processor is used to implement the steps of the above-mentioned BMC IP setting method when the computer program is executed.
  • the processor in the electronic device is used to implement the system operation module to read the OS configuration file when executing the computer program; determine the system IP of the current system from the OS configuration file; detect The connection status with the current system; if it is connected, the setting command corresponding to the system IP is sent to the BMC in the current system, so that the BMC determines the corresponding BMC IP according to the setting command, and sets the BMC IP through the IPMI command.
  • the processor in the electronic device provided in this embodiment is used to execute the computer program to realize that the BMC receives the setting instruction sent by the system operation module, where the setting instruction is when the system operation module is in line with the current After the system is connected, the instruction corresponding to the system IP determined according to the OS configuration file is sent; the corresponding BMC IP is determined according to the setting instruction; the BMC IP is set through the IPMI command.
  • the embodiment of the electronic device part corresponds to the embodiment of the BMC IP setting method part, for the embodiment of the electronic device part, please refer to the description of the embodiment of the BMC IP setting method part, which will not be repeated here.
  • the following describes a BMC IP setting system provided by an embodiment of the present application.
  • the BMC IP setting system described below and the BMC IP setting method described above can be referred to each other.
  • This embodiment provides a BMC IP setting system, including:
  • the system operation module is used to read the OS configuration file; determine the system IP of the current system from the OS configuration file; detect the connection status with the current system; if it is connected, send the setting instructions corresponding to the system IP in the current system to BMC;
  • BMC is used to determine the corresponding BMC IP according to the setting command, and set the BMC IP through the IPMI command.
  • the embodiment of the BMC IP setting system part corresponds to the embodiment of the BMC IP setting method part, please refer to the description of the embodiment of the BMC IP setting method part for the embodiment of the BMC IP setting method part, which will not be repeated here.
  • the steps of the method or algorithm described in the embodiments disclosed in this document can be directly implemented by hardware, a software module executed by a processor, or a combination of the two.
  • the software module can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or all areas in the technical field. Any other known storage media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)

Abstract

A BMC IP setting method and apparatus, an electronic device and a system. The method comprises: a system operation module reads an OS configuration file; the system IP of a current system is determined from the OS configuration file; the state of connection with the current system is detected; and if connected, then within the current system, a setting command corresponding to the system IP is sent to a BMC, so that the BMC determines a corresponding BMC IP according to the setting command, and the BMC IP is set by means of an IPMI command. In the present application, the system IP of the current system is determined from the OS configuration file by means of the system operation module. When connected to the current system, a setting instruction corresponding to the system IP is sent to the BMC so that the BMC automatically sets the BMC IP. By means of the foregoing operations, all BMC IP settings are implemented in sequence, thus increasing the efficiency with which BMC IP are set.

Description

一种BMC IP设置方法、装置和电子设备及系统A BMC IP setting method, device, electronic equipment and system
本申请要求于2020年02月28日提交中国专利局、申请号为202010126451.5、发明名称为“一种BMC IP设置方法、装置和电子设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on February 28, 2020, the application number is 202010126451.5, and the invention title is "a BMC IP setting method, device, and electronic equipment and system". The entire content of the application is approved The reference is incorporated in this application.
技术领域Technical field
本申请涉及计算机技术领域,特别涉及一种BMC IP设置方法、BMC IP设置装置、电子设备和BMC IP设置系统。This application relates to the field of computer technology, and in particular to a BMC IP setting method, BMC IP setting device, electronic equipment, and BMC IP setting system.
背景技术Background technique
随着IT技术的迅猛发展,传统信息化服务以及日趋强大的云计算服务对服务器的稳定性要求越来越高。各大厂商的需求量的增加,对于产线工作人员的工作量也加大许多。出厂的数百台机器需要根据客户指定的要求刷入IP地址,固件刷新等工作以人工的方式去完成,既浪费人力又浪费时间,效率较低。With the rapid development of IT technology, traditional information services and increasingly powerful cloud computing services require higher and higher server stability. The increase in demand from major manufacturers has also increased the workload of production line staff. Hundreds of machines shipped out of the factory need to be flashed in IP addresses according to the requirements specified by customers, and tasks such as firmware refreshing are completed manually, which is a waste of manpower and time, and is low in efficiency.
因此,如何提供一种解决上述技术问题的方案是本领域技术人员目前需要解决的问题。Therefore, how to provide a solution to the above technical problems is a problem that needs to be solved by those skilled in the art at present.
发明内容Summary of the invention
本申请的目的是提供一种BMC IP设置方法、BMC IP设置装置、电子设备和BMC IP设置系统,能够提高BMC IP设置效率。其具体方案如下:The purpose of this application is to provide a BMC IP setting method, BMC IP setting device, electronic equipment, and BMC IP setting system, which can improve the efficiency of BMC IP setting. The specific plan is as follows:
本申请提供了一种BMC IP设置方法,包括:This application provides a BMC IP setting method, including:
系统操作模块读取OS配置文件;The system operation module reads the OS configuration file;
从所述OS配置文件中确定当前系统的系统IP;Determine the system IP of the current system from the OS configuration file;
检测与所述当前系统的连通状态;Detecting the connection state with the current system;
若已连通,则在所述当前系统内发送与所述系统IP对应的设置指令至BMC,以使所述BMC根据所述设置指令确定对应的BMC IP,通过IPMI命令设置所述BMC IP。If it is connected, a setting instruction corresponding to the system IP is sent to the BMC in the current system, so that the BMC determines the corresponding BMC IP according to the setting instruction, and sets the BMC IP through an IPMI command.
可选的,所述检测与所述当前系统的连通状态,包括:Optionally, the detecting the connection state with the current system includes:
发送ping命令至所述当前系统;Sending a ping command to the current system;
若接收到反馈信息,则确定所述连通状态为已连通;If the feedback information is received, it is determined that the connected state is connected;
若未接收到所述反馈信息,则确定所述连通状态为未连通。If the feedback information is not received, it is determined that the connected state is not connected.
可选的,还包括:Optionally, it also includes:
若未连通,则跳过所述当前系统,记录所述系统IP,确定下一个系统为新的当前系统;If not connected, skip the current system, record the system IP, and determine that the next system is the new current system;
执行所述从所述OS配置文件中确定当前系统的系统IP的步骤。Perform the step of determining the system IP of the current system from the OS configuration file.
可选的,所述若已连通,则在所述当前系统内发送与所述系统IP对应的设置指令至BMC之后,还包括:Optionally, if it is connected, after sending a setting instruction corresponding to the system IP to the BMC in the current system, the method further includes:
判断是否完成所有的所述BMC的BMC IP的设置;Determine whether all the BMC IP settings of the BMC are completed;
若是,则将所有的所述BMC的BMC IP的设置结果显示在预设界面上。If yes, display all the BMC IP setting results of the BMC on the preset interface.
本申请提供一种BMC IP设置方法,包括:This application provides a BMC IP setting method, including:
BMC接收到系统操作模块发送的设置指令,其中所述设置指令是所述系统操作模块当与当前系统连通后,发送的与根据OS配置文件确定的系统IP对应的指令;The BMC receives the setting instruction sent by the system operation module, where the setting instruction is the instruction corresponding to the system IP determined according to the OS configuration file sent by the system operation module after it is connected to the current system;
根据所述设置指令确定对应的BMC IP;Determine the corresponding BMC IP according to the setting instruction;
通过IPMI命令设置所述BMC IP。The BMC IP is set through IPMI commands.
可选的,所述根据所述设置指令确定对应的BMC IP,包括:Optionally, the determining the corresponding BMC IP according to the setting instruction includes:
解析所述设置指令,得到所述系统IP对应的第一标志信息;Parse the setting instruction to obtain the first flag information corresponding to the system IP;
根据所述第一标志信息确定BMC配置文件中的第二标志信息;Determining the second flag information in the BMC configuration file according to the first flag information;
根据所述第二标志信息确定所述BMC IP。Determine the BMC IP according to the second flag information.
本申请提供一种BMC IP设置装置,包括:This application provides a BMC IP setting device, including:
OS配置文件读取模块,用于系统操作模块读取OS配置文件;OS configuration file reading module, used for system operation module to read OS configuration file;
系统IP确定模块,用于从所述OS配置文件中确定当前系统的系统IP;The system IP determination module is used to determine the system IP of the current system from the OS configuration file;
连通状态检测模块,用于检测与所述当前系统的连通状态;Connectivity status detection module, used to detect the connectivity status with the current system;
设置指令发送模块,用于若已连通,则在所述当前系统内发送与所述系统IP对应的设置指令至BMC,以使所述BMC根据所述设置指令确定与所述系统IP对应的BMC IP,通过IPMI命令设置所述BMC IP。A setting instruction sending module, configured to send a setting instruction corresponding to the system IP to the BMC in the current system, so that the BMC determines the BMC corresponding to the system IP according to the setting instruction IP, the BMC IP is set through an IPMI command.
本申请提供一种BMC IP设置装置,包括:This application provides a BMC IP setting device, including:
设置指令接收模块,用于BMC接收到系统操作模块发送的设置指令,其中所述设置指令是所述系统操作模块当与当前系统连通后,发送的与根据OS配置文件确定的系统IP对应的指令;The setting instruction receiving module is used by the BMC to receive the setting instruction sent by the system operation module, where the setting instruction is the instruction corresponding to the system IP determined according to the OS configuration file sent by the system operation module after it is connected to the current system ;
BMC IP确定模块,用于根据所述设置指令确定对应的BMC IP;The BMC IP determining module is used to determine the corresponding BMC IP according to the setting instruction;
BMC IP设置模块,用于通过IPMI命令设置所述BMC IP。The BMC IP setting module is used to set the BMC IP through IPMI commands.
本申请提供一种电子设备,包括:This application provides an electronic device, including:
存储器,用于存储计算机程序;Memory, used to store computer programs;
处理器,用于执行所述计算机程序时实现如上述BMC IP设置方法的步骤。The processor is used to implement the steps of the above-mentioned BMC IP setting method when the computer program is executed.
本申请提供一种BMC IP设置系统,包括:This application provides a BMC IP setting system, including:
系统操作模块,用于读取OS配置文件;从所述OS配置文件中确定当前系统的系统IP;检测与所述当前系统的连通状态;若已连通,则在所述当前系统内发送与所述系统IP对应的设置指令至BMC;The system operation module is used to read the OS configuration file; determine the system IP of the current system from the OS configuration file; detect the connection status with the current system; if it is connected, send the data to the current system The setting instructions corresponding to the system IP are sent to BMC;
所述BMC,用于根据所述设置指令确定对应的BMC IP,通过IPMI命令设置所述BMC IP。The BMC is used to determine the corresponding BMC IP according to the setting instruction, and set the BMC IP through an IPMI command.
本申请提供一种BMC IP设置方法,包括:系统操作模块读取OS配置文件;从OS配置文件中确定当前系统的系统IP;检测与当前系统的连通状态;若已连通,则在当前系统内发送与系统IP对应的设置指令至BMC,以使BMC根据设置指令确定对应的BMC IP,通过IPMI命令设置BMC IP。This application provides a BMC IP setting method, including: the system operation module reads the OS configuration file; determines the system IP of the current system from the OS configuration file; detects the connection status with the current system; if it is connected, it is in the current system Send the setting command corresponding to the system IP to the BMC, so that the BMC determines the corresponding BMC IP according to the setting command, and set the BMC IP through the IPMI command.
可见,本申请通过系统操作模块从OS配置文件中确定当前系统的系统IP,当系统操作模块与当前系统连通后,发送与系统IP对应的设置指令至BMC,以实现BMC自动设置BMC IP,通过上述操作依次实现所有的BMC的BMC IP的设置,避免了相关技术中利用手动设置BMC IP的低效率,改善了用户体验。It can be seen that this application uses the system operation module to determine the system IP of the current system from the OS configuration file. When the system operation module is connected to the current system, it sends a setting instruction corresponding to the system IP to the BMC to realize the BMC automatically set the BMC IP, through The above operations implement the BMC IP setting of all BMCs in sequence, avoiding the inefficiency of manually setting the BMC IP in related technologies, and improving the user experience.
本申请同时还提供了一种BMC IP设置装置、一种电子设备和BMC IP设置系统,均具有上述有益效果,在此不再赘述。This application also provides a BMC IP setting device, an electronic device, and a BMC IP setting system, all of which have the above-mentioned beneficial effects, and will not be repeated here.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only It is the embodiment of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative work.
图1为本申请实施例所提供的一种BMC IP设置方法的流程图;Figure 1 is a flowchart of a BMC IP setting method provided by an embodiment of the application;
图2为本申请实施例所提供的一种BMC IP设置装置的结构示意图;Fig. 2 is a schematic structural diagram of a BMC IP setting device provided by an embodiment of the application;
图3为本申请实施例所提供的另一种BMC IP设置方法的流程图;Fig. 3 is a flowchart of another BMC IP setting method provided by an embodiment of the application;
图4为本申请实施例所提供的另一种BMC IP设置装置的结构示意图。Fig. 4 is a schematic structural diagram of another BMC IP setting device provided by an embodiment of the application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
随着IT技术的迅猛发展,传统信息化服务以及日趋强大的云计算服务对服务器的稳定性要求越来越高。各大厂商的需求量的增加,对于产线工作人员的工作量也加大许多。出厂的数百台机器需要根据客户指定的要求刷入IP(Internet Protocol,网际互连协议)地址,固件刷新等工作以人工的方式去完成,既浪费人力又浪费时间,效率较低。基于上述技术问题,本实施例提供一种BMC IP设置方法,能够提高BMC(Baseboard Management Controller,基板管理控制器)IP设置效率,具体请参考图1,图1为本申请实施例所提供的一种BMC IP设置方法的流程图,具体包括:With the rapid development of IT technology, traditional information services and increasingly powerful cloud computing services require higher and higher server stability. The increase in demand from major manufacturers has also increased the workload of production line staff. Hundreds of machines shipped out of the factory need to be flashed in IP (Internet Protocol) addresses according to the requirements specified by customers, and firmware refreshing and other tasks are completed manually, which is a waste of manpower and time, and is low in efficiency. Based on the above technical problems, this embodiment provides a BMC IP setting method, which can improve the efficiency of BMC (Baseboard Management Controller, baseboard management controller) IP setting. For details, please refer to FIG. 1, which is a method provided by an embodiment of this application. A flowchart of a BMC IP setting method, including:
S110、系统操作模块读取OS配置文件;S110. The system operation module reads the OS configuration file;
其中,系统操作模块通过通信模块获取OS(operating system,操作系统)配置文件OS_ip.txt,具体的本实施例不对通信模块进行限定,可以是有线网络也可以是无线网络。OS配置文件中包括多个系统的系统IP,例如,OS配置文件中包括第一系统IP、第二系统IP、第三系统IP、第四系统IP,本实施例不对系统IP的数量进行限定,用户可自定义设置。可以理 解的是,本实施例中与系统IP对应的BMC IP不是随机设置的,是用户确定的唯一对应的BMC IP。The system operation module obtains the OS (operating system, operating system) configuration file OS_ip.txt through the communication module. The specific embodiment does not limit the communication module, and it may be a wired network or a wireless network. The OS configuration file includes the system IPs of multiple systems. For example, the OS configuration file includes the first system IP, the second system IP, the third system IP, and the fourth system IP. This embodiment does not limit the number of system IPs. Users can customize the settings. It can be understood that the BMC IP corresponding to the system IP in this embodiment is not set randomly, but is the only corresponding BMC IP determined by the user.
S120、从OS配置文件中确定当前系统的系统IP;S120. Determine the system IP of the current system from the OS configuration file;
从OS配置文件中确定当前系统的系统IP,其中,当前系统指的是当前正在设置BMC IP对应的系统,具体的确定系统IP的方式可以是根据当前系统的标识信息与OS配置文件中的所有的系统IP的标识信息进行匹配,匹配成功,得到当前系统的系统IP。Determine the system IP of the current system from the OS configuration file, where the current system refers to the system corresponding to the BMC IP currently being set up. The specific method of determining the system IP can be based on the identification information of the current system and all of the OS configuration files. The identification information of the system IP of the system is matched, and the matching is successful, and the system IP of the current system is obtained.
S130、检测与当前系统的连通状态;S130. Detect the connection state with the current system;
本步骤的目的是检测连通状态,只有连通后,才能执行步骤S140。The purpose of this step is to detect the connected state, and step S140 can be executed only after the connection is made.
若未连通,则跳过当前系统,记录系统IP,确定下一个系统为新的当前系统;执行从OS配置文件中确定当前系统的系统IP的步骤。If it is not connected, skip the current system, record the system IP, and determine that the next system is the new current system; perform the steps of determining the system IP of the current system from the OS configuration file.
S140、若已连通,则在当前系统内发送与系统IP对应的设置指令至BMC,以使BMC根据设置指令确定对应的BMC IP,通过IPMI命令设置BMC IP。S140. If it is connected, send a setting instruction corresponding to the system IP to the BMC in the current system, so that the BMC determines the corresponding BMC IP according to the setting instruction, and sets the BMC IP through the IPMI command.
其中,与当前系统连通后,才能够通过操作系统的系统IP访问到系统内部,进而通过IPMI(Intelligent Platform Management Interface,智能平台管理接口)协议中的KCS(Keyboard Controller Style,键盘控制器规格)访问BMC系统,发送与系统IP对应的设置指令至BMC,其中,该设置指令包括设置命令、系统IP。此时可以使BMC利用基于SHELL脚本执行设置BMC IP的操作,具体可以使,BMC根据设置指令确定BMC IP,通过IPMI命令给BMC设置对应的BMC IP。Among them, only after connecting with the current system can you access the inside of the system through the system IP of the operating system, and then through the KCS (Keyboard Controller Style, keyboard controller specification) in the IPMI (Intelligent Platform Management Interface) protocol The BMC system sends a setting command corresponding to the system IP to the BMC, where the setting command includes a setting command and the system IP. At this time, the BMC can use the Shell script to perform the operation of setting the BMC IP. Specifically, the BMC can determine the BMC IP according to the setting instruction, and set the corresponding BMC IP to the BMC through the IPMI command.
因此,本实施例基于SHELL脚本语言对批量的BMC进行BMC IP设置,通过已有的操作系统的系统IP去访问到当前系统内部,通过IPMI协议中的KCS访问BMC系统下,通过IPMI命令给每台BMC设置相应的BMC IP,其中,可以在txt文档中列出与存储有OS IP的相应OS配置文件对应的存储有BMC IP的BMC配置文件,方便从对应的列表可直接获取对应的BMC IP。Therefore, in this embodiment, the BMC IP settings of batches of BMC are performed based on the SHELL scripting language, and the system IP of the existing operating system is used to access the inside of the current system, and the BMC system is accessed through KCS in the IPMI protocol, and the BMC system is accessed through IPMI commands. Each BMC sets the corresponding BMC IP. Among them, the BMC configuration file with the BMC IP stored corresponding to the corresponding OS configuration file with the OS IP can be listed in the txt file, so that the corresponding BMC IP can be directly obtained from the corresponding list .
基于上述技术方案,本实施例通过系统操作模块从OS配置文件中确定当前系统的系统IP,当系统操作模块与当前系统连通后,发送与系统IP对应的设置指令至BMC,以实现BMC自动设置BMC IP,通过上述操作依次实现所有的BMC的BMC IP的设置,避免了相关技术中利用手动设 置BMC IP的低效率,改善了用户体验。Based on the above technical solution, this embodiment uses the system operation module to determine the system IP of the current system from the OS configuration file. When the system operation module is connected to the current system, it sends a setting instruction corresponding to the system IP to the BMC to realize automatic BMC setting BMC IP, through the above operations, the BMC IP settings of all BMCs are implemented in turn, avoiding the inefficiency of manually setting BMC IP in related technologies and improving user experience.
在一种可实现的实施方式中,检测与当前系统的连通状态,包括:发送ping命令至当前系统;若接收到反馈信息,则确定连通状态为已连通;若未接收到反馈信息,则确定连通状态为未连通。In an achievable embodiment, detecting the connection status with the current system includes: sending a ping command to the current system; if the feedback information is received, the connection status is determined to be connected; if the feedback information is not received, then the connection status is determined The connected state is not connected.
具体的,发送ping(Packet Internet Groper,因特网包探索器)命令即ICMP(Internet Control Message Protocol,控制报文协议)回声请求信息给当前系统,并报告接收到的反馈信息即ICMP回声应答,只有接收到反馈信息则说明是连通的。进一步的,若接收到反馈信息,则确定连通状态为已连通,包括:若接收到反馈信息,判断接收反馈信息的时间差是否小于预设阈值,若小于预设阈值则确定连通状态是已连通,若大于预设阈值,则确定是未连通。其中,时间差的计算是发送ping命令的时间戳为a,接收到反馈信息的时间戳是b,则时间差是b-a。可以理解的是,当超过预设阈值则证明系统连接可能会发生故障,或者不稳定,在此状态下进行BMC IP的设置可能存储在设置失败的现象的发生或者设置时间长的现象的发生,因此,通过上述方式可以保证BMC IP设置的成功率。Specifically, send a ping (Packet Internet Groper) command, that is, ICMP (Internet Control Message Protocol, control message protocol) echo request information to the current system, and report that the received feedback information is the ICMP echo response, and only receive The feedback information indicates that it is connected. Further, if the feedback information is received, determining that the connected state is connected, including: if the feedback information is received, judging whether the time difference for receiving the feedback information is less than a preset threshold, and if it is less than the preset threshold, determining that the connected state is connected, If it is greater than the preset threshold, it is determined to be disconnected. Among them, the calculation of the time difference is that the time stamp of sending the ping command is a, and the time stamp of receiving the feedback information is b, then the time difference is b-a. It is understandable that when the preset threshold is exceeded, it proves that the system connection may be faulty or unstable. The BMC IP setting in this state may be stored in the occurrence of setting failure or long setting time. Therefore, the success rate of BMC IP setting can be guaranteed through the above method.
在一种可实现的实施方式中,若已连通,则在当前系统内发送与系统IP对应的设置指令至BMC之后,还包括:判断是否完成所有的BMC的BMC IP的设置;若是,则将所有的BMC的BMC IP的设置结果显示在预设界面上。In an achievable implementation, if it is connected, after sending the setting instruction corresponding to the system IP to the BMC in the current system, it also includes: judging whether the BMC IP settings of all BMCs are completed; All BMC IP setting results of BMC are displayed on the preset interface.
可以理解的是,本申请是大批量设置BMC IP,因此,在执行完成步骤S110-S140后,确定下一个系统为当前系统,继续执行步骤S110-S140,直至完成所有的BMC IP的设置。当完成所有的BMC IP的设置后,将所有的BMC的BMC IP的设置结果显示在预设界面上,具体是,如果将所有的BMC的BMC IP的设置结果显示在预设界面上设置成功就打印出来“pass”,其他情况会打印出来fail,并通过不同的颜色区分出来。可见,通过上述方式可以简单明了的获得设置结果。It is understandable that this application is to set BMC IP in large quantities. Therefore, after performing steps S110-S140, determine that the next system is the current system, and continue to perform steps S110-S140 until all BMC IP settings are completed. When all the BMC IP settings are completed, the BMC IP setting results of all BMCs are displayed on the preset interface. Specifically, if the BMC IP setting results of all BMCs are displayed on the preset interface, the setting is successful. Print out "pass", otherwise it will print out fail and distinguish it by different colors. It can be seen that the setting result can be obtained simply and clearly through the above method.
下面对本申请实施例提供的一种BMC IP设置装置进行介绍,下文描述的BMC IP设置装置与上文描述的BMC IP设置方法可相互对应参照,参考 图2,图2为本申请实施例所提供的一种BMC IP设置装置的结构示意图,包括:The following describes a BMC IP setting device provided by an embodiment of this application. The BMC IP setting device described below and the BMC IP setting method described above can be referred to each other. Refer to Figure 2, which is provided by this embodiment of the application. A schematic structural diagram of a BMC IP setting device includes:
OS配置文件读取模块210,用于系统操作模块读取OS配置文件;The OS configuration file reading module 210 is used for the system operation module to read the OS configuration file;
系统IP确定模块220,用于从OS配置文件中确定当前系统的系统IP;The system IP determining module 220 is used to determine the system IP of the current system from the OS configuration file;
连通状态检测模块230,用于检测与当前系统的连通状态;The connection state detection module 230 is used to detect the connection state with the current system;
设置指令发送模块240,用于若已连通,则在当前系统内发送与系统IP对应的设置指令至BMC,以使BMC根据设置指令确定与系统IP对应的BMC IP,通过IPMI命令设置BMC IP。The setting instruction sending module 240 is configured to send a setting instruction corresponding to the system IP to the BMC in the current system, so that the BMC determines the BMC IP corresponding to the system IP according to the setting instruction, and sets the BMC IP through the IPMI command.
在一些具体的实施例中,连通状态检测模块230包括:In some specific embodiments, the connected state detection module 230 includes:
Ping命令发送单元,用于发送ping命令至当前系统;Ping command sending unit, used to send ping command to the current system;
已连通确定单元,用于若接收到反馈信息,则确定连通状态为已连通;The connected determining unit is configured to determine that the connected state is connected if the feedback information is received;
未连通确定单元,用于若未接收到反馈信息,则确定连通状态为未连通。The disconnected determination unit is configured to determine that the connected state is disconnected if the feedback information is not received.
在一些具体的实施例中,还包括:In some specific embodiments, it further includes:
新的当前系统确定模块,用于若未连通,则跳过当前系统,记录系统IP,确定下一个系统为新的当前系统;The new current system determination module is used to skip the current system if it is not connected, record the system IP, and determine the next system as the new current system;
执行模块,用于执行从OS配置文件中确定当前系统的系统IP的步骤。The execution module is used to execute the step of determining the system IP of the current system from the OS configuration file.
在一些具体的实施例中,还包括:In some specific embodiments, it further includes:
判断模块,用于判断是否完成所有的BMC的BMC IP的设置;The judgment module is used to judge whether all BMC IP settings are completed;
显示模块,用于若是,则将所有的BMC的BMC IP的设置结果显示在预设界面上。The display module is used to display all the BMC IP setting results of the BMC on the preset interface if it is.
由于装置部分的实施例与方法部分的实施例相互对应,因此装置部分的实施例请参见方法部分的实施例的描述,这里暂不赘述。Since the embodiment of the device part and the embodiment of the method part correspond to each other, for the embodiment of the device part, please refer to the description of the embodiment of the method part, which will not be repeated here.
随着IT技术的迅猛发展,传统信息化服务以及日趋强大的云计算服务对服务器的稳定性要求越来越高。各大厂商的需求量的增加,对于产线工作人员的工作量也加大许多。出厂的数百台机器需要根据客户指定的要求刷入IP地址,固件刷新等工作以人工的方式去完成,既浪费人力又浪费时间,效率较低。基于上述技术问题,本实施例提供一种BMC IP设置方法, 能够提高BMC IP设置效率,具体请参考图3,图3为本申请实施例所提供的一种BMC IP设置方法的流程图,具体包括:With the rapid development of IT technology, traditional information services and increasingly powerful cloud computing services require higher and higher server stability. The increase in demand from major manufacturers has also increased the workload of production line staff. Hundreds of machines shipped out of the factory need to be flashed in IP addresses according to the requirements specified by customers, and tasks such as firmware refreshing are completed manually, which is a waste of manpower and time, and is low in efficiency. Based on the above technical problems, this embodiment provides a BMC IP setting method, which can improve the efficiency of BMC IP setting. Please refer to FIG. 3 for details. FIG. 3 is a flowchart of a BMC IP setting method provided by an embodiment of the application. include:
S310、BMC接收到系统操作模块发送的设置指令,其中设置指令是系统操作模块当与当前系统连通后,发送的与根据OS配置文件确定的系统IP对应的指令;S310. The BMC receives a setting instruction sent by the system operation module, where the setting instruction is an instruction corresponding to the system IP determined according to the OS configuration file sent by the system operation module after it is connected to the current system;
S320、根据设置指令确定对应的BMC IP;S320. Determine the corresponding BMC IP according to the setting instruction;
S330、通过IPMI命令设置BMC IP。S330. Set the BMC IP through the IPMI command.
进一步的,根据设置指令确定对应的BMC IP,包括:解析设置指令,得到系统IP对应的第一标志信息;根据第一标志信息确定BMC配置文件中的第二标志信息;根据第二标志信息确定BMC IP。Further, determining the corresponding BMC IP according to the setting instruction includes: parsing the setting instruction to obtain the first flag information corresponding to the system IP; determining the second flag information in the BMC configuration file according to the first flag information; determining according to the second flag information BMC IP.
其中,每一个系统IP对应有一个标志信息,每个BMC IP对应有一个标志信息,这两个标志信息是一一对应的,通过标志信息就可以确定BMC IP。Among them, each system IP corresponds to a mark information, and each BMC IP corresponds to a mark information. These two mark information are in a one-to-one correspondence, and the BMC IP can be determined through the mark information.
基于上述实施例,本实施例请通过系统操作模块从OS配置文件中确定当前系统的系统IP,当系统操作模块与当前系统连通后,发送与系统IP对应的设置指令至BMC,根据设置指令确定对应的BMC IP,通过IPMI命令设置BMC IP,完成BMC自动设置BMC IP,通过上述操作依次实现所有的BMC的BMC IP的设置,避免了相关技术中利用手动设置BMC IP的低效率,改善了用户体验。Based on the above embodiment, in this embodiment, please determine the system IP of the current system from the OS configuration file through the system operation module. After the system operation module is connected to the current system, send the setting instruction corresponding to the system IP to the BMC, and determine according to the setting instruction For the corresponding BMC IP, set the BMC IP through the IPMI command, and complete the BMC automatic setting of the BMC IP. Through the above operations, the BMC IP settings of all the BMCs are realized in turn, avoiding the inefficiency of manually setting the BMC IP in related technologies and improving users Experience.
下面对本申请实施例提供的一种BMC IP设置装置进行介绍,下文描述的BMC IP设置装置与上文描述的BMC IP设置方法可相互对应参照,参考图4,图4为本申请实施例所提供的另一种BMC IP设置装置的结构示意图,包括:The following describes a BMC IP setting device provided by an embodiment of this application. The BMC IP setting device described below and the BMC IP setting method described above can be referred to each other. Refer to Figure 4, which is provided by this embodiment of the application. The structure diagram of another BMC IP setting device includes:
设置指令接收模块410,用于BMC接收到系统操作模块发送的设置指令,其中设置指令是系统操作模块当与当前系统连通后,发送的与根据OS配置文件确定的系统IP对应的指令;The setting instruction receiving module 410 is used for the BMC to receive the setting instruction sent by the system operation module, where the setting instruction is the instruction corresponding to the system IP determined according to the OS configuration file sent by the system operation module when it is connected to the current system;
BMC IP确定模块420,用于根据设置指令确定对应的BMC IP;The BMC IP determining module 420 is configured to determine the corresponding BMC IP according to the setting instruction;
BMC IP设置模块430,用于通过IPMI命令设置BMC IP。The BMC IP setting module 430 is used to set the BMC IP through IPMI commands.
在一些具体的实施例中,BMC IP确定模块420具体包括:In some specific embodiments, the BMC IP determining module 420 specifically includes:
第一标志信息获得单元,用于解析设置指令,得到系统IP对应的第一标志信息;The first logo information obtaining unit is configured to parse the setting instruction to obtain the first logo information corresponding to the system IP;
第二标志信息确定单元,用于根据第一标志信息确定BMC配置文件中的第二标志信息;The second flag information determining unit is configured to determine the second flag information in the BMC configuration file according to the first flag information;
BMC IP确定单元,用于根据第二标志信息确定BMC IP。The BMC IP determining unit is configured to determine the BMC IP according to the second flag information.
由于装置部分的实施例与方法部分的实施例相互对应,因此装置部分的实施例请参见方法部分的实施例的描述,这里暂不赘述。Since the embodiment of the device part and the embodiment of the method part correspond to each other, for the embodiment of the device part, please refer to the description of the embodiment of the method part, which will not be repeated here.
本实施例提供一种具体的BMC IP设置方法,整个过程主要是基于shell脚本,设置两个配置文件,包括OS配置文件(OS_IP.txt)、BMC配置文件,其中,分别包括已有的os_ip(系统IP)和对应的要设置的BMC_ip(BMC IP),根据OS_IP.txt中列出的os_ip每个都会访问到系统内部,首先判断是否可ping通当前系统,如果可以ping通就通过ssh命令进入到当前系统下,通过ipmi命令控制BMC设置ip地址(BMC IP),如ping不通跳过此os_ip。This embodiment provides a specific BMC IP setting method. The whole process is mainly based on a shell script. Two configuration files are set up, including the OS configuration file (OS_IP.txt) and the BMC configuration file, including the existing os_ip( System IP) and the corresponding BMC_ip (BMC IP) to be set. According to the os_ip listed in OS_IP.txt, each of the os_ips listed in the OS_IP.txt will be accessed inside the system. First, determine whether the current system can be pinged. If it can be pinged, use the ssh command to enter In the current system, control the BMC to set the ip address (BMC IP) through the ipmi command. If the ping fails, skip this os_ip.
可见,本实施例中包括两个脚本,其中一个脚本应用于系统操作模块,另一个应用于BMC;It can be seen that this embodiment includes two scripts, one of which is applied to the system operation module, and the other is applied to the BMC;
具体的,读取OS配置文件;从OS配置文件中确定当前系统的系统IP;检测与当前系统的连通状态;若已连通,则在当前系统内发送与系统IP对应的设置指令至BMC。可以理解的是,检测与当前系统的连通状态可以是判断是否可连接当前系统。通过读取OS_ip.txt获取当前的os ip,如果可以ping通,就通过ssh命令进入到os下,如果无法ping通就跳过,并把无法ping通的ip记录下来。Specifically, the OS configuration file is read; the system IP of the current system is determined from the OS configuration file; the connection status with the current system is detected; if it is connected, the setting instruction corresponding to the system IP is sent to the BMC in the current system. It is understandable that detecting the connection state with the current system can be to determine whether the current system can be connected. Obtain the current os ip by reading OS_ip.txt. If it can be pinged, use the ssh command to enter the os. If it cannot be pinged, skip it and record the ip that cannot be pinged.
BMC,根据设置指令确定对应的BMC IP,通过IPMI命令设置BMC IP。具体的,系统操作模块在当前系统下通过ipmitool lan set 1ipaddr xxxx命令给BMC设置ip,并且设置的ip必须是与系统IP相对应的ip地址即BMC IP。如果设置成功就打印出来pass,其他情况会打印出来fail,并通过不同的颜色区分出来。The BMC determines the corresponding BMC IP according to the setting command, and sets the BMC IP through the IPMI command. Specifically, the system operation module uses the ipmitool lan set 1ipaddr xxxx command to set the ip for the BMC under the current system, and the set ip must be the ip address corresponding to the system IP, that is, the BMC IP. If the setting is successful, the pass will be printed out, otherwise it will be printed out as fail and distinguished by different colors.
测试脚本如下所示。The test script is shown below.
Figure PCTCN2020134580-appb-000001
Figure PCTCN2020134580-appb-000001
Figure PCTCN2020134580-appb-000002
Figure PCTCN2020134580-appb-000002
Figure PCTCN2020134580-appb-000003
Figure PCTCN2020134580-appb-000003
下面对本申请实施例提供的一种电子设备进行介绍,下文描述的电子设备与上文描述的BMC IP设置方法可相互对应参照。The following introduces an electronic device provided by an embodiment of the present application. The electronic device described below and the BMC IP setting method described above may be referenced correspondingly.
本实施例提供一种电子设备,包括:This embodiment provides an electronic device, including:
存储器,用于存储计算机程序;Memory, used to store computer programs;
处理器,用于执行计算机程序时实现如上述BMC IP设置方法的步骤。The processor is used to implement the steps of the above-mentioned BMC IP setting method when the computer program is executed.
在一种可实现的实施方式中,本实施例中提供的电子设备中的处理器用于执行计算机程序时实现系统操作模块读取OS配置文件;从OS配置文件中确定当前系统的系统IP;检测与当前系统的连通状态;若已连通,则在当前系统内发送与系统IP对应的设置指令至BMC,以使BMC根据设置指令确定对应的BMC IP,通过IPMI命令设置BMC IP。In an achievable implementation manner, the processor in the electronic device provided in this embodiment is used to implement the system operation module to read the OS configuration file when executing the computer program; determine the system IP of the current system from the OS configuration file; detect The connection status with the current system; if it is connected, the setting command corresponding to the system IP is sent to the BMC in the current system, so that the BMC determines the corresponding BMC IP according to the setting command, and sets the BMC IP through the IPMI command.
在另一种可实现的实施方式中,本实施例中提供的电子设备中的处理器用于执行计算机程序时实现BMC接收到系统操作模块发送的设置指令,其中设置指令是系统操作模块当与当前系统连通后,发送的与根据OS配置文件确定的系统IP对应的指令;根据设置指令确定对应的BMC IP;通过IPMI命令设置BMC IP。In another achievable implementation manner, the processor in the electronic device provided in this embodiment is used to execute the computer program to realize that the BMC receives the setting instruction sent by the system operation module, where the setting instruction is when the system operation module is in line with the current After the system is connected, the instruction corresponding to the system IP determined according to the OS configuration file is sent; the corresponding BMC IP is determined according to the setting instruction; the BMC IP is set through the IPMI command.
由于电子设备部分的实施例与BMC IP设置方法部分的实施例相互对应,因此电子设备部分的实施例请参见BMC IP设置方法部分的实施例的描述,这里暂不赘述。Since the embodiment of the electronic device part corresponds to the embodiment of the BMC IP setting method part, for the embodiment of the electronic device part, please refer to the description of the embodiment of the BMC IP setting method part, which will not be repeated here.
下面对本申请实施例提供的一种BMC IP设置系统进行介绍,下文描述的BMC IP设置系统与上文描述的BMC IP设置方法可相互对应参照。The following describes a BMC IP setting system provided by an embodiment of the present application. The BMC IP setting system described below and the BMC IP setting method described above can be referred to each other.
本实施例提供一种BMC IP设置系统,包括:This embodiment provides a BMC IP setting system, including:
系统操作模块,用于读取OS配置文件;从OS配置文件中确定当前系统的系统IP;检测与当前系统的连通状态;若已连通,则在当前系统内发送与系统IP对应的设置指令至BMC;The system operation module is used to read the OS configuration file; determine the system IP of the current system from the OS configuration file; detect the connection status with the current system; if it is connected, send the setting instructions corresponding to the system IP in the current system to BMC;
BMC,用于根据设置指令确定对应的BMC IP,通过IPMI命令设置BMC IP。BMC is used to determine the corresponding BMC IP according to the setting command, and set the BMC IP through the IPMI command.
由于BMC IP设置系统部分的实施例与BMC IP设置方法部分的实施例相互对应,因此BMC IP设置系统部分的实施例请参见BMC IP设置方法部分的实施例的描述,这里暂不赘述。Since the embodiment of the BMC IP setting system part corresponds to the embodiment of the BMC IP setting method part, please refer to the description of the embodiment of the BMC IP setting method part for the embodiment of the BMC IP setting method part, which will not be repeated here.
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Professionals may further realize that the units and algorithm steps of the examples described in the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two, in order to clearly illustrate the possibilities of hardware and software. Interchangeability, in the above description, the composition and steps of each example have been generally described in accordance with the function. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可 擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the method or algorithm described in the embodiments disclosed in this document can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or all areas in the technical field. Any other known storage media.
以上对本申请所提供的一种BMC IP设置方法、BMC IP设置装置、电子设备及BMC IP设置系统进行了详细介绍。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。The above provides a detailed introduction to a BMC IP setting method, BMC IP setting device, electronic equipment, and BMC IP setting system provided by this application. Specific examples are used in this article to illustrate the principles and implementation of the application. The description of the above examples is only used to help understand the methods and core ideas of the application. It should be pointed out that for those of ordinary skill in the art, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims (10)

  1. 一种BMC IP设置方法,其特征在于,包括:A BMC IP setting method is characterized in that it includes:
    系统操作模块读取OS配置文件;The system operation module reads the OS configuration file;
    从所述OS配置文件中确定当前系统的系统IP;Determine the system IP of the current system from the OS configuration file;
    检测与所述当前系统的连通状态;Detecting the connection state with the current system;
    若已连通,则在所述当前系统内发送与所述系统IP对应的设置指令至BMC,以使所述BMC根据所述设置指令确定对应的BMC IP,通过IPMI命令设置所述BMC IP。If it is connected, a setting instruction corresponding to the system IP is sent to the BMC in the current system, so that the BMC determines the corresponding BMC IP according to the setting instruction, and sets the BMC IP through an IPMI command.
  2. 根据权利要求1所述的BMC IP设置方法,其特征在于,所述检测与所述当前系统的连通状态,包括:The BMC IP setting method according to claim 1, wherein the detecting the connection state with the current system comprises:
    发送ping命令至所述当前系统;Sending a ping command to the current system;
    若接收到反馈信息,则确定所述连通状态为已连通;If the feedback information is received, it is determined that the connected state is connected;
    若未接收到所述反馈信息,则确定所述连通状态为未连通。If the feedback information is not received, it is determined that the connected state is not connected.
  3. 根据权利要求1所述的BMC IP设置方法,其特征在于,还包括:The BMC IP setting method according to claim 1, further comprising:
    若未连通,则跳过所述当前系统,记录所述系统IP,确定下一个系统为新的当前系统;If not connected, skip the current system, record the system IP, and determine that the next system is the new current system;
    执行所述从所述OS配置文件中确定当前系统的系统IP的步骤。Perform the step of determining the system IP of the current system from the OS configuration file.
  4. 根据权利要求3所述的BMC IP设置方法,其特征在于,所述若已连通,则在所述当前系统内发送与所述系统IP对应的设置指令至BMC之后,还包括:The BMC IP setting method according to claim 3, characterized in that, if it is connected, after sending a setting instruction corresponding to the system IP to the BMC in the current system, the method further comprises:
    判断是否完成所有的所述BMC的BMC IP的设置;Determine whether all the BMC IP settings of the BMC are completed;
    若是,则将所有的所述BMC的BMC IP的设置结果显示在预设界面上。If yes, display all the BMC IP setting results of the BMC on the preset interface.
  5. 一种BMC IP设置方法,其特征在于,包括:A BMC IP setting method is characterized in that it includes:
    BMC接收到系统操作模块发送的设置指令,其中所述设置指令是所述系统操作模块当与当前系统连通后,发送的与根据OS配置文件确定的系统IP对应的指令;The BMC receives the setting instruction sent by the system operation module, where the setting instruction is the instruction corresponding to the system IP determined according to the OS configuration file sent by the system operation module after it is connected to the current system;
    根据所述设置指令确定对应的BMC IP;Determine the corresponding BMC IP according to the setting instruction;
    通过IPMI命令设置所述BMC IP。The BMC IP is set through IPMI commands.
  6. 根据权利要求5所述的BMC IP设置方法,其特征在于,所述根据 所述设置指令确定对应的BMC IP,包括:The BMC IP setting method according to claim 5, wherein the determining the corresponding BMC IP according to the setting instruction comprises:
    解析所述设置指令,得到所述系统IP对应的第一标志信息;Parse the setting instruction to obtain the first flag information corresponding to the system IP;
    根据所述第一标志信息确定BMC配置文件中的第二标志信息;Determining the second flag information in the BMC configuration file according to the first flag information;
    根据所述第二标志信息确定所述BMC IP。Determine the BMC IP according to the second flag information.
  7. 一种BMC IP设置装置,其特征在于,包括:A BMC IP setting device, which is characterized in that it includes:
    OS配置文件读取模块,用于系统操作模块读取OS配置文件;OS configuration file reading module, used for system operation module to read OS configuration file;
    系统IP确定模块,用于从所述OS配置文件中确定当前系统的系统IP;The system IP determination module is used to determine the system IP of the current system from the OS configuration file;
    连通状态检测模块,用于检测与所述当前系统的连通状态;Connectivity status detection module, used to detect the connectivity status with the current system;
    设置指令发送模块,用于若已连通,则在所述当前系统内发送与所述系统IP对应的设置指令至BMC,以使所述BMC根据所述设置指令确定与所述系统IP对应的BMC IP,通过IPMI命令设置所述BMC IP。A setting instruction sending module, configured to send a setting instruction corresponding to the system IP to the BMC in the current system, so that the BMC determines the BMC corresponding to the system IP according to the setting instruction IP, the BMC IP is set through an IPMI command.
  8. 一种BMC IP设置装置,其特征在于,包括:A BMC IP setting device, which is characterized in that it includes:
    设置指令接收模块,用于BMC接收到系统操作模块发送的设置指令,其中所述设置指令是所述系统操作模块当与当前系统连通后,发送的与根据OS配置文件确定的系统IP对应的指令;The setting instruction receiving module is used by the BMC to receive the setting instruction sent by the system operation module, where the setting instruction is the instruction corresponding to the system IP determined according to the OS configuration file sent by the system operation module after it is connected to the current system ;
    BMC IP确定模块,用于根据所述设置指令确定对应的BMC IP;The BMC IP determining module is used to determine the corresponding BMC IP according to the setting instruction;
    BMC IP设置模块,用于通过IPMI命令设置所述BMC IP。The BMC IP setting module is used to set the BMC IP through IPMI commands.
  9. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    存储器,用于存储计算机程序;Memory, used to store computer programs;
    处理器,用于执行所述计算机程序时实现如权利要求1至6任一项所述BMC IP设置方法的步骤。The processor is configured to implement the steps of the BMC IP setting method according to any one of claims 1 to 6 when the computer program is executed.
  10. 一种BMC IP设置系统,其特征在于,包括:A BMC IP setting system, which is characterized in that it includes:
    系统操作模块,用于读取OS配置文件;从所述OS配置文件中确定当前系统的系统IP;检测与所述当前系统的连通状态;若已连通,则在所述当前系统内发送与所述系统IP对应的设置指令至BMC;The system operation module is used to read the OS configuration file; determine the system IP of the current system from the OS configuration file; detect the connection status with the current system; if it is connected, send the data to the current system The setting instructions corresponding to the system IP are sent to BMC;
    所述BMC,用于根据所述设置指令确定对应的BMC IP,通过IPMI命令设置所述BMC IP。The BMC is used to determine the corresponding BMC IP according to the setting instruction, and set the BMC IP through an IPMI command.
PCT/CN2020/134580 2020-02-28 2020-12-08 Bmc ip setting method and apparatus, electronic device and system WO2021169471A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010126451.5 2020-02-28
CN202010126451.5A CN111416882A (en) 2020-02-28 2020-02-28 BMC IP setting method and device, electronic equipment and system

Publications (1)

Publication Number Publication Date
WO2021169471A1 true WO2021169471A1 (en) 2021-09-02

Family

ID=71492812

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/134580 WO2021169471A1 (en) 2020-02-28 2020-12-08 Bmc ip setting method and apparatus, electronic device and system

Country Status (2)

Country Link
CN (1) CN111416882A (en)
WO (1) WO2021169471A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111416882A (en) * 2020-02-28 2020-07-14 浪潮电子信息产业股份有限公司 BMC IP setting method and device, electronic equipment and system
CN112272382A (en) * 2020-10-16 2021-01-26 苏州浪潮智能科技有限公司 BMC management system and method based on wireless communication
CN112965649A (en) * 2021-02-24 2021-06-15 浪潮电子信息产业股份有限公司 Server and IP information near-end visual control system of BMC module thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140195669A1 (en) * 2013-01-08 2014-07-10 American Megatrends, Inc. Emulated communication between master management instance and assisting management instances on baseboard management controller
CN107277193A (en) * 2017-08-09 2017-10-20 郑州云海信息技术有限公司 A kind of baseboard management controller address management method, device and system
CN107895107A (en) * 2017-12-21 2018-04-10 郑州云海信息技术有限公司 A kind of method and system of batch setting BMC username and passwords
CN110704115A (en) * 2019-09-16 2020-01-17 中盈优创资讯科技有限公司 Method, device and system for configuring BMC (baseboard management controller) of server
CN111416882A (en) * 2020-02-28 2020-07-14 浪潮电子信息产业股份有限公司 BMC IP setting method and device, electronic equipment and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI431488B (en) * 2010-09-30 2014-03-21 Acer Inc Method for managing sever apparatus and management apparatus thereof
CN103685602A (en) * 2013-12-13 2014-03-26 浪潮电子信息产业股份有限公司 In-band out-band multiple-address associating method bringing convenience to node management
CN107659677B (en) * 2017-11-07 2021-03-19 湖南长城银河科技有限公司 IP address automatic configuration device and method based on BMC
CN109587284A (en) * 2018-11-22 2019-04-05 郑州云海信息技术有限公司 A kind of method and system of remote auto configuration computer room server B MC network interface IP

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140195669A1 (en) * 2013-01-08 2014-07-10 American Megatrends, Inc. Emulated communication between master management instance and assisting management instances on baseboard management controller
CN107277193A (en) * 2017-08-09 2017-10-20 郑州云海信息技术有限公司 A kind of baseboard management controller address management method, device and system
CN107895107A (en) * 2017-12-21 2018-04-10 郑州云海信息技术有限公司 A kind of method and system of batch setting BMC username and passwords
CN110704115A (en) * 2019-09-16 2020-01-17 中盈优创资讯科技有限公司 Method, device and system for configuring BMC (baseboard management controller) of server
CN111416882A (en) * 2020-02-28 2020-07-14 浪潮电子信息产业股份有限公司 BMC IP setting method and device, electronic equipment and system

Also Published As

Publication number Publication date
CN111416882A (en) 2020-07-14

Similar Documents

Publication Publication Date Title
WO2021169471A1 (en) Bmc ip setting method and apparatus, electronic device and system
WO2018059062A1 (en) Network repairing method and apparatus, and terminal
US20060026289A1 (en) System, method and user interface for network status reporting
US9497100B2 (en) Methods, systems, and computer readable media for providing fuzz testing functionality
WO2022127504A1 (en) Network element management method and apparatus, and storage medium
TWI638553B (en) Method for detecting internet protocol address and media access control address
CN111190755B (en) Application program function exception handling method and device
CN106776346B (en) Test method and device of CCMTS (China center testing System) equipment
WO2020088170A1 (en) Domain name system configuration method and related apparatus
CN110362435B (en) PCIE fault positioning method, device, equipment and medium for Purley platform server
CN112100048A (en) Self-adaptive routing inspection method and device for server
TWI507889B (en) Management node , method , machine 一accessible medium and system for reservation and execution image writing of native computing devices
CN113098776B (en) Method, device, equipment and storage medium for determining network topology
CN110401561B (en) Server positioning method, system, equipment and computer readable storage medium
US8656011B2 (en) Method and management apparatus for detecting communication apparatus coupled to communication network
JP2007053485A (en) System for controlling network equipment
TWI685740B (en) Method for remotely clearing abnormal status of racks applied in data center
Cisco Release Notes for Cisco MGX 8260 Media Gateway, Version 1.2.4
TWI698741B (en) Method for remotely clearing abnormal status of racks applied in data center
US20180124012A1 (en) Domain name system (dns) resolution processing method and device
CN111400094A (en) Method, device, equipment and medium for restoring factory settings of server system
CN110581786A (en) Method, device, system and medium for testing communication stability of NCSI (network communication service) network
TWI685736B (en) Method for remotely clearing abnormal status of racks applied in data center
TWI755005B (en) Test method based on improved rest protocol, client, server and medium
JP5706289B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20921173

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 23/01/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20921173

Country of ref document: EP

Kind code of ref document: A1