The named Configuration File

When BIND 8 was introduced, everything about the named configuration file changed: its name, the commands it contains, the structure of the commands, and the structure of the file. Administrators familiar with configuring the previous version of BIND were forced to start from scratch. But the introduction of BIND 9 has been less traumatic. The BIND 9 named.conf file has the same structure, a similar syntax, and only two additional commands.

The structure of the named.conf configuration commands is similar to the structure of the C programming language. A statement ends with a semicolon (;), literals are enclosed in quotes (""), and related items are grouped together inside curly braces ({}). BIND provides three ways to insert a comment. A comment can be enclosed between /* and */, like a C language comment. It can begin with two slashes (//), like a C++ comment; or it can begin with a hash mark (#), like a shell comment. The examples in this book use C++ style comments, but you can use any of the three valid styles that you like. The complete syntax of each command is covered in Appendix B, "BIND Reference."

There are eleven valid configuration statements for BIND 9.1, which is the version of BIND delivered with Red Hat 7.2. They are listed alphabetically in Table 4.1 with a short description of each command.

Table 4.1: named.conf Configuration Statements

Command

Usage

acl

Defines an access control list

controls

Defines the control channel for the named control program

include

Includes another file into the configuration file

key

Defines security keys for authentication

logging

Defines what will be logged and where it will be stored

lwres

Causes the server to act as a lightweight resolver server (BIND 9 only)

options

Defines global configuration options and defaults

server

Defines a remote server's characteristics

trusted-keys

Defines the DNSSEC encryption keys for the server

view

Shows different views of the zone data to different clients (BIND 9 only)

zone

Defines a zone

The next few sections use examples to illustrate the function and format of the most commonly used commands. This chapter is a tutorial that focuses on the common configurations used on operational networks. Appendix B gives the syntax of all commands, even those that are rarely used. Additionally, "Linux DNS Server Administration," part of the Craig Hunt Linux Library from Sybex, is a book-length treatment of DNS for readers who want even more examples.

Was this article helpful?

0 0

Post a comment