An address configuration method, apparatus, device, and machine-readable storage medium

By sending Ping commands in the server cluster to obtain the MAC address, generating the local link address and querying the configuration table, and automatically configuring the target IP address, it solves the communication abnormality caused by the same initial HDM IP address, and improves the modification efficiency.

CN115633013BActive Publication Date: 2025-08-05XINHUASAN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211130124.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-15
Publication Date
2025-08-05
Estimated Expiration
2042-09-15

AI Technical Summary

Technical Problem

In the server cluster, the same initial HDM IP address leads to communication abnormalities, and the existing manual modification is inefficient and has a large workload.

Method used

By sending Ping commands to the initial HDM IP address, obtaining the MAC address of the peer device, generating the local link address for communication, querying the configuration table to obtain the target IP address, and performing it cycles until the response cannot be received, automatically configure the IP address of the server cluster.

Benefits of technology

It realizes efficient and automatic configuration of the IP address of the server cluster, improves modification efficiency and reduces manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115633013B_ABST
    Figure CN115633013B_ABST
Patent Text Reader

Abstract

The present disclosure provides an address configuration method, apparatus, device, and machine-readable storage medium. The method includes: sending a Ping command to an initial address, obtaining the MAC address of a peer device based on a response; generating a local link based on MAC conversion, communicating with the peer device through the local link to obtain device information; querying a configuration table based on the device information to obtain the corresponding target address, and modifying the address of the peer device to the target address; looping through the above steps until no response meeting preset requirements regarding the Ping command is received after sending a Ping command to the initial address. Through the technical solution of the present disclosure, a command communication is sent to the initial address, and the MAC address is obtained based on the response, thereby obtaining the device information of the peer device. This allows the target address that the peer device should be configured with to be queried and obtained, and the address of the independent device is then configured as the target IP address. After the loop, the addresses of all servers in the cluster can be automatically configured as required.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technologies, and in particular to an address configuration method, apparatus, device, and machine-readable storage medium. Background Art

[0002] HDM (Hardware Device Managenet) is a server hardware management system that integrates hardware and software into a built-in management system. It provides full lifecycle monitoring, management, and control of server hardware devices, helping customers achieve smarter server operations and more efficient lifecycle management. The HDM IP address is the server's out-of-band hardware device management IP address. This IP address allows you to log in to the web interface and monitor, manage, and control the server hardware throughout its lifecycle.

[0003] When a server cluster containing a large number of servers is delivered, all servers initially have the same HDM IP address, preventing proper communication and access. Changing the HDM IP address is a crucial step in the hardware initialization process. Currently, this is primarily done manually, using portable devices, SSH, or the web to modify each server individually. However, this method is inefficient and labor-intensive. Summary of the Invention

[0004] In view of this, the present disclosure provides an address configuration method, apparatus, electronic device, and machine-readable storage medium to improve the problem of low efficiency in modifying the initial HDM IP address.

[0005] The specific technical solutions are as follows:

[0006] The present disclosure provides an address configuration method, which is applied to a management device of a server cluster device, wherein the server cluster device includes several servers configured with the same initial HDM IP address. The method includes: sending a Ping command to the initial HDM IP address, and obtaining a MAC address of a peer device based on a response; generating a local link address based on the MAC address conversion, and obtaining device information through HDM communication with the peer device via the local link address; querying a configuration table based on the device information to obtain a corresponding target IP address, and modifying the HDM IP address of the peer device to the target IP address; and looping through the above steps until no response that meets preset requirements regarding the Ping command is received after sending a Ping command to the initial HDM IP address; the peer device is a server configured with the initial HDM IP address and included in the server cluster device.

[0007] As a technical solution, the method of sending a Ping command to the initial HDM IP address and obtaining the MAC address of the opposite device according to the response includes: checking for duplicates in the MAC address cache pool based on the obtained MAC address of the opposite device, and if there is a duplicate, cleaning the MAC address resolution cache and then re-executing the step of sending a Ping command to the initial HDM IP address and obtaining the MAC address of the opposite device according to the response; the MAC address recorded in the MAC address cache pool is the MAC address of the opposite device obtained based on the duplicate check and no duplicate is found.

