skip to content

What is ICMPv6, and which IPv4 protocols' jobs does it take over besides ICMP's own error and echo messages?

level: juniorimportance: should knowfreq 42%

answer

  1. a control protocol with a new number
  2. errors versus informational messages
  3. the link-layer address lookup moved
  4. multicast group membership moved too
  5. echo is 128 and 129

basics

~10 s

ICMPv6 (RFC 4443, Next Header 58) is IPv6's control protocol. Beyond errors and echo it carries Neighbor Discovery, which replaces ARP, ICMP Router Discovery and Redirect, and Multicast Listener Discovery, which replaces IGMP.

solid answer

~40 s

ICMPv6, specified in RFC 4443 and identified by Next Header `58`, is IPv6's version of ICMP: error messages such as Destination Unreachable (`1`) and Packet Too Big (`2`), and informational messages such as Echo Request (`128`) and Echo Reply (`129`). It also carries work IPv4 did elsewhere. **Neighbor Discovery** (RFC 4861) is a set of ICMPv6 messages that corresponds to ARP plus ICMP Router Discovery and ICMP Redirect. **Multicast Listener Discovery** (RFC 2710, then MLDv2 in RFC 3810) is derived from IGMP but uses ICMPv6 message types instead of IGMP's IP protocol `2`. So an IPv6 host that cannot exchange ICMPv6 cannot resolve a neighbour's link-layer address or find its router, and RFC 8504 makes ICMPv6 support a MUST for every IPv6 node.

go deeper

for a junior

Recall Next Header 58, the error and informational split, and echo types 128 and 129, then name ARP and IGMP as the IPv4 protocols whose jobs moved into ICMPv6.

for a middle

Explain how Neighbor Discovery and Multicast Listener Discovery are built from ICMPv6 message types, and why a host that cannot exchange ICMPv6 cannot even reach its own router.

for a senior

Show that you treat ICMPv6 as infrastructure when you review host and firewall rules: discovery, multicast membership and Packet Too Big have to survive any filter you approve.

for a principal

Frame ICMPv6 as a consolidation trade-off: one protocol for errors, discovery and membership simplifies the stack, but it turns the IPv4 habit of blanket ICMP filtering into a network-breaking decision.

