When I need to locate the IPs of devices by their mac address on a Windows system, I normally use Advanced IP Scanner (from radmin.com) to scan the network, then I use arp -a to list the mac addresses.
Is it possible to use nmap to perform the same function in Linux and possibly in Windows? Can nmap to the scanning and produce both IPs and MAC addresses?
I have tried arp -a in Linux but it doesn't seem to work as quickly as in Windows or appears to require some use input.
/vfclists
Using nmap a lot of info can be found..
nmap -A -v -v 192.168.1.0/24
gives a lot of information, even SO in some casesnmap -sn 192.168.1.0/24
gives the MAC and IP addresses. Very Useful toosudo nmap -PU 192.168.1.0/24
explains every IP addressThe following command with nmap with root privilegies (or using sudo):
results in:
This commands scans all IP addresses in a range and shows the MAC address of each IP address. It does this in a greppable format, or in other words; displays IP and MAC address on a single line. Thats handy if you want to export to Excel or run a grep on it.
It seems to also work for IP's/MAC's which are not already in the hosts ARP table. That's a good thing.
The command results in:
You can use the Ping scans, which start with the P-flag. However, I personally use -sL for this job.
http://nmap.org/book/man-host-discovery.html
Adding to antonio-saco's response. I wanted to also list the vendor as well to the output. To do that you want to print the 3rd index (MAC address) to the end of the line.
Results in: