Sample Header Ad - 728x90

How to make systemd-resolved stop trying to use offline DNS servers?

11 votes
2 answers
14677 views
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.
Asked by Malvineous (7395 rep)
Sep 2, 2018, 02:57 AM
Last activity: May 26, 2020, 08:03 PM