What is the difference between stateful and stateless DHCPv6?
Show the answer
Say this first
Stateful DHCPv6 assigns addresses and keeps a binding for each client, like DHCP in IPv4. Stateless DHCPv6
hands out only settings such as DNS servers and domain name, while the host builds its address with SLAAC,
so the server keeps no per-client state. Both use UDP ports 546 (client) and 547 (server), and clients send
to ff02::1:2. Neither gives a default gateway; that always comes from the RA.
Go deeper
Message flow
| Mode | Exchange | RA flags |
|---|---|---|
| Stateful | Solicit, Advertise, Request, Reply (Solicit and Reply with Rapid Commit) | M=1, often A=0 |
| Stateless | Information-Request, Reply | M=0, O=1, A=1 |
Identity
Clients identify themselves with a DUID (DHCP Unique Identifier) and an IAID per interface, not with a MAC. That makes MAC-based reservations awkward. RFC 6939 lets the first relay add the client's link-layer address for this reason.
Stateful on IOS
ipv6 dhcp pool LAN20
address prefix 2001:db8:acad:20::/64
dns-server 2001:db8:acad:100::53
domain-name corp.example.com
!
interface GigabitEthernet0/0/1
ipv6 address 2001:db8:acad:20::1/64
ipv6 nd managed-config-flag
ipv6 nd prefix default no-autoconfig
ipv6 dhcp server LAN20Stateless on IOS
ipv6 dhcp pool LAN10-INFO
dns-server 2001:db8:acad:100::53
domain-name corp.example.com
!
interface GigabitEthernet0/0/0
ipv6 address 2001:db8:acad:10::1/64
ipv6 nd other-config-flag
ipv6 dhcp server LAN10-INFOChoosing
Stateful gives you a lease table for audits and IPAM, but Android will not use it. Stateless with SLAAC works on every client; you then map addresses to devices from NDP tables or switch device tracking.
They will ask next
What is Rapid Commit?
A two-message exchange, Solicit then Reply, instead of four. The client asks for it with the Rapid Commit option and the server agrees by including it in the Reply. Fine when there is one server.
Which multicast address do DHCPv6 relays use toward servers?
Relays usually unicast to configured server addresses.
ff05::1:3(all DHCPv6 servers, site scope) exists for relays that multicast.
Traps
- Saying DHCPv6 uses broadcast. It uses
ff02::1:2. - Thinking stateless DHCPv6 means no server is needed. It still needs one, just without bindings.