IP address configuration method and device

By sending IP configuration messages to multiple servers in the data center, the address conflict problem caused by the same initial IP address is solved, batch IP configuration is realized in scenarios where there is no DHCP server or IPv6 is unavailable, and configuration efficiency and automation are improved. .

CN118660033APending Publication Date: 2024-09-17XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410703823.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

In data centers, server clusters containing a large number of servers cannot communicate and access normally when the initial IP address is the same. Existing IP configuration methods such as SSDP and DHCP rely on specific network environments or DHCP servers, resulting in IPv6 being unavailable or In the absence of a DHCP server, batch IP configuration cannot be completed, which is inefficient.

Method used

By sending IP configuration messages to multiple servers, carrying the server's SN identification and configuration IP address information, the server to be configured modifies its own IP address according to the message, realizing batch IP address configuration. It is suitable for scenarios where there is no DHCP server or IPv6 is unavailable, and supports automation. , sent multiple times to ensure successful configuration.

Benefits of technology

It realizes the automatic completion of IP address configuration of multiple servers without a specific network environment or DHCP server, improves configuration efficiency, reduces manpower and time costs, and avoids address conflicts and configuration errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118660033A
    Figure CN118660033A
Patent Text Reader

Abstract

An IP address configuration method and device are applied to a computing device, the computing device is in communication connection with a plurality of servers, initial IP addresses of the plurality of servers are the same, the method comprises: receiving an IP configuration instruction, the IP configuration instruction being used for indicating IP configuration of the plurality of servers; and sending an IP configuration message to the initial IP address based on the IP configuration instruction, the IP configuration message indicating configuration IP addresses corresponding to the plurality of servers, and the IP configuration message being used for instructing the server receiving the IP configuration message to change the initial IP address into the corresponding configuration IP address. The method has the advantages that the batch configuration of the IP addresses can be completed under the scene that the IPv6 is unavailable and / or the DHCP server is lacked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of servers, and in particular to an IP address configuration method and device. Background Art

[0002] With the digital transformation of enterprises and organizations, data centers have a large number of IT (information technology) devices. In equipment delivery scenarios, the number of equipment configurations that need to be completed is also increasing. Therefore, it is necessary to ensure that large-scale equipment configuration can be completed in various scenarios to improve delivery efficiency.

[0003] However, when a server cluster containing a large number of servers is delivered for use, the initial IP (internet protocol) addresses of all servers are the same. When multiple servers are connected to the network at the same time, address conflicts will occur, making normal communication and access impossible. Modifying the IP address is an important step in the hardware initialization process. Currently, the more commonly used methods are to complete IP configuration through SSDP (simple service discovery protocol) broadcast or through a DHCP (dynamic host configuration protocol) server, but both of the above methods have their limitations, resulting in the inability to complete IP configuration in some scenarios. For example, the SSDP broadcast method relies on an IPv6 network environment, and the DHCP server method cannot do without a DHCP server. In the above scenarios, manual configuration is required, which is inefficient. Summary of the Invention

[0004] In order to solve the above problems, embodiments of the present application provide an IP address configuration method and device, which can complete batch configuration of IP addresses in scenarios where IPv6 is unavailable and / or a DHCP server is lacking.

[0005] To this end, the following technical solutions are adopted in the embodiments of the present application:

[0006] In a first aspect, the present application provides an IP address configuration method, which is applied to a computing device, wherein the computing device is connected to multiple servers, and the initial IP addresses of the multiple servers are the same. The method includes: receiving an IP configuration instruction, wherein the IP configuration instruction is used to instruct IP configuration of the multiple servers; based on the IP configuration instruction, sending an IP configuration message to the initial IP address, wherein the IP configuration message indicates the configured IP addresses corresponding to each of the multiple servers, and the IP configuration message is used to instruct the server that receives the IP configuration message to change the initial IP address to the corresponding configured IP address.

[0007] In this embodiment, an IP configuration message is sent to the server to be configured, and the IP configuration message carries the configuration information corresponding to each server, such as the server's SN identifier and the corresponding configured IP address. After receiving the IP configuration message, the server to be configured modifies its own IP address based on the configured IP address in the configuration information, thereby avoiding address conflicts between devices. The IP configuration message can be sent multiple times until the initial IP addresses of all servers to be configured are modified to the configured IP address. In this way, the above-mentioned address configuration method does not rely on a specific network environment or DHCP server and is applicable to scenarios where IPv6 is unavailable or a DHCP server is lacking, thereby increasing the scope of application. In addition, IP configuration messages can be sent to multiple servers at once, improving the efficiency of server configuration and saving manpower and time costs. The entire configuration process can be fully automated, requiring no human intervention, reducing errors and configuration time. The IP configuration table contains the server identifier and configured IP address, ensuring the accuracy of the configuration and avoiding configuration errors or confusion. This method can effectively meet the needs of large-scale server configuration and improve delivery efficiency and management efficiency.

[0008] As an achievable implementation method, the method sends an IP configuration message to the initial IP address based on the IP configuration instruction, and then further includes: receiving an IP configuration success response message for the IP configuration message; and sending the IP configuration message to the initial IP address based on the response message.

[0009] In this embodiment, in order to ensure that all servers with the same initial IP address can normally receive the configuration message and complete the IP address modification, thereby avoiding incomplete or failed configuration, the IP configuration message is sent to the initial IP address multiple times to increase the probability of the IP configuration message reaching the target server, ensuring that all servers with the same initial IP address can complete the configuration modification of their own initial IP address, thereby improving the stability and integrity of the IP address configuration.

[0010] As an achievable implementation method, based on the IP configuration instruction, an IP configuration message is sent to the initial IP address, and then the method also includes: receiving an IP configuration success response message for the IP configuration message; based on the response message, a ping test request is sent to the initial IP address, and the ping test request is used to confirm whether the initial IP address can be successfully accessed; if so, the IP configuration message is sent to the initial IP address.

[0011] In this embodiment, a ping test request can be sent to the initial IP address of the server. If the initial IP address can be successfully accessed, it means that the initial IP address of the server has not yet completed the modification of the configured IP address, so it is necessary to continue to send IP configuration messages to the initial IP address to modify the configuration of the initial IP address. If the initial IP address cannot respond to the ping test request, it means that the initial IP address has been modified to its corresponding configured IP address, indicating that all the initial IP addresses have been modified, and then stop sending IP configuration messages.

[0012] As an achievable implementation method, the IP configuration message is sent to the initial IP address based on the IP configuration instruction, and then further includes: if no IP configuration success response message for the IP configuration message is received within a preset time, the IP configuration message is sent to the initial IP address.

[0013] In this embodiment, if no IP configuration success response message is received for the IP configuration message within the preset time, it means that the last sent IP configuration message did not complete the modification of the initial IP address of any server, so it is necessary to continue to send IP configuration messages to deal with the situation where the IP configuration message configuration fails.

[0014] As an achievable implementation method, an IP configuration message is sent to the initial IP address, and then the method further includes: recording the number of times the IP configuration message is sent to the initial IP address, and comparing the number of times the IP configuration message is sent with a preset number, wherein the preset number is the number of servers with the same initial IP address; receiving an IP configuration success response message for the IP configuration message; based on the response message and the number of times the IP configuration message is sent being less than the preset number, sending the IP configuration message to the initial IP address; based on the response message and the number of times the IP configuration message is sent being equal to the preset number, stopping sending the IP configuration message to the initial IP address.

[0015] In this embodiment, the number of times the IP configuration message is sent can be determined by the number of servers that need to modify their initial IP addresses. In this way, a corresponding number of IP configuration messages are sent to increase the possibility of successfully completing the configuration IP address modification for all servers that need to modify their initial IP addresses.

[0016] As an achievable implementation method, the record records the number of times the IP configuration message is sent to the initial IP address, and then further includes: if no IP configuration success response message is received for the IP configuration message within a preset time, the IP configuration message is sent to the initial IP address again, and the number of times the IP configuration message is sent is not recorded.

[0017] In this embodiment, when the IP configuration message fails to successfully complete the modification of the initial IP address to the configured IP address, the resent IP configuration message is not counted in the number of transmissions to avoid incomplete or failed configuration.

