IP address management method and device for multiple servers, equipment and medium

Through the coordinated operation of the IPMB bus and controller, automated management of multiple server IP addresses is achieved, solving the problems of time-consuming and error-prone manual configuration in existing technologies, and improving the convenience and accuracy of IP address management.

CN118972368AInactive Publication Date: 2024-11-15LINKEDHOPE INTELLIGENT TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410943957.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-11-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In existing technologies, the management of network interface card (NIC) IP addresses for commercial servers requires manual configuration, which is time-consuming and prone to errors. Furthermore, multiple servers cannot be interconnected via the out-of-band health management bus (IPMB).

Method used

The IPMB bus enables automatic management of IP addresses for multiple servers. The controller communicates with the host computer to receive IP control commands, match command types, and send IPMI messages to each server via the IPMB bus, thereby enabling the allocation, querying, and modification of IP addresses.

Benefits of technology

It improves the convenience and accuracy of server IP address management, supports automatic allocation and modification of IP addresses for multiple servers, enhances system flexibility and security, and reduces manual intervention and errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972368A_ABST
    Figure CN118972368A_ABST
Patent Text Reader

Abstract

The invention provides a multi-server IP address management method and device, equipment and a medium, and relates to the technical field of IP distribution, and the method comprises the steps: receiving an IP control instruction sent by an upper computer; matching the type of an IP control instruction corresponding to the IP control instruction code from a preset IP control instruction code and type comparison table; when the IP control instruction is an IP allocation instruction, obtaining all IP addresses to be allocated on the IPMB, the number of servers connected to the IPMB and a server identifier of each server; according to a preset IP allocation rule, allocating an IP address to be allocated to each server to obtain an IP address allocation result; generating a plurality of first IPMI messages according to the IP address allocation result; and sending the plurality of generated first IPMI messages to a corresponding server through an IPMB (Intelligent Platform Management Bus). According to the invention, the IP addresses of multiple servers can be distributed, inquired and modified at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of IP allocation, and in particular to a method, device, equipment and medium for managing IP addresses of multiple servers. Background Art

[0002] Currently in the server field, commercial servers have onboard health management units (BMCs, Baseboard Management Controllers) for comprehensive health management of servers, including core power supply voltage, current, temperature, power consumption, fan control and other basic functions. They also support remote KVM to operate and configure server hardware resources, such as UEFI parameter configuration, operating system installation and network card IP address management. Network card IP address management needs to be manually configured through a remote web page, which requires manual intervention. In addition, the BMCs of multiple commercial servers do not support interconnection through the out-of-band health management bus IPMB. Therefore, the IP management of the server needs to be manually configured one by one, which is not only time-consuming and cumbersome to operate, but also very error-prone. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a method, device, equipment and medium for managing IP addresses of multiple servers to solve the above-mentioned problems existing in the prior art. The IP addresses of multiple servers can be allocated, queried and modified at the same time, greatly improving the convenience and accuracy of server IP address management.

[0004] In a first aspect, a method for managing IP addresses of multiple servers is provided, which is applied to a controller, wherein the controller is communicatively connected to a host computer; the controller is connected to multiple servers via an IPMB bus, and the method may include:

[0005] Receiving an IP control instruction sent by a host computer; wherein the IP control instruction includes an IP control instruction code;

[0006] Matching the type of IP control instruction corresponding to the IP control instruction code from a preset IP control instruction code and type comparison table; wherein the type of IP control instruction includes: the type of IP allocation instruction;

[0007] When the IP control instruction is an IP allocation instruction, all IP addresses to be allocated on the IPMB bus and the number of servers connected to the IPMB bus and the server identifier of each server are obtained;

[0008] According to the preset IP allocation rules, an IP address to be allocated is allocated to each server to obtain an IP address allocation result;

[0009] Generate multiple first IPMI messages according to the IP address allocation result; wherein any first IPMI message includes a server identifier and an IP address allocated to a server corresponding to the server identifier;

[0010] Sending the generated multiple first IPMI messages to the IPMB bus;

[0011] The IPMB bus is controlled to send each first IPMI message to a corresponding server.

[0012] In an optional implementation, according to a preset IP allocation rule, an IP address to be allocated is allocated to each server, and an IP address allocation result is obtained, including:

[0013] From all IP addresses to be allocated, select the same number of IP addresses to be allocated as the number of servers to obtain the target IP address;

