Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dynamically updated zone and $GENERATE

105 views
Skip to first unread message

andrey...@gmail.com

unread,
Apr 5, 2006, 4:11:41 AM4/5/06
to
Hello,

Is it possible to use $GENERATE/$INCLUDE in dynamicaly updated zone
with latest BIND 9 ?

Thank you.


Kevin Darcy

unread,
Apr 5, 2006, 4:55:07 PM4/5/06
to
andrey...@gmail.com wrote:

>Hello,
>
>Is it possible to use $GENERATE/$INCLUDE in dynamicaly updated zone
>with latest BIND 9 ?
>

I don't believe so. Once Dynamic Update is enabled for a zone, then
named "owns" the zone file and writes whatever it wants to it, whenever
it wants, which is probably going to wipe out your $GENERATEs and/or
$INCLUDEs.

Use nsupdate or some other Dynamic Update client to maintain the zone's
"manual" data. If the data in your $GENERATEs and/or $INCLUDEs are
static, then you just issue the relevant nsupdate commands one time to
achieve the same result. If, on the other hand, your $GENERATE/$INCLUDE
data tend to change fairly often, then you'd be wise to insert some
scripted nsupdates into your change process.


- Kevin

Sten Carlsen

unread,
Apr 5, 2006, 6:34:18 PM4/5/06
to
I think this depends upon how the $generate statements are interpreted.
I would believe that they are just a kind of shorthand for writing long
and systematic sequences.
So, in short:
If it works like the cpp C-preprocessor with C, it should be fine to use
it with dynamic updated zones for providing the basic content.
If on the other hand the processing of $generate statements is closely
intertwined with the other operations, they should be impossible to use
with dynamic updates.

So the question is: how does bind process $generate statements before
initially loading the zone or after loading it?

I don't know, maybe somebody else does on this list.

--
Best regards

Sten Carlsen

No improvements come from shouting:

"MALE BOVINE MANURE!!!"


Kevin Darcy

unread,
Apr 5, 2006, 7:20:57 PM4/5/06
to

Sten Carlsen wrote:

>I think this depends upon how the $generate statements are interpreted.
>I would believe that they are just a kind of shorthand for writing long
>and systematic sequences.
>So, in short:
>If it works like the cpp C-preprocessor with C, it should be fine to use
>it with dynamic updated zones for providing the basic content.
>

How do you come to that conclusion? Under Dynamic Update, the individual
updates are committed first to the journal, and only periodically
"dumped" out to the main zone file. In order to preserve $INCLUDEs and
$GENERATEs and whatnot in the midst of that dumping process, named would
have to set up special code paths, data structures, etc. and the effort
hardly seems worth it.


- Kevin

Sten Carlsen

unread,
Apr 5, 2006, 7:04:12 PM4/5/06
to
I think this depends upon how the $generate statements are interpreted.
I would believe that they are just a kind of shorthand for writing long
and systematic sequences.
So, in short:
If it works like the cpp C-preprocessor with C, it should be fine to use
it with dynamic updated zones for providing the basic content.
If on the other hand the processing of $generate statements is closely
intertwined with the other operations, they should be impossible to use
with dynamic updates.

So the question is: how does bind process $generate statements before
initially loading the zone or after loading it?

I don't know, maybe somebody else does on this list.

Kevin Darcy wrote:
> andrey...@gmail.com wrote:
>
>
>> Hello,
>>
>> Is it possible to use $GENERATE/$INCLUDE in dynamicaly updated zone
>> with latest BIND 9 ?
>>
>>
> I don't believe so. Once Dynamic Update is enabled for a zone, then
> named "owns" the zone file and writes whatever it wants to it, whenever
> it wants, which is probably going to wipe out your $GENERATEs and/or
> $INCLUDEs.
>
> Use nsupdate or some other Dynamic Update client to maintain the zone's
> "manual" data. If the data in your $GENERATEs and/or $INCLUDEs are
> static, then you just issue the relevant nsupdate commands one time to
> achieve the same result. If, on the other hand, your $GENERATE/$INCLUDE
> data tend to change fairly often, then you'd be wise to insert some
> scripted nsupdates into your change process.
>
>
> - Kevin
>
>
>
>

--
Best regards

Sten Carlsen

No improvements come from shouting:

"MALE BOVINE MANURE!!!"


--
Best regards

Sten Carlsen

Let HIM who has an empty INBOX send the first mail.


Sten Carlsen

unread,
Apr 5, 2006, 7:50:46 PM4/5/06
to
Ok, I use a combination of static and dynamic configuration and I forgot
the dump process because it always looks the same in my case when I do
static updates with a stopped nameserver.
If $generate should work under dynamic updates, it would have to be
processed (and changed) at all times when a new copy of the database is
written regardles of the cause.

