]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/bind9/doc/arm/Bv9ARM.ch06.html
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / bind9 / doc / arm / Bv9ARM.ch06.html
1 <!--
2  - Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
3  - Copyright (C) 2000-2003 Internet Software Consortium.
4  - 
5  - Permission to use, copy, modify, and/or distribute this software for any
6  - purpose with or without fee is hereby granted, provided that the above
7  - copyright notice and this permission notice appear in all copies.
8  - 
9  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11  - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15  - PERFORMANCE OF THIS SOFTWARE.
16 -->
17 <!-- $Id$ -->
18 <html>
19 <head>
20 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21 <title>Chapter 6. BIND 9 Configuration Reference</title>
22 <meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
23 <link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
24 <link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
25 <link rel="prev" href="Bv9ARM.ch05.html" title="Chapter 5. The BIND 9 Lightweight Resolver">
26 <link rel="next" href="Bv9ARM.ch07.html" title="Chapter 7. BIND 9 Security Considerations">
27 </head>
28 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
29 <div class="navheader">
30 <table width="100%" summary="Navigation header">
31 <tr><th colspan="3" align="center">Chapter 6. <acronym class="acronym">BIND</acronym> 9 Configuration Reference</th></tr>
32 <tr>
33 <td width="20%" align="left">
34 <a accesskey="p" href="Bv9ARM.ch05.html">Prev</a> </td>
35 <th width="60%" align="center"> </th>
36 <td width="20%" align="right"> <a accesskey="n" href="Bv9ARM.ch07.html">Next</a>
37 </td>
38 </tr>
39 </table>
40 <hr>
41 </div>
42 <div class="chapter" lang="en">
43 <div class="titlepage"><div><div><h2 class="title">
44 <a name="Bv9ARM.ch06"></a>Chapter 6. <acronym class="acronym">BIND</acronym> 9 Configuration Reference</h2></div></div></div>
45 <div class="toc">
46 <p><b>Table of Contents</b></p>
47 <dl>
48 <dt><span class="sect1"><a href="Bv9ARM.ch06.html#configuration_file_elements">Configuration File Elements</a></span></dt>
49 <dd><dl>
50 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#address_match_lists">Address Match Lists</a></span></dt>
51 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574332">Comment Syntax</a></span></dt>
52 </dl></dd>
53 <dt><span class="sect1"><a href="Bv9ARM.ch06.html#Configuration_File_Grammar">Configuration File Grammar</a></span></dt>
54 <dd><dl>
55 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574986"><span><strong class="command">acl</strong></span> Statement Grammar</a></span></dt>
56 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#acl"><span><strong class="command">acl</strong></span> Statement Definition and
57           Usage</a></span></dt>
58 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2575176"><span><strong class="command">controls</strong></span> Statement Grammar</a></span></dt>
59 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage"><span><strong class="command">controls</strong></span> Statement Definition and
60           Usage</a></span></dt>
61 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2575467"><span><strong class="command">include</strong></span> Statement Grammar</a></span></dt>
62 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2575484"><span><strong class="command">include</strong></span> Statement Definition and
63           Usage</a></span></dt>
64 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2575576"><span><strong class="command">key</strong></span> Statement Grammar</a></span></dt>
65 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2575600"><span><strong class="command">key</strong></span> Statement Definition and Usage</a></span></dt>
66 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2575758"><span><strong class="command">logging</strong></span> Statement Grammar</a></span></dt>
67 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2575884"><span><strong class="command">logging</strong></span> Statement Definition and
68           Usage</a></span></dt>
69 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2577910"><span><strong class="command">lwres</strong></span> Statement Grammar</a></span></dt>
70 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2577984"><span><strong class="command">lwres</strong></span> Statement Definition and Usage</a></span></dt>
71 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2578116"><span><strong class="command">masters</strong></span> Statement Grammar</a></span></dt>
72 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2578160"><span><strong class="command">masters</strong></span> Statement Definition and
73           Usage</a></span></dt>
74 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2578174"><span><strong class="command">options</strong></span> Statement Grammar</a></span></dt>
75 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#options"><span><strong class="command">options</strong></span> Statement Definition and
76           Usage</a></span></dt>
77 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#server_statement_grammar"><span><strong class="command">server</strong></span> Statement Grammar</a></span></dt>
78 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#server_statement_definition_and_usage"><span><strong class="command">server</strong></span> Statement Definition and
79             Usage</a></span></dt>
80 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#statschannels"><span><strong class="command">statistics-channels</strong></span> Statement Grammar</a></span></dt>
81 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589534"><span><strong class="command">statistics-channels</strong></span> Statement Definition and
82             Usage</a></span></dt>
83 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#trusted-keys"><span><strong class="command">trusted-keys</strong></span> Statement Grammar</a></span></dt>
84 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589742"><span><strong class="command">trusted-keys</strong></span> Statement Definition
85             and Usage</a></span></dt>
86 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589858"><span><strong class="command">managed-keys</strong></span> Statement Grammar</a></span></dt>
87 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#managed-keys"><span><strong class="command">managed-keys</strong></span> Statement Definition
88             and Usage</a></span></dt>
89 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#view_statement_grammar"><span><strong class="command">view</strong></span> Statement Grammar</a></span></dt>
90 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2590352"><span><strong class="command">view</strong></span> Statement Definition and Usage</a></span></dt>
91 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#zone_statement_grammar"><span><strong class="command">zone</strong></span>
92             Statement Grammar</a></span></dt>
93 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2591902"><span><strong class="command">zone</strong></span> Statement Definition and Usage</a></span></dt>
94 </dl></dd>
95 <dt><span class="sect1"><a href="Bv9ARM.ch06.html#id2595170">Zone File</a></span></dt>
96 <dd><dl>
97 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#types_of_resource_records_and_when_to_use_them">Types of Resource Records and When to Use Them</a></span></dt>
98 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2597537">Discussion of MX Records</a></span></dt>
99 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#Setting_TTLs">Setting TTLs</a></span></dt>
100 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2598084">Inverse Mapping in IPv4</a></span></dt>
101 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2598211">Other Zone File Directives</a></span></dt>
102 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2598552"><acronym class="acronym">BIND</acronym> Master File Extension: the  <span><strong class="command">$GENERATE</strong></span> Directive</a></span></dt>
103 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#zonefile_format">Additional File Formats</a></span></dt>
104 </dl></dd>
105 <dt><span class="sect1"><a href="Bv9ARM.ch06.html#statistics">BIND9 Statistics</a></span></dt>
106 <dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch06.html#statistics_counters">Statistics Counters</a></span></dt></dl></dd>
107 </dl>
108 </div>
109 <p>
110       <acronym class="acronym">BIND</acronym> 9 configuration is broadly similar
111       to <acronym class="acronym">BIND</acronym> 8; however, there are a few new
112       areas
113       of configuration, such as views. <acronym class="acronym">BIND</acronym>
114       8 configuration files should work with few alterations in <acronym class="acronym">BIND</acronym>
115       9, although more complex configurations should be reviewed to check
116       if they can be more efficiently implemented using the new features
117       found in <acronym class="acronym">BIND</acronym> 9.
118     </p>
119 <p>
120       <acronym class="acronym">BIND</acronym> 4 configuration files can be
121       converted to the new format
122       using the shell script
123       <code class="filename">contrib/named-bootconf/named-bootconf.sh</code>.
124     </p>
125 <div class="sect1" lang="en">
126 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
127 <a name="configuration_file_elements"></a>Configuration File Elements</h2></div></div></div>
128 <p>
129         Following is a list of elements used throughout the <acronym class="acronym">BIND</acronym> configuration
130         file documentation:
131       </p>
132 <div class="informaltable"><table border="1">
133 <colgroup>
134 <col>
135 <col>
136 </colgroup>
137 <tbody>
138 <tr>
139 <td>
140                 <p>
141                   <code class="varname">acl_name</code>
142                 </p>
143               </td>
144 <td>
145                 <p>
146                   The name of an <code class="varname">address_match_list</code> as
147                   defined by the <span><strong class="command">acl</strong></span> statement.
148                 </p>
149               </td>
150 </tr>
151 <tr>
152 <td>
153                 <p>
154                   <code class="varname">address_match_list</code>
155                 </p>
156               </td>
157 <td>
158                 <p>
159                   A list of one or more
160                   <code class="varname">ip_addr</code>,
161                   <code class="varname">ip_prefix</code>, <code class="varname">key_id</code>,
162                   or <code class="varname">acl_name</code> elements, see
163                   <a href="Bv9ARM.ch06.html#address_match_lists" title="Address Match Lists">the section called &#8220;Address Match Lists&#8221;</a>.
164                 </p>
165               </td>
166 </tr>
167 <tr>
168 <td>
169                 <p>
170                   <code class="varname">masters_list</code>
171                 </p>
172               </td>
173 <td>
174                 <p>
175                   A named list of one or more <code class="varname">ip_addr</code>
176                   with optional <code class="varname">key_id</code> and/or
177                   <code class="varname">ip_port</code>.
178                   A <code class="varname">masters_list</code> may include other
179                   <code class="varname">masters_lists</code>.
180                 </p>
181               </td>
182 </tr>
183 <tr>
184 <td>
185                 <p>
186                   <code class="varname">domain_name</code>
187                 </p>
188               </td>
189 <td>
190                 <p>
191                   A quoted string which will be used as
192                   a DNS name, for example "<code class="literal">my.test.domain</code>".
193                 </p>
194               </td>
195 </tr>
196 <tr>
197 <td>
198                 <p>
199                   <code class="varname">namelist</code>
200                 </p>
201               </td>
202 <td>
203                 <p>
204                   A list of one or more <code class="varname">domain_name</code>
205                   elements.
206                 </p>
207               </td>
208 </tr>
209 <tr>
210 <td>
211                 <p>
212                   <code class="varname">dotted_decimal</code>
213                 </p>
214               </td>
215 <td>
216                 <p>
217                   One to four integers valued 0 through
218                   255 separated by dots (`.'), such as <span><strong class="command">123</strong></span>,
219                   <span><strong class="command">45.67</strong></span> or <span><strong class="command">89.123.45.67</strong></span>.
220                 </p>
221               </td>
222 </tr>
223 <tr>
224 <td>
225                 <p>
226                   <code class="varname">ip4_addr</code>
227                 </p>
228               </td>
229 <td>
230                 <p>
231                   An IPv4 address with exactly four elements
232                   in <code class="varname">dotted_decimal</code> notation.
233                 </p>
234               </td>
235 </tr>
236 <tr>
237 <td>
238                 <p>
239                   <code class="varname">ip6_addr</code>
240                 </p>
241               </td>
242 <td>
243                 <p>
244                   An IPv6 address, such as <span><strong class="command">2001:db8::1234</strong></span>.
245                   IPv6 scoped addresses that have ambiguity on their
246                   scope zones must be disambiguated by an appropriate
247                   zone ID with the percent character (`%') as
248                   delimiter.  It is strongly recommended to use
249                   string zone names rather than numeric identifiers,
250                   in order to be robust against system configuration
251                   changes.  However, since there is no standard
252                   mapping for such names and identifier values,
253                   currently only interface names as link identifiers
254                   are supported, assuming one-to-one mapping between
255                   interfaces and links.  For example, a link-local
256                   address <span><strong class="command">fe80::1</strong></span> on the link
257                   attached to the interface <span><strong class="command">ne0</strong></span>
258                   can be specified as <span><strong class="command">fe80::1%ne0</strong></span>.
259                   Note that on most systems link-local addresses
260                   always have the ambiguity, and need to be
261                   disambiguated.
262                 </p>
263               </td>
264 </tr>
265 <tr>
266 <td>
267                 <p>
268                   <code class="varname">ip_addr</code>
269                 </p>
270               </td>
271 <td>
272                 <p>
273                   An <code class="varname">ip4_addr</code> or <code class="varname">ip6_addr</code>.
274                 </p>
275               </td>
276 </tr>
277 <tr>
278 <td>
279                 <p>
280                   <code class="varname">ip_port</code>
281                 </p>
282               </td>
283 <td>
284                 <p>
285                   An IP port <code class="varname">number</code>.
286                   The <code class="varname">number</code> is limited to 0
287                   through 65535, with values
288                   below 1024 typically restricted to use by processes running
289                   as root.
290                   In some cases, an asterisk (`*') character can be used as a
291                   placeholder to
292                   select a random high-numbered port.
293                 </p>
294               </td>
295 </tr>
296 <tr>
297 <td>
298                 <p>
299                   <code class="varname">ip_prefix</code>
300                 </p>
301               </td>
302 <td>
303                 <p>
304                   An IP network specified as an <code class="varname">ip_addr</code>,
305                   followed by a slash (`/') and then the number of bits in the
306                   netmask.
307                   Trailing zeros in a <code class="varname">ip_addr</code>
308                   may omitted.
309                   For example, <span><strong class="command">127/8</strong></span> is the
310                   network <span><strong class="command">127.0.0.0</strong></span> with
311                   netmask <span><strong class="command">255.0.0.0</strong></span> and <span><strong class="command">1.2.3.0/28</strong></span> is
312                   network <span><strong class="command">1.2.3.0</strong></span> with netmask <span><strong class="command">255.255.255.240</strong></span>.
313                 </p>
314                 <p>
315                   When specifying a prefix involving a IPv6 scoped address
316                   the scope may be omitted.  In that case the prefix will
317                   match packets from any scope.
318                 </p>
319               </td>
320 </tr>
321 <tr>
322 <td>
323                 <p>
324                   <code class="varname">key_id</code>
325                 </p>
326               </td>
327 <td>
328                 <p>
329                   A <code class="varname">domain_name</code> representing
330                   the name of a shared key, to be used for transaction
331                   security.
332                 </p>
333               </td>
334 </tr>
335 <tr>
336 <td>
337                 <p>
338                   <code class="varname">key_list</code>
339                 </p>
340               </td>
341 <td>
342                 <p>
343                   A list of one or more
344                   <code class="varname">key_id</code>s,
345                   separated by semicolons and ending with a semicolon.
346                 </p>
347               </td>
348 </tr>
349 <tr>
350 <td>
351                 <p>
352                   <code class="varname">number</code>
353                 </p>
354               </td>
355 <td>
356                 <p>
357                   A non-negative 32-bit integer
358                   (i.e., a number between 0 and 4294967295, inclusive).
359                   Its acceptable value might further
360                   be limited by the context in which it is used.
361                 </p>
362               </td>
363 </tr>
364 <tr>
365 <td>
366                 <p>
367                   <code class="varname">path_name</code>
368                 </p>
369               </td>
370 <td>
371                 <p>
372                   A quoted string which will be used as
373                   a pathname, such as <code class="filename">zones/master/my.test.domain</code>.
374                 </p>
375               </td>
376 </tr>
377 <tr>
378 <td>
379                 <p>
380                   <code class="varname">port_list</code>
381                 </p>
382               </td>
383 <td>
384                 <p>
385                   A list of an <code class="varname">ip_port</code> or a port
386                   range.
387                   A port range is specified in the form of
388                   <strong class="userinput"><code>range</code></strong> followed by
389                   two <code class="varname">ip_port</code>s,
390                   <code class="varname">port_low</code> and
391                   <code class="varname">port_high</code>, which represents
392                   port numbers from <code class="varname">port_low</code> through
393                   <code class="varname">port_high</code>, inclusive.
394                   <code class="varname">port_low</code> must not be larger than
395                   <code class="varname">port_high</code>.
396                   For example,
397                   <strong class="userinput"><code>range 1024 65535</code></strong> represents
398                   ports from 1024 through 65535.
399                   In either case an asterisk (`*') character is not
400                   allowed as a valid <code class="varname">ip_port</code>.
401                 </p>
402               </td>
403 </tr>
404 <tr>
405 <td>
406                 <p>
407                   <code class="varname">size_spec</code>
408                 </p>
409               </td>
410 <td>
411                 <p>
412                   A number, the word <strong class="userinput"><code>unlimited</code></strong>,
413                   or the word <strong class="userinput"><code>default</code></strong>.
414                 </p>
415                 <p>
416                   An <code class="varname">unlimited</code> <code class="varname">size_spec</code> requests unlimited
417                   use, or the maximum available amount. A <code class="varname">default size_spec</code> uses
418                   the limit that was in force when the server was started.
419                 </p>
420                 <p>
421                   A <code class="varname">number</code> can optionally be
422                   followed by a scaling factor:
423                   <strong class="userinput"><code>K</code></strong> or <strong class="userinput"><code>k</code></strong>
424                   for kilobytes,
425                   <strong class="userinput"><code>M</code></strong> or <strong class="userinput"><code>m</code></strong>
426                   for megabytes, and
427                   <strong class="userinput"><code>G</code></strong> or <strong class="userinput"><code>g</code></strong> for gigabytes,
428                   which scale by 1024, 1024*1024, and 1024*1024*1024
429                   respectively.
430                 </p>
431                 <p>
432                   The value must be representable as a 64-bit unsigned integer
433                   (0 to 18446744073709551615, inclusive).
434                   Using <code class="varname">unlimited</code> is the best
435                   way
436                   to safely set a really large number.
437                 </p>
438               </td>
439 </tr>
440 <tr>
441 <td>
442                 <p>
443                   <code class="varname">yes_or_no</code>
444                 </p>
445               </td>
446 <td>
447                 <p>
448                   Either <strong class="userinput"><code>yes</code></strong> or <strong class="userinput"><code>no</code></strong>.
449                   The words <strong class="userinput"><code>true</code></strong> and <strong class="userinput"><code>false</code></strong> are
450                   also accepted, as are the numbers <strong class="userinput"><code>1</code></strong>
451                   and <strong class="userinput"><code>0</code></strong>.
452                 </p>
453               </td>
454 </tr>
455 <tr>
456 <td>
457                 <p>
458                   <code class="varname">dialup_option</code>
459                 </p>
460               </td>
461 <td>
462                 <p>
463                   One of <strong class="userinput"><code>yes</code></strong>,
464                   <strong class="userinput"><code>no</code></strong>, <strong class="userinput"><code>notify</code></strong>,
465                   <strong class="userinput"><code>notify-passive</code></strong>, <strong class="userinput"><code>refresh</code></strong> or
466                   <strong class="userinput"><code>passive</code></strong>.
467                   When used in a zone, <strong class="userinput"><code>notify-passive</code></strong>,
468                   <strong class="userinput"><code>refresh</code></strong>, and <strong class="userinput"><code>passive</code></strong>
469                   are restricted to slave and stub zones.
470                 </p>
471               </td>
472 </tr>
473 </tbody>
474 </table></div>
475 <div class="sect2" lang="en">
476 <div class="titlepage"><div><div><h3 class="title">
477 <a name="address_match_lists"></a>Address Match Lists</h3></div></div></div>
478 <div class="sect3" lang="en">
479 <div class="titlepage"><div><div><h4 class="title">
480 <a name="id2574099"></a>Syntax</h4></div></div></div>
481 <pre class="programlisting"><code class="varname">address_match_list</code> = address_match_list_element ;
482   [<span class="optional"> address_match_list_element; ... </span>]
483 <code class="varname">address_match_list_element</code> = [<span class="optional"> ! </span>] (ip_address [<span class="optional">/length</span>] |
484    key key_id | acl_name | { address_match_list } )
485 </pre>
486 </div>
487 <div class="sect3" lang="en">
488 <div class="titlepage"><div><div><h4 class="title">
489 <a name="id2574126"></a>Definition and Usage</h4></div></div></div>
490 <p>
491             Address match lists are primarily used to determine access
492             control for various server operations. They are also used in
493             the <span><strong class="command">listen-on</strong></span> and <span><strong class="command">sortlist</strong></span>
494             statements. The elements which constitute an address match
495             list can be any of the following:
496           </p>
497 <div class="itemizedlist"><ul type="disc">
498 <li>an IP address (IPv4 or IPv6)</li>
499 <li>an IP prefix (in `/' notation)</li>
500 <li>
501                 a key ID, as defined by the <span><strong class="command">key</strong></span>
502                 statement
503               </li>
504 <li>the name of an address match list defined with
505                 the <span><strong class="command">acl</strong></span> statement
506               </li>
507 <li>a nested address match list enclosed in braces</li>
508 </ul></div>
509 <p>
510             Elements can be negated with a leading exclamation mark (`!'),
511             and the match list names "any", "none", "localhost", and
512             "localnets" are predefined. More information on those names
513             can be found in the description of the acl statement.
514           </p>
515 <p>
516             The addition of the key clause made the name of this syntactic
517             element something of a misnomer, since security keys can be used
518             to validate access without regard to a host or network address.
519             Nonetheless, the term "address match list" is still used
520             throughout the documentation.
521           </p>
522 <p>
523             When a given IP address or prefix is compared to an address
524             match list, the comparison takes place in approximately O(1)
525             time.  However, key comparisons require that the list of keys
526             be traversed until a matching key is found, and therefore may
527             be somewhat slower.
528           </p>
529 <p>
530             The interpretation of a match depends on whether the list is being
531             used for access control, defining <span><strong class="command">listen-on</strong></span> ports, or in a
532             <span><strong class="command">sortlist</strong></span>, and whether the element was negated.
533           </p>
534 <p>
535             When used as an access control list, a non-negated match
536             allows access and a negated match denies access. If
537             there is no match, access is denied. The clauses
538             <span><strong class="command">allow-notify</strong></span>,
539             <span><strong class="command">allow-recursion</strong></span>,
540             <span><strong class="command">allow-recursion-on</strong></span>,
541             <span><strong class="command">allow-query</strong></span>,
542             <span><strong class="command">allow-query-on</strong></span>,
543             <span><strong class="command">allow-query-cache</strong></span>,
544             <span><strong class="command">allow-query-cache-on</strong></span>,
545             <span><strong class="command">allow-transfer</strong></span>,
546             <span><strong class="command">allow-update</strong></span>,
547             <span><strong class="command">allow-update-forwarding</strong></span>, and
548             <span><strong class="command">blackhole</strong></span> all use address match
549             lists.  Similarly, the <span><strong class="command">listen-on</strong></span> option will cause the
550             server to refuse queries on any of the machine's
551             addresses which do not match the list.
552           </p>
553 <p>
554             Order of insertion is significant.  If more than one element
555             in an ACL is found to match a given IP address or prefix,
556             preference will be given to the one that came
557             <span class="emphasis"><em>first</em></span> in the ACL definition.
558             Because of this first-match behavior, an element that
559             defines a subset of another element in the list should
560             come before the broader element, regardless of whether
561             either is negated. For example, in
562             <span><strong class="command">1.2.3/24; ! 1.2.3.13;</strong></span>
563             the 1.2.3.13 element is completely useless because the
564             algorithm will match any lookup for 1.2.3.13 to the 1.2.3/24
565             element.  Using <span><strong class="command">! 1.2.3.13; 1.2.3/24</strong></span> fixes
566             that problem by having 1.2.3.13 blocked by the negation, but
567             all other 1.2.3.* hosts fall through.
568           </p>
569 </div>
570 </div>
571 <div class="sect2" lang="en">
572 <div class="titlepage"><div><div><h3 class="title">
573 <a name="id2574332"></a>Comment Syntax</h3></div></div></div>
574 <p>
575           The <acronym class="acronym">BIND</acronym> 9 comment syntax allows for
576           comments to appear
577           anywhere that whitespace may appear in a <acronym class="acronym">BIND</acronym> configuration
578           file. To appeal to programmers of all kinds, they can be written
579           in the C, C++, or shell/perl style.
580         </p>
581 <div class="sect3" lang="en">
582 <div class="titlepage"><div><div><h4 class="title">
583 <a name="id2574347"></a>Syntax</h4></div></div></div>
584 <p>
585             </p>
586 <pre class="programlisting">/* This is a <acronym class="acronym">BIND</acronym> comment as in C */</pre>
587 <p>
588             </p>
589 <pre class="programlisting">// This is a <acronym class="acronym">BIND</acronym> comment as in C++</pre>
590 <p>
591             </p>
592 <pre class="programlisting"># This is a <acronym class="acronym">BIND</acronym> comment as in common UNIX shells
593 # and perl</pre>
594 <p>
595           </p>
596 </div>
597 <div class="sect3" lang="en">
598 <div class="titlepage"><div><div><h4 class="title">
599 <a name="id2574377"></a>Definition and Usage</h4></div></div></div>
600 <p>
601             Comments may appear anywhere that whitespace may appear in
602             a <acronym class="acronym">BIND</acronym> configuration file.
603           </p>
604 <p>
605             C-style comments start with the two characters /* (slash,
606             star) and end with */ (star, slash). Because they are completely
607             delimited with these characters, they can be used to comment only
608             a portion of a line or to span multiple lines.
609           </p>
610 <p>
611             C-style comments cannot be nested. For example, the following
612             is not valid because the entire comment ends with the first */:
613           </p>
614 <p>
615
616 </p>
617 <pre class="programlisting">/* This is the start of a comment.
618    This is still part of the comment.
619 /* This is an incorrect attempt at nesting a comment. */
620    This is no longer in any comment. */
621 </pre>
622 <p>
623
624           </p>
625 <p>
626             C++-style comments start with the two characters // (slash,
627             slash) and continue to the end of the physical line. They cannot
628             be continued across multiple physical lines; to have one logical
629             comment span multiple lines, each line must use the // pair.
630             For example:
631           </p>
632 <p>
633
634 </p>
635 <pre class="programlisting">// This is the start of a comment.  The next line
636 // is a new comment, even though it is logically
637 // part of the previous comment.
638 </pre>
639 <p>
640
641           </p>
642 <p>
643             Shell-style (or perl-style, if you prefer) comments start
644             with the character <code class="literal">#</code> (number sign)
645             and continue to the end of the
646             physical line, as in C++ comments.
647             For example:
648           </p>
649 <p>
650
651 </p>
652 <pre class="programlisting"># This is the start of a comment.  The next line
653 # is a new comment, even though it is logically
654 # part of the previous comment.
655 </pre>
656 <p>
657
658           </p>
659 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
660 <h3 class="title">Warning</h3>
661 <p>
662               You cannot use the semicolon (`;') character
663               to start a comment such as you would in a zone file. The
664               semicolon indicates the end of a configuration
665               statement.
666             </p>
667 </div>
668 </div>
669 </div>
670 </div>
671 <div class="sect1" lang="en">
672 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
673 <a name="Configuration_File_Grammar"></a>Configuration File Grammar</h2></div></div></div>
674 <p>
675         A <acronym class="acronym">BIND</acronym> 9 configuration consists of
676         statements and comments.
677         Statements end with a semicolon. Statements and comments are the
678         only elements that can appear without enclosing braces. Many
679         statements contain a block of sub-statements, which are also
680         terminated with a semicolon.
681       </p>
682 <p>
683         The following statements are supported:
684       </p>
685 <div class="informaltable"><table border="1">
686 <colgroup>
687 <col>
688 <col>
689 </colgroup>
690 <tbody>
691 <tr>
692 <td>
693                 <p><span><strong class="command">acl</strong></span></p>
694               </td>
695 <td>
696                 <p>
697                   defines a named IP address
698                   matching list, for access control and other uses.
699                 </p>
700               </td>
701 </tr>
702 <tr>
703 <td>
704                 <p><span><strong class="command">controls</strong></span></p>
705               </td>
706 <td>
707                 <p>
708                   declares control channels to be used
709                   by the <span><strong class="command">rndc</strong></span> utility.
710                 </p>
711               </td>
712 </tr>
713 <tr>
714 <td>
715                 <p><span><strong class="command">include</strong></span></p>
716               </td>
717 <td>
718                 <p>
719                   includes a file.
720                 </p>
721               </td>
722 </tr>
723 <tr>
724 <td>
725                 <p><span><strong class="command">key</strong></span></p>
726               </td>
727 <td>
728                 <p>
729                   specifies key information for use in
730                   authentication and authorization using TSIG.
731                 </p>
732               </td>
733 </tr>
734 <tr>
735 <td>
736                 <p><span><strong class="command">logging</strong></span></p>
737               </td>
738 <td>
739                 <p>
740                   specifies what the server logs, and where
741                   the log messages are sent.
742                 </p>
743               </td>
744 </tr>
745 <tr>
746 <td>
747                 <p><span><strong class="command">lwres</strong></span></p>
748               </td>
749 <td>
750                 <p>
751                   configures <span><strong class="command">named</strong></span> to
752                   also act as a light-weight resolver daemon (<span><strong class="command">lwresd</strong></span>).
753                 </p>
754               </td>
755 </tr>
756 <tr>
757 <td>
758                 <p><span><strong class="command">masters</strong></span></p>
759               </td>
760 <td>
761                 <p>
762                   defines a named masters list for
763                   inclusion in stub and slave zone masters clauses.
764                 </p>
765               </td>
766 </tr>
767 <tr>
768 <td>
769                 <p><span><strong class="command">options</strong></span></p>
770               </td>
771 <td>
772                 <p>
773                   controls global server configuration
774                   options and sets defaults for other statements.
775                 </p>
776               </td>
777 </tr>
778 <tr>
779 <td>
780                 <p><span><strong class="command">server</strong></span></p>
781               </td>
782 <td>
783                 <p>
784                   sets certain configuration options on
785                   a per-server basis.
786                 </p>
787               </td>
788 </tr>
789 <tr>
790 <td>
791                 <p><span><strong class="command">statistics-channels</strong></span></p>
792               </td>
793 <td>
794                 <p>
795                   declares communication channels to get access to
796                   <span><strong class="command">named</strong></span> statistics.
797                 </p>
798               </td>
799 </tr>
800 <tr>
801 <td>
802                 <p><span><strong class="command">trusted-keys</strong></span></p>
803               </td>
804 <td>
805                 <p>
806                   defines trusted DNSSEC keys.
807                 </p>
808               </td>
809 </tr>
810 <tr>
811 <td>
812                 <p><span><strong class="command">managed-keys</strong></span></p>
813               </td>
814 <td>
815                 <p>
816                   lists DNSSEC keys to be kept up to date
817                   using RFC 5011 trust anchor maintenance.
818                 </p>
819               </td>
820 </tr>
821 <tr>
822 <td>
823                 <p><span><strong class="command">view</strong></span></p>
824               </td>
825 <td>
826                 <p>
827                   defines a view.
828                 </p>
829               </td>
830 </tr>
831 <tr>
832 <td>
833                 <p><span><strong class="command">zone</strong></span></p>
834               </td>
835 <td>
836                 <p>
837                   defines a zone.
838                 </p>
839               </td>
840 </tr>
841 </tbody>
842 </table></div>
843 <p>
844         The <span><strong class="command">logging</strong></span> and
845         <span><strong class="command">options</strong></span> statements may only occur once
846         per
847         configuration.
848       </p>
849 <div class="sect2" lang="en">
850 <div class="titlepage"><div><div><h3 class="title">
851 <a name="id2574986"></a><span><strong class="command">acl</strong></span> Statement Grammar</h3></div></div></div>
852 <pre class="programlisting"><span><strong class="command">acl</strong></span> acl-name {
853     address_match_list
854 };
855 </pre>
856 </div>
857 <div class="sect2" lang="en">
858 <div class="titlepage"><div><div><h3 class="title">
859 <a name="acl"></a><span><strong class="command">acl</strong></span> Statement Definition and
860           Usage</h3></div></div></div>
861 <p>
862           The <span><strong class="command">acl</strong></span> statement assigns a symbolic
863           name to an address match list. It gets its name from a primary
864           use of address match lists: Access Control Lists (ACLs).
865         </p>
866 <p>
867           Note that an address match list's name must be defined
868           with <span><strong class="command">acl</strong></span> before it can be used
869           elsewhere; no forward references are allowed.
870         </p>
871 <p>
872           The following ACLs are built-in:
873         </p>
874 <div class="informaltable"><table border="1">
875 <colgroup>
876 <col>
877 <col>
878 </colgroup>
879 <tbody>
880 <tr>
881 <td>
882                   <p><span><strong class="command">any</strong></span></p>
883                 </td>
884 <td>
885                   <p>
886                     Matches all hosts.
887                   </p>
888                 </td>
889 </tr>
890 <tr>
891 <td>
892                   <p><span><strong class="command">none</strong></span></p>
893                 </td>
894 <td>
895                   <p>
896                     Matches no hosts.
897                   </p>
898                 </td>
899 </tr>
900 <tr>
901 <td>
902                   <p><span><strong class="command">localhost</strong></span></p>
903                 </td>
904 <td>
905                   <p>
906                     Matches the IPv4 and IPv6 addresses of all network
907                     interfaces on the system.
908                   </p>
909                 </td>
910 </tr>
911 <tr>
912 <td>
913                   <p><span><strong class="command">localnets</strong></span></p>
914                 </td>
915 <td>
916                   <p>
917                     Matches any host on an IPv4 or IPv6 network
918                     for which the system has an interface.
919                     Some systems do not provide a way to determine the prefix
920                     lengths of
921                     local IPv6 addresses.
922                     In such a case, <span><strong class="command">localnets</strong></span>
923                     only matches the local
924                     IPv6 addresses, just like <span><strong class="command">localhost</strong></span>.
925                   </p>
926                 </td>
927 </tr>
928 </tbody>
929 </table></div>
930 </div>
931 <div class="sect2" lang="en">
932 <div class="titlepage"><div><div><h3 class="title">
933 <a name="id2575176"></a><span><strong class="command">controls</strong></span> Statement Grammar</h3></div></div></div>
934 <pre class="programlisting"><span><strong class="command">controls</strong></span> {
935    [ inet ( ip_addr | * ) [ port ip_port ]
936                 allow { <em class="replaceable"><code> address_match_list </code></em> }
937                 keys { <em class="replaceable"><code>key_list</code></em> }; ]
938    [ inet ...; ]
939    [ unix <em class="replaceable"><code>path</code></em> perm <em class="replaceable"><code>number</code></em> owner <em class="replaceable"><code>number</code></em> group <em class="replaceable"><code>number</code></em>
940      keys { <em class="replaceable"><code>key_list</code></em> }; ]
941    [ unix ...; ]
942 };
943 </pre>
944 </div>
945 <div class="sect2" lang="en">
946 <div class="titlepage"><div><div><h3 class="title">
947 <a name="controls_statement_definition_and_usage"></a><span><strong class="command">controls</strong></span> Statement Definition and
948           Usage</h3></div></div></div>
949 <p>
950           The <span><strong class="command">controls</strong></span> statement declares control
951           channels to be used by system administrators to control the
952           operation of the name server. These control channels are
953           used by the <span><strong class="command">rndc</strong></span> utility to send
954           commands to and retrieve non-DNS results from a name server.
955         </p>
956 <p>
957           An <span><strong class="command">inet</strong></span> control channel is a TCP socket
958           listening at the specified <span><strong class="command">ip_port</strong></span> on the
959           specified <span><strong class="command">ip_addr</strong></span>, which can be an IPv4 or IPv6
960           address.  An <span><strong class="command">ip_addr</strong></span> of <code class="literal">*</code> (asterisk) is
961           interpreted as the IPv4 wildcard address; connections will be
962           accepted on any of the system's IPv4 addresses.
963           To listen on the IPv6 wildcard address,
964           use an <span><strong class="command">ip_addr</strong></span> of <code class="literal">::</code>.
965           If you will only use <span><strong class="command">rndc</strong></span> on the local host,
966           using the loopback address (<code class="literal">127.0.0.1</code>
967           or <code class="literal">::1</code>) is recommended for maximum security.
968         </p>
969 <p>
970           If no port is specified, port 953 is used. The asterisk
971           "<code class="literal">*</code>" cannot be used for <span><strong class="command">ip_port</strong></span>.
972         </p>
973 <p>
974           The ability to issue commands over the control channel is
975           restricted by the <span><strong class="command">allow</strong></span> and
976           <span><strong class="command">keys</strong></span> clauses.
977           Connections to the control channel are permitted based on the
978           <span><strong class="command">address_match_list</strong></span>.  This is for simple
979           IP address based filtering only; any <span><strong class="command">key_id</strong></span>
980           elements of the <span><strong class="command">address_match_list</strong></span>
981           are ignored.
982         </p>
983 <p>
984           A <span><strong class="command">unix</strong></span> control channel is a UNIX domain
985           socket listening at the specified path in the file system.
986           Access to the socket is specified by the <span><strong class="command">perm</strong></span>,
987           <span><strong class="command">owner</strong></span> and <span><strong class="command">group</strong></span> clauses.
988           Note on some platforms (SunOS and Solaris) the permissions
989           (<span><strong class="command">perm</strong></span>) are applied to the parent directory
990           as the permissions on the socket itself are ignored.
991         </p>
992 <p>
993           The primary authorization mechanism of the command
994           channel is the <span><strong class="command">key_list</strong></span>, which
995           contains a list of <span><strong class="command">key_id</strong></span>s.
996           Each <span><strong class="command">key_id</strong></span> in the <span><strong class="command">key_list</strong></span>
997           is authorized to execute commands over the control channel.
998           See <a href="Bv9ARM.ch03.html#rndc">Remote Name Daemon Control application</a> in <a href="Bv9ARM.ch03.html#admin_tools" title="Administrative Tools">the section called &#8220;Administrative Tools&#8221;</a>)
999           for information about configuring keys in <span><strong class="command">rndc</strong></span>.
1000         </p>
1001 <p>
1002           If no <span><strong class="command">controls</strong></span> statement is present,
1003           <span><strong class="command">named</strong></span> will set up a default
1004           control channel listening on the loopback address 127.0.0.1
1005           and its IPv6 counterpart ::1.
1006           In this case, and also when the <span><strong class="command">controls</strong></span> statement
1007           is present but does not have a <span><strong class="command">keys</strong></span> clause,
1008           <span><strong class="command">named</strong></span> will attempt to load the command channel key
1009           from the file <code class="filename">rndc.key</code> in
1010           <code class="filename">/etc</code> (or whatever <code class="varname">sysconfdir</code>
1011           was specified as when <acronym class="acronym">BIND</acronym> was built).
1012           To create a <code class="filename">rndc.key</code> file, run
1013           <strong class="userinput"><code>rndc-confgen -a</code></strong>.
1014         </p>
1015 <p>
1016           The <code class="filename">rndc.key</code> feature was created to
1017           ease the transition of systems from <acronym class="acronym">BIND</acronym> 8,
1018           which did not have digital signatures on its command channel
1019           messages and thus did not have a <span><strong class="command">keys</strong></span> clause.
1020
1021           It makes it possible to use an existing <acronym class="acronym">BIND</acronym> 8
1022           configuration file in <acronym class="acronym">BIND</acronym> 9 unchanged,
1023           and still have <span><strong class="command">rndc</strong></span> work the same way
1024           <span><strong class="command">ndc</strong></span> worked in BIND 8, simply by executing the
1025           command <strong class="userinput"><code>rndc-confgen -a</code></strong> after BIND 9 is
1026           installed.
1027         </p>
1028 <p>
1029           Since the <code class="filename">rndc.key</code> feature
1030           is only intended to allow the backward-compatible usage of
1031           <acronym class="acronym">BIND</acronym> 8 configuration files, this
1032           feature does not
1033           have a high degree of configurability.  You cannot easily change
1034           the key name or the size of the secret, so you should make a
1035           <code class="filename">rndc.conf</code> with your own key if you
1036           wish to change
1037           those things.  The <code class="filename">rndc.key</code> file
1038           also has its
1039           permissions set such that only the owner of the file (the user that
1040           <span><strong class="command">named</strong></span> is running as) can access it.
1041           If you
1042           desire greater flexibility in allowing other users to access
1043           <span><strong class="command">rndc</strong></span> commands, then you need to create
1044           a
1045           <code class="filename">rndc.conf</code> file and make it group
1046           readable by a group
1047           that contains the users who should have access.
1048         </p>
1049 <p>
1050           To disable the command channel, use an empty
1051           <span><strong class="command">controls</strong></span> statement:
1052           <span><strong class="command">controls { };</strong></span>.
1053         </p>
1054 </div>
1055 <div class="sect2" lang="en">
1056 <div class="titlepage"><div><div><h3 class="title">
1057 <a name="id2575467"></a><span><strong class="command">include</strong></span> Statement Grammar</h3></div></div></div>
1058 <pre class="programlisting"><span><strong class="command">include</strong></span> <em class="replaceable"><code>filename</code></em>;</pre>
1059 </div>
1060 <div class="sect2" lang="en">
1061 <div class="titlepage"><div><div><h3 class="title">
1062 <a name="id2575484"></a><span><strong class="command">include</strong></span> Statement Definition and
1063           Usage</h3></div></div></div>
1064 <p>
1065           The <span><strong class="command">include</strong></span> statement inserts the
1066           specified file at the point where the <span><strong class="command">include</strong></span>
1067           statement is encountered. The <span><strong class="command">include</strong></span>
1068                 statement facilitates the administration of configuration
1069           files
1070           by permitting the reading or writing of some things but not
1071           others. For example, the statement could include private keys
1072           that are readable only by the name server.
1073         </p>
1074 </div>
1075 <div class="sect2" lang="en">
1076 <div class="titlepage"><div><div><h3 class="title">
1077 <a name="id2575576"></a><span><strong class="command">key</strong></span> Statement Grammar</h3></div></div></div>
1078 <pre class="programlisting"><span><strong class="command">key</strong></span> <em class="replaceable"><code>key_id</code></em> {
1079     algorithm <em class="replaceable"><code>string</code></em>;
1080     secret <em class="replaceable"><code>string</code></em>;
1081 };
1082 </pre>
1083 </div>
1084 <div class="sect2" lang="en">
1085 <div class="titlepage"><div><div><h3 class="title">
1086 <a name="id2575600"></a><span><strong class="command">key</strong></span> Statement Definition and Usage</h3></div></div></div>
1087 <p>
1088           The <span><strong class="command">key</strong></span> statement defines a shared
1089           secret key for use with TSIG (see <a href="Bv9ARM.ch04.html#tsig" title="TSIG">the section called &#8220;TSIG&#8221;</a>)
1090           or the command channel
1091           (see <a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage" title="controls Statement Definition and
1092           Usage">the section called &#8220;<span><strong class="command">controls</strong></span> Statement Definition and
1093           Usage&#8221;</a>).
1094         </p>
1095 <p>
1096           The <span><strong class="command">key</strong></span> statement can occur at the
1097           top level
1098           of the configuration file or inside a <span><strong class="command">view</strong></span>
1099           statement.  Keys defined in top-level <span><strong class="command">key</strong></span>
1100           statements can be used in all views.  Keys intended for use in
1101           a <span><strong class="command">controls</strong></span> statement
1102           (see <a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage" title="controls Statement Definition and
1103           Usage">the section called &#8220;<span><strong class="command">controls</strong></span> Statement Definition and
1104           Usage&#8221;</a>)
1105           must be defined at the top level.
1106         </p>
1107 <p>
1108           The <em class="replaceable"><code>key_id</code></em>, also known as the
1109           key name, is a domain name uniquely identifying the key. It can
1110           be used in a <span><strong class="command">server</strong></span>
1111           statement to cause requests sent to that
1112           server to be signed with this key, or in address match lists to
1113           verify that incoming requests have been signed with a key
1114           matching this name, algorithm, and secret.
1115         </p>
1116 <p>
1117           The <em class="replaceable"><code>algorithm_id</code></em> is a string
1118           that specifies a security/authentication algorithm.  Named
1119           supports <code class="literal">hmac-md5</code>,
1120           <code class="literal">hmac-sha1</code>, <code class="literal">hmac-sha224</code>,
1121           <code class="literal">hmac-sha256</code>, <code class="literal">hmac-sha384</code>
1122           and <code class="literal">hmac-sha512</code> TSIG authentication.
1123           Truncated hashes are supported by appending the minimum
1124           number of required bits preceded by a dash, e.g.
1125           <code class="literal">hmac-sha1-80</code>.  The
1126           <em class="replaceable"><code>secret_string</code></em> is the secret
1127           to be used by the algorithm, and is treated as a base-64
1128           encoded string.
1129         </p>
1130 </div>
1131 <div class="sect2" lang="en">
1132 <div class="titlepage"><div><div><h3 class="title">
1133 <a name="id2575758"></a><span><strong class="command">logging</strong></span> Statement Grammar</h3></div></div></div>
1134 <pre class="programlisting"><span><strong class="command">logging</strong></span> {
1135    [ <span><strong class="command">channel</strong></span> <em class="replaceable"><code>channel_name</code></em> {
1136      ( <span><strong class="command">file</strong></span> <em class="replaceable"><code>path_name</code></em>
1137          [ <span><strong class="command">versions</strong></span> ( <em class="replaceable"><code>number</code></em> | <span><strong class="command">unlimited</strong></span> ) ]
1138          [ <span><strong class="command">size</strong></span> <em class="replaceable"><code>size spec</code></em> ]
1139        | <span><strong class="command">syslog</strong></span> <em class="replaceable"><code>syslog_facility</code></em>
1140        | <span><strong class="command">stderr</strong></span>
1141        | <span><strong class="command">null</strong></span> );
1142      [ <span><strong class="command">severity</strong></span> (<code class="option">critical</code> | <code class="option">error</code> | <code class="option">warning</code> | <code class="option">notice</code> |
1143                  <code class="option">info</code> | <code class="option">debug</code> [ <em class="replaceable"><code>level</code></em> ] | <code class="option">dynamic</code> ); ]
1144      [ <span><strong class="command">print-category</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1145      [ <span><strong class="command">print-severity</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1146      [ <span><strong class="command">print-time</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1147    }; ]
1148    [ <span><strong class="command">category</strong></span> <em class="replaceable"><code>category_name</code></em> {
1149      <em class="replaceable"><code>channel_name</code></em> ; [ <em class="replaceable"><code>channel_name</code></em> ; ... ]
1150    }; ]
1151    ...
1152 };
1153 </pre>
1154 </div>
1155 <div class="sect2" lang="en">
1156 <div class="titlepage"><div><div><h3 class="title">
1157 <a name="id2575884"></a><span><strong class="command">logging</strong></span> Statement Definition and
1158           Usage</h3></div></div></div>
1159 <p>
1160           The <span><strong class="command">logging</strong></span> statement configures a
1161           wide
1162           variety of logging options for the name server. Its <span><strong class="command">channel</strong></span> phrase
1163           associates output methods, format options and severity levels with
1164           a name that can then be used with the <span><strong class="command">category</strong></span> phrase
1165           to select how various classes of messages are logged.
1166         </p>
1167 <p>
1168           Only one <span><strong class="command">logging</strong></span> statement is used to
1169           define
1170           as many channels and categories as are wanted. If there is no <span><strong class="command">logging</strong></span> statement,
1171           the logging configuration will be:
1172         </p>
1173 <pre class="programlisting">logging {
1174      category default { default_syslog; default_debug; };
1175      category unmatched { null; };
1176 };
1177 </pre>
1178 <p>
1179           In <acronym class="acronym">BIND</acronym> 9, the logging configuration
1180           is only established when
1181           the entire configuration file has been parsed.  In <acronym class="acronym">BIND</acronym> 8, it was
1182           established as soon as the <span><strong class="command">logging</strong></span>
1183           statement
1184           was parsed. When the server is starting up, all logging messages
1185           regarding syntax errors in the configuration file go to the default
1186           channels, or to standard error if the "<code class="option">-g</code>" option
1187           was specified.
1188         </p>
1189 <div class="sect3" lang="en">
1190 <div class="titlepage"><div><div><h4 class="title">
1191 <a name="id2576005"></a>The <span><strong class="command">channel</strong></span> Phrase</h4></div></div></div>
1192 <p>
1193             All log output goes to one or more <span class="emphasis"><em>channels</em></span>;
1194             you can make as many of them as you want.
1195           </p>
1196 <p>
1197             Every channel definition must include a destination clause that
1198             says whether messages selected for the channel go to a file, to a
1199             particular syslog facility, to the standard error stream, or are
1200             discarded. It can optionally also limit the message severity level
1201             that will be accepted by the channel (the default is
1202             <span><strong class="command">info</strong></span>), and whether to include a
1203             <span><strong class="command">named</strong></span>-generated time stamp, the
1204             category name
1205             and/or severity level (the default is not to include any).
1206           </p>
1207 <p>
1208             The <span><strong class="command">null</strong></span> destination clause
1209             causes all messages sent to the channel to be discarded;
1210             in that case, other options for the channel are meaningless.
1211           </p>
1212 <p>
1213             The <span><strong class="command">file</strong></span> destination clause directs
1214             the channel
1215             to a disk file.  It can include limitations
1216             both on how large the file is allowed to become, and how many
1217             versions
1218             of the file will be saved each time the file is opened.
1219           </p>
1220 <p>
1221             If you use the <span><strong class="command">versions</strong></span> log file
1222             option, then
1223             <span><strong class="command">named</strong></span> will retain that many backup
1224             versions of the file by
1225             renaming them when opening.  For example, if you choose to keep
1226             three old versions
1227             of the file <code class="filename">lamers.log</code>, then just
1228             before it is opened
1229             <code class="filename">lamers.log.1</code> is renamed to
1230             <code class="filename">lamers.log.2</code>, <code class="filename">lamers.log.0</code> is renamed
1231             to <code class="filename">lamers.log.1</code>, and <code class="filename">lamers.log</code> is
1232             renamed to <code class="filename">lamers.log.0</code>.
1233             You can say <span><strong class="command">versions unlimited</strong></span> to
1234             not limit
1235             the number of versions.
1236             If a <span><strong class="command">size</strong></span> option is associated with
1237             the log file,
1238             then renaming is only done when the file being opened exceeds the
1239             indicated size.  No backup versions are kept by default; any
1240             existing
1241             log file is simply appended.
1242           </p>
1243 <p>
1244             The <span><strong class="command">size</strong></span> option for files is used
1245             to limit log
1246             growth. If the file ever exceeds the size, then <span><strong class="command">named</strong></span> will
1247             stop writing to the file unless it has a <span><strong class="command">versions</strong></span> option
1248             associated with it.  If backup versions are kept, the files are
1249             rolled as
1250             described above and a new one begun.  If there is no
1251             <span><strong class="command">versions</strong></span> option, no more data will
1252             be written to the log
1253             until some out-of-band mechanism removes or truncates the log to
1254             less than the
1255             maximum size.  The default behavior is not to limit the size of
1256             the
1257             file.
1258           </p>
1259 <p>
1260             Example usage of the <span><strong class="command">size</strong></span> and
1261             <span><strong class="command">versions</strong></span> options:
1262           </p>
1263 <pre class="programlisting">channel an_example_channel {
1264     file "example.log" versions 3 size 20m;
1265     print-time yes;
1266     print-category yes;
1267 };
1268 </pre>
1269 <p>
1270             The <span><strong class="command">syslog</strong></span> destination clause
1271             directs the
1272             channel to the system log.  Its argument is a
1273             syslog facility as described in the <span><strong class="command">syslog</strong></span> man
1274             page. Known facilities are <span><strong class="command">kern</strong></span>, <span><strong class="command">user</strong></span>,
1275             <span><strong class="command">mail</strong></span>, <span><strong class="command">daemon</strong></span>, <span><strong class="command">auth</strong></span>,
1276             <span><strong class="command">syslog</strong></span>, <span><strong class="command">lpr</strong></span>, <span><strong class="command">news</strong></span>,
1277             <span><strong class="command">uucp</strong></span>, <span><strong class="command">cron</strong></span>, <span><strong class="command">authpriv</strong></span>,
1278             <span><strong class="command">ftp</strong></span>, <span><strong class="command">local0</strong></span>, <span><strong class="command">local1</strong></span>,
1279             <span><strong class="command">local2</strong></span>, <span><strong class="command">local3</strong></span>, <span><strong class="command">local4</strong></span>,
1280             <span><strong class="command">local5</strong></span>, <span><strong class="command">local6</strong></span> and
1281             <span><strong class="command">local7</strong></span>, however not all facilities
1282             are supported on
1283             all operating systems.
1284             How <span><strong class="command">syslog</strong></span> will handle messages
1285             sent to
1286             this facility is described in the <span><strong class="command">syslog.conf</strong></span> man
1287             page. If you have a system which uses a very old version of <span><strong class="command">syslog</strong></span> that
1288             only uses two arguments to the <span><strong class="command">openlog()</strong></span> function,
1289             then this clause is silently ignored.
1290           </p>
1291 <p>
1292             The <span><strong class="command">severity</strong></span> clause works like <span><strong class="command">syslog</strong></span>'s
1293             "priorities", except that they can also be used if you are writing
1294             straight to a file rather than using <span><strong class="command">syslog</strong></span>.
1295             Messages which are not at least of the severity level given will
1296             not be selected for the channel; messages of higher severity
1297             levels
1298             will be accepted.
1299           </p>
1300 <p>
1301             If you are using <span><strong class="command">syslog</strong></span>, then the <span><strong class="command">syslog.conf</strong></span> priorities
1302             will also determine what eventually passes through. For example,
1303             defining a channel facility and severity as <span><strong class="command">daemon</strong></span> and <span><strong class="command">debug</strong></span> but
1304             only logging <span><strong class="command">daemon.warning</strong></span> via <span><strong class="command">syslog.conf</strong></span> will
1305             cause messages of severity <span><strong class="command">info</strong></span> and
1306             <span><strong class="command">notice</strong></span> to
1307             be dropped. If the situation were reversed, with <span><strong class="command">named</strong></span> writing
1308             messages of only <span><strong class="command">warning</strong></span> or higher,
1309             then <span><strong class="command">syslogd</strong></span> would
1310             print all messages it received from the channel.
1311           </p>
1312 <p>
1313             The <span><strong class="command">stderr</strong></span> destination clause
1314             directs the
1315             channel to the server's standard error stream.  This is intended
1316             for
1317             use when the server is running as a foreground process, for
1318             example
1319             when debugging a configuration.
1320           </p>
1321 <p>
1322             The server can supply extensive debugging information when
1323             it is in debugging mode. If the server's global debug level is
1324             greater
1325             than zero, then debugging mode will be active. The global debug
1326             level is set either by starting the <span><strong class="command">named</strong></span> server
1327             with the <code class="option">-d</code> flag followed by a positive integer,
1328             or by running <span><strong class="command">rndc trace</strong></span>.
1329             The global debug level
1330             can be set to zero, and debugging mode turned off, by running <span><strong class="command">rndc
1331 notrace</strong></span>. All debugging messages in the server have a debug
1332             level, and higher debug levels give more detailed output. Channels
1333             that specify a specific debug severity, for example:
1334           </p>
1335 <pre class="programlisting">channel specific_debug_level {
1336     file "foo";
1337     severity debug 3;
1338 };
1339 </pre>
1340 <p>
1341             will get debugging output of level 3 or less any time the
1342             server is in debugging mode, regardless of the global debugging
1343             level. Channels with <span><strong class="command">dynamic</strong></span>
1344             severity use the
1345             server's global debug level to determine what messages to print.
1346           </p>
1347 <p>
1348             If <span><strong class="command">print-time</strong></span> has been turned on,
1349             then
1350             the date and time will be logged. <span><strong class="command">print-time</strong></span> may
1351             be specified for a <span><strong class="command">syslog</strong></span> channel,
1352             but is usually
1353             pointless since <span><strong class="command">syslog</strong></span> also logs
1354             the date and
1355             time. If <span><strong class="command">print-category</strong></span> is
1356             requested, then the
1357             category of the message will be logged as well. Finally, if <span><strong class="command">print-severity</strong></span> is
1358             on, then the severity level of the message will be logged. The <span><strong class="command">print-</strong></span> options may
1359             be used in any combination, and will always be printed in the
1360             following
1361             order: time, category, severity. Here is an example where all
1362             three <span><strong class="command">print-</strong></span> options
1363             are on:
1364           </p>
1365 <p>
1366             <code class="computeroutput">28-Feb-2000 15:05:32.863 general: notice: running</code>
1367           </p>
1368 <p>
1369             There are four predefined channels that are used for
1370             <span><strong class="command">named</strong></span>'s default logging as follows.
1371             How they are
1372             used is described in <a href="Bv9ARM.ch06.html#the_category_phrase" title="The category Phrase">the section called &#8220;The <span><strong class="command">category</strong></span> Phrase&#8221;</a>.
1373           </p>
1374 <pre class="programlisting">channel default_syslog {
1375     // send to syslog's daemon facility
1376     syslog daemon;
1377     // only send priority info and higher
1378     severity info;
1379
1380 channel default_debug {
1381     // write to named.run in the working directory
1382     // Note: stderr is used instead of "named.run" if
1383     // the server is started with the '-f' option.
1384     file "named.run";
1385     // log at the server's current debug level
1386     severity dynamic;
1387 };
1388
1389 channel default_stderr {
1390     // writes to stderr
1391     stderr;
1392     // only send priority info and higher
1393     severity info;
1394 };
1395
1396 channel null {
1397    // toss anything sent to this channel
1398    null;
1399 };
1400 </pre>
1401 <p>
1402             The <span><strong class="command">default_debug</strong></span> channel has the
1403             special
1404             property that it only produces output when the server's debug
1405             level is
1406             nonzero.  It normally writes to a file called <code class="filename">named.run</code>
1407             in the server's working directory.
1408           </p>
1409 <p>
1410             For security reasons, when the "<code class="option">-u</code>"
1411             command line option is used, the <code class="filename">named.run</code> file
1412             is created only after <span><strong class="command">named</strong></span> has
1413             changed to the
1414             new UID, and any debug output generated while <span><strong class="command">named</strong></span> is
1415             starting up and still running as root is discarded.  If you need
1416             to capture this output, you must run the server with the "<code class="option">-g</code>"
1417             option and redirect standard error to a file.
1418           </p>
1419 <p>
1420             Once a channel is defined, it cannot be redefined. Thus you
1421             cannot alter the built-in channels directly, but you can modify
1422             the default logging by pointing categories at channels you have
1423             defined.
1424           </p>
1425 </div>
1426 <div class="sect3" lang="en">
1427 <div class="titlepage"><div><div><h4 class="title">
1428 <a name="the_category_phrase"></a>The <span><strong class="command">category</strong></span> Phrase</h4></div></div></div>
1429 <p>
1430             There are many categories, so you can send the logs you want
1431             to see wherever you want, without seeing logs you don't want. If
1432             you don't specify a list of channels for a category, then log
1433             messages
1434             in that category will be sent to the <span><strong class="command">default</strong></span> category
1435             instead. If you don't specify a default category, the following
1436             "default default" is used:
1437           </p>
1438 <pre class="programlisting">category default { default_syslog; default_debug; };
1439 </pre>
1440 <p>
1441             As an example, let's say you want to log security events to
1442             a file, but you also want keep the default logging behavior. You'd
1443             specify the following:
1444           </p>
1445 <pre class="programlisting">channel my_security_channel {
1446     file "my_security_file";
1447     severity info;
1448 };
1449 category security {
1450     my_security_channel;
1451     default_syslog;
1452     default_debug;
1453 };</pre>
1454 <p>
1455             To discard all messages in a category, specify the <span><strong class="command">null</strong></span> channel:
1456           </p>
1457 <pre class="programlisting">category xfer-out { null; };
1458 category notify { null; };
1459 </pre>
1460 <p>
1461             Following are the available categories and brief descriptions
1462             of the types of log information they contain. More
1463             categories may be added in future <acronym class="acronym">BIND</acronym> releases.
1464           </p>
1465 <div class="informaltable"><table border="1">
1466 <colgroup>
1467 <col>
1468 <col>
1469 </colgroup>
1470 <tbody>
1471 <tr>
1472 <td>
1473                     <p><span><strong class="command">default</strong></span></p>
1474                   </td>
1475 <td>
1476                     <p>
1477                       The default category defines the logging
1478                       options for those categories where no specific
1479                       configuration has been
1480                       defined.
1481                     </p>
1482                   </td>
1483 </tr>
1484 <tr>
1485 <td>
1486                     <p><span><strong class="command">general</strong></span></p>
1487                   </td>
1488 <td>
1489                     <p>
1490                       The catch-all. Many things still aren't
1491                       classified into categories, and they all end up here.
1492                     </p>
1493                   </td>
1494 </tr>
1495 <tr>
1496 <td>
1497                     <p><span><strong class="command">database</strong></span></p>
1498                   </td>
1499 <td>
1500                     <p>
1501                       Messages relating to the databases used
1502                       internally by the name server to store zone and cache
1503                       data.
1504                     </p>
1505                   </td>
1506 </tr>
1507 <tr>
1508 <td>
1509                     <p><span><strong class="command">security</strong></span></p>
1510                   </td>
1511 <td>
1512                     <p>
1513                       Approval and denial of requests.
1514                     </p>
1515                   </td>
1516 </tr>
1517 <tr>
1518 <td>
1519                     <p><span><strong class="command">config</strong></span></p>
1520                   </td>
1521 <td>
1522                     <p>
1523                       Configuration file parsing and processing.
1524                     </p>
1525                   </td>
1526 </tr>
1527 <tr>
1528 <td>
1529                     <p><span><strong class="command">resolver</strong></span></p>
1530                   </td>
1531 <td>
1532                     <p>
1533                       DNS resolution, such as the recursive
1534                       lookups performed on behalf of clients by a caching name
1535                       server.
1536                     </p>
1537                   </td>
1538 </tr>
1539 <tr>
1540 <td>
1541                     <p><span><strong class="command">xfer-in</strong></span></p>
1542                   </td>
1543 <td>
1544                     <p>
1545                       Zone transfers the server is receiving.
1546                     </p>
1547                   </td>
1548 </tr>
1549 <tr>
1550 <td>
1551                     <p><span><strong class="command">xfer-out</strong></span></p>
1552                   </td>
1553 <td>
1554                     <p>
1555                       Zone transfers the server is sending.
1556                     </p>
1557                   </td>
1558 </tr>
1559 <tr>
1560 <td>
1561                     <p><span><strong class="command">notify</strong></span></p>
1562                   </td>
1563 <td>
1564                     <p>
1565                       The NOTIFY protocol.
1566                     </p>
1567                   </td>
1568 </tr>
1569 <tr>
1570 <td>
1571                     <p><span><strong class="command">client</strong></span></p>
1572                   </td>
1573 <td>
1574                     <p>
1575                       Processing of client requests.
1576                     </p>
1577                   </td>
1578 </tr>
1579 <tr>
1580 <td>
1581                     <p><span><strong class="command">unmatched</strong></span></p>
1582                   </td>
1583 <td>
1584                     <p>
1585                       Messages that <span><strong class="command">named</strong></span> was unable to determine the
1586                       class of or for which there was no matching <span><strong class="command">view</strong></span>.
1587                       A one line summary is also logged to the <span><strong class="command">client</strong></span> category.
1588                       This category is best sent to a file or stderr, by
1589                       default it is sent to
1590                       the <span><strong class="command">null</strong></span> channel.
1591                     </p>
1592                   </td>
1593 </tr>
1594 <tr>
1595 <td>
1596                     <p><span><strong class="command">network</strong></span></p>
1597                   </td>
1598 <td>
1599                     <p>
1600                       Network operations.
1601                     </p>
1602                   </td>
1603 </tr>
1604 <tr>
1605 <td>
1606                     <p><span><strong class="command">update</strong></span></p>
1607                   </td>
1608 <td>
1609                     <p>
1610                       Dynamic updates.
1611                     </p>
1612                   </td>
1613 </tr>
1614 <tr>
1615 <td>
1616                     <p><span><strong class="command">update-security</strong></span></p>
1617                   </td>
1618 <td>
1619                     <p>
1620                       Approval and denial of update requests.
1621                     </p>
1622                   </td>
1623 </tr>
1624 <tr>
1625 <td>
1626                     <p><span><strong class="command">queries</strong></span></p>
1627                   </td>
1628 <td>
1629                     <p>
1630                       Specify where queries should be logged to.
1631                     </p>
1632                     <p>
1633                       At startup, specifying the category <span><strong class="command">queries</strong></span> will also
1634                       enable query logging unless <span><strong class="command">querylog</strong></span> option has been
1635                       specified.
1636                     </p>
1637
1638                     <p>
1639                       The query log entry reports the client's IP
1640                       address and port number, and the query name,
1641                       class and type.  Next it reports whether the
1642                       Recursion Desired flag was set (+ if set, -
1643                       if not set), if the query was signed (S),
1644                       EDNS was in use (E), if TCP was used (T), if
1645                       DO (DNSSEC Ok) was set (D), or if CD (Checking
1646                       Disabled) was set (C).  After this the
1647                       destination address the query was sent to is
1648                       reported.
1649                     </p>
1650
1651                     <p>
1652                       <code class="computeroutput">client 127.0.0.1#62536: query: www.example.com IN AAAA +SE</code>
1653                     </p>
1654                     <p>
1655                       <code class="computeroutput">client ::1#62537: query: www.example.net IN AAAA -SE</code>
1656                     </p>
1657                   </td>
1658 </tr>
1659 <tr>
1660 <td>
1661                     <p><span><strong class="command">query-errors</strong></span></p>
1662                   </td>
1663 <td>
1664                     <p>
1665                       Information about queries that resulted in some
1666                       failure.
1667                     </p>
1668                   </td>
1669 </tr>
1670 <tr>
1671 <td>
1672                     <p><span><strong class="command">dispatch</strong></span></p>
1673                   </td>
1674 <td>
1675                     <p>
1676                       Dispatching of incoming packets to the
1677                       server modules where they are to be processed.
1678                     </p>
1679                   </td>
1680 </tr>
1681 <tr>
1682 <td>
1683                     <p><span><strong class="command">dnssec</strong></span></p>
1684                   </td>
1685 <td>
1686                     <p>
1687                       DNSSEC and TSIG protocol processing.
1688                     </p>
1689                   </td>
1690 </tr>
1691 <tr>
1692 <td>
1693                     <p><span><strong class="command">lame-servers</strong></span></p>
1694                   </td>
1695 <td>
1696                     <p>
1697                       Lame servers.  These are misconfigurations
1698                       in remote servers, discovered by BIND 9 when trying to
1699                       query those servers during resolution.
1700                     </p>
1701                   </td>
1702 </tr>
1703 <tr>
1704 <td>
1705                     <p><span><strong class="command">delegation-only</strong></span></p>
1706                   </td>
1707 <td>
1708                     <p>
1709                       Delegation only.  Logs queries that have been
1710                       forced to NXDOMAIN as the result of a
1711                       delegation-only zone or a
1712                       <span><strong class="command">delegation-only</strong></span> in a hint
1713                       or stub zone declaration.
1714                     </p>
1715                   </td>
1716 </tr>
1717 <tr>
1718 <td>
1719                     <p><span><strong class="command">edns-disabled</strong></span></p>
1720                   </td>
1721 <td>
1722                     <p>
1723                       Log queries that have been forced to use plain
1724                       DNS due to timeouts.  This is often due to
1725                       the remote servers not being RFC 1034 compliant
1726                       (not always returning FORMERR or similar to
1727                       EDNS queries and other extensions to the DNS
1728                       when they are not understood).  In other words, this is
1729                       targeted at servers that fail to respond to
1730                       DNS queries that they don't understand.
1731                     </p>
1732                     <p>
1733                       Note: the log message can also be due to
1734                       packet loss.  Before reporting servers for
1735                       non-RFC 1034 compliance they should be re-tested
1736                       to determine the nature of the non-compliance.
1737                       This testing should prevent or reduce the
1738                       number of false-positive reports.
1739                     </p>
1740                     <p>
1741                       Note: eventually <span><strong class="command">named</strong></span> will have to stop
1742                       treating such timeouts as due to RFC 1034 non
1743                       compliance and start treating it as plain
1744                       packet loss.  Falsely classifying packet
1745                       loss as due to RFC 1034 non compliance impacts
1746                       on DNSSEC validation which requires EDNS for
1747                       the DNSSEC records to be returned.
1748                     </p>
1749                   </td>
1750 </tr>
1751 <tr>
1752 <td>
1753                     <p><span><strong class="command">RPZ</strong></span></p>
1754                   </td>
1755 <td>
1756                     <p>
1757                       Information about errors in response policy zone files,
1758                       rewritten responses, and at the highest
1759                       <span><strong class="command">debug</strong></span> levels, mere rewriting
1760                       attempts.
1761                     </p>
1762                   </td>
1763 </tr>
1764 </tbody>
1765 </table></div>
1766 </div>
1767 <div class="sect3" lang="en">
1768 <div class="titlepage"><div><div><h4 class="title">
1769 <a name="id2577322"></a>The <span><strong class="command">query-errors</strong></span> Category</h4></div></div></div>
1770 <p>
1771             The <span><strong class="command">query-errors</strong></span> category is
1772             specifically intended for debugging purposes: To identify
1773             why and how specific queries result in responses which
1774             indicate an error.
1775             Messages of this category are therefore only logged
1776             with <span><strong class="command">debug</strong></span> levels.
1777           </p>
1778 <p>
1779             At the debug levels of 1 or higher, each response with the
1780             rcode of SERVFAIL is logged as follows:
1781           </p>
1782 <p>
1783             <code class="computeroutput">client 127.0.0.1#61502: query failed (SERVFAIL) for www.example.com/IN/AAAA at query.c:3880</code>
1784           </p>
1785 <p>
1786             This means an error resulting in SERVFAIL was
1787             detected at line 3880 of source file
1788             <code class="filename">query.c</code>.
1789             Log messages of this level will particularly
1790             help identify the cause of SERVFAIL for an
1791             authoritative server.
1792           </p>
1793 <p>
1794             At the debug levels of 2 or higher, detailed context
1795             information of recursive resolutions that resulted in
1796             SERVFAIL is logged.
1797             The log message will look like as follows:
1798           </p>
1799 <p>
1800
1801             </p>
1802 <pre class="programlisting">
1803 fetch completed at resolver.c:2970 for www.example.com/A
1804 in 30.000183: timed out/success [domain:example.com,
1805 referral:2,restart:7,qrysent:8,timeout:5,lame:0,neterr:0,
1806 badresp:1,adberr:0,findfail:0,valfail:0]
1807             </pre>
1808 <p>
1809           </p>
1810 <p>
1811             The first part before the colon shows that a recursive
1812             resolution for AAAA records of www.example.com completed
1813             in 30.000183 seconds and the final result that led to the
1814             SERVFAIL was determined at line 2970 of source file
1815             <code class="filename">resolver.c</code>.
1816           </p>
1817 <p>
1818             The following part shows the detected final result and the
1819             latest result of DNSSEC validation.
1820             The latter is always success when no validation attempt
1821             is made.
1822             In this example, this query resulted in SERVFAIL probably
1823             because all name servers are down or unreachable, leading
1824             to a timeout in 30 seconds.
1825             DNSSEC validation was probably not attempted.
1826           </p>
1827 <p>
1828             The last part enclosed in square brackets shows statistics
1829             information collected for this particular resolution
1830             attempt.
1831             The <code class="varname">domain</code> field shows the deepest zone
1832             that the resolver reached;
1833             it is the zone where the error was finally detected.
1834             The meaning of the other fields is summarized in the
1835             following table.
1836           </p>
1837 <div class="informaltable"><table border="1">
1838 <colgroup>
1839 <col>
1840 <col>
1841 </colgroup>
1842 <tbody>
1843 <tr>
1844 <td>
1845                     <p><code class="varname">referral</code></p>
1846                   </td>
1847 <td>
1848                     <p>
1849                       The number of referrals the resolver received
1850                       throughout the resolution process.
1851                       In the above example this is 2, which are most
1852                       likely com and example.com.
1853                     </p>
1854                   </td>
1855 </tr>
1856 <tr>
1857 <td>
1858                     <p><code class="varname">restart</code></p>
1859                   </td>
1860 <td>
1861                     <p>
1862                       The number of cycles that the resolver tried
1863                       remote servers at the <code class="varname">domain</code>
1864                       zone.
1865                       In each cycle the resolver sends one query
1866                       (possibly resending it, depending on the response)
1867                       to each known name server of
1868                       the <code class="varname">domain</code> zone.
1869                     </p>
1870                   </td>
1871 </tr>
1872 <tr>
1873 <td>
1874                     <p><code class="varname">qrysent</code></p>
1875                   </td>
1876 <td>
1877                     <p>
1878                       The number of queries the resolver sent at the
1879                       <code class="varname">domain</code> zone.
1880                     </p>
1881                   </td>
1882 </tr>
1883 <tr>
1884 <td>
1885                     <p><code class="varname">timeout</code></p>
1886                   </td>
1887 <td>
1888                     <p>
1889                       The number of timeouts since the resolver
1890                       received the last response.
1891                     </p>
1892                   </td>
1893 </tr>
1894 <tr>
1895 <td>
1896                     <p><code class="varname">lame</code></p>
1897                   </td>
1898 <td>
1899                     <p>
1900                       The number of lame servers the resolver detected
1901                       at the <code class="varname">domain</code> zone.
1902                       A server is detected to be lame either by an
1903                       invalid response or as a result of lookup in
1904                       BIND9's address database (ADB), where lame
1905                       servers are cached.
1906                     </p>
1907                   </td>
1908 </tr>
1909 <tr>
1910 <td>
1911                     <p><code class="varname">neterr</code></p>
1912                   </td>
1913 <td>
1914                     <p>
1915                       The number of erroneous results that the
1916                       resolver encountered in sending queries
1917                       at the <code class="varname">domain</code> zone.
1918                       One common case is the remote server is
1919                       unreachable and the resolver receives an ICMP
1920                       unreachable error message.
1921                     </p>
1922                   </td>
1923 </tr>
1924 <tr>
1925 <td>
1926                     <p><code class="varname">badresp</code></p>
1927                   </td>
1928 <td>
1929                     <p>
1930                       The number of unexpected responses (other than
1931                       <code class="varname">lame</code>) to queries sent by the
1932                       resolver at the <code class="varname">domain</code> zone.
1933                     </p>
1934                   </td>
1935 </tr>
1936 <tr>
1937 <td>
1938                     <p><code class="varname">adberr</code></p>
1939                   </td>
1940 <td>
1941                     <p>
1942                       Failures in finding remote server addresses
1943                       of the <code class="varname">domain</code> zone in the ADB.
1944                       One common case of this is that the remote
1945                       server's name does not have any address records.
1946                     </p>
1947                   </td>
1948 </tr>
1949 <tr>
1950 <td>
1951                     <p><code class="varname">findfail</code></p>
1952                   </td>
1953 <td>
1954                     <p>
1955                       Failures of resolving remote server addresses.
1956                       This is a total number of failures throughout
1957                       the resolution process.
1958                     </p>
1959                   </td>
1960 </tr>
1961 <tr>
1962 <td>
1963                     <p><code class="varname">valfail</code></p>
1964                   </td>
1965 <td>
1966                     <p>
1967                       Failures of DNSSEC validation.
1968                       Validation failures are counted throughout
1969                       the resolution process (not limited to
1970                       the <code class="varname">domain</code> zone), but should
1971                       only happen in <code class="varname">domain</code>.
1972                     </p>
1973                   </td>
1974 </tr>
1975 </tbody>
1976 </table></div>
1977 <p>
1978             At the debug levels of 3 or higher, the same messages
1979             as those at the debug 1 level are logged for other errors
1980             than SERVFAIL.
1981             Note that negative responses such as NXDOMAIN are not
1982             regarded as errors here.
1983           </p>
1984 <p>
1985             At the debug levels of 4 or higher, the same messages
1986             as those at the debug 2 level are logged for other errors
1987             than SERVFAIL.
1988             Unlike the above case of level 3, messages are logged for
1989             negative responses.
1990             This is because any unexpected results can be difficult to
1991             debug in the recursion case.
1992           </p>
1993 </div>
1994 </div>
1995 <div class="sect2" lang="en">
1996 <div class="titlepage"><div><div><h3 class="title">
1997 <a name="id2577910"></a><span><strong class="command">lwres</strong></span> Statement Grammar</h3></div></div></div>
1998 <p>
1999            This is the grammar of the <span><strong class="command">lwres</strong></span>
2000           statement in the <code class="filename">named.conf</code> file:
2001         </p>
2002 <pre class="programlisting"><span><strong class="command">lwres</strong></span> {
2003     [<span class="optional"> listen-on { <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ;
2004                 [<span class="optional"> <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; ... </span>] }; </span>]
2005     [<span class="optional"> view <em class="replaceable"><code>view_name</code></em>; </span>]
2006     [<span class="optional"> search { <em class="replaceable"><code>domain_name</code></em> ; [<span class="optional"> <em class="replaceable"><code>domain_name</code></em> ; ... </span>] }; </span>]
2007     [<span class="optional"> ndots <em class="replaceable"><code>number</code></em>; </span>]
2008 };
2009 </pre>
2010 </div>
2011 <div class="sect2" lang="en">
2012 <div class="titlepage"><div><div><h3 class="title">
2013 <a name="id2577984"></a><span><strong class="command">lwres</strong></span> Statement Definition and Usage</h3></div></div></div>
2014 <p>
2015           The <span><strong class="command">lwres</strong></span> statement configures the
2016           name
2017           server to also act as a lightweight resolver server. (See
2018           <a href="Bv9ARM.ch05.html#lwresd" title="Running a Resolver Daemon">the section called &#8220;Running a Resolver Daemon&#8221;</a>.)  There may be multiple
2019           <span><strong class="command">lwres</strong></span> statements configuring
2020           lightweight resolver servers with different properties.
2021         </p>
2022 <p>
2023           The <span><strong class="command">listen-on</strong></span> statement specifies a
2024           list of
2025           addresses (and ports) that this instance of a lightweight resolver
2026           daemon
2027           should accept requests on.  If no port is specified, port 921 is
2028           used.
2029           If this statement is omitted, requests will be accepted on
2030           127.0.0.1,
2031           port 921.
2032         </p>
2033 <p>
2034           The <span><strong class="command">view</strong></span> statement binds this
2035           instance of a
2036           lightweight resolver daemon to a view in the DNS namespace, so that
2037           the
2038           response will be constructed in the same manner as a normal DNS
2039           query
2040           matching this view.  If this statement is omitted, the default view
2041           is
2042           used, and if there is no default view, an error is triggered.
2043         </p>
2044 <p>
2045           The <span><strong class="command">search</strong></span> statement is equivalent to
2046           the
2047           <span><strong class="command">search</strong></span> statement in
2048           <code class="filename">/etc/resolv.conf</code>.  It provides a
2049           list of domains
2050           which are appended to relative names in queries.
2051         </p>
2052 <p>
2053           The <span><strong class="command">ndots</strong></span> statement is equivalent to
2054           the
2055           <span><strong class="command">ndots</strong></span> statement in
2056           <code class="filename">/etc/resolv.conf</code>.  It indicates the
2057           minimum
2058           number of dots in a relative domain name that should result in an
2059           exact match lookup before search path elements are appended.
2060         </p>
2061 </div>
2062 <div class="sect2" lang="en">
2063 <div class="titlepage"><div><div><h3 class="title">
2064 <a name="id2578116"></a><span><strong class="command">masters</strong></span> Statement Grammar</h3></div></div></div>
2065 <pre class="programlisting">
2066 <span><strong class="command">masters</strong></span> <em class="replaceable"><code>name</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] { ( <em class="replaceable"><code>masters_list</code></em> | 
2067       <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] [<span class="optional">key <em class="replaceable"><code>key</code></em></span>] ) ; [<span class="optional">...</span>] };
2068 </pre>
2069 </div>
2070 <div class="sect2" lang="en">
2071 <div class="titlepage"><div><div><h3 class="title">
2072 <a name="id2578160"></a><span><strong class="command">masters</strong></span> Statement Definition and
2073           Usage</h3></div></div></div>
2074 <p><span><strong class="command">masters</strong></span>
2075           lists allow for a common set of masters to be easily used by
2076           multiple stub and slave zones.
2077         </p>
2078 </div>
2079 <div class="sect2" lang="en">
2080 <div class="titlepage"><div><div><h3 class="title">
2081 <a name="id2578174"></a><span><strong class="command">options</strong></span> Statement Grammar</h3></div></div></div>
2082 <p>
2083           This is the grammar of the <span><strong class="command">options</strong></span>
2084           statement in the <code class="filename">named.conf</code> file:
2085         </p>
2086 <pre class="programlisting"><span><strong class="command">options</strong></span> {
2087     [<span class="optional"> attach-cache <em class="replaceable"><code>cache_name</code></em>; </span>]
2088     [<span class="optional"> version <em class="replaceable"><code>version_string</code></em>; </span>]
2089     [<span class="optional"> hostname <em class="replaceable"><code>hostname_string</code></em>; </span>]
2090     [<span class="optional"> server-id <em class="replaceable"><code>server_id_string</code></em>; </span>]
2091     [<span class="optional"> directory <em class="replaceable"><code>path_name</code></em>; </span>]
2092     [<span class="optional"> key-directory <em class="replaceable"><code>path_name</code></em>; </span>]
2093     [<span class="optional"> managed-keys-directory <em class="replaceable"><code>path_name</code></em>; </span>]
2094     [<span class="optional"> named-xfer <em class="replaceable"><code>path_name</code></em>; </span>]
2095     [<span class="optional"> tkey-gssapi-keytab <em class="replaceable"><code>path_name</code></em>; </span>]
2096     [<span class="optional"> tkey-gssapi-credential <em class="replaceable"><code>principal</code></em>; </span>]
2097     [<span class="optional"> tkey-domain <em class="replaceable"><code>domainname</code></em>; </span>]
2098     [<span class="optional"> tkey-dhkey <em class="replaceable"><code>key_name</code></em> <em class="replaceable"><code>key_tag</code></em>; </span>]
2099     [<span class="optional"> cache-file <em class="replaceable"><code>path_name</code></em>; </span>]
2100     [<span class="optional"> dump-file <em class="replaceable"><code>path_name</code></em>; </span>]
2101     [<span class="optional"> bindkeys-file <em class="replaceable"><code>path_name</code></em>; </span>]
2102     [<span class="optional"> secroots-file <em class="replaceable"><code>path_name</code></em>; </span>]
2103     [<span class="optional"> session-keyfile <em class="replaceable"><code>path_name</code></em>; </span>]
2104     [<span class="optional"> session-keyname <em class="replaceable"><code>key_name</code></em>; </span>]
2105     [<span class="optional"> session-keyalg <em class="replaceable"><code>algorithm_id</code></em>; </span>]
2106     [<span class="optional"> memstatistics <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2107     [<span class="optional"> memstatistics-file <em class="replaceable"><code>path_name</code></em>; </span>]
2108     [<span class="optional"> pid-file <em class="replaceable"><code>path_name</code></em>; </span>]
2109     [<span class="optional"> recursing-file <em class="replaceable"><code>path_name</code></em>; </span>]
2110     [<span class="optional"> statistics-file <em class="replaceable"><code>path_name</code></em>; </span>]
2111     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2112     [<span class="optional"> auth-nxdomain <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2113     [<span class="optional"> deallocate-on-exit <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2114     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em>; </span>]
2115     [<span class="optional"> fake-iquery <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2116     [<span class="optional"> fetch-glue <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2117     [<span class="optional"> flush-zones-on-shutdown <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2118     [<span class="optional"> has-old-clients <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2119     [<span class="optional"> host-statistics <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2120     [<span class="optional"> host-statistics-max <em class="replaceable"><code>number</code></em>; </span>]
2121     [<span class="optional"> minimal-responses <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2122     [<span class="optional"> multiple-cnames <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2123     [<span class="optional"> notify <em class="replaceable"><code>yes_or_no</code></em> | <em class="replaceable"><code>explicit</code></em> | <em class="replaceable"><code>master-only</code></em>; </span>]
2124     [<span class="optional"> recursion <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2125     [<span class="optional"> rfc2308-type1 <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2126     [<span class="optional"> use-id-pool <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2127     [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2128     [<span class="optional"> ixfr-from-differences (<em class="replaceable"><code>yes_or_no</code></em> | <code class="constant">master</code> | <code class="constant">slave</code>); </span>]
2129     [<span class="optional"> dnssec-enable <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2130     [<span class="optional"> dnssec-validation (<em class="replaceable"><code>yes_or_no</code></em> | <code class="constant">auto</code>); </span>]
2131     [<span class="optional"> dnssec-lookaside ( <em class="replaceable"><code>auto</code></em> |
2132                         <em class="replaceable"><code>no</code></em> |
2133                         <em class="replaceable"><code>domain</code></em> trust-anchor <em class="replaceable"><code>domain</code></em> ); </span>]
2134     [<span class="optional"> dnssec-must-be-secure <em class="replaceable"><code>domain yes_or_no</code></em>; </span>]
2135     [<span class="optional"> dnssec-accept-expired <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2136     [<span class="optional"> forward ( <em class="replaceable"><code>only</code></em> | <em class="replaceable"><code>first</code></em> ); </span>]
2137     [<span class="optional"> forwarders { [<span class="optional"> <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; ... </span>] }; </span>]
2138     [<span class="optional"> dual-stack-servers [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] {
2139         ( <em class="replaceable"><code>domain_name</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] |
2140           <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ) ; 
2141         ... }; </span>]
2142     [<span class="optional"> check-names ( <em class="replaceable"><code>master</code></em> | <em class="replaceable"><code>slave</code></em> | <em class="replaceable"><code>response</code></em> )
2143         ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
2144     [<span class="optional"> check-dup-records ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
2145     [<span class="optional"> check-mx ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
2146     [<span class="optional"> check-wildcard <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2147     [<span class="optional"> check-integrity <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2148     [<span class="optional"> check-mx-cname ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
2149     [<span class="optional"> check-srv-cname ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
2150     [<span class="optional"> check-sibling <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2151     [<span class="optional"> allow-new-zones { <em class="replaceable"><code>yes_or_no</code></em> }; </span>]
2152     [<span class="optional"> allow-notify { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2153     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2154     [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2155     [<span class="optional"> allow-query-cache { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2156     [<span class="optional"> allow-query-cache-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2157     [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2158     [<span class="optional"> allow-recursion { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2159     [<span class="optional"> allow-recursion-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2160     [<span class="optional"> allow-update { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2161     [<span class="optional"> allow-update-forwarding { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2162     [<span class="optional"> update-check-ksk <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2163     [<span class="optional"> dnssec-dnskey-kskonly <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2164     [<span class="optional"> dnssec-secure-to-insecure <em class="replaceable"><code>yes_or_no</code></em> ;</span>]
2165     [<span class="optional"> try-tcp-refresh <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2166     [<span class="optional"> allow-v6-synthesis { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2167     [<span class="optional"> blackhole { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2168     [<span class="optional"> use-v4-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2169     [<span class="optional"> avoid-v4-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2170     [<span class="optional"> use-v6-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2171     [<span class="optional"> avoid-v6-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2172     [<span class="optional"> listen-on [<span class="optional"> port <em class="replaceable"><code>ip_port</code></em> </span>] { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2173     [<span class="optional"> listen-on-v6 [<span class="optional"> port <em class="replaceable"><code>ip_port</code></em> </span>] { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2174     [<span class="optional"> query-source ( ( <em class="replaceable"><code>ip4_addr</code></em> | <em class="replaceable"><code>*</code></em> )
2175         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] |
2176         [<span class="optional"> address ( <em class="replaceable"><code>ip4_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]
2177         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] ) ; </span>]
2178     [<span class="optional"> query-source-v6 ( ( <em class="replaceable"><code>ip6_addr</code></em> | <em class="replaceable"><code>*</code></em> )
2179         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] | 
2180         [<span class="optional"> address ( <em class="replaceable"><code>ip6_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] 
2181         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] ) ; </span>]
2182     [<span class="optional"> use-queryport-pool <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2183     [<span class="optional"> queryport-pool-ports <em class="replaceable"><code>number</code></em>; </span>]
2184     [<span class="optional"> queryport-pool-updateinterval <em class="replaceable"><code>number</code></em>; </span>]
2185     [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em>; </span>]
2186     [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em>; </span>]
2187     [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em>; </span>]
2188     [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em>; </span>]
2189     [<span class="optional"> tcp-clients <em class="replaceable"><code>number</code></em>; </span>]
2190     [<span class="optional"> reserved-sockets <em class="replaceable"><code>number</code></em>; </span>]
2191     [<span class="optional"> recursive-clients <em class="replaceable"><code>number</code></em>; </span>]
2192     [<span class="optional"> serial-query-rate <em class="replaceable"><code>number</code></em>; </span>]
2193     [<span class="optional"> serial-queries <em class="replaceable"><code>number</code></em>; </span>]
2194     [<span class="optional"> tcp-listen-queue <em class="replaceable"><code>number</code></em>; </span>]
2195     [<span class="optional"> transfer-format <em class="replaceable"><code>( one-answer | many-answers )</code></em>; </span>]
2196     [<span class="optional"> transfers-in  <em class="replaceable"><code>number</code></em>; </span>]
2197     [<span class="optional"> transfers-out <em class="replaceable"><code>number</code></em>; </span>]
2198     [<span class="optional"> transfers-per-ns <em class="replaceable"><code>number</code></em>; </span>]
2199     [<span class="optional"> transfer-source (<em class="replaceable"><code>ip4_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
2200     [<span class="optional"> transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
2201     [<span class="optional"> alt-transfer-source (<em class="replaceable"><code>ip4_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
2202     [<span class="optional"> alt-transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
2203                              [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
2204     [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2205     [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
2206     [<span class="optional"> notify-source (<em class="replaceable"><code>ip4_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
2207     [<span class="optional"> notify-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
2208     [<span class="optional"> notify-to-soa <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2209     [<span class="optional"> also-notify { <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ;
2210                   [<span class="optional"> <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; ... </span>] }; </span>]
2211     [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em>; </span>]
2212     [<span class="optional"> max-journal-size <em class="replaceable"><code>size_spec</code></em>; </span>]
2213     [<span class="optional"> coresize <em class="replaceable"><code>size_spec</code></em> ; </span>]
2214     [<span class="optional"> datasize <em class="replaceable"><code>size_spec</code></em> ; </span>]
2215     [<span class="optional"> files <em class="replaceable"><code>size_spec</code></em> ; </span>]
2216     [<span class="optional"> stacksize <em class="replaceable"><code>size_spec</code></em> ; </span>]
2217     [<span class="optional"> cleaning-interval <em class="replaceable"><code>number</code></em>; </span>]
2218     [<span class="optional"> heartbeat-interval <em class="replaceable"><code>number</code></em>; </span>]
2219     [<span class="optional"> interface-interval <em class="replaceable"><code>number</code></em>; </span>]
2220     [<span class="optional"> statistics-interval <em class="replaceable"><code>number</code></em>; </span>]
2221     [<span class="optional"> topology { <em class="replaceable"><code>address_match_list</code></em> }</span>];
2222     [<span class="optional"> sortlist { <em class="replaceable"><code>address_match_list</code></em> }</span>];
2223     [<span class="optional"> rrset-order { <em class="replaceable"><code>order_spec</code></em> ; [<span class="optional"> <em class="replaceable"><code>order_spec</code></em> ; ... </span>] </span>] };
2224     [<span class="optional"> lame-ttl <em class="replaceable"><code>number</code></em>; </span>]
2225     [<span class="optional"> max-ncache-ttl <em class="replaceable"><code>number</code></em>; </span>]
2226     [<span class="optional"> max-cache-ttl <em class="replaceable"><code>number</code></em>; </span>]
2227     [<span class="optional"> sig-validity-interval <em class="replaceable"><code>number</code></em> [<span class="optional"><em class="replaceable"><code>number</code></em></span>] ; </span>]
2228     [<span class="optional"> sig-signing-nodes <em class="replaceable"><code>number</code></em> ; </span>]
2229     [<span class="optional"> sig-signing-signatures <em class="replaceable"><code>number</code></em> ; </span>]
2230     [<span class="optional"> sig-signing-type <em class="replaceable"><code>number</code></em> ; </span>]
2231     [<span class="optional"> min-roots <em class="replaceable"><code>number</code></em>; </span>]
2232     [<span class="optional"> use-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2233     [<span class="optional"> provide-ixfr <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2234     [<span class="optional"> request-ixfr <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2235     [<span class="optional"> treat-cr-as-space <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2236     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
2237     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
2238     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
2239     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
2240     [<span class="optional"> port <em class="replaceable"><code>ip_port</code></em>; </span>]
2241     [<span class="optional"> additional-from-auth <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2242     [<span class="optional"> additional-from-cache <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2243     [<span class="optional"> random-device <em class="replaceable"><code>path_name</code></em> ; </span>]
2244     [<span class="optional"> max-cache-size <em class="replaceable"><code>size_spec</code></em> ; </span>]
2245     [<span class="optional"> match-mapped-addresses <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2246     [<span class="optional"> filter-aaaa-on-v4 ( <em class="replaceable"><code>yes_or_no</code></em> | <em class="replaceable"><code>break-dnssec</code></em> ); </span>]
2247     [<span class="optional"> filter-aaaa { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2248     [<span class="optional"> dns64 <em class="replaceable"><code>IPv6-prefix</code></em> {
2249         [<span class="optional"> clients { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2250         [<span class="optional"> mapped { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2251         [<span class="optional"> exclude { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2252         [<span class="optional"> suffix IPv6-address; </span>]
2253         [<span class="optional"> recursive-only <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2254         [<span class="optional"> break-dnssec <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2255     }; </span>];
2256     [<span class="optional"> dns64-server <em class="replaceable"><code>name</code></em> </span>]
2257     [<span class="optional"> dns64-contact <em class="replaceable"><code>name</code></em> </span>]
2258     [<span class="optional"> preferred-glue ( <em class="replaceable"><code>A</code></em> | <em class="replaceable"><code>AAAA</code></em> | <em class="replaceable"><code>NONE</code></em> ); </span>]
2259     [<span class="optional"> edns-udp-size <em class="replaceable"><code>number</code></em>; </span>]
2260     [<span class="optional"> max-udp-size <em class="replaceable"><code>number</code></em>; </span>]
2261     [<span class="optional"> root-delegation-only [<span class="optional"> exclude { <em class="replaceable"><code>namelist</code></em> } </span>] ; </span>]
2262     [<span class="optional"> querylog <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2263     [<span class="optional"> disable-algorithms <em class="replaceable"><code>domain</code></em> { <em class="replaceable"><code>algorithm</code></em>;
2264                                 [<span class="optional"> <em class="replaceable"><code>algorithm</code></em>; </span>] }; </span>]
2265     [<span class="optional"> acache-enable <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2266     [<span class="optional"> acache-cleaning-interval <em class="replaceable"><code>number</code></em>; </span>]
2267     [<span class="optional"> max-acache-size <em class="replaceable"><code>size_spec</code></em> ; </span>]
2268     [<span class="optional"> clients-per-query <em class="replaceable"><code>number</code></em> ; </span>]
2269     [<span class="optional"> max-clients-per-query <em class="replaceable"><code>number</code></em> ; </span>]
2270     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
2271     [<span class="optional"> empty-server <em class="replaceable"><code>name</code></em> ; </span>]
2272     [<span class="optional"> empty-contact <em class="replaceable"><code>name</code></em> ; </span>]
2273     [<span class="optional"> empty-zones-enable <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2274     [<span class="optional"> disable-empty-zone <em class="replaceable"><code>zone_name</code></em> ; </span>]
2275     [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2276     [<span class="optional"> zero-no-soa-ttl-cache <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2277     [<span class="optional"> resolver-query-timeout <em class="replaceable"><code>number</code></em> ; </span>]
2278     [<span class="optional"> deny-answer-addresses { <em class="replaceable"><code>address_match_list</code></em> } [<span class="optional"> except-from { <em class="replaceable"><code>namelist</code></em> } </span>];</span>]
2279     [<span class="optional"> deny-answer-aliases { <em class="replaceable"><code>namelist</code></em> } [<span class="optional"> except-from { <em class="replaceable"><code>namelist</code></em> } </span>];</span>]
2280     [<span class="optional"> response-policy { <em class="replaceable"><code>zone_name</code></em>
2281         [<span class="optional"> policy given | disabled | passthru | nxdomain | nodata | cname <em class="replaceable"><code>domain</code></em> </span>]
2282         [<span class="optional"> recursive-only <em class="replaceable"><code>yes_or_no</code></em> </span>] [<span class="optional"> max-policy-ttl <em class="replaceable"><code>number</code></em> </span>] ;
2283     } [<span class="optional"> recursive-only <em class="replaceable"><code>yes_or_no</code></em> </span>] [<span class="optional"> max-policy-ttl <em class="replaceable"><code>number</code></em> </span>]
2284         [<span class="optional"> break-dnssec <em class="replaceable"><code>yes_or_no</code></em> </span>] ; </span>]
2285 };
2286 </pre>
2287 </div>
2288 <div class="sect2" lang="en">
2289 <div class="titlepage"><div><div><h3 class="title">
2290 <a name="options"></a><span><strong class="command">options</strong></span> Statement Definition and
2291           Usage</h3></div></div></div>
2292 <p>
2293           The <span><strong class="command">options</strong></span> statement sets up global
2294           options
2295           to be used by <acronym class="acronym">BIND</acronym>. This statement
2296           may appear only
2297           once in a configuration file. If there is no <span><strong class="command">options</strong></span>
2298           statement, an options block with each option set to its default will
2299           be used.
2300         </p>
2301 <div class="variablelist"><dl>
2302 <dt><span class="term"><span><strong class="command">attach-cache</strong></span></span></dt>
2303 <dd>
2304 <p>
2305                   Allows multiple views to share a single cache
2306                   database.
2307                   Each view has its own cache database by default, but
2308                   if multiple views have the same operational policy
2309                   for name resolution and caching, those views can
2310                   share a single cache to save memory and possibly
2311                   improve resolution efficiency by using this option.
2312                 </p>
2313 <p>
2314                   The <span><strong class="command">attach-cache</strong></span> option
2315                   may also be specified in <span><strong class="command">view</strong></span>
2316                   statements, in which case it overrides the
2317                   global <span><strong class="command">attach-cache</strong></span> option.
2318                 </p>
2319 <p>
2320                   The <em class="replaceable"><code>cache_name</code></em> specifies
2321                   the cache to be shared.
2322                   When the <span><strong class="command">named</strong></span> server configures
2323                   views which are supposed to share a cache, it
2324                   creates a cache with the specified name for the
2325                   first view of these sharing views.
2326                   The rest of the views will simply refer to the
2327                   already created cache.
2328                 </p>
2329 <p>
2330                   One common configuration to share a cache would be to
2331                   allow all views to share a single cache.
2332                   This can be done by specifying
2333                   the <span><strong class="command">attach-cache</strong></span> as a global
2334                   option with an arbitrary name.
2335                 </p>
2336 <p>
2337                   Another possible operation is to allow a subset of
2338                   all views to share a cache while the others to
2339                   retain their own caches.
2340                   For example, if there are three views A, B, and C,
2341                   and only A and B should share a cache, specify the
2342                   <span><strong class="command">attach-cache</strong></span> option as a view A (or
2343                   B)'s option, referring to the other view name:
2344                 </p>
2345 <pre class="programlisting">
2346   view "A" {
2347     // this view has its own cache
2348     ...
2349   };
2350   view "B" {
2351     // this view refers to A's cache
2352     attach-cache "A";
2353   };
2354   view "C" {
2355     // this view has its own cache
2356     ...
2357   };
2358 </pre>
2359 <p>
2360                   Views that share a cache must have the same policy
2361                   on configurable parameters that may affect caching.
2362                   The current implementation requires the following
2363                   configurable options be consistent among these
2364                   views:
2365                   <span><strong class="command">check-names</strong></span>,
2366                   <span><strong class="command">cleaning-interval</strong></span>,
2367                   <span><strong class="command">dnssec-accept-expired</strong></span>,
2368                   <span><strong class="command">dnssec-validation</strong></span>,
2369                   <span><strong class="command">max-cache-ttl</strong></span>,
2370                   <span><strong class="command">max-ncache-ttl</strong></span>,
2371                   <span><strong class="command">max-cache-size</strong></span>, and
2372                   <span><strong class="command">zero-no-soa-ttl</strong></span>.
2373                 </p>
2374 <p>
2375                   Note that there may be other parameters that may
2376                   cause confusion if they are inconsistent for
2377                   different views that share a single cache.
2378                   For example, if these views define different sets of
2379                   forwarders that can return different answers for the
2380                   same question, sharing the answer does not make
2381                   sense or could even be harmful.
2382                   It is administrator's responsibility to ensure
2383                   configuration differences in different views do
2384                   not cause disruption with a shared cache.
2385                 </p>
2386 </dd>
2387 <dt><span class="term"><span><strong class="command">directory</strong></span></span></dt>
2388 <dd><p>
2389                 The working directory of the server.
2390                 Any non-absolute pathnames in the configuration file will be
2391                 taken
2392                 as relative to this directory. The default location for most
2393                 server
2394                 output files (e.g. <code class="filename">named.run</code>)
2395                 is this directory.
2396                 If a directory is not specified, the working directory
2397                 defaults to `<code class="filename">.</code>', the directory from
2398                 which the server
2399                 was started. The directory specified should be an absolute
2400                 path.
2401               </p></dd>
2402 <dt><span class="term"><span><strong class="command">key-directory</strong></span></span></dt>
2403 <dd><p>
2404                 When performing dynamic update of secure zones, the
2405                 directory where the public and private DNSSEC key files
2406                 should be found, if different than the current working
2407                 directory.  (Note that this option has no effect on the
2408                 paths for files containing non-DNSSEC keys such as
2409                 <code class="filename">bind.keys</code>,
2410                 <code class="filename">rndc.key</code> or
2411                 <code class="filename">session.key</code>.)
2412               </p></dd>
2413 <dt><span class="term"><span><strong class="command">managed-keys-directory</strong></span></span></dt>
2414 <dd><p>
2415                 The directory used to hold the files used to track managed keys.
2416                 By default it is the working directory.  It there are no
2417                 views then the file <code class="filename">managed-keys.bind</code>
2418                 otherwise a SHA256 hash of the view name is used with
2419                 <code class="filename">.mkeys</code> extension added.
2420               </p></dd>
2421 <dt><span class="term"><span><strong class="command">named-xfer</strong></span></span></dt>
2422 <dd><p>
2423                 <span class="emphasis"><em>This option is obsolete.</em></span> It
2424                 was used in <acronym class="acronym">BIND</acronym> 8 to specify
2425                 the pathname to the <span><strong class="command">named-xfer</strong></span>
2426                 program.  In <acronym class="acronym">BIND</acronym> 9, no separate
2427                 <span><strong class="command">named-xfer</strong></span> program is needed;
2428                 its functionality is built into the name server.
2429               </p></dd>
2430 <dt><span class="term"><span><strong class="command">tkey-gssapi-keytab</strong></span></span></dt>
2431 <dd><p>
2432                 The KRB5 keytab file to use for GSS-TSIG updates. If
2433                 this option is set and tkey-gssapi-credential is not
2434                 set, then updates will be allowed with any key
2435                 matching a principal in the specified keytab.
2436               </p></dd>
2437 <dt><span class="term"><span><strong class="command">tkey-gssapi-credential</strong></span></span></dt>
2438 <dd><p>
2439                 The security credential with which the server should
2440                 authenticate keys requested by the GSS-TSIG protocol.
2441                 Currently only Kerberos 5 authentication is available
2442                 and the credential is a Kerberos principal which the
2443                 server can acquire through the default system key
2444                 file, normally <code class="filename">/etc/krb5.keytab</code>.
2445                 The location keytab file can be overridden using the
2446                 tkey-gssapi-keytab option. Normally this principal is
2447                 of the form "<strong class="userinput"><code>DNS/</code></strong><code class="varname">server.domain</code>".
2448                 To use GSS-TSIG, <span><strong class="command">tkey-domain</strong></span> must
2449                 also be set if a specific keytab is not set with
2450                 tkey-gssapi-keytab.
2451               </p></dd>
2452 <dt><span class="term"><span><strong class="command">tkey-domain</strong></span></span></dt>
2453 <dd><p>
2454                 The domain appended to the names of all shared keys
2455                 generated with <span><strong class="command">TKEY</strong></span>.  When a
2456                 client requests a <span><strong class="command">TKEY</strong></span> exchange,
2457                 it may or may not specify the desired name for the
2458                 key. If present, the name of the shared key will
2459                 be <code class="varname">client specified part</code> +
2460                 <code class="varname">tkey-domain</code>.  Otherwise, the
2461                 name of the shared key will be <code class="varname">random hex
2462                 digits</code> + <code class="varname">tkey-domain</code>.
2463                 In most cases, the <span><strong class="command">domainname</strong></span>
2464                 should be the server's domain name, or an otherwise
2465                 non-existent subdomain like
2466                 "_tkey.<code class="varname">domainname</code>".  If you are
2467                 using GSS-TSIG, this variable must be defined, unless
2468                 you specify a specific keytab using tkey-gssapi-keytab.
2469               </p></dd>
2470 <dt><span class="term"><span><strong class="command">tkey-dhkey</strong></span></span></dt>
2471 <dd><p>
2472                 The Diffie-Hellman key used by the server
2473                 to generate shared keys with clients using the Diffie-Hellman
2474                 mode
2475                 of <span><strong class="command">TKEY</strong></span>. The server must be
2476                 able to load the
2477                 public and private keys from files in the working directory.
2478                 In
2479                 most cases, the keyname should be the server's host name.
2480               </p></dd>
2481 <dt><span class="term"><span><strong class="command">cache-file</strong></span></span></dt>
2482 <dd><p>
2483                 This is for testing only.  Do not use.
2484               </p></dd>
2485 <dt><span class="term"><span><strong class="command">dump-file</strong></span></span></dt>
2486 <dd><p>
2487                 The pathname of the file the server dumps
2488                 the database to when instructed to do so with
2489                 <span><strong class="command">rndc dumpdb</strong></span>.
2490                 If not specified, the default is <code class="filename">named_dump.db</code>.
2491               </p></dd>
2492 <dt><span class="term"><span><strong class="command">memstatistics-file</strong></span></span></dt>
2493 <dd><p>
2494                 The pathname of the file the server writes memory
2495                 usage statistics to on exit. If not specified,
2496                 the default is <code class="filename">named.memstats</code>.
2497               </p></dd>
2498 <dt><span class="term"><span><strong class="command">pid-file</strong></span></span></dt>
2499 <dd><p>
2500                 The pathname of the file the server writes its process ID
2501                 in. If not specified, the default is
2502                 <code class="filename">/var/run/named/named.pid</code>.
2503                 The PID file is used by programs that want to send signals to
2504                 the running
2505                 name server. Specifying <span><strong class="command">pid-file none</strong></span> disables the
2506                 use of a PID file &#8212; no file will be written and any
2507                 existing one will be removed.  Note that <span><strong class="command">none</strong></span>
2508                 is a keyword, not a filename, and therefore is not enclosed
2509                 in
2510                 double quotes.
2511               </p></dd>
2512 <dt><span class="term"><span><strong class="command">recursing-file</strong></span></span></dt>
2513 <dd><p>
2514                 The pathname of the file the server dumps
2515                 the queries that are currently recursing when instructed
2516                 to do so with <span><strong class="command">rndc recursing</strong></span>.
2517                 If not specified, the default is <code class="filename">named.recursing</code>.
2518               </p></dd>
2519 <dt><span class="term"><span><strong class="command">statistics-file</strong></span></span></dt>
2520 <dd><p>
2521                 The pathname of the file the server appends statistics
2522                 to when instructed to do so using <span><strong class="command">rndc stats</strong></span>.
2523                 If not specified, the default is <code class="filename">named.stats</code> in the
2524                 server's current directory.  The format of the file is
2525                 described
2526                 in <a href="Bv9ARM.ch06.html#statsfile" title="The Statistics File">the section called &#8220;The Statistics File&#8221;</a>.
2527               </p></dd>
2528 <dt><span class="term"><span><strong class="command">bindkeys-file</strong></span></span></dt>
2529 <dd><p>
2530                 The pathname of a file to override the built-in trusted
2531                 keys provided by <span><strong class="command">named</strong></span>.
2532                 See the discussion of <span><strong class="command">dnssec-lookaside</strong></span>
2533                 and <span><strong class="command">dnssec-validation</strong></span> for details. 
2534                 If not specified, the default is
2535                 <code class="filename">/etc/bind.keys</code>.
2536               </p></dd>
2537 <dt><span class="term"><span><strong class="command">secroots-file</strong></span></span></dt>
2538 <dd><p>
2539                 The pathname of the file the server dumps
2540                 security roots to when instructed to do so with
2541                 <span><strong class="command">rndc secroots</strong></span>.
2542                 If not specified, the default is
2543                 <code class="filename">named.secroots</code>.
2544               </p></dd>
2545 <dt><span class="term"><span><strong class="command">session-keyfile</strong></span></span></dt>
2546 <dd><p>
2547                 The pathname of the file into which to write a TSIG
2548                 session key generated by <span><strong class="command">named</strong></span> for use by
2549                 <span><strong class="command">nsupdate -l</strong></span>.  If not specified, the
2550                 default is <code class="filename">/var/run/named/session.key</code>.
2551                 (See <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called &#8220;Dynamic Update Policies&#8221;</a>, and in
2552                 particular the discussion of the
2553                 <span><strong class="command">update-policy</strong></span> statement's
2554                 <strong class="userinput"><code>local</code></strong> option for more
2555                 information about this feature.)
2556               </p></dd>
2557 <dt><span class="term"><span><strong class="command">session-keyname</strong></span></span></dt>
2558 <dd><p>
2559                 The key name to use for the TSIG session key.
2560                 If not specified, the default is "local-ddns".
2561               </p></dd>
2562 <dt><span class="term"><span><strong class="command">session-keyalg</strong></span></span></dt>
2563 <dd><p>
2564                 The algorithm to use for the TSIG session key.
2565                 Valid values are hmac-sha1, hmac-sha224, hmac-sha256,
2566                 hmac-sha384, hmac-sha512 and hmac-md5.  If not
2567                 specified, the default is hmac-sha256.
2568               </p></dd>
2569 <dt><span class="term"><span><strong class="command">port</strong></span></span></dt>
2570 <dd><p>
2571                 The UDP/TCP port number the server uses for
2572                 receiving and sending DNS protocol traffic.
2573                 The default is 53.  This option is mainly intended for server
2574                 testing;
2575                 a server using a port other than 53 will not be able to
2576                 communicate with
2577                 the global DNS.
2578               </p></dd>
2579 <dt><span class="term"><span><strong class="command">random-device</strong></span></span></dt>
2580 <dd><p>
2581                 The source of entropy to be used by the server.  Entropy is
2582                 primarily needed
2583                 for DNSSEC operations, such as TKEY transactions and dynamic
2584                 update of signed
2585                 zones.  This options specifies the device (or file) from which
2586                 to read
2587                 entropy.  If this is a file, operations requiring entropy will
2588                 fail when the
2589                 file has been exhausted.  If not specified, the default value
2590                 is
2591                 <code class="filename">/dev/random</code>
2592                 (or equivalent) when present, and none otherwise.  The
2593                 <span><strong class="command">random-device</strong></span> option takes
2594                 effect during
2595                 the initial configuration load at server startup time and
2596                 is ignored on subsequent reloads.
2597               </p></dd>
2598 <dt><span class="term"><span><strong class="command">preferred-glue</strong></span></span></dt>
2599 <dd><p>
2600                 If specified, the listed type (A or AAAA) will be emitted
2601                 before other glue
2602                 in the additional section of a query response.
2603                 The default is not to prefer any type (NONE).
2604               </p></dd>
2605 <dt>
2606 <a name="root_delegation_only"></a><span class="term"><span><strong class="command">root-delegation-only</strong></span></span>
2607 </dt>
2608 <dd>
2609 <p>
2610                 Turn on enforcement of delegation-only in TLDs
2611                 (top level domains) and root zones with an optional
2612                 exclude list.
2613               </p>
2614 <p>
2615                 DS queries are expected to be made to and be answered by
2616                 delegation only zones.  Such queries and responses are
2617                 treated as an exception to delegation-only processing
2618                 and are not converted to NXDOMAIN responses provided
2619                 a CNAME is not discovered at the query name.
2620               </p>
2621 <p>
2622                 If a delegation only zone server also serves a child
2623                 zone it is not always possible to determine whether
2624                 an answer comes from the delegation only zone or the
2625                 child zone.  SOA NS and DNSKEY records are apex
2626                 only records and a matching response that contains
2627                 these records or DS is treated as coming from a
2628                 child zone.  RRSIG records are also examined to see
2629                 if they are signed by a child zone or not.  The
2630                 authority section is also examined to see if there
2631                 is evidence that the answer is from the child zone.
2632                 Answers that are determined to be from a child zone
2633                 are not converted to NXDOMAIN responses.  Despite
2634                 all these checks there is still a possibility of
2635                 false negatives when a child zone is being served.
2636               </p>
2637 <p>
2638                 Similarly false positives can arise from empty nodes
2639                 (no records at the name) in the delegation only zone
2640                 when the query type is not ANY.
2641               </p>
2642 <p>
2643                 Note some TLDs are not delegation only (e.g. "DE", "LV",
2644                 "US" and "MUSEUM").  This list is not exhaustive.
2645               </p>
2646 <pre class="programlisting">
2647 options {
2648         root-delegation-only exclude { "de"; "lv"; "us"; "museum"; };
2649 };
2650 </pre>
2651 </dd>
2652 <dt><span class="term"><span><strong class="command">disable-algorithms</strong></span></span></dt>
2653 <dd><p>
2654                 Disable the specified DNSSEC algorithms at and below the
2655                 specified name.
2656                 Multiple <span><strong class="command">disable-algorithms</strong></span>
2657                 statements are allowed.
2658                 Only the most specific will be applied.
2659               </p></dd>
2660 <dt><span class="term"><span><strong class="command">dnssec-lookaside</strong></span></span></dt>
2661 <dd>
2662 <p>
2663                 When set, <span><strong class="command">dnssec-lookaside</strong></span> provides the
2664                 validator with an alternate method to validate DNSKEY
2665                 records at the top of a zone.  When a DNSKEY is at or
2666                 below a domain specified by the deepest
2667                 <span><strong class="command">dnssec-lookaside</strong></span>, and the normal DNSSEC
2668                 validation has left the key untrusted, the trust-anchor
2669                 will be appended to the key name and a DLV record will be
2670                 looked up to see if it can validate the key.  If the DLV
2671                 record validates a DNSKEY (similarly to the way a DS
2672                 record does) the DNSKEY RRset is deemed to be trusted.
2673               </p>
2674 <p>
2675                 If <span><strong class="command">dnssec-lookaside</strong></span> is set to
2676                 <strong class="userinput"><code>auto</code></strong>, then built-in default
2677                 values for the DLV domain and trust anchor will be
2678                 used, along with a built-in key for validation.
2679               </p>
2680 <p>
2681                 If <span><strong class="command">dnssec-lookaside</strong></span> is set to
2682                 <strong class="userinput"><code>no</code></strong>, then dnssec-lookaside
2683                 is not used.
2684               </p>
2685 <p>
2686                 The default DLV key is stored in the file
2687                 <code class="filename">bind.keys</code>;
2688                 <span><strong class="command">named</strong></span> will load that key at
2689                 startup if <span><strong class="command">dnssec-lookaside</strong></span> is set to
2690                 <code class="constant">auto</code>.  A copy of the file is
2691                 installed along with <acronym class="acronym">BIND</acronym> 9, and is
2692                 current as of the release date.  If the DLV key expires, a
2693                 new copy of <code class="filename">bind.keys</code> can be downloaded
2694                 from <a href="" target="_top">https://www.isc.org/solutions/dlv</a>.
2695               </p>
2696 <p>
2697                 (To prevent problems if <code class="filename">bind.keys</code> is
2698                 not found, the current key is also compiled in to
2699                 <span><strong class="command">named</strong></span>.  Relying on this is not
2700                 recommended, however, as it requires <span><strong class="command">named</strong></span>
2701                 to be recompiled with a new key when the DLV key expires.)
2702               </p>
2703 <p>
2704                 NOTE: <span><strong class="command">named</strong></span> only loads certain specific
2705                 keys from <code class="filename">bind.keys</code>:  those for the
2706                 DLV zone and for the DNS root zone.  The file cannot be
2707                 used to store keys for other zones.
2708               </p>
2709 </dd>
2710 <dt><span class="term"><span><strong class="command">dnssec-must-be-secure</strong></span></span></dt>
2711 <dd><p>
2712                 Specify hierarchies which must be or may not be secure
2713                 (signed and validated).  If <strong class="userinput"><code>yes</code></strong>,
2714                 then <span><strong class="command">named</strong></span> will only accept answers if
2715                 they are secure.  If <strong class="userinput"><code>no</code></strong>, then normal
2716                 DNSSEC validation applies allowing for insecure answers to
2717                 be accepted.  The specified domain must be under a
2718                 <span><strong class="command">trusted-keys</strong></span> or
2719                 <span><strong class="command">managed-keys</strong></span> statement, or
2720                 <span><strong class="command">dnssec-lookaside</strong></span> must be active.
2721               </p></dd>
2722 <dt><span class="term"><span><strong class="command">dns64</strong></span></span></dt>
2723 <dd>
2724 <p>
2725                 This directive instructs <span><strong class="command">named</strong></span> to
2726                 return mapped IPv4 addresses to AAAA queries when
2727                 there are no AAAA records.  It is intended to be
2728                 used in conjunction with a NAT64.  Each
2729                 <span><strong class="command">dns64</strong></span> defines one DNS64 prefix.
2730                 Multiple DNS64 prefixes can be defined.
2731               </p>
2732 <p>
2733                 Compatible IPv6 prefixes have lengths of 32, 40, 48, 56,
2734                 64 and 96 as per RFC 6052.
2735               </p>
2736 <p>
2737                 Additionally a reverse IP6.ARPA zone will be created for
2738                 the prefix to provide a mapping from the IP6.ARPA names
2739                 to the corresponding IN-ADDR.ARPA names using synthesized
2740                 CNAMEs.  <span><strong class="command">dns64-server</strong></span> and
2741                 <span><strong class="command">dns64-contact</strong></span> can be used to specify
2742                 the name of the server and contact for the zones. These
2743                 are settable at the view / options level.  These are
2744                 not settable on a per-prefix basis.
2745               </p>
2746 <p>
2747                 Each <span><strong class="command">dns64</strong></span> supports an optional
2748                 <span><strong class="command">clients</strong></span> ACL that determines which
2749                 clients are affected by this directive.  If not defined,
2750                 it defaults to <strong class="userinput"><code>any;</code></strong>.
2751               </p>
2752 <p>
2753                 Each <span><strong class="command">dns64</strong></span> supports an optional
2754                 <span><strong class="command">mapped</strong></span> ACL that selects which
2755                 IPv4 addresses are to be mapped in the corresponding    
2756                 A RRset.  If not defined it defaults to
2757                 <strong class="userinput"><code>any;</code></strong>.
2758               </p>
2759 <p>
2760                 Normally, DNS64 won't apply to a domain name that
2761                 owns one or more AAAA records; these records will
2762                 simply be returned.  The optional
2763                 <span><strong class="command">exclude</strong></span> ACL allows specification
2764                 of a list of IPv6 addresses that will be ignored
2765                 if they appear in a domain name's AAAA records, and
2766                 DNS64 will be applied to any A records the domain
2767                 name owns.  If not defined, <span><strong class="command">exclude</strong></span>
2768                 defaults to none.
2769               </p>
2770 <p>
2771                 A optional <span><strong class="command">suffix</strong></span> can also
2772                 be defined to set the bits trailing the mapped
2773                 IPv4 address bits.  By default these bits are
2774                 set to <strong class="userinput"><code>::</code></strong>.  The bits
2775                 matching the prefix and mapped IPv4 address
2776                 must be zero.
2777               </p>
2778 <p>
2779                 If <span><strong class="command">recursive-only</strong></span> is set to
2780                 <span><strong class="command">yes</strong></span> the DNS64 synthesis will
2781                 only happen for recursive queries.  The default
2782                 is <span><strong class="command">no</strong></span>.
2783               </p>
2784 <p>
2785                 If <span><strong class="command">break-dnssec</strong></span> is set to
2786                 <span><strong class="command">yes</strong></span> the DNS64 synthesis will
2787                 happen even if the result, if validated, would
2788                 cause a DNSSEC validation failure.  If this option
2789                 is set to <span><strong class="command">no</strong></span> (the default), the DO
2790                 is set on the incoming query, and there are RRSIGs on
2791                 the applicable records, then synthesis will not happen.
2792               </p>
2793 <pre class="programlisting">
2794         acl rfc1918 { 10/8; 192.168/16; 172.16/12; };
2795
2796         dns64 64:FF9B::/96 {
2797                 clients { any; };
2798                 mapped { !rfc1918; any; };
2799                 exclude { 64:FF9B::/96; ::ffff:0000:0000/96; };
2800                 suffix ::;
2801         };
2802 </pre>
2803 </dd>
2804 </dl></div>
2805 <div class="sect3" lang="en">
2806 <div class="titlepage"><div><div><h4 class="title">
2807 <a name="boolean_options"></a>Boolean Options</h4></div></div></div>
2808 <div class="variablelist"><dl>
2809 <dt><span class="term"><span><strong class="command">allow-new-zones</strong></span></span></dt>
2810 <dd><p>
2811                   If <strong class="userinput"><code>yes</code></strong>, then zones can be
2812                   added at runtime via <span><strong class="command">rndc addzone</strong></span>
2813                   or deleted via <span><strong class="command">rndc delzone</strong></span>.
2814                   The default is <strong class="userinput"><code>no</code></strong>.
2815                 </p></dd>
2816 <dt><span class="term"><span><strong class="command">auth-nxdomain</strong></span></span></dt>
2817 <dd><p>
2818                   If <strong class="userinput"><code>yes</code></strong>, then the <span><strong class="command">AA</strong></span> bit
2819                   is always set on NXDOMAIN responses, even if the server is
2820                   not actually
2821                   authoritative. The default is <strong class="userinput"><code>no</code></strong>;
2822                   this is
2823                   a change from <acronym class="acronym">BIND</acronym> 8. If you
2824                   are using very old DNS software, you
2825                   may need to set it to <strong class="userinput"><code>yes</code></strong>.
2826                 </p></dd>
2827 <dt><span class="term"><span><strong class="command">deallocate-on-exit</strong></span></span></dt>
2828 <dd><p>
2829                   This option was used in <acronym class="acronym">BIND</acronym>
2830                   8 to enable checking
2831                   for memory leaks on exit. <acronym class="acronym">BIND</acronym> 9 ignores the option and always performs
2832                   the checks.
2833                 </p></dd>
2834 <dt><span class="term"><span><strong class="command">memstatistics</strong></span></span></dt>
2835 <dd><p>
2836                   Write memory statistics to the file specified by
2837                   <span><strong class="command">memstatistics-file</strong></span> at exit.
2838                   The default is <strong class="userinput"><code>no</code></strong> unless
2839                   '-m record' is specified on the command line in
2840                   which case it is <strong class="userinput"><code>yes</code></strong>.
2841                 </p></dd>
2842 <dt><span class="term"><span><strong class="command">dialup</strong></span></span></dt>
2843 <dd>
2844 <p>
2845                   If <strong class="userinput"><code>yes</code></strong>, then the
2846                   server treats all zones as if they are doing zone transfers
2847                   across
2848                   a dial-on-demand dialup link, which can be brought up by
2849                   traffic
2850                   originating from this server. This has different effects
2851                   according
2852                   to zone type and concentrates the zone maintenance so that
2853                   it all
2854                   happens in a short interval, once every <span><strong class="command">heartbeat-interval</strong></span> and
2855                   hopefully during the one call. It also suppresses some of
2856                   the normal
2857                   zone maintenance traffic. The default is <strong class="userinput"><code>no</code></strong>.
2858                 </p>
2859 <p>
2860                   The <span><strong class="command">dialup</strong></span> option
2861                   may also be specified in the <span><strong class="command">view</strong></span> and
2862                   <span><strong class="command">zone</strong></span> statements,
2863                   in which case it overrides the global <span><strong class="command">dialup</strong></span>
2864                   option.
2865                 </p>
2866 <p>
2867                   If the zone is a master zone, then the server will send out a
2868                   NOTIFY
2869                   request to all the slaves (default). This should trigger the
2870                   zone serial
2871                   number check in the slave (providing it supports NOTIFY)
2872                   allowing the slave
2873                   to verify the zone while the connection is active.
2874                   The set of servers to which NOTIFY is sent can be controlled
2875                   by
2876                   <span><strong class="command">notify</strong></span> and <span><strong class="command">also-notify</strong></span>.
2877                 </p>
2878 <p>
2879                   If the
2880                   zone is a slave or stub zone, then the server will suppress
2881                   the regular
2882                   "zone up to date" (refresh) queries and only perform them
2883                   when the
2884                   <span><strong class="command">heartbeat-interval</strong></span> expires in
2885                   addition to sending
2886                   NOTIFY requests.
2887                 </p>
2888 <p>
2889                   Finer control can be achieved by using
2890                   <strong class="userinput"><code>notify</code></strong> which only sends NOTIFY
2891                   messages,
2892                   <strong class="userinput"><code>notify-passive</code></strong> which sends NOTIFY
2893                   messages and
2894                   suppresses the normal refresh queries, <strong class="userinput"><code>refresh</code></strong>
2895                   which suppresses normal refresh processing and sends refresh
2896                   queries
2897                   when the <span><strong class="command">heartbeat-interval</strong></span>
2898                   expires, and
2899                   <strong class="userinput"><code>passive</code></strong> which just disables normal
2900                   refresh
2901                   processing.
2902                 </p>
2903 <div class="informaltable"><table border="1">
2904 <colgroup>
2905 <col>
2906 <col>
2907 <col>
2908 <col>
2909 </colgroup>
2910 <tbody>
2911 <tr>
2912 <td>
2913                           <p>
2914                             dialup mode
2915                           </p>
2916                         </td>
2917 <td>
2918                           <p>
2919                             normal refresh
2920                           </p>
2921                         </td>
2922 <td>
2923                           <p>
2924                             heart-beat refresh
2925                           </p>
2926                         </td>
2927 <td>
2928                           <p>
2929                             heart-beat notify
2930                           </p>
2931                         </td>
2932 </tr>
2933 <tr>
2934 <td>
2935                           <p><span><strong class="command">no</strong></span> (default)</p>
2936                         </td>
2937 <td>
2938                           <p>
2939                             yes
2940                           </p>
2941                         </td>
2942 <td>
2943                           <p>
2944                             no
2945                           </p>
2946                         </td>
2947 <td>
2948                           <p>
2949                             no
2950                           </p>
2951                         </td>
2952 </tr>
2953 <tr>
2954 <td>
2955                           <p><span><strong class="command">yes</strong></span></p>
2956                         </td>
2957 <td>
2958                           <p>
2959                             no
2960                           </p>
2961                         </td>
2962 <td>
2963                           <p>
2964                             yes
2965                           </p>
2966                         </td>
2967 <td>
2968                           <p>
2969                             yes
2970                           </p>
2971                         </td>
2972 </tr>
2973 <tr>
2974 <td>
2975                           <p><span><strong class="command">notify</strong></span></p>
2976                         </td>
2977 <td>
2978                           <p>
2979                             yes
2980                           </p>
2981                         </td>
2982 <td>
2983                           <p>
2984                             no
2985                           </p>
2986                         </td>
2987 <td>
2988                           <p>
2989                             yes
2990                           </p>
2991                         </td>
2992 </tr>
2993 <tr>
2994 <td>
2995                           <p><span><strong class="command">refresh</strong></span></p>
2996                         </td>
2997 <td>
2998                           <p>
2999                             no
3000                           </p>
3001                         </td>
3002 <td>
3003                           <p>
3004                             yes
3005                           </p>
3006                         </td>
3007 <td>
3008                           <p>
3009                             no
3010                           </p>
3011                         </td>
3012 </tr>
3013 <tr>
3014 <td>
3015                           <p><span><strong class="command">passive</strong></span></p>
3016                         </td>
3017 <td>
3018                           <p>
3019                             no
3020                           </p>
3021                         </td>
3022 <td>
3023                           <p>
3024                             no
3025                           </p>
3026                         </td>
3027 <td>
3028                           <p>
3029                             no
3030                           </p>
3031                         </td>
3032 </tr>
3033 <tr>
3034 <td>
3035                           <p><span><strong class="command">notify-passive</strong></span></p>
3036                         </td>
3037 <td>
3038                           <p>
3039                             no
3040                           </p>
3041                         </td>
3042 <td>
3043                           <p>
3044                             no
3045                           </p>
3046                         </td>
3047 <td>
3048                           <p>
3049                             yes
3050                           </p>
3051                         </td>
3052 </tr>
3053 </tbody>
3054 </table></div>
3055 <p>
3056                   Note that normal NOTIFY processing is not affected by
3057                   <span><strong class="command">dialup</strong></span>.
3058                 </p>
3059 </dd>
3060 <dt><span class="term"><span><strong class="command">fake-iquery</strong></span></span></dt>
3061 <dd><p>
3062                   In <acronym class="acronym">BIND</acronym> 8, this option
3063                   enabled simulating the obsolete DNS query type
3064                   IQUERY. <acronym class="acronym">BIND</acronym> 9 never does
3065                   IQUERY simulation.
3066                 </p></dd>
3067 <dt><span class="term"><span><strong class="command">fetch-glue</strong></span></span></dt>
3068 <dd><p>
3069                   This option is obsolete.
3070                   In BIND 8, <strong class="userinput"><code>fetch-glue yes</code></strong>
3071                   caused the server to attempt to fetch glue resource records
3072                   it
3073                   didn't have when constructing the additional
3074                   data section of a response.  This is now considered a bad
3075                   idea
3076                   and BIND 9 never does it.
3077                 </p></dd>
3078 <dt><span class="term"><span><strong class="command">flush-zones-on-shutdown</strong></span></span></dt>
3079 <dd><p>
3080                   When the nameserver exits due receiving SIGTERM,
3081                   flush or do not flush any pending zone writes.  The default
3082                   is
3083                   <span><strong class="command">flush-zones-on-shutdown</strong></span> <strong class="userinput"><code>no</code></strong>.
3084                 </p></dd>
3085 <dt><span class="term"><span><strong class="command">has-old-clients</strong></span></span></dt>
3086 <dd><p>
3087                   This option was incorrectly implemented
3088                   in <acronym class="acronym">BIND</acronym> 8, and is ignored by <acronym class="acronym">BIND</acronym> 9.
3089                   To achieve the intended effect
3090                   of
3091                   <span><strong class="command">has-old-clients</strong></span> <strong class="userinput"><code>yes</code></strong>, specify
3092                   the two separate options <span><strong class="command">auth-nxdomain</strong></span> <strong class="userinput"><code>yes</code></strong>
3093                   and <span><strong class="command">rfc2308-type1</strong></span> <strong class="userinput"><code>no</code></strong> instead.
3094                 </p></dd>
3095 <dt><span class="term"><span><strong class="command">host-statistics</strong></span></span></dt>
3096 <dd><p>
3097                   In BIND 8, this enables keeping of
3098                   statistics for every host that the name server interacts
3099                   with.
3100                   Not implemented in BIND 9.
3101                 </p></dd>
3102 <dt><span class="term"><span><strong class="command">maintain-ixfr-base</strong></span></span></dt>
3103 <dd><p>
3104                   <span class="emphasis"><em>This option is obsolete</em></span>.
3105                   It was used in <acronym class="acronym">BIND</acronym> 8 to
3106                   determine whether a transaction log was
3107                   kept for Incremental Zone Transfer. <acronym class="acronym">BIND</acronym> 9 maintains a transaction
3108                   log whenever possible.  If you need to disable outgoing
3109                   incremental zone
3110                   transfers, use <span><strong class="command">provide-ixfr</strong></span> <strong class="userinput"><code>no</code></strong>.
3111                 </p></dd>
3112 <dt><span class="term"><span><strong class="command">minimal-responses</strong></span></span></dt>
3113 <dd><p>
3114                   If <strong class="userinput"><code>yes</code></strong>, then when generating
3115                   responses the server will only add records to the authority
3116                   and additional data sections when they are required (e.g.
3117                   delegations, negative responses).  This may improve the
3118                   performance of the server.
3119                   The default is <strong class="userinput"><code>no</code></strong>.
3120                 </p></dd>
3121 <dt><span class="term"><span><strong class="command">multiple-cnames</strong></span></span></dt>
3122 <dd><p>
3123                   This option was used in <acronym class="acronym">BIND</acronym> 8 to allow
3124                   a domain name to have multiple CNAME records in violation of
3125                   the DNS standards.  <acronym class="acronym">BIND</acronym> 9.2 onwards
3126                   always strictly enforces the CNAME rules both in master
3127                   files and dynamic updates.
3128                 </p></dd>
3129 <dt><span class="term"><span><strong class="command">notify</strong></span></span></dt>
3130 <dd>
3131 <p>
3132                   If <strong class="userinput"><code>yes</code></strong> (the default),
3133                   DNS NOTIFY messages are sent when a zone the server is
3134                   authoritative for
3135                   changes, see <a href="Bv9ARM.ch04.html#notify" title="Notify">the section called &#8220;Notify&#8221;</a>.  The messages are
3136                   sent to the
3137                   servers listed in the zone's NS records (except the master
3138                   server identified
3139                   in the SOA MNAME field), and to any servers listed in the
3140                   <span><strong class="command">also-notify</strong></span> option.
3141                 </p>
3142 <p>
3143                   If <strong class="userinput"><code>master-only</code></strong>, notifies are only
3144                   sent
3145                   for master zones.
3146                   If <strong class="userinput"><code>explicit</code></strong>, notifies are sent only
3147                   to
3148                   servers explicitly listed using <span><strong class="command">also-notify</strong></span>.
3149                   If <strong class="userinput"><code>no</code></strong>, no notifies are sent.
3150                 </p>
3151 <p>
3152                   The <span><strong class="command">notify</strong></span> option may also be
3153                   specified in the <span><strong class="command">zone</strong></span>
3154                   statement,
3155                   in which case it overrides the <span><strong class="command">options notify</strong></span> statement.
3156                   It would only be necessary to turn off this option if it
3157                   caused slaves
3158                   to crash.
3159                 </p>
3160 </dd>
3161 <dt><span class="term"><span><strong class="command">notify-to-soa</strong></span></span></dt>
3162 <dd><p>
3163                   If <strong class="userinput"><code>yes</code></strong> do not check the nameservers
3164                   in the NS RRset against the SOA MNAME.  Normally a NOTIFY
3165                   message is not sent to the SOA MNAME (SOA ORIGIN) as it is
3166                   supposed to contain the name of the ultimate master.
3167                   Sometimes, however, a slave is listed as the SOA MNAME in
3168                   hidden master configurations and in that case you would
3169                   want the ultimate master to still send NOTIFY messages to
3170                   all the nameservers listed in the NS RRset.
3171                 </p></dd>
3172 <dt><span class="term"><span><strong class="command">recursion</strong></span></span></dt>
3173 <dd><p>
3174                   If <strong class="userinput"><code>yes</code></strong>, and a
3175                   DNS query requests recursion, then the server will attempt
3176                   to do
3177                   all the work required to answer the query. If recursion is
3178                   off
3179                   and the server does not already know the answer, it will
3180                   return a
3181                   referral response. The default is
3182                   <strong class="userinput"><code>yes</code></strong>.
3183                   Note that setting <span><strong class="command">recursion no</strong></span> does not prevent
3184                   clients from getting data from the server's cache; it only
3185                   prevents new data from being cached as an effect of client
3186                   queries.
3187                   Caching may still occur as an effect the server's internal
3188                   operation, such as NOTIFY address lookups.
3189                   See also <span><strong class="command">fetch-glue</strong></span> above.
3190                 </p></dd>
3191 <dt><span class="term"><span><strong class="command">rfc2308-type1</strong></span></span></dt>
3192 <dd>
3193 <p>
3194                   Setting this to <strong class="userinput"><code>yes</code></strong> will
3195                   cause the server to send NS records along with the SOA
3196                   record for negative
3197                   answers. The default is <strong class="userinput"><code>no</code></strong>.
3198                 </p>
3199 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3200 <h3 class="title">Note</h3>
3201 <p>
3202                     Not yet implemented in <acronym class="acronym">BIND</acronym>
3203                     9.
3204                   </p>
3205 </div>
3206 </dd>
3207 <dt><span class="term"><span><strong class="command">use-id-pool</strong></span></span></dt>
3208 <dd><p>
3209                   <span class="emphasis"><em>This option is obsolete</em></span>.
3210                   <acronym class="acronym">BIND</acronym> 9 always allocates query
3211                   IDs from a pool.
3212                 </p></dd>
3213 <dt><span class="term"><span><strong class="command">zone-statistics</strong></span></span></dt>
3214 <dd><p>
3215                   If <strong class="userinput"><code>yes</code></strong>, the server will collect
3216                   statistical data on all zones (unless specifically turned
3217                   off
3218                   on a per-zone basis by specifying <span><strong class="command">zone-statistics no</strong></span>
3219                   in the <span><strong class="command">zone</strong></span> statement).
3220                   The default is <strong class="userinput"><code>no</code></strong>.
3221                   These statistics may be accessed
3222                   using <span><strong class="command">rndc stats</strong></span>, which will
3223                   dump them to the file listed
3224                   in the <span><strong class="command">statistics-file</strong></span>.  See
3225                   also <a href="Bv9ARM.ch06.html#statsfile" title="The Statistics File">the section called &#8220;The Statistics File&#8221;</a>.
3226                 </p></dd>
3227 <dt><span class="term"><span><strong class="command">use-ixfr</strong></span></span></dt>
3228 <dd><p>
3229                   <span class="emphasis"><em>This option is obsolete</em></span>.
3230                   If you need to disable IXFR to a particular server or
3231                   servers, see
3232                   the information on the <span><strong class="command">provide-ixfr</strong></span> option
3233                   in <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
3234             Usage">the section called &#8220;<span><strong class="command">server</strong></span> Statement Definition and
3235             Usage&#8221;</a>.
3236                   See also
3237                   <a href="Bv9ARM.ch04.html#incremental_zone_transfers" title="Incremental Zone Transfers (IXFR)">the section called &#8220;Incremental Zone Transfers (IXFR)&#8221;</a>.
3238                 </p></dd>
3239 <dt><span class="term"><span><strong class="command">provide-ixfr</strong></span></span></dt>
3240 <dd><p>
3241                   See the description of
3242                   <span><strong class="command">provide-ixfr</strong></span> in
3243                   <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
3244             Usage">the section called &#8220;<span><strong class="command">server</strong></span> Statement Definition and
3245             Usage&#8221;</a>.
3246                 </p></dd>
3247 <dt><span class="term"><span><strong class="command">request-ixfr</strong></span></span></dt>
3248 <dd><p>
3249                   See the description of
3250                   <span><strong class="command">request-ixfr</strong></span> in
3251                   <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
3252             Usage">the section called &#8220;<span><strong class="command">server</strong></span> Statement Definition and
3253             Usage&#8221;</a>.
3254                 </p></dd>
3255 <dt><span class="term"><span><strong class="command">treat-cr-as-space</strong></span></span></dt>
3256 <dd><p>
3257                   This option was used in <acronym class="acronym">BIND</acronym>
3258                   8 to make
3259                   the server treat carriage return ("<span><strong class="command">\r</strong></span>") characters the same way
3260                   as a space or tab character,
3261                   to facilitate loading of zone files on a UNIX system that
3262                   were generated
3263                   on an NT or DOS machine. In <acronym class="acronym">BIND</acronym> 9, both UNIX "<span><strong class="command">\n</strong></span>"
3264                   and NT/DOS "<span><strong class="command">\r\n</strong></span>" newlines
3265                   are always accepted,
3266                   and the option is ignored.
3267                 </p></dd>
3268 <dt>
3269 <span class="term"><span><strong class="command">additional-from-auth</strong></span>, </span><span class="term"><span><strong class="command">additional-from-cache</strong></span></span>
3270 </dt>
3271 <dd>
3272 <p>
3273                   These options control the behavior of an authoritative
3274                   server when
3275                   answering queries which have additional data, or when
3276                   following CNAME
3277                   and DNAME chains.
3278                 </p>
3279 <p>
3280                   When both of these options are set to <strong class="userinput"><code>yes</code></strong>
3281                   (the default) and a
3282                   query is being answered from authoritative data (a zone
3283                   configured into the server), the additional data section of
3284                   the
3285                   reply will be filled in using data from other authoritative
3286                   zones
3287                   and from the cache.  In some situations this is undesirable,
3288                   such
3289                   as when there is concern over the correctness of the cache,
3290                   or
3291                   in servers where slave zones may be added and modified by
3292                   untrusted third parties.  Also, avoiding
3293                   the search for this additional data will speed up server
3294                   operations
3295                   at the possible expense of additional queries to resolve
3296                   what would
3297                   otherwise be provided in the additional section.
3298                 </p>
3299 <p>
3300                   For example, if a query asks for an MX record for host <code class="literal">foo.example.com</code>,
3301                   and the record found is "<code class="literal">MX 10 mail.example.net</code>", normally the address
3302                   records (A and AAAA) for <code class="literal">mail.example.net</code> will be provided as well,
3303                   if known, even though they are not in the example.com zone.
3304                   Setting these options to <span><strong class="command">no</strong></span>
3305                   disables this behavior and makes
3306                   the server only search for additional data in the zone it
3307                   answers from.
3308                 </p>
3309 <p>
3310                   These options are intended for use in authoritative-only
3311                   servers, or in authoritative-only views.  Attempts to set
3312                   them to <span><strong class="command">no</strong></span> without also
3313                   specifying
3314                   <span><strong class="command">recursion no</strong></span> will cause the
3315                   server to
3316                   ignore the options and log a warning message.
3317                 </p>
3318 <p>
3319                   Specifying <span><strong class="command">additional-from-cache no</strong></span> actually
3320                   disables the use of the cache not only for additional data
3321                   lookups
3322                   but also when looking up the answer.  This is usually the
3323                   desired
3324                   behavior in an authoritative-only server where the
3325                   correctness of
3326                   the cached data is an issue.
3327                 </p>
3328 <p>
3329                   When a name server is non-recursively queried for a name
3330                   that is not
3331                   below the apex of any served zone, it normally answers with
3332                   an
3333                   "upwards referral" to the root servers or the servers of
3334                   some other
3335                   known parent of the query name.  Since the data in an
3336                   upwards referral
3337                   comes from the cache, the server will not be able to provide
3338                   upwards
3339                   referrals when <span><strong class="command">additional-from-cache no</strong></span>
3340                   has been specified.  Instead, it will respond to such
3341                   queries
3342                   with REFUSED.  This should not cause any problems since
3343                   upwards referrals are not required for the resolution
3344                   process.
3345                 </p>
3346 </dd>
3347 <dt><span class="term"><span><strong class="command">match-mapped-addresses</strong></span></span></dt>
3348 <dd>
3349 <p>
3350                   If <strong class="userinput"><code>yes</code></strong>, then an
3351                   IPv4-mapped IPv6 address will match any address match
3352                   list entries that match the corresponding IPv4 address.
3353                 </p>
3354 <p>
3355                   This option was introduced to work around a kernel quirk
3356                   in some operating systems that causes IPv4 TCP
3357                   connections, such as zone transfers, to be accepted on an
3358                   IPv6 socket using mapped addresses.  This caused address
3359                   match lists designed for IPv4 to fail to match.  However,
3360                   <span><strong class="command">named</strong></span> now solves this problem
3361                   internally.  The use of this option is discouraged.
3362                 </p>
3363 </dd>
3364 <dt><span class="term"><span><strong class="command">filter-aaaa-on-v4</strong></span></span></dt>
3365 <dd>
3366 <p>
3367                   This option is only available when
3368                   <acronym class="acronym">BIND</acronym> 9 is compiled with the
3369                   <strong class="userinput"><code>--enable-filter-aaaa</code></strong> option on the
3370                   "configure" command line.  It is intended to help the
3371                   transition from IPv4 to IPv6 by not giving IPv6 addresses
3372                   to DNS clients unless they have connections to the IPv6
3373                   Internet.  This is not recommended unless absolutely
3374                   necessary.  The default is <strong class="userinput"><code>no</code></strong>.
3375                   The <span><strong class="command">filter-aaaa-on-v4</strong></span> option
3376                   may also be specified in <span><strong class="command">view</strong></span> statements
3377                   to override the global <span><strong class="command">filter-aaaa-on-v4</strong></span>
3378                   option.
3379                 </p>
3380 <p>
3381                   If <strong class="userinput"><code>yes</code></strong>,
3382                   the DNS client is at an IPv4 address, in <span><strong class="command">filter-aaaa</strong></span>,
3383                   and if the response does not include DNSSEC signatures, 
3384                   then all AAAA records are deleted from the response.
3385                   This filtering applies to all responses and not only
3386                   authoritative responses.
3387                 </p>
3388 <p>
3389                   If <strong class="userinput"><code>break-dnssec</code></strong>,
3390                   then AAAA records are deleted even when dnssec is enabled.
3391                   As suggested by the name, this makes the response not verify,
3392                   because the DNSSEC protocol is designed detect deletions.
3393                 </p>
3394 <p>
3395                   This mechanism can erroneously cause other servers to 
3396                   not give AAAA records to their clients.  
3397                   A recursing server with both IPv6 and IPv4 network connections
3398                   that queries an authoritative server using this mechanism
3399                   via IPv4 will be denied AAAA records even if its client is
3400                   using IPv6.
3401                 </p>
3402 <p>
3403                   This mechanism is applied to authoritative as well as
3404                   non-authoritative records.
3405                   A client using IPv4 that is not allowed recursion can
3406                   erroneously be given AAAA records because the server is not
3407                   allowed to check for A records.
3408                 </p>
3409 <p>
3410                   Some AAAA records are given to IPv4 clients in glue records.
3411                   IPv4 clients that are servers can then erroneously
3412                   answer requests for AAAA records received via IPv4.
3413                 </p>
3414 </dd>
3415 <dt><span class="term"><span><strong class="command">ixfr-from-differences</strong></span></span></dt>
3416 <dd>
3417 <p>
3418                   When <strong class="userinput"><code>yes</code></strong> and the server loads a new version of a master
3419                   zone from its zone file or receives a new version of a slave
3420                   file by a non-incremental zone transfer, it will compare
3421                   the new version to the previous one and calculate a set
3422                   of differences.  The differences are then logged in the
3423                   zone's journal file such that the changes can be transmitted
3424                   to downstream slaves as an incremental zone transfer.
3425                 </p>
3426 <p>
3427                   By allowing incremental zone transfers to be used for
3428                   non-dynamic zones, this option saves bandwidth at the
3429                   expense of increased CPU and memory consumption at the
3430                   master.
3431                   In particular, if the new version of a zone is completely
3432                   different from the previous one, the set of differences
3433                   will be of a size comparable to the combined size of the
3434                   old and new zone version, and the server will need to
3435                   temporarily allocate memory to hold this complete
3436                   difference set.
3437                 </p>
3438 <p><span><strong class="command">ixfr-from-differences</strong></span>
3439                   also accepts <span><strong class="command">master</strong></span> and
3440                   <span><strong class="command">slave</strong></span> at the view and options
3441                   levels which causes
3442                   <span><strong class="command">ixfr-from-differences</strong></span> to be enabled for
3443                   all <span><strong class="command">master</strong></span> or
3444                   <span><strong class="command">slave</strong></span> zones respectively.
3445                   It is off by default.
3446                 </p>
3447 </dd>
3448 <dt><span class="term"><span><strong class="command">multi-master</strong></span></span></dt>
3449 <dd><p>
3450                   This should be set when you have multiple masters for a zone
3451                   and the
3452                   addresses refer to different machines.  If <strong class="userinput"><code>yes</code></strong>, <span><strong class="command">named</strong></span> will
3453                   not log
3454                   when the serial number on the master is less than what <span><strong class="command">named</strong></span>
3455                   currently
3456                   has.  The default is <strong class="userinput"><code>no</code></strong>.
3457                 </p></dd>
3458 <dt><span class="term"><span><strong class="command">dnssec-enable</strong></span></span></dt>
3459 <dd><p>
3460                   Enable DNSSEC support in <span><strong class="command">named</strong></span>.  Unless set to <strong class="userinput"><code>yes</code></strong>,
3461                   <span><strong class="command">named</strong></span> behaves as if it does not support DNSSEC.
3462                   The default is <strong class="userinput"><code>yes</code></strong>.
3463                 </p></dd>
3464 <dt><span class="term"><span><strong class="command">dnssec-validation</strong></span></span></dt>
3465 <dd><p>
3466                   Enable DNSSEC validation in <span><strong class="command">named</strong></span>.
3467                   Note <span><strong class="command">dnssec-enable</strong></span> also needs to be
3468                   set to <strong class="userinput"><code>yes</code></strong> to be effective.
3469                   If set to <strong class="userinput"><code>no</code></strong>, DNSSEC validation
3470                   is disabled.  If set to <strong class="userinput"><code>auto</code></strong>,
3471                   DNSSEC validation is enabled, and a default
3472                   trust-anchor for the DNS root zone is used.  If set to
3473                   <strong class="userinput"><code>yes</code></strong>, DNSSEC validation is enabled,
3474                   but a trust anchor must be manually configured using
3475                   a <span><strong class="command">trusted-keys</strong></span> or
3476                   <span><strong class="command">managed-keys</strong></span> statement.  The default
3477                   is <strong class="userinput"><code>yes</code></strong>.
3478                 </p></dd>
3479 <dt><span class="term"><span><strong class="command">dnssec-accept-expired</strong></span></span></dt>
3480 <dd><p>
3481                   Accept expired signatures when verifying DNSSEC signatures.
3482                   The default is <strong class="userinput"><code>no</code></strong>.
3483                   Setting this option to <strong class="userinput"><code>yes</code></strong>
3484                   leaves <span><strong class="command">named</strong></span> vulnerable to
3485                   replay attacks.
3486                 </p></dd>
3487 <dt><span class="term"><span><strong class="command">querylog</strong></span></span></dt>
3488 <dd><p>
3489                   Specify whether query logging should be started when <span><strong class="command">named</strong></span>
3490                   starts.
3491                   If <span><strong class="command">querylog</strong></span> is not specified,
3492                   then the query logging
3493                   is determined by the presence of the logging category <span><strong class="command">queries</strong></span>.
3494                 </p></dd>
3495 <dt><span class="term"><span><strong class="command">check-names</strong></span></span></dt>
3496 <dd>
3497 <p>
3498                   This option is used to restrict the character set and syntax
3499                   of
3500                   certain domain names in master files and/or DNS responses
3501                   received
3502                   from the network.  The default varies according to usage
3503                   area.  For
3504                   <span><strong class="command">master</strong></span> zones the default is <span><strong class="command">fail</strong></span>.
3505                   For <span><strong class="command">slave</strong></span> zones the default
3506                   is <span><strong class="command">warn</strong></span>.
3507                   For answers received from the network (<span><strong class="command">response</strong></span>)
3508                   the default is <span><strong class="command">ignore</strong></span>.
3509                 </p>
3510 <p>
3511                   The rules for legal hostnames and mail domains are derived
3512                   from RFC 952 and RFC 821 as modified by RFC 1123.
3513                 </p>
3514 <p><span><strong class="command">check-names</strong></span>
3515                   applies to the owner names of A, AAAA and MX records.
3516                   It also applies to the domain names in the RDATA of NS, SOA,
3517                   MX, and SRV records.
3518                   It also applies to the RDATA of PTR records where the owner
3519                   name indicated that it is a reverse lookup of a hostname
3520                   (the owner name ends in IN-ADDR.ARPA, IP6.ARPA, or IP6.INT).
3521                 </p>
3522 </dd>
3523 <dt><span class="term"><span><strong class="command">check-dup-records</strong></span></span></dt>
3524 <dd><p>
3525                   Check master zones for records that are treated as different
3526                   by DNSSEC but are semantically equal in plain DNS.  The
3527                   default is to <span><strong class="command">warn</strong></span>.  Other possible
3528                   values are <span><strong class="command">fail</strong></span> and
3529                   <span><strong class="command">ignore</strong></span>.
3530                 </p></dd>
3531 <dt><span class="term"><span><strong class="command">check-mx</strong></span></span></dt>
3532 <dd><p>
3533                   Check whether the MX record appears to refer to a IP address.
3534                   The default is to <span><strong class="command">warn</strong></span>.  Other possible
3535                   values are <span><strong class="command">fail</strong></span> and
3536                   <span><strong class="command">ignore</strong></span>.
3537                 </p></dd>
3538 <dt><span class="term"><span><strong class="command">check-wildcard</strong></span></span></dt>
3539 <dd><p>
3540                   This option is used to check for non-terminal wildcards.
3541                   The use of non-terminal wildcards is almost always as a
3542                   result of a failure
3543                   to understand the wildcard matching algorithm (RFC 1034).
3544                   This option
3545                   affects master zones.  The default (<span><strong class="command">yes</strong></span>) is to check
3546                   for non-terminal wildcards and issue a warning.
3547                 </p></dd>
3548 <dt><span class="term"><span><strong class="command">check-integrity</strong></span></span></dt>
3549 <dd><p>
3550                   Perform post load zone integrity checks on master
3551                   zones.  This checks that MX and SRV records refer
3552                   to address (A or AAAA) records and that glue
3553                   address records exist for delegated zones.  For
3554                   MX and SRV records only in-zone hostnames are
3555                   checked (for out-of-zone hostnames use
3556                   <span><strong class="command">named-checkzone</strong></span>).
3557                   For NS records only names below top of zone are
3558                   checked (for out-of-zone names and glue consistency
3559                   checks use <span><strong class="command">named-checkzone</strong></span>).
3560                   The default is <span><strong class="command">yes</strong></span>.
3561                 </p></dd>
3562 <dt><span class="term"><span><strong class="command">check-mx-cname</strong></span></span></dt>
3563 <dd><p>
3564                   If <span><strong class="command">check-integrity</strong></span> is set then
3565                   fail, warn or ignore MX records that refer
3566                   to CNAMES.  The default is to <span><strong class="command">warn</strong></span>.
3567                 </p></dd>
3568 <dt><span class="term"><span><strong class="command">check-srv-cname</strong></span></span></dt>
3569 <dd><p>
3570                   If <span><strong class="command">check-integrity</strong></span> is set then
3571                   fail, warn or ignore SRV records that refer
3572                   to CNAMES.  The default is to <span><strong class="command">warn</strong></span>.
3573                 </p></dd>
3574 <dt><span class="term"><span><strong class="command">check-sibling</strong></span></span></dt>
3575 <dd><p>
3576                   When performing integrity checks, also check that
3577                   sibling glue exists.  The default is <span><strong class="command">yes</strong></span>.
3578                 </p></dd>
3579 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl</strong></span></span></dt>
3580 <dd><p>
3581                   When returning authoritative negative responses to
3582                   SOA queries set the TTL of the SOA record returned in
3583                   the authority section to zero.
3584                   The default is <span><strong class="command">yes</strong></span>.
3585                 </p></dd>
3586 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl-cache</strong></span></span></dt>
3587 <dd><p>
3588                   When caching a negative response to a SOA query
3589                   set the TTL to zero.
3590                   The default is <span><strong class="command">no</strong></span>.
3591                 </p></dd>
3592 <dt><span class="term"><span><strong class="command">update-check-ksk</strong></span></span></dt>
3593 <dd>
3594 <p>
3595                   When set to the default value of <code class="literal">yes</code>,
3596                   check the KSK bit in each key to determine how the key
3597                   should be used when generating RRSIGs for a secure zone.
3598                 </p>
3599 <p>
3600                   Ordinarily, zone-signing keys (that is, keys without the
3601                   KSK bit set) are used to sign the entire zone, while
3602                   key-signing keys (keys with the KSK bit set) are only
3603                   used to sign the DNSKEY RRset at the zone apex.
3604                   However, if this option is set to <code class="literal">no</code>,
3605                   then the KSK bit is ignored; KSKs are treated as if they
3606                   were ZSKs and are used to sign the entire zone.  This is
3607                   similar to the <span><strong class="command">dnssec-signzone -z</strong></span>
3608                   command line option.
3609                 </p>
3610 <p>
3611                   When this option is set to <code class="literal">yes</code>, there
3612                   must be at least two active keys for every algorithm
3613                   represented in the DNSKEY RRset: at least one KSK and one
3614                   ZSK per algorithm.  If there is any algorithm for which
3615                   this requirement is not met, this option will be ignored
3616                   for that algorithm.
3617                 </p>
3618 </dd>
3619 <dt><span class="term"><span><strong class="command">dnssec-dnskey-kskonly</strong></span></span></dt>
3620 <dd>
3621 <p>
3622                   When this option and <span><strong class="command">update-check-ksk</strong></span>
3623                   are both set to <code class="literal">yes</code>, only key-signing
3624                   keys (that is, keys with the KSK bit set) will be used
3625                   to sign the DNSKEY RRset at the zone apex.  Zone-signing
3626                   keys (keys without the KSK bit set) will be used to sign
3627                   the remainder of the zone, but not the DNSKEY RRset.
3628                   This is similar to the
3629                   <span><strong class="command">dnssec-signzone -x</strong></span> command line option.
3630                 </p>
3631 <p>
3632                   The default is <span><strong class="command">no</strong></span>.  If
3633                   <span><strong class="command">update-check-ksk</strong></span> is set to
3634                   <code class="literal">no</code>, this option is ignored.
3635                 </p>
3636 </dd>
3637 <dt><span class="term"><span><strong class="command">try-tcp-refresh</strong></span></span></dt>
3638 <dd><p>
3639                   Try to refresh the zone using TCP if UDP queries fail.
3640                   For BIND 8 compatibility, the default is
3641                   <span><strong class="command">yes</strong></span>.
3642                 </p></dd>
3643 <dt><span class="term"><span><strong class="command">dnssec-secure-to-insecure</strong></span></span></dt>
3644 <dd>
3645 <p>
3646                   Allow a dynamic zone to transition from secure to
3647                   insecure (i.e., signed to unsigned) by deleting all
3648                   of the DNSKEY records.  The default is <span><strong class="command">no</strong></span>.
3649                   If set to <span><strong class="command">yes</strong></span>, and if the DNSKEY RRset
3650                   at the zone apex is deleted, all RRSIG and NSEC records
3651                   will be removed from the zone as well.
3652                 </p>
3653 <p>
3654                   If the zone uses NSEC3, then it is also necessary to
3655                   delete the NSEC3PARAM RRset from the zone apex; this will
3656                   cause the removal of all corresponding NSEC3 records.
3657                   (It is expected that this requirement will be eliminated
3658                   in a future release.)
3659                 </p>
3660 <p>
3661                   Note that if a zone has been configured with
3662                   <span><strong class="command">auto-dnssec maintain</strong></span> and the
3663                   private keys remain accessible in the key repository,
3664                   then the zone will be automatically signed again the
3665                   next time <span><strong class="command">named</strong></span> is started.
3666                 </p>
3667 </dd>
3668 </dl></div>
3669 </div>
3670 <div class="sect3" lang="en">
3671 <div class="titlepage"><div><div><h4 class="title">
3672 <a name="id2583675"></a>Forwarding</h4></div></div></div>
3673 <p>
3674             The forwarding facility can be used to create a large site-wide
3675             cache on a few servers, reducing traffic over links to external
3676             name servers. It can also be used to allow queries by servers that
3677             do not have direct access to the Internet, but wish to look up
3678             exterior
3679             names anyway. Forwarding occurs only on those queries for which
3680             the server is not authoritative and does not have the answer in
3681             its cache.
3682           </p>
3683 <div class="variablelist"><dl>
3684 <dt><span class="term"><span><strong class="command">forward</strong></span></span></dt>
3685 <dd><p>
3686                   This option is only meaningful if the
3687                   forwarders list is not empty. A value of <code class="varname">first</code>,
3688                   the default, causes the server to query the forwarders
3689                   first &#8212; and
3690                   if that doesn't answer the question, the server will then
3691                   look for
3692                   the answer itself. If <code class="varname">only</code> is
3693                   specified, the
3694                   server will only query the forwarders.
3695                 </p></dd>
3696 <dt><span class="term"><span><strong class="command">forwarders</strong></span></span></dt>
3697 <dd><p>
3698                   Specifies the IP addresses to be used
3699                   for forwarding. The default is the empty list (no
3700                   forwarding).
3701                 </p></dd>
3702 </dl></div>
3703 <p>
3704             Forwarding can also be configured on a per-domain basis, allowing
3705             for the global forwarding options to be overridden in a variety
3706             of ways. You can set particular domains to use different
3707             forwarders,
3708             or have a different <span><strong class="command">forward only/first</strong></span> behavior,
3709             or not forward at all, see <a href="Bv9ARM.ch06.html#zone_statement_grammar" title="zone
3710             Statement Grammar">the section called &#8220;<span><strong class="command">zone</strong></span>
3711             Statement Grammar&#8221;</a>.
3712           </p>
3713 </div>
3714 <div class="sect3" lang="en">
3715 <div class="titlepage"><div><div><h4 class="title">
3716 <a name="id2583734"></a>Dual-stack Servers</h4></div></div></div>
3717 <p>
3718             Dual-stack servers are used as servers of last resort to work
3719             around
3720             problems in reachability due the lack of support for either IPv4
3721             or IPv6
3722             on the host machine.
3723           </p>
3724 <div class="variablelist"><dl>
3725 <dt><span class="term"><span><strong class="command">dual-stack-servers</strong></span></span></dt>
3726 <dd><p>
3727                   Specifies host names or addresses of machines with access to
3728                   both IPv4 and IPv6 transports. If a hostname is used, the
3729                   server must be able
3730                   to resolve the name using only the transport it has.  If the
3731                   machine is dual
3732                   stacked, then the <span><strong class="command">dual-stack-servers</strong></span> have no effect unless
3733                   access to a transport has been disabled on the command line
3734                   (e.g. <span><strong class="command">named -4</strong></span>).
3735                 </p></dd>
3736 </dl></div>
3737 </div>
3738 <div class="sect3" lang="en">
3739 <div class="titlepage"><div><div><h4 class="title">
3740 <a name="access_control"></a>Access Control</h4></div></div></div>
3741 <p>
3742             Access to the server can be restricted based on the IP address
3743             of the requesting system. See <a href="Bv9ARM.ch06.html#address_match_lists" title="Address Match Lists">the section called &#8220;Address Match Lists&#8221;</a> for
3744             details on how to specify IP address lists.
3745           </p>
3746 <div class="variablelist"><dl>
3747 <dt><span class="term"><span><strong class="command">allow-notify</strong></span></span></dt>
3748 <dd><p>
3749                   Specifies which hosts are allowed to
3750                   notify this server, a slave, of zone changes in addition
3751                   to the zone masters.
3752                   <span><strong class="command">allow-notify</strong></span> may also be
3753                   specified in the
3754                   <span><strong class="command">zone</strong></span> statement, in which case
3755                   it overrides the
3756                   <span><strong class="command">options allow-notify</strong></span>
3757                   statement.  It is only meaningful
3758                   for a slave zone.  If not specified, the default is to
3759                   process notify messages
3760                   only from a zone's master.
3761                 </p></dd>
3762 <dt><span class="term"><span><strong class="command">allow-query</strong></span></span></dt>
3763 <dd>
3764 <p>
3765                   Specifies which hosts are allowed to ask ordinary
3766                   DNS questions. <span><strong class="command">allow-query</strong></span> may
3767                   also be specified in the <span><strong class="command">zone</strong></span>
3768                   statement, in which case it overrides the
3769                   <span><strong class="command">options allow-query</strong></span> statement.
3770                   If not specified, the default is to allow queries
3771                   from all hosts.
3772                 </p>
3773 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3774 <h3 class="title">Note</h3>
3775 <p>
3776                     <span><strong class="command">allow-query-cache</strong></span> is now
3777                     used to specify access to the cache.
3778                   </p>
3779 </div>
3780 </dd>
3781 <dt><span class="term"><span><strong class="command">allow-query-on</strong></span></span></dt>
3782 <dd>
3783 <p>
3784                   Specifies which local addresses can accept ordinary
3785                   DNS questions. This makes it possible, for instance,
3786                   to allow queries on internal-facing interfaces but
3787                   disallow them on external-facing ones, without
3788                   necessarily knowing the internal network's addresses.
3789                 </p>
3790 <p>
3791                   <span><strong class="command">allow-query-on</strong></span> may
3792                   also be specified in the <span><strong class="command">zone</strong></span>
3793                   statement, in which case it overrides the
3794                   <span><strong class="command">options allow-query-on</strong></span> statement.
3795                 </p>
3796 <p>
3797                   If not specified, the default is to allow queries
3798                   on all addresses.
3799                 </p>
3800 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3801 <h3 class="title">Note</h3>
3802 <p>
3803                     <span><strong class="command">allow-query-cache</strong></span> is
3804                     used to specify access to the cache.
3805                   </p>
3806 </div>
3807 </dd>
3808 <dt><span class="term"><span><strong class="command">allow-query-cache</strong></span></span></dt>
3809 <dd><p>
3810                   Specifies which hosts are allowed to get answers
3811                   from the cache.  If <span><strong class="command">allow-query-cache</strong></span>
3812                   is not set then <span><strong class="command">allow-recursion</strong></span>
3813                   is used if set, otherwise <span><strong class="command">allow-query</strong></span>
3814                   is used if set unless <span><strong class="command">recursion no;</strong></span> is
3815                   set in which case <span><strong class="command">none;</strong></span> is used,
3816                   otherwise the default (<span><strong class="command">localnets;</strong></span>
3817                   <span><strong class="command">localhost;</strong></span>) is used.
3818                 </p></dd>
3819 <dt><span class="term"><span><strong class="command">allow-query-cache-on</strong></span></span></dt>
3820 <dd><p>
3821                   Specifies which local addresses can give answers
3822                   from the cache.  If not specified, the default is
3823                   to allow cache queries on any address,
3824                   <span><strong class="command">localnets</strong></span> and
3825                   <span><strong class="command">localhost</strong></span>.
3826                 </p></dd>
3827 <dt><span class="term"><span><strong class="command">allow-recursion</strong></span></span></dt>
3828 <dd><p>
3829                   Specifies which hosts are allowed to make recursive
3830                   queries through this server. If
3831                   <span><strong class="command">allow-recursion</strong></span> is not set
3832                   then <span><strong class="command">allow-query-cache</strong></span> is
3833                   used if set, otherwise <span><strong class="command">allow-query</strong></span>
3834                   is used if set, otherwise the default
3835                   (<span><strong class="command">localnets;</strong></span>
3836                   <span><strong class="command">localhost;</strong></span>) is used.
3837                 </p></dd>
3838 <dt><span class="term"><span><strong class="command">allow-recursion-on</strong></span></span></dt>
3839 <dd><p>
3840                   Specifies which local addresses can accept recursive
3841                   queries.  If not specified, the default is to allow
3842                   recursive queries on all addresses.
3843                 </p></dd>
3844 <dt><span class="term"><span><strong class="command">allow-update</strong></span></span></dt>
3845 <dd><p>
3846                   Specifies which hosts are allowed to
3847                   submit Dynamic DNS updates for master zones. The default is
3848                   to deny
3849                   updates from all hosts.  Note that allowing updates based
3850                   on the requestor's IP address is insecure; see
3851                   <a href="Bv9ARM.ch07.html#dynamic_update_security" title="Dynamic Update Security">the section called &#8220;Dynamic Update Security&#8221;</a> for details.
3852                 </p></dd>
3853 <dt><span class="term"><span><strong class="command">allow-update-forwarding</strong></span></span></dt>
3854 <dd>
3855 <p>
3856                   Specifies which hosts are allowed to
3857                   submit Dynamic DNS updates to slave zones to be forwarded to
3858                   the
3859                   master.  The default is <strong class="userinput"><code>{ none; }</code></strong>,
3860                   which
3861                   means that no update forwarding will be performed.  To
3862                   enable
3863                   update forwarding, specify
3864                   <strong class="userinput"><code>allow-update-forwarding { any; };</code></strong>.
3865                   Specifying values other than <strong class="userinput"><code>{ none; }</code></strong> or
3866                   <strong class="userinput"><code>{ any; }</code></strong> is usually
3867                   counterproductive, since
3868                   the responsibility for update access control should rest
3869                   with the
3870                   master server, not the slaves.
3871                 </p>
3872 <p>
3873                   Note that enabling the update forwarding feature on a slave
3874                   server
3875                   may expose master servers relying on insecure IP address
3876                   based
3877                   access control to attacks; see <a href="Bv9ARM.ch07.html#dynamic_update_security" title="Dynamic Update Security">the section called &#8220;Dynamic Update Security&#8221;</a>
3878                   for more details.
3879                 </p>
3880 </dd>
3881 <dt><span class="term"><span><strong class="command">allow-v6-synthesis</strong></span></span></dt>
3882 <dd><p>
3883                   This option was introduced for the smooth transition from
3884                   AAAA
3885                   to A6 and from "nibble labels" to binary labels.
3886                   However, since both A6 and binary labels were then
3887                   deprecated,
3888                   this option was also deprecated.
3889                   It is now ignored with some warning messages.
3890                 </p></dd>
3891 <dt><span class="term"><span><strong class="command">allow-transfer</strong></span></span></dt>
3892 <dd><p>
3893                   Specifies which hosts are allowed to
3894                   receive zone transfers from the server. <span><strong class="command">allow-transfer</strong></span> may
3895                   also be specified in the <span><strong class="command">zone</strong></span>
3896                   statement, in which
3897                   case it overrides the <span><strong class="command">options allow-transfer</strong></span> statement.
3898                   If not specified, the default is to allow transfers to all
3899                   hosts.
3900                 </p></dd>
3901 <dt><span class="term"><span><strong class="command">blackhole</strong></span></span></dt>
3902 <dd><p>
3903                   Specifies a list of addresses that the
3904                   server will not accept queries from or use to resolve a
3905                   query. Queries
3906                   from these addresses will not be responded to. The default
3907                   is <strong class="userinput"><code>none</code></strong>.
3908                 </p></dd>
3909 <dt><span class="term"><span><strong class="command">filter-aaaa</strong></span></span></dt>
3910 <dd><p>
3911                   Specifies a list of addresses to which
3912                   <span><strong class="command">filter-aaaa-on-v4</strong></span>
3913                   is applies.  The default is <strong class="userinput"><code>any</code></strong>.
3914                 </p></dd>
3915 <dt><span class="term"><span><strong class="command">resolver-query-timeout</strong></span></span></dt>
3916 <dd><p>
3917                   The amount of time the resolver will spend attempting
3918                   to resolve a recursive query before failing.  The default
3919                   and minimum is <code class="literal">10</code> and the maximum is
3920                   <code class="literal">30</code>.  Setting it to <code class="literal">0</code>
3921                   will result in the default being used.
3922                 </p></dd>
3923 </dl></div>
3924 </div>
3925 <div class="sect3" lang="en">
3926 <div class="titlepage"><div><div><h4 class="title">
3927 <a name="id2584422"></a>Interfaces</h4></div></div></div>
3928 <p>
3929             The interfaces and ports that the server will answer queries
3930             from may be specified using the <span><strong class="command">listen-on</strong></span> option. <span><strong class="command">listen-on</strong></span> takes
3931             an optional port and an <code class="varname">address_match_list</code>.
3932             The server will listen on all interfaces allowed by the address
3933             match list. If a port is not specified, port 53 will be used.
3934           </p>
3935 <p>
3936             Multiple <span><strong class="command">listen-on</strong></span> statements are
3937             allowed.
3938             For example,
3939           </p>
3940 <pre class="programlisting">listen-on { 5.6.7.8; };
3941 listen-on port 1234 { !1.2.3.4; 1.2/16; };
3942 </pre>
3943 <p>
3944             will enable the name server on port 53 for the IP address
3945             5.6.7.8, and on port 1234 of an address on the machine in net
3946             1.2 that is not 1.2.3.4.
3947           </p>
3948 <p>
3949             If no <span><strong class="command">listen-on</strong></span> is specified, the
3950             server will listen on port 53 on all IPv4 interfaces.
3951           </p>
3952 <p>
3953             The <span><strong class="command">listen-on-v6</strong></span> option is used to
3954             specify the interfaces and the ports on which the server will
3955             listen
3956             for incoming queries sent using IPv6.
3957           </p>
3958 <p>
3959             When </p>
3960 <pre class="programlisting">{ any; }</pre>
3961 <p> is
3962             specified
3963             as the <code class="varname">address_match_list</code> for the
3964             <span><strong class="command">listen-on-v6</strong></span> option,
3965             the server does not bind a separate socket to each IPv6 interface
3966             address as it does for IPv4 if the operating system has enough API
3967             support for IPv6 (specifically if it conforms to RFC 3493 and RFC
3968             3542).
3969             Instead, it listens on the IPv6 wildcard address.
3970             If the system only has incomplete API support for IPv6, however,
3971             the behavior is the same as that for IPv4.
3972           </p>
3973 <p>
3974             A list of particular IPv6 addresses can also be specified, in
3975             which case
3976             the server listens on a separate socket for each specified
3977             address,
3978             regardless of whether the desired API is supported by the system.
3979           </p>
3980 <p>
3981             Multiple <span><strong class="command">listen-on-v6</strong></span> options can
3982             be used.
3983             For example,
3984           </p>
3985 <pre class="programlisting">listen-on-v6 { any; };
3986 listen-on-v6 port 1234 { !2001:db8::/32; any; };
3987 </pre>
3988 <p>
3989             will enable the name server on port 53 for any IPv6 addresses
3990             (with a single wildcard socket),
3991             and on port 1234 of IPv6 addresses that is not in the prefix
3992             2001:db8::/32 (with separate sockets for each matched address.)
3993           </p>
3994 <p>
3995             To make the server not listen on any IPv6 address, use
3996           </p>
3997 <pre class="programlisting">listen-on-v6 { none; };
3998 </pre>
3999 <p>
4000             If no <span><strong class="command">listen-on-v6</strong></span> option is
4001             specified, the server will not listen on any IPv6 address
4002             unless <span><strong class="command">-6</strong></span> is specified when <span><strong class="command">named</strong></span> is
4003             invoked.  If <span><strong class="command">-6</strong></span> is specified then
4004             <span><strong class="command">named</strong></span> will listen on port 53 on all IPv6 interfaces by default.
4005           </p>
4006 </div>
4007 <div class="sect3" lang="en">
4008 <div class="titlepage"><div><div><h4 class="title">
4009 <a name="query_address"></a>Query Address</h4></div></div></div>
4010 <p>
4011             If the server doesn't know the answer to a question, it will
4012             query other name servers. <span><strong class="command">query-source</strong></span> specifies
4013             the address and port used for such queries. For queries sent over
4014             IPv6, there is a separate <span><strong class="command">query-source-v6</strong></span> option.
4015             If <span><strong class="command">address</strong></span> is <span><strong class="command">*</strong></span> (asterisk) or is omitted,
4016             a wildcard IP address (<span><strong class="command">INADDR_ANY</strong></span>)
4017             will be used.
4018           </p>
4019 <p>
4020             If <span><strong class="command">port</strong></span> is <span><strong class="command">*</strong></span> or is omitted,
4021             a random port number from a pre-configured
4022             range is picked up and will be used for each query.
4023             The port range(s) is that specified in
4024             the <span><strong class="command">use-v4-udp-ports</strong></span> (for IPv4)
4025             and <span><strong class="command">use-v6-udp-ports</strong></span> (for IPv6)
4026             options, excluding the ranges specified in
4027             the <span><strong class="command">avoid-v4-udp-ports</strong></span>
4028             and <span><strong class="command">avoid-v6-udp-ports</strong></span> options, respectively.
4029           </p>
4030 <p>
4031             The defaults of the <span><strong class="command">query-source</strong></span> and
4032             <span><strong class="command">query-source-v6</strong></span> options
4033             are:
4034           </p>
4035 <pre class="programlisting">query-source address * port *;
4036 query-source-v6 address * port *;
4037 </pre>
4038 <p>
4039             If <span><strong class="command">use-v4-udp-ports</strong></span> or
4040             <span><strong class="command">use-v6-udp-ports</strong></span> is unspecified,
4041             <span><strong class="command">named</strong></span> will check if the operating
4042             system provides a programming interface to retrieve the
4043             system's default range for ephemeral ports.
4044             If such an interface is available,
4045             <span><strong class="command">named</strong></span> will use the corresponding system
4046             default range; otherwise, it will use its own defaults:
4047          </p>
4048 <pre class="programlisting">use-v4-udp-ports { range 1024 65535; };
4049 use-v6-udp-ports { range 1024 65535; };
4050 </pre>
4051 <p>
4052             Note: make sure the ranges be sufficiently large for
4053             security.  A desirable size depends on various parameters,
4054             but we generally recommend it contain at least 16384 ports
4055             (14 bits of entropy).
4056             Note also that the system's default range when used may be
4057             too small for this purpose, and that the range may even be
4058             changed while <span><strong class="command">named</strong></span> is running; the new
4059             range will automatically be applied when <span><strong class="command">named</strong></span>
4060             is reloaded.
4061             It is encouraged to
4062             configure <span><strong class="command">use-v4-udp-ports</strong></span> and
4063             <span><strong class="command">use-v6-udp-ports</strong></span> explicitly so that the
4064             ranges are sufficiently large and are reasonably
4065             independent from the ranges used by other applications.
4066           </p>
4067 <p>
4068             Note: the operational configuration
4069             where <span><strong class="command">named</strong></span> runs may prohibit the use
4070             of some ports.  For example, UNIX systems will not allow
4071             <span><strong class="command">named</strong></span> running without a root privilege
4072             to use ports less than 1024.
4073             If such ports are included in the specified (or detected)
4074             set of query ports, the corresponding query attempts will
4075             fail, resulting in resolution failures or delay.
4076             It is therefore important to configure the set of ports
4077             that can be safely used in the expected operational environment.
4078           </p>
4079 <p>
4080             The defaults of the <span><strong class="command">avoid-v4-udp-ports</strong></span> and
4081             <span><strong class="command">avoid-v6-udp-ports</strong></span> options
4082             are:
4083           </p>
4084 <pre class="programlisting">avoid-v4-udp-ports {};
4085 avoid-v6-udp-ports {};
4086 </pre>
4087 <p>
4088             Note: BIND 9.5.0 introduced
4089             the <span><strong class="command">use-queryport-pool</strong></span> 
4090             option to support a pool of such random ports, but this
4091             option is now obsolete because reusing the same ports in
4092             the pool may not be sufficiently secure.
4093             For the same reason, it is generally strongly discouraged to
4094             specify a particular port for the
4095             <span><strong class="command">query-source</strong></span> or
4096             <span><strong class="command">query-source-v6</strong></span> options;
4097             it implicitly disables the use of randomized port numbers.
4098           </p>
4099 <div class="variablelist"><dl>
4100 <dt><span class="term"><span><strong class="command">use-queryport-pool</strong></span></span></dt>
4101 <dd><p>
4102                   This option is obsolete.
4103                 </p></dd>
4104 <dt><span class="term"><span><strong class="command">queryport-pool-ports</strong></span></span></dt>
4105 <dd><p>
4106                   This option is obsolete.
4107                 </p></dd>
4108 <dt><span class="term"><span><strong class="command">queryport-pool-updateinterval</strong></span></span></dt>
4109 <dd><p>
4110                   This option is obsolete.
4111                 </p></dd>
4112 </dl></div>
4113 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4114 <h3 class="title">Note</h3>
4115 <p>
4116               The address specified in the <span><strong class="command">query-source</strong></span> option
4117               is used for both UDP and TCP queries, but the port applies only
4118               to UDP queries.  TCP queries always use a random
4119               unprivileged port.
4120             </p>
4121 </div>
4122 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4123 <h3 class="title">Note</h3>
4124 <p>
4125               Solaris 2.5.1 and earlier does not support setting the source
4126               address for TCP sockets.
4127             </p>
4128 </div>
4129 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4130 <h3 class="title">Note</h3>
4131 <p>
4132               See also <span><strong class="command">transfer-source</strong></span> and
4133               <span><strong class="command">notify-source</strong></span>.
4134             </p>
4135 </div>
4136 </div>
4137 <div class="sect3" lang="en">
4138 <div class="titlepage"><div><div><h4 class="title">
4139 <a name="zone_transfers"></a>Zone Transfers</h4></div></div></div>
4140 <p>
4141             <acronym class="acronym">BIND</acronym> has mechanisms in place to
4142             facilitate zone transfers
4143             and set limits on the amount of load that transfers place on the
4144             system. The following options apply to zone transfers.
4145           </p>
4146 <div class="variablelist"><dl>
4147 <dt><span class="term"><span><strong class="command">also-notify</strong></span></span></dt>
4148 <dd><p>
4149                   Defines a global list of IP addresses of name servers
4150                   that are also sent NOTIFY messages whenever a fresh copy of
4151                   the
4152                   zone is loaded, in addition to the servers listed in the
4153                   zone's NS records.
4154                   This helps to ensure that copies of the zones will
4155                   quickly converge on stealth servers.
4156                   Optionally, a port may be specified with each
4157                   <span><strong class="command">also-notify</strong></span> address to send
4158                   the notify messages to a port other than the
4159                   default of 53.
4160                   If an <span><strong class="command">also-notify</strong></span> list
4161                   is given in a <span><strong class="command">zone</strong></span> statement,
4162                   it will override
4163                   the <span><strong class="command">options also-notify</strong></span>
4164                   statement. When a <span><strong class="command">zone notify</strong></span>
4165                   statement
4166                   is set to <span><strong class="command">no</strong></span>, the IP
4167                   addresses in the global <span><strong class="command">also-notify</strong></span> list will
4168                   not be sent NOTIFY messages for that zone. The default is
4169                   the empty
4170                   list (no global notification list).
4171                 </p></dd>
4172 <dt><span class="term"><span><strong class="command">max-transfer-time-in</strong></span></span></dt>
4173 <dd><p>
4174                   Inbound zone transfers running longer than
4175                   this many minutes will be terminated. The default is 120
4176                   minutes
4177                   (2 hours).  The maximum value is 28 days (40320 minutes).
4178                 </p></dd>
4179 <dt><span class="term"><span><strong class="command">max-transfer-idle-in</strong></span></span></dt>
4180 <dd><p>
4181                   Inbound zone transfers making no progress
4182                   in this many minutes will be terminated. The default is 60
4183                   minutes
4184                   (1 hour).  The maximum value is 28 days (40320 minutes).
4185                 </p></dd>
4186 <dt><span class="term"><span><strong class="command">max-transfer-time-out</strong></span></span></dt>
4187 <dd><p>
4188                   Outbound zone transfers running longer than
4189                   this many minutes will be terminated. The default is 120
4190                   minutes
4191                   (2 hours).  The maximum value is 28 days (40320 minutes).
4192                 </p></dd>
4193 <dt><span class="term"><span><strong class="command">max-transfer-idle-out</strong></span></span></dt>
4194 <dd><p>
4195                   Outbound zone transfers making no progress
4196                   in this many minutes will be terminated.  The default is 60
4197                   minutes (1
4198                   hour).  The maximum value is 28 days (40320 minutes).
4199                 </p></dd>
4200 <dt><span class="term"><span><strong class="command">serial-query-rate</strong></span></span></dt>
4201 <dd>
4202 <p>
4203                   Slave servers will periodically query master
4204                   servers to find out if zone serial numbers have
4205                   changed. Each such query uses a minute amount of
4206                   the slave server's network bandwidth.  To limit
4207                   the amount of bandwidth used, BIND 9 limits the
4208                   rate at which queries are sent.  The value of the
4209                   <span><strong class="command">serial-query-rate</strong></span> option, an
4210                   integer, is the maximum number of queries sent
4211                   per second.  The default is 20.
4212                 </p>
4213 <p>
4214                   In addition to controlling the rate SOA refresh
4215                   queries are issued at
4216                   <span><strong class="command">serial-query-rate</strong></span> also controls
4217                   the rate at which NOTIFY messages are sent from
4218                   both master and slave zones.
4219                 </p>
4220 </dd>
4221 <dt><span class="term"><span><strong class="command">serial-queries</strong></span></span></dt>
4222 <dd><p>
4223                   In BIND 8, the <span><strong class="command">serial-queries</strong></span>
4224                   option
4225                   set the maximum number of concurrent serial number queries
4226                   allowed to be outstanding at any given time.
4227                   BIND 9 does not limit the number of outstanding
4228                   serial queries and ignores the <span><strong class="command">serial-queries</strong></span> option.
4229                   Instead, it limits the rate at which the queries are sent
4230                   as defined using the <span><strong class="command">serial-query-rate</strong></span> option.
4231                 </p></dd>
4232 <dt><span class="term"><span><strong class="command">transfer-format</strong></span></span></dt>
4233 <dd><p>
4234                   Zone transfers can be sent using two different formats,
4235                   <span><strong class="command">one-answer</strong></span> and
4236                   <span><strong class="command">many-answers</strong></span>.
4237                   The <span><strong class="command">transfer-format</strong></span> option is used
4238                   on the master server to determine which format it sends.
4239                   <span><strong class="command">one-answer</strong></span> uses one DNS message per
4240                   resource record transferred.
4241                   <span><strong class="command">many-answers</strong></span> packs as many resource
4242                   records as possible into a message.
4243                   <span><strong class="command">many-answers</strong></span> is more efficient, but is
4244                   only supported by relatively new slave servers,
4245                   such as <acronym class="acronym">BIND</acronym> 9, <acronym class="acronym">BIND</acronym>
4246                   8.x and <acronym class="acronym">BIND</acronym> 4.9.5 onwards.
4247                   The <span><strong class="command">many-answers</strong></span> format is also supported by
4248                   recent Microsoft Windows nameservers.
4249                   The default is <span><strong class="command">many-answers</strong></span>.
4250                   <span><strong class="command">transfer-format</strong></span> may be overridden on a
4251                   per-server basis by using the <span><strong class="command">server</strong></span>
4252                   statement.
4253                 </p></dd>
4254 <dt><span class="term"><span><strong class="command">transfers-in</strong></span></span></dt>
4255 <dd><p>
4256                   The maximum number of inbound zone transfers
4257                   that can be running concurrently. The default value is <code class="literal">10</code>.
4258                   Increasing <span><strong class="command">transfers-in</strong></span> may
4259                   speed up the convergence
4260                   of slave zones, but it also may increase the load on the
4261                   local system.
4262                 </p></dd>
4263 <dt><span class="term"><span><strong class="command">transfers-out</strong></span></span></dt>
4264 <dd><p>
4265                   The maximum number of outbound zone transfers
4266                   that can be running concurrently. Zone transfer requests in
4267                   excess
4268                   of the limit will be refused. The default value is <code class="literal">10</code>.
4269                 </p></dd>
4270 <dt><span class="term"><span><strong class="command">transfers-per-ns</strong></span></span></dt>
4271 <dd><p>
4272                   The maximum number of inbound zone transfers
4273                   that can be concurrently transferring from a given remote
4274                   name server.
4275                   The default value is <code class="literal">2</code>.
4276                   Increasing <span><strong class="command">transfers-per-ns</strong></span>
4277                   may
4278                   speed up the convergence of slave zones, but it also may
4279                   increase
4280                   the load on the remote name server. <span><strong class="command">transfers-per-ns</strong></span> may
4281                   be overridden on a per-server basis by using the <span><strong class="command">transfers</strong></span> phrase
4282                   of the <span><strong class="command">server</strong></span> statement.
4283                 </p></dd>
4284 <dt><span class="term"><span><strong class="command">transfer-source</strong></span></span></dt>
4285 <dd>
4286 <p><span><strong class="command">transfer-source</strong></span>
4287                   determines which local address will be bound to IPv4
4288                   TCP connections used to fetch zones transferred
4289                   inbound by the server.  It also determines the
4290                   source IPv4 address, and optionally the UDP port,
4291                   used for the refresh queries and forwarded dynamic
4292                   updates.  If not set, it defaults to a system
4293                   controlled value which will usually be the address
4294                   of the interface "closest to" the remote end. This
4295                   address must appear in the remote end's
4296                   <span><strong class="command">allow-transfer</strong></span> option for the
4297                   zone being transferred, if one is specified. This
4298                   statement sets the
4299                   <span><strong class="command">transfer-source</strong></span> for all zones,
4300                   but can be overridden on a per-view or per-zone
4301                   basis by including a
4302                   <span><strong class="command">transfer-source</strong></span> statement within
4303                   the <span><strong class="command">view</strong></span> or
4304                   <span><strong class="command">zone</strong></span> block in the configuration
4305                   file.
4306                 </p>
4307 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4308 <h3 class="title">Note</h3>
4309 <p>
4310                     Solaris 2.5.1 and earlier does not support setting the
4311                     source address for TCP sockets.
4312                   </p>
4313 </div>
4314 </dd>
4315 <dt><span class="term"><span><strong class="command">transfer-source-v6</strong></span></span></dt>
4316 <dd><p>
4317                   The same as <span><strong class="command">transfer-source</strong></span>,
4318                   except zone transfers are performed using IPv6.
4319                 </p></dd>
4320 <dt><span class="term"><span><strong class="command">alt-transfer-source</strong></span></span></dt>
4321 <dd>
4322 <p>
4323                   An alternate transfer source if the one listed in
4324                   <span><strong class="command">transfer-source</strong></span> fails and
4325                   <span><strong class="command">use-alt-transfer-source</strong></span> is
4326                   set.
4327                 </p>
4328 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4329 <h3 class="title">Note</h3>
4330                   If you do not wish the alternate transfer source
4331                   to be used, you should set
4332                   <span><strong class="command">use-alt-transfer-source</strong></span>
4333                   appropriately and you should not depend upon
4334                   getting an answer back to the first refresh
4335                   query.
4336                 </div>
4337 </dd>
4338 <dt><span class="term"><span><strong class="command">alt-transfer-source-v6</strong></span></span></dt>
4339 <dd><p>
4340                   An alternate transfer source if the one listed in
4341                   <span><strong class="command">transfer-source-v6</strong></span> fails and
4342                   <span><strong class="command">use-alt-transfer-source</strong></span> is
4343                   set.
4344                 </p></dd>
4345 <dt><span class="term"><span><strong class="command">use-alt-transfer-source</strong></span></span></dt>
4346 <dd><p>
4347                   Use the alternate transfer sources or not.  If views are
4348                   specified this defaults to <span><strong class="command">no</strong></span>
4349                   otherwise it defaults to
4350                   <span><strong class="command">yes</strong></span> (for BIND 8
4351                   compatibility).
4352                 </p></dd>
4353 <dt><span class="term"><span><strong class="command">notify-source</strong></span></span></dt>
4354 <dd>
4355 <p><span><strong class="command">notify-source</strong></span>
4356                   determines which local source address, and
4357                   optionally UDP port, will be used to send NOTIFY
4358                   messages.  This address must appear in the slave
4359                   server's <span><strong class="command">masters</strong></span> zone clause or
4360                   in an <span><strong class="command">allow-notify</strong></span> clause.  This
4361                   statement sets the <span><strong class="command">notify-source</strong></span>
4362                   for all zones, but can be overridden on a per-zone or
4363                   per-view basis by including a
4364                   <span><strong class="command">notify-source</strong></span> statement within
4365                   the <span><strong class="command">zone</strong></span> or
4366                   <span><strong class="command">view</strong></span> block in the configuration
4367                   file.
4368                 </p>
4369 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4370 <h3 class="title">Note</h3>
4371 <p>
4372                     Solaris 2.5.1 and earlier does not support setting the
4373                     source address for TCP sockets.
4374                   </p>
4375 </div>
4376 </dd>
4377 <dt><span class="term"><span><strong class="command">notify-source-v6</strong></span></span></dt>
4378 <dd><p>
4379                   Like <span><strong class="command">notify-source</strong></span>,
4380                   but applies to notify messages sent to IPv6 addresses.
4381                 </p></dd>
4382 </dl></div>
4383 </div>
4384 <div class="sect3" lang="en">
4385 <div class="titlepage"><div><div><h4 class="title">
4386 <a name="id2585495"></a>UDP Port Lists</h4></div></div></div>
4387 <p>
4388             <span><strong class="command">use-v4-udp-ports</strong></span>,
4389             <span><strong class="command">avoid-v4-udp-ports</strong></span>,
4390             <span><strong class="command">use-v6-udp-ports</strong></span>, and
4391             <span><strong class="command">avoid-v6-udp-ports</strong></span>
4392             specify a list of IPv4 and IPv6 UDP ports that will be
4393             used or not used as source ports for UDP messages.
4394             See <a href="Bv9ARM.ch06.html#query_address" title="Query Address">the section called &#8220;Query Address&#8221;</a> about how the
4395             available ports are determined.
4396             For example, with the following configuration
4397           </p>
4398 <pre class="programlisting">
4399 use-v6-udp-ports { range 32768 65535; };
4400 avoid-v6-udp-ports { 40000; range 50000 60000; };
4401 </pre>
4402 <p>
4403              UDP ports of IPv6 messages sent
4404              from <span><strong class="command">named</strong></span> will be in one
4405              of the following ranges: 32768 to 39999, 40001 to 49999,
4406              and 60001 to 65535.
4407            </p>
4408 <p>
4409              <span><strong class="command">avoid-v4-udp-ports</strong></span> and
4410              <span><strong class="command">avoid-v6-udp-ports</strong></span> can be used
4411              to prevent <span><strong class="command">named</strong></span> from choosing as its random source port a
4412              port that is blocked by your firewall or a port that is
4413              used by other applications;
4414              if a query went out with a source port blocked by a
4415              firewall, the
4416              answer would not get by the firewall and the name server would
4417              have to query again.
4418              Note: the desired range can also be represented only with
4419              <span><strong class="command">use-v4-udp-ports</strong></span> and
4420              <span><strong class="command">use-v6-udp-ports</strong></span>, and the
4421              <span><strong class="command">avoid-</strong></span> options are redundant in that
4422              sense; they are provided for backward compatibility and
4423              to possibly simplify the port specification.
4424            </p>
4425 </div>
4426 <div class="sect3" lang="en">
4427 <div class="titlepage"><div><div><h4 class="title">
4428 <a name="id2585555"></a>Operating System Resource Limits</h4></div></div></div>
4429 <p>
4430             The server's usage of many system resources can be limited.
4431             Scaled values are allowed when specifying resource limits.  For
4432             example, <span><strong class="command">1G</strong></span> can be used instead of
4433             <span><strong class="command">1073741824</strong></span> to specify a limit of
4434             one
4435             gigabyte. <span><strong class="command">unlimited</strong></span> requests
4436             unlimited use, or the
4437             maximum available amount. <span><strong class="command">default</strong></span>
4438             uses the limit
4439             that was in force when the server was started. See the description
4440             of <span><strong class="command">size_spec</strong></span> in <a href="Bv9ARM.ch06.html#configuration_file_elements" title="Configuration File Elements">the section called &#8220;Configuration File Elements&#8221;</a>.
4441           </p>
4442 <p>
4443             The following options set operating system resource limits for
4444             the name server process.  Some operating systems don't support
4445             some or
4446             any of the limits. On such systems, a warning will be issued if
4447             the
4448             unsupported limit is used.
4449           </p>
4450 <div class="variablelist"><dl>
4451 <dt><span class="term"><span><strong class="command">coresize</strong></span></span></dt>
4452 <dd><p>
4453                   The maximum size of a core dump. The default
4454                   is <code class="literal">default</code>.
4455                 </p></dd>
4456 <dt><span class="term"><span><strong class="command">datasize</strong></span></span></dt>
4457 <dd><p>
4458                   The maximum amount of data memory the server
4459                   may use. The default is <code class="literal">default</code>.
4460                   This is a hard limit on server memory usage.
4461                   If the server attempts to allocate memory in excess of this
4462                   limit, the allocation will fail, which may in turn leave
4463                   the server unable to perform DNS service.  Therefore,
4464                   this option is rarely useful as a way of limiting the
4465                   amount of memory used by the server, but it can be used
4466                   to raise an operating system data size limit that is
4467                   too small by default.  If you wish to limit the amount
4468                   of memory used by the server, use the
4469                   <span><strong class="command">max-cache-size</strong></span> and
4470                   <span><strong class="command">recursive-clients</strong></span>
4471                   options instead.
4472                 </p></dd>
4473 <dt><span class="term"><span><strong class="command">files</strong></span></span></dt>
4474 <dd><p>
4475                   The maximum number of files the server
4476                   may have open concurrently. The default is <code class="literal">unlimited</code>.
4477                 </p></dd>
4478 <dt><span class="term"><span><strong class="command">stacksize</strong></span></span></dt>
4479 <dd><p>
4480                   The maximum amount of stack memory the server
4481                   may use. The default is <code class="literal">default</code>.
4482                 </p></dd>
4483 </dl></div>
4484 </div>
4485 <div class="sect3" lang="en">
4486 <div class="titlepage"><div><div><h4 class="title">
4487 <a name="server_resource_limits"></a>Server  Resource Limits</h4></div></div></div>
4488 <p>
4489             The following options set limits on the server's
4490             resource consumption that are enforced internally by the
4491             server rather than the operating system.
4492           </p>
4493 <div class="variablelist"><dl>
4494 <dt><span class="term"><span><strong class="command">max-ixfr-log-size</strong></span></span></dt>
4495 <dd><p>
4496                   This option is obsolete; it is accepted
4497                   and ignored for BIND 8 compatibility.  The option
4498                   <span><strong class="command">max-journal-size</strong></span> performs a
4499                   similar function in BIND 9.
4500                 </p></dd>
4501 <dt><span class="term"><span><strong class="command">max-journal-size</strong></span></span></dt>
4502 <dd><p>
4503                   Sets a maximum size for each journal file
4504                   (see <a href="Bv9ARM.ch04.html#journal" title="The journal file">the section called &#8220;The journal file&#8221;</a>).  When the journal file
4505                   approaches
4506                   the specified size, some of the oldest transactions in the
4507                   journal
4508                   will be automatically removed.  The default is
4509                   <code class="literal">unlimited</code>.
4510                   This may also be set on a per-zone basis.
4511                 </p></dd>
4512 <dt><span class="term"><span><strong class="command">host-statistics-max</strong></span></span></dt>
4513 <dd><p>
4514                   In BIND 8, specifies the maximum number of host statistics
4515                   entries to be kept.
4516                   Not implemented in BIND 9.
4517                 </p></dd>
4518 <dt><span class="term"><span><strong class="command">recursive-clients</strong></span></span></dt>
4519 <dd><p>
4520                   The maximum number of simultaneous recursive lookups
4521                   the server will perform on behalf of clients.  The default
4522                   is
4523                   <code class="literal">1000</code>.  Because each recursing
4524                   client uses a fair
4525                   bit of memory, on the order of 20 kilobytes, the value of
4526                   the
4527                   <span><strong class="command">recursive-clients</strong></span> option may
4528                   have to be decreased
4529                   on hosts with limited memory.
4530                 </p></dd>
4531 <dt><span class="term"><span><strong class="command">tcp-clients</strong></span></span></dt>
4532 <dd><p>
4533                   The maximum number of simultaneous client TCP
4534                   connections that the server will accept.
4535                   The default is <code class="literal">100</code>.
4536                 </p></dd>
4537 <dt><span class="term"><span><strong class="command">reserved-sockets</strong></span></span></dt>
4538 <dd>
4539 <p>
4540                   The number of file descriptors reserved for TCP, stdio,
4541                   etc.  This needs to be big enough to cover the number of
4542                   interfaces <span><strong class="command">named</strong></span> listens on, <span><strong class="command">tcp-clients</strong></span> as well as
4543                   to provide room for outgoing TCP queries and incoming zone
4544                   transfers.  The default is <code class="literal">512</code>.
4545                   The minimum value is <code class="literal">128</code> and the
4546                   maximum value is <code class="literal">128</code> less than
4547                   maxsockets (-S).  This option may be removed in the future.
4548                 </p>
4549 <p>
4550                   This option has little effect on Windows.
4551                 </p>
4552 </dd>
4553 <dt><span class="term"><span><strong class="command">max-cache-size</strong></span></span></dt>
4554 <dd><p>
4555                   The maximum amount of memory to use for the
4556                   server's cache, in bytes.
4557                   When the amount of data in the cache
4558                   reaches this limit, the server will cause records to expire
4559                   prematurely based on an LRU based strategy so that
4560                   the limit is not exceeded.
4561                   A value of 0 is special, meaning that
4562                   records are purged from the cache only when their
4563                   TTLs expire.
4564                   Another special keyword <strong class="userinput"><code>unlimited</code></strong>
4565                   means the maximum value of 32-bit unsigned integers
4566                   (0xffffffff), which may not have the same effect as
4567                   0 on machines that support more than 32 bits of
4568                   memory space.
4569                   Any positive values less than 2MB will be ignored reset
4570                   to 2MB.
4571                   In a server with multiple views, the limit applies
4572                   separately to the cache of each view.
4573                   The default is 0.
4574                 </p></dd>
4575 <dt><span class="term"><span><strong class="command">tcp-listen-queue</strong></span></span></dt>
4576 <dd><p>
4577                   The listen queue depth.  The default and minimum is 3.
4578                   If the kernel supports the accept filter "dataready" this
4579                   also controls how
4580                   many TCP connections that will be queued in kernel space
4581                   waiting for
4582                   some data before being passed to accept.  Values less than 3
4583                   will be
4584                   silently raised.
4585                 </p></dd>
4586 </dl></div>
4587 </div>
4588 <div class="sect3" lang="en">
4589 <div class="titlepage"><div><div><h4 class="title">
4590 <a name="id2586114"></a>Periodic Task Intervals</h4></div></div></div>
4591 <div class="variablelist"><dl>
4592 <dt><span class="term"><span><strong class="command">cleaning-interval</strong></span></span></dt>
4593 <dd><p>
4594                   This interval is effectively obsolete.  Previously,
4595                   the server would remove expired resource records
4596                   from the cache every <span><strong class="command">cleaning-interval</strong></span> minutes.
4597                   <acronym class="acronym">BIND</acronym> 9 now manages cache
4598                   memory in a more sophisticated manner and does not
4599                   rely on the periodic cleaning any more.
4600                   Specifying this option therefore has no effect on
4601                   the server's behavior.
4602                 </p></dd>
4603 <dt><span class="term"><span><strong class="command">heartbeat-interval</strong></span></span></dt>
4604 <dd><p>
4605                   The server will perform zone maintenance tasks
4606                   for all zones marked as <span><strong class="command">dialup</strong></span> whenever this
4607                   interval expires. The default is 60 minutes. Reasonable
4608                   values are up
4609                   to 1 day (1440 minutes).  The maximum value is 28 days
4610                   (40320 minutes).
4611                   If set to 0, no zone maintenance for these zones will occur.
4612                 </p></dd>
4613 <dt><span class="term"><span><strong class="command">interface-interval</strong></span></span></dt>
4614 <dd><p>
4615                   The server will scan the network interface list
4616                   every <span><strong class="command">interface-interval</strong></span>
4617                   minutes. The default
4618                   is 60 minutes. The maximum value is 28 days (40320 minutes).
4619                   If set to 0, interface scanning will only occur when
4620                   the configuration file is  loaded. After the scan, the
4621                   server will
4622                   begin listening for queries on any newly discovered
4623                   interfaces (provided they are allowed by the
4624                   <span><strong class="command">listen-on</strong></span> configuration), and
4625                   will
4626                   stop listening on interfaces that have gone away.
4627                 </p></dd>
4628 <dt><span class="term"><span><strong class="command">statistics-interval</strong></span></span></dt>
4629 <dd>
4630 <p>
4631                   Name server statistics will be logged
4632                   every <span><strong class="command">statistics-interval</strong></span>
4633                   minutes. The default is
4634                   60. The maximum value is 28 days (40320 minutes).
4635                   If set to 0, no statistics will be logged.
4636                   </p>
4637 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4638 <h3 class="title">Note</h3>
4639 <p>
4640                     Not yet implemented in
4641                     <acronym class="acronym">BIND</acronym> 9.
4642                   </p>
4643 </div>
4644 </dd>
4645 </dl></div>
4646 </div>
4647 <div class="sect3" lang="en">
4648 <div class="titlepage"><div><div><h4 class="title">
4649 <a name="topology"></a>Topology</h4></div></div></div>
4650 <p>
4651             All other things being equal, when the server chooses a name
4652             server
4653             to query from a list of name servers, it prefers the one that is
4654             topologically closest to itself. The <span><strong class="command">topology</strong></span> statement
4655             takes an <span><strong class="command">address_match_list</strong></span> and
4656             interprets it
4657             in a special way. Each top-level list element is assigned a
4658             distance.
4659             Non-negated elements get a distance based on their position in the
4660             list, where the closer the match is to the start of the list, the
4661             shorter the distance is between it and the server. A negated match
4662             will be assigned the maximum distance from the server. If there
4663             is no match, the address will get a distance which is further than
4664             any non-negated list element, and closer than any negated element.
4665             For example,
4666           </p>
4667 <pre class="programlisting">topology {
4668     10/8;
4669     !1.2.3/24;
4670     { 1.2/16; 3/8; };
4671 };</pre>
4672 <p>
4673             will prefer servers on network 10 the most, followed by hosts
4674             on network 1.2.0.0 (netmask 255.255.0.0) and network 3, with the
4675             exception of hosts on network 1.2.3 (netmask 255.255.255.0), which
4676             is preferred least of all.
4677           </p>
4678 <p>
4679             The default topology is
4680           </p>
4681 <pre class="programlisting">    topology { localhost; localnets; };
4682 </pre>
4683 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4684 <h3 class="title">Note</h3>
4685 <p>
4686               The <span><strong class="command">topology</strong></span> option
4687               is not implemented in <acronym class="acronym">BIND</acronym> 9.
4688             </p>
4689 </div>
4690 </div>
4691 <div class="sect3" lang="en">
4692 <div class="titlepage"><div><div><h4 class="title">
4693 <a name="the_sortlist_statement"></a>The <span><strong class="command">sortlist</strong></span> Statement</h4></div></div></div>
4694 <p>
4695             The response to a DNS query may consist of multiple resource
4696             records (RRs) forming a resource records set (RRset).
4697             The name server will normally return the
4698             RRs within the RRset in an indeterminate order
4699             (but see the <span><strong class="command">rrset-order</strong></span>
4700             statement in <a href="Bv9ARM.ch06.html#rrset_ordering" title="RRset Ordering">the section called &#8220;RRset Ordering&#8221;</a>).
4701             The client resolver code should rearrange the RRs as appropriate,
4702             that is, using any addresses on the local net in preference to
4703             other addresses.
4704             However, not all resolvers can do this or are correctly
4705             configured.
4706             When a client is using a local server, the sorting can be performed
4707             in the server, based on the client's address. This only requires
4708             configuring the name servers, not all the clients.
4709           </p>
4710 <p>
4711             The <span><strong class="command">sortlist</strong></span> statement (see below)
4712             takes
4713             an <span><strong class="command">address_match_list</strong></span> and
4714             interprets it even
4715             more specifically than the <span><strong class="command">topology</strong></span>
4716             statement
4717             does (<a href="Bv9ARM.ch06.html#topology" title="Topology">the section called &#8220;Topology&#8221;</a>).
4718             Each top level statement in the <span><strong class="command">sortlist</strong></span> must
4719             itself be an explicit <span><strong class="command">address_match_list</strong></span> with
4720             one or two elements. The first element (which may be an IP
4721             address,
4722             an IP prefix, an ACL name or a nested <span><strong class="command">address_match_list</strong></span>)
4723             of each top level list is checked against the source address of
4724             the query until a match is found.
4725           </p>
4726 <p>
4727             Once the source address of the query has been matched, if
4728             the top level statement contains only one element, the actual
4729             primitive
4730             element that matched the source address is used to select the
4731             address
4732             in the response to move to the beginning of the response. If the
4733             statement is a list of two elements, then the second element is
4734             treated the same as the <span><strong class="command">address_match_list</strong></span> in
4735             a <span><strong class="command">topology</strong></span> statement. Each top
4736             level element
4737             is assigned a distance and the address in the response with the
4738             minimum
4739             distance is moved to the beginning of the response.
4740           </p>
4741 <p>
4742             In the following example, any queries received from any of
4743             the addresses of the host itself will get responses preferring
4744             addresses
4745             on any of the locally connected networks. Next most preferred are
4746             addresses
4747             on the 192.168.1/24 network, and after that either the
4748             192.168.2/24
4749             or
4750             192.168.3/24 network with no preference shown between these two
4751             networks. Queries received from a host on the 192.168.1/24 network
4752             will prefer other addresses on that network to the 192.168.2/24
4753             and
4754             192.168.3/24 networks. Queries received from a host on the
4755             192.168.4/24
4756             or the 192.168.5/24 network will only prefer other addresses on
4757             their directly connected networks.
4758           </p>
4759 <pre class="programlisting">sortlist {
4760     // IF the local host
4761     // THEN first fit on the following nets
4762     { localhost;
4763         { localnets;
4764             192.168.1/24;
4765             { 192.168.2/24; 192.168.3/24; }; }; };
4766     // IF on class C 192.168.1 THEN use .1, or .2 or .3
4767     { 192.168.1/24;
4768         { 192.168.1/24;
4769             { 192.168.2/24; 192.168.3/24; }; }; };
4770     // IF on class C 192.168.2 THEN use .2, or .1 or .3
4771     { 192.168.2/24;
4772         { 192.168.2/24;
4773             { 192.168.1/24; 192.168.3/24; }; }; };
4774     // IF on class C 192.168.3 THEN use .3, or .1 or .2
4775     { 192.168.3/24;
4776         { 192.168.3/24;
4777             { 192.168.1/24; 192.168.2/24; }; }; };
4778     // IF .4 or .5 THEN prefer that net
4779     { { 192.168.4/24; 192.168.5/24; };
4780     };
4781 };</pre>
4782 <p>
4783             The following example will give reasonable behavior for the
4784             local host and hosts on directly connected networks. It is similar
4785             to the behavior of the address sort in <acronym class="acronym">BIND</acronym> 4.9.x. Responses sent
4786             to queries from the local host will favor any of the directly
4787             connected
4788             networks. Responses sent to queries from any other hosts on a
4789             directly
4790             connected network will prefer addresses on that same network.
4791             Responses
4792             to other queries will not be sorted.
4793           </p>
4794 <pre class="programlisting">sortlist {
4795            { localhost; localnets; };
4796            { localnets; };
4797 };
4798 </pre>
4799 </div>
4800 <div class="sect3" lang="en">
4801 <div class="titlepage"><div><div><h4 class="title">
4802 <a name="rrset_ordering"></a>RRset Ordering</h4></div></div></div>
4803 <p>
4804             When multiple records are returned in an answer it may be
4805             useful to configure the order of the records placed into the
4806             response.
4807             The <span><strong class="command">rrset-order</strong></span> statement permits
4808             configuration
4809             of the ordering of the records in a multiple record response.
4810             See also the <span><strong class="command">sortlist</strong></span> statement,
4811             <a href="Bv9ARM.ch06.html#the_sortlist_statement" title="The sortlist Statement">the section called &#8220;The <span><strong class="command">sortlist</strong></span> Statement&#8221;</a>.
4812           </p>
4813 <p>
4814             An <span><strong class="command">order_spec</strong></span> is defined as
4815             follows:
4816           </p>
4817 <p>
4818             [<span class="optional">class <em class="replaceable"><code>class_name</code></em></span>]
4819             [<span class="optional">type <em class="replaceable"><code>type_name</code></em></span>]
4820             [<span class="optional">name <em class="replaceable"><code>"domain_name"</code></em></span>]
4821             order <em class="replaceable"><code>ordering</code></em>
4822           </p>
4823 <p>
4824             If no class is specified, the default is <span><strong class="command">ANY</strong></span>.
4825             If no type is specified, the default is <span><strong class="command">ANY</strong></span>.
4826             If no name is specified, the default is "<span><strong class="command">*</strong></span>" (asterisk).
4827           </p>
4828 <p>
4829             The legal values for <span><strong class="command">ordering</strong></span> are:
4830           </p>
4831 <div class="informaltable"><table border="1">
4832 <colgroup>
4833 <col>
4834 <col>
4835 </colgroup>
4836 <tbody>
4837 <tr>
4838 <td>
4839                     <p><span><strong class="command">fixed</strong></span></p>
4840                   </td>
4841 <td>
4842                     <p>
4843                       Records are returned in the order they
4844                       are defined in the zone file.
4845                     </p>
4846                   </td>
4847 </tr>
4848 <tr>
4849 <td>
4850                     <p><span><strong class="command">random</strong></span></p>
4851                   </td>
4852 <td>
4853                     <p>
4854                       Records are returned in some random order.
4855                     </p>
4856                   </td>
4857 </tr>
4858 <tr>
4859 <td>
4860                     <p><span><strong class="command">cyclic</strong></span></p>
4861                   </td>
4862 <td>
4863                     <p>
4864                       Records are returned in a cyclic round-robin order.
4865                     </p>
4866                     <p>
4867                       If <acronym class="acronym">BIND</acronym> is configured with the
4868                       "--enable-fixed-rrset" option at compile time, then
4869                       the initial ordering of the RRset will match the
4870                       one specified in the zone file.
4871                     </p>
4872                   </td>
4873 </tr>
4874 </tbody>
4875 </table></div>
4876 <p>
4877             For example:
4878           </p>
4879 <pre class="programlisting">rrset-order {
4880    class IN type A name "host.example.com" order random;
4881    order cyclic;
4882 };
4883 </pre>
4884 <p>
4885             will cause any responses for type A records in class IN that
4886             have "<code class="literal">host.example.com</code>" as a
4887             suffix, to always be returned
4888             in random order. All other records are returned in cyclic order.
4889           </p>
4890 <p>
4891             If multiple <span><strong class="command">rrset-order</strong></span> statements
4892             appear,
4893             they are not combined &#8212; the last one applies.
4894           </p>
4895 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4896 <h3 class="title">Note</h3>
4897 <p>
4898               In this release of <acronym class="acronym">BIND</acronym> 9, the
4899               <span><strong class="command">rrset-order</strong></span> statement does not support
4900               "fixed" ordering by default.  Fixed ordering can be enabled
4901               at compile time by specifying "--enable-fixed-rrset" on
4902               the "configure" command line.
4903             </p>
4904 </div>
4905 </div>
4906 <div class="sect3" lang="en">
4907 <div class="titlepage"><div><div><h4 class="title">
4908 <a name="tuning"></a>Tuning</h4></div></div></div>
4909 <div class="variablelist"><dl>
4910 <dt><span class="term"><span><strong class="command">lame-ttl</strong></span></span></dt>
4911 <dd>
4912 <p>
4913                   Sets the number of seconds to cache a
4914                   lame server indication. 0 disables caching. (This is
4915                   <span class="bold"><strong>NOT</strong></span> recommended.)
4916                   The default is <code class="literal">600</code> (10 minutes) and the
4917                   maximum value is
4918                   <code class="literal">1800</code> (30 minutes).
4919                 </p>
4920 <p>
4921                   Lame-ttl also controls the amount of time DNSSEC
4922                   validation failures are cached.  There is a minimum
4923                   of 30 seconds applied to bad cache entries if the
4924                   lame-ttl is set to less than 30 seconds.
4925                 </p>
4926 </dd>
4927 <dt><span class="term"><span><strong class="command">max-ncache-ttl</strong></span></span></dt>
4928 <dd><p>
4929                   To reduce network traffic and increase performance,
4930                   the server stores negative answers. <span><strong class="command">max-ncache-ttl</strong></span> is
4931                   used to set a maximum retention time for these answers in
4932                   the server
4933                   in seconds. The default
4934                   <span><strong class="command">max-ncache-ttl</strong></span> is <code class="literal">10800</code> seconds (3 hours).
4935                   <span><strong class="command">max-ncache-ttl</strong></span> cannot exceed
4936                   7 days and will
4937                   be silently truncated to 7 days if set to a greater value.
4938                 </p></dd>
4939 <dt><span class="term"><span><strong class="command">max-cache-ttl</strong></span></span></dt>
4940 <dd><p>
4941                   Sets the maximum time for which the server will
4942                   cache ordinary (positive) answers. The default is
4943                   one week (7 days).
4944                   A value of zero may cause all queries to return
4945                   SERVFAIL, because of lost caches of intermediate
4946                   RRsets (such as NS and glue AAAA/A records) in the
4947                   resolution process.
4948                 </p></dd>
4949 <dt><span class="term"><span><strong class="command">min-roots</strong></span></span></dt>
4950 <dd>
4951 <p>
4952                   The minimum number of root servers that
4953                   is required for a request for the root servers to be
4954                   accepted. The default
4955                   is <strong class="userinput"><code>2</code></strong>.
4956                 </p>
4957 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4958 <h3 class="title">Note</h3>
4959 <p>
4960                     Not implemented in <acronym class="acronym">BIND</acronym> 9.
4961                   </p>
4962 </div>
4963 </dd>
4964 <dt><span class="term"><span><strong class="command">sig-validity-interval</strong></span></span></dt>
4965 <dd>
4966 <p>
4967                   Specifies the number of days into the future when
4968                   DNSSEC signatures automatically generated as a
4969                   result of dynamic updates (<a href="Bv9ARM.ch04.html#dynamic_update" title="Dynamic Update">the section called &#8220;Dynamic Update&#8221;</a>) will expire.  There
4970                   is an optional second field which specifies how
4971                   long before expiry that the signatures will be
4972                   regenerated.  If not specified, the signatures will
4973                   be regenerated at 1/4 of base interval.  The second
4974                   field is specified in days if the base interval is
4975                   greater than 7 days otherwise it is specified in hours.
4976                   The default base interval is <code class="literal">30</code> days
4977                   giving a re-signing interval of 7 1/2 days.  The maximum
4978                   values are 10 years (3660 days).
4979                 </p>
4980 <p>
4981                   The signature inception time is unconditionally
4982                   set to one hour before the current time to allow
4983                   for a limited amount of clock skew.
4984                 </p>
4985 <p>
4986                   The <span><strong class="command">sig-validity-interval</strong></span>
4987                   should be, at least, several multiples of the SOA
4988                   expire interval to allow for reasonable interaction
4989                   between the various timer and expiry dates.
4990                 </p>
4991 </dd>
4992 <dt><span class="term"><span><strong class="command">sig-signing-nodes</strong></span></span></dt>
4993 <dd><p>
4994                   Specify the maximum number of nodes to be
4995                   examined in each quantum when signing a zone with
4996                   a new DNSKEY. The default is
4997                   <code class="literal">100</code>.
4998                 </p></dd>
4999 <dt><span class="term"><span><strong class="command">sig-signing-signatures</strong></span></span></dt>
5000 <dd><p>
5001                   Specify a threshold number of signatures that
5002                   will terminate processing a quantum when signing
5003                   a zone with a new DNSKEY.  The default is
5004                   <code class="literal">10</code>.
5005                 </p></dd>
5006 <dt><span class="term"><span><strong class="command">sig-signing-type</strong></span></span></dt>
5007 <dd>
5008 <p>
5009                   Specify a private RDATA type to be used when generating
5010                   key signing records.  The default is
5011                   <code class="literal">65534</code>.
5012                 </p>
5013 <p>
5014                   It is expected that this parameter may be removed
5015                   in a future version once there is a standard type.
5016                 </p>
5017 </dd>
5018 <dt>
5019 <span class="term"><span><strong class="command">min-refresh-time</strong></span>, </span><span class="term"><span><strong class="command">max-refresh-time</strong></span>, </span><span class="term"><span><strong class="command">min-retry-time</strong></span>, </span><span class="term"><span><strong class="command">max-retry-time</strong></span></span>
5020 </dt>
5021 <dd>
5022 <p>
5023                   These options control the server's behavior on refreshing a
5024                   zone
5025                   (querying for SOA changes) or retrying failed transfers.
5026                   Usually the SOA values for the zone are used, but these
5027                   values
5028                   are set by the master, giving slave server administrators
5029                   little
5030                   control over their contents.
5031                 </p>
5032 <p>
5033                   These options allow the administrator to set a minimum and
5034                   maximum
5035                   refresh and retry time either per-zone, per-view, or
5036                   globally.
5037                   These options are valid for slave and stub zones,
5038                   and clamp the SOA refresh and retry times to the specified
5039                   values.
5040                 </p>
5041 <p>
5042                   The following defaults apply.
5043                   <span><strong class="command">min-refresh-time</strong></span> 300 seconds,
5044                   <span><strong class="command">max-refresh-time</strong></span> 2419200 seconds
5045                   (4 weeks), <span><strong class="command">min-retry-time</strong></span> 500 seconds,
5046                   and <span><strong class="command">max-retry-time</strong></span> 1209600 seconds
5047                   (2 weeks).
5048                 </p>
5049 </dd>
5050 <dt><span class="term"><span><strong class="command">edns-udp-size</strong></span></span></dt>
5051 <dd>
5052 <p>
5053                   Sets the advertised EDNS UDP buffer size in bytes
5054                   to control the size of packets received.
5055                   Valid values are 512 to 4096 (values outside this range
5056                   will be silently adjusted).  The default value
5057                   is 4096.  The usual reason for setting
5058                   <span><strong class="command">edns-udp-size</strong></span> to a non-default
5059                   value is to get UDP answers to pass through broken
5060                   firewalls that block fragmented packets and/or
5061                   block UDP packets that are greater than 512 bytes.
5062                 </p>
5063 <p>
5064                   <span><strong class="command">named</strong></span> will fallback to using 512 bytes
5065                   if it get a series of timeout at the initial value.  512
5066                   bytes is not being offered to encourage sites to fix their
5067                   firewalls.  Small EDNS UDP sizes will result in the
5068                   excessive use of TCP.
5069                 </p>
5070 </dd>
5071 <dt><span class="term"><span><strong class="command">max-udp-size</strong></span></span></dt>
5072 <dd>
5073 <p>
5074                   Sets the maximum EDNS UDP message size
5075                   <span><strong class="command">named</strong></span> will send in bytes.
5076                   Valid values are 512 to 4096 (values outside this
5077                   range will be silently adjusted).  The default
5078                   value is 4096.  The usual reason for setting
5079                   <span><strong class="command">max-udp-size</strong></span> to a non-default
5080                   value is to get UDP answers to pass through broken
5081                   firewalls that block fragmented packets and/or
5082                   block UDP packets that are greater than 512 bytes.
5083                   This is independent of the advertised receive
5084                   buffer (<span><strong class="command">edns-udp-size</strong></span>).
5085                 </p>
5086 <p>
5087                   Setting this to a low value will encourage additional
5088                   TCP traffic to the nameserver.
5089                 </p>
5090 </dd>
5091 <dt><span class="term"><span><strong class="command">masterfile-format</strong></span></span></dt>
5092 <dd><p>Specifies
5093                   the file format of zone files (see
5094                   <a href="Bv9ARM.ch06.html#zonefile_format" title="Additional File Formats">the section called &#8220;Additional File Formats&#8221;</a>).
5095                   The default value is <code class="constant">text</code>, which is the
5096                   standard textual representation.  Files in other formats
5097                   than <code class="constant">text</code> are typically expected
5098                   to be generated by the <span><strong class="command">named-compilezone</strong></span> tool.
5099                   Note that when a zone file in a different format than
5100                   <code class="constant">text</code> is loaded, <span><strong class="command">named</strong></span>
5101                   may omit some of the checks which would be performed for a
5102                   file in the <code class="constant">text</code> format.  In particular,
5103                   <span><strong class="command">check-names</strong></span> checks do not apply
5104                   for the <code class="constant">raw</code> format.  This means
5105                   a zone file in the <code class="constant">raw</code> format
5106                   must be generated with the same check level as that
5107                   specified in the <span><strong class="command">named</strong></span> configuration
5108                   file.  This statement sets the
5109                   <span><strong class="command">masterfile-format</strong></span> for all zones,
5110                   but can be overridden on a per-zone or per-view basis
5111                   by including a <span><strong class="command">masterfile-format</strong></span>
5112                   statement within the <span><strong class="command">zone</strong></span> or
5113                   <span><strong class="command">view</strong></span> block in the configuration
5114                   file.
5115                 </p></dd>
5116 <dt>
5117 <a name="clients-per-query"></a><span class="term"><span><strong class="command">clients-per-query</strong></span>, </span><span class="term"><span><strong class="command">max-clients-per-query</strong></span></span>
5118 </dt>
5119 <dd>
5120 <p>These set the
5121                   initial value (minimum) and maximum number of recursive
5122                   simultaneous clients for any given query
5123                   (&lt;qname,qtype,qclass&gt;) that the server will accept
5124                   before dropping additional clients.  <span><strong class="command">named</strong></span> will attempt to
5125                   self tune this value and changes will be logged.  The
5126                   default values are 10 and 100.
5127                 </p>
5128 <p>
5129                   This value should reflect how many queries come in for
5130                   a given name in the time it takes to resolve that name.
5131                   If the number of queries exceed this value, <span><strong class="command">named</strong></span> will
5132                   assume that it is dealing with a non-responsive zone
5133                   and will drop additional queries.  If it gets a response
5134                   after dropping queries, it will raise the estimate.  The
5135                   estimate will then be lowered in 20 minutes if it has
5136                   remained unchanged.
5137                 </p>
5138 <p>
5139                   If <span><strong class="command">clients-per-query</strong></span> is set to zero,
5140                   then there is no limit on the number of clients per query
5141                   and no queries will be dropped.
5142                 </p>
5143 <p>
5144                   If <span><strong class="command">max-clients-per-query</strong></span> is set to zero,
5145                   then there is no upper bound other than imposed by
5146                   <span><strong class="command">recursive-clients</strong></span>.
5147                 </p>
5148 </dd>
5149 <dt><span class="term"><span><strong class="command">notify-delay</strong></span></span></dt>
5150 <dd>
5151 <p>
5152                   The delay, in seconds, between sending sets of notify
5153                   messages for a zone.  The default is five (5) seconds.
5154                 </p>
5155 <p>
5156                   The overall rate that NOTIFY messages are sent for all
5157                   zones is controlled by <span><strong class="command">serial-query-rate</strong></span>.
5158                 </p>
5159 </dd>
5160 </dl></div>
5161 </div>
5162 <div class="sect3" lang="en">
5163 <div class="titlepage"><div><div><h4 class="title">
5164 <a name="builtin"></a>Built-in server information zones</h4></div></div></div>
5165 <p>
5166             The server provides some helpful diagnostic information
5167             through a number of built-in zones under the
5168             pseudo-top-level-domain <code class="literal">bind</code> in the
5169             <span><strong class="command">CHAOS</strong></span> class.  These zones are part
5170             of a
5171             built-in view (see <a href="Bv9ARM.ch06.html#view_statement_grammar" title="view Statement Grammar">the section called &#8220;<span><strong class="command">view</strong></span> Statement Grammar&#8221;</a>) of
5172             class
5173             <span><strong class="command">CHAOS</strong></span> which is separate from the
5174             default view of
5175             class <span><strong class="command">IN</strong></span>; therefore, any global
5176             server options
5177             such as <span><strong class="command">allow-query</strong></span> do not apply
5178             the these zones.
5179             If you feel the need to disable these zones, use the options
5180             below, or hide the built-in <span><strong class="command">CHAOS</strong></span>
5181             view by
5182             defining an explicit view of class <span><strong class="command">CHAOS</strong></span>
5183             that matches all clients.
5184           </p>
5185 <div class="variablelist"><dl>
5186 <dt><span class="term"><span><strong class="command">version</strong></span></span></dt>
5187 <dd><p>
5188                   The version the server should report
5189                   via a query of the name <code class="literal">version.bind</code>
5190                   with type <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
5191                   The default is the real version number of this server.
5192                   Specifying <span><strong class="command">version none</strong></span>
5193                   disables processing of the queries.
5194                 </p></dd>
5195 <dt><span class="term"><span><strong class="command">hostname</strong></span></span></dt>
5196 <dd><p>
5197                   The hostname the server should report via a query of
5198                   the name <code class="filename">hostname.bind</code>
5199                   with type <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
5200                   This defaults to the hostname of the machine hosting the
5201                   name server as
5202                   found by the gethostname() function.  The primary purpose of such queries
5203                   is to
5204                   identify which of a group of anycast servers is actually
5205                   answering your queries.  Specifying <span><strong class="command">hostname none;</strong></span>
5206                   disables processing of the queries.
5207                 </p></dd>
5208 <dt><span class="term"><span><strong class="command">server-id</strong></span></span></dt>
5209 <dd><p>
5210                   The ID the server should report when receiving a Name
5211                   Server Identifier (NSID) query, or a query of the name
5212                   <code class="filename">ID.SERVER</code> with type
5213                   <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
5214                   The primary purpose of such queries is to
5215                   identify which of a group of anycast servers is actually
5216                   answering your queries.  Specifying <span><strong class="command">server-id none;</strong></span>
5217                   disables processing of the queries.
5218                   Specifying <span><strong class="command">server-id hostname;</strong></span> will cause <span><strong class="command">named</strong></span> to
5219                   use the hostname as found by the gethostname() function.
5220                   The default <span><strong class="command">server-id</strong></span> is <span><strong class="command">none</strong></span>.
5221                 </p></dd>
5222 </dl></div>
5223 </div>
5224 <div class="sect3" lang="en">
5225 <div class="titlepage"><div><div><h4 class="title">
5226 <a name="empty"></a>Built-in Empty Zones</h4></div></div></div>
5227 <p>
5228             Named has some built-in empty zones (SOA and NS records only).
5229             These are for zones that should normally be answered locally
5230             and which queries should not be sent to the Internet's root
5231             servers.  The official servers which cover these namespaces
5232             return NXDOMAIN responses to these queries.  In particular,
5233             these cover the reverse namespaces for addresses from
5234             RFC 1918, RFC 4193, and RFC 5737.  They also include the
5235             reverse namespace for IPv6 local address (locally assigned),
5236             IPv6 link local addresses, the IPv6 loopback address and the
5237             IPv6 unknown address.
5238           </p>
5239 <p>
5240             Named will attempt to determine if a built-in zone already exists
5241             or is active (covered by a forward-only forwarding declaration)
5242             and will not create an empty zone in that case.
5243           </p>
5244 <p>
5245             The current list of empty zones is:
5246             </p>
5247 <div class="itemizedlist"><ul type="disc">
5248 <li>10.IN-ADDR.ARPA</li>
5249 <li>16.172.IN-ADDR.ARPA</li>
5250 <li>17.172.IN-ADDR.ARPA</li>
5251 <li>18.172.IN-ADDR.ARPA</li>
5252 <li>19.172.IN-ADDR.ARPA</li>
5253 <li>20.172.IN-ADDR.ARPA</li>
5254 <li>21.172.IN-ADDR.ARPA</li>
5255 <li>22.172.IN-ADDR.ARPA</li>
5256 <li>23.172.IN-ADDR.ARPA</li>
5257 <li>24.172.IN-ADDR.ARPA</li>
5258 <li>25.172.IN-ADDR.ARPA</li>
5259 <li>26.172.IN-ADDR.ARPA</li>
5260 <li>27.172.IN-ADDR.ARPA</li>
5261 <li>28.172.IN-ADDR.ARPA</li>
5262 <li>29.172.IN-ADDR.ARPA</li>
5263 <li>30.172.IN-ADDR.ARPA</li>
5264 <li>31.172.IN-ADDR.ARPA</li>
5265 <li>168.192.IN-ADDR.ARPA</li>
5266 <li>0.IN-ADDR.ARPA</li>
5267 <li>127.IN-ADDR.ARPA</li>
5268 <li>254.169.IN-ADDR.ARPA</li>
5269 <li>2.0.192.IN-ADDR.ARPA</li>
5270 <li>100.51.198.IN-ADDR.ARPA</li>
5271 <li>113.0.203.IN-ADDR.ARPA</li>
5272 <li>255.255.255.255.IN-ADDR.ARPA</li>
5273 <li>0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA</li>
5274 <li>1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA</li>
5275 <li>8.B.D.0.1.0.0.2.IP6.ARPA</li>
5276 <li>D.F.IP6.ARPA</li>
5277 <li>8.E.F.IP6.ARPA</li>
5278 <li>9.E.F.IP6.ARPA</li>
5279 <li>A.E.F.IP6.ARPA</li>
5280 <li>B.E.F.IP6.ARPA</li>
5281 </ul></div>
5282 <p>
5283           </p>
5284 <p>
5285             Empty zones are settable at the view level and only apply to
5286             views of class IN.  Disabled empty zones are only inherited
5287             from options if there are no disabled empty zones specified
5288             at the view level.  To override the options list of disabled
5289             zones, you can disable the root zone at the view level, for example:
5290 </p>
5291 <pre class="programlisting">
5292             disable-empty-zone ".";
5293 </pre>
5294 <p>
5295           </p>
5296 <p>
5297             If you are using the address ranges covered here, you should
5298             already have reverse zones covering the addresses you use.
5299             In practice this appears to not be the case with many queries
5300             being made to the infrastructure servers for names in these
5301             spaces.  So many in fact that sacrificial servers were needed
5302             to be deployed to channel the query load away from the
5303             infrastructure servers.
5304           </p>
5305 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
5306 <h3 class="title">Note</h3>
5307             The real parent servers for these zones should disable all
5308             empty zone under the parent zone they serve.  For the real
5309             root servers, this is all built-in empty zones.  This will
5310             enable them to return referrals to deeper in the tree.
5311           </div>
5312 <div class="variablelist"><dl>
5313 <dt><span class="term"><span><strong class="command">empty-server</strong></span></span></dt>
5314 <dd><p>
5315                   Specify what server name will appear in the returned
5316                   SOA record for empty zones.  If none is specified, then
5317                   the zone's name will be used.
5318                 </p></dd>
5319 <dt><span class="term"><span><strong class="command">empty-contact</strong></span></span></dt>
5320 <dd><p>
5321                   Specify what contact name will appear in the returned
5322                   SOA record for empty zones.  If none is specified, then
5323                   "." will be used.
5324                 </p></dd>
5325 <dt><span class="term"><span><strong class="command">empty-zones-enable</strong></span></span></dt>
5326 <dd><p>
5327                   Enable or disable all empty zones.  By default, they
5328                   are enabled.
5329                 </p></dd>
5330 <dt><span class="term"><span><strong class="command">disable-empty-zone</strong></span></span></dt>
5331 <dd><p>
5332                   Disable individual empty zones.  By default, none are
5333                   disabled.  This option can be specified multiple times.
5334                 </p></dd>
5335 </dl></div>
5336 </div>
5337 <div class="sect3" lang="en">
5338 <div class="titlepage"><div><div><h4 class="title">
5339 <a name="acache"></a>Additional Section Caching</h4></div></div></div>
5340 <p>
5341             The additional section cache, also called <span><strong class="command">acache</strong></span>,
5342             is an internal cache to improve the response performance of BIND 9.
5343             When additional section caching is enabled, BIND 9 will
5344             cache an internal short-cut to the additional section content for
5345             each answer RR.
5346             Note that <span><strong class="command">acache</strong></span> is an internal caching
5347             mechanism of BIND 9, and is not related to the DNS caching
5348             server function.
5349           </p>
5350 <p>
5351             Additional section caching does not change the
5352             response content (except the RRsets ordering of the additional
5353             section, see below), but can improve the response performance
5354             significantly.
5355             It is particularly effective when BIND 9 acts as an authoritative
5356             server for a zone that has many delegations with many glue RRs.
5357           </p>
5358 <p>
5359             In order to obtain the maximum performance improvement
5360             from additional section caching, setting
5361             <span><strong class="command">additional-from-cache</strong></span>
5362             to <span><strong class="command">no</strong></span> is recommended, since the current
5363             implementation of <span><strong class="command">acache</strong></span>
5364             does not short-cut of additional section information from the
5365             DNS cache data.
5366           </p>
5367 <p>
5368             One obvious disadvantage of <span><strong class="command">acache</strong></span> is
5369             that it requires much more
5370             memory for the internal cached data.
5371             Thus, if the response performance does not matter and memory
5372             consumption is much more critical, the
5373             <span><strong class="command">acache</strong></span> mechanism can be
5374             disabled by setting <span><strong class="command">acache-enable</strong></span> to
5375             <span><strong class="command">no</strong></span>.
5376             It is also possible to specify the upper limit of memory
5377             consumption
5378             for acache by using <span><strong class="command">max-acache-size</strong></span>.
5379           </p>
5380 <p>
5381             Additional section caching also has a minor effect on the
5382             RRset ordering in the additional section.
5383             Without <span><strong class="command">acache</strong></span>,
5384             <span><strong class="command">cyclic</strong></span> order is effective for the additional
5385             section as well as the answer and authority sections.
5386             However, additional section caching fixes the ordering when it
5387             first caches an RRset for the additional section, and the same
5388             ordering will be kept in succeeding responses, regardless of the
5389             setting of <span><strong class="command">rrset-order</strong></span>.
5390             The effect of this should be minor, however, since an
5391             RRset in the additional section
5392             typically only contains a small number of RRs (and in many cases
5393             it only contains a single RR), in which case the
5394             ordering does not matter much.
5395           </p>
5396 <p>
5397             The following is a summary of options related to
5398             <span><strong class="command">acache</strong></span>.
5399           </p>
5400 <div class="variablelist"><dl>
5401 <dt><span class="term"><span><strong class="command">acache-enable</strong></span></span></dt>
5402 <dd><p>
5403                   If <span><strong class="command">yes</strong></span>, additional section caching is
5404                   enabled.  The default value is <span><strong class="command">no</strong></span>.
5405                 </p></dd>
5406 <dt><span class="term"><span><strong class="command">acache-cleaning-interval</strong></span></span></dt>
5407 <dd><p>
5408                   The server will remove stale cache entries, based on an LRU
5409                   based
5410                   algorithm, every <span><strong class="command">acache-cleaning-interval</strong></span> minutes.
5411                   The default is 60 minutes.
5412                   If set to 0, no periodic cleaning will occur.
5413                 </p></dd>
5414 <dt><span class="term"><span><strong class="command">max-acache-size</strong></span></span></dt>
5415 <dd><p>
5416                   The maximum amount of memory in bytes to use for the server's acache.
5417                   When the amount of data in the acache reaches this limit,
5418                   the server
5419                   will clean more aggressively so that the limit is not
5420                   exceeded.
5421                   In a server with multiple views, the limit applies
5422                   separately to the
5423                   acache of each view.
5424                   The default is <code class="literal">16M</code>.
5425                 </p></dd>
5426 </dl></div>
5427 </div>
5428 <div class="sect3" lang="en">
5429 <div class="titlepage"><div><div><h4 class="title">
5430 <a name="id2588152"></a>Content Filtering</h4></div></div></div>
5431 <p>
5432             <acronym class="acronym">BIND</acronym> 9 provides the ability to filter
5433             out DNS responses from external DNS servers containing
5434             certain types of data in the answer section.
5435             Specifically, it can reject address (A or AAAA) records if
5436             the corresponding IPv4 or IPv6 addresses match the given
5437             <code class="varname">address_match_list</code> of the
5438             <span><strong class="command">deny-answer-addresses</strong></span> option.
5439             It can also reject CNAME or DNAME records if the "alias"
5440             name (i.e., the CNAME alias or the substituted query name
5441             due to DNAME) matches the
5442             given <code class="varname">namelist</code> of the
5443             <span><strong class="command">deny-answer-aliases</strong></span> option, where
5444             "match" means the alias name is a subdomain of one of
5445             the <code class="varname">name_list</code> elements.
5446             If the optional <code class="varname">namelist</code> is specified
5447             with <span><strong class="command">except-from</strong></span>, records whose query name
5448             matches the list will be accepted regardless of the filter
5449             setting.
5450             Likewise, if the alias name is a subdomain of the
5451             corresponding zone, the <span><strong class="command">deny-answer-aliases</strong></span>
5452             filter will not apply;
5453             for example, even if "example.com" is specified for
5454             <span><strong class="command">deny-answer-aliases</strong></span>,
5455           </p>
5456 <pre class="programlisting">www.example.com. CNAME xxx.example.com.</pre>
5457 <p>
5458             returned by an "example.com" server will be accepted.
5459           </p>
5460 <p>
5461             In the <code class="varname">address_match_list</code> of the
5462             <span><strong class="command">deny-answer-addresses</strong></span> option, only
5463             <code class="varname">ip_addr</code>
5464             and <code class="varname">ip_prefix</code>
5465             are meaningful;
5466             any <code class="varname">key_id</code> will be silently ignored.
5467           </p>
5468 <p>
5469             If a response message is rejected due to the filtering,
5470             the entire message is discarded without being cached, and
5471             a SERVFAIL error will be returned to the client.
5472           </p>
5473 <p>
5474             This filtering is intended to prevent "DNS rebinding attacks," in
5475             which an attacker, in response to a query for a domain name the
5476             attacker controls, returns an IP address within your own network or
5477             an alias name within your own domain.
5478             A naive web browser or script could then serve as an
5479             unintended proxy, allowing the attacker
5480             to get access to an internal node of your local network
5481             that couldn't be externally accessed otherwise.
5482             See the paper available at
5483             <a href="" target="_top">
5484             http://portal.acm.org/citation.cfm?id=1315245.1315298
5485             </a>
5486             for more details about the attacks.
5487           </p>
5488 <p>
5489             For example, if you own a domain named "example.net" and
5490             your internal network uses an IPv4 prefix 192.0.2.0/24,
5491             you might specify the following rules:
5492           </p>
5493 <pre class="programlisting">deny-answer-addresses { 192.0.2.0/24; } except-from { "example.net"; };
5494 deny-answer-aliases { "example.net"; };
5495 </pre>
5496 <p>
5497             If an external attacker lets a web browser in your local
5498             network look up an IPv4 address of "attacker.example.com",
5499             the attacker's DNS server would return a response like this:
5500           </p>
5501 <pre class="programlisting">attacker.example.com. A 192.0.2.1</pre>
5502 <p>
5503             in the answer section.
5504             Since the rdata of this record (the IPv4 address) matches
5505             the specified prefix 192.0.2.0/24, this response will be
5506             ignored.
5507           </p>
5508 <p>
5509             On the other hand, if the browser looks up a legitimate
5510             internal web server "www.example.net" and the
5511             following response is returned to
5512             the <acronym class="acronym">BIND</acronym> 9 server
5513           </p>
5514 <pre class="programlisting">www.example.net. A 192.0.2.2</pre>
5515 <p>
5516             it will be accepted since the owner name "www.example.net"
5517             matches the <span><strong class="command">except-from</strong></span> element,
5518             "example.net".
5519           </p>
5520 <p>
5521             Note that this is not really an attack on the DNS per se.
5522             In fact, there is nothing wrong for an "external" name to
5523             be mapped to your "internal" IP address or domain name
5524             from the DNS point of view.
5525             It might actually be provided for a legitimate purpose,
5526             such as for debugging.
5527             As long as the mapping is provided by the correct owner,
5528             it is not possible or does not make sense to detect
5529             whether the intent of the mapping is legitimate or not
5530             within the DNS.
5531             The "rebinding" attack must primarily be protected at the
5532             application that uses the DNS.
5533             For a large site, however, it may be difficult to protect
5534             all possible applications at once.
5535             This filtering feature is provided only to help such an
5536             operational environment;
5537             it is generally discouraged to turn it on unless you are
5538             very sure you have no other choice and the attack is a
5539             real threat for your applications.
5540           </p>
5541 <p>
5542             Care should be particularly taken if you want to use this
5543             option for addresses within 127.0.0.0/8.
5544             These addresses are obviously "internal", but many
5545             applications conventionally rely on a DNS mapping from
5546             some name to such an address.
5547             Filtering out DNS records containing this address
5548             spuriously can break such applications.
5549           </p>
5550 </div>
5551 <div class="sect3" lang="en">
5552 <div class="titlepage"><div><div><h4 class="title">
5553 <a name="id2588343"></a>Response Policy Zone (RPZ) Rewriting</h4></div></div></div>
5554 <p>
5555             <acronym class="acronym">BIND</acronym> 9 includes a limited
5556             mechanism to modify DNS responses for requests
5557             analogous to email anti-spam DNS blacklists.
5558             Responses can be changed to deny the existence of domains(NXDOMAIN),
5559             deny the existence of IP addresses for domains (NODATA),
5560             or contain other IP addresses or data.
5561           </p>
5562 <p>
5563             Response policy zones are named in the
5564             <span><strong class="command">response-policy</strong></span> option for the view or among the
5565             global options if there is no response-policy option for the view.
5566             RPZs are ordinary DNS zones containing RRsets
5567             that can be queried normally if allowed.
5568             It is usually best to restrict those queries with something like
5569             <span><strong class="command">allow-query { localhost; };</strong></span>.
5570           </p>
5571 <p>
5572             Four policy triggers are encoded in RPZ records, QNAME, IP, NSIP,
5573             and NSDNAME.
5574             QNAME RPZ records triggered by query names of requests and targets
5575             of CNAME records resolved to generate the response.
5576             The owner name of a QNAME RPZ record is the query name relativized
5577             to the RPZ.
5578           </p>
5579 <p>
5580             The second kind of RPZ trigger is an IP address in an A and AAAA
5581             record in the ANSWER section of a response.
5582             IP address triggers are encoded in records that have owner names
5583             that are subdomains of <strong class="userinput"><code>rpz-ip</code></strong> relativized
5584             to the RPZ origin name and encode an IP address or address block.
5585             IPv4 trigger addresses are represented as
5586             <strong class="userinput"><code>prefixlength.B4.B3.B2.B1.rpz-ip</code></strong>.
5587             The prefix length must be between 1 and 32.
5588             All four bytes, B4, B3, B2, and B1, must be present.
5589             B4 is the decimal value of the least significant byte of the
5590             IPv4 address as in IN-ADDR.ARPA.
5591             IPv6 addresses are encoded in a format similar to the standard
5592             IPv6 text representation,
5593             <strong class="userinput"><code>prefixlength.W8.W7.W6.W5.W4.W3.W2.W1.rpz-ip</code></strong>.
5594             Each of W8,...,W1 is a one to four digit hexadecimal number
5595             representing 16 bits of the IPv6 address as in the standard text
5596             representation of IPv6 addresses, but reversed as in IN-ADDR.ARPA.
5597             All 8 words must be present except when consecutive
5598             zero words are replaced with <strong class="userinput"><code>.zz.</code></strong>
5599             analogous to double colons (::) in standard IPv6 text encodings.
5600             The prefix length must be between 1 and 128.
5601           </p>
5602 <p>
5603             NSDNAME triggers match names of authoritative servers
5604             for the query name, a parent of the query name, a CNAME for
5605             query name, or a parent of a CNAME.
5606             They are encoded as subdomains of
5607             <strong class="userinput"><code>rpz-nsdomain</code></strong> relativized
5608             to the RPZ origin name.
5609           </p>
5610 <p>
5611             NSIP triggers match IP addresses in A and
5612             AAAA RRsets for domains that can be checked against NSDNAME
5613             policy records.
5614             NSIP triggers are encoded like IP triggers except as subdomains of
5615             <strong class="userinput"><code>rpz-nsip</code></strong>.
5616           </p>
5617 <p>
5618             The query response is checked against all RPZs, so
5619             two or more policy records can be triggered by a response.
5620             Because DNS responses can be rewritten according to at most one
5621             policy record, a single record encoding an action (other than
5622             <span><strong class="command">DISABLED</strong></span> actions) must be chosen.
5623             Triggers or the records that encode them are chosen in
5624             the following order:
5625             </p>
5626 <div class="itemizedlist"><ul type="disc">
5627 <li>Choose the triggered record in the zone that appears
5628                 first in the response-policy option.
5629               </li>
5630 <li>Prefer QNAME to IP to NSDNAME to NSIP triggers
5631                 in a single zone.
5632               </li>
5633 <li>Among NSDNAME triggers, prefer the
5634                 trigger that matches the smallest name under the DNSSEC ordering.
5635               </li>
5636 <li>Among IP or NSIP triggers, prefer the trigger
5637                 with the longest prefix.
5638               </li>
5639 <li>Among triggers with the same prefex length,
5640                 prefer the IP or NSIP trigger that matches
5641                 the smallest IP address.
5642               </li>
5643 </ul></div>
5644 <p>
5645           </p>
5646 <p>
5647             When the processing of a response is restarted to resolve
5648             DNAME or CNAME records and a policy record set has
5649             not been triggered,
5650             all RPZs are again consulted for the DNAME or CNAME names
5651             and addresses.
5652           </p>
5653 <p>
5654             Authority verification issues and variations in authority data
5655             can cause inconsistent results for NSIP and NSDNAME policy records.
5656             Glue NS records often differ from authoritative NS records.
5657             So they are available
5658             only when <acronym class="acronym">BIND</acronym> is built with the
5659             <strong class="userinput"><code>--enable-rpz-nsip</code></strong> or
5660             <strong class="userinput"><code>--enable-rpz-nsdname</code></strong> options
5661             on the "configure" command line.
5662           </p>
5663 <p>
5664             RPZ record sets are sets of any types of DNS record except
5665             DNAME or DNSSEC that encode actions or responses to queries.
5666             </p>
5667 <div class="itemizedlist"><ul type="disc">
5668 <li>The <span><strong class="command">NXDOMAIN</strong></span> response is encoded
5669                 by a CNAME whose target is the root domain (.)
5670               </li>
5671 <li>A CNAME whose target is the wildcard top-level
5672                 domain (*.) specifies the <span><strong class="command">NODATA</strong></span> action,
5673                 which rewrites the response to NODATA or ANCOUNT=1.
5674               </li>
5675 <li>The <span><strong class="command">Local Data</strong></span> action is
5676                 represented by a set ordinary DNS records that are used
5677                 to answer queries.  Queries for record types not the
5678                 set are answered with NODATA.
5679
5680                 A special form of local data is a CNAME whose target is a
5681                 wildcard such as *.example.com.
5682                 It is used as if were an ordinary CNAME after the astrisk (*)
5683                 has been replaced with the query name.
5684                 The purpose for this special form is query logging in the
5685                 walled garden's authority DNS server.
5686               </li>
5687 <li>The <span><strong class="command">PASSTHRU</strong></span> policy is specified
5688                 by a CNAME whose target is <span><strong class="command">rpz_passthru.</strong></span>
5689                 It causes the response to not be rewritten
5690                 and is most often used to "poke holes" in policies for
5691                 CIDR blocks.
5692                 (A CNAME whose target is the variable part of its owner name
5693                 is an obsolete specification of the PASSTHRU policy.)
5694               </li>
5695 </ul></div>
5696 <p>
5697           </p>
5698 <p>
5699             The actions specified in an RPZ can be overridden with a
5700             <span><strong class="command">policy</strong></span> clause in the
5701             <span><strong class="command">response-policy</strong></span> option.
5702             An organization using an RPZ provided by another organization might
5703             use this mechanism to redirect domains to its own walled garden.
5704             </p>
5705 <div class="itemizedlist"><ul type="disc">
5706 <li>
5707 <span><strong class="command">GIVEN</strong></span> says "do not override but
5708                 perform the action specified in the zone."
5709               </li>
5710 <li>
5711 <span><strong class="command">DISABLED</strong></span> causes policy records to do
5712                 nothing but log what they might have done.
5713                 The response to the DNS query will be written according to
5714                 any triggered policy records that are not disabled.
5715                 Disabled policy zones should appear first,
5716                 because they will often not be logged
5717                 if a higher precedence trigger is found first.
5718               </li>
5719 <li>
5720 <span><strong class="command">PASSTHRU</strong></span> causes all policy records
5721                 to act as if they were CNAME records with targets the variable
5722                 part of their owner name.  They protect the response from
5723                 being changed.
5724               </li>
5725 <li>
5726 <span><strong class="command">NXDOMAIN</strong></span> causes all RPZ records
5727                 to specify NXDOMAIN policies.
5728               </li>
5729 <li>
5730 <span><strong class="command">NODATA</strong></span> overrides with the
5731                 NODATA policy
5732               </li>
5733 <li>
5734 <span><strong class="command">CNAME domain</strong></span> causes all RPZ
5735                 policy records to act as if they were "cname domain" records.
5736               </li>
5737 </ul></div>
5738 <p>
5739           </p>
5740 <p>
5741             By default, the actions encoded in an RPZ are applied
5742             only to queries that ask for recursion (RD=1).
5743             That default can be changed for a single RPZ or all RPZs in a view
5744             with a <span><strong class="command">recursive-only no</strong></span> clause.
5745             This feature is useful for serving the same zone files
5746             both inside and outside an RFC 1918 cloud and using RPZ to
5747             delete answers that would otherwise contain RFC 1918 values
5748             on the externally visible name server or view.
5749           </p>
5750 <p>
5751             Also by default, RPZ actions are applied only to DNS requests that
5752             either do not request DNSSEC metadata (DO=0) or when no DNSSEC
5753             records are available for request name in the original zone (not
5754             the response policy zone).
5755             This default can be changed for all RPZs in a view with a
5756             <span><strong class="command">break-dnssec yes</strong></span> clause.
5757             In that case, RPZ actions are applied regardless of DNSSEC.
5758             The name of the clause option reflects the fact that results
5759             rewritten by RPZ actions cannot verify.
5760           </p>
5761 <p>
5762             The TTL of a record modified by RPZ policies is set from the
5763             TTL of the relevant record in policy zone.  It is then limited
5764             to a maximum value.
5765             The <span><strong class="command">max-policy-ttl</strong></span> clause changes that
5766             maximum from its default of 5.
5767           </p>
5768 <p>
5769             For example, you might use this option statement
5770           </p>
5771 <pre class="programlisting">    response-policy { zone "badlist"; };</pre>
5772 <p>
5773             and this zone statement
5774           </p>
5775 <pre class="programlisting">    zone "badlist" {type master; file "master/badlist"; allow-query {none;}; };</pre>
5776 <p>
5777             with this zone file
5778           </p>
5779 <pre class="programlisting">$TTL 1H
5780 @                       SOA LOCALHOST. named-mgr.example.com (1 1h 15m 30d 2h)
5781                         NS  LOCALHOST.
5782
5783 ; QNAME policy records.  There are no periods (.) after the owner names.
5784 nxdomain.domain.com     CNAME   .               ; NXDOMAIN policy
5785 nodata.domain.com       CNAME   *.              ; NODATA policy
5786 bad.domain.com          A       10.0.0.1        ; redirect to a walled garden
5787                         AAAA    2001:2::1
5788
5789 ; do not rewrite (PASSTHRU) OK.DOMAIN.COM
5790 ok.domain.com           CNAME   rpz-passthru.
5791
5792 bzone.domain.com        CNAME   garden.example.com.
5793
5794 ; redirect x.bzone.domain.com to x.bzone.domain.com.garden.example.com
5795 *.bzone.domain.com      CNAME   *.garden.example.com.
5796
5797
5798 ; IP policy records that rewrite all answers for 127/8 except 127.0.0.1
5799 8.0.0.0.127.rpz-ip      CNAME   .
5800 32.1.0.0.127.rpz-ip     CNAME   rpz-passthru.
5801
5802 ; NSDNAME and NSIP policy records
5803 ns.domain.com.rpz-nsdname   CNAME   .
5804 48.zz.2.2001.rpz-nsip       CNAME   .
5805 </pre>
5806 </div>
5807 </div>
5808 <div class="sect2" lang="en">
5809 <div class="titlepage"><div><div><h3 class="title">
5810 <a name="server_statement_grammar"></a><span><strong class="command">server</strong></span> Statement Grammar</h3></div></div></div>
5811 <pre class="programlisting"><span><strong class="command">server</strong></span> <em class="replaceable"><code>ip_addr[/prefixlen]</code></em> {
5812     [<span class="optional"> bogus <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5813     [<span class="optional"> provide-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5814     [<span class="optional"> request-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5815     [<span class="optional"> edns <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5816     [<span class="optional"> edns-udp-size <em class="replaceable"><code>number</code></em> ; </span>]
5817     [<span class="optional"> max-udp-size <em class="replaceable"><code>number</code></em> ; </span>]
5818     [<span class="optional"> transfers <em class="replaceable"><code>number</code></em> ; </span>]
5819     [<span class="optional"> transfer-format <em class="replaceable"><code>( one-answer | many-answers )</code></em> ; ]</span>]
5820     [<span class="optional"> keys <em class="replaceable"><code>{ string ; [<span class="optional"> string ; [<span class="optional">...</span>]</span>] }</code></em> ; </span>]
5821     [<span class="optional"> transfer-source (<em class="replaceable"><code>ip4_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
5822     [<span class="optional"> transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
5823     [<span class="optional"> notify-source (<em class="replaceable"><code>ip4_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
5824     [<span class="optional"> notify-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
5825     [<span class="optional"> query-source [<span class="optional"> address ( <em class="replaceable"><code>ip_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]
5826                   [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]; </span>]
5827     [<span class="optional"> query-source-v6 [<span class="optional"> address ( <em class="replaceable"><code>ip_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]
5828                      [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]; </span>]
5829     [<span class="optional"> use-queryport-pool <em class="replaceable"><code>yes_or_no</code></em>; </span>]
5830     [<span class="optional"> queryport-pool-ports <em class="replaceable"><code>number</code></em>; </span>]
5831     [<span class="optional"> queryport-pool-updateinterval <em class="replaceable"><code>number</code></em>; </span>]
5832 };
5833 </pre>
5834 </div>
5835 <div class="sect2" lang="en">
5836 <div class="titlepage"><div><div><h3 class="title">
5837 <a name="server_statement_definition_and_usage"></a><span><strong class="command">server</strong></span> Statement Definition and
5838             Usage</h3></div></div></div>
5839 <p>
5840             The <span><strong class="command">server</strong></span> statement defines
5841             characteristics
5842             to be associated with a remote name server.  If a prefix length is
5843             specified, then a range of servers is covered.  Only the most
5844             specific
5845             server clause applies regardless of the order in
5846             <code class="filename">named.conf</code>.
5847           </p>
5848 <p>
5849             The <span><strong class="command">server</strong></span> statement can occur at
5850             the top level of the
5851             configuration file or inside a <span><strong class="command">view</strong></span>
5852             statement.
5853             If a <span><strong class="command">view</strong></span> statement contains
5854             one or more <span><strong class="command">server</strong></span> statements, only
5855             those
5856             apply to the view and any top-level ones are ignored.
5857             If a view contains no <span><strong class="command">server</strong></span>
5858             statements,
5859             any top-level <span><strong class="command">server</strong></span> statements are
5860             used as
5861             defaults.
5862           </p>
5863 <p>
5864             If you discover that a remote server is giving out bad data,
5865             marking it as bogus will prevent further queries to it. The
5866             default
5867             value of <span><strong class="command">bogus</strong></span> is <span><strong class="command">no</strong></span>.
5868           </p>
5869 <p>
5870             The <span><strong class="command">provide-ixfr</strong></span> clause determines
5871             whether
5872             the local server, acting as master, will respond with an
5873             incremental
5874             zone transfer when the given remote server, a slave, requests it.
5875             If set to <span><strong class="command">yes</strong></span>, incremental transfer
5876             will be provided
5877             whenever possible. If set to <span><strong class="command">no</strong></span>,
5878             all transfers
5879             to the remote server will be non-incremental. If not set, the
5880             value
5881             of the <span><strong class="command">provide-ixfr</strong></span> option in the
5882             view or
5883             global options block is used as a default.
5884           </p>
5885 <p>
5886             The <span><strong class="command">request-ixfr</strong></span> clause determines
5887             whether
5888             the local server, acting as a slave, will request incremental zone
5889             transfers from the given remote server, a master. If not set, the
5890             value of the <span><strong class="command">request-ixfr</strong></span> option in
5891             the view or
5892             global options block is used as a default.
5893           </p>
5894 <p>
5895             IXFR requests to servers that do not support IXFR will
5896             automatically
5897             fall back to AXFR.  Therefore, there is no need to manually list
5898             which servers support IXFR and which ones do not; the global
5899             default
5900             of <span><strong class="command">yes</strong></span> should always work.
5901             The purpose of the <span><strong class="command">provide-ixfr</strong></span> and
5902             <span><strong class="command">request-ixfr</strong></span> clauses is
5903             to make it possible to disable the use of IXFR even when both
5904             master
5905             and slave claim to support it, for example if one of the servers
5906             is buggy and crashes or corrupts data when IXFR is used.
5907           </p>
5908 <p>
5909             The <span><strong class="command">edns</strong></span> clause determines whether
5910             the local server will attempt to use EDNS when communicating
5911             with the remote server.  The default is <span><strong class="command">yes</strong></span>.
5912           </p>
5913 <p>
5914             The <span><strong class="command">edns-udp-size</strong></span> option sets the EDNS UDP size
5915             that is advertised by <span><strong class="command">named</strong></span> when querying the remote server.
5916             Valid values are 512 to 4096 bytes (values outside this range will be
5917             silently adjusted).  This option is useful when you wish to
5918             advertises a different value to this server than the value you
5919             advertise globally, for example, when there is a firewall at the
5920             remote site that is blocking large replies.
5921           </p>
5922 <p>
5923             The <span><strong class="command">max-udp-size</strong></span> option sets the
5924             maximum EDNS UDP message size <span><strong class="command">named</strong></span> will send.  Valid
5925             values are 512 to 4096 bytes (values outside this range will
5926             be silently adjusted).  This option is useful when you
5927             know that there is a firewall that is blocking large
5928             replies from <span><strong class="command">named</strong></span>.
5929           </p>
5930 <p>
5931             The server supports two zone transfer methods. The first, <span><strong class="command">one-answer</strong></span>,
5932             uses one DNS message per resource record transferred. <span><strong class="command">many-answers</strong></span> packs
5933             as many resource records as possible into a message. <span><strong class="command">many-answers</strong></span> is
5934             more efficient, but is only known to be understood by <acronym class="acronym">BIND</acronym> 9, <acronym class="acronym">BIND</acronym>
5935             8.x, and patched versions of <acronym class="acronym">BIND</acronym>
5936             4.9.5. You can specify which method
5937             to use for a server with the <span><strong class="command">transfer-format</strong></span> option.
5938             If <span><strong class="command">transfer-format</strong></span> is not
5939             specified, the <span><strong class="command">transfer-format</strong></span>
5940             specified
5941             by the <span><strong class="command">options</strong></span> statement will be
5942             used.
5943           </p>
5944 <p><span><strong class="command">transfers</strong></span>
5945             is used to limit the number of concurrent inbound zone
5946             transfers from the specified server. If no
5947             <span><strong class="command">transfers</strong></span> clause is specified, the
5948             limit is set according to the
5949             <span><strong class="command">transfers-per-ns</strong></span> option.
5950           </p>
5951 <p>
5952             The <span><strong class="command">keys</strong></span> clause identifies a
5953             <span><strong class="command">key_id</strong></span> defined by the <span><strong class="command">key</strong></span> statement,
5954             to be used for transaction security (TSIG, <a href="Bv9ARM.ch04.html#tsig" title="TSIG">the section called &#8220;TSIG&#8221;</a>)
5955             when talking to the remote server.
5956             When a request is sent to the remote server, a request signature
5957             will be generated using the key specified here and appended to the
5958             message. A request originating from the remote server is not
5959             required
5960             to be signed by this key.
5961           </p>
5962 <p>
5963             Although the grammar of the <span><strong class="command">keys</strong></span>
5964             clause
5965             allows for multiple keys, only a single key per server is
5966             currently
5967             supported.
5968           </p>
5969 <p>
5970             The <span><strong class="command">transfer-source</strong></span> and
5971             <span><strong class="command">transfer-source-v6</strong></span> clauses specify
5972             the IPv4 and IPv6 source
5973             address to be used for zone transfer with the remote server,
5974             respectively.
5975             For an IPv4 remote server, only <span><strong class="command">transfer-source</strong></span> can
5976             be specified.
5977             Similarly, for an IPv6 remote server, only
5978             <span><strong class="command">transfer-source-v6</strong></span> can be
5979             specified.
5980             For more details, see the description of
5981             <span><strong class="command">transfer-source</strong></span> and
5982             <span><strong class="command">transfer-source-v6</strong></span> in
5983             <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
5984           </p>
5985 <p>
5986             The <span><strong class="command">notify-source</strong></span> and
5987             <span><strong class="command">notify-source-v6</strong></span> clauses specify the
5988             IPv4 and IPv6 source address to be used for notify
5989             messages sent to remote servers, respectively.  For an
5990             IPv4 remote server, only <span><strong class="command">notify-source</strong></span>
5991             can be specified.  Similarly, for an IPv6 remote server,
5992             only <span><strong class="command">notify-source-v6</strong></span> can be specified.
5993           </p>
5994 <p>
5995             The <span><strong class="command">query-source</strong></span> and
5996             <span><strong class="command">query-source-v6</strong></span> clauses specify the
5997             IPv4 and IPv6 source address to be used for queries
5998             sent to remote servers, respectively.  For an IPv4
5999             remote server, only <span><strong class="command">query-source</strong></span> can
6000             be specified.  Similarly, for an IPv6 remote server,
6001             only <span><strong class="command">query-source-v6</strong></span> can be specified.
6002           </p>
6003 </div>
6004 <div class="sect2" lang="en">
6005 <div class="titlepage"><div><div><h3 class="title">
6006 <a name="statschannels"></a><span><strong class="command">statistics-channels</strong></span> Statement Grammar</h3></div></div></div>
6007 <pre class="programlisting"><span><strong class="command">statistics-channels</strong></span> {
6008    [ inet ( ip_addr | * ) [ port ip_port ]
6009    [ allow { <em class="replaceable"><code> address_match_list </code></em> } ]; ]
6010    [ inet ...; ]
6011 };
6012 </pre>
6013 </div>
6014 <div class="sect2" lang="en">
6015 <div class="titlepage"><div><div><h3 class="title">
6016 <a name="id2589534"></a><span><strong class="command">statistics-channels</strong></span> Statement Definition and
6017             Usage</h3></div></div></div>
6018 <p>
6019           The <span><strong class="command">statistics-channels</strong></span> statement
6020           declares communication channels to be used by system
6021           administrators to get access to statistics information of
6022           the name server.
6023         </p>
6024 <p>
6025           This statement intends to be flexible to support multiple
6026           communication protocols in the future, but currently only
6027           HTTP access is supported.
6028           It requires that BIND 9 be compiled with libxml2;
6029           the <span><strong class="command">statistics-channels</strong></span> statement is
6030           still accepted even if it is built without the library,
6031           but any HTTP access will fail with an error.
6032         </p>
6033 <p>
6034           An <span><strong class="command">inet</strong></span> control channel is a TCP socket
6035           listening at the specified <span><strong class="command">ip_port</strong></span> on the
6036           specified <span><strong class="command">ip_addr</strong></span>, which can be an IPv4 or IPv6
6037           address.  An <span><strong class="command">ip_addr</strong></span> of <code class="literal">*</code> (asterisk) is
6038           interpreted as the IPv4 wildcard address; connections will be
6039           accepted on any of the system's IPv4 addresses.
6040           To listen on the IPv6 wildcard address,
6041           use an <span><strong class="command">ip_addr</strong></span> of <code class="literal">::</code>.
6042         </p>
6043 <p>
6044           If no port is specified, port 80 is used for HTTP channels.
6045           The asterisk "<code class="literal">*</code>" cannot be used for
6046           <span><strong class="command">ip_port</strong></span>.
6047         </p>
6048 <p>
6049           The attempt of opening a statistics channel is
6050           restricted by the optional <span><strong class="command">allow</strong></span> clause.
6051           Connections to the statistics channel are permitted based on the
6052           <span><strong class="command">address_match_list</strong></span>.
6053           If no <span><strong class="command">allow</strong></span> clause is present,
6054           <span><strong class="command">named</strong></span> accepts connection
6055           attempts from any address; since the statistics may
6056           contain sensitive internal information, it is highly
6057           recommended to restrict the source of connection requests
6058           appropriately.
6059         </p>
6060 <p>
6061           If no <span><strong class="command">statistics-channels</strong></span> statement is present,
6062           <span><strong class="command">named</strong></span> will not open any communication channels.
6063         </p>
6064 </div>
6065 <div class="sect2" lang="en">
6066 <div class="titlepage"><div><div><h3 class="title">
6067 <a name="trusted-keys"></a><span><strong class="command">trusted-keys</strong></span> Statement Grammar</h3></div></div></div>
6068 <pre class="programlisting"><span><strong class="command">trusted-keys</strong></span> {
6069     <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>string</code></em> ;
6070     [<span class="optional"> <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>string</code></em> ; [<span class="optional">...</span>]</span>]
6071 };
6072 </pre>
6073 </div>
6074 <div class="sect2" lang="en">
6075 <div class="titlepage"><div><div><h3 class="title">
6076 <a name="id2589742"></a><span><strong class="command">trusted-keys</strong></span> Statement Definition
6077             and Usage</h3></div></div></div>
6078 <p>
6079             The <span><strong class="command">trusted-keys</strong></span> statement defines
6080             DNSSEC security roots. DNSSEC is described in <a href="Bv9ARM.ch04.html#DNSSEC" title="DNSSEC">the section called &#8220;DNSSEC&#8221;</a>. A security root is defined when the
6081             public key for a non-authoritative zone is known, but
6082             cannot be securely obtained through DNS, either because
6083             it is the DNS root zone or because its parent zone is
6084             unsigned.  Once a key has been configured as a trusted
6085             key, it is treated as if it had been validated and
6086             proven secure. The resolver attempts DNSSEC validation
6087             on all DNS data in subdomains of a security root.
6088           </p>
6089 <p>
6090             All keys (and corresponding zones) listed in
6091             <span><strong class="command">trusted-keys</strong></span> are deemed to exist regardless
6092             of what parent zones say.  Similarly for all keys listed in
6093             <span><strong class="command">trusted-keys</strong></span> only those keys are
6094             used to validate the DNSKEY RRset.  The parent's DS RRset
6095             will not be used.
6096           </p>
6097 <p>
6098             The <span><strong class="command">trusted-keys</strong></span> statement can contain
6099             multiple key entries, each consisting of the key's
6100             domain name, flags, protocol, algorithm, and the Base-64
6101             representation of the key data.
6102             Spaces, tabs, newlines and carriage returns are ignored
6103             in the key data, so the configuration may be split up into
6104             multiple lines.
6105           </p>
6106 <p>
6107             <span><strong class="command">trusted-keys</strong></span> may be set at the top level
6108             of <code class="filename">named.conf</code> or within a view.  If it is
6109             set in both places, they are additive: keys defined at the top
6110             level are inherited by all views, but keys defined in a view
6111             are only used within that view.
6112           </p>
6113 </div>
6114 <div class="sect2" lang="en">
6115 <div class="titlepage"><div><div><h3 class="title">
6116 <a name="id2589858"></a><span><strong class="command">managed-keys</strong></span> Statement Grammar</h3></div></div></div>
6117 <pre class="programlisting"><span><strong class="command">managed-keys</strong></span> {
6118     <em class="replaceable"><code>string</code></em> initial-key <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>string</code></em> ;
6119     [<span class="optional"> <em class="replaceable"><code>string</code></em> initial-key <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>string</code></em> ; [<span class="optional">...</span>]</span>]
6120 };
6121 </pre>
6122 </div>
6123 <div class="sect2" lang="en">
6124 <div class="titlepage"><div><div><h3 class="title">
6125 <a name="managed-keys"></a><span><strong class="command">managed-keys</strong></span> Statement Definition
6126             and Usage</h3></div></div></div>
6127 <p>
6128             The <span><strong class="command">managed-keys</strong></span> statement, like 
6129             <span><strong class="command">trusted-keys</strong></span>, defines DNSSEC
6130             security roots.  The difference is that
6131             <span><strong class="command">managed-keys</strong></span> can be kept up to date
6132             automatically, without intervention from the resolver
6133             operator.
6134           </p>
6135 <p>
6136             Suppose, for example, that a zone's key-signing
6137             key was compromised, and the zone owner had to revoke and
6138             replace the key.  A resolver which had the old key in a
6139             <span><strong class="command">trusted-keys</strong></span> statement would be
6140             unable to validate this zone any longer; it would
6141             reply with a SERVFAIL response code.  This would
6142             continue until the resolver operator had updated the
6143             <span><strong class="command">trusted-keys</strong></span> statement with the new key.
6144           </p>
6145 <p>
6146             If, however, the zone were listed in a
6147             <span><strong class="command">managed-keys</strong></span> statement instead, then the
6148             zone owner could add a "stand-by" key to the zone in advance.
6149             <span><strong class="command">named</strong></span> would store the stand-by key, and
6150             when the original key was revoked, <span><strong class="command">named</strong></span>
6151             would be able to transition smoothly to the new key.  It would
6152             also recognize that the old key had been revoked, and cease
6153             using that key to validate answers, minimizing the damage that
6154             the compromised key could do.
6155           </p>
6156 <p>
6157             A <span><strong class="command">managed-keys</strong></span> statement contains a list of
6158             the keys to be managed, along with information about how the
6159             keys are to be initialized for the first time.  The only
6160             initialization method currently supported (as of
6161             <acronym class="acronym">BIND</acronym> 9.7.0) is <code class="literal">initial-key</code>.
6162             This means the <span><strong class="command">managed-keys</strong></span> statement must
6163             contain a copy of the initializing key.  (Future releases may
6164             allow keys to be initialized by other methods, eliminating this
6165             requirement.)
6166           </p>
6167 <p>
6168             Consequently, a <span><strong class="command">managed-keys</strong></span> statement
6169             appears similar to a <span><strong class="command">trusted-keys</strong></span>, differing
6170             in the presence of the second field, containing the keyword
6171             <code class="literal">initial-key</code>.  The difference is, whereas the
6172             keys listed in a <span><strong class="command">trusted-keys</strong></span> continue to be
6173             trusted until they are removed from
6174             <code class="filename">named.conf</code>, an initializing key listed 
6175             in a <span><strong class="command">managed-keys</strong></span> statement is only trusted
6176             <span class="emphasis"><em>once</em></span>: for as long as it takes to load the
6177             managed key database and start the RFC 5011 key maintenance
6178             process.
6179           </p>
6180 <p>
6181             The first time <span><strong class="command">named</strong></span> runs with a managed key
6182             configured in <code class="filename">named.conf</code>, it fetches the
6183             DNSKEY RRset directly from the zone apex, and validates it
6184             using the key specified in the <span><strong class="command">managed-keys</strong></span>
6185             statement.  If the DNSKEY RRset is validly signed, then it is
6186             used as the basis for a new managed keys database.
6187           </p>
6188 <p>
6189             From that point on, whenever <span><strong class="command">named</strong></span> runs, it
6190             sees the <span><strong class="command">managed-keys</strong></span> statement, checks to
6191             make sure RFC 5011 key maintenance has already been initialized
6192             for the specified domain, and if so, it simply moves on.  The
6193             key specified in the <span><strong class="command">managed-keys</strong></span> is not
6194             used to validate answers; it has been superseded by the key or
6195             keys stored in the managed keys database.
6196           </p>
6197 <p>
6198             The next time <span><strong class="command">named</strong></span> runs after a name
6199             has been <span class="emphasis"><em>removed</em></span> from the
6200             <span><strong class="command">managed-keys</strong></span> statement, the corresponding
6201             zone will be removed from the managed keys database,
6202             and RFC 5011 key maintenance will no longer be used for that
6203             domain.
6204           </p>
6205 <p>
6206             <span><strong class="command">named</strong></span> only maintains a single managed keys
6207             database; consequently, unlike <span><strong class="command">trusted-keys</strong></span>,
6208             <span><strong class="command">managed-keys</strong></span> may only be set at the top
6209             level of <code class="filename">named.conf</code>, not within a view.
6210           </p>
6211 <p>
6212             In the current implementation, the managed keys database is
6213             stored as a master-format zone file called
6214             <code class="filename">managed-keys.bind</code>.  When the key database
6215             is changed, the zone is updated.  As with any other dynamic
6216             zone, changes will be written into a journal file,
6217             <code class="filename">managed-keys.bind.jnl</code>.  They are committed
6218             to the master file as soon as possible afterward; in the case
6219             of the managed key database, this will usually occur within 30
6220             seconds.  So, whenever <span><strong class="command">named</strong></span> is using
6221             automatic key maintenance, those two files can be expected to
6222             exist in the working directory.  (For this reason among others,
6223             the working directory should be always be writable by
6224             <span><strong class="command">named</strong></span>.)
6225           </p>
6226 <p>
6227             If the <span><strong class="command">dnssec-lookaside</strong></span> option is
6228             set to <strong class="userinput"><code>auto</code></strong>, <span><strong class="command">named</strong></span>
6229             will automatically initialize a managed key for the
6230             zone <code class="literal">dlv.isc.org</code>.  The key that is
6231             used to initialize the key maintenance process is built
6232             into <span><strong class="command">named</strong></span>, and can be overridden
6233             from <span><strong class="command">bindkeys-file</strong></span>.
6234           </p>
6235 </div>
6236 <div class="sect2" lang="en">
6237 <div class="titlepage"><div><div><h3 class="title">
6238 <a name="view_statement_grammar"></a><span><strong class="command">view</strong></span> Statement Grammar</h3></div></div></div>
6239 <pre class="programlisting"><span><strong class="command">view</strong></span> <em class="replaceable"><code>view_name</code></em>
6240       [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6241       match-clients { <em class="replaceable"><code>address_match_list</code></em> };
6242       match-destinations { <em class="replaceable"><code>address_match_list</code></em> };
6243       match-recursive-only <em class="replaceable"><code>yes_or_no</code></em> ;
6244       [<span class="optional"> <em class="replaceable"><code>view_option</code></em>; ...</span>]
6245       [<span class="optional"> <em class="replaceable"><code>zone_statement</code></em>; ...</span>]
6246 };
6247 </pre>
6248 </div>
6249 <div class="sect2" lang="en">
6250 <div class="titlepage"><div><div><h3 class="title">
6251 <a name="id2590352"></a><span><strong class="command">view</strong></span> Statement Definition and Usage</h3></div></div></div>
6252 <p>
6253             The <span><strong class="command">view</strong></span> statement is a powerful
6254             feature
6255             of <acronym class="acronym">BIND</acronym> 9 that lets a name server
6256             answer a DNS query differently
6257             depending on who is asking. It is particularly useful for
6258             implementing
6259             split DNS setups without having to run multiple servers.
6260           </p>
6261 <p>
6262             Each <span><strong class="command">view</strong></span> statement defines a view
6263             of the
6264             DNS namespace that will be seen by a subset of clients.  A client
6265             matches
6266             a view if its source IP address matches the
6267             <code class="varname">address_match_list</code> of the view's
6268             <span><strong class="command">match-clients</strong></span> clause and its
6269             destination IP address matches
6270             the <code class="varname">address_match_list</code> of the
6271             view's
6272             <span><strong class="command">match-destinations</strong></span> clause.  If not
6273             specified, both
6274             <span><strong class="command">match-clients</strong></span> and <span><strong class="command">match-destinations</strong></span>
6275             default to matching all addresses.  In addition to checking IP
6276             addresses
6277             <span><strong class="command">match-clients</strong></span> and <span><strong class="command">match-destinations</strong></span>
6278             can also take <span><strong class="command">keys</strong></span> which provide an
6279             mechanism for the
6280             client to select the view.  A view can also be specified
6281             as <span><strong class="command">match-recursive-only</strong></span>, which
6282             means that only recursive
6283             requests from matching clients will match that view.
6284             The order of the <span><strong class="command">view</strong></span> statements is
6285             significant &#8212;
6286             a client request will be resolved in the context of the first
6287             <span><strong class="command">view</strong></span> that it matches.
6288           </p>
6289 <p>
6290             Zones defined within a <span><strong class="command">view</strong></span>
6291             statement will
6292             only be accessible to clients that match the <span><strong class="command">view</strong></span>.
6293             By defining a zone of the same name in multiple views, different
6294             zone data can be given to different clients, for example,
6295             "internal"
6296             and "external" clients in a split DNS setup.
6297           </p>
6298 <p>
6299             Many of the options given in the <span><strong class="command">options</strong></span> statement
6300             can also be used within a <span><strong class="command">view</strong></span>
6301             statement, and then
6302             apply only when resolving queries with that view.  When no
6303             view-specific
6304             value is given, the value in the <span><strong class="command">options</strong></span> statement
6305             is used as a default.  Also, zone options can have default values
6306             specified
6307             in the <span><strong class="command">view</strong></span> statement; these
6308             view-specific defaults
6309             take precedence over those in the <span><strong class="command">options</strong></span> statement.
6310           </p>
6311 <p>
6312             Views are class specific.  If no class is given, class IN
6313             is assumed.  Note that all non-IN views must contain a hint zone,
6314             since only the IN class has compiled-in default hints.
6315           </p>
6316 <p>
6317             If there are no <span><strong class="command">view</strong></span> statements in
6318             the config
6319             file, a default view that matches any client is automatically
6320             created
6321             in class IN. Any <span><strong class="command">zone</strong></span> statements
6322             specified on
6323             the top level of the configuration file are considered to be part
6324             of
6325             this default view, and the <span><strong class="command">options</strong></span>
6326             statement will
6327             apply to the default view. If any explicit <span><strong class="command">view</strong></span>
6328             statements are present, all <span><strong class="command">zone</strong></span>
6329             statements must
6330             occur inside <span><strong class="command">view</strong></span> statements.
6331           </p>
6332 <p>
6333             Here is an example of a typical split DNS setup implemented
6334             using <span><strong class="command">view</strong></span> statements:
6335           </p>
6336 <pre class="programlisting">view "internal" {
6337       // This should match our internal networks.
6338       match-clients { 10.0.0.0/8; };
6339
6340       // Provide recursive service to internal
6341       // clients only.
6342       recursion yes;
6343
6344       // Provide a complete view of the example.com
6345       // zone including addresses of internal hosts.
6346       zone "example.com" {
6347             type master;
6348             file "example-internal.db";
6349       };
6350 };
6351
6352 view "external" {
6353       // Match all clients not matched by the
6354       // previous view.
6355       match-clients { any; };
6356
6357       // Refuse recursive service to external clients.
6358       recursion no;
6359
6360       // Provide a restricted view of the example.com
6361       // zone containing only publicly accessible hosts.
6362       zone "example.com" {
6363            type master;
6364            file "example-external.db";
6365       };
6366 };
6367 </pre>
6368 </div>
6369 <div class="sect2" lang="en">
6370 <div class="titlepage"><div><div><h3 class="title">
6371 <a name="zone_statement_grammar"></a><span><strong class="command">zone</strong></span>
6372             Statement Grammar</h3></div></div></div>
6373 <pre class="programlisting"><span><strong class="command">zone</strong></span> <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6374     type master;
6375     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6376     [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6377     [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6378     [<span class="optional"> allow-update { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6379     [<span class="optional"> update-policy <em class="replaceable"><code>local</code></em> | { <em class="replaceable"><code>update_policy_rule</code></em> [<span class="optional">...</span>] }; </span>]
6380     [<span class="optional"> also-notify { <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ;
6381                   [<span class="optional"> <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; ... </span>] }; </span>]
6382     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6383     [<span class="optional"> check-mx (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6384     [<span class="optional"> check-wildcard <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6385     [<span class="optional"> check-integrity <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6386     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
6387     [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
6388     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
6389     [<span class="optional"> journal <em class="replaceable"><code>string</code></em> ; </span>]
6390     [<span class="optional"> max-journal-size <em class="replaceable"><code>size_spec</code></em>; </span>]
6391     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
6392     [<span class="optional"> forwarders { [<span class="optional"> <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; ... </span>] }; </span>]
6393     [<span class="optional"> ixfr-base <em class="replaceable"><code>string</code></em> ; </span>]
6394     [<span class="optional"> ixfr-from-differences <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6395     [<span class="optional"> ixfr-tmp-file <em class="replaceable"><code>string</code></em> ; </span>]
6396     [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6397     [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em> ; </span>]
6398     [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em> ; </span>]
6399     [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em> ; </span>]
6400     [<span class="optional"> notify <em class="replaceable"><code>yes_or_no</code></em> | <em class="replaceable"><code>explicit</code></em> | <em class="replaceable"><code>master-only</code></em> ; </span>]
6401     [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
6402     [<span class="optional"> notify-to-soa <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6403     [<span class="optional"> pubkey <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>string</code></em> ; </span>]
6404     [<span class="optional"> notify-source (<em class="replaceable"><code>ip4_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6405     [<span class="optional"> notify-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6406     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6407     [<span class="optional"> sig-validity-interval <em class="replaceable"><code>number</code></em> [<span class="optional"><em class="replaceable"><code>number</code></em></span>] ; </span>]
6408     [<span class="optional"> sig-signing-nodes <em class="replaceable"><code>number</code></em> ; </span>]
6409     [<span class="optional"> sig-signing-signatures <em class="replaceable"><code>number</code></em> ; </span>]
6410     [<span class="optional"> sig-signing-type <em class="replaceable"><code>number</code></em> ; </span>]
6411     [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
6412     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6413     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6414     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6415     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6416     [<span class="optional"> key-directory <em class="replaceable"><code>path_name</code></em>; </span>]
6417     [<span class="optional"> auto-dnssec <code class="constant">allow</code>|<code class="constant">maintain</code>|<code class="constant">off</code>; </span>]
6418     [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6419 };
6420
6421 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6422     type slave;
6423     [<span class="optional"> allow-notify { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6424     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6425     [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6426     [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6427     [<span class="optional"> allow-update-forwarding { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6428     [<span class="optional"> update-check-ksk <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6429     [<span class="optional"> dnssec-update-mode ( <em class="replaceable"><code>maintain</code></em> | <em class="replaceable"><code>no-resign</code></em> ); </span>]
6430     [<span class="optional"> dnssec-dnskey-kskonly <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6431     [<span class="optional"> dnssec-secure-to-insecure <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6432     [<span class="optional"> try-tcp-refresh <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6433     [<span class="optional"> also-notify { <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ;
6434                   [<span class="optional"> <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; ... </span>] }; </span>]
6435     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6436     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
6437     [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
6438     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
6439     [<span class="optional"> journal <em class="replaceable"><code>string</code></em> ; </span>]
6440     [<span class="optional"> max-journal-size <em class="replaceable"><code>size_spec</code></em>; </span>]
6441     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
6442     [<span class="optional"> forwarders { [<span class="optional"> <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; ... </span>] }; </span>]
6443     [<span class="optional"> ixfr-base <em class="replaceable"><code>string</code></em> ; </span>]
6444     [<span class="optional"> ixfr-from-differences <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6445     [<span class="optional"> ixfr-tmp-file <em class="replaceable"><code>string</code></em> ; </span>]
6446     [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6447     [<span class="optional"> masters [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] { ( <em class="replaceable"><code>masters_list</code></em> | <em class="replaceable"><code>ip_addr</code></em>
6448                               [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>]
6449                               [<span class="optional">key <em class="replaceable"><code>key</code></em></span>] ) ; [<span class="optional">...</span>] }; </span>]
6450     [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em> ; </span>]
6451     [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em> ; </span>]
6452     [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em> ; </span>]
6453     [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em> ; </span>]
6454     [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em> ; </span>]
6455     [<span class="optional"> notify <em class="replaceable"><code>yes_or_no</code></em> | <em class="replaceable"><code>explicit</code></em> | <em class="replaceable"><code>master-only</code></em> ; </span>]
6456     [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
6457     [<span class="optional"> notify-to-soa <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6458     [<span class="optional"> pubkey <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>string</code></em> ; </span>]
6459     [<span class="optional"> transfer-source (<em class="replaceable"><code>ip4_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6460     [<span class="optional"> transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6461     [<span class="optional"> alt-transfer-source (<em class="replaceable"><code>ip4_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6462     [<span class="optional"> alt-transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
6463                              [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6464     [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6465     [<span class="optional"> notify-source (<em class="replaceable"><code>ip4_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6466     [<span class="optional"> notify-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6467     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6468     [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
6469     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6470     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6471     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6472     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6473     [<span class="optional"> multi-master <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6474     [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6475 };
6476
6477 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6478     type hint;
6479     file <em class="replaceable"><code>string</code></em> ;
6480     [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6481     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>] // Not Implemented.
6482 };
6483
6484 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6485     type stub;
6486     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6487     [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6488     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6489     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
6490     [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6491     [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
6492     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
6493     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
6494     [<span class="optional"> forwarders { [<span class="optional"> <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; ... </span>] }; </span>]
6495     [<span class="optional"> masters [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] { ( <em class="replaceable"><code>masters_list</code></em> | <em class="replaceable"><code>ip_addr</code></em>
6496                               [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>]
6497                               [<span class="optional">key <em class="replaceable"><code>key</code></em></span>] ) ; [<span class="optional">...</span>] }; </span>]
6498     [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em> ; </span>]
6499     [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em> ; </span>]
6500     [<span class="optional"> pubkey <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>string</code></em> ; </span>]
6501     [<span class="optional"> transfer-source (<em class="replaceable"><code>ip4_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6502     [<span class="optional"> transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
6503                          [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6504     [<span class="optional"> alt-transfer-source (<em class="replaceable"><code>ip4_addr</code></em> | <code class="constant">*</code>) [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6505     [<span class="optional"> alt-transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
6506                             [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6507     [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6508     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6509     [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
6510     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6511     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6512     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6513     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6514     [<span class="optional"> multi-master <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6515 };
6516
6517 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6518     type static-stub;
6519     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6520     [<span class="optional"> server-addresses { [<span class="optional"> <em class="replaceable"><code>ip_addr</code></em> ; ... </span>] }; </span>]
6521     [<span class="optional"> server-names { [<span class="optional"> <em class="replaceable"><code>namelist</code></em> </span>] }; </span>]  
6522     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6523 };
6524
6525 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6526     type forward;
6527     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
6528     [<span class="optional"> forwarders { [<span class="optional"> <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; ... </span>] }; </span>]
6529     [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6530 };
6531
6532 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6533     type delegation-only;
6534 };
6535
6536 </pre>
6537 </div>
6538 <div class="sect2" lang="en">
6539 <div class="titlepage"><div><div><h3 class="title">
6540 <a name="id2591902"></a><span><strong class="command">zone</strong></span> Statement Definition and Usage</h3></div></div></div>
6541 <div class="sect3" lang="en">
6542 <div class="titlepage"><div><div><h4 class="title">
6543 <a name="id2591910"></a>Zone Types</h4></div></div></div>
6544 <div class="informaltable"><table border="1">
6545 <colgroup>
6546 <col>
6547 <col>
6548 </colgroup>
6549 <tbody>
6550 <tr>
6551 <td>
6552                       <p>
6553                         <code class="varname">master</code>
6554                       </p>
6555                     </td>
6556 <td>
6557                       <p>
6558                         The server has a master copy of the data
6559                         for the zone and will be able to provide authoritative
6560                         answers for
6561                         it.
6562                       </p>
6563                     </td>
6564 </tr>
6565 <tr>
6566 <td>
6567                       <p>
6568                         <code class="varname">slave</code>
6569                       </p>
6570                     </td>
6571 <td>
6572                       <p>
6573                         A slave zone is a replica of a master
6574                         zone. The <span><strong class="command">masters</strong></span> list
6575                         specifies one or more IP addresses
6576                         of master servers that the slave contacts to update
6577                         its copy of the zone.
6578                         Masters list elements can also be names of other
6579                         masters lists.
6580                         By default, transfers are made from port 53 on the
6581                         servers; this can
6582                         be changed for all servers by specifying a port number
6583                         before the
6584                         list of IP addresses, or on a per-server basis after
6585                         the IP address.
6586                         Authentication to the master can also be done with
6587                         per-server TSIG keys.
6588                         If a file is specified, then the
6589                         replica will be written to this file whenever the zone
6590                         is changed,
6591                         and reloaded from this file on a server restart. Use
6592                         of a file is
6593                         recommended, since it often speeds server startup and
6594                         eliminates
6595                         a needless waste of bandwidth. Note that for large
6596                         numbers (in the
6597                         tens or hundreds of thousands) of zones per server, it
6598                         is best to
6599                         use a two-level naming scheme for zone filenames. For
6600                         example,
6601                         a slave server for the zone <code class="literal">example.com</code> might place
6602                         the zone contents into a file called
6603                         <code class="filename">ex/example.com</code> where <code class="filename">ex/</code> is
6604                         just the first two letters of the zone name. (Most
6605                         operating systems
6606                         behave very slowly if you put 100000 files into
6607                         a single directory.)
6608                       </p>
6609                     </td>
6610 </tr>
6611 <tr>
6612 <td>
6613                       <p>
6614                         <code class="varname">stub</code>
6615                       </p>
6616                     </td>
6617 <td>
6618                       <p>
6619                         A stub zone is similar to a slave zone,
6620                         except that it replicates only the NS records of a
6621                         master zone instead
6622                         of the entire zone. Stub zones are not a standard part
6623                         of the DNS;
6624                         they are a feature specific to the <acronym class="acronym">BIND</acronym> implementation.
6625                       </p>
6626
6627                       <p>
6628                         Stub zones can be used to eliminate the need for glue
6629                         NS record
6630                         in a parent zone at the expense of maintaining a stub
6631                         zone entry and
6632                         a set of name server addresses in <code class="filename">named.conf</code>.
6633                         This usage is not recommended for new configurations,
6634                         and BIND 9
6635                         supports it only in a limited way.
6636                         In <acronym class="acronym">BIND</acronym> 4/8, zone
6637                         transfers of a parent zone
6638                         included the NS records from stub children of that
6639                         zone. This meant
6640                         that, in some cases, users could get away with
6641                         configuring child stubs
6642                         only in the master server for the parent zone. <acronym class="acronym">BIND</acronym>
6643                         9 never mixes together zone data from different zones
6644                         in this
6645                         way. Therefore, if a <acronym class="acronym">BIND</acronym> 9 master serving a parent
6646                         zone has child stub zones configured, all the slave
6647                         servers for the
6648                         parent zone also need to have the same child stub
6649                         zones
6650                         configured.
6651                       </p>
6652
6653                       <p>
6654                         Stub zones can also be used as a way of forcing the
6655                         resolution
6656                         of a given domain to use a particular set of
6657                         authoritative servers.
6658                         For example, the caching name servers on a private
6659                         network using
6660                         RFC1918 addressing may be configured with stub zones
6661                         for
6662                         <code class="literal">10.in-addr.arpa</code>
6663                         to use a set of internal name servers as the
6664                         authoritative
6665                         servers for that domain.
6666                       </p>
6667                     </td>
6668 </tr>
6669 <tr>
6670 <td>
6671                       <p>
6672                         <code class="varname">static-stub</code>
6673                       </p>
6674                     </td>
6675 <td>
6676                       <p>
6677                         A static-stub zone is similar to a stub zone
6678                         with the following exceptions:
6679                         the zone data is statically configured, rather
6680                         than transferred from a master server;
6681                         when recursion is necessary for a query that
6682                         matches a static-stub zone, the locally
6683                         configured data (nameserver names and glue addresses)
6684                         is always used even if different authoritative
6685                         information is cached.
6686                       </p>
6687                       <p>
6688                         Zone data is configured via the
6689                         <span><strong class="command">server-addresses</strong></span> and
6690                         <span><strong class="command">server-names</strong></span> zone options.
6691                       </p>
6692                       <p>
6693                         The zone data is maintained in the form of NS
6694                         and (if necessary) glue A or AAAA RRs
6695                         internally, which can be seen by dumping zone
6696                         databases by <span><strong class="command">rndc dumpdb -all</strong></span>.
6697                         The configured RRs are considered local configuration
6698                         parameters rather than public data.
6699                         Non recursive queries (i.e., those with the RD
6700                         bit off) to a static-stub zone are therefore
6701                         prohibited and will be responded with REFUSED.
6702                       </p>
6703                       <p>
6704                         Since the data is statically configured, no
6705                         zone maintenance action takes place for a static-stub
6706                         zone.
6707                         For example, there is no periodic refresh
6708                         attempt, and an incoming notify message
6709                         will be rejected with an rcode of NOTAUTH.
6710                       </p>
6711                       <p>
6712                         Each static-stub zone is configured with
6713                         internally generated NS and (if necessary)
6714                         glue A or AAAA RRs 
6715                       </p>
6716                     </td>
6717 </tr>
6718 <tr>
6719 <td>
6720                       <p>
6721                         <code class="varname">forward</code>
6722                       </p>
6723                     </td>
6724 <td>
6725                       <p>
6726                         A "forward zone" is a way to configure
6727                         forwarding on a per-domain basis.  A <span><strong class="command">zone</strong></span> statement
6728                         of type <span><strong class="command">forward</strong></span> can
6729                         contain a <span><strong class="command">forward</strong></span>
6730                         and/or <span><strong class="command">forwarders</strong></span>
6731                         statement,
6732                         which will apply to queries within the domain given by
6733                         the zone
6734                         name. If no <span><strong class="command">forwarders</strong></span>
6735                         statement is present or
6736                         an empty list for <span><strong class="command">forwarders</strong></span> is given, then no
6737                         forwarding will be done for the domain, canceling the
6738                         effects of
6739                         any forwarders in the <span><strong class="command">options</strong></span> statement. Thus
6740                         if you want to use this type of zone to change the
6741                         behavior of the
6742                         global <span><strong class="command">forward</strong></span> option
6743                         (that is, "forward first"
6744                         to, then "forward only", or vice versa, but want to
6745                         use the same
6746                         servers as set globally) you need to re-specify the
6747                         global forwarders.
6748                       </p>
6749                     </td>
6750 </tr>
6751 <tr>
6752 <td>
6753                       <p>
6754                         <code class="varname">hint</code>
6755                       </p>
6756                     </td>
6757 <td>
6758                       <p>
6759                         The initial set of root name servers is
6760                         specified using a "hint zone". When the server starts
6761                         up, it uses
6762                         the root hints to find a root name server and get the
6763                         most recent
6764                         list of root name servers. If no hint zone is
6765                         specified for class
6766                         IN, the server uses a compiled-in default set of root
6767                         servers hints.
6768                         Classes other than IN have no built-in defaults hints.
6769                       </p>
6770                     </td>
6771 </tr>
6772 <tr>
6773 <td>
6774                       <p>
6775                         <code class="varname">delegation-only</code>
6776                       </p>
6777                     </td>
6778 <td>
6779                       <p>
6780                         This is used to enforce the delegation-only
6781                         status of infrastructure zones (e.g. COM,
6782                         NET, ORG).  Any answer that is received
6783                         without an explicit or implicit delegation
6784                         in the authority section will be treated
6785                         as NXDOMAIN.  This does not apply to the
6786                         zone apex.  This should not be applied to
6787                         leaf zones.
6788                       </p>
6789                       <p>
6790                         <code class="varname">delegation-only</code> has no
6791                         effect on answers received from forwarders.
6792                       </p>
6793                       <p>
6794                         See caveats in <a href="Bv9ARM.ch06.html#root_delegation_only"><span><strong class="command">root-delegation-only</strong></span></a>.
6795                       </p>
6796                     </td>
6797 </tr>
6798 </tbody>
6799 </table></div>
6800 </div>
6801 <div class="sect3" lang="en">
6802 <div class="titlepage"><div><div><h4 class="title">
6803 <a name="id2592455"></a>Class</h4></div></div></div>
6804 <p>
6805               The zone's name may optionally be followed by a class. If
6806               a class is not specified, class <code class="literal">IN</code> (for <code class="varname">Internet</code>),
6807               is assumed. This is correct for the vast majority of cases.
6808             </p>
6809 <p>
6810               The <code class="literal">hesiod</code> class is
6811               named for an information service from MIT's Project Athena. It
6812               is
6813               used to share information about various systems databases, such
6814               as users, groups, printers and so on. The keyword
6815               <code class="literal">HS</code> is
6816               a synonym for hesiod.
6817             </p>
6818 <p>
6819               Another MIT development is Chaosnet, a LAN protocol created
6820               in the mid-1970s. Zone data for it can be specified with the <code class="literal">CHAOS</code> class.
6821             </p>
6822 </div>
6823 <div class="sect3" lang="en">
6824 <div class="titlepage"><div><div><h4 class="title">
6825 <a name="id2592488"></a>Zone Options</h4></div></div></div>
6826 <div class="variablelist"><dl>
6827 <dt><span class="term"><span><strong class="command">allow-notify</strong></span></span></dt>
6828 <dd><p>
6829                     See the description of
6830                     <span><strong class="command">allow-notify</strong></span> in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
6831                   </p></dd>
6832 <dt><span class="term"><span><strong class="command">allow-query</strong></span></span></dt>
6833 <dd><p>
6834                     See the description of
6835                     <span><strong class="command">allow-query</strong></span> in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
6836                   </p></dd>
6837 <dt><span class="term"><span><strong class="command">allow-query-on</strong></span></span></dt>
6838 <dd><p>
6839                     See the description of
6840                     <span><strong class="command">allow-query-on</strong></span> in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
6841                   </p></dd>
6842 <dt><span class="term"><span><strong class="command">allow-transfer</strong></span></span></dt>
6843 <dd><p>
6844                     See the description of <span><strong class="command">allow-transfer</strong></span>
6845                     in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
6846                   </p></dd>
6847 <dt><span class="term"><span><strong class="command">allow-update</strong></span></span></dt>
6848 <dd><p>
6849                     See the description of <span><strong class="command">allow-update</strong></span>
6850                     in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
6851                   </p></dd>
6852 <dt><span class="term"><span><strong class="command">update-policy</strong></span></span></dt>
6853 <dd><p>
6854                     Specifies a "Simple Secure Update" policy. See
6855                     <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called &#8220;Dynamic Update Policies&#8221;</a>.
6856                   </p></dd>
6857 <dt><span class="term"><span><strong class="command">allow-update-forwarding</strong></span></span></dt>
6858 <dd><p>
6859                     See the description of <span><strong class="command">allow-update-forwarding</strong></span>
6860                     in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
6861                   </p></dd>
6862 <dt><span class="term"><span><strong class="command">also-notify</strong></span></span></dt>
6863 <dd><p>
6864                     Only meaningful if <span><strong class="command">notify</strong></span>
6865                     is
6866                     active for this zone. The set of machines that will
6867                     receive a
6868                     <code class="literal">DNS NOTIFY</code> message
6869                     for this zone is made up of all the listed name servers
6870                     (other than
6871                     the primary master) for the zone plus any IP addresses
6872                     specified
6873                     with <span><strong class="command">also-notify</strong></span>. A port
6874                     may be specified
6875                     with each <span><strong class="command">also-notify</strong></span>
6876                     address to send the notify
6877                     messages to a port other than the default of 53.
6878                     <span><strong class="command">also-notify</strong></span> is not
6879                     meaningful for stub zones.
6880                     The default is the empty list.
6881                   </p></dd>
6882 <dt><span class="term"><span><strong class="command">check-names</strong></span></span></dt>
6883 <dd><p>
6884                     This option is used to restrict the character set and
6885                     syntax of
6886                     certain domain names in master files and/or DNS responses
6887                     received from the
6888                     network.  The default varies according to zone type.  For <span><strong class="command">master</strong></span> zones the default is <span><strong class="command">fail</strong></span>.  For <span><strong class="command">slave</strong></span>
6889                     zones the default is <span><strong class="command">warn</strong></span>.
6890                     It is not implemented for <span><strong class="command">hint</strong></span> zones.
6891                   </p></dd>
6892 <dt><span class="term"><span><strong class="command">check-mx</strong></span></span></dt>
6893 <dd><p>
6894                     See the description of
6895                     <span><strong class="command">check-mx</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
6896                   </p></dd>
6897 <dt><span class="term"><span><strong class="command">check-wildcard</strong></span></span></dt>
6898 <dd><p>
6899                     See the description of
6900                     <span><strong class="command">check-wildcard</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
6901                   </p></dd>
6902 <dt><span class="term"><span><strong class="command">check-integrity</strong></span></span></dt>
6903 <dd><p>
6904                     See the description of
6905                     <span><strong class="command">check-integrity</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
6906                   </p></dd>
6907 <dt><span class="term"><span><strong class="command">check-sibling</strong></span></span></dt>
6908 <dd><p>
6909                     See the description of
6910                     <span><strong class="command">check-sibling</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
6911                   </p></dd>
6912 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl</strong></span></span></dt>
6913 <dd><p>
6914                     See the description of
6915                     <span><strong class="command">zero-no-soa-ttl</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
6916                   </p></dd>
6917 <dt><span class="term"><span><strong class="command">update-check-ksk</strong></span></span></dt>
6918 <dd><p>
6919                     See the description of
6920                     <span><strong class="command">update-check-ksk</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
6921                   </p></dd>
6922 <dt><span class="term"><span><strong class="command">dnssec-dnskey-kskonly</strong></span></span></dt>
6923 <dd><p>
6924                     See the description of
6925                     <span><strong class="command">dnssec-dnskey-kskonly</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
6926                   </p></dd>
6927 <dt><span class="term"><span><strong class="command">try-tcp-refresh</strong></span></span></dt>
6928 <dd><p>
6929                     See the description of
6930                     <span><strong class="command">try-tcp-refresh</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
6931                   </p></dd>
6932 <dt><span class="term"><span><strong class="command">database</strong></span></span></dt>
6933 <dd>
6934 <p>
6935                     Specify the type of database to be used for storing the
6936                     zone data.  The string following the <span><strong class="command">database</strong></span> keyword
6937                     is interpreted as a list of whitespace-delimited words.
6938                     The first word
6939                     identifies the database type, and any subsequent words are
6940                     passed
6941                     as arguments to the database to be interpreted in a way
6942                     specific
6943                     to the database type.
6944                   </p>
6945 <p>
6946                     The default is <strong class="userinput"><code>"rbt"</code></strong>, BIND 9's
6947                     native in-memory
6948                     red-black-tree database.  This database does not take
6949                     arguments.
6950                   </p>
6951 <p>
6952                     Other values are possible if additional database drivers
6953                     have been linked into the server.  Some sample drivers are
6954                     included
6955                     with the distribution but none are linked in by default.
6956                   </p>
6957 </dd>
6958 <dt><span class="term"><span><strong class="command">dialup</strong></span></span></dt>
6959 <dd><p>
6960                     See the description of
6961                     <span><strong class="command">dialup</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
6962                   </p></dd>
6963 <dt><span class="term"><span><strong class="command">delegation-only</strong></span></span></dt>
6964 <dd>
6965 <p>
6966                     The flag only applies to hint and stub zones.  If set
6967                     to <strong class="userinput"><code>yes</code></strong>, then the zone will also be
6968                     treated as if it is also a delegation-only type zone.
6969                   </p>
6970 <p>
6971                     See caveats in <a href="Bv9ARM.ch06.html#root_delegation_only"><span><strong class="command">root-delegation-only</strong></span></a>.
6972                   </p>
6973 </dd>
6974 <dt><span class="term"><span><strong class="command">forward</strong></span></span></dt>
6975 <dd><p>
6976                     Only meaningful if the zone has a forwarders
6977                     list. The <span><strong class="command">only</strong></span> value causes
6978                     the lookup to fail
6979                     after trying the forwarders and getting no answer, while <span><strong class="command">first</strong></span> would
6980                     allow a normal lookup to be tried.
6981                   </p></dd>
6982 <dt><span class="term"><span><strong class="command">forwarders</strong></span></span></dt>
6983 <dd><p>
6984                     Used to override the list of global forwarders.
6985                     If it is not specified in a zone of type <span><strong class="command">forward</strong></span>,
6986                     no forwarding is done for the zone and the global options are
6987                     not used.
6988                   </p></dd>
6989 <dt><span class="term"><span><strong class="command">ixfr-base</strong></span></span></dt>
6990 <dd><p>
6991                     Was used in <acronym class="acronym">BIND</acronym> 8 to
6992                     specify the name
6993                     of the transaction log (journal) file for dynamic update
6994                     and IXFR.
6995                     <acronym class="acronym">BIND</acronym> 9 ignores the option
6996                     and constructs the name of the journal
6997                     file by appending "<code class="filename">.jnl</code>"
6998                     to the name of the
6999                     zone file.
7000                   </p></dd>
7001 <dt><span class="term"><span><strong class="command">ixfr-tmp-file</strong></span></span></dt>
7002 <dd><p>
7003                     Was an undocumented option in <acronym class="acronym">BIND</acronym> 8.
7004                     Ignored in <acronym class="acronym">BIND</acronym> 9.
7005                   </p></dd>
7006 <dt><span class="term"><span><strong class="command">journal</strong></span></span></dt>
7007 <dd><p>
7008                     Allow the default journal's filename to be overridden.
7009                     The default is the zone's filename with "<code class="filename">.jnl</code>" appended.
7010                     This is applicable to <span><strong class="command">master</strong></span> and <span><strong class="command">slave</strong></span> zones.
7011                   </p></dd>
7012 <dt><span class="term"><span><strong class="command">max-journal-size</strong></span></span></dt>
7013 <dd><p>
7014                     See the description of
7015                     <span><strong class="command">max-journal-size</strong></span> in <a href="Bv9ARM.ch06.html#server_resource_limits" title="Server  Resource Limits">the section called &#8220;Server  Resource Limits&#8221;</a>.
7016                   </p></dd>
7017 <dt><span class="term"><span><strong class="command">max-transfer-time-in</strong></span></span></dt>
7018 <dd><p>
7019                     See the description of
7020                     <span><strong class="command">max-transfer-time-in</strong></span> in <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
7021                   </p></dd>
7022 <dt><span class="term"><span><strong class="command">max-transfer-idle-in</strong></span></span></dt>
7023 <dd><p>
7024                     See the description of
7025                     <span><strong class="command">max-transfer-idle-in</strong></span> in <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
7026                   </p></dd>
7027 <dt><span class="term"><span><strong class="command">max-transfer-time-out</strong></span></span></dt>
7028 <dd><p>
7029                     See the description of
7030                     <span><strong class="command">max-transfer-time-out</strong></span> in <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
7031                   </p></dd>
7032 <dt><span class="term"><span><strong class="command">max-transfer-idle-out</strong></span></span></dt>
7033 <dd><p>
7034                     See the description of
7035                     <span><strong class="command">max-transfer-idle-out</strong></span> in <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
7036                   </p></dd>
7037 <dt><span class="term"><span><strong class="command">notify</strong></span></span></dt>
7038 <dd><p>
7039                     See the description of
7040                     <span><strong class="command">notify</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
7041                   </p></dd>
7042 <dt><span class="term"><span><strong class="command">notify-delay</strong></span></span></dt>
7043 <dd><p>
7044                     See the description of
7045                     <span><strong class="command">notify-delay</strong></span> in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
7046                   </p></dd>
7047 <dt><span class="term"><span><strong class="command">notify-to-soa</strong></span></span></dt>
7048 <dd><p>
7049                     See the description of
7050                     <span><strong class="command">notify-to-soa</strong></span> in
7051                     <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
7052                   </p></dd>
7053 <dt><span class="term"><span><strong class="command">pubkey</strong></span></span></dt>
7054 <dd><p>
7055                     In <acronym class="acronym">BIND</acronym> 8, this option was
7056                     intended for specifying
7057                     a public zone key for verification of signatures in DNSSEC
7058                     signed
7059                     zones when they are loaded from disk. <acronym class="acronym">BIND</acronym> 9 does not verify signatures
7060                     on load and ignores the option.
7061                   </p></dd>
7062 <dt><span class="term"><span><strong class="command">zone-statistics</strong></span></span></dt>
7063 <dd><p>
7064                     If <strong class="userinput"><code>yes</code></strong>, the server will keep
7065                     statistical
7066                     information for this zone, which can be dumped to the
7067                     <span><strong class="command">statistics-file</strong></span> defined in
7068                     the server options.
7069                   </p></dd>
7070 <dt><span class="term"><span><strong class="command">server-addresses</strong></span></span></dt>
7071 <dd>
7072 <p>
7073                     Only meaningful for static-stub zones.
7074                     This is a list of IP addresses to which queries
7075                     should be sent in recursive resolution for the
7076                     zone.
7077                     A non empty list for this option will internally
7078                     configure the apex NS RR with associated glue A or
7079                     AAAA RRs.
7080                   </p>
7081 <p>
7082                     For example, if "example.com" is configured as a
7083                     static-stub zone with 192.0.2.1 and 2001:db8::1234
7084                     in a <span><strong class="command">server-addresses</strong></span> option,
7085                     the following RRs will be internally configured.
7086                   </p>
7087 <pre class="programlisting">example.com. NS example.com.
7088 example.com. A 192.0.2.1
7089 example.com. AAAA 2001:db8::1234</pre>
7090 <p>
7091                     These records are internally used to resolve
7092                     names under the static-stub zone.
7093                     For instance, if the server receives a query for
7094                     "www.example.com" with the RD bit on, the server
7095                     will initiate recursive resolution and send
7096                     queries to 192.0.2.1 and/or 2001:db8::1234.
7097                   </p>
7098 </dd>
7099 <dt><span class="term"><span><strong class="command">server-names</strong></span></span></dt>
7100 <dd>
7101 <p>
7102                     Only meaningful for static-stub zones.
7103                     This is a list of domain names of nameservers that
7104                     act as authoritative servers of the static-stub
7105                     zone.
7106                     These names will be resolved to IP addresses when
7107                     <span><strong class="command">named</strong></span> needs to send queries to
7108                     these servers.
7109                     To make this supplemental resolution successful,
7110                     these names must not be a subdomain of the origin
7111                     name of static-stub zone.
7112                     That is, when "example.net" is the origin of a
7113                     static-stub zone, "ns.example" and
7114                     "master.example.com" can be specified in the
7115                     <span><strong class="command">server-names</strong></span> option, but
7116                     "ns.example.net" cannot, and will be rejected by
7117                     the configuration parser.
7118                   </p>
7119 <p>
7120                     A non empty list for this option will internally
7121                     configure the apex NS RR with the specified names.
7122                     For example, if "example.com" is configured as a
7123                     static-stub zone with "ns1.example.net" and
7124                     "ns2.example.net"
7125                     in a <span><strong class="command">server-names</strong></span> option,
7126                     the following RRs will be internally configured.
7127                   </p>
7128 <pre class="programlisting">example.com. NS ns1.example.net.
7129 example.com. NS ns2.example.net.
7130 </pre>
7131 <p>
7132                     These records are internally used to resolve
7133                     names under the static-stub zone.
7134                     For instance, if the server receives a query for
7135                     "www.example.com" with the RD bit on, the server
7136                     initiate recursive resolution,
7137                     resolve "ns1.example.net" and/or
7138                     "ns2.example.net" to IP addresses, and then send
7139                     queries to (one or more of) these addresses.
7140                   </p>
7141 </dd>
7142 <dt><span class="term"><span><strong class="command">sig-validity-interval</strong></span></span></dt>
7143 <dd><p>
7144                     See the description of
7145                     <span><strong class="command">sig-validity-interval</strong></span> in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
7146                   </p></dd>
7147 <dt><span class="term"><span><strong class="command">sig-signing-nodes</strong></span></span></dt>
7148 <dd><p>
7149                     See the description of
7150                     <span><strong class="command">sig-signing-nodes</strong></span> in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
7151                   </p></dd>
7152 <dt><span class="term"><span><strong class="command">sig-signing-signatures</strong></span></span></dt>
7153 <dd><p>
7154                     See the description of
7155                     <span><strong class="command">sig-signing-signatures</strong></span> in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
7156                   </p></dd>
7157 <dt><span class="term"><span><strong class="command">sig-signing-type</strong></span></span></dt>
7158 <dd><p>
7159                     See the description of
7160                     <span><strong class="command">sig-signing-type</strong></span> in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
7161                   </p></dd>
7162 <dt><span class="term"><span><strong class="command">transfer-source</strong></span></span></dt>
7163 <dd><p>
7164                     See the description of
7165                     <span><strong class="command">transfer-source</strong></span> in <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
7166                   </p></dd>
7167 <dt><span class="term"><span><strong class="command">transfer-source-v6</strong></span></span></dt>
7168 <dd><p>
7169                     See the description of
7170                     <span><strong class="command">transfer-source-v6</strong></span> in <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
7171                   </p></dd>
7172 <dt><span class="term"><span><strong class="command">alt-transfer-source</strong></span></span></dt>
7173 <dd><p>
7174                     See the description of
7175                     <span><strong class="command">alt-transfer-source</strong></span> in <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
7176                   </p></dd>
7177 <dt><span class="term"><span><strong class="command">alt-transfer-source-v6</strong></span></span></dt>
7178 <dd><p>
7179                     See the description of
7180                     <span><strong class="command">alt-transfer-source-v6</strong></span> in <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
7181                   </p></dd>
7182 <dt><span class="term"><span><strong class="command">use-alt-transfer-source</strong></span></span></dt>
7183 <dd><p>
7184                     See the description of
7185                     <span><strong class="command">use-alt-transfer-source</strong></span> in <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
7186                   </p></dd>
7187 <dt><span class="term"><span><strong class="command">notify-source</strong></span></span></dt>
7188 <dd><p>
7189                     See the description of
7190                     <span><strong class="command">notify-source</strong></span> in <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
7191                   </p></dd>
7192 <dt><span class="term"><span><strong class="command">notify-source-v6</strong></span></span></dt>
7193 <dd><p>
7194                     See the description of
7195                     <span><strong class="command">notify-source-v6</strong></span> in <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
7196                   </p></dd>
7197 <dt>
7198 <span class="term"><span><strong class="command">min-refresh-time</strong></span>, </span><span class="term"><span><strong class="command">max-refresh-time</strong></span>, </span><span class="term"><span><strong class="command">min-retry-time</strong></span>, </span><span class="term"><span><strong class="command">max-retry-time</strong></span></span>
7199 </dt>
7200 <dd><p>
7201                     See the description in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
7202                   </p></dd>
7203 <dt><span class="term"><span><strong class="command">ixfr-from-differences</strong></span></span></dt>
7204 <dd><p>
7205                     See the description of
7206                     <span><strong class="command">ixfr-from-differences</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
7207                     (Note that the <span><strong class="command">ixfr-from-differences</strong></span>
7208                     <strong class="userinput"><code>master</code></strong> and
7209                     <strong class="userinput"><code>slave</code></strong> choices are not
7210                     available at the zone level.)
7211                   </p></dd>
7212 <dt><span class="term"><span><strong class="command">key-directory</strong></span></span></dt>
7213 <dd><p>
7214                     See the description of
7215                     <span><strong class="command">key-directory</strong></span> in <a href="Bv9ARM.ch06.html#options" title="options Statement Definition and
7216           Usage">the section called &#8220;<span><strong class="command">options</strong></span> Statement Definition and
7217           Usage&#8221;</a>.
7218                   </p></dd>
7219 <dt><span class="term"><span><strong class="command">auto-dnssec</strong></span></span></dt>
7220 <dd>
7221 <p>
7222                     Zones configured for dynamic DNS may also use this
7223                     option to allow varying levels of automatic DNSSEC key
7224                     management. There are three possible settings:
7225                   </p>
7226 <p>
7227                     <span><strong class="command">auto-dnssec allow;</strong></span> permits
7228                     keys to be updated and the zone fully re-signed
7229                     whenever the user issues the command <span><strong class="command">rndc sign
7230                     <em class="replaceable"><code>zonename</code></em></strong></span>.
7231                   </p>
7232 <p>
7233                     <span><strong class="command">auto-dnssec maintain;</strong></span> includes the
7234                     above, but also automatically adjusts the zone's DNSSEC
7235                     keys on schedule, according to the keys' timing metadata
7236                     (see <a href="man.dnssec-keygen.html" title="dnssec-keygen"><span class="refentrytitle"><span class="application">dnssec-keygen</span></span>(8)</a> and
7237                     <a href="man.dnssec-settime.html" title="dnssec-settime"><span class="refentrytitle"><span class="application">dnssec-settime</span></span>(8)</a>).  The command
7238                     <span><strong class="command">rndc sign
7239                     <em class="replaceable"><code>zonename</code></em></strong></span> causes
7240                     <span><strong class="command">named</strong></span> to load keys from the key
7241                     repository and sign the zone with all keys that are
7242                     active. 
7243                     <span><strong class="command">rndc loadkeys
7244                     <em class="replaceable"><code>zonename</code></em></strong></span> causes
7245                     <span><strong class="command">named</strong></span> to load keys from the key
7246                     repository and schedule key maintenance events to occur
7247                     in the future, but it does not sign the full zone
7248                     immediately.  Note: once keys have been loaded for a
7249                     zone the first time, the repository will be searched
7250                     for changes periodically, regardless of whether
7251                     <span><strong class="command">rndc loadkeys</strong></span> is used.  The recheck
7252                     interval is hard-coded to
7253                     one hour.
7254                   </p>
7255 <p>
7256                     <span><strong class="command">auto-dnssec create;</strong></span> includes the
7257                     above, but also allows <span><strong class="command">named</strong></span>
7258                     to create new keys in the key repository when needed.
7259                     (NOTE: This option is not yet implemented; the syntax is
7260                     being reserved for future use.)
7261                   </p>
7262 <p>
7263                     The default setting is <span><strong class="command">auto-dnssec off</strong></span>.
7264                   </p>
7265 </dd>
7266 <dt><span class="term"><span><strong class="command">multi-master</strong></span></span></dt>
7267 <dd><p>
7268                     See the description of <span><strong class="command">multi-master</strong></span> in
7269                     <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
7270                   </p></dd>
7271 <dt><span class="term"><span><strong class="command">masterfile-format</strong></span></span></dt>
7272 <dd><p>
7273                     See the description of <span><strong class="command">masterfile-format</strong></span>
7274                     in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
7275                   </p></dd>
7276 <dt><span class="term"><span><strong class="command">dnssec-secure-to-insecure</strong></span></span></dt>
7277 <dd><p>
7278                     See the description of
7279                     <span><strong class="command">dnssec-secure-to-insecure</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
7280                   </p></dd>
7281 </dl></div>
7282 </div>
7283 <div class="sect3" lang="en">
7284 <div class="titlepage"><div><div><h4 class="title">
7285 <a name="dynamic_update_policies"></a>Dynamic Update Policies</h4></div></div></div>
7286 <p><acronym class="acronym">BIND</acronym> 9 supports two alternative
7287               methods of granting clients the right to perform
7288               dynamic updates to a zone, configured by the
7289               <span><strong class="command">allow-update</strong></span> and
7290               <span><strong class="command">update-policy</strong></span> option, respectively.
7291             </p>
7292 <p>
7293               The <span><strong class="command">allow-update</strong></span> clause works the
7294               same way as in previous versions of <acronym class="acronym">BIND</acronym>.
7295               It grants given clients the permission to update any
7296               record of any name in the zone.
7297             </p>
7298 <p>
7299               The <span><strong class="command">update-policy</strong></span> clause
7300               allows more fine-grained control over what updates are
7301               allowed.  A set of rules is specified, where each rule
7302               either grants or denies permissions for one or more
7303               names to be updated by one or more identities.  If
7304               the dynamic update request message is signed (that is,
7305               it includes either a TSIG or SIG(0) record), the
7306               identity of the signer can be determined.
7307             </p>
7308 <p>
7309               Rules are specified in the <span><strong class="command">update-policy</strong></span>
7310               zone option, and are only meaningful for master zones.
7311               When the <span><strong class="command">update-policy</strong></span> statement
7312               is present, it is a configuration error for the
7313               <span><strong class="command">allow-update</strong></span> statement to be
7314               present.  The <span><strong class="command">update-policy</strong></span> statement
7315               only examines the signer of a message; the source
7316               address is not relevant.
7317             </p>
7318 <p>
7319               There is a pre-defined <span><strong class="command">update-policy</strong></span>
7320               rule which can be switched on with the command
7321               <span><strong class="command">update-policy local;</strong></span>.
7322               Switching on this rule in a zone causes
7323               <span><strong class="command">named</strong></span> to generate a TSIG session
7324               key and place it in a file, and to allow that key
7325               to update the zone.  (By default, the file is
7326               <code class="filename">/var/run/named/session.key</code>, the key
7327               name is "local-ddns" and the key algorithm is HMAC-SHA256,
7328               but these values are configurable with the
7329               <span><strong class="command">session-keyfile</strong></span>,
7330               <span><strong class="command">session-keyname</strong></span> and
7331               <span><strong class="command">session-keyalg</strong></span> options, respectively).
7332             </p>
7333 <p>
7334               A client running on the local system, and with appropriate
7335               permissions, may read that file and use the key to sign update
7336               requests.  The zone's update policy will be set to allow that
7337               key to change any record within the zone.  Assuming the
7338               key name is "local-ddns", this policy is equivalent to:
7339             </p>
7340 <pre class="programlisting">update-policy { grant local-ddns zonesub any; };
7341             </pre>
7342 <p>
7343               The command <span><strong class="command">nsupdate -l</strong></span> sends update
7344               requests to localhost, and signs them using the session key.
7345             </p>
7346 <p>
7347               Other rule definitions look like this:
7348             </p>
7349 <pre class="programlisting">
7350 ( <span><strong class="command">grant</strong></span> | <span><strong class="command">deny</strong></span> ) <em class="replaceable"><code>identity</code></em> <em class="replaceable"><code>nametype</code></em> [<span class="optional"> <em class="replaceable"><code>name</code></em> </span>] [<span class="optional"> <em class="replaceable"><code>types</code></em> </span>]
7351 </pre>
7352 <p>
7353               Each rule grants or denies privileges.  Once a message has
7354               successfully matched a rule, the operation is immediately
7355               granted or denied and no further rules are examined.  A rule
7356               is matched when the signer matches the identity field, the
7357               name matches the name field in accordance with the nametype
7358               field, and the type matches the types specified in the type
7359               field.
7360             </p>
7361 <p>
7362               No signer is required for <em class="replaceable"><code>tcp-self</code></em>
7363               or <em class="replaceable"><code>6to4-self</code></em> however the standard
7364               reverse mapping / prefix conversion must match the identity
7365               field.
7366             </p>
7367 <p>
7368               The identity field specifies a name or a wildcard
7369               name.  Normally, this is the name of the TSIG or
7370               SIG(0) key used to sign the update request.  When a
7371               TKEY exchange has been used to create a shared secret,
7372               the identity of the shared secret is the same as the
7373               identity of the key used to authenticate the TKEY
7374               exchange.  TKEY is also the negotiation method used
7375               by GSS-TSIG, which establishes an identity that is
7376               the Kerberos principal of the client, such as
7377               <strong class="userinput"><code>"user@host.domain"</code></strong>.  When the
7378               <em class="replaceable"><code>identity</code></em> field specifies
7379               a wildcard name, it is subject to DNS wildcard
7380               expansion, so the rule will apply to multiple identities.
7381               The <em class="replaceable"><code>identity</code></em> field must
7382               contain a fully-qualified domain name.
7383             </p>
7384 <p>
7385               For nametypes <code class="varname">krb5-self</code>,
7386               <code class="varname">ms-self</code>, <code class="varname">krb5-subdomain</code>,
7387               and <code class="varname">ms-subdomain</code> the
7388               <em class="replaceable"><code>identity</code></em> field specifies
7389               the Windows or Kerberos realm of the machine belongs to.
7390             </p>
7391 <p>
7392               The <em class="replaceable"><code>nametype</code></em> field has 13
7393               values:
7394               <code class="varname">name</code>, <code class="varname">subdomain</code>,
7395               <code class="varname">wildcard</code>, <code class="varname">self</code>,
7396               <code class="varname">selfsub</code>, <code class="varname">selfwild</code>,
7397               <code class="varname">krb5-self</code>, <code class="varname">ms-self</code>,
7398               <code class="varname">krb5-subdomain</code>,
7399               <code class="varname">ms-subdomain</code>,
7400               <code class="varname">tcp-self</code>, <code class="varname">6to4-self</code>,
7401               <code class="varname">zonesub</code>, and <code class="varname">external</code>.
7402             </p>
7403 <div class="informaltable"><table border="1">
7404 <colgroup>
7405 <col>
7406 <col>
7407 </colgroup>
7408 <tbody>
7409 <tr>
7410 <td>
7411                       <p>
7412                         <code class="varname">name</code>
7413                       </p>
7414                     </td>
7415 <td>
7416                       <p>
7417                         Exact-match semantics.  This rule matches
7418                         when the name being updated is identical
7419                         to the contents of the
7420                         <em class="replaceable"><code>name</code></em> field.
7421                       </p>
7422                     </td>
7423 </tr>
7424 <tr>
7425 <td>
7426                       <p>
7427                         <code class="varname">subdomain</code>
7428                       </p>
7429                     </td>
7430 <td>
7431                       <p>
7432                         This rule matches when the name being updated
7433                         is a subdomain of, or identical to, the
7434                         contents of the <em class="replaceable"><code>name</code></em>
7435                         field.
7436                       </p>
7437                     </td>
7438 </tr>
7439 <tr>
7440 <td>
7441                       <p>
7442                         <code class="varname">zonesub</code>
7443                       </p>
7444                     </td>
7445 <td>
7446                       <p>
7447                         This rule is similar to subdomain, except that
7448                         it matches when the name being updated is a
7449                         subdomain of the zone in which the
7450                         <span><strong class="command">update-policy</strong></span> statement
7451                         appears.  This obviates the need to type the zone
7452                         name twice, and enables the use of a standard
7453                         <span><strong class="command">update-policy</strong></span> statement in
7454                         multiple zones without modification.
7455                       </p>
7456                       <p>
7457                         When this rule is used, the
7458                         <em class="replaceable"><code>name</code></em> field is omitted.
7459                       </p>
7460                     </td>
7461 </tr>
7462 <tr>
7463 <td>
7464                       <p>
7465                         <code class="varname">wildcard</code>
7466                       </p>
7467                     </td>
7468 <td>
7469                       <p>
7470                         The <em class="replaceable"><code>name</code></em> field
7471                         is subject to DNS wildcard expansion, and
7472                         this rule matches when the name being updated
7473                         name is a valid expansion of the wildcard.
7474                       </p>
7475                     </td>
7476 </tr>
7477 <tr>
7478 <td>
7479                       <p>
7480                         <code class="varname">self</code>
7481                       </p>
7482                     </td>
7483 <td>
7484                       <p>
7485                         This rule matches when the name being updated
7486                         matches the contents of the
7487                         <em class="replaceable"><code>identity</code></em> field.
7488                         The <em class="replaceable"><code>name</code></em> field
7489                         is ignored, but should be the same as the
7490                         <em class="replaceable"><code>identity</code></em> field.
7491                         The <code class="varname">self</code> nametype is
7492                         most useful when allowing using one key per
7493                         name to update, where the key has the same
7494                         name as the name to be updated.  The
7495                         <em class="replaceable"><code>identity</code></em> would
7496                         be specified as <code class="constant">*</code> (an asterisk) in
7497                         this case.
7498                       </p>
7499                     </td>
7500 </tr>
7501 <tr>
7502 <td>
7503                       <p>
7504                         <code class="varname">selfsub</code>
7505                       </p>
7506                     </td>
7507 <td>
7508                       <p>
7509                         This rule is similar to <code class="varname">self</code>
7510                         except that subdomains of <code class="varname">self</code>
7511                         can also be updated.
7512                       </p>
7513                     </td>
7514 </tr>
7515 <tr>
7516 <td>
7517                       <p>
7518                         <code class="varname">selfwild</code>
7519                       </p>
7520                     </td>
7521 <td>
7522                       <p>
7523                         This rule is similar to <code class="varname">self</code>
7524                         except that only subdomains of
7525                         <code class="varname">self</code> can be updated.
7526                       </p>
7527                     </td>
7528 </tr>
7529 <tr>
7530 <td>
7531                       <p>
7532                         <code class="varname">ms-self</code>
7533                       </p>
7534                     </td>
7535 <td>
7536                       <p>
7537                         This rule takes a Windows machine principal
7538                         (machine$@REALM) for machine in REALM and
7539                         and converts it machine.realm allowing the machine 
7540                         to update machine.realm.  The REALM to be matched
7541                         is specified in the <em class="replaceable"><code>identity</code></em>
7542                         field.
7543                       </p>
7544                     </td>
7545 </tr>
7546 <tr>
7547 <td>
7548                       <p>
7549                         <code class="varname">ms-subdomain</code>
7550                       </p>
7551                     </td>
7552 <td>
7553                       <p>
7554                         This rule takes a Windows machine principal 
7555                         (machine$@REALM) for machine in REALM and
7556                         converts it to machine.realm allowing the machine
7557                         to update subdomains of machine.realm.  The REALM
7558                         to be matched is specified in the
7559                         <em class="replaceable"><code>identity</code></em> field.
7560                       </p>
7561                     </td>
7562 </tr>
7563 <tr>
7564 <td>
7565                       <p>
7566                         <code class="varname">krb5-self</code>
7567                       </p>
7568                     </td>
7569 <td>
7570                       <p>
7571                         This rule takes a Kerberos machine principal
7572                         (host/machine@REALM) for machine in REALM and
7573                         and converts it machine.realm allowing the machine 
7574                         to update machine.realm.  The REALM to be matched
7575                         is specified in the <em class="replaceable"><code>identity</code></em>
7576                         field.
7577                       </p>
7578                     </td>
7579 </tr>
7580 <tr>
7581 <td>
7582                       <p>
7583                         <code class="varname">krb5-subdomain</code>
7584                       </p>
7585                     </td>
7586 <td>
7587                       <p>
7588                         This rule takes a Kerberos machine principal 
7589                         (host/machine@REALM) for machine in REALM and
7590                         converts it to machine.realm allowing the machine
7591                         to update subdomains of machine.realm.  The REALM
7592                         to be matched is specified in the
7593                         <em class="replaceable"><code>identity</code></em> field.
7594                       </p>
7595                     </td>
7596 </tr>
7597 <tr>
7598 <td>
7599                       <p>
7600                         <code class="varname">tcp-self</code>
7601                       </p>
7602                     </td>
7603 <td>
7604                       <p>
7605                         Allow updates that have been sent via TCP and
7606                         for which the standard mapping from the initiating
7607                         IP address into the IN-ADDR.ARPA and IP6.ARPA
7608                         namespaces match the name to be updated.
7609                       </p>
7610                       <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
7611 <h3 class="title">Note</h3>
7612                         It is theoretically possible to spoof these TCP
7613                         sessions.
7614                       </div>
7615                     </td>
7616 </tr>
7617 <tr>
7618 <td>
7619                       <p>
7620                         <code class="varname">6to4-self</code>
7621                       </p>
7622                     </td>
7623 <td>
7624                       <p>
7625                         Allow the 6to4 prefix to be update by any TCP
7626                         connection from the 6to4 network or from the
7627                         corresponding IPv4 address.  This is intended
7628                         to allow NS or DNAME RRsets to be added to the
7629                         reverse tree.
7630                       </p>
7631                       <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
7632 <h3 class="title">Note</h3>
7633                         It is theoretically possible to spoof these TCP
7634                         sessions.
7635                       </div>
7636                     </td>
7637 </tr>
7638 <tr>
7639 <td>
7640                       <p>
7641                         <code class="varname">external</code>
7642                       </p>
7643                     </td>
7644 <td>
7645                       <p>
7646                         This rule allows <span><strong class="command">named</strong></span>
7647                         to defer the decision of whether to allow a
7648                         given update to an external daemon.
7649                       </p>
7650                       <p>
7651                         The method of communicating with the daemon is
7652                         specified in the <em class="replaceable"><code>identity</code></em>
7653                         field, the format of which is
7654                         "<code class="constant">local:</code><em class="replaceable"><code>path</code></em>",
7655                         where <em class="replaceable"><code>path</code></em> is the location
7656                         of a UNIX-domain socket.  (Currently, "local" is the
7657                         only supported mechanism.)
7658                       </p>
7659                       <p>
7660                         Requests to the external daemon are sent over the
7661                         UNIX-domain socket as datagrams with the following
7662                         format:
7663                       </p>
7664                       <pre class="programlisting">
7665    Protocol version number (4 bytes, network byte order, currently 1)
7666    Request length (4 bytes, network byte order)
7667    Signer (null-terminated string)
7668    Name (null-terminated string)
7669    TCP source address (null-terminated string)
7670    Rdata type (null-terminated string)
7671    Key (null-terminated string)
7672    TKEY token length (4 bytes, network byte order)
7673    TKEY token (remainder of packet)</pre>
7674                       <p>
7675                         The daemon replies with a four-byte value in
7676                         network byte order, containing either 0 or 1; 0
7677                         indicates that the specified update is not
7678                         permitted, and 1 indicates that it is.
7679                       </p>
7680                     </td>
7681 </tr>
7682 </tbody>
7683 </table></div>
7684 <p>
7685               In all cases, the <em class="replaceable"><code>name</code></em>
7686               field must specify a fully-qualified domain name.
7687             </p>
7688 <p>
7689               If no types are explicitly specified, this rule matches
7690               all types except RRSIG, NS, SOA, NSEC and NSEC3. Types
7691               may be specified by name, including "ANY" (ANY matches
7692               all types except NSEC and NSEC3, which can never be
7693               updated).  Note that when an attempt is made to delete
7694               all records associated with a name, the rules are
7695               checked for each existing record type.
7696             </p>
7697 </div>
7698 </div>
7699 </div>
7700 <div class="sect1" lang="en">
7701 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
7702 <a name="id2595170"></a>Zone File</h2></div></div></div>
7703 <div class="sect2" lang="en">
7704 <div class="titlepage"><div><div><h3 class="title">
7705 <a name="types_of_resource_records_and_when_to_use_them"></a>Types of Resource Records and When to Use Them</h3></div></div></div>
7706 <p>
7707             This section, largely borrowed from RFC 1034, describes the
7708             concept of a Resource Record (RR) and explains when each is used.
7709             Since the publication of RFC 1034, several new RRs have been
7710             identified
7711             and implemented in the DNS. These are also included.
7712           </p>
7713 <div class="sect3" lang="en">
7714 <div class="titlepage"><div><div><h4 class="title">
7715 <a name="id2595188"></a>Resource Records</h4></div></div></div>
7716 <p>
7717               A domain name identifies a node.  Each node has a set of
7718               resource information, which may be empty.  The set of resource
7719               information associated with a particular name is composed of
7720               separate RRs. The order of RRs in a set is not significant and
7721               need not be preserved by name servers, resolvers, or other
7722               parts of the DNS. However, sorting of multiple RRs is
7723               permitted for optimization purposes, for example, to specify
7724               that a particular nearby server be tried first. See <a href="Bv9ARM.ch06.html#the_sortlist_statement" title="The sortlist Statement">the section called &#8220;The <span><strong class="command">sortlist</strong></span> Statement&#8221;</a> and <a href="Bv9ARM.ch06.html#rrset_ordering" title="RRset Ordering">the section called &#8220;RRset Ordering&#8221;</a>.
7725             </p>
7726 <p>
7727               The components of a Resource Record are:
7728             </p>
7729 <div class="informaltable"><table border="1">
7730 <colgroup>
7731 <col>
7732 <col>
7733 </colgroup>
7734 <tbody>
7735 <tr>
7736 <td>
7737                       <p>
7738                         owner name
7739                       </p>
7740                     </td>
7741 <td>
7742                       <p>
7743                         The domain name where the RR is found.
7744                       </p>
7745                     </td>
7746 </tr>
7747 <tr>
7748 <td>
7749                       <p>
7750                         type
7751                       </p>
7752                     </td>
7753 <td>
7754                       <p>
7755                         An encoded 16-bit value that specifies
7756                         the type of the resource record.
7757                       </p>
7758                     </td>
7759 </tr>
7760 <tr>
7761 <td>
7762                       <p>
7763                         TTL
7764                       </p>
7765                     </td>
7766 <td>
7767                       <p>
7768                         The time-to-live of the RR. This field
7769                         is a 32-bit integer in units of seconds, and is
7770                         primarily used by
7771                         resolvers when they cache RRs. The TTL describes how
7772                         long a RR can
7773                         be cached before it should be discarded.
7774                       </p>
7775                     </td>
7776 </tr>
7777 <tr>
7778 <td>
7779                       <p>
7780                         class
7781                       </p>
7782                     </td>
7783 <td>
7784                       <p>
7785                         An encoded 16-bit value that identifies
7786                         a protocol family or instance of a protocol.
7787                       </p>
7788                     </td>
7789 </tr>
7790 <tr>
7791 <td>
7792                       <p>
7793                         RDATA
7794                       </p>
7795                     </td>
7796 <td>
7797                       <p>
7798                         The resource data.  The format of the
7799                         data is type (and sometimes class) specific.
7800                       </p>
7801                     </td>
7802 </tr>
7803 </tbody>
7804 </table></div>
7805 <p>
7806               The following are <span class="emphasis"><em>types</em></span> of valid RRs:
7807             </p>
7808 <div class="informaltable"><table border="1">
7809 <colgroup>
7810 <col>
7811 <col>
7812 </colgroup>
7813 <tbody>
7814 <tr>
7815 <td>
7816                       <p>
7817                         A
7818                       </p>
7819                     </td>
7820 <td>
7821                       <p>
7822                         A host address.  In the IN class, this is a
7823                         32-bit IP address.  Described in RFC 1035.
7824                       </p>
7825                     </td>
7826 </tr>
7827 <tr>
7828 <td>
7829                       <p>
7830                         AAAA
7831                       </p>
7832                     </td>
7833 <td>
7834                       <p>
7835                         IPv6 address.  Described in RFC 1886.
7836                       </p>
7837                     </td>
7838 </tr>
7839 <tr>
7840 <td>
7841                       <p>
7842                         A6
7843                       </p>
7844                     </td>
7845 <td>
7846                       <p>
7847                         IPv6 address.  This can be a partial
7848                         address (a suffix) and an indirection to the name
7849                         where the rest of the
7850                         address (the prefix) can be found.  Experimental.
7851                         Described in RFC 2874.
7852                       </p>
7853                     </td>
7854 </tr>
7855 <tr>
7856 <td>
7857                       <p>
7858                         AFSDB
7859                       </p>
7860                     </td>
7861 <td>
7862                       <p>
7863                         Location of AFS database servers.
7864                         Experimental.  Described in RFC 1183.
7865                       </p>
7866                     </td>
7867 </tr>
7868 <tr>
7869 <td>
7870                       <p>
7871                         APL
7872                       </p>
7873                     </td>
7874 <td>
7875                       <p>
7876                         Address prefix list.  Experimental.
7877                         Described in RFC 3123.
7878                       </p>
7879                     </td>
7880 </tr>
7881 <tr>
7882 <td>
7883                       <p>
7884                         CERT
7885                       </p>
7886                     </td>
7887 <td>
7888                       <p>
7889                         Holds a digital certificate.
7890                         Described in RFC 2538.
7891                       </p>
7892                     </td>
7893 </tr>
7894 <tr>
7895 <td>
7896                       <p>
7897                         CNAME
7898                       </p>
7899                     </td>
7900 <td>
7901                       <p>
7902                         Identifies the canonical name of an alias.
7903                         Described in RFC 1035.
7904                       </p>
7905                     </td>
7906 </tr>
7907 <tr>
7908 <td>
7909                       <p>
7910                         DHCID
7911                       </p>
7912                     </td>
7913 <td>
7914                       <p>
7915                         Is used for identifying which DHCP client is
7916                         associated with this name.  Described in RFC 4701.
7917                       </p>
7918                     </td>
7919 </tr>
7920 <tr>
7921 <td>
7922                       <p>
7923                         DNAME
7924                       </p>
7925                     </td>
7926 <td>
7927                       <p>
7928                         Replaces the domain name specified with
7929                         another name to be looked up, effectively aliasing an
7930                         entire
7931                         subtree of the domain name space rather than a single
7932                         record
7933                         as in the case of the CNAME RR.
7934                         Described in RFC 2672.
7935                       </p>
7936                     </td>
7937 </tr>
7938 <tr>
7939 <td>
7940                       <p>
7941                         DNSKEY
7942                       </p>
7943                     </td>
7944 <td>
7945                       <p>
7946                         Stores a public key associated with a signed
7947                         DNS zone.  Described in RFC 4034.
7948                       </p>
7949                     </td>
7950 </tr>
7951 <tr>
7952 <td>
7953                       <p>
7954                         DS
7955                       </p>
7956                     </td>
7957 <td>
7958                       <p>
7959                         Stores the hash of a public key associated with a
7960                         signed DNS zone.  Described in RFC 4034.
7961                       </p>
7962                     </td>
7963 </tr>
7964 <tr>
7965 <td>
7966                       <p>
7967                         GPOS
7968                       </p>
7969                     </td>
7970 <td>
7971                       <p>
7972                         Specifies the global position.  Superseded by LOC.
7973                       </p>
7974                     </td>
7975 </tr>
7976 <tr>
7977 <td>
7978                       <p>
7979                         HINFO
7980                       </p>
7981                     </td>
7982 <td>
7983                       <p>
7984                         Identifies the CPU and OS used by a host.
7985                         Described in RFC 1035.
7986                       </p>
7987                     </td>
7988 </tr>
7989 <tr>
7990 <td>
7991                       <p>
7992                         IPSECKEY
7993                       </p>
7994                     </td>
7995 <td>
7996                       <p>
7997                         Provides a method for storing IPsec keying material in
7998                         DNS.  Described in RFC 4025.
7999                       </p>
8000                     </td>
8001 </tr>
8002 <tr>
8003 <td>
8004                       <p>
8005                         ISDN
8006                       </p>
8007                     </td>
8008 <td>
8009                       <p>
8010                         Representation of ISDN addresses.
8011                         Experimental.  Described in RFC 1183.
8012                       </p>
8013                     </td>
8014 </tr>
8015 <tr>
8016 <td>
8017                       <p>
8018                         KEY
8019                       </p>
8020                     </td>
8021 <td>
8022                       <p>
8023                         Stores a public key associated with a
8024                         DNS name.  Used in original DNSSEC; replaced
8025                         by DNSKEY in DNSSECbis, but still used with
8026                         SIG(0).  Described in RFCs 2535 and 2931.
8027                       </p>
8028                     </td>
8029 </tr>
8030 <tr>
8031 <td>
8032                       <p>
8033                         KX
8034                       </p>
8035                     </td>
8036 <td>
8037                       <p>
8038                         Identifies a key exchanger for this
8039                         DNS name.  Described in RFC 2230.
8040                       </p>
8041                     </td>
8042 </tr>
8043 <tr>
8044 <td>
8045                       <p>
8046                         LOC
8047                       </p>
8048                     </td>
8049 <td>
8050                       <p>
8051                         For storing GPS info.  Described in RFC 1876.
8052                         Experimental.
8053                       </p>
8054                     </td>
8055 </tr>
8056 <tr>
8057 <td>
8058                       <p>
8059                         MX
8060                       </p>
8061                     </td>
8062 <td>
8063                       <p>
8064                         Identifies a mail exchange for the domain with
8065                         a 16-bit preference value (lower is better)
8066                         followed by the host name of the mail exchange.
8067                         Described in RFC 974, RFC 1035.
8068                       </p>
8069                     </td>
8070 </tr>
8071 <tr>
8072 <td>
8073                       <p>
8074                         NAPTR
8075                       </p>
8076                     </td>
8077 <td>
8078                       <p>
8079                         Name authority pointer.  Described in RFC 2915.
8080                       </p>
8081                     </td>
8082 </tr>
8083 <tr>
8084 <td>
8085                       <p>
8086                         NSAP
8087                       </p>
8088                     </td>
8089 <td>
8090                       <p>
8091                         A network service access point.
8092                         Described in RFC 1706.
8093                       </p>
8094                     </td>
8095 </tr>
8096 <tr>
8097 <td>
8098                       <p>
8099                         NS
8100                       </p>
8101                     </td>
8102 <td>
8103                       <p>
8104                         The authoritative name server for the
8105                         domain.  Described in RFC 1035.
8106                       </p>
8107                     </td>
8108 </tr>
8109 <tr>
8110 <td>
8111                       <p>
8112                         NSEC
8113                       </p>
8114                     </td>
8115 <td>
8116                       <p>
8117                         Used in DNSSECbis to securely indicate that
8118                         RRs with an owner name in a certain name interval do
8119                         not exist in
8120                         a zone and indicate what RR types are present for an
8121                         existing name.
8122                         Described in RFC 4034.
8123                       </p>
8124                     </td>
8125 </tr>
8126 <tr>
8127 <td>
8128                       <p>
8129                         NSEC3
8130                       </p>
8131                     </td>
8132 <td>
8133                       <p>
8134                         Used in DNSSECbis to securely indicate that
8135                         RRs with an owner name in a certain name
8136                         interval do not exist in a zone and indicate
8137                         what RR types are present for an existing
8138                         name.  NSEC3 differs from NSEC in that it
8139                         prevents zone enumeration but is more
8140                         computationally expensive on both the server
8141                         and the client than NSEC.  Described in RFC
8142                         5155.
8143                       </p>
8144                     </td>
8145 </tr>
8146 <tr>
8147 <td>
8148                       <p>
8149                         NSEC3PARAM
8150                       </p>
8151                     </td>
8152 <td>
8153                       <p>
8154                         Used in DNSSECbis to tell the authoritative
8155                         server which NSEC3 chains are available to use.
8156                         Described in RFC 5155.
8157                       </p>
8158                     </td>
8159 </tr>
8160 <tr>
8161 <td>
8162                       <p>
8163                         NXT
8164                       </p>
8165                     </td>
8166 <td>
8167                       <p>
8168                         Used in DNSSEC to securely indicate that
8169                         RRs with an owner name in a certain name interval do
8170                         not exist in
8171                         a zone and indicate what RR types are present for an
8172                         existing name.
8173                         Used in original DNSSEC; replaced by NSEC in
8174                         DNSSECbis.
8175                         Described in RFC 2535.
8176                       </p>
8177                     </td>
8178 </tr>
8179 <tr>
8180 <td>
8181                       <p>
8182                         PTR
8183                       </p>
8184                     </td>
8185 <td>
8186                       <p>
8187                         A pointer to another part of the domain
8188                         name space.  Described in RFC 1035.
8189                       </p>
8190                     </td>
8191 </tr>
8192 <tr>
8193 <td>
8194                       <p>
8195                         PX
8196                       </p>
8197                     </td>
8198 <td>
8199                       <p>
8200                         Provides mappings between RFC 822 and X.400
8201                         addresses.  Described in RFC 2163.
8202                       </p>
8203                     </td>
8204 </tr>
8205 <tr>
8206 <td>
8207                       <p>
8208                         RP
8209                       </p>
8210                     </td>
8211 <td>
8212                       <p>
8213                         Information on persons responsible
8214                         for the domain.  Experimental.  Described in RFC 1183.
8215                       </p>
8216                     </td>
8217 </tr>
8218 <tr>
8219 <td>
8220                       <p>
8221                         RRSIG
8222                       </p>
8223                     </td>
8224 <td>
8225                       <p>
8226                         Contains DNSSECbis signature data.  Described
8227                         in RFC 4034.
8228                       </p>
8229                     </td>
8230 </tr>
8231 <tr>
8232 <td>
8233                       <p>
8234                         RT
8235                       </p>
8236                     </td>
8237 <td>
8238                       <p>
8239                         Route-through binding for hosts that
8240                         do not have their own direct wide area network
8241                         addresses.
8242                         Experimental.  Described in RFC 1183.
8243                       </p>
8244                     </td>
8245 </tr>
8246 <tr>
8247 <td>
8248                       <p>
8249                         SIG
8250                       </p>
8251                     </td>
8252 <td>
8253                       <p>
8254                         Contains DNSSEC signature data.  Used in
8255                         original DNSSEC; replaced by RRSIG in
8256                         DNSSECbis, but still used for SIG(0).
8257                         Described in RFCs 2535 and 2931.
8258                       </p>
8259                     </td>
8260 </tr>
8261 <tr>
8262 <td>
8263                       <p>
8264                         SOA
8265                       </p>
8266                     </td>
8267 <td>
8268                       <p>
8269                         Identifies the start of a zone of authority.
8270                         Described in RFC 1035.
8271                       </p>
8272                     </td>
8273 </tr>
8274 <tr>
8275 <td>
8276                       <p>
8277                         SPF
8278                       </p>
8279                     </td>
8280 <td>
8281                       <p>
8282                         Contains the Sender Policy Framework information
8283                         for a given email domain.  Described in RFC 4408.
8284                       </p>
8285                     </td>
8286 </tr>
8287 <tr>
8288 <td>
8289                       <p>
8290                         SRV
8291                       </p>
8292                     </td>
8293 <td>
8294                       <p>
8295                         Information about well known network
8296                         services (replaces WKS).  Described in RFC 2782.
8297                       </p>
8298                     </td>
8299 </tr>
8300 <tr>
8301 <td>
8302                       <p>
8303                         SSHFP
8304                       </p>
8305                     </td>
8306 <td>
8307                       <p>
8308                         Provides a way to securely publish a secure shell key's
8309                         fingerprint.  Described in RFC 4255.
8310                       </p>
8311                     </td>
8312 </tr>
8313 <tr>
8314 <td>
8315                       <p>
8316                         TXT
8317                       </p>
8318                     </td>
8319 <td>
8320                       <p>
8321                         Text records.  Described in RFC 1035.
8322                       </p>
8323                     </td>
8324 </tr>
8325 <tr>
8326 <td>
8327                       <p>
8328                         WKS
8329                       </p>
8330                     </td>
8331 <td>
8332                       <p>
8333                         Information about which well known
8334                         network services, such as SMTP, that a domain
8335                         supports. Historical.
8336                       </p>
8337                     </td>
8338 </tr>
8339 <tr>
8340 <td>
8341                       <p>
8342                         X25
8343                       </p>
8344                     </td>
8345 <td>
8346                       <p>
8347                         Representation of X.25 network addresses.
8348                         Experimental.  Described in RFC 1183.
8349                       </p>
8350                     </td>
8351 </tr>
8352 </tbody>
8353 </table></div>
8354 <p>
8355               The following <span class="emphasis"><em>classes</em></span> of resource records
8356               are currently valid in the DNS:
8357             </p>
8358 <div class="informaltable"><table border="1">
8359 <colgroup>
8360 <col>
8361 <col>
8362 </colgroup>
8363 <tbody>
8364 <tr>
8365 <td>
8366                       <p>
8367                         IN
8368                       </p>
8369                     </td>
8370 <td>
8371                       <p>
8372                         The Internet.
8373                       </p>
8374                     </td>
8375 </tr>
8376 <tr>
8377 <td>
8378                       <p>
8379                         CH
8380                       </p>
8381                     </td>
8382 <td>
8383                       <p>
8384                         Chaosnet, a LAN protocol created at MIT in the
8385                         mid-1970s.
8386                         Rarely used for its historical purpose, but reused for
8387                         BIND's
8388                         built-in server information zones, e.g.,
8389                         <code class="literal">version.bind</code>.
8390                       </p>
8391                     </td>
8392 </tr>
8393 <tr>
8394 <td>
8395                       <p>
8396                         HS
8397                       </p>
8398                     </td>
8399 <td>
8400                       <p>
8401                         Hesiod, an information service
8402                         developed by MIT's Project Athena. It is used to share
8403                         information
8404                         about various systems databases, such as users,
8405                         groups, printers
8406                         and so on.
8407                       </p>
8408                     </td>
8409 </tr>
8410 </tbody>
8411 </table></div>
8412 <p>
8413               The owner name is often implicit, rather than forming an
8414               integral
8415               part of the RR.  For example, many name servers internally form
8416               tree
8417               or hash structures for the name space, and chain RRs off nodes.
8418               The remaining RR parts are the fixed header (type, class, TTL)
8419               which is consistent for all RRs, and a variable part (RDATA)
8420               that
8421               fits the needs of the resource being described.
8422             </p>
8423 <p>
8424               The meaning of the TTL field is a time limit on how long an
8425               RR can be kept in a cache.  This limit does not apply to
8426               authoritative
8427               data in zones; it is also timed out, but by the refreshing
8428               policies
8429               for the zone.  The TTL is assigned by the administrator for the
8430               zone where the data originates.  While short TTLs can be used to
8431               minimize caching, and a zero TTL prohibits caching, the
8432               realities
8433               of Internet performance suggest that these times should be on
8434               the
8435               order of days for the typical host.  If a change can be
8436               anticipated,
8437               the TTL can be reduced prior to the change to minimize
8438               inconsistency
8439               during the change, and then increased back to its former value
8440               following
8441               the change.
8442             </p>
8443 <p>
8444               The data in the RDATA section of RRs is carried as a combination
8445               of binary strings and domain names.  The domain names are
8446               frequently
8447               used as "pointers" to other data in the DNS.
8448             </p>
8449 </div>
8450 <div class="sect3" lang="en">
8451 <div class="titlepage"><div><div><h4 class="title">
8452 <a name="id2596880"></a>Textual expression of RRs</h4></div></div></div>
8453 <p>
8454               RRs are represented in binary form in the packets of the DNS
8455               protocol, and are usually represented in highly encoded form
8456               when
8457               stored in a name server or resolver.  In the examples provided
8458               in
8459               RFC 1034, a style similar to that used in master files was
8460               employed
8461               in order to show the contents of RRs.  In this format, most RRs
8462               are shown on a single line, although continuation lines are
8463               possible
8464               using parentheses.
8465             </p>
8466 <p>
8467               The start of the line gives the owner of the RR.  If a line
8468               begins with a blank, then the owner is assumed to be the same as
8469               that of the previous RR.  Blank lines are often included for
8470               readability.
8471             </p>
8472 <p>
8473               Following the owner, we list the TTL, type, and class of the
8474               RR.  Class and type use the mnemonics defined above, and TTL is
8475               an integer before the type field.  In order to avoid ambiguity
8476               in
8477               parsing, type and class mnemonics are disjoint, TTLs are
8478               integers,
8479               and the type mnemonic is always last. The IN class and TTL
8480               values
8481               are often omitted from examples in the interests of clarity.
8482             </p>
8483 <p>
8484               The resource data or RDATA section of the RR are given using
8485               knowledge of the typical representation for the data.
8486             </p>
8487 <p>
8488               For example, we might show the RRs carried in a message as:
8489             </p>
8490 <div class="informaltable"><table border="1">
8491 <colgroup>
8492 <col>
8493 <col>
8494 <col>
8495 </colgroup>
8496 <tbody>
8497 <tr>
8498 <td>
8499                       <p>
8500                         <code class="literal">ISI.EDU.</code>
8501                       </p>
8502                     </td>
8503 <td>
8504                       <p>
8505                         <code class="literal">MX</code>
8506                       </p>
8507                     </td>
8508 <td>
8509                       <p>
8510                         <code class="literal">10 VENERA.ISI.EDU.</code>
8511                       </p>
8512                     </td>
8513 </tr>
8514 <tr>
8515 <td>
8516                       <p></p>
8517                     </td>
8518 <td>
8519                       <p>
8520                         <code class="literal">MX</code>
8521                       </p>
8522                     </td>
8523 <td>
8524                       <p>
8525                         <code class="literal">10 VAXA.ISI.EDU</code>
8526                       </p>
8527                     </td>
8528 </tr>
8529 <tr>
8530 <td>
8531                       <p>
8532                         <code class="literal">VENERA.ISI.EDU</code>
8533                       </p>
8534                     </td>
8535 <td>
8536                       <p>
8537                         <code class="literal">A</code>
8538                       </p>
8539                     </td>
8540 <td>
8541                       <p>
8542                         <code class="literal">128.9.0.32</code>
8543                       </p>
8544                     </td>
8545 </tr>
8546 <tr>
8547 <td>
8548                       <p></p>
8549                     </td>
8550 <td>
8551                       <p>
8552                         <code class="literal">A</code>
8553                       </p>
8554                     </td>
8555 <td>
8556                       <p>
8557                         <code class="literal">10.1.0.52</code>
8558                       </p>
8559                     </td>
8560 </tr>
8561 <tr>
8562 <td>
8563                       <p>
8564                         <code class="literal">VAXA.ISI.EDU</code>
8565                       </p>
8566                     </td>
8567 <td>
8568                       <p>
8569                         <code class="literal">A</code>
8570                       </p>
8571                     </td>
8572 <td>
8573                       <p>
8574                         <code class="literal">10.2.0.27</code>
8575                       </p>
8576                     </td>
8577 </tr>
8578 <tr>
8579 <td>
8580                       <p></p>
8581                     </td>
8582 <td>
8583                       <p>
8584                         <code class="literal">A</code>
8585                       </p>
8586                     </td>
8587 <td>
8588                       <p>
8589                         <code class="literal">128.9.0.33</code>
8590                       </p>
8591                     </td>
8592 </tr>
8593 </tbody>
8594 </table></div>
8595 <p>
8596               The MX RRs have an RDATA section which consists of a 16-bit
8597               number followed by a domain name.  The address RRs use a
8598               standard
8599               IP address format to contain a 32-bit internet address.
8600             </p>
8601 <p>
8602               The above example shows six RRs, with two RRs at each of three
8603               domain names.
8604             </p>
8605 <p>
8606               Similarly we might see:
8607             </p>
8608 <div class="informaltable"><table border="1">
8609 <colgroup>
8610 <col>
8611 <col>
8612 <col>
8613 </colgroup>
8614 <tbody>
8615 <tr>
8616 <td>
8617                       <p>
8618                         <code class="literal">XX.LCS.MIT.EDU.</code>
8619                       </p>
8620                     </td>
8621 <td>
8622                       <p>
8623                         <code class="literal">IN A</code>
8624                       </p>
8625                     </td>
8626 <td>
8627                       <p>
8628                         <code class="literal">10.0.0.44</code>
8629                       </p>
8630                     </td>
8631 </tr>
8632 <tr>
8633 <td> </td>
8634 <td>
8635                       <p>
8636                         <code class="literal">CH A</code>
8637                       </p>
8638                     </td>
8639 <td>
8640                       <p>
8641                         <code class="literal">MIT.EDU. 2420</code>
8642                       </p>
8643                     </td>
8644 </tr>
8645 </tbody>
8646 </table></div>
8647 <p>
8648               This example shows two addresses for
8649               <code class="literal">XX.LCS.MIT.EDU</code>, each of a different class.
8650             </p>
8651 </div>
8652 </div>
8653 <div class="sect2" lang="en">
8654 <div class="titlepage"><div><div><h3 class="title">
8655 <a name="id2597537"></a>Discussion of MX Records</h3></div></div></div>
8656 <p>
8657             As described above, domain servers store information as a
8658             series of resource records, each of which contains a particular
8659             piece of information about a given domain name (which is usually,
8660             but not always, a host). The simplest way to think of a RR is as
8661             a typed pair of data, a domain name matched with a relevant datum,
8662             and stored with some additional type information to help systems
8663             determine when the RR is relevant.
8664           </p>
8665 <p>
8666             MX records are used to control delivery of email. The data
8667             specified in the record is a priority and a domain name. The
8668             priority
8669             controls the order in which email delivery is attempted, with the
8670             lowest number first. If two priorities are the same, a server is
8671             chosen randomly. If no servers at a given priority are responding,
8672             the mail transport agent will fall back to the next largest
8673             priority.
8674             Priority numbers do not have any absolute meaning &#8212; they are
8675             relevant
8676             only respective to other MX records for that domain name. The
8677             domain
8678             name given is the machine to which the mail will be delivered.
8679             It <span class="emphasis"><em>must</em></span> have an associated address record
8680             (A or AAAA) &#8212; CNAME is not sufficient.
8681           </p>
8682 <p>
8683             For a given domain, if there is both a CNAME record and an
8684             MX record, the MX record is in error, and will be ignored.
8685             Instead,
8686             the mail will be delivered to the server specified in the MX
8687             record
8688             pointed to by the CNAME.
8689             For example:
8690           </p>
8691 <div class="informaltable"><table border="1">
8692 <colgroup>
8693 <col>
8694 <col>
8695 <col>
8696 <col>
8697 <col>
8698 </colgroup>
8699 <tbody>
8700 <tr>
8701 <td>
8702                     <p>
8703                       <code class="literal">example.com.</code>
8704                     </p>
8705                   </td>
8706 <td>
8707                     <p>
8708                       <code class="literal">IN</code>
8709                     </p>
8710                   </td>
8711 <td>
8712                     <p>
8713                       <code class="literal">MX</code>
8714                     </p>
8715                   </td>
8716 <td>
8717                     <p>
8718                       <code class="literal">10</code>
8719                     </p>
8720                   </td>
8721 <td>
8722                     <p>
8723                       <code class="literal">mail.example.com.</code>
8724                     </p>
8725                   </td>
8726 </tr>
8727 <tr>
8728 <td>
8729                     <p></p>
8730                   </td>
8731 <td>
8732                     <p>
8733                       <code class="literal">IN</code>
8734                     </p>
8735                   </td>
8736 <td>
8737                     <p>
8738                       <code class="literal">MX</code>
8739                     </p>
8740                   </td>
8741 <td>
8742                     <p>
8743                       <code class="literal">10</code>
8744                     </p>
8745                   </td>
8746 <td>
8747                     <p>
8748                       <code class="literal">mail2.example.com.</code>
8749                     </p>
8750                   </td>
8751 </tr>
8752 <tr>
8753 <td>
8754                     <p></p>
8755                   </td>
8756 <td>
8757                     <p>
8758                       <code class="literal">IN</code>
8759                     </p>
8760                   </td>
8761 <td>
8762                     <p>
8763                       <code class="literal">MX</code>
8764                     </p>
8765                   </td>
8766 <td>
8767                     <p>
8768                       <code class="literal">20</code>
8769                     </p>
8770                   </td>
8771 <td>
8772                     <p>
8773                       <code class="literal">mail.backup.org.</code>
8774                     </p>
8775                   </td>
8776 </tr>
8777 <tr>
8778 <td>
8779                     <p>
8780                       <code class="literal">mail.example.com.</code>
8781                     </p>
8782                   </td>
8783 <td>
8784                     <p>
8785                       <code class="literal">IN</code>
8786                     </p>
8787                   </td>
8788 <td>
8789                     <p>
8790                       <code class="literal">A</code>
8791                     </p>
8792                   </td>
8793 <td>
8794                     <p>
8795                       <code class="literal">10.0.0.1</code>
8796                     </p>
8797                   </td>
8798 <td>
8799                     <p></p>
8800                   </td>
8801 </tr>
8802 <tr>
8803 <td>
8804                     <p>
8805                       <code class="literal">mail2.example.com.</code>
8806                     </p>
8807                   </td>
8808 <td>
8809                     <p>
8810                       <code class="literal">IN</code>
8811                     </p>
8812                   </td>
8813 <td>
8814                     <p>
8815                       <code class="literal">A</code>
8816                     </p>
8817                   </td>
8818 <td>
8819                     <p>
8820                       <code class="literal">10.0.0.2</code>
8821                     </p>
8822                   </td>
8823 <td>
8824                     <p></p>
8825                   </td>
8826 </tr>
8827 </tbody>
8828 </table></div>
8829 <p>
8830             Mail delivery will be attempted to <code class="literal">mail.example.com</code> and
8831             <code class="literal">mail2.example.com</code> (in
8832             any order), and if neither of those succeed, delivery to <code class="literal">mail.backup.org</code> will
8833             be attempted.
8834           </p>
8835 </div>
8836 <div class="sect2" lang="en">
8837 <div class="titlepage"><div><div><h3 class="title">
8838 <a name="Setting_TTLs"></a>Setting TTLs</h3></div></div></div>
8839 <p>
8840             The time-to-live of the RR field is a 32-bit integer represented
8841             in units of seconds, and is primarily used by resolvers when they
8842             cache RRs. The TTL describes how long a RR can be cached before it
8843             should be discarded. The following three types of TTL are
8844             currently
8845             used in a zone file.
8846           </p>
8847 <div class="informaltable"><table border="1">
8848 <colgroup>
8849 <col>
8850 <col>
8851 </colgroup>
8852 <tbody>
8853 <tr>
8854 <td>
8855                     <p>
8856                       SOA
8857                     </p>
8858                   </td>
8859 <td>
8860                     <p>
8861                       The last field in the SOA is the negative
8862                       caching TTL. This controls how long other servers will
8863                       cache no-such-domain
8864                       (NXDOMAIN) responses from you.
8865                     </p>
8866                     <p>
8867                       The maximum time for
8868                       negative caching is 3 hours (3h).
8869                     </p>
8870                   </td>
8871 </tr>
8872 <tr>
8873 <td>
8874                     <p>
8875                       $TTL
8876                     </p>
8877                   </td>
8878 <td>
8879                     <p>
8880                       The $TTL directive at the top of the
8881                       zone file (before the SOA) gives a default TTL for every
8882                       RR without
8883                       a specific TTL set.
8884                     </p>
8885                   </td>
8886 </tr>
8887 <tr>
8888 <td>
8889                     <p>
8890                       RR TTLs
8891                     </p>
8892                   </td>
8893 <td>
8894                     <p>
8895                       Each RR can have a TTL as the second
8896                       field in the RR, which will control how long other
8897                       servers can cache
8898                       the it.
8899                     </p>
8900                   </td>
8901 </tr>
8902 </tbody>
8903 </table></div>
8904 <p>
8905             All of these TTLs default to units of seconds, though units
8906             can be explicitly specified, for example, <code class="literal">1h30m</code>.
8907           </p>
8908 </div>
8909 <div class="sect2" lang="en">
8910 <div class="titlepage"><div><div><h3 class="title">
8911 <a name="id2598084"></a>Inverse Mapping in IPv4</h3></div></div></div>
8912 <p>
8913             Reverse name resolution (that is, translation from IP address
8914             to name) is achieved by means of the <span class="emphasis"><em>in-addr.arpa</em></span> domain
8915             and PTR records. Entries in the in-addr.arpa domain are made in
8916             least-to-most significant order, read left to right. This is the
8917             opposite order to the way IP addresses are usually written. Thus,
8918             a machine with an IP address of 10.1.2.3 would have a
8919             corresponding
8920             in-addr.arpa name of
8921             3.2.1.10.in-addr.arpa. This name should have a PTR resource record
8922             whose data field is the name of the machine or, optionally,
8923             multiple
8924             PTR records if the machine has more than one name. For example,
8925             in the [<span class="optional">example.com</span>] domain:
8926           </p>
8927 <div class="informaltable"><table border="1">
8928 <colgroup>
8929 <col>
8930 <col>
8931 </colgroup>
8932 <tbody>
8933 <tr>
8934 <td>
8935                     <p>
8936                       <code class="literal">$ORIGIN</code>
8937                     </p>
8938                   </td>
8939 <td>
8940                     <p>
8941                       <code class="literal">2.1.10.in-addr.arpa</code>
8942                     </p>
8943                   </td>
8944 </tr>
8945 <tr>
8946 <td>
8947                     <p>
8948                       <code class="literal">3</code>
8949                     </p>
8950                   </td>
8951 <td>
8952                     <p>
8953                       <code class="literal">IN PTR foo.example.com.</code>
8954                     </p>
8955                   </td>
8956 </tr>
8957 </tbody>
8958 </table></div>
8959 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
8960 <h3 class="title">Note</h3>
8961 <p>
8962               The <span><strong class="command">$ORIGIN</strong></span> lines in the examples
8963               are for providing context to the examples only &#8212; they do not
8964               necessarily
8965               appear in the actual usage. They are only used here to indicate
8966               that the example is relative to the listed origin.
8967             </p>
8968 </div>
8969 </div>
8970 <div class="sect2" lang="en">
8971 <div class="titlepage"><div><div><h3 class="title">
8972 <a name="id2598211"></a>Other Zone File Directives</h3></div></div></div>
8973 <p>
8974             The Master File Format was initially defined in RFC 1035 and
8975             has subsequently been extended. While the Master File Format
8976             itself
8977             is class independent all records in a Master File must be of the
8978             same
8979             class.
8980           </p>
8981 <p>
8982             Master File Directives include <span><strong class="command">$ORIGIN</strong></span>, <span><strong class="command">$INCLUDE</strong></span>,
8983             and <span><strong class="command">$TTL.</strong></span>
8984           </p>
8985 <div class="sect3" lang="en">
8986 <div class="titlepage"><div><div><h4 class="title">
8987 <a name="id2598233"></a>The <span><strong class="command">@</strong></span> (at-sign)</h4></div></div></div>
8988 <p>
8989               When used in the label (or name) field, the asperand or
8990               at-sign (@) symbol represents the current origin.
8991               At the start of the zone file, it is the 
8992               &lt;<code class="varname">zone_name</code>&gt; (followed by
8993               trailing dot).
8994             </p>
8995 </div>
8996 <div class="sect3" lang="en">
8997 <div class="titlepage"><div><div><h4 class="title">
8998 <a name="id2598249"></a>The <span><strong class="command">$ORIGIN</strong></span> Directive</h4></div></div></div>
8999 <p>
9000               Syntax: <span><strong class="command">$ORIGIN</strong></span>
9001               <em class="replaceable"><code>domain-name</code></em>
9002               [<span class="optional"><em class="replaceable"><code>comment</code></em></span>]
9003             </p>
9004 <p><span><strong class="command">$ORIGIN</strong></span>
9005               sets the domain name that will be appended to any
9006               unqualified records. When a zone is first read in there
9007               is an implicit <span><strong class="command">$ORIGIN</strong></span>
9008               &lt;<code class="varname">zone_name</code>&gt;<span><strong class="command">.</strong></span>
9009               (followed by trailing dot).
9010               The current <span><strong class="command">$ORIGIN</strong></span> is appended to
9011               the domain specified in the <span><strong class="command">$ORIGIN</strong></span>
9012               argument if it is not absolute.
9013             </p>
9014 <pre class="programlisting">
9015 $ORIGIN example.com.
9016 WWW     CNAME   MAIN-SERVER
9017 </pre>
9018 <p>
9019               is equivalent to
9020             </p>
9021 <pre class="programlisting">
9022 WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
9023 </pre>
9024 </div>
9025 <div class="sect3" lang="en">
9026 <div class="titlepage"><div><div><h4 class="title">
9027 <a name="id2598446"></a>The <span><strong class="command">$INCLUDE</strong></span> Directive</h4></div></div></div>
9028 <p>
9029               Syntax: <span><strong class="command">$INCLUDE</strong></span>
9030               <em class="replaceable"><code>filename</code></em>
9031               [<span class="optional">
9032 <em class="replaceable"><code>origin</code></em> </span>]
9033               [<span class="optional"> <em class="replaceable"><code>comment</code></em> </span>]
9034             </p>
9035 <p>
9036               Read and process the file <code class="filename">filename</code> as
9037               if it were included into the file at this point.  If <span><strong class="command">origin</strong></span> is
9038               specified the file is processed with <span><strong class="command">$ORIGIN</strong></span> set
9039               to that value, otherwise the current <span><strong class="command">$ORIGIN</strong></span> is
9040               used.
9041             </p>
9042 <p>
9043               The origin and the current domain name
9044               revert to the values they had prior to the <span><strong class="command">$INCLUDE</strong></span> once
9045               the file has been read.
9046             </p>
9047 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
9048 <h3 class="title">Note</h3>
9049 <p>
9050                 RFC 1035 specifies that the current origin should be restored
9051                 after
9052                 an <span><strong class="command">$INCLUDE</strong></span>, but it is silent
9053                 on whether the current
9054                 domain name should also be restored.  BIND 9 restores both of
9055                 them.
9056                 This could be construed as a deviation from RFC 1035, a
9057                 feature, or both.
9058               </p>
9059 </div>
9060 </div>
9061 <div class="sect3" lang="en">
9062 <div class="titlepage"><div><div><h4 class="title">
9063 <a name="id2598516"></a>The <span><strong class="command">$TTL</strong></span> Directive</h4></div></div></div>
9064 <p>
9065               Syntax: <span><strong class="command">$TTL</strong></span>
9066               <em class="replaceable"><code>default-ttl</code></em>
9067               [<span class="optional">
9068 <em class="replaceable"><code>comment</code></em> </span>]
9069             </p>
9070 <p>
9071               Set the default Time To Live (TTL) for subsequent records
9072               with undefined TTLs. Valid TTLs are of the range 0-2147483647
9073               seconds.
9074             </p>
9075 <p><span><strong class="command">$TTL</strong></span>
9076                is defined in RFC 2308.
9077             </p>
9078 </div>
9079 </div>
9080 <div class="sect2" lang="en">
9081 <div class="titlepage"><div><div><h3 class="title">
9082 <a name="id2598552"></a><acronym class="acronym">BIND</acronym> Master File Extension: the  <span><strong class="command">$GENERATE</strong></span> Directive</h3></div></div></div>
9083 <p>
9084             Syntax: <span><strong class="command">$GENERATE</strong></span>
9085             <em class="replaceable"><code>range</code></em>
9086             <em class="replaceable"><code>lhs</code></em>
9087             [<span class="optional"><em class="replaceable"><code>ttl</code></em></span>]
9088             [<span class="optional"><em class="replaceable"><code>class</code></em></span>]
9089             <em class="replaceable"><code>type</code></em>
9090             <em class="replaceable"><code>rhs</code></em>
9091             [<span class="optional"><em class="replaceable"><code>comment</code></em></span>]
9092           </p>
9093 <p><span><strong class="command">$GENERATE</strong></span>
9094             is used to create a series of resource records that only
9095             differ from each other by an
9096             iterator. <span><strong class="command">$GENERATE</strong></span> can be used to
9097             easily generate the sets of records required to support
9098             sub /24 reverse delegations described in RFC 2317:
9099             Classless IN-ADDR.ARPA delegation.
9100           </p>
9101 <pre class="programlisting">$ORIGIN 0.0.192.IN-ADDR.ARPA.
9102 $GENERATE 1-2 @ NS SERVER$.EXAMPLE.
9103 $GENERATE 1-127 $ CNAME $.0</pre>
9104 <p>
9105             is equivalent to
9106           </p>
9107 <pre class="programlisting">0.0.0.192.IN-ADDR.ARPA. NS SERVER1.EXAMPLE.
9108 0.0.0.192.IN-ADDR.ARPA. NS SERVER2.EXAMPLE.
9109 1.0.0.192.IN-ADDR.ARPA. CNAME 1.0.0.0.192.IN-ADDR.ARPA.
9110 2.0.0.192.IN-ADDR.ARPA. CNAME 2.0.0.0.192.IN-ADDR.ARPA.
9111 ...
9112 127.0.0.192.IN-ADDR.ARPA. CNAME 127.0.0.0.192.IN-ADDR.ARPA.
9113 </pre>
9114 <p>
9115             Generate a set of A and MX records.  Note the MX's right hand
9116             side is a quoted string.  The quotes will be stripped when the
9117             right hand side is processed.
9118            </p>
9119 <pre class="programlisting">
9120 $ORIGIN EXAMPLE.
9121 $GENERATE 1-127 HOST-$ A 1.2.3.$
9122 $GENERATE 1-127 HOST-$ MX "0 ."</pre>
9123 <p>
9124             is equivalent to
9125           </p>
9126 <pre class="programlisting">HOST-1.EXAMPLE.   A  1.2.3.1
9127 HOST-1.EXAMPLE.   MX 0 .
9128 HOST-2.EXAMPLE.   A  1.2.3.2
9129 HOST-2.EXAMPLE.   MX 0 .
9130 HOST-3.EXAMPLE.   A  1.2.3.3
9131 HOST-3.EXAMPLE.   MX 0 .
9132 ...
9133 HOST-127.EXAMPLE. A  1.2.3.127
9134 HOST-127.EXAMPLE. MX 0 .
9135 </pre>
9136 <div class="informaltable"><table border="1">
9137 <colgroup>
9138 <col>
9139 <col>
9140 </colgroup>
9141 <tbody>
9142 <tr>
9143 <td>
9144                     <p><span><strong class="command">range</strong></span></p>
9145                   </td>
9146 <td>
9147                     <p>
9148                       This can be one of two forms: start-stop
9149                       or start-stop/step. If the first form is used, then step
9150                       is set to
9151                       1. All of start, stop and step must be positive.
9152                     </p>
9153                   </td>
9154 </tr>
9155 <tr>
9156 <td>
9157                     <p><span><strong class="command">lhs</strong></span></p>
9158                   </td>
9159 <td>
9160                     <p>This
9161                       describes the owner name of the resource records
9162                       to be created.  Any single <span><strong class="command">$</strong></span>
9163                       (dollar sign)
9164                       symbols within the <span><strong class="command">lhs</strong></span> string
9165                       are replaced by the iterator value.
9166
9167                       To get a $ in the output, you need to escape the
9168                       <span><strong class="command">$</strong></span> using a backslash
9169                       <span><strong class="command">\</strong></span>,
9170                       e.g. <span><strong class="command">\$</strong></span>. The
9171                       <span><strong class="command">$</strong></span> may optionally be followed
9172                       by modifiers which change the offset from the
9173                       iterator, field width and base.
9174
9175                       Modifiers are introduced by a
9176                       <span><strong class="command">{</strong></span> (left brace) immediately following the
9177                       <span><strong class="command">$</strong></span> as
9178                       <span><strong class="command">${offset[,width[,base]]}</strong></span>.
9179                       For example, <span><strong class="command">${-20,3,d}</strong></span>
9180                       subtracts 20 from the current value, prints the
9181                       result as a decimal in a zero-padded field of
9182                       width 3.
9183
9184                       Available output forms are decimal
9185                       (<span><strong class="command">d</strong></span>), octal
9186                       (<span><strong class="command">o</strong></span>), hexadecimal
9187                       (<span><strong class="command">x</strong></span> or <span><strong class="command">X</strong></span>
9188                       for uppercase) and nibble
9189                       (<span><strong class="command">n</strong></span> or <span><strong class="command">N</strong></span>\
9190                       for uppercase).  The default modifier is
9191                       <span><strong class="command">${0,0,d}</strong></span>.  If the
9192                       <span><strong class="command">lhs</strong></span> is not absolute, the
9193                       current <span><strong class="command">$ORIGIN</strong></span> is appended
9194                       to the name.
9195                     </p>
9196                     <p>
9197                       In nibble mode the value will be treated as
9198                       if it was a reversed hexadecimal string
9199                       with each hexadecimal digit as a separate
9200                       label.  The width field includes the label
9201                       separator.
9202                     </p>
9203                     <p>
9204                       For compatibility with earlier versions,
9205                       <span><strong class="command">$$</strong></span> is still recognized as
9206                       indicating a literal $ in the output.
9207                     </p>
9208                   </td>
9209 </tr>
9210 <tr>
9211 <td>
9212                     <p><span><strong class="command">ttl</strong></span></p>
9213                   </td>
9214 <td>
9215                     <p>
9216                       Specifies the time-to-live of the generated records. If
9217                       not specified this will be inherited using the
9218                       normal TTL inheritance rules.
9219                     </p>
9220                     <p><span><strong class="command">class</strong></span>
9221                       and <span><strong class="command">ttl</strong></span> can be
9222                       entered in either order.
9223                     </p>
9224                   </td>
9225 </tr>
9226 <tr>
9227 <td>
9228                     <p><span><strong class="command">class</strong></span></p>
9229                   </td>
9230 <td>
9231                     <p>
9232                       Specifies the class of the generated records.
9233                       This must match the zone class if it is
9234                       specified.
9235                     </p>
9236                     <p><span><strong class="command">class</strong></span>
9237                       and <span><strong class="command">ttl</strong></span> can be
9238                       entered in either order.
9239                     </p>
9240                   </td>
9241 </tr>
9242 <tr>
9243 <td>
9244                     <p><span><strong class="command">type</strong></span></p>
9245                   </td>
9246 <td>
9247                     <p>
9248                       Any valid type.
9249                     </p>
9250                   </td>
9251 </tr>
9252 <tr>
9253 <td>
9254                     <p><span><strong class="command">rhs</strong></span></p>
9255                   </td>
9256 <td>
9257                     <p>
9258                       <span><strong class="command">rhs</strong></span>, optionally, quoted string.
9259                     </p>
9260                   </td>
9261 </tr>
9262 </tbody>
9263 </table></div>
9264 <p>
9265             The <span><strong class="command">$GENERATE</strong></span> directive is a <acronym class="acronym">BIND</acronym> extension
9266             and not part of the standard zone file format.
9267           </p>
9268 <p>
9269             BIND 8 does not support the optional TTL and CLASS fields.
9270           </p>
9271 </div>
9272 <div class="sect2" lang="en">
9273 <div class="titlepage"><div><div><h3 class="title">
9274 <a name="zonefile_format"></a>Additional File Formats</h3></div></div></div>
9275 <p>
9276             In addition to the standard textual format, BIND 9
9277             supports the ability to read or dump to zone files in
9278             other formats.  The <code class="constant">raw</code> format is
9279             currently available as an additional format.  It is a
9280             binary format representing BIND 9's internal data
9281             structure directly, thereby remarkably improving the
9282             loading time.
9283           </p>
9284 <p>
9285             For a primary server, a zone file in the
9286             <code class="constant">raw</code> format is expected to be
9287             generated from a textual zone file by the
9288             <span><strong class="command">named-compilezone</strong></span> command.  For a
9289             secondary server or for a dynamic zone, it is automatically
9290             generated (if this format is specified by the
9291             <span><strong class="command">masterfile-format</strong></span> option) when
9292             <span><strong class="command">named</strong></span> dumps the zone contents after
9293             zone transfer or when applying prior updates.
9294           </p>
9295 <p>
9296             If a zone file in a binary format needs manual modification,
9297             it first must be converted to a textual form by the
9298             <span><strong class="command">named-compilezone</strong></span> command.  All
9299             necessary modification should go to the text file, which
9300             should then be converted to the binary form by the
9301             <span><strong class="command">named-compilezone</strong></span> command again.
9302           </p>
9303 <p>
9304              Although the <code class="constant">raw</code> format uses the
9305              network byte order and avoids architecture-dependent
9306              data alignment so that it is as much portable as
9307              possible, it is primarily expected to be used inside
9308              the same single system.  In order to export a zone
9309              file in the <code class="constant">raw</code> format or make a
9310              portable backup of the file, it is recommended to
9311              convert the file to the standard textual representation.
9312           </p>
9313 </div>
9314 </div>
9315 <div class="sect1" lang="en">
9316 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
9317 <a name="statistics"></a>BIND9 Statistics</h2></div></div></div>
9318 <p>
9319           <acronym class="acronym">BIND</acronym> 9 maintains lots of statistics
9320           information and provides several interfaces for users to
9321           get access to the statistics.
9322           The available statistics include all statistics counters
9323           that were available in <acronym class="acronym">BIND</acronym> 8 and
9324           are meaningful in <acronym class="acronym">BIND</acronym> 9,
9325           and other information that is considered useful.
9326         </p>
9327 <p>
9328           The statistics information is categorized into the following
9329           sections.
9330         </p>
9331 <div class="informaltable"><table border="1">
9332 <colgroup>
9333 <col>
9334 <col>
9335 </colgroup>
9336 <tbody>
9337 <tr>
9338 <td>
9339                   <p>Incoming Requests</p>
9340                 </td>
9341 <td>
9342                   <p>
9343                     The number of incoming DNS requests for each OPCODE.
9344                   </p>
9345                 </td>
9346 </tr>
9347 <tr>
9348 <td>
9349                   <p>Incoming Queries</p>
9350                 </td>
9351 <td>
9352                   <p>
9353                     The number of incoming queries for each RR type.
9354                   </p>
9355                 </td>
9356 </tr>
9357 <tr>
9358 <td>
9359                   <p>Outgoing Queries</p>
9360                 </td>
9361 <td>
9362                   <p>
9363                     The number of outgoing queries for each RR
9364                     type sent from the internal resolver.
9365                     Maintained per view.
9366                   </p>
9367                 </td>
9368 </tr>
9369 <tr>
9370 <td>
9371                   <p>Name Server Statistics</p>
9372                 </td>
9373 <td>
9374                   <p>
9375                     Statistics counters about incoming request processing.
9376                   </p>
9377                 </td>
9378 </tr>
9379 <tr>
9380 <td>
9381                   <p>Zone Maintenance Statistics</p>
9382                 </td>
9383 <td>
9384                   <p>
9385                     Statistics counters regarding zone maintenance
9386                     operations such as zone transfers.
9387                   </p>
9388                 </td>
9389 </tr>
9390 <tr>
9391 <td>
9392                   <p>Resolver Statistics</p>
9393                 </td>
9394 <td>
9395                   <p>
9396                     Statistics counters about name resolution
9397                     performed in the internal resolver.
9398                     Maintained per view.
9399                   </p>
9400                 </td>
9401 </tr>
9402 <tr>
9403 <td>
9404                   <p>Cache DB RRsets</p>
9405                 </td>
9406 <td>
9407                   <p>
9408                     The number of RRsets per RR type and nonexistent
9409                     names stored in the cache database.
9410                     If the exclamation mark (!) is printed for a RR
9411                     type, it means that particular type of RRset is
9412                     known to be nonexistent (this is also known as
9413                     "NXRRSET").
9414                     Maintained per view.
9415                   </p>
9416                 </td>
9417 </tr>
9418 <tr>
9419 <td>
9420                   <p>Socket I/O Statistics</p>
9421                 </td>
9422 <td>
9423                   <p>
9424                     Statistics counters about network related events.
9425                   </p>
9426                 </td>
9427 </tr>
9428 </tbody>
9429 </table></div>
9430 <p>
9431           A subset of Name Server Statistics is collected and shown
9432           per zone for which the server has the authority when
9433           <span><strong class="command">zone-statistics</strong></span> is set to
9434           <strong class="userinput"><code>yes</code></strong>.
9435           These statistics counters are shown with their zone and view
9436           names.
9437           In some cases the view names are omitted for the default view.
9438         </p>
9439 <p>
9440           There are currently two user interfaces to get access to the
9441           statistics.
9442           One is in the plain text format dumped to the file specified
9443           by the <span><strong class="command">statistics-file</strong></span> configuration option.
9444           The other is remotely accessible via a statistics channel
9445           when the <span><strong class="command">statistics-channels</strong></span> statement
9446           is specified in the configuration file
9447           (see <a href="Bv9ARM.ch06.html#statschannels" title="statistics-channels Statement Grammar">the section called &#8220;<span><strong class="command">statistics-channels</strong></span> Statement Grammar&#8221;</a>.)
9448         </p>
9449 <div class="sect3" lang="en">
9450 <div class="titlepage"><div><div><h4 class="title">
9451 <a name="statsfile"></a>The Statistics File</h4></div></div></div>
9452 <p>
9453             The text format statistics dump begins with a line, like:
9454           </p>
9455 <p>
9456             <span><strong class="command">+++ Statistics Dump +++ (973798949)</strong></span>
9457           </p>
9458 <p>
9459             The number in parentheses is a standard
9460             Unix-style timestamp, measured as seconds since January 1, 1970.
9461
9462             Following
9463             that line is a set of statistics information, which is categorized
9464             as described above.
9465             Each section begins with a line, like:
9466           </p>
9467 <p>
9468             <span><strong class="command">++ Name Server Statistics ++</strong></span>
9469           </p>
9470 <p>
9471             Each section consists of lines, each containing the statistics
9472             counter value followed by its textual description.
9473             See below for available counters.
9474             For brevity, counters that have a value of 0 are not shown
9475             in the statistics file.
9476           </p>
9477 <p>
9478             The statistics dump ends with the line where the
9479             number is identical to the number in the beginning line; for example:
9480           </p>
9481 <p>
9482             <span><strong class="command">--- Statistics Dump --- (973798949)</strong></span>
9483           </p>
9484 </div>
9485 <div class="sect2" lang="en">
9486 <div class="titlepage"><div><div><h3 class="title">
9487 <a name="statistics_counters"></a>Statistics Counters</h3></div></div></div>
9488 <p>
9489             The following tables summarize statistics counters that
9490             <acronym class="acronym">BIND</acronym> 9 provides.
9491             For each row of the tables, the leftmost column is the
9492             abbreviated symbol name of that counter.
9493             These symbols are shown in the statistics information
9494             accessed via an HTTP statistics channel.
9495             The rightmost column gives the description of the counter,
9496             which is also shown in the statistics file
9497             (but, in this document, possibly with slight modification
9498             for better readability).
9499             Additional notes may also be provided in this column.
9500             When a middle column exists between these two columns,
9501             it gives the corresponding counter name of the
9502             <acronym class="acronym">BIND</acronym> 8 statistics, if applicable.
9503           </p>
9504 <div class="sect3" lang="en">
9505 <div class="titlepage"><div><div><h4 class="title">
9506 <a name="id2599437"></a>Name Server Statistics Counters</h4></div></div></div>
9507 <div class="informaltable"><table border="1">
9508 <colgroup>
9509 <col>
9510 <col>
9511 <col>
9512 </colgroup>
9513 <tbody>
9514 <tr>
9515 <td>
9516                       <p>
9517                         <span class="emphasis"><em>Symbol</em></span>
9518                       </p>
9519                     </td>
9520 <td>
9521                       <p>
9522                         <span class="emphasis"><em>BIND8 Symbol</em></span>
9523                       </p>
9524                     </td>
9525 <td>
9526                       <p>
9527                         <span class="emphasis"><em>Description</em></span>
9528                       </p>
9529                     </td>
9530 </tr>
9531 <tr>
9532 <td>
9533                       <p><span><strong class="command">Requestv4</strong></span></p>
9534                     </td>
9535 <td>
9536                       <p><span><strong class="command">RQ</strong></span></p>
9537                     </td>
9538 <td>
9539                       <p>
9540                         IPv4 requests received.
9541                         Note: this also counts non query requests.
9542                       </p>
9543                     </td>
9544 </tr>
9545 <tr>
9546 <td>
9547                       <p><span><strong class="command">Requestv6</strong></span></p>
9548                     </td>
9549 <td>
9550                       <p><span><strong class="command">RQ</strong></span></p>
9551                     </td>
9552 <td>
9553                       <p>
9554                         IPv6 requests received.
9555                         Note: this also counts non query requests.
9556                       </p>
9557                     </td>
9558 </tr>
9559 <tr>
9560 <td>
9561                       <p><span><strong class="command">ReqEdns0</strong></span></p>
9562                     </td>
9563 <td>
9564                       <p><span><strong class="command"></strong></span></p>
9565                     </td>
9566 <td>
9567                       <p>
9568                         Requests with EDNS(0) received.
9569                       </p>
9570                     </td>
9571 </tr>
9572 <tr>
9573 <td>
9574                       <p><span><strong class="command">ReqBadEDNSVer</strong></span></p>
9575                     </td>
9576 <td>
9577                       <p><span><strong class="command"></strong></span></p>
9578                     </td>
9579 <td>
9580                       <p>
9581                         Requests with unsupported EDNS version received.
9582                       </p>
9583                     </td>
9584 </tr>
9585 <tr>
9586 <td>
9587                       <p><span><strong class="command">ReqTSIG</strong></span></p>
9588                     </td>
9589 <td>
9590                       <p><span><strong class="command"></strong></span></p>
9591                     </td>
9592 <td>
9593                       <p>
9594                         Requests with TSIG received.
9595                       </p>
9596                     </td>
9597 </tr>
9598 <tr>
9599 <td>
9600                       <p><span><strong class="command">ReqSIG0</strong></span></p>
9601                     </td>
9602 <td>
9603                       <p><span><strong class="command"></strong></span></p>
9604                     </td>
9605 <td>
9606                       <p>
9607                         Requests with SIG(0) received.
9608                       </p>
9609                     </td>
9610 </tr>
9611 <tr>
9612 <td>
9613                       <p><span><strong class="command">ReqBadSIG</strong></span></p>
9614                     </td>
9615 <td>
9616                       <p><span><strong class="command"></strong></span></p>
9617                     </td>
9618 <td>
9619                       <p>
9620                         Requests with invalid (TSIG or SIG(0)) signature.
9621                       </p>
9622                     </td>
9623 </tr>
9624 <tr>
9625 <td>
9626                       <p><span><strong class="command">ReqTCP</strong></span></p>
9627                     </td>
9628 <td>
9629                       <p><span><strong class="command">RTCP</strong></span></p>
9630                     </td>
9631 <td>
9632                       <p>
9633                         TCP requests received.
9634                       </p>
9635                     </td>
9636 </tr>
9637 <tr>
9638 <td>
9639                       <p><span><strong class="command">AuthQryRej</strong></span></p>
9640                     </td>
9641 <td>
9642                       <p><span><strong class="command">RUQ</strong></span></p>
9643                     </td>
9644 <td>
9645                       <p>
9646                         Authoritative (non recursive) queries rejected.
9647                       </p>
9648                     </td>
9649 </tr>
9650 <tr>
9651 <td>
9652                       <p><span><strong class="command">RecQryRej</strong></span></p>
9653                     </td>
9654 <td>
9655                       <p><span><strong class="command">RURQ</strong></span></p>
9656                     </td>
9657 <td>
9658                       <p>
9659                         Recursive queries rejected.
9660                       </p>
9661                     </td>
9662 </tr>
9663 <tr>
9664 <td>
9665                       <p><span><strong class="command">XfrRej</strong></span></p>
9666                     </td>
9667 <td>
9668                       <p><span><strong class="command">RUXFR</strong></span></p>
9669                     </td>
9670 <td>
9671                       <p>
9672                         Zone transfer requests rejected.
9673                       </p>
9674                     </td>
9675 </tr>
9676 <tr>
9677 <td>
9678                       <p><span><strong class="command">UpdateRej</strong></span></p>
9679                     </td>
9680 <td>
9681                       <p><span><strong class="command">RUUpd</strong></span></p>
9682                     </td>
9683 <td>
9684                       <p>
9685                         Dynamic update requests rejected.
9686                       </p>
9687                     </td>
9688 </tr>
9689 <tr>
9690 <td>
9691                       <p><span><strong class="command">Response</strong></span></p>
9692                     </td>
9693 <td>
9694                       <p><span><strong class="command">SAns</strong></span></p>
9695                     </td>
9696 <td>
9697                       <p>
9698                         Responses sent.
9699                       </p>
9700                     </td>
9701 </tr>
9702 <tr>
9703 <td>
9704                       <p><span><strong class="command">RespTruncated</strong></span></p>
9705                     </td>
9706 <td>
9707                       <p><span><strong class="command"></strong></span></p>
9708                     </td>
9709 <td>
9710                       <p>
9711                         Truncated responses sent.
9712                       </p>
9713                     </td>
9714 </tr>
9715 <tr>
9716 <td>
9717                       <p><span><strong class="command">RespEDNS0</strong></span></p>
9718                     </td>
9719 <td>
9720                       <p><span><strong class="command"></strong></span></p>
9721                     </td>
9722 <td>
9723                       <p>
9724                         Responses with EDNS(0) sent.
9725                       </p>
9726                     </td>
9727 </tr>
9728 <tr>
9729 <td>
9730                       <p><span><strong class="command">RespTSIG</strong></span></p>
9731                     </td>
9732 <td>
9733                       <p><span><strong class="command"></strong></span></p>
9734                     </td>
9735 <td>
9736                       <p>
9737                         Responses with TSIG sent.
9738                       </p>
9739                     </td>
9740 </tr>
9741 <tr>
9742 <td>
9743                       <p><span><strong class="command">RespSIG0</strong></span></p>
9744                     </td>
9745 <td>
9746                       <p><span><strong class="command"></strong></span></p>
9747                     </td>
9748 <td>
9749                       <p>
9750                         Responses with SIG(0) sent.
9751                       </p>
9752                     </td>
9753 </tr>
9754 <tr>
9755 <td>
9756                       <p><span><strong class="command">QrySuccess</strong></span></p>
9757                     </td>
9758 <td>
9759                       <p><span><strong class="command"></strong></span></p>
9760                     </td>
9761 <td>
9762                       <p>
9763                         Queries resulted in a successful answer.
9764                         This means the query which returns a NOERROR response
9765                         with at least one answer RR.
9766                         This corresponds to the
9767                         <span><strong class="command">success</strong></span> counter
9768                         of previous versions of
9769                         <acronym class="acronym">BIND</acronym> 9.
9770                       </p>
9771                     </td>
9772 </tr>
9773 <tr>
9774 <td>
9775                       <p><span><strong class="command">QryAuthAns</strong></span></p>
9776                     </td>
9777 <td>
9778                       <p><span><strong class="command"></strong></span></p>
9779                     </td>
9780 <td>
9781                       <p>
9782                         Queries resulted in authoritative answer.
9783                       </p>
9784                     </td>
9785 </tr>
9786 <tr>
9787 <td>
9788                       <p><span><strong class="command">QryNoauthAns</strong></span></p>
9789                     </td>
9790 <td>
9791                       <p><span><strong class="command">SNaAns</strong></span></p>
9792                     </td>
9793 <td>
9794                       <p>
9795                         Queries resulted in non authoritative answer.
9796                       </p>
9797                     </td>
9798 </tr>
9799 <tr>
9800 <td>
9801                       <p><span><strong class="command">QryReferral</strong></span></p>
9802                     </td>
9803 <td>
9804                       <p><span><strong class="command"></strong></span></p>
9805                     </td>
9806 <td>
9807                       <p>
9808                         Queries resulted in referral answer.
9809                         This corresponds to the
9810                         <span><strong class="command">referral</strong></span> counter
9811                         of previous versions of
9812                         <acronym class="acronym">BIND</acronym> 9.
9813                       </p>
9814                     </td>
9815 </tr>
9816 <tr>
9817 <td>
9818                       <p><span><strong class="command">QryNxrrset</strong></span></p>
9819                     </td>
9820 <td>
9821                       <p><span><strong class="command"></strong></span></p>
9822                     </td>
9823 <td>
9824                       <p>
9825                         Queries resulted in NOERROR responses with no data.
9826                         This corresponds to the
9827                         <span><strong class="command">nxrrset</strong></span> counter
9828                         of previous versions of
9829                         <acronym class="acronym">BIND</acronym> 9.
9830                       </p>
9831                     </td>
9832 </tr>
9833 <tr>
9834 <td>
9835                       <p><span><strong class="command">QrySERVFAIL</strong></span></p>
9836                     </td>
9837 <td>
9838                       <p><span><strong class="command">SFail</strong></span></p>
9839                     </td>
9840 <td>
9841                       <p>
9842                         Queries resulted in SERVFAIL.
9843                       </p>
9844                     </td>
9845 </tr>
9846 <tr>
9847 <td>
9848                       <p><span><strong class="command">QryFORMERR</strong></span></p>
9849                     </td>
9850 <td>
9851                       <p><span><strong class="command">SFErr</strong></span></p>
9852                     </td>
9853 <td>
9854                       <p>
9855                         Queries resulted in FORMERR.
9856                       </p>
9857                     </td>
9858 </tr>
9859 <tr>
9860 <td>
9861                       <p><span><strong class="command">QryNXDOMAIN</strong></span></p>
9862                     </td>
9863 <td>
9864                       <p><span><strong class="command">SNXD</strong></span></p>
9865                     </td>
9866 <td>
9867                       <p>
9868                         Queries resulted in NXDOMAIN.
9869                         This corresponds to the
9870                         <span><strong class="command">nxdomain</strong></span> counter
9871                         of previous versions of
9872                         <acronym class="acronym">BIND</acronym> 9.
9873                       </p>
9874                     </td>
9875 </tr>
9876 <tr>
9877 <td>
9878                       <p><span><strong class="command">QryRecursion</strong></span></p>
9879                     </td>
9880 <td>
9881                       <p><span><strong class="command">RFwdQ</strong></span></p>
9882                     </td>
9883 <td>
9884                       <p>
9885                         Queries which caused the server
9886                         to perform recursion in order to find the final answer.
9887                         This corresponds to the
9888                         <span><strong class="command">recursion</strong></span> counter
9889                         of previous versions of
9890                         <acronym class="acronym">BIND</acronym> 9.
9891                       </p>
9892                     </td>
9893 </tr>
9894 <tr>
9895 <td>
9896                       <p><span><strong class="command">QryDuplicate</strong></span></p>
9897                     </td>
9898 <td>
9899                       <p><span><strong class="command">RDupQ</strong></span></p>
9900                     </td>
9901 <td>
9902                       <p>
9903                         Queries which the server attempted to
9904                         recurse but discovered an existing query with the same
9905                         IP address, port, query ID, name, type and class
9906                         already being processed.
9907                         This corresponds to the
9908                         <span><strong class="command">duplicate</strong></span> counter
9909                         of previous versions of
9910                         <acronym class="acronym">BIND</acronym> 9.
9911                       </p>
9912                     </td>
9913 </tr>
9914 <tr>
9915 <td>
9916                       <p><span><strong class="command">QryDropped</strong></span></p>
9917                     </td>
9918 <td>
9919                       <p><span><strong class="command"></strong></span></p>
9920                     </td>
9921 <td>
9922                       <p>
9923                         Recursive queries for which the server
9924                         discovered an excessive number of existing
9925                         recursive queries for the same name, type and
9926                         class and were subsequently dropped.
9927                         This is the number of dropped queries due to
9928                         the reason explained with the
9929                         <span><strong class="command">clients-per-query</strong></span>
9930                         and
9931                         <span><strong class="command">max-clients-per-query</strong></span>
9932                         options
9933                         (see the description about
9934                         <a href="Bv9ARM.ch06.html#clients-per-query"><span><strong class="command">clients-per-query</strong></span></a>.)
9935                         This corresponds to the
9936                         <span><strong class="command">dropped</strong></span> counter
9937                         of previous versions of
9938                         <acronym class="acronym">BIND</acronym> 9.
9939                       </p>
9940                     </td>
9941 </tr>
9942 <tr>
9943 <td>
9944                       <p><span><strong class="command">QryFailure</strong></span></p>
9945                     </td>
9946 <td>
9947                       <p><span><strong class="command"></strong></span></p>
9948                     </td>
9949 <td>
9950                       <p>
9951                         Other query failures.
9952                         This corresponds to the
9953                         <span><strong class="command">failure</strong></span> counter
9954                         of previous versions of
9955                         <acronym class="acronym">BIND</acronym> 9.
9956                         Note: this counter is provided mainly for
9957                         backward compatibility with the previous versions.
9958                         Normally a more fine-grained counters such as
9959                         <span><strong class="command">AuthQryRej</strong></span> and
9960                         <span><strong class="command">RecQryRej</strong></span>
9961                         that would also fall into this counter are provided,
9962                         and so this counter would not be of much
9963                         interest in practice.
9964                       </p>
9965                     </td>
9966 </tr>
9967 <tr>
9968 <td>
9969                       <p><span><strong class="command">XfrReqDone</strong></span></p>
9970                     </td>
9971 <td>
9972                       <p><span><strong class="command"></strong></span></p>
9973                     </td>
9974 <td>
9975                       <p>
9976                         Requested zone transfers completed.
9977                       </p>
9978                     </td>
9979 </tr>
9980 <tr>
9981 <td>
9982                       <p><span><strong class="command">UpdateReqFwd</strong></span></p>
9983                     </td>
9984 <td>
9985                       <p><span><strong class="command"></strong></span></p>
9986                     </td>
9987 <td>
9988                       <p>
9989                         Update requests forwarded.
9990                       </p>
9991                     </td>
9992 </tr>
9993 <tr>
9994 <td>
9995                       <p><span><strong class="command">UpdateRespFwd</strong></span></p>
9996                     </td>
9997 <td>
9998                       <p><span><strong class="command"></strong></span></p>
9999                     </td>
10000 <td>
10001                       <p>
10002                         Update responses forwarded.
10003                       </p>
10004                     </td>
10005 </tr>
10006 <tr>
10007 <td>
10008                       <p><span><strong class="command">UpdateFwdFail</strong></span></p>
10009                     </td>
10010 <td>
10011                       <p><span><strong class="command"></strong></span></p>
10012                     </td>
10013 <td>
10014                       <p>
10015                         Dynamic update forward failed.
10016                       </p>
10017                     </td>
10018 </tr>
10019 <tr>
10020 <td>
10021                       <p><span><strong class="command">UpdateDone</strong></span></p>
10022                     </td>
10023 <td>
10024                       <p><span><strong class="command"></strong></span></p>
10025                     </td>
10026 <td>
10027                       <p>
10028                         Dynamic updates completed.
10029                       </p>
10030                     </td>
10031 </tr>
10032 <tr>
10033 <td>
10034                       <p><span><strong class="command">UpdateFail</strong></span></p>
10035                     </td>
10036 <td>
10037                       <p><span><strong class="command"></strong></span></p>
10038                     </td>
10039 <td>
10040                       <p>
10041                         Dynamic updates failed.
10042                       </p>
10043                     </td>
10044 </tr>
10045 <tr>
10046 <td>
10047                       <p><span><strong class="command">UpdateBadPrereq</strong></span></p>
10048                     </td>
10049 <td>
10050                       <p><span><strong class="command"></strong></span></p>
10051                     </td>
10052 <td>
10053                       <p>
10054                         Dynamic updates rejected due to prerequisite failure.
10055                       </p>
10056                     </td>
10057 </tr>
10058 </tbody>
10059 </table></div>
10060 </div>
10061 <div class="sect3" lang="en">
10062 <div class="titlepage"><div><div><h4 class="title">
10063 <a name="id2601047"></a>Zone Maintenance Statistics Counters</h4></div></div></div>
10064 <div class="informaltable"><table border="1">
10065 <colgroup>
10066 <col>
10067 <col>
10068 </colgroup>
10069 <tbody>
10070 <tr>
10071 <td>
10072                       <p>
10073                         <span class="emphasis"><em>Symbol</em></span>
10074                       </p>
10075                     </td>
10076 <td>
10077                       <p>
10078                         <span class="emphasis"><em>Description</em></span>
10079                       </p>
10080                     </td>
10081 </tr>
10082 <tr>
10083 <td>
10084                       <p><span><strong class="command">NotifyOutv4</strong></span></p>
10085                     </td>
10086 <td>
10087                       <p>
10088                         IPv4 notifies sent.
10089                       </p>
10090                     </td>
10091 </tr>
10092 <tr>
10093 <td>
10094                       <p><span><strong class="command">NotifyOutv6</strong></span></p>
10095                     </td>
10096 <td>
10097                       <p>
10098                         IPv6 notifies sent.
10099                       </p>
10100                     </td>
10101 </tr>
10102 <tr>
10103 <td>
10104                       <p><span><strong class="command">NotifyInv4</strong></span></p>
10105                     </td>
10106 <td>
10107                       <p>
10108                         IPv4 notifies received.
10109                       </p>
10110                     </td>
10111 </tr>
10112 <tr>
10113 <td>
10114                       <p><span><strong class="command">NotifyInv6</strong></span></p>
10115                     </td>
10116 <td>
10117                       <p>
10118                         IPv6 notifies received.
10119                       </p>
10120                     </td>
10121 </tr>
10122 <tr>
10123 <td>
10124                       <p><span><strong class="command">NotifyRej</strong></span></p>
10125                     </td>
10126 <td>
10127                       <p>
10128                         Incoming notifies rejected.
10129                       </p>
10130                     </td>
10131 </tr>
10132 <tr>
10133 <td>
10134                       <p><span><strong class="command">SOAOutv4</strong></span></p>
10135                     </td>
10136 <td>
10137                       <p>
10138                         IPv4 SOA queries sent.
10139                       </p>
10140                     </td>
10141 </tr>
10142 <tr>
10143 <td>
10144                       <p><span><strong class="command">SOAOutv6</strong></span></p>
10145                     </td>
10146 <td>
10147                       <p>
10148                         IPv6 SOA queries sent.
10149                       </p>
10150                     </td>
10151 </tr>
10152 <tr>
10153 <td>
10154                       <p><span><strong class="command">AXFRReqv4</strong></span></p>
10155                     </td>
10156 <td>
10157                       <p>
10158                         IPv4 AXFR requested.
10159                       </p>
10160                     </td>
10161 </tr>
10162 <tr>
10163 <td>
10164                       <p><span><strong class="command">AXFRReqv6</strong></span></p>
10165                     </td>
10166 <td>
10167                       <p>
10168                         IPv6 AXFR requested.
10169                       </p>
10170                     </td>
10171 </tr>
10172 <tr>
10173 <td>
10174                       <p><span><strong class="command">IXFRReqv4</strong></span></p>
10175                     </td>
10176 <td>
10177                       <p>
10178                         IPv4 IXFR requested.
10179                       </p>
10180                     </td>
10181 </tr>
10182 <tr>
10183 <td>
10184                       <p><span><strong class="command">IXFRReqv6</strong></span></p>
10185                     </td>
10186 <td>
10187                       <p>
10188                         IPv6 IXFR requested.
10189                       </p>
10190                     </td>
10191 </tr>
10192 <tr>
10193 <td>
10194                       <p><span><strong class="command">XfrSuccess</strong></span></p>
10195                     </td>
10196 <td>
10197                       <p>
10198                         Zone transfer requests succeeded.
10199                       </p>
10200                     </td>
10201 </tr>
10202 <tr>
10203 <td>
10204                       <p><span><strong class="command">XfrFail</strong></span></p>
10205                     </td>
10206 <td>
10207                       <p>
10208                         Zone transfer requests failed.
10209                       </p>
10210                     </td>
10211 </tr>
10212 </tbody>
10213 </table></div>
10214 </div>
10215 <div class="sect3" lang="en">
10216 <div class="titlepage"><div><div><h4 class="title">
10217 <a name="id2601498"></a>Resolver Statistics Counters</h4></div></div></div>
10218 <div class="informaltable"><table border="1">
10219 <colgroup>
10220 <col>
10221 <col>
10222 <col>
10223 </colgroup>
10224 <tbody>
10225 <tr>
10226 <td>
10227                       <p>
10228                         <span class="emphasis"><em>Symbol</em></span>
10229                       </p>
10230                     </td>
10231 <td>
10232                       <p>
10233                         <span class="emphasis"><em>BIND8 Symbol</em></span>
10234                       </p>
10235                     </td>
10236 <td>
10237                       <p>
10238                         <span class="emphasis"><em>Description</em></span>
10239                       </p>
10240                     </td>
10241 </tr>
10242 <tr>
10243 <td>
10244                       <p><span><strong class="command">Queryv4</strong></span></p>
10245                     </td>
10246 <td>
10247                       <p><span><strong class="command">SFwdQ</strong></span></p>
10248                     </td>
10249 <td>
10250                       <p>
10251                         IPv4 queries sent.
10252                       </p>
10253                     </td>
10254 </tr>
10255 <tr>
10256 <td>
10257                       <p><span><strong class="command">Queryv6</strong></span></p>
10258                     </td>
10259 <td>
10260                       <p><span><strong class="command">SFwdQ</strong></span></p>
10261                     </td>
10262 <td>
10263                       <p>
10264                         IPv6 queries sent.
10265                       </p>
10266                     </td>
10267 </tr>
10268 <tr>
10269 <td>
10270                       <p><span><strong class="command">Responsev4</strong></span></p>
10271                     </td>
10272 <td>
10273                       <p><span><strong class="command">RR</strong></span></p>
10274                     </td>
10275 <td>
10276                       <p>
10277                         IPv4 responses received.
10278                       </p>
10279                     </td>
10280 </tr>
10281 <tr>
10282 <td>
10283                       <p><span><strong class="command">Responsev6</strong></span></p>
10284                     </td>
10285 <td>
10286                       <p><span><strong class="command">RR</strong></span></p>
10287                     </td>
10288 <td>
10289                       <p>
10290                         IPv6 responses received.
10291                       </p>
10292                     </td>
10293 </tr>
10294 <tr>
10295 <td>
10296                       <p><span><strong class="command">NXDOMAIN</strong></span></p>
10297                     </td>
10298 <td>
10299                       <p><span><strong class="command">RNXD</strong></span></p>
10300                     </td>
10301 <td>
10302                       <p>
10303                         NXDOMAIN received.
10304                       </p>
10305                     </td>
10306 </tr>
10307 <tr>
10308 <td>
10309                       <p><span><strong class="command">SERVFAIL</strong></span></p>
10310                     </td>
10311 <td>
10312                       <p><span><strong class="command">RFail</strong></span></p>
10313                     </td>
10314 <td>
10315                       <p>
10316                         SERVFAIL received.
10317                       </p>
10318                     </td>
10319 </tr>
10320 <tr>
10321 <td>
10322                       <p><span><strong class="command">FORMERR</strong></span></p>
10323                     </td>
10324 <td>
10325                       <p><span><strong class="command">RFErr</strong></span></p>
10326                     </td>
10327 <td>
10328                       <p>
10329                         FORMERR received.
10330                       </p>
10331                     </td>
10332 </tr>
10333 <tr>
10334 <td>
10335                       <p><span><strong class="command">OtherError</strong></span></p>
10336                     </td>
10337 <td>
10338                       <p><span><strong class="command">RErr</strong></span></p>
10339                     </td>
10340 <td>
10341                       <p>
10342                         Other errors received.
10343                       </p>
10344                     </td>
10345 </tr>
10346 <tr>
10347 <td>
10348                       <p><span><strong class="command">EDNS0Fail</strong></span></p>
10349                                                  </td>
10350 <td>
10351                       <p><span><strong class="command"></strong></span></p>
10352                     </td>
10353 <td>
10354                       <p>
10355                         EDNS(0) query failures.
10356                       </p>
10357                     </td>
10358 </tr>
10359 <tr>
10360 <td>
10361                       <p><span><strong class="command">Mismatch</strong></span></p>
10362                     </td>
10363 <td>
10364                       <p><span><strong class="command">RDupR</strong></span></p>
10365                     </td>
10366 <td>
10367                       <p>
10368                         Mismatch responses received.
10369                         The DNS ID, response's source address,
10370                         and/or the response's source port does not
10371                         match what was expected.
10372                         (The port must be 53 or as defined by
10373                         the <span><strong class="command">port</strong></span> option.)
10374                         This may be an indication of a cache
10375                         poisoning attempt.
10376                       </p>
10377                     </td>
10378 </tr>
10379 <tr>
10380 <td>
10381                       <p><span><strong class="command">Truncated</strong></span></p>
10382                     </td>
10383 <td>
10384                       <p><span><strong class="command"></strong></span></p>
10385                     </td>
10386 <td>
10387                       <p>
10388                         Truncated responses received.
10389                       </p>
10390                     </td>
10391 </tr>
10392 <tr>
10393 <td>
10394                       <p><span><strong class="command">Lame</strong></span></p>
10395                     </td>
10396 <td>
10397                       <p><span><strong class="command">RLame</strong></span></p>
10398                     </td>
10399 <td>
10400                       <p>
10401                         Lame delegations received.
10402                       </p>
10403                     </td>
10404 </tr>
10405 <tr>
10406 <td>
10407                       <p><span><strong class="command">Retry</strong></span></p>
10408                     </td>
10409 <td>
10410                       <p><span><strong class="command">SDupQ</strong></span></p>
10411                     </td>
10412 <td>
10413                       <p>
10414                         Query retries performed.
10415                       </p>
10416                     </td>
10417 </tr>
10418 <tr>
10419 <td>
10420                       <p><span><strong class="command">QueryAbort</strong></span></p>
10421                     </td>
10422 <td>
10423                       <p><span><strong class="command"></strong></span></p>
10424                     </td>
10425 <td>
10426                       <p>
10427                         Queries aborted due to quota control.
10428                       </p>
10429                     </td>
10430 </tr>
10431 <tr>
10432 <td>
10433                       <p><span><strong class="command">QuerySockFail</strong></span></p>
10434                     </td>
10435 <td>
10436                       <p><span><strong class="command"></strong></span></p>
10437                     </td>
10438 <td>
10439                       <p>
10440                         Failures in opening query sockets.
10441                         One common reason for such failures is a
10442                         failure of opening a new socket due to a
10443                         limitation on file descriptors.
10444                       </p>
10445                     </td>
10446 </tr>
10447 <tr>
10448 <td>
10449                       <p><span><strong class="command">QueryTimeout</strong></span></p>
10450                     </td>
10451 <td>
10452                       <p><span><strong class="command"></strong></span></p>
10453                     </td>
10454 <td>
10455                       <p>
10456                         Query timeouts.
10457                       </p>
10458                     </td>
10459 </tr>
10460 <tr>
10461 <td>
10462                       <p><span><strong class="command">GlueFetchv4</strong></span></p>
10463                     </td>
10464 <td>
10465                       <p><span><strong class="command">SSysQ</strong></span></p>
10466                     </td>
10467 <td>
10468                       <p>
10469                         IPv4 NS address fetches invoked.
10470                       </p>
10471                     </td>
10472 </tr>
10473 <tr>
10474 <td>
10475                       <p><span><strong class="command">GlueFetchv6</strong></span></p>
10476                     </td>
10477 <td>
10478                       <p><span><strong class="command">SSysQ</strong></span></p>
10479                     </td>
10480 <td>
10481                       <p>
10482                         IPv6 NS address fetches invoked.
10483                       </p>
10484                     </td>
10485 </tr>
10486 <tr>
10487 <td>
10488                       <p><span><strong class="command">GlueFetchv4Fail</strong></span></p>
10489                     </td>
10490 <td>
10491                       <p><span><strong class="command"></strong></span></p>
10492                     </td>
10493 <td>
10494                       <p>
10495                         IPv4 NS address fetch failed.
10496                       </p>
10497                     </td>
10498 </tr>
10499 <tr>
10500 <td>
10501                       <p><span><strong class="command">GlueFetchv6Fail</strong></span></p>
10502                     </td>
10503 <td>
10504                       <p><span><strong class="command"></strong></span></p>
10505                     </td>
10506 <td>
10507                       <p>
10508                         IPv6 NS address fetch failed.
10509                       </p>
10510                     </td>
10511 </tr>
10512 <tr>
10513 <td>
10514                       <p><span><strong class="command">ValAttempt</strong></span></p>
10515                     </td>
10516 <td>
10517                       <p><span><strong class="command"></strong></span></p>
10518                     </td>
10519 <td>
10520                       <p>
10521                         DNSSEC validation attempted.
10522                       </p>
10523                     </td>
10524 </tr>
10525 <tr>
10526 <td>
10527                       <p><span><strong class="command">ValOk</strong></span></p>
10528                     </td>
10529 <td>
10530                       <p><span><strong class="command"></strong></span></p>
10531                     </td>
10532 <td>
10533                       <p>
10534                         DNSSEC validation succeeded.
10535                       </p>
10536                     </td>
10537 </tr>
10538 <tr>
10539 <td>
10540                       <p><span><strong class="command">ValNegOk</strong></span></p>
10541                     </td>
10542 <td>
10543                       <p><span><strong class="command"></strong></span></p>
10544                     </td>
10545 <td>
10546                       <p>
10547                         DNSSEC validation on negative information succeeded.
10548                       </p>
10549                     </td>
10550 </tr>
10551 <tr>
10552 <td>
10553                       <p><span><strong class="command">ValFail</strong></span></p>
10554                     </td>
10555 <td>
10556                       <p><span><strong class="command"></strong></span></p>
10557                     </td>
10558 <td>
10559                       <p>
10560                         DNSSEC validation failed.
10561                       </p>
10562                     </td>
10563 </tr>
10564 <tr>
10565 <td>
10566                       <p><span><strong class="command">QryRTTnn</strong></span></p>
10567                     </td>
10568 <td>
10569                       <p><span><strong class="command"></strong></span></p>
10570                     </td>
10571 <td>
10572                       <p>
10573                         Frequency table on round trip times (RTTs) of
10574                         queries.
10575                         Each <span><strong class="command">nn</strong></span> specifies the corresponding
10576                         frequency.
10577                         In the sequence of
10578                         <span><strong class="command">nn_1</strong></span>,
10579                         <span><strong class="command">nn_2</strong></span>,
10580                         ...,
10581                         <span><strong class="command">nn_m</strong></span>,
10582                         the value of <span><strong class="command">nn_i</strong></span> is the
10583                         number of queries whose RTTs are between
10584                         <span><strong class="command">nn_(i-1)</strong></span> (inclusive) and
10585                         <span><strong class="command">nn_i</strong></span> (exclusive) milliseconds.
10586                         For the sake of convenience we define
10587                         <span><strong class="command">nn_0</strong></span> to be 0.
10588                         The last entry should be represented as
10589                         <span><strong class="command">nn_m+</strong></span>, which means the
10590                         number of queries whose RTTs are equal to or over
10591                         <span><strong class="command">nn_m</strong></span> milliseconds.
10592                       </p>
10593                     </td>
10594 </tr>
10595 </tbody>
10596 </table></div>
10597 </div>
10598 <div class="sect3" lang="en">
10599 <div class="titlepage"><div><div><h4 class="title">
10600 <a name="id2602588"></a>Socket I/O Statistics Counters</h4></div></div></div>
10601 <p>
10602               Socket I/O statistics counters are defined per socket
10603               types, which are
10604               <span><strong class="command">UDP4</strong></span> (UDP/IPv4),
10605               <span><strong class="command">UDP6</strong></span> (UDP/IPv6),
10606               <span><strong class="command">TCP4</strong></span> (TCP/IPv4),
10607               <span><strong class="command">TCP6</strong></span> (TCP/IPv6),
10608               <span><strong class="command">Unix</strong></span> (Unix Domain), and
10609               <span><strong class="command">FDwatch</strong></span> (sockets opened outside the
10610               socket module).
10611               In the following table <span><strong class="command">&lt;TYPE&gt;</strong></span>
10612               represents a socket type.
10613               Not all counters are available for all socket types;
10614               exceptions are noted in the description field.
10615             </p>
10616 <div class="informaltable"><table border="1">
10617 <colgroup>
10618 <col>
10619 <col>
10620 </colgroup>
10621 <tbody>
10622 <tr>
10623 <td>
10624                       <p>
10625                         <span class="emphasis"><em>Symbol</em></span>
10626                       </p>
10627                     </td>
10628 <td>
10629                       <p>
10630                         <span class="emphasis"><em>Description</em></span>
10631                       </p>
10632                     </td>
10633 </tr>
10634 <tr>
10635 <td>
10636                       <p><span><strong class="command">&lt;TYPE&gt;Open</strong></span></p>
10637                     </td>
10638 <td>
10639                       <p>
10640                         Sockets opened successfully.
10641                         This counter is not applicable to the
10642                         <span><strong class="command">FDwatch</strong></span> type.
10643                       </p>
10644                     </td>
10645 </tr>
10646 <tr>
10647 <td>
10648                       <p><span><strong class="command">&lt;TYPE&gt;OpenFail</strong></span></p>
10649                     </td>
10650 <td>
10651                       <p>
10652                         Failures of opening sockets.
10653                         This counter is not applicable to the
10654                         <span><strong class="command">FDwatch</strong></span> type.
10655                       </p>
10656                     </td>
10657 </tr>
10658 <tr>
10659 <td>
10660                       <p><span><strong class="command">&lt;TYPE&gt;Close</strong></span></p>
10661                     </td>
10662 <td>
10663                       <p>
10664                         Sockets closed.
10665                       </p>
10666                     </td>
10667 </tr>
10668 <tr>
10669 <td>
10670                       <p><span><strong class="command">&lt;TYPE&gt;BindFail</strong></span></p>
10671                     </td>
10672 <td>
10673                       <p>
10674                         Failures of binding sockets.
10675                       </p>
10676                     </td>
10677 </tr>
10678 <tr>
10679 <td>
10680                       <p><span><strong class="command">&lt;TYPE&gt;ConnFail</strong></span></p>
10681                     </td>
10682 <td>
10683                       <p>
10684                         Failures of connecting sockets.
10685                       </p>
10686                     </td>
10687 </tr>
10688 <tr>
10689 <td>
10690                       <p><span><strong class="command">&lt;TYPE&gt;Conn</strong></span></p>
10691                     </td>
10692 <td>
10693                       <p>
10694                         Connections established successfully.
10695                       </p>
10696                     </td>
10697 </tr>
10698 <tr>
10699 <td>
10700                       <p><span><strong class="command">&lt;TYPE&gt;AcceptFail</strong></span></p>
10701                     </td>
10702 <td>
10703                       <p>
10704                         Failures of accepting incoming connection requests.
10705                         This counter is not applicable to the
10706                         <span><strong class="command">UDP</strong></span> and
10707                         <span><strong class="command">FDwatch</strong></span> types.
10708                       </p>
10709                     </td>
10710 </tr>
10711 <tr>
10712 <td>
10713                       <p><span><strong class="command">&lt;TYPE&gt;Accept</strong></span></p>
10714                     </td>
10715 <td>
10716                       <p>
10717                         Incoming connections successfully accepted.
10718                         This counter is not applicable to the
10719                         <span><strong class="command">UDP</strong></span> and
10720                         <span><strong class="command">FDwatch</strong></span> types.
10721                       </p>
10722                     </td>
10723 </tr>
10724 <tr>
10725 <td>
10726                       <p><span><strong class="command">&lt;TYPE&gt;SendErr</strong></span></p>
10727                     </td>
10728 <td>
10729                       <p>
10730                         Errors in socket send operations.
10731                         This counter corresponds
10732                         to <span><strong class="command">SErr</strong></span> counter of
10733                         <span><strong class="command">BIND</strong></span> 8.
10734                       </p>
10735                     </td>
10736 </tr>
10737 <tr>
10738 <td>
10739                       <p><span><strong class="command">&lt;TYPE&gt;RecvErr</strong></span></p>
10740                     </td>
10741 <td>
10742                       <p>
10743                         Errors in socket receive operations.
10744                         This includes errors of send operations on a
10745                         connected UDP socket notified by an ICMP error
10746                         message.
10747                       </p>
10748                     </td>
10749 </tr>
10750 </tbody>
10751 </table></div>
10752 </div>
10753 <div class="sect3" lang="en">
10754 <div class="titlepage"><div><div><h4 class="title">
10755 <a name="id2602962"></a>Compatibility with <span class="emphasis"><em>BIND</em></span> 8 Counters</h4></div></div></div>
10756 <p>
10757               Most statistics counters that were available
10758               in <span><strong class="command">BIND</strong></span> 8 are also supported in
10759               <span><strong class="command">BIND</strong></span> 9 as shown in the above tables.
10760               Here are notes about other counters that do not appear
10761               in these tables.
10762             </p>
10763 <div class="variablelist"><dl>
10764 <dt><span class="term"><span><strong class="command">RFwdR,SFwdR</strong></span></span></dt>
10765 <dd><p>
10766                     These counters are not supported
10767                     because <span><strong class="command">BIND</strong></span> 9 does not adopt
10768                     the notion of <span class="emphasis"><em>forwarding</em></span>
10769                     as <span><strong class="command">BIND</strong></span> 8 did.
10770                   </p></dd>
10771 <dt><span class="term"><span><strong class="command">RAXFR</strong></span></span></dt>
10772 <dd><p>
10773                     This counter is accessible in the Incoming Queries section.
10774                   </p></dd>
10775 <dt><span class="term"><span><strong class="command">RIQ</strong></span></span></dt>
10776 <dd><p>
10777                     This counter is accessible in the Incoming Requests section.
10778                   </p></dd>
10779 <dt><span class="term"><span><strong class="command">ROpts</strong></span></span></dt>
10780 <dd><p>
10781                     This counter is not supported
10782                     because <span><strong class="command">BIND</strong></span> 9 does not care
10783                     about IP options in the first place.
10784                   </p></dd>
10785 </dl></div>
10786 </div>
10787 </div>
10788 </div>
10789 </div>
10790 <div class="navfooter">
10791 <hr>
10792 <table width="100%" summary="Navigation footer">
10793 <tr>
10794 <td width="40%" align="left">
10795 <a accesskey="p" href="Bv9ARM.ch05.html">Prev</a> </td>
10796 <td width="20%" align="center"> </td>
10797 <td width="40%" align="right"> <a accesskey="n" href="Bv9ARM.ch07.html">Next</a>
10798 </td>
10799 </tr>
10800 <tr>
10801 <td width="40%" align="left" valign="top">Chapter 5. The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver </td>
10802 <td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
10803 <td width="40%" align="right" valign="top"> Chapter 7. <acronym class="acronym">BIND</acronym> 9 Security Considerations</td>
10804 </tr>
10805 </table>
10806 </div>
10807 </body>
10808 </html>