Полезная информация

TCP/IP Network Administration

TCP/IP Network AdministrationSearch this book
Previous: B.11 The Aggregate StatementsAppendix CNext: C.2 named.boot Configuration Commands
 

C. A named Reference

Contents:
The named Command
named.boot Configuration Commands
Zone File Records

This appendix provides detailed information about named syntax and the commands and files used to configure it. This is primarily a reference to use in conjunction with the tutorial information in Chapter 8, Configuring DNS Name Service . This information is useful to any domain administrator.

C.1 The named Command

The server side of DNS is run by the name server daemon, named. The syntax of the named command is: [1]

[1] Sun systems use in.named instead of named.

named [-d level] [-p port[/localport]] [[-b] bootfile] [[-q] [[-r]

The three options used on the named command line are:

-d level

Logs debugging information in the file /usr/tmp/named.run. The argument level is a number from 1 to 9. A higher level number increases the detail of the information logged, but even when level is set to 1, the named.run file grows very rapidly. Whenever you use debugging, keep an eye on the size of the named.run file and use SIGUSR2 to close and remove the file if it gets too large. Signal handling is covered in the next section.

It is not necessary to turn on debugging with the -d option to receive error messages from named. named displays error messages on the console and stores them in the messages, even if debugging is not specified. The -d option provides additional debugging information.

-p port[/localport]

Defines the UDP/TCP port used by named. port is the port number used to connect to the remote name server. localport is the number of the port on which the local name server daemon listens for connections. If the -p option is not specified, the standard port (53) is used. Since port 53 is a well-known port, changing the port number makes the name server inaccessible to standard software packages. Therefore, -p is only used for testing.

-b bootfile

Specifies the file named uses as its configuration file. By default the configuration file is /etc/named.boot, but the -b option allows the administrator to choose another configuration file. Note that the -b is optional. As long as the filename used for bootfile doesn't start with a dash, the -b flag is not required. Any filename written on the named command line is assumed to be the boot file.

-q

Logs all incoming queries. named must be compiled with the QRYLOG option set to enable this type of logging.

-r

Turns off recursion. With this option set, the server will only provide answers for zones for which it is an authoritative server. It will not pursue the query through other servers or zones.

C.1.1 Signal Processing

named handles the following signals:

SIGHUP

Causes named to reread the named.boot file and reload the name server database. named then continues to run with the new configuration. This signal is particularly useful for forcing secondary servers to reload a database from the primary server. Normally the databases are downloaded from the primary server on a periodic basis. Using SIGHUP causes the reload to occur immediately.

SIGINT

Causes named to dump its cache to /usr/tmp/named_dump.db. The dump file contains all of the domain information that the local name server knows. The file begins with the root servers, and marks off every domain under the root that the local server knows anything about. If you examine this file, you'll see that it shows a complete picture of the information the server has learned.

SIGUSR1

Turns on debugging; each subsequent SIGUSR1 signal increases the level of debugging. Debugging information is written to /usr/tmp/named.run just as it is when the -d option is used on the named command line. Debugging does not have to be enabled with the -d option for the SIGUSR1 signal to work. SIGUSR1 allows debugging to be turned on when a problem is suspected, without stopping named and restarting it with the -d option.

SIGUSR2

Turns off debugging and closes /usr/tmp/named.run. After issuing SIGUSR2, you can examine named.run or remove it if it is getting too large.

Optionally, some other signals can be handled by named. These additional signals require named to be compiled with the appropriate options to support the signals:

SIGABRT

Writes statistics data to /var/tmp/named.stats. named must be compiled with -DSTATS for this signal to work.

SIGSYS

Writes profiling data into the /var/tmp directory. named must be compiled with profiling to support this signal.

SIGTERM

Writes back the primary and secondary database files. This is used to save data modified by dynamic updates before the system is shut down. named must be compiled with dynamic updating enabled.

SIGWINCH

Toggles logging of all incoming queries via syslogd. named must be compiled with QRYLOG option to support this.


Previous: B.11 The Aggregate StatementsTCP/IP Network AdministrationNext: C.2 named.boot Configuration Commands
B.11 The Aggregate StatementsBook IndexC.2 named.boot Configuration Commands