[0014] According to the preset IP allocation rules, a target IP address is allocated to each server to obtain the IP address allocation result.

[0015] In an optional implementation, the type of the IP control instruction also includes: a type of IP query instruction, a type of IP specifying instruction, and a type of IP restoring instruction.

[0016] In an optional implementation, the IP designation instruction further includes a server identifier of the server and an IP address designated for the server;

[0017] When the IP control instruction is an IP specifying instruction, the method further includes:

[0018] Convert the IP specified instruction into a second IPMI message;

[0019] Sending the second IPMI message to the IPMB bus;

[0020] The IPMB bus is controlled to send the second IPMI message to the corresponding server.

[0021] In an optional implementation, when the IP control instruction is an IP recovery instruction, the method further includes:

[0022] Get the preset initial IP of each server;

[0023] Generate a third IPMI message for each server according to the initial IP of each server; wherein any third IPMI message includes a server identifier and the initial IP of the server corresponding to the server identifier;

[0024] Sending the generated multiple third IPMI messages to the IPMB bus;

[0025] The IPMB bus is controlled to send each third IPMI message to a corresponding server.

[0026] In an optional implementation, after controlling the IPMB bus to send each first IPMI message to the corresponding server, the method further includes:

[0027] The server converts the received first IPMI message into an execution command;

[0028] The server extracts the IP address from the execution command, and sets the extracted IP address as the IP address of the server.

[0029] In a second aspect, a multi-server IP address management device is provided, which may include:

[0030] A receiving unit is used to receive an IP control instruction sent by a host computer; wherein the IP control instruction includes an IP control instruction code; the host computer is connected to the controller in communication; the controller is connected to multiple servers via an IPMB bus;

[0031] A matching unit, used to match the type of IP control instruction corresponding to the IP control instruction code from a preset IP control instruction code and type comparison table; wherein the type of IP control instruction includes: the type of IP allocation instruction;

[0032] an acquisition unit, configured to acquire all IP addresses to be allocated on the IPMB bus, the number of servers connected to the IPMB bus, and a server identifier of each server when the IP control instruction is an IP allocation instruction;

[0033] The allocation unit is used to allocate an IP address to be allocated to each server according to a preset IP allocation rule to obtain an IP address allocation result;

[0034] A generating unit, configured to generate a plurality of first IPMI messages according to the IP address allocation result; wherein any first IPMI message includes a server identifier and an IP address allocated to a server corresponding to the server identifier;

[0035] The sending unit is used to send the generated multiple first IPMI messages to the IPMB bus; and control the IPMB bus to send each first IPMI message to a corresponding server.

[0036] In a third aspect, an electronic device is provided, the electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0037] Memory, used to store computer programs;

[0038] The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.

[0039] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0040] This application utilizes the interconnection characteristics of the IPMB bus to automatically and quickly manage the IP addresses of all network cards of all servers through the IPMB bus, supports the allocation, query and modification of IP addresses, and can greatly improve the convenience and accuracy of network card IP addresses.

[0041] The present application designs a communication protocol for IP address management of the IPMB bus, which is scalable and compatible; designs a communication protocol between a remote IP management agent and the BMC; the present application verifies the data transmitted by the IPMB bus, and updates the data to the server only after the data has been verified to be correct and meets the IP address requirements, thereby improving security and reliability.

[0042] This application can reconnect to the server through Ethernet by remotely querying and assigning the network card IP in the event of a failure in the host computer or the network IP being tampered with. There is no need to worry about the device status being unable to connect or lost due to the unreachable server IP address, and communicating through IP addresses can effectively improve the communication rate and reliability.

[0043] The host computer of the present application has interface scalability and is not limited to one interface, but the communication command protocols of different interfaces are the same, which makes the application scenarios of IP address management of multiple servers more extensive; at the same time, the host computer and the controller as well as the server and the IPMB bus can be freely connected and disconnected, which is more adaptable, and the IP allocation is not fixed to the number of servers, which is more flexible.

[0044] This application can intuitively understand and grasp the IP allocation of all servers, which is helpful for managing the IP addresses of multiple servers; the server is equipped with an agent program, which can enable IP allocation to be applied on different servers (boards). BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 An architectural diagram of a multi-server IP address management system provided in an embodiment of the present application;

[0047] Figure 2 An architectural diagram of a controller provided in an embodiment of the present application;

