Wednesday, 22 August 2012

Using Ping To Test An Internet Connection

A simple way to test your internet connection is to use the Ping network command. Ping is built into Windows and tests whether you can reach a particular website – it also measures the round-trip time to receive a reply from that website.

Ping is an easy way to test if your actual internet connection is faulty or if the problem lies elsewhere – e.g. just with your web browser or viruses. When reporting a problem to your
broadband provider you may be asked to use Ping to test your internet connection so it helps to know how to use it.


How To Use Ping
XP – Click ‘Start’ then ‘Run’ and type  CMD  into the ‘Open:’ text box then press ‘OK’ to open a Command Prompt window.
Vista/Windows 7 – Click ‘Start’ and type  CMD  into the ‘Search’ text box then right click on the ‘CMD’ program shortcut at the top of the search results and choose to ‘Run As Administrator’ (say yes to any confirmation message) to open a Command Prompt window.
In the Command Prompt window, type   ping www.google.com   and press the Enter key to ping Google (you can ping other websites in the same way). If your internet connection is working ok you should see a similar response to this:
ping
What It Means
  • Our ping to Google sent 4 requests (‘packets’ of data) – each of which asked Google to reply if they received our request. All our requests must have reached Google ok because we got 4 replies from them – so we know our internet connection is working at the moment.
  • The ‘time’ next to each reply is the time it took to get a reply back from Google – measured in ms (milliseconds) and the quicker the better. This ’round-trip’ reply time is often call ‘lag’ and is very important for gamers (where quick responses are required) but less so for normal internet browsing. A time of 20 to 50 ms as shown in the example above is very quick, over 100 is slow and over 1000 is very slow – not suitable for gaming but common if you use mobile 3G broadband.
Common Ping Error Messages
Because 4 requests are sent to the website you pinged, you will likely see these error messages repeated 4 times – once for each request.
  • “Ping request could not find host www.google.com … etc” – either your network/internet connection is faulty OR you pinged an incorrect website name (check spelling or try pinging another site e.g. www.yahoo.com)
  • “Request timed out” – either your network/internet connection is faulty OR the website you pinged is itself having problems (try pinging a few other websites to double check if the problem is with a specific website or your network/internet connection)
Multiple Pings
Instead of pinging just once (which sends 4 requests to the website), it is possible to run a continuous Ping by adding a -t to the end of the command:
  • E.g. type in   ping www.google.com -t   then press the Enter key
This command will send constant requests so you should receive a continual stream of replies that scroll down the window – useful for testing if your internet connection is only intermittently faulty. Keep an eye out for error messages and also check that the time stays fairly constant (it should if your internet connection is good).
  • Press CTRL key and C to stop the multiple pings.
Note: it is not nice to constantly ping a website for more than a minute or two as it uses up a tiny bit of the website’s resources and (theoretically) could lead to a website banning you if you ping them for hours on end. We used Google in our examples because they are so huge that a few pings won’t matter.

Conclusion
Ping is a useful first step in troubleshooting supposed ‘internet’ issues – if you receive replies with no errors from a range of websites you know that your internet connection is working ok so can rule it out as a source of any issues with web browsing.

No comments:

Comments System