Sunday, June 3, 2007

ICMP

ICMP = Internet Control Message Protocol.

The main problem in layer 3 (Network Layer) is that if we use IP (Internet Protocol) there is neither internal control, nor delivery assurance. TCP ensures these functionalities, however we might not want to use TCP on the Transport Layer. ICMP messages are encapsulated into datagrams in the same way any other data is delivered using IP.
For example when a host or a network is unreachable, and ICMP message will be delivered back to the source by router. An ICMP message always has at least three fields: type, code and checksum. Type and code both talk about the type of the message. (Code is a fine-tuning.)
Examples of use of ICMP messages
  • Redirect / change request: initiated by the default router in case if the incoming interface is the same interface on which the packet gets routed out, or the datagram is not source-routed, or the router is configured to do so :)
  • Address mask requests: when a host doesn't know his subnet's subnet mask it broadcasts an ICMP message with a subnet-mask request. A router will reply this request by specifying the mask in the message.
  • Router discovery message: a host which doesn't yet know its own default router can send this ICMP message. This is a multicast message to all routers (224.0.0.2) (router solicitation message). This is not supported by all routers, but if it is, then advertisement is sent back.
  • Source quench messages: when a LAN sends traffic simply too fast, and the WAN cannot support the high-speed traffic, then the router informs the source about congestions, and then it might reduce the speed :)
  • Path MTU discovery: In order to prevent obsolete fragmentation, routers that receive packet with MTU which is already not supported, will return the source this ICMP message.Some sys-admins love to filter ICMP messages. For those: if you do so, this step has serious consequences. All the above functionality cannot work any more.
For more info: http://en.wikipedia.org/wiki/ICMP

After having written, I hope I will remember it - at least until Tuesday's exam.

No comments: