Updating zones

Chris Buxton cbuxton at menandmice.com
Fri Sep 28 17:59:43 UTC 2007


Just make sure that the SOA record is the first record in the zone.  
That is, if you put the SOA record into an included file, put that  
$INCLUDE directive before any other records in the starting file, and  
put the SOA record at the top of the included file.

zone1.db:
__________________________________

$INCLUDE shared-records.db
$TTL 1d
a.ns	A	192.0.2.1
b.ns	A	192.0.2.2
a.mx	A	192.0.2.3
b.mx	A	192.0.2.4
__________________________________

shared-records.db:
__________________________________

$TTL 1d
@	SOA	a.ns.zone1. hostmaster.zone1. [... 5 more fields ...]
	NS	a.ns.zone1.
	NS	b.ns.zone1.
	MX	10  a.mx.zone1.
	MX	20  b.mx.zone1.
[... other shared records ...]
__________________________________

You might even be able to use shared-records.db (in this example) as  
the actual zone file for your other two zones, depending on whether  
they have any need for their own unique records.

Chris Buxton
Men & Mice

On Sep 27, 2007, at 5:30 PM, Barry Margolin wrote:

> In article <fdh9mk$2ek0$1 at sf1.isc.org>,
>  Christian Robottom Reis <kiko at async.com.br> wrote:
>
>> On Thu, Sep 27, 2007 at 04:56:58PM -0500, Ryan McCain wrote:
>>> I have 3 zones that all point to a shared.zone file via  
>>> $INCLUDE.  When I
>>> add a new DNS record to shared.zone I now have to:
>>>
>>> 1) Update the reverse zone
>>> 2) Update the serial # in zone1
>>> 3) Update the serial # in zone2
>>> 4) Update the serial # in zone3
>>
>> For the case of 2, 3 and 4, if they are truly identical you could  
>> do as
>> I do and just have a master file symlinked between them.
>
> But maybe they're not completely identical, they have some unique
> entries and then a bunch of shared entries in the shared.zone file.
>
> In this case, what you could do is put the SOA record in the  
> shared.zone
> file as well.  You'll need to update this serial number whenever you
> update shared.zone or any of the individual zone files, so at most
> you'll ever have to update two files when you add a new DNS record.
>
> This has one misfeature -- if you update zone1, the serial numbers of
> zone2 and zone3 will also be updated, and the slaves will transfer all
> of them.  But unless your zones are huge I wouldn't worry too much  
> about
> this.
>
> -- 
> Barry Margolin, barmar at alum.mit.edu
> Arlington, MA
> *** PLEASE post questions in newsgroups, not directly to me ***
> *** PLEASE don't copy me on replies, I'll read them in the group ***
>
>



More information about the bind-users mailing list