Dynamic update of virtual hosting domains

Peter Rabbitson rabbit+list at rabbit.us
Wed Jan 30 15:43:19 UTC 2008


Chris Buxton wrote:
> On Jan 30, 2008, at 2:04 AM, Peter Rabbitson wrote:
>> Kevin Darcy wrote:
>>> You can have multiple zone definitions refer to a "portable" zone  
>>> file,
>>> or you can enable Dynamic Update on the domains, but you can't mix  
>>> the two.
>> Can you elaborate on the concept of "portable zone file"? I am not  
>> sure I
>> understand what you are trying to convey.
> 
> Like this (using compressed format for brevity):
> 
> zone zone1.tld { type master; file "portable.zone.file"; };
> zone zone2.tld { type master; file "portable.zone.file"; };
> 
> In other words, multiple zones loading from the same file. When you  
> alter the one file, including updating its serial number, you then  
> reload all of the zones (or the whole server) and all zones are  
> modified. Note that this method only works for static master zones.

This additional clarification does it for me. I had no idea that $ORIGIN is an 
optional operator, and that it will default to the name declared by zone 
<DOMAIN> { ... }. I also understand why this does not work with dynamic updates.

> A third option, unrelated to any of the suggestions above, is to write  
> a sed script or perl script that will do what you want. It's really  
> not that difficult and would solve all your problems.

This is not really a 3rd option, but more like describing the means for the 
above - no matter if I have multiple files or just one, I still can not do 
dynamic updates, so I need a way to update the actual files, be it manually or 
by a script.

>>> If you have a shared zone file, you'd still need to take care to  
>>> update
>>> the SOA serial number every time you make a change, and to arrange  
>>> for a
>>> reload of the relevant zone data.
>> I was going to use reasonably low TTLs to solve caching problems.
> 
> 
> I don't see how that statement relates to Kevin's statement. The  
> updating of the serial number is what would cause the changed data to  
> replicate to the slaves. Low TTL's are an entirely different matter,  
> dealing with caching of your data by name servers outside of your  
> control.

Again this stems from the confusion above.

I guess I will just make all zones dynamic, and will use nsupdate in a loop to 
propagate necessary changes.

Thank you for your help

Peter



More information about the bind-users mailing list