CN112073555A - Method for configuring IP address, electronic device and computer readable storage medium - Google Patents

Method for configuring IP address, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN112073555A
CN112073555A CN202010961297.3A CN202010961297A CN112073555A CN 112073555 A CN112073555 A CN 112073555A CN 202010961297 A CN202010961297 A CN 202010961297A CN 112073555 A CN112073555 A CN 112073555A
Authority
CN
China
Prior art keywords
bmc
address
server
managed
information
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.)
Pending
Application number
CN202010961297.3A
Other languages
Chinese (zh)
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.)
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information 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 China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202010961297.3A priority Critical patent/CN112073555A/en
Publication of CN112073555A publication Critical patent/CN112073555A/en
Pending legal-status Critical Current

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/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]
    • 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/0889Techniques to speed-up the configuration process
    • 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
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the invention relates to the field of service support, and discloses a configuration method of an IP address, electronic equipment and a computer readable storage medium. The configuration method of the IP address comprises the following steps: acquiring planning data of a machine room; acquiring information of a server which is managed by a Baseboard Management Controller (BMC) requesting to configure an IP address; and configuring the IP address of the BMC according to the information of the server managed by the BMC and the planning data. The IP address configuration method provided by the embodiment of the invention does not need to construct a separate network environment, can greatly reduce the difficulty of IP address configuration of BMC, saves resource investment, and considers both the accuracy and the configuration efficiency of the configuration process.

Description

