Professional Documents
Culture Documents
5 Chap5
5 Chap5
CHAPTER
5
ICMPv6
The ICMPv6 (Internet Control Message Protocol version
6)1 is an integral part of the IPv6 architecture2 and must
be completely supported by all IPv6 implementations.
ICMPv6 combines functions previously subdivided
among different protocols, such as ICMP (Internet Con-
trol Message Protocol version 4)3, IGMP (Internet Group
Membership Protocol)4, and ARP (Address Resolution
Protocol)5, and it introduces some simplifications by elim-
inating obsolete types of messages no longer in use.
In this chapter, we will analyze the protocol’s main
characteristics and the packet’s format, while a more thor-
ough discussion about Neighbor Discovery problems is
deferred until Chapter 6.
56982_CH05II 12/12/97 4:26 PM Page 84
84 Chapter Five
Figure 5-1
Format of an ICMPv6
message
56982_CH05II 12/12/97 4:26 PM Page 85
ICMPv6 85
Table 5-1 Type Meaning
Types of ICMP 1 Destination Unreachable
messages
2 Packet Too Big
3 Time Exceeded
4 Parameter Problem
137 Redirect
86 Chapter Five
ICMPv6 87
Figure 5-2
Destination Unreach-
able message
any link must be possible (see Section 3.3), the packet must not exceed
576 octets (the IPv6 header and eventual extension headers included).
This type of message can be generated either by a router or by a
destination node that cannot deliver the message; the router or node is
therefore forced to discard the message. A packet is dropped without
generating a message of this type only when the network is congested;
generating ICMP messages will make the congestion worse.
The reasons for the failure in delivering a packet are as follow:
■ No route to destination: A router cannot find a matching entry for
the destination address in its routing table, and therefore it doesn’t
know on which interface to retransmit the packet.
■ Communication with destination administratively prohibited: The
message is dropped by a firewall—that is, by a router that con-
tains a set of rules that forbid some communications.
■ Not a neighbor: The message contains a Routing header, the next
destination address has the Strict / Loose bit equal to Strict, and
the next destination address doesn’t belong to any of the router
links (it is not a neighbor).
■ Address unreachable: The destination address is unreachable for
other reasons—for example, for an interface error or for the inabil-
ity to compute the link layer address of the destination node.
■ Port unreachable: The packet reached the destination node, but
the layer 4 protocol (for example, UDP) to which the packet should
be delivered (the port) is unreachable.
88 Chapter Five
Figure 5-3
Packet Too Big mes-
sage
2 Not a neighbor
3 Address unreachable
4 Port unreachable
IPv6 destination address of the ICMP packet is therefore the source ad-
dress of the dropped packet.
The Type field has value 2.
The Code field always has value zero.
The 32-bit MTU field indicates the MTU of the link on which trans-
mitting the packet was impossible.
The first part of the IPv6 packet that caused the ICMP packet follows.
Because being able to transmit the ICMP packet on any link must be pos-
sible (see Section 3.3), the packet must not exceed 576 octets (the IPv6
header and eventual extension headers included).
ICMPv6 89
Figure 5-4
Time Exceeded
message
The Unused field is unused for all code values, and it must be initial-
ized to zero by the sender and ignored by the receiver.
The first part of the IPv6 packet that caused the ICMP packet follows.
Because being able to transmit the ICMP packet on any link must be pos-
sible (see Section 3.3), the packet must not exceed 576 octets (the IPv6
header and eventual extension headers included).
90 Chapter Five
Figure 5-5
Parameter Problem
message
ICMPv6 91
Table 5-4 Code Meaning
Parameter Prob- 0 Erroneous header field
lem: Code field
values 1 Unrecognized Next Header
92 Chapter Five
Figure 5-6
Echo Request and
Echo Reply messages
Figure 5-7
Group Membership
message
The IPv6 header Hop Limit field is set to 1 (packets are exchanged only
between adjacent nodes).
The Type field assumes values 130 (Group Membership Query), 131
(Group Membership Report), or 132 (Group Membership Reduction).
The Code field has value zero.
The Maximum Response Delay field expresses a value in milliseconds.
In Group Membership Query messages, this field indicates the maximum
time that the responding Report messages can be delayed. In Group Mem-
bership Report or Group Membership Reduction messages, this field is
initialized to zero by the sender and ignored by the receiver.
The Unused field is unused and must be initialized to zero by the
sender and ignored by the receiver.
ICMPv6 93
Figure 5-8
Router Solicitation
message format
94 Chapter Five
Figure 5-9
Router Advertisement
message format
■ The option that specifies the layer 2 (link layer) address of the
source node, if known (see Section 5.5.10).
■ The option that specifies the link MTU (see Section 5.5.13).
56982_CH05II 12/12/97 4:27 PM Page 95
ICMPv6 95
■ The Prefix Information option that specifies prefixes to be used for
the address autoconfiguration (see Section 5.5.11). A router should
include all its on-link prefixes (except the link local prefix) so that
multihomed hosts will correctly autoconfigure themselves.
Figure 5-10
Format of the Neigh-
bor Solicitation mes-
sage
56982_CH05II 12/12/97 4:27 PM Page 96
96 Chapter Five
ICMPv6 97
Figure 5-11
Format of the Neigh-
bor Advertisement
message
Figure 5-12
Format of the Redi-
rect message
Destination Address field to the same value). The format of the Redirect
message is illustrated in Figure 5-12.
The IPv6 source address field is equal to the link local address of the
interface from which the message is sent, and the destination address
is equal to the source address of the packet that caused the Redirect
message.
The Hop Limit field of the IPv6 header is set equal to 255 (see Section
5.5.4).
The Priority field of the IPv6 header is set equal to 15.
The Type field is equal to 137.
The Code field is equal to zero.
The Reserved field is unused; it must be initialized to zero by the sender
and ignored by the receiver.
56982_CH05II 12/12/97 4:27 PM Page 98
98 Chapter Five
The 128-bit Target Address field contains, for solicited messages, the
address of the node that solicited the response. When the Target Address
is the endpoint of a communication—that is, the destination is a
neighbor—the Target Address field must contain the same value as the
Destination Address field. Otherwise, the Target Address is the link local
address of a better first hop router toward the destination.
The 128-bit Destination Address contains the IPv6 address of the des-
tination that is redirected to the Target Address.
In the Options field, the following options can appear:
■ The option containing the link layer address of the Target Address,
if known (see Section 5.5.10).
■ The Redirect header—that is, the option containing the initial part
of the packet that caused the Redirect message, truncated so that
the ICMP packet doesn’t exceed 576 octets (see Section 5.5.12).
ICMPv6 99
Figure 5-13
Options format
3 Prefix Information
4 Redirect Header
5 MTU
Figure 5-14
Format of Source /
Target Link Layer
Address option
The Source Link Layer Address option contains the link layer address
of the sender of the packet. This option is used in Router Solicitation,
Router Advertisement, and Neighbor Solicitation messages.
The Target Link Layer Address contains the link layer address of the
target. This option is used in Neighbor Advertisement and Redirect mes-
sages.
Figure 5-15
Format of the Prefix
Information option
ICMPv6 101
Figure 5-16
Format of the Redi-
rect Header option
Figure 5-17
Format of the MTU
option
REFERENCES
1
A. Conta, S. Deering, RFC 1885: Internet Control Message Protocol
(ICMPv6), December 1995.
2
S. Deering, R. Hinden, RFC 1883: Internet Protocol, Version 6 (IPv6)
Specification, December 1995.
3
J. Postel, RFC 792: Internet Control Message Protocol, September 1981.
4
S.E. Deering, RFC 1112: Host extensions for IP multicasting, August
1989.
5
D.C. Plummer, RFC 826: Ethernet Address Resolution Protocol: On con-
verting network protocol addresses to 48 bit Ethernet address for
transmission on Ethernet hardware, November 1982.
6
T. Narten, E. Nordmark, W. Simpson, RFC 1970: Neighbor Discovery for
IP Version 6 (IPv6), August 1996.
56982_CH05II 12/12/97 4:27 PM Page 102