Before we get started
After spending over 20 years working with Macs, both old and new, theres a tool I think would be useful to every Mac owner who is experiencing performance issues.
CleanMyMac is highest rated all-round cleaning app for the Mac, it can quickly diagnose and solve a whole plethora of common (but sometimes tedious to fix) issues at the click of a button. It also just happens to resolve many of the issues covered in the speed up section of this site, so Download CleanMyMac to get your Mac back up to speed today.
There’s nothing quite as frustrating as slow or intermittent Internet!
In this article, I’ll show you how to test the speed and quality of your Internet connection, using MacOS’ built-in ‘ping’ command. And, if you’re struggling to even get online, I’ll also be demonstrating how you can use this command to test whether the connection between your Mac and your router might be to blame for your connectivity problems!
How can I use ‘ping’ to test my Internet speed?
Your Mac’s ‘ping’ command tests the network by transmitting packets of data to a URL, and then timing how long it takes each packet to come back – kind of like how a sonar sends out a pulse of sound and then waits for the echo.
By measuring how long it takes each packet to make this round trip, you can see exactly how fast or slow your connection really is. This can help you identify whether your network runs more quickly or slowly at certain times of the day, or whether your Internet connection really is slower than it used to be.
While you could ‘ping’ a random URL, you can also use this technique to test the speed between your Mac and a specific website, which is handy for troubleshooting any issues you’re having with a particular site.
To run a simple ‘ping’ test:
- Open a Finder window.
- Navigate to ‘Applications > Utilities.’
- Launch the Terminal app.
- Type ‘ping’ into the Terminal window, followed by a URL. You can use any URL, so I’m using www.chriswrites.com.
- Press the ‘Enter’ key on your keyboard.
The Terminal will now send some packets of data to this URL, and print the results to the Terminal. Each line displays the size of the packet that was sent, and the time it took this packet to come back – the lower the number, the better!
By default, the Terminal will keep pinging the network until you tell it to stop, so when you’re ready to terminate the ping test, either use the ‘Control+C’ keyboard shortcut, or close the Terminal window.
Struggling to connect to the Internet?
You can also use the ping command to send packets of data to another device. If your Mac is having difficulties connecting to the Internet, then you can use this technique to test whether the connection between your Mac and the router might be to blame.
Before you can ping your router, you’ll need to know its IP address:
- Select the ‘Apple’ logo from your Mac’s menu bar.
- Navigate to ‘System Preferences… > Network.’
- In the left-hand menu, select the network interface that you want to test, such as ‘Wi-Fi.’
- Click the ‘Advanced…’ button.
- Select the ‘TCP/IP’ tab.
- You’ll find your router’s IP address next to ‘Router.’
- Make a note of this address, or use your Mac’s ‘Copy’ command.
In the Terminal window, type ‘ping’ followed by the router’s IP address, and then press the ‘Enter’ key on your keyboard. Your Mac will then send some data to this address, and display how long the data took to perform the round trip. If the data doesn’t come back, then the Terminal will inform you that this device was unreachable, and you’ll know exactly why you’re struggling to get online.
If your router is unreachable then it’s worth checking whether macOS’ networking software is working correctly, as this can prevent it from connecting to your router. You perform this check using 127.0.0.1, which is known as the loopback address. In Terminal, run the following command:
If you don’t receive a response, then you’ll know that your Mac is struggling to connect to your router due to issues with its networking software. You now know exactly where you need to focus your efforts, in order to restore your Internet connection.
Don’t fancy using the Terminal?
If you’re not familiar with Terminal commands, then macOS has a built-in Network Utility tool that lets you ping the network using a more traditional user interface. This application is a bit buried in the file system, so the easiest way to launch it is via a Spotlight search:
- Click the little magnifying glass icon in your Mac’s toolbar.
- Start typing “network utility,” and then select the application when it appears.
- Inside the Network Utility app, select the ‘Ping’ tab.
- Enter the URL that you want to ping.
- Specify whether you want to send unlimited pings or a specific number of pings, and then click the ‘Ping’ button.
Your Mac will now perform your ping request, and display its findings in the Network Utility app.