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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resolving an IP or MAC address to hostname

Status
Not open for further replies.
Oct 24, 2002
512
US
Can anyone tell me how to find the hostname of a computer on my network if I have their IP and MAC addresses?

Ann
 
If you have the IP address, you can do an nslookup on it and if reverse resolution has been set up correctly, you should get the hostname. Otherwise, if they are windows clients, you can try an nbtstat on the IP (eg. nbtstat -A <IP address>)
 
I had already tried both.

nslookup returns the IP address of the DNS server and tells me it can't find the IP address I entered; says it a nonexistent domain.

nbtstat -a returns my IP address rather than the one I entered and give me a &quot;host not found&quot; message.

I did successfully ping the IP address before each of these two commands.

Is there something else I can try?

Ann
 
Is the machine on the other end a Windows machine? Then nbtstat -A <IP address> (make sure you use a capital A, it is case sensitive) should return the local netbios name cache for the machine.

Post the exact output of nbtstat -A <ip> here.
 
I think if you
ping -a <IP address>
that should give you the host name, or does here.

Ken
 
In order to receive the host name from an IP address, the DNS server needs to have an 'in-addr.arpa' entry (reverse DNS). Many people do not create these entries, some do. That is why when you look up the IP of your DSL modem you get something like:

206-231-252-151.rev.isp.com.

Funny, the -a switch for ping on Linux is an audible alert. You get a beep each time a packet returns. That must be a Windows command line switch.


pansophic
 
Sorry for the delay; I've been out of pocket but will return to work this morning and have further discussion with our network administrator. I believe the DNS server we use is located at our ISP and not in-house. Does that make sense? If I'm right, maybe they don't have reverse DNS set up. Thanks all for the feedback.

Ann
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top