IPv6 Neighbor Discovery Protocol (NDP) is a key protocol in IPv6 networks used for enabling communication between devices on the network. In this lesson, we will cover how NDP works, focusing on its key message types—Router Solicitation, Router Advertisement, Neighbor Solicitation, and Neighbor Advertisement—along with its critical functions like router and prefix discovery, address resolution, Duplicate Address Detection (DAD), and Neighbor Unreachability Detection (NUD).
Table of Contents
NDP Fundamental
NDP Messages and their Applications
Neighbor Discovery (ND) messages are essential for the operation of IPv6 networks, as they handle fundamental tasks necessary for communication. Without these messages, critical network functions would not be possible.
In this section, we will provide an overview of Neighbor Discovery Protocol (NDP) messages. While we have already touched on certain properties of NDP packets, such as Router Advertisements, we will explore the details of each NDP message type more thoroughly in the upcoming lessons.
Let’s begin by discussing the various NDP (Neighbor Discovery Protocol) messages based on the applications they provide for IPv6 networks.
In the previous lesson, we introduced SLAAC (Stateless Address Autoconfiguration), a key IPv6 feature that enables devices to dynamically obtain an IP address. This process relies on Router Solicitation (RS) and Router Advertisement (RA) messages for “router and prefix discovery” prerequisites for SLAAC.
Even when devices obtain their IPv6 addresses via DHCPv6, RS and RA messages remain important. These messages not only define how a client should obtain its address but also provide the default gateway, which is learned always through Router Advertisements.
There are additional applications of Router Solicitation and Router Advertisement, such as MTU configuration, off-link determination, and gateway priority, which we will discuss in upcoming lessons.
Address resolution, another crucial function, is the process of finding the MAC address of a device using its IP address. While IPv4 uses ARP for this, IPv6 relies on Neighbor Solicitation (NS) and Neighbor Advertisement (NA) messages to perform the same task.
Once a device obtains an IP address, it must ensure the address is unique. This is done through Duplicate Address Detection (DAD), which uses NS and NA messages in IPv6. In IPv4, this is handled by sending ARP requests to detect any address conflicts.
Finally, Neighbor Unreachability Detection (NUD), another key application of NS and NA, ensures that neighboring devices remain reachable. If a neighbor becomes unreachable, NUD allows routers or hosts to update their routing tables accordingly. Without NUD, a device could waste resources by continuing to send packets to unreachable neighbors, leading to inefficient use of bandwidth and processing power.
NDP over ICMPv6
Another important point to note about NDP messages is that they are carried over ICMPv6. In other words, they are new ICMP messages with no direct equivalent in IPv4.
Source IP (Link-Local / GUA/ULA)
Destination IP (Multicast/Unicast)
ICMPv6 Type (e.g., 133, 134)
Code (Specific to NDP messages)
Router Solicitation / Advertisement
Neighbor Solicitation / Advertisement
Specifically, Router Solicitation and Router Advertisement are ICMPv6 messages with type 133 and 134, respectively. Neighbor Solicitation and Neighbor Advertisement are ICMPv6 messages with type 135 and 136, respectively.
| NDP Message | ICMPv6 Type | |----------------------------------|-------------| | Router Solicitation | 133 | | Router Advertisement | 134 | | Neighbor Solicitation | 135 | | Neighbor Advertisement | 136 |
Overview of NDP messages
Let’s have a brief overview of each of these NDP messages
NDP Messages | ICMPv6 Type | Source IP | Destination IP | Important Data |
---|---|---|---|---|
Router Solicitation (RS) | 133 | Link-local IPv6 address of sender | FF02::2 (All Routers Multicast) | Source Link Layer Address |
Router Advertisement (RA) | 134 | Link-local IPv6 address of router | FF02::1 (All Nodes Multicast) |
Prefix and Prefix Length Information. Default Gateway, Dynamic Addressing Flags, MTU, On-link Prefixes, Gateway Priority |
Neighbor Solicitation (NS) | 135 | GUA/ULA (Global or Unique Local Address) | Solicited-node multicast address | Target Address |
Neighbor Advertisement (NA) | 136 | GUA/ULA (Global or Unique Local Address) | GUA/ULA (Global or Unique Local Address) | Target Address and Target Link Layer Address |
Router Solicitation
Router Solicitation (RS) is used by IPv6-enabled devices to actively request configuration information from routers on the network. When a device joins a network, it sends an RS message containing its link-layer (MAC) source address to the multicast address FF02::2 (all routers) to prompt nearby routers to respond with a Router Advertisement (RA).
Router Advertisment
Router Advertisement (RA) is an ICMPv6 message sent by routers either periodically every 200 seconds or in response to a Router Solicitation. It announces the router’s presence and provides essential network configuration information to IPv6-enabled devices on the local network.
When a device receives an RA message, it obtains critical details such as the network prefix, default gateway, and various flags indicating whether the IPv6 address should be obtained through Stateless Address Autoconfiguration (SLAAC) or the DHCPv6 protocol. The RA message assists devices in configuring their IPv6 addresses and establishing connectivity within the network.
To change the interval for sending Router Advertisement messages or to disable them on an interface in Cisco IOS routers, you can use the following commands:
(config-if)# ipv6 nd ra interval <seconds>
(config-if)# ipv6 nd ra suppress
Neighbor Solicitation
Neighbor Solicitation (NS) is used by IPv6-enabled devices to discover the link-layer (MAC) addresses of neighboring devices or to determine whether a neighbor is reachable. When a device needs to send data to another device on the same local network but only knows the destination’s IPv6 address, it sends an NS message to the multicast address corresponding to the solicited node address of the target. This message prompts the target device to respond with its link-layer address. NS messages are also employed for Duplicate Address Detection (DAD) to ensure that a newly assigned IPv6 address is unique on the network.
Neighbor Advertisement
Neighbor Advertisement (NA) is an ICMPv6 message sent by an IPv6-enabled device in response to a Neighbor Solicitation (NS) message. It provides the link-layer (MAC) address of the responding device, allowing the original requester to resolve the IPv6 address to its corresponding MAC address. NA messages are vital for address resolution in IPv6 networks. Additionally, they can inform neighboring devices of changes in the link-layer address or status, or convey information about the reachability of the sender.