Internet Control Message Protocol for IPv6

Internet Control Message Protocol version 6 (ICMPv6) is the implementation of the Internet Control Message Protocol (ICMP) for Internet Protocol version 6 (IPv6). ICMPv6 is defined in RFC 4443.[1] ICMPv6 is an integral part of IPv6 and performs error reporting and diagnostic functions (e.g., ping), and has a framework for extensions to implement future changes.

Several extensions have been published, defining new ICMPv6 message types as well as new options for existing ICMPv6 message types. Neighbor Discovery Protocol (NDP) is a node discovery protocol in IPv6 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 discovery of multicast routers.

Message types and formats

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). type 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. The code field value depends on the message type and provides an additional level of message granularity. The checksum field provides a minimal level of integrity verification for the ICMP message.

ICMPv6 packet
Bit offset0–78–1516–31
0TypeCodeChecksum
32Message body

Types

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.

Type Code
ValueMeaningValueMeaning
ICMPv6 Error Messages
1 Destination unreachable 0 no route to destination
1 communication with destination administratively prohibited
2 beyond scope of source address
3 address unreachable
4 port unreachable
5 source address failed ingress/egress policy
6 reject route to destination
7 Error in Source Routing Header
2Packet Too Big0
3 Time exceeded 0 hop limit exceeded in transit
1 fragment reassembly time exceeded
4 Parameter problem 0 erroneous header field encountered
1 unrecognized Next Header type encountered
2 unrecognized IPv6 option encountered
100Private experimentation
101Private experimentation
127Reserved for expansion of ICMPv6 error messages
ICMPv6 Informational Messages
128Echo Request0
129Echo Reply0
130Multicast Listener Query (MLD)0

There are two subtypes of Multicast Listener Query messages:

  • General Query, used to learn which multicast addresses have listeners on an attached link.
  • Multicast-Address-Specific Query, used to learn if a particular multicast address has any listeners on an attached link.

These two subtypes are differentiated by the contents of the Multicast Address field, as described in section 3.6 of RFC 2710

131Multicast Listener Report (MLD)0
132Multicast Listener Done (MLD)0
133Router Solicitation (NDP)0
134Router Advertisement (NDP)0
135Neighbor Solicitation (NDP)0
136Neighbor Advertisement (NDP)0
137Redirect Message (NDP)0
138 Router Renumbering 0 Router Renumbering Command
1 Router Renumbering Result
255 Sequence Number Reset
139 ICMP Node Information Query 0 The Data field contains an IPv6 address which is the Subject of this Query.
1 The Data field contains a name which is the Subject of this Query, or is empty, as in the case of a NOOP.
2 The Data field contains an IPv4 address which is the Subject of this Query.
140 ICMP Node Information Response 0 A successful reply. The Reply Data field may or may not be empty.
1 The Responder refuses to supply the answer. The Reply Data field will be empty.
2 The Qtype of the Query is unknown to the Responder. The Reply Data field will be empty.
141Inverse Neighbor Discovery Solicitation Message0
142Inverse Neighbor Discovery Advertisement Message0
143Multicast Listener Discovery (MLDv2) reports (RFC 3810)
144Home Agent Address Discovery Request Message0
145Home Agent Address Discovery Reply Message0
146Mobile Prefix Solicitation0
147Mobile Prefix Advertisement0
148Certification Path Solicitation (SEND)
149Certification Path Advertisement (SEND)
151Multicast Router Advertisement (MRD)
152Multicast Router Solicitation (MRD)
153Multicast Router Termination (MRD)
155RPL Control Message
200Private experimentation
201Private experimentation
255Reserved for expansion of ICMPv6 informational messages

Note that the table above is not comprehensive. The current complete list of assigned ICMPv6 types can be found at this link: IANA: ICMPv6 Parameters.

Checksum

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,[3] 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.[4] Note that this differs from the way it is calculated for IPv4 in ICMP, but is similar to the calculation done in TCP.

ICMPv6 pseudo-header
Bit offset 0 – 7 8–15 16–23 24–31
0 Source address
32
64
96
128 Destination address
160
192
224
256 ICMPv6 length
288 Zeros Next header

Message processing

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.

References

  1. RFC 4443, Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification
  2. RFC 3315, § 3
  3. RFC 2460, Internet Protocol, Version 6 (IPv6) Specification, Section 8.1 (Upper-Layer Checksum), S. Deering, R. Hinden (December 1998)
  4. RFC 1071, Computing the Internet Checksum, R. Braden, D. Borman, C. Partridge (September 1988)
  • IANA: ICMPv6 Parameters
  • Router Renumbering for IPv6. doi:10.17487/RFC2894. RFC 2894.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.