Neighbor Discovery Protocols Introduction
Neighbor Discovery protocol combines Address Resolution Protocol (ARP) and ICMP router discovery and Redirect. With IPv4, we have no means to detect whether or not a neighbor is reachable. With the neighbor discovery protocol, a neighbor unreachability detection mechanism has been defined. Duplicate IP address detection has been implemented, too.
The neighbor discovery protocol consists of five ICMP messages:
1. a pair of Router Solicitation/Router Advertisement messages
2. a pair of Neighbor Solicitation/Neighbor Advertisement messages
3. an ICMP redirect message
Neighbor solicitation and advertisement messages
Neighbor solicitation and advertisement messages enable a node to determine the link-layer address of another node (neighbor) on the same link. (This function is similar to the function provided by the Address Resolution Protocol [ARP] in IPv4.)
For example, node 1 on a link wants to determine the link-layer address of node 2 on the same link. To do so, node 1, the source node, multicasts a neighbor solicitation message.
The neighbor solicitation message, which has a value of 135 in the Type field of the ICMP packet header, contains the following information:
Source address: IPv6 address of node 1 interface that sends the message.Destination address: solicited-node multicast address (FF02:0:0:0:0:1:FF00::/104) that corresponds the IPv6 address of node 2.
Link-layer address of node 1.
A query for the link-layer address of node 2.
After receiving the neighbor solicitation message from node 1, node 2 replies by sending a neighbor advertisement message, which has a value of 136 in the Type field of the ICMP packet header.
The neighbor solicitation message contains the following information:Source address: IPv6 address of the node 2 interface that sends the message.
Destination address: IPv6 address of node 1.
Link-layer address of node 2.
Destination address: IPv6 address of node 1.
Link-layer address of node 2.
1. After node 1 receives the neighbor advertisement message from node 2, nodes 1 and 2 can now exchange packets on the link. (equivalent to ARP resolution in IPv4)
2. After the link-layer address of node 2 is determined, node 1 can send neighbor solicitation messages to node 2 to verify that it is reachable. (Neighbor Reachability)
2. After the link-layer address of node 2 is determined, node 1 can send neighbor solicitation messages to node 2 to verify that it is reachable. (Neighbor Reachability)
Neighbor advertisement –
1. A response to a Neighbor Solicitation message.
2. A node can also send unsolicited neighbor advertisements to announce a link-layer address change.
The received node would then update the link-layer of the node sending NA into it's neighbor
cache.
This can be viewed in "ip -6 neighbor" command output on a linux machine.
cache.
This can be viewed in "ip -6 neighbor" command output on a linux machine.