Bv9ARM.ch03.html revision a1b05dea35aa30b152a47115e18bbe679d3fcf19
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - Copyright (C) 2000-2003 Internet Software Consortium.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - Permission to use, copy, modify, and distribute this software for any
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - purpose with or without fee is hereby granted, provided that the above
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - copyright notice and this permission notice appear in all copies.
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User - PERFORMANCE OF THIS SOFTWARE.
f9ce6280cec79deb16ff6d9807aa493ff23e10d9Tinderbox User<!-- $Id: Bv9ARM.ch03.html,v 1.63 2007/05/16 06:12:01 marka Exp $ -->
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<title>Chapter�3.�Name Server Configuration</title>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User<link rel="prev" href="Bv9ARM.ch02.html" title="Chapter�2.�BIND Resource Requirements">
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User<link rel="next" href="Bv9ARM.ch04.html" title="Chapter�4.�Advanced DNS Features">
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<table width="100%" summary="Navigation header">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<tr><th colspan="3" align="center">Chapter�3.�Name Server Configuration</th></tr>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<a accesskey="p" href="Bv9ARM.ch02.html">Prev</a>�</td>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch04.html">Next</a>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<div class="titlepage"><div><div><h2 class="title">
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<a name="Bv9ARM.ch03"></a>Chapter�3.�Name Server Configuration</h2></div></div></div>
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User<dt><span class="sect1"><a href="Bv9ARM.ch03.html#sample_configuration">Sample Configurations</a></span></dt>
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2568003">A Caching-only Name Server</a></span></dt>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2568019">An Authoritative-only Name Server</a></span></dt>
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User<dt><span class="sect1"><a href="Bv9ARM.ch03.html#id2568041">Load Balancing</a></span></dt>
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User<dt><span class="sect1"><a href="Bv9ARM.ch03.html#id2568465">Name Server Operations</a></span></dt>
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2568470">Tools for Use With the Name Server Daemon</a></span></dt>
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2570116">Signals</a></span></dt>
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User In this section we provide some suggested configurations along
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User with guidelines for their use. We suggest reasonable values for
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User certain option settings.
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User<div class="titlepage"><div><div><h2 class="title" style="clear: both">
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User<a name="sample_configuration"></a>Sample Configurations</h2></div></div></div>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<div class="titlepage"><div><div><h3 class="title">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<a name="id2568003"></a>A Caching-only Name Server</h3></div></div></div>
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User The following sample configuration is appropriate for a caching-only
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt name server for use by clients internal to a corporation. All
801d3c8888d6026eb1fd31c23e51e4f54dbc317eTinderbox User from outside clients are refused using the <span><strong class="command">allow-query</strong></span>
801d3c8888d6026eb1fd31c23e51e4f54dbc317eTinderbox User option. Alternatively, the same effect could be achieved using
adabefa84c3dcf048566cc23fd457c577f208eeaTinderbox User firewall rules.
adabefa84c3dcf048566cc23fd457c577f208eeaTinderbox User// Two corporate subnets we wish to allow queries from.
801d3c8888d6026eb1fd31c23e51e4f54dbc317eTinderbox Useracl corpnets { 192.168.4.0/24; 192.168.7.0/24; };
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User directory "/etc/namedb"; // Working directory
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User allow-query { corpnets; };
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User// Provide a reverse mapping for the loopback address 127.0.0.1
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User<div class="titlepage"><div><div><h3 class="title">
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User<a name="id2568019"></a>An Authoritative-only Name Server</h3></div></div></div>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User This sample configuration is for an authoritative-only server
eb2a5f51bd5c100799d93d51c9e22666cbd64d90Tinderbox User that is the master server for "<code class="filename">example.com</code>"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User and a slave for the subdomain "<code class="filename">eng.example.com</code>".
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User directory "/etc/namedb"; // Working directory
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt allow-query-cache { none; }; // Do not allow access to cache
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User allow-query { any; }; // This is the default
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User recursion no; // Do not provide recursive service
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User// Provide a reverse mapping for the loopback address 127.0.0.1
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User// We are the master server for example.com
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User // IP addresses of slave servers allowed to transfer example.com
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User allow-transfer {
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User 192.168.4.14;
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User 192.168.5.53;
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User// We are a slave server for eng.example.com
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User // IP address of eng.example.com master server
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User masters { 192.168.4.12; };
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<div class="titlepage"><div><div><h2 class="title" style="clear: both">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<a name="id2568041"></a>Load Balancing</h2></div></div></div>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User A primitive form of load balancing can be achieved in
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User the <acronym class="acronym">DNS</acronym> by using multiple A records for
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User For example, if you have three WWW servers with network addresses
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User following means that clients will connect to each machine one third
fb2e132c5c1246d709ade9a2b3dad5ad72d35c5cTinderbox User Resource Record (RR) Data
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt When a resolver queries for these records, <acronym class="acronym">BIND</acronym> will rotate
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User them and respond to the query with the records in a different
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt order. In the example above, clients will randomly receive
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User records in the order 1, 2, 3; 2, 3, 1; and 3, 1, 2. Most clients
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User will use the first record returned and discard the rest.
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> [-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>
<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>
[<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 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">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>.