Back to blog

English  ·  Ελληνικά

IPv6 in Depth  ·  Part 2 · November 2026

IPv6 in Depth
Prefix Delegation and Renumbering

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.

IPv6 DHCPv6-PD Renumbering Subnetting RouterOS Cisco IOS

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.

Before this

01

The Exchange, Packet by Packet

Four messages to get the prefix, two timers to keep it. Everything runs over UDP between link-local addresses.

YOUR ROUTER (client)fe80::4e5e:cff:fe11:2233 · udp/546 ISP (server / relay)fe80::1 · udp/547 SOLICIT → ff02::1:2 IA_PD (IAID 1, hint ::/56) ADVERTISE ← unicast to fe80::4e5e:… REQUEST → ff02::1:2 (server-id chosen) REPLY ← IA_PD T1=7200 T2=11520 IAPREFIX 2001:db8:abcd:1200::/56 pref 14400 valid 86400 T1 (50% of preferred): RENEW to the same server · T2 (80%): REBIND to any server valid lifetime runs out with no Reply → prefix withdrawn, every /64 under it dies The Reply is unicast. The Solicit was multicast. Your firewall can't pair them.

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

Why the Firewall Eats the Reply

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.

The one rule, on three platforms
# 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

A Subnet Plan That Survives the Prefix

You don't control the prefix or its size. You do control the subnet ID, so make the plan out of those bits only.

DelegationSubnet-ID bits/64sWhat it fits
/481665,536Multi-site enterprise; per-site /56s from one block
/568256The common business/residential size. Plenty for an SMB.
/60416Some residential ISPs. Tight once you segment IoT, guest and cameras.
/6401No 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:

Subnet ID = zone nibble + index nibble (a /56 example)
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.

Pinning the subnet ID on each platform

This is where the platforms differ. IOS lets you write the subnet ID down. RouterOS picks it for you.

Cisco IOS — general prefix, subnet ID stated explicitly
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
RouterOS 7 — from-pool takes the next free /64
/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-after
⚠ Gotcha — Never Write Delegated Addresses Into Firewall Rules

RouterOS 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

When the Prefix Changes Overnight

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:

TimeRouterHosts
t = 0PPPoE redials, DHCPv6-PD binds :7700::/56, LAN /64s rebuilt, RAs now carry the new prefix onlyForm new addresses from :7710::/64. Still hold :1210:: as preferred, with up to a week left.
t + secondsRoutes and forwards only the new prefix; the ISP drops anything sourced from the old oneSource-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:

RouterOS — RFC 9096 lifetimes for every delegated prefix
/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.
Cisco IOS — inherit from the delegation, capped short
R1(config-if)# ipv6 nd prefix default 5400 2700
# valid / preferred in seconds, for every prefix advertised on this interface
💡 Ask for Static, Design for Dynamic

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

  1. PD is Solicit/Advertise/Request/Reply to ff02::1:2, then Renew at T1 and Rebind at T2. The prefix dies when the valid lifetime runs out with no Reply.
  2. Accept UDP 546 from 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.
  3. DUID and IAID decide which prefix you get. Replacing or resetting the router usually means a new prefix.
  4. Plan in subnet-ID nibbles only, zone + index. A /56 gives two nibbles, a /60 only one.
  5. Never hard-code delegated addresses into firewall rules or DNS. Use interface lists, plus ULA where you need a stable internal address.
  6. Short RA lifetimes are what make renumbering survivable (2700/5400 s). Default lifetimes mean a week of half-broken v6 after every prefix change.

IPv6 that dies every few days for no clear reason?

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 →