The problem:
My ISP gives out dynamic IPv6 prefixes, i.e they change every time I reset the connection.
My openwrt router is set to give out DHCPv6 addresses out of the ISP prefix, and add these entries to local DNS.
after a disconnect and reconnect to ISP happens, the local (stateful?) address does not match the prefix anymore, and connection between local devices is interrupted (could randomly work or not, depending if the device try to use IPv4, IPv6 ULA or external).
What I want to happen:
I want to the middle address in the example below to (starting with 2a10:)to disappear.
I don't know what's the best approach, if just making it so the address doesn't get added to DNS records, or if DHCPv6 shouldn't give out external stateful addresses at all, or if there's a way to force all clients to renew every time the prefix changes, or something else altogether.
I do want, however, to keep using stateful ULA adddresses, as well as RA/SLAAC from the external prefix.
AFAIK dnsmasq has no option to exclude certain answers, only to remove AAAA at all[1], but that's not an option.
In general, there is RFC 3484 - Default Address Selection for Internet Protocol version 6 (IPv6)[2] which can be made use of on Linux systems via /etc/gai.conf but it seams that Windows doesn't offer the same granular options (prefer ULA over GUA)[3].
/*
I agree that dynamic customer prefixes suck, but sadly most ISP do not offer to choose between stable and dynamic prefixes. */
The only thing /usr/sbin/odhcpd-update does is send SIGHUP to dnsmasq. But we can make this script do more stuff, like filter GUA addresses from the lease file so dnsmasq never sees those addresses.
So here's a possible solution:
Change the odhcpd section in /etc/config/dhcp as follows:
I forgot to mention I also restarted the network interfaces of the clients as well. The lease database in odhcpd is RAM-only and will be lost across restarts, so dnsmasq will not resolve DHCP names until those clients renew.