The TCP/IP Guide - Version 3.0 (Contents) ` 692 _ © 2001-2005 Charles M. Kozierok. All Rights Reserved.
In IPv6, the ND protocol is responsible for address resolution. When a host wants to get the
layer two address of a datagram destination it sends a Neighbor Solicitation ICMPv6
message containing the IP address of the device whose layer two address it wishes to
determine. That device responds back with a Neighbor Advertisement message that
contains its layer two address. Instead of using a broadcast that would disrupt each device
on the local network, the solicitation is sent using a special multicast to the destination
device's solicited-node address. A more complete description of address resolution in IPv6
can be found in the general section on address resolution.
Note also that even though this discussion does concentrate on communication between
hosts, address resolution may also be done when a host needs to send a datagram to a
local router and has no entry for it in its destination cache. In the context of address
resolution, a destination device is “just a neighbor”. Whether it is a host or a router only
matters in terms of what happens after the datagram has been sent and received. In other
words, these “host-to-host” functions are so named only because they are not specific to
the communication between hosts and routers like the tasks in the preceding topic.
Updating Neighbors Using Neighbor Advertisement Messages
Devices do not routinely send Neighbor Advertisements the way routers send Router
Advertisements. There really isn't any need for this: neighbors don't change much over
time, and resolution will occur naturally over time as devices send datagrams to each other.
In addition, having advertisements sent regularly by so many devices on a network would
be wasteful.
A host may, however, send an unsolicited Neighbor Advertisement under certain conditions
where it feels it is necessary to immediately provide updated information to other neighbors
on the local network. A good example of this is a hardware failure—in particular, the failure
of a network interface card. When the card is replaced, the device's layer two (MAC)
address will change. Assuming this can be detected by the device's IP layer, it can send out
an unsolicited Neighbor Advertisement message to tell other devices to update their
resolution caches with the new MAC address.
Neighbor Unreachability Detection and the Neighbor Cache
Neighbor Solicitation and Neighbor Advertisement messages are most often associated
with address resolution, but also have other purposes. One of these is Neighbor Unreach-
ability Detection. Each device maintains information about each of its neighbors and
updates it dynamically as network conditions change. The information is kept for both host
and router devices that are neighbors on the local network.
Knowing that a device has become unreachable is important because a host can adapt its
behavior accordingly. In the case of an unreachable host, a device may wait a certain
period of time before trying to send datagrams to an unreachable host instead of flooding
the network with repeated attempts to send to the host. An unreachable router, on the other
hand, is a signal that the device needs to find a new router to use, if an alternate is
available.