CN108574741B - Method for detecting IP address and physical address - Google Patents

Method for detecting IP address and physical address Download PDF

Info

Publication number
CN108574741B
CN108574741B CN201710131787.9A CN201710131787A CN108574741B CN 108574741 B CN108574741 B CN 108574741B CN 201710131787 A CN201710131787 A CN 201710131787A CN 108574741 B CN108574741 B CN 108574741B
Authority
CN
China
Prior art keywords
address
test
tested
unit
under test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710131787.9A
Other languages
Chinese (zh)
Other versions
CN108574741A (en
Inventor
李岳颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitac Computer Shunde Ltd
Mitac Computing Technology Corp
Original Assignee
Mitac Computer Shunde Ltd
Mitac Computing Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitac Computer Shunde Ltd, Mitac Computing Technology Corp filed Critical Mitac Computer Shunde Ltd
Priority to CN201710131787.9A priority Critical patent/CN108574741B/en
Publication of CN108574741A publication Critical patent/CN108574741A/en
Application granted granted Critical
Publication of CN108574741B publication Critical patent/CN108574741B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5061Pools of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/69Types of network addresses using geographic information, e.g. room number

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

A method for detecting IP address and physical address includes the following steps: (A) for each unit under test installed on a rack server, a test server assigns and transmits an IP address to the unit under test upon receiving an IP address request including a physical address from the unit under test; (B) for each unit to be tested, the test servo end transmits power-on configuration data to the unit to be tested when receiving a power-on request from the unit to be tested; (C) the test server determines whether each unit under test is executing an operating system; and (D) when the determination result of step (C) is yes, the test server sets the assigned IP address as a static IP address.

Description

Method for detecting IP address and physical address
Technical Field
The present invention relates to a method for detecting IP address and physical address, and more particularly, to a method for detecting IP address and physical address of each DUT of a rack server.
Background
The rack server is used for uniformly managing and controlling a plurality of hosts by transversely placing the hosts in the chassis, so that the storage space of the hosts is saved. The main benefit of saving space is to facilitate centralized maintenance and management, whereby the cost for hosting in the machine room is also lower.
In the past, no matter the remote control is required or when each Unit Under Test (UUT) inserted in a rack server is tested, the MAC address (i.e., physical address) and the IP address of each dut are obtained, however, when the operator submits the information, if the unit to be tested inserted in the rack server is not the model produced by the company to which the operator belongs, the information related to the unit to be tested corresponding to the model produced by the company to which the operator belongs cannot be submitted exactly, therefore, for the tester, the rack server acts as a black box, and the physical addresses of the units to be tested are unknown.
The tester should actually disassemble each unit to be tested installed on the rack server, then query the physical address corresponding to each unit to be tested, manually record the physical address corresponding to each unit to be tested, and finally test the unit to be tested according to the physical address of each unit to be tested and the internet protocol address. Alternatively, commercially available software such as NMAP may be used to scan all ip addresses of the dut plugged into the rack server, and the ip addresses obtained by this method are not verified and therefore are not highly accurate, so that a solution is needed.
Disclosure of Invention
Therefore, the objective of the present invention is to provide a method for detecting ip addresses and physical addresses, which automatically detects ip addresses and physical address information corresponding to each dut.
Therefore, the method for detecting IP address and physical address of the present invention is suitable for detecting an IP address and a physical address of each of a plurality of units under test installed in a rack server and implemented by a test server, each unit under test and the test server are electrically connected to a switch, the method comprises the following steps:
(A) For each DUT, when the test server receives an IP address request including a physical address from the DUT, the test server assigns and transmits an IP address to the DUT, and stores the physical address and the assigned IP address in a first mapping table;
(B) for each unit to be tested, when the test servo end receives a starting request from the unit to be tested, the test servo end transmits starting configuration data related to the starting of the unit to be tested to the unit to be tested;
(C) the test server determines whether each unit under test is executing an operating system; and
(D) when it is determined that each DUT is executing the OS, the test server sets the IP address corresponding to each physical address in the first mapping table as a static IP address.
In some embodiments, in step (B), the boot configuration data includes a boot management program and a core file.
In some embodiments, in step (C), the test server determines whether the unit under test is executing the operating system by detecting a connection status of at least one communication port corresponding to each unit under test.
In some embodiments, in step (C), the test server detects a connection status of the at least one communication port corresponding to each dut by using a network mapping technique.
In some embodiments, in step (C), the at least one communication port comprises a security shell communication port.
In some embodiments, in step (D), when the test server determines that each unit under test is executing the operating system, the test server further reads a corresponding relationship between a physical address and a connection port of each unit under test from the switch, and stores the connection port corresponding to the physical address in the first mapping table.
In some embodiments, in step (D), the test server sets the IP address as the static IP address by storing each physical address in the first mapping table and the IP address assigned to the physical address in a static IP address table.
In some embodiments, the rack server is provided with a power distribution unit for controlling power of each unit under test and electrically connected to the switch, and after step (D), the method further comprises the following steps:
(E) The test servo end transmits a power control instruction related to the units to be tested to the power distribution unit so as to restart the units to be tested of the rack server; and
(F) for each DUT, when the test server receives the IP address request including the physical address from the DUT, the test server assigns and transmits the static IP address corresponding to the physical address to the DUT according to the static IP address table.
In some embodiments, after step (F), further comprising the steps of:
(G) the test server identifies a plurality of units to be tested with the category of the baseboard management controller according to the physical addresses of the units to be tested stored in the first mapping table;
(H) the test server end transmits a plurality of inquiry requests to the units to be tested respectively according to the identified type as the IP addresses of the units to be tested of the baseboard management controller; and
(I) when the test server receives at least one reply message from at least one of the units under test of the type of baseboard management controller, the test server verifies each of the at least one unit under test as successful connection.
In some embodiments, in step (H), each query request includes an intelligent platform management interface command.
Compared with the prior art, the invention automatically assigns the IP address corresponding to the physical address according to the physical address corresponding to each unit to be tested through the test server, and sets the IP address corresponding to each physical address as the static IP address, so as to automatically obtain the IP address and the physical address information corresponding to each unit to be tested.
[ description of the drawings ]
FIG. 1 is a block diagram illustrating a test server electrically connected to a rack server for performing an embodiment of the method of detecting IP addresses and physical addresses of the present invention; and
FIG. 2 is a flow chart illustrating an embodiment of the method for detecting IP addresses and physical addresses of the present invention.
[ detailed description ] embodiments
Referring to fig. 1, the embodiment of the method for detecting ip addresses and physical addresses of the present invention is adapted to detect an ip address and a physical address of each of a plurality of dut 11 installed in a rack server 1, and is implemented by a test server 2. The rack server 1 is further provided with an exchanger 12 and a power distribution unit 13 for controlling the power of each unit under test 11 and electrically connected to the exchanger 12. Each DUT 11 is electrically connected to the switch 12 and the power distribution unit 13. In the present embodiment, the test server 2 is electrically connected to the switch 12 and includes a Dynamic Host Configuration Protocol (DHCP) server 21 and a processor 22, and the processor 22 executes an application program containing a plurality of instructions to implement the method for detecting an ip address and a physical address of the present invention, but is not limited thereto.
Referring to fig. 1 and 2, an embodiment of the method for detecting an ip address and a physical address of the present invention includes the following steps.
In step 30, for each DUT 11, when the test server 2 receives an IP address request including a physical address from the DUT 11, the test server 2 assigns and transmits an IP address to the DUT 11 and stores the physical address and the assigned IP address in a first mapping table.
In step 31, for each dut 11, when the test server 2 receives a power-on request from the dut 11, the test server 2 transmits power-on configuration data associated with the power-on of the dut 11 to the dut 11. In this embodiment, the boot configuration data includes a boot management program and a core file.
In step 32, the test server 2 detects a connection status of at least one communication port corresponding to each unit under test 11 by using a Network mapping (Nmap) technique to determine whether each unit under test 11 is executing an operating system. When the test server 2 determines that each unit under test 11 is executing the operating system (i.e. the connection status of at least one communication port corresponding to each unit under test 11 is connected), the process proceeds to step 33. Otherwise, the flow returns to step 30. In this embodiment, the at least one communication port includes a Secure Shell (SSH) communication port, and the SSH can provide a Secure transmission and use environment for a Shell (Shell) on the computer. The SSH protocol can effectively prevent the information leakage problem in the remote management process, and all the transmitted data can be encrypted through the SSH protocol, so that the data leakage can be prevented. It should be noted that, when testing the units 11 to be tested installed on the rack server, the tester should test each unit 11 at the same time, so that, in the testing stage, the ip address and the physical address corresponding to each unit 11 to be tested are known, and each unit 11 to be tested should enter the operating system (i.e., each unit 11 to be tested should be executing the operating system), so if there is at least one unit 11 to be tested that does not enter the operating system, the flow should return to step 30 again until each unit 11 to be tested enters the operating system. That is, in step 32, the test server 2 must confirm that all of the DUTs 11 issuing IP address requests in step 30 have entered the operating system before proceeding to step 33.
In step 33, the test server 2 sets the IP address corresponding to each physical address in the first mapping table as a static IP address, reads a corresponding relationship between the physical address and the connection port of each DUT 11 from the switch 12, and stores the connection port corresponding to the physical address in the first mapping table. In this embodiment, the test server 2 sets the IP address as the static IP address by storing each physical address in the first mapping table and the IP address assigned thereto in a static IP address table included in a dynamic host configuration protocol (DHCP configuration file). It should be noted that the test server 2 automatically reads the corresponding relationship between the physical address and the connection port of each unit under test 11 from the switch 12 by executing at least one of the instructions of the application program, and stores the connection port corresponding to the physical address in the first mapping table.
In step 34, the test server 2 sends a power control command associated with the dut 11 to the power distribution unit 13 to restart the dut 11 of the rack server 1. The power distribution unit 13 first stops supplying power to the units under test 11 to turn off the units under test 11 according to the power control command, and then supplies power to the units under test 11 again to turn on the units under test 11.
In step 35, for each DUT 11, when the test server 2 receives the IP address request including the physical address from the DUT 11, the test server 2 assigns and transmits the static IP address corresponding to the physical address to the DUT 11 according to the static IP address table.
In step 36, the test server 2 identifies a plurality of types of dut 11, which are Baseboard Management Controllers (BMCs), according to the physical addresses of the dut 11 stored in the first mapping table. As known to those skilled in the art, for each two physical addresses with partially identical codes, the type of the unit 11 to be tested corresponding to the physical address with the larger hexadecimal value is the BMC, so the test server 2 can identify the unit 11 to be tested corresponding to the physical address with the larger hexadecimal value as the BMC from each two units 11 to be tested with the partially identical codes according to the physical addresses.
In step 37, the test server 2 sends a plurality of inquiry requests to the units under test 11 according to the identified ip addresses of the units under test 11 whose kind is the bmc. In the embodiment, each query request includes an Intelligent Platform Management Interface (IPMI) instruction.
In step 38, when the test server 2 receives at least one reply message from at least one of the units under test 11 of the baseboard management controller type, the test server 2 verifies each of the at least one unit under test 11 as a successful connection. And for each of the units under test 11 that has not received a response to the corresponding inquiry request within a predetermined period of time, the test server 2 verifies it as a connection failure.
In summary, the method for detecting IP addresses and physical addresses of the present invention automatically assigns the IP address corresponding to each physical address according to the physical address corresponding to each DUT 11 through the test server 2, and sets the IP address corresponding to each physical address as the static IP address to automatically obtain the IP address and physical address information corresponding to each DUT 11. In addition, the test server 2 transmits the query requests to the units under test 11, respectively, and when the test server 2 receives the at least one reply message from at least one of the units under test 11, the test server 2 verifies each of the at least one unit under test 11 as successful connection, so as to know which bmcs are probably abnormal, thereby achieving the purpose of the present invention.
The detailed description and examples of the present invention are given above with reference to the accompanying drawings, but the scope of the present invention is not limited thereto, and the equivalent modifications and variations within the scope of the claims of the present invention should be considered as falling within the scope of the present invention.

Claims (7)

1. A method for detecting IP address and physical address, which is suitable for detecting an IP address and a physical address of each of a plurality of units under test installed in a rack server and implemented by a test server, each unit under test and the test server are electrically connected to a switch, characterized in that: the method comprises the following steps:
(A) for each DUT, when the test server receives an IP address request including a physical address from the DUT, the test server assigns and transmits an IP address to the DUT, and stores the physical address and the assigned IP address in a first mapping table;
(B) for each unit to be tested, when the test servo end receives a starting request from the unit to be tested, the test servo end transmits starting configuration data related to the starting of the unit to be tested to the unit to be tested;
(C) The test server determines whether each unit under test is executing an operating system;
(D) when the test server determines that each unit under test is executing the operating system, the test server sets the IP address corresponding to each physical address in the first mapping table as a static IP address, reads a corresponding relationship between the physical address of each unit under test and its connection port from the switch, and stores the connection port corresponding to the physical address in the first mapping table;
(E) the rack server is provided with a power distribution unit which is used for controlling the power of each unit to be tested and is electrically connected with the exchanger, and the test servo end transmits a power control instruction related to the units to be tested to the power distribution unit so as to restart the units to be tested of the rack server; and
(F) for each unit under test, when the test server receives the IP address request including the physical address from the unit under test, the test server assigns and transmits the static IP address corresponding to the physical address to the unit under test according to the static IP address table;
(G) The test servo terminal identifies a plurality of units to be tested of which the types are the baseboard management controllers according to the physical addresses of the units to be tested stored in the first mapping table;
(H) the test server end respectively transmits a plurality of inquiry requests to the units to be tested according to the identified type as the IP addresses of the units to be tested of the baseboard management controller; and
(I) when the test server receives at least one reply message from at least one of the units under test of the type of baseboard management controller, the test server verifies each of the at least one unit under test as successful connection.
2. The method of claim 1, wherein the detecting comprises: in step (B), the boot configuration data includes a boot management program and a core file.
3. The method of claim 1, wherein the detecting comprises: in step (C), the test server determines whether the unit under test is executing the operating system by detecting a connection status of at least one communication port corresponding to each unit under test.
4. The method of claim 3, wherein the detecting comprises: in step (C), the testing server detects the connection status of the at least one communication port corresponding to each unit under test by using a network mapping technique.
5. The method of claim 3, wherein the detecting comprises: in step (C), the at least one communication port comprises a security shell communication port.
6. The method of claim 1, wherein the detecting comprises: in step (D), the test server sets the IP address as the static IP address by storing each physical address in the first mapping table and the IP address assigned to it in a static IP address table.
7. The method of claim 1, wherein the detecting comprises: in step (H), each query request includes an intelligent platform management interface command.
CN201710131787.9A 2017-03-07 2017-03-07 Method for detecting IP address and physical address Active CN108574741B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710131787.9A CN108574741B (en) 2017-03-07 2017-03-07 Method for detecting IP address and physical address

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710131787.9A CN108574741B (en) 2017-03-07 2017-03-07 Method for detecting IP address and physical address

Publications (2)

Publication Number Publication Date
CN108574741A CN108574741A (en) 2018-09-25
CN108574741B true CN108574741B (en) 2021-11-16

Family

ID=63577478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710131787.9A Active CN108574741B (en) 2017-03-07 2017-03-07 Method for detecting IP address and physical address

Country Status (1)

Country Link
CN (1) CN108574741B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101909089A (en) * 2010-06-07 2010-12-08 友达光电股份有限公司 Method for controlling multiple computers in local area network
CN103037022A (en) * 2011-10-06 2013-04-10 台达电子工业股份有限公司 Automatic network address allocation method and data center specially implementing same
CN103546586A (en) * 2012-07-11 2014-01-29 鸿富锦精密工业(深圳)有限公司 Internet Protocol (IP) address matching system and method
CN104065758A (en) * 2013-03-18 2014-09-24 杭州华三通信技术有限公司 Active device automatic deployment method, device and system
CN104660455A (en) * 2013-11-22 2015-05-27 英业达科技有限公司 Server system and node detection method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101909089A (en) * 2010-06-07 2010-12-08 友达光电股份有限公司 Method for controlling multiple computers in local area network
CN103037022A (en) * 2011-10-06 2013-04-10 台达电子工业股份有限公司 Automatic network address allocation method and data center specially implementing same
CN103546586A (en) * 2012-07-11 2014-01-29 鸿富锦精密工业(深圳)有限公司 Internet Protocol (IP) address matching system and method
CN104065758A (en) * 2013-03-18 2014-09-24 杭州华三通信技术有限公司 Active device automatic deployment method, device and system
CN104660455A (en) * 2013-11-22 2015-05-27 英业达科技有限公司 Server system and node detection method

Also Published As

Publication number Publication date
CN108574741A (en) 2018-09-25

Similar Documents

Publication Publication Date Title
TWI638553B (en) Method for detecting internet protocol address and media access control address
CN110879712B (en) Cloud data center physical host installation method and related device
EP2472402B1 (en) Remote management systems and methods for mapping operating system and management controller located in a server
KR102158754B1 (en) Method and apparatus for operating on smart network interface card
US20080205286A1 (en) Test system using local loop to establish connection to baseboard management control and method therefor
CN108134684B (en) BMCIP address management system, management terminal and management method
WO2020000758A1 (en) Server acceptance method and apparatus, computer device, and storage medium
CN103546586A (en) Internet Protocol (IP) address matching system and method
CN103475526A (en) IP setting and detecting method supporting multi-VLAN virtual machine
CN115061885A (en) Complete machine aging automatic test method and device, electronic equipment and storage medium
CN111782283A (en) Automatic management method, device and medium for bare metal server
CN112256505A (en) Server stability testing method and device and related components
CN107769952B (en) Remote management system and method thereof
CN107181606B (en) Method and apparatus for controlling network nodes
US9912534B2 (en) Computer system, method for starting a server computer, server computer, management station, and use
CN110839089A (en) Server positioning method, system, electronic equipment and storage medium
WO2024078191A1 (en) Load setting method, apparatus and system
CN103678058A (en) Hardware detection system and method
CN108574741B (en) Method for detecting IP address and physical address
TWI501090B (en) Server system and node detection method
CN105119772B (en) IPMI function test method for C/S framework
CN106649002A (en) Server and method for automatically overhauling baseboard management controller
CN115454896A (en) SMBUS-based SSD MCTP control message verification method and device, computer equipment and storage medium
CN113722211B (en) BMC debugging method, device, system and embedded equipment
CN111277463B (en) Method, system, terminal and storage medium for testing accuracy of gateway address acquisition by BMC

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant