skip to content

DHCPv6

DHCPv6 runs beside SLAAC, not instead of it: Solicit, Advertise, Request and Reply, DUIDs instead of MACs, and prefix delegation to downstream routers. Stateful versus stateless is the favourite.

on this pageshow

questions

6

What is the difference between stateful and stateless DHCPv6, and which messages and options does each mode use?

level: middleimportance: must knowfreq 40%

answer

  1. address or settings only
  2. Information-request has no IA
  3. who keeps a binding
  4. refresh time, not T1
  5. SLAAC can run alongside

basics

~20 s

Stateful DHCPv6 assigns addresses or prefixes through Solicit, Advertise, Request and Reply with IA_NA or IA_PD, and the server keeps a binding. Stateless DHCPv6 sends only Information-request and Reply for settings such as DNS, assigns no address and needs no binding.

solid answer

~40 s

In **stateful** DHCPv6 the client runs `Solicit`/`Advertise`/`Request`/`Reply` with `IA_NA` (addresses) or `IA_PD` (prefixes). The server records a binding keyed by DUID, IA type and IAID, and the client renews at T1 and rebinds at T2. In **stateless** DHCPv6 the client sends one `Information-request` and gets one `Reply` with settings such as DNS recursive servers (option 23) and the search list (option 24). No address is assigned, so the server needs no per-client binding. The client refreshes when the Information Refresh Time option says, defaulting to 24 hours if it is absent. The host usually takes its address from SLAAC. A Router Advertisement's M flag points hosts at stateful DHCPv6 and its O flag at stateless DHCPv6. Neither mode supplies a default router; that still comes from Router Advertisements.

go deeper

for a junior

Remember that stateless DHCPv6 gives settings such as DNS but no address, while stateful DHCPv6 assigns addresses and keeps a record of them.

for a middle

Explain Information-request against the Solicit exchange, which IA options each mode carries, why stateless needs no binding, and how the Information Refresh Time option replaces T1.

for a senior

Diagnose a host with a SLAAC address but no DNS, or with a DHCPv6 address but no route off-link, by knowing which mechanism owns each setting.

for a principal

Decide per network whether accountability and per-client policy justify running stateful DHCPv6, given that some hosts lack a stateful client.

## Two ways to use DHCPv6 RFC 9915, the current DHCPv6 specification, says DHCPv6 can operate "either in place of or in addition to" **SLAAC** (stateless address autoconfiguration), the mechanism in which a host builds its own address from a prefix its router announces. That gives two DHCPv6 modes, and they differ in what the server hands out and what it must remember. | | Stateless DHCPv6 | Stateful DHCPv6 | |---|---|---| | Messages | `Information-request`, then `Reply` | `Solicit`, `Advertise`, `Request`, `Reply`; later `Renew` and `Rebind` | | IA options | none | `IA_NA` (option 3) for addresses, `IA_PD` (option 25) for prefixes | | Assigns an address | no | yes | | Server memory | no per-client binding needed | a binding keyed by `<DUID, IA-type, IAID>` | | When the client asks again | Information Refresh Time option (option 32) | T1 and T2 inside each IA, plus each lease's lifetimes | | Usual pairing | SLAAC addresses, DHCPv6 settings | DHCPv6 addresses; SLAAC may run as well | ## Stateless: settings, no address A stateless client sends an **Information-request** to `ff02::1:2` and receives one **Reply**. RFC 9915 §18.2.6 shapes the request: - it SHOULD carry a **Client Identifier** option with the client's DUID. A client may leave it out for privacy, and then it gets at most the settings that do not depend on who is asking; - it MUST carry an **Elapsed Time** option and an **Option Request** option naming what the client wants; - it carries **no IA options**, because it asks for no lease. The Reply typically holds the DNS recursive name servers (`OPTION_DNS_SERVERS`, 23) and the domain search list (`OPTION_DOMAIN_LIST`, 24), both defined in RFC 3646, and may hold NTP servers and other parameters. RFC 9915 §4.2 notes that settings returned to every client on a link by policy need no binding. That is why the mode is called stateless: the server has nothing per client to track or expire. Without a lease there is no T1. The server instead sends an **Information Refresh Time** option, the longest the client should wait before asking again. If the Reply lacks it, the client assumes `IRT_DEFAULT`, 86,400 seconds (24 hours). Any value below `IRT_MINIMUM`, 600 seconds, is raised to 600. The option bounds how long a host keeps stale DNS settings during a renumbering. This mode was once its own document, RFC 3736. RFC 8415 absorbed it, and RFC 9915 obsoletes RFC 8415. ## Stateful: the server assigns and remembers A stateful client runs the four-message exchange with one or more IA options. The server picks addresses appropriate to the client's link, records a **binding**, and returns each address with a **preferred** and a **valid lifetime**. Each IA also carries **T1** and **T2**. RFC 9915 recommends 0.5 and 0.8 times the shortest preferred lifetime: at T1 the client sends Renew to the same server, and at T2 it sends Rebind to any server. Before using an address, the client must run duplicate address detection, and it sends **Decline** if the address is already in use. A stateful Reply also carries the same settings a stateless client would ask for. A client can mix the modes, too: RFC 9915 §6 describes a device that gets its address statefully and later asks for extra parameters with an Information-request. ## How a host decides which mode to run The trigger usually comes from the router, not from DHCPv6. In a Router Advertisement, the **M** (managed) flag says addresses are available through DHCPv6, and the **O** (other) flag says only other configuration is. RFC 4861 adds that with M set, O is redundant, because a stateful exchange returns everything. The flags themselves belong to neighbour discovery. DHCPv6's part starts once a host has decided to ask. ## What neither mode supplies Neither mode gives a **default router**: RFC 9915 defines no option for one. A stateful address also arrives without a prefix length; the client must treat it as a /128 and learn which prefixes are on-link from Router Advertisements. A DHCPv6-only design with Router Advertisements switched off therefore leaves hosts with no route off the link. ## Choosing as an operator - **Stateless** fits when SLAAC addressing is acceptable and hosts only need DNS and similar settings. The server is simple, there is no pool to exhaust, and there is nothing per client to store. - **Stateful** fits when you need a record of which client holds which address, per-client policy, or DNS updates through the DHCPv6 Client FQDN option (RFC 4704). - Check your hosts. RFC 7084 §4.3 expects hosts to handle SLAAC but says they only "may be capable of using DHCPv6" for addresses. A link that offers addresses only through stateful DHCPv6 can strand a host without a stateful client, which is why many networks run SLAAC and DHCPv6 side by side.

  • Why might an operator choose stateful DHCPv6 when SLAAC already gives every host an address?
    Stateful DHCPv6 leaves a server-side binding that ties a client's DUID and IAID to an address for a known period, which helps when an incident needs to know who held an address. It also allows per-client policy and DNS updates through the Client FQDN option (RFC 4704). The cost is a server, a pool and hosts that implement a stateful client. Hosts without one still need SLAAC.
  • In stateless DHCPv6, how quickly do clients pick up a changed DNS server address?
    A client asks again when its information refresh time expires. The server sets that time with the Information Refresh Time option; without the option, the client waits `IRT_DEFAULT`, 24 hours, and any value under 600 seconds is raised to 600. Before a planned change, an operator lowers the value in advance so clients refresh sooner. A client also refreshes after detecting a move to a new link.

saying these in an interview costs you the question

  • Stateless DHCPv6 gives the host an address that the server simply does not record.
  • Stateful DHCPv6 also hands the host its default gateway.
  • A link must pick either SLAAC or DHCPv6; the two cannot run together.
  • A stateless DHCPv6 client renews its settings at T1, like a stateful one.
  • Stateless DHCPv6 needs a lease pool, just like stateful DHCPv6.
open as a page

In DHCPv6, which four messages does a client exchange with a server to obtain an address, and how does Rapid Commit shorten that to two?

level: juniorimportance: should knowfreq 35%

basics

~20 s

A DHCPv6 client multicasts Solicit to ff02::1:2, willing servers answer with Advertise, the client sends Request naming one server, and that server commits the lease in Reply. With Rapid Commit, a server answers the Solicit directly with a committed Reply.

open as a page

Why does a DHCPv6 server identify clients by DUID rather than MAC address, and why can a reinstalled machine get a new address?

level: middleimportance: should knowfreq 22%

basics

~20 s

DHCPv6 messages carry no hardware-address field; a client identifies itself with a DUID, a stable opaque identifier stored on the device. A reinstall usually wipes the stored DUID-LLT and generates a new one, so the server sees a new client.

open as a page

On a corporate IPv6 LAN, hosts get addresses from stateful DHCPv6 yet cannot reach anything off-link; what does DHCPv6 leave out, and where must hosts get it instead?

level: seniorimportance: should knowfreq 25%

basics

~20 s

DHCPv6 defines no default-router option and sends no prefix length: an assigned address is treated as a /128. Hosts learn their default router and on-link prefixes from Router Advertisements, so missing or zero-lifetime advertisements leave leased hosts stranded.

open as a page

A home gateway asks its ISP for a /56 with DHCPv6 prefix delegation; how does it obtain the prefix, and how does it use it on its LAN segments?

level: seniorimportance: should knowfreq 18%

basics

~20 s

The gateway solicits with an IA_PD option, often hinting /56, and the ISP's server delegates a prefix with lifetimes. The gateway splits it into 256 /64s, one per LAN, and announces them; the ISP edge must route the /56 to it.

open as a page

How does a DHCPv6 relay agent carry a client's Solicit to a server on another subnet, and how does the server tell which link the client is on?

level: seniorimportance: nice to knowfreq 12%

basics

~20 s

The relay wraps the client's message unchanged in a Relay-forward, recording a global address of the client's link in link-address and the client's source in peer-address. The server picks the link from link-address and answers in a Relay-reply.

open as a page