[go: up one dir, main page]

CN112073555A - IP address configuration method, electronic device and computer-readable storage medium - Google Patents

IP address configuration method, 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
information
server managed
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

IP地址的配置方法、电子设备和计算机可读存储介质IP address configuration method, electronic device and computer-readable storage medium

技术领域technical field

本发明实施例涉及业务支撑领域,特别涉及一种IP地址的配置方法、电子设备和计算机可读存储介质。Embodiments of the present invention relate to the field of service support, and in particular, to a method for configuring an IP address, an electronic device, and a computer-readable storage medium.

背景技术Background technique

当前,人类社会正逐步迈向智能时代,新技术、新业务层出不穷,也导致互联网技术(Internet Technology,简称:IT)设备数量快速增长,各企业的IT基础设施需要不断升级、扩容甚至重构,这给各企业的数据中心带来了巨大的挑战。目前,数据中心普遍采用带外管理,即使用基板管理控制器(Baseboard Manager Controller,简称:BMC)管理机房中的服务器,BMC能够满足单板运维的管理诉求,数据中心只要具备BMC网络,就可以低成本地对服务器硬件系统进行管理和检测。其中,如何进行BMC的网际互连协议(InternetProtocol,简称:IP)地址的配置是一个值得研究的问题。At present, human society is gradually moving towards the era of intelligence. New technologies and new businesses are emerging one after another, which has also led to the rapid growth of the number of Internet Technology (IT) devices. The IT infrastructure of various enterprises needs to be continuously upgraded, expanded and even reconstructed. This has brought enormous challenges to the data centers of various enterprises. At present, out-of-band management is generally adopted in data centers, that is, the Baseboard Manager Controller (BMC) is used to manage the servers in the equipment room. The BMC can meet the management requirements of single-board operation and maintenance. As long as the data center has a BMC network, The server hardware system can be managed and monitored at low cost. Among them, how to configure the Internet Protocol (Internet Protocol, IP for short) address of the BMC is a problem worthy of study.

发明人发现相关技术中至少存在如下问题:相关技术大多采用搭建单独网络的方法,比如预启动执行环境(Preboot eXecution Environment,简称:PXE)系统,对单台服务器进行BMC的IP地址的配置,但要在真实的机房环境中搭建PXE等环境,在配置过程中需要频繁切换环境,浪费大量资源,增加了操作的复杂度,单台服务器配置需要配置人员具有较高的技能,且配置人员会进行大量的重复劳动,降低了BMC的IP地址的配置效率。The inventor found that the related art has at least the following problems: most of the related technologies use the method of building a separate network, such as the Preboot eXecution Environment (PXE) system, to configure the IP address of the BMC for a single server, but To build PXE and other environments in a real computer room environment, the environment needs to be switched frequently during the configuration process, which wastes a lot of resources and increases the complexity of the operation. The configuration of a single server requires the configuration personnel to have high skills, and the configuration personnel will carry out A lot of repetitive work reduces the configuration efficiency of the IP address of the BMC.

发明内容SUMMARY OF THE INVENTION

本发明实施方式的目的在于提供一种IP地址的配置方法、电子设备和计算机可读存储介质,无需构建单独的网络环境,可以大幅降低BMC的IP地址配置的难度,节约资源投入,兼顾配置过程的准确性和配置效率。The purpose of the embodiments of the present invention is to provide an IP address configuration method, an electronic device and a computer-readable storage medium, without the need to build a separate network environment, which can greatly reduce the difficulty of IP address configuration of the BMC, save resource investment, and take into account the configuration process. accuracy and configuration efficiency.

为解决上述技术问题,本发明的实施方式提供了一种IP地址的配置方法,包括以下步骤:获取机房的规划数据;获取请求配置IP地址的基板管理控制器BMC管理的服务器的信息;根据所述BMC管理的服务器的信息和所述规划数据,配置所述BMC的IP地址。In order to solve the above technical problems, the embodiments of the present invention provide a method for configuring an IP address, which includes the following steps: obtaining planning data of a computer room; obtaining information on a server managed by a baseboard management controller BMC that requests IP address configuration; The information of the server managed by the BMC and the planning data are configured, and the IP address of the BMC is configured.

本发明的实施方式还提供了一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述IP地址的配置方法。Embodiments of the present invention also provide an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores data executable by the at least one processor The instruction is executed by the at least one processor, so that the at least one processor can execute the above IP address configuration method.

本发明的实施方式还提供了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现上述IP地址的配置方法。Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above-mentioned IP address configuration method is implemented.

本发明的实施方式,获取机房的规划数据,由于真实的机房环境比较复杂,获取机房的规划数据可以充分展现机房真实的规划信息,使IP地址配置符合真实情况,更加合理。获取请求配置IP地址的基板管理控制器BMC管理的服务器的信息,可以准确定位到请求配置IP地址的BMC管理的服务器,从而提高IP地址配置的准确性。根据所述BMC管理的服务器的信息和所述规划数据,配置所述BMC的IP地址。考虑到相关技术中,大多采用搭建单独网络环境(比如:PXE环境)的方法,以将请求配置IP地址的BMC管理的服务器与机房的网络环境进行隔离,配置完成之后将请求配置IP地址的BMC管理的服务器切换回机房的网络环境,而本发明的实施方式直接根据所述BMC管理的服务器的信息和所述规划数据,配置所述BMC的IP地址,无需构建复杂的网络环境,也就无需进行网络环境的隔离与恢复,即无需频繁地进行网络环境的切换,可以大幅降低BMC的IP地址配置的难度,节约资源投入,兼顾配置过程的准确性和配置效率。In the embodiment of the present invention, the planning data of the computer room is acquired. Since the real computer room environment is relatively complex, acquiring the planning data of the computer room can fully display the real planning information of the computer room, so that the IP address configuration conforms to the real situation and is more reasonable. Obtaining the information of the server managed by the baseboard management controller BMC that requests the configuration of the IP address can accurately locate the server managed by the BMC that requests the configuration of the IP address, thereby improving the accuracy of the IP address configuration. Configure the IP address of the BMC according to the information of the server managed by the BMC and the planning data. Considering related technologies, most of them adopt the method of building a separate network environment (for example: PXE environment) to isolate the server managed by the BMC requesting the configuration of the IP address from the network environment of the computer room. After the configuration is completed, the BMC requesting the configuration of the IP address will be The managed server is switched back to the network environment of the computer room, and the embodiment of the present invention configures the IP address of the BMC directly according to the information of the server managed by the BMC and the planning data, without constructing a complex network environment, and without Isolation and recovery of the network environment means that there is no need to switch the network environment frequently, which can greatly reduce the difficulty of configuring the IP address of the BMC, save resource investment, and take into account the accuracy and efficiency of the configuration process.

另外,所述BMC管理的服务器的信息包括所述BMC管理的服务器的主机序列号和MAC地址;所述根据所述BMC管理的服务器的信息和所述的规划数据,配置所述BMC的IP地址,包括:根据所述BMC管理的服务器的主机序列号和所述规划数据,确定对所述BMC待分配的IP地址,可以有效地提高确定的待分配的IP地址的准确性。将所述待分配的IP地址和所述BMC管理的服务器的MAC地址绑定,保证待分配的IP地址确实分配给了申请该IP地址的BMC管理的服务器。重启所述BMC管理的服务器以配置所述BMC的IP地址,使配置的结果生效,保证机房各功能的正常运行。In addition, the information of the server managed by the BMC includes the host serial number and MAC address of the server managed by the BMC; the IP address of the BMC is configured according to the information of the server managed by the BMC and the planning data , including: 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, which can effectively improve the accuracy of the determined IP address to be allocated. Binding the IP address to be allocated with the MAC address of the server managed by the BMC ensures that the IP address to be allocated is indeed allocated to the server managed by the BMC that applies for the IP address. Restart the server managed by the BMC to configure the IP address of the BMC, so that the configuration result takes effect and ensures the normal operation of the functions of the equipment room.

另外,所述规划数据包括所述机房内的若干条BMC的用户名和密码;所述获取请求配置IP地址的基板管理控制器BMC管理的服务器的信息,包括:在所述机房内的若干条BMC的用户名和密码中,确定与所述请求配置IP地址的基板管理控制器BMC的用户名匹配的密码;根据所述请求配置IP地址的基板管理控制器BMC的用户名和匹配到的密码,获取所述请求配置IP地址的基板管理控制器BMC管理的服务器的信息,可以有效减少IP地址的配置错误,使用用户名和密码还可以提高配置过程的安全性。In addition, the planning data includes the user names and passwords of several BMCs in the computer room; the obtaining information about the servers managed by the baseboard management controller BMC that requests the configuration of the IP address includes: several BMCs in the computer room In the user name and password, determine the password that matches the user name of the baseboard management controller BMC that requests to configure the IP address; according to the user name of the baseboard management controller BMC that requests to configure the IP address and the matched password, obtain all The information about the server managed by the baseboard management controller BMC that requests the configuration of the IP address can effectively reduce the configuration error of the IP address, and the use of the user name and password can also improve the security of the configuration process.

