Changing $TTL for many zones
Justin Randall
j_randall_ at hotmail.com
Tue Aug 3 00:05:26 UTC 2004
>Exactly. I would go further and suggest that, since the SOA needs to be
>changed anyway, just give an explicit TTL to the SOA RR, and thus
>dispense with the $TTL directive completely (my assumption here is that
>the SOA RR is the first RR in the zone file).
Furthermore, if you would like the ability of controlling a change to the
TTL for all domains, a good solution to look into would be constructing a
script that would be able to adjust the TTL value in the SOA RRs for each
zone file.
A good example of a language you could use would be PERL, as you can make
use of semi-colons as delimiters in the SOA RR when indicating which section
of the zone file to modify.
- Justin
-----Original Message-----
From: bind-users-bounce at isc.org [mailto:bind-users-bounce at isc.org] On Behalf
Of Kevin Darcy
Sent: August 2, 2004 7:51 PM
To: comp-protocols-dns-bind at isc.org
Subject: Re: Changing $TTL for many zones
phn at icke-reklam.ipsec.nu wrote:
>Josh Harding <jharding at brave.cs.uml.edu> wrote:
>
>
>>I was wondering if it's possible to use an include with bind9 to set the
>>time to live. This would allow me to easily change the ttl when we make
>>changes in the future.
>>
>>
>>The syntax I was contemplating would look like this
>>in db.somedomain:
>> $include db.ttl.inc
>>
>>
>
>
>
>>and in db.ttl.inc:
>>$TTL 86400 ;to be changed at my convenience
>>
>>
>
>
>
>>Would this work?
>>
>>
>
>Yes. But why ? You still have to edit at least the SOA record to increase
>serial nr.
>
Exactly. I would go further and suggest that, since the SOA needs to be
changed anyway, just give an explicit TTL to the SOA RR, and thus
dispense with the $TTL directive completely (my assumption here is that
the SOA RR is the first RR in the zone file).
- Kevin
More information about the bind-users
mailing list