Find local network devices using ping | Networking | Mac OS X Hints | Macworld

The command line ping command on Mac OS X allows you to find all the network devices in your home; just send a normal ping to a special IP address on your network. First figure out your TCP/IP address for your computer, go to System Preferences/Network and see it, normally it is something like 192.168.1.xxx. start Terminal (easiest way is to go to Spotlight on the upper left and type in)

terminal

In order to do this, you need to know two things—your network’s IP address setup and the subnet mask value. Both of these values are easily seen in the Network control panel, in the IP Address and Subnet Mask fields, respectively. In my case, my Mac’s IP address is 192.168.1.77, so the network is using a 192.168.1.xxx sequence, and the subnet mask is 255.255.255.0. The special ping address can be figured out by taking any zero values from the subnet mask, changing them to 255, and then putting them into the same relative position in the IP address field. In my case, the last digit of my subnet mask is zero, so I change that to 255, and put it into the last position of my IP address, then ping that address:

ping 192.168.1.255

Press Control-C to stop it. But what if that’s not enough? What if you’ve got a lot of devices, and you can’t really be sure which is which? After running the broadcast ping, you can then run the arp (which is short for Address Resolution Protocol ) command. If you use arp with the -a option, it will show everything that it knows about. In my case, it looks like this:

arp -a

One response to “Finding all network devices on a Mac”

  1. pjdavis Avatar

    Cool! I have not heard of either pinging the network or the arp command.

    There is so much smart stuff in TCP/IP – so much great engineering has gone into it over the years.

I’m Rich & Co.

Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

Let’s connect