Article 513ZR [SOLVED] dns-nameserver setting ignored

[SOLVED] dns-nameserver setting ignored

by
berndbausch
from LinuxQuestions.org on (#513ZR)
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.249I 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?latest?d=yIl2AUoC8zA latest?i=_JZHxrSymoU:TR_r6YZsDNU:F7zBnMy latest?i=_JZHxrSymoU:TR_r6YZsDNU:V_sGLiP latest?d=qj6IDK7rITs latest?i=_JZHxrSymoU:TR_r6YZsDNU:gIN9vFw_JZHxrSymoU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments