Bv9ARM.ch03.html revision 1238b38c9f0ab563b762dc0fd00ac6c34c2b7295
1fdd2470b625a58b57d0b155e6caf8c4fc0afe8aAutomatic Updater - Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - Copyright (C) 2000-2003 Internet Software Consortium.
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater - Permission to use, copy, modify, and/or distribute this software for any
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - purpose with or without fee is hereby granted, provided that the above
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - copyright notice and this permission notice appear in all copies.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater<!-- $Id: Bv9ARM.ch03.html,v 1.79 2010/06/26 01:14:18 tbox Exp $ -->
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<title>Chapter�3.�Name Server Configuration</title>
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater<link rel="prev" href="Bv9ARM.ch02.html" title="Chapter�2.�BIND Resource Requirements">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<link rel="next" href="Bv9ARM.ch04.html" title="Chapter�4.�Advanced DNS Features">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<table width="100%" summary="Navigation header">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<tr><th colspan="3" align="center">Chapter�3.�Name Server Configuration</th></tr>
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater<a accesskey="p" href="Bv9ARM.ch02.html">Prev</a>�</td>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch04.html">Next</a>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="titlepage"><div><div><h2 class="title">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a name="Bv9ARM.ch03"></a>Chapter�3.�Name Server Configuration</h2></div></div></div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<dt><span class="sect1"><a href="Bv9ARM.ch03.html#sample_configuration">Sample Configurations</a></span></dt>
6283056805887de88040698685b8e1936a1f7a2dAutomatic Updater<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2567764">A Caching-only Name Server</a></span></dt>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2567780">An Authoritative-only Name Server</a></span></dt>
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater<dt><span class="sect1"><a href="Bv9ARM.ch03.html#id2568007">Load Balancing</a></span></dt>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<dt><span class="sect1"><a href="Bv9ARM.ch03.html#id2568361">Name Server Operations</a></span></dt>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2568366">Tools for Use With the Name Server Daemon</a></span></dt>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2570146">Signals</a></span></dt>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews In this chapter we provide some suggested configurations along
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews with guidelines for their use. We suggest reasonable values for
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater certain option settings.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="titlepage"><div><div><h2 class="title" style="clear: both">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a name="sample_configuration"></a>Sample Configurations</h2></div></div></div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="titlepage"><div><div><h3 class="title">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a name="id2567764"></a>A Caching-only Name Server</h3></div></div></div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The following sample configuration is appropriate for a caching-only
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews name server for use by clients internal to a corporation. All
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews from outside clients are refused using the <span><strong class="command">allow-query</strong></span>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews option. Alternatively, the same effect could be achieved using
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews firewall rules.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews// Two corporate subnets we wish to allow queries from.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsacl corpnets { 192.168.4.0/24; 192.168.7.0/24; };
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews // Working directory
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews allow-query { corpnets; };
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews// Provide a reverse mapping for the loopback
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews// address 127.0.0.1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews type master;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="titlepage"><div><div><h3 class="title">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a name="id2567780"></a>An Authoritative-only Name Server</h3></div></div></div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews This sample configuration is for an authoritative-only server
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews that is the master server for "<code class="filename">example.com</code>"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews and a slave for the subdomain "<code class="filename">eng.example.com</code>".
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews // Working directory
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews // Do not allow access to cache
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews allow-query-cache { none; };
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews // This is the default
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews allow-query { any; };
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews // Do not provide recursive service
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews recursion no;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews// Provide a reverse mapping for the loopback
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews// address 127.0.0.1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews type master;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews// We are the master server for example.com
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews type master;
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews // IP addresses of slave servers allowed to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews allow-transfer {
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews 192.168.4.14;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews 192.168.5.53;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews// We are a slave server for eng.example.com
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews // IP address of eng.example.com master server
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews masters { 192.168.4.12; };
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="titlepage"><div><div><h2 class="title" style="clear: both">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a name="id2568007"></a>Load Balancing</h2></div></div></div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews A primitive form of load balancing can be achieved in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews the <acronym class="acronym">DNS</acronym> by using multiple records
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews (such as multiple A records) for one name.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews For example, if you have three WWW servers with network addresses
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews following means that clients will connect to each machine one third
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews of the time:
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews Resource Record (RR) Data
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews When a resolver queries for these records, <acronym class="acronym">BIND</acronym> will rotate
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews them and respond to the query with the records in a different
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews order. In the example above, clients will randomly receive
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews records in the order 1, 2, 3; 2, 3, 1; and 3, 1, 2. Most clients
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews will use the first record returned and discard the rest.
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews For more detail on ordering responses, check the
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews <span><strong class="command">rrset-order</strong></span> substatement in the
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews <span><strong class="command">options</strong></span> statement, see
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews <a href="Bv9ARM.ch06.html#rrset_ordering">RRset Ordering</a>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater<a name="id2568361"></a>Name Server Operations</h2></div></div></div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="titlepage"><div><div><h3 class="title">
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews<a name="id2568366"></a>Tools for Use With the Name Server Daemon</h3></div></div></div>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews This section describes several indispensable diagnostic,
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews administrative and monitoring tools available to the system
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews administrator for controlling and debugging the name server
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews<div class="titlepage"><div><div><h4 class="title">
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews<a name="diagnostic_tools"></a>Diagnostic Tools</h4></div></div></div>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews The <span><strong class="command">dig</strong></span>, <span><strong class="command">host</strong></span>, and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <span><strong class="command">nslookup</strong></span> programs are all command
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews for manually querying name servers. They differ in style and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews output format.
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews<dt><span class="term"><a name="dig"></a><span><strong class="command">dig</strong></span></span></dt>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews The domain information groper (<span><strong class="command">dig</strong></span>)
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews is the most versatile and complete of these lookup tools.
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews It has two modes: simple interactive
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mode for a single query, and batch mode which executes a
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater each in a list of several query lines. All query options are
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews from the command line.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The usual simple use of <span><strong class="command">dig</strong></span> will take the form
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <span><strong class="command">dig @server domain query-type query-class</strong></span>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews For more information and a list of available commands and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews options, see the <span><strong class="command">dig</strong></span> man
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater<dt><span class="term"><span><strong class="command">host</strong></span></span></dt>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The <span><strong class="command">host</strong></span> utility emphasizes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews and ease of use. By default, it converts
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews between host names and Internet addresses, but its
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews can be extended with the use of options.
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews<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>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews For more information and a list of available commands and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews options, see the <span><strong class="command">host</strong></span> man
<div class="cmdsynopsis"><p><code class="command">nslookup</code> [-option...] [[<em class="replaceable"><code>host-to-find</code></em>] | [- [server]]]</p></div>
<a name="named-checkconf"></a><span class="term"><span><strong class="command">named-checkconf</strong></span></span>
<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>
<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>
Since <acronym class="acronym">BIND</acronym> 9.2, <span><strong class="command">rndc</strong></span>
<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>
<dt><span class="term"><strong class="userinput"><code>reload <em class="replaceable"><code>zone</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>view</code></em></span>]</span>]</code></strong></span></dt>
<dt><span class="term"><strong class="userinput"><code>retransfer <em class="replaceable"><code>zone</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>sign <em class="replaceable"><code>zone</code></em>
[<span class="optional"><em class="replaceable"><code>view</code></em></span>]</span>]</code></strong></span></dt>
Usage">the section called “<span><strong class="command">options</strong></span> Statement Definition and
See <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called “Dynamic Update Policies”</a> for
[<span class="optional"><em class="replaceable"><code>view</code></em></span>]</span>]</span>]</code></strong></span></dt>
[<span class="optional"><em class="replaceable"><code>view</code></em></span>]</span>]</span>]</code></strong></span></dt>
<dt><span class="term"><strong class="userinput"><code>notify <em class="replaceable"><code>zone</code></em>
[<span class="optional"><em class="replaceable"><code>view</code></em></span>]</span>]</code></strong></span></dt>
[<span class="optional"><em class="replaceable"><code>view ...</code></em></span>]</code></strong></span></dt>
[<span class="optional"><em class="replaceable"><code>view ...</code></em></span>]</code></strong></span></dt>
<dt><span class="term"><strong class="userinput"><code>stop [<span class="optional">-p</span>]</code></strong></span></dt>
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>
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 <em class="replaceable"><code>level</code></em></code></strong></span></dt>
<dt><span class="term"><strong class="userinput"><code>flushname</code></strong> <em class="replaceable"><code>name</code></em></span></dt>
Note that the number of zones includes the internal <span><strong class="command">bind/CH</strong></span> zone
<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
<span><strong class="command">key</strong></span>, <span><strong class="command">server</strong></span> and
<span><strong class="command">default-server</strong></span>, <span><strong class="command">default-key</strong></span>,
the name of a key as its argument, as defined by a <span><strong class="command">key</strong></span> statement.
<span><strong class="command">key</strong></span> statement in <code class="filename">named.conf</code>.
<span><strong class="command">algorithm</strong></span> and <span><strong class="command">secret</strong></span>.
has two clauses: <span><strong class="command">key</strong></span> and <span><strong class="command">port</strong></span>.