Bv9ARM.ch03.html revision 47012ae6dbf18a2503d7b33c1c9583dc38625cb7
1fdd2470b625a58b57d0b155e6caf8c4fc0afe8aAutomatic Updater - Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
6a42ab64276ff832a47e009be1208f7c7d4da22dAutomatic Updater - Copyright (C) 2000-2003 Internet Software Consortium.
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater - Permission to use, copy, modify, and distribute this software for any
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews - purpose with or without fee is hereby granted, provided that the above
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews - copyright notice and this permission notice appear in all copies.
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
6a42ab64276ff832a47e009be1208f7c7d4da22dAutomatic Updater - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews - PERFORMANCE OF THIS SOFTWARE.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<!-- $Id: Bv9ARM.ch03.html,v 1.55 2006/05/17 02:39:16 marka Exp $ -->
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<title>Chapter�3.�Name Server Configuration</title>
922312472e2e05ebc64993d465999c5351b83036Automatic Updater<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<link rel="prev" href="Bv9ARM.ch02.html" title="Chapter�2.�BIND Resource Requirements">
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<link rel="next" href="Bv9ARM.ch04.html" title="Chapter�4.�Advanced DNS Features">
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<table width="100%" summary="Navigation header">
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<tr><th colspan="3" align="center">Chapter�3.�Name Server Configuration</th></tr>
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<a accesskey="p" href="Bv9ARM.ch02.html">Prev</a>�</td>
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch04.html">Next</a>
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<div class="titlepage"><div><div><h2 class="title">
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<a name="Bv9ARM.ch03"></a>Chapter�3.�Name Server Configuration</h2></div></div></div>
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<dt><span class="sect1"><a href="Bv9ARM.ch03.html#sample_configuration">Sample Configurations</a></span></dt>
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2548733">A Caching-only Name Server</a></span></dt>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2548749">An Authoritative-only Name Server</a></span></dt>
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<dt><span class="sect1"><a href="Bv9ARM.ch03.html#id2548772">Load Balancing</a></span></dt>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<dt><span class="sect1"><a href="Bv9ARM.ch03.html#id2549264">Name Server Operations</a></span></dt>
b27ce68bae92006e2ad7a9b75602c6385e529c3bAutomatic Updater<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2549269">Tools for Use With the Name Server Daemon</a></span></dt>
922312472e2e05ebc64993d465999c5351b83036Automatic Updater<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2550907">Signals</a></span></dt>
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews In this section we provide some suggested configurations along
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews with guidelines for their use. We suggest reasonable values for
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews certain option settings.
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<div class="titlepage"><div><div><h2 class="title" style="clear: both">
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<a name="sample_configuration"></a>Sample Configurations</h2></div></div></div>
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<div class="titlepage"><div><div><h3 class="title">
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews<a name="id2548733"></a>A Caching-only Name Server</h3></div></div></div>
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews The following sample configuration is appropriate for a caching-only
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews name server for use by clients internal to a corporation. All
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews from outside clients are refused using the <span><strong class="command">allow-query</strong></span>
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews option. Alternatively, the same effect could be achieved using
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews firewall rules.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater// Two corporate subnets we wish to allow queries from.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updateracl corpnets { 192.168.4.0/24; 192.168.7.0/24; };
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater directory "/etc/namedb"; // Working directory
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater allow-query { corpnets; };
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater// Provide a reverse mapping for the loopback address 127.0.0.1
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic Updater<div class="titlepage"><div><div><h3 class="title">
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic Updater<a name="id2548749"></a>An Authoritative-only Name Server</h3></div></div></div>
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic Updater This sample configuration is for an authoritative-only server
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic Updater that is the master server for "<code class="filename">example.com</code>"
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic Updater and a slave for the subdomain "<code class="filename">eng.example.com</code>".
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater directory "/etc/namedb"; // Working directory
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews allow-query-cache { none; }; // Do not allow access to cache
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews allow-query { any; }; // This is the default
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews recursion no; // Do not provide recursive service
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews// Provide a reverse mapping for the loopback address 127.0.0.1
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews type master;
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews// We are the master server for example.com
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews // IP addresses of slave servers allowed to transfer example.com
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews allow-transfer {
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews 192.168.4.14;
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews 192.168.5.53;
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews// We are a slave server for eng.example.com
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews // IP address of eng.example.com master server
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews masters { 192.168.4.12; };
b27ce68bae92006e2ad7a9b75602c6385e529c3bAutomatic Updater<div class="titlepage"><div><div><h2 class="title" style="clear: both">
922312472e2e05ebc64993d465999c5351b83036Automatic Updater<a name="id2548772"></a>Load Balancing</h2></div></div></div>
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews A primitive form of load balancing can be achieved in
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews the <span class="acronym">DNS</span> by using multiple A records for
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews For example, if you have three WWW servers with network addresses
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater following means that clients will connect to each machine one third
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews of the time:
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews Resource Record (RR) Data
The <span><strong class="command">dig</strong></span>, <span><strong class="command">host</strong></span>, and
<dt><span class="term"><a name="dig"></a><span><strong class="command">dig</strong></span></span></dt>
<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>
<div class="cmdsynopsis"><p><code class="command">host</code> [-aCdlrTwv] [-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>] <em class="replaceable"><code>hostname</code></em> [<em class="replaceable"><code>server</code></em>]</p></div>
<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>
<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>
[<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>
<dt><span class="term"><strong class="userinput"><code>stop [<span class="optional">-p</span>]</code></strong></span></dt>
<dt><span class="term"><strong class="userinput"><code>halt [<span class="optional">-p</span>]</code></strong></span></dt>
<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 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">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>.