[0048] Figure 3 An architectural diagram of a server provided in an embodiment of the present application;

[0049] Figure 4 A flowchart of a multi-server IP address management method provided in an embodiment of the present application;

[0050] Figure 5 A schematic diagram of a multi-server IP address management method provided in an embodiment of the present application;

[0051] Figure 6 An architectural diagram of a multi-server IP address management method provided in an embodiment of the present application;

[0052] Figure 7 A schematic diagram of the structure of a multi-server IP address management device provided in an embodiment of the present application;

[0053] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0055] The multi-server IP address management method provided in the embodiment of the present application can be applied in Figure 1 In the system architecture shown in Figure 1 As shown, the system may include: a host computer, a controller, an IPMB bus and multiple servers;

[0056] Specifically, the host computer is used to send IP control instructions to the controller; wherein the IP control instructions are protocol commands between the host computer and the controller, using a negotiated or universal control protocol, and the interface is not limited to the network and / or serial port, etc.; the host computer can access the controller in a variety of ways and can also disconnect from the controller at any time.

[0057] The controller, as the main device for allocating IP, can be a dedicated DSP (or switch) board; the controller communicates with the host computer through the network, CAN bus, serial port or web page; Figure 2 As shown, the controller is used to receive the IP control instruction sent by the host computer, and convert the received IP control instruction into an IPMI message; and send the converted IPMI message to the IPMB bus.

[0058] The IPMB bus (i.e., health management bus) is a channel connecting all servers and controllers. It uses a unified IPMI communication protocol and can implement interface support for multiple device mounting, such as I2C. It is used to transmit information through IPMI messages, that is, to receive IPMI messages from the controller and send the received IPMI messages to each server. The IPMB bus has one master and multiple slaves, and the server can detach from or receive the IPMB bus at any time.

[0059] The server (lower computer) is mounted on the IPMB bus and can be regarded as a slave device with an assigned IP; it is used to convert the received IPMI message into an execution command and execute the obtained execution command; specifically, the server can be a server board; the server board has no directionality and can be a board of different hardware (such as a computing board or a storage board, etc.); however, the server board must support interface access to the IPMB bus, have a unique identifier (which can be a number), and have an agent installed; the server is a server that supports IPMI parsing; if the server does not support IPMI parsing, a parsing component (such as a BMC module) must be embedded to enable the server to support IPMI parsing.

[0060] In an embodiment of the present application, a processing component is provided in the controller, and the processing component can be a single-chip microcomputer, an embedded processor, a CPU or an FPGA, etc.; the processing component is provided with two interfaces, one is a communication interface with a host computer, and the communication interface supports a control protocol; the other interface is an IPMB communication interface, which supports IPMI messages; IPMI communication has the characteristics of point-to-point transmission, that is, the protocol contains a source address of the master sender and a destination address of the slave receiver, and a command only executes one action, that is, the protocol contains a function code; at the same time, IP allocation rules (that is, IP allocation specifications) are pre-stored in the controller.

[0061] In the embodiments of the present application, Figure 3As shown, the server is provided with a parsing component (which may be a BMC module) and an agent program; the parsing component is used to receive IPMI messages transmitted by the IPMB bus, parse the received IPMI messages into execution commands, transmit them to the agent program, and interact with the agent program; the agent program is used to receive the execution commands and modify or query the IP accordingly, and the initial IP parameters are stored in the agent program for ready call.

[0062] In actual applications, the parsing component can be incorporated into the agent program; the parsing component can also be set for the server through hardware embedding. The agent program can be installed in server boards with different hardware devices, which is universal; it can also be adapted according to whether the hardware contains BMC or whether the server is connected to the IPMB bus and supports the ipmi protocol.

[0063] In the embodiment of the present application, the host computer can be a single-chip microcomputer, a mobile phone, a smart phone, a laptop computer, a digital broadcast receiver, a personal digital assistant (PDA), a tablet computer (PAD) and other user equipment (UE), a handheld device, a vehicle-mounted device, a wearable device, a computing device or other processing equipment connected to a wireless modem, a mobile station (MS), a mobile terminal, etc. The host computer and the controller can be directly or indirectly connected through a wired or wireless communication method, and this application does not limit it here.

[0064] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.

[0065] Figure 4 The following is a flow chart of a multi-server IP address management method provided in an embodiment of the present application. Figure 4 As shown, the method may include:

