ChadDavis wrote: > I'm trying to add a dns server. I manually add the server to resolv.conf > and then it get's blown away. Actually, I'm not even sure it works before > it get's blown away.
The dhclient program is overwriting that file with DHCP information. That is its job. It will set up the interface. 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; Then cycle the interface. # ifdown eth0 # ifup eth0 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 Then cycle the interface. # ifdown eth0 # ifup eth0 3. Install a local caching nameserver and configure it as you desire. I won't describe this unless it is needed. Bob
signature.asc
Description: Digital signature