[Dnsmasq-discuss] OT: Configuring my network interface

john doe johndoe65534 at mail.com
Tue Aug 6 08:05:27 BST 2019

On 8/5/2019 4:02 PM, dnsmasqyq.xpt at neverbox.com wrote:
> Thanks *every one of you* who replied / helped.
> So it turns out to be a no-issue, just I didn't understand the proper
> way to use `dig`.
> On Mon, Aug 5, 2019 at 6:22 AM john doe wrote:
>> On 8/5/2019 9:05 AM, Geert Stappers wrote:
>>>>>>> So how do I make sure that the domain name always gets added, in my
>>>>>>> DHCP/DNS server configuration?
>>>>>> Wrong question. Probably due jumping to conclusions.
>>>>>> Show us, this mailinglist, the content of  /etc/resolv.conf
>>>>>> Output of `dig foo`, `dig foo.my.domain.tld` and `ping -c 3 foo`.
>>>>>> Where 'foo' is host known at the local DNS.
>>>>> - - - - - -
>>>>> $ cat /etc/resolv.conf
>>>>> # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
>>>>> # is the systemd-resolved stub resolver.
>>>>> # run "systemd-resolve --status" to see details about the actual nameservers.
>>>>> nameserver
>>>>> search my.domain.tld
>> Based on the above:
>> how are your interfaces configured (NetworkManager, systemd-network,
>> /etc/network/interfaces, ...)?
> Good question, I do remember that I configured my network interface
> (eth0) via NetworkManager *on the server side*, but I don't recall
> doing anything on the client side. Maybe I'm taking everything by
> default? How can I confirm that?
> - my "/etc/network/interfaces" is not touched, still contains nothing
> but comments
> - I do have a "/etc/NetworkManager/system-connections/Wired\
> connection\ 1" file, but I have no recollection whether I created it
> or system created it for me.
> - I do remember, when things "didn't work out", I installed the
> 'resolvconf' package again -- previously I always remove it without
> seeing much side effects.
>> Normally, 'systemd-resolved' is only to be used when 'systemd-networkd'
>> is used.
> So my "/etc/resolv.conf" is controlled by  'systemd-resolved', but I
> have no idea what/how 'systemd-networkd' is/works. hmm....
>> So, assuming that you only configured your interfaces using NM, you need
>> to look at NM and the 'resolvconf' package.
>> That is, stay with systemd or NM, or /etc/network/interfaces but avoid
>> mixing them if possible.
> This is the fist time I am hearing this! as the content on the
> Internet will tell you to add this or add that, without telling you
> why. So if I want to keep my *client* system clean, without mixing
> them and not having extra packages, what shall I do? Would staying
> with systemd (not NM) work? (for normal cases like taking my Laptop
> around).

Assuming that your laptop uses Gnome or Mate or other DE, a reasonable
approach would be to understand what the GUI  used to manage your
interfaces and stick to it.
In most cases, a CLI version is also available.

> Further on that, seems to me previously Ubuntu use
> NetworkManager+dnsmasq.base for local DNS caching, but now it is
> moving to pure systemd based as well, for local DNS caching, right?

I don't use ubuntu, sorry.
That having been said, googling doesn't look to corroborate that fact
(where are you seeing that (URL?)).

> All in all, what's the recommended way to configured my network
> interface of my client system with modern Ubuntu/Debian?

Sadly, there is none! :)

As a rule of thum I try to keep in mind the following:

- Desktop environment (Gnome,Mate,...) = using  GUI or  CLI to configure
- '/etc/systemd/network' = 'systemd-networkd' and maybe 'systemd-resolved'
- '/etc/network/interfaces' = "Old way" to manage interfaces in
combination with a dhcp client

There are multiple ways to configure an interface, the one that you will
use depens on the pkgs you install on the host.
When I install a host I need to understand how dhcp client works, that
way, I know how  the dhcp client lease and dns are configured.

Also, the 'resolvconf' package might also come into play.

John Doe

More information about the Dnsmasq-discuss mailing list