[0018] As an achievable implementation manner, the IP configuration message includes an IP configuration table, and the IP configuration table describes the correspondence between the server identifiers and the configured IP addresses of the multiple servers.

[0019] In this embodiment, the IP configuration message carries the correspondence between the server identifiers of multiple servers configured in the IP configuration table and the configured IP addresses, thereby facilitating the server to confirm its own unique configured IP address and complete its own IP address configuration. As an achievable embodiment, before receiving the IP configuration instruction, the method further includes: receiving a user configuration operation on the IP configuration table.

[0020] As a feasible implementation method, the identifier of the server is an SN sequence code.

[0021] Specifically, the user's configuration operation on the IP configuration table may be: planning the configuration IP addresses of the servers to be configured according to the number of the servers to be configured and the SN sequence code of each server to be configured.

[0022] In this embodiment, the SN sequence code is the unique identifier of the device and is used to identify each device. By obtaining the number of devices and the SN sequence code, and planning and configuring the IP address based on this information, it can be ensured that each device is assigned a unique IP address, avoiding the problem of address conflicts. After obtaining the number of devices and the SN sequence code, the IP address can be planned and configured for each device according to certain rules or algorithms. This planning process involves the allocation strategy of the IP address, ensuring that the configured IP address of each device is unique and does not conflict with the initial IP address. It should be understood that the planning strategy can be adjusted according to actual needs and changes in the network environment to ensure the flexibility and adaptability of the configuration process. In this way, the uniqueness of the configured IP address of the server to be configured can be ensured, and the efficiency and accuracy of the configuration process can be improved by planning the configured IP address, providing a reliable foundation for subsequent IP address configuration.

[0023] As an achievable implementation manner, the computing device communicates with the multiple servers in any one of UDP and Redfish.

[0024] The UDP communication method may be: adding each of the servers to be configured to the same local area network, and sending the IP configuration message to the initial IP address used as a broadcast address in the local area network through the UDP protocol.

[0025] In this implementation, UDP (User Datagram Protocol) is a simple, datagram-oriented transport layer protocol that does not require connection establishment. The communication process is simple, efficient, and low-latency, making it suitable for quickly sending messages to multiple devices on a local area network. By sending IP configuration messages to a broadcast address on the local area network via UDP, configuration information can be sent to all servers to be configured at once, enabling batch configuration. Due to the characteristics of the UDP protocol, message transmission latency is low, enabling rapid device response, improving real-time configuration, and saving configuration time and labor costs.

[0026] Alternatively, the computing device sends the IP configuration message to each of the servers to be configured by using the Redfish protocol.

[0027] In this implementation, the Redfish protocol is a management protocol based on the RESTful architecture, communicating over HTTP(S). It defines a set of standard resources and operations for managing and configuring server hardware, including network settings and IP address configuration. The Redfish protocol enables remote management and configuration of servers over the network, eliminating the need for physical access to the devices, facilitating device management and maintenance. Using the Redfish protocol to send IP configuration messages to the server enables remote management and configuration, offering advantages such as standardization, security, and flexibility. It is an efficient and convenient device configuration solution.

[0028] As a feasible implementation method, the IP planning table also includes a user account, a user password, a subnet mask and a gateway.

[0029] In this embodiment, before sending the IP configuration message to each of the servers to be configured through the Redfish protocol, a communication connection is established with the server to be configured based on the user account and user password of the server to be configured. By performing identity authentication during the process of establishing the communication connection, the legitimacy of the identities of the communicating parties can be ensured, the security of the communication is improved, and unauthorized access and configuration are prevented. After the communication connection is established, two-way communication can be carried out with the device to achieve real-time monitoring and control of the device, thereby improving the controllability and management efficiency of the device. By communicating through the Redfish protocol, standard HTTP(S) requests and responses can be used without the need for additional dedicated software or tools, thereby improving the convenience and versatility of configuration. In this way, by establishing a communication connection with the device, dynamic adjustment and configuration can be carried out according to the actual situation of the device, which has strong flexibility and applicability.

[0030] As a feasible implementation method, the configured IP address is a static IP address.

[0031] In a second aspect, an embodiment of the present application also provides an IP address configuration method, the method comprising: a target server receives an IP configuration message from a computing device, the IP configuration message indicating the configuration IP addresses corresponding to each of multiple servers, the target server is one of the multiple servers, and the initial IP addresses of the multiple servers are the same; the target server changes the IP address of the target server from the initial IP address to the corresponding configuration IP address based on the IP configuration message.

[0032] In this embodiment, the computing device sends IP configuration messages to the server to be configured multiple times. The request includes configuration information, including the mapping between the server's SN sequence code and the configured IP address. After receiving the IP configuration message, the server to be configured obtains the corresponding configured IP address based on its own SN sequence code and the mapping in the configuration information, and uses it for its own IP address configuration. After completing the IP address configuration, the server to be configured feeds back the configuration results to the operation and maintenance equipment so that the operation and maintenance personnel can determine whether the configuration was successful. In this way, the IP addresses of multiple servers to be configured can be configured simultaneously, thereby achieving the purpose of batch configuration and saving a considerable amount of time and labor costs. By sending IP configuration messages multiple times and automatically obtaining the mapping, IP address configuration is automated, reducing the possibility of manual intervention and errors. Because the configuration information contains the mapping between the SN sequence code and the configured IP address, the configuration is highly accurate and configuration errors can be effectively avoided.

[0033] As an achievable implementation method, the IP address of the target server is changed from the initial IP address to the corresponding configured IP address, including: calling the internal IP configuration command of the server to be configured, obtaining its own configured IP address in the IP configuration message, and modifying its own initial IP address to the obtained configured IP address.

[0034] In this implementation, after receiving the IP configuration message, the server to be configured obtains the corresponding configuration IP address based on the mapping between its own SN sequence code and the configuration information. Upon receiving the IP configuration message, the device can immediately modify the IP address, achieving high real-time performance and enabling rapid configuration of the configuration IP address. In this way, the initial IP address of the server to be configured is modified to the obtained configuration IP address, completing the configuration of its own configuration IP address.

[0035] In the third aspect, an embodiment of the present application also provides an IP address configuration method, including: sending an IP configuration message to each server to be configured; wherein the IP configuration message carries configuration information, and the configuration information includes the SN sequence code and the corresponding configuration IP address of each server to be configured, and the SN sequence code and the configuration IP address have a corresponding mapping relationship according to each server to be configured; each server to be configured has the same initial IP address, and the IP configuration message is used to trigger each server to be configured to set a different configuration IP address; after receiving the IP configuration message, any server to be configured obtains the configuration IP address in the configuration information according to the mapping relationship between the SN sequence code and the configuration IP address, configures its own configuration IP address according to the configuration IP address, and feeds back its own configuration result to the computing device; in response to the configuration result returned by the server to be configured, sends IP configuration messages to the unconfigured servers to be configured multiple times until the initial IP addresses of all servers to be configured are all modified to their corresponding configuration IP addresses.

[0036] In this embodiment, by sending IP configuration messages in batches and automatically processing the feedback results of the devices, an efficient, accurate and automated batch address configuration process is achieved, which is suitable for the rapid configuration requirements of large-scale devices.

[0037] As an achievable implementation method, the method also includes: obtaining the number of servers to be configured and the SN serial code of each server to be configured; planning the configuration IP address, user account, user password, subnet mask and gateway of the server to be configured based on the number of servers to be configured and the SN serial code of each server to be configured.

[0038] In this implementation, by obtaining the number of servers to be configured and the SN sequence code, each device can be correctly identified and processed, thereby improving configuration accuracy and consistency. Pre-planning configuration information, including IP addresses, user accounts, passwords, etc., can avoid confusion or errors during the configuration process, improving configuration efficiency and accuracy. This method can be flexibly expanded based on actual needs. For example, more parameters and configuration items can be considered when planning configuration information to meet the needs of specific scenarios. Combining device information and configuration information can achieve a more automated configuration process, reducing the need for manual intervention and improving overall efficiency and reliability.

[0039] In a fourth aspect, an embodiment of the present application further provides a computing device, including:

