ICMP & ICMPv6: Common Types
Practical guide to ICMP and ICMPv6 message types and codes you'll encounter in real network troubleshooting.
What is ICMP?
ICMP (Internet Control Message Protocol) is used by network devices to send error messages and operational information. It's not used for data transfer, but rather for network diagnostics and error reporting. ICMPv6 serves the same purpose for IPv6 networks, but also handles additional functions like Neighbor Discovery that ARP handles in IPv4.
Common ICMPv4 Types
- Code 0: Network Unreachable
- Code 1: Host Unreachable
- Code 2: Protocol Unreachable
- Code 3: Port Unreachable
- Code 4: Fragmentation Needed (MTU)
- Code 13: Communication Prohibited (Firewall)
- Code 0: TTL Expired in Transit
- Code 1: Fragment Reassembly Time Exceeded
Common ICMPv6 Types
- Code 0: No Route to Destination
- Code 1: Communication Prohibited
- Code 3: Address Unreachable
- Code 4: Port Unreachable
Practical Troubleshooting Scenarios
ICMP Types Involved: Type 8 (Echo Request), Type 0 (Echo Reply)
What to Check:
- Is ICMP type 8 being sent?
- Is ICMP type 0 coming back?
- Are firewalls blocking ICMP?
- Check destination host status
Common Causes: Firewall blocking ICMP, Host down, Network congestion
ICMP Types Involved: Type 11 (Time Exceeded)
What to Check:
- Are routers sending Time Exceeded?
- Firewall blocking ICMP type 11?
- Router configured to not send ICMP?
Common Causes: ICMP rate limiting, Security policy, Router misconfiguration
ICMP Types Involved: Type 3 Code 4 (Fragmentation Needed), ICMPv6 Type 2 (Packet Too Big)
What to Check:
- Path MTU discovery working?
- ICMP being filtered by firewall?
- MSS clamping configured?
Common Causes: Firewall blocking ICMP, MTU mismatch, Fragmentation issues
ICMP Types Involved: Type 135/136 (Neighbor Discovery), Type 133/134 (Router Discovery)
What to Check:
- Router Advertisements being sent?
- Neighbor Discovery working?
- IPv6 enabled on all devices?
Common Causes: No IPv6 router, NDP filtering, IPv6 disabled
Common ICMP Filtering Issues
Troubleshooting Commands
Command | Purpose | ICMP Type Used |
---|---|---|
ping 8.8.8.8 | Test IPv4 connectivity with ICMP Echo | Type 8 (request) and Type 0 (reply) |
ping6 2001:db8::1 | Test IPv6 connectivity | Type 128 (request) and Type 129 (reply) |
traceroute 8.8.8.8 | Show path using ICMP Time Exceeded | Type 11 (Time Exceeded responses) |
traceroute6 ipv6.google.com | IPv6 path tracing | Type 3 (Time Exceeded) |
tcpdump -i eth0 icmp | Capture ICMP traffic for analysis | All ICMP types |
wireshark (filter: icmp or icmpv6) | Detailed ICMP packet analysis | All ICMP and ICMPv6 types |
Best Practices for ICMP
- Allow ICMP types 0, 3, 8, 11 through firewalls
- For IPv6, allow ICMPv6 types 1, 2, 3, 128, 129, 133-137
- Use ICMP rate limiting instead of complete blocking
- Monitor ICMP traffic for network health
- Don't filter ICMP on internal networks
- Log ICMP messages for troubleshooting purposes