Unit content
ICMP errors, reachability and path diagnostics
IP needs a way to report network-layer conditions that ordinary data packets cannot express. ICMP carries control and diagnostic messages associated with IP.
Examples include destination-unreachable errors and messages indicating that a packet's hop limit expired. Echo request and echo reply messages are used by tools such as ping to test reachability and measure round-trip time.
traceroute-style diagnostics exploit hop-limit expiration: probes are sent with progressively larger limits, causing successive routers to return ICMP messages and reveal parts of the path.
ICMP does not make IP reliable. An ICMP error can itself be lost or filtered, and absence of an echo reply does not prove the destination is down.
The key idea is that a data plane benefits from a separate control/error-reporting mechanism for explaining why forwarding could not proceed normally.