ICMPv6 Error Messages

ICMPv6 error messages report forwarding or delivery errors by either a router or the destination host, and consist of the following messages:

  • Destination Unreachable (ICMPv6 Type 1)
  • Packet Too Big (ICMPv6 Type 2)
  • Time Exceeded (ICMPv6 Type 3)
  • Parameter Problem (ICMPv6 Type 4)

To conserve network bandwidth, ICMPv6 error messages are not sent for every error encountered. Instead, ICMPv6 error messages are rate limited. Rate limiting can be based on either of the following:

  • A timer

    The rate is one error message per source or any source for every T milliseconds (ms). RFC 2463 suggests a value of 1000 ms.

  • A percentage of bandwidth

    The rate of error messages sent per interface is some percentage P of the link's bandwidth. RFC 2463 suggests a value of 2%.

In Windows XP and the Windows .NET Server 2003 family, IPv6 sends up to two ICMPv6 error messages per second per source.

Destination Unreachable

A router or a destination host sends an ICMPv6 Destination Unreachable message when the packet cannot be forwarded to the destination node or upper-layer protocol. Figure 5-2 shows the structure of the Destination Unreachable message.

Figure 5-2. The structure of the Destination Unreachable message

In the Destination Unreachable message, the Type field is set to 1 and the Code field is set to a value in the range of 0 through 4. Following the Checksum field is a 32-bit Unused field and the leading portion of the discarded packet, sized so that the entire IPv6 packet containing the ICMPv6 message is no larger than 1,280 bytes (the minimum IPv6 MTU). The number of bytes of the discarded packet included in the message varies if there are IPv6 extension headers present. For an ICMPv6 message without extension headers, up to 1,232 bytes of the discarded packet are included (1,280 less a 40-byte IPv6 header and an 8-byte ICMPv6 Destination Unreachable header).

Table 5-1 lists the value of the Code field for the various Destination Unreachable messages as defined in RFC 2463 and the Internet draft titled "IPv6 Scoped Address Architecture."

Table 5-1. ICMPv6 Destination Unreachable Messages

Code Field Value Description

0 - No Route to Destination

No route matching the destination was found in the routing table.

1 - Communication with Destination Administratively Prohibited

The communication with the destination is prohibited by administrative policy. This is typically sent when the packet is discarded by a firewall.

2 - Beyond Scope of Source Address

The destination is beyond the scope of the source address. A router sends this when the packet is forwarded using an interface that is not within the scoped zone of the source address. This message is defined in the Internet draft titled "IPv6 Scoped Address Architecture."

3 - Address Unreachable

The destination address is unreachable. This is typically sent because of an inability to resolve the destination's link-layer address.

4 - Port Unreachable

The destination port was unreachable. This is typically sent when an IPv6 packet containing a UDP message arrived at the destination but there were no applications listening on the destination UDP port.

Network Monitor Capture

Here is an example of a Destination Unreachable-No Route to Destination message as displayed by Network Monitor (capture 05_01 in the \NetworkMonitorCaptures folder on the companion CD-ROM):

 + Frame: Base frame properties + ETHERNET:  EType = IPv6        IP6: Version = 6 (0x6)       IP6: Traffic Class = 0 (0x0)       IP6: Flow Label = 0 (0x0)       IP6: Payload Length = 88 (0x58)       IP6: Next Header = 58 (ICMP6)       IP6: Hop Limit = 128 (0x80)       IP6: Source Address = fec0::2:201:2ff:fe44:87d1       IP6: Destination Address = fec0::2:260:97ff:fe02:6e8f        IP6: Payload: Number of data bytes remaining = 88 (0x0058)   ICMP6: Destination Unreachable (No route)       ICMP6: Type = 1 (Destination Unreachable)       ICMP6: Code = 0 (No route)       ICMP6: Checksum = 0xD498       ICMP6: Unused       ICMP6: Data: Number of data bytes remaining = 80 (0x0050) 

Packet Too Big

An ICMPv6 Packet Too Big message is sent when the packet cannot be forwarded because the link MTU on the forwarding interface of a router is smaller than the size of the IPv6 packet. Figure 5-3 shows the structure of the Packet Too Big message.

Figure 5-3. The structure of the Packet Too Big message

In the Packet Too Big message, the Type field is set to 2 and the Code field is set to 0. Following the Checksum field is a 32-bit MTU field that stores the link MTU of the interface over which the packet was being forwarded. Next is the leading portion of the discarded packet, sized so that the entire IPv6 packet containing the ICMPv6 message is no larger than 1,280 bytes. The Packet Too Big message is used for the IPv6 Path MTU Discovery process described in the "Path MTU Discovery" section of this chapter.

Network Monitor Capture

Here is an example of a Packet Too Big message as displayed by Network Monitor (frame 2 of capture 05_02 in the \NetworkMonitorCaptures folder on the companion CD-ROM):

 + Frame: Base frame properties + ETHERNET:  EType = IPv6  + IP6: Proto = ICMP6; Len = 1240   ICMP6: Packet Too Big (MTU = 1280)       ICMP6: Type = 2 (Packet Too Big)       ICMP6: Code = 0 (0x0)       ICMP6: Checksum = 0xAD3D       ICMP6: MTU = 1280 (0x500)       ICMP6: Data: Number of data bytes remaining = 1232 (0x04D0) 

This message was sent by a router attempting to forward a 1,500-byte Echo Request message over an interface that supported only a 1,280-byte IPv6 MTU.

Time Exceeded

A router typically sends an ICMPv6 Time Exceeded message when the Hop Limit field in the IPv6 header becomes zero after decrementing its value during the forwarding process. Figure 5-4 shows the structure of the Time Exceeded message.

Figure 5-4. The structure of the Time Exceeded message

In the Time Exceeded message, the Type field is set to 3 and the Code field is set to:

  • 0 (Hop Limit Exceeded in Transit) by a router when the Hop Limit field in the IPv6 header is decremented to 0, or in the rare instance when the value of the Hop Limit field in the IPv6 header of an arriving packet is 0.
  • 1 (Fragment Reassembly Time Exceeded) by a host when the fragmentation reassembly time of the destination host expires. RFC 2460 specifies a reassembly time of 60 seconds.

Following the Checksum field is a 32-bit Unused field and the leading portion of the discarded packet, sized so that the entire IPv6 packet containing the ICMPv6 message is no larger than 1,280 bytes.

The receipt of a Time Exceeded-Hop Limit Exceeded in Transit message indicates that either the value of the Hop Limit field of outgoing packets is not large enough to reach the destination, or that a routing loop exists. A recommended value for the Hop Limit field set by the sending node is twice the diameter of the network, where the diameter is the maximum number of links between the farthest ends of the network. A routing loop is a condition on a network in which packets are forwarded in a loop between two or more routers.

Parameter Problem

An ICMPv6 Parameter Problem message is sent either by a router or by the destination. This occurs when there is an error in the IPv6 header or an extension header that prevents IPv6 from performing additional processing. Figure 5-5 shows the structure of the Parameter Problem message.

Figure 5-5. The structure of the Parameter Problem message

In the Parameter Problem message, the Type field is set to 4 and the Code field has a value in the range of 0 through 2. Following the Checksum field is the 32-bit Pointer field that indicates the byte offset (starting at 0) in the IPv6 packet at which the error was encountered. Following the Pointer field is the leading portion of the discarded packet, sized so that the entire ICMPv6 message is no larger than 1,280 bytes. The Pointer field value is set to the correct offset even when the location of the error is not within the portion of the discarded packet. When the receiving host recognizes an error in the portion of the packet beyond an Encapsulating Security Payload (ESP) extension header, the offset indicates the byte position in the decrypted packet, not the encrypted packet as sent on the network.

Table 5-2 shows the Code field values for Parameter Problem messages.

Table 5-2. ICMPv6 Parameter Problem Messages

Code Field Value Description

0 - Erroneous Header Field Encountered

An error in a field within the IPv6 header or an extension header was encountered.

1 - Unrecognized Next Header Type Encountered

An unrecognized Next Header field value was encountered. This is equivalent to the ICMPv4 Destination Unreachable-Protocol Unreachable message.

2 - Unrecognized IPv6 Option Encountered

An unrecognized IPv6 option was encountered.

The Parameter Problem-Unrecognized IPv6 Option Encountered message is used when both of the following are true:

  • An option in a Hop-by-Hop Options header or a Destination Options header is not recognized.
  • Within the option's Option Type field, the 2 high-order bits are set to either 10 (binary) or 11 (binary).

For more information about the Option Type field, see "Hop-by-Hop Options Header" in Chapter 4, "The IPv6 Header."



Understanding IPv6
Understanding Ipv6
ISBN: 0735612455
EAN: 2147483647
Year: 2005
Pages: 124
Authors: Joseph Davies

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net