ICMP (Internet Control Message Protocol)
What it is for
IP is best-effort: when a packet is lost, a TTL hits zero or a destination is unreachable, IP itself says nothing.
ICMP is IP's notification channel: report a problem, or probe for liveness. ★★ Note it carries no user data, only messages about the network.
How traceroute is built
★★★ It is not a protocol but a trick combining TTL with ICMP:
· Send a packet with TTL=1 -> the first router decrements to zero, drops it and returns Time Exceeded -> now you know hop one;
· Send TTL=2 -> hop two reports in;
· Keep incrementing until the destination returns Echo Reply (or port unreachable).
★★ So every line traceroute prints is an error message a router chose to send you.
★ Common misconceptions
★★★ "If ping fails the network is down" -- many devices deliberately do not reply to ICMP as policy. A failed ping means it will not answer you, not that service ports are unreachable.
★★★ "Blocking all ICMP is safer" -- it also blocks the "fragmentation needed" messages PMTUD depends on, giving you small packets fine, large ones stalled and very hard to diagnose.
★★ "A * in traceroute means that hop is broken" -- usually it simply does not answer ICMP while forwarding traffic perfectly.