Internet Control Message Protocol version 6 (ICMPv6) is the implementation of the Internet Control Message Protocol (ICMP) for Internet Protocol version 6 (IPv6).[1] ICMPv6 is an integral part of IPv6 and performs error reporting and diagnostic functions.
ICMPv6 has a framework for extensions to implement new features. Several extensions have been published, defining new ICMPv6 message types as well as new options for existing ICMPv6 message types. For example, Neighbor Discovery Protocol (NDP) is a node discovery protocol based on ICMPv6 which replaces and enhances functions of ARP.[2]Secure Neighbor Discovery (SEND) is an extension of NDP with extra security. Multicast Listener Discovery (MLD) is used by IPv6 routers for discovering multicast listeners on a directly attached link, much like Internet Group Management Protocol (IGMP) is used in IPv4. Multicast Router Discovery (MRD) allows the discovery of multicast routers.
ICMPv6 messages may be classified as error messages and information messages. ICMPv6 messages are transported by IPv6 packets in which the IPv6 Next Header value for ICMPv6 is set to the value 58.
The ICMPv6 message consists of a header and the protocol payload. The header contains only three fields: Type (8 bits), Code (8 bits), and Checksum (16 bits).
Specifies the type of the message. Values in the range from 0 to 127 (high-order bit is 0) indicate an error message, while values in the range from 128 to 255 (high-order bit is 1) indicate an information message.
Code: 8 bits
The Code field value depends on the message type and provides an additional level of message granularity.
Checksum: 16 bits
Provides a minimal level of integrity verification for the ICMP message. The checksum is calculated from the ICMP message (starting with the Type field), prepended with an IPv6 pseudo-header.[1] See below.
Control messages are identified by the value in the type field. The code field gives additional context information for the message. Some messages serve the same purpose as the correspondingly named ICMP message types.
ICMPv6 provides a minimal level of message integrity verification by the inclusion of a 16-bit checksum in its header. The checksum is calculated starting with a pseudo-header of IPv6 header fields according to the IPv6 standard,[6] which consists of the source and destination addresses, the packet length and the next header field, the latter of which is set to the value 58. Following this pseudo header, the checksum is continued with the ICMPv6 message. The checksum computation is performed according to Internet protocol standards using 16-bit ones' complement summation, followed by a final ones' complement of the checksum itself and inserting it into the checksum field.[7] Note that this differs from the way it is calculated for IPv4 in ICMP, but is similar to the calculation done in TCP.
The payload of an ICMPv6 message varies according the type of message being sent. It begins at bit 32 immediately after the header described above. For some messages such as destination unreachable or time exceeded there is no defined message body.
Destination Unreachable
Bit offset
0–7
8–15
16–31
0
1
Code
Checksum
32
Unused
64
Message body (Variable Size)
Time Exceeded
Bit offset
0–7
8–15
16–31
0
3
Code
Checksum
32
Unused
64
Message body (Variable Size)
Others define a use only for the first four bytes of the body with no other defined content:
Packet Too Big
Bit offset
0–7
8–15
16–31
0
2
0
Checksum
32
MTU
64
Message body (Variable Size)
Parameter Problem
Bit offset
0–7
8–15
16–31
0
4
Code
Checksum
32
Pointer
64
Message body (Variable Size)
Echo Request
Bit offset
0–7
8–15
16–31
0
128
0
Checksum
32
Identifier
Sequence Number
64
Data (Variable Size)
Echo Reply
Bit offset
0–7
8–15
16–31
0
129
0
Checksum
32
Identifier
Sequence Number
64
Data (Variable Size)
In the case of NDP messages the first four bytes are either reserved or used for flags/hoplimit. While the reset of body has unspecified structured data:
Router Solicitation
Bit offset
0–7
8–15
16–31
0
133
0
Checksum
32
Reserved
64
Options (Variable Size)
Router Advertisement
Bit offset
0–7
8–15
16–31
0
134
0
Checksum
32
Cur Hop Limit
Managed Address Flag
Other Configuration Flag
Reserved
Router Lifetime
64
Reachable Time
96
Retrans Time
128
Options (Variable Size)
Neighbor Solicitation
Bit offset
0–7
8–15
16–31
0
135
0
Checksum
32
Reserved
64
Target Address (16 bytes)
192
Options (Variable Size)
Neighbor Advertisement
Bit offset
0–7
8–15
16–31
0
136
0
Checksum
32
From Router (R)
Solicited Flag(S)
Override(O)
Reserved
64
Target Address (16 bytes)
192
Options (Variable Size)
For a redirect the first bytes of the message body are reserved but not used. This is followed by a Target and destination address. Unspecified options can be attached to the end:
When an ICMPv6 node receives a packet, it must undertake actions that depend on the type of message. The ICMPv6 protocol must limit the number of error messages sent to the same destination to avoid network overloading. For example, if a node continues to forward erroneous packets, ICMP will signal the error to the first packet and then do so periodically, with a fixed minimum period or with a fixed network maximum load. An ICMP error message must never be sent in response to another ICMP error message.