THE PROBLEM
IP itself does not explain why a packet failed to reach its destination.
THE NAIVE APPROACH
Silently dropping every failed packet leaves the sender unable to distinguish routing, size and reachability problems.
THE KEY INSIGHT
ICMP carries structured control messages such as echo replies, time-exceeded and destination-unreachable.
WHERE YOU MEET IT
- • Ping checking basic reachability
- • Traceroute discovering hop responses
- • Path MTU Discovery diagnosing packet-size limits
ANALOGY / HISTORY
Like a postal service returning a note that says the address is unknown or the parcel is too large.
Context: It complements IP rather than replacing a transport protocol.
client → server · ECHO REQUEST SENT
Echo request
An echo request asks the destination to return the identifier, sequence number and payload. The checksum covers the ICMP message.
ICMP is carried directly inside IP; it does not use TCP or UDP ports.
The ICMP Echo header is 8 bytes before the payload: type, code, checksum, identifier and sequence number.