DHCP and resolv.conf

Thad Van Ry thad at linuxnetadmin.com
Fri Jul 6 21:14:15 MDT 2007


On 7/6/07, Charles Curley <charlescurley at charlescurley.com> wrote:
>
> * Each time a lease renews, dhclient sets /etc/resolv.conf to the
>   server information in that lease's information. I would like to
>   ignore the information for the external interface, and only use that
>   from the internal. I think I have a partial workaround with the
>   prepend domain-name-servers and supersede domain-name statements,
>   but that leaves me either with two entries for each local server, or
>   the local servers and the ISP's servers.
>

On Red Hat distros, you could add a line to the external interface
configuration file that looks like this:
PEERDNS=no
On RH this would go in the /etc/sysconfig/network-scripts/ifcfg-eth# file,
and would prevent the DHCP server from that interface from over-writing the
/etc/resolv.conf file.
I'm not sure how/if this applies to Ubuntu. YMMV.
Thad



More information about the PLUG mailing list