Neighbor Discovery Protocol(NDP) for IPV6 defined in RFC 2461, NDP packet is identified with the NDP message format,
NDP is the key protocol in IPv6 to perform the following,
NDP is the key protocol in IPv6 to perform the following,
- Replacement of ARP
- Stateless Autoconfiguration
- Prefix Advertisement
- Duplicate Address Detection
- Prefix Renumbering
- Router Redirection
- Router Solicitation(RS) - (icmpv6 type 133)
- Router Advertisement(RA) - (icmpv6 type 134)
- Neighbor Solicitation(NS) - (icmpv6 type 135)
- Neighbor Advertisement(NA) - (icmpv6 type 136)
- Redirect Messages - (icmpv6 type 137)
In IPv4 host uses ARP to find the neighbor node's link-layer address and the information is saved in its arp-cache, where as in IPv6 to determine the neighbor node's link-layer address it uses the NS and NA messages.
Let us have the below example to understand how the NS and NA works, here in the below example Node-a needs to send packets to Node-b with corresponding Site Local Addresses. However, Node-a does not have the Node-b's Link Layer Address, in order to learn the link-layer address of Node-b to forward the packets, Node-a first sends the NS Message(icmp type 135), the NS message is sent to the solicited-node multicast address, the solicited-node multicast address format has fixed 104 bits "FF02::1:FFxx:xxxx" the rest 24 bits are taken from the nodes corresponding target address, here the NS message is sent to solicited-node multicast address FF02::1::FF01:B with a source link-layer address(the mac-address of Node-a) and the destination link-layer address of Node-b which is 33:33:FF:01:00:0B(derived from the solicited-node multicast address) as the data of CMPv6 message.
Node-a(FEC0::1:A) --------------------------- Node-b(FEC0::1:B)
00:51:4e:3c:44:aa 00:51:4e:3c:44:aa
Node-b interprets the above NS message from Node-a and replies with a NA message to Node-a with its own site-local address as source address and Node-a's site-local address as the destination address, it also includes its own link-layer address in the icmpv6 message. Hence, both the ipv6 neighbors learn the link-layer addresses of each other using NS and NA messages. The learned link-layer address is stored in the ND cache of every node.
If any of the node's link-layer address is changed, it has to inform the neighbors listening to solicited-node multicast neighbors with a NA packet destined to FF02::1.
In a router we can check the ipv6 neighbors using the following cli, the show command is same on both Cisco and Juniper routers,
Router# show ipv6 neighbors
Once the link-layer address resolution is complete the entry is stored in the ND cache of the node and the router, to clear this entry use "clear ipv6 neighbors" command this will re-initiate the neighbor discovery process.
I feel the above explanation helped you in understanding the basics of the ipv6 ND and how it replaces the ARP process in the IPv4 with use of icmpv6 NS and NA messages.
Let us have the below example to understand how the NS and NA works, here in the below example Node-a needs to send packets to Node-b with corresponding Site Local Addresses. However, Node-a does not have the Node-b's Link Layer Address, in order to learn the link-layer address of Node-b to forward the packets, Node-a first sends the NS Message(icmp type 135), the NS message is sent to the solicited-node multicast address, the solicited-node multicast address format has fixed 104 bits "FF02::1:FFxx:xxxx" the rest 24 bits are taken from the nodes corresponding target address, here the NS message is sent to solicited-node multicast address FF02::1::FF01:B with a source link-layer address(the mac-address of Node-a) and the destination link-layer address of Node-b which is 33:33:FF:01:00:0B(derived from the solicited-node multicast address) as the data of CMPv6 message.
Node-a(FEC0::1:A) --------------------------- Node-b(FEC0::1:B)
00:51:4e:3c:44:aa 00:51:4e:3c:44:aa
Node-b interprets the above NS message from Node-a and replies with a NA message to Node-a with its own site-local address as source address and Node-a's site-local address as the destination address, it also includes its own link-layer address in the icmpv6 message. Hence, both the ipv6 neighbors learn the link-layer addresses of each other using NS and NA messages. The learned link-layer address is stored in the ND cache of every node.
If any of the node's link-layer address is changed, it has to inform the neighbors listening to solicited-node multicast neighbors with a NA packet destined to FF02::1.
In a router we can check the ipv6 neighbors using the following cli, the show command is same on both Cisco and Juniper routers,
Router# show ipv6 neighbors
IPv6 Address Linklayer Address State Exp Rtr Interfacefe80::2a0:c9ff:fe5b:4c1e 00:a0:c9:5b:4c:1e reachable 15 yes fxp0.0 Once the link-layer address resolution is complete the entry is stored in the ND cache of the node and the router, to clear this entry use "clear ipv6 neighbors" command this will re-initiate the neighbor discovery process.
I feel the above explanation helped you in understanding the basics of the ipv6 ND and how it replaces the ARP process in the IPv4 with use of icmpv6 NS and NA messages.
How will the node-A will come to know the Solicited-node Multicast address of the Target?
ReplyDeleteThe DAD is the first process that happens once the ipv6 node boots up,during the DAD process the NS followed by NA happens. During this time the NS message has the destination address as its own solicited-node multicast address, for this there will be a reply from the neighbor ipv6 node with a NA message which contains its own source link-local address.
ReplyDeleteOnce the DAD process is completed next comes the link-layer resolution process where the node-a is already aware of the destination link-local address, from which it computes the destination solicited-node multicast address, this process is also called as "Glean".