另外,所述根据所述BMC管理的服务器的主机序列号和所述的规划数据,确定对所述BMC待分配的IP地址,包括:判断所述BMC管理的服务器是否为所述机房内的服务器;若所述BMC管理的服务器是所述机房内的服务器,根据所述BMC管理的服务器主机序列号和所述规划数据,确定对所述BMC待分配的IP地址。判断请求分配IP地址的BMC管理的服务器是否为本机房内的服务器,可以提高网络环境的安全性,防止对不属于该机房内的服务器配置IP地址,即防止非法服务器进入机房。In addition, 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 includes: judging whether the server managed by the BMC is a server in the computer room ; If the server managed by the BMC is a server in the computer room, determine the IP address to be allocated to the BMC according to the server host serial number managed by the BMC and the planning data. Judging whether the server managed by the BMC requesting an IP address is a server in the computer room can improve the security of the network environment and prevent IP addresses from being assigned to servers that do not belong to the computer room, that is, preventing illegal servers from entering the computer room.

另外,所述判断所述BMC管理的服务器是否为所述机房内的服务器,包括:判断所述BMC管理的服务器的MAC地址是否在动态主机配置DHCP协议的黑名单中;所述若所述BMC管理的服务器是所述机房内的服务器,根据所述BMC管理的服务器主机序列号和所述规划数据,确定对所述BMC待分配的IP地址,包括:若所述BMC管理的服务器的MAC地址不在所述DHCP协议的黑名单中,根据所述DHCP协议、所述BMC管理的服务器的主机序列号和所述规划数据,确定对所述BMC待分配的IP地址。本发明的实施方式使用DHCP协议配置IP地址,可以友好地进行批量配置,提高配置效率,使用DHCP协议黑名单,可以保证机房网络环境的安全性。In addition, the judging 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 the blacklist of the dynamic host configuration DHCP protocol; The managed server is the server in the computer room, and the IP address to be allocated to the BMC is determined according to the server host serial number managed by the BMC and the planning data, including: if the MAC address of the server managed by the BMC If not in the blacklist of the DHCP protocol, the IP address to be allocated to the BMC is determined according to the DHCP protocol, the host serial number of the server managed by the BMC, and the planning data. The embodiments of the present invention use the DHCP protocol to configure IP addresses, which can be configured in batches amicably, improve configuration efficiency, and use the DHCP protocol blacklist to ensure the security of the computer room network environment.

另外,所述将所述待分配的IP地址和所述BMC管理的服务器的MAC地址绑定,包括:将所述待分配的IP地址和所述BMC管理的服务器的MAC地址绑定,得到绑定后的地址;将所述绑定后的地址写入所述DHCP协议中,并重启所述DHCP协议。可以在保证IP地址成功配置的同时,进一步保证了网络环境的安全性。In addition, the binding the IP address to be allocated with the MAC address of the server managed by the BMC includes: binding the IP address to be allocated and the MAC address of the server managed by the BMC to obtain a binding The fixed address; the bound address is written into the DHCP protocol, and the DHCP protocol is restarted. It can further ensure the security of the network environment while ensuring the successful configuration of the IP address.

另外,在所述获取机房的规划数据之后,还包括:若检测到所述机房的规划数据发生变化,判断已配置IP地址的BMC管理的服务器的信息是否发生变化;若已配置IP地址的BMC管理的服务器的信息发生变化,获取发生变化的BMC管理的服务器的信息;根据变化后的规划数据和所述发生变化的BMC管理的服务器的信息,配置所述发生变化的BMC的IP地址,可以有效提高修改、删除或更换BMC的IP地址的效率。In addition, after the acquisition of the planning data of the computer room, it also includes: if it is detected that the planning data of the computer room changes, judging whether the information of the server managed by the BMC that has been configured with the IP address has changed; The information of the managed server changes, obtain the information of the changed BMC managed server; according to the changed planning data and the changed BMC managed server information, configure the IP address of the changed BMC, you can Effectively improve the efficiency of modifying, deleting or replacing the IP address of the BMC.

另外,若已配置IP地址的BMC管理的服务器的信息未发生变化,所述方法还包括:获取新加入所述机房的BMC管理的服务器的信息;根据所述新加入所述机房的BMC管理的服务器的信息和所述变化后的规划数据,配置所述新加入所述机房的BMC的IP地址,可以进一步提高配置IP地址的效率和性能。In addition, if the information of the server managed by the BMC whose IP address has been configured has not changed, the method further includes: acquiring the information of the server managed by the BMC newly added to the computer room; The information of the server and the changed planning data can be configured with the IP address of the BMC newly added to the equipment room, which can further improve the efficiency and performance of configuring the IP address.

附图说明Description of drawings

一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定。One or more embodiments are exemplified by the pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments.

图1是根据本发明第一实施方式的IP地址的配置方法的流程图;1 is a flowchart of a method for configuring an IP address according to a first embodiment of the present invention;

图2是根据本发明第一实施方式中,获取请求配置IP地址的基板管理控制器BMC管理的服务器的信息的流程图;FIG. 2 is a flowchart of acquiring information of a server managed by a baseboard management controller BMC that requests to configure an IP address according to the first embodiment of the present invention;

图3是根据本发明第一实施方式中,根据BMC管理的服务器的信息和规划数据,配置BMC的IP地址的流程图;3 is a flowchart of configuring the IP address of the BMC according to the information and planning data of the server managed by the BMC according to the first embodiment of the present invention;

图4是根据本发明第二实施方式的IP地址的配置方法的流程图;4 is a flowchart of a method for configuring an IP address according to a second embodiment of the present invention;

图5是根据本发明第三实施方式的IP地址的配置方法的流程图;5 is a flowchart of a configuration method for an IP address according to a third embodiment of the present invention;

图6是根据本发明第三实施方式的实现IP地址的配置方法的交互图;6 is an interaction diagram for implementing a configuration method for an IP address according to a third embodiment of the present invention;

图7是根据本发明第四实施方式的IP地址的配置方法的流程图;7 is a flowchart of a configuration method for an IP address according to a fourth embodiment of the present invention;

图8是根据本发明第四实施方式的实现IP地址的配置方法的交互图;8 is an interaction diagram for implementing a configuration method for an IP address according to a fourth embodiment of the present invention;

图9是根据本发明第五实施方式的电子设备的结构示意图。FIG. 9 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的各实施方式进行详细的阐述。然而,本领域的普通技术人员可以理解,在本发明各实施方式中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本申请所要求保护的技术方案。以下各个实施例的划分是为了描述方便,不应对本发明的具体实现方式构成任何限定,各个实施例在不矛盾的前提下可以相互结合相互引用。In order to make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art will appreciate that, in the various embodiments of the present invention, many technical details are set forth in order for the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present application can be realized. The following divisions of the various embodiments are for the convenience of description, and should not constitute any limitation on the specific implementation of the present invention, and the various embodiments may be combined with each other and referred to each other on the premise of not contradicting each other.

为了方便理解本发明的实施例,首先在此介绍本发明实施例描述中会引入的要素:In order to facilitate the understanding of the embodiments of the present invention, the elements that will be introduced in the description of the embodiments of the present invention are first introduced here:

基板管理控制器(Baseboard Manager Controller,简称:BMC):BMC是脱离X86架构独立运行的服务器管理软件,只要BMC管理的服务器通电,BMC就可以运转起来,对管理的服务器的各个部件(如:CPU、内存、硬盘、风扇和机框等)的温度、电压等进行健康状态监测,当单板部件出现异常时,通过简单网络管理协议(Simple Network Management Protocol,简称:SNMP协议)等及时将异常信息上报给网络管理,使用BMC可以低成本地对服务器硬件系统进行管理和监测。Baseboard Manager Controller (BMC for short): BMC is a server management software that runs independently from the X86 architecture. As long as the server managed by the BMC is powered on, the BMC can run and control the various components of the managed server (such as: CPU , memory, hard disk, fan and chassis, etc.) to monitor the health status of the temperature and voltage, etc. When the board components are abnormal, the abnormal information is timely reported through the Simple Network Management Protocol (Simple Network Management Protocol, referred to as: SNMP protocol). Report to the network management, and use BMC to manage and monitor the server hardware system at low cost.

本发明的第一实施方式涉及一种IP地址的配置方法,应用于电子设备;其中,电子设备可以为终端或服务器,本实施方式以及以下个各个实施方式中电子设备以服务器为例进行说明。需要说明的是,该服务器与机房中用于信息传输、数据存储的实体服务器是不同的服务器,以下为了方便区分,称此服务器为配置服务器。下面对本实施方式的IP地址的配置方法的实现细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实施本方案的必须。The first embodiment of the present invention relates to a method for configuring an IP address, which is applied to an electronic device. The electronic device may be a terminal or a server. In this embodiment and the following embodiments, the electronic device is described by taking a server as an example. It should be noted that this server is a different server from the physical server used for information transmission and data storage in the computer room. In the following, for the convenience of distinction, this server is called a configuration server. The implementation details of the IP address configuration method of the present embodiment will be specifically described below, and the following contents are only provided for the convenience of understanding, and are not necessary for implementing this solution.

