LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-23-2020, 04:23 AM   #1
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
dns-nameserver setting ignored


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?
 
Old 03-23-2020, 04:35 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Is systemd-networkd supposed to honor the settings in /etc/network/interfaces?
Is it active at all?
On my laptop - which uses NetworkManager - it isn't:
Code:
$ systemctl | grep -i network
...
$ resolvectl
In that case it would be solely a case for network-manager (honoring these settings or not).
Maybe it has its own config option to globally define nameservers?
 
Old 03-23-2020, 05:42 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Original Poster
Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by ondoho View Post
Is systemd-networkd supposed to honor the settings in /etc/network/interfaces?
Is it active at all?
On my laptop - which uses NetworkManager - it isn't:
Code:
$ systemctl | grep -i network
...
$ resolvectl
In that case it would be solely a case for network-manager (honoring these settings or not).
Maybe it has its own config option to globally define nameservers?
Neither systemd-resolved nor systemd-networkd are active. I don't think you need either for processing /etc/network/interfaces. Proof: All other settings (IP address, netmask, gateway) are honoured.

The problem occurs when NetworkManager is active/enabled and dead/disabled.

Luckily I still have some hair to pull out.

Code:
# resolvectl
Failed to get global data: Unit dbus-org.freedesktop.resolve1.service not found.
# systemctl status systemd-networkd
● systemd-networkd.service - Network Service
   Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; ve
   Active: inactive (dead)
     Docs: man:systemd-networkd.service(8)
 
Old 03-23-2020, 07:17 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Original Poster
Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Well, I do need resolvconf if I want dns-nameservers to have the intended effect. It was not installed.
 
  


Reply

Tags
nameserver, networking



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nameserver setting in network/interfaces ignored Ook Linux - Networking 2 01-18-2013 03:35 PM
No Nameserver found - Nameserver (DNS) failure EPS Linux - Networking 10 01-14-2012 08:11 AM
Gentoo DNS(nameserver)! Xerop Linux - Networking 3 05-20-2004 06:47 AM
DNS nameserver issue - pppsetup the_rydster Slackware 2 03-04-2004 09:09 AM
BIND: wildcard DNS and nameserver noisybastard Linux - Networking 0 10-05-2003 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration