I am experiencing an issue with DNS and to help narrow down the problem, I have been asked to configure my machine's DNS settings manually, only specifying one DNS server instead of the two returned via DHCP, so the server admins can find out whether my problem is only happening on one DNS server or both.
However I have been unable to configure systemd-resolved such that it will manually accept my DNS config.
I tried the following, all of which still sent DNS requests randomly between both servers, even after restarting both systemd-networkd and systemd-resolved:
- Specifying
DNS=1.2.3.4in the[Resolve]section of/etc/systemd/resolved.conf - Specifying
DNS=1.2.3.4in the[Network]section of/etc/systemd/network/eth0.conf(the only file in this folder) - Editing
/etc/resolv.confand commenting out one of the servers
None of these changed anything, still resolvectl listed both DNS servers as available and when I performed my tests the DNS queries were split between the two servers instead of using only the one server I had specified.
How can I tell systemd to only use a single DNS server I specify, and not to also use the servers returned via DHCP?