Книга: Linux Network Administrator Guide, Second Edition

The BIND 8 host.conf File

The BIND 8 host.conf File

BIND Version 8 introduced a range of new features, and with these came a new configuration file syntax. The named.boot, with its simple single line statements, was replaced by the named.conf file, with a syntax like that of gated and resembling C source syntax.

The new syntax is more complex, but fortunately a tool has been provided that automates conversion from the old syntax to the new syntax. In the BIND 8 source package, a perl program called named-bootconf.pl is provided that will read your existing named.boot file from stdin and convert it into the equivalent named.conf format on stdout. To use it, you must have the perl interpreter installed.

You should use the script somewhat like this:

# cd /etc
# named-bootconf.pl ‹named.boot ›named.conf

The script then produces a named.conf that looks like that shown in Example 6.9. We've cleaned out a few of the helpful comments the script includes to help show the almost direct relationship between the old and the new syntax.

Example 6.9: The BIND 8 equivalent named.conf File for vlager

//
// /etc/named.boot file for vlager.vbrew.com
options {
 directory "/var/named";
};
zone "." {
 type hint;
 file "named.ca";
};
zone "vbrew.com" {
 type master;
 file "named.hosts";
};
zone "0.0.127.in-addr.arpa" {
 type master;
 file "named.local";
};
zone "16.172.in-addr.arpa" {
 type master;
 file "named.rev";
};

If you take a close look, you will see that each of the one-line statements in named.boot has been converted into a C-like statement enclosed within {} characters in the named.conf file.

The comments, which in the named.boot file were indicated by a semicolon (;), are now indicated by two forward slashes (//).

The directory statement has been translated into an options paragraph with a directory clause.

The cache and primary statements have been converted into zone paragraphs with type clauses of hint and master, respectively.

The zone files do not need to be modified in any way; their syntax remains unchanged.

The new configuration syntax allows for many new options that we haven't covered here. If you'd like information on the new options, the best source of information is the documentation supplied with the BIND Version 8 source package.

Оглавление книги


Генерация: 1.934. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз