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?
answer
- check what the Reply omits
- routers announce themselves
- the address arrives as /128
- Router Lifetime of zero
- on-link comes from a flag
basics
~20 sDHCPv6 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.
solid answer
~40 sRFC 9915 has no option that carries a default router; option code 3 in DHCPv6 is `IA_NA`, not DHCPv4's Router option. An address in an `IA Address` option arrives with lifetimes but no prefix length. The client MUST NOT form an implicit prefix other than /128 and MUST NOT assume the address is on-link. The default router comes from **Router Advertisements** (ICMPv6 type 134): a router advertising a nonzero Router Lifetime enters the host's default-router list. On-link prefixes come from the advertisement's prefix information with the L flag set. So when hosts hold leases but cannot leave the subnet, check first that advertisements reach them: not filtered at the first hop, sent by the right router, and not carrying a Router Lifetime of 0. Only then look at DHCPv6.
go deeper
Remember that DHCPv6 gives IPv6 hosts addresses and DNS but does not give them a default gateway; the router announces itself in Router Advertisements.
Explain that an IA Address option carries no prefix length, so the address is a /128 and not assumed on-link, and that Router Lifetime and the L flag supply what is missing.
Diagnose hosts that hold leases but cannot leave the subnet: verify advertisements arrive, their Router Lifetime is nonzero, filters trust the real router, and the pool matches the link's prefix.
Treat Router Advertisements as mandatory infrastructure in any DHCPv6 design, and decide how router and DHCPv6 configuration are kept consistent and protected.
## The symptom A corporate LAN numbers `2001:db8:10::/64`. A DHCPv6 server hands out addresses statefully, and hosts show addresses such as `2001:db8:10::25` with healthy lifetimes. Yet nothing beyond the subnet answers. Sometimes even hosts on the same /64 talk only through the router, or not at all. Engineers used to DHCPv4 look for the missing "router" setting in the DHCPv6 scope and do not find one, because it does not exist. ## What a DHCPv6 lease carries, and what it does not Addresses arrive in an **IA Address** option inside an `IA_NA`. RFC 9915 §21.6 gives that option exactly three fields: the 16-octet address, a **preferred lifetime** and a **valid lifetime**. From there: - **No prefix length.** A client "MUST NOT form an implicit prefix with a length other than 128" for the address. - **No on-link assumption.** RFC 9915 §18.2.10.1 adds that the client MUST NOT assume any address is reachable on-link because it received an IA Address option. - **No default router.** RFC 9915 defines no option that carries one. Option code 3 in DHCPv6 is `IA_NA`. Do not confuse it with option 3 in DHCPv4, which is the Router option. DHCPv6 does carry DNS servers, search lists, NTP servers and similar settings. Routing information is the deliberate gap. ## Where hosts get it instead Both missing pieces come from **neighbour discovery** (RFC 4861), which every IPv6 host runs whether or not it uses DHCPv6. | Needed | Supplied by | Field that matters | |---|---|---| | default router | Router Advertisement (ICMPv6 type 134) | **Router Lifetime**: nonzero adds the sender to the default-router list; 0 means it is not a default router | | which prefixes are on-link | Router Advertisement prefix information | the **L** (on-link) flag | | which mode of DHCPv6 to run | Router Advertisement flags | **M** and **O** | A host that ran stateful DHCPv6 because an advertisement had its M flag set has therefore already depended on a Router Advertisement. The address and the route come from two protocols, and both have to work. ## Why the split makes sense A router announces itself in its own advertisements, so the information about whether a router exists and is alive comes from the router. Neighbour discovery then tracks reachability, and an advertisement's Router Lifetime lets a vanished router age out of hosts' lists. A DHCPv6 server, often reached through a relay agent several hops away, has no view of which routers on a link are up. A route it handed out could point at a dead router until the lease ran out. That is the usual explanation for the split. The practical consequence is simple: **a DHCPv6-only IPv6 LAN, with no Router Advertisements, leaves hosts without a route**, so advertisements are mandatory infrastructure, not a SLAAC accessory. ## Diagnosing the stranded hosts Work from the router outward, since the lease is evidently fine: 1. **Are advertisements reaching the host's link at all?** Capture ICMPv6 type 134 on the access port. Router Advertisements may be disabled on the router interface, or a first-hop filter meant to block rogue advertisements may be dropping the legitimate router's too. 2. **What Router Lifetime do they carry?** A value of 0 says "I am not a default router". This can happen when advertisements were set up only to signal the M flag. 3. **Is it the right router?** On a link with several routers, check that the one advertising a nonzero lifetime actually forwards off-link. 4. **Is the prefix marked on-link?** Without prefix information carrying the L flag, hosts treat even same-subnet neighbours as off-link and send through the router. That works only if a default router exists. 5. **Only then examine DHCPv6.** Check that the server's pool matches the prefix the router serves on that link, so leased addresses are routable there. ## Design consequences - Configure Router Advertisements on every IPv6 LAN that uses DHCPv6, with a nonzero Router Lifetime on the routers that should be defaults. - Keep the router's prefix and the DHCPv6 pool for that link in agreement. DHCPv6 picks addresses appropriate to the link from the relay's `link-address`, but nothing in either protocol checks that the two configurations match. - If you filter advertisements at the access layer, explicitly trust the legitimate router's port. Otherwise the filter can strand every host on the link.
- Why can two hosts with DHCPv6 addresses in the same /64 still send their traffic through the router?A DHCPv6 address is treated as a /128 and is not assumed to be on-link, so the host learns nothing about its neighbours from the lease. Unless a Router Advertisement carries the prefix with the L flag set, each host treats the other as off-link and sends to its default router. The router may then forward the traffic and send a Redirect.
- If hosts run stateful DHCPv6 only because a Router Advertisement set the M flag, how can they still end up with no default router?The advertisement that set M can itself carry a Router Lifetime of 0, which tells hosts to run DHCPv6 but not to use that router as a default. A filter can also start dropping advertisements later, and the router entry ages out while the DHCPv6 lease stays valid. Either way the lease looks healthy and the route is gone.
saying these in an interview costs you the question
- Just add the router option to the DHCPv6 scope, as you would in DHCPv4.
- A DHCPv6-assigned address implies a /64 on-link prefix.
- Once DHCPv6 assigns addresses, Router Advertisements can be switched off.
- Hosts use the DHCPv6 server or relay as their default gateway.
- Renewing the DHCPv6 lease will bring back a missing default route.