IPv6 Neighbor Discovery Protocol Explained
This tutorial explains IPv6 neighbor discovery message types and processes. Learn what the neighbor discovery is and how it is used in IPv6 networks.
What is the neighbor discovery?
Neighbor Discovery (ND) is a set of processes and messages. It is defined in RFC4861. It replaces ARP, ICMP Router Discovery, and the ICMP Redirect message used in IPv4. Besides replacing these functions of IPv4, it also provides a lot of additional functionalities that simplify network administration and management.
Functions of Neighbor discovery
Nodes use ND to discover each other's presence on the same link, to determine each other's link-layer addresses, to perform duplicate address detection, to discover routers serving the subnet, to automatically configure the default gateway, to discover the subnet address on which they are connected, and to maintain reachability information about the paths.
Routers use ND to advertise their presence, subnet prefixes, routes, and host configuration parameters. If a better route is available for a specific destination, routers also use this message to inform the host about it.
Neighbor Discovery message types
ND uses five different types of messages to perform all its functions. These messages are Router Advertisement, Router Solicitation, Neighbor Solicitation, Neighbor Advertisement, and Redirect. These messages are defined in RFC2461. Let's understand these messages.
Router advertisement
An IPv6 router uses this message to advertise its presence on the link. This message contains information that the interfaces on the links use to configure themselves. This information includes the router's IP address and link-layer address, whether this router can be used as default gateway router, subnet prefix, link MTU, specific routes, whether a DHCPv6 server is available in the network, whether an interface can configure its address through the address auto-configuration feature, and if yes the duration for which the address will be valid.
If a DHCPv6 server is available, two flags in the router advertisement are used to indicate it. These flags are the managed address configuration flag and the other configuration flag. The M bit and O bit are used to set these flags respectively. The M bit indicates that DHCPv6 services are available for address and configuration settings. The O bit indicates whether the configuration parameters other than the IP address are available through the DHCPv6 service.
Routers send Router Advertisement messages periodically. The interval between advertisements is randomized to reduce synchronization issues when there are multiple advertising routers exist on the link.
The following image shows an example of the router advertisement.
Router Solicitation
A host sends this message to request IPv6 routers on the link to generate Router Advertisements immediately rather than at their next scheduled time. When a router receives a Router Solicitation message, it responds to the message immediately. It sends a Router Advertisement to the sender host. The difference between this advertisement and the advertisements that the router sends periodically is that this advertisement is intended for a specific host only while periodic advertisements are intended for all hosts on the link.
The following image shows an example of the router solicitation.
Neighbor Solicitation
A node mainly uses this message for three purposes; to determine the link-layer address of a neighbor, to check the validity of an already determined address, and to check whether an address created through the address auto-configuration process is unique.
Since in the first purpose, the destination address is not available, the node multicasts the Neighbor Solicitation message. In the remaining two purposes, since the destination address is available, the node unicasts the Neighbor Solicitation message.
Neighbor Advertisement
A node uses this message to respond to a Neighbor Solicitation message. If a node receives a neighbor solicitation message, it sends a neighbor advertisement message back to the sender node. A node also uses this message to announce a link-layer address change. This message contains information required by nodes to determine the type of neighbor advertisement message, the link-layer address of the sender, and the sender's role on the network.
The following image shows an example of the neighbor solicitation and neighbor advertisement.
Redirect message
IPv6 routers use this message to inform an originating host about a better next-hop address for a specific destination. Only routers can send redirect messages for unicast traffic. Redirect messages are processed only by hosts.
The following image shows an example of the redirect message.
Neighbor Discovery processes
The following table summarizes the processes that use the neighbor discovery messages.
Process | What does happen in this process? |
Router discovery | Hosts discover the routers attached on the same link. |
Prefix discovery | Hosts discover the subnet or network prefixes for local link destinations. |
Parameter discovery | Hosts discover additional parameters and configuration settings including the link MTU (Maximum Transmission Unit) and the default hop limit for outgoing packets. |
Address auto-configuration | Interfaces configure their IP addresses either in the presence or absence of a DCHPv6 server. |
Address resolution | Nodes resolve a neighbor's IPv6 address to its link-layer address. |
Next-hop determination | A node determines the device to which a packet is being forwarded, based on the destination address. If the destination address is available in the local link, the next-hop address is the destination address. If the destination address is not available in the local link, the next-hop address is the address of an on-link default router. |
Neighbor unreachability detection | A node determines whether a specific neighbor is still available on the on-link or has moved to a different link. |
Duplicate address detection | A node determines whether an address selected by it for use is not already in use by a neighboring node. |
Redirect function | A router informs a host about a better first-hop address to reach a destination. |
That's all for this tutorial. If you like this tutorial, please share it with friends via your favorite social networking sites and subscribe to our YouTube channel.
0 تعليقات