[Bug 959037] Re: NM-controlled dnsmasq prevents other DNS servers from starting

Thomas Hood 959037 at bugs.launchpad.net
Wed Nov 28 17:32:09 UTC 2012


>  the LTSP server defers to the router handling DHCP.

OK, I get it.

> I don't understand what you said about standalone dnsmasq
> conflicting with network-manager's instance of dnsmasq
> when /etc/dnsmasq.d/network-manager is removed.

When /etc/dnsmasq.d/network-manager is present, standalone dnsmasq
starts in bind-interfaces mode and only listens on the addresses
assigned to configured network interfaces. This does not include
127.0.1.1, since 127.0.1.1 is not the address of any configured
interface. So in this mode standalone dnsmasq does not conflict with NM-
dnsmasq which listens on 127.0.1.1. (At most one process can listen on
any given address:port combination.)

Remove that file and standalone dnsmasq starts in a mode where it tries
to listen at all addresses. But it can't do this if NM-dnsmasq is
already listening at some address.

> Should this conflict be manifesting itself somehow?
> Everything seems to be working right now.

Well, I am not sure which workaround, if any, you are currently relying
on.

If you commented out "dns=dnsmasq" in
/etc/NetworkManager/NetworkManager.conf then there is no conflict
because NM doesn't start the NM-dnsmasq process.

> And would disabling network-manager's DNS-handling
> instance of dnsmasq then result in the need to set up
> an alternative DNS handler?

No. If NM-dnsmasq is enabled then resolv.conf contains "nameserver
127.0.1.1" so that applications using the resolver library access NM-
dnsmasq; NM-dnsmasq forwards queries to the upstream nameserver at the
address A.A.A.A which was obtained via DHCP or otherwise. If NM-dnsmasq
is disabled then resolv.conf simply contains "nameserver A.A.A.A".

> I'm willing to apply another solution blindly, as I did
> in removing /etc/dnsmasq.d/network-manager,
> but it would be nice to understand more about it.

If you are running Ubuntu 12.04 then the best solution for now is to
* comment out the "bind-interfaces" line in /etc/dnsmasq.d/network-manager;
* comment out the "dns=dnsmasq" line in /etc/NetworkManager/NetworkManager.conf.

If you are running Ubuntu 12.10 and have dnsmasq version 2.63-1ubuntu1 then you can, instead,
* replace the "bind-interfaces" line in /etc/dnsmasq.d/network-manager with a "bind-dynamic" line.

The "bind-dynamic" mode is the new mode that I referred to above and
which Simon referred to earlier in comment #94. Please test it! If it
works well then it should become the default, as mentioned above in
comments ##99, 102.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to dnsmasq in Ubuntu.
https://bugs.launchpad.net/bugs/959037

Title:
  NM-controlled dnsmasq prevents other DNS servers from starting

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/djbdns/+bug/959037/+subscriptions



More information about the Ubuntu-server-bugs mailing list