Practical tips help you use Apple stuff   Subscribe through Feedburner

Subscribe by Email · Subscribe to the MacTips feed · Follow MacTips on Twitter. · Follow us on YouTube. · Join MacTips on Facebook.

Looking for something in particular? A simple search is your best bet:

Or try the Categories and Tags page.

How to check your Internet connection with Ping

Is anybody there? Use Ping, like sonar, to check an Internet connection.

How to check your Internet connection with Ping
Mac Tip #382, 29 April 2009

Use Ping to check an Internet connection.

The other day my Internet connection suddenly stopped working — I knew because Gmail showed an endless Connecting … message, until it came up with Failed to load ….

I tried some of the usual steps: restarting the modem and wireless devices. It didn’t seem to help.

That’s when I broke out Ping, a very handy free tool for checking Internet connections.

Ping is like sonar

Ping works rather like radar or sonar: it sends out little ‘blips’ into the network, and then listens to what comes back. If the ‘blips’ don’t return, then there’s nothing out there.

If the blips do return then you can learn some interesting information from how long they took.

Network Utility contains Ping

Ping a website

Ping a website

To use Ping on your Mac open Applications > Utilities > Network Utility. The Network Utility window opens to display half a dozen tabs. Click on the Ping tab to call up the Ping interface.

Enter an address and start pinging

In the text box near the top of the window enter an Internet address, such as google.co.nz or google.com.

Note: test this while you know for sure your Internet connection is working correctly. Some sites disable ping because it can be misused. Try various sites until you find one that does work, such as Google. Then, if you suspect at a later date that your Internet connection is not functioning, you’ll know which sites to ping.

Click the radio button to send only 10 pings, then click the Ping button.

What the Ping results mean

The results area in the lower part of the window now shows you what’s happening to those pings.

When you ping a network address your machine sends out a tiny packet of data (64 bytes). The site you ping sends back an ‘echo’ of the same data. That all takes a little time, measured in milliseconds. 1 millisecond (ms) = 1/1000th of a second.

I sent 4 pings. The results were:

Ping has started ...

PING google.com (74.125.45.100): 56 data bytes
64 bytes from 74.125.45.100: icmp_seq=0 ttl=242 time=204.604 ms
64 bytes from 74.125.45.100: icmp_seq=1 ttl=242 time=201.161 ms
64 bytes from 74.125.45.100: icmp_seq=2 ttl=242 time=202.834 ms
64 bytes from 74.125.45.100: icmp_seq=3 ttl=242 time=201.866 ms

--- google.com ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 201.161/202.616/204.604/1.292 ms

In the first few lines the important stuff is at the end: time=204.604 ms. That tells me that the round trip for that ping took almost 205 milliseconds.

The first summary line tells me that my computer sent 4 packets, all 4 were received and 0% were lost.

The final summary line tells me the minimum, average, maximum trip times and the standard deviation.

Time and speed

The 200 or so milliseconds round trip to Google.com is a bit slow, probably because the Google.com machine I pinged is quite far away. For comparison I pinged my cable modem, located only a couple of metres from my Mac. This time the result was: time=0.761 ms. Less than 1 millisecond, compared to 200.

When the network isn’t working

To simulate an Internet connection that wasn’t working, I started 10 pings to google.com and then turned off my wireless connection. Here are the results, showing 90% packet loss:

Ping has started ...

PING google.com (74.125.45.100): 56 data bytes
64 bytes from 74.125.45.100: icmp_seq=0 ttl=242 time=200.773 ms

--- google.com ping statistics ---
10 packets transmitted, 1 packets received, 90% packet loss
round-trip min/avg/max/stddev = 200.773/200.773/200.773/0.000 ms

These results show that only 1 ping got away before I broke the connection.

Test Ping before you need it

Ping can be a very handy tool if you suspect your Internet connection is giving you problems. It can prove an overall slow-down, or a failure to ‘talk’ with the outside world.

Some sites disable ping, because it has been misused in the past, so test it out before you need it, and figure out which sites do let you ping them.

Coming up soon: how to use Traceroute.

See more from: Mac Tips,Macintosh

It's great to see you visiting again! Have you tried the free MacTips updates via RSS or email, MacTips on Twitter and our YouTube channel? There may be more Tips on this topic. We'd love your Comments too.

Tell us what you think.
Note: there may be a delay before your comment appears. I now approve all comments from new visitors, in an attempt to keep spam at bay.

* 2 comments… read them below and tell us what you think.

Liam Burke 1 5 January 2010 at 02:53:26

Dear or Madam,
I would like to know why my server will not let me onto google,it comes up server to slow . Can you tell me how to fix it
Regards Liam Burke.

Reply

Miraz 2 5 January 2010 at 16:04:19

Hi Liam,

this sounds like a temporary thing. Does it always happen when you try to connect to Google? What happens if you try a different Google server, such as google.co.uk or google.co.nz?

Reply

Add your Comment

* 1 trackback

click here