本发明的实施方式需要进行IP地址配置的BMC管理的服务器所在的机房可以为:用于进行海量数据处理、存储和网络传输的计算机机房;各电信运营商用于通信业务支持、业务维护的电信机房;用于对智能化建筑进行监测、控制的智能控制机房;用于屏蔽电磁噪声干扰、屏蔽辐射干扰,防止信息泄露的屏蔽机房等,本实施例对机房的大小、位置和功能不做具体限定。The computer room where the server managed by the BMC that needs to perform IP address configuration in the embodiment of the present invention may be: a computer computer room used for massive data processing, storage and network transmission; a telecommunications computer room used by various telecom operators for communication service support and service maintenance ;Intelligent control computer room for monitoring and controlling intelligent buildings; shielding computer room for shielding electromagnetic noise interference, shielding radiation interference, and preventing information leakage, etc. The size, location and function of the computer room are not specifically limited in this embodiment. .

本实施方式的IP地址的配置方法的具体流程可以如图1所示,包括:The specific process of the IP address configuration method of this embodiment may be as shown in FIG. 1 , including:

步骤101,获取机房的规划数据;Step 101, obtaining planning data of the computer room;

具体而言,配置服务器进行IP地址的配置时,可以先获取机房的规划数据,获取机房的规划数据的目的是将BMC管理的服务器预先纳入机房的管理范围内,由于真实的机房环境比较复杂,获取机房的规划数据可以充分展现机房真实的规划情况,使IP地址配置符合真实情况,更加合理。Specifically, when configuring the server to configure the IP address, you can first obtain the planning data of the computer room. The purpose of obtaining the planning data of the computer room is to include the server managed by BMC into the management scope of the computer room in advance. Because the real computer room environment is relatively complex, Obtaining the planning data of the computer room can fully demonstrate the real planning situation of the computer room, and make the IP address configuration conform to the real situation and be more reasonable.

在具体实现中,机房的规划数据包括但不限于:机房中的服务器的主机序列号、机房中各BMC待分配的IP地址,机房中若干条BMC用户名和对应的密码。配置服务器获取的机房的规划数据可以保存在规划数据表中,方便对规划数据的查找和匹配。机房的规划数据可以由本领域的技术人员预先对机房进行规划而获得,也可以使用机器深度学习自动规划获得,本发明的实施方式对此不做具体限定。In specific implementation, the planning data of the computer room includes, but is not limited to: the host serial number of the server in the computer room, the IP addresses to be allocated by each BMC in the computer room, and several BMC user names and corresponding passwords in the computer room. The planning data of the equipment room obtained by the configuration server can be saved in the planning data table, which is convenient for searching and matching the planning data. The planning data of the computer room may be obtained by planning the computer room in advance by those skilled in the art, or may be obtained by automatic planning using machine deep learning, which is not specifically limited in the embodiments of the present invention.

步骤102,获取请求配置IP地址的基板管理控制器BMC管理的服务器的信息;Step 102, obtaining the information of the server managed by the baseboard management controller BMC that requests to configure the IP address;

具体而言,配置服务器接收到BMC请求配置IP地址信息时,可以获取请求配置IP地址的基板管理控制器BMC管理的服务器的信息,进而可以准确定位到请求配置IP地址的BMC管理的服务器,从而提高IP地址配置的准确性。Specifically, when the configuration server receives the information requested by the BMC to configure the IP address, it can obtain the information of the server managed by the baseboard management controller BMC that requests the configuration of the IP address, and then can accurately locate the server managed by the BMC that requests the configuration of the IP address. Improve the accuracy of IP address configuration.

在一个例子中,配置服务器可以根据“请求配置IP地址信息”的来源,获取请求配置IP地址的基板管理控制器BMC管理的服务器的信息。比如:配置服务器接收到“请求配置IP地址信息”,确认此信息是由管理2号服务器的BMC发出的,即“请求配置IP地址信息”的来源是管理2号服务器的BMC,因此获取2号服务器的信息。In one example, the configuration server may obtain the information of the server managed by the baseboard management controller BMC that requests the configuration of the IP address according to the source of the "request to configure the IP address information". For example: the configuration server receives "request to configure IP address information" and confirms that this information is sent by the BMC that manages server No. 2, that is, the source of "request to configure IP address information" is the BMC that manages server No. 2, so obtain No. 2 server server information.

在另一个例子中,机房的规划数据可以包括但不限于机房内的若干条BMC的用户名和密码。获取请求配置IP地址的基板管理控制器BMC管理的服务器的信息,可由如图2所示的各子步骤实现:In another example, the planning data of the computer room may include, but not limited to, user names and passwords of several BMCs in the computer room. Obtaining the information of the server managed by the baseboard management controller BMC that requests to configure the IP address can be achieved by each sub-step as shown in Figure 2:

子步骤1021,在机房内的若干条BMC的用户名和密码中,确定与请求配置IP地址的BMC的用户名匹配的密码;Sub-step 1021, in the user name and password of several BMCs in the computer room, determine the password that matches the user name of the BMC that requests the configuration IP address;

具体而言,配置服务器获取的规划数据中包括但不限于机房内的若干条BMC的用户名和密码,配置服务器可以在机房内的若干条BMC的用户名和密码中,寻找与请求配置IP地址的BMC的用户名相匹配的密码,使用用户名和密码匹配可以有效提高配置过程的安全性。Specifically, the planning data acquired by the configuration server includes, but is not limited to, the user names and passwords of several BMCs in the computer room. The configuration server can search for and request the configuration of the IP address of the BMCs in the user names and passwords of several BMCs in the computer room. The user name and password match the password. Using the user name and password matching can effectively improve the security of the configuration process.

在一个例子中,配置服务器获取的机房的规划数据保存在规划数据表中,其中包括若干条BMC的用户名和密码。比如:规划数据表中记录有“用户名:BMC0001,密码:aajshu”、“用户名:BMC0018,密码:phyosf”、“用户名:BMC0024,密码:ijdgha”等87条BMC的用户名和密码,请求配置IP地址的BMC的用户名为:BMC0018,服务器在87条BMC的用户名和密码中确定与“用户名:BMC0018”匹配的密码为“phyosf”。In one example, the planning data of the equipment room obtained by the configuration server is stored in the planning data table, which includes several BMC user names and passwords. For example, the planning data table records 87 BMC user names and passwords, such as "username: BMC0001, password: aajshu", "username: BMC0018, password: phyosf", "username: BMC0024, password: ijdgha", etc. The user name of the BMC configured with the IP address is: BMC0018. The server determines that the password matching "user name: BMC0018" is "phyosf" from the 87 user names and passwords of the BMC.

在另一个例子中,配置服务器确定请求配置IP地址的BMC的用户名后,多线程循环匹配机房内的若干条BMC的用户名和密码,对于已经匹配成功的BMC的用户名和密码不参与下一次的循环匹配,可以减少循环次数,节省匹配的时间。In another example, after the configuration server determines the user name of the BMC that requests the configuration of the IP address, the multi-threaded loop matches the user names and passwords of several BMCs in the computer room, and the user names and passwords of the BMCs that have been successfully matched do not participate in the next Loop matching can reduce the number of loops and save matching time.

子步骤1022,根据请求配置IP地址的BMC的用户名和匹配的密码,获取请求配置IP地址的BMC管理的服务器的信息;Sub-step 1022, according to the user name of the BMC that requests to configure the IP address and the matching password, obtain the information of the server that the BMC manages of the request to configure the IP address;

具体而言,配置服务器在确定与请求配置IP地址的BMC的用户名相匹配的密码后,可以根据请求配置IP地址的BMC的用户名和匹配的密码,获取请求配置IP地址的BMC管理的服务器的信息。Specifically, after determining the password that matches the username of the BMC that requests to configure the IP address, the configuration server can obtain the password of the server managed by the BMC that requests to configure the IP address according to the username of the BMC that requests to configure the IP address and the matching password. information.

在一个例子中,配置服务器在87条BMC的用户名和密码中确定与“用户名:BMC0018”匹配的密码为“phyosf”,将“phyosf”输入至BMC管理系统的软件中,获取“BMC0018”所管理的服务器的权限,获取“BMC0018”所管理的服务器的信息。In one example, the configuration server determines that the password matching "username: BMC0018" is "phyosf" from the 87 BMC user names and passwords, and enters "phyosf" into the software of the BMC management system to obtain the information of "BMC0018". Permission of the managed server to obtain the information of the server managed by "BMC0018".

步骤103,根据BMC管理的服务器的信息和规划数据,配置BMC的IP地址。Step 103: Configure the IP address of the BMC according to the information and planning data of the server managed by the BMC.

具体而言,配置服务器获取到机房的规划数据和请求配置IP地址的BMC管理的服务器的信息后,可以根据BMC管理的服务器的信息和规划数据,配置BMC的IP地址。Specifically, after the configuration server obtains the planning data of the equipment room and the information of the server managed by the BMC that requests IP address configuration, the configuration server can configure the IP address of the BMC according to the information and planning data of the server managed by the BMC.

在一个例子中,获取请求配置IP地址的BMC管理的服务器的信息包括但不限于:BMC管理的服务器的主机序列号、MAC地址等。根据BMC管理的服务器的信息和规划数据,配置BMC的IP地址可由如图3所示的各子步骤实现:In one example, obtaining the information of the server managed by the BMC that requests to configure the IP address includes, but is not limited to: the host serial number, the MAC address, and the like 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 can be achieved by the sub-steps shown in Figure 3:

子步骤1031,根据BMC管理的服务器的主机序列号和规划数据,确定对BMC待分配的IP地址;Substep 1031, according to the host serial number and planning data of the server managed by the BMC, determine the IP address to be allocated to the BMC;

