Monday, February 7, 2011

Neighbor Discovery Protocol for IPV6 replaces ARP.

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,
  • Replacement of ARP
  • Stateless Autoconfiguration
    • Prefix Advertisement
    • Duplicate Address Detection
    • Prefix Renumbering
  • Router Redirection
NDP uses ICMPv6 messages mentioned below to accomplish the Neighbor Discovery,

  • 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)
NDP in IPv6 replaces the ARP:

       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

IPv6 Address                 Linklayer Address  State       Exp  Rtr  Interface
fe80::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.

Multipurpose ICMP V6 for IPv6 protocol

Internet Control Message Protocol for IPv6(ICMPv6) compared to ICMPv4 has multiple purposes with additional messages for reporting the source nodes about the packet delivery.

The ICMPv6 header contains the type, code, checksum and data(usually not used) part.





The ICMPv6 messages provide various functionalities to IPv6 protocol that includes,
  • Replacement of ARP
  • Stateless Autoconfiguration
  • Duplicate Address Detection(DAD)
  • Path MTU Discovery
  • Prefix Renumbering

Path MTU discovery:


The IPV6 packet is not fragmented in the intermediate routers, the fragmentation can happen in the source itself, to have a seamless IPv6 packet transfer without fragmentation we need to find the size of the MTU bottleneck and send packets with minimum MTU.

IPv6 uses ICMPv6 type 2(packet too big) for its operation. Let us consider the client(X) needs to communicate with the server(Y) where there are 3 routers Ra, Rb, Rc to hop.

X ---------Ra---------Rb---------Rc---------- Y

Usually the packet from the client(X) is sent with a MTU of 1500bytes, if Ra has MTU of 1400 bytes, it sends back ICMPv6 message with type2 to inform the packet is too big and use the MTU of 1400. Above said is continued till Rc and then the PMTU discovery is successful.

If the network is small size, it is advisable to use the same MTU size on all the router to avoid the IPv6 packet using the minimum MTU size and the time involved in this discovery could be avoided. 


"Cisco Self-Study: Implementing Cisco IPv6 Networks (IPV6)" This book is highly useful in understanding the concepts, I would recommend this for the people who already have basic knowledge about IPV6.