[Bug 1045616] Re: DHCP server handing out DNS server addresses but DHCP client does not write these to resolv.conf
David T
ubuntuwiki at datmail.com
Wed Sep 5 18:34:43 UTC 2012
Hmmm, this might be a bad defaults in Ubuntu 12.04 let me give a little
background on the configs.
On the network I have a DHCP server setup, giving out IP's, and the DHCP
config file has the options:
option domain-name "xyz.com";
option domain-name-servers 209.51.128.19, 63.247.77.198;
When installing
Ubuntu 10.04 LTS
I do a virgin install of ubuntu, then run the install.sh script for www.virtualmin.com
Logging into SSH I test local DNS:
ping google.com
and I get DNS lookup. Checking it's /etc/resolv.conf it has:
nameserver 127.0.0.1
nameserver 209.51.128.19
domain xyz.com
search xyz.com
(not sure why I'm not getting both DNS servers from the DHCP server but
I guess that's for another ticket)
---------------------------
Repeat the process on Ubuntu 12.04 virgin install of ubuntu, then run the install.sh script for www.virtualmin.com
Logging into SSH I test local DNS:
ping google.com
and I get no DNS resolution. Checking it's /etc/resolv.conf it has:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
search xyz.com
------------
So I guess my two questions are:
1) Why isn't resolvconf (or whatever is reading the DNS settings from the DHCP server) on Ubuntu 10.04 putting both DNS servers from the DHCP server into it's local resolv.conf
2) Why isn't resolvconf (or whatever is reading the DNS settings from the DHCP server) on Ubuntu 12.04 putting both DNS servers from the DHCP server into it's local resolv.conf
I'm guessing we're somehow dealing with an interaction of the BIND server that virtualmin installs, and:
> Please note that if a local nameserver is running and the loopback address 127.0.0.1 has been
> registered with resolvconf then (normally) resolvconf only lists that one address in resolv.conf.
> This has been known to confuse people.
but having BIND server installed shouldn't be affecting the local DNS
lookups, it's a stand-alone bind server...
If it's the Virtualmin script doing something with the resolvconf
initialization, then I can report this issue with the Virtualmin team
but I'm having a feeling it's not.
------------
Thanks for the info on nmcli(1) :)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to resolvconf in Ubuntu.
https://bugs.launchpad.net/bugs/1045616
Title:
DHCP server handing out DNS server addresses but DHCP client does not
write these to resolv.conf
Status in “resolvconf” package in Ubuntu:
Incomplete
Bug description:
ARGH!!!!! Every release causes new problems >:(
If you have:
linux DHCP server on the network with options:
option domain-name "xyz.com";
option domain-name-servers 4.2.2.2, 4.2.2.3;
In Ubuntu 10.x it works fine and pulls the DHCP client pulls the DNS
servers from the DHCP fine.
Ubuntu 12.x - It's broken.
Trying to fix with: adding to /etc/network/interfaces
dns-nameservers 4.2.2.2 4.2.2.3
dns-search xyz.com
FAIL. Because you have iface eth0 inet dhcp that option isn't read
Try and configure with Network Manager from commandline because your running a server.
NOPE, network manager doesn't run from CLI commandline only GUI
Can't manually specify the DNS server in /etc/resolv.conf because it's
always getting overwritten.
What's the best option here? I think this might be a bug. Only option
I haven't tried is using the head file from this description:
Resolvconf has a /etc/resolvconf/resolv.conf.d/ directory that can contain “base”, “head”, “original” and “tail” files. All in resolv.conf format.
base: Used when no other data can be found
head: Used for the header of resolv.conf, can be used to ensure a DNS server is always the first one in the list
original: Just a backup of your resolv.conf at the time of resolvconf installation
tail: Any entry in tail is appended at the end of the resulting resolv.conf. In some cases, upgrading from a previous Ubuntu release, will make tail a symlink to original (when we think you manually modified resolv.conf in the past)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1045616/+subscriptions
More information about the foundations-bugs
mailing list