English · Ελληνικά
With IPv4 the ISP gave you one address and NAT hid the rest. With IPv6 the ISP gives you a whole block, and every subnet you build depends on it. Learn the four-message exchange that hands it over, the subnet plans that survive a different block size, and what really happens to every host when the block changes overnight.
DHCPv6 Prefix Delegation (RFC 8415) is how a residential or business ISP hands a router its block: usually a /56, sometimes a /60 or a /48. The router splits it into /64s, one per VLAN, and advertises each with RAs. Your entire internal addressing now depends on a lease from someone else's server.
That design is fine as long as the lease is stable. It goes wrong in three predictable ways: the reply never reaches the client, the plan doesn't fit the size you were given, and the prefix changes under hosts that hold week-long lifetimes. This post handles all three.
01
Four messages to get the prefix, two timers to keep it. Everything runs over UDP between link-local addresses.
The detail that matters for the next section: the client talks to the multicast group ff02::1:2 (All_DHCP_Relay_Agents_and_Servers), and the answers come back unicast from a link-local address the client has never contacted. Renew and Rebind work the same way. With Rapid Commit both sides can skip Advertise/Request, and you see only Solicit and Reply. The asymmetry stays.
Two identifiers decide which prefix you get: the client's DUID and the IAID of the IA_PD. Many ISPs bind the delegation to them. Replace the router, factory-reset it, or move the client to a different interface, and the DUID or IAID changes. Expect a different prefix, even from an ISP that “never changes it”.
02
Conntrack keys flows on addresses and ports. A reply to a multicast request matches nothing it has seen.
A stateful firewall accepts “return traffic” because it recorded the outgoing packet's 5-tuple. The Solicit went to ff02::1:2, so the recorded tuple has a multicast destination. The Reply arrives from fe80::1, and no recorded flow has that address as its destination. It's new, and an input policy of “established/related, ICMPv6, management, drop” drops it.
The failure mode is nasty because it is time-delayed. Often the first lease works: the firewall was built after the client bound, or a reboot happened to order things favourably. Then Renew fails at T1 and Rebind fails at T2. When the valid lifetime runs out the prefix is withdrawn, every LAN /64 goes with it, and IPv6 dies at 3 a.m. on a random Tuesday. Nobody connects it to the firewall change from last week.
# RouterOS (identical to the rule in RouterOS's own default config) /ipv6 firewall filter add chain=input protocol=udp dst-port=546 \ src-address=fe80::/10 action=accept comment="DHCPv6-PD replies" # then move it above your input drop rule (rule order is everything) # Cisco IOS edge ACL (inbound on the WAN) R1(config-ipv6-acl)# permit udp any eq 547 any eq 546 # Linux nftables (a Linux box as the CE router) nft add rule inet filter input ip6 saddr fe80::/10 udp dport 546 accept
Scoping the source to fe80::/10 isn't decoration. Legitimate DHCPv6 replies on the WAN link come from the ISP's link-local address, so nothing on the internet can reach port 546 through this rule.
03
You don't control the prefix or its size. You do control the subnet ID, so make the plan out of those bits only.
| Delegation | Subnet-ID bits | /64s | What it fits |
|---|---|---|---|
| /48 | 16 | 65,536 | Multi-site enterprise; per-site /56s from one block |
| /56 | 8 | 256 | The common business/residential size. Plenty for an SMB. |
| /60 | 4 | 16 | Some residential ISPs. Tight once you segment IoT, guest and cameras. |
| /64 | 0 | 1 | No delegation at all: one LAN only. Push the ISP, or plan to bridge. |
Work in nibbles (4-bit hex digits) so every subnet boundary lands on a hex digit you can read. With a /56 you get two nibbles. A plan that holds up:
delegated 2001:db8:abcd:1200::/56 # "00" is yours to assign :1200::/64 0 · 0 infrastructure / router-to-router :1210::/64 1 · 0 staff VLAN 10 :1211::/64 1 · 1 staff VLAN 11 :1220::/64 2 · 0 servers :1230::/64 3 · 0 IoT / cameras :1240::/64 4 · 0 guest Wi-Fi # Prefix changes to 2001:db8:abcd:7700::/56 -> every subnet keeps its last two digits. # Given a /60 instead? Only the zone nibble is left: one /64 per zone, 16 max.
This is where the platforms differ. IOS lets you write the subnet ID down. RouterOS picks it for you.
R1(config)# interface GigabitEthernet0/0 R1(config-if)# ipv6 dhcp client pd ISP-PD rapid-commit R1(config-if)# interface Vlan10 R1(config-if)# ipv6 address ISP-PD ::10:0:0:0:1/64 # 2001:db8:abcd:1200::/56 + ::10:0:0:0:1 -> 2001:db8:abcd:1210::1/64, # recomputed automatically when the delegated prefix changes R1# show ipv6 general-prefix R1# show ipv6 dhcp interface GigabitEthernet0/0 # prefix, lifetimes, T1/T2
/ipv6 dhcp-client add interface=pppoe-out1 request=prefix pool-name=isp-pd \
pool-prefix-length=64 add-default-route=yes
/ipv6 address add interface=vlan10 from-pool=isp-pd address=::1
/ipv6 address add interface=vlan40 from-pool=isp-pd address=::1
/ipv6 pool used print # which /64 went to which interface
/ipv6 dhcp-client print detail # status, prefix, expires-afterRouterOS assigns from-pool subnets from the pool. There is no field that pins VLAN 10 to subnet 10. Even the IOS general prefix, which does keep your subnet IDs, can't stop the ISP from changing the prefix in front of them. Any firewall rule, address-list, DNS record or monitoring check that hard-codes 2001:db8:abcd:1210::/64 is therefore a time bomb. Write policy against interfaces and interface lists (in-interface-list=STAFF), which survive any renumbering. When a rule genuinely needs an address, give internal services a ULA (fd + 40 random bits) alongside the GUA, and point internal DNS and ACLs at that. One caveat: in the RFC 6724 default policy table, IPv4 outranks ULA. So dual-stack clients will still pick v4 for a name that has both an A record and a ULA AAAA. ULA gives you stable internal names. It doesn't push traffic onto v6.
04
The router learns about the new prefix in a second. Every host keeps using the old one until its lifetime runs out.
The usual triggers: the ONT or modem reboots, the PPPoE session redials, the ISP rebalances its pools, or the router gets a new DUID. Here is the sequence on a router running default lifetimes:
| Time | Router | Hosts |
|---|---|---|
| t = 0 | PPPoE redials, DHCPv6-PD binds :7700::/56, LAN /64s rebuilt, RAs now carry the new prefix only | Form new addresses from :7710::/64. Still hold :1210:: as preferred, with up to a week left. |
| t + seconds | Routes and forwards only the new prefix; the ISP drops anything sourced from the old one | Source-address selection has two preferred addresses. Many connections go out from the dead one and time out. Happy-eyeballs hides part of it behind v4. |
| t + 1 week | — | Old address finally deprecated, and v6 “fixes itself”. Valid lifetime lingers another three weeks on RouterOS defaults. |
RFC 9096 says a CE router that loses a prefix should keep advertising it for a while with preferred lifetime 0, so hosts deprecate it immediately. The same RFC asks the router to remember the prefix across a reboot so it can still deprecate it. Plenty of CE implementations do neither reliably. So don't count on the router. Count on the lifetimes:
/ipv6 nd prefix default set preferred-lifetime=45m valid-lifetime=90m
# 2700 s / 5400 s. RAs every few minutes keep a live prefix refreshed;
# a dead one is deprecated within 45 min and gone within 90.R1(config-if)# ipv6 nd prefix default 5400 2700 # valid / preferred in seconds, for every prefix advertised on this interface
If the ISP offers a static delegation on a business line, take it: it makes v6 firewalling, inbound services and logging far simpler. Build as if it will change anyway. That means interface-based policy, ULA for internal names, short RA lifetimes, and a monitoring check that alerts when the delegated prefix differs from yesterday's. On RouterOS, the DHCPv6 client's script can log the change. On IOS, an EEM applet that checks show ipv6 general-prefix on a timer can do the same. That way the renumbering shows up in a log line instead of a user complaint.
Takeaways
ff02::1:2, then Renew at T1 and Rebind at T2. The prefix dies when the valid lifetime runs out with no Reply.fe80::/10 on input. Without it, conntrack can't pair the unicast Reply with the multicast request, and PD fails, often only at the first renewal.Lease renewals blocked by the firewall and silent renumbering are the two usual causes. I audit the PD, firewall and RA setup on MikroTik and Cisco edges and make the addressing survive whatever the ISP does.
Book a Discovery Call →