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).
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 everything (address + DNS). Like IPv4. |
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 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. The original EUI-64 address still exists for incoming connections; the 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 — and is the only option for some Windows scenarios that don’t fully support SLAAC.
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)
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 valid-lifetime 86400 preferred-lifetime 43200
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 means “address via DHCPv6” (turn off SLAAC). 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. Configure a DHCPv6 pool. Restart the PC. Verify it now gets its address from DHCPv6.
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 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 |
Cisco IOS File System
Where Cisco IOS stores configs, images, and logs — flash:, nvram:, system:, tftp:. Covers copy syntax, image management, boot variables, and the file-system commands you actually use day-to-day.
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
Definitive CCNA-level DHCP guide — the DORA exchange step-by-step, packet anatomy, DHCP options table, lease renewal timing (T1/T2), Cisco IOS server + relay config, DHCPv6 brief, DHCP Snooping security, 8 worked scenarios, and the DHCP debug workflow.
Network FundamentalsIPv6 Address Types: Unicast, Anycast, Multicast, and EUI-64
The three modes IPv6 uses to move packets — one-to-one (unicast), one-to-nearest (anycast), one-to-many (multicast) — plus the EUI-64 trick that generates a host portion from a MAC address.
Get the free CCNA 12-week roadmap
You're already reading up on IPv6 SLAAC & DHCPv6. The roadmap is the order I recommend studying every CCNA topic in — with what to lab each week and where IPv6 SLAAC & DHCPv6 fits. A written personal reply, not an autoresponder. Expect it within one business day.
Personal reply from a senior network engineer. No third-party tracking. Unsubscribe any time.
