nsupdate rewrtting the zone files

Andris Kalnozols andris at hpl.hp.com
Tue Dec 11 00:04:43 UTC 2001


> 
> I have been maintaining DNS records for a while on version 4 and 8
> using a host file and h2n. Not very complex. We are trying to start
> using dynamic updates with Bind 8.2.2 p5 and a DHCP server will be
> the only one allowed to update.  The DHCP Server and the DNS server
> run on the same system running Solaris 8.  Every time I run nsupdate
> or the DHCP server registers a record when I restart named my zone
> files are completely rewritten in a different format that h2n will
> no longer handle. I get improper SOA format back from the h2n script.
> I know a little Perl but h2n is a monster.
> 
> Format before dynamic update:
> 
> $TTL 86400
> @ IN SOA  folly root ( 2 10800 3600 604800 600 )
>   IN NS   folly
> 
> localhost               A       127.0.0.1
> wando                   A       205.140.237.3
> folly                   A       205.140.237.6
> loghost                 CNAME   folly
> spruill-dhcp            A       205.140.237.10
> 
> $INCLUDE /var/named/spcl.charlestoncounty
> 
> 
> Format after dynamic update: added 2 hosts with nsupdate -d
> 
> ;BIND DUMP V8
> $ORIGIN org.
> charlestoncounty  86400 IN  NS  folly.charlestoncounty.org. ;Cl=3D2
>   86400 IN  SOA folly.charlestoncounty.org. root.charlestoncounty.org. (=
> 
>     4 10800 3600 604800 600 ) ;Cl=3D2
>   86400 IN  MX  10 folly.charlestoncounty.org.  ;Cl=3D2
> $ORIGIN charlestoncounty.org.
> uber-soldat 86400 IN  A 205.140.237.11  ;Cl=3D2
> folly 86400 IN  A 205.140.237.6 ;Cl=3D2
> localhost 86400 IN  A 127.0.0.1 ;Cl=3D2
> testbox 86400 IN  A 205.140.237.12  ;Cl=3D2
> wando 86400 IN  A 205.140.237.3 ;Cl=3D2
> loghost 86400 IN  CNAME folly.charlestoncounty.org. ;Cl=3D2
> spruill-dhcp  86400 IN  A 205.140.237.10  ;Cl=3D2
> 
> 
> Are dynamic updates always going to be written in this format?  Is there
> any way to keep the zone files in the other format or an h2n script that
> can handle this format.

I've updated h2n to specifically look for the presence of a '.log'
or '.jnl' file when it trys to get the serial number of an existing
zone file.  If found, the program will report the discovery and quit.
This update is in the BETA directory of the h2n distribution located
at < ftp://ftp.hpl.hp.com/pub/h2n/h2n.tar.gz >.  The 2.40-BETA8 code
is stable; I just haven't finished documenting the changes.

In the future, h2n will look at the BIND configuration file and limit
itself to zones for which 'allow-update{ none; };' is found or implied
or those that lack an 'update-policy' clause.

> Secondly do the use of dynamic updates completely kill the possibility
> of having a host file rebuild the zone files.  I would think so.
> This is very madding.

As others have already stated, yes.

Andris Kalnozols



More information about the bind-users mailing list