FANDOM


Ping

Ping command

About

Ping is a network administration utility used to test the reachability of a host on an Internet Protocol (IP) network and to measure the round-trip time for messages sent from the originating host to a destination computer. The name comes from active sonar terminology which sends a pulse of sound and listens for the echo to detect objects underwater.[1]

Ping operates by sending Internet Control Message Protocol (ICMP) echo request packets to the target host and waiting for an ICMP response. In the process it measures the time from transmission to reception (round-trip time)[2] and records any packet loss. The results of the test are printed in the form of a statistical summary of the response packets received, including the minimum, maximum, and the mean round-trip times, and sometimes the standard deviation of the mean. Ping does not evaluate or compute the time to establish the connection; it only gives the mean round-trip times of an established connection with an open session.

Depending on the implementation, the ping command can be run with various command line switches to enable special operational modes. Example options include: specifying the packet size used as the probe, automatic repeated operation for sending a specified count of probes, and time stamping.

Ping may be abused as a simple form of denial-of-service attack in the form of a ping flood, in which the attacker overwhelms the victim with ICMP echo request packets.

Troubleshooting

0% Loss = OK

In this example, the ping command is used to ping the hostname www.google.com (or IP address 74.125.137.104). The -n option tells the ping command to send 5 ICMP Echo Requests instead of the default of 4 and the -l option sets the packet size for each request to 1500 bytes instead of the default of 32 bytes. The result displayed in the Command Prompt window will look something like this:

C:\>ping www.google.com

Pinging www.google.com [74.125.137.104] with 32 bytes of data: Reply from 74.125.137.104: bytes=32 time=68ms TTL=52 Reply from 74.125.137.104: bytes=32time=68ms TTL=52 Reply from 74.125.137.104: bytes=32 time=65ms TTL=52 Reply from 74.125.137.104: bytes=32 time=66ms TTL=52 Reply from 74.125.137.104: bytes=32 time=70ms TTL=52

Ping statistics for 74.125.137.104:

     Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:


     Minimum = 65ms, Maximum = 70ms, Average = 67ms

The 0% loss reported under Ping statistics for 74.125.137.104 tells me that each ICMP Echo Request message sent to www.google.com was returned. This means that, my network connection can communicate with Google's website just fine.

100% Loss = BAD

In this example, the ping command is used to ping the hostname www.google.com (or IP address 74.125.137.104). The -n option tells the ping command to send 5 ICMP Echo Requests instead of the default of 4 and the -l option sets the packet size for each request to 1500 bytes instead of the default of 32 bytes. The result displayed in the Command Prompt window will look something like this:

C:\>ping www.google.com

Pinging www.google.com [74.125.137.104] with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out.

Ping statistics for 74.125.137.104:

   Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

The 1000% loss reported under Ping statistics for 74.125.137.104 tells me that each ICMP Echo Request message sent to www.google.com was unable to be returned. This means that, my network connection cannot communicate with Google's website.

A response of "Request timed out" means that there was no response to the ping in the default time period (1 second). You can check for the following: A router is down.

To check the routers in the path between the source and the destination, use the tracert command. For more information, see Using the tracert command.

The destination host is down.

Physically verify that the host is running or check connectivity through another protocol. In addition, check the network cables and network card light in the back of the computer to ensure connections are active.

There is no route back to your computer.

If the host is running, you can check for a return route by viewing the default gateway and local routing table on the destination host.

The latency of the response is more than one second.

Use the -w option on the ping command to increase the time-out. For example, to allow responses within 5 seconds, use ping -w 5000.[3]

References

  1. Mike Muuss. "The Story of the PING Program". Adelphi, MD, USA: U.S. Army Research Laboratory. Archived from the original on 8 September 2010. Retrieved 8 September 2010. "I named it after the sound that a sonar makes, inspired by the whole principle of echo-location."
  2. Mike Muuss. "The Story of the PING Program". Adelphi, MD, USA: U.S. Army Research Laboratory. Archived from the original on 8 September 2010. Retrieved 8 September 2010. "I named it after the sound that a sonar makes, inspired by the whole principle of echo-location."
  3. MicroSoft. "Technet:Ping." accessdaate: 22 Oct 2013. http://technet.microsoft.com/en-us/library/cc737478(v=WS.10).aspx

Links

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.