I've written a script that I call netinv which uses the ARP cache to identify devices on the network segment. For each device, it looks up the vendor name based on the MAC address and also tries to get the remote system's netbios name. For small (i.e. home) networks, the vendor and netbios name are usually enough to remind you what a particular device is.
To use it, start by downloading the script from my page; you can do this in the Terminal by typing:
curl -O 'http://www.studiosells.net/msells/netinv'
Once downloaded, move it to a directory on your path and make it executable with chmod a+rx ./netinv (assuming you're in that directory). Read the rest of the hint for some sample output and further explanations on how the tool works.
Sample Output:
$ ./netinv IP MAC DNSname NBname Vendor ---------- ---------- ---------- ---------- ---------- 192.168.3.1 0:a0:c5:e2:4a:16 ? ZYXEL COMMUNICATION 192.168.3.3 0:0:39:8:4:1a ? PIZZA TOSHIBA CORPORATION 192.168.3.4 0:4:e2:52:4e:11 dell CANADA SMC Networks, Inc. 192.168.3.40 0:50:e4:99:2c:39 meatloaf MEATLOAF APPLE COMPUTER, INC. 192.168.3.52 0:b:db:a7:4c:5 ? STACY Dell ESG PCBA Test 192.168.3.60 0:4:76:da:47:1d dell DELL 3 Com Corporation 192.168.0.110 00:03:93:bf:17:c0 eyeBook EYEBOOK Apple Computer, Inc. 192.168.3.200 0:3:93:bd:26:1e fatmac FATMAC Apple Computer, Inc.Notes:
perl -e 'for $i (1..10) { system qq!nc -z -w 1 192.168.0.$i 22!; }'Note that port 22 does not have to be open on the system. I just found that using nc was faster than using ping -c 1.Mac OS X Hints
http://hints.macworld.com/article.php?story=20041010213347605