IPv6 Neighbour Discovery, SLAAC and DHCPv6: how IPv6 hosts get addresses
In short: IPv6 hosts use the Neighbour Discovery Protocol, built on ICMPv6, to find routers, resolve neighbours' MAC addresses and check for duplicate addresses. Routers advertise the prefix, and hosts can build their own addresses with SLAAC, use DHCPv6, or both, depending on flags in the router advertisement.
Neighbour Discovery replaces ARP
IPv6 has no ARP and no broadcast. Instead the Neighbour Discovery Protocol (NDP) uses five ICMPv6 messages sent to multicast addresses. This is one reason you must never block ICMPv6 wholesale on an IPv6 network: basic connectivity depends on it.
| Message | ICMPv6 type | Purpose |
|---|---|---|
| Router Solicitation (RS) | 133 | A host asks: are there any routers here? |
| Router Advertisement (RA) | 134 | A router announces itself, the prefix, and how hosts should get addresses |
| Neighbour Solicitation (NS) | 135 | What is the MAC for this IPv6 address? Also used for duplicate address detection |
| Neighbour Advertisement (NA) | 136 | The answer to an NS, or an unsolicited update |
| Redirect | 137 | A router tells a host about a better first hop |
To avoid disturbing every host, an NS goes to the target's solicited-node multicast address: ff02::1:ff followed by the last 24 bits of the target address. For 2001:db8::a1:b2c3 that is ff02::1:ffa1:b2c3. Only hosts whose addresses end the same way listen to it, so the "who has" question reaches almost nobody else.
SLAAC step by step
- The host creates a link-local address in
fe80::/10as soon as the interface comes up. It works on the local link only and is what routing protocols use as next hops. - Duplicate address detection (DAD): it sends an NS for its own address. If nobody answers, the address is unique.
- It sends an RS to
ff02::2(all routers). Routers also send RAs periodically toff02::1(all nodes). - The RA carries the /64 prefix, the router's link-local address as default gateway, and flags.
- The host adds an interface ID to the prefix. Modern systems use random, privacy-friendly IDs rather than the older EUI-64 method based on the MAC.
SLAAC, stateless DHCPv6 or stateful DHCPv6
Two RA flags tell hosts what to do: M (managed) means "get your address from DHCPv6", and O (other) means "get other settings, such as DNS servers, from DHCPv6".
| Method | Flags | Address from | DNS from |
|---|---|---|---|
| SLAAC only | M=0, O=0 | Host builds it | RA (RDNSS option) |
| Stateless DHCPv6 | M=0, O=1 | Host builds it | DHCPv6 |
| Stateful DHCPv6 | M=1 | DHCPv6 server | DHCPv6 |
Note that even with DHCPv6, hosts learn their default gateway from the RA, never from DHCPv6. Also, Android devices do not support stateful DHCPv6, so mixed networks usually keep SLAAC on.
interface GigabitEthernet0/1
ipv6 address 2001:db8:10::1/64
ipv6 nd other-config-flag
ipv6 dhcp server CLIENT-DNS
show ipv6 neighbors
show ipv6 interface GigabitEthernet0/1
Securing NDP
Like ARP, NDP trusts what it hears. A rogue device can send fake RAs and become everyone's default gateway, and forged NAs can poison neighbour caches. Access switches defend against this with RA Guard (only permit RAs from router-facing ports), DHCPv6 Guard and IPv6 snooping or source guard.
Real-world example: a school network that had never "turned on" IPv6 found laptops sending traffic to a student's PC. Windows Internet Connection Sharing on that PC was sending router advertisements, and every client accepted them. Enabling RA Guard on access ports stopped it, and the team then planned a proper IPv6 rollout.
Common mistakes: blocking all ICMPv6 on a host or internal firewall, which breaks neighbour and router discovery; forgetting that a /64 prefix is needed for SLAAC to work, so longer prefixes on user VLANs leave hosts without addresses; and assuming a network with no IPv6 plan is safe from IPv6 traffic. Most operating systems enable IPv6 by default, so monitor and protect it even before you deploy it.
Practice
Which NDP message tells hosts the network prefix?
An RA has M=0 and O=1. How does the host get its address and DNS server?
What is the solicited-node multicast address for 2001:db8::1:2:3456?
Key takeaways
- NDP uses ICMPv6 messages (RS, RA, NS, NA, Redirect) in place of ARP and broadcasts.
- SLAAC: link-local address, DAD, then a global address from the advertised /64.
- The M and O flags choose between SLAAC, stateless DHCPv6 and stateful DHCPv6.
- Hosts always learn the default gateway from router advertisements.
- Protect access ports with RA Guard and DHCPv6 Guard.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.