CN107659677B - IP address automatic configuration device and method based on BMC - Google Patents

IP address automatic configuration device and method based on BMC Download PDF

Info

Publication number
CN107659677B
CN107659677B CN201711087413.8A CN201711087413A CN107659677B CN 107659677 B CN107659677 B CN 107659677B CN 201711087413 A CN201711087413 A CN 201711087413A CN 107659677 B CN107659677 B CN 107659677B
Authority
CN
China
Prior art keywords
address
server
bmc
working
storage module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711087413.8A
Other languages
Chinese (zh)
Other versions
CN107659677A (en
Inventor
彭爽
龚国辉
水超
孙言强
顾剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Greatwall Galaxy Technology Co ltd
National University of Defense Technology
Original Assignee
Hunan Greatwall Galaxy Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Greatwall Galaxy Technology Co ltd filed Critical Hunan Greatwall Galaxy Technology Co ltd
Priority to CN201711087413.8A priority Critical patent/CN107659677B/en
Publication of CN107659677A publication Critical patent/CN107659677A/en
Application granted granted Critical
Publication of CN107659677B publication Critical patent/CN107659677B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5053Lease time; Renewal aspects
    • 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/5092Address allocation by self-assignment, e.g. picking addresses at random and testing if they are already in use

Abstract

The invention discloses a method and a device for automatically configuring IP addresses based on BMC, wherein the method comprises the following steps of S100: an IP address management module on the management server formulates an IP address distribution rule and sends a setting command and an IP address to the BMC of each working server; step S200: each work server BMC receives the setting command and the IP address, and the BMC stores and sends the IP address to an IP address storage module of the work server; step S300: the IP address storage module of the working server stores the IP address; step S400: the IP address service module reads the IP address stored in the IP address storage module of the working server, compares the IP address with the network card IP address of the working server, and sets the IP address of the network card of the working server as the IP address stored in the IP address storage module of the working server if the IP address is different from the network card IP address of the working server. The IP address can be automatically configured through the BMC on the premise of clearly knowing the IP address of each server, and the efficiency and accuracy of IP address configuration are improved.

Description

IP address automatic configuration device and method based on BMC
Technical Field
The invention relates to the technical field of servers, in particular to a device and a method for automatically configuring an IP address based on BMC.
Background
In a large server platform room, how to set the IP addresses of the servers is a troublesome problem. If one machine is manually logged in for configuration, time and labor are wasted, configuration is not good, query is troublesome, and automation cannot be realized. If a DHCP (Dynamic Host Configuration Protocol) mode is used, the IP (Internet Protocol) address of each server cannot be automatically known, or the servers cannot be automatically logged in, and the IP resources are Dynamic and cannot be determined in the production stage, and have a large relationship with the deployment environment, and many Configuration tools can only be used under networking, so that the work of network initialization cannot be done.
Therefore, how to automatically configure an IP address on the premise of clearly knowing the IP address of each server, so as to improve the efficiency and accuracy of IP address configuration, is a problem that those skilled in the art need to solve.
Disclosure of Invention
The invention aims to provide a method and a device for automatically configuring an IP address based on BMC, which can automatically configure the IP address on the premise of clearly knowing the IP address of each server and improve the efficiency and the accuracy of IP address configuration.
In order to solve the technical problem, the invention provides a method for automatically configuring an IP address based on BMC, which comprises the following steps:
step S100: an IP address management module on the management server formulates an IP address distribution rule and sends a setting command and an IP address to the BMC of each working server;
step S200: each work server BMC receives the setting command and the IP address, and the BMC sends the IP address to an IP address storage module of the work server;
step S300: the IP address storage module of the working server stores the IP address;
step S400: the IP address service module reads the IP address stored in the IP address storage module of the working server, compares the IP address with the network card IP address of the working server, and sets the IP address of the network card of the working server as the IP address stored in the IP address storage module of the working server if the IP address is different from the network card IP address of the working server.
Preferably, the setting command sent by the IP address management module in step S100 includes an identification number of the work server;
the step S200 is specifically:
step S210: after each work server BMC receives the setting command and the IP address, the BMC compares the identification number of the work server in the setting command with the identification number of the work server, if the identification numbers are the same, the step S220 is carried out, otherwise, the received IP address is discarded, and the flow of the work server is ended;
step S220: and the BMC sends the IP address to an IP address storage module of the working server.
Preferably, the step S200 specifically includes:
step S211: after each work server BMC receives the setting command and the IP address, the BMC compares the identification number of the work server in the setting command with the identification number of the work server, if the identification numbers are the same, the BMC stores the IP address in a nonvolatile storage unit in the BMC, otherwise, the BMC discards the received IP address, and the flow of the work server is ended;
step S212: the BMC detects a starting signal of the work server, if the work server is started, the BMC takes out the stored IP address from the nonvolatile storage unit and then enters the step S220, and if not, the BMC continues to wait;
step S220: the BMC takes out the stored IP address from the nonvolatile storage unit and sends the IP address to the IP address storage module of the work server.
Preferably, the step S400 specifically includes:
step S410: when the working server is started, the working server system is initialized;
step S420: the IP address service module continuously reads the IP address stored by the IP address storage module of the working server at a preset time interval, compares the IP address with the network card IP address of the working server, and if the IP address is different from the network card IP address of the working server, the step S430 is executed, otherwise, the step S440 is executed;
step S430: the IP address service module sets the IP address of the network card of the work server as the IP address stored by the IP address storage module of the work server, and returns to the step S420;
step S440: the IP address service module discards the read IP address and returns to step S420.
Preferably, the step S430 specifically includes: the IP address service module sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server, and the IP address service module sends an IP address updating success signal and the IP address to the IP address storage module, and the step S500 is entered;
the method further comprises the steps of:
step S500: the IP address storage module receives the IP address updating success signal and the IP address and then sends the IP address updating success signal and the IP address to the BMC, and the BMC sends the IP address updating success signal and the IP address to the IP address management module;
step S600: the IP address management module marks the IP address in the IP address resource pool as used.
Preferably, the step S220 specifically includes:
step S220: the BMC takes out the stored IP address from the nonvolatile storage unit, sends the IP address to the IP address storage module of the local work server, starts the BMC to continuously detect the shutdown signal of the local work server, and if the local work server is shutdown, generates an interrupt, and then enters step S212.
The invention also provides a device for automatically configuring the IP address based on the BMC, wherein the device configures the IP address for at least one working server through the management server; the device comprises an IP address management module, an IP address storage module, a BMC and an IP address service module; the IP address management module is arranged on a management server, the IP address storage module, the BMC and the IP address service module are arranged on a working server, wherein:
the IP address management module is used for formulating an IP address distribution rule and sending a setting command and an IP address to the BMC;
the BMC is used for receiving the setting command and the IP address and sending the IP address to the IP address storage module;
the IP address storage module is used for storing the IP address;
and the IP address service module is used for reading the IP address stored by the IP address storage module, comparing the IP address with the IP address of the current network card, and if the IP address is different from the IP address of the current network card, setting the IP address of the current network card as the IP address stored by the IP address storage module.
Preferably, the IP address storage module is an I2C slave device register in the soar processor of the work server; the IP address storage module is connected with the BMC through an I2C bus.
Preferably, the I2C slave device register needs to define the storage area of the IP address in advance.
Preferably, the IP address service module accesses the I2C slave register in a mapping manner for a service running under a working server operating system.
According to the method and the device for automatically configuring the IP address based on the BMC, the IP address allocated to each working server can be clearly known through the IP address allocated by the IP address management module on the management server, the IP address service module compares the allocated IP address with the IP address of the network card of the working server, and if the allocated IP address is different from the IP address of the network card of the working server, the IP address of the network card of the working server is updated, so that the IP address is automatically configured through the BMC, and the efficiency and the accuracy of IP address configuration are improved.
Drawings
Fig. 1 is a flowchart of a method for automatically configuring a BMC-based IP address according to a first embodiment of the present invention;
fig. 2 is a flowchart of a method for automatically configuring a BMC-based IP address according to a second embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for automatically configuring a BMC-based IP address according to a third embodiment of the present invention;
fig. 4 is a flowchart of a method for automatically configuring a BMC-based IP address according to a fourth embodiment of the present invention;
fig. 5 is a flowchart of a method for automatically configuring a BMC-based IP address according to a fifth embodiment of the present invention;
fig. 6 is a flowchart of a method for automatically configuring a BMC-based IP address according to a sixth embodiment of the present invention;
fig. 7 is a block diagram of a device structure for automatically configuring an IP address based on BMC according to the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the present invention is further described in detail below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for automatically configuring a BMC-based IP address according to a first embodiment of the present invention.
The invention provides a method for automatically configuring an IP address based on a BMC (Baseboard Management Controller), which comprises the following steps:
step S100: an IP address management module on the management server formulates an IP address distribution rule and sends a setting command and an IP address to the BMC of each working server;
step S200: each work server BMC receives the setting command and the IP address, and the BMC sends the IP address to an IP address storage module of the work server;
step S300: the IP address storage module of the working server stores the IP address;
step S400: the IP address service module reads the IP address stored in the IP address storage module of the working server, compares the IP address with the network card IP address of the working server, and sets the IP address of the network card of the working server as the IP address stored in the IP address storage module of the working server if the IP address is different from the network card IP address of the working server.
And an IP address management module on the management server formulates an IP address distribution rule and organizes the IP addresses required to be set. And sending the setting command and the IP address to the BMC of each working server. The BMC on each working server managed by the management server receives the setting command and the IP address, and stores and sends the IP address to the IP address storage module of the working server. The IP address storage module of the working server stores the IP address sent by the BMC. The IP address service module reads the IP address stored by the IP address storage module of the working server, compares the IP address with the network card IP address of the working server, and sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server if the IP address is different from the network card IP address of the working server; and if the IP addresses are the same, the IP address of the network card of the working server is not updated. The IP address distributed by each working server can be clearly known by distributing the IP address through the IP address management module on the management server, the IP address service module compares the distributed IP address with the IP address of the network card of the working server, and if the distributed IP address is different from the IP address of the network card of the working server, the IP address of the network card of the working server is updated, so that the IP address is automatically configured through the BMC, and the efficiency and the accuracy of IP address configuration are improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for automatically configuring a BMC-based IP address according to a second embodiment of the present invention.
The second embodiment is different from the first embodiment in that each work server determines in advance whether or not the management server has sent the setting command to the work server.
Step S100: an IP address management module on a management server formulates an IP address distribution rule and sends a setting command and an IP address to the BMC of each work server, wherein the setting command comprises an identification number of the work server;
step S210: after each work server BMC receives the setting command and the IP address, the BMC compares the identification number of the work server in the setting command with the identification number of the work server, if the identification numbers are the same, the step S220 is carried out, otherwise, the received IP address is discarded, and the flow of the work server is ended;
step S220: the BMC sends the IP address to an IP address storage module of the working server;
step S300: the IP address storage module of the working server stores the IP address;
step S400: the IP address service module reads the IP address stored in the IP address storage module of the working server, compares the IP address with the network card IP address of the working server, and sets the IP address of the network card of the working server as the IP address stored in the IP address storage module of the working server if the IP address is different from the network card IP address of the working server.
And an IP address management module on the management server formulates an IP address distribution rule and organizes the IP addresses required to be set. And sending the setting command and the IP address to the BMC of each working server. The setting command comprises an identification number of a work server to be set. The BMC on each work server managed by the management server receives the setting command and the IP address, and compares the identification number of the work server in the setting command with the identification number of the work server.
If the identification number of the work server in the setting command is the same as the identification number of the work server, the BMC is used for storing and sending the IP address to the IP address storage module of the work server, and the IP address management module on the management server is used for setting the IP address of the work server. The IP address storage module of the working server stores the IP address sent by the BMC. The IP address service module reads the IP address stored by the IP address storage module of the working server, compares the IP address with the network card IP address of the working server, and sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server if the IP address is different from the network card IP address of the working server; and if the IP addresses are the same, the IP address of the network card of the working server is not updated.
If the identification number of the work server in the setting command is different from the identification number of the work server, it indicates that the IP address management module on the management server does not set the IP address of the work server this time, and discards the IP address received by the BMC, and the flow of the work server is ended. The efficiency and the accuracy rate of IP address configuration are further improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for automatically configuring a BMC-based IP address according to a third embodiment of the present invention.
The IP address storage module is an I2C slave device register in a Feiteng processor of the working server, and is connected with the BMC through an I2C bus. The I2C slave device register, i.e., the IP address storage module, is accessible only after the system is powered on. Therefore, the third embodiment is different from the second embodiment in that before the BMC sends the IP address to the IP address storage module of the work server, the BMC temporarily stores the IP address in the nonvolatile storage unit of the BMC, and needs to detect the boot signal of the work server.
Step S100: an IP address management module on a management server formulates an IP address distribution rule and sends a setting command and an IP address to the BMC of each work server, wherein the setting command comprises an identification number of the work server;
step S211: after each work server BMC receives the setting command and the IP address, the BMC compares the identification number of the work server in the setting command with the identification number of the work server, if the identification numbers are the same, the BMC stores the IP address in a nonvolatile storage unit in the BMC, otherwise, the BMC discards the received IP address, and the flow of the work server is ended;
step S212: the BMC detects a starting signal of the working server, if the working server is started, the step S220 is carried out, otherwise, the waiting is continued;
step S220: the BMC takes out the stored IP address from the nonvolatile storage unit and sends the IP address to an IP address storage module of the working server;
step S300: the IP address storage module of the working server stores the IP address;
step S400: the IP address service module reads the IP address stored in the IP address storage module of the working server, compares the IP address with the network card IP address of the working server, and sets the IP address of the network card of the working server as the IP address stored in the IP address storage module of the working server if the IP address is different from the network card IP address of the working server.
And an IP address management module on the management server formulates an IP address distribution rule and organizes the IP addresses required to be set. And sending the setting command and the IP address to the BMC of each working server. The setting command comprises an identification number of a work server to be set. The BMC on each work server managed by the management server receives the setting command and the IP address, and compares the identification number of the work server in the setting command with the identification number of the work server.
If the identification number of the working server in the setting command is the same as that of the working server, the IP address management module on the management server is to set the IP address of the working server, the BMC stores the IP address in a nonvolatile storage unit in the BMC if the IP address is the same, and detects a starting signal of the working server, and if the working server is started, the BMC takes out the stored IP address from the nonvolatile storage unit and sends the IP address to an IP address storage module of the working server; if the work server is not started, the BMC continues to wait until the work server is started, and takes out the stored IP address from the nonvolatile storage unit and sends the IP address to the IP address storage module of the work server. The IP address storage module of the working server stores the IP address sent by the BMC. The IP address service module reads the IP address stored by the IP address storage module of the working server, compares the IP address with the network card IP address of the working server, and sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server if the IP address is different from the network card IP address of the working server; and if the IP addresses are the same, the IP address of the network card of the working server is not updated.
If the identification number of the work server in the setting command is different from the identification number of the work server, it indicates that the IP address management module on the management server does not set the IP address of the work server this time, and discards the IP address received by the BMC, and the flow of the work server is ended.
Referring to fig. 4, fig. 4 is a flowchart illustrating a method for automatically configuring a BMC-based IP address according to a fourth embodiment of the present invention.
The IP address service module accesses the I2C slave device register in a mapping mode for the service running under the operating system of the working server. The IP address service module can be accessed only after the system is started. The fourth embodiment is different from the third embodiment in the way that the differentiated IP address service module updates the IP address.
Step S100: an IP address management module on a management server formulates an IP address distribution rule and sends a setting command and an IP address to the BMC of each work server, wherein the setting command comprises an identification number of the work server;
step S211: after each work server BMC receives the setting command and the IP address, the BMC compares the identification number of the work server in the setting command with the identification number of the work server, if the identification numbers are the same, the BMC stores the IP address in a nonvolatile storage unit in the BMC, otherwise, the BMC discards the received IP address, and the flow of the work server is ended;
step S212: the BMC detects a starting signal of the working server, if the working server is started, the step S220 is carried out, otherwise, the waiting is continued;
step S220: the BMC takes out the stored IP address from the nonvolatile storage unit and sends the IP address to an IP address storage module of the working server;
step S300: the IP address storage module of the working server stores the IP address;
step S410: when the working server is started, the working server system is initialized;
step S420: the IP address service module continuously reads the IP address stored by the IP address storage module of the working server at a preset time interval, compares the IP address with the network card IP address of the working server, and if the IP address is different from the network card IP address of the working server, the step S430 is executed, otherwise, the step S440 is executed;
step S430: the IP address service module sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server;
step S440: the IP address service module discards the read IP address and returns to step S420.
And an IP address management module on the management server formulates an IP address distribution rule and organizes the IP addresses required to be set. And sending the setting command and the IP address to the BMC of each working server. The setting command comprises an identification number of a work server to be set. The BMC on each work server managed by the management server receives the setting command and the IP address, and compares the identification number of the work server in the setting command with the identification number of the work server.
If the identification number of the working server in the setting command is the same as that of the working server, the IP address management module on the management server is to set the IP address of the working server, the BMC stores the IP address in a nonvolatile storage unit in the BMC if the IP address is the same, and detects a starting signal of the working server, and if the working server is started, the BMC takes out the stored IP address from the nonvolatile storage unit and sends the IP address to an IP address storage module of the working server; if the work server is not started, the BMC continues to wait until the work server is started, and takes out the stored IP address from the nonvolatile storage unit and sends the IP address to the IP address storage module of the work server. The IP address storage module of the working server stores the IP address sent by the BMC.
The working server is started up, and the working server system is initialized. The IP address service module continuously reads the IP address stored by the IP address storage module of the working server at a preset time interval, compares the IP address with the network card IP address of the working server, and sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server if the IP address is different from the network card IP address of the working server; and if the IP addresses are the same, the IP address of the network card of the working server is not updated, the read IP address is discarded, and the IP address stored by the IP address storage module of the working server is continuously read at a preset time interval.
If the identification number of the work server in the setting command is different from the identification number of the work server, it indicates that the IP address management module on the management server does not set the IP address of the work server this time, and discards the IP address received by the BMC, and the flow of the work server is ended.
Referring to fig. 5, fig. 5 is a flowchart illustrating a method for automatically configuring a BMC-based IP address according to a fifth embodiment of the present invention.
Therefore, the difference between the fifth embodiment and the fourth embodiment is that after the IP address configuration is successful, each working server performs feedback.
Step S100: an IP address management module on a management server formulates an IP address distribution rule and sends a setting command and an IP address to the BMC of each work server, wherein the setting command comprises an identification number of the work server;
step S211: after each work server BMC receives the setting command and the IP address, the BMC compares the identification number of the work server in the setting command with the identification number of the work server, if the identification numbers are the same, the BMC stores the IP address in a nonvolatile storage unit in the BMC, otherwise, the BMC discards the received IP address, and the flow of the work server is ended;
step S212: the BMC detects a starting signal of the working server, if the working server is started, the step S220 is carried out, otherwise, the waiting is continued;
step S220: the BMC takes out the stored IP address from the nonvolatile storage unit and sends the IP address to an IP address storage module of the working server;
step S300: the IP address storage module of the working server stores the IP address;
step S410: when the working server is started, the working server system is initialized;
step S420: the IP address service module continuously reads the IP address stored by the IP address storage module of the working server at a preset time interval, compares the IP address with the network card IP address of the working server, and if the IP address is different from the network card IP address of the working server, the step S430 is executed, otherwise, the step S440 is executed;
step S430: the IP address service module sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server, and the IP address service module sends an IP address updating success signal and the IP address to the IP address storage module, and the step S500 is entered;
step S440: the IP address service module discards the read IP address and returns to step S420.
Step S500: the IP address storage module receives the IP address updating success signal and the IP address and then sends the IP address updating success signal and the IP address to the BMC, and the BMC sends the IP address updating success signal and the IP address to the IP address management module;
step S600: the IP address management module marks the IP address in the IP address resource pool as used.
And an IP address management module on the management server formulates an IP address distribution rule and organizes the IP addresses required to be set. And sending the setting command and the IP address to the BMC of each working server. The setting command comprises an identification number of a work server to be set. The BMC on each work server managed by the management server receives the setting command and the IP address, and compares the identification number of the work server in the setting command with the identification number of the work server.
If the identification number of the working server in the setting command is the same as that of the working server, the IP address management module on the management server is to set the IP address of the working server, the BMC stores the IP address in a nonvolatile storage unit in the BMC if the IP address is the same, and detects a starting signal of the working server, and if the working server is started, the BMC takes out the stored IP address from the nonvolatile storage unit and sends the IP address to an IP address storage module of the working server; if the work server is not started, the BMC continues to wait until the work server is started, and takes out the stored IP address from the nonvolatile storage unit and sends the IP address to the IP address storage module of the work server. The IP address storage module of the working server stores the IP address sent by the BMC.
The working server is started up, and the working server system is initialized. The IP address service module continuously reads the IP address stored by the IP address storage module of the working server at a preset time interval, compares the IP address with the network card IP address of the working server, sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server if the IP address is different from the network card IP address of the working server, and sends an IP address updating success signal and the IP address to the IP address storage module. The IP address storage module receives the IP address updating success signal and the IP address and then sends the IP address updating success signal and the IP address to the BMC, and the BMC sends the IP address updating success signal and the IP address to the IP address management module. The IP address management module marks the IP address in the IP address resource pool as used.
The IP address service module reads the IP address stored by the IP address storage module of the working server, compares the IP address with the network card IP address of the working server, does not update the IP address of the network card of the working server if the IP address is the same as the network card IP address of the working server, discards the read IP address, and continuously reads the IP address stored by the IP address storage module of the working server at a preset time interval.
If the identification number of the work server in the setting command is different from the identification number of the work server, it indicates that the IP address management module on the management server does not set the IP address of the work server this time, and discards the IP address received by the BMC, and the flow of the work server is ended.
After the IP address is successfully configured, each working server can feed back, and the IP address management module marks the IP address in the IP address resource pool as used. The accuracy of IP address allocation is further improved.
Referring to fig. 6, fig. 6 is a flowchart illustrating a method for automatically configuring a BMC-based IP address according to a sixth embodiment of the present invention.
Since the IP address storage module and the IP address service module can be accessed only after the system is powered on, the difference between the sixth embodiment and the fifth embodiment is that the BMC will continuously detect whether the system is powered off.
Step S100: an IP address management module on a management server formulates an IP address distribution rule and sends a setting command and an IP address to the BMC of each work server, wherein the setting command comprises an identification number of the work server;
step S211: after each work server BMC receives the setting command and the IP address, the BMC compares the identification number of the work server in the setting command with the identification number of the work server, if the identification numbers are the same, the BMC stores the IP address in a nonvolatile storage unit in the BMC, otherwise, the BMC discards the received IP address, and the flow of the work server is ended;
step S212: the BMC detects a starting signal of the working server, if the working server is started, the step S220 is carried out, otherwise, the waiting is continued;
step S220: the BMC takes out the stored IP address from the nonvolatile storage unit, sends the IP address to an IP address storage module of the work server, starts the BMC to continuously detect a shutdown signal of the work server, generates an interrupt if the work server is shutdown, and enters step S212;
step S300: the IP address storage module of the working server stores the IP address;
step S410: when the working server is started, the working server system is initialized;
step S420: the IP address service module continuously reads the IP address stored by the IP address storage module of the working server at a preset time interval, compares the IP address with the network card IP address of the working server, and if the IP address is different from the network card IP address of the working server, the step S430 is executed, otherwise, the step S440 is executed;
step S430: the IP address service module sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server, and the IP address service module sends an IP address updating success signal and the IP address to the IP address storage module, and the step S500 is entered;
step S440: the IP address service module discards the read IP address and returns to step S420.
Step S500: the IP address storage module receives the IP address updating success signal and the IP address and then sends the IP address updating success signal and the IP address to the BMC, and the BMC sends the IP address updating success signal and the IP address to the IP address management module;
step S600: the IP address management module marks the IP address in the IP address resource pool as used.
And an IP address management module on the management server formulates an IP address distribution rule and organizes the IP addresses required to be set. And sending the setting command and the IP address to the BMC of each working server. The setting command comprises an identification number of a work server to be set. The BMC on each work server managed by the management server receives the setting command and the IP address, and compares the identification number of the work server in the setting command with the identification number of the work server.
If the identification number of the working server in the setting command is the same as that of the working server, the IP address management module on the management server is to set the IP address of the working server, the BMC stores the IP address in a nonvolatile storage unit in the BMC if the IP address is the same, and detects a starting signal of the working server, and if the working server is started, the BMC takes out the stored IP address from the nonvolatile storage unit and sends the IP address to an IP address storage module of the working server; if the work server is not started, the BMC continues to wait until the work server is started, and takes out the stored IP address from the nonvolatile storage unit and sends the IP address to the IP address storage module of the work server. The IP address storage module of the working server stores the IP address sent by the BMC, the BMC is started to continuously detect the shutdown signal of the working server, if the working server is shutdown, interruption is generated, the startup signal of the working server is continuously detected, and if the shutdown signal of the working server is not detected, the flow keeps normal operation.
The working server is started up, and the working server system is initialized. The IP address service module continuously reads the IP address stored by the IP address storage module of the working server at a preset time interval, compares the IP address with the network card IP address of the working server, sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server if the IP address is different from the network card IP address of the working server, and sends an IP address updating success signal and the IP address to the IP address storage module. The IP address storage module receives the IP address updating success signal and the IP address and then sends the IP address updating success signal and the IP address to the BMC, and the BMC sends the IP address updating success signal and the IP address to the IP address management module. The IP address management module marks the IP address in the IP address resource pool as used.
The IP address service module reads the IP address stored by the IP address storage module of the working server, compares the IP address with the network card IP address of the working server, does not update the IP address of the network card of the working server if the IP address is the same as the network card IP address of the working server, discards the read IP address, and continuously reads the IP address stored by the IP address storage module of the working server at a preset time interval.
If the identification number of the work server in the setting command is different from the identification number of the work server, it indicates that the IP address management module on the management server does not set the IP address of the work server this time, and discards the IP address received by the BMC, and the flow of the work server is ended.
Referring to fig. 7, fig. 7 is a block diagram of a device for automatically configuring an IP address based on BMC according to the present invention.
The invention also provides a device for automatically configuring the IP address based on the BMC, wherein the device configures the IP address for at least one working server through the management server; the device comprises an IP address management module 11, an IP address storage module 21, a BMC22 and an IP address service module 23; the IP address management module 11 is disposed on the management server 10, and the IP address storage module 21, the BMC22 and the IP address service module 23 are disposed on the work server 20, wherein:
the IP address management module 11 is used for formulating an IP address allocation rule and sending a setting command and an IP address to the BMC 22;
the BMC22 is used for receiving the setting command and the IP address and sending the IP address to the IP address storage module 21;
an IP address storage module 21, configured to store an IP address;
the IP address service module 23 is configured to read the IP address stored in the IP address storage module 21, compare the IP address with the IP address of the current network card, and set the IP address of the current network card as the IP address stored in the IP address storage module 21 if the IP address is different from the IP address of the current network card.
The IP address management module on the management server 10 formulates an IP address assignment rule and organizes the IP addresses that need to be set. And sends the set command and IP address to the BMCs 22 of the respective work servers 20. The BMC22 on each work server 20 managed by the management server receives the setting command and the IP address, and the BMC22 stores and transmits the IP address to the IP address storage module 21 of the work server. The IP address storage module 21 of the work server stores the IP address sent by the BMC 22. The IP address service module 23 reads the IP address stored in the IP address storage module 21 of the local work server, compares the IP address with the network card IP address of the local work server 20, and sets the IP address of the network card of the local work server 20 as the IP address stored in the IP address storage module 21 of the local work server if the IP address is different from the network card IP address of the local work server 20; if the IP addresses are the same, the IP address of the network card of the work server 20 is not updated. The IP address distributed by each working server can be clearly known by distributing the IP address through the IP address management module 11 on the management server 10, the IP address service module 23 compares the distributed IP address with the IP address of the network card of the working server 10, and if the distributed IP address is different from the IP address of the network card of the working server 10, the IP address of the network card of the working server 10 is updated, so that the IP address is automatically configured, and the efficiency and the accuracy of IP address configuration are improved.
The IP address storage module 21 is an I2C slave device register in the soar processor of the work server; the Feiteng processor is internally provided with an I2C slave device interface, the I2C interface of a Baseboard Management Controller (BMC) is connected in the design of the server, the IP address storage module 21 is connected with the BMC22 through an I2C bus, and therefore the BMC can be used as a master device to access an I2C slave device register of the Feiteng processor.
The I2C slave device register needs to define the storage area of the IP address in advance. For example, I2C stores the IP address of network card 1 from the offset 00 to 03 of the device register, and 04 to 07 stores the IP address of network card 2.
The IP address service module 23 is a service running under the operating system of the work server, and accesses the I2C slave device register in a mapping manner, thereby implementing data communication between the BMC and the CPU system.
The method and the device for automatically configuring the IP address based on the BMC provided by the present invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the core concepts of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (6)

1. A method for IP address automatic configuration based on BMC, which is characterized in that the method comprises the following steps:
step S100: an IP address management module on the management server formulates an IP address distribution rule and sends a setting command and an IP address to the BMC of each working server; the setting command sent by the IP address management module in step S100 includes an identification number of the work server;
step S200: each work server BMC receives the setting command and the IP address, and the BMC sends the IP address to an IP address storage module of the work server;
the step S200 is specifically:
step S210: after each work server BMC receives the setting command and the IP address, the BMC compares the identification number of the work server in the setting command with the identification number of the work server, if the identification numbers are the same, the step S220 is carried out, otherwise, the received IP address is discarded, and the flow of the work server is ended;
step S220: the BMC sends the IP address to an IP address storage module of the working server;
the step S210 specifically includes:
step S211: after each work server BMC receives the setting command and the IP address, the BMC compares the identification number of the work server in the setting command with the identification number of the work server, if the identification numbers are the same, the BMC stores the IP address in a nonvolatile storage unit in the BMC, otherwise, the BMC discards the received IP address, and the flow of the work server is ended;
step S212: the BMC detects a starting signal of the work server, if the work server is started, the BMC takes out the stored IP address from the nonvolatile storage unit and then enters the step S220, and if not, the BMC continues to wait;
step S220: the BMC takes out the stored IP address from the nonvolatile storage unit and sends the IP address to an IP address storage module of the working server;
step S300: the IP address storage module of the working server stores the IP address;
step S400: the IP address service module reads the IP address stored by the IP address storage module of the working server, compares the IP address with the network card IP address of the working server, and sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server if the IP address is different from the network card IP address of the working server; the method specifically comprises the following steps:
step S410: when the working server is started, the working server system is initialized;
step S420: the IP address service module continuously reads the IP address stored by the IP address storage module of the working server at a preset time interval, compares the IP address with the network card IP address of the working server, and if the IP address is different from the network card IP address of the working server, the step S430 is executed, otherwise, the step S440 is executed;
step S430: the IP address service module sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server, and the IP address service module sends an IP address updating success signal and the IP address to the IP address storage module, and the step S500 is entered;
step S440: the IP address service module discards the read IP address and returns to the step S420;
step S500: the IP address storage module receives the IP address updating success signal and the IP address and then sends the IP address updating success signal and the IP address to the BMC, and the BMC sends the IP address updating success signal and the IP address to the IP address management module;
step S600: the IP address management module marks the IP address in the IP address resource pool as used.
2. The method for BMC-based IP address auto-configuration according to claim 1, wherein the step S220 specifically is:
step S220: the BMC takes out the stored IP address from the nonvolatile storage unit, sends the IP address to the IP address storage module of the local work server, starts the BMC to continuously detect the shutdown signal of the local work server, and if the local work server is shutdown, generates an interrupt, and then enters step S212.
3. A BMC-based IP address automatic configuration device is characterized in that the device configures an IP address for at least one working server through a management server; the device comprises an IP address management module, an IP address storage module, a BMC and an IP address service module; the IP address management module is arranged on a management server, the IP address storage module, the BMC and the IP address service module are arranged on a working server, wherein:
the IP address management module is used for formulating an IP address distribution rule and sending a setting command and an IP address to the BMC;
the BMC is used for receiving the setting command and the IP address and sending the IP address to the IP address storage module;
the IP address storage module is used for storing the IP address;
the IP address service module is used for reading the IP address stored by the IP address storage module, comparing the IP address with the IP address of the current network card, and if the IP address is different from the IP address of the current network card, setting the IP address of the current network card as the IP address stored by the IP address storage module;
the device for automatically configuring the IP address based on the BMC performs the automatic configuration of the IP address through the following steps:
step S100: an IP address management module on the management server formulates an IP address distribution rule and sends a setting command and an IP address to the BMC of each working server;
step S200: each work server BMC receives the setting command and the IP address, and the BMC sends the IP address to the IP address storage module of the work server, specifically:
step S211: after each work server BMC receives the setting command and the IP address, the BMC compares the identification number of the work server in the setting command with the identification number of the work server, if the identification numbers are the same, the BMC stores the IP address in a nonvolatile storage unit in the BMC, otherwise, the BMC discards the received IP address, and the flow of the work server is ended;
step S212: the BMC detects a starting signal of the work server, if the work server is started, the BMC takes out the stored IP address from the nonvolatile storage unit and then enters the step S220, and if not, the BMC continues to wait;
step S220: the BMC takes out the stored IP address from the nonvolatile storage unit and sends the IP address to an IP address storage module of the working server;
step S300: the IP address storage module of the working server stores the IP address;
step S400: the IP address service module reads the IP address stored by the IP address storage module of the working server, compares the IP address with the network card IP address of the working server, and sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server if the IP address is different from the network card IP address of the working server, specifically:
step S410: when the working server is started, the working server system is initialized;
step S420: the IP address service module continuously reads the IP address stored by the IP address storage module of the working server at a preset time interval, compares the IP address with the network card IP address of the working server, and if the IP address is different from the network card IP address of the working server, the step S430 is executed, otherwise, the step S440 is executed;
step S430: the IP address service module sets the IP address of the network card of the working server as the IP address stored by the IP address storage module of the working server, and the IP address service module sends an IP address updating success signal and the IP address to the IP address storage module, and the step S500 is entered;
step S440: the IP address service module discards the read IP address and returns to the step S420;
step S500: the IP address storage module receives the IP address updating success signal and the IP address and then sends the IP address updating success signal and the IP address to the BMC, and the BMC sends the IP address updating success signal and the IP address to the IP address management module;
step S600: the IP address management module marks the IP address in the IP address resource pool as used.
4. The BMC-based IP address autoconfiguration apparatus of claim 3, wherein the IP address storage module is an I2C slave device register in the fly's processor of the working server; the IP address storage module is connected with the BMC through an I2C bus.
5. The apparatus of claim 4, wherein the I2C slave device register needs to define the storage area of the IP address in advance.
6. The apparatus of claim 3, wherein the IP Address service Module accesses the I2C slave device register in a mapping manner for services running under a working Server operating System.
CN201711087413.8A 2017-11-07 2017-11-07 IP address automatic configuration device and method based on BMC Active CN107659677B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711087413.8A CN107659677B (en) 2017-11-07 2017-11-07 IP address automatic configuration device and method based on BMC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711087413.8A CN107659677B (en) 2017-11-07 2017-11-07 IP address automatic configuration device and method based on BMC

Publications (2)

Publication Number Publication Date
CN107659677A CN107659677A (en) 2018-02-02
CN107659677B true CN107659677B (en) 2021-03-19

Family

ID=61120715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711087413.8A Active CN107659677B (en) 2017-11-07 2017-11-07 IP address automatic configuration device and method based on BMC

Country Status (1)

Country Link
CN (1) CN107659677B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240753A (en) * 2018-09-28 2019-01-18 联想(北京)有限公司 A kind of data processing method, system and electronic equipment
CN109495597A (en) * 2018-10-26 2019-03-19 芜湖智久机器人有限公司 System and method, the equipment on-line management method of online modification device target address
CN110213084B (en) * 2019-05-09 2022-03-22 北京佳讯飞鸿电气股份有限公司 Maneuvering type commanding and dispatching method, maneuvering type commanding and dispatching device, dispatching desk and system
CN111064624A (en) * 2019-12-29 2020-04-24 苏州浪潮智能科技有限公司 Whole cabinet node positioning method, device, equipment and readable storage medium
CN111416882A (en) * 2020-02-28 2020-07-14 浪潮电子信息产业股份有限公司 BMC IP setting method and device, electronic equipment and system
CN115277640B (en) * 2022-07-29 2023-11-24 迈普通信技术股份有限公司 Data processing method, device, intelligent network card and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1933419A (en) * 2005-09-15 2007-03-21 英业达股份有限公司 IP address updating system and method
CN103516547A (en) * 2013-09-18 2014-01-15 深圳市华为技术软件有限公司 Network parameter distribution method and device
CN104375860A (en) * 2014-10-30 2015-02-25 浪潮电子信息产业股份有限公司 Batch refreshing method for high-density equipment cabinet nodes BMC
CN104954504A (en) * 2015-05-05 2015-09-30 浪潮电子信息产业股份有限公司 Method for automatically configuring BMC (baseboard management controller) management IP (internet protocol)
CN106657444A (en) * 2017-02-24 2017-05-10 郑州云海信息技术有限公司 Method and device for configuring IP address of BMC
CN107277193A (en) * 2017-08-09 2017-10-20 郑州云海信息技术有限公司 A kind of baseboard management controller address management method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI588751B (en) * 2013-05-31 2017-06-21 聯想企業解決方案(新加坡)有限公司 Computer host with a baseboard management controller to manage virtual machines and method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1933419A (en) * 2005-09-15 2007-03-21 英业达股份有限公司 IP address updating system and method
CN103516547A (en) * 2013-09-18 2014-01-15 深圳市华为技术软件有限公司 Network parameter distribution method and device
CN104375860A (en) * 2014-10-30 2015-02-25 浪潮电子信息产业股份有限公司 Batch refreshing method for high-density equipment cabinet nodes BMC
CN104954504A (en) * 2015-05-05 2015-09-30 浪潮电子信息产业股份有限公司 Method for automatically configuring BMC (baseboard management controller) management IP (internet protocol)
CN106657444A (en) * 2017-02-24 2017-05-10 郑州云海信息技术有限公司 Method and device for configuring IP address of BMC
CN107277193A (en) * 2017-08-09 2017-10-20 郑州云海信息技术有限公司 A kind of baseboard management controller address management method, device and system

Also Published As

Publication number Publication date
CN107659677A (en) 2018-02-02

Similar Documents

Publication Publication Date Title
CN107659677B (en) IP address automatic configuration device and method based on BMC
CN108206847B (en) CDN management system, method and device
US7139816B2 (en) Method, apparatus, and program for server based network computer load balancing across multiple boot servers
US6353854B1 (en) Automatic reconfiguration system for change in management servers having protocol destination addresses
CN101951417B (en) Method, system and trunk equipment for assigning multiple server addresses
US7848327B2 (en) Methods and apparatus for creating addresses
WO2019237588A1 (en) Linux virtual server creation method, device, computer device and storage medium
EP3073676B1 (en) Method, apparatus and system for controlling auto-provisioning of network device
US20050262218A1 (en) System and method for DHCP-based assignment of IP addresses to servers based on geographic identifiers
CN111404753B (en) Flat network configuration method, computer equipment and storage medium
CN108400886B (en) Machine room server monitoring system and method
JP2002368763A (en) Network system, server unit and client unit, and method and program for providing network ip address
CN106549789B (en) Method and system for realizing server installation
EP3905598A1 (en) Message processing method and apparatus, control plane device, and computer storage medium
CN110704115A (en) Method, device and system for configuring BMC (baseboard management controller) of server
EP3474501B1 (en) Network device stacking
US20020083226A1 (en) Configuring computer components
CN115333933B (en) Automatic management method, medium and equipment for servers on machine room
CN101088266A (en) Network interface with remote control functionality
CN115268951A (en) Installation method, device, equipment and storage medium of operating system
JP2012109831A (en) Communication system
CN115001960B (en) Automatic equipment configuration deployment method and device
CN113472599B (en) Data communication method and system of network node
CN111988446B (en) Message processing method and device, electronic equipment and storage medium
CN117640589A (en) Management network port IP address configuration method for BMC, BMC chip and server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220309

Address after: 410205 building 15, phase I, Changsha Zhongdian Software Park, No. 39, Jianshan Road, high tech Development Zone, Changsha, Hunan

Patentee after: HUNAN GREATWALL GALAXY TECHNOLOGY Co.,Ltd.

Patentee after: National University of Defense Technology

Address before: 2 / F, headquarters building, 39 Jianshan Road, high tech Zone, Changsha City, Hunan Province, 410205

Patentee before: HUNAN GREATWALL GALAXY TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right