Red Hat Bugzilla – Bug 128655
RFE (patch included): Update ISC named config based on DHCP info.
Last modified: 2007-11-30 17:10:46 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1)
Description of problem:
When dhclient receives a new lease and the setting PEERDNS is set to
something else than 'no' it updates the /etc/resolve.conf to use the
correct DNS servers specified by the DHCP server. For most systems
this is just fine.
However my ADSL ISP provides me with IP information (including DNS
servers) using DHCP which is used by the system I have configured as
my gateway (NAT/firewall/etc). On this system I have a local ISC DNS
server running which is used as local DNS and caching name server for
the systems in my LAN. This DNS server should use the provided ISP DNS
servers as forwarders, preferably automatically.
What this patch does:
If the PEERDNS setting for an interface is set to "named" then for
that interface a config file is created/rewritten and the named
service is reloaded.
Using this feature:
1) Make your /etc/named.conf config file look something like this
(only relevant fragment here):
2) service named start
3) Edit /etc/sysconfig/network-scripts/ifcfg-eth0
so the line with PEERDNS looks like this
4) Perhaps a good idea setting /etc/resolv.conf to read
5) ifup eth0
There is no risk for existing systems because this code only works iff
1) The PEERDNS is set to named ..... MANUALLY
2) The /etc/named.conf is updated to include the right config fragment
Version-Release number of selected component (if applicable):
Steps to Reproduce:
As described above.
Created attachment 102231 [details]
The ORIGINAL /sbin/dhclient-script I started with.
Created attachment 102232 [details]
The enhanced version of /sbin/dhclient-script I created.
Created attachment 102233 [details]
This is a good fix for a specific customized environment ; it could
be implemented using the
scripts already catered for by dhclient-script
(see man dhclient-script).
As such, I think the right place for this fix is in those customization
scripts, and not in the general purpose distribution.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.