[0008] As a technical solution, the method of generating a local link address based on MAC address conversion and obtaining device information through HDM communication with the opposite device through the local link address includes: generating a local link address based on MAC address conversion and obtaining the device SN serial number through HDM communication with the opposite device through the local link address; querying the configuration table according to the device information to obtain the corresponding target IP address and modifying the HDM IP address of the opposite device to the target IP address includes: querying the configuration table according to the device SN serial number to obtain the corresponding target IP address and modifying the HDM IP address of the opposite device to the target IP address, wherein the configuration table includes the device SN serial numbers and corresponding target IP addresses of each server in the server cluster, and the configuration table is a pre-configured configuration table.

[0009] As a technical solution, the above steps are executed in a loop until no response that meets preset requirements is received regarding the Ping command after a Ping command is sent to the initial HDM IP address, including: after a preset number of consecutive Ping commands are sent to the initial HDM IP address, no response is received from a peer device whose MAC address is different from the MAC address associated with the received response, it is considered that there is no server in the server cluster that needs to modify the initial HDM IP address, and the execution of the loop steps is stopped.

[0010] The present disclosure also provides an address configuration device, which is applied to a management device of a server cluster device, wherein the server cluster device includes several servers configured with the same initial HDM IP address, and the method includes: an exploration module, which is used to send a Ping command to the initial HDM IP address and obtain the MAC address of the opposite device according to the response; an information module, which is used to generate a local link address according to the MAC address conversion and obtain device information through the HDM communication with the opposite device through the local link address; a configuration module, which is used to query a configuration table according to the device information to obtain the corresponding target IP address and modify the HDM IP address of the opposite device to the target IP address; a loop module, which is used to execute the above modules in a loop until no response that meets the preset requirements is received regarding the Ping command after sending the Ping command to the initial HDM IP address; the opposite device is a server configured with the initial HDM IP address and included in the server cluster device.

[0011] As a technical solution, the method of sending a Ping command to the initial HDM IP address and obtaining the MAC address of the opposite device according to the response includes: checking for duplicates in the MAC address cache pool based on the obtained MAC address of the opposite device, and if there is a duplicate, cleaning the MAC address resolution cache and then re-executing the step of sending a Ping command to the initial HDM IP address and obtaining the MAC address of the opposite device according to the response; the MAC address recorded in the MAC address cache pool is the MAC address of the opposite device obtained based on the duplicate check and no duplicate is found.

[0012] As a technical solution, the method of generating a local link address based on MAC address conversion and obtaining device information through HDM communication with the opposite device through the local link address includes: generating a local link address based on MAC address conversion and obtaining the device SN serial number through HDM communication with the opposite device through the local link address; querying the configuration table according to the device information to obtain the corresponding target IP address and modifying the HDM IP address of the opposite device to the target IP address includes: querying the configuration table according to the device SN serial number to obtain the corresponding target IP address and modifying the HDM IP address of the opposite device to the target IP address, wherein the configuration table includes the device SN serial numbers and corresponding target IP addresses of each server in the server cluster, and the configuration table is a pre-configured configuration table.

[0013] As a technical solution, the above steps are executed in a loop until no response that meets preset requirements is received regarding the Ping command after a Ping command is sent to the initial HDM IP address, including: after a preset number of consecutive Ping commands are sent to the initial HDM IP address, no response is received from a peer device whose MAC address is different from the MAC address associated with the received response, it is considered that there is no server in the server cluster that needs to modify the initial HDM IP address, and the execution of the loop steps is stopped.

[0014] The present disclosure also provides an electronic device, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the aforementioned address configuration method.

[0015] The present disclosure also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the aforementioned address configuration method.

[0016] The above technical solution provided by the present disclosure brings at least the following beneficial effects:

[0017] Send a command communication to the initial HDM IP address, obtain the MAC address based on the response, and then obtain the device information of the opposite device, so as to query and obtain the target IP address that the opposite device should be configured with, and then configure the HDM IP address of the independent device as the target IP address. After the cycle, the HDM IP addresses of all servers in the cluster can be automatically configured as required, with high efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments of the present disclosure or the description of the prior art. Obviously, the drawings described below are only some of the embodiments recorded in the present disclosure. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present disclosure.

[0019] Figure 1 is a flow chart of an address configuration method in one embodiment of the present disclosure;

[0020] Figure 2 is a structural diagram of an address configuration device in one embodiment of the present disclosure;

[0021] Figure 3 It is a hardware structure diagram of an electronic device in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0022] The terms used in the embodiments of the present disclosure are intended only to describe specific embodiments and are not intended to limit the present disclosure. The singular forms "a," "an," "the," and "the" used in the present disclosure and claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to any or all possible combinations of one or more of the associated listed items.

[0023] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present disclosure, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" used may be interpreted as "at the time of" or "when" or "in response to determining".

[0024] In one embodiment, the BMC addresses of all servers are set to DHCP mode by factory default, not static mode. Relying on a DHCP server, a dynamic IP address is first assigned to the server. An address pool is pre-allocated for the server to be configured, and the address pool size is initially set at 50. When the server HDM to be configured is connected to the network, it will first obtain a temporary IP in this IP address pool through DHCP to establish temporary communication with the DHCP server. The DHCP server will then detect this client and actively obtain its serial number SN. Based on this SN, it will retrieve its corresponding static IP in the configuration file (IP.txt) uploaded by the user before. The DHCP server will then configure this static IP to the client. After the client obtains the static IP, it will turn off its DHCP-client service. After all clients are configured, the DHCP server will turn off its DHCP-server service. However, the default IP mode of the server is DHCP mode, which will have a dynamic IP, a different initial IP, and a DHCP server needs to be set up in advance in the environment. Relying on a DHCP server to assign a dynamic IP is prone to IP conflicts with the IP to be modified, and the risk of uncontrollability is relatively high.

[0025] In view of this, the present disclosure provides an address configuration method, apparatus, electronic device, and machine-readable storage medium to improve the problem of low efficiency in modifying the initial HDM IP address.

[0026] Specifically, the technical solution is described below.

[0027] In one embodiment, the present disclosure provides an address configuration method, which is applied to a management device of a server cluster device, wherein the server cluster device includes several servers configured with the same initial HDM IP address, and the method includes: sending a Ping command to the initial HDM IP address, and obtaining the MAC address of the opposite device based on the response; generating a local link address based on the MAC address conversion, and obtaining device information through the HDM communication with the opposite device through the local link address; obtaining the corresponding target IP address based on the device information query configuration table, and modifying the HDM IP address of the opposite device to the target IP address; looping through the above steps until no response to the Ping command that meets preset requirements is received after sending the Ping command to the initial HDM IP address; the opposite device is the server configured with the initial HDM IP address and included in the server cluster device.

[0028] Specifically, if Figure 1 , including the following steps:

[0029] Step S11, sending a Ping command to the initial HDM IP address, and obtaining the MAC address of the peer device based on the response;

[0030] Step S12: Generate a local link address based on the MAC address conversion, and obtain device information through HDM communication with the peer device via the local link address;

[0031] Step S13, query the configuration table according to the device information to obtain the corresponding target IP address, and modify the HDM IP address of the peer device to the target IP address;

[0032] Step S14, the above steps are executed in a loop until no response meeting preset requirements is received after sending a Ping command to the initial HDM IP address.

[0033] Send a command communication to the initial HDM IP address, obtain the MAC address based on the response, and then obtain the device information of the opposite device, so as to query and obtain the target IP address that the opposite device should be configured with, and then configure the HDM IP address of the independent device as the target IP address. After the cycle, the HDM IP addresses of all servers in the cluster can be automatically configured as required, with high efficiency.

