[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN106657434A - Method and device for checking IP address - Google Patents

Method and device for checking IP address Download PDF

Info

Publication number
CN106657434A
CN106657434A CN201611052358.4A CN201611052358A CN106657434A CN 106657434 A CN106657434 A CN 106657434A CN 201611052358 A CN201611052358 A CN 201611052358A CN 106657434 A CN106657434 A CN 106657434A
Authority
CN
China
Prior art keywords
address
bmc
request message
message
icmp request
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.)
Granted
Application number
CN201611052358.4A
Other languages
Chinese (zh)
Other versions
CN106657434B (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.)
New H3C Information Technologies Co Ltd
Original Assignee
Unis Huashan Information Technologies Co Ltd
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 Unis Huashan Information Technologies Co Ltd filed Critical Unis Huashan Information Technologies Co Ltd
Priority to CN201611052358.4A priority Critical patent/CN106657434B/en
Publication of CN106657434A publication Critical patent/CN106657434A/en
Application granted granted Critical
Publication of CN106657434B publication Critical patent/CN106657434B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • 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/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] 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/668Internet protocol [IP] address subnets

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a method and a device for checking an IP address. The method comprises the following steps of obtaining an identifier corresponding to a BMC; generating an ICMP request message comprising the identifier; sending the ICMP request message in a broadcast mode; receiving a first message sent by the BMC, wherein the first message comprises an IP address and an MAC address of the BMC; and resolving the IP address and the MAC address of the BMC from the first message and recording a corresponding relation between the IP address and the MAC address in an ARP table. Through the technical scheme of the invention, a user can check the IP address of the BMC from the ARP table of a client, so that a problem that the user cannot know the IP address of the BMC is solved.

Description

