SECURITY WARNING: Never run commands you don't understand. Always review code before execution. Use at your own risk.
ICMP 23 errors

ICMP Message Types & Codes

Destination unreachable, time exceeded, fragmentation needed and redirects.

Understanding ICMP errors

ICMP is the diagnostic layer of IP, and its messages are the network telling you precisely why a packet could not be delivered. Learning the type/code pairs turns vague "the network is broken" reports into specific diagnoses: Type 3 Code 1 means a router reached the destination network but not the host; Type 3 Code 4 (fragmentation needed) is the signature of a broken Path MTU Discovery, which causes the classic "small requests work, large requests hang" symptom. Blanket-blocking ICMP at a firewall breaks PMTUD and is a common self-inflicted outage.

How to debug ICMP errors

  1. Capture the ICMP itself: sudo tcpdump -n icmp. The type and code are printed in plain text and give you the exact reason.
  2. Use traceroute (or mtr for a continuous view) to see which hop generates the unreachable or time-exceeded message.
  3. Suspect PMTUD when small packets succeed and large transfers stall. Test with ping -M do -s 1472 host and lower the size until it passes to find the real MTU.
  4. Never block ICMP Type 3 Code 4 or Type 11 at a firewall. They are required for correct TCP operation and for traceroute.
  5. For IPv6, remember ICMPv6 is mandatory. Neighbour Discovery and PMTUD both depend on it, so filtering it breaks connectivity entirely.

Tools worth reaching for

  • tcpdump -n icmp
  • traceroute / mtr
  • ping -M do -s
  • tracepath
  • nmap --traceroute

All 23 ICMP errors

Other categories