[0034] In one embodiment, the step of sending a Ping command to the initial HDM IP address and obtaining the MAC address of the peer device based on the response includes: checking for duplicates in the MAC address cache pool based on the obtained MAC address of the peer device, and if there are duplicates, cleaning the MAC address resolution cache and then re-executing the step of sending a Ping command to the initial HDM IP address and obtaining the MAC address of the peer device based on the response; the MAC address recorded in the MAC address cache pool is the MAC address of the peer device obtained based on the duplicate check and finding no duplicates.

[0035] In one embodiment, the generating of a local link address according to the MAC address conversion and obtaining of device information through the HDM communication with the peer device through the local link address include: the generating of a local link address according to the MAC address conversion and obtaining of the device SN serial number through the HDM communication with the peer device through the local link address; the querying of the configuration table according to the device information to obtain the corresponding target IP address and modifying the HDM IP address of the peer device to the target IP address include: querying the configuration table according to the device SN serial number to obtain the corresponding target IP address and modifying the HDM IP address of the peer device to the target IP address, wherein the configuration table includes the device SN serial numbers and corresponding target IP addresses of each server in the server cluster, and the configuration table is a pre-configured configuration table.

[0036] In one embodiment, the above steps are executed in a loop until no response that meets preset requirements is received regarding the Ping command after the Ping command is sent to the initial HDM IP address, including: after continuously sending the Ping command to the initial HDM IP address a preset number of times, no response is received from a peer device whose MAC address is different from the MAC address associated with the received response, it is determined that there is no server in the server cluster that needs to modify the initial HDM IP address, and the loop steps are stopped.

[0037] When initially deploying a server cluster, multiple switches can be connected under the Layer 2 network, but they must be routed to the same router to ensure that the server link-local addresses are accessible. The management device is assigned an IP address in the same network segment as the initial HDM IP address 192.168.1.2 (or any other suitable IP address, such as 192.168.2.2).

[0038] Pre-configure the configuration table for batch configuration of HDM IP addresses. The configuration table includes the device SN serial number and the corresponding username and password, and the target IP address to be modified. Each target IP address is different.

[0039] The device's MAC address is obtained from the initial HDM IP address 192.168.1.2. A ping is performed on the initial HDM IP address. If the ping succeeds, the address resolution protocol (arp –a 192.168.1.2) is used to query the peer device's MAC address and record the MAC address in the MAC address cache. A link-local address (fe80) is generated for the MAC address, concatenated with the network port number. The link-local address is used to communicate with the HDM server on the peer device to obtain the server's serial number. This serial number is then used to map the target IP address to the desired address. The HDM IP address of the peer device server is then configured. IP configuration can be performed in a separate thread, which will then proceed to find the next MAC address, further improving efficiency. Before finding the next MAC address, clear the original address resolution ARP cache, then create a new address resolution cache by pinging the IP address, and then use "arp-a 192.168.1.2" to obtain the MAC address of another server. If the MAC address of the obtained peer device is repeated in the MAC address cache pool, repeat the steps until the cycle is repeated several times, such as 12 times. If no new MAC is found within a preset time, such as two minutes, it is considered that there is no server in the environment whose initial HDM IP address still needs to be modified.

[0040] In one embodiment, the present disclosure also provides an address configuration device, such as Figure 2 , applied to a management device of a server cluster device, the server cluster device includes several servers configured with the same initial HDM IP address, the method includes: an exploration module 21, used to send a Ping command to the initial HDM IP address, and obtain the MAC address of the opposite device according to the response; an information module 22, used to generate a local link address according to the MAC address conversion, and obtain device information through the HDM communication with the opposite device through the local link address; a configuration module 23, used to query the configuration table according to the device information to obtain the corresponding target IP address, and modify the HDM IP address of the opposite device to the target IP address; a loop module 24, used to cause the above modules to execute in a loop until no response to the Ping command that meets the preset requirements is received after sending the Ping command to the initial HDM IP address; the opposite device is the server configured with the initial HDM IP address and included in the server cluster device.

[0041] In one embodiment, the step of sending a Ping command to the initial HDM IP address and obtaining the MAC address of the peer device based on the response includes: checking for duplicates in the MAC address cache pool based on the obtained MAC address of the peer device, and if there are duplicates, cleaning the MAC address resolution cache and then re-executing the step of sending a Ping command to the initial HDM IP address and obtaining the MAC address of the peer device based on the response; the MAC address recorded in the MAC address cache pool is the MAC address of the peer device obtained based on the duplicate check and finding no duplicates.

[0042] In one embodiment, the generating of a local link address according to the MAC address conversion and obtaining of device information through the HDM communication with the peer device through the local link address include: the generating of a local link address according to the MAC address conversion and obtaining of the device SN serial number through the HDM communication with the peer device through the local link address; the querying of the configuration table according to the device information to obtain the corresponding target IP address and modifying the HDM IP address of the peer device to the target IP address include: querying the configuration table according to the device SN serial number to obtain the corresponding target IP address and modifying the HDM IP address of the peer device to the target IP address, wherein the configuration table includes the device SN serial numbers and corresponding target IP addresses of each server in the server cluster, and the configuration table is a pre-configured configuration table.

[0043] In one embodiment, the above steps are executed in a loop until no response that meets preset requirements is received regarding the Ping command after the Ping command is sent to the initial HDM IP address, including: after continuously sending the Ping command to the initial HDM IP address a preset number of times, no response is received from a peer device whose MAC address is different from the MAC address associated with the received response, it is determined that there is no server in the server cluster that needs to modify the initial HDM IP address, and the loop steps are stopped.

[0044] The device implementation is the same as or similar to the corresponding method implementation, and will not be repeated here.

[0045] In one embodiment, the present disclosure provides an electronic device, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the aforementioned address configuration method. From a hardware perspective, the hardware architecture diagram can be found in Figure 3 shown.

[0046] In one embodiment, the present disclosure provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the aforementioned address configuration method.

[0047] Here, the machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage media, or a combination thereof.

[0048] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.

[0049] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0050] Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, systems, or computer program products. Thus, the present disclosure may take the form of a fully hardware implementation, a fully software implementation, or an implementation combining software and hardware. Furthermore, embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

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

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

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

[0054] Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, systems, or computer program products. Thus, the present disclosure may take the form of a fully hardware implementation, a fully software implementation, or an implementation combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (which may include, but are not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0055] The foregoing is merely an embodiment of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure are intended to be included within the scope of the claims of the present disclosure.

Claims

1. An address configuration method, characterized in that: A management device applied to a server cluster device, wherein the server cluster device includes a plurality of servers configured with the same initial HDM IP address, and the method includes: Send a Ping command to the initial HDM IP address and obtain the MAC address of the remote device based on the response; Generates a local link address based on MAC address conversion, and communicates with the HDM of the peer device through the local link address to obtain device information; Query the configuration table according to the device information to obtain the corresponding target IP address, and modify the HDM IP address of the other device to the target IP address. The configuration table includes the device information of each server in the server cluster and the corresponding target IP address; Repeat the above steps until no response that meets the preset requirements is received after sending a ping command to the initial HDM IP address; The opposite-end device is a server included in the server cluster device and configured with the initial HDM IP address.

2. The method according to claim 1, characterized in that The step of sending a Ping command to the initial HDM IP address and obtaining the MAC address of the peer device according to the response includes: The MAC address cache pool is checked for duplicates based on the obtained MAC address of the peer device. If a duplicate exists, the MAC address resolution cache is cleared and the ping command is sent to the initial HDM IP address again to obtain the MAC address of the peer device based on the response. The MAC addresses recorded in the MAC address cache pool are recorded based on the MAC addresses of the opposite-end devices that are obtained without duplication during duplication checking.

