DHCPv6: Stateful and Stateless Configuration and Prefix Delegation
How DHCPv6 differs from DHCP for IPv4: link-local multicast instead of broadcast, DUIDs and identity associations, the four-message exchange, stateless configuration and prefix delegation, all captured from a Kea DHCPv6 server, with what changed in RFC 9915.
kvi5hnuCode Sprout team member15 min readOn this page
IPv6 hosts can configure themselves without any server (SLAAC, stateless address autoconfiguration, article 32), but some networks still want a server to hand out addresses, and almost every network needs a way to tell hosts about DNS servers. Home routers also need a whole prefix from their ISP (internet service provider), not a single address. DHCPv6 does all three. It does the same job as DHCP for IPv4, but it's a separate protocol with its own messages, ports and identifiers.
DHCPv6 was first standardized in RFC 3315 (2003), consolidated into RFC 8415 in 2018, and revised again in RFC 9915 (January 2026), which is now the Internet Standard (STD 102). This article follows RFC 9915.
How it fits with Router Advertisements
On an IPv6 link, configuration starts with the routers. A router's Router Advertisement (RA) tells hosts the link's prefixes, the default router, and two flags (article 32):
- M (Managed): addresses are available from DHCPv6.
- O (Other configuration): other information, such as DNS servers, is available from DHCPv6.
That splits DHCPv6 into two modes:
- Stateful DHCPv6: the server assigns addresses and keeps track of them, as a DHCPv4 server does. It's used on networks that want central control and logging of addresses, typically in enterprises.
- Stateless DHCPv6: hosts configure their addresses with SLAAC and ask DHCPv6 only for other information. The server keeps no per-client state.
One thing DHCPv6 never provides is the default router. That always comes from RAs. And an address from DHCPv6 is assigned as a /128, a single address with no prefix information: the host learns which prefixes are on-link from RAs, too.
Differences from DHCPv4
| DHCPv4 | DHCPv6 | |
|---|---|---|
| Transport | UDP 68 (client) and 67 (server) | UDP 546 (client) and 547 (server) |
| How clients reach servers | Broadcast to 255.255.255.255 from 0.0.0.0 | Multicast to ff02::1:2 from the client's link-local address |
| Client identity | MAC address (chaddr) or option 61 | A DUID, always |
| Message format | BOOTP fixed fields plus options | A 4-byte header (type and transaction ID) plus options; everything is an option |
| Default router | Option 3 | Not provided (comes from RAs) |
| Addresses per client | One | Many, grouped in identity associations |
| Prefix delegation | No (needs extensions) | Built in (IA_PD) |
Because every IPv6 interface has a link-local address before it has anything else, a DHCPv6 client can send and receive ordinary unicast and multicast from the start. There's no broadcast, and no need for the BOOTP tricks of DHCPv4.
The multicast addresses:
ff02::1:2, All_DHCP_Relay_Agents_and_Servers: link-scoped, used by clients.ff05::1:3, All_DHCP_Servers: site-scoped, used by relay agents to reach all servers in a site.
DUIDs and identity associations
Every DHCPv6 client and server has a DHCP Unique Identifier (DUID), which is meant to stay the same for the device even if its network cards change. There are four types:
| Type | Name | Built from |
|---|---|---|
| 1 | DUID-LLT | Link-layer address plus time (when the DUID was created) |
| 2 | DUID-EN | Enterprise number plus an ID assigned by the vendor |
| 3 | DUID-LL | Link-layer address only |
| 4 | DUID-UUID | A UUID, a 128-bit universally unique identifier (RFC 6355) |
An identity association (IA) is a group of addresses or prefixes the server gives the client, identified by a 4-byte IAID chosen by the client, usually one per interface. Each IA carries T1 and T2 timers, like DHCPv4's lease timers, and each address or prefix inside it has a preferred lifetime and a valid lifetime, the same lifetimes SLAAC uses. RFC 9915 has two kinds of IA:
- IA_NA (Identity Association for Non-temporary Addresses, option 3): ordinary addresses.
- IA_PD (Identity Association for Prefix Delegation, option 25): whole prefixes, for routers.
RFC 8415 also had IA_TA, for temporary addresses. Hardly anyone implemented it, and RFC 9915 removed it (a client that wants a short-lived address can request an extra IA_NA and release it later). Temporary addresses come from SLAAC (article 32).
The four-message exchange
The DHCPv6 equivalent of DORA (DHCPv4's DISCOVER, OFFER, REQUEST, ACK, article 30) is SOLICIT, ADVERTISE, REQUEST, REPLY:

The lab ran a Kea DHCPv6 server (kea-dhcp6) on a link with a client running ISC dhclient -6, asking for both an address (-N) and a delegated prefix (-P). The server had a pool of addresses in 2001:db8:1::/64 and a pool of /56 prefixes taken from 2001:db8:80::/48. In the client's log, XMT lines are messages it transmitted, RCV lines messages it received, and PRC lines its own processing steps:
PRC: Soliciting for leases (INIT).
XMT: Solicit on eth0, interval 1050ms.
RCV: Advertise message on eth0 from fe80::ff:fe00:501.
PRC: Selecting best advertised lease.
PRC: Considering best lease.
XMT: Request on eth0, interval 990ms.
RCV: Reply message on eth0 from fe80::ff:fe00:501.
PRC: Bound to lease (server DUID) 00030001020000000501.
inet6 2001:db8:1::100/128 scope global dynamic
And on the wire, with a second, stateless exchange that followed:
0.000 fe80::ff:fe00:c01 -> ff02::1:2 SOLICIT xid 0x9c0f53
0.002 fe80::ff:fe00:501 -> fe80::ff:fe00:c01 ADVERTISE xid 0x9c0f53
1.055 fe80::ff:fe00:c01 -> ff02::1:2 REQUEST xid 0x5322bf
1.055 fe80::ff:fe00:501 -> fe80::ff:fe00:c01 REPLY xid 0x5322bf
2.356 fe80::ff:fe00:c01 -> ff02::1:2 INFORMATION-REQUEST xid 0x7b23c6
2.357 fe80::ff:fe00:501 -> fe80::ff:fe00:c01 REPLY xid 0x7b23c6
The client sent from its link-local address fe80::ff:fe00:c01 to ff02::1:2, and the server answered by unicast from its own link-local address. Here are the main parts of the client's SOLICIT:
Message type: Solicit (1)
Transaction ID: 0x9c0f53
Client Identifier
DUID: 0001000132938e53020000000c01
DUID Type: link-layer address plus time (1)
DUID Time: Nov 20, 2026 23:03:47.000000000 UTC
Link-layer address: 02:00:00:00:0c:01
Link-layer address (Ethernet): 02:00:00:00:0c:01 (02:00:00:00:0c:01)
Option Request
Requested Option code: DNS recursive name server (23)
Requested Option code: Domain Search List (24)
Elapsed time
Elapsed time: 0ms
Identity Association for Non-temporary Address
IAID: 00000c01
T1: 3600
T2: 5400
Identity Association for Prefix Delegation
IAID: 00000c01
T1: 3600
T2: 5400
- The Transaction ID is 3 bytes, in the 4-byte header after the 1-byte message type. Unlike DHCPv4, where one ID covers all four messages, each DHCPv6 exchange gets its own: SOLICIT/ADVERTISE is one, REQUEST/REPLY another, which is why the capture shows a new ID for the REQUEST.
- The Client Identifier carries the client's DUID, a DUID-LLT built from its MAC address and a creation time. Split into its parts,
0001000132938e53020000000c01is0001(DUID type 1, LLT),0001(hardware type 1, Ethernet),32938e53(the creation time, in seconds since the start of 2000) and020000000c01(the MAC address). The server's DUID in the log above,00030001020000000501, is type 3 (DUID-LL): just the hardware type and the MAC address. - The Option Request option (the DHCPv6 equivalent of DHCPv4 option 55) asks for DNS servers (option 23) and the domain search list (option 24).
- Elapsed Time is like DHCPv4's
secs, but in hundredths of a second. - The client asked for one IA_NA and one IA_PD, both with IAID
00000c01, taken from the end of its MAC address. It also suggested T1 and T2 values (3600 and 5400). RFC 8415 already made those suggestions obsolete; old clients likedhclientstill send them, and servers ignore them.
The REPLY that completed the exchange:
Message type: Reply (7)
Server Identifier
Identity Association for Non-temporary Address
IAID: 00000c01
T1: 1800
T2: 2880
IA Address
IPv6 address: 2001:db8:1::100
Preferred lifetime: 3600
Valid lifetime: 7200
DNS recursive name server
Domain Search List
Domain name suffix search list
Identity Association for Prefix Delegation
IAID: 00000c01
T1: 1800
T2: 2880
IA Prefix
Preferred lifetime: 3600
Valid lifetime: 7200
Prefix length: 56
Prefix address: 2001:db8:80::
The server set its own T1 and T2 (1800 and 2880 seconds), gave the client 2001:db8:1::100 with a preferred lifetime of 1 hour and a valid lifetime of 2 hours, and delegated the prefix 2001:db8:80::/56. Both were recorded on the server against the client's DUID:
address,duid,expire,pref_lifetime,prefix_len
2001:db8:1::100,0001000132938e53020000000c01,1795223029,3600,128
2001:db8:80::,0001000132938e53020000000c01,1795223029,3600,56
The address appears on the client as a /128, as noted above (the last line of the client log). In a real network, the RA's on-link prefix would tell the client that 2001:db8:1::/64 is directly reachable.
Message types
| Type | Message | Purpose |
|---|---|---|
| 1 | SOLICIT | Client looks for servers |
| 2 | ADVERTISE | Server offers to serve the client |
| 3 | REQUEST | Client asks a chosen server for leases |
| 4 | CONFIRM | Client checks whether its addresses are still valid on the link it's now on |
| 5 | RENEW | Client extends leases with the server that granted them (at T1) |
| 6 | REBIND | Client extends leases with any server (at T2) |
| 7 | REPLY | Server's answer to almost everything |
| 8 | RELEASE | Client gives leases back |
| 9 | DECLINE | Client found an address already in use (by Duplicate Address Detection, article 32) |
| 10 | RECONFIGURE | Server tells the client to renew or ask for new information |
| 11 | INFORMATION-REQUEST | Client asks for options only (stateless) |
| 12 / 13 | RELAY-FORW / RELAY-REPL | Between relay agents and servers |
RENEW, REBIND, CONFIRM and RELEASE follow the same logic as their DHCPv4 counterparts (article 30). A client that reconnects to a link sends CONFIRM to check whether it's still on the same network. RECONFIGURE requires authentication, normally with a key the server sent earlier (the Reconfigure Key method), so an attacker can't trigger it.
Rapid Commit
If the client includes the Rapid Commit option in its SOLICIT and the server is configured to allow it, the server skips ADVERTISE and answers with a REPLY that commits the leases right away. The exchange takes two messages instead of four. That suits links with one server, and it's what many ISPs use for prefix delegation.
Stateless DHCPv6
A client that has its address from SLAAC sends an INFORMATION-REQUEST instead. In the lab, dhclient -6 -S did that:
XMT: Forming Info-Request, 0 ms elapsed.
XMT: Info-Request on eth0, interval 930ms.
RCV: Reply message on eth0 from fe80::ff:fe00:501.
The REPLY carried only options, no IA:
DNS server 2001:db8:2::53, search list example.com.
The server keeps no record of the client. The Information Refresh Time option (32) tells the client how often to ask again, by default once a day.
DNS servers can also be sent in RAs, with the RDNSS (Recursive DNS Server) option (RFC 8106), so a network can run SLAAC with no DHCPv6 at all. Many networks send both, since some clients support only one of the two methods.
Prefix delegation
Prefix delegation (DHCPv6-PD) gives a whole prefix to a requesting router, which then numbers its own networks from it. It's how almost every home router with IPv6 gets its addresses:

- The home router sends a SOLICIT with an IA_PD on its WAN interface (and usually an IA_NA, to get an address for the WAN link itself).
- The ISP's server delegates a prefix, such as the lab's
2001:db8:80::/56, in an IA Prefix option (26) with lifetimes. - The ISP's router installs a route for the prefix toward the home router.
- The home router assigns a
/64from the prefix to each of its LANs and announces it in RAs, and hosts configure themselves with SLAAC. - The home router renews the delegation at T1, just like an address lease. If the ISP gives a different prefix after a reconnect, the whole home network is renumbered, which is why RFC 7084 requires home routers to keep a persistent DUID (so the ISP can recognize them and hand back the same prefix), and operator guidance such as RIPE-690 (from RIPE, the European address registry community) recommends stable prefixes.
A /56 holds 256 /64 subnets, a /48 holds 65,536. Article 13 covers the sizes ISPs hand out.
Relay agents
DHCPv6 relays work like DHCPv4 relays (article 30), but instead of editing fields in the client's message, a relay wraps it: it sends a RELAY-FORW message to the server containing the original message in a Relay Message option. RELAY-FORW has two address fields:
- link-address: an address on the client's link, which the server uses to choose the subnet (like giaddr in DHCPv4).
- peer-address: the client's link-local address, so the reply can be delivered.
The relay can add options such as Interface-ID (18), to identify the port the request arrived on, and Remote-ID (37), the DHCPv6 version of option 82's remote ID. Relays can be chained, each wrapping the message again, and the server answers with nested RELAY-REPL messages that each relay unwraps on the way back.
What RFC 9915 changed
RFC 9915 is a cleanup of RFC 8415, based on what was actually implemented. Among the changes:
- IA_TA removed: temporary addresses come from SLAAC.
- Server unicast removed: RFC 8415 let a server tell clients to send it messages by unicast (the Server Unicast option and the UseMulticast status code). Few implementations supported it, and it's gone.
- Errata applied and UDP ports clarified: which ports clients, servers and relays send from and to (section 7.2).
Two other removals people often attribute to RFC 9915 actually happened earlier, in RFC 8415: delayed authentication (the Reconfigure Key method remains for RECONFIGURE messages) and client hints for lifetimes and T1/T2.
Common questions
Why doesn't DHCPv6 give out a default router?
Because RAs already do, and routers know best whether they're available. If a router fails, hosts stop receiving its RAs and switch to another one. Putting routers in DHCPv6 too would give two possibly conflicting sources. Some people have argued for adding the option, but it has never been standardized.
Should I use SLAAC or stateful DHCPv6 on my network?
SLAAC is simpler, works on every operating system, and supports privacy addresses. Stateful DHCPv6 gives central control and logging of which device has which address, which some enterprises require, but Android doesn't support it (it supports per-host prefix delegation instead). Many networks use SLAAC for addresses and stateless DHCPv6 or RDNSS for DNS.
What is a DUID, and why not just use the MAC address?
A DUID identifies the device, not one interface, and stays the same if the network card is replaced or the device has several interfaces. That gives a stable identity for leases. The downside is that DUID-LLT and DUID-LL contain a MAC address, and stable identifiers can be used to track devices across networks. RFC 7844 describes an anonymity profile in which clients change their DUID.
My home router gets a different IPv6 prefix every time it reconnects. Why?
The ISP's DHCPv6 server isn't keeping your delegation stable. When the router reconnects, it may get a new IA_PD, and every device at home must renumber. Some ISPs offer static prefixes. RFC 7084 requires home routers to use a persistent DUID that survives reboots, which lets an ISP that wants to recognize the router and give back the same prefix.
Can a DHCPv6 server and SLAAC give the same host addresses at the same time?
Yes. If the RA has both the M flag and a prefix with the autonomous flag set, the host can have a SLAAC address, a temporary address and a DHCPv6 address on the same interface. Source address selection (article 28) decides which to use for each connection.
Summary
- DHCPv6 is a separate protocol on UDP 546 and 547. Clients send from their link-local address to
ff02::1:2. It never provides the default router, which comes from RAs. - RA flags select the mode: M for stateful address assignment, O for stateless options only.
- Clients and servers have DUIDs. Leases are grouped in identity associations (IA_NA for addresses, IA_PD for prefixes), each with T1, T2 and per-address lifetimes.
- The exchange is SOLICIT, ADVERTISE, REQUEST, REPLY, or SOLICIT and REPLY with Rapid Commit, or INFORMATION-REQUEST and REPLY for stateless configuration.
- Prefix delegation gives routers whole prefixes (often a /56) to number their LANs, and is how home routers get IPv6.
- Relays wrap client messages in RELAY-FORW, with a link-address to select the subnet.
- RFC 9915 (2026) replaced RFC 8415, removing IA_TA and server unicast (delayed authentication and client timer hints had already gone in RFC 8415).
Practice questions
1. A host on a network with stateful DHCPv6 has a DHCPv6 address but can't reach anything outside its link. What's the most likely missing piece?
Answer
A default router. DHCPv6 doesn't provide one; it comes from Router Advertisements. If no router is sending RAs, or the host isn't accepting them, it has an address but no route off the link. (It might also lack on-link prefix information, since the DHCPv6 address is a /128.)
2. An RA has the M flag clear and the O flag set. What does a host do for its address and for its DNS servers?
Answer
It configures its address with SLAAC from the RA's prefixes, and sends an INFORMATION-REQUEST (stateless DHCPv6) to get DNS servers and other options. It may also take DNS servers from an RDNSS option in the RA.
3. An ISP delegates 2001:db8:80::/56 to a home router. How many /64 subnets can the router create, and what is the prefix of the tenth one if they're numbered from 0?
Answer
2^(64−56) = 256 subnets. The subnet ID is the 8 bits after the /56, which are the low 8 bits of the fourth group, so the tenth one (index 9) is 2001:db8:80:9::/64.
4. A DHCPv6 client sends a SOLICIT with the Rapid Commit option, but the server isn't configured for rapid commit. What happens?
Answer
The server ignores the option and answers with a normal ADVERTISE. The client then continues with REQUEST and REPLY, the four-message exchange.
5. A relay sends a RELAY-FORW with link-address 2001:db8:5::1 and peer-address fe80::1234. What does the server do with each?
Answer
It uses the link-address to find the subnet the client is on, here the one containing 2001:db8:5::1, and allocates from that subnet's pools. It uses the peer-address in its RELAY-REPL so the relay knows to deliver the reply to the client at fe80::1234.
6. Why did RFC 9915 remove IA_TA?
Answer
It was almost never implemented. Hosts get temporary (privacy) addresses from SLAAC instead (RFC 8981), so a DHCPv6 mechanism for them wasn't needed.
Previous: How DHCP Works: Discover, Offer, Request, Renewals, Relays and Snooping
Next: Stateless Autoconfiguration: IPv4 Link-Local, IPv6 SLAAC and Duplicate Address Detection

More in TCP/IP Course
Quiz: TCP/IP Delicate Details
Twenty-five questions on the details that catch out experienced engineers: sequence numbers for SYN and FIN, TIME_WAIT versus tcp_fin_timeout, Karn's algorithm, socket buffer doubling, even and odd ephemeral ports, IPv6 checksums and fragmentation, negative DNS caching, and capture filter traps.
Quiz: TCP/IP Interview Questions
Thirty-three networking questions of the kind asked in developer, SRE and network engineering interviews: what happens when you load a URL, TCP versus UDP, handshakes, closing and TIME_WAIT, subnetting, NAT, DNS, MTU problems, congestion, TLS and QUIC, and debugging slow or failing connections.
Quiz: TCP/IP Course Final Exam (All Parts)
The final exam for the TCP/IP course: thirty questions across all fourteen parts, from packets and addressing through Ethernet, ARP, IP, DHCP, NAT, ICMP, UDP, DNS, TCP connections, reliability, congestion control, security, QUIC and troubleshooting.
Quiz: Modern Transports and Troubleshooting (TCP/IP Part 14)
Review modern transports and troubleshooting: QUIC packets, handshakes, 0-RTT, streams and connection migration, HTTP/3, Multipath TCP, SCTP multihoming, and a layered method for diagnosing real network faults.
Discussion
Sign in to ask a question or share what you learned.