Method and device for checking IP address
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for checking an IP address.
Background
The BMC (Baseboard Management Controller) is an out-of-band Management system of the server, and may manage and monitor the server based on an IPMI (Intelligent Platform Management Interface) protocol. Moreover, the user can log in a management interface of the BMC through a management interface of the BMC, so that the server is managed and monitored. The premise of logging in the BMC management interface by the user is as follows: the BMC has acquired the IP address and the user knows the IP address of the BMC.
Currently, the modes for BMC to obtain an IP address include statically configuring an IP address and dynamically applying for an IP address. Statically configuring the IP address means: the user directly configures the IP address for the BMC, and the method has the advantages of simple configuration and disadvantages that: the statically configured IP address and the user network may not be in one network segment, and the statically configured IP address may have IP address conflicts. The dynamic application of the IP address means: the BMC requests an IP address from a DHCP (Dynamic Host Configuration Protocol) server, allocates the IP address to the BMC by the DHCP server, and notifies the BMC of the IP address allocated to the BMC.
Whether the IP address is statically configured or dynamically applied, the user may not know the IP address of the BMC, so that the user cannot log in the management interface of the BMC through the management port of the BMC.
For example, after configuring the IP address for the BMC, the user may forget the IP address, or other users may not know the IP address configured for the BMC by the user. After the DHCP server allocates the IP address to the BMC, the user cannot know the IP address allocated to the BMC by the DHCP server.
Disclosure of Invention
The application provides a method for checking an IP address, which is applied to a client and comprises the following steps:
acquiring an identifier corresponding to a BMC (baseboard management controller);
generating an Internet Control Message Protocol (ICMP) request message comprising the identifier;
sending the ICMP request message in a broadcasting mode;
receiving a first message sent by the BMC, wherein the first message is sent after the BMC determines that an ICMP request message received by the BMC carries an identifier of the BMC, and the first message comprises an IP address of the BMC and a Media Access Control (MAC) address;
and analyzing the IP address and the MAC address of the BMC from the first message, and recording the corresponding relation between the IP address and the MAC address in an ARP table.
The application provides a method for checking an IP address, which is applied to BMC of a server and comprises the following steps: receiving an Internet Control Message Protocol (ICMP) request message from a client;
if the ICMP request message carries the identifier of the BMC, sending a first message carrying the IP address of the BMC and a Media Access Control (MAC) address to the client so that the client records the corresponding relation between the IP address and the MAC address in an ARP (address resolution protocol) table; if the ICMP request message does not carry the identifier of the BMC, the ICMP request message is discarded.
The application provides a device is looked over to IP address, is applied to the customer end, the device includes:
the acquisition module is used for acquiring the identifier corresponding to the BMC;
a generating module, configured to generate an ICMP request message including the identifier;
a sending module, configured to send the ICMP request message in a broadcast manner;
a receiving module, configured to receive a first message sent by the BMC, where the first message is sent by the BMC after the BMC determines that an ICMP request message received by the BMC carries an identifier of the BMC, and the first message includes an IP address and a MAC address of the BMC;
and the processing module is used for analyzing the IP address and the MAC address of the BMC from the first message and recording the corresponding relation between the IP address and the MAC address in an ARP table.
The application provides a device is looked over to IP address, is applied to the BMC of server, the device includes: the receiving module is used for receiving an Internet control message protocol ICMP request message from a client;
a sending module, configured to send a first message carrying an IP address of the BMC and a MAC address of a MAC to the client when the ICMP request message carries the identifier of the BMC, so that the client records a correspondence between the IP address and the MAC address in an ARP table;
and the processing module is used for discarding the ICMP request message when the ICMP request message does not carry the identifier of the BMC.
Based on the above technical solution, in this embodiment of the application, the client may trigger the BMC to send a first Message (such as an ARP (address resolution Protocol) request Message or an ICMP response Message) carrying an MAC (Media Access Control) address and an IP address of the client by sending an ICMP (internet Control Message Protocol) request Message to the BMC, and record a corresponding relationship between the IP address and the MAC address carried in the first Message in an ARP table local to the client. Therefore, the user can check the IP address of the BMC from the ARP table of the client, the problem that the user cannot know the IP address of the BMC is solved, and the IP address of the BMC recorded in the ARP table is the latest IP address of the BMC, so that errors cannot occur.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a flow diagram of a method for viewing an IP address in one embodiment of the present application;
FIG. 2 is a flow chart of a method of viewing an IP address in another embodiment of the present application;
FIG. 3 is a diagram of a hardware configuration of a client in one embodiment of the present application;
FIG. 4 is a block diagram of an IP address view device in one embodiment of the present application;
FIG. 5 is a hardware block diagram of a BMC in one embodiment of the application;
fig. 6 is a block diagram of an IP address viewer according to an embodiment of the present application.
Detailed Description
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The embodiment of the application provides a method for viewing an IP address, which can be applied to a system comprising a client and a server, wherein the server comprises a BMC. After the BMC is started, the IP address can be acquired in a static mode or a dynamic mode, and the mode for acquiring the IP address by the BMC is not limited. Moreover, the user can log in a management interface of the BMC through a management interface of the BMC, so that the server is managed and monitored. In order to log in the management interface of the BMC, the user needs to know the IP address of the BMC.
Referring to fig. 1, which is a flowchart of the IP address viewing method provided in this embodiment of the application, a client may obtain an IP address of a BMC, and a user may view the IP address of the BMC through the client. The method can be applied to a client, and the method can comprise the following steps:
step 101, acquiring an identifier corresponding to BMC. The identifier may specifically include, but is not limited to: the MAC address of the BMC, and/or the name of the server. Of course, the identifier may also be other identifiers capable of uniquely representing the BMC, such as an asset number, and the like, and the identifier is not limited thereto.
In one example, a tag may be attached to the server, and the tag may indicate the corresponding identifier of the BMC. The user can obtain the identifier corresponding to the BMC from the tag, and input the identifier corresponding to the BMC into the client, so that the client can obtain the identifier corresponding to the BMC. Of course, the above is only one example that the client acquires the identifier corresponding to the BMC, and the client may also acquire the identifier corresponding to the BMC in other manners, and the acquisition manner of the identifier is not limited in this embodiment.
Step 102, generating an ICMP request message including an identifier corresponding to the BMC. The destination MAC address of the ICMP request message is a broadcast MAC address, the destination IP address is a network segment broadcast address to which the BMC belongs, the source MAC address is an MAC address of the client, and the source IP address is an IP address of the client.
In one example, before generating the ICMP request message, the client may first obtain the network segment address to which the BMC belongs. In order to manage the BMC, the client and the BMC are usually located in the same network segment, and when the client and the BMC are located in the same network segment, the client may determine the network segment address to which the client belongs as the network segment address to which the BMC belongs. For example, when the mask is 24 bits, then an example of a network segment address to which the BMC belongs may be 192.168.0.0/24. Moreover, the client can convert the network segment address 192.168.0.0/24 into the corresponding network segment broadcast address 192.168.0.255, and the detailed conversion process is not repeated.
In one example, for an ICMP request message generated by a client, a destination MAC address of the ICMP request message may be FFFF-FFFF (broadcast MAC address), a destination IP address may be 192.168.0.255 (network segment broadcast address to which BMC belongs), a source MAC address may be a MAC address 00-01-6C-06-a6-29 of the client, and a source IP address may be an IP address 192.168.0.2 of the client.
In one example, the client may generate the ICMP request message described above by the user pinging 192.168.0.255 an IP address on the client. In addition, when the IP address 192.168.0.255 is ping, the identifier corresponding to the BMC may be input after the IP address 192.168.0.255, so that the client may add the identifier corresponding to the BMC to the ICMP request message when generating the ICMP request message. The destination MAC address, the destination IP address, the source MAC address, and the source IP address are all located in the IP header portion of the ICMP request message, and the identifier corresponding to the BMC may be located in the data field portion of the ICMP request message.
Step 103, sending ICMP request message in broadcast mode.
In one example, since the destination MAC address of the ICMP request message is a broadcast MAC address and the destination IP address is a network segment broadcast address to which the BMC belongs, each device in the network segment to which the BMC belongs may receive the ICMP request message, that is, the BMC may receive the ICMP request message.
In one example, after receiving the ICMP request message, if the ICMP request message carries an identifier of the BMC, the BMC sends a first message to the client, where the first message carries an IP address and an MAC address of the BMC. If the ICMP request message does not carry the identifier of the BMC (if the ICMP request message does not carry the identifier or carries the identifier of another device), the BMC discards the ICMP request message.
Specifically, after receiving the ICMP request message, the BMC first checks whether the ICMP request message carries the identifier of the BMC. If not, the ICMP request message is discarded. If the BMC is carried, whether the carried identifier is the identifier of the BMC is checked. If not, the ICMP request message is discarded. If yes, returning a first message carrying the IP address and the MAC address of the BMC. The first message may include, but is not limited to: ARP request message; or an ICMP response message.
In one example, in order to avoid the network problem that the client does not receive the first packet, the BMC may send a preset number (e.g., 5) of first packets, so that the client can receive the first packet.
In one example, in order to enable the client to learn the IP address and the MAC address of the BMC, the source IP address of the first message sent by the BMC to the client is 192.168.0.3 of the BMC, and the source MAC address is 00-01-65-09-a6-38 of the BMC. In addition, the destination IP address of the first message is the IP address 192.168.0.2 of the client, and the destination MAC address is FFFF-FFFF-FFFF.
In one example, for the ICMP request message sent by the client, only the BMC returns the first message, and none of the other devices returns the first message, but directly discards the ICMP request message. Therefore, a large amount of message impact cannot be caused aiming at the ICMP request message sent by the client.
Step 104, receiving a first message sent by the BMC, wherein the first message comprises an IP address and an MAC address of the BMC.
And 105, analyzing the IP address and the MAC address of the BMC from the first message, and recording the corresponding relation between the IP address and the MAC address in an ARP table.
In one example, the first message may be received by the client because the destination MAC address of the first message is FFFF-FFFF. Moreover, the client may also learn the source IP address 192.168.0.3 (i.e., the IP address of the BMC) and the source MAC address 00-01-65-09-a6-38 (i.e., the MAC address of the BMC) of the first packet, and record the corresponding relationship between the IP address 192.168.0.3 and the MAC address 00-01-65-09-a6-38 in a local ARP table. Furthermore, because the corresponding relationship between the IP address 192.168.0.3 of the BMC and the MAC address 00-01-65-09-A6-38 of the BMC is recorded in the ARP table of the client, the user can inquire the IP address 192.168.0.3 of the BMC from the ARP table.
In the above process, it has been described that the user may obtain the identifier corresponding to the BMC, and if the identifier includes the MAC address 00-01-65-09-a6-38 of the BMC, the user may query the ARP table of the client using the MAC address 00-01-65-09-a6-38 of the BMC, so as to obtain the IP address 192.168.0.3 of the BMC. If the identifier does not include the MAC address 00-01-65-09-A6-38 of the BMC, the corresponding relationship between the MAC address of the BMC and the identifier of the BMC can be configured on the client, so that after the user acquires the identifier corresponding to the BMC, the user can obtain the MAC address 00-01-65-09-A6-38 of the BMC corresponding to the identifier of the BMC, and then the user can query the ARP table of the client through the MAC address 00-01-65-09-A6-38 of the BMC, so that the IP address 192.168.0.3 of the BMC can be obtained.
In one example, the following may occur: no IP address is statically configured on the BMC and the DHCP server does not dynamically assign an IP address to the BMC either, resulting in no IP address being available to the BMC. For such a situation, in this embodiment of the application, the client may also allocate an IP address to the BMC, and the ICMP request message sent by the client may also carry the IP address.
Thus, after receiving the ICMP request message from the client, the BMC may directly discard the ICMP request message if the ICMP request message does not carry the identifier of the BMC. If the ICMP request message carries the identifier of the BMC and an IP address, the BMC may process the first message before sending the first message to the client in one of the following two ways:
in the first mode, the BMC firstly judges whether the BMC has an IP address. If yes, the IP address carried by the ICMP request message is discarded. If not, judging whether the IP address carried by the ICMP request message is an available IP address. And if the IP address is the available IP address, setting the IP address carried by the ICMP request message as the IP address of the BMC. And if the IP address is not the available IP address, discarding the IP address carried by the ICMP request message.
And in the second mode, no matter whether the BMC has the IP address, the BMC can directly judge whether the IP address carried by the ICMP request message is the available IP address. If the IP address is available, the BMC may set the IP address carried in the ICMP request message as the IP address of the BMC (if the BMC already has an IP address, the IP address carried in the ICMP request message is used to replace the IP address currently used by the BMC). And if the IP address is not the available IP address, discarding the IP address carried by the ICMP request message.
In one example, a dial switch may be configured on the BMC, and if the dial switch is on, the BMC performs processing in the first mode, and if the dial switch is off, the BMC performs processing in the second mode. Or if the dial switch is on, the BMC adopts the mode two to process, and if the dial switch is off, the BMC adopts the mode one to process.
For the first and second modes, the IP address is carried in the ICMP request message. In one example, the ICMP request message may carry the identifier of the BMC first, and then carry the IP address allocated to the BMC. In another example, the ICMP request message may carry an IP address allocated for the BMC first, and then carry the identifier of the BMC. One or more special characters can be added between the identifier and the IP address, so that the BMC can distinguish the identifier from the IP address based on the special characters.
Aiming at the process that the BMC judges whether the IP address carried by the ICMP request message is an available IP address, the BMC can send a free ARP message, and the target IP address of the free ARP message is the IP address carried by the ICMP request message. If the IP address is already used, the device using the IP address sends an ARP response message to indicate that the device is using the IP address. Based on this, if the BMC receives the ARP response message within the preset time, the IP address is determined not to be the available address. And if the BMC does not receive the ARP response message within the preset time, determining that the IP address is an available address.
Based on the above technical solution, in this embodiment of the application, the client may trigger the BMC to send a first message (such as an ARP request message or an ICMP response message) carrying its own MAC address and IP address by sending an ICMP request message to the BMC, and record a corresponding relationship between the IP address and the MAC address carried in the first message in a local ARP table of the client. Therefore, the user can check the IP address of the BMC from the ARP table of the client, the problem that the user cannot know the IP address of the BMC is solved, and the IP address of the BMC recorded in the ARP table is the latest IP address of the BMC, so that errors cannot occur.
Referring to fig. 2, a flowchart of a method for viewing an IP address provided in an embodiment of the present application is shown, where the method may be applied to a BMC of a server, and the method may include the following steps:
step 201, receiving an ICMP request message from a client.
Step 202, judging whether the ICMP request message carries the identifier of the BMC.
If yes, go to step 203; if not, step 204 is performed.
Step 203, sending a first message carrying the IP address and the MAC address of the BMC to the client, so that the client records the corresponding relationship between the IP address and the MAC address in the ARP table.
Step 204, discarding the ICMP request message.
In one example, the identifier is specifically: MAC address, and/or, name of server; the destination MAC address of the ICMP request message is a broadcast MAC address, the destination IP address is a network segment broadcast address to which the BMC belongs, the source MAC address is an MAC address of the client, and the source IP address is an IP address of the client; the first message specifically includes: ARP request message; or an ICMP response message.
In one example, if the ICMP request message carries an identifier of the BMC and an IP address, before sending the first message carrying the IP address and the MAC address of the BMC to the client:
whether the BMC has an IP address can also be judged; if yes, the IP address carried by the ICMP request message is discarded; if not, judging whether the IP address carried by the ICMP request message is an available IP address; if yes, the IP address carried by the ICMP request message is set as the IP address of the BMC. Or,
directly judging whether the IP address carried by the ICMP request message is an available IP address; if yes, the IP address carried by the ICMP request message is set as the IP address of the BMC.
Based on the above technical solution, in this embodiment of the application, the client may trigger the BMC to send a first message (such as an ARP request message or an ICMP response message) carrying its own MAC address and IP address by sending an ICMP request message to the BMC, and record a corresponding relationship between the IP address and the MAC address carried in the first message in a local ARP table of the client. Therefore, the user can check the IP address of the BMC from the ARP table of the client, the problem that the user cannot know the IP address of the BMC is solved, and the IP address of the BMC recorded in the ARP table is the latest IP address of the BMC, so that errors cannot occur.
Based on the same application concept as the method, the embodiment of the application also provides a viewing device of the IP address, and the viewing device of the IP address is applied to the client. The IP address viewing device may be implemented by software, or may be implemented by hardware, or a combination of hardware and software. A logical device, implemented in software for example, is formed by reading corresponding computer program instructions in a non-volatile memory by a processor of a client in which the logical device is located. From a hardware aspect, as shown in fig. 3, for a hardware structure diagram of a client where an IP address viewing device provided by the present application is located, in addition to the processor and the nonvolatile memory shown in fig. 3, the client may further include other hardware, such as a forwarding chip, a network interface, and a memory, which are responsible for processing a packet; from the hardware structure, the client may also be a distributed device, and may include a plurality of interface cards, so as to perform the extension of message processing at the hardware level.
As shown in fig. 4, a structure diagram of a viewing apparatus for an IP address proposed in the present application includes:
the obtaining module 11 is configured to obtain an identifier corresponding to the BMC;
a generating module 12, configured to generate an ICMP request message including the identifier;
a sending module 13, configured to send the ICMP request message in a broadcast manner;
a receiving module 14, configured to receive a first message sent by the BMC, where the first message is sent by the BMC after the BMC determines that an ICMP request message received by the BMC carries an identifier of the BMC, and the first message includes an IP address and a MAC address of the BMC;
and the processing module 15 is configured to analyze the IP address and the MAC address of the BMC from the first message, and record a corresponding relationship between the IP address and the MAC address in an ARP table.
The identifier obtained by the obtaining module 11 is specifically: the MAC address and/or the name of the server where the BMC is located; the destination MAC address of the ICMP request message generated by the generating module 12 is a broadcast MAC address, the destination IP address is a network segment broadcast address to which the BMC belongs, the source MAC address is an MAC address of the client, and the source IP address is an IP address of the client; the first message received by the receiving module 14 specifically includes: an ARP request message; or an ICMP response message.
In an example, the generating module 12 is further configured to allocate an IP address to the BMC before generating the ICMP request message including the identifier; when the ICMP request message is generated, adding the allocated IP address into the ICMP request message; and when the allocated IP address is determined to be the available IP address, the BMC sets the allocated IP address as the IP address of the BMC.
The modules of the device can be integrated into a whole or can be separately deployed. The modules can be combined into one module, and can also be further split into a plurality of sub-modules.
Based on the same application concept as the method, the embodiment of the application also provides a viewing device of the IP address, and the viewing device of the IP address is applied to the BMC of the server. The IP address viewing device may be implemented by software, or may be implemented by hardware, or a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading a corresponding computer program instruction in a nonvolatile memory through a processor of a BMC where the device is located. In terms of hardware, as shown in fig. 5, for a hardware structure diagram of the BMC where the IP address viewing device is located, in addition to the processor and the nonvolatile memory shown in fig. 5, the BMC may further include other hardware, such as a forwarding chip, a network interface, and a memory, which are responsible for processing a packet; from a hardware architecture perspective, the BMC may also be a distributed device, and may include multiple interface cards to facilitate expansion of message processing at the hardware level.
As shown in fig. 6, a structure diagram of a viewing apparatus for an IP address proposed in the present application includes:
a receiving module 21, configured to receive an ICMP request message from a client;
a sending module 22, configured to send a first message carrying an IP address and an MAC address of the BMC to the client when the ICMP request message carries the identifier of the BMC, so that the client records a corresponding relationship between the IP address and the MAC address in an ARP table;
and the processing module 23 is configured to discard the ICMP request message when the ICMP request message does not carry the identifier of the BMC.
The destination MAC address of the ICMP request message received by the receiving module 21 is a broadcast MAC address, the destination IP address is a network segment broadcast address to which the BMC belongs, the source MAC address is an MAC address of the client, and the source IP address is an IP address of the client; the identifier carried in the ICMP request message received by the receiving module 21 is specifically: a MAC address, and/or a name of the server; the first message sent by the sending module 22 is specifically an ARP request message; or an ICMP response message.
The processing module 23 is further configured to determine whether the BMC has an IP address when the ICMP request message carries the identifier of the BMC and an IP address; if yes, the IP address carried by the ICMP request message is discarded; if not, judging whether the IP address carried by the ICMP request message is an available IP address; if yes, setting the IP address carried by the ICMP request message as the IP address of the BMC; or judging whether the IP address carried by the ICMP request message is an available IP address; if yes, the IP address carried by the ICMP request message is set as the IP address of the BMC.
The modules of the device can be integrated into a whole or can be separately deployed. The modules can be combined into one module, and can also be further split into a plurality of sub-modules.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute the methods described in the embodiments of the present application. Those skilled in the art will appreciate that the drawings are merely schematic representations of one preferred embodiment and that the blocks or flow diagrams in the drawings are not necessarily required to practice the present application.
Those skilled in the art will appreciate that the modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, and may be correspondingly changed in one or more devices different from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules. The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The disclosure of the present application is only a few specific embodiments, but the present application is not limited to these, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (12)