具体而言,配置服务器获取的请求配置IP地址的BMC管理的服务器的信息包括但不限于:BMC管理的服务器的主机序列号、MAC地址等,配置服务器可以根据BMC管理的服务器的主机序列号和规划数据,确定对BMC待分配的IP地址。Specifically, the information of the BMC-managed server that requests the configuration IP address obtained by the configuration server includes, but is not limited to: the host serial number, MAC address, etc. of the BMC-managed server. The configuration server can Planning data to determine the IP address to be allocated to the BMC.

在具体实现中,机房的规划数据可以包括机房中各BMC待分配的IP地址,配置服务器通过智能平台管理接口协议(Intelligent Platform Management Interface,简称:IPMI协议)等技术,获取到请求配置IP地址的BMC管理的服务器的主机序列号,根据主机序列号和机房中各BMC待分配的IP地址,确定对该BMC待分配的IP地址。IPMI协议是一种开放标准的硬件管理接口规格,定义了嵌入式管理子系统进行通信的特定方法。IPMI信息通过基板管理控制器BMC进行交流。使用IPMI协议具有两个主要优点:首先,此配置允许进行带外服务器管理;其次,操作系统不必负担传输系统状态数据的任务。In a specific implementation, the planning data of the computer room may include the IP addresses to be allocated by the BMCs in the computer room, and the configuration server obtains the IP address requesting to configure the IP address through technologies such as the Intelligent Platform Management Interface (Intelligent Platform Management Interface, IPMI for short) and other technologies. The host serial number of the server managed by the BMC determines the IP address to be assigned to the BMC according to the host serial number and the IP address to be assigned to each BMC in the equipment room. The IPMI protocol is an open-standard hardware management interface specification that defines a specific method for embedded management subsystems to communicate. IPMI information is communicated through the baseboard management controller BMC. Using the IPMI protocol has two main advantages: first, this configuration allows out-of-band server management; second, the operating system is not burdened with the task of transferring system state data.

在一个例子中,机房规划“BMC0018”待分配的IP地址为:“138.207.22.185”,当“BMC0018”请求配置IP地址时,配置服务器通过IPMI协议获取“BMC0018”管理的服务器的主机序列号为:“00342-00342-00342-00342-00342”,根据此主机序列号在机房中各BMC待分配的IP地址中确定待分配的IP地址为:“138.207.22.185”。In an example, the IP address to be allocated for "BMC0018" in the computer room plan is: "138.207.22.185". When "BMC0018" requests to configure an IP address, the configuration server obtains the host serial number of the server managed by "BMC0018" through the IPMI protocol. : "00342-00342-00342-00342-00342", according to the host serial number, the IP address to be allocated is determined as: "138.207.22.185" from the IP addresses to be allocated by each BMC in the equipment room.

子步骤1032,将待分配的IP地址和BMC管理的服务器的MAC地址绑定;Substep 1032, bind the IP address to be allocated with the MAC address of the server managed by the BMC;

具体而言,配置服务器在确定请求配置IP地址的BMC待分配的IP地址后,可以将该IP地址和BMC管理的服务器的MAC地址绑定,保证待分配的IP地址确实分配给了申请该IP地址的BMC管理的服务器。Specifically, after determining the IP address to be allocated by the BMC that requests to configure the IP address, the configuration server can bind the IP address to the MAC address of the server managed by the BMC to ensure that the IP address to be allocated is indeed allocated to the IP address that is applied for. The address of the BMC managed server.

在一个例子中,配置服务器确定“BMC0065”待分配的IP地址为“134.207.31.188”,该BMC管理的服务器的物理地址为:“00-25-64-76-BD-40”,服务器将“134.207.31.188”和“00-25-64-76-BD-40”绑定在一起。In one example, the configuration server determines that the IP address to be allocated for "BMC0065" is "134.207.31.188", the physical address of the server managed by the BMC is: "00-25-64-76-BD-40", the server will " 134.207.31.188" and "00-25-64-76-BD-40" are bound together.

子步骤1033,重启BMC管理的服务器以配置BMC的IP地址。Sub-step 1033, restart the server managed by the BMC to configure the IP address of the BMC.

具体而言,配置服务器将待分配的IP地址和BMC管理的服务器的MAC地址绑定后,也就是将待分配的IP地址实质分配给BMC后,重启该BMC管理的服务器,使分配结果生效。Specifically, after the configuration server binds the IP address to be allocated with the MAC address of the server managed by the BMC, that is, after substantially allocating the IP address to be allocated to the BMC, restart the server managed by the BMC to make the allocation result effective.

在具体实现中,配置服务器重启该BMC管理的服务器后,确定该BMC管理的服务器的MAC地址已有绑定的IP地址,确认该BMC已完成IP地址的配置。In a specific implementation, after the configuration server restarts the server managed by the BMC, it is determined that the MAC address of the server managed by the BMC has an IP address bound to it, and it is confirmed that the configuration of the IP address has been completed by the BMC.

本发明的第一实施方式,获取机房的规划数据,由于真实的机房环境比较复杂,获取机房的规划数据可以充分展现机房真实的规划信息,使IP地址配置符合真实情况,更加合理。获取请求配置IP地址的基板管理控制器BMC管理的服务器的信息,可以准确定位到请求配置IP地址的BMC管理的服务器,从而提高IP地址配置的准确性。根据所述BMC管理的服务器的信息和所述规划数据,配置所述BMC的IP地址。考虑到相关技术中,大多采用搭建单独网络环境(比如:PXE环境)的方法,以将请求配置IP地址的BMC管理的服务器与机房的网络环境进行隔离,配置完成之后将请求配置IP地址的BMC管理的服务器切换回机房的网络环境,而本发明的实施方式直接根据所述BMC管理的服务器的信息和所述规划数据,配置所述BMC的IP地址,无需构建复杂的网络环境,也就无需进行网络环境的隔离与恢复,即无需频繁地进行网络环境切换,可以大幅降低BMC的IP地址配置的难度,节约资源投入,兼顾配置过程的准确性和配置效率。In the first embodiment of the present invention, the planning data of the computer room is acquired. Since the real computer room environment is relatively complex, acquiring the planning data of the computer room can fully display the real planning information of the computer room, so that the IP address configuration conforms to the real situation and is more reasonable. Obtaining the information of the server managed by the baseboard management controller BMC that requests the configuration of the IP address can accurately locate the server managed by the BMC that requests the configuration of the IP address, thereby improving the accuracy of the IP address configuration. Configure the IP address of the BMC according to the information of the server managed by the BMC and the planning data. Considering related technologies, most of them adopt the method of building a separate network environment (for example: PXE environment) to isolate the server managed by the BMC requesting the configuration of the IP address from the network environment of the computer room. After the configuration is completed, the BMC requesting the configuration of the IP address will be The managed server is switched back to the network environment of the computer room, and the embodiment of the present invention configures the IP address of the BMC directly according to the information of the server managed by the BMC and the planning data, without constructing a complex network environment, and without Isolation and recovery of the network environment, that is, without frequent network environment switching, can greatly reduce the difficulty of IP address configuration of the BMC, save resource investment, and take into account the accuracy and efficiency of the configuration process.

本发明的第二实施方式涉及一种一种IP地址的配置方法,下面对本实施方式的IP地址的配置方法的实现细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实施本方案的必须,图4是第二实施方式所述的IP地址的配置方法的示意图,包括:The second embodiment of the present invention relates to a method for configuring an IP address. The implementation details of the method for configuring an IP address in this embodiment are described below in detail. The following contents are only provided for the convenience of understanding, and do not implement the present invention. It is necessary for the solution, and FIG. 4 is a schematic diagram of the configuration method of the IP address described in the second embodiment, including:

步骤201,获取机房的规划数据;Step 201, acquiring planning data of the computer room;

步骤202,获取请求配置IP地址的基板管理控制器BMC管理的服务器的信息;Step 202, obtaining the information of the server managed by the baseboard management controller BMC that requests to configure the IP address;

其中,步骤201至步骤202在第一实施方式中已有说明,此处不再赘述。Among them, steps 201 to 202 have been described in the first embodiment, and are not repeated here.

步骤203,判断BMC管理的服务器是否为机房内的服务器;如果是,则执行步骤204,否则执行步骤205;Step 203, determine whether the server managed by the BMC is a server in the computer room; if so, go to step 204, otherwise go to step 205;

具体而言,配置服务器获取的机房的规划数据可以包括机房内的服务器的信息,当配置服务器接收到BMC请求配置IP地址的消息时,可以判断该BMC管理的服务器的信息是否与机房的规划数据中机房内的服务器的信息相匹配,若有匹配的服务器的信息,则判定该BMC管理的服务器是机房内的服务器,若没有匹配的服务器的信息,则判定该BMC管理的服务器不是机房内的服务器。Specifically, the planning data of the computer room obtained by the configuration server may include information about the servers in the computer room. When the configuration server receives a message that the BMC requests to configure an IP address, it can determine whether the information of the server managed by the BMC is consistent with the planning data of the computer room. The information of the server in the computer room matches. If there is matching server information, it is determined that the server managed by the BMC is a server in the computer room. If there is no matching server information, it is determined that the server managed by the BMC is not in the computer room. server.

