Bug 128655

Summary: RFE (patch included): Update ISC named config based on DHCP info.
Product: [Fedora] Fedora Reporter: Niels Basjes <fedora>
Component: dhcpAssignee: Jason Vas Dias <jvdias>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-03 13:22:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The ORIGINAL /sbin/dhclient-script I started with.
none
The enhanced version of /sbin/dhclient-script I created.
none
The patch none

Description Niels Basjes 2004-07-27 18:30:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1)
Gecko/20040707

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):

options {
    directory "/var/named/";
    include "/etc/named.forwarders.eth0.conf";
};

2) service named start

3) Edit /etc/sysconfig/network-scripts/ifcfg-eth0
   so the line with PEERDNS looks like this
PEERDNS=named
4) Perhaps a good idea setting /etc/resolv.conf to read 
nameserver 127.0.0.1

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
..... MANUALLY



Version-Release number of selected component (if applicable):
dhclient-3.0.1rc14-1

How reproducible:
Always

Steps to Reproduce:
As described above.

Additional info:

Comment 1 Niels Basjes 2004-07-27 18:32:05 UTC
Created attachment 102231 [details]
The ORIGINAL /sbin/dhclient-script I started with.

Comment 2 Niels Basjes 2004-07-27 18:32:34 UTC
Created attachment 102232 [details]
The enhanced version of /sbin/dhclient-script I created.

Comment 3 Niels Basjes 2004-07-27 18:32:58 UTC
Created attachment 102233 [details]
The patch

Comment 4 Jason Vas Dias 2004-08-03 13:22:03 UTC
This is a good fix for a specific customized environment ; it could
be implemented using the 
   /etc/dhclient-enter-hooks
   /etc/dhclient-exit-hooks
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. 



Comment 5 John Flanagan 2004-12-21 19:41:52 UTC
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.

http://rhn.redhat.com/errata/RHBA-2004-566.html