You are here

what is ping

What is ping?

ping

Ping is a program that sends a series of packets over a network or the Internet to a specific computer in order to generate a response from that computer. The other computer responds with an acknowledgment that it received the packets. Ping was created to verify whether a specific computer on a network or the Internet exists and is connected.

Some have claimed that the word "ping" is actually an acronym for "Packet Internet (or Inter-Network) Groper", deliberately contrived to play on the fact that pinging with a computer is similar to what submariners do with sonar. Both the computer and the submarine's sonar send out a "ping", in the form of either a series of packets or a brief burst of sound. The ping "bounces" off the target and then returns to let you know the target is there.

Ping is both a noun and a verb, e.g., "Ping that computer", or "the router didn't return a ping".

Ping is built into almost every network-capable operating system. To ping a computer, go to a command prompt and enter ping , a space, and then the network or Internet address you wish to contact. For example, enter the following at a Windows XP command prompt:

ping 66.218.71.198

You should get a response similar to this:

pinging 66.218.71.198 with 32 bytes of data: Reply from 66.218.71.198: bytes=32 time<1ms TTL=127 Reply from 66.218.71.198: bytes=32 time<1ms TTL=127 Reply from 66.218.71.198: bytes=32 time<1ms TTL=127 Reply from 66.218.71.198: bytes=32 time<1ms TTL=127 ping statistics for 66.218.71.198: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms

Operating systems format their ping results differently. For example, following is what the result looks like from a Linux computer:

ping 66.218.71.198 (66.218.71.198) 56(84) bytes of data. 64 bytes from 66.218.71.198: icmp_seq=1 ttl=254 time=0.644 ms 64 bytes from 66.218.71.198: icmp_seq=2 ttl=254 time=0.510 ms 64 bytes from 66.218.71.198: icmp_seq=3 ttl=254 time=0.584 ms 64 bytes from 66.218.71.198: icmp_seq=4 ttl=254 time=0.535 ms --- 66.218.71.198 PING statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3000ms rtt min/avg/max/mdev = 0.510/0.568/0.644/0.053 ms

Regardless of the operating system, the results will show the IP address of the computer you're pinging, the round-trip time in milliseconds for each packet, the number of packets sent and received, and the number and percentage of how many packets got lost.

Technical information

Ping uses ICMP (Internet Control Message Protocol) packets. The packet from the origin computer is called an "ICMP_echo_request", and the response from the target is called an "ICMP_echo_reply". Each packet contains by default either 32 or 64 bytes of data and 8 bytes of protocol reader information, but ping can be configured at the command line to use different sized packets. You can access a list of switches and additional functions by invoking the help file for ping:

  • In Windows, at the command prompt, enter ping /? .
     
  • In Unix-based systems (e.g., Mac OS X and later, Linux, Solaris), at the command prompt, enter ping --help .

source: kb.iu.edu

Forums: