Neighbor discovery (ND) corresponds to a combination of the IPv4
protocols ARP, ICMP Router Discovery, and ICMP Redirect. Nodes (hosts
and routers) use ND to determine the link-layer addresses for neighbors
that are known to reside on attached links and to quickly purge cached
values that become invalid. Hosts also use ND to find neighboring
routers that are able to forward packets on their behalf. ND also
defines a Neighbor Unreachability Detection algorithm. IPv4 does
not contain a generally agreed upon protocol for performing Neighbor
Unreachability Detection, although Dead Gateway Detection does address
a subset of the problems that Neighbor Unreachability Detection solves.
Neighbor Discovery is used to do the following tasks:
- Obtain configuration information that includes:
- Router Discovery
- Defines how hosts can automatically locate routers that reside
on an attached link.
- Prefix Discovery
- Specifies how hosts discover the following sets of prefixes:
- Prefixes that are defined as being on-link (IPv6 address prefixes
that reside on the shared link, such as an Ethernet link)
- Prefixes that are defined as being off-link (IPv6 address prefixes
that can be reached by using an adjacent router)
- Prefixes that are to be used for Stateless Address
Autoconfiguration
- Parameter Discovery
- Allows a host to learn link parameters, such as the link MTU,
and IP parameters, such as the hop limit to place in outgoing packets.
- Perform address resolution. Address resolution allows a node
to determine the link-layer address of an on-link destination given
the destination IP address.
- Dynamically learn routes which can be used in next-hop determination.
This specifies the algorithm for mapping the IP destination address
into the IP address of the neighbor to which traffic is to be sent.
The next-hop can be either a router or the destination itself. Next-hop
determination uses the on-link prefixes learned as part of Prefix
Discovery to determine when the next hop is the destination itself.
- Determine when a neighbor is no longer reachable using Neighbor
Unreachability Detection.
- Process Redirect messages.
Routers use Redirect messages to notify a node that a better next-hop
node is to be used when forwarding packets to a particular destination.
The new next-hop could be the actual destination, if the destination
is on-link, or a different router, if the destination is off-link.