154N/A>Name Server Configuration</
TITLE 154N/ACONTENT="Modular DocBook HTML Stylesheet Version 1.79"><
LINK 154N/ATITLE="BIND 9 Administrator Reference Manual" 154N/ATITLE="BIND Resource Requirements" 154N/ATITLE="Advanced DNS Features" 61N/ASUMMARY="Header navigation table" 61N/A>BIND 9 Administrator Reference Manual</
TH 62N/A>Chapter 3. Name Server Configuration</
H1 62N/A>Table of Contents</
B 62N/A>Sample Configurations</
A 62N/A>Name Server Operations</
A 62N/A>In this section we provide some suggested configurations along
62N/Awith guidelines for their use. We also address the topic of reasonable
62N/ANAME="sample_configuration" 62N/A>3.1. Sample Configurations</
A 61N/A>3.1.1. A Caching-only Name Server</
A 154N/A>The following sample configuration is appropriate for a caching-only
154N/Aname server for use by clients internal to a corporation. All queries
154N/Afrom outside clients are refused using the <
B 154N/Aoption. Alternatively, the same effect could be achieved using suitable
61N/ACLASS="programlisting" 61N/A> // Two corporate subnets we wish to allow queries from.
61N/A allow-query { corpnets; };
61N/A// Provide a reverse mapping for the loopback address 127.0.0.1
61N/A>3.1.2. An Authoritative-only Name Server</
A 61N/A>This sample configuration is for an authoritative-only server
61N/Athat is the master server for "<
TT 61N/Aand a slave for the subdomain "<
TT 61N/ACLASS="programlisting" 62N/A allow-query-cache { none; }; // Do not allow access to cache
62N/A allow-query { any; }; // This is the default
62N/A recursion no; // Do not provide recursive service
61N/A// Provide a reverse mapping for the loopback address 127.0.0.1
62N/A masters { 192.168.4.12; };
62N/A>3.2. Load Balancing</
A 154N/A>A primitive form of load balancing can be achieved in
62N/A> by using multiple A records for one name.</
P 62N/A>For example, if you have three WWW servers with network addresses
62N/Aof 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
62N/Afollowing means that clients will connect to each machine one third
61N/A>Resource Record (RR) Data</
P 61N/A>When a resolver queries for these records, <
ACRONYM 89N/A them and respond to the query with the records in a different
154N/A order. In the example above, clients will randomly receive
154N/A records in the order 1, 2, 3; 2, 3, 1; and 3, 1, 2. Most clients
154N/A will use the first record returned and discard the rest.</
P 154N/A>For more detail on ordering responses, check the
61N/A This substatement is not supported in
61N/A> 9, and only the ordering scheme described above is
62N/A>3.3. Name Server Operations</
A 62N/A>3.3.1. Tools for Use With the Name Server Daemon</
A 154N/A>There are several indispensable diagnostic, administrative
154N/Aand monitoring tools available to the system administrator for controlling
61N/Aand debugging the name server daemon. We describe several in this
62N/ANAME="diagnostic_tools" 62N/A>3.3.1.1. Diagnostic Tools</
A 61N/A> programs are all command line tools
61N/Afor manually querying name servers. They differ in style and
62N/ACLASS="variablelist" 62N/A>The domain information groper (<
B 62N/Ais the most versatile and complete of these lookup tools.
62N/AIt has two modes: simple interactive
62N/Amode for a single query, and batch mode which executes a query for
61N/Aeach in a list of several query lines. All query options are accessible
62N/Afrom the command line.</
P 154N/A>The usual simple use of dig will take the form</
P 61N/A>dig @server domain query-type query-class</
B 62N/A>For more information and a list of available commands and
> utility emphasizes simplicity
and ease of use. By default, it converts
between host names and Internet addresses, but its functionality
can be extended with the use of options.</
P>For more information and a list of available commands and
> has two modes: interactive
and non-interactive. Interactive mode allows the user to query name servers
for information about various hosts and domains or to print a list
of hosts in a domain. Non-interactive mode is used to print just
the name and requested information for a host or domain.</
P>Interactive mode is entered when no arguments are given (the
default name server will be used) or when the first argument is a
hyphen (`-') and the second argument is the host name or Internet address
>Non-interactive mode is used when the name or Internet address
of the host to be looked up is given as the first argument. The
optional second argument specifies the host name or address of a name server.</
P>Due to its arcane user interface and frequently inconsistent
behavior, we do not recommend the use of <
B>3.3.1.2. Administrative Tools</
A>Administrative tools play an integral part in the management
checks the syntax of a <
TT> program checks a master file for
syntax and consistency.</
P>The remote name daemon control
>) program allows the system
administrator to control the operation of a name server.
it will display a usage message as follows:</
P> is one of the following:</
P>Reload configuration file and zones.</
P>Reload the given zone.</
P>Schedule zone maintenance for the given zone.</
P>Retransfer the given zone from the master.</
P>Suspend updates to a dynamic zone. This allows manual
edits to be made to a zone normally updated by dynamic update. It
also causes changes in the journal file to be synced into the master
and the journal file to be removed. All dynamic update attempts will
be refused while the zone is frozen.</
P>Enable updates to a frozen dynamic zone. This causes
the server to reload the zone from disk, and re-enables dynamic updates
after the load has completed. After a zone is unfrozen, dynamic updates
will no longer be refused.</
P>Reload the configuration file and load new zones,
but do not reload existing zone files even if they have changed.
This is faster than a full <
B is a large number of zones because it avoids the need to examine the
modification times of the zones files.
>Write server statistics to the statistics file.</
P>Toggle query logging. Query logging can also be enabled
by explicitly directing the <
B>Dump the server's caches to the dump file. </
P making sure any recent changes
made through dynamic update or IXFR are first saved to the master files
>Stop the server immediately. Recent changes
made through dynamic update or IXFR are not saved to the master files,
but will be rolled forward from the journal files when the server
>Increment the servers debugging level by one. </
P>Sets the server's debugging level to an explicit
>Sets the server's debugging level to 0.</
P>Flushes the server's cache.</
P>Display status of the server.
Note the number of zones includes the internal <
B> hint zone if there is not a
explicit root zone configured.</
Psupports all the commands of the BIND 8 <
B>A configuration file is required, since all
communication with the server is authenticated with
digital signatures that rely on a shared secret, and
there is no way to provide that secret other than with a
configuration file. The default location for the
location can be specified with the <
CODEoption. If the configuration file is not found,
>The format of the configuration file is similar to
only four statements, the <
Bstatements. These statements are what associate the
secret keys to the servers with which they are meant to
be shared. The order of statements is not
> statement has three clauses:
host name or address argument and represents the server that will
option is provided on the command line.
the name of a key as its argument, as defined by a <
B> specifies the port to which
port is given on the command line or in a
> statement defines an key to be used
> when authenticating with
>. Its syntax is identical to the
followed by a key name, which must be a valid
domain name, though it need not actually be hierarchical; thus,
> statement has two clauses:
While the configuration parser will accept any string as the argument
to algorithm, currently only the string "<
KBDhas any meaning. The secret is a base-64 encoded string.</
P> statement associates a key
> statement with a server.
host name or address. The <
B> clause specifies the name of the key
to be used when communicating with this server, and the
>A sample minimal configuration file is as follows:</
P secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
default-server 127.0.0.1;
>This file, if installed as <
TTwould allow the command:</
P>to connect to 127.0.0.1 port 953 and cause the name server
to reload, if a name server on the local machine were running with
following controls statements:</
P inet 127.0.0.1 allow { localhost; } keys { rndc_key; };
>and it had an identical key statement for
conveniently create a <
TTfile for you, and also display the
> statement that you need to
>Certain UNIX signals cause the name server to take specific
actions, as described in the following table. These signals can
>Causes the server to read <
TT>Causes the server to clean up and exit.</
P>Causes the server to clean up and exit.</
PSUMMARY="Footer navigation table" > Resource Requirements</
TD>Advanced DNS Features</
TD