0N/A<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML EXPERIMENTAL 970324//EN">
0N/A - Copyright (C) 2000 Internet Software Consortium. 0N/A - Permission to use, copy, modify, and distribute this software for any 0N/A - purpose with or without fee is hereby granted, provided that the above 180N/A - copyright notice and this permission notice appear in all copies. 180N/A - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM 0N/A - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL 0N/A - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL 0N/A - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, 0N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 0N/A - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 0N/A - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 0N/A - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 180N/A<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML EXPERIMENTAL 970324//EN">
0N/A<
META NAME="GENERATOR" CONTENT="Adobe FrameMaker 5.5/HTML Export Filter">
5N/A<
TITLE> Section 3. Nameserver Configuration</
TITLE></
HEAD>
5N/A<
BODY BGCOLOR="#ffffff">
338N/ASection 3. Nameserver Configuration</
H1>
338N/A<
P CLASS="1LevelContinued">
338N/AIn this section we provide some suggested configurations along with guidelines for their use. We also address the topic of reasonable option setting.</
P>
338N/ASample Configurations</
H3>
338N/A<
A NAME="pgfId=1079232">
338N/A3.1.1 A Caching-only Nameserver</
H4>
338N/A<
P CLASS="3LevelContinued">
338N/A<
A NAME="pgfId=1079238">
8N/AThe 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>
0N/A// Two corporate subnets we wish to allow queries from.
0N/A pid-file "
named.pid"; // Put pid file in working dir
0N/A allow-query { "corpnets "; };
27N/A// Provide a reverse mapping for the loopback address 127.0.0.1
286N/A<
A NAME="pgfId=1079323">
27N/A3.1.2 An Authoritative-only Nameserver</
H4>
27N/A<
P CLASS="3LevelContinued">
27N/A<
A NAME="pgfId=1079327">
27N/AThis sample configuration is for an authoritative-only server that is the master server for "<
EM CLASS="pathname">
27N/A" and a slave for the subdomain "<
EM CLASS="pathname">
27N/A allow-query { any; }; // This is the default
27N/A recursion no; // Do not provide recursive service
27N/A// Root server hints
27N/Azone "." { type hint; file "
root.hint"; };
311N/A// Provide a reverse mapping for the loopback address 127.0.0.1
189N/A masters { 192.168.4.12; };
27N/A<
A NAME="pgfId=997410">
27N/A3.2 Load Balancing</
H3>
27N/A<
P CLASS="2LevelContinued">
27N/A<
A NAME="pgfId=997411">
27N/APrimitive load balancing can be achieved in DNS using multiple A records for one name.</
P>
27N/A<
P CLASS="2LevelContinued">
27N/A<
A NAME="pgfId=997412">
27N/AFor 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 of the time:</
P>
27N/A<
PRE CLASS="2Level-fixed1"><
A NAME="pgfId=997454"></
A>
27N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
A NAME="pgfId=997415">
27N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
A NAME="pgfId=997417">
27N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
A NAME="pgfId=997419">
613N/A<
TD ROWSPAN="1" COLSPAN="1">
613N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/AResource Record (RR) Data</
P>
338N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
A NAME="pgfId=997425">
27N/A<
EM CLASS="grammar_literal">
189N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
A NAME="pgfId=997427">
27N/A<
EM CLASS="grammar_literal">
27N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
EM CLASS="grammar_literal">
142N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
A NAME="pgfId=997431">
27N/A<
EM CLASS="grammar_literal">
27N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
A NAME="pgfId=997433">
27N/A<
EM CLASS="grammar_literal">
311N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
EM CLASS="grammar_literal">
27N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
A NAME="pgfId=997437">
27N/A<
EM CLASS="grammar_literal">
27N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
A NAME="pgfId=997439">
27N/A<
EM CLASS="grammar_literal">
27N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
A NAME="pgfId=997441">
27N/A<
EM CLASS="grammar_literal">
189N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
EM CLASS="grammar_literal">
27N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
A NAME="pgfId=997445">
27N/A<
EM CLASS="grammar_literal">
27N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
A NAME="pgfId=997447">
27N/A<
EM CLASS="grammar_literal">
332N/A<
TD ROWSPAN="1" COLSPAN="1">
332N/A<
EM CLASS="grammar_literal">
0N/A<
TD ROWSPAN="1" COLSPAN="1">
0N/A<
A NAME="pgfId=997451">
0N/A<
EM CLASS="grammar_literal">
27N/A<
TD ROWSPAN="1" COLSPAN="1">
27N/A<
P CLASS="CellBody">
27N/A<
A NAME="pgfId=997453">
27N/A<
EM CLASS="grammar_literal">
0N/A<
P CLASS="2LevelContinued">
0N/A<
A NAME="pgfId=997455">
0N/AWhen a resolver queries for these records, BIND will rotate 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>
0N/A<
P CLASS="2LevelContinued">
0N/A<
A NAME="pgfId=997456">
0N/AFor more detail on ordering responses, check the <
CODE CLASS="Program-Process">
0N/A substatement in the <
CODE CLASS="Program-Process">
0N/A statement under <
A HREF="Bv9ARM.6.html#22766" CLASS="XRef">RRset Ordering</
A>. This substatement is not supported in BIND 9, and only the ordering scheme described above is available.</
P>
0N/A<
A NAME="pgfId=997460">
0N/A<
P CLASS="2LevelContinued">
0N/A<
A NAME="pgfId=997461">
0N/ADNS Notify is a mechanism that allows master nameservers to notify their slave servers of changes to a zone's data. In response to a <
CODE CLASS="Program-Process">
0N/A 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>
0N/A<
P CLASS="2LevelContinued">
0N/A<
A NAME="pgfId=1078896">
0N/ADNS Notify is fully documented in RFC 1996. See also the description of the zone option <
CODE CLASS="Program-Process">
0N/A. More information about <
CODE CLASS="Program-Process">
0N/A can be found under <
A HREF="Bv9ARM.6.html#12205" CLASS="XRef">Boolean Options</
A>
0N/A<
A NAME="pgfId=1078903">
0N/A3.4 Nameserver Operations</
H3>
0N/A<
A NAME="pgfId=997464">
0N/A3.4.1 Tools for Use With the Nameserver Daemon</
H4>
0N/A<
P CLASS="3LevelContinued">
0N/A<
A NAME="pgfId=997465">
0N/AThere 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 section </
P>
0N/A<
A NAME="pgfId=997466">
0N/A3.4.1.1 Diagnostic Tools</
H5>
0N/A<
H5 CLASS="Subhead4">
0N/A<
A NAME="pgfId=997467">
0N/A<
P CLASS="4LevelContinued">
0N/A<
A NAME="pgfId=997468">
0N/AThe domain information groper (<
CODE CLASS="Program-Process">
0N/A) is a 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>
0N/A<
H5 CLASS="Subhead4">
0N/A<
A NAME="pgfId=997469">
0N/Adig [@server] domain [<query-type>] [<query-class>]
0N/A [+<query-option>] [-<dig-option>] [%comment]</
STRONG></
CODE>
0N/A<
P CLASS="4LevelContinued">
0N/A<
A NAME="pgfId=997471">
0N/AThe usual simple use of dig will take the form</
P>
0N/Adig @server domain query-type query-class</
STRONG></
CODE>
0N/A<
P CLASS="4LevelContinued">
0N/A<
A NAME="pgfId=997473">
0N/AFor more information and a list of available commands and options, see the <
CODE CLASS="Program-Process">
0N/Adig</
CODE> man page.</
P>
0N/A<
H5 CLASS="Subhead4">
0N/A<
A NAME="pgfId=997474">
0N/A<
P CLASS="4LevelContinued">
0N/A<
A NAME="pgfId=997475">
0N/AThe<
EM CLASS="pathname">
0N/A<
CODE CLASS="Program-Process">
0N/Autility provides a simple DNS 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>
0N/A<
H5 CLASS="Subhead4">
0N/A<
A NAME="pgfId=997476">
0N/Ahost [-aCdlrTwv] [-c class] [-N ndots] [-t type]
0N/A [-W timeout] [-R retries] hostname [server]
0N/A</
STRONG></
CODE></
PRE>
0N/AFor more information and a list of available commands and options, see the <
CODE CLASS="Program-Process">
0N/Ahost</
CODE> man page.<
p></
P>
0N/A<
H5 CLASS="Subhead4">
0N/A<
A NAME="pgfId=997478">
0N/A<
P CLASS="4LevelContinued">
0N/A<
A NAME="pgfId=997479">
0N/A<
CODE CLASS="Program-Process">
0N/A is a program used to query Internet domain nameservers. <
CODE CLASS="Program-Process">
0N/A 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>
0N/A<
H5 CLASS="Subhead4">
0N/A<
A NAME="pgfId=997480">
0N/Anslookup [-option ...] [host-to-find | -[server]]</
STRONG></
CODE>
0N/A<
P CLASS="4LevelContinued">
0N/A<
A NAME="pgfId=997482">
0N/AInteractive 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 of a nameserver.</
P>
0N/A<
P CLASS="4LevelContinued">
0N/A<
A NAME="pgfId=997483">
0N/ANon-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>
0N/A<
P CLASS="4LevelContinued">
0N/A<
A NAME="pgfId=997484">
0N/AThe options listed under the "set" command (see the <
CODE CLASS="Program-Process">
0N/A man page for details) can be specified in the <
EM CLASS="pathname">
0N/A file in the user's home directory if they are listed one per line. Options can also be specified on the command line if they precede the arguments and are prefixed with a hyphen. For example, to change the default query type to host information, and the initial time-out to 10 seconds, type:</
P>
0N/Anslookup -query=hinfo -timeout=10</
STRONG></
CODE>
0N/A<
P CLASS="4LevelContinued">
0N/A<
A NAME="pgfId=1079183">
0N/AFor more information and a list of available commands and options, see the <
CODE CLASS="Program-Process">
189N/A<
P CLASS="4LevelContinued">
189N/A<
A NAME="pgfId=1079184">
222N/ADue to its arcane user interface and frequently inconsistent behavior, we do not recommend the use of <
CODE CLASS="Program-Process">
222N/A, and it is not installed by default when installing BIND 9. Use <
CODE CLASS="Program-Process">
189N/A<
A NAME="pgfId=1079185">
189N/A3.4.1.2 Administrative Tools</
H5>
189N/A<
P CLASS="4LevelContinued">
189N/AAdministrative tools play an integral part in the management of a server.</
P>
189N/A <
H5 CLASS="Subhead4"> <
A NAME="pgfId=997489"> </
A> rndc</
H5>
189N/A <
P CLASS="4LevelContinued"> <
A NAME="pgfId=997490"> </
A> The remote name
189N/A daemon control (<
CODE CLASS="Program-Process">rndc</
CODE>) program allows
189N/A the system administrator to control the operation of a nameserver. If
189N/A you run (<
code class="Program-Process">rndc</
code>) without any options
189N/A it will display a usage message as follows: </
P>
189N/A<
CODE><
STRONG>rndc [-c config] [-s server] [-p port] [-y key] command [command ...]
189N/A <
CODE><
STRONG>command</
STRONG></
CODE> is one of the following for named:
189N/A <
TD>*<
code>status</
code></
TD>
189N/A <
TD>Display ps(1) status of named.</
TD>
189N/A <
TD><
CODE>reload</
CODE></
TD> <
TD>Reload configuration file and zones.</
TD>
189N/A <
TD>*<
CODE>trace</
CODE></
TD> <
TD>Increment debugging level by one.</
TD>
0N/A <
TD>*<
CODE>notrace</
CODE></
TD> <
TD>Set debugging level to 0.</
TD>
0N/A <
TD>*<
CODE>querylog</
CODE></
TD> <
TD>Toggle query logging.</
TD>
0N/A <
TD>*<
CODE>stop</
CODE></
TD> <
TD>Stop the server.</
TD>
613N/A <
TD>*<
CODE>restart</
CODE></
TD> <
TD>Restart the server.</
TD>
27N/A <
TD>* == not yet implemented</
TD>
27N/A <
p>As noted above, "reload" is the only command available for BIND 9.0.0.
27N/A The other commands, and more, are planned to be implemented for future
27N/A <
p> A configuration file is required, since all communication with the
0N/A server is authenticated with digital signatures that rely on a shared
5N/A secret, and there is no way to provide that secret other than with a
5N/A configuration file. The default location for the rndc configuration
file is <
EM>/
etc/
rndc.conf</
EM>, but an alternate location can be specified with
the "<
CODE>-c</
CODE>" option.</
p>
<
p>The format of the configuration file is similar to that of
named.conf,
but limited to only three statements, the <
CODE>options{}</
CODE>, <
CODE>key{}</
CODE> and <
CODE>server{}</
CODE>
statements. These statements are what associate the secret keys to the
servers with which they are meant to be shared. The order of statements
<
p>The <
CODE>options{}</
CODE> statement has two clauses: <
CODE>default-server</
CODE> and default-key.
<
CODE>default-server</
CODE> takes a host name or address argument and represents the server that will be contacted if
no "<
CODE>-s</
CODE>" option is provided on the command line. default-key takes the
name of the key as its argument, as defined by a <
CODE>key{}</
CODE> statement. In
the future a default-port clause will be added to specify the port to
which <
CODE>rndc</
CODE> should connect.</
p>
<
p>The <
CODE>key{}</
CODE> 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, a string like "rndc_key" is a valid
name. The <
CODE>key{}</
CODE> statement has two clauses: <
CODE>algorithm</
CODE> and <
CODE>secret</
CODE>. While
the configuration parser will accept any string as the argument to algorithm,
currently only the string "hmac-md5" has any meaning. The secret is
a base-64 encoded string, typically generated with either <
CODE>dnssec-keygen</
CODE>
or <
CODE>mmencode</
CODE>.</
p>
<
p>The <
CODE>server{}</
CODE> statement uses the key clause to associate a <
CODE>key{}</
CODE>-defined
key with a server. The argument to the <
CODE>server{}</
CODE> statement is a host
name or address (addresses must be double quoted). The argument to the
key clause is the name of key as defined by the <
CODE>key{}</
CODE> statement. A port
clause will be added to a future release to specify the port to which
rndc should connect on the given server.</
p>
<
p>A sample minimal configuration file is as follows:</
p>
<
CODE><
STRONG>key rndc_key {
secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
default-server localhost;
<
p>This file, if installed as<
EM> /
etc/
rndc.conf</
EM>, would allow the command:</
p>
<
p> <
strong><
code>$ rndc reload</
code></
strong></
p>
<
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
inet 127.0.0.1 allow { localhost; } keys { rndc_key; };
<
p>and it had an identical key statement for <
CODE>rndc_key</
CODE>.</
p>
<
P CLASS="4LevelContinued"> </
P>
<
P CLASS="3LevelContinued">
Certain UNIX signals cause the name server to take specific actions, as described in the following table. These signals can be sent using the <
CODE CLASS="Program-Process">
<
P CLASS="3LevelContinued">
<
TD ROWSPAN="1" COLSPAN="1">
<
CODE CLASS="Program-Process">
<
TD ROWSPAN="1" COLSPAN="1">
Causes the server to read <
CODE CLASS="Program-Process">
and reload the database. </
P>
<
TD ROWSPAN="1" COLSPAN="1">
<
CODE CLASS="Program-Process">
<
TD ROWSPAN="1" COLSPAN="1">
Causes the server to clean up and exit.</
P>
<
TD ROWSPAN="1" COLSPAN="1">
<
CODE CLASS="Program-Process">
<
TD ROWSPAN="1" COLSPAN="1">
Causes the server to clean up and exit.</
P>
<
p>Return to <
A href="Bv9ARM.html">BIND 9 Administrator Reference Manual</
A> table of contents.</
p>