I've been running Wireshark to look for Router Advertisments (icmpv6.type == 134
is the filter for that). I do see messages from my router giving prefix information but no RDNSS. Every 5 minutes or so I see a Router Advertisment from the new PiHole server, which does include RDNSS with the Global address for itself - i.e. the IPv6 address that clients should be using now as their IPv6 DNS server.
For some reason my laptop was not acting on these RA messages. I did some searching and it seems there is a longstanding bug in Windows that it ignores RDNSS if both IPv4 and IPv6 are enabled. I'm not ready to go completely IPv6 (given these issues I am wondering why I spend any hours of my life trying IPv6 at all!)
I am able to use Set-DnsClientServerAddress
to manually set Windows to use the correct address for the new server. However, when I then reset the settings with Set-DnsClientServerAddress "WiFi" -ResetServerAddress
the old pihole address is back.
Since I am not seeing any IPV6 RA traffic with the old address, then I guess I am wrong about the new PiHole server telling my client to use the wrong address, and it is getting added by some other setting or process, perhaps only fpr my laptop. Troubleshooting DNS and IPv6 isn't really feasible on Android, so I'll need to get hold of another computer to see if I can repeat the issue elsewhere.
Update for anyone having similar issues: Running netsh winsock reset
and rebooting my Windows PCs seems to have shaken using the routers address for DNS resolution. After doing this, the PCs use the RDNSS settings from Router Advertisments as expected. Before doing this, Windows seemed to be ignoring what was in the RAs.
Another update after much troubleshooting I found that my router is responding to DHCPv6 requests with its own address as a DNS server, so even when the PiHole is correctly sending out its own address in Router Advertisments and DHCPv6 packets the address assigned by DHCPv6 from my router is being preferred if its packets are being received first. The key to figuring this out was the following Wireshark filter:
icmpv6.opt.rdnss || dhcpv6.option.type == 23
This displays all the IPv6 network traffic that could be used to configure DNS automatically. The DHCP packets only appear if a client makes a DHCPv6 request.
Unfortunately my router doesn't have a switch to turn off DHCPv6 or tell it what DNS server to announce. Pretty annoying as I now have a DHCP race on my network resulting in inconsistency in what will be used for DNS resolution. I might be able to fix this by connecting my PiHole to my switch rather than the router, so it might be able to respond quicker - if that doesn't work I need to get a new router, or turn off IPv6.