Method for configuring IP address, electronic device and computer readable storage medium
Technical Field
The embodiment of the invention relates to the field of service support, in particular to a configuration method of an IP address, electronic equipment and a computer readable storage medium.
Background
Currently, human society is moving forward to the intelligent era, new technologies and new services are emerging, which also leads to the rapid increase of the number of Internet Technology (IT) devices, and IT infrastructure of each enterprise needs to be upgraded, expanded, or even reconfigured, which brings huge challenges to the data center of each enterprise. Currently, a data center generally adopts out-of-band management, that is, a Baseboard Management Controller (BMC) is used for managing a server in a computer room, the BMC can meet the management requirements of single board operation and maintenance, and as long as the data center has a BMC network, a server hardware system can be managed and detected at low cost. How to configure an Internet Protocol (IP) address of the BMC is a problem worthy of research.
The inventors found that at least the following problems exist in the related art: in the related art, a method of establishing an individual network is mostly adopted, for example, a Preboot eXecution Environment (PXE) system is used to configure an IP address of a BMC for a single server, but environments such as the PXE are to be established in a real machine room Environment, and in the configuration process, frequent Environment switching is required, so that a large amount of resources are wasted, the complexity of operation is increased, the configuration of the single server requires a configuration worker with higher skills, and the configuration worker can perform a large amount of repeated labor, thereby reducing the configuration efficiency of the IP address of the BMC.
Disclosure of Invention
An object of the embodiments of the present invention is to provide an IP address configuration method, an electronic device, and a computer-readable storage medium, which can greatly reduce the difficulty of configuring an IP address of a BMC without constructing a separate network environment, save resource investment, and consider both the accuracy and the configuration efficiency of a configuration process.
In order to solve the above technical problem, an embodiment of the present invention provides a method for configuring an IP address, including the following steps: acquiring planning data of a machine room; acquiring information of a server which is managed by a Baseboard Management Controller (BMC) requesting to configure an IP address; and configuring the IP address of the BMC according to the information of the server managed by the BMC and the planning data.
An embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the above IP address configuration method.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program, and the computer program realizes the configuration method of the IP address when being executed by a processor.
According to the embodiment of the invention, the planning data of the machine room is acquired, and because the real machine room environment is relatively complex, the real planning information of the machine room can be fully displayed by acquiring the planning data of the machine room, so that the IP address configuration conforms to the real situation and is more reasonable. The information of the server which is managed by the baseboard management controller BMC and requested to configure the IP address is obtained, the server which is managed by the BMC and requested to configure the IP address can be accurately positioned, and therefore the accuracy of IP address configuration is improved. And configuring the IP address of the BMC according to the information of the server managed by the BMC and the planning data. In consideration of the related technologies, a method of establishing an individual network environment (for example, PXE environment) is mostly adopted to isolate a server requesting BMC management for configuring an IP address from a network environment of a machine room, and after configuration is completed, the server requesting BMC management for configuring the IP address is switched back to the network environment of the machine room.
In addition, the information of the BMC-managed server includes a host serial number and a MAC address of the BMC-managed server; the configuring the IP address of the BMC according to the information of the server managed by the BMC and the planning data includes: and determining the IP address to be allocated to the BMC according to the host serial number of the server managed by the BMC and the planning data, so that the accuracy of the determined IP address to be allocated can be effectively improved. And binding the IP address to be allocated with the MAC address of the server managed by the BMC to ensure that the IP address to be allocated is indeed allocated to the server managed by the BMC applying the IP address. And restarting the server managed by the BMC to configure the IP address of the BMC, enabling the configured result to take effect and ensuring the normal operation of each function of the machine room.
In addition, the planning data comprises user names and passwords of a plurality of BMCs in the machine room; the acquiring information of the server managed by the baseboard management controller BMC requesting to configure the IP address includes: determining a password matched with the user name of the baseboard management controller BMC requesting to configure the IP address in the user names and passwords of the BMCs in the machine room; and acquiring the information of the server managed by the baseboard management controller BMC requesting to configure the IP address according to the user name and the matched password of the baseboard management controller BMC requesting to configure the IP address, so that the configuration error of the IP address can be effectively reduced, and the safety of the configuration process can be improved by using the user name and the password.
In addition, the determining an IP address to be allocated to the BMC according to the host serial number of the server managed by the BMC and the planning data includes: judging whether the server managed by the BMC is a server in the machine room; and if the server managed by the BMC is the server in the machine room, determining the IP address to be allocated to the BMC according to the server host serial number managed by the BMC and the planning data. The method and the system can judge whether the server of the BMC management requesting for allocating the IP address is the server in the local computer room or not, improve the security of the network environment, and prevent the servers which do not belong to the local computer room from being configured with the IP address, namely prevent illegal servers from entering the local computer room.
In addition, the determining whether the server managed by the BMC is the server in the computer room includes: judging whether the MAC address of the server managed by the BMC is in a blacklist of a dynamic host configuration DHCP protocol; if the server managed by the BMC is the server in the machine room, determining the IP address to be allocated to the BMC according to the server host serial number managed by the BMC and the planning data, wherein the determining comprises: and if the MAC address of the server managed by the BMC is not in the blacklist of the DHCP protocol, determining the IP address to be allocated to the BMC according to the DHCP protocol, the host serial number of the server managed by the BMC and the planning data. The embodiment of the invention uses the DHCP protocol to configure the IP address, can carry out batch configuration in a friendly way, improves the configuration efficiency, and can ensure the security of the network environment of the machine room by using the DHCP protocol blacklist.
In addition, the binding the IP address to be allocated and the MAC address of the server managed by the BMC includes: binding the IP address to be distributed with the MAC address of the server managed by the BMC to obtain a bound address; and writing the bound address into the DHCP protocol, and restarting the DHCP protocol. The method can ensure the safety of the network environment while ensuring the successful configuration of the IP address.
In addition, after the obtaining of the planning data of the machine room, the method further includes: if the change of the planning data of the machine room is detected, judging whether the information of the server managed by the BMC with the configured IP address changes; if the information of the server managed by the BMC with the configured IP address changes, acquiring the information of the server managed by the changed BMC; and configuring the IP address of the changed BMC according to the changed planning data and the information of the server managed by the changed BMC, so that the efficiency of modifying, deleting or replacing the IP address of the BMC can be effectively improved.
In addition, if the information of the server managed by the BMC configured with the IP address is not changed, the method further includes: acquiring information of a server newly added to the BMC management of the machine room; and configuring the IP address of the BMC newly added into the machine room according to the information of the server managed by the BMC newly added into the machine room and the changed planning data, so that the efficiency and performance of configuring the IP address can be further improved.
Drawings
One or more embodiments are illustrated by the corresponding figures in the drawings, which are not meant to be limiting.
Fig. 1 is a flowchart of a configuration method of an IP address according to a first embodiment of the present invention;
fig. 2 is a flowchart for acquiring information of a server managed by a BMC requesting configuration of an IP address according to a first embodiment of the present invention;
FIG. 3 is a flowchart for configuring an IP address of a BMC according to information and planning data of a server managed by the BMC according to the first embodiment of the present invention;
fig. 4 is a flowchart of a configuration method of an IP address according to a second embodiment of the present invention;
fig. 5 is a flowchart of a configuration method of an IP address according to a third embodiment of the present invention;
fig. 6 is an interaction diagram for implementing a configuration method of an IP address according to a third embodiment of the present invention;
fig. 7 is a flowchart of a configuration method of an IP address according to a fourth embodiment of the present invention;
fig. 8 is an interaction diagram for implementing a configuration method of an IP address according to a fourth embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic apparatus according to a fifth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present invention, and the embodiments may be mutually incorporated and referred to without contradiction.
To facilitate an understanding of the embodiments of the present invention, elements that will be introduced in the description of the embodiments of the present invention are first introduced here:
baseboard management Controller (Baseboard Manager Controller, abbreviated as BMC): the BMC is server Management software which runs independently without an X86 architecture, the BMC can run as long as the server managed by the BMC is powered on, monitors the health state of the temperature, the voltage and the like of each component (such as a CPU, a memory, a hard disk, a fan, a machine frame and the like) of the managed server, reports abnormal information to Network Management in time through a Simple Network Management Protocol (SNMP) and the like when a single board component is abnormal, and can manage and monitor a server hardware system at low cost by using the BMC.
The first embodiment of the invention relates to a configuration method of an IP address, which is applied to electronic equipment; the electronic device may be a terminal or a server, and the electronic device in this embodiment and each of the following embodiments is described by taking the server as an example. The server is different from the entity server for information transmission and data storage in the computer room, and hereinafter, for convenience of distinction, this server is referred to as a configuration server. The following describes implementation details of the IP address configuration method according to the present embodiment in detail, and the following is only provided for easy understanding and is not necessary for implementing the present embodiment.
In the embodiment of the present invention, the machine room where the server that needs BMC management of IP address configuration is located may be: the computer room is used for processing, storing and network transmitting mass data; each telecom operator is used for a telecom room for communication service support and service maintenance; the intelligent control machine room is used for monitoring and controlling the intelligent building; the shielding machine room is used for shielding electromagnetic noise interference, shielding radiation interference and preventing information leakage, and the size, the position and the function of the machine room are not specifically limited in the embodiment.
A specific flow of the IP address configuration method according to this embodiment may be as shown in fig. 1, and includes:
step 101, acquiring planning data of a machine room;
specifically, when the configuration server performs the configuration of the IP address, the planning data of the machine room may be obtained first, and the purpose of obtaining the planning data of the machine room is to bring the BMC-managed server into the management range of the machine room in advance.
In a specific implementation, the planning data of the machine room includes, but is not limited to: the system comprises a host serial number of a server in the machine room, IP addresses to be allocated to each BMC in the machine room, a plurality of BMC user names in the machine room and corresponding passwords. The planning data of the machine room acquired by the configuration server can be stored in the planning data table, so that the planning data can be conveniently searched and matched. The planning data of the machine room may be obtained by planning the machine room in advance by a person skilled in the art, or may be obtained by using machine deep learning automatic planning, which is not specifically limited in the embodiment of the present invention.
102, acquiring information of a server which is managed by a Baseboard Management Controller (BMC) requesting to configure an IP address;
specifically, when the configuration server receives the BMC request configuration IP address information, the configuration server may obtain information of a server managed by the BMC of the BMC requesting configuration of the IP address, and may further accurately locate the server managed by the BMC requesting configuration of the IP address, thereby improving accuracy of IP address configuration.
In one example, the configuration server may obtain information of a server managed by the BMC of the BMC requesting the configuration IP address according to a source of the "request configuration IP address information". Such as: the configuration server receives the "request to configure IP address information" and confirms that the information is sent by the BMC managing the server No. 2, that is, the source of the "request to configure IP address information" is the BMC managing the server No. 2, and thus acquires the information of the server No. 2.
In another example, the planning data for the room may include, but is not limited to, usernames and passwords for several BMCs within the room. Obtaining information of a server managed by a baseboard management controller BMC requesting configuration of an IP address may be implemented by the following sub-steps as shown in fig. 2:
substep 1021, determining a password matched with the user name of the BMC requesting to configure the IP address in the user names and passwords of a plurality of BMCs in the machine room;
specifically, the planning data acquired by the configuration server includes, but is not limited to, user names and passwords of a plurality of BMCs in the machine room, the configuration server may search for a password matched with the user name of the BMC requesting to configure the IP address from the user names and passwords of the plurality of BMCs in the machine room, and the security of the configuration process may be effectively improved by using the user name and password matching.
In one example, the planning data of the machine room acquired by the configuration server is stored in a planning data table, which includes usernames and passwords of several BMCs. Such as: the planning data table records "user name: BMC0001, password: aajshu "," user name: BMC0018, password: phyosf "," username: BMC0024, password: ijdgha ", and the like, the user names and passwords of 87 BMCs, and the user name of the BMC requesting to configure the IP address is: BMC0018, the server determines a user name: BMC 0018' matched password is "phyosf".
In another example, after the configuration server determines the user name of the BMC requesting to configure the IP address, the configuration server performs multi-thread loop matching on the user names and passwords of the BMCs in the machine room, and does not participate in the next loop matching for the user name and password of the BMC that have been successfully matched, so that the number of loops can be reduced, and the matching time can be saved.
Substep 1022, acquiring information of a server which requests to configure the BMC management of the IP address according to the user name and the matched password of the BMC which requests to configure the IP address;
specifically, after determining the password matched with the user name of the BMC requesting to configure the IP address, the configuration server may obtain information of the server managed by the BMC requesting to configure the IP address according to the user name of the BMC requesting to configure the IP address and the matched password.
In one example, the configuration server determines the status of the 87 BMCs in the username and password of the BMC corresponding to "username: the password matched with BMC0018 is phyosf, the phyosf is input into software of a BMC management system, the authority of the server managed by BMC0018 is obtained, and the information of the server managed by BMC0018 is obtained.
And 103, configuring the IP address of the BMC according to the information and the planning data of the server managed by the BMC.
Specifically, after the configuration server obtains the planning data of the machine room and the information of the server requesting BMC management for configuring the IP address, the IP address of the BMC may be configured according to the information and the planning data of the server managed by the BMC.
In one example, obtaining information of a server requesting BMC management of configuring an IP address includes, but is not limited to: host serial number, MAC address, etc. of the server managed by the BMC. According to the information and planning data of the server managed by the BMC, configuring the IP address of the BMC may be implemented by the sub-steps as shown in fig. 3:
a substep 1031, determining an IP address to be allocated to the BMC according to a host serial number and planning data of a server managed by the BMC;
specifically, the information of the server requesting BMC management of the configuration IP address acquired by the configuration server includes, but is not limited to: the configuration server may determine the IP address to be allocated to the BMC according to the host serial number and the planning data of the server managed by the BMC.
In a specific implementation, the planning data of the machine room may include IP addresses to be allocated to each BMC in the machine room, the configuration server obtains a host serial number of a server requesting BMC Management for configuring the IP addresses through technologies such as an Intelligent Platform Management Interface protocol (IPMI protocol for short), and determines the IP addresses to be allocated to the BMCs according to the host serial number and the IP addresses to be allocated to each BMC in the machine room. The IPMI protocol is an open standard hardware management interface specification, which defines a specific method for communication of an embedded management subsystem. IPMI information is communicated through the BMC. The use of the IPMI protocol has two main advantages: first, this configuration allows out-of-band server management; second, the operating system does not have to be burdened with the task of transferring system state data.
In one example, the IP address to be allocated by the machine room plan "BMC 0018" is: "138.207.22.185", when "BMC 0018" requests to configure an IP address, the configuration server obtains, through the IPMI protocol, the host serial number of the server managed by "BMC 0018" as: "00342-: "138.207.22.185".
A substep 1032 of binding the IP address to be assigned with the MAC address of the server managed by the BMC;
specifically, after determining the IP address to be allocated by the BMC requesting to configure the IP address, the configuration server may bind the IP address with the MAC address of the server managed by the BMC, so as to ensure that the IP address to be allocated is indeed allocated to the server managed by the BMC applying for the IP address.
In one example, the configuration server determines that "BMC 0065" has an IP address of "134.207.31.188" to be allocated, and the physical address of the server managed by the BMC is: "00-25-64-76-BD-40", the server binds "134.207.31.188" and "00-25-64-76-BD-40" together.
And a substep 1033 of rebooting the BMC managed server to configure the IP address of the BMC.
Specifically, after the configuration server binds the IP address to be allocated to the MAC address of the server managed by the BMC, that is, after the IP address to be allocated is substantially allocated to the BMC, the server managed by the BMC is restarted, so that the allocation result is valid.
In a specific implementation, after the configuration server restarts the BMC managed server, it determines that the MAC address of the BMC managed server has a bound IP address, and confirms that the BMC has completed the configuration of the IP address.
According to the first embodiment of the invention, the planning data of the machine room is acquired, and because the real machine room environment is relatively complex, the real planning information of the machine room can be fully displayed by acquiring the planning data of the machine room, so that the IP address configuration conforms to the real situation and is more reasonable. The information of the server which is managed by the baseboard management controller BMC and requested to configure the IP address is obtained, the server which is managed by the BMC and requested to configure the IP address can be accurately positioned, and therefore the accuracy of IP address configuration is improved. And configuring the IP address of the BMC according to the information of the server managed by the BMC and the planning data. In consideration of the related technology, a method of establishing an independent network environment (such as a PXE environment) is mostly adopted to isolate a server requesting for BMC management of configuring an IP address from a network environment of a machine room, and the server requesting for BMC management of configuring the IP address is switched back to the network environment of the machine room after configuration is completed.
A second embodiment of the present invention relates to a method for configuring an IP address, and the following describes implementation details of the method for configuring an IP address in this embodiment in detail, where the following is provided only for facilitating understanding of the implementation details and is not necessary for implementing the present embodiment, and fig. 4 is a schematic diagram of the method for configuring an IP address in the second embodiment, and includes:
step 201, acquiring planning data of a machine room;
step 202, acquiring information of a server which is managed by a baseboard management controller BMC and requests to configure an IP address;
here, steps 201 to 202 have already been described in the first embodiment, and are not described here again.
Step 203, judging whether the server managed by the BMC is a server in a machine room; if yes, executing step 204, otherwise executing step 205;
specifically, the planning data of the computer room acquired by the configuration server may include information of servers in the computer room, and when the configuration server receives a message that the BMC requests to configure the IP address, it may be determined whether the information of the server managed by the BMC matches the information of the servers in the computer room in the planning data of the computer room, if there is information of a matching server, it is determined that the server managed by the BMC is the server in the computer room, and if there is no information of a matching server, it is determined that the server managed by the BMC is not the server in the computer room.
In one example, the planning data of the computer room includes a host serial number of a server in the computer room, and the configuration server may determine whether the server managed by the BMC is a server in the computer room according to the host serial number. Such as: the host serial number of the server managed by the BMC is' 00342-. The host serial number of the other server managed by the BMC is' 00234-.
Step 204, determining an IP address to be allocated to the BMC according to the host serial number and the planning data of the server managed by the BMC;
step 2041 has already been described in the first embodiment, and is not described herein again.
Step 205, rejecting the IP address configuration request of the BMC;
specifically, when the configuration server determines that the server managed by the BMC is not a server in the room, the configuration server may reject the IP address configuration request of the BMC and prohibit the configuration of the IP address to the BMC.
In one example, the configuration server determines that the server managed by "BMC 0110" is not a server in the computer room, rejects the IP address configuration request of "BMC 0110", and exits the configuration flow of the IP address of "BMC 0110".
Step 206, binding the IP address to be distributed with the MAC address of the server managed by the BMC;
and step 207, restarting the server managed by the BMC to configure the IP address of the BMC.
Step 206 to step 207 have already been described in the first embodiment, and are not described herein again.
In a second embodiment of the present invention, determining an IP address to be allocated to the BMC according to the host serial number of the server managed by the BMC and the planning data includes: judging whether the server managed by the BMC is a server in the machine room; and if the server managed by the BMC is the server in the machine room, determining the IP address to be allocated to the BMC according to the server host serial number managed by the BMC and the planning data. The method and the system can judge whether the server of the BMC management requesting for allocating the IP address is the server in the local computer room or not, improve the security of the network environment, and prevent the servers which do not belong to the local computer room from being configured with the IP address, namely prevent illegal servers from entering the local computer room.
A third embodiment of the present invention relates to a method for configuring an IP address, and the following describes implementation details of the method for configuring an IP address in this embodiment in detail, where the following is provided only for facilitating understanding of the implementation details and is not necessary for implementing the present embodiment, and fig. 5 is a schematic diagram of the method for configuring an IP address in the third embodiment, and includes:
301, acquiring planning data of a machine room;
step 302, acquiring information of a server which is managed by a baseboard management controller BMC and requests to configure an IP address;
here, steps 301 to 302 have already been described in the first embodiment, and are not described here again.
Step 303, determining whether the MAC address of the server managed by the BMC is in a blacklist of a Dynamic Host Configuration Protocol (DHCP Protocol for short), if so, executing step 304, otherwise, executing step 305;
specifically, when the configuration server receives a message that the BMC requests to configure an IP address, it may determine whether the MAC address of the server managed by the BMC is in a blacklist of the DHCP protocol, and if the MAC address of the server is recorded in the blacklist of the DHCP protocol, it may determine that the server managed by the BMC is not a server in the machine room; and if the MAC address of the server is not recorded in the blacklist of the DHCP protocol, the server managed by the BMC is judged to be the server in the machine room. The DHCP protocol is generally applied to a large-scale local area network environment, and mainly functions to centrally manage and allocate IP addresses, so that a host in the network environment dynamically obtains information such as IP addresses and gateway addresses, and the utilization rate of the addresses can be improved.
Step 304, rejecting the IP address configuration request of the BMC;
step 304 is already described in the second embodiment, and is not described herein again.
305, determining an IP address to be allocated to the BMC according to a DHCP protocol, a host serial number of a server managed by the BMC and planning data;
specifically, the information of the server requesting BMC management of the configuration IP address acquired by the configuration server includes, but is not limited to: the configuration server can determine the IP address to be allocated to the BMC through a DHCP protocol according to the host serial number and the planning data of the server managed by the BMC. The IP address is configured by using the DHCP protocol, batch configuration can be carried out friendly, and the configuration efficiency is improved.
In a specific implementation, if the planning data of the machine room does not have an IP address to be allocated of a BMC, that is, the IP address to be allocated to the BMC cannot be obtained, the configuration server determines that the server managed by the BMC is not a server in the machine room, but the MAC address of the server is not added to the DHCP protocol blacklist, the DHCP protocol blacklist may be updated, and the MAC address of the server is added to the DHCP protocol blacklist.
Step 306, binding the IP address to be allocated with the MAC of the server managed by the BMC to obtain a bound address;
specifically, after determining the IP address to be allocated by the BMC requesting to configure the IP address, the configuration server may bind the IP address with the MAC address of the server managed by the BMC to obtain the bound address, thereby ensuring that the IP address to be allocated is actually allocated to the server managed by the BMC applying for the IP address.
In one example, the configuration server determines that "BMC 0065" has an IP address of "134.207.31.188" to be allocated, and the physical address of the server managed by the BMC is: "00-25-64-76-BD-40", the configuration server binds "134.207.31.188" and "00-25-64-76-BD-40" together, and obtains the address after binding: "00-25-64-76-BD-40 & 134.207.31.188".
Step 307, writing the bound address into a DHCP protocol, and restarting the DHCP protocol;
specifically, after the configuration server obtains the bound address, the bound address may be written into the DHCP protocol, and the DHCP protocol is restarted, so that the binding result is valid.
In one example, the address obtained by the configuration server after binding is: and the '00-25-64-76-BD-40 & 134.207.31.188', writing the '00-25-64-76-BD-40 & 134.207.31.188' into the DHCP protocol, restarting the DHCP protocol, and enabling the '00-25-64-76-BD-40 & 134.207.31.188' to take effect.
Step 308, restart the BMC managed server to configure the IP address of the BMC.
Step 308 is already described in the first embodiment, and is not described herein again.
In an example, the configuration server includes a background service module and a DHCP management module, and this embodiment may be implemented by the interaction diagram shown in fig. 6:
step 401, the server requesting BMC management of configuring an IP address sends "request to configure IP address information" to the DHCP management module;
step 402, the DHCP management module judges blacklist and binding information;
specifically, the DHCP management module judges whether the MAC address of the server managed by the BMC has a bound IP address or not, and judges whether the MAC address of the server managed by the BMC is in a DHCP protocol blacklist or not;
step 403, the DHCP management module returns the corresponding information to the server managed by the BMC;
specifically, if the MAC address of the server managed by the BMC has a bound IP address, the DHCP management module returns corresponding information to the server managed by the BMC to inform the server of the configured IP address; if the MAC address of the server managed by the BMC is in a DHCP protocol blacklist, the DHCP management module returns corresponding information to the server managed by the BMC, and rejects the IP address configuration request of the server managed by the BMC;
step 404, the DHCP management module returns an IP address to be allocated to the background service module;
specifically, if the server managed by the BMC is not configured with an IP address and the MAC address of the server managed by the BMC is not in the DHCP protocol blacklist, the DHCP management module returns the IP address to be allocated to the background service module;
step 405, the background service module determines the information of the server requesting to configure the BMC management of the IP address through the IPMI protocol;
step 406, the background service module sends information of a server requesting for configuring BMC management of the IP address to the DHCP management module;
step 407, the DHCP management module updates the DHCP protocol blacklist and binding information and restarts the DHCP protocol;
step 408, the DHCP management module sends the binding result to the background service module;
step 409, the background service module restarts the server managed by the BMC through the IPMI protocol.
A third embodiment of the present invention is directed to a method for determining whether a server managed by a BMC is a server in a computer room, including: judging whether the MAC address of the server managed by the BMC is in a blacklist of a dynamic host configuration DHCP protocol; if the server managed by the BMC is the server in the machine room, determining the IP address to be allocated to the BMC according to the server host serial number managed by the BMC and the planning data, wherein the determining comprises: and if the MAC address of the server managed by the BMC is not in the blacklist of the DHCP protocol, determining the IP address to be allocated to the BMC according to the DHCP protocol, the host serial number of the server managed by the BMC and the planning data. The embodiment of the invention uses the DHCP protocol to configure the IP address, can carry out batch configuration friendly, improves the configuration efficiency, and uses the DHCP protocol blacklist to further ensure the security of the network environment of the machine room. The binding the IP address to be allocated and the MAC address of the server managed by the BMC comprises: binding the IP address to be distributed with the MAC address of the server managed by the BMC to obtain a bound address; and writing the bound address into the DHCP protocol, and restarting the DHCP protocol. The successful configuration of the IP address can be ensured, and the security of the network environment is further ensured.
A fourth embodiment of the present invention relates to a method for configuring an IP address, and the following describes implementation details of the method for configuring an IP address in this embodiment in detail, where the following is provided only for facilitating understanding of the implementation details and is not necessary for implementing the present embodiment, and fig. 7 is a schematic diagram of the method for configuring an IP address in the fourth embodiment, and includes:
501, acquiring planning data of a machine room;
step 501 has already been described in the first embodiment, and is not described herein again.
Step 502, detecting whether planning data of a machine room changes; if yes, executing step 503, otherwise returning to step 502 to continue waiting;
in a specific implementation, the configuration server may monitor planning data of the machine room in real time while configuring the IP address, and if it is detected that the planning data of the machine room changes, that is, the IP address configured by the BMC needs to be modified, deleted, and replaced, or a server newly added with BMC management in the machine room needs to configure the IP address; and if the planning data of the machine room is not changed, continuing monitoring the planning data of the machine room.
Step 503, judging whether the information of the server managed by the BMC with the configured IP address changes; if yes, executing step 504, otherwise executing step 505;
in a specific implementation, the configuration server may determine whether information of a server managed by the BMC having configured the IP address changes, and if the information of the server managed by the BMC having configured the IP address changes, the configuration server determines that the IP address configured by the server managed by the BMC having changed may need to be modified, deleted, or replaced; if the information of the server managed by the BMC with the configured IP address is not changed, the configuration server judges that the BMC and the server managed by the BMC are possibly newly added to the machine room.
In one example, the planning data of the computer room includes information of 87 BMC managed servers, and the configuration server detects that the planning information changes as: when the IP address to be allocated of the BMC0053 is changed to 168.207.55.186, information of the server managed by the BMC with the IP address configured is changed.
In another example, the planning data of the computer room includes information of 87 BMC managed servers, and the configuration server detects the change of the planning information as: when the BMC0088 is newly added and the IP address to be allocated is 168.207.55.188', the information of the server managed by the BMC with the configured IP address is not changed.
Step 504, acquiring information of a changed server managed by the BMC;
specifically, the configuration server determines that information of a server managed by the BMC having configured the IP address changes, and can acquire information of the server managed by the BMC having changed information.
In one example, the configuration server detects that the change of the planning information occurs as follows: "the IP address to be allocated of the BMC0053 is replaced with 168.207.55.186", and the server acquires information of the server managed by the BMC 0053.
Step 506, configuring the IP address of the changed BMC according to the changed planning data and the information of the changed BMC managed server;
step 506 has been similarly described in the first embodiment, and is not described herein again.
Step 505, acquiring information of a server newly added to the BMC management of the machine room;
specifically, the configuration server determines that the information of the server managed by the BMC having configured the IP address does not change, and may acquire the information of the server managed by the BMC newly added to the computer room.
In one example, the configuration server detects that the change of the planning information occurs as follows: "newly adding BMC0088, the IP address to be allocated is 168.207.55.188", and the configuration server acquires information of a server managed by BMC 0088.
And 507, configuring the IP address of the BMC newly added into the machine room according to the changed planning data of the machine room and the information of the server managed by the BMC newly added into the machine room.
Step 507 has been described similarly in the first embodiment, and is not described herein again.
In a fourth embodiment of the present invention, after the obtaining planning data of the machine room, the method further includes: if the change of the planning data of the machine room is detected, judging whether the information of the server managed by the BMC with the configured IP address changes; if the information of the server managed by the BMC with the configured IP address changes, acquiring the information of the server managed by the changed BMC; and configuring the IP address of the changed BMC according to the changed planning data and the information of the server managed by the changed BMC, so that the efficiency of modifying, deleting or replacing the IP address of the BMC can be effectively improved. If the information of the server managed by the BMC with the configured IP address is not changed, the method further comprises the following steps: acquiring information of a server newly added to the BMC management of the machine room; and configuring the IP address of the BMC newly added into the machine room according to the information of the server managed by the BMC newly added into the machine room and the changed planning data, so that the efficiency and performance of configuring the IP address can be further improved.
In one example, this embodiment may be implemented by the interaction diagram shown in fig. 8:
601, monitoring planning data of a machine room by a background service module;
step 602, a background service module monitors that planning data of a machine room changes, and sends the changed planning data of the machine room to a DHCP management module;
step 603, the DHCP management module updates a DHCP protocol blacklist and binding information and restarts the DHCP protocol;
step 604, the DHCP management module sends the binding result to the background service module;
step 605, the background service module restarts the BMC managed server through the IPMI protocol.
It should be noted that the present embodiment may also be an improvement on the second embodiment and the third embodiment.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A fifth embodiment of the present invention relates to an electronic apparatus, as shown in fig. 9, including: at least one processor 701; and a memory 702 communicatively coupled to the at least one processor 701; the memory 702 stores instructions executable by the at least one processor 701, and the instructions are executed by the at least one processor 701, so that the at least one processor 701 can execute the IP address configuration method in the above embodiments.
Where the memory and processor are connected by a bus, the bus may comprise any number of interconnected buses and bridges, the buses connecting together one or more of the various circuits of the processor and the memory. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor.
The processor is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory may be used to store data used by the processor in performing operations.
A sixth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program realizes the above-described method embodiments when executed by a processor.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (10)