[0066] Step S410, receiving the IP control instruction sent by the host computer; matching the type of the IP control instruction corresponding to the IP control instruction code from the preset IP control instruction code and type comparison table.

[0067] In an embodiment of the present application, the types of IP control instructions include: types of IP allocation instructions (i.e., allocating multiple server IPs at the same time), types of IP query instructions (i.e., querying the IP address of the server), types of IP designation instructions (i.e., specifying the server to be allocated, modifying the IP of a single server), and types of IP recovery instructions (i.e., restoring the IP of one or more servers to the initial state or default state).

[0068] In an embodiment of the present application, when the IP control instruction is an IP query instruction, the IP control instruction includes an IP control instruction code and a server identifier of the query server; when the IP control instruction is an IP designation instruction, the IP control instruction includes an IP control instruction code, a server identifier of the designated server, and an IP address designated for the server.

[0069] In an embodiment of the present application, when the IP control instruction is an IP allocation instruction, the IP control instruction includes an IP control instruction code, a server identifier of each server, and an IP allocated to each server.

[0070] In another embodiment of the present application, when the IP control instruction is an IP allocation instruction, the IP control instruction sent by the host computer to the controller may only include the IP control instruction code. After extracting the IP control instruction code, the controller automatically allocates an IP address to each server according to a pre-set IP address allocation rule and generates multiple IPMI messages.

[0071] In the embodiment of the present application, when the IP control instruction is an IP recovery instruction, the IP control instruction includes an IP control instruction code, a server identifier of a server to be recovered, and the initial IP parameters of the server; or, when the IP control instruction only includes an IP control instruction code, each server converts the IPMI message obtained by converting the instruction to obtain an execution command, and calls the initial IP parameters stored in itself according to the execution command, and directly recovers to the corresponding initial IP parameters. The initial IP parameters of the server can also be pre-defined.

[0072] Step S420: When the IP control instruction is an IP allocation instruction, all IP addresses to be allocated on the IPMB bus and the number of servers connected to the IPMB bus and the server identification of each server are obtained.

[0073] In an embodiment of the present application, each server has a unique server identifier; the server identifier may be the server's SN number, hardware slot number, ID number, etc.; the server identifier of each server is the bus address for the IPMB bus, and the bus address of each IPMB bus is unique.

[0074] Step S430: Allocate an IP address to be allocated to each server according to a preset IP allocation rule to obtain an IP address allocation result; and generate multiple first IPMI messages according to the IP address allocation result.

[0075] In the embodiment of the present application, the IP allocation rules are defined by the user according to actual needs, and can be implemented in the form of a list or in the form of logic; the IP allocation rules are modifiable, and the modification method includes the controller directly modifying according to user needs or modifying through the user's host computer generating modification control instructions.

[0076] In the embodiment of the present application, according to the preset IP allocation rule, an IP address to be allocated is allocated to each server, and the IP address allocation result is obtained, including:

[0077] From all the IP addresses to be allocated, select the same number of IP addresses to be allocated as the number of servers to obtain target IP addresses; according to the preset IP allocation rule, allocate a target IP address to each server to obtain an IP address allocation result.

[0078] In the embodiment of the present application, the arrangement order of the servers can be determined according to the time sequence of the connection between each server and the IPMB bus or the position of the server mounted on the IPMB bus, and the arrangement order of the IP addresses to be allocated can be determined according to the size of the last group of numbers of the IP addresses to be allocated; the servers and the IP addresses to be allocated are matched one by one in a certain order to obtain the IP address allocation result; at the same time, the IPMI messages of each server are sent in sequence according to the arrangement order of the servers. Specifically, the IPMI message includes: destination address, command type, source address, message sequence number, function code and content.

[0079] For example, the bus address of the controller is set to 0x20, the server identifier is regarded as the server ID number, and corresponds to a bus address ADDR on the bus, ADDR = ID + 0x40;

[0080] The IP allocation specifications are set as follows: 1. The first two digits of each server IP are fixed to 192.168; 2. The third digit of the server IP is set to the value of the ID + 10; 3. The fourth digit of the server IP is set to 1 for an odd number and 2 for an even number. The IP allocation results are shown in Table 1.

[0081] Table 1 IP allocation results

[0082]

[0083]

[0084] The multiple IPMI messages generated based on the above IP address allocation results are shown in Table 2.

[0085] Table 2 IPMI message list

[0086]

[0087] In the embodiment of the present application, any first IPMI message includes a server identifier and an IP address allocated to a server corresponding to the server identifier.

[0088] Step S440: Send the generated multiple first IPMI messages to the IPMB bus; control the IPMB bus to send each first IPMI message to a corresponding server.

[0089] In an embodiment of the present application, the number of first IPMI messages is the same as the number of servers to which IP addresses are to be assigned, that is, a first IPMI message is generated separately for each server, and each server only receives the IPMI message carrying its own server identifier, and does not receive other IPMI messages.

[0090] In the embodiment of the present application, after receiving the response information returned by each server, the controller will store each server identifier and the corresponding IP address, and subsequently when the host computer, the controller and each server communicate, they can use the IP address to communicate directly.

[0091] In another embodiment of the present application, when the IP control instruction is an IP specified instruction, the IP specified instruction is converted into a second IPMI message; the second IPMI message is sent to the IPMB bus; and the IPMB bus is controlled to send the second IPMI message to the corresponding server.

[0092] In another embodiment of the present application, when the IP control instruction is an IP recovery instruction, the preset initial IP of each server is obtained; based on the initial IP of each server, a third IPMI message of each server is generated; the generated multiple third IPMI messages are sent to the IPMB bus; the IPMB bus is controlled to send each third IPMI message to the corresponding server; wherein any third IPMI message includes a server identifier and the initial IP of the server corresponding to the server identifier.

[0093] In other embodiments of the present application, when the IP control instruction is an IP query instruction, the IP query instruction is converted into a fourth IPMI message; the fourth IPMI message is sent to the IPMB bus; the IPMB bus is controlled to send the fourth IPMI message to the corresponding server; after the server receives the fourth IPMI message, the current IP address (which may be the initial IP address or an IP address designated or assigned later) and the server identifier are packaged and sent to the controller via the IPMB control bus; the controller sends the IP address and the server identifier to the host computer for display.

[0094] In an embodiment of the present application, after receiving the first IPMI message, the second IPMI message, the third IPMI message or the fourth IPMI message, the server converts the received message into an execution command; the server extracts the IP address from the execution command, and sets the extracted IP address as the IP address of the server; at the same time, the server generates a response message after the modification is completed, and sends the generated response message to the controller through the IPMB bus; the controller then sends it to the host computer; wherein the response message includes the modified IP address and the server identifier.

[0095] In other embodiments of the present application, when the server is just mounted on the IPMB bus, the server will be verified through the bus address (i.e., the server identifier); at the same time, when the host computer, controller, IPMB bus and server are connected for the first time, verification can also be performed through the bus address or verification packet to improve security.

[0096] In another embodiment of the present application, when the server receives the IPMI message, it can verify the data such as the server identification contained therein, and when the data is verified to be correct and meets the IP address requirements, it can update its own IP.

[0097] like Figure 5 As shown, the multi-server IP address management method of the present application is that the user host computer initiates a control command to allocate or query the server network card IP to the controller, and the controller parses and processes the control command. After the parsing is completed, one or more IPMI messages for single-step action execution are formed and transmitted to the IPMB bus. After receiving the IPMI message, the corresponding server board performs information processing and executes the IP modification process; the specific steps are as follows:

[0098] First, the host computer sends out an IP control instruction; the controller receives the IP control instruction from the host computer, processes the message according to the control protocol, and selects the corresponding execution operation; the controller decomposes the IP control instruction into a single or multiple IPMI messages of execution actions and sends them to the corresponding server through IPMB;

[0099] Secondly, the server's BMC or agent receives and parses the IPMI message, and passes the ordinary command (including the network card number and IP address) parsed from the IPMI message to the agent on the server; the agent responds to the command and executes IP address allocation or query, and returns the command execution result to the server's BMC;

[0100] Finally, the server's BMC returns the response message to the controller through the IPMB bus; the controller transmits the result back to the host computer, the host computer updates the execution result, and the execution process ends.

