Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting IP Address thru MAC address

Status
Not open for further replies.

savvyuser

Technical User
Apr 26, 2004
50
0
0
PH
Hi Folks,

I don't know if this is the right forum for my concern. We have a situation in our company that we want to get the equipment's IP address. However, it give us its MAC address not the IP. To workaround, we have to call our system administrator everytime we need to the IP address for troubleshooting purposes. For now, the only way to view its IP address is thru DHCP server. Is there a tool that could return an IP address or hostname when certain MAC address is inquire.

Thank you very much!!!!!
 
Do you know the hostname of the machine? If so, then you could nslookup that. If not, I'll work on a script for you.
 
Hi tfg13,

Yes, we don't know the hostname of the machine. However, administrator could assign hostname on this equipment because it has unique MAC address and this is using a dynamic IP addresses in which handled by DHCP server. Moreover, we have a problem because everytime the equipment reboots will release its previous IP even we assigned a static IP. Part of troubleshooting, we need to know the IP address of its machine. But we don't have a tool that would display the IP address by MAC address. Your idea may be a solution of this problem.

Any help you would do is very much appreciated. Thanks.....
 
The adminstrator could reserve an IP address on the DHCP server for that MAC. This way the equipment is still using DHCP since it will not keep the static address when assigned manually.??
 
Try this in the command prompt:

*Let say your network is class c with the address range *192.168.0.1 - 192.168.0.254 then run the command below:


c:\>FOR /L %i IN (1,1,254) DO nbtstat -a 192.168.0.%i>>nbtstat.txt

(1,1,254) - (start,step,end)
%i - variable.
nbtstat.txt - Resulting file.


This event will take awhile . .

Now open file nbtstat.txt and search for the IP address that matches your MAC address.
 
However, it give us its MAC address not the IP

Gotta ask you to jump back a bit. First off what is the "it" you are saying is giving you the MAC address?

Do you or a user have access to the machine? Is there a reason you can't run IPCONFIG to determine the current IP address?

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
Good catch Mark. I've been sitting here pondering how I was going to be able to get this to work when I scrolled down, you had your comment. Makes sense. The other thing that I would like to know is about the host name. Is it not static?
 
The device might not be a PC as such. I've had a similar problem myself to the original poster with a network device which has the MAC address printed on the back but I needed to telnet to it to configure it but there's no way of knowing what the IP address of it is (which I guess is why most such devices also have serial ports heh).

My research in the past basically came up with there used to be a RARP (reverse ARP) command but it's no longer available. Never did find anyone that coded an equivalent.

Reserving the IP within DHCP though is definetly the right way to go, as stunpals says this still allows it to use DHCP but (based on the device's MAC address) ensures it gets the same IP everytime.
 
here is a link to a freeware utility that works really well. This can show you IP, MAC and Hostnames. By default it only shows host and IP, but MAC is a choice in the options.


I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
If the pc responds to a ping then pinging the hostname followed by Arp -a will reveal the ip address and corresponding mac address.

 
NickFerrar,
Maybe I assume too much, but the post was in a Windows 2003 forum, so naturally, I assumed that the individual is looking for an answer for a server related issue, not a network device. Of course, I have been wrong in the past...
 
Hi everyone!

Just back from the busy hell. I've tried everyone's suggestion but it seemed did not resolve the issue. This is a barcode scanner with limited software installed inside. This is supposedly for serial interface. However, we made an electronic ckt. inorder to interface the equipment in the network hub. The process has been working fine. However, we have been renewing the IP address everytime the equipment is out in the network or taken out from the network. Somehow, we can purchase another barcode scanner that will suit our requirements.

Thanks everyone for sharing your thoughts. It is very appreciated. God bless you all!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top