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
- Capture the ICMP itself:
sudo tcpdump -n icmp. The type and code are printed in plain text and give you the exact reason. - Use
traceroute(ormtrfor a continuous view) to see which hop generates the unreachable or time-exceeded message. - Suspect PMTUD when small packets succeed and large transfers stall. Test with
ping -M do -s 1472 hostand lower the size until it passes to find the real MTU. - Never block ICMP Type 3 Code 4 or Type 11 at a firewall. They are required for correct TCP operation and for traceroute.
- 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 icmptraceroute / mtrping -M do -stracepathnmap --traceroute
All 23 ICMP errors
- ICMP Communication Administratively Prohibited (Type 3, Code 13)Communication between source and destination is blocked by administrative policy or firewall.
- ICMP Destination Host Unknown (Type 3, Code 7)Router has no information about the specific host. Host may not exist or network infrastructure is incomplete.
- ICMP Destination Network Unknown (Type 3, Code 6)Router has no information about the destination network. Different from network unreachable - indicates unknown network.
- ICMP Destination Unreachable (Type 3)Router cannot forward packet to destination. Various codes indicate specific reasons like network unreachable, host…
- ICMP Echo Request/Reply (Type 8/0)Ping mechanism. Echo Request (8) sent by client, Echo Reply (0) returned by destination. Used for connectivity testing.
- ICMP Fragmentation Needed (Type 3, Code 4)Packet too large for next hop link, but Don't Fragment bit is set. Critical for Path MTU Discovery.
- ICMP Host Administratively Prohibited (Type 3, Code 10)Host access is specifically blocked by administrative policy or security rules.
- ICMP Host Precedence Violation (Type 3, Code 14)Packet precedence level is not permitted for the destination host. Security or QoS policy violation.
- ICMP Host Unreachable (Type 3, Code 1)Router cannot reach the specific host within the destination network. Host may be down, unreachable, or blocking ICMP.
- ICMP Host Unreachable for TOS (Type 3, Code 12)No route to destination host for the specified Type of Service. Host doesn't support required QoS.
- ICMP Information Request/Reply (Type 15/16)Obsolete mechanism for obtaining network address information. Deprecated due to security concerns and better…
- ICMP Network Administratively Prohibited (Type 3, Code 9)Network access is blocked by administrative policy, firewall rules, or access control lists.
- ICMP Network Unreachable (Type 3, Code 0)No route to the destination network exists in router's routing table. Network may be down or improperly configured.
- ICMP Network Unreachable for TOS (Type 3, Code 11)No route to destination network for the specified Type of Service. QoS routing issue.
- ICMP Parameter Problem (Type 12)Malformed IP header or required option missing. Indicates packet structure issues or unsupported IP options.
- ICMP Port Unreachable (Type 3, Code 3)Destination host received packet but no application is listening on the specified UDP port. TCP uses RST instead.
- ICMP Precedence Cutoff in Effect (Type 3, Code 15)Network is dropping packets below a certain precedence level due to congestion or policy.
- ICMP Protocol Unreachable (Type 3, Code 2)Destination host cannot process the packet due to unsupported or disabled protocol (TCP, UDP, etc.).
- ICMP Redirect (Type 5)Router informs host of a better route to destination. Can be security risk if not properly validated, often disabled…
- ICMP Source Quench (Type 4)Deprecated message indicating congestion control. Router was dropping packets due to lack of buffer space. Rarely used…
- ICMP Source Route Failed (Type 3, Code 5)Packet with source routing option cannot be forwarded along the specified route. Often disabled for security.
- ICMP Time Exceeded (Type 11)TTL expired in transit (Code 0) or fragment reassembly timeout (Code 1). Common in traceroute operations or routing…
- ICMP Timestamp Request/Reply (Type 13/14)Time synchronisation mechanism. Often disabled for security reasons as it can leak system time information.
Other categories
- AI 35Rate limits, context windows, GPU memory and model-serving failures.
- Ansible 10Unreachable hosts, become passwords, undefined variables and Jinja2 failures.
- API 14Auth headers, payload limits, versioning, idempotency and webhook signatures.
- Apple 10Command line tools, dyld, Homebrew permissions, notarisation and Keychain.
- Auth 11OIDC, SAML, Auth0, Okta, Keycloak, passkeys and MFA failures.
- BigData 11Spark, Kafka, Airflow, Snowflake, Flink and Databricks failures.
- C# 12NuGet restore, null references, EF Core migrations, async deadlocks and Blazor…
- C++ 11Segfaults, linker errors, memory corruption and template deduction failures.
- Caching 10Cache stampedes, stale content, Varnish and CloudFront failures.
- CI/CD 18GitHub Actions, GitLab CI, Jenkins, CircleCI: permissions, runners and…
- Client 21CORS, mixed content, module resolution, memory limits and framework runtime…
- Cloud 25IAM permissions, quotas, service limits and credential failures.
- Dart 10Null safety, pub version solving and build toolchain problems.
- Database 41Connections, deadlocks, constraints, replication and memory limits.
- DNS 10NXDOMAIN, SERVFAIL, timeouts, propagation and delegation problems.
- Docker 27Daemon connectivity, disk space, image pulls, ports and architecture mismatches.
- Elixir 9GenServer timeouts, supervision failures and Mix compilation problems.
- Email 8Delivery failures, relay denial, authentication, SPF, DKIM and DMARC.
- Frontend 23Hydration mismatches, bundler resolution, layout shift and font loading.
- Git 20Merge conflicts, rejected pushes, detached HEAD, LFS and repository corruption.
- Go 19Nil map assignment, concurrent map access, context cancellation and deadlocks.
- GraphQL 13Validation, depth limits, N+1 queries and fragment problems.
- gRPC 10Status codes, deadlines, message limits, TLS and HTTP/2 transport failures.
- HTTP 494xx client errors, 5xx server errors, redirects, headers and protocol problems.
- Ingress 8404 default backend, missing TLS secrets, IngressClass and path matching.
- Java 19Class loading, dependency resolution, connection pools and JVM version…
- JavaScript 42npm resolution, async pitfalls, hydration, memory limits and runtime type…
- Kubernetes 34CrashLoopBackOff, ImagePullBackOff, OOMKilled, RBAC, scheduling and storage.
- Logging 9Log4j, Logback, Fluentd, Logstash and CloudWatch ingestion problems.
- MessageQueue 14Kafka, RabbitMQ, SQS, NATS and Celery: lag, rebalancing and poison messages.
- Mobile 17Gradle, CocoaPods, Xcode signing, Metro bundler and toolchain mismatches.
- Monitoring 12Prometheus scrapes, Grafana data sources, OpenTelemetry exporters and agent…
- Network 35Refused connections, timeouts, resets, MTU problems and port exhaustion.
- Performance 6GC pauses, thread pool starvation and event loop blocking.
- PHP 11Memory limits, execution timeouts, autoloading, Composer and PDO connections.
- Proxy 17nginx, Envoy, HAProxy, Traefik, Caddy and Cloudflare upstream failures.
- Python 35Imports, virtual environments, encoding, concurrency and dependency conflicts.
- Regex 8Catastrophic backtracking, back references, escaping and engine differences.
- Ruby 11Bundler, migrations, native extensions, encoding and asset compilation.
- Rust 19Borrow checker, ownership moves, trait bounds and lifetime mismatches.
- Scala 6Dependency resolution, binary compatibility and type inference failures.
- Security 25JWT validation, CSRF, OAuth grants, SELinux, SSH host keys and CSP.
- Serverless 11Lambda timeouts, package size limits, VPC networking and cold starts.
- Shell 13Command not found, permissions, quoting, expansion and Makefile syntax.
- Storage 13S3 permissions, NFS mounts, quotas, signed URLs and volume attachment.
- Svelte 10Store subscriptions, load functions and server/client boundaries.
- System 26Disk space, systemd units, file descriptors, OOM killer and scheduled jobs.
- Terraform 18State locks, provider auth, drift, dependency cycles and plan-time unknowns.
- Testing 18Jest, pytest, JUnit, Cypress and Playwright: fixtures, snapshots and timeouts.
- TLS 24Untrusted authorities, expiry, hostname mismatch, chains and cipher negotiation.
- TypeScript 19Assignability, missing declarations, strict null checks and generic constraints.
- Virtualization 8VirtualBox, VMware, Hyper-V, WSL, KVM and hypervisor conflicts.
- Web3 7Gas estimation, nonce management and reverted transactions.
- WebAssembly 7Compile errors, memory bounds and host binding mismatches.
- WebServer 10nginx, Apache, IIS and Caddy: binding, permissions, rewrites and TLS.
- Windows 10Installer failures, missing runtimes, update errors and permission problems.