[0040] An IP planning table is used to provide the identifier of each server and the configured IP address of each server, wherein the identifier of the server and the configured IP address of the server have a one-to-one correspondence; an execution engine is used to broadcast IP configuration messages multiple times, wherein the IP configuration message is used to instruct the target server to query the IP configuration table to obtain the configured IP address of the target server, so that the target server changes its initial IP address to the configured IP address of the target server, wherein the target server is the server that receives the IP configuration message; a command scheduling unit is used to call Redfish and / or UDP broadcast mode to establish communication connections with multiple servers, send IP configuration messages and receive configuration result messages fed back by the server.

[0041] In this implementation, an automated batch device configuration process is achieved by integrating IP planning, execution engine, and command scheduling unit. This process is efficient, secure, flexible, and scalable, and is suitable for management and maintenance scenarios of large-scale network devices.

[0042] As an achievable implementation method, the execution engine is also used to obtain the number of servers to be configured and the SN serial code of each server to be configured; and plan the configuration IP address of the server to be configured based on the number of servers to be configured and the SN serial code of each server to be configured.

[0043] In this embodiment, the execution engine will first communicate with the server to be configured to obtain the number of servers to be configured and the SN serial code of each device. This can be achieved through network scanning, API calls or other management interfaces. Based on the obtained number of servers to be configured and the SN serial code of each device, the execution engine will plan the configuration IP address of the device according to predefined rules or algorithms. Next, the execution engine sends an IP configuration message to the server to be configured. The request includes the SN serial code of the device and the planned configuration IP address to trigger the device to configure the IP address. In this way, by automatically obtaining device information and planning the configuration IP address through the execution engine, it can flexibly cope with different numbers and types of devices, and can effectively configure devices whether it is a small office network or a large-scale data center.

[0044] In the fifth aspect, an embodiment of the present application also provides an operation and maintenance device, including: a memory and a processor; the memory and the processor are coupled; the memory is used to store programs; and the processor is used to call the programs stored in the memory to execute the methods of the first aspect and the second aspect.

[0045] In the sixth aspect, an embodiment of the present application also provides a server cluster, wherein any server in the server cluster can be connected to a local area network through its own local area network side interface, and the server includes: a command receiving unit, used to establish a connection with a computing device and receive an IP configuration message sent again by the computing device; wherein the IP configuration message includes: an IP configuration table, and the IP configuration table includes: identifiers of multiple servers and configured IP addresses of the multiple servers, wherein the identifiers of the servers and the configured IP addresses of the servers correspond one to one; an IP configuration unit, used to query the IP configuration table, obtain the configured IP address of the target server, change the initial IP address of the target server to the configured IP address of the target server, and feedback a configuration result message showing that the configured IP address is successfully configured.

[0046] In a seventh aspect, embodiments of the present application provide a storage medium storing program instructions. When the program instructions are executed on an operation and maintenance device, the operation and maintenance device executes the IP address configuration method described in the first, second, or third aspects, and any implementation thereof. The beneficial effects thereof are as described in the first aspect and are not further elaborated here.

[0047] In an eighth aspect, embodiments of the present application provide a computer program product comprising program instructions. When the program instructions are executed on an operation and maintenance device, the operation and maintenance device executes the IP address configuration method described in the first, second, or third aspects, and any implementation thereof. The beneficial effects thereof are as described in the first aspect and are not further elaborated here.

[0048] As described above, the IP address configuration method and device provided by the present invention can use Redfish to send an IP configuration message carrying the configuration IP address planning information to all servers to be configured with IPv4 conflicts at one time when there is a conflict in the default initial IP address of IPv4, and send it multiple times until there is no IPv4 conflict, thereby solving the problem of being unable to configure IPs in batches under initial IP conflicts. Exemplarily, multiple servers to be configured can be connected to the same local area network, and the IP configuration message sent by the operation and maintenance equipment can trigger each server to be configured to modify its own initial IP address, so that the modified configuration IP addresses are different from each other, thereby avoiding address conflicts between the servers to be configured, and creating conditions for batch configuration of multiple servers to be configured at the same time. Since multiple servers can be automatically configured in batches at the same time, the embodiment of the present application can significantly improve the configuration efficiency of the server cluster, reduce the operation and maintenance costs of the server cluster, and also reduce the skill requirements for the operator. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In the various drawings, the same elements are represented by similar reference numerals. For the sake of clarity, the various parts in the drawings are not drawn to scale, and certain features may be exaggerated or omitted to more clearly illustrate and explain the present application.

[0050] Figure 1 A hardware architecture diagram illustrating an application scenario of the IP address configuration method provided in an embodiment of the present application is shown;

[0051] Figure 2 Shows the architecture diagram of operation and maintenance equipment and server BMC;

[0052] Figure 3 A flowchart of an IP address configuration method provided by an embodiment of the present application is shown;

[0053] Figure 4 A flowchart of another IP address configuration method provided in an embodiment of the present application is shown;

[0054] Figure 5 A flowchart of another IP address configuration method provided in an embodiment of the present application is shown;

[0055] Figure 6 A flowchart of another IP address configuration method provided in an embodiment of the present application is shown;

[0056] FIG7( a ) shows a schematic diagram of the operation and maintenance device sending an IP configuration message to the server to be configured for the first time;

[0057] FIG7( b ) shows a schematic diagram of the operation and maintenance device sending an IP configuration message to the server to be configured for the second time;

[0058] FIG7( c ) shows a schematic diagram of the operation and maintenance device completing the IP address configuration after sending the IP configuration message to the server to be configured for the second time;

[0059] Figure 8 A schematic diagram of the structure of the operation and maintenance equipment provided in an embodiment of the present application;

[0060] Figure 9 A possible implementation of a server cluster provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0061] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0062] In the description of the embodiments of the present application, words such as "exemplary," "for example," or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary," "for example," or "for example" in the embodiments of the present application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary," "for example," or "for example" is intended to present the relevant concepts in a concrete manner.

[0063] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, B exists alone, and A and B exist at the same time. In addition, unless otherwise specified, the term "plurality" means two or more. For example, "multiple systems" refers to two or more systems, and "multiple terminals" refers to two or more terminals.

[0064] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly identifying the technical features being referred to. Thus, features specified as "first" or "second" may explicitly or implicitly include one or more of such features. The terms "include," "comprising," "having," and their variations all mean "including but not limited to," unless otherwise specifically emphasized.

[0065] In the description of the embodiments of the present application, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.

[0066] In the description of the embodiments of the present application, the terms "first\second\third, etc." or module A, module B, module C, etc. are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that the specific order or sequence can be interchanged where permitted so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0067] In the description of the embodiments of the present application, the numbers representing the steps, such as S31, S32, etc., do not necessarily mean that the steps must be executed in this manner. If permitted, the order of the previous and next steps can be interchanged, or they can be executed simultaneously.

[0068] Related terms involved in the embodiments of this application:

[0069] Redfish is a standard API (application programming interface) interface defined by DMTF (Distributed Management Task Force) that is designed to provide simple and secure management for converged, hybrid IT and software defined data centers (SDDC). To protect the interface and the data exchanged, Redfish provides authentication and encryption. It uses common Internet and network service standards to expose information directly to modern tool chains and is human- and machine-readable. Specifically, Redfish provides a standard, unified way to manage and monitor hardware devices. For example, the Redfish management interface can be used to manage servers, storage, and network devices without relying on management tools or protocols from specific vendors. This makes it easier for administrators to manage complex data center environments and to interact with hardware in an automated and programmatic manner. In this embodiment, the Redfish management interface is used to communicate and call the server's BMC.

[0070] UDP (User Datagram Protocol) broadcasting is a technology that allows UDP datagrams to be sent from a single source to all computers on a local area network. In a UDP broadcast, packets are sent to a special destination address, called the broadcast address. The broadcast address can be a specific address on the local area network (LAN) or a general broadcast address. For example, the broadcast address on a LAN is either the highest address on the local subnet or the general broadcast address: 255.255.255.255.

[0071] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0072] In the context of digital transformation and information development, enterprises and organizations are placing increasing demands on data centers. With the increasing number of IT devices and the diversification of application scenarios, data centers are required to take on more tasks, such as hosting websites, applications, databases, and cloud services. Therefore, to meet business needs, data centers must continuously improve their performance, availability, and scalability.