1. A method for viewing an IP address is applied to a client, and is characterized in that the method comprises the following steps:
acquiring an identifier corresponding to a BMC (baseboard management controller);
generating an Internet Control Message Protocol (ICMP) request message comprising the identifier;
sending the ICMP request message in a broadcasting mode;
receiving a first message sent by the BMC, wherein the first message is sent after the BMC determines that an ICMP request message received by the BMC carries an identifier of the BMC, and the first message comprises an IP address of the BMC and a Media Access Control (MAC) address;
and analyzing the IP address and the MAC address of the BMC from the first message, and recording the corresponding relation between the IP address and the MAC address in an ARP table.
2. The method according to claim 1, characterized in that the identification is in particular: the MAC address and/or the name of the server where the BMC is located; the destination MAC address of the ICMP request message is a broadcast MAC address, the destination IP address is a network segment broadcast address to which the BMC belongs, the source MAC address is the MAC address of the client, and the source IP address is the IP address of the client; the first message specifically includes: an ARP request message; or an ICMP response message.
3. The method of claim 1, further comprising:
before generating ICMP request message, allocating an IP address for the BMC;
the ICMP request message also carries an allocated IP address; and when the allocated IP address is determined to be the available IP address, the BMC sets the allocated IP address as the IP address of the BMC.
4. A method for viewing an IP address is applied to a Baseboard Management Controller (BMC) of a server, and is characterized by comprising the following steps:
receiving an Internet Control Message Protocol (ICMP) request message from a client;
if the ICMP request message carries the identifier of the BMC, sending a first message carrying the IP address of the BMC and a Media Access Control (MAC) address to the client so that the client records the corresponding relation between the IP address and the MAC address in an ARP (address resolution protocol) table;
if the ICMP request message does not carry the identifier of the BMC, the ICMP request message is discarded.
5. The method according to claim 4, characterized in that the identification is in particular: a MAC address, and/or a name of the server; the destination MAC address of the ICMP request message is a broadcast MAC address, the destination IP address is a network segment broadcast address to which the BMC belongs, the source MAC address is the MAC address of the client, and the source IP address is the IP address of the client; the first message specifically includes: an ARP request message; or an ICMP response message.
6. The method of claim 4, wherein if the ICMP request message carries the BMC identification and an IP address, before sending a first message carrying the BMC IP address and MAC address to the client, the method further comprises:
judging whether the BMC has an IP address; if yes, the IP address carried by the ICMP request message is discarded; if not, judging whether the IP address carried by the ICMP request message is an available IP address; if yes, setting the IP address carried by the ICMP request message as the IP address of the BMC;
or, directly judging whether the IP address carried by the ICMP request message is an available IP address; if yes, the IP address carried by the ICMP request message is set as the IP address of the BMC.
7. An IP address viewing apparatus applied to a client, the apparatus comprising:
the acquisition module is used for acquiring the identifier corresponding to the BMC;
a generating module, configured to generate an internet control message protocol ICMP request message including the identifier;
a sending module, configured to send the ICMP request message in a broadcast manner;
a receiving module, configured to receive a first message sent by the BMC, where the first message is sent by the BMC after the BMC determines that an ICMP request message received by the BMC carries an identifier of the BMC, and the first message includes an IP address and a MAC address of the BMC;
and the processing module is used for analyzing the IP address and the MAC address of the BMC from the first message and recording the corresponding relation between the IP address and the MAC address in an ARP table.
8. The apparatus of claim 7,
the identifier obtained by the obtaining module is specifically: the MAC address and/or the name of the server where the BMC is located; the destination MAC address of the ICMP request message generated by the generation module is a broadcast MAC address, the destination IP address is a network segment broadcast address to which the BMC belongs, the source MAC address is the MAC address of the client, and the source IP address is the IP address of the client; the first message received by the receiving module specifically includes: an ARP request message; or an ICMP response message.
9. The apparatus of claim 7,
the generating module is further configured to allocate an IP address to the BMC before generating the ICMP request message including the identifier; when the ICMP request message is generated, adding the allocated IP address into the ICMP request message; and when the allocated IP address is determined to be the available IP address, the BMC sets the allocated IP address as the IP address of the BMC.
10. The utility model provides a look over device of IP address, is applied to the base plate management controller BMC of server, its characterized in that, the device specifically includes:
the receiving module is used for receiving an Internet control message protocol ICMP request message from a client;
a sending module, configured to send a first message carrying an IP address of the BMC and a MAC address of a MAC to the client when the ICMP request message carries the identifier of the BMC, so that the client records a correspondence between the IP address and the MAC address in an ARP table;
and the processing module is used for discarding the ICMP request message when the ICMP request message does not carry the identifier of the BMC.
11. The apparatus of claim 10, wherein the destination MAC address of the ICMP request message received by the receiving module is a broadcast MAC address, the destination IP address is a network segment broadcast address to which the BMC belongs, the source MAC address is a MAC address of the client, and the source IP address is an IP address of the client; the identifier carried in the ICMP request message received by the receiving module is specifically: a MAC address, and/or a name of the server; the first message sent by the sending module specifically includes: an ARP request message; or an ICMP response message.
12. The apparatus of claim 10,
the processing module is further configured to determine whether the BMC has an IP address when the ICMP request message carries the identifier of the BMC and an IP address; if yes, the IP address carried by the ICMP request message is discarded; if not, judging whether the IP address carried by the ICMP request message is an available IP address; if yes, setting the IP address carried by the ICMP request message as the IP address of the BMC; or judging whether the IP address carried by the ICMP request message is an available IP address; if yes, the IP address carried by the ICMP request message is set as the IP address of the BMC.
CN201611052358.4A 2016-11-24 2016-11-24 method and device for checking IP address Active CN106657434B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611052358.4A CN106657434B (en) 2016-11-24 2016-11-24 method and device for checking IP address

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611052358.4A CN106657434B (en) 2016-11-24 2016-11-24 method and device for checking IP address

