Helping people with computers... one answer at a time.
One of the oldest diagnostic tools, ping simply validates connectivity from point A to point B and doing so provides additional useful information.
Sometimes when I search for solutions for my home networking problem, I frequently see some people suggesting that I ping my PC by IP and/or by computer name. What does PING command actually do? What's the point of using this command? How do we read and understand the results (sent, received, and lost) of the packets?
•
Ping is perhaps one of the oldest and most basic network diagnostic tools. In concept the tool is very, very simple: it sends out an "are you there?" kind of request, and expects to hear back a "yes, here I am!" kind of response.
Very basic, very simple, and yet very powerful as a first line of network diagnosis.
•
The ping command runs in a Windows Command Shell (or a Linux/Mac/BSD/Solaris/etc. terminal window - it's a very ubiquitous command), and has a very basic syntax at it's core:
For example, if you open up a command window and type in "ping ask-leo.com", you'll see something like this:
There's a lot of information here, and I'm not going to get into all the geeky details, but here are some of the basic, and important things that ping does:
"Pinging ask-leo.com [72.3.133.152]" - Ping only pings IP addresses so the first thing it did when I asked it to ping "ask-leo.com" is it looked up the corresponding IP address. This is perhaps one of the quickest ways I know of to determine the IP address associated with a domain. Also, if this look-up fails, you'll know that there's a typo in the domain name, or the domain name look-up (DNS) is failing for some reason.
"Reply from 72.3.133.152:" - this tells you that the remote server at that IP address replied, obviously. What that means, though, is that the entire route across the internet, from your machine through routers and switches and networking equipment and whatever else, worked. As did the return path carrying the server's reply. If this fails, ("timed out") then something along the connection between you and the server might be broken, the server might be off line, or the server might not even exist. It's also possible that the server is explicitly configured not to respond to ping requests.
"time=69ms" - this is the round trip time; the time between sending the "are you there?" and receiving the "yes I am!". In this case, 69 milliseconds. Since the ping is repeated several times you can see that this time is fairly consistent, which is good. The time will vary depending on many factors including how close you are to the remote server, how many routers and other networking equipment are in between you and that server, and more. In the example above, the ping was from me in the Seattle area to the Ask Leo! server housed in Texas. A quick test of a ping to a server in Japan resulted in times twice as long.
"Sent = 4, Received = 4" - one of the things that TCP/IP is designed to deal with is packet loss. Ideally, every packet you send should get to where it's going, but for various reasons that doesn't always happen. As long as the packets can get there after a retry or two, in normal usage you'd never notice. Ping sends multiple packets and reports specifically on the success rate, so that you can see if a particular connection is prone to packet loss.
"Approximate round trip times" - while on average the same kind of packet sent to the same destination should take roughly the same amount of time, that's also not always the case. Sometimes for reasons as diverse as the equipment and paths that the packets take, some take longer than others. Ping reports these statistics so that you can see if a particular connection is prone to this type of problem.
Ping also includes several options (type "ping -?" for a list), but the simplest use as above is probably the most common.
There's one usage that is not intuitive, and yet something I use all the time. As you've seen above, ping can be used to quickly translate an domain name into its corresponding IP address (i.e. "ask-leo.com" into "72.3.133.152"), but it can also do the reverse:
Using the "-a" switch to ping, and giving it an IP address, ping does what's called a reverse lookup and displays a domain name that is assigned to that IP address. This is very handy at times since many IP addresses are also assigned fairly descriptive domain names.
Note: in the example above you'll see I used the IP address for "ask-leo.com", and yet ping reported that IP as being "pugetsoundsoftware.com". This is simply because any single IP address can be assigned any number of domain names, so ping just reports the first one it finds. For a more complete list of domain names associated with an IP address you'll need to use a service like MyIPNeighbors, which given an IP address will list the domains that share that IP address, and likely all reside on the same server.
Aside from a quick tool for DNS and reverse-DNS look-ups, ping is most commonly used simply to verify basic connectivity between two machines. The ping service is typically one of the first, and simplest services to be loaded onto a server, and runs independently of any other. It's not uncommon at all for a server who's websites are inaccessible because of a software problem to still respond to a ping. That typically helps determine that there's not a connectivity problem, but rather a problem on the server itself.
It's also worth noting that some servers actively disable responding to ping requests for assorted security related reasons. For example, even though the server is most definitely up and running, you typically cannot ping "microsoft.com", but on the other hand you can ping "google.com". In fact, pinging a site like "google.com" or "yahoo.com" is often a quick way to ensure that your own internet connection is, in fact, working.
Article C3571 - November 23, 2008
Actually tried that reverse pinging for the domain name. No luck Leo, not even on your site.
Posted by: Bob Ruttske at November 28, 2008 11:25 AMJust returned the ip address. :-(
Ping is actually an acronym! And it stands for....wait for it......Promiscuous InterNet Groper
Posted by: Nick Campion at December 3, 2008 6:13 AM-another useless fact remembered from my Unix training days!
hi my name is john i have a question for you guys..
i have a friend and his using an static IP and some website tells that his IP was blocked??can you please tell me whats the cause and best solution on that kind of case... thanks..
15-Oct-2010
Posted by: john at October 15, 2010 5:21 AM
Hello,
i have Airtel broadband and a Tata broadband connection. i have around 50 pcs connecting
through a airtel broadband connection. both are dsl connections with my phone line going
into dsl modems and a ethernet cable going from dsl modem directly into switch. currently
only airtel connection is connected with static ip on my private lan and usings the airtel
isp DNS servers as dns ip address and the default gate way as 192.168.1.1 (ip add of the
dsl modem). All Pcs are connected in a workgroup.
when in full use my users complain of certain web pages not opening. when i ping internet
addresses like yahoo or google i get 2 reply packets and 2 lost packets. i suspect that a
single broadband connection is not able to sustain 50 simultaneous downloads/browsing. is
there any device which connect to both DSL and make one line so that its give me high
(can i used DUAL WAN ROUTER.suggest me how it work or configure on my Lan.......)
Posted by: Navi at October 21, 2010 12:12 AMspeed simultaneous browsing .help needed urgently.
nice..Thank you.I am also found one ping test tool here http://www.whoisxy.com/ping.aspx at free of cost.
Posted by: vimal at February 9, 2011 8:49 PM