在一个例子中,机房的规划数据包括机房中的服务器的主机序列号,配置服务器可以根据主机序列号判断该BMC管理的服务器是否为机房内的服务器。比如:某BMC管理的服务器的主机序列号为“00342-00342-00342-00342-00342”,机房的规划数据中记载了“00342-00342-00342-00342-00342”,则配置服务器判定此BMC管理的服务器是机房内的服务器。另一个BMC管理的服务器的主机序列号为“00234-00654-0785-00342-00556”,机房的规划数据中没有记载“00234-00654-0785-00342-00556”,则配置服务器判定此BMC管理的服务器不是机房内的服务器。In one example, the planning data of the computer room includes the host serial number of the server in the computer room, and the configuration server can determine whether the server managed by the BMC is a server in the computer room according to the host serial number. For example, the host serial number of a server managed by a BMC is "00342-00342-00342-00342-00342", and the planning data of the computer room records "00342-00342-00342-00342-00342", then the configuration server determines that this BMC manages The server is the server in the computer room. The host serial number of another server managed by BMC is "00234-00654-0785-00342-00556", and "00234-00654-0785-00342-00556" is not recorded in the planning data of the computer room. A server is not a server in a computer room.

步骤204,根据BMC管理的服务器的主机序列号和规划数据,确定对BMC待分配的IP地址;Step 204, determine the IP address to be allocated to the BMC according to the host serial number and planning data of the server managed by the BMC;

其中,步骤2041在第一实施方式中已有说明,此处不再赘述。The step 2041 has been described in the first embodiment, and will not be repeated here.

步骤205,驳回此BMC的IP地址配置请求;Step 205, rejecting the IP address configuration request of this BMC;

具体而言,当配置服务器判定BMC管理的服务器不是机房内的服务器时,可以驳回此BMC的IP地址配置请求,禁止对该BMC配置IP地址。Specifically, when the configuration server determines that the server managed by the BMC is not a server in the computer room, it can reject the IP address configuration request of the BMC, and prohibit the configuration of the IP address to the BMC.

在一个例子中,配置服务器判定“BMC0110”管理的服务器不是机房内的服务器,驳回“BMC0110”的IP地址配置请求,退出“BMC0110”的IP地址的配置流程。In one example, the configuration server determines that the server managed by "BMC0110" is not a server in the computer room, rejects the IP address configuration request of "BMC0110", and exits the IP address configuration process of "BMC0110".

步骤206,将待分配的IP地址和BMC管理的服务器的MAC地址绑定;Step 206, binding the IP address to be allocated with the MAC address of the server managed by the BMC;

步骤207,重启BMC管理的服务器以配置BMC的IP地址。Step 207: Restart the server managed by the BMC to configure the IP address of the BMC.

其中,步骤206至步骤207在第一实施方式中已有说明,此处不再赘述。Among them, steps 206 to 207 have been described in the first embodiment, and are not repeated here.

本发明的第二实施方式,根据所述BMC管理的服务器的主机序列号和所述的规划数据,确定对所述BMC待分配的IP地址,包括:判断所述BMC管理的服务器是否为所述机房内的服务器;若所述BMC管理的服务器是所述机房内的服务器,根据所述BMC管理的服务器主机序列号和所述规划数据,确定对所述BMC待分配的IP地址。判断请求分配IP地址的BMC管理的服务器是否为本机房内的服务器,可以提高网络环境的安全性,防止对不属于该机房内的服务器配置IP地址,即防止非法服务器进入机房。In the second embodiment of the present invention, according to the host serial number of the server managed by the BMC and the planning data, determining the IP address to be allocated to the BMC includes: judging whether the server managed by the BMC is the The server in the computer room; if the server managed by the BMC is the server in the computer room, the IP address to be allocated to the BMC is determined according to the server host serial number managed by the BMC and the planning data. Judging whether the server managed by the BMC requesting an IP address is a server in the computer room can improve the security of the network environment and prevent IP addresses from being assigned to servers that do not belong to the computer room, that is, preventing illegal servers from entering the computer room.

本发明的第三实施方式涉及一种IP地址的配置方法,下面对本实施方式的IP地址的配置方法的实现细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实施本方案的必须,图5是第三实施方式所述的IP地址的配置方法的示意图,包括:The third embodiment of the present invention relates to a method for configuring an IP address. The implementation details of the method for configuring an IP address in this embodiment are described in detail below. The following contents are only provided for the convenience of understanding, and are not intended to implement this solution. Must, Fig. 5 is the schematic diagram of the configuration method of the IP address described in the third embodiment, including:

步骤301,获取机房的规划数据;Step 301, obtaining planning data of the computer room;

步骤302,获取请求配置IP地址的基板管理控制器BMC管理的服务器的信息;Step 302, obtaining the information of the server managed by the baseboard management controller BMC that requests to configure the IP address;

其中,步骤301至步骤302在第一实施方式中已有说明,此处不再赘述。Among them, steps 301 to 302 have been described in the first embodiment, and are not repeated here.

步骤303,判断BMC管理的服务器的MAC地址是否在动态主机配置协议(DynamicHost Configuration Protocol,简称:DHCP协议)的黑名单中,如果是,则执行步骤304,否则执行步骤305;Step 303, judging whether the MAC address of the server managed by the BMC is in the blacklist of the Dynamic Host Configuration Protocol (DynamicHost Configuration Protocol, referred to as: DHCP protocol), if yes, then go to step 304, otherwise go to step 305;

具体而言,当配置服务器接收到BMC请求配置IP地址的消息时,可以判断该BMC管理的服务器的MAC地址是否在DHCP协议的黑名单中,若DHCP协议的黑名单中记录了该服务器的MAC地址,则判定该BMC管理的服务器不是机房内的服务器;若DHCP协议的黑名单中没有记录该服务器的MAC地址,则判定该BMC管理的服务器是机房内的服务器。其中,DHCP协议通常被应用在大型的局域网络环境中,主要作用是集中的管理、分配IP地址,使网络环境中的主机动态的获得IP地址、网关地址等信息,并能够提升地址的使用率。Specifically, when the configuration server receives a message that the BMC requests to configure an IP address, it can determine whether the MAC address of the server managed by the BMC is in the blacklist of the DHCP protocol. If the blacklist of the DHCP protocol records the MAC address of the server address, it is determined that the server managed by the BMC is not a server in the computer room; if the MAC address of the server is not recorded in the blacklist of the DHCP protocol, it is determined that the server managed by the BMC is a server in the computer room. Among them, DHCP protocol is usually used in large-scale local area network environment. Its main function is to centrally manage and assign IP addresses, so that hosts in the network environment can dynamically obtain IP addresses, gateway addresses and other information, and can improve the utilization rate of addresses. .

步骤304,驳回此BMC的IP地址配置请求;Step 304, rejecting the IP address configuration request of this BMC;

其中,步骤304在第二实施方式中已有说明,此处不再赘述。The step 304 has been described in the second embodiment, and will not be repeated here.

步骤305,根据DHCP协议、BMC管理的服务器的主机序列号和规划数据,确定对BMC待分配的IP地址;Step 305, according to the DHCP protocol, the host serial number and planning data of the server managed by the BMC, determine the IP address to be allocated to the BMC;

具体而言,配置服务器获取的请求配置IP地址的BMC管理的服务器的信息包括但不限于:BMC管理的服务器的主机序列号、MAC地址等,配置服务器可以根据BMC管理的服务器的主机序列号和规划数据,通过DHCP协议,确定对BMC待分配的IP地址。使用DHCP协议配置IP地址,可以友好地进行批量配置,提高配置效率。Specifically, the information of the BMC-managed server that requests the configuration IP address obtained by the configuration server includes, but is not limited to: the host serial number, MAC address, etc. of the BMC-managed server. The configuration server can Planning data, through the DHCP protocol, determine the IP address to be allocated to the BMC. Use the DHCP protocol to configure IP addresses, which can be configured in batches in a friendly manner and improve configuration efficiency.

在具体实现中,如果机房的规划数据中没有某BMC的待分配的IP地址,即无法获取对该BMC待分配的IP地址,配置服务器判定此BMC管理的服务器不是机房内的服务器,但该服务器的MAC地址未加入到DHCP协议黑名单中,可以更新DHCP协议黑名单,将该服务器的MAC地址加入到DHCP协议黑名单中。In the specific implementation, if there is no IP address to be allocated for a certain BMC in the planning data of the computer room, that is, the IP address to be allocated to the BMC cannot be obtained, and the configuration server determines that the server managed by this BMC is not a server in the computer room, but the server The MAC address of the server is not added to the DHCP protocol blacklist, you can update the DHCP protocol blacklist and add the server's MAC address to the DHCP protocol blacklist.

步骤306,将待分配的IP地址和BMC管理的服务器的MAC绑定,得到绑定后的地址;Step 306, bind the IP address to be allocated with the MAC of the server managed by the BMC to obtain the bound address;

具体而言,配置服务器在确定请求配置IP地址的BMC待分配的IP地址后,可以将该IP地址和BMC管理的服务器的MAC地址绑定,得到绑定后的地址,保证待分配的IP地址确实分配给了申请该IP地址的BMC管理的服务器。Specifically, after determining the IP address to be allocated by the BMC that requests to configure the IP address, the configuration server can bind the IP address with the MAC address of the server managed by the BMC to obtain the bound address to ensure the IP address to be allocated. It is indeed assigned to the BMC-managed server that requested the IP address.

