1393N/A - Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC") 1382N/A - Copyright (C) 2000-2003 Internet Software Consortium. 1382N/A - Permission to use, copy, modify, and/or distribute this software for any 1382N/A - purpose with or without fee is hereby granted, provided that the above 1382N/A - copyright notice and this permission notice appear in all copies. 1382N/A - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 1382N/A - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 1382N/A - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 1393N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 1382N/A - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 1382N/A - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 1394N/A - PERFORMANCE OF THIS SOFTWARE. 1382N/A<
meta http-
equiv="Content-Type" content="text/html; charset=ISO-8859-1">
1382N/A<
title>Chapter�3.�Name Server Configuration</
title>
1382N/A<
meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
1382N/A<
link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
1393N/A<
body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
1382N/A<
table width="100%" summary="Navigation header">
1393N/A<
tr><
th colspan="3" align="center">Chapter�3.�Name Server Configuration</
th></
tr>
1393N/A<
td width="20%" align="left">
1393N/A<
th width="60%" align="center">�</
th>
1399N/A<
div class="chapter" lang="en">
1399N/A<
div class="titlepage"><
div><
div><
h2 class="title">
1393N/A<
a name="Bv9ARM.ch03"></
a>Chapter�3.�Name Server Configuration</
h2></
div></
div></
div>
1399N/A<
p><
b>Table of Contents</
b></
p>
1393N/A<
dt><
span class="sect1"><
a href="Bv9ARM.ch03.html#sample_configuration">Sample Configurations</
a></
span></
dt>
1393N/A<
dt><
span class="sect2"><
a href="Bv9ARM.ch03.html#id2567995">An Authoritative-only Name Server</
a></
span></
dt>
1393N/A<
dt><
span class="sect2"><
a href="Bv9ARM.ch03.html#id2568377">Tools for Use With the Name Server Daemon</
a></
span></
dt>
1393N/A In this chapter we provide some suggested configurations along
1393N/A with guidelines for their use. We suggest reasonable values for
1393N/A<
div class="sect1" lang="en">
1393N/A<
div class="titlepage"><
div><
div><
h2 class="title" style="clear: both">
1393N/A<
a name="sample_configuration"></
a>Sample Configurations</
h2></
div></
div></
div>
1393N/A<
div class="sect2" lang="en">
1393N/A<
div class="titlepage"><
div><
div><
h3 class="title">
1393N/A<
a name="id2567774"></
a>A Caching-only Name Server</
h3></
div></
div></
div>
1393N/A The following sample configuration is appropriate for a caching-only
1393N/A name server for use by clients internal to a corporation. All
1393N/A from outside clients are refused using the <
span><
strong class="command">allow-query</
strong></
span>
1393N/A option. Alternatively, the same effect could be achieved using
1393N/A<
pre class="programlisting">
1393N/A// Two corporate subnets we wish to allow queries from.
allow-query { corpnets; };
// Provide a reverse mapping for the loopback
<
div class="sect2" lang="en">
<
div class="titlepage"><
div><
div><
h3 class="title">
<
a name="id2567995"></
a>An Authoritative-only Name Server</
h3></
div></
div></
div>
This sample configuration is for an authoritative-only server
that is the master server for "<
code class="filename">
example.com</
code>"
and a slave for the subdomain "<
code class="filename">
eng.example.com</
code>".
<
pre class="programlisting">
// Do not allow access to cache
allow-query-cache { none; };
// Do not provide recursive service
// Provide a reverse mapping for the loopback
// IP addresses of slave servers allowed to
masters { 192.168.4.12; };
<
div class="sect1" lang="en">
<
div class="titlepage"><
div><
div><
h2 class="title" style="clear: both">
<
a name="id2568018"></
a>Load Balancing</
h2></
div></
div></
div>
A primitive form of load balancing can be achieved in
the <
acronym class="acronym">DNS</
acronym> by using multiple records
(such as multiple A records) for one name.
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
<
div class="informaltable"><
table border="1">
Resource Record (RR) Data
<
code class="literal">www</
code>
<
code class="literal">600</
code>
<
code class="literal">IN</
code>
<
code class="literal">A</
code>
<
code class="literal">10.0.0.1</
code>
<
code class="literal">600</
code>
<
code class="literal">IN</
code>
<
code class="literal">A</
code>
<
code class="literal">10.0.0.2</
code>
<
code class="literal">600</
code>
<
code class="literal">IN</
code>
<
code class="literal">A</
code>
<
code class="literal">10.0.0.3</
code>
When a resolver queries for these records, <
acronym class="acronym">BIND</
acronym> 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.
For more detail on ordering responses, check the
<
span><
strong class="command">rrset-order</
strong></
span> sub-statement in the
<
span><
strong class="command">options</
strong></
span> statement, see
<
div class="sect1" lang="en">
<
div class="titlepage"><
div><
div><
h2 class="title" style="clear: both">
<
a name="id2568372"></
a>Name Server Operations</
h2></
div></
div></
div>
<
div class="sect2" lang="en">
<
div class="titlepage"><
div><
div><
h3 class="title">
<
a name="id2568377"></
a>Tools for Use With the Name Server Daemon</
h3></
div></
div></
div>
This section describes several indispensable diagnostic,
administrative and monitoring tools available to the system
administrator for controlling and debugging the name server
<
div class="sect3" lang="en">
<
div class="titlepage"><
div><
div><
h4 class="title">
<
a name="diagnostic_tools"></
a>Diagnostic Tools</
h4></
div></
div></
div>
The <
span><
strong class="command">dig</
strong></
span>, <
span><
strong class="command">host</
strong></
span>, and
<
span><
strong class="command">nslookup</
strong></
span> programs are all command
for manually querying name servers. They differ in style and
<
div class="variablelist"><
dl>
<
dt><
span class="term"><
a name="dig"></
a><
span><
strong class="command">dig</
strong></
span></
span></
dt>
The domain information groper (<
span><
strong class="command">dig</
strong></
span>)
is the most versatile and complete of these lookup tools.
It has two modes: simple interactive
mode for a single query, and batch mode which executes a
each in a list of several query lines. All query options are
<
div class="cmdsynopsis"><
p><
code class="command">dig</
code> [@<
em class="replaceable"><
code>server</
code></
em>] <
em class="replaceable"><
code>domain</
code></
em> [<
em class="replaceable"><
code>query-type</
code></
em>] [<
em class="replaceable"><
code>query-class</
code></
em>] [+<
em class="replaceable"><
code>query-option</
code></
em>] [-<
em class="replaceable"><
code>dig-option</
code></
em>] [%<
em class="replaceable"><
code>comment</
code></
em>]</
p></
div>
The usual simple use of <
span><
strong class="command">dig</
strong></
span> will take the form
<
span><
strong class="command">dig @server domain query-type query-class</
strong></
span>
For more information and a list of available commands and
options, see the <
span><
strong class="command">dig</
strong></
span> man
<
dt><
span class="term"><
span><
strong class="command">host</
strong></
span></
span></
dt>
The <
span><
strong class="command">host</
strong></
span> utility emphasizes
and ease of use. By default, it converts
between host names and Internet addresses, but its
can be extended with the use of options.
<
div class="cmdsynopsis"><
p><
code class="command">host</
code> [-aCdlnrsTwv] [-c <
em class="replaceable"><
code>class</
code></
em>] [-N <
em class="replaceable"><
code>ndots</
code></
em>] [-t <
em class="replaceable"><
code>type</
code></
em>] [-W <
em class="replaceable"><
code>timeout</
code></
em>] [-R <
em class="replaceable"><
code>retries</
code></
em>] [-m <
em class="replaceable"><
code>flag</
code></
em>] [-4] [-6] <
em class="replaceable"><
code>hostname</
code></
em> [<
em class="replaceable"><
code>server</
code></
em>]</
p></
div>
For more information and a list of available commands and
options, see the <
span><
strong class="command">host</
strong></
span> man
<
dt><
span class="term"><
span><
strong class="command">nslookup</
strong></
span></
span></
dt>
<
p><
span><
strong class="command">nslookup</
strong></
span>
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
<
div class="cmdsynopsis"><
p><
code class="command">nslookup</
code> [-option...] [[<
em class="replaceable"><
code>host-to-find</
code></
em>] | [- [server]]]</
p></
div>
Interactive mode is entered when no arguments are given (the
default name server will be used) or when the first argument
hyphen (`-') and the second argument is the host name or
Non-interactive mode is used when the name or Internet
of the host to be looked up is given as the first argument.
optional second argument specifies the host name or address
Due to its arcane user interface and frequently inconsistent
behavior, we do not recommend the use of <
span><
strong class="command">nslookup</
strong></
span>.
Use <
span><
strong class="command">dig</
strong></
span> instead.
<
div class="sect3" lang="en">
<
div class="titlepage"><
div><
div><
h4 class="title">
<
a name="admin_tools"></
a>Administrative Tools</
h4></
div></
div></
div>
Administrative tools play an integral part in the management
<
div class="variablelist"><
dl>
<
a name="named-checkconf"></
a><
span class="term"><
span><
strong class="command">named-checkconf</
strong></
span></
span>
The <
span><
strong class="command">named-checkconf</
strong></
span> program
checks the syntax of a <
code class="filename">
named.conf</
code> file.
<
div class="cmdsynopsis"><
p><
code class="command">named-checkconf</
code> [-jvz] [-t <
em class="replaceable"><
code>directory</
code></
em>] [<
em class="replaceable"><
code>filename</
code></
em>]</
p></
div>
<
a name="named-checkzone"></
a><
span class="term"><
span><
strong class="command">named-checkzone</
strong></
span></
span>
The <
span><
strong class="command">named-checkzone</
strong></
span> program
<
div class="cmdsynopsis"><
p><
code class="command">named-checkzone</
code> [-djqvD] [-c <
em class="replaceable"><
code>class</
code></
em>] [-o <
em class="replaceable"><
code>output</
code></
em>] [-t <
em class="replaceable"><
code>directory</
code></
em>] [-w <
em class="replaceable"><
code>directory</
code></
em>] [-k <
em class="replaceable"><
code>(ignore|warn|fail)</
code></
em>] [-n <
em class="replaceable"><
code>(ignore|warn|fail)</
code></
em>] [-W <
em class="replaceable"><
code>(ignore|warn)</
code></
em>] <
em class="replaceable"><
code>zone</
code></
em> [<
em class="replaceable"><
code>filename</
code></
em>]</
p></
div>
<
a name="named-compilezone"></
a><
span class="term"><
span><
strong class="command">named-compilezone</
strong></
span></
span>
Similar to <
span><
strong class="command">named-checkzone,</
strong></
span> but
it always dumps the zone content to a specified file
(typically in a different format).
<
a name="rndc"></
a><
span class="term"><
span><
strong class="command">rndc</
strong></
span></
span>
The remote name daemon control
(<
span><
strong class="command">rndc</
strong></
span>) program allows the
administrator to control the operation of a name server.
Since <
acronym class="acronym">BIND</
acronym> 9.2, <
span><
strong class="command">rndc</
strong></
span>
supports all the commands of the BIND 8 <
span><
strong class="command">ndc</
strong></
span>
utility except <
span><
strong class="command">ndc start</
strong></
span> and
<
span><
strong class="command">ndc restart</
strong></
span>, which were also
not supported in <
span><
strong class="command">ndc</
strong></
span>'s
If you run <
span><
strong class="command">rndc</
strong></
span> without any
it will display a usage message as follows:
<
div class="cmdsynopsis"><
p><
code class="command">rndc</
code> [-c <
em class="replaceable"><
code>config</
code></
em>] [-s <
em class="replaceable"><
code>server</
code></
em>] [-p <
em class="replaceable"><
code>port</
code></
em>] [-y <
em class="replaceable"><
code>key</
code></
em>] <
em class="replaceable"><
code>command</
code></
em> [<
em class="replaceable"><
code>command</
code></
em>...]</
p></
div>
<
p>The <
span><
strong class="command">command</
strong></
span>
<
div class="variablelist"><
dl>
<
dt><
span class="term"><
strong class="userinput"><
code>reload</
code></
strong></
span></
dt>
Reload configuration file and zones.
<
dt><
span class="term"><
strong class="userinput"><
code>reload <
em class="replaceable"><
code>zone</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>class</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span>]</
code></
strong></
span></
dt>
<
dt><
span class="term"><
strong class="userinput"><
code>refresh <
em class="replaceable"><
code>zone</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>class</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span>]</
code></
strong></
span></
dt>
Schedule zone maintenance for the given zone.
<
dt><
span class="term"><
strong class="userinput"><
code>retransfer <
em class="replaceable"><
code>zone</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>class</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span>]</
code></
strong></
span></
dt>
Retransfer the given zone from the master.
<
dt><
span class="term"><
strong class="userinput"><
code>sign <
em class="replaceable"><
code>zone</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>class</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span>]</
code></
strong></
span></
dt>
Fetch all DNSSEC keys for the given zone
from the key directory (see
<
span><
strong class="command">key-directory</
strong></
span> in
Usage">the section called “<
span><
strong class="command">options</
strong></
span> Statement Definition and
Usage”</
a>). If they are within
their publication period, merge them into the
zone's DNSKEY RRset. If the DNSKEY RRset
is changed, then the zone is automatically
re-signed with the new key set.
This command requires that the
<
span><
strong class="command">auto-dnssec</
strong></
span> zone option be set
to <
code class="literal">allow</
code> or
<
code class="literal">maintain</
code>,
and also requires the zone to be configured to
See <
a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called “Dynamic Update Policies”</
a> for
<
dt><
span class="term"><
strong class="userinput"><
code>loadkeys <
em class="replaceable"><
code>zone</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>class</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span>]</
code></
strong></
span></
dt>
Fetch all DNSSEC keys for the given zone
from the key directory (see
<
span><
strong class="command">key-directory</
strong></
span> in
Usage">the section called “<
span><
strong class="command">options</
strong></
span> Statement Definition and
Usage”</
a>). If they are within
their publication period, merge them into the
zone's DNSKEY RRset. Unlike <
span><
strong class="command">rndc
sign</
strong></
span>, however, the zone is not
immediately re-signed by the new keys, but is
allowed to incrementally re-sign over time.
This command requires that the
<
span><
strong class="command">auto-dnssec</
strong></
span> zone option
be set to <
code class="literal">maintain</
code>,
and also requires the zone to be configured to
See <
a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called “Dynamic Update Policies”</
a> for
<
dt><
span class="term"><
strong class="userinput"><
code>freeze
[<
span class="optional"><
em class="replaceable"><
code>zone</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>class</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span>]</
span>]</
code></
strong></
span></
dt>
Suspend updates to a dynamic zone. If no zone is
specified, then all zones are suspended. 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 file.
All dynamic update attempts will be refused while
<
dt><
span class="term"><
strong class="userinput"><
code>thaw
[<
span class="optional"><
em class="replaceable"><
code>zone</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>class</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span>]</
span>]</
code></
strong></
span></
dt>
Enable updates to a frozen dynamic zone. If no
zone is specified, then all frozen zones are
enabled. This causes the server to reload the zone
from disk, and re-enables dynamic updates after the
load has completed. After a zone is thawed,
dynamic updates will no longer be refused. If
the zone has changed and the
<
span><
strong class="command">ixfr-from-differences</
strong></
span> option is
in use, then the journal file will be updated to
reflect changes in the zone. Otherwise, if the
zone has changed, any existing journal file will be
<
dt><
span class="term"><
strong class="userinput"><
code>sync
[<
span class="optional">-clean</
span>]
[<
span class="optional"><
em class="replaceable"><
code>zone</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>class</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span>]</
span>]</
code></
strong></
span></
dt>
Sync changes in the journal file for a dynamic zone
to the master file. If the "-clean" option is
specified, the journal file is also removed. If
no zone is specified, then all zones are synced.
<
dt><
span class="term"><
strong class="userinput"><
code>notify <
em class="replaceable"><
code>zone</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>class</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span>]</
code></
strong></
span></
dt>
Resend NOTIFY messages for the zone.
<
dt><
span class="term"><
strong class="userinput"><
code>reconfig</
code></
strong></
span></
dt>
Reload the configuration file and load new zones,
but do not reload existing zone files even if they
This is faster than a full <
span><
strong class="command">reload</
strong></
span> when there
is a large number of zones because it avoids the need
modification times of the zones files.
<
dt><
span class="term"><
strong class="userinput"><
code>zonestatus
[<
span class="optional"><
em class="replaceable"><
code>zone</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>class</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span>]</
span>]</
code></
strong></
span></
dt>
Displays the current status of the given zone,
including the master file name and any include
files from which it was loaded, when it was most
recently loaded, the current serial number, the
number of nodes, whether the zone supports
dynamic updates, whether the zone is DNSSEC
signed, whether it uses automatic DNSSEC key
management or inline signing, and the scheduled
refresh or expiry times for the zone.
<
dt><
span class="term"><
strong class="userinput"><
code>stats</
code></
strong></
span></
dt>
Write server statistics to the statistics file.
<
dt><
span class="term"><
strong class="userinput"><
code>querylog</
code></
strong>
[<
span class="optional">on|off</
span>]
Enable or disable query logging. (For backward
compatibility, this command can also be used without
an argument to toggle query logging on and off.)
Query logging can also be enabled
by explicitly directing the <
span><
strong class="command">queries</
strong></
span>
<
span><
strong class="command">category</
strong></
span> to a
<
span><
strong class="command">channel</
strong></
span> in the
<
span><
strong class="command">logging</
strong></
span> section of
<
code class="filename">
named.conf</
code> or by specifying
<
span><
strong class="command">querylog yes;</
strong></
span> in the
<
span><
strong class="command">options</
strong></
span> section of
<
dt><
span class="term"><
strong class="userinput"><
code>dumpdb
[<
span class="optional">-all|-cache|-zone</
span>]
[<
span class="optional"><
em class="replaceable"><
code>view ...</
code></
em></
span>]</
code></
strong></
span></
dt>
Dump the server's caches (default)
and/
or zones to
dump file for the specified views. If no view is
<
dt><
span class="term"><
strong class="userinput"><
code>secroots
[<
span class="optional"><
em class="replaceable"><
code>view ...</
code></
em></
span>]</
code></
strong></
span></
dt>
Dump the server's security roots to the secroots
file for the specified views. If no view is
specified, security roots for all
<
dt><
span class="term"><
strong class="userinput"><
code>stop [<
span class="optional">-p</
span>]</
code></
strong></
span></
dt>
Stop the server, making sure any recent changes
made through dynamic update or IXFR are first saved to
the master files of the updated zones.
If <
code class="option">-p</
code> is specified <
span><
strong class="command">named</
strong></
span>'s process id is returned.
This allows an external process to determine when <
span><
strong class="command">named</
strong></
span>
<
dt><
span class="term"><
strong class="userinput"><
code>halt [<
span class="optional">-p</
span>]</
code></
strong></
span></
dt>
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 is restarted.
If <
code class="option">-p</
code> is specified <
span><
strong class="command">named</
strong></
span>'s process id is returned.
This allows an external process to determine when <
span><
strong class="command">named</
strong></
span>
<
dt><
span class="term"><
strong class="userinput"><
code>trace</
code></
strong></
span></
dt>
Increment the servers debugging level by one.
<
dt><
span class="term"><
strong class="userinput"><
code>trace <
em class="replaceable"><
code>level</
code></
em></
code></
strong></
span></
dt>
Sets the server's debugging level to an explicit
<
dt><
span class="term"><
strong class="userinput"><
code>notrace</
code></
strong></
span></
dt>
Sets the server's debugging level to 0.
<
dt><
span class="term"><
strong class="userinput"><
code>flush</
code></
strong></
span></
dt>
Flushes the server's cache.
<
dt><
span class="term"><
strong class="userinput"><
code>flushname</
code></
strong>
<
em class="replaceable"><
code>name</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]
Flushes the given name from the server's DNS cache,
and from the server's nameserver address database
<
dt><
span class="term"><
strong class="userinput"><
code>flushtree</
code></
strong>
<
em class="replaceable"><
code>name</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]
Flushes the given name, and all of its subdomains,
from the server's DNS cache. (The server's
nameserver address database is not affected.)
<
dt><
span class="term"><
strong class="userinput"><
code>status</
code></
strong></
span></
dt>
Display status of the server.
Note that the number of zones includes the internal <
span><
strong class="command">
bind/
CH</
strong></
span> zone
and the default <
span><
strong class="command">/
IN</
strong></
span>
hint zone if there is not an
explicit root zone configured.
<
dt><
span class="term"><
strong class="userinput"><
code>recursing</
code></
strong></
span></
dt>
Dump the list of queries <
span><
strong class="command">named</
strong></
span> is currently recursing
<
dt><
span class="term"><
strong class="userinput"><
code>validation
[<
span class="optional">on|off</
span>]
[<
span class="optional"><
em class="replaceable"><
code>view ...</
code></
em></
span>]
</
code></
strong></
span></
dt>
Enable or disable DNSSEC validation.
Note <
span><
strong class="command">dnssec-enable</
strong></
span> also needs to be
set to <
strong class="userinput"><
code>yes</
code></
strong> to be effective.
<
dt><
span class="term"><
strong class="userinput"><
code>tsig-list</
code></
strong></
span></
dt>
List the names of all TSIG keys currently configured
for use by <
span><
strong class="command">named</
strong></
span> in each view. The
list both statically configured keys and dynamic
<
dt><
span class="term"><
strong class="userinput"><
code>tsig-delete</
code></
strong>
<
em class="replaceable"><
code>keyname</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span></
dt>
Delete a given TKEY-negotiated key from the server.
(This does not apply to statically configured TSIG
<
dt><
span class="term"><
strong class="userinput"><
code>addzone
<
em class="replaceable"><
code>zone</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>class</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span>]
<
em class="replaceable"><
code>configuration</
code></
em>
</
code></
strong></
span></
dt>
Add a zone while the server is running. This
<
span><
strong class="command">allow-new-zones</
strong></
span> option to be set
to <
strong class="userinput"><
code>yes</
code></
strong>. The
<
em class="replaceable"><
code>configuration</
code></
em> string
specified on the command line is the zone
configuration text that would ordinarily be
placed in <
code class="filename">
named.conf</
code>.
The configuration is saved in a file called
<
code class="filename"><
em class="replaceable"><
code>hash</
code></
em>.nzf</
code>,
where <
em class="replaceable"><
code>hash</
code></
em> is a
cryptographic hash generated from the name of
the view. When <
span><
strong class="command">named</
strong></
span> is
restarted, the file will be loaded into the view
configuration, so that zones that were added
can persist after a restart.
This sample <
span><
strong class="command">addzone</
strong></
span> command
would add the zone <
code class="literal">
example.com</
code>
<
code class="prompt">$ </
code><
strong class="userinput"><
code>rndc addzone
example.com '{ type master; file "
example.com.db"; };'</
code></
strong>
(Note the brackets and semi-colon around the zone
<
dt><
span class="term"><
strong class="userinput"><
code>delzone
<
em class="replaceable"><
code>zone</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>class</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span>]
</
code></
strong></
span></
dt>
Delete a zone while the server is running.
Only zones that were originally added via
<
span><
strong class="command">rndc addzone</
strong></
span> can be deleted
<
dt><
span class="term"><
strong class="userinput"><
code>signing
[<
span class="optional">( -list | -clear <
em class="replaceable"><
code>
keyid/
algorithm</
code></
em> | -clear <
code class="literal">all</
code> | -nsec3param ( <
em class="replaceable"><
code>parameters</
code></
em> | <
code class="literal">none</
code> ) ) </
span>]
<
em class="replaceable"><
code>zone</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>class</
code></
em>
[<
span class="optional"><
em class="replaceable"><
code>view</
code></
em></
span>]</
span>]
</
code></
strong></
span></
dt>
List, edit, or remove the DNSSEC signing state for
the specified zone. The status of ongoing DNSSEC
operations (such as signing or generating
NSEC3 chains) is stored in the zone in the form
of DNS resource records of type
<
span><
strong class="command">sig-signing-type</
strong></
span>.
<
span><
strong class="command">rndc signing -list</
strong></
span> converts
these records into a human-readable form,
indicating which keys are currently signing
or have finished signing the zone, and which NSEC3
NSEC3 chains are being created or removed.
<
span><
strong class="command">rndc signing -clear</
strong></
span> can remove
a single key (specified in the same format that
<
span><
strong class="command">rndc signing -list</
strong></
span> uses to
display it), or all keys. In either case, only
completed keys are removed; any record indicating
that a key has not yet finished signing the zone
<
span><
strong class="command">rndc signing -nsec3param</
strong></
span> sets
the NSEC3 parameters for a zone. This is the
only supported mechanism for using NSEC3 with
<
span><
strong class="command">inline-signing</
strong></
span> zones.
Parameters are specified in the same format as
an NSEC3PARAM resource record: hash algorithm,
flags, iterations, and salt, in that order.
Currently, the only defined value for hash algorithm
is <
code class="literal">1</
code>, representing SHA-1.
The <
code class="option">flags</
code> may be set to
<
code class="literal">0</
code> or <
code class="literal">1</
code>,
depending on whether you wish to set the opt-out
bit in the NSEC3 chain. <
code class="option">iterations</
code>
defines the number of additional times to apply
the algorithm when generating an NSEC3 hash. The
<
code class="option">salt</
code> is a string of data expressed
in hexidecimal, or a hyphen (`-') if no salt is
So, for example, to create an NSEC3 chain using
the SHA-1 hash algorithm, no opt-out flag,
10 iterations, and a salt value of "FFFF", use:
<
span><
strong class="command">rndc signing -nsec3param 1 0 10 FFFF <zone></
strong></
span>.
To set the opt-out flag, 15 iterations, and no
<
span><
strong class="command">rndc signing -nsec3param 1 1 15 - <zone></
strong></
span>.
<
span><
strong class="command">rndc signing -nsec3param none</
strong></
span>
removes an existing NSEC3 chain and replaces it
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
<
span><
strong class="command">rndc</
strong></
span> configuration file is
location can be specified with the <
code class="option">-c</
code>
option. If the configuration file is not found,
<
span><
strong class="command">rndc</
strong></
span> will also look in
<
code class="filename">/
etc/
rndc.key</
code> (or whatever
<
code class="varname">sysconfdir</
code> was defined when
the <
acronym class="acronym">BIND</
acronym> build was
The <
code class="filename">
rndc.key</
code> file is
running <
span><
strong class="command">rndc-confgen -a</
strong></
span> as
<
a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage" title="controls Statement Definition and Usage">the section called “<
span><
strong class="command">controls</
strong></
span> Statement Definition and
The format of the configuration file is similar to
that of <
code class="filename">
named.conf</
code>, but
only four statements, the <
span><
strong class="command">options</
strong></
span>,
<
span><
strong class="command">key</
strong></
span>, <
span><
strong class="command">server</
strong></
span> and
<
span><
strong class="command">include</
strong></
span>
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
The <
span><
strong class="command">options</
strong></
span> statement has
<
span><
strong class="command">default-server</
strong></
span>, <
span><
strong class="command">default-key</
strong></
span>,
and <
span><
strong class="command">default-port</
strong></
span>.
<
span><
strong class="command">default-server</
strong></
span> takes a
host name or address argument and represents the server
be contacted if no <
code class="option">-s</
code>
option is provided on the command line.
<
span><
strong class="command">default-key</
strong></
span> takes
the name of a key as its argument, as defined by a <
span><
strong class="command">key</
strong></
span> statement.
<
span><
strong class="command">default-port</
strong></
span> specifies the
<
span><
strong class="command">rndc</
strong></
span> should connect if no
port is given on the command line or in a
<
span><
strong class="command">server</
strong></
span> statement.
The <
span><
strong class="command">key</
strong></
span> statement defines a
by <
span><
strong class="command">rndc</
strong></
span> when authenticating
<
span><
strong class="command">named</
strong></
span>. Its syntax is
<
span><
strong class="command">key</
strong></
span> statement in <
code class="filename">
named.conf</
code>.
The keyword <
strong class="userinput"><
code>key</
code></
strong> is
followed by a key name, which must be a valid
domain name, though it need not actually be hierarchical;
a string like "<
strong class="userinput"><
code>rndc_key</
code></
strong>" is a valid
The <
span><
strong class="command">key</
strong></
span> statement has two
<
span><
strong class="command">algorithm</
strong></
span> and <
span><
strong class="command">secret</
strong></
span>.
While the configuration parser will accept any string as the
to algorithm, currently only the string "<
strong class="userinput"><
code>hmac-md5</
code></
strong>"
has any meaning. The secret is a base-64 encoded string
as specified in RFC 3548.
The <
span><
strong class="command">server</
strong></
span> statement
defined using the <
span><
strong class="command">key</
strong></
span>
The keyword <
strong class="userinput"><
code>server</
code></
strong> is followed by a
host name or address. The <
span><
strong class="command">server</
strong></
span> statement
has two clauses: <
span><
strong class="command">key</
strong></
span> and <
span><
strong class="command">port</
strong></
span>.
The <
span><
strong class="command">key</
strong></
span> clause specifies the
to be used when communicating with this server, and the
<
span><
strong class="command">port</
strong></
span> clause can be used to
specify the port <
span><
strong class="command">rndc</
strong></
span> should
A sample minimal configuration file is as follows:
<
pre class="programlisting">
"c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
default-server 127.0.0.1;
This file, if installed as <
code class="filename">/
etc/
rndc.conf</
code>,
<
code class="prompt">$ </
code><
strong class="userinput"><
code>rndc reload</
code></
strong>
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
following controls statements:
<
pre class="programlisting">
allow { localhost; } keys { rndc_key; };
and it had an identical key statement for
<
code class="literal">rndc_key</
code>.
Running the <
span><
strong class="command">rndc-confgen</
strong></
span>
conveniently create a <
code class="filename">
rndc.conf</
code>
file for you, and also display the
corresponding <
span><
strong class="command">controls</
strong></
span>
statement that you need to
you can run <
span><
strong class="command">rndc-confgen -a</
strong></
span>
a <
code class="filename">
rndc.key</
code> file and not
<
div class="sect2" lang="en">
<
div class="titlepage"><
div><
div><
h3 class="title">
<
a name="id2570695"></
a>Signals</
h3></
div></
div></
div>
Certain UNIX signals cause the name server to take specific
actions, as described in the following table. These signals can
be sent using the <
span><
strong class="command">kill</
strong></
span> command.
<
div class="informaltable"><
table border="1">
<
p><
span><
strong class="command">SIGHUP</
strong></
span></
p>
Causes the server to read <
code class="filename">
named.conf</
code> and
<
p><
span><
strong class="command">SIGTERM</
strong></
span></
p>
Causes the server to clean up and exit.
<
p><
span><
strong class="command">SIGINT</
strong></
span></
p>
Causes the server to clean up and exit.
<
table width="100%" summary="Navigation footer">
<
td width="40%" align="left">
<
td width="20%" align="center">�</
td>
<
td width="40%" align="right">�<
a accesskey="n" href="Bv9ARM.ch04.html">Next</
a>
<
td width="40%" align="left" valign="top">Chapter�2.�<
acronym class="acronym">BIND</
acronym> Resource Requirements�</
td>
<
td width="20%" align="center"><
a accesskey="h" href="Bv9ARM.html">Home</
a></
td>
<
td width="40%" align="right" valign="top">�Chapter�4.�Advanced DNS Features</
td>