Bv9ARM.ch03.html revision ea94d370123a5892f6c47a97f21d1b28d44bb168
5cd4555ad444fd391002ae32450572054369fd42Rob Austein - Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein - Copyright (C) 2000-2003 Internet Software Consortium.
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark Andrews - Permission to use, copy, modify, and/or distribute this software for any
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews - purpose with or without fee is hereby granted, provided that the above
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington - copyright notice and this permission notice appear in all copies.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews<!-- $Id$ -->
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
561a29af8c54a216e7d30b5b4f6e0d21661654ecMark Andrews<title>Chapter�3.�Name Server Configuration</title>
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley<link rel="prev" href="Bv9ARM.ch02.html" title="Chapter�2.�BIND Resource Requirements">
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley<link rel="next" href="Bv9ARM.ch04.html" title="Chapter�4.�Advanced DNS Features">
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley<tr><th colspan="3" align="center">Chapter�3.�Name Server Configuration</th></tr>
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley<a accesskey="p" href="Bv9ARM.ch02.html">Prev</a>�</td>
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch04.html">Next</a>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<div class="titlepage"><div><div><h2 class="title">
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<a name="Bv9ARM.ch03"></a>Chapter�3.�Name Server Configuration</h2></div></div></div>
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews<dt><span class="sect1"><a href="Bv9ARM.ch03.html#sample_configuration">Sample Configurations</a></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2567771">A Caching-only Name Server</a></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2567992">An Authoritative-only Name Server</a></span></dt>
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley<dt><span class="sect1"><a href="Bv9ARM.ch03.html#id2568014">Load Balancing</a></span></dt>
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley<dt><span class="sect1"><a href="Bv9ARM.ch03.html#id2568369">Name Server Operations</a></span></dt>
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2568374">Tools for Use With the Name Server Daemon</a></span></dt>
a769eca4e3b223866b01dc8f7a4dde8d9e49bab0Mark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch03.html#id2570659">Signals</a></span></dt>
9b6a170d22d61026d31bde87523f3320628b6ebcBrian Wellington In this chapter we provide some suggested configurations along
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley with guidelines for their use. We suggest reasonable values for
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley certain option settings.
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley<div class="titlepage"><div><div><h2 class="title" style="clear: both">
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<a name="sample_configuration"></a>Sample Configurations</h2></div></div></div>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<div class="titlepage"><div><div><h3 class="title">
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<a name="id2567771"></a>A Caching-only Name Server</h3></div></div></div>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein The following sample configuration is appropriate for a caching-only
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein name server for use by clients internal to a corporation. All
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley from outside clients are refused using the <span><strong class="command">allow-query</strong></span>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein option. Alternatively, the same effect could be achieved using
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein firewall rules.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein// Two corporate subnets we wish to allow queries from.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinacl corpnets { 192.168.4.0/24; 192.168.7.0/24; };
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein // Working directory
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley allow-query { corpnets; };
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein// Provide a reverse mapping for the loopback
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein// address 127.0.0.1
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley type master;
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews<div class="titlepage"><div><div><h3 class="title">
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews<a name="id2567992"></a>An Authoritative-only Name Server</h3></div></div></div>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein This sample configuration is for an authoritative-only server
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein that is the master server for "<code class="filename">example.com</code>"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein and a slave for the subdomain "<code class="filename">eng.example.com</code>".
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein // Working directory
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews // Do not allow access to cache
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley allow-query-cache { none; };
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley // This is the default
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein allow-query { any; };
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein // Do not provide recursive service
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein recursion no;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein// Provide a reverse mapping for the loopback
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein// address 127.0.0.1
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley type master;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein// We are the master server for example.com
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein type master;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein // IP addresses of slave servers allowed to
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein allow-transfer {
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein 192.168.4.14;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein 192.168.5.53;
a769eca4e3b223866b01dc8f7a4dde8d9e49bab0Mark Andrews// We are a slave server for eng.example.com
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein // IP address of eng.example.com master server
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein masters { 192.168.4.12; };
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<div class="titlepage"><div><div><h2 class="title" style="clear: both">
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<a name="id2568014"></a>Load Balancing</h2></div></div></div>
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley A primitive form of load balancing can be achieved in
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley the <acronym class="acronym">DNS</acronym> by using multiple records
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley (such as multiple A records) for one name.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein For example, if you have three WWW servers with network addresses
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein following means that clients will connect to each machine one third
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein of the time:
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein 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> [-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>
<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
<dt><span class="term"><strong class="userinput"><code>loadkeys <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>
[<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>]</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>
Note that the number of zones includes the internal <span><strong class="command">bind/CH</strong></span> zone
<code class="prompt">$ </code><strong class="userinput"><code>rndc addzone example.com '{ type master; file "example.com.db"; };'</code></strong>
[<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>]
<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>.