Internet Control Message Protocol

ICMPv4

  • There are some occasions when IP cannot deliver the packet to the destination host. This happens if TTL gets expired and route to the specified destination address is missing from the routing table due to insufficient buffer space of gateway for passing a specific packet.
  • If router is unable to forward a packet for some reasons, the router sends an error message back to the source to report the problem.
  • The ICMP handles the error and other control messages.
  • The ICMP messages are encapsulated by IP packets.
  • The value of the protocol field in the IP datagram is '1' to indicate that the IP data is an ICMP message.
There are two types of Messages:

1. Error- reporting messages
The error -reporting message reports a problems that a router or a host (destination) may encounter, while processing an IP packet.

2. Query messages
The query messages which occur in pairs, help a host or a network manager to get specific information from a router or another host.

For example: Nodes can discover their neighbors. Also, a host can discover and learn about routers on their network. Routers can help a node to redirect its messages.

ICMPv6

  • It is an integral part of IPv6 and very useful in error reporting, diagnostic functions, neighbour discovery and a framework for extensions to implement future Internet Protocol aspects.
  • ICMPv6 is defined in RFC 44443.

  • Messages are classified in two types:
    1. Error messages
    2. Information messages.

  • ICMPv6 messages are transported by IPv6 packets in which the IPv6 Next header value for ICMPv6 is set to 58.