How is dnsmasq supposed to configure itself with DHCP?

Chris Green cl at isbd.net
Sun Dec 5 19:26:52 UTC 2021


This is a continuation of a couple of previous posts.

I'm trying to use dnsmasq instead of systemd.resolved for DNS on a
21.10 laptop system.

It's fairly straightforward to install dnsmasq and disable systemd.resolved
and that *nearly* works.  The problem is that the 'upstream' DNS
server that is obtained using DHCP when the system boots isn't getting
into dnsmasq.

What I see when I have disabled systemd.resolved and installed dnsmasq
is 'nameserver 127.0.1.1' in /etc/resolv.conf which is correct to make
dnsmasq act as a cacheing nameserver.  However the file
/run/dnsmasq/resolv.conf which should have the upstream nameserver IP
is empty (well, it has '# Generated by resolvconf' but that's all).

I suspect that it's some sort of misconfiguration/disagreement between
NetworkManager and dnsmasq and the remains of systemd-resolved but I
can't see how to fix it at the moment.

I can of course manually set the DNS server IP in dnsmasq but that
would stop DHCP working if/when I take the laptop somewhere else.

-- 
Chris Green




More information about the ubuntu-users mailing list