NetworkManager dnsmasq dependency for static ip but not dhcp

Asked by Tyler

First off, I'm not sure if this is a bug as I am not familiar with internals of networkManager and dnsmasq and their working relationship. However, the behavior I observed I found odd. I imagine someone else out there can clarify why this is expected behavior, if it is not a bug.

TLDR version: with dnsmasq disabled in /etc/NetworkManager/NetworkManager.conf my DHCP NM connection resolves names just fine. However, when using a Static IP NM with the same default gateway, dns's, etc., then names do not resolve correctly. Granted, these are names on an internal network (e.g. "" still resolves just fine in either case, as do other pages/sites).

Here's my askUbuntu post, for more detail (e.g. nmcli output for both cases):

Here are some existing launchpad bugs which appear to be related:

$ cat /etc/lsb-release

$ apt-cache policy network-manager
  Version table:
 *** 0
        500 precise-updates/main amd64 Packages
        100 /var/lib/dpkg/status 0
        500 precise/main amd64 Packages

$ apt-cache policy dnsmasq
  Installed: (none)
  Candidate: 2.59-4ubuntu0.2
  Version table:
     2.59-4ubuntu0.2 0
        500 precise-updates/universe amd64 Packages
        500 precise-security/universe amd64 Packages
     2.59-4 0
        500 precise/universe amd64 Packages

Thank you.

Question information

English Edit question
Ubuntu network-manager Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :

Add the IP you use for LAN resolution to the bottom of


You can do this in terminal with:

echo "nameserver" | sudo tee -a /etc/resolvconf/resolv.conf.d/head > /dev/null

Reboot to test. Obviously, change the IP if your LAN DNS server is not

Revision history for this message
actionparsnip (andrew-woodhead666) said :

If dnsmasq is running on the local PC, use

Revision history for this message
Tyler (tniles09) said :

Hmmm... well


has a comment at the top of it saying it's a generated file, and changes will be overwritten. So that leads me to assume you meant this as momentary test? One that might even expire through a reboot?

I was more or less trying to see if anyone could comment on whether this is a bug or not. My issue was indeed resolved by re-enabling dnsmasq, so I do have static IP connectivity now. I just found it odd that nm was so dependent (in this case) on dnsmasq being active.

Revision history for this message
actionparsnip (andrew-woodhead666) said :

The file is used to generate the text in /etc/resolv.conf which is generated each boot. If you add to the file then the configuration line/s you add will be used first.
It does sound like a bug but this is a good workaround.

Can you help with this problem?

Provide an answer of your own, or ask Tyler for more information if necessary.

To post a message you must log in.