在一个例子中,配置服务器确定“BMC0065”待分配的IP地址为“134.207.31.188”,该BMC管理的服务器的物理地址为:“00-25-64-76-BD-40”,配置服务器将“134.207.31.188”和“00-25-64-76-BD-40”绑定在一起,得到绑定后的地址:“00-25-64-76-BD-40&134.207.31.188”。In one example, the configuration server determines that the IP address to be allocated for "BMC0065" is "134.207.31.188", the physical address of the server managed by the BMC is: "00-25-64-76-BD-40", the configuration server will "134.207.31.188" and "00-25-64-76-BD-40" are bound together to get the bound address: "00-25-64-76-BD-40&134.207.31.188".

步骤307,将绑定后的地址写入DHCP协议,重启DHCP协议;Step 307, write the bound address into the DHCP protocol, and restart the DHCP protocol;

具体而言,配置服务器获取绑定后的地址后,可以将绑定后的地址写入到DHCP协议中,并重启DHCP协议,使绑定结果生效。Specifically, after obtaining the bound address, the configuration server can write the bound address into the DHCP protocol, and restart the DHCP protocol to make the binding result take effect.

在一个例子中,配置服务器获得绑定后的地址为:“00-25-64-76-BD-40&134.207.31.188”,将“00-25-64-76-BD-40&134.207.31.188”写入DHCP协议中,重启DHCP协议,使“00-25-64-76-BD-40&134.207.31.188”分配结果生效。In an example, the address after the configuration server obtains the binding is: "00-25-64-76-BD-40&134.207.31.188", and "00-25-64-76-BD-40&134.207.31.188" "Write into the DHCP protocol, restart the DHCP protocol, and make the assignment result of "00-25-64-76-BD-40&134.207.31.188" take effect.

步骤308,重启BMC管理的服务器以配置BMC的IP地址。Step 308: Restart the server managed by the BMC to configure the IP address of the BMC.

其中,步骤308在第一实施方式中已有说明,此处不再赘述。The step 308 has been described in the first embodiment, and will not be repeated here.

在一个例子中,配置服务器包括后台服务模块和DHCP管理模块,本实施例中可以由图6所示的交互图实现:In an example, the configuration server includes a background service module and a DHCP management module, which can be implemented by the interaction diagram shown in FIG. 6 in this embodiment:

步骤401,请求配置IP地址的BMC管理的服务器向DHCP管理模块发送“请求配置IP地址信息”;Step 401, the server managed by the BMC requesting to configure the IP address sends "request to configure IP address information" to the DHCP management module;

步骤402,DHCP管理模块进行黑名单、绑定信息判断;Step 402, the DHCP management module determines the blacklist and binding information;

具体而言,DHCP管理模块判断此BMC管理的服务器的MAC地址是否已有绑定的IP地址,并判断此BMC管理的服务器的MAC地址是否在DHCP协议黑名单中;Specifically, the DHCP management module determines whether the MAC address of the server managed by the BMC has a bound IP address, and determines whether the MAC address of the server managed by the BMC is in the DHCP protocol blacklist;

步骤403,DHCP管理模块将相应信息返回给此BMC管理的服务器;Step 403, the DHCP management module returns the corresponding information to the server managed by the BMC;

具体而言,若该BMC管理的服务器的MAC地址已有绑定的IP地址,DHCP管理模块返回相应信息给该BMC管理的服务器,告知服务器已配置IP地址;若该BMC管理的服务器的MAC地址在DHCP协议黑名单中,DHCP管理模块返回相应信息给该BMC管理的服务器,驳回该BMC管理的服务器的IP地址配置请求;Specifically, if the MAC address of the server managed by the BMC has an IP address bound to it, the DHCP management module returns corresponding information to the server managed by the BMC, informing the server that the IP address has been configured; if the MAC address of the server managed by the BMC In the 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;

步骤404,DHCP管理模块向后台服务模块返回待分配的IP地址;Step 404, the DHCP management module returns the IP address to be allocated to the background service module;

具体而言,若该BMC管理的服务器未配置IP地址,且该BMC管理的服务器的MAC地址不在DHCP协议黑名单中,DHCP管理模块向后台服务模块返回待分配的IP地址;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;

步骤405,后台服务模块通过IPMI协议,确定请求配置IP地址的BMC管理的服务器的信息;Step 405, the background service module determines the information of the server managed by the BMC that requests the configuration IP address through the IPMI protocol;

步骤406,后台服务模块发送请求配置IP地址的BMC管理的服务器的信息,给DHCP管理模块;Step 406, the background service module sends the information of the server managed by the BMC requesting the configuration IP address to the DHCP management module;

步骤407,DHCP管理模块更新DHCP协议黑名单和绑定信息,并重启DHCP协议;Step 407, the DHCP management module updates the DHCP protocol blacklist and binding information, and restarts the DHCP protocol;

步骤408,DHCP管理模块将绑定结果发送给后台服务模块;Step 408, the DHCP management module sends the binding result to the background service module;

步骤409,后台服务模块通过IPMI协议重启该BMC管理的服务器。Step 409, the background service module restarts the server managed by the BMC through the IPMI protocol.

本发明的第三实施方式,判断所述BMC管理的服务器是否为所述机房内的服务器,包括:判断所述BMC管理的服务器的MAC地址是否在动态主机配置DHCP协议的黑名单中;所述若所述BMC管理的服务器是所述机房内的服务器,根据所述BMC管理的服务器主机序列号和所述规划数据,确定对所述BMC待分配的IP地址,包括:若所述BMC管理的服务器的MAC地址不在所述DHCP协议的黑名单中,根据所述DHCP协议、所述BMC管理的服务器的主机序列号和所述规划数据,确定对所述BMC待分配的IP地址。本发明的实施方式使用DHCP协议配置IP地址,可以友好地进行批量配置,提高配置效率,使用DHCP协议黑名单,可以进一步保证机房网络环境的安全性。所述将所述待分配的IP地址和所述BMC管理的服务器的MAC地址绑定,包括:将所述待分配的IP地址和所述BMC管理的服务器的MAC地址绑定,得到绑定后的地址;将所述绑定后的地址写入所述DHCP协议中,并重启所述DHCP协议。可以保证IP地址成功配置,同时进一步保证了网络环境的安全性。In the third embodiment of the present invention, judging 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 the blacklist of the dynamic host configuration DHCP protocol; the If the server managed by the BMC is a server in the computer room, determine 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, including: if the server managed by the BMC The MAC address of the server is not in the blacklist of the DHCP protocol, and the IP address to be allocated to the BMC is determined according to the DHCP protocol, the host serial number of the server managed by the BMC, and the planning data. The embodiments of the present invention use the DHCP protocol to configure IP addresses, which can be configured in batches in a friendly manner, improve configuration efficiency, and use the DHCP protocol blacklist to further ensure the security of the computer room network environment. Binding the IP address to be allocated with the MAC address of the server managed by the BMC includes: binding the IP address to be allocated and the MAC address of the server managed by the BMC, and after obtaining the binding address; write the bound address into the DHCP protocol, and restart the DHCP protocol. It can ensure the successful configuration of the IP address and further ensure the security of the network environment.

本发明的第四实施方式涉及一种IP地址的配置方法,下面对本实施方式的IP地址的配置方法的实现细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实施本方案的必须,图7是第四实施方式所述的IP地址的配置方法的示意图,包括:The fourth embodiment of the present invention relates to a method for configuring an IP address. The implementation details of the method for configuring an IP address in this embodiment are described in detail below. The following contents are only provided for the convenience of understanding, and are not intended to implement this solution. Must, Fig. 7 is the schematic diagram of the configuration method of the IP address described in the fourth embodiment, including:

步骤501,获取机房的规划数据;Step 501, obtaining planning data of the computer room;

其中,步骤501在第一实施方式中已有说明,此处不再赘述。The step 501 has been described in the first embodiment, and will not be repeated here.

步骤502,检测机房的规划数据是否发生变化;如果是,则执行步骤503,否则返回步骤502继续等待;Step 502, check whether the planning data of the computer room has changed; if so, execute step 503, otherwise return to step 502 to continue to wait;

在具体实现中,配置服务器在配置IP地址的同时,可以实时监听机房的规划数据,若检测到机房的规划数据发生变化,也就是说需要对BMC配置的IP地址进行修改、删除、更换,或者机房中新增了BMC管理的服务器,需要进行IP地址的配置;若检测机房的规划数据没有发生变化,则继续监听机房的规划数据。In the specific implementation, the configuration server can monitor the planning data of the computer room in real time while configuring the IP address. If it detects that the planning data of the computer room changes, that is to say, the IP address configured by the BMC needs to be modified, deleted, replaced, or A new server managed by BMC is added to the computer room, and the IP address needs to be configured; if the planning data of the computer room has not changed, continue to monitor the planning data of the computer room.

步骤503,判断已配置IP地址的BMC管理的服务器的信息是否发生变化;如果是,则执行步骤504,否则执行步骤505;Step 503, judge whether the information of the server managed by the BMC of the configured IP address has changed; if so, go to step 504, otherwise go to step 505;