1. A method for configuring an IP address, comprising:
acquiring planning data of a machine room;
acquiring information of a server which is managed by a Baseboard Management Controller (BMC) requesting to configure an IP address;
and configuring the IP address of the BMC according to the information of the server managed by the BMC and the planning data.
2. The IP address configuration method of claim 1, wherein the information of the BMC-managed server includes a host serial number and a MAC address of the BMC-managed server;
the configuring the IP address of the BMC according to the information of the server managed by the BMC and the planning data includes:
determining an IP address to be allocated to the BMC according to the host serial number of the server managed by the BMC and the planning data;
binding the IP address to be distributed with the MAC address of the server managed by the BMC;
restarting the server managed by the BMC to configure the IP address of the BMC.
3. The method of claim 2, wherein the determining the IP address to be allocated to the BMC according to the host serial number of the server managed by the BMC and the planning data comprises:
judging whether the server managed by the BMC is a server in the machine room;
and if the server managed by the BMC is the server in the machine room, determining the IP address to be allocated to the BMC according to the server host serial number managed by the BMC and the planning data.
4. The IP address configuration method according to claim 3, wherein the determining whether the server managed by the BMC is a server in the computer room includes:
judging whether the MAC address of the server managed by the BMC is in a blacklist of a dynamic host configuration DHCP protocol;
if the server managed by the BMC is the server in the machine room, determining the IP address to be allocated to the BMC according to the server host serial number managed by the BMC and the planning data, wherein the determining comprises:
and if the MAC address of the server managed by the BMC is not in the blacklist of the DHCP protocol, determining the IP address to be allocated to the BMC according to the DHCP protocol, the host serial number of the server managed by the BMC and the planning data.
5. The method for configuring the IP address according to claim 4, wherein the binding the IP address to be allocated and the MAC address of the server managed by the BMC includes:
binding the IP address to be distributed with the MAC address of the server managed by the BMC to obtain a bound address;
and writing the bound address into the DHCP protocol, and restarting the DHCP protocol.
6. The method according to claim 1, wherein the planning data includes user names and passwords of several BMCs in the machine room;
the acquiring information of the server managed by the baseboard management controller BMC requesting to configure the IP address includes:
determining a password matched with the user name of the BMC requesting to configure the IP address in the user names and passwords of the BMCs in the machine room;
and acquiring the information of the server managed by the BMC requesting to configure the IP address according to the user name of the BMC requesting to configure the IP address and the matched password.
7. The IP address configuration method according to claim 1, further comprising, after the obtaining planning data of a computer room:
if the change of the planning data of the machine room is detected, judging whether the information of the server managed by the BMC with the configured IP address changes;
if the information of the server managed by the BMC with the configured IP address changes, acquiring the information of the server managed by the changed BMC;
and configuring the IP address of the changed BMC according to the changed planning data and the information of the changed BMC-managed server.
8. The method of claim 7, wherein if the information of the server managed by the BMC of the configured IP address is not changed, the method further comprises:
acquiring information of a server newly added to the BMC management of the machine room;
and configuring the IP address of the BMC newly added into the machine room according to the information of the server managed by the BMC newly added into the machine room and the changed planning data.
9. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of configuring an IP address of any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the IP address configuration method according to any one of claims 1 to 8.
CN202010961297.3A 2020-09-14 2020-09-14 Method for configuring IP address, electronic device and computer readable storage medium Pending CN112073555A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010961297.3A CN112073555A (en) 2020-09-14 2020-09-14 Method for configuring IP address, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010961297.3A CN112073555A (en) 2020-09-14 2020-09-14 Method for configuring IP address, electronic device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112073555A true CN112073555A (en) 2020-12-11