[0073] In equipment delivery scenarios, data centers need to configure a large number of IT devices, including servers, network equipment, and storage devices. For example, when a server cluster containing a large number of servers is delivered, all servers initially have the same IP (Internet Protocol) address, making normal communication and access impossible. Modifying IP addresses is a critical step in the hardware initialization process. To improve delivery efficiency, automated device configuration can be implemented, such as using SSDP broadcasts or a DHCP server to complete IP configuration.

[0074] SSDP broadcast is a protocol used to discover and configure network services. In this method, upon startup, a server sends an SSDP search request to all devices on the local area network. Devices supporting SSDP respond with their information, including their IPv6 addresses. Upon receiving the response, the server parses the IPv6 address and configures it as the server's IP address. Once the server completes the IPv6 address configuration, it can begin using IPv6 for network communications.

[0075] The DHCP server method is a network protocol used to automatically assign IP addresses and other network configuration parameters to devices on the network. The DHCP server is responsible for managing the IP address pool and assigning parameters such as available IP addresses, subnet masks, gateways, and DNS (domain name system) servers when devices request IP addresses. Specifically, in the initial state, when all devices to be configured are connected to the network, they will send a request to the DHCP server for an available IP address. After receiving the request, the DHCP server selects an available IP address from the pre-configured IP address pool and assigns it to the device, while also providing other network configuration parameters such as the subnet mask and gateway. The device completes the IP configuration based on the parameters provided by the DHCP server and can then communicate normally. The advantage of this is that IP addresses can be quickly assigned to a large number of devices without the need to manually configure IP addresses for each device, thereby improving the efficiency of device delivery.

[0076] However, both of the above methods have their limitations, which may result in failure to complete IP configuration in some scenarios. For example:

[0077] SSDP message configuration:

[0078] 1. Dependency on IPv6: If the IPv6 network environment does not meet the requirements, configuration cannot be performed. It should be noted that IPv6 is a new-generation network protocol that provides more IP address space and improved network performance. However, not all networks have fully transitioned to IPv6, and a large number of IPv4 networks still exist. Therefore, if the network does not support IPv6, configuration cannot be performed using SSDP packets.

[0079] 2. Relying on the switch to forward SSDP messages. If the switch cannot forward or is isolated, the message forwarding will fail and configuration will not be possible. It is understandable that SSDP messages need to be forwarded by the switch in the network so that the device can broadcast its own service information within the LAN. If the switch in the network cannot forward SSDP messages normally, or there are isolation settings, the message will not be delivered to the target device, and configuration will not be possible. This may be due to improper configuration of network devices, complex network topology, or network isolation policies. For example, a customer needs to use a static IP, but the switch configuration does not support the transmission of SSDP messages because the multicast function is not enabled. As a result, SSDP messages cannot be obtained normally and batch IP configuration cannot be performed.

[0080] DHCP server configuration:

[0081] 1. Dependency on DHCP service; configuration is impossible without it. In other words, DHCP configuration relies on the availability of a DHCP server. If there is no DHCP server on the network, the device cannot obtain an IP address and other network configuration parameters, resulting in network configuration failure. This situation may occur in some special network environments, such as a LAN without a DHCP server or when the DHCP server fails.

[0082] 2. Unable to configure a static IP address for the server's baseboard management controller (BMC). It's worth noting that DHCP is a method for dynamically assigning IP addresses. Devices obtain IP addresses and other network configuration parameters by sending requests to a DHCP server, and manual IP address assignment is not possible. If a static IP address is required, DHCP cannot be used and manual IP address assignment must be performed through other methods.

[0083] It should be understood that a dynamic IP address is a temporary IP address dynamically assigned to a device on a network by a DHCP server. In contrast to a static IP address, a dynamic IP address is dynamically assigned by a DHCP server when a device connects to the network and is released back to the DHCP server after the device disconnects, making it available for use by other devices. Dynamic IP addresses offer greater flexibility and are suitable for most home and small office network environments because they automatically manage the allocation and release of IP addresses, eliminating the need for manual configuration by network administrators.

[0084] A static IP address is an IP address manually configured and permanently assigned to a device by a network administrator. Unlike a dynamic IP address, a static IP address remains fixed and does not change even when the device is reconnected or reconfigured. Each device on the network has a unique static IP address. Static IP addresses are commonly used for devices that require remote access or provide external services, such as server BMCs and routers.

[0085] Based on this, the embodiment of the present application also provides an IP address configuration method and device. By planning the IP address to be configured, and then sending the planned IP address information to the default IP address within the local area network multiple times, the server to be configured in the default IP address will find its own IP information to be configured through its own SN (serial number) after receiving the planned IP address information, and then perform the IP configuration operation. Each time it is sent, one server to be configured can be configured. After performing multiple sends, the IP configuration of multiple servers to be configured can be completed, thereby realizing batch configuration of IP addresses.

[0086] In order to more fully understand the present application, the following examples are given. These examples are used to specifically illustrate the embodiments of the present application and should not be understood in any way as limiting the scope of the present application.

[0087] Figure 1 The hardware architecture diagram of the application scenario of the IP address configuration method provided in the embodiment of the present application is shown. Figure 1 As shown, the server to be configured can be a server cluster 10, which includes at least two servers configured with the same initial IP address, and multiple servers are connected to a hub (HUB) or switch 30 through their own LAN side interface (such as an Ethernet interface). The hub or switch 30 is also interconnected with the operation and maintenance equipment (computing device) 20, so that the server can establish a communication connection with the operation and maintenance equipment 20 through Redfish and / or UDP broadcast. Exemplarily, the operation and maintenance equipment 20 can be a portable connection device, such as a laptop computer, smart phone, tablet computer, etc. installed with a batch configuration program. The server can be a rack server, a blade server, or a tower server, which is not limited here.

[0088] The operation and maintenance device 20 is used to send an IP configuration message to each server to be configured, and the IP configuration message is used to trigger each server to be configured to configure its own configuration IP address, such as the server BMC static IP address. After sending the IP configuration message, the operation and maintenance device 20 waits for the server to return the configuration result information. Among them, the IP configuration message carries configuration information, and the configuration information includes the identifier of each server to be configured and the corresponding configuration IP address. The server identifier and the configuration IP address have a one-to-one mapping relationship according to each server to be configured. Exemplarily, the server identifier is used to identify and distinguish different servers, which can be any one of an SN (serial number) serial code, a MAC address (Media access control address), a UUID (universally unique identifier) ​​or a GUID (global unique identifier). For example, the server identifier in this embodiment is an SN serial number.

[0089] The server with the same initial IP address is used to receive the IP configuration message. Due to the conflict of the initial IP addresses, when the server and the operation and maintenance device 20 establish a communication connection via Redfish, only one server can receive the IP configuration message. Then, the server finds the corresponding configuration IP address based on its own SN serial number in the IP configuration message and modifies its own initial IP address to the configuration IP address configuration. After the configuration IP address is configured, the server will return a configuration result message with the successful modification to the operation and maintenance device 20. When the server and the operation and maintenance device 20 establish a communication connection via UDP broadcast, multiple servers in the server cluster will receive the IP configuration message together. In this way, all servers with the same initial IP address can complete the modification of their own configuration IP addresses at one time.

[0090] After the operation and maintenance device 20 receives the configuration result information returned by the server, it sends a ping test request to the initial IP address. The ping test request is used to confirm whether the initial IP address can be successfully accessed. Responding to the ping test request based on the initial IP address indicates that there are still servers in the server cluster 10 that have not been fully configured, so it is necessary to send an IP configuration message to the server cluster 10 again. However, since the IP address of the configured server has changed, it will not receive the subsequent IP configuration message sent again. Alternatively, the number of times the IP configuration message is sent is determined based on the number of servers to be configured, so that all servers to be configured in the server cluster 10 are fully configured, and the initial IP address no longer exists in the server cluster 10. In this way, this implementation scheme does not need to rely on IPv6 or a DHCP server, and can batch configure the configuration IP addresses of the servers. For example, the configuration IP address can be the static IP address of the server or the static IP address of the server BMC. The following is an example description using the configuration IP address as the static IP address of the server BMC.

