INTERNET FUNDAMENTALSAI-REVIEWED

What does ICMP tell you about a network problem?

Useful first: Routers and routing · optional, not a requirement

Choose your depth

Stay with the essentials, or look closer.

Simple explanation
2 min read · estimate

YOUR GOALExplain what ICMP reports and what a ping result does and does not establish.

Reading a network status message

Feedback about an IP packet

ICMP stands for Internet Control Message Protocol. A host or router can use it to report a problem handling an IP packet, such as a destination being unreachable. It also supports informational exchanges.

Think of a delivery-status note about a parcel. The note can explain one delivery problem; it does not carry the parcel or guarantee that every failed delivery produces a note.

[1] [3]

Ping asks for an echo

Ping uses an Echo Request and looks for an Echo Reply. A matching reply is evidence that the echo exchange completed for that probe.

It does not test a website login, retrieve an HTTP page, or check a TLS certificate. A server can answer ping while its application is unavailable.

[1] [2]

IPv4 and IPv6 have different messages

IPv4 and IPv6 have corresponding control protocols: ICMPv4 and ICMPv6. Their message numbers differ. An IPv4 Echo Request is type 8; an IPv6 Echo Request is type 128.

Read the IP version before interpreting a type number. ICMP is carried directly by IP, rather than inside a TCP segment or UDP datagram.

[1] [3]
THE IDEA TO KEEP

Use ICMP as evidence about network behavior, then test the application separately.

ONE THING TO WATCH OUT FOR

If ping succeeds, the website must be working.

Echo checks a different exchange from the application request. A successful probe does not prove that HTTP, TLS or the application works.

A QUICK CHECK, NOT A TEST
A server returns a matching Echo Reply. What does that result directly show?
Show the explanation

The echo exchange completed for that probe. An Echo Reply answers the probe. It does not exercise the website or validate a certificate.

Progress is saved only in this browser.

KEEP EXPLORINGRouters and routing
Was this explanation clear?
Report a mistake by email
Basic explanation
3 min read · estimate

YOUR GOALMatch an IPv4 echo reply to its request and distinguish a forwarding error from an application response.

Following an echo and an expired packet

Match the fields, not a service port

An IPv4 Echo Request uses type 8, code 0; its reply uses type 0, code 0. In a normal exchange, the reply returns the identifier, sequence number and data from the request.

Request: identifier 0x1234, sequence 7, data hello
Reply:   identifier 0x1234, sequence 7, data hello

This is an illustrative exchange. The fields help associate replies with probes; they are not TCP or UDP service ports.

[1] [2]

A packet can run out of hops

Suppose an IPv4 packet starts with TTL 2 and each forwarding router decrements it by one. The first router forwards it with TTL 1. At the second router it reaches zero and is discarded.

The relevant error report is Time Exceeded, type 11, code 0. If that report reaches the sender, it describes the forwarding limit being reached, not a reply from the destination application.

[1] [6]

An error report and silence mean different things

ICMP error messages include part of the packet that caused the error, helping the sender associate the report with its traffic. A router on the path may generate the report; it need not come from the destination.

A timeout says no expected reply arrived before the waiting period ended. Packet loss, filtering, a missing return route or limits on generated replies can affect what you observe. Silence alone does not prove that the destination is powered off.

[1] [2] [6]
THE IDEA TO KEEP

Read the message type, code and quoted packet before deciding what the diagnostic result means.

ONE THING TO WATCH OUT FOR

Every ICMP error comes from the final destination.

An intermediate router can report a forwarding problem, including an expired TTL.

A QUICK CHECK, NOT A TEST
In the TTL=2 example, each forwarding router subtracts one. What happens at the second router?
Show the explanation

It discards the packet when TTL reaches zero; the relevant error is Time Exceeded. The forwarding limit expires at the second router. A Time Exceeded report may help diagnose this if the report reaches the sender.

Progress is saved only in this browser.

KEEP EXPLORINGRouters and routing
Was this explanation clear?
Report a mistake by email
Advanced explanation
3 min read · estimate

YOUR GOALCompare ICMP-based Path MTU Discovery in IPv4 and IPv6 and interpret the limits of error reporting.

Packet size feedback and reporting limits

IPv4: too large with Do Not Fragment set

In IPv4 Path MTU Discovery, a router may encounter a packet that exceeds the next link's MTU while DF (Don't Fragment) is set. The report is Destination Unreachable, type 3, code 4: fragmentation needed and DF set.

RFC 1191 specifies a Next-Hop MTU field. For example, a 1500-byte IP packet facing a 1400-byte next-hop MTU cannot pass unchanged under these conditions. The MTU includes the IP header and data, not the Ethernet header; this is not a 1400-byte application-payload allowance.

[4]

IPv6: Packet Too Big informs the source

IPv6 uses Packet Too Big, ICMPv6 type 2, with the constraining MTU. A forwarding node drops a packet that is too large; a source using this feedback reduces its assumed path MTU and adapts packet sizes.

IPv6 routers do not fragment packets to make them fit. This differs from the IPv4 DF scenario. Learning one hop's limit also does not rule out a smaller limit farther along the path.

[3] [5] [7]

Reports are deliberately constrained

An IPv4 host must not generate an ICMP error in response to another ICMP error or to a non-initial fragment. This is a rule about error messages, not a ban on errors concerning an Echo Request.

ICMPv6 has its own suppression rules and rate limits for generated errors. IPv4 routers can also limit generated error reports and Echo Replies. These limits are another reason not to interpret one missing report as a complete diagnosis.

[2] [3] [6]
THE IDEA TO KEEP

Use size reports to adjust the source, and keep protocol rules separate from guarantees about what you will observe.

ONE THING TO WATCH OUT FOR

Every oversized packet produces a report that is guaranteed to reach its sender.

Size feedback has specific generation rules and travels over the network too. A report can be suppressed, limited, filtered or lost.

A QUICK CHECK, NOT A TEST
Which comparison of packet-size feedback is correct?
Show the explanation

IPv4 with DF uses type 3/code 4; IPv6 uses Packet Too Big type 2. IPv4 fragmentation-needed feedback and IPv6 Packet Too Big are distinct ICMP messages. Echo Reply is a different operation, and IPv6 routers do not perform fragmentation.

Progress is saved only in this browser.

KEEP EXPLORINGRouters and routing
Was this explanation clear?
Report a mistake by email
GO STRAIGHT TO THE SOURCE

Keep asking. Check the details.

Source-checked using AI (OpenAI Codex) on . The checks covered sources, examples, and quizzes for this article version.

No human review is claimed. AI review can miss errors; check the original sources below.

  1. RFC 792 — IPv4 ICMP messages and echo format
  2. RFC 1122 — Host ICMP processing, errors and echo replies
  3. RFC 4443 — ICMPv6 messages and processing rules
  4. RFC 1191 — IPv4 Path MTU Discovery
  5. RFC 8201 — IPv6 Path MTU Discovery
  6. RFC 1812 — Router error reports, rate limits and TTL
  7. RFC 8200 — IPv6 fragmentation is performed by source nodes
How explanations are prepared