Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When using nbtstat -a (IP address), will it return the true MAC hardware address of the machine?

share|improve this question
    
Could you add the OS (or multiple of them)? I guess everyone is assuming windows since you mentioned nbtstat, but that is still an assumption. –  Hennes Jan 18 '13 at 15:04

3 Answers 3

up vote 0 down vote accepted

Either:

1
Collect them from a directly connected computer, or

2
Or run a program on the local computer you are trying to get the mac from, e.g. getmac which will return output like this:

enter image description here

Or via vb:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select MACAddress from Win32_NetworkAdapter where DeviceID=1")
For Each objItem in colItems
    Wscript.Echo "MAC Address: " & objItem.MACAddress 
Next

Source of the script: this very similar question on S.U.

3
Or get them from the switches the computer is connected to. Precisely how depends on the brand of the managed switch.

4
Or write them down whenever you get new hardware and store them in a inventory database. (Mostly useful for large corporation, which will store much more information such as model, type, CPUs, RAM, helldesk calls, ...)

share|improve this answer

If you use nbtstat -a you need to specify a HOSTNAME.

To use an IP address, it's nbtstat -A <ip>.

Other options from Unix are arp -a (which doesn't really scan everything available).

share|improve this answer

True MAC address? True MAC address? Unless you pull the NIC and take it back to the manufacturer there is truly no way of knowing for sure when there are programs that can easily change your hardware address WITHIN SECONDS...

Seconds.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.