[0091] It should be noted that Redfish is a RESTful (representational state transfer) API based on HTTP (hypertext transfer protocol) or HTTPS (hypertext transfer protocol secure) protocol, which defines a set of standard resources and operations for managing and configuring server hardware, including network settings, IP address configuration, etc. Using the Redfish protocol, servers can be managed and configured through the RESTful API interface without the need for physical access equipment (hubs or switches). In this embodiment, the Redfish management interface can be used to communicate and call the BMC of the server to be configured, thereby obtaining detailed information on the server hardware, such as the BMC model, manufacturer, frequency, cache size, memory size, SN sequence code, and default initial IP address. The collected information can be used as the planning basis for the static IP of the server BMC, thereby facilitating the static IP configuration of the server BMC.

[0092] In this way, before configuring the server, the SN serial code of the BMC of the server to be configured can be determined in advance, and the corresponding configuration information can be planned according to the IP planning table of the BMC SN serial code on the operation and maintenance device 20. It can be understood that the configuration information includes the configuration IP address. In a feasible embodiment, the number of servers to be configured and the SN serial code of each server to be configured can also be obtained through UDP information communication. According to the number of servers to be configured and the SN serial code of each server to be configured, the configuration IP address of the server to be configured is planned. Exemplarily, the SN serial codes of the servers to be configured can be sorted in order of size, and the network administrator can manually configure the configuration IP address of the server according to the order. It is worth mentioning that, according to the different communication connection methods between the server to be configured and the operation and maintenance device 20, the planned configuration information can also include but is not limited to the configuration IP address, user account, user password, subnet mask and gateway of each server to be configured.

[0093] Exemplarily, the operation and maintenance device 20 is used to configure the configuration information of the server to be configured. For specific examples of the configuration information, please refer to Table 1.

[0094] Table 1 Configuration information of the server to be configured

[0095]

[0096] Referring to Table 1, the configured IP address in this embodiment specifically refers to a static IPv4 address. It should be noted that when a server is connected to a network, it requires a unique identifier to communicate with other devices. An IP address (internet protocol address) is such an identifier that is used to uniquely identify each server device on the network. An IP address consists of a series of numbers, usually expressed in dotted decimal form. The full name is dotted decimal notation, which is the IPv4 IP address identification method. Each group of numbers is decimal, and groups are separated by . (dots), hence the name "dotted decimal." For example, the initial IP address in Table 1 is: 192.168.2.100. The server's initial IP address consists of three parts: a fixed ID, a switch ID, and the switch's port ID. The fixed ID value is usually 192.168, 170.65, or 10, such as 192.168 in the initial IP address 192.168.2.100. The switch ID uniquely identifies a switch within a local area network (LAN), such as the 2 in the initial IP address 192.168.2.100. The port ID is the switch's port number, such as the 100 in the initial IP address 192.168.2.100. In addition to the IP address, the server needs to know how to send data packets to the target device, which requires the use of a subnet mask. The subnet mask is an identifier that separates the IP address into the network portion and the host portion. Simply put, the subnet mask determines which portion is the network address and which is the host address. Common subnet masks include 255.255.255.0, which indicates that the first three bytes are the network address and the last byte is the host address. Furthermore, the gateway address is the address a device uses to communicate with other networks. When a device wants to send data to a destination that is not on the same subnet, it sends the data packet to the gateway, which forwards the data packet to the target device's network. The gateway address is typically the IP address of a router or gateway device on the network. During the communication connection establishment process, identity authentication is typically required to ensure that only authorized users can access and configure the device. Therefore, this embodiment also provides credentials such as a username and password for authentication. The username and password are used by the operation and maintenance device 20 to establish a communication connection with the server via the Redfish interface.

[0097] The above is an introduction to the hardware architecture of the application scenario of the IP address configuration method involved in this solution. Next, the various components of the above-mentioned operation and maintenance device 20 and the server BMC are introduced.

[0098] Figure 2The diagram shows the architecture of the operation and maintenance equipment and server BMC. Figure 2 As shown, the operation and maintenance device 20 includes an IP planning table 21, an execution engine 22 and a command scheduling unit 23. It should be noted that, Figure 2 S201-S206 are used to represent the signaling process sequence between the operation and maintenance equipment and the server.

[0099] Among them, IP planning table 21 is used to provide configuration information such as the configuration IP address, user account, user password, subnet mask and gateway of each server to be configured. It is understandable that the configuration information is manually configured by the network administrator according to the SN sequence of the BMC to be configured. For details, please refer to Table 1.

[0100] The command dispatch unit 23 is configured to establish a communication connection with the server to be configured using Redfish and / or UDP broadcast, send IP configuration messages, and receive configuration result messages from the server to be configured. For example, the command dispatch unit 23 establishes a communication connection with the BMC using Redfish communication and determines access rights to the BMC's initial IP address based on the username and login password. The username and login password can be the same or different for each BMC.

[0101] The execution engine 22 is configured to send an IP configuration message to each BMC to be configured. The IP configuration message carries the configuration information in the IP planning table, including the SN sequence code of each BMC to be configured and the corresponding configuration IP address. The SN sequence code and the configuration IP address have a corresponding mapping relationship based on each BMC to be configured. Each BMC to be configured has the same initial IP address, and the configuration IP address is different from the initial IP address. The IP configuration message is used to trigger each server to be configured to configure its own configuration IP address. It should be understood that the IP configuration message sent by the execution engine 22 is sent to the server via the command dispatch unit 23.

[0102] In some implementations, the IP configuration message further includes the configuration IP address, user account, user password, subnet mask, and gateway of each server BMC to be configured.

[0103] In a feasible implementation, the operation and maintenance device 20 may further display the progress of the configuration operation and the success / failure results of the IP address configuration of each device on its own user interaction interface.

[0104] Continue reading Figure 2 The server BMC includes: a command receiving unit 12 and an IP configuration unit 11.

[0105] Among them, the command receiving unit 12 verifies the access permission, establishes a communication connection with the operation and maintenance device 20, receives the IP configuration message sent by the operation and maintenance device 20, sends the IP configuration message to the IP configuration unit 11 and obtains the execution result of the IP configuration unit 11.

[0106] The IP configuration unit 11 is used to obtain its own configured IP address in the IP configuration message after the command receiving unit 12 receives the IP configuration message, set its own initial IP address to the configured IP address, and return a configuration result message containing the successful configuration of the configured IP address to the configuration device, wherein the configured IP address is different from the configured IP addresses of other servers to be configured in the local area network.

[0107] In some implementations, the IP configuration unit 11 calls the internal IP configuration command of the BMC to be configured, obtains its own configured IP address in the IP configuration message, and modifies its own initial IP address to the obtained configured IP address.

[0108] In some embodiments, both the IP configuration message and the configuration result message are transmitted in JSON (javascript object notation), submitting or returning a resource. For example, the IP configuration unit 11 feeds back the configuration result message to the command receiving unit 12, and the RESTful interface of the command receiving unit 12 returns the configuration result message data in JSON format to the operation and maintenance device via a transmission mechanism (HTTPS).

[0109] Optionally, when the IP configuration message uses the JSON format for data transmission, the IP configuration message includes a set of key-value pairs, where the key is the device serial number (SN) and the value is an object including the IP address, subnet mask, and gateway.

[0110] Each BMC serial number (SN) corresponds to an object containing an IP address, subnet mask, and gateway. The object consists of three key-value pairs.

[0111] "ipaddress": indicates the IP address of the device.

[0112] "netMask": indicates the subnet mask of the device.

[0113] "gateWay": indicates the gateway address of the device.

[0114] The IP configuration message contains multiple device serial numbers and their corresponding network configuration information.

[0115] Optionally, the configuration structure message of the response uses a simple OEM (original equipment manufacturer) response scheme, also in JSON format. It should be understood that "OEM response scheme" refers to a simple response scheme provided by the original equipment manufacturer for returning command execution results and status information.

[0116] The configuration result message of the response contains three key-value pairs:

[0117] "commandResponse": represents the command execution result, indicating the execution output or result of the IP configuration message command.

[0118] "status": indicates the status of command execution, which can be success or failure.

[0119] "detail": provides detailed information about command execution, such as the specific content of the execution result or error information.