在具体实现中,配置服务器可以判断已配置IP地址的BMC管理的服务器的信息是否发生变化,如果发生变化,配置服务器判定可能需要对发生变化的BMC管理的服务器配置的IP地址进行修改、删除或更换;如果已配置IP地址的BMC管理的服务器的信息没有发生变化,配置服务器判定机房可能新加入了BMC及其管理的服务器。In a specific implementation, the configuration server can determine whether the information of the server managed by the BMC whose IP address has been configured has changed. Replace; if the information of the server managed by the BMC with the configured IP address does not change, the configuration server determines that the BMC and the servers it manages may be newly added to the computer room.

在一个例子中,机房的规划数据包括87条BMC管理的服务器的信息,配置服务器检测规划信息发生的变化为:“BMC0053的待分配IP地址更换为168.207.55.186”,则已配置IP地址的BMC管理的服务器的信息发生变化。In one example, the planning data of the computer room includes 87 pieces of information about servers managed by the BMC. The configuration server detects that the change in the planning information is: "The IP address to be allocated of BMC0053 is changed to 168.207.55.186", then the BMC with the IP address already configured The information of the managed server has changed.

在另一个例子中,机房的规划数据包括87条BMC管理的服务器的信息,配置服务器检测规划信息发生的变化为:“新增BMC0088,待分配IP地址为168.207.55.188”,则已配置IP地址的BMC管理的服务器的信息未发生变化。In another example, the planning data of the computer room includes 87 pieces of information about servers managed by BMC, and the configuration server detects the change in the planning information as: "Add BMC0088, and the IP address to be allocated is 168.207.55.188", then the IP address has been configured The information of the server managed by BMC has not changed.

步骤504,获取发生变化的BMC管理的服务器的信息;Step 504, obtain the information of the server managed by the BMC that has changed;

具体而言,配置服务器判断已配置IP地址的BMC管理的服务器的信息发生变化,可以获取发生变化的BMC管理的服务器的信息。Specifically, the configuration server determines that the information of the server managed by the BMC to which the IP address has been configured has changed, and can obtain the information of the server managed by the BMC that has changed.

在一个例子中,配置服务器检测规划信息发生的变化为:“BMC0053的待分配IP地址更换为168.207.55.186”,服务器获取BMC0053管理的服务器的信息。In one example, the configuration server detects that the change in planning information is: "The to-be-allocated IP address of BMC0053 is changed to 168.207.55.186", and the server obtains the information of the server managed by BMC0053.

步骤506,根据变化后的规划数据和发生变化的BMC管理的服务器的信息,配置发生变化的BMC的IP地址;Step 506, configure the IP address of the changed BMC according to the changed planning data and the information of the server managed by the changed BMC;

其中,步骤506在第一实施方式中已有类似说明,此处不再赘述。The step 506 has been similarly described in the first embodiment, and will not be repeated here.

步骤505,获取新加入机房的BMC管理的服务器的信息;Step 505, obtaining the information of the server managed by the BMC newly added to the computer room;

具体而言,配置服务器判断已配置IP地址的BMC管理的服务器的信息没有发生变化,可以获取新加入机房的BMC管理的服务器的信息。Specifically, the configuration server determines that the information of the server managed by the BMC whose IP address has been configured has not changed, and can obtain the information of the server managed by the BMC newly added to the equipment room.

在一个例子中,配置服务器检测规划信息发生的变化为:“新增BMC0088,待分配IP地址为168.207.55.188”,配置服务器获取BMC0088管理的服务器的信息。In one example, the configuration server detects changes in planning information as follows: "Add BMC0088, and the IP address to be allocated is 168.207.55.188", and the configuration server obtains information about servers managed by BMC0088.

步骤507,根据变化后的机房的规划数据和新加入机房的BMC管理的服务器的信息,配置新加入机房的BMC的IP地址。Step 507: Configure the IP address of the BMC newly added to the computer room according to the changed planning data of the computer room and the information of the server managed by the BMC newly added to the computer room.

其中,步骤507在第一实施方式中已有类似说明,此处不再赘述。Wherein, step 507 has been similarly described in the first embodiment, and will not be repeated here.

本发明的第四实施方式,在所述获取机房的规划数据之后,还包括:若检测到所述机房的规划数据发生变化,判断已配置IP地址的BMC管理的服务器的信息是否发生变化;若已配置IP地址的BMC管理的服务器的信息发生变化,获取发生变化的BMC管理的服务器的信息;根据变化后的规划数据和所述发生变化的BMC管理的服务器的信息,配置所述发生变化的BMC的IP地址,可以有效提高修改、删除或更换BMC的IP地址的效率。若已配置IP地址的BMC管理的服务器的信息未发生变化,所述方法还包括:获取新加入所述机房的BMC管理的服务器的信息;根据所述新加入所述机房的BMC管理的服务器的信息和所述变化后的规划数据,配置所述新加入所述机房的BMC的IP地址,可以进一步提高了配置IP地址的效率和性能。The fourth embodiment of the present invention, after acquiring the planning data of the computer room, further includes: if it is detected that the planning data of the computer room changes, judging whether the information of the server managed by the BMC with the configured IP address changes; The information of the server managed by the BMC that has been configured with the IP address changes, and the information of the server managed by the BMC that has changed is obtained; according to the changed planning data and the information of the server managed by the BMC that has changed, the The IP address of the BMC can effectively improve the efficiency of modifying, deleting or replacing the IP address of the BMC. If the information of the server managed by the BMC whose IP address has been configured has not changed, the method further includes: acquiring the information of the server managed by the BMC newly added to the computer room; Information and the changed planning data, configuring the IP address of the BMC newly added to the equipment room can further improve the efficiency and performance of configuring the IP address.

在一个例子中,本实施例可以由图8所示的交互图实现:In one example, this embodiment can be implemented by the interaction diagram shown in FIG. 8 :

步骤601,后台服务模块监听机房的规划数据;Step 601, the background service module monitors the planning data of the computer room;

步骤602,后台服务模块监听到机房的规划数据发生变化,发送变化的机房的规划数据给DHCP管理模块;Step 602, the background service module detects that the planning data of the computer room changes, and sends the changed planning data of the computer room to the DHCP management module;

步骤603,DHCP管理模块更新DHCP协议黑名单和绑定信息,并重启DHCP协议;Step 603, the DHCP management module updates the DHCP protocol blacklist and binding information, and restarts the DHCP protocol;

步骤604,DHCP管理模块将绑定结果发送给后台服务模块;Step 604, the DHCP management module sends the binding result to the background service module;

步骤605,后台服务模块通过IPMI协议重启BMC管理的服务器。Step 605, the background service module restarts the server managed by the BMC through the IPMI protocol.

需要说明的是,本实施例也可以是在第二实施例、第三实施例基础上的改进。It should be noted that, this embodiment may also be an improvement on the basis of the second embodiment and the third embodiment.

上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。The steps of the above various methods are divided only for the purpose of describing clearly. During implementation, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as the same logical relationship is included, they are all within the protection scope of this patent. ;Adding insignificant modifications to the algorithm or process or introducing insignificant designs, but not changing the core design of the algorithm and process are all within the scope of protection of this patent.

本发明第五实施方式涉及一种电子设备,如图9所示,包括:至少一个处理器701;以及,与所述至少一个处理器701通信连接的存储器702;其中,所述存储器702存储有可被所述至少一个处理器701执行的指令,所述指令被所述至少一个处理器701执行,以使所述至少一个处理器701能够执行上述各实施方式中的IP地址的配置方法。The fifth embodiment of the present invention relates to an electronic device, as shown in FIG. 9 , comprising: at least one processor 701 ; and a memory 702 communicatively connected to the at least one processor 701 ; wherein the memory 702 stores Instructions executable by the at least one processor 701, where 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 foregoing embodiments.

其中,存储器和处理器采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器和存储器的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传送给处理器。The memory and the processor are connected by a bus, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors and various circuits of the memory. The bus may also connect together various other circuits, such as peripherals, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides the interface between the bus and the transceiver. A transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other devices over a transmission medium. The data processed by the processor is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor.

处理器负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器可以被用于存储处理器在执行操作时所使用的数据。The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Instead, memory may be used to store data used by the processor in performing operations.

本发明第六实施方式涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现上述方法实施例。The sixth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The above method embodiments are implemented when the computer program is executed by the processor.

