Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

ICMP & ICMPv6

Direct answer

ICMP is how IP reports problems and tests reachability: ping uses echo request and reply, traceroute uses "time exceeded", and routers send "destination unreachable" or "packet too large" when they cannot deliver. ICMPv6 does the same and also carries neighbour discovery.

When to use this

Use it to interpret ping and traceroute results, and when deciding what ICMP a firewall should let through.

First 30 seconds

1. ping <ip> — !, ., U or A?

2. U → a router on the path has no route; A → a filter rejected it.

3. . → traceroute <ip>: where does it stop?

4. Ping from another source address works → no return route to the first.

5. Small pings work, large fail → MTU, with the error message filtered.

Operational verification

echo request routed to the destination → not filtered → echo reply routed back to the source address → received; on failure, the device that could not deliver returns an ICMP error naming the reason

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard
Key commandping 10.20.0.50 source GigabitEthernet0/0
Scope / prerequisiteUse it to interpret ping and traceroute results, and when deciding what ICMP a firewall should let through.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification Verify boundary
ping 10.20.0.50 source GigabitEthernet0/0
traceroute 10.20.0.50
show ip icmp rate-limit
show ip traffic | section ICMP
debug ip icmp

A sourced ping tests the path from a specific address, which matters for the return route. Traceroute shows the last router that answered. show ip traffic counts ICMP messages sent and received by type on the router itself. debug ip icmp prints the ICMP messages the router sends and receives, with type, code and addresses; use it briefly.

In Cisco ping and traceroute output, the characters tell which message came back: ! reply, . timeout, U unreachable, A administratively prohibited, M could not fragment, H host unreachable, N network unreachable.

Known-good: echo is answered from the intended source, and traceroute reaches the destination.

Step 2 Failure boundaries & design notes Narrow the fault
  • Ping times out but the service works. Echo is filtered; test with the actual protocol.
  • Ping returns U or "destination unreachable". A router on the path has no route — its address is the source of the message.
  • Ping returns A or "administratively prohibited". An access list or firewall rejected the packet and said so.
  • Traceroute shows asterisks from one hop onwards. A filter beyond that hop, or the destination does not answer the probe type in use.
  • Asterisks at single hops, later hops fine. Rate limiting of ICMP errors on that router.
  • Small pings work, large ones fail. An MTU problem; "packet too large" or "fragmentation needed" is being filtered.
  • Traceroute repeats the same two addresses. A routing loop; the TTL expires between them.
  • A ping works from one source address and not from another. There is no return route to the second.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

The messages say why: no route, administratively prohibited, packet too large. A ping timeout proves little — echo may simply be filtered. An asterisk at one traceroute hop with later hops answering is rate limiting, not loss. Never block ICMPv6 wholesale.

Key checks
  • ping <ip> source <interface> — reachability from a specific address, including the way back.
  • traceroute <ip> — the last router that answered.
  • show ip traffic | section ICMP — ICMP messages sent and received by type.
  • debug ip icmp — messages with type and code; use briefly.
  • Cisco ping characters: ! reply, . timeout, U unreachable, A prohibited, M could not fragment.
ReferenceWhat it is1 section · depth on demand

Mechanics & mental model

ICMP is the protocol IP uses to report problems and to test reachability. Ping and traceroute are built on it, and routers use it to tell a sender that a packet could not be delivered and why. ICMPv6 does the same for IPv6 and additionally carries neighbour discovery.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

The messages are the network explaining itself: "no route", "administratively prohibited", "packet too large" each point to a specific cause, where a plain timeout says nothing. Filtering ICMP wholesale throws that information away — and in IPv6, where neighbour discovery and path MTU discovery depend on it, breaks connectivity outright.

ReferenceHow it works1 section · depth on demand

Operational flow & dependencies

Messages worth knowing.

PurposeICMP (IPv4) type/codeICMPv6 type/code
Echo request / reply (ping)8 / 0128 / 129
Destination unreachable — no route3/0 network, 3/1 host1/0
Destination unreachable — filtered by policy3/131/1
Destination unreachable — port closed3/31/4
Packet too large3/4 (fragmentation needed)2
Time exceeded — TTL or hop limit reached 011/03/0
Redirect — a better next hop exists5137
Neighbour and router discovery— (ARP is separate)133–136

Who sends an error, and what it contains. The device that could not forward or deliver the packet sends the error to the packet's source. It includes the beginning of the original packet, so the source can tell which connection is affected. The source address of the error is the device that had the problem — which is what makes traceroute possible.

Ping sends echo requests and waits for replies. A reply proves a path in both directions. No reply proves little: the request or the reply may be filtered, or the target may not answer pings.

Traceroute sends packets with a TTL of 1, 2, 3 and so on. Each router where the TTL reaches zero returns "time exceeded", revealing itself. Cisco and Linux send UDP probes by default and Windows sends ICMP echo, so a firewall may pass one and not the other.

Rate limiting. Routers generate ICMP errors on their CPU and limit how many they send — Cisco IOS sends at most one unreachable per 500 ms by default. An asterisk at one hop in a traceroute, with later hops answering, is usually this and not packet loss.

Filtering sensibly. Permit at least echo, destination unreachable, time exceeded and packet too large — and for IPv6 also the neighbour discovery types on the local link.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

ICMP and ICMPv6 messages

ICMP is how IP reports problems and tests reachability. RFC 792 defines the IPv4 message types:

  • Echo reply (0) and echo (8).
  • Destination unreachable (3): code 0 net, 1 host, 2 protocol, 3 port, 4 fragmentation needed with DF set, 5 source route failed.
  • Source quench (4), redirect (5), time exceeded (11) and parameter problem (12).

ICMP errors are never sent about ICMP messages. Each error carries the original IP header plus the first 64 bits of data, which is enough to identify the ports. RFC 4443 defines ICMPv6: error types 0–127 and informational types 128–255, mandatory rate limiting, and Packet Too Big as type 2.

IPv4 and IPv6 equivalents

PurposeICMPv4ICMPv6
Echo request / reply8 / 0128 / 129
Destination unreachable31
Fragmentation needed / packet too big3 code 42
Time exceeded113
Parameter problem124
Redirect5137 (ND)
Neighbour discovery(ARP, not ICMP)133–137

What not to filter

MessageBreaks if filtered
ICMPv4 type 3 code 4 / ICMPv6 type 2Path MTU discovery: large transfers hang
ICMPv6 133–137IPv6 neighbour and router discovery: IPv6 stops working
Time exceededTraceroute; loop diagnosis
UnreachableFast failure; applications wait for timeouts instead

Echo can be rate-limited or restricted at the edge without breaking protocols. Error messages shouldn't be blocked.

Rules that limit ICMP (RFC 4443)

ICMPv6 errors must be rate-limited, ideally with a token bucket so bursts like traceroute still work. They are not sent in response to other ICMPv6 errors, to multicast packets (except Packet Too Big and some parameter problems), or to packets without a unique source address.

R1# show ip traffic | include ICMP|unreachable|time exceeded|echo
R1# show ipv6 traffic | include ICMP|too big|unreach|time
R1(config)# interface GigabitEthernet0/0/0
R1(config-if)# no ip unreachables
R1(config-if)# no ip redirects
R1(config)# ip icmp rate-limit unreachable 500
host$ sudo tcpdump -ni eth0 'icmp[icmptype] == 3 or icmp6 and ip6[40] == 1'

Turning off unreachables on Internet-facing interfaces reduces information leakage. It also makes traceroute show stars at that hop, so document the choice.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

ICMP is the IP layer's control and error-reporting protocol. Ping and traceroute use it, but its more important job is telling senders what went wrong: that a destination is unreachable, that a packet's time to live expired, or that a packet was too large to forward. ICMPv6 carries even more: Neighbour Discovery, Router Advertisements and multicast listener reports all run over it, so IPv6 does not work at all if ICMPv6 is blocked.

ICMPv4ICMPv6Meaning
0/8129/128Echo reply/request
31Destination unreachable
3 code 42Fragmentation needed / packet too big
113Time exceeded
—133–137RS, RA, NS, NA, redirect

Filtering guidance: rate-limit rather than block echo; always allow "fragmentation needed" (v4) and "packet too big" (v6), or path MTU discovery breaks and large transfers hang; in IPv6 allow the Neighbour Discovery types on the local link.

show ip traffic | section ICMP
show ipv6 traffic | section ICMP
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 4443

Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → ICMP & ICMPv6. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc4443.html · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
icmpicmpv6pingtraceroutetime exceededdestination unreachablepacket too big
Confirmation

Confirm action

Continue?