[0120] Therefore, in this embodiment, the IP configuration message scheme, which transmits data in JSON format, includes the BMC's network configuration information. The configuration result message, using a simple OEM response scheme, returns the command execution result and status information. After obtaining the configuration result, the command scheduling unit 23 in the operation and maintenance device obtains the BMC configuration result information based on the configuration result information returned by the BMC. If the configuration fails, the command scheduling unit 23 continues to send the IP configuration message. If the BMC configuration is successful, the command scheduling unit 23 feeds the configuration result message back to the execution engine 22. The execution engine 22 then sends a ping test request to confirm whether the initial IP address is successfully accessible. Based on whether the server responds to the ping test request, it determines whether the initial IP address still exists, that is, whether there are any unconfigured BMCs. It then determines whether to send IP configuration messages to the unconfigured BMCs again until there are no more IP address conflicts. At this point, the static IP addresses of all BMCs to be configured on the server cluster are fully configured. It is understood that since the IP address of a configured BMC has changed, it will not receive subsequent IP configuration messages sent based on the initial IP address.

[0121] The above is an introduction to the operation and maintenance equipment and server provided in the embodiment of the present application. Next, based on the above content, the process of the IP address configuration method provided in the embodiment of the present application is introduced.

[0122] Figure 3 FIG. 1 shows a flow chart of an IP address configuration method provided by an embodiment of the present application. Figure 3As shown, the IP address configuration method in this embodiment is applied in Figure 1 The operation and maintenance of equipment in the application environment shown includes the following steps:

[0123] S301: Receive an IP configuration instruction, where the IP configuration instruction is used to instruct to perform IP configuration on multiple servers.

[0124] It should be understood that the IP configuration instructions in this step can be issued by the user when operating the operation and maintenance equipment. At this time, the operation and maintenance equipment establishes a connection with multiple servers with the same initial IP address in the server cluster through Redfish or UDP broadcast, and the IP configuration instructions are used to instruct the IP configuration of multiple servers with the same initial IP address, so as to start the subsequent execution action of modifying the initial IP to the configured IP address.

[0125] Optionally, before the user sends the IP configuration instruction to the operation and maintenance device, the operation and maintenance device receives the user's configuration operation on the IP configuration table.

[0126] The user's configuration operation on the IP configuration table is used to pre-configure the configuration address of the server, such as pre-configuring the static IP address of the server BMC. For example, the static IP address of the BMC is pre-configured in the IP planning table 21 by the operation and maintenance personnel based on the SN serial number of the BMC. Specifically, the IP address of each BMC can be planned and configured by the following steps:

[0127] S3011. Obtain the number of servers to be configured and the SN sequence code of each server to be configured.

[0128] In this step, the SN serial number of the BMC can be obtained by calling the Redfish interface or UDP broadcast. Alternatively, during the server BMC production stage, the number of BMCs and the SN serial number can be recorded in the IP planning table 21.

[0129] S3012. Plan the configuration IP addresses of the servers to be configured according to the number of servers to be configured and the SN sequence codes of the servers to be configured.

[0130] In this step, the available IP address segments in the server cluster are first determined, typically based on the subnet mask. For example, if a Class C address segment with a subnet mask of 255.255.255.0 is used, the available IP addresses typically range from 192.168.1.1 to 192.168.1.254. Next, based on the number of servers to be configured and the SN sequence numbers of each device, an allocation rule or algorithm is developed to plan and configure IP addresses for each device. For example, IP addresses can be allocated in sequence: BMCs are assigned IP addresses in the order of their SN sequence numbers. For example, if there are five devices requiring IP address allocation, with SN sequence numbers SN001 to SN005, then IP addresses 192.168.1.1 to 192.168.1.5 can be assigned. Different IP address allocation strategies are used depending on the device type and the hardware being configured. For example, assign the server BMC static IP address to the IP address range between 192.168.1.50 and 192.168.1.60, and assign the server static IP address to the IP address range between 192.168.1.100 and 192.168.1.110 to ensure that the generated configuration IP address is unique in the server cluster and does not conflict with the static IP addresses of other servers or BMCs.

[0131] S302. Based on the IP configuration instruction, an IP configuration message is sent to the initial IP address. The IP configuration message indicates the corresponding configured IP addresses of the multiple servers. The IP configuration message is used to instruct the server that receives the IP configuration message to change the initial IP address to the corresponding configured IP address.

[0132] In this step, the IP configuration message includes an IP configuration table that describes the correspondence between the server identifiers and the configured IP addresses of the multiple servers. Specifically, the IP configuration table includes the identifiers of each server and the configured IP addresses of each server, wherein the server identifiers and the configured IP addresses of the servers have a one-to-one correspondence. The IP configuration message is used to instruct the target server to query the IP configuration table to obtain the configured IP address of the target server, so that the target server changes its initial IP address to the configured IP address of the target server. The target server is the server that receives the IP configuration message.

[0133] Exemplarily, the configuration IP address may be a server static IP address or a server BMC static IP address. For example, in this embodiment, the configuration IP address is a BMC static IP address.

[0134] It should be understood that the operation and maintenance equipment and the server to be configured can communicate via Redfish or UDP broadcast, for example, the Redfish communication method, so the IP configuration message format can be JSON. Furthermore, IP configuration messages can be sent multiple times to servers in the server cluster with initial IP addresses to be configured to ensure that all servers to be configured complete their own IP configuration. If UDP broadcast is used, all servers in the server cluster will receive the IP configuration message, allowing all servers with the same initial IP address to complete their own IP address modification configuration at once. This reduces the number of IP configuration message transmissions and improves configuration efficiency. However, in reality, factors such as network latency and server processing power may cause inconsistent server response times. Therefore, multiple transmissions can increase the probability of the message reaching the target device, thereby more reliably completing the configuration modification. When using the Redfish communication method, servers with the same initial IP address are used to receive the IP configuration message. Due to initial IP address conflicts, only one server can receive the IP configuration message. Therefore, it is necessary to send the IP configuration message multiple times to servers in the server cluster with initial IP addresses to be configured.

[0135] Next, the specific process of "sending IP configuration messages multiple times to servers in the server cluster that have initial IP addresses to be configured" is described in detail.

[0136] Figure 4 FIG. 1 is a flow chart showing another IP address configuration method provided by an embodiment of the present application. Figure 4 As shown, the IP address configuration method in this embodiment is the same as Figure 3 The difference is that it also includes:

[0137] S303: Whether an IP configuration success response message is received in response to the IP configuration message. In one scenario, if the operation and maintenance device does not receive an IP configuration success response message in response to the IP configuration message within a preset time, step S304 is executed. In another scenario, if the operation and maintenance device receives a response message, step S305 is executed.

[0138] S304: If no IP configuration success response message is received for the IP configuration message within a preset time, the IP configuration message is sent to the initial IP address.

[0139] It should be noted that in this step, the preset time can be set between a few seconds and one minute. The specific setting can be based on factors such as network latency, device response time, and network stability. For example:

[0140] 3 seconds: For fast-responding network devices and scenarios, the 3-second preset time is usually sufficient. If no response is received within 3 seconds, it can be considered that the server IP configuration response is abnormal, that is, the server IP configuration has failed.

[0141] 10 seconds: For general network devices and network environments, a preset time of 10 seconds can balance response speed and fault tolerance.

[0142] 30 seconds: If the network connection is unstable or the network delay is large, the preset time can be appropriately extended to 30 seconds to ensure that a response can be successfully received.

[0143] In actual applications, you can start with a shorter preset time and adjust it based on the actual test results and network environment. As long as the preset time can be guaranteed, problems can be discovered in a timely manner without affecting the overall efficiency of IP address configuration due to excessive waiting time.

[0144] S305: Based on the response message, send an IP configuration message to the initial IP address.

[0145] Alternatively, whether to send an IP configuration message to the initial IP address may be determined by the following steps:

[0146] S3051. Receive an IP configuration success response message for the IP configuration message.

[0147] S3052. Based on the response message, a ping test request is sent to the initial IP address. The ping test request is used to confirm whether the initial IP address can be successfully accessed.

[0148] It should be noted that the Ping test is used to test whether two computers can communicate with each other and determine the communication delay. The Ping tool sends an ICMP (Internet Control Message Protocol) echo request message to the target device and then waits for the target device to return an ICMP echo reply message.

[0149] Specifically, the Ping tool sends an ICMP Echo Request (ping test request) message to the IP address of the target device. This message contains information such as a sequence number and timestamp. After the target device receives the Ping request, if it is able to respond, it will immediately return an ICMP Echo Reply message. This message contains the same sequence number and timestamp as the Ping request, as well as other relevant information. After the Ping tool receives the response from the target device, it will calculate the time from sending the Ping request to receiving the response. This time is the communication delay (round-trip time, RTT). The Ping tool usually displays the communication delay time and whether the response from the target device is successfully received. If the response is successfully received, it means that the target device can respond to the Ping request normally; if no response is received, it may mean that the IP address of the target device is inaccessible.

[0150] S3053: If possible, send an IP configuration message to the initial IP address.

[0151] In this step, if the initial IP address is accessible, it means that there are still servers in the server cluster whose initial IP addresses have not been modified. Therefore, IP configuration messages can continue to be sent to the initial IP address to ensure that all initial IP addresses can complete the modification of the configured IP address.

[0152] It should be understood that if the initial IP address is inaccessible, it means that all servers with the initial IP address in the server cluster have completed their own IP address configuration. Therefore, when the initial IP address is inaccessible, the IP configuration message is stopped from being sent to the initial IP address.

[0153] Alternatively, the following steps may be used to determine whether to send an IP configuration message to the initial IP address:

[0154] S3054. Record the number of times the IP configuration message is sent to the initial IP address and compare the number with a preset number, where the preset number is the number of servers with the same initial IP address. In other words, the preset number is the number of configured IP addresses pre-configured by the user in the IP configuration message. The number of servers with the same initial IP address is obtained as described in step S3011 and will not be repeated here.

[0155] S3055: If no IP configuration success response message is received for the IP configuration message within the preset time, the IP configuration message is sent to the initial IP address again, and this sending is not counted in the number of times the IP configuration message is sent.

[0156] S3056. Receive an IP configuration success response message for the IP configuration message.

[0157] S3057: Based on the response message and the number of transmissions being less than the preset number, send an IP configuration message to the initial IP address.

[0158] S3058. Based on the response message and the number of transmissions being equal to the preset number, stop sending the IP configuration message to the initial IP address.

[0159] In this way, the number of times the IP configuration message is sent is determined by the number of servers whose initial IP addresses need to be modified. In this way, the corresponding number of IP configuration messages are sent to increase the possibility of successfully completing the configuration IP address modification for all servers that need to modify their initial IP addresses.

[0160] Figure 5 FIG. 1 shows a flow chart of another IP address configuration method provided by an embodiment of the present application. Figure 5 As shown, the IP address configuration method in this embodiment is applied in Figure 1 The server cluster in the application environment shown may include the following steps:

[0161] S504: The target server receives the IP configuration message from the operation and maintenance device, and searches the IP configuration table in the IP configuration message to obtain the configured IP address of the target server.

[0162] In this step, the target server is the server among the multiple servers that received the IP configuration message. After receiving the IP configuration message, the target server obtains its own configured IP address from the IP configuration message based on the mapping relationship between its own SN sequence code and the configured IP address. Specifically, this can be done by calling the target server's internal IP configuration command to obtain its own configured IP address from the IP configuration message.

[0163] S505: Change the initial IP address of the target server to the corresponding configured IP address.

[0164] In this step, the initial IP address of the target server can be modified to the obtained configured IP address by calling the internal IP configuration command of the target server. It should be noted that there will be corresponding IP configuration commands or interfaces inside the target server (server to be configured), such as the HTTP / HTTPS-based RESTful API interface in the Redfish protocol, and the IP address of the device can be modified by calling these commands or interfaces. By calling the internal IP configuration command, the IP address of the server to be configured can be modified simply and effectively without the need for complex external interaction or configuration processes. Moreover, the internal IP configuration command is usually provided and maintained by the device manufacturer, so it has high reliability and stability, and is not prone to configuration errors or failures. The internal IP configuration command can be called in batches in combination with automated scripts or programs to achieve rapid configuration of a large number of server devices and improve work efficiency.

[0165] Figure 6 FIG. 1 is a flow chart showing another IP address configuration method provided by an embodiment of the present application. Figure 6 As shown, the IP address configuration method in this embodiment is applied in Figure 1 In the application environment shown, the following steps may be included:

[0166] S401: Receive a user's configuration operation on an IP configuration table.

[0167] In this step, the user's configuration operation on the IP configuration table is used to pre-configure the configuration address of the server, such as pre-configuring the static IP address of the server BMC. Exemplarily, the static IP address of the BMC is pre-configured in the IP planning table 21 by the operation and maintenance personnel according to the SN serial number of the BMC.

[0168] S402: Receive IP configuration instructions sent by the user.

[0169] The principle of this step is the same as that of the above step S301 and will not be repeated here.

[0170] S403: Based on the IP configuration instruction, send an IP configuration message to the initial IP address.

[0171] The principle of this step is detailed in the above step S302 and will not be repeated here.

[0172] S404: The target server receives the IP configuration message from the operation and maintenance device, and searches the IP configuration table in the IP configuration message to obtain the configured IP address of the target server.

[0173] S405: Change the initial IP address of the target server to the corresponding configured IP address.

[0174] S406: Feedback the target server IP address configuration result to the operation and maintenance device.

[0175] S407. Based on the configuration result message returned by the target server, determine whether to continue sending the IP configuration message to the initial IP address. If the initial IP address does not exist, stop sending the IP configuration message. If the initial IP address exists, execute step S403.

[0176] In this step, if the IP address configuration fails, the IP configuration message is continued to be sent. Specifically, if no IP configuration success response message is received for the IP configuration message within a preset time, the IP configuration message is sent to the initial IP address.

[0177] If the target server's IP address is successfully configured, the operation and maintenance equipment will send IP configuration messages to the servers to be configured again, depending on whether the initial IP address still exists, that is, whether there are any servers that have not been fully configured, until the initial IP address no longer exists and the configured IP addresses of all servers to be configured are fully configured. In other words, the operation and maintenance equipment will respond to the configuration results returned by the target server and determine whether the initial IP address exists, and then determine whether to continue sending IP configuration messages to the unconfigured servers to be configured, until the initial IP addresses of all servers to be configured are all modified to their corresponding configured IP addresses.

[0178] Alternatively, in step S407, the number of times the IP configuration message is sent may be determined according to the number of servers to be configured obtained by the user in step S401, so that the IP addresses of all servers to be configured are configured.

[0179] The IP address configuration method provided in the embodiment of the present application connects multiple servers to be configured to the same network, such as an IPv4 network. Under the condition of reducing operation and maintenance conditions, the IP configuration message sent triggers each server to be configured to modify its own initial IP address, so that the modified configuration IP addresses are different from each other, thereby avoiding address conflicts between devices and realizing batch configuration of IP addresses without third-party software. In other words, the IP address configuration method provided in the embodiment of the present application implements batch configuration of server IP based on the default IP, solving the problem of being unable to batch configure device IP in scenarios where IPv6 is not supported, there is no DHCP server, or static IP configuration is required.

[0180] It is understandable that the size of the serial number of each step in the above-mentioned embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. In addition, in some possible implementations, the steps in the above-mentioned embodiments can be selectively executed according to actual conditions, and can be partially executed or fully executed, which is not limited here. In addition, all or part of any features of any of the above-mentioned embodiments can be freely and arbitrarily combined without contradiction; the combined technical solutions are also within the scope of this application.

[0181] Example 1

[0182] Example 1 of the present application provides an IP address configuration method. The configured address is a static IP address of a server BMC. Preliminary preparation includes establishing a configuration system environment, which includes a server to be configured and an operation and maintenance device. The server to be configured is the server's hardware BMC. The following operations are performed on the operation and maintenance device side:

[0183] S51. Start the operation and maintenance device, use the operation and maintenance device to configure the information of the server to be configured, and add the server to be configured to a local area network through its own local area network side interface (such as Ethernet interface).

[0184] Figure 7(a) shows the first IP configuration message sent by the operation and maintenance device to the server to be configured. As shown in Figure 7(a), the IP planning table of the operation and maintenance device stores the configuration information of all servers to be configured. This configuration information includes the SN sequence number of the information to be configured and the static IP address corresponding to the SN sequence number. For example, the SN sequence number of the first server to be configured is ABCDE0, and the corresponding static IP address is 10.10.10.0.

