ICMP Protocol Overview
Internet Control Message Protocol (ICMP), documented in
RFC 792,
is a required protocol tightly integrated with IP.
ICMP messages, delivered in IP packets, are used for out-of-band
messages related to network operation or mis-operation.
Of course, since ICMP uses IP, ICMP packet delivery is unreliable,
so hosts can't count on receiving ICMP packets for any network problem.
Some of ICMP's functions are to:
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.
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.
Assist 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.
Announce Timeouts. If an IP packet's TTL 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.