"Ping" (short for Packet INternet Groper) is without a doubt the best-known network administration tool. It is one of the simplest tools, because all it does is send packets to check if a remote machine is responding and, by extension, if it is accessible over the network.
The ping tool, then, is used to diagnose network connectivity using commands of the type:
ping name.of.the.machine
name.of.the.machine represents the machine's IP address, or its name. It is generally preferable to test it first using the machine's IP address.
Ping relies on the ICMP protocol, which is used to diagnose transmission conditions. For this reason, it uses two types of protocol messages (out of the 18 offered by ICMP):
At regular intervals (by default, every second), the source machine (the one running the ping command) sends an "echo request" to the target machine. When the "echo reply" packet is received, the source machine displays a line containing certain information. If the reply is not received, a line saying "request timed out" will be shown.
Depending on the operating system, the results of the ping may be displayed somewhat differently.
Here are the results of the command in GNU/Linux:
ping www.commentcamarche.net
PING www.commentcamarche.net (163.5.255.85): 56 data bytes
64 bytes from 163.5.255.85: icmp_seq=0 ttl=56 time=7.7 ms
64 bytes from 163.5.255.85: icmp_seq=1 ttl=56 time=6.0 ms
64 bytes from 163.5.255.85: icmp_seq=2 ttl=56 time=5.5 ms
64 bytes from 163.5.255.85: icmp_seq=3 ttl=56 time=6.0 ms
64 bytes from 163.5.255.85: icmp_seq=4 ttl=56 time=5.3 ms
64 bytes from 163.5.255.85: icmp_seq=5 ttl=56 time=5.6 ms
64 bytes from 163.5.255.85: icmp_seq=6 ttl=56 time=7.0 ms
64 bytes from 163.5.255.85: icmp_seq=7 ttl=56 time=6.0 ms
--- www.commentcamarche.net ping statistics ---
8 packets transmitted, 8 packets received, 0% packet loss
round-trip min/avg/max = 5.3/6.1/7.7 ms
Here are the results of the command in Windows:
ping www.commentcamarche.net
Pinging www.commentcamarche.net [163.5.255.85] with 32 bytes of data:
Reply from 163.5.255.85: bytes=32 time=34 ms TTL=54
Reply from 163.5.255.85: bytes=32 time=37 ms TTL=54
Reply from 163.5.255.85: bytes=32 time=32 ms TTL=54
Reply from 163.5.255.85: bytes=33 time=32 ms TTL=54
Ping statistics for 163.5.255.85:
Packets: sent = 4, received = 4, lost = 0 (loss 0%),
Approximate round trip times in milli-seconda:
Minimum = 32ms, Maximum = 37ms, Average = 34ms
Thus, the ping command's output gives:
DON'T MISS