Publications (2)

Publication Number Publication Date
CN106657434A true CN106657434A (en) 2017-05-10
CN106657434B CN106657434B (en) 2019-12-06

Family

ID=58812741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611052358.4A Active CN106657434B (en) 2016-11-24 2016-11-24 method and device for checking IP address

Country Status (1)

Country Link
CN (1) CN106657434B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108241309A (en) * 2018-01-10 2018-07-03 联想(北京)有限公司 Management control method and system
CN110868479A (en) * 2018-08-27 2020-03-06 北京淳中科技股份有限公司 Equipment addressing method, device and system
CN111181787A (en) * 2019-12-30 2020-05-19 浪潮电子信息产业股份有限公司 BMC parameter configuration method, device, equipment and medium
CN112804377A (en) * 2021-04-08 2021-05-14 紫光恒越技术有限公司 Data query method, electronic equipment, server, storage equipment and gateway equipment
CN113206829A (en) * 2021-03-30 2021-08-03 新华三云计算技术有限公司 Address information analysis device
CN114629816A (en) * 2022-03-14 2022-06-14 京东科技信息技术有限公司 Method and system for detecting public network IP network state
CN115038102A (en) * 2022-06-07 2022-09-09 深圳震有科技股份有限公司 Monitoring method, system and device for 5G Internet of things terminal and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6975597B1 (en) * 2000-02-11 2005-12-13 Avaya Technology Corp. Automated link variant determination and protocol configuration for customer premises equipment and other network devices
CN1914857A (en) * 2004-03-10 2007-02-14 松下电器产业株式会社 Access control system, access control device used for the same, and resource providing device
CN102075591A (en) * 2010-12-21 2011-05-25 华为技术有限公司 Method, device and system for acquiring media access control address
CN103516599A (en) * 2012-06-15 2014-01-15 华为技术有限公司 Host finding method, network device, and host
CN103516817A (en) * 2012-06-20 2014-01-15 鸿富锦精密工业(深圳)有限公司 Server positioning method and system
CN104301451A (en) * 2014-10-17 2015-01-21 福建星网锐捷网络有限公司 Cross-network-segment host communication method, device and system
CN104994077A (en) * 2015-06-08 2015-10-21 北京奇虎科技有限公司 Wireless local area network access equipment identity marking method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6975597B1 (en) * 2000-02-11 2005-12-13 Avaya Technology Corp. Automated link variant determination and protocol configuration for customer premises equipment and other network devices
CN1914857A (en) * 2004-03-10 2007-02-14 松下电器产业株式会社 Access control system, access control device used for the same, and resource providing device
CN102075591A (en) * 2010-12-21 2011-05-25 华为技术有限公司 Method, device and system for acquiring media access control address
CN103516599A (en) * 2012-06-15 2014-01-15 华为技术有限公司 Host finding method, network device, and host
CN103516817A (en) * 2012-06-20 2014-01-15 鸿富锦精密工业(深圳)有限公司 Server positioning method and system
CN104301451A (en) * 2014-10-17 2015-01-21 福建星网锐捷网络有限公司 Cross-network-segment host communication method, device and system
CN104994077A (en) * 2015-06-08 2015-10-21 北京奇虎科技有限公司 Wireless local area network access equipment identity marking method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108241309A (en) * 2018-01-10 2018-07-03 联想(北京)有限公司 Management control method and system
CN108241309B (en) * 2018-01-10 2021-02-19 联想(北京)有限公司 Management control method and system
CN110868479A (en) * 2018-08-27 2020-03-06 北京淳中科技股份有限公司 Equipment addressing method, device and system
CN111181787A (en) * 2019-12-30 2020-05-19 浪潮电子信息产业股份有限公司 BMC parameter configuration method, device, equipment and medium
CN111181787B (en) * 2019-12-30 2023-10-13 浪潮电子信息产业股份有限公司 BMC parameter configuration method, device, equipment and medium
CN113206829A (en) * 2021-03-30 2021-08-03 新华三云计算技术有限公司 Address information analysis device
CN112804377A (en) * 2021-04-08 2021-05-14 紫光恒越技术有限公司 Data query method, electronic equipment, server, storage equipment and gateway equipment
CN114629816A (en) * 2022-03-14 2022-06-14 京东科技信息技术有限公司 Method and system for detecting public network IP network state
CN115038102A (en) * 2022-06-07 2022-09-09 深圳震有科技股份有限公司 Monitoring method, system and device for 5G Internet of things terminal and storage medium

