CN107222586B - Method for automatically identifying BMC IP in local area network - Google Patents
Method for automatically identifying BMC IP in local area network Download PDFInfo
- Publication number
- CN107222586B CN107222586B CN201710304979.5A CN201710304979A CN107222586B CN 107222586 B CN107222586 B CN 107222586B CN 201710304979 A CN201710304979 A CN 201710304979A CN 107222586 B CN107222586 B CN 107222586B
- Authority
- CN
- China
- Prior art keywords
- bmc
- outputting
- ipmi
- checking whether
- executing
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5046—Resolving address allocation conflicts; Testing of addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/622—Layer-2 addresses, e.g. medium access control [MAC] addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention relates to the field of network identification, in particular to a method for automatically identifying BMC IP in a local area network. The method comprises the following steps: s1, setting an IP range, and starting to check from the first IP in a list; s2, checking whether the IP can ping, if so, executing S3, and if not, outputting S6; s3, checking whether the port can be communicated, if yes, executing S4, and if not, outputting S6; s4, checking whether the mac address manufacturer is correct, if so, executing S5, and if not, outputting S6; s5, checking whether the ipmi sending command can be correctly fed back, if so, displaying the current IP and information and outputting S6, and if not, sending a BMC resetting command and outputting S6; s6, the IP for resetting the BMC is added to the last end of the untested IP list again, the next IP of the IP list is read, and the step S2 is repeated. The method of the invention can automatically acquire the BMC IP of each device, thereby greatly simplifying the workload; is suitable for various environments; no IP collision is caused by not having to set a fixed IP.
Description
Technical Field
The invention relates to the field of network identification, in particular to a method for automatically identifying BMC IP in a local area network.
Background
In this era of speaking with data, data is becoming more and more important, and the demand for data volume is also becoming greater and greater. The huge data needs huge hardware to support, so the demand of the server is also increasing, and the demand of large-scale deployment of the control server is also increasing. How to control as many servers as possible with the least manpower is an important issue, and it is very important for centralized management of the servers that the BMC provides a large number of interfaces to control the operation of the servers. In order to improve operation and maintenance efficiency, the invention provides a method for automatically identifying the BMC IP in the local area network, which can save a plurality of complicated steps and improve operation and maintenance reliability.
At present, the centralized control of a large-scale server is generally realized by setting a fixed IP and directly performing command operation on an IP list after fixing the IP of each device. The operation is inconvenient in the following points:
1. the setting is complicated, each device needs to be connected and set through a display, and the workload is very large;
2. for a fixed machine room, the method can be effective all the time through one-time setting, but is not suitable for server manufacturers to have a large number of servers to enter and exit the machine room every day;
3. potential safety hazards easily occur due to IP conflict;
4. when the BMC fails, simple debug checking cannot be carried out, and even the operation and maintenance program is easy to be abnormal.
Disclosure of Invention
The invention provides a method for automatically identifying BMC IP in a local area network, aiming at accurately and quickly judging whether an IP is a management network port IP of BMC.
The invention provides a method for automatically identifying BMC IP in a local area network, which comprises the following steps:
s1, setting an IP range, and starting to check from the first IP in the list;
s2, checking whether the IP can ping, if yes, executing S3, and if not, outputting S6;
s3, checking whether the port can be connected, if yes, executing S4, and if not, outputting S6;
s4, checking whether the mac address manufacturer is correct, if so, executing S5, and if not, outputting S6;
s5, checking whether the ipmi sending command can be correctly fed back, if so, displaying the current IP and information and outputting S6, and if not, sending a BMC resetting command and outputting S6;
s6, the IP of the reset BMC is added to the last end of the untested IP list again, the next IP of the IP list is read, and the step S2 is repeated.
As a further improvement of the present invention, the step S3 further includes: it is checked whether the communication port used by the server ipmi is based on the UDP protocol, if so, S4 is performed, and if not, S6 is output.
As a further improvement of the present invention, the step S3 further includes: checking whether the communication port used by the server ipmi is the code 623, if yes, executing S4, otherwise, outputting S6.
As a further improvement of the present invention, in step S3, if the port used by the IPMI of the server is special, the currently used port number is directly queried.
As a further improvement of the present invention, in step S4, the manufacturer of the mac address corresponding to the current IP is checked by the nmap tool.
As a further improvement of the present invention, the steps S2, S3, S4 are checking conditions for recognizing the IP as the BMC management portal IP.
As a further improvement of the present invention, the step S5 is a check condition for determining whether the BMC can normally operate under the current IP.
The invention has the beneficial effects that: the method can automatically acquire the BMC IP of each device without connecting a display, thereby greatly simplifying the workload; the system is suitable for various environments, fixed machine rooms and machine rooms with a large number of servers entering and exiting; no fixed IP needs to be set, so that IP conflict is avoided; the method can judge whether the BMC under the current IP works normally or not, and if the BMC does not work normally, the BMC is reset to recover the BMC.
Drawings
Fig. 1 is a flowchart of a method for automatically identifying a BMC IP in a local area network according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments.
As shown in fig. 1, a method for automatically identifying a BMC IP in a local area network according to the present invention includes the following steps:
s1, setting an IP range, and starting to check from the first IP in the list;
s2, checking whether the IP can ping, if yes, executing S3, and if not, outputting S6;
s3, checking whether the port can be connected, if yes, executing S4, and if not, outputting S6;
s4, checking whether the mac address manufacturer is correct, if so, executing S5, and if not, outputting S6;
s5, checking whether the ipmi sending command can be correctly fed back, if so, displaying the current IP and information and outputting S6, and if not, sending a BMC resetting command and outputting S6;
s6, the IP of the reset BMC is added to the last end of the untested IP list again, the next IP of the IP list is read, and the step S2 is repeated.
In order to accurately and quickly determine whether an IP is a management portal IP of the BMC, some means are required to narrow our screening scope:
1. IP address: because the invention traverses each IP in a range, the IP capable of ping communication is firstly found;
2. port: in a remote mode, the IPMI uses the RMCP, the RMCP is realized based on a UDP protocol, so that when an IP is judged to be a management internet access IP, screening can be carried out by judging a communication port at first, the port used by the IPMI of the server is 623 generally, and if the condition is special, the currently used port is directly inquired;
3. mac address: the network card MAC code is distributed by a unique fixed organization worldwide, and unauthorized and authorized vendors do not have authority to produce network cards. The server is usually provided by several main manufacturers, and the manufacturer of the mac address corresponding to the current IP can be found through an nmap tool;
4. the Ipmi protocol: whether the ipmi command can be accepted and correctly fed back.
The IP can be basically determined as the BMC management network port IP according with the first three conditions, and the fourth condition is used for judging whether the BMC under the current IP can normally work. If the normal work can be carried out, the result is displayed, if the normal work can not be carried out, the command is sent to reset the BMC, and after a period of time, the ipmi command is sent again to see whether the normal work is recovered or not.
The invention provides a method for automatically identifying BMC IP in a local area network, which can provide great convenience for large-scale server deployment. The invention can also be used for periodically checking the BMC in the local area network, finding the abnormity and repairing the abnormity. In addition, the invention can also be matched with other functions of the ipmi protocol to collect or manage information of the server, such as functions of collecting hardware property information of a computer room, upgrading firmware version and the like.
The terms in the present invention explain:
bmc (baseboard Management controller): a baseboard management controller.
IPMI (Intelligent Platform Management interface): an Intelligent Platform Management Interface (IPMI) is an open standard hardware management interface specification that defines a specific method for communication of an embedded management subsystem. IPMI information is communicated via a Baseboard Management Controller (BMC) (located on a hardware component of IPMI specification).
Bios is an abbreviation of the English Basic Input Output System, and the Chinese name after the translation is the Basic Input Output System. In fact, it is a set of programs solidified on a ROM chip on the main board of the computer, it stores the most important basic input and output programs of the computer, the self-checking program after power-on and the system self-starting program, it can read and write the specific information set by the system from the CMOS. Its primary function is to provide the lowest level, most direct hardware setup and control for the computer.
Ipomitool is an ipmi platform management tool in a command line mode which can be used in a linux system, supports ipmi 1.5 specification (the latest specification is ipmi 2.0), and can realize the functions of acquiring information of a sensor, displaying system log content, remotely turning on and off a network and the like.
RMCP: is an abbreviation of Remote Management Control Protocol, and DMTF (distribution Management Task force) defines the purpose of the method to complete the Management under the conditions of Pre-OS and OS-absence. RMCP is a simple request-response protocol, transmitted using UDP messages. The IPMI-Over-LAN uses RMCP protocol with version number 1 and packet format. The RMCP contains a field in the embedded RMCP message for marking the type of the message. Types included are IPMI, ASF and OEM.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.
Claims (7)
1. A method for automatically identifying BMC IP in a local area network is characterized by comprising the following steps:
s1, setting an IP range, and starting to check from the first IP in the list;
s2, checking whether the IP can ping, if yes, executing S3, and if not, outputting S6;
s3, checking whether the port can be connected, if yes, executing S4, and if not, outputting S6;
s4, checking whether the mac address manufacturer is correct, if so, executing S5, and if not, outputting S6;
s5, checking whether the ipmi sending command can be correctly fed back, if so, displaying the current IP and information and outputting S6, and if not, sending a BMC resetting command and outputting S6;
s6, the IP of the reset BMC is added to the last end of the untested IP list again, the next IP of the IP list is read, and the step S2 is repeated.
2. The method according to claim 1, wherein the step S3 further comprises:
it is checked whether the communication port used by the server ipmi is based on the UDP protocol, if so, S4 is performed, and if not, S6 is output.
3. The method according to claim 2, wherein the step S3 further comprises:
checking whether the communication port used by the server ipmi is the code 623, if yes, executing S4, otherwise, outputting S6.
4. The method of claim 3, wherein in step S3, if the port used by the IPMI is special, the port number used by the IPMI server is directly queried.
5. The method of claim 1, wherein in step S4, the manufacturer of the mac address corresponding to the current IP is checked by an nmap tool.
6. The method of claim 1, wherein the steps S2, S3 and S4 are checking conditions for identifying IP as BMC management gateway IP.
7. The method of claim 1, wherein the step S5 is a check condition for determining whether the BMC under the current IP can operate normally.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710304979.5A CN107222586B (en) | 2017-05-03 | 2017-05-03 | Method for automatically identifying BMC IP in local area network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710304979.5A CN107222586B (en) | 2017-05-03 | 2017-05-03 | Method for automatically identifying BMC IP in local area network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107222586A CN107222586A (en) | 2017-09-29 |
CN107222586B true CN107222586B (en) | 2020-10-20 |
Family
ID=59943857
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710304979.5A Active CN107222586B (en) | 2017-05-03 | 2017-05-03 | Method for automatically identifying BMC IP in local area network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107222586B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107819892A (en) * | 2017-10-26 | 2018-03-20 | 郑州云海信息技术有限公司 | A kind of method of particular server IP address in service-oriented device search LAN |
CN109446101B (en) * | 2018-11-13 | 2021-10-29 | 郑州云海信息技术有限公司 | Automatic testing method and device for restarting BMC based on ipmi instruction |
CN110752946B (en) * | 2019-10-16 | 2021-10-29 | 苏州浪潮智能科技有限公司 | Method, system and device for recovering BMC (baseboard management controller) network |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104113448A (en) * | 2014-07-14 | 2014-10-22 | 蓝盾信息安全技术有限公司 | Method for automatically finding and monitoring devices in local area network |
CN104360922A (en) * | 2014-10-20 | 2015-02-18 | 浪潮电子信息产业股份有限公司 | Method for automatically monitoring BMC working state based on ipmitool |
CN105373398A (en) * | 2015-10-10 | 2016-03-02 | 浪潮电子信息产业股份有限公司 | Method for setting server BMC IP of whole cabinet in bulk on basis of Xshell script |
CN106484639A (en) * | 2016-10-10 | 2017-03-08 | 郑州云海信息技术有限公司 | A kind of method that CPU register information is obtained by ipmi agreement |
-
2017
- 2017-05-03 CN CN201710304979.5A patent/CN107222586B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104113448A (en) * | 2014-07-14 | 2014-10-22 | 蓝盾信息安全技术有限公司 | Method for automatically finding and monitoring devices in local area network |
CN104360922A (en) * | 2014-10-20 | 2015-02-18 | 浪潮电子信息产业股份有限公司 | Method for automatically monitoring BMC working state based on ipmitool |
CN105373398A (en) * | 2015-10-10 | 2016-03-02 | 浪潮电子信息产业股份有限公司 | Method for setting server BMC IP of whole cabinet in bulk on basis of Xshell script |
CN106484639A (en) * | 2016-10-10 | 2017-03-08 | 郑州云海信息技术有限公司 | A kind of method that CPU register information is obtained by ipmi agreement |
Also Published As
Publication number | Publication date |
---|---|
CN107222586A (en) | 2017-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107171833B (en) | Method for realizing batch upgrading of BMC and BIOS of server through BMC | |
EP2472402A1 (en) | Remote management systems and methods for mapping operating system and management controller located in a server | |
CN107222586B (en) | Method for automatically identifying BMC IP in local area network | |
US7600110B2 (en) | Method for simulating an intelligent platform management interface using BIOS | |
CN103905253A (en) | Server monitoring and management method based on Nagios and BMC | |
CN102799504A (en) | Power supply testing system and method | |
CN105743707A (en) | Method for testing BMC log analyzing function based on Redhat system | |
CN106897223A (en) | A kind of software kit delivery method and device based on continuous integrating | |
CN115061885A (en) | Complete machine aging automatic test method and device, electronic equipment and storage medium | |
CN112529223A (en) | Equipment fault repair method and device, server and storage medium | |
CN112256505A (en) | Server stability testing method and device and related components | |
CN113849228A (en) | Operating system batch deployment method, system, terminal and storage medium | |
CN111427602B (en) | Method for upgrading firmware on line of intelligent platform management controller of VPX case | |
CN117251333A (en) | Method, device, equipment and storage medium for acquiring hard disk information | |
CN115525490A (en) | Memory eye pattern testing method, hardware debugging equipment and storage medium | |
CN106547645B (en) | Method for automatically restoring image file and server system | |
CN114003445B (en) | BMC I2C monitoring function test method, system, terminal and storage medium | |
CN113986270A (en) | Distributed application deployment method and device, storage medium and electronic equipment | |
CN113766041B (en) | Method, device, equipment and storage medium for acquiring Media Access Control (MAC) address of first server | |
RU2434281C2 (en) | Method, module and system for protection at start-up | |
CN116303200A (en) | PCIE equipment positioning management method, system, terminal and storage medium | |
CN106649002A (en) | Server and method for automatically overhauling baseboard management controller | |
CN115168146A (en) | Anomaly detection method and device | |
CN113010422A (en) | Mirror image file testing method and device, electronic equipment and readable storage medium | |
KR102068830B1 (en) | Server Validation Automation and Management System |
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 |