ICMP Type & Code Analysis
Decoding the Language of Network Diagnostics
More Than Just 'Ping'
While most users know ICMP for `Type 8` (Echo Request) and `Type 0` (Echo Reply), the protocol's true power lies in its error reporting. ICMP packets are structured with a Type field (the category) and a Code field (the specific reason).
ICMP Diagnostics Lab
Type & Code Analyzer
ICMP Header Decoder
The Silent Killer: Type 3 Code 4
When a router receives a packet larger than its outgoing interface MTU, it attempts to fragment it. However, if the Don't Fragment (DF) bit is set, the router drops the packet and sends an ICMP `Type 3 Code 4` back to the sender.
This message includes the Next-Hop MTU, allowing the sender to adjust its MSS (Maximum Segment Size). This is the foundation of Path MTU Discovery (PMTUD).
Time Exceeded (Type 11)
`Type 11` is generated when a packet's Time to Live (TTL) reach zero. This is a fundamental mechanism to prevent packets from looping infinitely. `Traceroute` exploits this by sending packets with incrementing TTLs and documenting the `Type 11` replies from each hop.
Conclusion
Effective network engineering requires looking beyond "Pass/Fail". Understanding the specific ICMP codes allows you to distinguish between a routing loop (`Type 11`), a security block (`Type 3 Code 13`), and an MTU mismatch (`Type 3 Code 4`).