O'Reilly logo

DNS & Bind Cookbook by Cricket Liu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Dividing a Large named.conf File into Multiple Files

Problem

You want to divide a name server’s named.conf file into multiple files.

Solution

Use the include statement. For example, to include the file primary.conf, which contains all of a name server’s primary master zone statements, and the file slave.conf, which contains the name server’s slave zone statements, you could add these include statements to named.conf:

include "primary.conf";
include "slave.conf";

Discussion

By default, the name server looks for the files you include in its working directory. To include files in other directories, specify the full path to the file. For example:

include "/etc/primary.conf";
include "/etc/slave.conf";

The include statement is usually used as a top-level statement; however, BIND 9.2.0 and later name servers allow include within most other statements.

See Also

If a name server is authoritative for so many zones that you need to break up the named.conf file, you may also need to use several directories for the zone data files, as described in Section 3.7. Also see “Using Several Directories” in Chapter 7 of DNS and BIND.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required