I assume you are right, it does not work or at least there is no easy
consistent way it could work.

Kevin Darcy wrote:


> Sten Carlsen wrote:
>
>
>> I think this depends upon how the $generate statements are interpreted.
>> I would believe that they are just a kind of shorthand for writing long
>> and systematic sequences.
>> So, in short:
>> If it works like the cpp C-preprocessor with C, it should be fine to use
>> it with dynamic updated zones for providing the basic content.
>>
>>

> How do you come to that conclusion? Under Dynamic Update, the individual
> updates are committed first to the journal, and only periodically
> "dumped" out to the main zone file. In order to preserve $INCLUDEs and
> $GENERATEs and whatnot in the midst of that dumping process, named would
> have to set up special code paths, data structures, etc. and the effort
> hardly seems worth it.
>
>
> - Kevin
>
>

--
Best regards

Sten Carlsen

Let HIM who has an empty INBOX send the first mail.


Merton Campbell Crockett

unread,
Apr 5, 2006, 9:42:03 PM4/5/06
to

On 05 Apr 2006, at 16:50 , Sten Carlsen wrote:

> Ok, I use a combination of static and dynamic configuration and I
> forgot
> the dump process because it always looks the same in my case when I do
> static updates with a stopped nameserver.
> If $generate should work under dynamic updates, it would have to be
> processed (and changed) at all times when a new copy of the
> database is
> written regardles of the cause.


I use $GENERATE in dynamically updated zone files. It is only
meaningful in the initial load of the zone file when BIND generates
the information for the in memory copy of the zone file. When the
zone file is written to disk, the macro disappears from the zone file
and is replaced with the generated records. I would presume the same
would hold true for and $INCLUDE macro that you may use.

There are several instances where I have had an occassion to restore
the original zone file sans all dynamic updates. For these
instances, I will create the following zone files prior to adding the
zones to named.conf.

arpa.in-addr.192.168.255
arpa.in-addr.192.168.255-base
com.hasental
com.hasental-base

I stop named copy the -base files and then start named. You could,
probably, add a $GENERATE to an existing dynamically updated zone
file provided that named writes the zone file before exiting. I
never tried to do that.

Merton Campbell Crockett


Merton Campbell Crockett
m.c.cr...@adelphia.net


Daniel Vaillant

unread,
Apr 6, 2006, 4:06:09 AM4/6/06
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

bonjour,

I am in the process to mix initially loaded (stticallydefined zones)
and dynamic updates from various sources
(text files under specific apps).
I have the labour to write programs (scripts around nsupdates) for that.
Is there any "pointers" on such existing programs I could take as
such or modify.

thank you

Kevin Darcy wrote:

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows 2000)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFENMvxWjx+k/U6y0kRAh1LAKCRc0cmjkGTnEFP5YX+fnv5wiajIQCgq5Fn
P466E0839x1nNgzhFeIurww=
=MBWt
-----END PGP SIGNATURE-----

David Nolan

unread,
Apr 6, 2006, 8:14:38 AM4/6/06
to

--On Thursday, April 06, 2006 10:06:09 +0200 Daniel Vaillant
<vail...@ganil.fr> wrote:

> I am in the process to mix initially loaded (stticallydefined zones)
> and dynamic updates from various sources
> (text files under specific apps).
> I have the labour to write programs (scripts around nsupdates) for that.
> Is there any "pointers" on such existing programs I could take as
> such or modify.


Your question is pretty light on details, so its hard to recommend a
solution. i.e. are you dealing with a couple zones, or a couple hundred?
Are you dealing with a few dozen records, or several thousand? Do you need
a way to delegate zone management to multiple people, or will a single
admin be responsible for changes? Are you trying to mix static & dynamic
updates in a single zone? (Thats hard at best, and a really bad idea at
worst...)

Do a search in freshmeat.net for DNS and you'll find quite a few tools for
performing DNS management. Which one you need depends on the details of
your situation.

If your scale tends towards the larger end of the ranges I gave above, I
recommend taking a look at Carnegie Mellon's NetReg, which you can find in
freshmeat or at http://www.net.cmu.edu/netreg. (Disclaimer: I'm the
current primary developer, and I also offer installation, customization and
support contracts on the side.)

It handles both static servers and dynamic servers (currently no mixing on
a single server), and scales very well to large sites. At Carnegie Mellon
we have over 400 zones (not counting the reverses), and over 50K records in
those zones.

(NetReg also maintains DHCP configurations, and has a SOAP API for advanced
integration with other systems.)


-David Nolan
Network Software Designer
Computing Services
Carnegie Mellon University


0 new messages