Wednesday, January 23, 2013

What is a Ping. What Is ICMP.


While studying load balancing, one of the terms I came across is ICMP and also every load balancer knows the health of the server by making a ICMP ping. So what is ICMP and what is a ping.

Let's start with the basics. What exactly is a PING? A little known fact is the PING is
actually a short-form acronym for Packet Internet (or Inter-Network) Groper. The PING
utility is most often used in diagnosing network problems. The utility sends one packet of
data to the target host and waits for an identical (or echoed) reply from the host. The idea
behind the PING is that responding to one packet of data is generally the lowest common
denominator in diagnosing network presence. If the host can reply to one packet, then
you can be reassured that the host exist. Imagine the situation where a user is having
difficulty navigating the corporate website. The user can determine minimal network
presence by trying to PING the website.
The PING utility can generally send more than one request and this can also be used to
determine if the network is intermittently dropping packets. Last, the PING utility can
also be used to determine if the naming service is properly translating names into IP
addresses.


ICMP

Now I'm pretty certain you already knew what the PING utility did. You are more likely
interested in finding out the how than the what. Here 'tis in black and white.
The PING utility does not use TCP (Transmission Control Protocol) like most other
network traffic. Neither does it use UDP (User Datagram Protocol). Rather it uses an
often forgotten Internet protocol called ICMP (Internet Control Message Protocol). The
intent of ICMP has always been in diagnosing IP-network issues. The entire protocol is a
quick low-level access point into the IP-network. If you are familiar with the OSI
Reference Model, then skip the next couple of paragraphs.
The OSI Reference Model divides the task of communicating over a network into seven
layers, application, presentation, session, transport, network, data-link and physical. The
TCP, UDP and ICMP protocol are transport layers, whereas the IP protocol is network
layer. Much of the IP traffic these days is TCP, a connection-oriented transport layer for
the Internet. The TCP connection-oriented protocol provides a lot of services not
provided by the IP layer, like ports, checksums, framing and sequencing packets. The
UDP connectionless protocol on the other hand does not provide framing or sequencing
of packets, but does provide minimal services like ports and checksums. ICMP is yet another step down from UDP and provides only a checksum service. ICMP is really a
higher-level tap into the low-level IP-network.