[0101] like Figure 6 As shown, in one embodiment of the present application, the controller receives the IP control instruction issued by the host computer through the interface, and after parsing the content received by the interface, uniformly uses the same set of communication protocol command control, and adapts the interface according to the host computer environment, that is, the interface is extensible, but the communication protocol is unified; the controller transmits the generated first IPMI message to the corresponding server through the IPMB bus through the interface connected to the IPMB bus, the parsing module of the server parses the first IPMI message and passes it to the agent program, executes the IP modification command, or the agent program of the server containing the IPMI parsing module directly receives the first IPMI message and executes the IP modification command.

[0102] In summary, the multi-server IP address management method of the present application has the advantage of intuitively understanding and mastering the IP allocation status of all servers, which is helpful for managing the IP addresses of multiple servers; the server is equipped with an agent program, which enables IP allocation to be applied on different servers.

[0103] Corresponding to the above method, the present application embodiment also provides a multi-server IP address management device, such as Figure 7 As shown, the multi-server IP address management device includes:

[0104] The receiving unit 710 is used to receive the IP control instruction sent by the host computer; wherein the IP control instruction includes the IP control instruction code; the host computer is connected to the controller in communication; the controller is connected to multiple servers via the IPMB bus;

[0105] The matching unit 720 is used to match the type of IP control instruction corresponding to the IP control instruction code from a preset IP control instruction code and type comparison table; wherein the type of IP control instruction includes: the type of IP allocation instruction;

[0106] The acquisition unit 730 is used to acquire all IP addresses to be allocated on the IPMB bus, the number of servers connected to the IPMB bus, and the server identifier of each server when the IP control instruction is an IP allocation instruction;

[0107] The allocation unit 740 is used to allocate an IP address to be allocated to each server according to a preset IP allocation rule to obtain an IP address allocation result;

[0108] The generating unit 750 is used to generate a plurality of first IPMI messages according to the IP address allocation result; wherein any first IPMI message includes a server identifier and an IP address allocated to the server corresponding to the server identifier;

[0109] The sending unit 760 is used to send the generated multiple first IPMI messages to the IPMB bus; and control the IPMB bus to send each first IPMI message to a corresponding server.

[0110] The functions of each functional unit of the multi-server IP address management device provided in the above embodiments of the present application can be achieved through the above-mentioned method steps. Therefore, the specific working process and beneficial effects of each unit in the multi-server IP address management device provided in the embodiments of the present application will not be repeated here.

[0111] The present application also provides an electronic device, such as Figure 8 As shown, it includes a processor 810 , a communication interface 820 , a memory 830 and a communication bus 840 , wherein the processor 810 , the communication interface 820 , and the memory 830 communicate with each other via the communication bus 840 .

[0112] Memory 830, used for storing computer programs;

[0113] The processor 810 is used to execute the program stored in the memory 830 to implement the following steps:

[0114] Receive IP control instructions sent by the host computer; wherein the IP control instructions include IP control instruction codes; the host computer is connected to the controller in communication; the controller is connected to multiple servers via the IPMB bus;

[0115] From a preset IP control instruction code and type comparison table, match the type of IP control instruction corresponding to the IP control instruction code; wherein the type of IP control instruction includes: the type of IP allocation instruction;

[0116] When the IP control instruction is an IP allocation instruction, all IP addresses to be allocated on the IPMB bus and the number of servers connected to the IPMB bus and the server identifier of each server are obtained;

[0117] According to the preset IP allocation rules, an IP address to be allocated is allocated to each server to obtain an IP address allocation result;

[0118] Generate multiple first IPMI messages according to the IP address allocation result; wherein any first IPMI message includes a server identifier and an IP address allocated to the server corresponding to the server identifier;

[0119] The generated multiple first IPMI messages are sent to the IPMB bus; and the IPMB bus is controlled to send each first IPMI message to a corresponding server.

[0120] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0121] The communication interface is used for communication between the above electronic device and other devices.

[0122] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0123] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0124] The implementation methods and beneficial effects of the components of the electronic device in the above embodiments to solve the problems can be seen in Figure 4 The various steps in the illustrated embodiment are implemented, therefore, the specific working process and beneficial effects of the electronic device provided by the embodiment of the present application are not repeated here.

[0125] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes any of the multi-server IP address management methods in the above embodiments.

[0126] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the multi-server IP address management methods in the above embodiments.

[0127] Those skilled in the art will appreciate that the embodiments in the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt a complete hardware embodiment, a complete software embodiment, or a form of an embodiment combining software and hardware. Moreover, the present application may adopt a form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0128] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0129] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0131] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.

