ICMP
/ I-C-M-P /
ICMP, the Internet Control Message Protocol, is the network layer's way of sending back status and error reports — IP's built-in feedback channel. Since IP itself just tries and stays silent, ICMP is how a router can say 'I couldn't deliver this' or 'that packet was too big' or 'its time-to-live ran out'. Think of it as the post office's return-to-sender slips and 'undeliverable' stamps: it does not carry your normal mail, it carries news about what happened to your mail.
An ICMP message is itself carried inside an IP datagram (protocol number 1 for IPv4, 58 for ICMPv6) and has a type and a code. The most important error types are: destination unreachable (no route, port closed, or fragmentation needed but forbidden), time exceeded (TTL hit zero), and packet too big (used for Path MTU Discovery in IPv6). There are also informational/diagnostic types — echo request and echo reply, which are exactly what the ping tool uses to check if a host is alive and measure round-trip time. ICMP error messages helpfully include the start of the original offending packet, so the sender can tell which of its packets triggered the report.
Two famous tools are built on ICMP. Ping sends echo requests and times the replies. Traceroute sends packets with deliberately tiny, increasing TTLs (1, 2, 3, ...) so each dies one hop further along, and each dying packet triggers a 'time exceeded' ICMP from a different router — revealing the path hop by hop. A caveat: many networks rate-limit or block ICMP, so a host that doesn't answer ping is not necessarily down, and blocking the wrong ICMP types (like 'packet too big') quietly breaks Path MTU Discovery.
Run traceroute to a server: the first packet (TTL 1) dies at your router, which returns ICMP time-exceeded; the second (TTL 2) dies one hop further; and so on. Each reply's source address is the next router on the path, drawing the whole route line by line.
Traceroute weaponizes TTL and ICMP time-exceeded to map the path.
ICMP carries control and diagnostics, not your application data. A blocked ping doesn't prove a host is down, and blocking the wrong ICMP types silently breaks features like Path MTU Discovery.