I am trying to convince Debian Buster to use the nameserver defined in /etc/network/interfaces, as follows:
Code:
auto ens3f0
iface ens3f0 inet static
address 192.168.1.251
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.249
I clear /etc/resolv.conf, then
systemctl restart networking. /etc/resolv.conf remains empty. I tried
ifdown ens3f0; ifup ens3f0, same result. I removed the "s" from dns-nameservers, same result. In my desparation I replace the dns-nameserver line with "dns-blabla" and didn't get an error message.
By the way, this server runs NetworkManager, but I understand that NM leaves NICs alone when they have an entry in /etc/network/interfaces. Indeed,
nmcli d shows
ens3f0 is unmanaged. In any case, I also stopped NetworkManager. No change. Reboot - same result.
Yes I know I can just write the nameserver in /etc/resolv.conf manually. But I want it to work the way it's documented.
What is going on? Where do I look?