[0132] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the present application without departing from the spirit and scope of the embodiments in the present application. Thus, if these modifications and variations of the embodiments in the present application fall within the scope of the claims and their equivalents in the embodiments of the present application, the embodiments of the present application are also intended to include these modifications and variations.

Claims

1. A method for managing IP addresses of multiple servers, characterized in that: Applied to a controller, the controller is communicatively connected with a host computer; the controller is connected with a plurality of servers via an IPMB bus, and the method comprises: Receiving an IP control instruction sent by a host computer; wherein the IP control instruction includes an IP control instruction code; Matching the type of IP control instruction corresponding to the IP control instruction code from a preset IP control instruction code and type comparison table; wherein the type of IP control instruction includes: the type of IP allocation instruction; When the IP control instruction is an IP allocation instruction, all IP addresses to be allocated on the IPMB bus and the number of servers connected to the IPMB bus and the server identifier of each server are obtained; According to the preset IP allocation rules, an IP address to be allocated is allocated to each server to obtain an IP address allocation result; Generate multiple first IPMI messages according to the IP address allocation result; wherein any first IPMI message includes a server identifier and an IP address allocated to a server corresponding to the server identifier; Sending the generated multiple first IPMI messages to the IPMB bus; The IPMB bus is controlled to send each first IPMI message to a corresponding server.

2. The method according to claim 1, characterized in that According to the preset IP allocation rules, an IP address to be allocated is allocated to each server, and the IP address allocation result is obtained, including: From all IP addresses to be allocated, select the same number of IP addresses to be allocated as the number of servers to obtain the target IP address; According to the preset IP allocation rules, a target IP address is allocated to each server to obtain the IP address allocation result.

3. The method according to claim 1, characterized in that The types of the IP control instructions also include: types of IP query instructions, types of IP specifying instructions and types of IP restoring instructions.

4. The method according to claim 3, characterized in that The IP designation instruction also includes a server identifier of the server and an IP address designated for the server; When the IP control instruction is an IP specifying instruction, the method further includes: Convert the IP specified instruction into a second IPMI message; Sending the second IPMI message to the IPMB bus; The IPMB bus is controlled to send the second IPMI message to the corresponding server.

5. The method according to claim 3, characterized in that When the IP control instruction is an IP recovery instruction, the method further includes: Get the preset initial IP of each server; Generate a third IPMI message for each server according to the initial IP of each server; wherein any third IPMI message includes a server identifier and the initial IP of the server corresponding to the server identifier; Sending the generated multiple third IPMI messages to the IPMB bus; The IPMB bus is controlled to send each third IPMI message to a corresponding server.

6. The method according to claim 1, characterized in that After controlling the IPMB bus to send each first IPMI message to the corresponding server, the method further includes: The server converts the received first IPMI message into an execution command; The server extracts the IP address from the execution command, and sets the extracted IP address as the IP address of the server.

7. A multi-server IP address management device, characterized in that: The device comprises: A receiving unit is used to receive an IP control instruction sent by a host computer; wherein the IP control instruction includes an IP control instruction code; the host computer is connected to the controller in communication; the controller is connected to multiple servers via an IPMB bus; A matching unit, used to match the type of IP control instruction corresponding to the IP control instruction code from a preset IP control instruction code and type comparison table; wherein the type of IP control instruction includes: the type of IP allocation instruction; an acquisition unit, configured to acquire all IP addresses to be allocated on the IPMB bus, the number of servers connected to the IPMB bus, and a server identifier of each server when the IP control instruction is an IP allocation instruction; The allocation unit is used to allocate an IP address to be allocated to each server according to a preset IP allocation rule to obtain an IP address allocation result; A generating unit, configured to generate a plurality of first IPMI messages according to the IP address allocation result; wherein any first IPMI message includes a server identifier and an IP address allocated to a server corresponding to the server identifier; The sending unit is used to send the generated multiple first IPMI messages to the IPMB bus; and control the IPMB bus to send each first IPMI message to a corresponding server.

8. An electronic device, characterized in that: The electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, used to implement any method described in claims 1-6 when executing a program stored in a memory.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Methods, platform devices, and systems for setting business board addresses

    CN102273178A

  • IP address allocation method and device

    CN106453680A

  • IP resource management method, device thereof and equipment and storage medium

    CN111988442A

  • Server remote control and disk array management system and method

    CN117931067A