## What ICMPv6 is **ICMPv6** is the Internet Control Message Protocol for IPv6, specified in **RFC 4443** (which obsoletes RFC 2463). An ICMPv6 message sits after the IPv6 header and any extension headers, and the header immediately before it says **Next Header `58`**. In IPv4, ICMP is IP protocol `1` (RFC 792), so the two are different protocols that share a design, not one protocol with longer addresses. Every ICMPv6 message begins with the same three fields: - **Type** (8 bits) names the kind of message. - **Code** (8 bits) refines it, for example which reason a destination was unreachable. - **Checksum** (16 bits) covers the whole ICMPv6 message **plus a pseudo-header** of IPv6 fields: the source and destination addresses, the length and the Next Header value 58. ICMPv4's checksum covers only the ICMP message; the IPv6 header has no checksum field at all, so the pseudo-header is what lets a receiver detect a message whose addresses were damaged. ## Two classes of message RFC 4443 splits the Type space with its high-order bit: **0-127 are error messages**, **128-255 are informational messages**. The split lets a node handle a type it does not recognise: an unknown error is passed to the upper-layer process it concerns, an unknown informational message is silently discarded. | Type | Name | Class | Defined in | |---|---|---|---| | 1 | Destination Unreachable | error | RFC 4443 | | 2 | Packet Too Big | error | RFC 4443 | | 3 | Time Exceeded | error | RFC 4443 | | 4 | Parameter Problem | error | RFC 4443 | | 128 / 129 | Echo Request / Echo Reply | informational | RFC 4443 | | 130-132 | MLD Query, Report, Done | informational | RFC 2710 | | 133-137 | Neighbor Discovery messages | informational | RFC 4861 | | 143 | Version 2 Multicast Listener Report | informational | RFC 3810 | ## What moved into ICMPv6 The interview point is that ICMPv6 is not only an error channel. Several jobs that IPv4 handled with other protocols, or with optional ICMP extras, are ICMPv6 messages in IPv6: | Job | IPv4 | IPv6 | |---|---|---| | Map an on-link IP address to a link-layer address | **ARP**, carried directly in link-layer frames, not in IP | Neighbor Solicitation and Neighbor Advertisement | | Find the routers on the link | ICMP Router Discovery (RFC 1256) | Router Solicitation and Router Advertisement | | Point a host at a better first hop | ICMP Redirect (type 5) | the Neighbor Discovery Redirect message | | Tell routers which multicast groups have listeners | **IGMP**, IP protocol 2 | **MLD**, ICMPv6 types 130-132 and 143 | | Report errors, answer echo | ICMP, IP protocol 1 | ICMPv6 error types 1-4, echo 128 and 129 | RFC 4861 states the Neighbor Discovery correspondence directly: it combines ARP, ICMP Router Discovery and ICMP Redirect. RFC 2710 says MLD is derived from IGMPv2, with the one important difference that it uses ICMPv6 message types. How those discovery messages work, and how SLAAC builds on them, is a subject of its own; here the point is only that they ride on ICMPv6. ## Why that makes ICMPv6 non-optional Because of that consolidation, an IPv6 node without working ICMPv6 loses far more than diagnostics: 1. It cannot resolve the link-layer address of a neighbour, including its default router, so it cannot send anything off the host. 2. It cannot learn routers and prefixes from Router Advertisements. 3. It cannot report the multicast groups it listens to; Neighbor Discovery depends on the node joining **solicited-node** multicast groups, which is done with MLD. 4. It cannot learn a smaller path MTU, because IPv6 routers never fragment (RFC 8200) and Packet Too Big is the signal they send instead. RFC 8504, the IPv6 node requirements, therefore says ICMPv6 **MUST** be supported. ## Echo in IPv6 The classic use, ping, uses **Echo Request (type 128)** and **Echo Reply (type 129)**, each with an Identifier and a Sequence Number for matching. RFC 4443 says every node **MUST** implement an Echo responder, and that an Echo Reply **SHOULD** be sent even to a request addressed to a multicast or anycast address, sourced from a unicast address of the receiving interface. IPv4 is looser there: RFC 1122 lets a host silently discard an echo request sent to a broadcast or multicast address. ## Slips to avoid - Quoting IPv4's echo numbers, 8 and 0, for IPv6. - Saying IPv6 still uses ARP with longer addresses. - Saying IPv6 multicast membership uses IGMP. - Treating ICMPv6 as a ping protocol that can be switched off without consequence.

  • Why does the ICMPv6 checksum include a pseudo-header when the ICMPv4 checksum does not?
    ICMPv4's checksum (RFC 792) covers only the ICMP message, and the IPv4 header protects itself with its own header checksum. The IPv6 header has no checksum field, so RFC 4443 prepends a pseudo-header of the source and destination addresses, the length and Next Header 58 to the ICMPv6 checksum. A message whose addresses were corrupted in transit, or that arrived at the wrong node, then fails verification.
  • Does an IPv6 node answer an Echo Request sent to a multicast address, and from which address?
    RFC 4443 says an Echo Reply SHOULD be sent in response to an Echo Request addressed to a multicast or anycast address, and that its source MUST be a unicast address of the interface that received the request. So a request to the all-nodes group can draw replies from every node on the link, each from its own unicast address. In IPv4, RFC 1122 lets a host silently discard an echo request sent to a broadcast or multicast address.

saying these in an interview costs you the question

  • ICMPv6 is ordinary ICMP with longer addresses, so it is just as optional.
  • IPv6 still uses ARP for address resolution, only with 128-bit addresses.
  • IPv6 hosts report multicast group membership with IGMP.
  • ICMPv6 echo uses types 8 and 0, the same numbers as IPv4.
  • Blocking ICMPv6 on a host only stops it from answering ping.