Protocol used to communicate Network Layer information between Hosts and Routers.

Often considered part of The Network Layer but architecturally it lies just above as it is contained inside Datagrams, just as TCP/UDP Segments.

Structure

ICMP messages contain:

  • Type field
  • Code field
  • Header and first 8 bytes of the IP Datagram that caused the ICMP message to be generated.

The type and code field combined determine the meaning of the message:

TypeCodeDescription
00echo reply (to ping)
30destination network unreachable
31destination host unreachable
32destination protocol unreachable
33destination port unreachable
36destination network unknown
37destination host unknown
40source quench (congestion control)
80echo request
90router advertisement
100router discovery
110TTL expired
120IP header bad

Implementations

  • ping
  • traceroute