There are times when it can be handy to know which other devices are on your local network. For example, suppose that you need to know whether a certain device (such as a computer, tablet or router) is up and running and responding. If you have a PC or Mac, you can just go to the relevant network setting to see what the IP address is, but some devices such as printers and mobile phones don’t always provide an easy way to do that.
Fortunately, there is a very useful command built into Terminal in Mac OS X called ping that can be used to do just that. Ping can be used either in the command line form, or from within Network Utility, and there are also lots of other free apps which can help you to build up a local network map by way of using the ping command.
This article shows you how to determine the IP addresses of all devices connected to your local network.
How to Use Ping
The first thing to do is open Terminal from within the Applications -> Utilities folder, or just type Terminal into Spotlight (CMD + SPACEBAR) and click on the icon when it’s found.
Once Terminal is open, you can try out the ping command by typing an example at the command prompt. Just type ping www.google.com (and hit Enter) or any other website address and you should see some results appear that indicate the website (or individual server) is responding.
Something akin to the following should be displayed:
The items of particular interest are the IP address (which is the dotted decimal address in four parts that identifies a machine on the network) and the response time in milliseconds, which is how long the ping took to complete. In general, the further away the machine is (or the slower the network it’s connected to), the higher the ping times will be.
The ping command just repeats forever until you press CTRL + C to stop it. Some versions of UNIX (on which OS X is based) include a special version of ping which lets you send a broadcast message that every device receiving it will respond to. Unfortunately, OS X does not include this version, but there is another way to get most devices to respond.
You need to know 2 things:
- Your machine’s IP address
- Your subnet mask
Both of these items can be found in the Network section in System Preferences. Open System Preferences and click the Network icon, then select the TCP/IP tab at the top as shown below:
In my case, the IP address is 192.168.2.100 and the subnet mask is 255.255.255.0.
Now, you need to look for any 0 values in the subnet mask, turn them into 255, and put them into the same position in the IP address field, and then ping that network address. For example, my subnet address has the zero in the fourth position – so my “special” ping address will be 192.168.2.255.
Now just enter this address into the ping command in Terminal, for example:
Every device on your local network should respond to this ping. Note however that some devices and computers may be configured not to respond to ping requests.
After running this command, I see the following output:
In this case only one machine on my home network has actually responded (on 192.168.2.101).
There is also an alternative command called arp (Address Resolution Protocol) which can be used to find out about every device on the local network. Type arp -a into Terminal and you’ll see a response similar to the following that lists all known devices.
The machine at 192.168.2.104 is actually a PC (!) on my local network. There’s a useful bit of information in the results of the arp command, which is called the MAC address – basically the physical hardware address of the network adapter on each machine, which can also help you identify each computer. In this case, the MAC address is e8:3:9a:37:66:22. I verified this in the Command Prompt in Windows by typing ipconfig /all which yields the following information:
Apps To Find Machines On Your Network
There are also a few apps on the Mac App Store that can help you find IP addresses and details of all machines on your network quite easily. One of the best free ones is called IP Scanner which is free (on home networks for up to 6 devices) and presents all the information in a convenient list – such as the device name, IP address and MAC (hardware address).
How To Speed Up Your Mac Easily With CleanMyMac 3There is no better tool for cleaning your hard drive from junk than CleanMyMac 3. While some speed issues on the Mac simply cannot be resolved but using an app, many that can are covered in this comprehensive cleaning utility.
But that's not all CleanMyMac 3 can be also clean up after uninstalling app and can remove temporary files, plugins, redundant files and offers better management of start up items and much more. It’s a utility that should have been built into macOS from the beginning.