[0185] In this implementation, there are seven servers to be configured, all with the same default IP address 192.168.2.100. Each server to be configured has a different serial number, and the SN serial numbers from left to right are "ABCDE0-6".

[0186] When the operation and maintenance equipment sends the IP configuration message for the first time (shown as a Redfish request in Figure 7(a)), due to the default IP address conflict, the IP configuration message is randomly sent to the second server to be configured. The IP configuration message carries the configuration information of all servers to be configured stored in the IP planning table. Therefore, no matter which server to be configured receives the IP configuration message, it can obtain its own configured IP address from the IP configuration message and trigger its own configuration IP address configuration action. For example, after receiving the planned configuration information, the BMC will find its own configured IP address information to be configured through its own SN serial number, and then execute the IP configuration to change its default IP address 192.168.2.100 to a static IP address 10.10.10.1.

[0187] S52: In response to the configuration result returned by the second server to be configured, an IP configuration message is sent for the second time to start the second configuration.

[0188] Figure 7(b) shows a schematic diagram of the operation and maintenance device sending an IP configuration message to the server to be configured for the second time. As shown in Figure 7(b), in this step, the returned configuration result shows that the default IP address of the second server to be configured has been successfully changed to the configured IP address 10.10.10.0, and the second IP configuration message sent is received by the fifth server to be configured. Figure 7(c) shows a schematic diagram of the operation and maintenance device completing the IP address configuration after sending the IP configuration message to the server to be configured for the second time. As shown in Figure 7(c), the fifth server to be configured changes its default IP address 192.168.2.100 to the configured IP address 10.10.10.4 according to the IP configuration message.

[0189] S53: Send IP configuration messages multiple times. After sending 7 times, all servers to be configured have completed the IP address configuration.

[0190] In summary, an IP configuration message is sent to the server to be configured, and the request includes configuration information, such as the device's SN sequence number and the corresponding configuration IP address. Upon receiving the IP configuration message, the server to be configured modifies its own IP address based on the configuration IP address in the configuration message, thereby avoiding address conflicts between devices. The IP configuration message can be sent multiple times until the initial IP addresses of all servers to be configured are modified to the configuration IP address. This address configuration method is independent of a specific network environment or DHCP server, making it suitable for scenarios where IPv6 is unavailable or a DHCP server is lacking, thus expanding its scope of application. Furthermore, IP configuration messages can be sent to multiple devices at once, improving device configuration efficiency and saving manpower and time. The entire configuration process is fully automated, eliminating the need for manual intervention, reducing errors and configuration time. The configuration message includes the device's SN sequence number and configuration IP address, ensuring configuration accuracy and avoiding configuration errors or confusion. This method effectively addresses the needs of large-scale device configuration, improving delivery and management efficiency.

[0191] Based on the above, see Figure 8 The present application also provides an operation and maintenance device 100, comprising a bus 101, a processor 102, a memory 103, and a communication interface 104. The processor 102, the memory 103, and the communication interface 104 communicate with each other via the bus 101. The operation and maintenance device 100 may be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the operation and maintenance device 100.

[0192] The bus 101 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The bus 101 may include a path for transmitting information between various components of the test device 10 (eg, the memory 103, the processor 102, and the communication interface 104).

[0193] The processor 102 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0194] The memory 103 may include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0195] The memory 103 stores executable program instructions, and the processor 102 executes the executable program instructions to respectively implement the IP address configuration methods involved in the above embodiments.

[0196] The communication interface 103 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the operation and maintenance device 100 and other devices or a communication network.

[0197] In some possible implementations, the operation and maintenance device 100 and the server to be configured may be connected via a network, which may be a wide area network or a local area network.

[0198] Figure 9 A possible implementation of a server cluster is shown. Figure 9 As shown, the operation and maintenance device 100 and one or more servers 200 are connected via a network. Specifically, the connection to the network is achieved through a communication interface in each server 200. In this possible implementation, the memory 103 in the operation and maintenance device 100 stores instructions for the functions of the IP planning table 21, the execution engine 22, and the command scheduling unit 23. Simultaneously, the memory 103 in the server 200 stores instructions for the functions of the command receiving unit 11 and the IP configuration unit 12.

[0199] The present application also provides a computer-readable storage medium. The computer-readable storage medium is used to store computer program instructions. When the computer program instructions are executed on a test device, the test device executes the IP address configuration method involved in the above embodiment. The computer-readable storage medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive).

[0200] The present application also provides a computer program product comprising instructions, which, when executed on a test device, causes the test device to execute the IP address configuration method described in the above embodiment.

[0201] Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present application. Those skilled in the art should understand that, although the present application has been described in detail with reference to the aforementioned embodiments, the technical solutions described in the aforementioned embodiments may be modified or some of the technical features thereof may be replaced with equivalents. However, such modifications or replacements do not deviate from the spirit and scope of the technical solutions in the various embodiments of the present application.

Claims

1. A method for configuring an IP address, characterized in that: Applied to a computing device, the computing device is in communication connection with a plurality of servers, the initial IP addresses of the plurality of servers are the same, the method comprising: Receiving an IP configuration instruction, wherein the IP configuration instruction is used to instruct to perform IP configuration on the multiple servers; Based on the IP configuration instruction, an IP configuration message is sent to the initial IP address, wherein the IP configuration message indicates the configured IP addresses corresponding to each of the multiple servers, and the IP configuration message is used to instruct the server that receives the IP configuration message to change the initial IP address to the corresponding configured IP address.

2. The method according to claim 1, characterized in that The step of sending an IP configuration message to the initial IP address based on the IP configuration instruction further comprises: Receiving an IP configuration success response message for the IP configuration message; Based on the response message, the IP configuration message is sent to the initial IP address.

3. The method according to claim 1, characterized in that The step of sending an IP configuration message to the initial IP address based on the IP configuration instruction further comprises: Receiving an IP configuration success response message for the IP configuration message; Based on the response message, a ping test request is sent to the initial IP address, where the ping test request is used to confirm whether the initial IP address can be successfully accessed; If possible, the IP configuration message is sent to the initial IP address.

4. The method according to claim 1, characterized in that: The step of sending an IP configuration message to the initial IP address based on the IP configuration instruction further comprises: If no IP configuration success response message for the IP configuration message is received within a preset time, the IP configuration message is sent to the initial IP address.

5. The method according to claim 4, characterized in that The step of sending an IP configuration message to the initial IP address based on the IP configuration instruction further comprises: Record the number of times the IP configuration message is sent to the initial IP address, and compare the number of times with a preset number, wherein the preset number is the number of servers with the same initial IP address; Receiving an IP configuration success response message for the IP configuration message; Based on the response message and the number of transmissions being less than the preset number of times, sending the IP configuration message to the initial IP address; Based on the response message and the number of sending times being equal to the preset number of times, stopping sending the IP configuration message to the initial IP address.

6. The method according to claim 5, characterized in that The recording of the number of times the IP configuration message is sent to the initial IP address further includes: If no IP configuration success response message is received for the IP configuration message within a preset time, the IP configuration message is sent to the initial IP address again, and the number of times the IP configuration message is sent is not counted.

7. The method according to claim 1, characterized in that The IP configuration message includes an IP configuration table, and the IP configuration table describes the correspondence between the server identifiers of the multiple servers and the configured IP addresses.

8. The method according to any one of claims 1 to 7, characterized in that: The computing device communicates with the multiple servers in any one of UDP and Redfish.

9. A method for configuring an IP address, characterized in that: The method comprises: The target server receives an IP configuration message from a computing device, wherein the IP configuration message indicates a configuration IP address corresponding to each of the multiple servers, the target server is one of the multiple servers, and the initial IP addresses of the multiple servers are the same; The target server changes the IP address of the target server from the initial IP address to a corresponding configured IP address based on the IP configuration message.

10. A computing device, characterized in that include: Memory and processor; The memory is coupled to the processor; The memory is used to store programs; The processor is used to call the program stored in the memory to execute the method according to any one of claims 1-8.

Citation Information

Cited By

  • Network communication method

    EP4794298A1