Dynamic update of virtual hosting domains

Chris Buxton cbuxton at menandmice.com
Wed Jan 30 15:07:49 UTC 2008


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.

You could also use an include file for just the address of the web  
server. This is entirely separate from the above technique. With this,  
each zone has its own file, but in each zone file, you have:

$INCLUDE web.address.inc

Then in the file web.address.inc:

@   A 192.0.2.1
www A 192.0.2.1

However, with this method, when you change the include file, you also  
need to update the serial numbers of all affected zones. It may be  
easier to also move the SOA record into the shared file.

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.

>> 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.

Chris Buxton
Professional Services
Men & Mice
Address: Noatun 17, IS-105, Reykjavik, Iceland
Phone:   +354 412 1500
Email:   cbuxton at menandmice.com
www.menandmice.com

Men & Mice
We bring control and flexibility to network management

This e-mail and its attachments may contain confidential and  
privileged information only intended for the person or entity to which  
it is addressed. If the reader of this message is not the intended  
recipient, you are hereby notified that any retention, dissemination,  
distribution or copy of this e-mail is strictly prohibited. If you  
have received this e-mail in error, please notify us immediately by  
reply e-mail and immediately delete this message and all its attachment.





More information about the bind-users mailing list