3. The method according to claim 1, characterized in that The generating of a local link address according to the MAC address conversion and acquiring device information through HDM communication with the peer device via the local link address includes: The local link address is generated according to the MAC address conversion, and the device SN serial number is obtained by communicating with the HDM of the opposite device through the local link address; The step of querying the configuration table according to the device information to obtain the corresponding target IP address and modifying the HDM IP address of the peer device to the target IP address includes: Query the configuration table according to the device SN serial number to obtain the corresponding target IP address, and modify the HDM IP address of the other device to the target IP address. The configuration table includes the device SN serial number and corresponding target IP address of each server in the server cluster, and the configuration table is a pre-configured configuration table.

4. The method according to claim 1, wherein The above steps are executed cyclically until no response meeting preset requirements is received after sending a Ping command to the initial HDM IP address, including: After sending the ping command to the initial HDM IP address a preset number of times, if no response is received from the opposite device whose MAC address is different from the MAC address associated with the received response, it is considered that there is no server in the server cluster that needs to modify the initial HDM IP address, and the execution of the loop step is stopped.

5. An address configuration device, characterized in that: A management device applied to a server cluster device, wherein the server cluster device includes a plurality of servers configured with the same initial HDM IP address, the device comprising: The discovery module is used to send a Ping command to the initial HDM IP address and obtain the MAC address of the peer device based on the response; An information module is used to convert a MAC address into a local link address and communicate with the HDM of the peer device to obtain device information through the local link address. A configuration module is used to query a configuration table according to the device information to obtain a corresponding target IP address, and modify the HDMIP address of the opposite device to the target IP address. The configuration table includes the device information of each server in the server cluster and the corresponding target IP address; A loop module, configured to execute the above modules in a loop until no response meeting preset requirements is received after a Ping command is sent to the initial HDM IP address; The opposite-end device is a server included in the server cluster device and configured with the initial HDM IP address.

6. The device according to claim 5, characterized in that The step of sending a Ping command to the initial HDM IP address and obtaining the MAC address of the peer device according to the response includes: The MAC address cache pool is checked for duplicates based on the obtained MAC address of the peer device. If a duplicate exists, the MAC address resolution cache is cleared and the ping command is sent to the initial HDM IP address again to obtain the MAC address of the peer device based on the response. The MAC addresses recorded in the MAC address cache pool are recorded based on the MAC addresses of the opposite-end devices that are obtained without duplication during duplication checking.

7. The device according to claim 5, characterized in that The generating of a local link address according to the MAC address conversion and acquiring device information through HDM communication with the peer device via the local link address includes: The local link address is generated according to the MAC address conversion, and the device SN serial number is obtained by communicating with the HDM of the opposite device through the local link address; The step of querying the configuration table according to the device information to obtain the corresponding target IP address and modifying the HDM IP address of the peer device to the target IP address includes: Query the configuration table according to the device SN serial number to obtain the corresponding target IP address, and modify the HDM IP address of the other device to the target IP address. The configuration table includes the device SN serial number and corresponding target IP address of each server in the server cluster, and the configuration table is a pre-configured configuration table.

8. The device according to claim 5, characterized in that The above steps are executed cyclically until no response meeting preset requirements is received after sending a Ping command to the initial HDM IP address, including: After sending the ping command to the initial HDM IP address a preset number of times, if no response is received from the opposite device whose MAC address is different from the MAC address associated with the received response, it is considered that there is no server in the server cluster that needs to modify the initial HDM IP address, and the execution of the loop step is stopped.

9. An electronic device, characterized in that: include: A processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the method according to any one of claims 1 to 4.

10. A machine-readable storage medium, characterized in that The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Communication device, communication system, and communication method

    US20140019641A1

  • Duplicate address detection for global IP address or range of link local IP addresses

    US20200213269A1