Family

ID=73695607

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010961297.3A Pending CN112073555A (en) 2020-09-14 2020-09-14 Method for configuring IP address, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112073555A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113805950A (en) * 2021-08-30 2021-12-17 超越科技股份有限公司 Method for managing server by cluster management system
CN113949629A (en) * 2021-10-15 2022-01-18 深圳忆联信息系统有限公司 Server substrate management controller initialization method and device and computer equipment
WO2022148291A1 (en) * 2021-01-08 2022-07-14 苏州浪潮智能科技有限公司 Method and system for configuring bmc ip addresses of bare metal servers, medium and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954504A (en) * 2015-05-05 2015-09-30 浪潮电子信息产业股份有限公司 Method for automatically carrying out BMC management IP configuration
CN109254783A (en) * 2018-09-18 2019-01-22 郑州云海信息技术有限公司 A kind of server system installation method, device, equipment and readable storage medium storing program for executing
US20190044944A1 (en) * 2017-08-02 2019-02-07 American Megatrends, Inc. Secure default user account for embedded systems
CN109413223A (en) * 2018-11-07 2019-03-01 郑州云海信息技术有限公司 Server B MC network interface IP address configuration method, device, equipment and medium
CN109769038A (en) * 2017-11-09 2019-05-17 中兴通讯股份有限公司 A kind of method and device of configuring internet protocol address
CN110879712A (en) * 2019-11-07 2020-03-13 北京浪潮数据技术有限公司 Cloud data center physical host installation method and related device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954504A (en) * 2015-05-05 2015-09-30 浪潮电子信息产业股份有限公司 Method for automatically carrying out BMC management IP configuration
US20190044944A1 (en) * 2017-08-02 2019-02-07 American Megatrends, Inc. Secure default user account for embedded systems
CN109769038A (en) * 2017-11-09 2019-05-17 中兴通讯股份有限公司 A kind of method and device of configuring internet protocol address
CN109254783A (en) * 2018-09-18 2019-01-22 郑州云海信息技术有限公司 A kind of server system installation method, device, equipment and readable storage medium storing program for executing
CN109413223A (en) * 2018-11-07 2019-03-01 郑州云海信息技术有限公司 Server B MC network interface IP address configuration method, device, equipment and medium
CN110879712A (en) * 2019-11-07 2020-03-13 北京浪潮数据技术有限公司 Cloud data center physical host installation method and related device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022148291A1 (en) * 2021-01-08 2022-07-14 苏州浪潮智能科技有限公司 Method and system for configuring bmc ip addresses of bare metal servers, medium and device
CN113805950A (en) * 2021-08-30 2021-12-17 超越科技股份有限公司 Method for managing server by cluster management system
CN113949629A (en) * 2021-10-15 2022-01-18 深圳忆联信息系统有限公司 Server substrate management controller initialization method and device and computer equipment

