Like IPv4, the specification for the IPv6 header and extension headers does not provide facilities for reporting errors. Instead, IPv6 uses an updated version of the Internet Control Message Protocol (ICMP) named ICMP version 6 (ICMPv6). ICMPv6 has the common IPv4 ICMP functions of reporting delivery and forwarding errors, and providing a simple echo service for troubleshooting. ICMPv6 is defined in RFC 2463 and is required for an IPv6 implementation.
The ICMPv6 protocol also provides a packet structure framework for the following:
Neighbor Discovery (ND) is a series of five ICMPv6 messages that manage node-to-node communication on a link. ND replaces Address Resolution Protocol (ARP), ICMPv4 Router Discovery, and the ICMPv4 Redirect message. ND is described in more detail in Chapter 6, "Neighbor Discovery."
Multicast Listener Discovery (MLD) is a series of three ICMPv6 messages that are equivalent to version 2 of the Internet Group Management Protocol (IGMP) for IPv4 to manage subnet multicast membership. MLD is described in more detail in Chapter 7, "Multicast Listener Discovery."
There are two types of ICMPv6 messages:
Error messages report errors in the forwarding or delivery of IPv6 packets by either the destination node or an intermediate router. The high-order bit of the 8-bit Type field for all ICMPv6 error messages is set to 0. Therefore, valid values for the Type field for ICMPv6 error messages are in the range of 0 through 127. ICMPv6 error messages include Destination Unreachable, Packet Too Big, Time Exceeded, and Parameter Problem.
Informational messages provide diagnostic functions and additional host functionality such as MLD and ND. The high-order bit of the 8-bit Type field for all ICMPv6 informational messages is set to 1. Therefore, valid values for the Type field for ICMPv6 information messages are in the range of 128 through 255. ICMPv6 informational messages described in RFC 2463 include Echo Request and Echo Reply.
An ICMPv6 header is identified by a Next Header value of 58 in the immediately preceding header. Figure 5-1 shows the structure of ICMPv6 messages.
Figure 5-1. The structure of ICMPv6 messages
The fields in the ICMPv6 header are:
Indicates the type of ICMPv6 message. The size of this field is 8 bits. In ICMPv6 error messages, the high-order bit is set to 0. In ICMPv6 informational messages, the high-order bit is set to 1.
Differentiates among multiple messages within a given message type. The size of this field is 8 bits. For the first, or only, message for a given type, the value of the Code field is 0.
Stores a checksum of the ICMPv6 message. The size of this field is 16 bits. The IPv6 pseudo-header is added to the front of the ICMPv6 message when calculating the checksum. For more information about the IPv6 pseudo-header, see "Upper Layer Checksums" in Chapter 4, "The IPv6 Header."
Contains ICMPv6 message-specific data.