IPv6 SLAAC & DHCPv6
Two ways an IPv6 host gets an address. SLAAC has hosts auto-generate from a router-advertised prefix. DHCPv6 mirrors IPv4 DHCP. Covers RA/RS messages, EUI-64, privacy addresses, and stateful vs stateless DHCPv6.
- SLAAC (Stateless Address Autoconfiguration) is IPv6's default: routers advertise a /64 prefix, hosts pick their own 64-bit interface ID.
- DHCPv6 also exists: stateless (just hands out DNS / domain info) or stateful (hands out the full address, like IPv4 DHCP).
- The router controls behavior via flags in its Router Advertisement: M (managed = full DHCPv6) and O (other = stateless DHCPv6 for DNS info only).
Studying for an exam? Get a free study plan from a Cisco NetAcad instructor. 20 minutes, no card.
Mental model
IPv4 hosts get addresses from DHCP almost universally. IPv6 has the same option (DHCPv6), but it also has a built-in alternative: hosts can derive their own address from information broadcast by the local router.
That alternative is SLAAC, Stateless Address Autoconfiguration. The router doesn’t need to track who has which address. It just advertises “the prefix on this link is 2001:db8:1::/64” and hosts handle the rest:
- Host generates a 64-bit interface ID (either EUI-64 from its MAC, or random for privacy).
- Host combines
2001:db8:1::+ interface ID = its full IPv6 address. - Host runs DAD (Duplicate Address Detection) to check no one else has the same address.
- If unique, host starts using it. If duplicate, regenerate.
That’s the entire SLAAC flow. No state on the router, no DHCP server required.
The four message types: Router Advertisement & Solicitation
SLAAC uses ICMPv6 (not a separate protocol):
| Type | Direction | Purpose |
|---|---|---|
| RS (Router Solicitation, type 133) | host → routers (multicast ff02::2) | “Anyone listening? I need an RA now, don’t make me wait.” |
| RA (Router Advertisement, type 134) | router → hosts (multicast ff02::1) | “I’m the router. Here’s the prefix, default gateway info, M/O flags.” |
| NS (Neighbor Solicitation, type 135) | host → multicast | DAD: “Is anyone already using this address?” |
| NA (Neighbor Advertisement, type 136) | host → host | ”Yes I have that address” (DAD reply) |
Routers send RAs unsolicited at regular intervals (default every 200 seconds on Cisco). Hosts that boot in between can multicast an RS to get one immediately.
The M and O flags
The Router Advertisement carries two key flags that tell hosts how to behave:
| M flag | O flag | Meaning |
|---|---|---|
| 0 | 0 | Pure SLAAC: host gets address from prefix only. No DNS info. |
| 0 | 1 | SLAAC + stateless DHCPv6: host gets address from prefix, but asks DHCPv6 for DNS / domain info |
| 1 | 0/1 | Stateful DHCPv6: host asks a DHCPv6 server for its address and DNS. Hosts still build a SLAAC address as well unless the prefix is advertised with no-autoconfig. |
For CCNA: know these flag combinations. M=0 O=1 is the most common “real network” setup: addresses via SLAAC, DNS info via DHCPv6.
EUI-64: the deprecated way to generate interface IDs
The original SLAAC method derives the interface ID from the host’s MAC address:
MAC: 00:11:22:33:44:55
Split: 00:11:22 : 33:44:55
Insert FFFE: 00:11:22:FF:FE:33:44:55
Flip U/L bit: 02:11:22:FF:FE:33:44:55
Final addr: ::0211:22FF:FE33:4455 (combined with /64 prefix)
The first byte’s 7th bit gets flipped. Why? Don’t worry about it for the exam. Just know:
- EUI-64 IDs are derived from the MAC
- They’re stable (same MAC → same interface ID forever)
- That means trackable across networks, which is a privacy concern
- Modern OSes (Windows 10+, macOS, Linux with NetworkManager) generate random interface IDs by default instead: privacy addresses (RFC 8981, which replaced RFC 4941)
Privacy addresses
Because EUI-64 makes you trackable, modern hosts generate a random interface ID:
Prefix: 2001:db8:1::/64
Random suffix: ::abcd:1234:5678:9abc
Full address: 2001:db8:1:0:abcd:1234:5678:9abc
Rotates daily by default. A stable address (RFC 7217 stable-random on modern OSes, EUI-64 on older stacks) still exists for incoming connections; the temporary random one is used for outbound. Hosts may have multiple IPv6 addresses simultaneously. Totally normal.
Stateful DHCPv6: when you need IPv4-like behavior
If you need to track which device got which address (for audit logs, IP-pinning, etc.), SLAAC isn’t enough. DHCPv6 in stateful mode handles this. One caveat: Android has no stateful DHCPv6 client, so keep SLAAC available on networks with Android devices.
Trigger it by setting the M flag = 1 in the router advertisement:
R1(config-if)# ipv6 nd managed-config-flag ! set M flag
R1(config-if)# ipv6 nd other-config-flag ! set O flag (optional)
R1(config-if)# ipv6 nd prefix 2001:db8:10::/64 no-autoconfig ! clear the A flag: no SLAAC address
The M flag alone does not stop SLAAC. The A (autonomous) flag in the prefix option controls that, so clear it with no-autoconfig if you want DHCPv6 addresses only.
Then point hosts at a DHCPv6 server, configured similarly to IPv4 DHCP but with ipv6 keywords.
Commands: typical SLAAC setup
! Enable IPv6 routing globally
R1(config)# ipv6 unicast-routing
! Assign a global address to the LAN interface
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ipv6 address 2001:db8:acad:1::1/64
R1(config-if)# no shutdown
! Configure RA settings (optional: defaults work for pure SLAAC)
R1(config-if)# ipv6 nd ra interval 200 ! RA every 200s (default)
R1(config-if)# ipv6 nd prefix 2001:db8:acad:1::/64 86400 43200 ! valid 86400 s, preferred 43200 s
That’s it. Hosts on the link will pick up 2001:db8:acad:1::xxxx automatically.
Stateless DHCPv6: SLAAC + DNS info
R1(config)# ipv6 unicast-routing
! Enable DHCPv6 server with DNS info only
R1(config)# ipv6 dhcp pool DHCP-STATELESS
R1(config-dhcpv6)# dns-server 2001:4860:4860::8888
R1(config-dhcpv6)# domain-name corp.local
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ipv6 address 2001:db8:acad:1::1/64
R1(config-if)# ipv6 dhcp server DHCP-STATELESS
R1(config-if)# ipv6 nd other-config-flag ! O flag = "use DHCPv6 for DNS"
Verification
R1# show ipv6 interface GigabitEthernet0/0
R1# show ipv6 neighbors
R1# show ipv6 dhcp pool
R1# debug ipv6 nd ! while troubleshooting RAs
On a host: ipconfig /all (Windows) or ip -6 addr (Linux) shows the addresses received.
Common mistakes
Forgetting
ipv6 unicast-routing. Without it, the router accepts an IPv6 address on an interface but won’t route between subnets or send RAs.Configuring a non-/64 prefix. SLAAC requires /64. A /48 or /56 prefix doesn’t work for SLAAC. The exception: /127 for point-to-point links (RFC 6164), but SLAAC isn’t used there anyway.
M and O flag confusion. M=1 tells hosts to get an address from DHCPv6, but it does not turn SLAAC off: if the prefix in the RA still has the A (autonomous) flag set, hosts build a SLAAC address too. To stop SLAAC, use
ipv6 nd prefix <prefix>/64 no-autoconfig. O=1 alongside M=0 means “address via SLAAC, but ask DHCPv6 for DNS.” Mix them up and hosts behave unexpectedly.Expecting the router to learn hosts’ addresses automatically. It doesn’t track stateless SLAAC addresses. To know who’s on the network, you need DHCPv6 logs (stateful only) or scan via NDP.
Filtering RAs at the wrong place. A rogue RA from a misconfigured host can poison all SLAAC clients. RA Guard is the switch-level defense, like DHCP Snooping but for RAs.
Forgetting hosts can have multiple IPv6 addresses. It’s normal. A laptop on a /64 has: link-local (fe80::…), SLAAC EUI-64, SLAAC privacy address, possibly a DHCPv6 address too. Don’t be alarmed.
Lab to try tonight
- Two routers, one PC. Both routers on a shared LAN with a /64.
- Enable
ipv6 unicast-routingon both. Configureipv6 address 2001:db8:1::1/64on R1 and::2/64on R2. - Connect a Windows / Linux PC to the LAN. Set IPv6 to “Automatic.”
- On the PC:
ipconfig /all(orip -6 addr). Observe the global address picked up via SLAAC. - Ping R1’s address from the PC. Verify reachability.
- Run Wireshark on the PC. Reload it. Watch the RS → RA → DAD exchange.
- Enable
ipv6 nd managed-config-flagon R1’s interface and configure a DHCPv6 pool. Restart the PC: it now has a DHCPv6 address and still a SLAAC address. Addipv6 nd prefix <prefix>/64 no-autoconfig, restart again, and only the DHCPv6 address remains.
Cheat strip
| Concept | Plain English |
|---|---|
| SLAAC | Host generates its own IPv6 from a router-advertised /64 prefix |
| RA | Router Advertisement: sent every 200s by default |
| RS | Router Solicitation: host says “I need an RA now” |
| DAD | Duplicate Address Detection: host checks no one else has the addr |
| EUI-64 | Old way to generate interface ID from MAC (privacy issue) |
| Privacy addresses | RFC 8981 (was 4941): random interface ID, rotates daily |
| M flag | ”Managed”: get address from DHCPv6 |
| O flag | ”Other”: get DNS info from DHCPv6 |
| RA Guard | Switch-level defense against rogue Router Advertisements |
| /64 | Required prefix length for SLAAC |
FAQ
What is SLAAC?
SLAAC (stateless address autoconfiguration) lets an IPv6 host build its own address without a DHCP server. The router advertises the /64 prefix in Router Advertisements, and the host adds its own 64-bit interface ID (from EUI-64 or, on most modern systems, a random value), then checks the address is unique with Duplicate Address Detection.
What is the difference between SLAAC and DHCPv6?
With SLAAC the host builds its own address from the prefix in the Router Advertisement, and no server keeps track of it. With stateful DHCPv6 a server assigns the address and records which host has it. Stateless DHCPv6 is a mix: the host uses SLAAC for its address and asks DHCPv6 only for extra information such as DNS servers.
Can SLAAC give hosts a DNS server?
Yes. Router Advertisements can carry DNS servers in the RDNSS option (RFC 8106). Modern Windows, macOS, Linux, iOS and Android hosts read it. Without RDNSS, use stateless DHCPv6 (O flag set) for DNS.
Cisco IOS File System
Where Cisco IOS stores configs, images and logs (flash:, nvram:, system:, tftp:), plus copy syntax, image management, boot variables and file commands.
OSPF Multi-Area
Why a single OSPF area stops working past ~50 routers, and how multi-area design fixes it. Covers ABRs, ASBRs, area 0 backbone rules, LSA types, and the area design decisions that scale OSPF to thousands of routers.
Want this drilled into reflex?
1:1 weekly sessions, live feedback on your labs, and US interview prep: built around the CCNA® exam blueprint. Free first session. No card on file until you decide.
Related topics
ARP: Address Resolution Protocol
How a host turns an IP address into the MAC address it needs to actually deliver a frame. Broadcast question, unicast answer, cached for hours. Also covers Gratuitous ARP, Proxy ARP, and the ARP spoofing attack.
IP ServicesDHCP: Dynamic Host Configuration Protocol
CCNA DHCP guide: the DORA exchange, packet anatomy, DHCP options, T1/T2 lease renewal, Cisco IOS server and relay config, DHCP Snooping and 8 scenarios.
Network FundamentalsIPv6 Address Types: Unicast, Anycast, Multicast, and EUI-64
The three IPv6 delivery modes: unicast (one-to-one), anycast (one-to-nearest) and multicast (one-to-many), plus how EUI-64 builds a host ID from a MAC.
Stuck on IPv6 SLAAC & DHCPv6?
Walk your plan with a Cisco NetAcad instructor in a free 20 minute call. We find the one thing blocking you and name the next step. No card. No pitch.
- 20 minutes, 1:1 with a Cisco NetAcad instructor
- No card, no obligation, no sales pitch
- You pick the slot that fits your week
Get your study plan in a free 20-minute call
- ✓ 1:1 with a senior network engineer, by video
- ✓ You leave with a written study plan and a realistic exam date
- ✓ No card, no sign-up, no sales pitch
