Internet Control Messaging Protocol (ICMP)

Internet Control Messaging Protocol (ICMP) is an important protocol of the network layer. ICMP implements the TCP/IP protocol suite. An Internet Protocol (IP) is not a reliable protocol, because it does provide messages to be sent in the event of certain errors. The Internet Control Message Protocol (ICMP) services send messages including information for a status of the network itself rather than the application data.

The internet control messaging protocol (ICMP) messages provide feedback about the network related issues including the processing of IP packets under certain situation, not to make IP reliable. Internet Control Messaging Protocol (ICMP) often not required and not allowed within a network for security reasons.

Internet Control Messaging Protocol (ICMP) messages are a particular type of IP message separate from TCP and UDP. Ping is an example of an Internet Control Messaging Protocol (ICMP) messaging. It uses Internet Control Messaging Protocol (ICMP) to inspect remote hosts for reaction and also measure overall round-trip time of the investigate messages. It also supports additional utilities like traceroute  (tracert)  to discover all hops on the path between a given source and destination.

Internet Control Messaging Protocol (ICMP) is available for both IPv4 and IPv6. IPv4 address uses ICMPv4 is the messaging protocol and ICMPv6 do job for IPv6 but includes supplementary functionality. Some common messages for both ICMPv4 and ICMPv6 are the following:
  • The remote Host Confirmation message
  • Destination Unreachable
  • Service Unreachable
  • Router Time exceeded Exceeded Message
  • Route redirection

Remote Host Confirmation

We can use an Internet Control Messaging Protocol (ICMP)Echo Message to find out the availability and connectivity of the remote host. The find the availability and connectivity of remote host, the local host sends an Internet Control Messaging Protocol (ICMP) Echo Request to a remote host. If the remote host is available and also connected to the network and the configuration is correct, it responds with an Echo Reply. The Internet Control Messaging Protocol (ICMP) Echo messages are the base of the ping utility.

Destination or Service Unreachable

When a gateway receives Internet Control Messaging Protocol (ICMP) echo message for destined for other hosts and the destined host is not available or there is some problem with that hosts and gateway cannot send the echo message further, it reply with Destination Unreachable message to alert the source host that the destination host or service is unreachable. The message will contain a code that indicates why the packet could not be delivered.ICMPv6 has also a similar code with a little difference for Destination Unreachable messages. Some Destination Unreachable codes for ICMPv4 are the following:

  • 0 – Net unreachable
  • 1 – Host unreachable
  • 2 – Protocol unreachable
  • 3 – Port unreachable

Router Time Exceeded Message

The router uses time exceeded message to show that a packet cannot be forwarded for the reason that the Time To Live (TTL) field of the packet was decremented to 0. If a router receives a packet with the TTL field in the IPv4 packet to zero, it rejects the packet and sends a Time Exceeded message to the source host.

ICMPv6 also sends a Time Exceeded message if the router failed to forward an IPv6 packet expiration. IPv6 does use a hop limit field in place of Time To Live (TTL) field to determine if the packet has expired.

Route Redirect

It is an error message, sending a router to the sender of an IP packet. The router is using Internet Control Messaging Protocol (ICMP) redirect messages to tell hosts that there is a better next hop to reach a certain destination.