![]() |
|||||||||||||
|
ICMPv6 |
Internet Control Message Protocol Version 6 (ICMPv6) or ICMP for IPv6 is a new version of ICMP. ICMPv6 is defined in RFC 4443. ICMPv6 operates in the Internet Layer of the TCP/IP model and performs error reporting for the Internet Protocol, as well as some other diagnostic functions (such as "ping").
ICMPv6 is an integral part of the IPv6 architecture that must be completely supported by all IPv6 implementations and nodes.
| The TCP/IP model (RFC 1122) |
|---|
| Application Layer |
| BGP · DHCP · DNS · FTP · Gopher · GTP · HTTP · IMAP · IRC · NNTP · NTP · POP · RIP · RPC · RTCP · RTP · RTSP · SDP · SIP · SMTP · SNMP · SOAP · SSH · STUN · Telnet · TIME · TLS/SSL · XMPP · (more) |
| Transport Layer |
| TCP · UDP · DCCP · SCTP · RSVP · ECN · (more) |
| Internet Layer |
| IP (IPv4, IPv6) · ICMP · ICMPv6 · IGMP · IPsec · (more) |
| Link Layer |
| ARP · RARP · NDP · OSPF · Tunnels (L2TP) · Media Access Control (Ethernet, DSL, ISDN, FDDI) · Device Drivers · (more) |
Contents |
This article describes the format of a set of control messages used in ICMPv6. ICMPv6 messages are subdivided into two classes: error messages and information messages. ICMPv6 messages are transported within an IPv6 packet in which IPv6 extension headers can also be present. The IPv6 Next Header value for ICMPv6 is 58.
ICMPv6 packets have the format Type, Code & Checksum. The 8-bit Type field indicates the type of the message. If the high-order bit has value zero (values in the range from 0 to 127), it is an error message; if the high-order bit has value 1 (values in the range from 128 to 255), it is an information message. The 8-bit Code field content depends on the message type, and it is used to create an additional level of message granularity. The Checksum field is used to detect errors in the ICMP message and in part of the IPv6 message.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ Message Body +
| |
+---------------------------------------------------------------+
| Type | Meaning |
|---|---|
| ICMPv6 Error Messages | |
| 1 | Destination Unreachable |
| 2 | Packet Too Big |
| 3 | Time Exceeded |
| 4 | Parameter Problem |
| 100 | Private experimentation |
| 101 | Private experimentation |
| 127 | Reserved for expansion of ICMPv6 error messages |
| ICMPv6 Informational Messages | |
| 128 | Echo Request |
| 129 | Echo Reply |
| 200 | Private experimentation |
| 201 | Private experimentation |
| 255 | Reserved for expansion of ICMPv6 informational messages |
A node that sends an ICMPv6 message has to determine both the Source and Destination IPv6 Addresses in the IPv6 header before calculating the checksum. If the node has more than one unicast address, it must choose the Source Address of the message as follows:
the Source Address of the ICMPv6 packet MUST be a unicast address belonging to the node. The address SHOULD be chosen according to the rules that would be used to select the source address for any other packet originated by the node, given the destination address of the packet. However, it MAY be selected in an alternative way if this would lead to a more informative choice of address reachable from the destination of the ICMPv6 packet.
The checksum is the 16-bit one's complement of the sum of the entire ICMPv6 message starting with the ICMPv6 message type field, prepended with a "pseudo-header" of IPv6 header fields, as specified in IPv6. The Next Header value used in the pseudo-header is 58. (NOTE: the inclusion of a pseudo-header in the ICMPv6 checksum is a change from IPv4; see IPv6 for the rationale for this change.) For computing the checksum, the checksum field is set to zero.
A node that forwards an ICMP message has to determine both the source and the destination IPv6 addresses for the ICMPv6 message. Particular care must be put into the choice of the source address. If a node has more than one unicast address, it must choose the source address of the message as follows:
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.