Nesting include files in the named.conf structure

Chris Buxton chris.p.buxton at gmail.com
Tue Jan 19 12:51:49 UTC 2010


On Jan 19, 2010, at 5:12 AM, Howard Wilkinson wrote:

> I am structuring a named roll out which has a large amount of common data but also has variable data in the IP addresses used to reach masters.
> 
> I want to include a standard file in the named.conf file which lists all of the zones to be slave from a particular master set. Within this file I want to include (many times) a file that lists the masters in a particular order depending on where in our topology the slave server is placed. Does the named/bind configuration parser allow nested includes like this. If it does what is the limit on depth of include it supports?

named.conf can have nested includes. However, you have to be careful where you put them - an include can't go just anywhere.

It might be better to use a single 'masters' statement that is different for each slave, and then reference that masters list by name for each slave zone. Something like this:

/*named.conf*/
options {
	[...]
};

masters enterprise.topology {
	192.0.2.1;
	10.0.0.1;
};

zone "example.com" {
	type slave;
	masters { enterprise.topology; };
	file "example.com";
};

Put the masters line into an include file that is unique to each slave, and then put the zone statements into an include file that's replicated between all of the slaves, and you've got your desired configuration.

Chris Buxton


More information about the bind-users mailing list