I have configured my DHCP server to supply two nameservers for redundancy, so that if one is offline the other one can be used.
I have configured my PCs with
systemd-resolved and according to
resolvectl status it has picked up all the DNS servers (IPv4 and IPv6 addresses for both) and is using one as the current one.
However, if the DNS server goes offline,
systemd-resolved does not switch to the next server but instead keeps trying to connect to the offline one, causing all uncached name resolution to fail.
If I run
systemctl restart systemd-resolved then it will switch to another server and continue working, but it will randomly switch back to the offline server after a while and name resolution will again fail.
How can I tell
systemd-resolved to stop using an offline DNS server and quickly switch to one of the other ones it knows about?
journalctl only shows this when it switches to using the offline server:
systemd-resolved: Using degraded feature set (UDP) for DNS server fdxx::x. systemd-resolved: Using degraded feature set (TCP) for DNS server fdxx::x.
The server in question is completely offline when this happens and does not respond to pings.