Resolving MAC Address to Hostname

  • Thread starter Thread starter kjfrey55
  • Start date Start date
K

kjfrey55

Is there a command-line command to resolve the MAC address of a device to
it's hostname? I'm getting a conflict that show's the MAC address of the
other machine, but when I try to trace it by physically tracing the cable
connected to the switch, I can't find where it goes. (poor labeling by the
person who set it up). If I have the hostname, I'll have a better idea of
what and where the device is.
 
Is there a command-line command to resolve the MAC address of a
device to it's hostname? I'm getting a conflict that show's the
MAC address of the other machine, but when I try to trace it by
physically tracing the cable connected to the switch, I can't find
where it goes. (poor labeling by the person who set it up). If I
have the hostname, I'll have a better idea of what and where the
device is.

If by "hostname" you mean "Microsoft Computer Name", then Yes.

Use the command:

nbtstat -a computername

and the resulting response should include a MAC address.
Make sure you use a lower-case "-a". An uppercase "-A" is followed by
an IP address instead of a computer name.

HTH,
John
 
Thanks for the response, but I have the MAC address and need to have the
response include the Microsoft computer name.
 
Some confusion - the computer name is whatever you designated. Run Ipconfig
to determine which network adaptor card has the MAC of interest.
 
I've done a poor job of explaining my issue so I'll try again.

- I have one device on my network that is configured with a static IP address.
- Do to lack of proper documentation by my predecessor, I don't know the
computer name that was given to it, nor can I trace its physical location by
following wires - they disappear into the walls.
- I would like to learn it's computer name because that will give me a clue
as to what it is and where to find it.
- The switch it's plugged into is only showing me it's MAC address.
- The DHCP server kept giving out the IP address to other devices because
the address wasn't excluded from the scope.
- I've since excluded it, so the conflict doesn't occur.
- I'd still like to use a command on the MAC address to tell me the computer
name so I can track this device down.
- Using nbtstat only gave me the address table and name of the 2nd device
that the DHCP server was giving the address to, not the mystery device in
question.

I hope this is more clear.
 
I've done a poor job of explaining my issue so I'll try again.

- I have one device on my network that is configured with a static
IP address. - Do to lack of proper documentation by my
predecessor, I don't know the computer name that was given to it,
nor can I trace its physical location by following wires - they
disappear into the walls. - I would like to learn it's computer
name because that will give me a clue as to what it is and where
to find it. - The switch it's plugged into is only showing me
it's MAC address. - The DHCP server kept giving out the IP address
to other devices because the address wasn't excluded from the
scope. - I've since excluded it, so the conflict doesn't occur.
- I'd still like to use a command on the MAC address to tell me
the computer name so I can track this device down.
- Using nbtstat only gave me the address table and name of the 2nd
device that the DHCP server was giving the address to, not the
mystery device in question.

I hope this is more clear.

:

You say that you know its MAC address and since you've been able to
exclude its IP address from the DHCP, then you also seem to know its IP
address. (I'm assuming by "excluded it" you mean excluded the IP
address from DHCP as opposed to excluding the device from the router
by disabling its port) Since you know its IP address, simply type the
command:

nbtstat -A 192.168.0.5 (<- replace with actual IP address)

and the resulting printout will show the Computer name in the "Name"
column. (Make sure you use a upper-case "A" in "-A")

If this is giving you problems, there are some freeware subnet scanning
programs that will give you the information you need... one is
"netscan".

<http://www.softperfect.com/products/networkscanner/>

HTH,
John
 
That's correct - I've excluded it from DHCP, not shut down the port.

When I tried the nbtstat -A command I was only getting the Computer name of
the known device, not the one I'm trying to track down. Probably because the
known device was still in DNS. Now that I've given the known device it's own
static IP and let the DNS entry die, I only get "Host not found" when I type
nbtstat -A ipaddress. I am able to ping it and get "Reply from..." responses.
 
That's correct - I've excluded it from DHCP, not shut down the
port.

When I tried the nbtstat -A command I was only getting the
Computer name of the known device, not the one I'm trying to track
down. Probably because the known device was still in DNS. Now
that I've given the known device it's own static IP and let the
DNS entry die, I only get "Host not found" when I type nbtstat -A
ipaddress. I am able to ping it and get "Reply from..."
responses.

What this indicates is that the machine with this IP does not support
Windows Networking. It's either a Windows machine with file sharing
disabled or a firewall in place or, more likely, a Printer or Linux
machine without NetBT support enabled. Try connecting with Telnet,
FTP, http, and/or SSH. If the device responds on these ports, the
login prompt may give you a clue to the device.

Other than that, follow Larry's advice and disconnect the device and
see who complains.

Good Luck,
John
 
Got it. Thanks John.

John Wunderlich said:
What this indicates is that the machine with this IP does not support
Windows Networking. It's either a Windows machine with file sharing
disabled or a firewall in place or, more likely, a Printer or Linux
machine without NetBT support enabled. Try connecting with Telnet,
FTP, http, and/or SSH. If the device responds on these ports, the
login prompt may give you a clue to the device.

Other than that, follow Larry's advice and disconnect the device and
see who complains.

Good Luck,
John
 
Back
Top