When an ISP offers #IPv6 without a stable prefix for each customer, all IPv6 addresses would become invalid whenever the WAN reconnects due to sudden prefix changes. As a workaround, RFC 9096 requires routers to detect Flash Renumbering and invalidate stale prefixes - still largely unimplemented (WIP in OpenWrt). As a fail-safe, RFC 9096 also requires preferred/valid address timeouts of 45/90 minutes to prevent indefinite IPv6 outage - up to 7/30 days per RFC 4861 defaults.
Here's how to implement it in #OpenWrt - trickier than you thought:
1. Upgrade to 24.10.2 - because earlier versions had a bug, you couldn't override the "preferred" timeout obtained from the WAN.
2. Set DHCPv4's lifetime to 90 minutes (option leasetime, in Interfaces -> LAN -> DHCP Server -> Lease time) - because there's currently no way to change IPv6's "valid" address timeout without changing DHCPv4's timeout - I checked the source code. Bug report submitted.
3. Set IPv6's preferred timeout to 45 minutes (option preferred_lifetime, in Interfaces -> LAN -> DHCP Server -> IPv6 Setting -> IPv6 Prefix Lifetime).
This is how I spent my entire night on adjusting two timers. β
β
"Valid" Lifetime Cannot be Capped Separately, Unlike Like "Preferred" Lifetime
In the existing odhcpd implementation, both "preferred" and "valid" lifetime of SLAAC addresses can be controlled, the former option is controlled by preferred_lifetime, and the later option is con...biergaizi (GitHub)
abeorch
in reply to niconiconi • •