Why are you overriding the nameserver? If you control the dhcp server
then the better option is to have it provide the desired information
there instead of having clients override it.
> Can someone explain the moving parts for a noobie?The dhclient negotiates with the dhcp server for host configuration
information including the nameserver. It then writes this information
into /etc/resolv.conf where the libc resolver library reads it and
uses it. Because daemons only read /etc/resolv.conf once when they
start if that file changes then any daemon that needs names must be
restarted in order to read the new contents of the file. This is why
running a local caching nameserver is nice because it provides one
individual location for this and avoids needing to restart other
randon daemons.
There are several easy options.
1. The most direct is to edit /etc/dhcp/dhclient.conf and override the
nameserver option. See 'man dhclient.conf' for details. Something
like this (untested):
supersede domain-name-servers 8.8.8.8, 192.168.1.1;
2. Install resolvconf and use it to override the nameservers. This is
the one I like the best.
# apt-get install resolvconf
Then edit /etc/network/interfaces. Add a line like this (untested):
iface eth0 inet dhcp
dns-nameservers 8.8.8.8 192.168.1.1