696N/A>Nameserver Configuration</
TITLE 696N/ACONTENT="Modular DocBook HTML Stylesheet Version 1.41"><
LINK 696N/ATITLE="BIND Resource Requirements" 696N/ATITLE="Advanced Concepts" >Chapter 3. Nameserver Configuration</
A>Sample Configurations</
A>Nameserver Operations</
A>In this section we provide some suggested configurations along
with guidelines for their use. We also address the topic of reasonable
NAME="sample_configuration" >3.1. Sample Configurations</
A>3.1.1. A Caching-only Nameserver</
A>The following sample configuration is appropriate for a caching-only
name server for use by clients internal to a corporation. All queries
from outside clients are refused.</
P> // Two corporate subnets we wish to allow queries from.
directory "/
etc/
namedb"; // Working directory
pid-file "
named.pid"; // Put pid file in working dir
allow-query { "corpnets"; };
// Provide a reverse mapping for the loopback address 127.0.0.1
>3.1.2. An Authoritative-only Nameserver</
A>This sample configuration is for an authoritative-only server
that is the master server for "<
TTand a slave for the subdomain "<
TT directory "/
etc/
namedb"; // Working directory
pid-file "
named.pid"; // Put pid file in working dir
allow-query { any; }; // This is the default
recursion no; // Do not provide recursive service
// Provide a reverse mapping for the loopback address 127.0.0.1
// IP addresses of slave servers allowed to transfer
example.com masters { 192.168.4.12; };
>Primitive load balancing can be achieved in <
SPANA records for one name.</
P>For example, if you have three WWW servers with network addresses
of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
following means that clients will connect to each machine one third
>Resource Record (RR) Data</
P>When a resolver queries for these records, <
SPAN them and respond to the query with the records in a different
order. In the example above, clients will randomly receive
records in the order 1, 2, 3; 2, 3, 1; and 3, 1, 2. Most clients
will use the first record returned and discard the rest.</
P>For more detail on ordering responses, check the
>. This substatement is not supported in
> 9, and only the ordering scheme described above is
> Notify is a mechanism that allows master nameservers to
notify their slave servers of changes to a zone's data. In
> from a master server, the
slave will check to see that its version of the zone is the
current version and, if not, initiate a transfer.</
P Notify is fully documented in RFC 1996. See also the description
>. For more information about
>3.4. Nameserver Operations</
A>3.4.1. Tools for Use With the Nameserver Daemon</
A>There are several indispensable diagnostic, administrative
and monitoring tools available to the system administrator for controlling
and debugging the nameserver daemon. We describe several in this
>3.4.1.1. Diagnostic Tools</
A>The domain information groper (<
Ba command line tool that can be used to gather information from
the Domain Name System servers. Dig has two modes: simple interactive
mode for a single query, and batch mode which executes a query for
each in a list of several query lines. All query options are accessible
from the command line.</
P>The usual simple use of dig will take the form</
P>dig @server domain query-type query-class</
B>For more information and a list of available commands and
> lookup using a command-line interface for
looking up Internet hostnames. By default, the utility 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
> is a program used to query Internet
> has two modes: interactive
and non-interactive. Interactive mode allows the user to query nameservers
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 nameserver 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 nameserver.</
P>Due to its arcane user interface and frequently inconsistent
behavior, we do not recommend the use of <
B>3.4.1.2. Administrative Tools</
A>Administrative tools play an integral part in the management
>The remote name daemon control
>) program allows the system
administrator to control the operation of a nameserver.
it will display a usage message as follows:</
P> is one of the following
>Display ps(1) status of named.</
P>Reload configuration file and zones.</
P>Increment debugging level by one.</
P>Set debugging level to 0.</
P>Toggle query logging.</
P>not yet implemented<
BR></
TD only command available for <
SPAN commands, and more, are planned to be implemented for
>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 <
TT>The format of the configuration file is similar to
only three statements, the <
B statements. 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 two clauses: <
Bhost name or address argument and represents the server that will
option is provided on the command line. <
Bthe name of key as its argument, as defined by a <
Badded to specify the port to which <
B> statement names a key with its
string argument. The string is required by the server to be a valid
domain name, though it need not actually be hierarchical; thus,
> statement has two clauses: <
B While the configuration parser will accept any string as the argument
to algorithm, currently only the string "<
TThas any meaning. The secret is a base-64 encoded string, typically
> statement uses the key clause
>-defined key with a server.
host name or address (addresses must be double quoted). The argument
to the key clause is the name of the key as defined by the <
B> clause will be added to a future release
to specify the port to which <
B>A sample minimal configuration file is as follows:</
P secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
default-server localhost;
>This file, if installed as <
TTwould allow the command:</
P>to connect to 127.0.0.1 port 953 and cause the nameserver
to reload, if a nameserver 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
>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.</
P> Resource Requirements</
TD