Free tech learning for everyone, from basics to pro

Network FundamentalsNetworking SecurityIntermediate

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.

MessageICMPv6 typePurpose
Router Solicitation (RS)133A host asks: are there any routers here?
Router Advertisement (RA)134A router announces itself, the prefix, and how hosts should get addresses
Neighbour Solicitation (NS)135What is the MAC for this IPv6 address? Also used for duplicate address detection
Neighbour Advertisement (NA)136The answer to an NS, or an unsolicited update
Redirect137A 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

SLAAC address set-upLink-localfe80:: addressDADis it unique?RoutersolicitICMPv6 133Router advertprefix, flagsGlobaladdressprefix + ID
Figure 1. How an IPv6 host configures itself with SLAAC: it builds a link-local address, checks it is unique, asks for router advertisements and forms a global address from the advertised prefix.
  1. The host creates a link-local address in fe80::/10 as soon as the interface comes up. It works on the local link only and is what routing protocols use as next hops.
  2. Duplicate address detection (DAD): it sends an NS for its own address. If nobody answers, the address is unique.
  3. It sends an RS to ff02::2 (all routers). Routers also send RAs periodically to ff02::1 (all nodes).
  4. The RA carries the /64 prefix, the router's link-local address as default gateway, and flags.
  5. 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".

MethodFlagsAddress fromDNS from
SLAAC onlyM=0, O=0Host builds itRA (RDNSS option)
Stateless DHCPv6M=0, O=1Host builds itDHCPv6
Stateful DHCPv6M=1DHCPv6 serverDHCPv6

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?
The Router Advertisement (ICMPv6 type 134).
An RA has M=0 and O=1. How does the host get its address and DNS server?
It builds its address with SLAAC and gets DNS (and other options) from a stateless DHCPv6 server.
What is the solicited-node multicast address for 2001:db8::1:2:3456?
ff02::1:ff02:3456, made from the last 24 bits (02: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.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

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.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.