[CentOS] find IP address of device on network based on, MAC address

Sat Dec 15 15:26:56 UTC 2007
David G. Miller <dave at davenjudy.org>

John R Pierce <pierce at hogranch.com> wrote:

> Jerry Geis wrote:
>   
>> > I have a device on my network that is not DHCP and I dont know the IP 
>> > address of it
>> > and it has not method of finding it or changing it unless you know the 
>> > IP address (setable by browser).
>> >
>> > Is there a way on linux, based on MAC address, to get the IP of the unit?
>>     
>
>
> $ nmap -n -sP -PI 192.168.0.1-254 && arp -an | grep -v incomplete
I was hoping someone would mention nmap.  Here's the output from a quick 
(5.753 seconds) ping scan of my network:

[root at bend etc]# nmap -sP 192.168.0.0/24

Starting Nmap 4.20 ( http://insecure.org ) at 2007-12-15 08:10 MST
Host 192.168.0.172 appears to be up.
MAC Address: 00:0A:5E:1A:EC:9E (3COM)
Host 192.168.0.181 appears to be up.
MAC Address: 00:0F:B0:6D:61:9E (Compal Electronics)
Host 192.168.0.185 appears to be up.
Host 192.168.0.250 appears to be up.
MAC Address: 00:12:17:7A:B6:F6 (Cisco-Linksys)
Nmap finished: 256 IP addresses (4 hosts up) scanned in 5.753 seconds

You can also try letting nmap figure out what each device is with 
something like:

nmap -T4 -A 192.168.0.0/24

My x86_64 laptop confused it but it was spot on at identifying my 
wireless AP.

Cheers,
Dave

-- 
Politics, n. Strife of interests masquerading as a contest of principles.
-- Ambrose Bierce