Octet

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

ModeExchangeRA flags
StatefulSolicit, Advertise, Request, Reply (Solicit and Reply with Rapid Commit)M=1, often A=0
StatelessInformation-Request, ReplyM=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

Cisco 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 LAN20

Stateless on IOS

Cisco 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-INFO

Choosing

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.

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.
How did you do?Book 4.2 IP Version 6Book 3.3 Internet (IP)