Bv9ARM.ch03.html revision c313914d0e66b20969215e519bbf2ab4ecf39512
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - Copyright (C) 2000-2018 Internet Systems Consortium, Inc. ("ISC")
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - This Source Code Form is subject to the terms of the Mozilla Public
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - License, v. 2.0. If a copy of the MPL was not distributed with this
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - file, You can obtain one at http://mozilla.org/MPL/2.0/.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
0662ed52e814f8f08ef0e09956413a792584eddffuankg<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<link rel="prev" href="Bv9ARM.ch02.html" title="Chapter�2.�BIND Resource Requirements">
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<link rel="next" href="Bv9ARM.ch04.html" title="Chapter�4.�Advanced DNS Features">
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<tr><th colspan="3" align="center">Chapter�3.�Name Server Configuration</th></tr>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<a accesskey="p" href="Bv9ARM.ch02.html">Prev</a>�</td>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch04.html">Next</a>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<a name="Bv9ARM.ch03"></a>Chapter�3.�Name Server Configuration</h1></div></div></div>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<dt><span class="section"><a href="Bv9ARM.ch03.html#sample_configuration">Sample Configurations</a></span></dt>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<dt><span class="section"><a href="Bv9ARM.ch03.html#cache_only_sample">A Caching-only Name Server</a></span></dt>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<dt><span class="section"><a href="Bv9ARM.ch03.html#auth_only_sample">An Authoritative-only Name Server</a></span></dt>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<dt><span class="section"><a href="Bv9ARM.ch03.html#load_balancing">Load Balancing</a></span></dt>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<dt><span class="section"><a href="Bv9ARM.ch03.html#ns_operations">Name Server Operations</a></span></dt>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<dt><span class="section"><a href="Bv9ARM.ch03.html#tools">Tools for Use With the Name Server Daemon</a></span></dt>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<dt><span class="section"><a href="Bv9ARM.ch03.html#signals">Signals</a></span></dt>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg In this chapter we provide some suggested configurations along
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg with guidelines for their use. We suggest reasonable values for
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg certain option settings.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<div class="titlepage"><div><div><h2 class="title" style="clear: both">
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<a name="sample_configuration"></a>Sample Configurations</h2></div></div></div>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<a name="cache_only_sample"></a>A Caching-only Name Server</h3></div></div></div>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg The following sample configuration is appropriate for a caching-only
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg name server for use by clients internal to a corporation. All
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg from outside clients are refused using the <span class="command"><strong>allow-query</strong></span>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg option. Alternatively, the same effect could be achieved using
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg firewall rules.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg// Two corporate subnets we wish to allow queries from.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg // Working directory
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg allow-query { corpnets; };
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg// Provide a reverse mapping for the loopback
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg// address 127.0.0.1
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg type master;
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<a name="auth_only_sample"></a>An Authoritative-only Name Server</h3></div></div></div>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg This sample configuration is for an authoritative-only server
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg that is the master server for "<code class="filename">example.com</code>"
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg and a slave for the subdomain "<code class="filename">eng.example.com</code>".
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg // Working directory
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg // Do not allow access to cache
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg allow-query-cache { none; };
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg // This is the default
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg allow-query { any; };
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg // Do not provide recursive service
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg recursion no;
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg// Provide a reverse mapping for the loopback
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg// address 127.0.0.1
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg type master;
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg// We are the master server for example.com
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg type master;
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg // IP addresses of slave servers allowed to
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg allow-transfer {
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg 192.168.4.14;
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg 192.168.5.53;
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg// We are a slave server for eng.example.com
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg type slave;
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg // IP address of eng.example.com master server
0662ed52e814f8f08ef0e09956413a792584eddffuankg masters { 192.168.4.12; };
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<div class="titlepage"><div><div><h2 class="title" style="clear: both">
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<a name="load_balancing"></a>Load Balancing</h2></div></div></div>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg A primitive form of load balancing can be achieved in
0662ed52e814f8f08ef0e09956413a792584eddffuankg the <acronym class="acronym">DNS</acronym> by using multiple records
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg (such as multiple A records) for one name.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg For example, if you have three WWW servers with network addresses
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg following means that clients will connect to each machine one third
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg of the time:
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg Resource Record (RR) Data
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg When a resolver queries for these records, <acronym class="acronym">BIND</acronym> will rotate
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg them and respond to the query with the records in a different
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg order. In the example above, clients will randomly receive
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg records in the order 1, 2, 3; 2, 3, 1; and 3, 1, 2. Most clients
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg will use the first record returned and discard the rest.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg For more detail on ordering responses, check the
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <span class="command"><strong>rrset-order</strong></span> sub-statement in the
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <span class="command"><strong>options</strong></span> statement, see
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <a class="xref" href="Bv9ARM.ch06.html#rrset_ordering" title="RRset Ordering">RRset Ordering</a>.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<div class="titlepage"><div><div><h2 class="title" style="clear: both">
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<a name="ns_operations"></a>Name Server Operations</h2></div></div></div>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<a name="tools"></a>Tools for Use With the Name Server Daemon</h3></div></div></div>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg This section describes several indispensable diagnostic,
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg administrative and monitoring tools available to the system
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg administrator for controlling and debugging the name server
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<a name="diagnostic_tools"></a>Diagnostic Tools</h4></div></div></div>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg The <span class="command"><strong>dig</strong></span>, <span class="command"><strong>host</strong></span>, and
0662ed52e814f8f08ef0e09956413a792584eddffuankg <span class="command"><strong>nslookup</strong></span> programs are all command
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg for manually querying name servers. They differ in style and
<dt><span class="term"><a name="dig"></a><span class="command"><strong>dig</strong></span></span></dt>
<a name="named-checkconf"></a><span class="term"><span class="command"><strong>named-checkconf</strong></span></span>
<a name="named-checkzone"></a><span class="term"><span class="command"><strong>named-checkzone</strong></span></span>
<a name="named-compilezone"></a><span class="term"><span class="command"><strong>named-compilezone</strong></span></span>
Since <acronym class="acronym">BIND</acronym> 9.2, <span class="command"><strong>rndc</strong></span>
<p>See <a class="xref" href="man.rndc.html" title="rndc"><span class="refentrytitle"><span class="application">rndc</span></span>(8)</a> for details of
<a class="xref" href="Bv9ARM.ch06.html#controls_statement_definition_and_usage" title="controls Statement Definition and Usage">the section called “<span class="command"><strong>controls</strong></span> Statement Definition and
<span class="command"><strong>key</strong></span>, <span class="command"><strong>server</strong></span> and
<span class="command"><strong>default-server</strong></span>, <span class="command"><strong>default-key</strong></span>,
the name of a key as its argument, as defined by a <span class="command"><strong>key</strong></span> statement.
<span class="command"><strong>key</strong></span> statement in <code class="filename">named.conf</code>.
<span class="command"><strong>algorithm</strong></span> and <span class="command"><strong>secret</strong></span>.
has two clauses: <span class="command"><strong>key</strong></span> and <span class="command"><strong>port</strong></span>.
<td width="40%" align="left" valign="top">Chapter�2.�<acronym class="acronym">BIND</acronym> Resource Requirements�</td>
<p xmlns:db="http://docbook.org/ns/docbook" style="text-align: center;">BIND 9.11.3 (Extended Support Version)</p>