Bv9ARM.ch04.html revision ac93437301f55ed69bf85883a497a75598c628f9
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley - Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
c8175ece69d986ccd0671bc4d2571b247dfae177Automatic Updater - Copyright (C) 2000-2003 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence - Permission to use, copy, modify, and distribute this software for any
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater - purpose with or without fee is hereby granted, provided that the above
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley - copyright notice and this permission notice appear in all copies.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - 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.
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley<!-- $Id: Bv9ARM.ch04.html,v 1.94 2009/05/15 01:15:47 tbox Exp $ -->
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley<link rel="prev" href="Bv9ARM.ch03.html" title="Chapter�3.�Name Server Configuration">
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence<link rel="next" href="Bv9ARM.ch05.html" title="Chapter�5.�The BIND 9 Lightweight Resolver">
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley<tr><th colspan="3" align="center">Chapter�4.�Advanced DNS Features</th></tr>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley<a accesskey="p" href="Bv9ARM.ch03.html">Prev</a>�</td>
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch05.html">Next</a>
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<div class="titlepage"><div><div><h2 class="title">
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<a name="Bv9ARM.ch04"></a>Chapter�4.�Advanced DNS Features</h2></div></div></div>
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<dt><span class="sect1"><a href="Bv9ARM.ch04.html#notify">Notify</a></span></dt>
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<dt><span class="sect1"><a href="Bv9ARM.ch04.html#dynamic_update">Dynamic Update</a></span></dt>
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch04.html#journal">The journal file</a></span></dt></dl></dd>
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<dt><span class="sect1"><a href="Bv9ARM.ch04.html#incremental_zone_transfers">Incremental Zone Transfers (IXFR)</a></span></dt>
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2564066">Split DNS</a></span></dt>
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2564084">Example split DNS setup</a></span></dt></dl></dd>
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence<dt><span class="sect1"><a href="Bv9ARM.ch04.html#tsig">TSIG</a></span></dt>
fcb54ce0a4f7377486df5bec83b3aa4711bf4131Mark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571139">Generate Shared Keys for Each Pair of Hosts</a></span></dt>
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571212">Copying the Shared Secret to Both Machines</a></span></dt>
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571223">Informing the Servers of the Key's Existence</a></span></dt>
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571266">Instructing the Server to Use the Key</a></span></dt>
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571323">TSIG Key Based Access Control</a></span></dt>
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571440">Errors</a></span></dt>
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2571453">TKEY</a></span></dt>
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2571639">SIG(0)</a></span></dt>
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<dt><span class="sect1"><a href="Bv9ARM.ch04.html#DNSSEC">DNSSEC</a></span></dt>
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571776">Generating Keys</a></span></dt>
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571854">Signing the Zone</a></span></dt>
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571936">Configuring Servers</a></span></dt>
12a3ab37fe6556406acdf92fc7c5f198d603ca2eMark Andrews<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2572242">IPv6 Support in <acronym class="acronym">BIND</acronym> 9</a></span></dt>
2d46d268ccff30bb50e661b47c6496d23d9156c7Mark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2572304">Address Lookups Using AAAA Records</a></span></dt>
2d46d268ccff30bb50e661b47c6496d23d9156c7Mark Andrews<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2572325">Address to Name Lookups Using Nibble Format</a></span></dt>
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence<div class="titlepage"><div><div><h2 class="title" style="clear: both">
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence<a name="notify"></a>Notify</h2></div></div></div>
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence <acronym class="acronym">DNS</acronym> NOTIFY is a mechanism that allows master
596912ee9ca8eb14d30707ec286ab5d28bd39b3eMark Andrews servers to notify their slave servers of changes to a zone's data. In
8319af16557b81eba3277ee67215285f0823b587Mark Andrews response to a <span><strong class="command">NOTIFY</strong></span> from a master server, the
8319af16557b81eba3277ee67215285f0823b587Mark Andrews slave will check to see that its version of the zone is the
aee5e9cbacd8f88325840b8a498876f4319b0890Mark Andrews current version and, if not, initiate a zone transfer.
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence For more information about <acronym class="acronym">DNS</acronym>
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence <span><strong class="command">NOTIFY</strong></span>, see the description of the
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence <span><strong class="command">notify</strong></span> option in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called “Boolean Options”</a> and
c32b87bc54abacf95fb3b063d72b7d1855c1643bMichael Graff the description of the zone option <span><strong class="command">also-notify</strong></span> in
7f9f8c13c5e5e26e0ba2b82c0900d11ecf6269ceMark Andrews <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called “Zone Transfers”</a>. The <span><strong class="command">NOTIFY</strong></span>
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence protocol is specified in RFC 1996.
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence As a slave zone can also be a master to other slaves, <span><strong class="command">named</strong></span>,
f9cf2285cd7e334f059eb31b327ba81eb061450bEvan Hunt by default, sends <span><strong class="command">NOTIFY</strong></span> messages for every zone
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley it loads. Specifying <span><strong class="command">notify master-only;</strong></span> will
2320f230995995595438a9d9301d84931fd266ceMark Andrews cause <span><strong class="command">named</strong></span> to only send <span><strong class="command">NOTIFY</strong></span> for master
c427260a8678f2e99a2337fb95ec98d9c9ee8c05Mark Andrews zones that it loads.
6dcb47e37f9f0cdb94bdabc3fa157ff07983c590Mark Andrews<div class="titlepage"><div><div><h2 class="title" style="clear: both">
43b3337ba58d70ca34f4d91e8c6c5e13a54af690Mark Andrews<a name="dynamic_update"></a>Dynamic Update</h2></div></div></div>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley Dynamic Update is a method for adding, replacing or deleting
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley records in a master server by sending it a special form of DNS
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley messages. The format and meaning of these messages is specified
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt in RFC 2136.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley Dynamic update is enabled by including an
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley <span><strong class="command">allow-update</strong></span> or <span><strong class="command">update-policy</strong></span>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley clause in the <span><strong class="command">zone</strong></span> statement. The
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley <span><strong class="command">tkey-gssapi-credential</strong></span> and
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley <span><strong class="command">tkey-domain</strong></span> clauses in the
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence <span><strong class="command">options</strong></span> statement enable the
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence server to negotiate keys that can be matched against those
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence in <span><strong class="command">update-policy</strong></span> or
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence <span><strong class="command">allow-update</strong></span>.
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark Andrews Updating of secure zones (zones using DNSSEC) follows RFC
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark Andrews 3007: RRSIG, NSEC and NSEC3 records affected by updates are
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark Andrews automatically regenerated by the server using an online
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews zone key. Update authorization is based on transaction
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews signatures and an explicit server policy.
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<div class="titlepage"><div><div><h3 class="title">
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<a name="journal"></a>The journal file</h3></div></div></div>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley All changes made to a zone using dynamic update are stored
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley in the zone's journal file. This file is automatically created
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley by the server when the first dynamic update takes place.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley The name of the journal file is formed by appending the extension
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt <code class="filename">.jnl</code> to the name of the
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley corresponding zone
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley file unless specifically overridden. The journal file is in a
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley binary format and should not be edited manually.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley The server will also occasionally write ("dump")
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley the complete contents of the updated zone to its zone file.
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt This is not done immediately after
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley each dynamic update, because that would be too slow when a large
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt zone is updated frequently. Instead, the dump is delayed by
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt up to 15 minutes, allowing additional updates to take place.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley When a server is restarted after a shutdown or crash, it will replay
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt the journal file to incorporate into the zone any updates that
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley place after the last zone dump.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley Changes that result from incoming incremental zone transfers are
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley journalled in a similar way.
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt The zone files of dynamic zones cannot normally be edited by
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt hand because they are not guaranteed to contain the most recent
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt dynamic changes — those are only in the journal file.
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt The only way to ensure that the zone file of a dynamic zone
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley is up to date is to run <span><strong class="command">rndc stop</strong></span>.
<span><strong class="command">rndc freeze <em class="replaceable"><code>zone</code></em></strong></span>.
<span><strong class="command">rndc thaw <em class="replaceable"><code>zone</code></em></strong></span>
except queries for <code class="filename">site1.internal</code>, <code class="filename">site2.internal</code>, <code class="filename">site1.example.com</code>,
for <code class="filename">site1.example.com</code>, <code class="filename">site2.example.com</code>, <code class="filename">site1.internal</code>,
To protect the <code class="filename">site1.internal</code> and <code class="filename">site2.internal</code> domains,
be configured to serve the "public" version of the <code class="filename">site1</code> and <code class="filename">site2.example.com</code> zones.
and mail exchange (MX) records (<code class="filename">a.mx.example.com</code> and <code class="filename">b.mx.example.com</code>).
In addition, the public <code class="filename">site1</code> and <code class="filename">site2.example.com</code> zones
for information on how to configure your zone files, see <a href="Bv9ARM.ch03.html#sample_configuration" title="Sample Configurations">the section called “Sample Configurations”</a>.
zone "site1.example.com" {
zone "site2.example.com" {
zone "site1.internal" {
zone "site2.internal" {
zone "site1.example.com" {
zone "site2.example.com" {
A shared secret is generated to be shared between <span class="emphasis"><em>host1</em></span> and <span class="emphasis"><em>host2</em></span>.
<strong class="userinput"><code>dnssec-keygen -a hmac-md5 -b 128 -n HOST host1-host2.</code></strong>
Imagine <span class="emphasis"><em>host1</em></span> and <span class="emphasis"><em>host 2</em></span>
both servers. The following is added to each server's <code class="filename">named.conf</code> file:
The algorithm, <code class="literal">hmac-md5</code>, is the only one supported by <acronym class="acronym">BIND</acronym>.
be told when keys are to be used. The following is added to the <code class="filename">named.conf</code> file
for <span class="emphasis"><em>host1</em></span>, if the IP address of <span class="emphasis"><em>host2</em></span> is
to that address, the message will be signed with the specified key. <span class="emphasis"><em>host1</em></span> will
configuration file (with <span class="emphasis"><em>host1</em></span>'s address) for <span class="emphasis"><em>host2</em></span> to
<a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called “Dynamic Update Policies”</a>.
that the tools shipped with BIND 9.2.x and earlier are not compatible
<strong class="userinput"><code>dnssec-keygen -a RSASHA1 -b 768 -n ZONE child.example.</code></strong>
controls. These are here to ensure that <span><strong class="command">named</strong></span> is immune
example.com. 257 3 5 "AwEAAaxPMcR2x0HbQV4WeZB6oEDX+r0QM6
<a name="id2572242"></a>IPv6 Support in <acronym class="acronym">BIND</acronym> 9</h2></div></div></div>
see <a href="Bv9ARM.ch09.html#ipv6addresses" title="IPv6 addresses (AAAA)">the section called “IPv6 addresses (AAAA)”</a>.
$ORIGIN example.com.