Ping is a network diagnostic tool that’s used to check if a host in a network is alive and responding. Ping uses ICMP messages. More particularly ICMP query messages
ICMP (Internet Control Message Protocol) is a companion to the IP protocol. It compensates the IP protocol in error reporting since IP protocol doesn’t have an error reporting method in place. ICMP only reports errors and expects higher layers of the OSI architecture model to handle and correct the errors.
ICMP has two types of messages - error reporting messages and query messages. Query messages are generally used to diagnose network problems. There are two types of query messages -
So what happens when we ping a machine?
The whole of the data is calculated to summarize the percentage of packet loss and other such information and the summarized data is then displayed, showing the number of packets transmitted, received, percentage of packet loss, total time taken, the minimum, average and maximum round-trip time. This ofcourse, is in addition to the data displayed live when the program is running. Here’s an example output of showing how pinging Askubuntu from my machine looks like:
nits@excalibur:~$ ping -c 5 askubuntu.com PING askubuntu.com (184.108.40.206) 56(84) bytes of data. 64 bytes from stackoverflow.com (220.127.116.11): icmp_req=1 ttl=50 time=252 ms 64 bytes from stackoverflow.com (18.104.22.168): icmp_req=2 ttl=50 time=252 ms 64 bytes from stackoverflow.com (22.214.171.124): icmp_req=3 ttl=50 time=253 ms 64 bytes from stackoverflow.com (126.96.36.199): icmp_req=4 ttl=50 time=252 ms 64 bytes from stackoverflow.com (188.8.131.52): icmp_req=5 ttl=50 time=251 ms
Download the official 2buntu app for both Android and Ubuntu Touch.