Also Published As

Publication number Publication date
CN106657434B (en) 2019-12-06

Similar Documents

Publication Publication Date Title
CN106657434B (en) method and device for checking IP address
US9847965B2 (en) Asset detection system
EP2837159B1 (en) System asset repository management
EP2837157B1 (en) Network address repository management
CN107592209B (en) Method and system for automatically configuring IP address information by multi-network card server
US11329948B2 (en) IPV6 stateless address auto-configuration
CN106453681B (en) IP address allocation method and device
US20120124242A1 (en) Server and method for testing pxe function of network interface card
US9973399B2 (en) IPV6 address tracing method, apparatus, and system
US20100091684A1 (en) System and Method for Discovery of Dynamically Assigned Information Handling System IP Addresses
CN109600410B (en) Data storage system and method
JP4257238B2 (en) Automatic IP address assignment method / program / recording medium / device / system, chassis management device, control card
CN107070719B (en) Equipment management method and device
JPWO2014142258A1 (en) COMMUNICATION SYSTEM, CONTROL DEVICE, ADDRESS ALLOCATION METHOD, AND PROGRAM
CN108833129B (en) Network topology discovery method and device
CN106027354A (en) Backflow method and device for VPN (Virtual Private Network) client
CN106878485B (en) Message processing method and device
CN106375489B (en) Method and device for processing Media Access Control (MAC) address
CN113766041A (en) Method and device for acquiring Media Access Control (MAC) address of first server
CN107547684B (en) IPv6 address allocation method and device
CN118055052A (en) Dynamic host configuration protocol test method, electronic device and computer readable medium
CN112995353B (en) IPv6 address survivability scanning system and method based on flow analysis
CN106973126A (en) A kind of arp reply method and device
CN109451093B (en) Loopback interface address allocation method and device
CN109451047B (en) Data transmission method, device, equipment and storage medium of monitoring alarm 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
CB02 Change of applicant information

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Xinhua Sanxin Information Technology Co., Ltd.

Address before: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: Huashan Information Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant