▸Protocol notes for this page (click to expand)

ICMP (Internet Control Message Protocol)

What it is for

IP is best-effort: when a packet is dropped, a TTL reaches zero or a destination is unreachable, IP itself does not notify the sender.

ICMP is IP's error and control message protocol: a router or host sends an error message back when something fails, and ICMP can also probe whether a host is reachable. ICMP carries no user data, only messages about the state of the network.

How traceroute works

traceroute is a tool built on TTL and ICMP; it is not a protocol itself:

· Send a packet with TTL=1; the first router decrements it to zero, drops it and returns Time Exceeded, and the reply's source address is hop one;
· Send TTL=2 to get hop two;
· Increase the TTL by one each time until the destination returns Echo Reply (or port unreachable).

Each line traceroute prints comes from an ICMP error message sent back by a router.

Common misconceptions

A failed ping does not mean the network is down: many devices do not reply to ICMP as a security policy. A failed ping only shows that the target did not answer ICMP; service ports may still be reachable.

Blocking all ICMP breaks PMTUD: the "fragmentation needed" messages PMTUD needs are blocked too, so small packets get through while large ones keep being dropped, which is very hard to diagnose.

A hop shown as * in traceroute is usually not faulty: it simply does not answer ICMP, and traffic is still forwarded through it.