How ICMP works
ICMP carries control and error messages: ping (echo request and reply), 'destination unreachable' and 'time exceeded'. Traceroute works by sending packets with TTL 1, 2, 3… and listening for the time-exceeded replies.
Layer: Network (OSI layer 3) · Port: - · Transport: IP (protocol 1) · Format: Type + code + data · Standard: RFC 792
ICMP packet flow
- ICMP Client → Web Server: Echo (ping) request id=1 seq=1 TTL=64
- ICMP Web Server → Client: Echo (ping) reply id=1 seq=1 TTL=57
- ICMP Client → ISP Router: traceroute: TTL=2 probe
- ICMP ISP Router → Client: Time-to-live exceeded (from 2nd hop)
Other protocols: Ethernet · IP · IPv6 · TCP · UDP · ARP · DHCP · DNS · BGP · NTP · IGMP