Similar Documents

Publication Publication Date Title
US20190230004A1 (en) Network slice management method and management unit
US7716373B2 (en) Method, apparatus, and computer product for updating software
CN112073555A (en) Method for configuring IP address, electronic device and computer readable storage medium
CN110086652B (en) Management system and method for service network element in 5G core network
CN109067877B (en) Control method for cloud computing platform deployment, server and storage medium
JP2020530722A (en) PDU type setting method, UE policy setting method, and related entities
US8224941B2 (en) Method, apparatus, and computer product for managing operation
CN110049504B (en) Session management method and device
US20120257603A1 (en) Network Access Point Management
US8387013B2 (en) Method, apparatus, and computer product for managing operation
CN107688434B (en) RAID configuration method and device
KR20080037647A (en) Method and system for managing virtual instances of a physical port attached to a network
WO2018192478A1 (en) Cloud management platform, virtual machine management method, system thereof
WO2017161562A1 (en) Management method and device for application in network function virtualization environment
JP5854138B2 (en) Information processing system, information processing method, and communication device
CN103530193A (en) Method and device used for adjusting application process
WO2016095524A1 (en) Resource allocation method and apparatus
CN109857464B (en) System and method for platform deployment and operation of mobile operating system
EP3358795B1 (en) Method and apparatus for allocating a virtual resource in network functions virtualization (nfv) network
EP3629160A1 (en) Method and device for managing vnf instantiation
CN104253792A (en) Substrate management controller virtual system and method
JP2024501005A (en) Management method and device for container clusters
CN113127144B (en) Processing method, processing device and storage medium
US10637924B2 (en) Cloud metadata discovery API
JP6445715B2 (en) Method and apparatus and system for establishing an interface between VNFMs

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201211

RJ01 Rejection of invention patent application after publication