即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。That is, those skilled in the art can understand that all or part of the steps in the method for implementing the above embodiments can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium and includes several instructions to make a device ( It may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, removable hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.

本领域的普通技术人员可以理解,上述各实施方式是实现本发明的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本发明的精神和范围。Those of ordinary skill in the art can understand that the above-mentioned embodiments are specific examples for realizing the present invention, and in practical applications, various changes in form and details can be made without departing from the spirit and the spirit of the present invention. scope.

Claims (10)

1.一种IP地址的配置方法,其特征在于,包括:1. a configuration method of IP address, is characterized in that, comprises: 获取机房的规划数据;Obtain the planning data of the computer room; 获取请求配置IP地址的基板管理控制器BMC管理的服务器的信息;Obtain the information of the server managed by the baseboard management controller BMC that requests to configure the IP address; 根据所述BMC管理的服务器的信息和所述规划数据,配置所述BMC的IP地址。Configure the IP address of the BMC according to the information of the server managed by the BMC and the planning data. 2.根据权利要求1所述的IP地址的配置方法,其特征在于,所述BMC管理的服务器的信息包括所述BMC管理的服务器的主机序列号和MAC地址;2. the configuration method of IP address according to claim 1 is characterized in that, the information of the server of described BMC management comprises the host serial number and the MAC address of the server of described BMC management; 所述根据所述BMC管理的服务器的信息和所述的规划数据,配置所述BMC的IP地址,包括:The configuration of the IP address of the BMC according to the information of the server managed by the BMC and the planning data includes: 根据所述BMC管理的服务器的主机序列号和所述规划数据,确定对所述BMC待分配的IP地址;Determine 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; 将所述待分配的IP地址和所述BMC管理的服务器的MAC地址绑定;Binding the IP address to be allocated with the MAC address of the server managed by the BMC; 重启所述BMC管理的服务器以配置所述BMC的IP地址。Restart the server managed by the BMC to configure the IP address of the BMC. 3.根据权利要求2所述的IP地址的配置方法,其特征在于,所述根据所述BMC管理的服务器的主机序列号和所述的规划数据,确定对所述BMC待分配的IP地址,包括:3. the configuration method of IP address according to claim 2, is characterized in that, described according to the host serial number of the server of described BMC management and described planning data, determine the IP address to be allocated to described BMC, include: 判断所述BMC管理的服务器是否为所述机房内的服务器;Determine whether the server managed by the BMC is a server in the computer room; 若所述BMC管理的服务器是所述机房内的服务器,根据所述BMC管理的服务器主机序列号和所述规划数据,确定对所述BMC待分配的IP地址。If the server managed by the BMC is a server in the equipment room, the IP address to be allocated to the BMC is determined according to the host serial number of the server managed by the BMC and the planning data. 4.根据权利要求3所述的IP地址的配置方法,其特征在于,所述判断所述BMC管理的服务器是否为所述机房内的服务器,包括:4. The configuration method of an IP address according to claim 3, wherein the judging whether the server managed by the BMC is a server in the computer room comprises: 判断所述BMC管理的服务器的MAC地址是否在动态主机配置DHCP协议的黑名单中;Determine whether the MAC address of the server managed by the BMC is in the blacklist of the dynamic host configuration DHCP protocol; 所述若所述BMC管理的服务器是所述机房内的服务器,根据所述BMC管理的服务器主机序列号和所述规划数据,确定对所述BMC待分配的IP地址,包括:If the server managed by the BMC is a server in the computer room, according to the server host serial number managed by the BMC and the planning data, determine the IP address to be allocated to the BMC, including: 若所述BMC管理的服务器的MAC地址不在所述DHCP协议的黑名单中,根据所述DHCP协议、所述BMC管理的服务器的主机序列号和所述规划数据,确定对所述BMC待分配的IP地址。If the MAC address of the server managed by the BMC is not in the blacklist of the DHCP protocol, according to the DHCP protocol, the host serial number of the server managed by the BMC and the planning data, determine the address to be allocated to the BMC. IP address. 5.根据权利要求4所述的IP地址的配置方法,其特征在于,所述将所述待分配的IP地址和所述BMC管理的服务器的MAC地址绑定,包括:5. The configuration method of an IP address according to claim 4, wherein the binding of the IP address to be allocated and the MAC address of the server managed by the BMC comprises: 将所述待分配的IP地址和所述BMC管理的服务器的MAC地址绑定,得到绑定后的地址;Binding the IP address to be allocated and the MAC address of the server managed by the BMC to obtain the bound address; 将所述绑定后的地址写入所述DHCP协议中,并重启所述DHCP协议。The bound address is written into the DHCP protocol, and the DHCP protocol is restarted. 6.根据权利要求1所述的IP地址的配置方法,其特征在于,所述规划数据包括所述机房内的若干条BMC的用户名和密码;6. The configuration method of an IP address according to claim 1, wherein the planning data comprises the user names and passwords of several BMCs in the computer room; 所述获取请求配置IP地址的基板管理控制器BMC管理的服务器的信息,包括:Described obtaining the information of the server managed by the baseboard management controller BMC that requests to configure the IP address, including: 在所述机房内的若干条BMC的用户名和密码中,确定与所述请求配置IP地址的BMC的用户名匹配的密码;Among the user names and passwords of several BMCs in the computer room, determine a password that matches the user name of the BMC that requests to configure an IP address; 根据所述请求配置IP地址的BMC的用户名和所述匹配的密码,获取所述请求配置IP地址的BMC管理的服务器的信息。According to the user name of the BMC that requests to configure the IP address and the matching password, obtain the information of the server managed by the BMC that requests to configure the IP address. 7.根据权利要求1所述的IP地址的配置方法,其特征在于,在所述获取机房的规划数据之后,还包括:7. The configuration method of an IP address according to claim 1, characterized in that, after the acquisition of the planning data of the computer room, further comprising: 若检测到所述机房的规划数据发生变化,判断已配置IP地址的BMC管理的服务器的信息是否发生变化;If it is detected that the planning data of the computer room has changed, determine whether the information of the server managed by the BMC with the configured IP address has changed; 若已配置IP地址的BMC管理的服务器的信息发生变化,获取发生变化的BMC管理的服务器的信息;If the information of the server managed by the BMC with the configured IP address changes, obtain the information of the server managed by the BMC that has changed; 根据变化后的规划数据和所述发生变化的BMC管理的服务器的信息,配置所述发生变化的BMC的IP地址。The IP address of the changed BMC is configured according to the changed planning data and the information of the server managed by the changed BMC. 8.根据权利要求7所述的IP地址的配置方法,其特征在于,若已配置IP地址的BMC管理的服务器的信息未发生变化,所述方法还包括:8. the configuration method of IP address according to claim 7, is characterized in that, if the information of the server that the BMC management of the configured IP address does not change, described method also comprises: 获取新加入所述机房的BMC管理的服务器的信息;Obtain the information of the server managed by the BMC newly added to the computer room; 根据所述新加入所述机房的BMC管理的服务器的信息和所述变化后的规划数据,配置所述新加入所述机房的BMC的IP地址。According to the information of the server managed by the BMC newly added to the computer room and the changed planning data, the IP address of the BMC newly added to the computer room is configured. 9.一种电子设备,其特征在于,包括:9. An electronic device, characterized in that, comprising: 至少一个处理器;以及,at least one processor; and, 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至8中任一所述的IP地址的配置方法。the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the execution of any one of claims 1 to 8 How to configure the IP address. 10.一种计算机可读存储介质,存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至8中任一项所述的IP地址的配置方法。10 . A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the method for configuring an IP address according to any one of claims 1 to 8 is implemented. 11 .
CN202010961297.3A 2020-09-14 2020-09-14 IP address configuration method, 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 IP address configuration method, 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 IP address configuration method, 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 IP address configuration method, electronic device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN112073555A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806179A (en) * 2021-09-23 2021-12-17 中国工商银行股份有限公司 Out-of-band information management device and method for machine room server and machine room
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 (5)

* 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
US12224900B2 (en) 2021-01-08 2025-02-11 Inspur Suzhou Intelligent Technology Co., Ltd. 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
CN113806179A (en) * 2021-09-23 2021-12-17 中国工商银行股份有限公司 Out-of-band information management device and method for machine room server and machine room
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
CN112073555A (en) IP address configuration method, electronic device and computer-readable storage medium
CN110086652B (en) Management system and method for service network element in 5G core network
CN102571698B (en) Access authority control method, system and device for virtual machine
JP7674487B2 (en) Management method and apparatus for a container cluster - Patents.com
US8224941B2 (en) Method, apparatus, and computer product for managing operation
KR20080037647A (en) Method and system for managing virtual instances of physical ports attached to the network
WO2018192478A1 (en) Cloud management platform, virtual machine management method, system thereof
JP7510429B2 (en) Cloud-enable legacy trusted network devices for zero-touch provisioning and enterprise-as-a-service
US11221866B2 (en) Accelerator loading method, system, and apparatus
CN106134141A (en) A kind of method and device updating network service describer NSD
WO2017161562A1 (en) Management method and device for application in network function virtualization environment
JP2023078322A (en) Method and apparatus for ensuring continued device operational reliability in cloud-degraded mode
CN106547790A (en) A kind of relevant database service system
US8819200B2 (en) Automated cluster node configuration
CN111339194A (en) Automatic scheduling method and device for middleware of database access layer
US11483205B1 (en) Defragmentation of licensed resources in a provider network
WO2023035777A1 (en) Network configuration method, proxy component, controller, electronic device and storage medium
CN115202820A (en) Pod unit creation method, apparatus, device and storage medium
CN114996750A (en) Data sharing method and device
US20070033366A1 (en) Method, apparatus, and computer program product for reconfiguring a storage area network to support the execution of an application automatically upon execution of the application
WO2021258861A1 (en) Operation processing method and a related device
WO2024258573A1 (en) Cross-regional infrastructure configurations for disaster recovery
CN107534678B (en) Method, device and system for establishing connection between VNFM and VIM
US20190215366A1 (en) Cloud Metadata Discovery API
CN108809715A (en) A kind of method and device of deployment management platform

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

Application publication date: 20201211