LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,960

Rep: Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481
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: 14,923
Blog Entries: 9

Rep: Reputation: 4214Reputation: 4214Reputation: 4214Reputation: 4214Reputation: 4214Reputation: 4214Reputation: 4214Reputation: 4214Reputation: 4214Reputation: 4214Reputation: 4214
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
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,960

Original Poster
Rep: Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481
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
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,960

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


Reply

Tags
nameserver, networking


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:14 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