Subscribe through Feedburner

Practical tips to help you use Macs, iPhones and iPods

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

How to check your Internet connection with Ping

Wed 29 April 2009

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.

Related Posts

  1. Traceroute reveals your Internet tracks Traceroute tracks your Internet steps. Use it to show the...
  2. Internet Explorer Tip One If someone has sent you a picture and you don't...
  3. Timeservers Timeservers keep track of the exact time and are happy...
  4. How often should I check mail? Eudora Tip #216/24-March-2004 How often should I check mail? Visit...
  5. Get away wireless An Airport Express is a simple way to convert a...

Hey. Welcome back. Sign up for free MacTips updates via RSS or email, follow MacTips on Twitter and check our YouTube channel. Check for more Tips on this topic. We love your Comments too.

{ 1 trackback }

Traceroute reveals your Internet tracks — Mac Tips
Wed 06 May 2009 at 05:56:13

{ 2 comments… read them below or add one }

1 Liam Burke Tue 05 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

2 Miraz Tue 05 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

Leave a Comment