Você pode usar o nmap para executar uma verificação de ping.
nmap -sP 192.168.254.*
Starting Nmap 5.00 ( http://nmap.org ) at 2011-03-09 11:32 GMT
Host xyzzy.lan (192.168.254.189) is up (0.00022s latency).
MAC Address: 00:0C:29:5B:A5:E0 (VMware)
Host plugh.lan (192.168.254.196) is up (0.00014s latency).
MAC Address: 00:0C:29:2E:78:F1 (VMware)
Host foo.lan (192.168.254.200) is up.
Host bar.lan (192.168.254.207) is up (0.00013s latency).
MAC Address: 00:0C:29:2D:94:A0 (VMware)
Nmap done: 256 IP addresses (4 hosts up) scanned in 3.41 seconds
Editar:
Um script sed para filtrar a saída para IP - > MAC - coloque isso em um arquivo.
/^Host.*latency.*/{
$!N
/MAC Address/{
s/.*(\(.*\)) .*MAC Address: \(.*\) .*/ -> /
}
}
/[Nn]map/d
s/^Host .*is up/& but MAC Address cannot be found/
e usá-lo assim
nmap -sP 192.168.254.0/20 | sed -f sedscript
192.168.254.189 -> 00:0C:29:5B:A5:E0
192.168.254.196 -> 00:0C:29:2E:78:F1
Host foo.lan (192.168.254.200) is up but MAC Address cannot be found.
192.168.254.207 -> 00:0C:29:2D:94:A0