ICMPv6

ICMPv6

ICMPv6 is ICMP for IPv6. It is indicated by Next-Header value of 58 in IPv6 header. ICMPv6 is used by all IPv6 nodes to report error encountered in processing packets, and other IP-layer functions like Ping.

ICMPv6 messages are grouped into two classes: error and informational messages. These messages are identified by the zero in the high-order bit of the Type field value. Hence, Type message from 0 to 127 are error messages and type messages from 128 to 255 are informational messages.

ICMPv6 error messages:

Type 1 Destination Unreachable

Type 2 Packet too big

Type 3 Time exceeded

Type 4 Parameter problem

ICMPv6 Informational Messages:

Type 128 Echo Request

Type 129 Echo Reply

Every ICMPv6 message is preceded by an IPv6 header with/without an Extension header. The ICMP message has a following message format-

Type- indicates the type of the message

Code- depends on message type. It provides additional level of granularity to the message.

Checksum- used for data-integrity of ICMPv6 messages

ICMPv6 Error messages:

1. Destination Unreachable message-

The destination address of the IPv6 packet to whom this ICMPv6 message is to be sent is copied from the source address field of the invoking packet

Type- 1

Code-

0 - no route to destination

1 - communication to destination administratively prohibited e.g. firewall filter

3 - address unreachable

4 - port unreachable

Unused- set to zero by sender and ignored by receiver

2. Packet Too Big message-

The destination address of the IPv6 packet to whom this ICMPv6 message is to be sent is copied from the source address field of the invoking packet

Type- 2

Code- Set to 0 by sender and ignored by the receiver

MTU- The MTU of the next-hop link

This message is sent by a router in response to a packet that it cannot forward because the packet is larger than the MTU of the outgoing link.

3. Time Exceeded message-

The message format is same as the Destination Unreachable message. However, the values change as follows-

Type- 3

Code-

0 - hop-limit exceeded in transit

1 - fragmentation and reassembly time exceeded

Unused- set to zero by sender and ignored by receiver

The destination address of the IPv6 packet to whom this ICMPv6 message is to be sent is copied from the source address field of the invoking packet.

This message is sent when the hop-limit of the packet is 0, or the hop-limit becomes 0 when the router decrements the value by 1. It is sent to the source of the packet with Code 0.

4. Parameter Problem message-

The destination address of the IPv6 packet to whom this ICMPv6 message is to be sent is copied from the source address field of the invoking packet.

Type- 4

Code-

0 - erroneous header field encountered

1 - unrecognised Next-header encountered

2 - unrecognised IPv6 Option encountered

Pointer- identifies the octet offset within the invoking packet where the error was detected

If an IPv6 node processing the packet finds a problem with a field in the IPv6 header or Extension header, it drops the packet and sends the Parameter Problem message indicating the type and the location of the problem (using the pointer).

ICMPv6 Informational Messages:

1. Echo Request message-

The destination address is any IPv6 legal address.

Type- 128

Code- 0

Identifier- An identifier that can help to matching Echo Replies. May be zero.

Sequence Number- An identifier that can help to matching Echo Replies. May be zero.

Data- any irrelevant information.May be zero.

These messages are usually used for diagnostic purposes.

2. Echo Reply message-

The message format is same as the Echo Request message. However, the values change as follows-

Type- 129

Code- 0

Identifier- Copied from Echo Request messages.

Sequence Number- Copied from Echo Request messages.

Data- data from invoking Echo Request message

These messages are sent in response to Echo Request messages. The Source address of an Echo Reply sent in response to a Echo Request message is the destination address of the Echo Request message.

Further Reading:

1. RFC 2463: ICMPv6 http://www.faqs.org/ftp/rfc/pdf/rfc2463.txt.pdf