IPv6 SLAAC vs DHCPv6
How IPv6 hosts actually get an address: Stateless Address Autoconfiguration (SLAAC), stateful DHCPv6, and the stateless DHCPv6 hybrid — and exactly when to use each.
1. Executive Summary & Objective
In IPv4 you had essentially one way to auto-address a host: DHCP. IPv6 gives you three mechanisms, and they are selected not by the host but by flags inside the router’s Router Advertisement (RA). Choosing the wrong combination is the single most common cause of “IPv6 is up but nothing works” tickets.
Objective: By the end of this lesson you will be able to read the M, O, and A flags in an RA, pick between SLAAC, stateless DHCPv6, and stateful DHCPv6 for a given requirement, and configure and verify each on Cisco IOS.
2. Core Concept & Theory (The “Why”)
Every IPv6 host autoconfiguration decision is driven by three bits in the RA the router multicasts to ff02::1:
- A — Autonomous flag (per-prefix): “You may build your own address from this
/64prefix using SLAAC.” - M — Managed flag: “Get your address from a stateful DHCPv6 server.”
- O — Other flag: “Get other configuration (DNS, domain, NTP) from DHCPv6, but not your address.”
These combine into three real-world designs:
| Design | A | M | O | Host address from | DNS from |
|---|---|---|---|---|---|
| Pure SLAAC | 1 | 0 | 0 | Itself (prefix + Interface ID) | RA RDNSS option (RFC 8106) |
| Stateless DHCPv6 | 1 | 0 | 1 | Itself (SLAAC) | DHCPv6 server |
| Stateful DHCPv6 | 0 | 1 | 1 | DHCPv6 server (leased) | DHCPv6 server |
3. Architecture & Topology (Visualizing)
SLAAC: the host builds its own address
With SLAAC the host sends a Router Solicitation (RS), the router replies with an RA carrying the prefix, and the host appends its own Interface ID (EUI-64 or a privacy-random value):
Stateful DHCPv6: a server leases the address
With the M flag set, the host runs the four-message DHCPv6 exchange — the IPv6 analogue of DHCPv4’s DORA:
4. Command Execution & Deployment (The “How”)
A. Pure SLAAC (router just advertises a prefix)
ipv6 unicast-routing
interface GigabitEthernet0/0
ipv6 address 2001:db8:1::1/64
no shutdown
By default an IOS interface with an IPv6 address sends RAs with A=1, M=0, O=0 — i.e. SLAAC is on automatically. You do nothing extra.
B. Stateless DHCPv6 (SLAAC address + DHCPv6 DNS)
ipv6 dhcp pool STATELESS
dns-server 2001:db8:1::53
domain-name gtarsenals.lab
!
interface GigabitEthernet0/0
ipv6 address 2001:db8:1::1/64
ipv6 nd other-config-flag ! sets O=1
ipv6 dhcp server STATELESS
C. Stateful DHCPv6 (server leases the address)
ipv6 dhcp pool STATEFUL
address prefix 2001:db8:1::/64
dns-server 2001:db8:1::53
!
interface GigabitEthernet0/0
ipv6 address 2001:db8:1::1/64
ipv6 nd managed-config-flag ! sets M=1
ipv6 nd prefix default no-autoconfig ! A=0 so hosts don't also SLAAC
ipv6 dhcp server STATEFUL
5. Verification & Troubleshooting
show ipv6 interface GigabitEthernet0/0 ! see which ND flags you're advertising
show ipv6 dhcp binding ! stateful leases (address ↔ DUID)
debug ipv6 nd ! watch RS/RA exchanges live
On the host side:
# Linux
ip -6 addr show # look for 'scope global' addresses and 'mngtmpaddr'
rdisc6 eth0 # decode the RA flags the host is receiving
| Symptom | Likely cause |
|---|---|
Host has a link-local (fe80::) only, no global address |
No RA received, or prefix isn’t a /64, or A=0 with no DHCPv6 |
| Host has an address but no DNS | O/M flag not set, or DHCPv6 pool missing dns-server |
| Host has two global addresses | A=1 and M=1 both active on the prefix |
6. Hands-on Lab
Configure stateless DHCPv6 on an edge interface: SLAAC for the address, DHCPv6 only for DNS.
Lab: Stateless DHCPv6
Enable IPv6 routing, create a DHCPv6 pool that serves DNS, bind it to Gi0/0, and set the O flag so hosts SLAAC their address but learn DNS from DHCPv6.
Objectives
- Enable IPv6 routing globally.
- Create a DHCPv6 pool for 'other' config.
- Advertise a DNS server via DHCPv6.
- Move to the client-facing interface.
- Set the O flag so hosts ask DHCPv6 for DNS.
7. Key Takeaways
- The router’s RA flags (A/M/O), not the host, decide how addressing works.
- SLAAC = host self-assigns from a /64; stateless, no lease record.
- Stateful DHCPv6 (M=1) leases addresses and keeps a binding database.
- Stateless DHCPv6 (A=1, O=1) is the common enterprise sweet spot: SLAAC address + DHCPv6 DNS.
- Never leave both A=1 and M=1 active on the same prefix unless you intend dual addresses.
🧪 Want to practise this on your own computer? See how to set up your lab →