Official website for Linux User & Developer
FOLLOW US ON:
Jan
19

Internet Control Message Protocol (ICMP) Explained

by Swayam Prakasha

“The fundamental purpose of the ICMP protocol is to report problems with the delivery of IP datagrams”, says networking expert Swayam Prakasha. Join him in his latest article designed to help you discover more about one of the most popular protocols in the TCP/IP suite…

Swayam Prakasha SMALLAdvisor:
Swayam Prakasha

Swayam has a master’s degree in computer engineering. He has been working in information technology for several years, concentrating on areas such as operating system, networking, network security, electronic commerce, internet services, LDAP and web servers

Everyone understands how critical TCP/IP (Transmission Control Protocol / Internet Protocol) is, but fails to realise the fact that the TCP/IP suite relies on many functions provided by ICMP (Internet Control Message Protocol). ICMP is one of the core protocols of the IP suite. It a network-layer protocol that is primarily concerned with routing issues.

With the help of this protocol, routers are able to send error or control information to their hosts. This protocol is of great help for system administrators, as it aids in testing for the connectivity and searching for the configuration errors in a network. Let us see an example of how ICMP facilitates this. When a router is not able to forward a datagram, it informs the original source about this error, and does not specify what action needs to be taken to overcome the error. It is up to the source to take the necessary action in order to correct the problem. It is important to notice here that ICMP cannot be used to inform the intermediate routers when a problem occurs. This is basically because a datagram contains fields that specify the original source and the ultimate destination. So when a router gets a datagram, it does not know the path taken by the datagram to arrive there. Instead of discarding a datagram when an error occurs, it informs the source from which the datagram originated. Hence the connectivity and configuration of a network is easily tested.

ICMP is a classic example of a client-server application. The fundamental purpose of this protocol is to report problems with the delivery of IP datagrams. The protocol is also frequently used by internet managers to verify correct operations of End Systems (ES) and to check that routers are correctly routing packets to the specified destination address. It is the responsibility of the network-layer protocol to ensure that the ICMP message is sent to the correct destination. This is achieved by setting the destination address of the IP packet carrying the ICMP message. The source address is set to the address of the computer that generated the IP packet (carried in the IP source address field) and the IP protocol type is set to ‘ICMP’ to indicate that the packet is to be handled by the remote end system’s ICMP client interface.

Functions provided by ICMP
The following are some of the functions provided by this protocol:

1. Announce network errors
Such as a host or entire portion of the network being unreachable, due to some type of failure. A TCP or UDP packet directed at a port number with no receiver attached is also reported via ICMP.

2. Announce network congestion
When a router begins buffering too many packets, due to an inability to transmit them as fast as they are being received, it will generate ICMP source quench messages. Directed at the sender, these messages should cause the rate of packet transmission to be slowed. Of course, generating too many source quench messages would cause even more network congestion, so they are used sparingly.

3. Assisting in troubleshooting
ICMP supports an echo function, which just sends a packet on a round trip between two hosts. Ping, a common network management tool, is based on this feature. Ping will transmit a series of packets, measuring average round-trip times and computing loss percentages.

4. Announcing timeouts
If an IP packet’s TTL (time to live) field drops to zero, the router discarding the packet will often generate an ICMP packet announcing this fact. Traceroute is a tool which maps network routes by sending packets with small TTL values and watching the ICMP timeout announcements.

ICMP messages are sent in various situations. Some of the familiar situations are when a datagram cannot reach the destination, when the gateway can direct the host to send traffic on a shorter route etc. It is important to understand here that the purpose of these control messages is to provide feedback about the problems in the environment. Typically, ICMP messages report errors in the processing
of datagrams.

ICMP packets are handled in the same way as any other data packet. However, ICMP packets do not include source and destination ports. A special signature called ‘type of message’ is included in these packets and this message type indicates the purpose of the ICMP packet. In fact, ICMP is essentially just a collection of predefined messages, each of which provides very specific functionality. It is to be observed here that ICMP packet delivery is unreliable – which means hosts can not count on receiving ICMP messages for any problems happening over a network.

Pages: 1 2 3
  • Tell a Friend
  • Follow our Twitter to find out about all the latest Linux news, reviews, previews, interviews, features and a whole more.
    • Pietro Pesci Feltri

      Very nice article. I used ping and traceroute frequently but understanding the additional ICMP functionality is really nice.

      Thanks

      Pietro

    • Pingback: Internet Control Message Protocol (ICMP) Explained « technichristian.net

    • Pingback: لینوکس در هفته سوم ۲۰۱۰

    • Pingback: An Introduction To Forex Trading | FX Forex secrets

    • AJG

      Good article :-)

    • Ash

      Nice article, easy to understand, but is ICMP necessary for just a regular old, at home computer. I don’t do much more than the occasional surfing and checking my mail. Actually it’s my Mother’s computer with a lot of my personal stuff as well. i just want to make sure her computer is safe and as up to date as someone who is only slightly computer savvy, like myself, can make it. Please reply to my email when you get a chance, thank you!! Youretheashole@gmail.com

    • http://forexsecretprotocol.wordpress.com forex secret protocol bonus

      Its like you read my mind! You seem to know a lot about this, like you wrote
      the book in it or something. I think that you could do with some pics
      to drive the message home a bit, but instead of that,
      this is excellent blog. A great read. I’ll certainly be back.