]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/bind9/doc/arm/Bv9ARM.ch06.html
MFV 262445:
[FreeBSD/stable/9.git] / contrib / bind9 / doc / arm / Bv9ARM.ch06.html
1 <!--
2  - Copyright (C) 2004-2013 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#id2573336">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#id2573996"><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#id2574186"><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#id2574614"><span><strong class="command">include</strong></span> Statement Grammar</a></span></dt>
62 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574631"><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#id2574654"><span><strong class="command">key</strong></span> Statement Grammar</a></span></dt>
65 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574678"><span><strong class="command">key</strong></span> Statement Definition and Usage</a></span></dt>
66 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574769"><span><strong class="command">logging</strong></span> Statement Grammar</a></span></dt>
67 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574963"><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#id2577174"><span><strong class="command">lwres</strong></span> Statement Grammar</a></span></dt>
70 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2577248"><span><strong class="command">lwres</strong></span> Statement Definition and Usage</a></span></dt>
71 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2577312"><span><strong class="command">masters</strong></span> Statement Grammar</a></span></dt>
72 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2577355"><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#id2577377"><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#id2590101"><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#id2590408"><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#id2590523"><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#id2590965"><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#id2592813"><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#id2596432">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#id2598594">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#id2599209">Inverse Mapping in IPv4</a></span></dt>
101 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2599336">Other Zone File Directives</a></span></dt>
102 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2599541"><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 64-bit unsigned integer, or the keywords
413                   <strong class="userinput"><code>unlimited</code></strong> or
414                   <strong class="userinput"><code>default</code></strong>.
415                 </p>
416                 <p>
417                   Integers may take values
418                   0 &lt;= value &lt;= 18446744073709551615, though
419                   certain parameters may use a more limited range
420                   within these extremes.  In most cases, setting a
421                   value to 0 does not literally mean zero; it means
422                   "undefined" or "as big as psosible", depending on
423                   the context. See the expalantions of particular
424                   parameters that use <code class="varname">size_spec</code>
425                   for details on how they interpret its use. 
426                 </p>
427                 <p>
428                   Numeric values can optionally be followed by a
429                   scaling factor:
430                   <strong class="userinput"><code>K</code></strong> or <strong class="userinput"><code>k</code></strong>
431                   for kilobytes,
432                   <strong class="userinput"><code>M</code></strong> or <strong class="userinput"><code>m</code></strong>
433                   for megabytes, and
434                   <strong class="userinput"><code>G</code></strong> or <strong class="userinput"><code>g</code></strong>
435                   for gigabytes, which scale by 1024, 1024*1024, and
436                   1024*1024*1024 respectively.
437                 </p>
438                 <p>
439                   <code class="varname">unlimited</code> generally means
440                   "as big as possible", though in certain contexts,
441                   (including <code class="option">max-cache-size</code>), it may
442                   mean the largest possible 32-bit unsigned integer
443                   (0xffffffff); this distinction can be important when
444                   dealing with larger quantities. 
445                   <code class="varname">unlimited</code> is usually the best way
446                   to safely set a very large number.
447                 </p>
448                 <p>
449                   <code class="varname">default</code> 
450                   uses the limit that was in force when the server was started.
451                 </p>
452               </td>
453 </tr>
454 <tr>
455 <td>
456                 <p>
457                   <code class="varname">yes_or_no</code>
458                 </p>
459               </td>
460 <td>
461                 <p>
462                   Either <strong class="userinput"><code>yes</code></strong> or <strong class="userinput"><code>no</code></strong>.
463                   The words <strong class="userinput"><code>true</code></strong> and <strong class="userinput"><code>false</code></strong> are
464                   also accepted, as are the numbers <strong class="userinput"><code>1</code></strong>
465                   and <strong class="userinput"><code>0</code></strong>.
466                 </p>
467               </td>
468 </tr>
469 <tr>
470 <td>
471                 <p>
472                   <code class="varname">dialup_option</code>
473                 </p>
474               </td>
475 <td>
476                 <p>
477                   One of <strong class="userinput"><code>yes</code></strong>,
478                   <strong class="userinput"><code>no</code></strong>, <strong class="userinput"><code>notify</code></strong>,
479                   <strong class="userinput"><code>notify-passive</code></strong>, <strong class="userinput"><code>refresh</code></strong> or
480                   <strong class="userinput"><code>passive</code></strong>.
481                   When used in a zone, <strong class="userinput"><code>notify-passive</code></strong>,
482                   <strong class="userinput"><code>refresh</code></strong>, and <strong class="userinput"><code>passive</code></strong>
483                   are restricted to slave and stub zones.
484                 </p>
485               </td>
486 </tr>
487 </tbody>
488 </table></div>
489 <div class="sect2" lang="en">
490 <div class="titlepage"><div><div><h3 class="title">
491 <a name="address_match_lists"></a>Address Match Lists</h3></div></div></div>
492 <div class="sect3" lang="en">
493 <div class="titlepage"><div><div><h4 class="title">
494 <a name="id2573034"></a>Syntax</h4></div></div></div>
495 <pre class="programlisting"><code class="varname">address_match_list</code> = address_match_list_element ;
496   [<span class="optional"> address_match_list_element; ... </span>]
497 <code class="varname">address_match_list_element</code> = [<span class="optional"> ! </span>] (ip_address [<span class="optional">/length</span>] |
498    key key_id | acl_name | { address_match_list } )
499 </pre>
500 </div>
501 <div class="sect3" lang="en">
502 <div class="titlepage"><div><div><h4 class="title">
503 <a name="id2573130"></a>Definition and Usage</h4></div></div></div>
504 <p>
505             Address match lists are primarily used to determine access
506             control for various server operations. They are also used in
507             the <span><strong class="command">listen-on</strong></span> and <span><strong class="command">sortlist</strong></span>
508             statements. The elements which constitute an address match
509             list can be any of the following:
510           </p>
511 <div class="itemizedlist"><ul type="disc">
512 <li>an IP address (IPv4 or IPv6)</li>
513 <li>an IP prefix (in `/' notation)</li>
514 <li>
515                 a key ID, as defined by the <span><strong class="command">key</strong></span>
516                 statement
517               </li>
518 <li>the name of an address match list defined with
519                 the <span><strong class="command">acl</strong></span> statement
520               </li>
521 <li>a nested address match list enclosed in braces</li>
522 </ul></div>
523 <p>
524             Elements can be negated with a leading exclamation mark (`!'),
525             and the match list names "any", "none", "localhost", and
526             "localnets" are predefined. More information on those names
527             can be found in the description of the acl statement.
528           </p>
529 <p>
530             The addition of the key clause made the name of this syntactic
531             element something of a misnomer, since security keys can be used
532             to validate access without regard to a host or network address.
533             Nonetheless, the term "address match list" is still used
534             throughout the documentation.
535           </p>
536 <p>
537             When a given IP address or prefix is compared to an address
538             match list, the comparison takes place in approximately O(1)
539             time.  However, key comparisons require that the list of keys
540             be traversed until a matching key is found, and therefore may
541             be somewhat slower.
542           </p>
543 <p>
544             The interpretation of a match depends on whether the list is being
545             used for access control, defining <span><strong class="command">listen-on</strong></span> ports, or in a
546             <span><strong class="command">sortlist</strong></span>, and whether the element was negated.
547           </p>
548 <p>
549             When used as an access control list, a non-negated match
550             allows access and a negated match denies access. If
551             there is no match, access is denied. The clauses
552             <span><strong class="command">allow-notify</strong></span>,
553             <span><strong class="command">allow-recursion</strong></span>,
554             <span><strong class="command">allow-recursion-on</strong></span>,
555             <span><strong class="command">allow-query</strong></span>,
556             <span><strong class="command">allow-query-on</strong></span>,
557             <span><strong class="command">allow-query-cache</strong></span>,
558             <span><strong class="command">allow-query-cache-on</strong></span>,
559             <span><strong class="command">allow-transfer</strong></span>,
560             <span><strong class="command">allow-update</strong></span>,
561             <span><strong class="command">allow-update-forwarding</strong></span>, and
562             <span><strong class="command">blackhole</strong></span> all use address match
563             lists.  Similarly, the <span><strong class="command">listen-on</strong></span> option will cause the
564             server to refuse queries on any of the machine's
565             addresses which do not match the list.
566           </p>
567 <p>
568             Order of insertion is significant.  If more than one element
569             in an ACL is found to match a given IP address or prefix,
570             preference will be given to the one that came
571             <span class="emphasis"><em>first</em></span> in the ACL definition.
572             Because of this first-match behavior, an element that
573             defines a subset of another element in the list should
574             come before the broader element, regardless of whether
575             either is negated. For example, in
576             <span><strong class="command">1.2.3/24; ! 1.2.3.13;</strong></span>
577             the 1.2.3.13 element is completely useless because the
578             algorithm will match any lookup for 1.2.3.13 to the 1.2.3/24
579             element.  Using <span><strong class="command">! 1.2.3.13; 1.2.3/24</strong></span> fixes
580             that problem by having 1.2.3.13 blocked by the negation, but
581             all other 1.2.3.* hosts fall through.
582           </p>
583 </div>
584 </div>
585 <div class="sect2" lang="en">
586 <div class="titlepage"><div><div><h3 class="title">
587 <a name="id2573336"></a>Comment Syntax</h3></div></div></div>
588 <p>
589           The <acronym class="acronym">BIND</acronym> 9 comment syntax allows for
590           comments to appear
591           anywhere that whitespace may appear in a <acronym class="acronym">BIND</acronym> configuration
592           file. To appeal to programmers of all kinds, they can be written
593           in the C, C++, or shell/perl style.
594         </p>
595 <div class="sect3" lang="en">
596 <div class="titlepage"><div><div><h4 class="title">
597 <a name="id2573351"></a>Syntax</h4></div></div></div>
598 <p>
599             </p>
600 <pre class="programlisting">/* This is a <acronym class="acronym">BIND</acronym> comment as in C */</pre>
601 <p>
602             </p>
603 <pre class="programlisting">// This is a <acronym class="acronym">BIND</acronym> comment as in C++</pre>
604 <p>
605             </p>
606 <pre class="programlisting"># This is a <acronym class="acronym">BIND</acronym> comment as in common UNIX shells
607 # and perl</pre>
608 <p>
609           </p>
610 </div>
611 <div class="sect3" lang="en">
612 <div class="titlepage"><div><div><h4 class="title">
613 <a name="id2573381"></a>Definition and Usage</h4></div></div></div>
614 <p>
615             Comments may appear anywhere that whitespace may appear in
616             a <acronym class="acronym">BIND</acronym> configuration file.
617           </p>
618 <p>
619             C-style comments start with the two characters /* (slash,
620             star) and end with */ (star, slash). Because they are completely
621             delimited with these characters, they can be used to comment only
622             a portion of a line or to span multiple lines.
623           </p>
624 <p>
625             C-style comments cannot be nested. For example, the following
626             is not valid because the entire comment ends with the first */:
627           </p>
628 <p>
629
630 </p>
631 <pre class="programlisting">/* This is the start of a comment.
632    This is still part of the comment.
633 /* This is an incorrect attempt at nesting a comment. */
634    This is no longer in any comment. */
635 </pre>
636 <p>
637
638           </p>
639 <p>
640             C++-style comments start with the two characters // (slash,
641             slash) and continue to the end of the physical line. They cannot
642             be continued across multiple physical lines; to have one logical
643             comment span multiple lines, each line must use the // pair.
644             For example:
645           </p>
646 <p>
647
648 </p>
649 <pre class="programlisting">// This is the start of a comment.  The next line
650 // is a new comment, even though it is logically
651 // part of the previous comment.
652 </pre>
653 <p>
654
655           </p>
656 <p>
657             Shell-style (or perl-style, if you prefer) comments start
658             with the character <code class="literal">#</code> (number sign)
659             and continue to the end of the
660             physical line, as in C++ comments.
661             For example:
662           </p>
663 <p>
664
665 </p>
666 <pre class="programlisting"># This is the start of a comment.  The next line
667 # is a new comment, even though it is logically
668 # part of the previous comment.
669 </pre>
670 <p>
671
672           </p>
673 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
674 <h3 class="title">Warning</h3>
675 <p>
676               You cannot use the semicolon (`;') character
677               to start a comment such as you would in a zone file. The
678               semicolon indicates the end of a configuration
679               statement.
680             </p>
681 </div>
682 </div>
683 </div>
684 </div>
685 <div class="sect1" lang="en">
686 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
687 <a name="Configuration_File_Grammar"></a>Configuration File Grammar</h2></div></div></div>
688 <p>
689         A <acronym class="acronym">BIND</acronym> 9 configuration consists of
690         statements and comments.
691         Statements end with a semicolon. Statements and comments are the
692         only elements that can appear without enclosing braces. Many
693         statements contain a block of sub-statements, which are also
694         terminated with a semicolon.
695       </p>
696 <p>
697         The following statements are supported:
698       </p>
699 <div class="informaltable"><table border="1">
700 <colgroup>
701 <col>
702 <col>
703 </colgroup>
704 <tbody>
705 <tr>
706 <td>
707                 <p><span><strong class="command">acl</strong></span></p>
708               </td>
709 <td>
710                 <p>
711                   defines a named IP address
712                   matching list, for access control and other uses.
713                 </p>
714               </td>
715 </tr>
716 <tr>
717 <td>
718                 <p><span><strong class="command">controls</strong></span></p>
719               </td>
720 <td>
721                 <p>
722                   declares control channels to be used
723                   by the <span><strong class="command">rndc</strong></span> utility.
724                 </p>
725               </td>
726 </tr>
727 <tr>
728 <td>
729                 <p><span><strong class="command">include</strong></span></p>
730               </td>
731 <td>
732                 <p>
733                   includes a file.
734                 </p>
735               </td>
736 </tr>
737 <tr>
738 <td>
739                 <p><span><strong class="command">key</strong></span></p>
740               </td>
741 <td>
742                 <p>
743                   specifies key information for use in
744                   authentication and authorization using TSIG.
745                 </p>
746               </td>
747 </tr>
748 <tr>
749 <td>
750                 <p><span><strong class="command">logging</strong></span></p>
751               </td>
752 <td>
753                 <p>
754                   specifies what the server logs, and where
755                   the log messages are sent.
756                 </p>
757               </td>
758 </tr>
759 <tr>
760 <td>
761                 <p><span><strong class="command">lwres</strong></span></p>
762               </td>
763 <td>
764                 <p>
765                   configures <span><strong class="command">named</strong></span> to
766                   also act as a light-weight resolver daemon (<span><strong class="command">lwresd</strong></span>).
767                 </p>
768               </td>
769 </tr>
770 <tr>
771 <td>
772                 <p><span><strong class="command">masters</strong></span></p>
773               </td>
774 <td>
775                 <p>
776                   defines a named masters list for
777                   inclusion in stub and slave zones'
778                   <span><strong class="command">masters</strong></span> or 
779                   <span><strong class="command">also-notify</strong></span> lists.
780                 </p>
781               </td>
782 </tr>
783 <tr>
784 <td>
785                 <p><span><strong class="command">options</strong></span></p>
786               </td>
787 <td>
788                 <p>
789                   controls global server configuration
790                   options and sets defaults for other statements.
791                 </p>
792               </td>
793 </tr>
794 <tr>
795 <td>
796                 <p><span><strong class="command">server</strong></span></p>
797               </td>
798 <td>
799                 <p>
800                   sets certain configuration options on
801                   a per-server basis.
802                 </p>
803               </td>
804 </tr>
805 <tr>
806 <td>
807                 <p><span><strong class="command">statistics-channels</strong></span></p>
808               </td>
809 <td>
810                 <p>
811                   declares communication channels to get access to
812                   <span><strong class="command">named</strong></span> statistics.
813                 </p>
814               </td>
815 </tr>
816 <tr>
817 <td>
818                 <p><span><strong class="command">trusted-keys</strong></span></p>
819               </td>
820 <td>
821                 <p>
822                   defines trusted DNSSEC keys.
823                 </p>
824               </td>
825 </tr>
826 <tr>
827 <td>
828                 <p><span><strong class="command">managed-keys</strong></span></p>
829               </td>
830 <td>
831                 <p>
832                   lists DNSSEC keys to be kept up to date
833                   using RFC 5011 trust anchor maintenance.
834                 </p>
835               </td>
836 </tr>
837 <tr>
838 <td>
839                 <p><span><strong class="command">view</strong></span></p>
840               </td>
841 <td>
842                 <p>
843                   defines a view.
844                 </p>
845               </td>
846 </tr>
847 <tr>
848 <td>
849                 <p><span><strong class="command">zone</strong></span></p>
850               </td>
851 <td>
852                 <p>
853                   defines a zone.
854                 </p>
855               </td>
856 </tr>
857 </tbody>
858 </table></div>
859 <p>
860         The <span><strong class="command">logging</strong></span> and
861         <span><strong class="command">options</strong></span> statements may only occur once
862         per
863         configuration.
864       </p>
865 <div class="sect2" lang="en">
866 <div class="titlepage"><div><div><h3 class="title">
867 <a name="id2573996"></a><span><strong class="command">acl</strong></span> Statement Grammar</h3></div></div></div>
868 <pre class="programlisting"><span><strong class="command">acl</strong></span> acl-name {
869     address_match_list
870 };
871 </pre>
872 </div>
873 <div class="sect2" lang="en">
874 <div class="titlepage"><div><div><h3 class="title">
875 <a name="acl"></a><span><strong class="command">acl</strong></span> Statement Definition and
876           Usage</h3></div></div></div>
877 <p>
878           The <span><strong class="command">acl</strong></span> statement assigns a symbolic
879           name to an address match list. It gets its name from a primary
880           use of address match lists: Access Control Lists (ACLs).
881         </p>
882 <p>
883           Note that an address match list's name must be defined
884           with <span><strong class="command">acl</strong></span> before it can be used
885           elsewhere; no forward references are allowed.
886         </p>
887 <p>
888           The following ACLs are built-in:
889         </p>
890 <div class="informaltable"><table border="1">
891 <colgroup>
892 <col>
893 <col>
894 </colgroup>
895 <tbody>
896 <tr>
897 <td>
898                   <p><span><strong class="command">any</strong></span></p>
899                 </td>
900 <td>
901                   <p>
902                     Matches all hosts.
903                   </p>
904                 </td>
905 </tr>
906 <tr>
907 <td>
908                   <p><span><strong class="command">none</strong></span></p>
909                 </td>
910 <td>
911                   <p>
912                     Matches no hosts.
913                   </p>
914                 </td>
915 </tr>
916 <tr>
917 <td>
918                   <p><span><strong class="command">localhost</strong></span></p>
919                 </td>
920 <td>
921                   <p>
922                     Matches the IPv4 and IPv6 addresses of all network
923                     interfaces on the system.
924                   </p>
925                 </td>
926 </tr>
927 <tr>
928 <td>
929                   <p><span><strong class="command">localnets</strong></span></p>
930                 </td>
931 <td>
932                   <p>
933                     Matches any host on an IPv4 or IPv6 network
934                     for which the system has an interface.
935                     Some systems do not provide a way to determine the prefix
936                     lengths of
937                     local IPv6 addresses.
938                     In such a case, <span><strong class="command">localnets</strong></span>
939                     only matches the local
940                     IPv6 addresses, just like <span><strong class="command">localhost</strong></span>.
941                   </p>
942                 </td>
943 </tr>
944 </tbody>
945 </table></div>
946 </div>
947 <div class="sect2" lang="en">
948 <div class="titlepage"><div><div><h3 class="title">
949 <a name="id2574186"></a><span><strong class="command">controls</strong></span> Statement Grammar</h3></div></div></div>
950 <pre class="programlisting"><span><strong class="command">controls</strong></span> {
951    [ inet ( ip_addr | * ) [ port ip_port ]
952                 allow { <em class="replaceable"><code> address_match_list </code></em> }
953                 keys { <em class="replaceable"><code>key_list</code></em> }; ]
954    [ inet ...; ]
955    [ 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>
956      keys { <em class="replaceable"><code>key_list</code></em> }; ]
957    [ unix ...; ]
958 };
959 </pre>
960 </div>
961 <div class="sect2" lang="en">
962 <div class="titlepage"><div><div><h3 class="title">
963 <a name="controls_statement_definition_and_usage"></a><span><strong class="command">controls</strong></span> Statement Definition and
964           Usage</h3></div></div></div>
965 <p>
966           The <span><strong class="command">controls</strong></span> statement declares control
967           channels to be used by system administrators to control the
968           operation of the name server. These control channels are
969           used by the <span><strong class="command">rndc</strong></span> utility to send
970           commands to and retrieve non-DNS results from a name server.
971         </p>
972 <p>
973           An <span><strong class="command">inet</strong></span> control channel is a TCP socket
974           listening at the specified <span><strong class="command">ip_port</strong></span> on the
975           specified <span><strong class="command">ip_addr</strong></span>, which can be an IPv4 or IPv6
976           address.  An <span><strong class="command">ip_addr</strong></span> of <code class="literal">*</code> (asterisk) is
977           interpreted as the IPv4 wildcard address; connections will be
978           accepted on any of the system's IPv4 addresses.
979           To listen on the IPv6 wildcard address,
980           use an <span><strong class="command">ip_addr</strong></span> of <code class="literal">::</code>.
981           If you will only use <span><strong class="command">rndc</strong></span> on the local host,
982           using the loopback address (<code class="literal">127.0.0.1</code>
983           or <code class="literal">::1</code>) is recommended for maximum security.
984         </p>
985 <p>
986           If no port is specified, port 953 is used. The asterisk
987           "<code class="literal">*</code>" cannot be used for <span><strong class="command">ip_port</strong></span>.
988         </p>
989 <p>
990           The ability to issue commands over the control channel is
991           restricted by the <span><strong class="command">allow</strong></span> and
992           <span><strong class="command">keys</strong></span> clauses.
993           Connections to the control channel are permitted based on the
994           <span><strong class="command">address_match_list</strong></span>.  This is for simple
995           IP address based filtering only; any <span><strong class="command">key_id</strong></span>
996           elements of the <span><strong class="command">address_match_list</strong></span>
997           are ignored.
998         </p>
999 <p>
1000           A <span><strong class="command">unix</strong></span> control channel is a UNIX domain
1001           socket listening at the specified path in the file system.
1002           Access to the socket is specified by the <span><strong class="command">perm</strong></span>,
1003           <span><strong class="command">owner</strong></span> and <span><strong class="command">group</strong></span> clauses.
1004           Note on some platforms (SunOS and Solaris) the permissions
1005           (<span><strong class="command">perm</strong></span>) are applied to the parent directory
1006           as the permissions on the socket itself are ignored.
1007         </p>
1008 <p>
1009           The primary authorization mechanism of the command
1010           channel is the <span><strong class="command">key_list</strong></span>, which
1011           contains a list of <span><strong class="command">key_id</strong></span>s.
1012           Each <span><strong class="command">key_id</strong></span> in the <span><strong class="command">key_list</strong></span>
1013           is authorized to execute commands over the control channel.
1014           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>)
1015           for information about configuring keys in <span><strong class="command">rndc</strong></span>.
1016         </p>
1017 <p>
1018           If no <span><strong class="command">controls</strong></span> statement is present,
1019           <span><strong class="command">named</strong></span> will set up a default
1020           control channel listening on the loopback address 127.0.0.1
1021           and its IPv6 counterpart ::1.
1022           In this case, and also when the <span><strong class="command">controls</strong></span> statement
1023           is present but does not have a <span><strong class="command">keys</strong></span> clause,
1024           <span><strong class="command">named</strong></span> will attempt to load the command channel key
1025           from the file <code class="filename">rndc.key</code> in
1026           <code class="filename">/etc</code> (or whatever <code class="varname">sysconfdir</code>
1027           was specified as when <acronym class="acronym">BIND</acronym> was built).
1028           To create a <code class="filename">rndc.key</code> file, run
1029           <strong class="userinput"><code>rndc-confgen -a</code></strong>.
1030         </p>
1031 <p>
1032           The <code class="filename">rndc.key</code> feature was created to
1033           ease the transition of systems from <acronym class="acronym">BIND</acronym> 8,
1034           which did not have digital signatures on its command channel
1035           messages and thus did not have a <span><strong class="command">keys</strong></span> clause.
1036
1037           It makes it possible to use an existing <acronym class="acronym">BIND</acronym> 8
1038           configuration file in <acronym class="acronym">BIND</acronym> 9 unchanged,
1039           and still have <span><strong class="command">rndc</strong></span> work the same way
1040           <span><strong class="command">ndc</strong></span> worked in BIND 8, simply by executing the
1041           command <strong class="userinput"><code>rndc-confgen -a</code></strong> after BIND 9 is
1042           installed.
1043         </p>
1044 <p>
1045           Since the <code class="filename">rndc.key</code> feature
1046           is only intended to allow the backward-compatible usage of
1047           <acronym class="acronym">BIND</acronym> 8 configuration files, this
1048           feature does not
1049           have a high degree of configurability.  You cannot easily change
1050           the key name or the size of the secret, so you should make a
1051           <code class="filename">rndc.conf</code> with your own key if you
1052           wish to change
1053           those things.  The <code class="filename">rndc.key</code> file
1054           also has its
1055           permissions set such that only the owner of the file (the user that
1056           <span><strong class="command">named</strong></span> is running as) can access it.
1057           If you
1058           desire greater flexibility in allowing other users to access
1059           <span><strong class="command">rndc</strong></span> commands, then you need to create
1060           a
1061           <code class="filename">rndc.conf</code> file and make it group
1062           readable by a group
1063           that contains the users who should have access.
1064         </p>
1065 <p>
1066           To disable the command channel, use an empty
1067           <span><strong class="command">controls</strong></span> statement:
1068           <span><strong class="command">controls { };</strong></span>.
1069         </p>
1070 </div>
1071 <div class="sect2" lang="en">
1072 <div class="titlepage"><div><div><h3 class="title">
1073 <a name="id2574614"></a><span><strong class="command">include</strong></span> Statement Grammar</h3></div></div></div>
1074 <pre class="programlisting"><span><strong class="command">include</strong></span> <em class="replaceable"><code>filename</code></em>;</pre>
1075 </div>
1076 <div class="sect2" lang="en">
1077 <div class="titlepage"><div><div><h3 class="title">
1078 <a name="id2574631"></a><span><strong class="command">include</strong></span> Statement Definition and
1079           Usage</h3></div></div></div>
1080 <p>
1081           The <span><strong class="command">include</strong></span> statement inserts the
1082           specified file at the point where the <span><strong class="command">include</strong></span>
1083           statement is encountered. The <span><strong class="command">include</strong></span>
1084                 statement facilitates the administration of configuration
1085           files
1086           by permitting the reading or writing of some things but not
1087           others. For example, the statement could include private keys
1088           that are readable only by the name server.
1089         </p>
1090 </div>
1091 <div class="sect2" lang="en">
1092 <div class="titlepage"><div><div><h3 class="title">
1093 <a name="id2574654"></a><span><strong class="command">key</strong></span> Statement Grammar</h3></div></div></div>
1094 <pre class="programlisting"><span><strong class="command">key</strong></span> <em class="replaceable"><code>key_id</code></em> {
1095     algorithm <em class="replaceable"><code>string</code></em>;
1096     secret <em class="replaceable"><code>string</code></em>;
1097 };
1098 </pre>
1099 </div>
1100 <div class="sect2" lang="en">
1101 <div class="titlepage"><div><div><h3 class="title">
1102 <a name="id2574678"></a><span><strong class="command">key</strong></span> Statement Definition and Usage</h3></div></div></div>
1103 <p>
1104           The <span><strong class="command">key</strong></span> statement defines a shared
1105           secret key for use with TSIG (see <a href="Bv9ARM.ch04.html#tsig" title="TSIG">the section called &#8220;TSIG&#8221;</a>)
1106           or the command channel
1107           (see <a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage" title="controls Statement Definition and
1108           Usage">the section called &#8220;<span><strong class="command">controls</strong></span> Statement Definition and
1109           Usage&#8221;</a>).
1110         </p>
1111 <p>
1112           The <span><strong class="command">key</strong></span> statement can occur at the
1113           top level
1114           of the configuration file or inside a <span><strong class="command">view</strong></span>
1115           statement.  Keys defined in top-level <span><strong class="command">key</strong></span>
1116           statements can be used in all views.  Keys intended for use in
1117           a <span><strong class="command">controls</strong></span> statement
1118           (see <a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage" title="controls Statement Definition and
1119           Usage">the section called &#8220;<span><strong class="command">controls</strong></span> Statement Definition and
1120           Usage&#8221;</a>)
1121           must be defined at the top level.
1122         </p>
1123 <p>
1124           The <em class="replaceable"><code>key_id</code></em>, also known as the
1125           key name, is a domain name uniquely identifying the key. It can
1126           be used in a <span><strong class="command">server</strong></span>
1127           statement to cause requests sent to that
1128           server to be signed with this key, or in address match lists to
1129           verify that incoming requests have been signed with a key
1130           matching this name, algorithm, and secret.
1131         </p>
1132 <p>
1133           The <em class="replaceable"><code>algorithm_id</code></em> is a string
1134           that specifies a security/authentication algorithm.  Named
1135           supports <code class="literal">hmac-md5</code>,
1136           <code class="literal">hmac-sha1</code>, <code class="literal">hmac-sha224</code>,
1137           <code class="literal">hmac-sha256</code>, <code class="literal">hmac-sha384</code>
1138           and <code class="literal">hmac-sha512</code> TSIG authentication.
1139           Truncated hashes are supported by appending the minimum
1140           number of required bits preceded by a dash, e.g.
1141           <code class="literal">hmac-sha1-80</code>.  The
1142           <em class="replaceable"><code>secret_string</code></em> is the secret
1143           to be used by the algorithm, and is treated as a base-64
1144           encoded string.
1145         </p>
1146 </div>
1147 <div class="sect2" lang="en">
1148 <div class="titlepage"><div><div><h3 class="title">
1149 <a name="id2574769"></a><span><strong class="command">logging</strong></span> Statement Grammar</h3></div></div></div>
1150 <pre class="programlisting"><span><strong class="command">logging</strong></span> {
1151    [ <span><strong class="command">channel</strong></span> <em class="replaceable"><code>channel_name</code></em> {
1152      ( <span><strong class="command">file</strong></span> <em class="replaceable"><code>path_name</code></em>
1153          [ <span><strong class="command">versions</strong></span> ( <em class="replaceable"><code>number</code></em> | <span><strong class="command">unlimited</strong></span> ) ]
1154          [ <span><strong class="command">size</strong></span> <em class="replaceable"><code>size_spec</code></em> ]
1155        | <span><strong class="command">syslog</strong></span> <em class="replaceable"><code>syslog_facility</code></em>
1156        | <span><strong class="command">stderr</strong></span>
1157        | <span><strong class="command">null</strong></span> );
1158      [ <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> |
1159                  <code class="option">info</code> | <code class="option">debug</code> [ <em class="replaceable"><code>level</code></em> ] | <code class="option">dynamic</code> ); ]
1160      [ <span><strong class="command">print-category</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1161      [ <span><strong class="command">print-severity</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1162      [ <span><strong class="command">print-time</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1163    }; ]
1164    [ <span><strong class="command">category</strong></span> <em class="replaceable"><code>category_name</code></em> {
1165      <em class="replaceable"><code>channel_name</code></em> ; [ <em class="replaceable"><code>channel_name</code></em> ; ... ]
1166    }; ]
1167    ...
1168 };
1169 </pre>
1170 </div>
1171 <div class="sect2" lang="en">
1172 <div class="titlepage"><div><div><h3 class="title">
1173 <a name="id2574963"></a><span><strong class="command">logging</strong></span> Statement Definition and
1174           Usage</h3></div></div></div>
1175 <p>
1176           The <span><strong class="command">logging</strong></span> statement configures a
1177           wide
1178           variety of logging options for the name server. Its <span><strong class="command">channel</strong></span> phrase
1179           associates output methods, format options and severity levels with
1180           a name that can then be used with the <span><strong class="command">category</strong></span> phrase
1181           to select how various classes of messages are logged.
1182         </p>
1183 <p>
1184           Only one <span><strong class="command">logging</strong></span> statement is used to
1185           define
1186           as many channels and categories as are wanted. If there is no <span><strong class="command">logging</strong></span> statement,
1187           the logging configuration will be:
1188         </p>
1189 <pre class="programlisting">logging {
1190      category default { default_syslog; default_debug; };
1191      category unmatched { null; };
1192 };
1193 </pre>
1194 <p>
1195           In <acronym class="acronym">BIND</acronym> 9, the logging configuration
1196           is only established when
1197           the entire configuration file has been parsed.  In <acronym class="acronym">BIND</acronym> 8, it was
1198           established as soon as the <span><strong class="command">logging</strong></span>
1199           statement
1200           was parsed. When the server is starting up, all logging messages
1201           regarding syntax errors in the configuration file go to the default
1202           channels, or to standard error if the "<code class="option">-g</code>" option
1203           was specified.
1204         </p>
1205 <div class="sect3" lang="en">
1206 <div class="titlepage"><div><div><h4 class="title">
1207 <a name="id2575015"></a>The <span><strong class="command">channel</strong></span> Phrase</h4></div></div></div>
1208 <p>
1209             All log output goes to one or more <span class="emphasis"><em>channels</em></span>;
1210             you can make as many of them as you want.
1211           </p>
1212 <p>
1213             Every channel definition must include a destination clause that
1214             says whether messages selected for the channel go to a file, to a
1215             particular syslog facility, to the standard error stream, or are
1216             discarded. It can optionally also limit the message severity level
1217             that will be accepted by the channel (the default is
1218             <span><strong class="command">info</strong></span>), and whether to include a
1219             <span><strong class="command">named</strong></span>-generated time stamp, the
1220             category name
1221             and/or severity level (the default is not to include any).
1222           </p>
1223 <p>
1224             The <span><strong class="command">null</strong></span> destination clause
1225             causes all messages sent to the channel to be discarded;
1226             in that case, other options for the channel are meaningless.
1227           </p>
1228 <p>
1229             The <span><strong class="command">file</strong></span> destination clause directs
1230             the channel
1231             to a disk file.  It can include limitations
1232             both on how large the file is allowed to become, and how many
1233             versions
1234             of the file will be saved each time the file is opened.
1235           </p>
1236 <p>
1237             If you use the <span><strong class="command">versions</strong></span> log file
1238             option, then
1239             <span><strong class="command">named</strong></span> will retain that many backup
1240             versions of the file by
1241             renaming them when opening.  For example, if you choose to keep
1242             three old versions
1243             of the file <code class="filename">lamers.log</code>, then just
1244             before it is opened
1245             <code class="filename">lamers.log.1</code> is renamed to
1246             <code class="filename">lamers.log.2</code>, <code class="filename">lamers.log.0</code> is renamed
1247             to <code class="filename">lamers.log.1</code>, and <code class="filename">lamers.log</code> is
1248             renamed to <code class="filename">lamers.log.0</code>.
1249             You can say <span><strong class="command">versions unlimited</strong></span> to
1250             not limit
1251             the number of versions.
1252             If a <span><strong class="command">size</strong></span> option is associated with
1253             the log file,
1254             then renaming is only done when the file being opened exceeds the
1255             indicated size.  No backup versions are kept by default; any
1256             existing
1257             log file is simply appended.
1258           </p>
1259 <p>
1260             The <span><strong class="command">size</strong></span> option for files is used
1261             to limit log
1262             growth. If the file ever exceeds the size, then <span><strong class="command">named</strong></span> will
1263             stop writing to the file unless it has a <span><strong class="command">versions</strong></span> option
1264             associated with it.  If backup versions are kept, the files are
1265             rolled as
1266             described above and a new one begun.  If there is no
1267             <span><strong class="command">versions</strong></span> option, no more data will
1268             be written to the log
1269             until some out-of-band mechanism removes or truncates the log to
1270             less than the
1271             maximum size.  The default behavior is not to limit the size of
1272             the
1273             file.
1274           </p>
1275 <p>
1276             Example usage of the <span><strong class="command">size</strong></span> and
1277             <span><strong class="command">versions</strong></span> options:
1278           </p>
1279 <pre class="programlisting">channel an_example_channel {
1280     file "example.log" versions 3 size 20m;
1281     print-time yes;
1282     print-category yes;
1283 };
1284 </pre>
1285 <p>
1286             The <span><strong class="command">syslog</strong></span> destination clause
1287             directs the
1288             channel to the system log.  Its argument is a
1289             syslog facility as described in the <span><strong class="command">syslog</strong></span> man
1290             page. Known facilities are <span><strong class="command">kern</strong></span>, <span><strong class="command">user</strong></span>,
1291             <span><strong class="command">mail</strong></span>, <span><strong class="command">daemon</strong></span>, <span><strong class="command">auth</strong></span>,
1292             <span><strong class="command">syslog</strong></span>, <span><strong class="command">lpr</strong></span>, <span><strong class="command">news</strong></span>,
1293             <span><strong class="command">uucp</strong></span>, <span><strong class="command">cron</strong></span>, <span><strong class="command">authpriv</strong></span>,
1294             <span><strong class="command">ftp</strong></span>, <span><strong class="command">local0</strong></span>, <span><strong class="command">local1</strong></span>,
1295             <span><strong class="command">local2</strong></span>, <span><strong class="command">local3</strong></span>, <span><strong class="command">local4</strong></span>,
1296             <span><strong class="command">local5</strong></span>, <span><strong class="command">local6</strong></span> and
1297             <span><strong class="command">local7</strong></span>, however not all facilities
1298             are supported on
1299             all operating systems.
1300             How <span><strong class="command">syslog</strong></span> will handle messages
1301             sent to
1302             this facility is described in the <span><strong class="command">syslog.conf</strong></span> man
1303             page. If you have a system which uses a very old version of <span><strong class="command">syslog</strong></span> that
1304             only uses two arguments to the <span><strong class="command">openlog()</strong></span> function,
1305             then this clause is silently ignored.
1306           </p>
1307 <p>
1308             On Windows machines syslog messages are directed to the EventViewer.
1309           </p>
1310 <p>
1311             The <span><strong class="command">severity</strong></span> clause works like <span><strong class="command">syslog</strong></span>'s
1312             "priorities", except that they can also be used if you are writing
1313             straight to a file rather than using <span><strong class="command">syslog</strong></span>.
1314             Messages which are not at least of the severity level given will
1315             not be selected for the channel; messages of higher severity
1316             levels
1317             will be accepted.
1318           </p>
1319 <p>
1320             If you are using <span><strong class="command">syslog</strong></span>, then the <span><strong class="command">syslog.conf</strong></span> priorities
1321             will also determine what eventually passes through. For example,
1322             defining a channel facility and severity as <span><strong class="command">daemon</strong></span> and <span><strong class="command">debug</strong></span> but
1323             only logging <span><strong class="command">daemon.warning</strong></span> via <span><strong class="command">syslog.conf</strong></span> will
1324             cause messages of severity <span><strong class="command">info</strong></span> and
1325             <span><strong class="command">notice</strong></span> to
1326             be dropped. If the situation were reversed, with <span><strong class="command">named</strong></span> writing
1327             messages of only <span><strong class="command">warning</strong></span> or higher,
1328             then <span><strong class="command">syslogd</strong></span> would
1329             print all messages it received from the channel.
1330           </p>
1331 <p>
1332             The <span><strong class="command">stderr</strong></span> destination clause
1333             directs the
1334             channel to the server's standard error stream.  This is intended
1335             for
1336             use when the server is running as a foreground process, for
1337             example
1338             when debugging a configuration.
1339           </p>
1340 <p>
1341             The server can supply extensive debugging information when
1342             it is in debugging mode. If the server's global debug level is
1343             greater
1344             than zero, then debugging mode will be active. The global debug
1345             level is set either by starting the <span><strong class="command">named</strong></span> server
1346             with the <code class="option">-d</code> flag followed by a positive integer,
1347             or by running <span><strong class="command">rndc trace</strong></span>.
1348             The global debug level
1349             can be set to zero, and debugging mode turned off, by running <span><strong class="command">rndc
1350 notrace</strong></span>. All debugging messages in the server have a debug
1351             level, and higher debug levels give more detailed output. Channels
1352             that specify a specific debug severity, for example:
1353           </p>
1354 <pre class="programlisting">channel specific_debug_level {
1355     file "foo";
1356     severity debug 3;
1357 };
1358 </pre>
1359 <p>
1360             will get debugging output of level 3 or less any time the
1361             server is in debugging mode, regardless of the global debugging
1362             level. Channels with <span><strong class="command">dynamic</strong></span>
1363             severity use the
1364             server's global debug level to determine what messages to print.
1365           </p>
1366 <p>
1367             If <span><strong class="command">print-time</strong></span> has been turned on,
1368             then
1369             the date and time will be logged. <span><strong class="command">print-time</strong></span> may
1370             be specified for a <span><strong class="command">syslog</strong></span> channel,
1371             but is usually
1372             pointless since <span><strong class="command">syslog</strong></span> also logs
1373             the date and
1374             time. If <span><strong class="command">print-category</strong></span> is
1375             requested, then the
1376             category of the message will be logged as well. Finally, if <span><strong class="command">print-severity</strong></span> is
1377             on, then the severity level of the message will be logged. The <span><strong class="command">print-</strong></span> options may
1378             be used in any combination, and will always be printed in the
1379             following
1380             order: time, category, severity. Here is an example where all
1381             three <span><strong class="command">print-</strong></span> options
1382             are on:
1383           </p>
1384 <p>
1385             <code class="computeroutput">28-Feb-2000 15:05:32.863 general: notice: running</code>
1386           </p>
1387 <p>
1388             There are four predefined channels that are used for
1389             <span><strong class="command">named</strong></span>'s default logging as follows.
1390             How they are
1391             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>.
1392           </p>
1393 <pre class="programlisting">channel default_syslog {
1394     // send to syslog's daemon facility
1395     syslog daemon;
1396     // only send priority info and higher
1397     severity info;
1398
1399 channel default_debug {
1400     // write to named.run in the working directory
1401     // Note: stderr is used instead of "named.run" if
1402     // the server is started with the '-f' option.
1403     file "named.run";
1404     // log at the server's current debug level
1405     severity dynamic;
1406 };
1407
1408 channel default_stderr {
1409     // writes to stderr
1410     stderr;
1411     // only send priority info and higher
1412     severity info;
1413 };
1414
1415 channel null {
1416    // toss anything sent to this channel
1417    null;
1418 };
1419 </pre>
1420 <p>
1421             The <span><strong class="command">default_debug</strong></span> channel has the
1422             special
1423             property that it only produces output when the server's debug
1424             level is
1425             nonzero.  It normally writes to a file called <code class="filename">named.run</code>
1426             in the server's working directory.
1427           </p>
1428 <p>
1429             For security reasons, when the "<code class="option">-u</code>"
1430             command line option is used, the <code class="filename">named.run</code> file
1431             is created only after <span><strong class="command">named</strong></span> has
1432             changed to the
1433             new UID, and any debug output generated while <span><strong class="command">named</strong></span> is
1434             starting up and still running as root is discarded.  If you need
1435             to capture this output, you must run the server with the "<code class="option">-g</code>"
1436             option and redirect standard error to a file.
1437           </p>
1438 <p>
1439             Once a channel is defined, it cannot be redefined. Thus you
1440             cannot alter the built-in channels directly, but you can modify
1441             the default logging by pointing categories at channels you have
1442             defined.
1443           </p>
1444 </div>
1445 <div class="sect3" lang="en">
1446 <div class="titlepage"><div><div><h4 class="title">
1447 <a name="the_category_phrase"></a>The <span><strong class="command">category</strong></span> Phrase</h4></div></div></div>
1448 <p>
1449             There are many categories, so you can send the logs you want
1450             to see wherever you want, without seeing logs you don't want. If
1451             you don't specify a list of channels for a category, then log
1452             messages
1453             in that category will be sent to the <span><strong class="command">default</strong></span> category
1454             instead. If you don't specify a default category, the following
1455             "default default" is used:
1456           </p>
1457 <pre class="programlisting">category default { default_syslog; default_debug; };
1458 </pre>
1459 <p>
1460             As an example, let's say you want to log security events to
1461             a file, but you also want keep the default logging behavior. You'd
1462             specify the following:
1463           </p>
1464 <pre class="programlisting">channel my_security_channel {
1465     file "my_security_file";
1466     severity info;
1467 };
1468 category security {
1469     my_security_channel;
1470     default_syslog;
1471     default_debug;
1472 };</pre>
1473 <p>
1474             To discard all messages in a category, specify the <span><strong class="command">null</strong></span> channel:
1475           </p>
1476 <pre class="programlisting">category xfer-out { null; };
1477 category notify { null; };
1478 </pre>
1479 <p>
1480             Following are the available categories and brief descriptions
1481             of the types of log information they contain. More
1482             categories may be added in future <acronym class="acronym">BIND</acronym> releases.
1483           </p>
1484 <div class="informaltable"><table border="1">
1485 <colgroup>
1486 <col>
1487 <col>
1488 </colgroup>
1489 <tbody>
1490 <tr>
1491 <td>
1492                     <p><span><strong class="command">default</strong></span></p>
1493                   </td>
1494 <td>
1495                     <p>
1496                       The default category defines the logging
1497                       options for those categories where no specific
1498                       configuration has been
1499                       defined.
1500                     </p>
1501                   </td>
1502 </tr>
1503 <tr>
1504 <td>
1505                     <p><span><strong class="command">general</strong></span></p>
1506                   </td>
1507 <td>
1508                     <p>
1509                       The catch-all. Many things still aren't
1510                       classified into categories, and they all end up here.
1511                     </p>
1512                   </td>
1513 </tr>
1514 <tr>
1515 <td>
1516                     <p><span><strong class="command">database</strong></span></p>
1517                   </td>
1518 <td>
1519                     <p>
1520                       Messages relating to the databases used
1521                       internally by the name server to store zone and cache
1522                       data.
1523                     </p>
1524                   </td>
1525 </tr>
1526 <tr>
1527 <td>
1528                     <p><span><strong class="command">security</strong></span></p>
1529                   </td>
1530 <td>
1531                     <p>
1532                       Approval and denial of requests.
1533                     </p>
1534                   </td>
1535 </tr>
1536 <tr>
1537 <td>
1538                     <p><span><strong class="command">config</strong></span></p>
1539                   </td>
1540 <td>
1541                     <p>
1542                       Configuration file parsing and processing.
1543                     </p>
1544                   </td>
1545 </tr>
1546 <tr>
1547 <td>
1548                     <p><span><strong class="command">resolver</strong></span></p>
1549                   </td>
1550 <td>
1551                     <p>
1552                       DNS resolution, such as the recursive
1553                       lookups performed on behalf of clients by a caching name
1554                       server.
1555                     </p>
1556                   </td>
1557 </tr>
1558 <tr>
1559 <td>
1560                     <p><span><strong class="command">xfer-in</strong></span></p>
1561                   </td>
1562 <td>
1563                     <p>
1564                       Zone transfers the server is receiving.
1565                     </p>
1566                   </td>
1567 </tr>
1568 <tr>
1569 <td>
1570                     <p><span><strong class="command">xfer-out</strong></span></p>
1571                   </td>
1572 <td>
1573                     <p>
1574                       Zone transfers the server is sending.
1575                     </p>
1576                   </td>
1577 </tr>
1578 <tr>
1579 <td>
1580                     <p><span><strong class="command">notify</strong></span></p>
1581                   </td>
1582 <td>
1583                     <p>
1584                       The NOTIFY protocol.
1585                     </p>
1586                   </td>
1587 </tr>
1588 <tr>
1589 <td>
1590                     <p><span><strong class="command">client</strong></span></p>
1591                   </td>
1592 <td>
1593                     <p>
1594                       Processing of client requests.
1595                     </p>
1596                   </td>
1597 </tr>
1598 <tr>
1599 <td>
1600                     <p><span><strong class="command">unmatched</strong></span></p>
1601                   </td>
1602 <td>
1603                     <p>
1604                       Messages that <span><strong class="command">named</strong></span> was unable to determine the
1605                       class of or for which there was no matching <span><strong class="command">view</strong></span>.
1606                       A one line summary is also logged to the <span><strong class="command">client</strong></span> category.
1607                       This category is best sent to a file or stderr, by
1608                       default it is sent to
1609                       the <span><strong class="command">null</strong></span> channel.
1610                     </p>
1611                   </td>
1612 </tr>
1613 <tr>
1614 <td>
1615                     <p><span><strong class="command">network</strong></span></p>
1616                   </td>
1617 <td>
1618                     <p>
1619                       Network operations.
1620                     </p>
1621                   </td>
1622 </tr>
1623 <tr>
1624 <td>
1625                     <p><span><strong class="command">update</strong></span></p>
1626                   </td>
1627 <td>
1628                     <p>
1629                       Dynamic updates.
1630                     </p>
1631                   </td>
1632 </tr>
1633 <tr>
1634 <td>
1635                     <p><span><strong class="command">update-security</strong></span></p>
1636                   </td>
1637 <td>
1638                     <p>
1639                       Approval and denial of update requests.
1640                     </p>
1641                   </td>
1642 </tr>
1643 <tr>
1644 <td>
1645                     <p><span><strong class="command">queries</strong></span></p>
1646                   </td>
1647 <td>
1648                     <p>
1649                       Specify where queries should be logged to.
1650                     </p>
1651                     <p>
1652                       At startup, specifying the category <span><strong class="command">queries</strong></span> will also
1653                       enable query logging unless <span><strong class="command">querylog</strong></span> option has been
1654                       specified.
1655                     </p>
1656
1657                     <p>
1658                       The query log entry reports the client's IP
1659                       address and port number, and the query name,
1660                       class and type.  Next it reports whether the
1661                       Recursion Desired flag was set (+ if set, -
1662                       if not set), if the query was signed (S),
1663                       EDNS was in use (E), if TCP was used (T), if
1664                       DO (DNSSEC Ok) was set (D), or if CD (Checking
1665                       Disabled) was set (C).  After this the
1666                       destination address the query was sent to is
1667                       reported.
1668                     </p>
1669
1670                     <p>
1671                       <code class="computeroutput">client 127.0.0.1#62536 (www.example.com): query: www.example.com IN AAAA +SE</code>
1672                     </p>
1673                     <p>
1674                       <code class="computeroutput">client ::1#62537 (www.example.net): query: www.example.net IN AAAA -SE</code>
1675                     </p>
1676                     <p>
1677                       (The first part of this log message, showing the
1678                       client address/port number and query name, is
1679                       repeated in all subsequent log messages related
1680                       to the same query.)
1681                     </p>
1682                   </td>
1683 </tr>
1684 <tr>
1685 <td>
1686                     <p><span><strong class="command">query-errors</strong></span></p>
1687                   </td>
1688 <td>
1689                     <p>
1690                       Information about queries that resulted in some
1691                       failure.
1692                     </p>
1693                   </td>
1694 </tr>
1695 <tr>
1696 <td>
1697                     <p><span><strong class="command">dispatch</strong></span></p>
1698                   </td>
1699 <td>
1700                     <p>
1701                       Dispatching of incoming packets to the
1702                       server modules where they are to be processed.
1703                     </p>
1704                   </td>
1705 </tr>
1706 <tr>
1707 <td>
1708                     <p><span><strong class="command">dnssec</strong></span></p>
1709                   </td>
1710 <td>
1711                     <p>
1712                       DNSSEC and TSIG protocol processing.
1713                     </p>
1714                   </td>
1715 </tr>
1716 <tr>
1717 <td>
1718                     <p><span><strong class="command">lame-servers</strong></span></p>
1719                   </td>
1720 <td>
1721                     <p>
1722                       Lame servers.  These are misconfigurations
1723                       in remote servers, discovered by BIND 9 when trying to
1724                       query those servers during resolution.
1725                     </p>
1726                   </td>
1727 </tr>
1728 <tr>
1729 <td>
1730                     <p><span><strong class="command">delegation-only</strong></span></p>
1731                   </td>
1732 <td>
1733                     <p>
1734                       Delegation only.  Logs queries that have been
1735                       forced to NXDOMAIN as the result of a
1736                       delegation-only zone or a
1737                       <span><strong class="command">delegation-only</strong></span> in a hint
1738                       or stub zone declaration.
1739                     </p>
1740                   </td>
1741 </tr>
1742 <tr>
1743 <td>
1744                     <p><span><strong class="command">edns-disabled</strong></span></p>
1745                   </td>
1746 <td>
1747                     <p>
1748                       Log queries that have been forced to use plain
1749                       DNS due to timeouts.  This is often due to
1750                       the remote servers not being RFC 1034 compliant
1751                       (not always returning FORMERR or similar to
1752                       EDNS queries and other extensions to the DNS
1753                       when they are not understood).  In other words, this is
1754                       targeted at servers that fail to respond to
1755                       DNS queries that they don't understand.
1756                     </p>
1757                     <p>
1758                       Note: the log message can also be due to
1759                       packet loss.  Before reporting servers for
1760                       non-RFC 1034 compliance they should be re-tested
1761                       to determine the nature of the non-compliance.
1762                       This testing should prevent or reduce the
1763                       number of false-positive reports.
1764                     </p>
1765                     <p>
1766                       Note: eventually <span><strong class="command">named</strong></span> will have to stop
1767                       treating such timeouts as due to RFC 1034 non
1768                       compliance and start treating it as plain
1769                       packet loss.  Falsely classifying packet
1770                       loss as due to RFC 1034 non compliance impacts
1771                       on DNSSEC validation which requires EDNS for
1772                       the DNSSEC records to be returned.
1773                     </p>
1774                   </td>
1775 </tr>
1776 <tr>
1777 <td>
1778                     <p><span><strong class="command">RPZ</strong></span></p>
1779                   </td>
1780 <td>
1781                     <p>
1782                       Information about errors in response policy zone files,
1783                       rewritten responses, and at the highest
1784                       <span><strong class="command">debug</strong></span> levels, mere rewriting
1785                       attempts.
1786                     </p>
1787                   </td>
1788 </tr>
1789 <tr>
1790 <td>
1791                     <p><span><strong class="command">rate-limit</strong></span></p>
1792                   </td>
1793 <td>
1794                     <p>
1795                       (Only available when <acronym class="acronym">BIND</acronym> 9 is
1796                       configured with the <strong class="userinput"><code>--enable-rrl</code></strong>
1797                       option at compile time.)
1798                     </p>
1799                     <p>
1800                       The start, periodic, and final notices of the
1801                       rate limiting of a stream of responses are logged at
1802                       <span><strong class="command">info</strong></span> severity in this category.
1803                       These messages include a hash value of the domain name
1804                       of the response and the name itself,
1805                       except when there is insufficient memory to record
1806                       the name for the final notice
1807                       The final notice is normally delayed until about one
1808                       minute after rate limit stops.
1809                       A lack of memory can hurry the final notice,
1810                       in which case it starts with an asterisk (*).
1811                       Various internal events are logged at debug 1 level
1812                       and higher.
1813                     </p>
1814                     <p>
1815                       Rate limiting of individual requests
1816                       is logged in the <span><strong class="command">query-errors</strong></span> category.
1817                     </p>
1818                   </td>
1819 </tr>
1820 </tbody>
1821 </table></div>
1822 </div>
1823 <div class="sect3" lang="en">
1824 <div class="titlepage"><div><div><h4 class="title">
1825 <a name="id2576518"></a>The <span><strong class="command">query-errors</strong></span> Category</h4></div></div></div>
1826 <p>
1827             The <span><strong class="command">query-errors</strong></span> category is
1828             specifically intended for debugging purposes: To identify
1829             why and how specific queries result in responses which
1830             indicate an error.
1831             Messages of this category are therefore only logged
1832             with <span><strong class="command">debug</strong></span> levels.
1833           </p>
1834 <p>
1835             At the debug levels of 1 or higher, each response with the
1836             rcode of SERVFAIL is logged as follows:
1837           </p>
1838 <p>
1839             <code class="computeroutput">client 127.0.0.1#61502: query failed (SERVFAIL) for www.example.com/IN/AAAA at query.c:3880</code>
1840           </p>
1841 <p>
1842             This means an error resulting in SERVFAIL was
1843             detected at line 3880 of source file
1844             <code class="filename">query.c</code>.
1845             Log messages of this level will particularly
1846             help identify the cause of SERVFAIL for an
1847             authoritative server.
1848           </p>
1849 <p>
1850             At the debug levels of 2 or higher, detailed context
1851             information of recursive resolutions that resulted in
1852             SERVFAIL is logged.
1853             The log message will look like as follows:
1854           </p>
1855 <p>
1856
1857             </p>
1858 <pre class="programlisting">
1859 fetch completed at resolver.c:2970 for www.example.com/A
1860 in 30.000183: timed out/success [domain:example.com,
1861 referral:2,restart:7,qrysent:8,timeout:5,lame:0,neterr:0,
1862 badresp:1,adberr:0,findfail:0,valfail:0]
1863             </pre>
1864 <p>
1865           </p>
1866 <p>
1867             The first part before the colon shows that a recursive
1868             resolution for AAAA records of www.example.com completed
1869             in 30.000183 seconds and the final result that led to the
1870             SERVFAIL was determined at line 2970 of source file
1871             <code class="filename">resolver.c</code>.
1872           </p>
1873 <p>
1874             The following part shows the detected final result and the
1875             latest result of DNSSEC validation.
1876             The latter is always success when no validation attempt
1877             is made.
1878             In this example, this query resulted in SERVFAIL probably
1879             because all name servers are down or unreachable, leading
1880             to a timeout in 30 seconds.
1881             DNSSEC validation was probably not attempted.
1882           </p>
1883 <p>
1884             The last part enclosed in square brackets shows statistics
1885             information collected for this particular resolution
1886             attempt.
1887             The <code class="varname">domain</code> field shows the deepest zone
1888             that the resolver reached;
1889             it is the zone where the error was finally detected.
1890             The meaning of the other fields is summarized in the
1891             following table.
1892           </p>
1893 <div class="informaltable"><table border="1">
1894 <colgroup>
1895 <col>
1896 <col>
1897 </colgroup>
1898 <tbody>
1899 <tr>
1900 <td>
1901                     <p><code class="varname">referral</code></p>
1902                   </td>
1903 <td>
1904                     <p>
1905                       The number of referrals the resolver received
1906                       throughout the resolution process.
1907                       In the above example this is 2, which are most
1908                       likely com and example.com.
1909                     </p>
1910                   </td>
1911 </tr>
1912 <tr>
1913 <td>
1914                     <p><code class="varname">restart</code></p>
1915                   </td>
1916 <td>
1917                     <p>
1918                       The number of cycles that the resolver tried
1919                       remote servers at the <code class="varname">domain</code>
1920                       zone.
1921                       In each cycle the resolver sends one query
1922                       (possibly resending it, depending on the response)
1923                       to each known name server of
1924                       the <code class="varname">domain</code> zone.
1925                     </p>
1926                   </td>
1927 </tr>
1928 <tr>
1929 <td>
1930                     <p><code class="varname">qrysent</code></p>
1931                   </td>
1932 <td>
1933                     <p>
1934                       The number of queries the resolver sent at the
1935                       <code class="varname">domain</code> zone.
1936                     </p>
1937                   </td>
1938 </tr>
1939 <tr>
1940 <td>
1941                     <p><code class="varname">timeout</code></p>
1942                   </td>
1943 <td>
1944                     <p>
1945                       The number of timeouts since the resolver
1946                       received the last response.
1947                     </p>
1948                   </td>
1949 </tr>
1950 <tr>
1951 <td>
1952                     <p><code class="varname">lame</code></p>
1953                   </td>
1954 <td>
1955                     <p>
1956                       The number of lame servers the resolver detected
1957                       at the <code class="varname">domain</code> zone.
1958                       A server is detected to be lame either by an
1959                       invalid response or as a result of lookup in
1960                       BIND9's address database (ADB), where lame
1961                       servers are cached.
1962                     </p>
1963                   </td>
1964 </tr>
1965 <tr>
1966 <td>
1967                     <p><code class="varname">neterr</code></p>
1968                   </td>
1969 <td>
1970                     <p>
1971                       The number of erroneous results that the
1972                       resolver encountered in sending queries
1973                       at the <code class="varname">domain</code> zone.
1974                       One common case is the remote server is
1975                       unreachable and the resolver receives an ICMP
1976                       unreachable error message.
1977                     </p>
1978                   </td>
1979 </tr>
1980 <tr>
1981 <td>
1982                     <p><code class="varname">badresp</code></p>
1983                   </td>
1984 <td>
1985                     <p>
1986                       The number of unexpected responses (other than
1987                       <code class="varname">lame</code>) to queries sent by the
1988                       resolver at the <code class="varname">domain</code> zone.
1989                     </p>
1990                   </td>
1991 </tr>
1992 <tr>
1993 <td>
1994                     <p><code class="varname">adberr</code></p>
1995                   </td>
1996 <td>
1997                     <p>
1998                       Failures in finding remote server addresses
1999                       of the <code class="varname">domain</code> zone in the ADB.
2000                       One common case of this is that the remote
2001                       server's name does not have any address records.
2002                     </p>
2003                   </td>
2004 </tr>
2005 <tr>
2006 <td>
2007                     <p><code class="varname">findfail</code></p>
2008                   </td>
2009 <td>
2010                     <p>
2011                       Failures of resolving remote server addresses.
2012                       This is a total number of failures throughout
2013                       the resolution process.
2014                     </p>
2015                   </td>
2016 </tr>
2017 <tr>
2018 <td>
2019                     <p><code class="varname">valfail</code></p>
2020                   </td>
2021 <td>
2022                     <p>
2023                       Failures of DNSSEC validation.
2024                       Validation failures are counted throughout
2025                       the resolution process (not limited to
2026                       the <code class="varname">domain</code> zone), but should
2027                       only happen in <code class="varname">domain</code>.
2028                     </p>
2029                   </td>
2030 </tr>
2031 </tbody>
2032 </table></div>
2033 <p>
2034             At the debug levels of 3 or higher, the same messages
2035             as those at the debug 1 level are logged for other errors
2036             than SERVFAIL.
2037             Note that negative responses such as NXDOMAIN are not
2038             regarded as errors here.
2039           </p>
2040 <p>
2041             At the debug levels of 4 or higher, the same messages
2042             as those at the debug 2 level are logged for other errors
2043             than SERVFAIL.
2044             Unlike the above case of level 3, messages are logged for
2045             negative responses.
2046             This is because any unexpected results can be difficult to
2047             debug in the recursion case.
2048           </p>
2049 </div>
2050 </div>
2051 <div class="sect2" lang="en">
2052 <div class="titlepage"><div><div><h3 class="title">
2053 <a name="id2577174"></a><span><strong class="command">lwres</strong></span> Statement Grammar</h3></div></div></div>
2054 <p>
2055            This is the grammar of the <span><strong class="command">lwres</strong></span>
2056           statement in the <code class="filename">named.conf</code> file:
2057         </p>
2058 <pre class="programlisting"><span><strong class="command">lwres</strong></span> {
2059     [<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>] ;
2060                 [<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>]
2061     [<span class="optional"> view <em class="replaceable"><code>view_name</code></em>; </span>]
2062     [<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>]
2063     [<span class="optional"> ndots <em class="replaceable"><code>number</code></em>; </span>]
2064 };
2065 </pre>
2066 </div>
2067 <div class="sect2" lang="en">
2068 <div class="titlepage"><div><div><h3 class="title">
2069 <a name="id2577248"></a><span><strong class="command">lwres</strong></span> Statement Definition and Usage</h3></div></div></div>
2070 <p>
2071           The <span><strong class="command">lwres</strong></span> statement configures the
2072           name
2073           server to also act as a lightweight resolver server. (See
2074           <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
2075           <span><strong class="command">lwres</strong></span> statements configuring
2076           lightweight resolver servers with different properties.
2077         </p>
2078 <p>
2079           The <span><strong class="command">listen-on</strong></span> statement specifies a
2080           list of
2081           addresses (and ports) that this instance of a lightweight resolver
2082           daemon
2083           should accept requests on.  If no port is specified, port 921 is
2084           used.
2085           If this statement is omitted, requests will be accepted on
2086           127.0.0.1,
2087           port 921.
2088         </p>
2089 <p>
2090           The <span><strong class="command">view</strong></span> statement binds this
2091           instance of a
2092           lightweight resolver daemon to a view in the DNS namespace, so that
2093           the
2094           response will be constructed in the same manner as a normal DNS
2095           query
2096           matching this view.  If this statement is omitted, the default view
2097           is
2098           used, and if there is no default view, an error is triggered.
2099         </p>
2100 <p>
2101           The <span><strong class="command">search</strong></span> statement is equivalent to
2102           the
2103           <span><strong class="command">search</strong></span> statement in
2104           <code class="filename">/etc/resolv.conf</code>.  It provides a
2105           list of domains
2106           which are appended to relative names in queries.
2107         </p>
2108 <p>
2109           The <span><strong class="command">ndots</strong></span> statement is equivalent to
2110           the
2111           <span><strong class="command">ndots</strong></span> statement in
2112           <code class="filename">/etc/resolv.conf</code>.  It indicates the
2113           minimum
2114           number of dots in a relative domain name that should result in an
2115           exact match lookup before search path elements are appended.
2116         </p>
2117 </div>
2118 <div class="sect2" lang="en">
2119 <div class="titlepage"><div><div><h3 class="title">
2120 <a name="id2577312"></a><span><strong class="command">masters</strong></span> Statement Grammar</h3></div></div></div>
2121 <pre class="programlisting">
2122 <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> | 
2123       <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>] };
2124 </pre>
2125 </div>
2126 <div class="sect2" lang="en">
2127 <div class="titlepage"><div><div><h3 class="title">
2128 <a name="id2577355"></a><span><strong class="command">masters</strong></span> Statement Definition and
2129           Usage</h3></div></div></div>
2130 <p><span><strong class="command">masters</strong></span>
2131           lists allow for a common set of masters to be easily used by
2132           multiple stub and slave zones in their <span><strong class="command">masters</strong></span>
2133           or <span><strong class="command">also-notify</strong></span> lists.
2134         </p>
2135 </div>
2136 <div class="sect2" lang="en">
2137 <div class="titlepage"><div><div><h3 class="title">
2138 <a name="id2577377"></a><span><strong class="command">options</strong></span> Statement Grammar</h3></div></div></div>
2139 <p>
2140           This is the grammar of the <span><strong class="command">options</strong></span>
2141           statement in the <code class="filename">named.conf</code> file:
2142         </p>
2143 <pre class="programlisting"><span><strong class="command">options</strong></span> {
2144     [<span class="optional"> attach-cache <em class="replaceable"><code>cache_name</code></em>; </span>]
2145     [<span class="optional"> version <em class="replaceable"><code>version_string</code></em>; </span>]
2146     [<span class="optional"> hostname <em class="replaceable"><code>hostname_string</code></em>; </span>]
2147     [<span class="optional"> server-id <em class="replaceable"><code>server_id_string</code></em>; </span>]
2148     [<span class="optional"> directory <em class="replaceable"><code>path_name</code></em>; </span>]
2149     [<span class="optional"> key-directory <em class="replaceable"><code>path_name</code></em>; </span>]
2150     [<span class="optional"> managed-keys-directory <em class="replaceable"><code>path_name</code></em>; </span>]
2151     [<span class="optional"> named-xfer <em class="replaceable"><code>path_name</code></em>; </span>]
2152     [<span class="optional"> tkey-gssapi-keytab <em class="replaceable"><code>path_name</code></em>; </span>]
2153     [<span class="optional"> tkey-gssapi-credential <em class="replaceable"><code>principal</code></em>; </span>]
2154     [<span class="optional"> tkey-domain <em class="replaceable"><code>domainname</code></em>; </span>]
2155     [<span class="optional"> tkey-dhkey <em class="replaceable"><code>key_name</code></em> <em class="replaceable"><code>key_tag</code></em>; </span>]
2156     [<span class="optional"> cache-file <em class="replaceable"><code>path_name</code></em>; </span>]
2157     [<span class="optional"> dump-file <em class="replaceable"><code>path_name</code></em>; </span>]
2158     [<span class="optional"> bindkeys-file <em class="replaceable"><code>path_name</code></em>; </span>]
2159     [<span class="optional"> secroots-file <em class="replaceable"><code>path_name</code></em>; </span>]
2160     [<span class="optional"> session-keyfile <em class="replaceable"><code>path_name</code></em>; </span>]
2161     [<span class="optional"> session-keyname <em class="replaceable"><code>key_name</code></em>; </span>]
2162     [<span class="optional"> session-keyalg <em class="replaceable"><code>algorithm_id</code></em>; </span>]
2163     [<span class="optional"> memstatistics <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2164     [<span class="optional"> memstatistics-file <em class="replaceable"><code>path_name</code></em>; </span>]
2165     [<span class="optional"> pid-file <em class="replaceable"><code>path_name</code></em>; </span>]
2166     [<span class="optional"> recursing-file <em class="replaceable"><code>path_name</code></em>; </span>]
2167     [<span class="optional"> statistics-file <em class="replaceable"><code>path_name</code></em>; </span>]
2168     [<span class="optional"> zone-statistics <em class="replaceable"><code>full</code></em> | <em class="replaceable"><code>terse</code></em> | <em class="replaceable"><code>none</code></em>; </span>]
2169     [<span class="optional"> auth-nxdomain <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2170     [<span class="optional"> deallocate-on-exit <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2171     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em>; </span>]
2172     [<span class="optional"> fake-iquery <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2173     [<span class="optional"> fetch-glue <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2174     [<span class="optional"> flush-zones-on-shutdown <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2175     [<span class="optional"> has-old-clients <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2176     [<span class="optional"> host-statistics <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2177     [<span class="optional"> host-statistics-max <em class="replaceable"><code>number</code></em>; </span>]
2178     [<span class="optional"> minimal-responses <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2179     [<span class="optional"> multiple-cnames <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2180     [<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>]
2181     [<span class="optional"> recursion <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2182     [<span class="optional"> request-nsid <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2183     [<span class="optional"> rfc2308-type1 <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2184     [<span class="optional"> use-id-pool <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2185     [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2186     [<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>]
2187     [<span class="optional"> dnssec-enable <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2188     [<span class="optional"> dnssec-validation (<em class="replaceable"><code>yes_or_no</code></em> | <code class="constant">auto</code>); </span>]
2189     [<span class="optional"> dnssec-lookaside ( <em class="replaceable"><code>auto</code></em> |
2190                         <em class="replaceable"><code>no</code></em> |
2191                         <em class="replaceable"><code>domain</code></em> trust-anchor <em class="replaceable"><code>domain</code></em> ); </span>]
2192     [<span class="optional"> dnssec-must-be-secure <em class="replaceable"><code>domain yes_or_no</code></em>; </span>]
2193     [<span class="optional"> dnssec-accept-expired <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2194     [<span class="optional"> forward ( <em class="replaceable"><code>only</code></em> | <em class="replaceable"><code>first</code></em> ); </span>]
2195     [<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>]
2196     [<span class="optional"> dual-stack-servers [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] {
2197         ( <em class="replaceable"><code>domain_name</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] |
2198           <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ) ; 
2199         ... }; </span>]
2200     [<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> )
2201         ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
2202     [<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>]
2203     [<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>]
2204     [<span class="optional"> check-wildcard <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2205     [<span class="optional"> check-integrity <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2206     [<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>]
2207     [<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>]
2208     [<span class="optional"> check-sibling <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2209     [<span class="optional"> check-spf ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
2210     [<span class="optional"> allow-new-zones { <em class="replaceable"><code>yes_or_no</code></em> }; </span>]
2211     [<span class="optional"> allow-notify { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2212     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2213     [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2214     [<span class="optional"> allow-query-cache { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2215     [<span class="optional"> allow-query-cache-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2216     [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2217     [<span class="optional"> allow-recursion { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2218     [<span class="optional"> allow-recursion-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2219     [<span class="optional"> allow-update { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2220     [<span class="optional"> allow-update-forwarding { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2221     [<span class="optional"> update-check-ksk <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2222     [<span class="optional"> dnssec-update-mode ( <em class="replaceable"><code>maintain</code></em> | <em class="replaceable"><code>no-resign</code></em> ); </span>]
2223     [<span class="optional"> dnssec-dnskey-kskonly <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2224     [<span class="optional"> dnssec-loadkeys-interval <em class="replaceable"><code>number</code></em>; </span>]
2225     [<span class="optional"> dnssec-secure-to-insecure <em class="replaceable"><code>yes_or_no</code></em> ;</span>]
2226     [<span class="optional"> try-tcp-refresh <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2227     [<span class="optional"> allow-v6-synthesis { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2228     [<span class="optional"> blackhole { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2229     [<span class="optional"> use-v4-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2230     [<span class="optional"> avoid-v4-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2231     [<span class="optional"> use-v6-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2232     [<span class="optional"> avoid-v6-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2233     [<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>]
2234     [<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>]
2235     [<span class="optional"> query-source ( ( <em class="replaceable"><code>ip4_addr</code></em> | <em class="replaceable"><code>*</code></em> )
2236         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] |
2237         [<span class="optional"> address ( <em class="replaceable"><code>ip4_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]
2238         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] ) ; </span>]
2239     [<span class="optional"> query-source-v6 ( ( <em class="replaceable"><code>ip6_addr</code></em> | <em class="replaceable"><code>*</code></em> )
2240         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] | 
2241         [<span class="optional"> address ( <em class="replaceable"><code>ip6_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] 
2242         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] ) ; </span>]
2243     [<span class="optional"> use-queryport-pool <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2244     [<span class="optional"> queryport-pool-ports <em class="replaceable"><code>number</code></em>; </span>]
2245     [<span class="optional"> queryport-pool-updateinterval <em class="replaceable"><code>number</code></em>; </span>]
2246     [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em>; </span>]
2247     [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em>; </span>]
2248     [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em>; </span>]
2249     [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em>; </span>]
2250     [<span class="optional"> tcp-clients <em class="replaceable"><code>number</code></em>; </span>]
2251     [<span class="optional"> reserved-sockets <em class="replaceable"><code>number</code></em>; </span>]
2252     [<span class="optional"> recursive-clients <em class="replaceable"><code>number</code></em>; </span>]
2253     [<span class="optional"> serial-query-rate <em class="replaceable"><code>number</code></em>; </span>]
2254     [<span class="optional"> serial-queries <em class="replaceable"><code>number</code></em>; </span>]
2255     [<span class="optional"> tcp-listen-queue <em class="replaceable"><code>number</code></em>; </span>]
2256     [<span class="optional"> transfer-format <em class="replaceable"><code>( one-answer | many-answers )</code></em>; </span>]
2257     [<span class="optional"> transfers-in  <em class="replaceable"><code>number</code></em>; </span>]
2258     [<span class="optional"> transfers-out <em class="replaceable"><code>number</code></em>; </span>]
2259     [<span class="optional"> transfers-per-ns <em class="replaceable"><code>number</code></em>; </span>]
2260     [<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>]
2261     [<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>]
2262     [<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>]
2263     [<span class="optional"> alt-transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
2264                              [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
2265     [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2266     [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
2267     [<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>]
2268     [<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>]
2269     [<span class="optional"> notify-to-soa <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2270     [<span class="optional"> also-notify { <em class="replaceable"><code>ip_addr</code></em>
2271                     [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] [<span class="optional">key <em class="replaceable"><code>keyname</code></em></span>] ;
2272                     [<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 class="optional">key <em class="replaceable"><code>keyname</code></em></span>] ; ... </span>] }; </span>]
2273     [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em>; </span>]
2274     [<span class="optional"> max-journal-size <em class="replaceable"><code>size_spec</code></em>; </span>]
2275     [<span class="optional"> coresize <em class="replaceable"><code>size_spec</code></em> ; </span>]
2276     [<span class="optional"> datasize <em class="replaceable"><code>size_spec</code></em> ; </span>]
2277     [<span class="optional"> files <em class="replaceable"><code>size_spec</code></em> ; </span>]
2278     [<span class="optional"> stacksize <em class="replaceable"><code>size_spec</code></em> ; </span>]
2279     [<span class="optional"> cleaning-interval <em class="replaceable"><code>number</code></em>; </span>]
2280     [<span class="optional"> heartbeat-interval <em class="replaceable"><code>number</code></em>; </span>]
2281     [<span class="optional"> interface-interval <em class="replaceable"><code>number</code></em>; </span>]
2282     [<span class="optional"> statistics-interval <em class="replaceable"><code>number</code></em>; </span>]
2283     [<span class="optional"> topology { <em class="replaceable"><code>address_match_list</code></em> }</span>];
2284     [<span class="optional"> sortlist { <em class="replaceable"><code>address_match_list</code></em> }</span>];
2285     [<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>] };
2286     [<span class="optional"> lame-ttl <em class="replaceable"><code>number</code></em>; </span>]
2287     [<span class="optional"> max-ncache-ttl <em class="replaceable"><code>number</code></em>; </span>]
2288     [<span class="optional"> max-cache-ttl <em class="replaceable"><code>number</code></em>; </span>]
2289     [<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>]
2290     [<span class="optional"> sig-signing-nodes <em class="replaceable"><code>number</code></em> ; </span>]
2291     [<span class="optional"> sig-signing-signatures <em class="replaceable"><code>number</code></em> ; </span>]
2292     [<span class="optional"> sig-signing-type <em class="replaceable"><code>number</code></em> ; </span>]
2293     [<span class="optional"> min-roots <em class="replaceable"><code>number</code></em>; </span>]
2294     [<span class="optional"> use-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2295     [<span class="optional"> provide-ixfr <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2296     [<span class="optional"> request-ixfr <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2297     [<span class="optional"> treat-cr-as-space <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2298     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
2299     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
2300     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
2301     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
2302     [<span class="optional"> port <em class="replaceable"><code>ip_port</code></em>; </span>]
2303     [<span class="optional"> additional-from-auth <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2304     [<span class="optional"> additional-from-cache <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2305     [<span class="optional"> random-device <em class="replaceable"><code>path_name</code></em> ; </span>]
2306     [<span class="optional"> max-cache-size <em class="replaceable"><code>size_spec</code></em> ; </span>]
2307     [<span class="optional"> match-mapped-addresses <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2308     [<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>]
2309     [<span class="optional"> filter-aaaa { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2310     [<span class="optional"> dns64 <em class="replaceable"><code>ipv6-prefix</code></em> {
2311         [<span class="optional"> clients { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2312         [<span class="optional"> mapped { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2313         [<span class="optional"> exclude { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2314         [<span class="optional"> suffix IPv6-address; </span>]
2315         [<span class="optional"> recursive-only <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2316         [<span class="optional"> break-dnssec <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2317     }; </span>];
2318     [<span class="optional"> dns64-server <em class="replaceable"><code>name</code></em> </span>]
2319     [<span class="optional"> dns64-contact <em class="replaceable"><code>name</code></em> </span>]
2320     [<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>]
2321     [<span class="optional"> edns-udp-size <em class="replaceable"><code>number</code></em>; </span>]
2322     [<span class="optional"> max-udp-size <em class="replaceable"><code>number</code></em>; </span>]
2323     [<span class="optional"> max-rsa-exponent-size <em class="replaceable"><code>number</code></em>; </span>]
2324     [<span class="optional"> root-delegation-only [<span class="optional"> exclude { <em class="replaceable"><code>namelist</code></em> } </span>] ; </span>]
2325     [<span class="optional"> querylog <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2326     [<span class="optional"> disable-algorithms <em class="replaceable"><code>domain</code></em> { <em class="replaceable"><code>algorithm</code></em>;
2327                                 [<span class="optional"> <em class="replaceable"><code>algorithm</code></em>; </span>] }; </span>]
2328     [<span class="optional"> acache-enable <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2329     [<span class="optional"> acache-cleaning-interval <em class="replaceable"><code>number</code></em>; </span>]
2330     [<span class="optional"> max-acache-size <em class="replaceable"><code>size_spec</code></em> ; </span>]
2331     [<span class="optional"> clients-per-query <em class="replaceable"><code>number</code></em> ; </span>]
2332     [<span class="optional"> max-clients-per-query <em class="replaceable"><code>number</code></em> ; </span>]
2333     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
2334     [<span class="optional"> empty-server <em class="replaceable"><code>name</code></em> ; </span>]
2335     [<span class="optional"> empty-contact <em class="replaceable"><code>name</code></em> ; </span>]
2336     [<span class="optional"> empty-zones-enable <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2337     [<span class="optional"> disable-empty-zone <em class="replaceable"><code>zone_name</code></em> ; </span>]
2338     [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2339     [<span class="optional"> zero-no-soa-ttl-cache <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2340     [<span class="optional"> resolver-query-timeout <em class="replaceable"><code>number</code></em> ; </span>]
2341     [<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>]
2342     [<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>]
2343     [<span class="optional"> rate-limit {
2344         [<span class="optional"> responses-per-second <em class="replaceable"><code>number</code></em> ; </span>]
2345         [<span class="optional"> referrals-per-second <em class="replaceable"><code>number</code></em> ; </span>]
2346         [<span class="optional"> nodata-per-second <em class="replaceable"><code>number</code></em> ; </span>]
2347         [<span class="optional"> nxdomains-per-second <em class="replaceable"><code>number</code></em> ; </span>]
2348         [<span class="optional"> errors-per-second <em class="replaceable"><code>number</code></em> ; </span>]
2349         [<span class="optional"> all-per-second <em class="replaceable"><code>number</code></em> ; </span>]
2350         [<span class="optional"> window <em class="replaceable"><code>number</code></em> ; </span>]
2351         [<span class="optional"> log-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2352         [<span class="optional"> qps-scale <em class="replaceable"><code>number</code></em> ; </span>]
2353         [<span class="optional"> ipv4-prefix-length <em class="replaceable"><code>number</code></em> ; </span>]
2354         [<span class="optional"> ipv6-prefix-length <em class="replaceable"><code>number</code></em> ; </span>]
2355         [<span class="optional"> slip <em class="replaceable"><code>number</code></em> ; </span>]
2356         [<span class="optional"> exempt-clients  { <em class="replaceable"><code>address_match_list</code></em> } ; </span>]
2357         [<span class="optional"> max-table-size <em class="replaceable"><code>number</code></em> ; </span>]
2358         [<span class="optional"> min-table-size <em class="replaceable"><code>number</code></em> ; </span>]
2359       } ; </span>]
2360     [<span class="optional"> response-policy { <em class="replaceable"><code>zone_name</code></em>
2361         [<span class="optional"> policy given | disabled | passthru | nxdomain | nodata | cname <em class="replaceable"><code>domain</code></em> </span>]
2362         [<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>] ;
2363     } [<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>]
2364         [<span class="optional"> break-dnssec <em class="replaceable"><code>yes_or_no</code></em> </span>] [<span class="optional"> min-ns-dots <em class="replaceable"><code>number</code></em> </span>] ; </span>]
2365 };
2366 </pre>
2367 </div>
2368 <div class="sect2" lang="en">
2369 <div class="titlepage"><div><div><h3 class="title">
2370 <a name="options"></a><span><strong class="command">options</strong></span> Statement Definition and
2371           Usage</h3></div></div></div>
2372 <p>
2373           The <span><strong class="command">options</strong></span> statement sets up global
2374           options
2375           to be used by <acronym class="acronym">BIND</acronym>. This statement
2376           may appear only
2377           once in a configuration file. If there is no <span><strong class="command">options</strong></span>
2378           statement, an options block with each option set to its default will
2379           be used.
2380         </p>
2381 <div class="variablelist"><dl>
2382 <dt><span class="term"><span><strong class="command">attach-cache</strong></span></span></dt>
2383 <dd>
2384 <p>
2385                   Allows multiple views to share a single cache
2386                   database.
2387                   Each view has its own cache database by default, but
2388                   if multiple views have the same operational policy
2389                   for name resolution and caching, those views can
2390                   share a single cache to save memory and possibly
2391                   improve resolution efficiency by using this option.
2392                 </p>
2393 <p>
2394                   The <span><strong class="command">attach-cache</strong></span> option
2395                   may also be specified in <span><strong class="command">view</strong></span>
2396                   statements, in which case it overrides the
2397                   global <span><strong class="command">attach-cache</strong></span> option.
2398                 </p>
2399 <p>
2400                   The <em class="replaceable"><code>cache_name</code></em> specifies
2401                   the cache to be shared.
2402                   When the <span><strong class="command">named</strong></span> server configures
2403                   views which are supposed to share a cache, it
2404                   creates a cache with the specified name for the
2405                   first view of these sharing views.
2406                   The rest of the views will simply refer to the
2407                   already created cache.
2408                 </p>
2409 <p>
2410                   One common configuration to share a cache would be to
2411                   allow all views to share a single cache.
2412                   This can be done by specifying
2413                   the <span><strong class="command">attach-cache</strong></span> as a global
2414                   option with an arbitrary name.
2415                 </p>
2416 <p>
2417                   Another possible operation is to allow a subset of
2418                   all views to share a cache while the others to
2419                   retain their own caches.
2420                   For example, if there are three views A, B, and C,
2421                   and only A and B should share a cache, specify the
2422                   <span><strong class="command">attach-cache</strong></span> option as a view A (or
2423                   B)'s option, referring to the other view name:
2424                 </p>
2425 <pre class="programlisting">
2426   view "A" {
2427     // this view has its own cache
2428     ...
2429   };
2430   view "B" {
2431     // this view refers to A's cache
2432     attach-cache "A";
2433   };
2434   view "C" {
2435     // this view has its own cache
2436     ...
2437   };
2438 </pre>
2439 <p>
2440                   Views that share a cache must have the same policy
2441                   on configurable parameters that may affect caching.
2442                   The current implementation requires the following
2443                   configurable options be consistent among these
2444                   views:
2445                   <span><strong class="command">check-names</strong></span>,
2446                   <span><strong class="command">cleaning-interval</strong></span>,
2447                   <span><strong class="command">dnssec-accept-expired</strong></span>,
2448                   <span><strong class="command">dnssec-validation</strong></span>,
2449                   <span><strong class="command">max-cache-ttl</strong></span>,
2450                   <span><strong class="command">max-ncache-ttl</strong></span>,
2451                   <span><strong class="command">max-cache-size</strong></span>, and
2452                   <span><strong class="command">zero-no-soa-ttl</strong></span>.
2453                 </p>
2454 <p>
2455                   Note that there may be other parameters that may
2456                   cause confusion if they are inconsistent for
2457                   different views that share a single cache.
2458                   For example, if these views define different sets of
2459                   forwarders that can return different answers for the
2460                   same question, sharing the answer does not make
2461                   sense or could even be harmful.
2462                   It is administrator's responsibility to ensure
2463                   configuration differences in different views do
2464                   not cause disruption with a shared cache.
2465                 </p>
2466 </dd>
2467 <dt><span class="term"><span><strong class="command">directory</strong></span></span></dt>
2468 <dd><p>
2469                 The working directory of the server.
2470                 Any non-absolute pathnames in the configuration file will be
2471                 taken
2472                 as relative to this directory. The default location for most
2473                 server
2474                 output files (e.g. <code class="filename">named.run</code>)
2475                 is this directory.
2476                 If a directory is not specified, the working directory
2477                 defaults to `<code class="filename">.</code>', the directory from
2478                 which the server
2479                 was started. The directory specified should be an absolute
2480                 path.
2481               </p></dd>
2482 <dt><span class="term"><span><strong class="command">key-directory</strong></span></span></dt>
2483 <dd><p>
2484                 When performing dynamic update of secure zones, the
2485                 directory where the public and private DNSSEC key files
2486                 should be found, if different than the current working
2487                 directory.  (Note that this option has no effect on the
2488                 paths for files containing non-DNSSEC keys such as
2489                 <code class="filename">bind.keys</code>,
2490                 <code class="filename">rndc.key</code> or
2491                 <code class="filename">session.key</code>.)
2492               </p></dd>
2493 <dt><span class="term"><span><strong class="command">managed-keys-directory</strong></span></span></dt>
2494 <dd>
2495 <p>
2496                 Specifies the directory in which to store the files that
2497                 track managed DNSSEC keys.  By default, this is the working
2498                 directory.
2499               </p>
2500 <p>
2501                 If <span><strong class="command">named</strong></span> is not configured to use views,
2502                 then managed keys for the server will be tracked in a single
2503                 file called <code class="filename">managed-keys.bind</code>.
2504                 Otherwise, managed keys will be tracked in separate files,
2505                 one file per view; each file name will be the SHA256 hash
2506                 of the view name, followed by the extension
2507                 <code class="filename">.mkeys</code>.
2508               </p>
2509 </dd>
2510 <dt><span class="term"><span><strong class="command">named-xfer</strong></span></span></dt>
2511 <dd><p>
2512                 <span class="emphasis"><em>This option is obsolete.</em></span> It
2513                 was used in <acronym class="acronym">BIND</acronym> 8 to specify
2514                 the pathname to the <span><strong class="command">named-xfer</strong></span>
2515                 program.  In <acronym class="acronym">BIND</acronym> 9, no separate
2516                 <span><strong class="command">named-xfer</strong></span> program is needed;
2517                 its functionality is built into the name server.
2518               </p></dd>
2519 <dt><span class="term"><span><strong class="command">tkey-gssapi-keytab</strong></span></span></dt>
2520 <dd><p>
2521                 The KRB5 keytab file to use for GSS-TSIG updates. If
2522                 this option is set and tkey-gssapi-credential is not
2523                 set, then updates will be allowed with any key
2524                 matching a principal in the specified keytab.
2525               </p></dd>
2526 <dt><span class="term"><span><strong class="command">tkey-gssapi-credential</strong></span></span></dt>
2527 <dd><p>
2528                 The security credential with which the server should
2529                 authenticate keys requested by the GSS-TSIG protocol.
2530                 Currently only Kerberos 5 authentication is available
2531                 and the credential is a Kerberos principal which the
2532                 server can acquire through the default system key
2533                 file, normally <code class="filename">/etc/krb5.keytab</code>.
2534                 The location keytab file can be overridden using the
2535                 tkey-gssapi-keytab option. Normally this principal is
2536                 of the form "<strong class="userinput"><code>DNS/</code></strong><code class="varname">server.domain</code>".
2537                 To use GSS-TSIG, <span><strong class="command">tkey-domain</strong></span> must
2538                 also be set if a specific keytab is not set with
2539                 tkey-gssapi-keytab.
2540               </p></dd>
2541 <dt><span class="term"><span><strong class="command">tkey-domain</strong></span></span></dt>
2542 <dd><p>
2543                 The domain appended to the names of all shared keys
2544                 generated with <span><strong class="command">TKEY</strong></span>.  When a
2545                 client requests a <span><strong class="command">TKEY</strong></span> exchange,
2546                 it may or may not specify the desired name for the
2547                 key. If present, the name of the shared key will
2548                 be <code class="varname">client specified part</code> +
2549                 <code class="varname">tkey-domain</code>.  Otherwise, the
2550                 name of the shared key will be <code class="varname">random hex
2551                 digits</code> + <code class="varname">tkey-domain</code>.
2552                 In most cases, the <span><strong class="command">domainname</strong></span>
2553                 should be the server's domain name, or an otherwise
2554                 non-existent subdomain like
2555                 "_tkey.<code class="varname">domainname</code>".  If you are
2556                 using GSS-TSIG, this variable must be defined, unless
2557                 you specify a specific keytab using tkey-gssapi-keytab.
2558               </p></dd>
2559 <dt><span class="term"><span><strong class="command">tkey-dhkey</strong></span></span></dt>
2560 <dd><p>
2561                 The Diffie-Hellman key used by the server
2562                 to generate shared keys with clients using the Diffie-Hellman
2563                 mode
2564                 of <span><strong class="command">TKEY</strong></span>. The server must be
2565                 able to load the
2566                 public and private keys from files in the working directory.
2567                 In
2568                 most cases, the keyname should be the server's host name.
2569               </p></dd>
2570 <dt><span class="term"><span><strong class="command">cache-file</strong></span></span></dt>
2571 <dd><p>
2572                 This is for testing only.  Do not use.
2573               </p></dd>
2574 <dt><span class="term"><span><strong class="command">dump-file</strong></span></span></dt>
2575 <dd><p>
2576                 The pathname of the file the server dumps
2577                 the database to when instructed to do so with
2578                 <span><strong class="command">rndc dumpdb</strong></span>.
2579                 If not specified, the default is <code class="filename">named_dump.db</code>.
2580               </p></dd>
2581 <dt><span class="term"><span><strong class="command">memstatistics-file</strong></span></span></dt>
2582 <dd><p>
2583                 The pathname of the file the server writes memory
2584                 usage statistics to on exit. If not specified,
2585                 the default is <code class="filename">named.memstats</code>.
2586               </p></dd>
2587 <dt><span class="term"><span><strong class="command">pid-file</strong></span></span></dt>
2588 <dd><p>
2589                 The pathname of the file the server writes its process ID
2590                 in. If not specified, the default is
2591                 <code class="filename">/var/run/named/named.pid</code>.
2592                 The PID file is used by programs that want to send signals to
2593                 the running
2594                 name server. Specifying <span><strong class="command">pid-file none</strong></span> disables the
2595                 use of a PID file &#8212; no file will be written and any
2596                 existing one will be removed.  Note that <span><strong class="command">none</strong></span>
2597                 is a keyword, not a filename, and therefore is not enclosed
2598                 in
2599                 double quotes.
2600               </p></dd>
2601 <dt><span class="term"><span><strong class="command">recursing-file</strong></span></span></dt>
2602 <dd><p>
2603                 The pathname of the file the server dumps
2604                 the queries that are currently recursing when instructed
2605                 to do so with <span><strong class="command">rndc recursing</strong></span>.
2606                 If not specified, the default is <code class="filename">named.recursing</code>.
2607               </p></dd>
2608 <dt><span class="term"><span><strong class="command">statistics-file</strong></span></span></dt>
2609 <dd><p>
2610                 The pathname of the file the server appends statistics
2611                 to when instructed to do so using <span><strong class="command">rndc stats</strong></span>.
2612                 If not specified, the default is <code class="filename">named.stats</code> in the
2613                 server's current directory.  The format of the file is
2614                 described
2615                 in <a href="Bv9ARM.ch06.html#statsfile" title="The Statistics File">the section called &#8220;The Statistics File&#8221;</a>.
2616               </p></dd>
2617 <dt><span class="term"><span><strong class="command">bindkeys-file</strong></span></span></dt>
2618 <dd><p>
2619                 The pathname of a file to override the built-in trusted
2620                 keys provided by <span><strong class="command">named</strong></span>.
2621                 See the discussion of <span><strong class="command">dnssec-lookaside</strong></span>
2622                 and <span><strong class="command">dnssec-validation</strong></span> for details. 
2623                 If not specified, the default is
2624                 <code class="filename">/etc/bind.keys</code>.
2625               </p></dd>
2626 <dt><span class="term"><span><strong class="command">secroots-file</strong></span></span></dt>
2627 <dd><p>
2628                 The pathname of the file the server dumps
2629                 security roots to when instructed to do so with
2630                 <span><strong class="command">rndc secroots</strong></span>.
2631                 If not specified, the default is
2632                 <code class="filename">named.secroots</code>.
2633               </p></dd>
2634 <dt><span class="term"><span><strong class="command">session-keyfile</strong></span></span></dt>
2635 <dd><p>
2636                 The pathname of the file into which to write a TSIG
2637                 session key generated by <span><strong class="command">named</strong></span> for use by
2638                 <span><strong class="command">nsupdate -l</strong></span>.  If not specified, the
2639                 default is <code class="filename">/var/run/named/session.key</code>.
2640                 (See <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called &#8220;Dynamic Update Policies&#8221;</a>, and in
2641                 particular the discussion of the
2642                 <span><strong class="command">update-policy</strong></span> statement's
2643                 <strong class="userinput"><code>local</code></strong> option for more
2644                 information about this feature.)
2645               </p></dd>
2646 <dt><span class="term"><span><strong class="command">session-keyname</strong></span></span></dt>
2647 <dd><p>
2648                 The key name to use for the TSIG session key.
2649                 If not specified, the default is "local-ddns".
2650               </p></dd>
2651 <dt><span class="term"><span><strong class="command">session-keyalg</strong></span></span></dt>
2652 <dd><p>
2653                 The algorithm to use for the TSIG session key.
2654                 Valid values are hmac-sha1, hmac-sha224, hmac-sha256,
2655                 hmac-sha384, hmac-sha512 and hmac-md5.  If not
2656                 specified, the default is hmac-sha256.
2657               </p></dd>
2658 <dt><span class="term"><span><strong class="command">port</strong></span></span></dt>
2659 <dd><p>
2660                 The UDP/TCP port number the server uses for
2661                 receiving and sending DNS protocol traffic.
2662                 The default is 53.  This option is mainly intended for server
2663                 testing;
2664                 a server using a port other than 53 will not be able to
2665                 communicate with
2666                 the global DNS.
2667               </p></dd>
2668 <dt><span class="term"><span><strong class="command">random-device</strong></span></span></dt>
2669 <dd><p>
2670                 The source of entropy to be used by the server.  Entropy is
2671                 primarily needed
2672                 for DNSSEC operations, such as TKEY transactions and dynamic
2673                 update of signed
2674                 zones.  This options specifies the device (or file) from which
2675                 to read
2676                 entropy.  If this is a file, operations requiring entropy will
2677                 fail when the
2678                 file has been exhausted.  If not specified, the default value
2679                 is
2680                 <code class="filename">/dev/random</code>
2681                 (or equivalent) when present, and none otherwise.  The
2682                 <span><strong class="command">random-device</strong></span> option takes
2683                 effect during
2684                 the initial configuration load at server startup time and
2685                 is ignored on subsequent reloads.
2686               </p></dd>
2687 <dt><span class="term"><span><strong class="command">preferred-glue</strong></span></span></dt>
2688 <dd><p>
2689                 If specified, the listed type (A or AAAA) will be emitted
2690                 before other glue
2691                 in the additional section of a query response.
2692                 The default is not to prefer any type (NONE).
2693               </p></dd>
2694 <dt>
2695 <a name="root_delegation_only"></a><span class="term"><span><strong class="command">root-delegation-only</strong></span></span>
2696 </dt>
2697 <dd>
2698 <p>
2699                 Turn on enforcement of delegation-only in TLDs
2700                 (top level domains) and root zones with an optional
2701                 exclude list.
2702               </p>
2703 <p>
2704                 DS queries are expected to be made to and be answered by
2705                 delegation only zones.  Such queries and responses are
2706                 treated as an exception to delegation-only processing
2707                 and are not converted to NXDOMAIN responses provided
2708                 a CNAME is not discovered at the query name.
2709               </p>
2710 <p>
2711                 If a delegation only zone server also serves a child
2712                 zone it is not always possible to determine whether
2713                 an answer comes from the delegation only zone or the
2714                 child zone.  SOA NS and DNSKEY records are apex
2715                 only records and a matching response that contains
2716                 these records or DS is treated as coming from a
2717                 child zone.  RRSIG records are also examined to see
2718                 if they are signed by a child zone or not.  The
2719                 authority section is also examined to see if there
2720                 is evidence that the answer is from the child zone.
2721                 Answers that are determined to be from a child zone
2722                 are not converted to NXDOMAIN responses.  Despite
2723                 all these checks there is still a possibility of
2724                 false negatives when a child zone is being served.
2725               </p>
2726 <p>
2727                 Similarly false positives can arise from empty nodes
2728                 (no records at the name) in the delegation only zone
2729                 when the query type is not ANY.
2730               </p>
2731 <p>
2732                 Note some TLDs are not delegation only (e.g. "DE", "LV",
2733                 "US" and "MUSEUM").  This list is not exhaustive.
2734               </p>
2735 <pre class="programlisting">
2736 options {
2737         root-delegation-only exclude { "de"; "lv"; "us"; "museum"; };
2738 };
2739 </pre>
2740 </dd>
2741 <dt><span class="term"><span><strong class="command">disable-algorithms</strong></span></span></dt>
2742 <dd><p>
2743                 Disable the specified DNSSEC algorithms at and below the
2744                 specified name.
2745                 Multiple <span><strong class="command">disable-algorithms</strong></span>
2746                 statements are allowed.
2747                 Only the most specific will be applied.
2748               </p></dd>
2749 <dt><span class="term"><span><strong class="command">dnssec-lookaside</strong></span></span></dt>
2750 <dd>
2751 <p>
2752                 When set, <span><strong class="command">dnssec-lookaside</strong></span> provides the
2753                 validator with an alternate method to validate DNSKEY
2754                 records at the top of a zone.  When a DNSKEY is at or
2755                 below a domain specified by the deepest
2756                 <span><strong class="command">dnssec-lookaside</strong></span>, and the normal DNSSEC
2757                 validation has left the key untrusted, the trust-anchor
2758                 will be appended to the key name and a DLV record will be
2759                 looked up to see if it can validate the key.  If the DLV
2760                 record validates a DNSKEY (similarly to the way a DS
2761                 record does) the DNSKEY RRset is deemed to be trusted.
2762               </p>
2763 <p>
2764                 If <span><strong class="command">dnssec-lookaside</strong></span> is set to
2765                 <strong class="userinput"><code>auto</code></strong>, then built-in default
2766                 values for the DLV domain and trust anchor will be
2767                 used, along with a built-in key for validation.
2768               </p>
2769 <p>
2770                 If <span><strong class="command">dnssec-lookaside</strong></span> is set to
2771                 <strong class="userinput"><code>no</code></strong>, then dnssec-lookaside
2772                 is not used.
2773               </p>
2774 <p>
2775                 The default DLV key is stored in the file
2776                 <code class="filename">bind.keys</code>;
2777                 <span><strong class="command">named</strong></span> will load that key at
2778                 startup if <span><strong class="command">dnssec-lookaside</strong></span> is set to
2779                 <code class="constant">auto</code>.  A copy of the file is
2780                 installed along with <acronym class="acronym">BIND</acronym> 9, and is
2781                 current as of the release date.  If the DLV key expires, a
2782                 new copy of <code class="filename">bind.keys</code> can be downloaded
2783                 from <a href="https://www.isc.org/solutions/dlv/" target="_top">https://www.isc.org/solutions/dlv/</a>.
2784               </p>
2785 <p>
2786                 (To prevent problems if <code class="filename">bind.keys</code> is
2787                 not found, the current key is also compiled in to
2788                 <span><strong class="command">named</strong></span>.  Relying on this is not
2789                 recommended, however, as it requires <span><strong class="command">named</strong></span>
2790                 to be recompiled with a new key when the DLV key expires.)
2791               </p>
2792 <p>
2793                 NOTE: <span><strong class="command">named</strong></span> only loads certain specific
2794                 keys from <code class="filename">bind.keys</code>:  those for the
2795                 DLV zone and for the DNS root zone.  The file cannot be
2796                 used to store keys for other zones.
2797               </p>
2798 </dd>
2799 <dt><span class="term"><span><strong class="command">dnssec-must-be-secure</strong></span></span></dt>
2800 <dd><p>
2801                 Specify hierarchies which must be or may not be secure
2802                 (signed and validated).  If <strong class="userinput"><code>yes</code></strong>,
2803                 then <span><strong class="command">named</strong></span> will only accept answers if
2804                 they are secure.  If <strong class="userinput"><code>no</code></strong>, then normal
2805                 DNSSEC validation applies allowing for insecure answers to
2806                 be accepted.  The specified domain must be under a
2807                 <span><strong class="command">trusted-keys</strong></span> or
2808                 <span><strong class="command">managed-keys</strong></span> statement, or
2809                 <span><strong class="command">dnssec-lookaside</strong></span> must be active.
2810               </p></dd>
2811 <dt><span class="term"><span><strong class="command">dns64</strong></span></span></dt>
2812 <dd>
2813 <p>
2814                 This directive instructs <span><strong class="command">named</strong></span> to
2815                 return mapped IPv4 addresses to AAAA queries when
2816                 there are no AAAA records.  It is intended to be
2817                 used in conjunction with a NAT64.  Each
2818                 <span><strong class="command">dns64</strong></span> defines one DNS64 prefix.
2819                 Multiple DNS64 prefixes can be defined.
2820               </p>
2821 <p>
2822                 Compatible IPv6 prefixes have lengths of 32, 40, 48, 56,
2823                 64 and 96 as per RFC 6052.
2824               </p>
2825 <p>
2826                 Additionally a reverse IP6.ARPA zone will be created for
2827                 the prefix to provide a mapping from the IP6.ARPA names
2828                 to the corresponding IN-ADDR.ARPA names using synthesized
2829                 CNAMEs.  <span><strong class="command">dns64-server</strong></span> and
2830                 <span><strong class="command">dns64-contact</strong></span> can be used to specify
2831                 the name of the server and contact for the zones. These
2832                 are settable at the view / options level.  These are
2833                 not settable on a per-prefix basis.
2834               </p>
2835 <p>
2836                 Each <span><strong class="command">dns64</strong></span> supports an optional
2837                 <span><strong class="command">clients</strong></span> ACL that determines which
2838                 clients are affected by this directive.  If not defined,
2839                 it defaults to <strong class="userinput"><code>any;</code></strong>.
2840               </p>
2841 <p>
2842                 Each <span><strong class="command">dns64</strong></span> supports an optional
2843                 <span><strong class="command">mapped</strong></span> ACL that selects which
2844                 IPv4 addresses are to be mapped in the corresponding    
2845                 A RRset.  If not defined it defaults to
2846                 <strong class="userinput"><code>any;</code></strong>.
2847               </p>
2848 <p>
2849                 Normally, DNS64 won't apply to a domain name that
2850                 owns one or more AAAA records; these records will
2851                 simply be returned.  The optional
2852                 <span><strong class="command">exclude</strong></span> ACL allows specification
2853                 of a list of IPv6 addresses that will be ignored
2854                 if they appear in a domain name's AAAA records, and
2855                 DNS64 will be applied to any A records the domain
2856                 name owns.  If not defined, <span><strong class="command">exclude</strong></span>
2857                 defaults to none.
2858               </p>
2859 <p>
2860                 A optional <span><strong class="command">suffix</strong></span> can also
2861                 be defined to set the bits trailing the mapped
2862                 IPv4 address bits.  By default these bits are
2863                 set to <strong class="userinput"><code>::</code></strong>.  The bits
2864                 matching the prefix and mapped IPv4 address
2865                 must be zero.
2866               </p>
2867 <p>
2868                 If <span><strong class="command">recursive-only</strong></span> is set to
2869                 <span><strong class="command">yes</strong></span> the DNS64 synthesis will
2870                 only happen for recursive queries.  The default
2871                 is <span><strong class="command">no</strong></span>.
2872               </p>
2873 <p>
2874                 If <span><strong class="command">break-dnssec</strong></span> is set to
2875                 <span><strong class="command">yes</strong></span> the DNS64 synthesis will
2876                 happen even if the result, if validated, would
2877                 cause a DNSSEC validation failure.  If this option
2878                 is set to <span><strong class="command">no</strong></span> (the default), the DO
2879                 is set on the incoming query, and there are RRSIGs on
2880                 the applicable records, then synthesis will not happen.
2881               </p>
2882 <pre class="programlisting">
2883         acl rfc1918 { 10/8; 192.168/16; 172.16/12; };
2884
2885         dns64 64:FF9B::/96 {
2886                 clients { any; };
2887                 mapped { !rfc1918; any; };
2888                 exclude { 64:FF9B::/96; ::ffff:0000:0000/96; };
2889                 suffix ::;
2890         };
2891 </pre>
2892 </dd>
2893 <dt><span class="term"><span><strong class="command">dnssec-update-mode</strong></span></span></dt>
2894 <dd>
2895 <p>
2896                   If this option is set to its default value of
2897                   <code class="literal">maintain</code> in a zone of type
2898                   <code class="literal">master</code> which is DNSSEC-signed
2899                   and configured to allow dynamic updates (see
2900                   <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called &#8220;Dynamic Update Policies&#8221;</a>), and
2901                   if <span><strong class="command">named</strong></span> has access to the
2902                   private signing key(s) for the zone, then
2903                   <span><strong class="command">named</strong></span> will automatically sign all new
2904                   or changed records and maintain signatures for the zone
2905                   by regenerating RRSIG records whenever they approach
2906                   their expiration date.
2907                 </p>
2908 <p>
2909                   If the option is changed to <code class="literal">no-resign</code>,
2910                   then <span><strong class="command">named</strong></span> will sign all new or
2911                   changed records, but scheduled maintenance of
2912                   signatures is disabled.
2913                 </p>
2914 <p>
2915                   With either of these settings, <span><strong class="command">named</strong></span>
2916                   will reject updates to a DNSSEC-signed zone when the
2917                   signing keys are inactive or unavailable to
2918                   <span><strong class="command">named</strong></span>.  (A planned third option,
2919                   <code class="literal">external</code>, will disable all automatic
2920                   signing and allow DNSSEC data to be submitted into a zone
2921                   via dynamic update; this is not yet implemented.)
2922                 </p>
2923 </dd>
2924 <dt><span class="term"><span><strong class="command">zone-statistics</strong></span></span></dt>
2925 <dd>
2926 <p>
2927                 If <strong class="userinput"><code>full</code></strong>, the server will collect
2928                 statistical data on all zones (unless specifically
2929                 turned off on a per-zone basis by specifying
2930                 <span><strong class="command">zone-statistics terse</strong></span> or
2931                 <span><strong class="command">zone-statistics none</strong></span>
2932                 in the <span><strong class="command">zone</strong></span> statement).
2933                 The default is <strong class="userinput"><code>terse</code></strong>, providing
2934                 minimal statistics on zones (including name and
2935                 current serial number, but not query type
2936                 counters).
2937               </p>
2938 <p>
2939                 These statistics may be accessed via the
2940                 <span><strong class="command">statistics-channel</strong></span> or
2941                 using <span><strong class="command">rndc stats</strong></span>, which
2942                 will dump them to the file listed
2943                 in the <span><strong class="command">statistics-file</strong></span>.  See
2944                 also <a href="Bv9ARM.ch06.html#statsfile" title="The Statistics File">the section called &#8220;The Statistics File&#8221;</a>.
2945               </p>
2946 <p>
2947                 For backward compatibility with earlier versions
2948                 of BIND 9, the <span><strong class="command">zone-statistics</strong></span>
2949                 option can also accept <strong class="userinput"><code>yes</code></strong>
2950                 or <strong class="userinput"><code>no</code></strong>, which have the same
2951                 effect as <strong class="userinput"><code>full</code></strong> and
2952                 <strong class="userinput"><code>terse</code></strong>, respectively.
2953               </p>
2954 </dd>
2955 </dl></div>
2956 <div class="sect3" lang="en">
2957 <div class="titlepage"><div><div><h4 class="title">
2958 <a name="boolean_options"></a>Boolean Options</h4></div></div></div>
2959 <div class="variablelist"><dl>
2960 <dt><span class="term"><span><strong class="command">allow-new-zones</strong></span></span></dt>
2961 <dd><p>
2962                   If <strong class="userinput"><code>yes</code></strong>, then zones can be
2963                   added at runtime via <span><strong class="command">rndc addzone</strong></span>
2964                   or deleted via <span><strong class="command">rndc delzone</strong></span>.
2965                   The default is <strong class="userinput"><code>no</code></strong>.
2966                 </p></dd>
2967 <dt><span class="term"><span><strong class="command">auth-nxdomain</strong></span></span></dt>
2968 <dd><p>
2969                   If <strong class="userinput"><code>yes</code></strong>, then the <span><strong class="command">AA</strong></span> bit
2970                   is always set on NXDOMAIN responses, even if the server is
2971                   not actually
2972                   authoritative. The default is <strong class="userinput"><code>no</code></strong>;
2973                   this is
2974                   a change from <acronym class="acronym">BIND</acronym> 8. If you
2975                   are using very old DNS software, you
2976                   may need to set it to <strong class="userinput"><code>yes</code></strong>.
2977                 </p></dd>
2978 <dt><span class="term"><span><strong class="command">deallocate-on-exit</strong></span></span></dt>
2979 <dd><p>
2980                   This option was used in <acronym class="acronym">BIND</acronym>
2981                   8 to enable checking
2982                   for memory leaks on exit. <acronym class="acronym">BIND</acronym> 9 ignores the option and always performs
2983                   the checks.
2984                 </p></dd>
2985 <dt><span class="term"><span><strong class="command">memstatistics</strong></span></span></dt>
2986 <dd><p>
2987                   Write memory statistics to the file specified by
2988                   <span><strong class="command">memstatistics-file</strong></span> at exit.
2989                   The default is <strong class="userinput"><code>no</code></strong> unless
2990                   '-m record' is specified on the command line in
2991                   which case it is <strong class="userinput"><code>yes</code></strong>.
2992                 </p></dd>
2993 <dt><span class="term"><span><strong class="command">dialup</strong></span></span></dt>
2994 <dd>
2995 <p>
2996                   If <strong class="userinput"><code>yes</code></strong>, then the
2997                   server treats all zones as if they are doing zone transfers
2998                   across
2999                   a dial-on-demand dialup link, which can be brought up by
3000                   traffic
3001                   originating from this server. This has different effects
3002                   according
3003                   to zone type and concentrates the zone maintenance so that
3004                   it all
3005                   happens in a short interval, once every <span><strong class="command">heartbeat-interval</strong></span> and
3006                   hopefully during the one call. It also suppresses some of
3007                   the normal
3008                   zone maintenance traffic. The default is <strong class="userinput"><code>no</code></strong>.
3009                 </p>
3010 <p>
3011                   The <span><strong class="command">dialup</strong></span> option
3012                   may also be specified in the <span><strong class="command">view</strong></span> and
3013                   <span><strong class="command">zone</strong></span> statements,
3014                   in which case it overrides the global <span><strong class="command">dialup</strong></span>
3015                   option.
3016                 </p>
3017 <p>
3018                   If the zone is a master zone, then the server will send out a
3019                   NOTIFY
3020                   request to all the slaves (default). This should trigger the
3021                   zone serial
3022                   number check in the slave (providing it supports NOTIFY)
3023                   allowing the slave
3024                   to verify the zone while the connection is active.
3025                   The set of servers to which NOTIFY is sent can be controlled
3026                   by
3027                   <span><strong class="command">notify</strong></span> and <span><strong class="command">also-notify</strong></span>.
3028                 </p>
3029 <p>
3030                   If the
3031                   zone is a slave or stub zone, then the server will suppress
3032                   the regular
3033                   "zone up to date" (refresh) queries and only perform them
3034                   when the
3035                   <span><strong class="command">heartbeat-interval</strong></span> expires in
3036                   addition to sending
3037                   NOTIFY requests.
3038                 </p>
3039 <p>
3040                   Finer control can be achieved by using
3041                   <strong class="userinput"><code>notify</code></strong> which only sends NOTIFY
3042                   messages,
3043                   <strong class="userinput"><code>notify-passive</code></strong> which sends NOTIFY
3044                   messages and
3045                   suppresses the normal refresh queries, <strong class="userinput"><code>refresh</code></strong>
3046                   which suppresses normal refresh processing and sends refresh
3047                   queries
3048                   when the <span><strong class="command">heartbeat-interval</strong></span>
3049                   expires, and
3050                   <strong class="userinput"><code>passive</code></strong> which just disables normal
3051                   refresh
3052                   processing.
3053                 </p>
3054 <div class="informaltable"><table border="1">
3055 <colgroup>
3056 <col>
3057 <col>
3058 <col>
3059 <col>
3060 </colgroup>
3061 <tbody>
3062 <tr>
3063 <td>
3064                           <p>
3065                             dialup mode
3066                           </p>
3067                         </td>
3068 <td>
3069                           <p>
3070                             normal refresh
3071                           </p>
3072                         </td>
3073 <td>
3074                           <p>
3075                             heart-beat refresh
3076                           </p>
3077                         </td>
3078 <td>
3079                           <p>
3080                             heart-beat notify
3081                           </p>
3082                         </td>
3083 </tr>
3084 <tr>
3085 <td>
3086                           <p><span><strong class="command">no</strong></span> (default)</p>
3087                         </td>
3088 <td>
3089                           <p>
3090                             yes
3091                           </p>
3092                         </td>
3093 <td>
3094                           <p>
3095                             no
3096                           </p>
3097                         </td>
3098 <td>
3099                           <p>
3100                             no
3101                           </p>
3102                         </td>
3103 </tr>
3104 <tr>
3105 <td>
3106                           <p><span><strong class="command">yes</strong></span></p>
3107                         </td>
3108 <td>
3109                           <p>
3110                             no
3111                           </p>
3112                         </td>
3113 <td>
3114                           <p>
3115                             yes
3116                           </p>
3117                         </td>
3118 <td>
3119                           <p>
3120                             yes
3121                           </p>
3122                         </td>
3123 </tr>
3124 <tr>
3125 <td>
3126                           <p><span><strong class="command">notify</strong></span></p>
3127                         </td>
3128 <td>
3129                           <p>
3130                             yes
3131                           </p>
3132                         </td>
3133 <td>
3134                           <p>
3135                             no
3136                           </p>
3137                         </td>
3138 <td>
3139                           <p>
3140                             yes
3141                           </p>
3142                         </td>
3143 </tr>
3144 <tr>
3145 <td>
3146                           <p><span><strong class="command">refresh</strong></span></p>
3147                         </td>
3148 <td>
3149                           <p>
3150                             no
3151                           </p>
3152                         </td>
3153 <td>
3154                           <p>
3155                             yes
3156                           </p>
3157                         </td>
3158 <td>
3159                           <p>
3160                             no
3161                           </p>
3162                         </td>
3163 </tr>
3164 <tr>
3165 <td>
3166                           <p><span><strong class="command">passive</strong></span></p>
3167                         </td>
3168 <td>
3169                           <p>
3170                             no
3171                           </p>
3172                         </td>
3173 <td>
3174                           <p>
3175                             no
3176                           </p>
3177                         </td>
3178 <td>
3179                           <p>
3180                             no
3181                           </p>
3182                         </td>
3183 </tr>
3184 <tr>
3185 <td>
3186                           <p><span><strong class="command">notify-passive</strong></span></p>
3187                         </td>
3188 <td>
3189                           <p>
3190                             no
3191                           </p>
3192                         </td>
3193 <td>
3194                           <p>
3195                             no
3196                           </p>
3197                         </td>
3198 <td>
3199                           <p>
3200                             yes
3201                           </p>
3202                         </td>
3203 </tr>
3204 </tbody>
3205 </table></div>
3206 <p>
3207                   Note that normal NOTIFY processing is not affected by
3208                   <span><strong class="command">dialup</strong></span>.
3209                 </p>
3210 </dd>
3211 <dt><span class="term"><span><strong class="command">fake-iquery</strong></span></span></dt>
3212 <dd><p>
3213                   In <acronym class="acronym">BIND</acronym> 8, this option
3214                   enabled simulating the obsolete DNS query type
3215                   IQUERY. <acronym class="acronym">BIND</acronym> 9 never does
3216                   IQUERY simulation.
3217                 </p></dd>
3218 <dt><span class="term"><span><strong class="command">fetch-glue</strong></span></span></dt>
3219 <dd><p>
3220                   This option is obsolete.
3221                   In BIND 8, <strong class="userinput"><code>fetch-glue yes</code></strong>
3222                   caused the server to attempt to fetch glue resource records
3223                   it
3224                   didn't have when constructing the additional
3225                   data section of a response.  This is now considered a bad
3226                   idea
3227                   and BIND 9 never does it.
3228                 </p></dd>
3229 <dt><span class="term"><span><strong class="command">flush-zones-on-shutdown</strong></span></span></dt>
3230 <dd><p>
3231                   When the nameserver exits due receiving SIGTERM,
3232                   flush or do not flush any pending zone writes.  The default
3233                   is
3234                   <span><strong class="command">flush-zones-on-shutdown</strong></span> <strong class="userinput"><code>no</code></strong>.
3235                 </p></dd>
3236 <dt><span class="term"><span><strong class="command">has-old-clients</strong></span></span></dt>
3237 <dd><p>
3238                   This option was incorrectly implemented
3239                   in <acronym class="acronym">BIND</acronym> 8, and is ignored by <acronym class="acronym">BIND</acronym> 9.
3240                   To achieve the intended effect
3241                   of
3242                   <span><strong class="command">has-old-clients</strong></span> <strong class="userinput"><code>yes</code></strong>, specify
3243                   the two separate options <span><strong class="command">auth-nxdomain</strong></span> <strong class="userinput"><code>yes</code></strong>
3244                   and <span><strong class="command">rfc2308-type1</strong></span> <strong class="userinput"><code>no</code></strong> instead.
3245                 </p></dd>
3246 <dt><span class="term"><span><strong class="command">host-statistics</strong></span></span></dt>
3247 <dd><p>
3248                   In BIND 8, this enables keeping of
3249                   statistics for every host that the name server interacts
3250                   with.
3251                   Not implemented in BIND 9.
3252                 </p></dd>
3253 <dt><span class="term"><span><strong class="command">maintain-ixfr-base</strong></span></span></dt>
3254 <dd><p>
3255                   <span class="emphasis"><em>This option is obsolete</em></span>.
3256                   It was used in <acronym class="acronym">BIND</acronym> 8 to
3257                   determine whether a transaction log was
3258                   kept for Incremental Zone Transfer. <acronym class="acronym">BIND</acronym> 9 maintains a transaction
3259                   log whenever possible.  If you need to disable outgoing
3260                   incremental zone
3261                   transfers, use <span><strong class="command">provide-ixfr</strong></span> <strong class="userinput"><code>no</code></strong>.
3262                 </p></dd>
3263 <dt><span class="term"><span><strong class="command">minimal-responses</strong></span></span></dt>
3264 <dd><p>
3265                   If <strong class="userinput"><code>yes</code></strong>, then when generating
3266                   responses the server will only add records to the authority
3267                   and additional data sections when they are required (e.g.
3268                   delegations, negative responses).  This may improve the
3269                   performance of the server.
3270                   The default is <strong class="userinput"><code>no</code></strong>.
3271                 </p></dd>
3272 <dt><span class="term"><span><strong class="command">multiple-cnames</strong></span></span></dt>
3273 <dd><p>
3274                   This option was used in <acronym class="acronym">BIND</acronym> 8 to allow
3275                   a domain name to have multiple CNAME records in violation of
3276                   the DNS standards.  <acronym class="acronym">BIND</acronym> 9.2 onwards
3277                   always strictly enforces the CNAME rules both in master
3278                   files and dynamic updates.
3279                 </p></dd>
3280 <dt><span class="term"><span><strong class="command">notify</strong></span></span></dt>
3281 <dd>
3282 <p>
3283                   If <strong class="userinput"><code>yes</code></strong> (the default),
3284                   DNS NOTIFY messages are sent when a zone the server is
3285                   authoritative for
3286                   changes, see <a href="Bv9ARM.ch04.html#notify" title="Notify">the section called &#8220;Notify&#8221;</a>.  The messages are
3287                   sent to the
3288                   servers listed in the zone's NS records (except the master
3289                   server identified
3290                   in the SOA MNAME field), and to any servers listed in the
3291                   <span><strong class="command">also-notify</strong></span> option.
3292                 </p>
3293 <p>
3294                   If <strong class="userinput"><code>master-only</code></strong>, notifies are only
3295                   sent
3296                   for master zones.
3297                   If <strong class="userinput"><code>explicit</code></strong>, notifies are sent only
3298                   to
3299                   servers explicitly listed using <span><strong class="command">also-notify</strong></span>.
3300                   If <strong class="userinput"><code>no</code></strong>, no notifies are sent.
3301                 </p>
3302 <p>
3303                   The <span><strong class="command">notify</strong></span> option may also be
3304                   specified in the <span><strong class="command">zone</strong></span>
3305                   statement,
3306                   in which case it overrides the <span><strong class="command">options notify</strong></span> statement.
3307                   It would only be necessary to turn off this option if it
3308                   caused slaves
3309                   to crash.
3310                 </p>
3311 </dd>
3312 <dt><span class="term"><span><strong class="command">notify-to-soa</strong></span></span></dt>
3313 <dd><p>
3314                   If <strong class="userinput"><code>yes</code></strong> do not check the nameservers
3315                   in the NS RRset against the SOA MNAME.  Normally a NOTIFY
3316                   message is not sent to the SOA MNAME (SOA ORIGIN) as it is
3317                   supposed to contain the name of the ultimate master.
3318                   Sometimes, however, a slave is listed as the SOA MNAME in
3319                   hidden master configurations and in that case you would
3320                   want the ultimate master to still send NOTIFY messages to
3321                   all the nameservers listed in the NS RRset.
3322                 </p></dd>
3323 <dt><span class="term"><span><strong class="command">recursion</strong></span></span></dt>
3324 <dd><p>
3325                   If <strong class="userinput"><code>yes</code></strong>, and a
3326                   DNS query requests recursion, then the server will attempt
3327                   to do
3328                   all the work required to answer the query. If recursion is
3329                   off
3330                   and the server does not already know the answer, it will
3331                   return a
3332                   referral response. The default is
3333                   <strong class="userinput"><code>yes</code></strong>.
3334                   Note that setting <span><strong class="command">recursion no</strong></span> does not prevent
3335                   clients from getting data from the server's cache; it only
3336                   prevents new data from being cached as an effect of client
3337                   queries.
3338                   Caching may still occur as an effect the server's internal
3339                   operation, such as NOTIFY address lookups.
3340                   See also <span><strong class="command">fetch-glue</strong></span> above.
3341                 </p></dd>
3342 <dt><span class="term"><span><strong class="command">request-nsid</strong></span></span></dt>
3343 <dd><p>
3344                   If <strong class="userinput"><code>yes</code></strong>, then an empty EDNS(0)
3345                   NSID (Name Server Identifier) option is sent with all 
3346                   queries to authoritative name servers during iterative
3347                   resolution. If the authoritative server returns an NSID
3348                   option in its response, then its contents are logged in
3349                   the <span><strong class="command">resolver</strong></span> category at level
3350                   <span><strong class="command">info</strong></span>.
3351                   The default is <strong class="userinput"><code>no</code></strong>.
3352                 </p></dd>
3353 <dt><span class="term"><span><strong class="command">rfc2308-type1</strong></span></span></dt>
3354 <dd>
3355 <p>
3356                   Setting this to <strong class="userinput"><code>yes</code></strong> will
3357                   cause the server to send NS records along with the SOA
3358                   record for negative
3359                   answers. The default is <strong class="userinput"><code>no</code></strong>.
3360                 </p>
3361 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3362 <h3 class="title">Note</h3>
3363 <p>
3364                     Not yet implemented in <acronym class="acronym">BIND</acronym>
3365                     9.
3366                   </p>
3367 </div>
3368 </dd>
3369 <dt><span class="term"><span><strong class="command">use-id-pool</strong></span></span></dt>
3370 <dd><p>
3371                   <span class="emphasis"><em>This option is obsolete</em></span>.
3372                   <acronym class="acronym">BIND</acronym> 9 always allocates query
3373                   IDs from a pool.
3374                 </p></dd>
3375 <dt><span class="term"><span><strong class="command">use-ixfr</strong></span></span></dt>
3376 <dd><p>
3377                   <span class="emphasis"><em>This option is obsolete</em></span>.
3378                   If you need to disable IXFR to a particular server or
3379                   servers, see
3380                   the information on the <span><strong class="command">provide-ixfr</strong></span> option
3381                   in <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
3382             Usage">the section called &#8220;<span><strong class="command">server</strong></span> Statement Definition and
3383             Usage&#8221;</a>.
3384                   See also
3385                   <a href="Bv9ARM.ch04.html#incremental_zone_transfers" title="Incremental Zone Transfers (IXFR)">the section called &#8220;Incremental Zone Transfers (IXFR)&#8221;</a>.
3386                 </p></dd>
3387 <dt><span class="term"><span><strong class="command">provide-ixfr</strong></span></span></dt>
3388 <dd><p>
3389                   See the description of
3390                   <span><strong class="command">provide-ixfr</strong></span> in
3391                   <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
3392             Usage">the section called &#8220;<span><strong class="command">server</strong></span> Statement Definition and
3393             Usage&#8221;</a>.
3394                 </p></dd>
3395 <dt><span class="term"><span><strong class="command">request-ixfr</strong></span></span></dt>
3396 <dd><p>
3397                   See the description of
3398                   <span><strong class="command">request-ixfr</strong></span> in
3399                   <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
3400             Usage">the section called &#8220;<span><strong class="command">server</strong></span> Statement Definition and
3401             Usage&#8221;</a>.
3402                 </p></dd>
3403 <dt><span class="term"><span><strong class="command">treat-cr-as-space</strong></span></span></dt>
3404 <dd><p>
3405                   This option was used in <acronym class="acronym">BIND</acronym>
3406                   8 to make
3407                   the server treat carriage return ("<span><strong class="command">\r</strong></span>") characters the same way
3408                   as a space or tab character,
3409                   to facilitate loading of zone files on a UNIX system that
3410                   were generated
3411                   on an NT or DOS machine. In <acronym class="acronym">BIND</acronym> 9, both UNIX "<span><strong class="command">\n</strong></span>"
3412                   and NT/DOS "<span><strong class="command">\r\n</strong></span>" newlines
3413                   are always accepted,
3414                   and the option is ignored.
3415                 </p></dd>
3416 <dt>
3417 <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>
3418 </dt>
3419 <dd>
3420 <p>
3421                   These options control the behavior of an authoritative
3422                   server when
3423                   answering queries which have additional data, or when
3424                   following CNAME
3425                   and DNAME chains.
3426                 </p>
3427 <p>
3428                   When both of these options are set to <strong class="userinput"><code>yes</code></strong>
3429                   (the default) and a
3430                   query is being answered from authoritative data (a zone
3431                   configured into the server), the additional data section of
3432                   the
3433                   reply will be filled in using data from other authoritative
3434                   zones
3435                   and from the cache.  In some situations this is undesirable,
3436                   such
3437                   as when there is concern over the correctness of the cache,
3438                   or
3439                   in servers where slave zones may be added and modified by
3440                   untrusted third parties.  Also, avoiding
3441                   the search for this additional data will speed up server
3442                   operations
3443                   at the possible expense of additional queries to resolve
3444                   what would
3445                   otherwise be provided in the additional section.
3446                 </p>
3447 <p>
3448                   For example, if a query asks for an MX record for host <code class="literal">foo.example.com</code>,
3449                   and the record found is "<code class="literal">MX 10 mail.example.net</code>", normally the address
3450                   records (A and AAAA) for <code class="literal">mail.example.net</code> will be provided as well,
3451                   if known, even though they are not in the example.com zone.
3452                   Setting these options to <span><strong class="command">no</strong></span>
3453                   disables this behavior and makes
3454                   the server only search for additional data in the zone it
3455                   answers from.
3456                 </p>
3457 <p>
3458                   These options are intended for use in authoritative-only
3459                   servers, or in authoritative-only views.  Attempts to set
3460                   them to <span><strong class="command">no</strong></span> without also
3461                   specifying
3462                   <span><strong class="command">recursion no</strong></span> will cause the
3463                   server to
3464                   ignore the options and log a warning message.
3465                 </p>
3466 <p>
3467                   Specifying <span><strong class="command">additional-from-cache no</strong></span> actually
3468                   disables the use of the cache not only for additional data
3469                   lookups
3470                   but also when looking up the answer.  This is usually the
3471                   desired
3472                   behavior in an authoritative-only server where the
3473                   correctness of
3474                   the cached data is an issue.
3475                 </p>
3476 <p>
3477                   When a name server is non-recursively queried for a name
3478                   that is not
3479                   below the apex of any served zone, it normally answers with
3480                   an
3481                   "upwards referral" to the root servers or the servers of
3482                   some other
3483                   known parent of the query name.  Since the data in an
3484                   upwards referral
3485                   comes from the cache, the server will not be able to provide
3486                   upwards
3487                   referrals when <span><strong class="command">additional-from-cache no</strong></span>
3488                   has been specified.  Instead, it will respond to such
3489                   queries
3490                   with REFUSED.  This should not cause any problems since
3491                   upwards referrals are not required for the resolution
3492                   process.
3493                 </p>
3494 </dd>
3495 <dt><span class="term"><span><strong class="command">match-mapped-addresses</strong></span></span></dt>
3496 <dd>
3497 <p>
3498                   If <strong class="userinput"><code>yes</code></strong>, then an
3499                   IPv4-mapped IPv6 address will match any address match
3500                   list entries that match the corresponding IPv4 address.
3501                 </p>
3502 <p>
3503                   This option was introduced to work around a kernel quirk
3504                   in some operating systems that causes IPv4 TCP
3505                   connections, such as zone transfers, to be accepted on an
3506                   IPv6 socket using mapped addresses.  This caused address
3507                   match lists designed for IPv4 to fail to match.  However,
3508                   <span><strong class="command">named</strong></span> now solves this problem
3509                   internally.  The use of this option is discouraged.
3510                 </p>
3511 </dd>
3512 <dt><span class="term"><span><strong class="command">filter-aaaa-on-v4</strong></span></span></dt>
3513 <dd>
3514 <p>
3515                   This option is only available when
3516                   <acronym class="acronym">BIND</acronym> 9 is compiled with the
3517                   <strong class="userinput"><code>--enable-filter-aaaa</code></strong> option on the
3518                   "configure" command line.  It is intended to help the
3519                   transition from IPv4 to IPv6 by not giving IPv6 addresses
3520                   to DNS clients unless they have connections to the IPv6
3521                   Internet.  This is not recommended unless absolutely
3522                   necessary.  The default is <strong class="userinput"><code>no</code></strong>.
3523                   The <span><strong class="command">filter-aaaa-on-v4</strong></span> option
3524                   may also be specified in <span><strong class="command">view</strong></span> statements
3525                   to override the global <span><strong class="command">filter-aaaa-on-v4</strong></span>
3526                   option.
3527                 </p>
3528 <p>
3529                   If <strong class="userinput"><code>yes</code></strong>,
3530                   the DNS client is at an IPv4 address, in <span><strong class="command">filter-aaaa</strong></span>,
3531                   and if the response does not include DNSSEC signatures, 
3532                   then all AAAA records are deleted from the response.
3533                   This filtering applies to all responses and not only
3534                   authoritative responses.
3535                 </p>
3536 <p>
3537                   If <strong class="userinput"><code>break-dnssec</code></strong>,
3538                   then AAAA records are deleted even when dnssec is enabled.
3539                   As suggested by the name, this makes the response not verify,
3540                   because the DNSSEC protocol is designed detect deletions.
3541                 </p>
3542 <p>
3543                   This mechanism can erroneously cause other servers to 
3544                   not give AAAA records to their clients.  
3545                   A recursing server with both IPv6 and IPv4 network connections
3546                   that queries an authoritative server using this mechanism
3547                   via IPv4 will be denied AAAA records even if its client is
3548                   using IPv6.
3549                 </p>
3550 <p>
3551                   This mechanism is applied to authoritative as well as
3552                   non-authoritative records.
3553                   A client using IPv4 that is not allowed recursion can
3554                   erroneously be given AAAA records because the server is not
3555                   allowed to check for A records.
3556                 </p>
3557 <p>
3558                   Some AAAA records are given to IPv4 clients in glue records.
3559                   IPv4 clients that are servers can then erroneously
3560                   answer requests for AAAA records received via IPv4.
3561                 </p>
3562 </dd>
3563 <dt><span class="term"><span><strong class="command">ixfr-from-differences</strong></span></span></dt>
3564 <dd>
3565 <p>
3566                   When <strong class="userinput"><code>yes</code></strong> and the server loads a new
3567                   version of a master zone from its zone file or receives a
3568                   new version of a slave file via zone transfer, it will
3569                   compare the new version to the previous one and calculate
3570                   a set of differences.  The differences are then logged in
3571                   the zone's journal file such that the changes can be
3572                   transmitted to downstream slaves as an incremental zone
3573                   transfer.
3574                 </p>
3575 <p>
3576                   By allowing incremental zone transfers to be used for
3577                   non-dynamic zones, this option saves bandwidth at the
3578                   expense of increased CPU and memory consumption at the
3579                   master.
3580                   In particular, if the new version of a zone is completely
3581                   different from the previous one, the set of differences
3582                   will be of a size comparable to the combined size of the
3583                   old and new zone version, and the server will need to
3584                   temporarily allocate memory to hold this complete
3585                   difference set.
3586                 </p>
3587 <p><span><strong class="command">ixfr-from-differences</strong></span>
3588                   also accepts <span><strong class="command">master</strong></span> and
3589                   <span><strong class="command">slave</strong></span> at the view and options
3590                   levels which causes
3591                   <span><strong class="command">ixfr-from-differences</strong></span> to be enabled for
3592                   all <span><strong class="command">master</strong></span> or
3593                   <span><strong class="command">slave</strong></span> zones respectively.
3594                   It is off by default.
3595                 </p>
3596 </dd>
3597 <dt><span class="term"><span><strong class="command">multi-master</strong></span></span></dt>
3598 <dd><p>
3599                   This should be set when you have multiple masters for a zone
3600                   and the
3601                   addresses refer to different machines.  If <strong class="userinput"><code>yes</code></strong>, <span><strong class="command">named</strong></span> will
3602                   not log
3603                   when the serial number on the master is less than what <span><strong class="command">named</strong></span>
3604                   currently
3605                   has.  The default is <strong class="userinput"><code>no</code></strong>.
3606                 </p></dd>
3607 <dt><span class="term"><span><strong class="command">dnssec-enable</strong></span></span></dt>
3608 <dd><p>
3609                   Enable DNSSEC support in <span><strong class="command">named</strong></span>.  Unless set to <strong class="userinput"><code>yes</code></strong>,
3610                   <span><strong class="command">named</strong></span> behaves as if it does not support DNSSEC.
3611                   The default is <strong class="userinput"><code>yes</code></strong>.
3612                 </p></dd>
3613 <dt><span class="term"><span><strong class="command">dnssec-validation</strong></span></span></dt>
3614 <dd><p>
3615                   Enable DNSSEC validation in <span><strong class="command">named</strong></span>.
3616                   Note <span><strong class="command">dnssec-enable</strong></span> also needs to be
3617                   set to <strong class="userinput"><code>yes</code></strong> to be effective.
3618                   If set to <strong class="userinput"><code>no</code></strong>, DNSSEC validation
3619                   is disabled.  If set to <strong class="userinput"><code>auto</code></strong>,
3620                   DNSSEC validation is enabled, and a default
3621                   trust-anchor for the DNS root zone is used.  If set to
3622                   <strong class="userinput"><code>yes</code></strong>, DNSSEC validation is enabled,
3623                   but a trust anchor must be manually configured using
3624                   a <span><strong class="command">trusted-keys</strong></span> or
3625                   <span><strong class="command">managed-keys</strong></span> statement.  The default
3626                   is <strong class="userinput"><code>yes</code></strong>.
3627                 </p></dd>
3628 <dt><span class="term"><span><strong class="command">dnssec-accept-expired</strong></span></span></dt>
3629 <dd><p>
3630                   Accept expired signatures when verifying DNSSEC signatures.
3631                   The default is <strong class="userinput"><code>no</code></strong>.
3632                   Setting this option to <strong class="userinput"><code>yes</code></strong>
3633                   leaves <span><strong class="command">named</strong></span> vulnerable to
3634                   replay attacks.
3635                 </p></dd>
3636 <dt><span class="term"><span><strong class="command">querylog</strong></span></span></dt>
3637 <dd><p>
3638                   Specify whether query logging should be started when <span><strong class="command">named</strong></span>
3639                   starts.
3640                   If <span><strong class="command">querylog</strong></span> is not specified,
3641                   then the query logging
3642                   is determined by the presence of the logging category <span><strong class="command">queries</strong></span>.
3643                 </p></dd>
3644 <dt><span class="term"><span><strong class="command">check-names</strong></span></span></dt>
3645 <dd>
3646 <p>
3647                   This option is used to restrict the character set and syntax
3648                   of
3649                   certain domain names in master files and/or DNS responses
3650                   received
3651                   from the network.  The default varies according to usage
3652                   area.  For
3653                   <span><strong class="command">master</strong></span> zones the default is <span><strong class="command">fail</strong></span>.
3654                   For <span><strong class="command">slave</strong></span> zones the default
3655                   is <span><strong class="command">warn</strong></span>.
3656                   For answers received from the network (<span><strong class="command">response</strong></span>)
3657                   the default is <span><strong class="command">ignore</strong></span>.
3658                 </p>
3659 <p>
3660                   The rules for legal hostnames and mail domains are derived
3661                   from RFC 952 and RFC 821 as modified by RFC 1123.
3662                 </p>
3663 <p><span><strong class="command">check-names</strong></span>
3664                   applies to the owner names of A, AAAA and MX records.
3665                   It also applies to the domain names in the RDATA of NS, SOA,
3666                   MX, and SRV records.
3667                   It also applies to the RDATA of PTR records where the owner
3668                   name indicated that it is a reverse lookup of a hostname
3669                   (the owner name ends in IN-ADDR.ARPA, IP6.ARPA, or IP6.INT).
3670                 </p>
3671 </dd>
3672 <dt><span class="term"><span><strong class="command">check-dup-records</strong></span></span></dt>
3673 <dd><p>
3674                   Check master zones for records that are treated as different
3675                   by DNSSEC but are semantically equal in plain DNS.  The
3676                   default is to <span><strong class="command">warn</strong></span>.  Other possible
3677                   values are <span><strong class="command">fail</strong></span> and
3678                   <span><strong class="command">ignore</strong></span>.
3679                 </p></dd>
3680 <dt><span class="term"><span><strong class="command">check-mx</strong></span></span></dt>
3681 <dd><p>
3682                   Check whether the MX record appears to refer to a IP address.
3683                   The default is to <span><strong class="command">warn</strong></span>.  Other possible
3684                   values are <span><strong class="command">fail</strong></span> and
3685                   <span><strong class="command">ignore</strong></span>.
3686                 </p></dd>
3687 <dt><span class="term"><span><strong class="command">check-wildcard</strong></span></span></dt>
3688 <dd><p>
3689                   This option is used to check for non-terminal wildcards.
3690                   The use of non-terminal wildcards is almost always as a
3691                   result of a failure
3692                   to understand the wildcard matching algorithm (RFC 1034).
3693                   This option
3694                   affects master zones.  The default (<span><strong class="command">yes</strong></span>) is to check
3695                   for non-terminal wildcards and issue a warning.
3696                 </p></dd>
3697 <dt><span class="term"><span><strong class="command">check-integrity</strong></span></span></dt>
3698 <dd>
3699 <p>
3700                   Perform post load zone integrity checks on master
3701                   zones.  This checks that MX and SRV records refer
3702                   to address (A or AAAA) records and that glue
3703                   address records exist for delegated zones.  For
3704                   MX and SRV records only in-zone hostnames are
3705                   checked (for out-of-zone hostnames use
3706                   <span><strong class="command">named-checkzone</strong></span>).
3707                   For NS records only names below top of zone are
3708                   checked (for out-of-zone names and glue consistency
3709                   checks use <span><strong class="command">named-checkzone</strong></span>).
3710                   The default is <span><strong class="command">yes</strong></span>.
3711                 </p>
3712 <p>
3713                   Check that the two forms of Sender Policy Framework
3714                   records (TXT records starting with "v=spf1" and SPF) either
3715                   both exist or both don't exist.  Warnings are
3716                   emitted it they don't and be suppressed with
3717                   <span><strong class="command">check-spf</strong></span>.
3718                 </p>
3719 </dd>
3720 <dt><span class="term"><span><strong class="command">check-mx-cname</strong></span></span></dt>
3721 <dd><p>
3722                   If <span><strong class="command">check-integrity</strong></span> is set then
3723                   fail, warn or ignore MX records that refer
3724                   to CNAMES.  The default is to <span><strong class="command">warn</strong></span>.
3725                 </p></dd>
3726 <dt><span class="term"><span><strong class="command">check-srv-cname</strong></span></span></dt>
3727 <dd><p>
3728                   If <span><strong class="command">check-integrity</strong></span> is set then
3729                   fail, warn or ignore SRV records that refer
3730                   to CNAMES.  The default is to <span><strong class="command">warn</strong></span>.
3731                 </p></dd>
3732 <dt><span class="term"><span><strong class="command">check-sibling</strong></span></span></dt>
3733 <dd><p>
3734                   When performing integrity checks, also check that
3735                   sibling glue exists.  The default is <span><strong class="command">yes</strong></span>.
3736                 </p></dd>
3737 <dt><span class="term"><span><strong class="command">check-spf</strong></span></span></dt>
3738 <dd><p>
3739                   When performing integrity checks, check that the
3740                   two forms of Sender Policy Framwork records (TXT
3741                   records starting with "v=spf1" and SPF) both exist
3742                   or both don't exist and issue a warning if not
3743                   met.  The default is <span><strong class="command">warn</strong></span>.
3744                 </p></dd>
3745 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl</strong></span></span></dt>
3746 <dd><p>
3747                   When returning authoritative negative responses to
3748                   SOA queries set the TTL of the SOA record returned in
3749                   the authority section to zero.
3750                   The default is <span><strong class="command">yes</strong></span>.
3751                 </p></dd>
3752 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl-cache</strong></span></span></dt>
3753 <dd><p>
3754                   When caching a negative response to a SOA query
3755                   set the TTL to zero.
3756                   The default is <span><strong class="command">no</strong></span>.
3757                 </p></dd>
3758 <dt><span class="term"><span><strong class="command">update-check-ksk</strong></span></span></dt>
3759 <dd>
3760 <p>
3761                   When set to the default value of <code class="literal">yes</code>,
3762                   check the KSK bit in each key to determine how the key
3763                   should be used when generating RRSIGs for a secure zone.
3764                 </p>
3765 <p>
3766                   Ordinarily, zone-signing keys (that is, keys without the
3767                   KSK bit set) are used to sign the entire zone, while
3768                   key-signing keys (keys with the KSK bit set) are only
3769                   used to sign the DNSKEY RRset at the zone apex.
3770                   However, if this option is set to <code class="literal">no</code>,
3771                   then the KSK bit is ignored; KSKs are treated as if they
3772                   were ZSKs and are used to sign the entire zone.  This is
3773                   similar to the <span><strong class="command">dnssec-signzone -z</strong></span>
3774                   command line option.
3775                 </p>
3776 <p>
3777                   When this option is set to <code class="literal">yes</code>, there
3778                   must be at least two active keys for every algorithm
3779                   represented in the DNSKEY RRset: at least one KSK and one
3780                   ZSK per algorithm.  If there is any algorithm for which
3781                   this requirement is not met, this option will be ignored
3782                   for that algorithm.
3783                 </p>
3784 </dd>
3785 <dt><span class="term"><span><strong class="command">dnssec-dnskey-kskonly</strong></span></span></dt>
3786 <dd>
3787 <p>
3788                   When this option and <span><strong class="command">update-check-ksk</strong></span>
3789                   are both set to <code class="literal">yes</code>, only key-signing
3790                   keys (that is, keys with the KSK bit set) will be used
3791                   to sign the DNSKEY RRset at the zone apex.  Zone-signing
3792                   keys (keys without the KSK bit set) will be used to sign
3793                   the remainder of the zone, but not the DNSKEY RRset.
3794                   This is similar to the
3795                   <span><strong class="command">dnssec-signzone -x</strong></span> command line option.
3796                 </p>
3797 <p>
3798                   The default is <span><strong class="command">no</strong></span>.  If
3799                   <span><strong class="command">update-check-ksk</strong></span> is set to
3800                   <code class="literal">no</code>, this option is ignored.
3801                 </p>
3802 </dd>
3803 <dt><span class="term"><span><strong class="command">dnssec-loadkeys-interval</strong></span></span></dt>
3804 <dd><p>
3805                   When a zone is configured with <span><strong class="command">auto-dnssec
3806                   maintain;</strong></span> its key repository must be checked
3807                   periodically to see if any new keys have been added
3808                   or any existing keys' timing metadata has been updated
3809                   (see <a href="man.dnssec-keygen.html" title="dnssec-keygen"><span class="refentrytitle"><span class="application">dnssec-keygen</span></span>(8)</a> and
3810                   <a href="man.dnssec-settime.html" title="dnssec-settime"><span class="refentrytitle"><span class="application">dnssec-settime</span></span>(8)</a>).  The
3811                   <span><strong class="command">dnssec-loadkeys-interval</strong></span> option
3812                   sets the frequency of automatic repository checks, in
3813                   minutes.  The default is <code class="literal">60</code> (1 hour),
3814                   the minimum is <code class="literal">1</code> (1 minute), and the
3815                   maximum is <code class="literal">1440</code> (24 hours); any higher
3816                   value is silently reduced.
3817                 </p></dd>
3818 <dt><span class="term"><span><strong class="command">try-tcp-refresh</strong></span></span></dt>
3819 <dd><p>
3820                   Try to refresh the zone using TCP if UDP queries fail.
3821                   For BIND 8 compatibility, the default is
3822                   <span><strong class="command">yes</strong></span>.
3823                 </p></dd>
3824 <dt><span class="term"><span><strong class="command">dnssec-secure-to-insecure</strong></span></span></dt>
3825 <dd>
3826 <p>
3827                   Allow a dynamic zone to transition from secure to
3828                   insecure (i.e., signed to unsigned) by deleting all
3829                   of the DNSKEY records.  The default is <span><strong class="command">no</strong></span>.
3830                   If set to <span><strong class="command">yes</strong></span>, and if the DNSKEY RRset
3831                   at the zone apex is deleted, all RRSIG and NSEC records
3832                   will be removed from the zone as well.
3833                 </p>
3834 <p>
3835                   If the zone uses NSEC3, then it is also necessary to
3836                   delete the NSEC3PARAM RRset from the zone apex; this will
3837                   cause the removal of all corresponding NSEC3 records.
3838                   (It is expected that this requirement will be eliminated
3839                   in a future release.)
3840                 </p>
3841 <p>
3842                   Note that if a zone has been configured with
3843                   <span><strong class="command">auto-dnssec maintain</strong></span> and the
3844                   private keys remain accessible in the key repository,
3845                   then the zone will be automatically signed again the
3846                   next time <span><strong class="command">named</strong></span> is started.
3847                 </p>
3848 </dd>
3849 </dl></div>
3850 </div>
3851 <div class="sect3" lang="en">
3852 <div class="titlepage"><div><div><h4 class="title">
3853 <a name="id2583370"></a>Forwarding</h4></div></div></div>
3854 <p>
3855             The forwarding facility can be used to create a large site-wide
3856             cache on a few servers, reducing traffic over links to external
3857             name servers. It can also be used to allow queries by servers that
3858             do not have direct access to the Internet, but wish to look up
3859             exterior
3860             names anyway. Forwarding occurs only on those queries for which
3861             the server is not authoritative and does not have the answer in
3862             its cache.
3863           </p>
3864 <div class="variablelist"><dl>
3865 <dt><span class="term"><span><strong class="command">forward</strong></span></span></dt>
3866 <dd><p>
3867                   This option is only meaningful if the
3868                   forwarders list is not empty. A value of <code class="varname">first</code>,
3869                   the default, causes the server to query the forwarders
3870                   first &#8212; and
3871                   if that doesn't answer the question, the server will then
3872                   look for
3873                   the answer itself. If <code class="varname">only</code> is
3874                   specified, the
3875                   server will only query the forwarders.
3876                 </p></dd>
3877 <dt><span class="term"><span><strong class="command">forwarders</strong></span></span></dt>
3878 <dd><p>
3879                   Specifies the IP addresses to be used
3880                   for forwarding. The default is the empty list (no
3881                   forwarding).
3882                 </p></dd>
3883 </dl></div>
3884 <p>
3885             Forwarding can also be configured on a per-domain basis, allowing
3886             for the global forwarding options to be overridden in a variety
3887             of ways. You can set particular domains to use different
3888             forwarders,
3889             or have a different <span><strong class="command">forward only/first</strong></span> behavior,
3890             or not forward at all, see <a href="Bv9ARM.ch06.html#zone_statement_grammar" title="zone
3891             Statement Grammar">the section called &#8220;<span><strong class="command">zone</strong></span>
3892             Statement Grammar&#8221;</a>.
3893           </p>
3894 </div>
3895 <div class="sect3" lang="en">
3896 <div class="titlepage"><div><div><h4 class="title">
3897 <a name="id2583565"></a>Dual-stack Servers</h4></div></div></div>
3898 <p>
3899             Dual-stack servers are used as servers of last resort to work
3900             around
3901             problems in reachability due the lack of support for either IPv4
3902             or IPv6
3903             on the host machine.
3904           </p>
3905 <div class="variablelist"><dl>
3906 <dt><span class="term"><span><strong class="command">dual-stack-servers</strong></span></span></dt>
3907 <dd><p>
3908                   Specifies host names or addresses of machines with access to
3909                   both IPv4 and IPv6 transports. If a hostname is used, the
3910                   server must be able
3911                   to resolve the name using only the transport it has.  If the
3912                   machine is dual
3913                   stacked, then the <span><strong class="command">dual-stack-servers</strong></span> have no effect unless
3914                   access to a transport has been disabled on the command line
3915                   (e.g. <span><strong class="command">named -4</strong></span>).
3916                 </p></dd>
3917 </dl></div>
3918 </div>
3919 <div class="sect3" lang="en">
3920 <div class="titlepage"><div><div><h4 class="title">
3921 <a name="access_control"></a>Access Control</h4></div></div></div>
3922 <p>
3923             Access to the server can be restricted based on the IP address
3924             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
3925             details on how to specify IP address lists.
3926           </p>
3927 <div class="variablelist"><dl>
3928 <dt><span class="term"><span><strong class="command">allow-notify</strong></span></span></dt>
3929 <dd><p>
3930                   Specifies which hosts are allowed to
3931                   notify this server, a slave, of zone changes in addition
3932                   to the zone masters.
3933                   <span><strong class="command">allow-notify</strong></span> may also be
3934                   specified in the
3935                   <span><strong class="command">zone</strong></span> statement, in which case
3936                   it overrides the
3937                   <span><strong class="command">options allow-notify</strong></span>
3938                   statement.  It is only meaningful
3939                   for a slave zone.  If not specified, the default is to
3940                   process notify messages
3941                   only from a zone's master.
3942                 </p></dd>
3943 <dt><span class="term"><span><strong class="command">allow-query</strong></span></span></dt>
3944 <dd>
3945 <p>
3946                   Specifies which hosts are allowed to ask ordinary
3947                   DNS questions. <span><strong class="command">allow-query</strong></span> may
3948                   also be specified in the <span><strong class="command">zone</strong></span>
3949                   statement, in which case it overrides the
3950                   <span><strong class="command">options allow-query</strong></span> statement.
3951                   If not specified, the default is to allow queries
3952                   from all hosts.
3953                 </p>
3954 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3955 <h3 class="title">Note</h3>
3956 <p>
3957                     <span><strong class="command">allow-query-cache</strong></span> is now
3958                     used to specify access to the cache.
3959                   </p>
3960 </div>
3961 </dd>
3962 <dt><span class="term"><span><strong class="command">allow-query-on</strong></span></span></dt>
3963 <dd>
3964 <p>
3965                   Specifies which local addresses can accept ordinary
3966                   DNS questions. This makes it possible, for instance,
3967                   to allow queries on internal-facing interfaces but
3968                   disallow them on external-facing ones, without
3969                   necessarily knowing the internal network's addresses.
3970                 </p>
3971 <p>
3972                   Note that <span><strong class="command">allow-query-on</strong></span> is only
3973                   checked for queries that are permitted by
3974                   <span><strong class="command">allow-query</strong></span>.  A query must be
3975                   allowed by both ACLs, or it will be refused.
3976                 </p>
3977 <p>
3978                   <span><strong class="command">allow-query-on</strong></span> may
3979                   also be specified in the <span><strong class="command">zone</strong></span>
3980                   statement, in which case it overrides the
3981                   <span><strong class="command">options allow-query-on</strong></span> statement.
3982                 </p>
3983 <p>
3984                   If not specified, the default is to allow queries
3985                   on all addresses.
3986                 </p>
3987 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3988 <h3 class="title">Note</h3>
3989 <p>
3990                     <span><strong class="command">allow-query-cache</strong></span> is
3991                     used to specify access to the cache.
3992                   </p>
3993 </div>
3994 </dd>
3995 <dt><span class="term"><span><strong class="command">allow-query-cache</strong></span></span></dt>
3996 <dd><p>
3997                   Specifies which hosts are allowed to get answers
3998                   from the cache.  If <span><strong class="command">allow-query-cache</strong></span>
3999                   is not set then <span><strong class="command">allow-recursion</strong></span>
4000                   is used if set, otherwise <span><strong class="command">allow-query</strong></span>
4001                   is used if set unless <span><strong class="command">recursion no;</strong></span> is
4002                   set in which case <span><strong class="command">none;</strong></span> is used,
4003                   otherwise the default (<span><strong class="command">localnets;</strong></span>
4004                   <span><strong class="command">localhost;</strong></span>) is used.
4005                 </p></dd>
4006 <dt><span class="term"><span><strong class="command">allow-query-cache-on</strong></span></span></dt>
4007 <dd><p>
4008                   Specifies which local addresses can give answers
4009                   from the cache.  If not specified, the default is
4010                   to allow cache queries on any address,
4011                   <span><strong class="command">localnets</strong></span> and
4012                   <span><strong class="command">localhost</strong></span>.
4013                 </p></dd>
4014 <dt><span class="term"><span><strong class="command">allow-recursion</strong></span></span></dt>
4015 <dd><p>
4016                   Specifies which hosts are allowed to make recursive
4017                   queries through this server. If
4018                   <span><strong class="command">allow-recursion</strong></span> is not set
4019                   then <span><strong class="command">allow-query-cache</strong></span> is
4020                   used if set, otherwise <span><strong class="command">allow-query</strong></span>
4021                   is used if set, otherwise the default
4022                   (<span><strong class="command">localnets;</strong></span>
4023                   <span><strong class="command">localhost;</strong></span>) is used.
4024                 </p></dd>
4025 <dt><span class="term"><span><strong class="command">allow-recursion-on</strong></span></span></dt>
4026 <dd><p>
4027                   Specifies which local addresses can accept recursive
4028                   queries.  If not specified, the default is to allow
4029                   recursive queries on all addresses.
4030                 </p></dd>
4031 <dt><span class="term"><span><strong class="command">allow-update</strong></span></span></dt>
4032 <dd><p>
4033                   Specifies which hosts are allowed to
4034                   submit Dynamic DNS updates for master zones. The default is
4035                   to deny
4036                   updates from all hosts.  Note that allowing updates based
4037                   on the requestor's IP address is insecure; see
4038                   <a href="Bv9ARM.ch07.html#dynamic_update_security" title="Dynamic Update Security">the section called &#8220;Dynamic Update Security&#8221;</a> for details.
4039                 </p></dd>
4040 <dt><span class="term"><span><strong class="command">allow-update-forwarding</strong></span></span></dt>
4041 <dd>
4042 <p>
4043                   Specifies which hosts are allowed to
4044                   submit Dynamic DNS updates to slave zones to be forwarded to
4045                   the
4046                   master.  The default is <strong class="userinput"><code>{ none; }</code></strong>,
4047                   which
4048                   means that no update forwarding will be performed.  To
4049                   enable
4050                   update forwarding, specify
4051                   <strong class="userinput"><code>allow-update-forwarding { any; };</code></strong>.
4052                   Specifying values other than <strong class="userinput"><code>{ none; }</code></strong> or
4053                   <strong class="userinput"><code>{ any; }</code></strong> is usually
4054                   counterproductive, since
4055                   the responsibility for update access control should rest
4056                   with the
4057                   master server, not the slaves.
4058                 </p>
4059 <p>
4060                   Note that enabling the update forwarding feature on a slave
4061                   server
4062                   may expose master servers relying on insecure IP address
4063                   based
4064                   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>
4065                   for more details.
4066                 </p>
4067 </dd>
4068 <dt><span class="term"><span><strong class="command">allow-v6-synthesis</strong></span></span></dt>
4069 <dd><p>
4070                   This option was introduced for the smooth transition from
4071                   AAAA
4072                   to A6 and from "nibble labels" to binary labels.
4073                   However, since both A6 and binary labels were then
4074                   deprecated,
4075                   this option was also deprecated.
4076                   It is now ignored with some warning messages.
4077                 </p></dd>
4078 <dt><span class="term"><span><strong class="command">allow-transfer</strong></span></span></dt>
4079 <dd><p>
4080                   Specifies which hosts are allowed to
4081                   receive zone transfers from the server. <span><strong class="command">allow-transfer</strong></span> may
4082                   also be specified in the <span><strong class="command">zone</strong></span>
4083                   statement, in which
4084                   case it overrides the <span><strong class="command">options allow-transfer</strong></span> statement.
4085                   If not specified, the default is to allow transfers to all
4086                   hosts.
4087                 </p></dd>
4088 <dt><span class="term"><span><strong class="command">blackhole</strong></span></span></dt>
4089 <dd><p>
4090                   Specifies a list of addresses that the
4091                   server will not accept queries from or use to resolve a
4092                   query. Queries
4093                   from these addresses will not be responded to. The default
4094                   is <strong class="userinput"><code>none</code></strong>.
4095                 </p></dd>
4096 <dt><span class="term"><span><strong class="command">filter-aaaa</strong></span></span></dt>
4097 <dd><p>
4098                   Specifies a list of addresses to which
4099                   <span><strong class="command">filter-aaaa-on-v4</strong></span>
4100                   is applies.  The default is <strong class="userinput"><code>any</code></strong>.
4101                 </p></dd>
4102 <dt><span class="term"><span><strong class="command">resolver-query-timeout</strong></span></span></dt>
4103 <dd><p>
4104                   The amount of time the resolver will spend attempting
4105                   to resolve a recursive query before failing.  The default
4106                   and minimum is <code class="literal">10</code> and the maximum is
4107                   <code class="literal">30</code>.  Setting it to <code class="literal">0</code>
4108                   will result in the default being used.
4109                 </p></dd>
4110 </dl></div>
4111 </div>
4112 <div class="sect3" lang="en">
4113 <div class="titlepage"><div><div><h4 class="title">
4114 <a name="id2584126"></a>Interfaces</h4></div></div></div>
4115 <p>
4116             The interfaces and ports that the server will answer queries
4117             from may be specified using the <span><strong class="command">listen-on</strong></span> option. <span><strong class="command">listen-on</strong></span> takes
4118             an optional port and an <code class="varname">address_match_list</code>.
4119             The server will listen on all interfaces allowed by the address
4120             match list. If a port is not specified, port 53 will be used.
4121           </p>
4122 <p>
4123             Multiple <span><strong class="command">listen-on</strong></span> statements are
4124             allowed.
4125             For example,
4126           </p>
4127 <pre class="programlisting">listen-on { 5.6.7.8; };
4128 listen-on port 1234 { !1.2.3.4; 1.2/16; };
4129 </pre>
4130 <p>
4131             will enable the name server on port 53 for the IP address
4132             5.6.7.8, and on port 1234 of an address on the machine in net
4133             1.2 that is not 1.2.3.4.
4134           </p>
4135 <p>
4136             If no <span><strong class="command">listen-on</strong></span> is specified, the
4137             server will listen on port 53 on all IPv4 interfaces.
4138           </p>
4139 <p>
4140             The <span><strong class="command">listen-on-v6</strong></span> option is used to
4141             specify the interfaces and the ports on which the server will
4142             listen
4143             for incoming queries sent using IPv6.
4144           </p>
4145 <p>
4146             When </p>
4147 <pre class="programlisting">{ any; }</pre>
4148 <p> is
4149             specified
4150             as the <code class="varname">address_match_list</code> for the
4151             <span><strong class="command">listen-on-v6</strong></span> option,
4152             the server does not bind a separate socket to each IPv6 interface
4153             address as it does for IPv4 if the operating system has enough API
4154             support for IPv6 (specifically if it conforms to RFC 3493 and RFC
4155             3542).
4156             Instead, it listens on the IPv6 wildcard address.
4157             If the system only has incomplete API support for IPv6, however,
4158             the behavior is the same as that for IPv4.
4159           </p>
4160 <p>
4161             A list of particular IPv6 addresses can also be specified, in
4162             which case
4163             the server listens on a separate socket for each specified
4164             address,
4165             regardless of whether the desired API is supported by the system.
4166           </p>
4167 <p>
4168             Multiple <span><strong class="command">listen-on-v6</strong></span> options can
4169             be used.
4170             For example,
4171           </p>
4172 <pre class="programlisting">listen-on-v6 { any; };
4173 listen-on-v6 port 1234 { !2001:db8::/32; any; };
4174 </pre>
4175 <p>
4176             will enable the name server on port 53 for any IPv6 addresses
4177             (with a single wildcard socket),
4178             and on port 1234 of IPv6 addresses that is not in the prefix
4179             2001:db8::/32 (with separate sockets for each matched address.)
4180           </p>
4181 <p>
4182             To make the server not listen on any IPv6 address, use
4183           </p>
4184 <pre class="programlisting">listen-on-v6 { none; };
4185 </pre>
4186 <p>
4187             If no <span><strong class="command">listen-on-v6</strong></span> option is
4188             specified, the server will not listen on any IPv6 address
4189             unless <span><strong class="command">-6</strong></span> is specified when <span><strong class="command">named</strong></span> is
4190             invoked.  If <span><strong class="command">-6</strong></span> is specified then
4191             <span><strong class="command">named</strong></span> will listen on port 53 on all IPv6 interfaces by default.
4192           </p>
4193 </div>
4194 <div class="sect3" lang="en">
4195 <div class="titlepage"><div><div><h4 class="title">
4196 <a name="query_address"></a>Query Address</h4></div></div></div>
4197 <p>
4198             If the server doesn't know the answer to a question, it will
4199             query other name servers. <span><strong class="command">query-source</strong></span> specifies
4200             the address and port used for such queries. For queries sent over
4201             IPv6, there is a separate <span><strong class="command">query-source-v6</strong></span> option.
4202             If <span><strong class="command">address</strong></span> is <span><strong class="command">*</strong></span> (asterisk) or is omitted,
4203             a wildcard IP address (<span><strong class="command">INADDR_ANY</strong></span>)
4204             will be used.
4205           </p>
4206 <p>
4207             If <span><strong class="command">port</strong></span> is <span><strong class="command">*</strong></span> or is omitted,
4208             a random port number from a pre-configured
4209             range is picked up and will be used for each query.
4210             The port range(s) is that specified in
4211             the <span><strong class="command">use-v4-udp-ports</strong></span> (for IPv4)
4212             and <span><strong class="command">use-v6-udp-ports</strong></span> (for IPv6)
4213             options, excluding the ranges specified in
4214             the <span><strong class="command">avoid-v4-udp-ports</strong></span>
4215             and <span><strong class="command">avoid-v6-udp-ports</strong></span> options, respectively.
4216           </p>
4217 <p>
4218             The defaults of the <span><strong class="command">query-source</strong></span> and
4219             <span><strong class="command">query-source-v6</strong></span> options
4220             are:
4221           </p>
4222 <pre class="programlisting">query-source address * port *;
4223 query-source-v6 address * port *;
4224 </pre>
4225 <p>
4226             If <span><strong class="command">use-v4-udp-ports</strong></span> or
4227             <span><strong class="command">use-v6-udp-ports</strong></span> is unspecified,
4228             <span><strong class="command">named</strong></span> will check if the operating
4229             system provides a programming interface to retrieve the
4230             system's default range for ephemeral ports.
4231             If such an interface is available,
4232             <span><strong class="command">named</strong></span> will use the corresponding system
4233             default range; otherwise, it will use its own defaults:
4234          </p>
4235 <pre class="programlisting">use-v4-udp-ports { range 1024 65535; };
4236 use-v6-udp-ports { range 1024 65535; };
4237 </pre>
4238 <p>
4239             Note: make sure the ranges be sufficiently large for
4240             security.  A desirable size depends on various parameters,
4241             but we generally recommend it contain at least 16384 ports
4242             (14 bits of entropy).
4243             Note also that the system's default range when used may be
4244             too small for this purpose, and that the range may even be
4245             changed while <span><strong class="command">named</strong></span> is running; the new
4246             range will automatically be applied when <span><strong class="command">named</strong></span>
4247             is reloaded.
4248             It is encouraged to
4249             configure <span><strong class="command">use-v4-udp-ports</strong></span> and
4250             <span><strong class="command">use-v6-udp-ports</strong></span> explicitly so that the
4251             ranges are sufficiently large and are reasonably
4252             independent from the ranges used by other applications.
4253           </p>
4254 <p>
4255             Note: the operational configuration
4256             where <span><strong class="command">named</strong></span> runs may prohibit the use
4257             of some ports.  For example, UNIX systems will not allow
4258             <span><strong class="command">named</strong></span> running without a root privilege
4259             to use ports less than 1024.
4260             If such ports are included in the specified (or detected)
4261             set of query ports, the corresponding query attempts will
4262             fail, resulting in resolution failures or delay.
4263             It is therefore important to configure the set of ports
4264             that can be safely used in the expected operational environment.
4265           </p>
4266 <p>
4267             The defaults of the <span><strong class="command">avoid-v4-udp-ports</strong></span> and
4268             <span><strong class="command">avoid-v6-udp-ports</strong></span> options
4269             are:
4270           </p>
4271 <pre class="programlisting">avoid-v4-udp-ports {};
4272 avoid-v6-udp-ports {};
4273 </pre>
4274 <p>
4275             Note: BIND 9.5.0 introduced
4276             the <span><strong class="command">use-queryport-pool</strong></span> 
4277             option to support a pool of such random ports, but this
4278             option is now obsolete because reusing the same ports in
4279             the pool may not be sufficiently secure.
4280             For the same reason, it is generally strongly discouraged to
4281             specify a particular port for the
4282             <span><strong class="command">query-source</strong></span> or
4283             <span><strong class="command">query-source-v6</strong></span> options;
4284             it implicitly disables the use of randomized port numbers.
4285           </p>
4286 <div class="variablelist"><dl>
4287 <dt><span class="term"><span><strong class="command">use-queryport-pool</strong></span></span></dt>
4288 <dd><p>
4289                   This option is obsolete.
4290                 </p></dd>
4291 <dt><span class="term"><span><strong class="command">queryport-pool-ports</strong></span></span></dt>
4292 <dd><p>
4293                   This option is obsolete.
4294                 </p></dd>
4295 <dt><span class="term"><span><strong class="command">queryport-pool-updateinterval</strong></span></span></dt>
4296 <dd><p>
4297                   This option is obsolete.
4298                 </p></dd>
4299 </dl></div>
4300 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4301 <h3 class="title">Note</h3>
4302 <p>
4303               The address specified in the <span><strong class="command">query-source</strong></span> option
4304               is used for both UDP and TCP queries, but the port applies only
4305               to UDP queries.  TCP queries always use a random
4306               unprivileged port.
4307             </p>
4308 </div>
4309 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4310 <h3 class="title">Note</h3>
4311 <p>
4312               Solaris 2.5.1 and earlier does not support setting the source
4313               address for TCP sockets.
4314             </p>
4315 </div>
4316 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4317 <h3 class="title">Note</h3>
4318 <p>
4319               See also <span><strong class="command">transfer-source</strong></span> and
4320               <span><strong class="command">notify-source</strong></span>.
4321             </p>
4322 </div>
4323 </div>
4324 <div class="sect3" lang="en">
4325 <div class="titlepage"><div><div><h4 class="title">
4326 <a name="zone_transfers"></a>Zone Transfers</h4></div></div></div>
4327 <p>
4328             <acronym class="acronym">BIND</acronym> has mechanisms in place to
4329             facilitate zone transfers
4330             and set limits on the amount of load that transfers place on the
4331             system. The following options apply to zone transfers.
4332           </p>
4333 <div class="variablelist"><dl>
4334 <dt><span class="term"><span><strong class="command">also-notify</strong></span></span></dt>
4335 <dd>
4336 <p>
4337                   Defines a global list of IP addresses of name servers
4338                   that are also sent NOTIFY messages whenever a fresh copy of
4339                   the
4340                   zone is loaded, in addition to the servers listed in the
4341                   zone's NS records.
4342                   This helps to ensure that copies of the zones will
4343                   quickly converge on stealth servers.
4344                   Optionally, a port may be specified with each
4345                   <span><strong class="command">also-notify</strong></span> address to send
4346                   the notify messages to a port other than the
4347                   default of 53.
4348                   An optional TSIG key can also be specified with each
4349                   address to cause the notify messages to be signed; this
4350                   can be useful when sending notifies to multiple views.
4351                   In place of explicit addresses, one or more named
4352                   <span><strong class="command">masters</strong></span> lists can be used.
4353                 </p>
4354 <p>
4355                   If an <span><strong class="command">also-notify</strong></span> list
4356                   is given in a <span><strong class="command">zone</strong></span> statement,
4357                   it will override
4358                   the <span><strong class="command">options also-notify</strong></span>
4359                   statement. When a <span><strong class="command">zone notify</strong></span>
4360                   statement
4361                   is set to <span><strong class="command">no</strong></span>, the IP
4362                   addresses in the global <span><strong class="command">also-notify</strong></span> list will
4363                   not be sent NOTIFY messages for that zone. The default is
4364                   the empty
4365                   list (no global notification list).
4366                 </p>
4367 </dd>
4368 <dt><span class="term"><span><strong class="command">max-transfer-time-in</strong></span></span></dt>
4369 <dd><p>
4370                   Inbound zone transfers running longer than
4371                   this many minutes will be terminated. The default is 120
4372                   minutes
4373                   (2 hours).  The maximum value is 28 days (40320 minutes).
4374                 </p></dd>
4375 <dt><span class="term"><span><strong class="command">max-transfer-idle-in</strong></span></span></dt>
4376 <dd><p>
4377                   Inbound zone transfers making no progress
4378                   in this many minutes will be terminated. The default is 60
4379                   minutes
4380                   (1 hour).  The maximum value is 28 days (40320 minutes).
4381                 </p></dd>
4382 <dt><span class="term"><span><strong class="command">max-transfer-time-out</strong></span></span></dt>
4383 <dd><p>
4384                   Outbound zone transfers running longer than
4385                   this many minutes will be terminated. The default is 120
4386                   minutes
4387                   (2 hours).  The maximum value is 28 days (40320 minutes).
4388                 </p></dd>
4389 <dt><span class="term"><span><strong class="command">max-transfer-idle-out</strong></span></span></dt>
4390 <dd><p>
4391                   Outbound zone transfers making no progress
4392                   in this many minutes will be terminated.  The default is 60
4393                   minutes (1
4394                   hour).  The maximum value is 28 days (40320 minutes).
4395                 </p></dd>
4396 <dt><span class="term"><span><strong class="command">serial-query-rate</strong></span></span></dt>
4397 <dd>
4398 <p>
4399                   Slave servers will periodically query master
4400                   servers to find out if zone serial numbers have
4401                   changed. Each such query uses a minute amount of
4402                   the slave server's network bandwidth.  To limit
4403                   the amount of bandwidth used, BIND 9 limits the
4404                   rate at which queries are sent.  The value of the
4405                   <span><strong class="command">serial-query-rate</strong></span> option, an
4406                   integer, is the maximum number of queries sent
4407                   per second.  The default is 20.
4408                 </p>
4409 <p>
4410                   In addition to controlling the rate SOA refresh
4411                   queries are issued at
4412                   <span><strong class="command">serial-query-rate</strong></span> also controls
4413                   the rate at which NOTIFY messages are sent from
4414                   both master and slave zones.
4415                 </p>
4416 </dd>
4417 <dt><span class="term"><span><strong class="command">serial-queries</strong></span></span></dt>
4418 <dd><p>
4419                   In BIND 8, the <span><strong class="command">serial-queries</strong></span>
4420                   option
4421                   set the maximum number of concurrent serial number queries
4422                   allowed to be outstanding at any given time.
4423                   BIND 9 does not limit the number of outstanding
4424                   serial queries and ignores the <span><strong class="command">serial-queries</strong></span> option.
4425                   Instead, it limits the rate at which the queries are sent
4426                   as defined using the <span><strong class="command">serial-query-rate</strong></span> option.
4427                 </p></dd>
4428 <dt><span class="term"><span><strong class="command">transfer-format</strong></span></span></dt>
4429 <dd><p>
4430                   Zone transfers can be sent using two different formats,
4431                   <span><strong class="command">one-answer</strong></span> and
4432                   <span><strong class="command">many-answers</strong></span>.
4433                   The <span><strong class="command">transfer-format</strong></span> option is used
4434                   on the master server to determine which format it sends.
4435                   <span><strong class="command">one-answer</strong></span> uses one DNS message per
4436                   resource record transferred.
4437                   <span><strong class="command">many-answers</strong></span> packs as many resource
4438                   records as possible into a message.
4439                   <span><strong class="command">many-answers</strong></span> is more efficient, but is
4440                   only supported by relatively new slave servers,
4441                   such as <acronym class="acronym">BIND</acronym> 9, <acronym class="acronym">BIND</acronym>
4442                   8.x and <acronym class="acronym">BIND</acronym> 4.9.5 onwards.
4443                   The <span><strong class="command">many-answers</strong></span> format is also supported by
4444                   recent Microsoft Windows nameservers.
4445                   The default is <span><strong class="command">many-answers</strong></span>.
4446                   <span><strong class="command">transfer-format</strong></span> may be overridden on a
4447                   per-server basis by using the <span><strong class="command">server</strong></span>
4448                   statement.
4449                 </p></dd>
4450 <dt><span class="term"><span><strong class="command">transfers-in</strong></span></span></dt>
4451 <dd><p>
4452                   The maximum number of inbound zone transfers
4453                   that can be running concurrently. The default value is <code class="literal">10</code>.
4454                   Increasing <span><strong class="command">transfers-in</strong></span> may
4455                   speed up the convergence
4456                   of slave zones, but it also may increase the load on the
4457                   local system.
4458                 </p></dd>
4459 <dt><span class="term"><span><strong class="command">transfers-out</strong></span></span></dt>
4460 <dd><p>
4461                   The maximum number of outbound zone transfers
4462                   that can be running concurrently. Zone transfer requests in
4463                   excess
4464                   of the limit will be refused. The default value is <code class="literal">10</code>.
4465                 </p></dd>
4466 <dt><span class="term"><span><strong class="command">transfers-per-ns</strong></span></span></dt>
4467 <dd><p>
4468                   The maximum number of inbound zone transfers
4469                   that can be concurrently transferring from a given remote
4470                   name server.
4471                   The default value is <code class="literal">2</code>.
4472                   Increasing <span><strong class="command">transfers-per-ns</strong></span>
4473                   may
4474                   speed up the convergence of slave zones, but it also may
4475                   increase
4476                   the load on the remote name server. <span><strong class="command">transfers-per-ns</strong></span> may
4477                   be overridden on a per-server basis by using the <span><strong class="command">transfers</strong></span> phrase
4478                   of the <span><strong class="command">server</strong></span> statement.
4479                 </p></dd>
4480 <dt><span class="term"><span><strong class="command">transfer-source</strong></span></span></dt>
4481 <dd>
4482 <p><span><strong class="command">transfer-source</strong></span>
4483                   determines which local address will be bound to IPv4
4484                   TCP connections used to fetch zones transferred
4485                   inbound by the server.  It also determines the
4486                   source IPv4 address, and optionally the UDP port,
4487                   used for the refresh queries and forwarded dynamic
4488                   updates.  If not set, it defaults to a system
4489                   controlled value which will usually be the address
4490                   of the interface "closest to" the remote end. This
4491                   address must appear in the remote end's
4492                   <span><strong class="command">allow-transfer</strong></span> option for the
4493                   zone being transferred, if one is specified. This
4494                   statement sets the
4495                   <span><strong class="command">transfer-source</strong></span> for all zones,
4496                   but can be overridden on a per-view or per-zone
4497                   basis by including a
4498                   <span><strong class="command">transfer-source</strong></span> statement within
4499                   the <span><strong class="command">view</strong></span> or
4500                   <span><strong class="command">zone</strong></span> block in the configuration
4501                   file.
4502                 </p>
4503 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4504 <h3 class="title">Note</h3>
4505 <p>
4506                     Solaris 2.5.1 and earlier does not support setting the
4507                     source address for TCP sockets.
4508                   </p>
4509 </div>
4510 </dd>
4511 <dt><span class="term"><span><strong class="command">transfer-source-v6</strong></span></span></dt>
4512 <dd><p>
4513                   The same as <span><strong class="command">transfer-source</strong></span>,
4514                   except zone transfers are performed using IPv6.
4515                 </p></dd>
4516 <dt><span class="term"><span><strong class="command">alt-transfer-source</strong></span></span></dt>
4517 <dd>
4518 <p>
4519                   An alternate transfer source if the one listed in
4520                   <span><strong class="command">transfer-source</strong></span> fails and
4521                   <span><strong class="command">use-alt-transfer-source</strong></span> is
4522                   set.
4523                 </p>
4524 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4525 <h3 class="title">Note</h3>
4526                   If you do not wish the alternate transfer source
4527                   to be used, you should set
4528                   <span><strong class="command">use-alt-transfer-source</strong></span>
4529                   appropriately and you should not depend upon
4530                   getting an answer back to the first refresh
4531                   query.
4532                 </div>
4533 </dd>
4534 <dt><span class="term"><span><strong class="command">alt-transfer-source-v6</strong></span></span></dt>
4535 <dd><p>
4536                   An alternate transfer source if the one listed in
4537                   <span><strong class="command">transfer-source-v6</strong></span> fails and
4538                   <span><strong class="command">use-alt-transfer-source</strong></span> is
4539                   set.
4540                 </p></dd>
4541 <dt><span class="term"><span><strong class="command">use-alt-transfer-source</strong></span></span></dt>
4542 <dd><p>
4543                   Use the alternate transfer sources or not.  If views are
4544                   specified this defaults to <span><strong class="command">no</strong></span>
4545                   otherwise it defaults to
4546                   <span><strong class="command">yes</strong></span> (for BIND 8
4547                   compatibility).
4548                 </p></dd>
4549 <dt><span class="term"><span><strong class="command">notify-source</strong></span></span></dt>
4550 <dd>
4551 <p><span><strong class="command">notify-source</strong></span>
4552                   determines which local source address, and
4553                   optionally UDP port, will be used to send NOTIFY
4554                   messages.  This address must appear in the slave
4555                   server's <span><strong class="command">masters</strong></span> zone clause or
4556                   in an <span><strong class="command">allow-notify</strong></span> clause.  This
4557                   statement sets the <span><strong class="command">notify-source</strong></span>
4558                   for all zones, but can be overridden on a per-zone or
4559                   per-view basis by including a
4560                   <span><strong class="command">notify-source</strong></span> statement within
4561                   the <span><strong class="command">zone</strong></span> or
4562                   <span><strong class="command">view</strong></span> block in the configuration
4563                   file.
4564                 </p>
4565 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4566 <h3 class="title">Note</h3>
4567 <p>
4568                     Solaris 2.5.1 and earlier does not support setting the
4569                     source address for TCP sockets.
4570                   </p>
4571 </div>
4572 </dd>
4573 <dt><span class="term"><span><strong class="command">notify-source-v6</strong></span></span></dt>
4574 <dd><p>
4575                   Like <span><strong class="command">notify-source</strong></span>,
4576                   but applies to notify messages sent to IPv6 addresses.
4577                 </p></dd>
4578 </dl></div>
4579 </div>
4580 <div class="sect3" lang="en">
4581 <div class="titlepage"><div><div><h4 class="title">
4582 <a name="id2585207"></a>UDP Port Lists</h4></div></div></div>
4583 <p>
4584             <span><strong class="command">use-v4-udp-ports</strong></span>,
4585             <span><strong class="command">avoid-v4-udp-ports</strong></span>,
4586             <span><strong class="command">use-v6-udp-ports</strong></span>, and
4587             <span><strong class="command">avoid-v6-udp-ports</strong></span>
4588             specify a list of IPv4 and IPv6 UDP ports that will be
4589             used or not used as source ports for UDP messages.
4590             See <a href="Bv9ARM.ch06.html#query_address" title="Query Address">the section called &#8220;Query Address&#8221;</a> about how the
4591             available ports are determined.
4592             For example, with the following configuration
4593           </p>
4594 <pre class="programlisting">
4595 use-v6-udp-ports { range 32768 65535; };
4596 avoid-v6-udp-ports { 40000; range 50000 60000; };
4597 </pre>
4598 <p>
4599              UDP ports of IPv6 messages sent
4600              from <span><strong class="command">named</strong></span> will be in one
4601              of the following ranges: 32768 to 39999, 40001 to 49999,
4602              and 60001 to 65535.
4603            </p>
4604 <p>
4605              <span><strong class="command">avoid-v4-udp-ports</strong></span> and
4606              <span><strong class="command">avoid-v6-udp-ports</strong></span> can be used
4607              to prevent <span><strong class="command">named</strong></span> from choosing as its random source port a
4608              port that is blocked by your firewall or a port that is
4609              used by other applications;
4610              if a query went out with a source port blocked by a
4611              firewall, the
4612              answer would not get by the firewall and the name server would
4613              have to query again.
4614              Note: the desired range can also be represented only with
4615              <span><strong class="command">use-v4-udp-ports</strong></span> and
4616              <span><strong class="command">use-v6-udp-ports</strong></span>, and the
4617              <span><strong class="command">avoid-</strong></span> options are redundant in that
4618              sense; they are provided for backward compatibility and
4619              to possibly simplify the port specification.
4620            </p>
4621 </div>
4622 <div class="sect3" lang="en">
4623 <div class="titlepage"><div><div><h4 class="title">
4624 <a name="id2585403"></a>Operating System Resource Limits</h4></div></div></div>
4625 <p>
4626             The server's usage of many system resources can be limited.
4627             Scaled values are allowed when specifying resource limits.  For
4628             example, <span><strong class="command">1G</strong></span> can be used instead of
4629             <span><strong class="command">1073741824</strong></span> to specify a limit of
4630             one
4631             gigabyte. <span><strong class="command">unlimited</strong></span> requests
4632             unlimited use, or the
4633             maximum available amount. <span><strong class="command">default</strong></span>
4634             uses the limit
4635             that was in force when the server was started. See the description
4636             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>.
4637           </p>
4638 <p>
4639             The following options set operating system resource limits for
4640             the name server process.  Some operating systems don't support
4641             some or
4642             any of the limits. On such systems, a warning will be issued if
4643             the
4644             unsupported limit is used.
4645           </p>
4646 <div class="variablelist"><dl>
4647 <dt><span class="term"><span><strong class="command">coresize</strong></span></span></dt>
4648 <dd><p>
4649                   The maximum size of a core dump. The default
4650                   is <code class="literal">default</code>.
4651                 </p></dd>
4652 <dt><span class="term"><span><strong class="command">datasize</strong></span></span></dt>
4653 <dd><p>
4654                   The maximum amount of data memory the server
4655                   may use. The default is <code class="literal">default</code>.
4656                   This is a hard limit on server memory usage.
4657                   If the server attempts to allocate memory in excess of this
4658                   limit, the allocation will fail, which may in turn leave
4659                   the server unable to perform DNS service.  Therefore,
4660                   this option is rarely useful as a way of limiting the
4661                   amount of memory used by the server, but it can be used
4662                   to raise an operating system data size limit that is
4663                   too small by default.  If you wish to limit the amount
4664                   of memory used by the server, use the
4665                   <span><strong class="command">max-cache-size</strong></span> and
4666                   <span><strong class="command">recursive-clients</strong></span>
4667                   options instead.
4668                 </p></dd>
4669 <dt><span class="term"><span><strong class="command">files</strong></span></span></dt>
4670 <dd><p>
4671                   The maximum number of files the server
4672                   may have open concurrently. The default is <code class="literal">unlimited</code>.
4673                 </p></dd>
4674 <dt><span class="term"><span><strong class="command">stacksize</strong></span></span></dt>
4675 <dd><p>
4676                   The maximum amount of stack memory the server
4677                   may use. The default is <code class="literal">default</code>.
4678                 </p></dd>
4679 </dl></div>
4680 </div>
4681 <div class="sect3" lang="en">
4682 <div class="titlepage"><div><div><h4 class="title">
4683 <a name="server_resource_limits"></a>Server  Resource Limits</h4></div></div></div>
4684 <p>
4685             The following options set limits on the server's
4686             resource consumption that are enforced internally by the
4687             server rather than the operating system.
4688           </p>
4689 <div class="variablelist"><dl>
4690 <dt><span class="term"><span><strong class="command">max-ixfr-log-size</strong></span></span></dt>
4691 <dd><p>
4692                   This option is obsolete; it is accepted
4693                   and ignored for BIND 8 compatibility.  The option
4694                   <span><strong class="command">max-journal-size</strong></span> performs a
4695                   similar function in BIND 9.
4696                 </p></dd>
4697 <dt><span class="term"><span><strong class="command">max-journal-size</strong></span></span></dt>
4698 <dd><p>
4699                   Sets a maximum size for each journal file
4700                   (see <a href="Bv9ARM.ch04.html#journal" title="The journal file">the section called &#8220;The journal file&#8221;</a>).  When the journal file
4701                   approaches
4702                   the specified size, some of the oldest transactions in the
4703                   journal
4704                   will be automatically removed.  The largest permitted
4705                   value is 2 gigabytes. The default is
4706                   <code class="literal">unlimited</code>, which also
4707                   means 2 gigabytes.
4708                   This may also be set on a per-zone basis.
4709                 </p></dd>
4710 <dt><span class="term"><span><strong class="command">host-statistics-max</strong></span></span></dt>
4711 <dd><p>
4712                   In BIND 8, specifies the maximum number of host statistics
4713                   entries to be kept.
4714                   Not implemented in BIND 9.
4715                 </p></dd>
4716 <dt><span class="term"><span><strong class="command">recursive-clients</strong></span></span></dt>
4717 <dd><p>
4718                   The maximum number of simultaneous recursive lookups
4719                   the server will perform on behalf of clients.  The default
4720                   is
4721                   <code class="literal">1000</code>.  Because each recursing
4722                   client uses a fair
4723                   bit of memory, on the order of 20 kilobytes, the value of
4724                   the
4725                   <span><strong class="command">recursive-clients</strong></span> option may
4726                   have to be decreased
4727                   on hosts with limited memory.
4728                 </p></dd>
4729 <dt><span class="term"><span><strong class="command">tcp-clients</strong></span></span></dt>
4730 <dd><p>
4731                   The maximum number of simultaneous client TCP
4732                   connections that the server will accept.
4733                   The default is <code class="literal">100</code>.
4734                 </p></dd>
4735 <dt><span class="term"><span><strong class="command">reserved-sockets</strong></span></span></dt>
4736 <dd>
4737 <p>
4738                   The number of file descriptors reserved for TCP, stdio,
4739                   etc.  This needs to be big enough to cover the number of
4740                   interfaces <span><strong class="command">named</strong></span> listens on, <span><strong class="command">tcp-clients</strong></span> as well as
4741                   to provide room for outgoing TCP queries and incoming zone
4742                   transfers.  The default is <code class="literal">512</code>.
4743                   The minimum value is <code class="literal">128</code> and the
4744                   maximum value is <code class="literal">128</code> less than
4745                   maxsockets (-S).  This option may be removed in the future.
4746                 </p>
4747 <p>
4748                   This option has little effect on Windows.
4749                 </p>
4750 </dd>
4751 <dt><span class="term"><span><strong class="command">max-cache-size</strong></span></span></dt>
4752 <dd><p>
4753                   The maximum amount of memory to use for the
4754                   server's cache, in bytes.
4755                   When the amount of data in the cache
4756                   reaches this limit, the server will cause records to expire
4757                   prematurely based on an LRU based strategy so that
4758                   the limit is not exceeded.
4759                   A value of 0 is special, meaning that
4760                   records are purged from the cache only when their
4761                   TTLs expire.
4762                   Another special keyword <strong class="userinput"><code>unlimited</code></strong>
4763                   means the maximum value of 32-bit unsigned integers
4764                   (0xffffffff), which may not have the same effect as
4765                   0 on machines that support more than 32 bits of
4766                   memory space.
4767                   Any positive values less than 2MB will be ignored reset
4768                   to 2MB.
4769                   In a server with multiple views, the limit applies
4770                   separately to the cache of each view.
4771                   The default is 0.
4772                 </p></dd>
4773 <dt><span class="term"><span><strong class="command">tcp-listen-queue</strong></span></span></dt>
4774 <dd><p>
4775                   The listen queue depth.  The default and minimum is 10.
4776                   If the kernel supports the accept filter "dataready" this
4777                   also controls how
4778                   many TCP connections that will be queued in kernel space
4779                   waiting for
4780                   some data before being passed to accept.  Nonzero values
4781                   less than 10 will be silently raised. A value of 0 may also
4782                   be used; on most platforms this sets the listen queue 
4783                   length to a system-defined default value.
4784                 </p></dd>
4785 </dl></div>
4786 </div>
4787 <div class="sect3" lang="en">
4788 <div class="titlepage"><div><div><h4 class="title">
4789 <a name="id2585826"></a>Periodic Task Intervals</h4></div></div></div>
4790 <div class="variablelist"><dl>
4791 <dt><span class="term"><span><strong class="command">cleaning-interval</strong></span></span></dt>
4792 <dd><p>
4793                   This interval is effectively obsolete.  Previously,
4794                   the server would remove expired resource records
4795                   from the cache every <span><strong class="command">cleaning-interval</strong></span> minutes.
4796                   <acronym class="acronym">BIND</acronym> 9 now manages cache
4797                   memory in a more sophisticated manner and does not
4798                   rely on the periodic cleaning any more.
4799                   Specifying this option therefore has no effect on
4800                   the server's behavior.
4801                 </p></dd>
4802 <dt><span class="term"><span><strong class="command">heartbeat-interval</strong></span></span></dt>
4803 <dd><p>
4804                   The server will perform zone maintenance tasks
4805                   for all zones marked as <span><strong class="command">dialup</strong></span> whenever this
4806                   interval expires. The default is 60 minutes. Reasonable
4807                   values are up
4808                   to 1 day (1440 minutes).  The maximum value is 28 days
4809                   (40320 minutes).
4810                   If set to 0, no zone maintenance for these zones will occur.
4811                 </p></dd>
4812 <dt><span class="term"><span><strong class="command">interface-interval</strong></span></span></dt>
4813 <dd><p>
4814                   The server will scan the network interface list
4815                   every <span><strong class="command">interface-interval</strong></span>
4816                   minutes. The default
4817                   is 60 minutes. The maximum value is 28 days (40320 minutes).
4818                   If set to 0, interface scanning will only occur when
4819                   the configuration file is  loaded. After the scan, the
4820                   server will
4821                   begin listening for queries on any newly discovered
4822                   interfaces (provided they are allowed by the
4823                   <span><strong class="command">listen-on</strong></span> configuration), and
4824                   will
4825                   stop listening on interfaces that have gone away.
4826                 </p></dd>
4827 <dt><span class="term"><span><strong class="command">statistics-interval</strong></span></span></dt>
4828 <dd>
4829 <p>
4830                   Name server statistics will be logged
4831                   every <span><strong class="command">statistics-interval</strong></span>
4832                   minutes. The default is
4833                   60. The maximum value is 28 days (40320 minutes).
4834                   If set to 0, no statistics will be logged.
4835                   </p>
4836 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4837 <h3 class="title">Note</h3>
4838 <p>
4839                     Not yet implemented in
4840                     <acronym class="acronym">BIND</acronym> 9.
4841                   </p>
4842 </div>
4843 </dd>
4844 </dl></div>
4845 </div>
4846 <div class="sect3" lang="en">
4847 <div class="titlepage"><div><div><h4 class="title">
4848 <a name="topology"></a>Topology</h4></div></div></div>
4849 <p>
4850             All other things being equal, when the server chooses a name
4851             server
4852             to query from a list of name servers, it prefers the one that is
4853             topologically closest to itself. The <span><strong class="command">topology</strong></span> statement
4854             takes an <span><strong class="command">address_match_list</strong></span> and
4855             interprets it
4856             in a special way. Each top-level list element is assigned a
4857             distance.
4858             Non-negated elements get a distance based on their position in the
4859             list, where the closer the match is to the start of the list, the
4860             shorter the distance is between it and the server. A negated match
4861             will be assigned the maximum distance from the server. If there
4862             is no match, the address will get a distance which is further than
4863             any non-negated list element, and closer than any negated element.
4864             For example,
4865           </p>
4866 <pre class="programlisting">topology {
4867     10/8;
4868     !1.2.3/24;
4869     { 1.2/16; 3/8; };
4870 };</pre>
4871 <p>
4872             will prefer servers on network 10 the most, followed by hosts
4873             on network 1.2.0.0 (netmask 255.255.0.0) and network 3, with the
4874             exception of hosts on network 1.2.3 (netmask 255.255.255.0), which
4875             is preferred least of all.
4876           </p>
4877 <p>
4878             The default topology is
4879           </p>
4880 <pre class="programlisting">    topology { localhost; localnets; };
4881 </pre>
4882 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4883 <h3 class="title">Note</h3>
4884 <p>
4885               The <span><strong class="command">topology</strong></span> option
4886               is not implemented in <acronym class="acronym">BIND</acronym> 9.
4887             </p>
4888 </div>
4889 </div>
4890 <div class="sect3" lang="en">
4891 <div class="titlepage"><div><div><h4 class="title">
4892 <a name="the_sortlist_statement"></a>The <span><strong class="command">sortlist</strong></span> Statement</h4></div></div></div>
4893 <p>
4894             The response to a DNS query may consist of multiple resource
4895             records (RRs) forming a resource records set (RRset).
4896             The name server will normally return the
4897             RRs within the RRset in an indeterminate order
4898             (but see the <span><strong class="command">rrset-order</strong></span>
4899             statement in <a href="Bv9ARM.ch06.html#rrset_ordering" title="RRset Ordering">the section called &#8220;RRset Ordering&#8221;</a>).
4900             The client resolver code should rearrange the RRs as appropriate,
4901             that is, using any addresses on the local net in preference to
4902             other addresses.
4903             However, not all resolvers can do this or are correctly
4904             configured.
4905             When a client is using a local server, the sorting can be performed
4906             in the server, based on the client's address. This only requires
4907             configuring the name servers, not all the clients.
4908           </p>
4909 <p>
4910             The <span><strong class="command">sortlist</strong></span> statement (see below)
4911             takes
4912             an <span><strong class="command">address_match_list</strong></span> and
4913             interprets it even
4914             more specifically than the <span><strong class="command">topology</strong></span>
4915             statement
4916             does (<a href="Bv9ARM.ch06.html#topology" title="Topology">the section called &#8220;Topology&#8221;</a>).
4917             Each top level statement in the <span><strong class="command">sortlist</strong></span> must
4918             itself be an explicit <span><strong class="command">address_match_list</strong></span> with
4919             one or two elements. The first element (which may be an IP
4920             address,
4921             an IP prefix, an ACL name or a nested <span><strong class="command">address_match_list</strong></span>)
4922             of each top level list is checked against the source address of
4923             the query until a match is found.
4924           </p>
4925 <p>
4926             Once the source address of the query has been matched, if
4927             the top level statement contains only one element, the actual
4928             primitive
4929             element that matched the source address is used to select the
4930             address
4931             in the response to move to the beginning of the response. If the
4932             statement is a list of two elements, then the second element is
4933             treated the same as the <span><strong class="command">address_match_list</strong></span> in
4934             a <span><strong class="command">topology</strong></span> statement. Each top
4935             level element
4936             is assigned a distance and the address in the response with the
4937             minimum
4938             distance is moved to the beginning of the response.
4939           </p>
4940 <p>
4941             In the following example, any queries received from any of
4942             the addresses of the host itself will get responses preferring
4943             addresses
4944             on any of the locally connected networks. Next most preferred are
4945             addresses
4946             on the 192.168.1/24 network, and after that either the
4947             192.168.2/24
4948             or
4949             192.168.3/24 network with no preference shown between these two
4950             networks. Queries received from a host on the 192.168.1/24 network
4951             will prefer other addresses on that network to the 192.168.2/24
4952             and
4953             192.168.3/24 networks. Queries received from a host on the
4954             192.168.4/24
4955             or the 192.168.5/24 network will only prefer other addresses on
4956             their directly connected networks.
4957           </p>
4958 <pre class="programlisting">sortlist {
4959     // IF the local host
4960     // THEN first fit on the following nets
4961     { localhost;
4962         { localnets;
4963             192.168.1/24;
4964             { 192.168.2/24; 192.168.3/24; }; }; };
4965     // IF on class C 192.168.1 THEN use .1, or .2 or .3
4966     { 192.168.1/24;
4967         { 192.168.1/24;
4968             { 192.168.2/24; 192.168.3/24; }; }; };
4969     // IF on class C 192.168.2 THEN use .2, or .1 or .3
4970     { 192.168.2/24;
4971         { 192.168.2/24;
4972             { 192.168.1/24; 192.168.3/24; }; }; };
4973     // IF on class C 192.168.3 THEN use .3, or .1 or .2
4974     { 192.168.3/24;
4975         { 192.168.3/24;
4976             { 192.168.1/24; 192.168.2/24; }; }; };
4977     // IF .4 or .5 THEN prefer that net
4978     { { 192.168.4/24; 192.168.5/24; };
4979     };
4980 };</pre>
4981 <p>
4982             The following example will give reasonable behavior for the
4983             local host and hosts on directly connected networks. It is similar
4984             to the behavior of the address sort in <acronym class="acronym">BIND</acronym> 4.9.x. Responses sent
4985             to queries from the local host will favor any of the directly
4986             connected
4987             networks. Responses sent to queries from any other hosts on a
4988             directly
4989             connected network will prefer addresses on that same network.
4990             Responses
4991             to other queries will not be sorted.
4992           </p>
4993 <pre class="programlisting">sortlist {
4994            { localhost; localnets; };
4995            { localnets; };
4996 };
4997 </pre>
4998 </div>
4999 <div class="sect3" lang="en">
5000 <div class="titlepage"><div><div><h4 class="title">
5001 <a name="rrset_ordering"></a>RRset Ordering</h4></div></div></div>
5002 <p>
5003             When multiple records are returned in an answer it may be
5004             useful to configure the order of the records placed into the
5005             response.
5006             The <span><strong class="command">rrset-order</strong></span> statement permits
5007             configuration
5008             of the ordering of the records in a multiple record response.
5009             See also the <span><strong class="command">sortlist</strong></span> statement,
5010             <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>.
5011           </p>
5012 <p>
5013             An <span><strong class="command">order_spec</strong></span> is defined as
5014             follows:
5015           </p>
5016 <p>
5017             [<span class="optional">class <em class="replaceable"><code>class_name</code></em></span>]
5018             [<span class="optional">type <em class="replaceable"><code>type_name</code></em></span>]
5019             [<span class="optional">name <em class="replaceable"><code>"domain_name"</code></em></span>]
5020             order <em class="replaceable"><code>ordering</code></em>
5021           </p>
5022 <p>
5023             If no class is specified, the default is <span><strong class="command">ANY</strong></span>.
5024             If no type is specified, the default is <span><strong class="command">ANY</strong></span>.
5025             If no name is specified, the default is "<span><strong class="command">*</strong></span>" (asterisk).
5026           </p>
5027 <p>
5028             The legal values for <span><strong class="command">ordering</strong></span> are:
5029           </p>
5030 <div class="informaltable"><table border="1">
5031 <colgroup>
5032 <col>
5033 <col>
5034 </colgroup>
5035 <tbody>
5036 <tr>
5037 <td>
5038                     <p><span><strong class="command">fixed</strong></span></p>
5039                   </td>
5040 <td>
5041                     <p>
5042                       Records are returned in the order they
5043                       are defined in the zone file.
5044                     </p>
5045                   </td>
5046 </tr>
5047 <tr>
5048 <td>
5049                     <p><span><strong class="command">random</strong></span></p>
5050                   </td>
5051 <td>
5052                     <p>
5053                       Records are returned in some random order.
5054                     </p>
5055                   </td>
5056 </tr>
5057 <tr>
5058 <td>
5059                     <p><span><strong class="command">cyclic</strong></span></p>
5060                   </td>
5061 <td>
5062                     <p>
5063                       Records are returned in a cyclic round-robin order.
5064                     </p>
5065                     <p>
5066                       If <acronym class="acronym">BIND</acronym> is configured with the
5067                       "--enable-fixed-rrset" option at compile time, then
5068                       the initial ordering of the RRset will match the
5069                       one specified in the zone file.
5070                     </p>
5071                   </td>
5072 </tr>
5073 </tbody>
5074 </table></div>
5075 <p>
5076             For example:
5077           </p>
5078 <pre class="programlisting">rrset-order {
5079    class IN type A name "host.example.com" order random;
5080    order cyclic;
5081 };
5082 </pre>
5083 <p>
5084             will cause any responses for type A records in class IN that
5085             have "<code class="literal">host.example.com</code>" as a
5086             suffix, to always be returned
5087             in random order. All other records are returned in cyclic order.
5088           </p>
5089 <p>
5090             If multiple <span><strong class="command">rrset-order</strong></span> statements
5091             appear, they are not combined &#8212; the last one applies.
5092           </p>
5093 <p>
5094             By default, all records are returned in random order.
5095           </p>
5096 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
5097 <h3 class="title">Note</h3>
5098 <p>
5099               In this release of <acronym class="acronym">BIND</acronym> 9, the
5100               <span><strong class="command">rrset-order</strong></span> statement does not support
5101               "fixed" ordering by default.  Fixed ordering can be enabled
5102               at compile time by specifying "--enable-fixed-rrset" on
5103               the "configure" command line.
5104             </p>
5105 </div>
5106 </div>
5107 <div class="sect3" lang="en">
5108 <div class="titlepage"><div><div><h4 class="title">
5109 <a name="tuning"></a>Tuning</h4></div></div></div>
5110 <div class="variablelist"><dl>
5111 <dt><span class="term"><span><strong class="command">lame-ttl</strong></span></span></dt>
5112 <dd>
5113 <p>
5114                   Sets the number of seconds to cache a
5115                   lame server indication. 0 disables caching. (This is
5116                   <span class="bold"><strong>NOT</strong></span> recommended.)
5117                   The default is <code class="literal">600</code> (10 minutes) and the
5118                   maximum value is
5119                   <code class="literal">1800</code> (30 minutes).
5120                 </p>
5121 <p>
5122                   Lame-ttl also controls the amount of time DNSSEC
5123                   validation failures are cached.  There is a minimum
5124                   of 30 seconds applied to bad cache entries if the
5125                   lame-ttl is set to less than 30 seconds.
5126                 </p>
5127 </dd>
5128 <dt><span class="term"><span><strong class="command">max-ncache-ttl</strong></span></span></dt>
5129 <dd><p>
5130                   To reduce network traffic and increase performance,
5131                   the server stores negative answers. <span><strong class="command">max-ncache-ttl</strong></span> is
5132                   used to set a maximum retention time for these answers in
5133                   the server
5134                   in seconds. The default
5135                   <span><strong class="command">max-ncache-ttl</strong></span> is <code class="literal">10800</code> seconds (3 hours).
5136                   <span><strong class="command">max-ncache-ttl</strong></span> cannot exceed
5137                   7 days and will
5138                   be silently truncated to 7 days if set to a greater value.
5139                 </p></dd>
5140 <dt><span class="term"><span><strong class="command">max-cache-ttl</strong></span></span></dt>
5141 <dd><p>
5142                   Sets the maximum time for which the server will
5143                   cache ordinary (positive) answers. The default is
5144                   one week (7 days).
5145                   A value of zero may cause all queries to return
5146                   SERVFAIL, because of lost caches of intermediate
5147                   RRsets (such as NS and glue AAAA/A records) in the
5148                   resolution process.
5149                 </p></dd>
5150 <dt><span class="term"><span><strong class="command">min-roots</strong></span></span></dt>
5151 <dd>
5152 <p>
5153                   The minimum number of root servers that
5154                   is required for a request for the root servers to be
5155                   accepted. The default
5156                   is <strong class="userinput"><code>2</code></strong>.
5157                 </p>
5158 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
5159 <h3 class="title">Note</h3>
5160 <p>
5161                     Not implemented in <acronym class="acronym">BIND</acronym> 9.
5162                   </p>
5163 </div>
5164 </dd>
5165 <dt><span class="term"><span><strong class="command">sig-validity-interval</strong></span></span></dt>
5166 <dd>
5167 <p>
5168                   Specifies the number of days into the future when
5169                   DNSSEC signatures automatically generated as a
5170                   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
5171                   is an optional second field which specifies how
5172                   long before expiry that the signatures will be
5173                   regenerated.  If not specified, the signatures will
5174                   be regenerated at 1/4 of base interval.  The second
5175                   field is specified in days if the base interval is
5176                   greater than 7 days otherwise it is specified in hours.
5177                   The default base interval is <code class="literal">30</code> days
5178                   giving a re-signing interval of 7 1/2 days.  The maximum
5179                   values are 10 years (3660 days).
5180                 </p>
5181 <p>
5182                   The signature inception time is unconditionally
5183                   set to one hour before the current time to allow
5184                   for a limited amount of clock skew.
5185                 </p>
5186 <p>
5187                   The <span><strong class="command">sig-validity-interval</strong></span>
5188                   should be, at least, several multiples of the SOA
5189                   expire interval to allow for reasonable interaction
5190                   between the various timer and expiry dates.
5191                 </p>
5192 </dd>
5193 <dt><span class="term"><span><strong class="command">sig-signing-nodes</strong></span></span></dt>
5194 <dd><p>
5195                   Specify the maximum number of nodes to be
5196                   examined in each quantum when signing a zone with
5197                   a new DNSKEY. The default is
5198                   <code class="literal">100</code>.
5199                 </p></dd>
5200 <dt><span class="term"><span><strong class="command">sig-signing-signatures</strong></span></span></dt>
5201 <dd><p>
5202                   Specify a threshold number of signatures that
5203                   will terminate processing a quantum when signing
5204                   a zone with a new DNSKEY.  The default is
5205                   <code class="literal">10</code>.
5206                 </p></dd>
5207 <dt><span class="term"><span><strong class="command">sig-signing-type</strong></span></span></dt>
5208 <dd>
5209 <p>
5210                   Specify a private RDATA type to be used when generating
5211                   key signing records.  The default is
5212                   <code class="literal">65534</code>.
5213                 </p>
5214 <p>
5215                   It is expected that this parameter may be removed
5216                   in a future version once there is a standard type.
5217                 </p>
5218 <p>
5219                   These records can be removed from the zone once named
5220                   has completed signing the zone with the matching key
5221                   using <span><strong class="command">nsupdate</strong></span> or
5222                   <span><strong class="command">rndc signing -clear</strong></span>.
5223                   <span><strong class="command">rndc signing -clear</strong></span> is the only supported
5224                   way to remove these records from
5225                   <span><strong class="command">inline-signing</strong></span> zones.
5226                 </p>
5227 </dd>
5228 <dt>
5229 <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>
5230 </dt>
5231 <dd>
5232 <p>
5233                   These options control the server's behavior on refreshing a
5234                   zone
5235                   (querying for SOA changes) or retrying failed transfers.
5236                   Usually the SOA values for the zone are used, but these
5237                   values
5238                   are set by the master, giving slave server administrators
5239                   little
5240                   control over their contents.
5241                 </p>
5242 <p>
5243                   These options allow the administrator to set a minimum and
5244                   maximum
5245                   refresh and retry time either per-zone, per-view, or
5246                   globally.
5247                   These options are valid for slave and stub zones,
5248                   and clamp the SOA refresh and retry times to the specified
5249                   values.
5250                 </p>
5251 <p>
5252                   The following defaults apply.
5253                   <span><strong class="command">min-refresh-time</strong></span> 300 seconds,
5254                   <span><strong class="command">max-refresh-time</strong></span> 2419200 seconds
5255                   (4 weeks), <span><strong class="command">min-retry-time</strong></span> 500 seconds,
5256                   and <span><strong class="command">max-retry-time</strong></span> 1209600 seconds
5257                   (2 weeks).
5258                 </p>
5259 </dd>
5260 <dt><span class="term"><span><strong class="command">edns-udp-size</strong></span></span></dt>
5261 <dd>
5262 <p>
5263                   Sets the advertised EDNS UDP buffer size in bytes
5264                   to control the size of packets received.
5265                   Valid values are 512 to 4096 (values outside this range
5266                   will be silently adjusted).  The default value
5267                   is 4096.  The usual reason for setting
5268                   <span><strong class="command">edns-udp-size</strong></span> to a non-default
5269                   value is to get UDP answers to pass through broken
5270                   firewalls that block fragmented packets and/or
5271                   block UDP packets that are greater than 512 bytes.
5272                 </p>
5273 <p>
5274                   <span><strong class="command">named</strong></span> will fallback to using 512 bytes
5275                   if it get a series of timeout at the initial value.  512
5276                   bytes is not being offered to encourage sites to fix their
5277                   firewalls.  Small EDNS UDP sizes will result in the
5278                   excessive use of TCP.
5279                 </p>
5280 </dd>
5281 <dt><span class="term"><span><strong class="command">max-udp-size</strong></span></span></dt>
5282 <dd>
5283 <p>
5284                   Sets the maximum EDNS UDP message size
5285                   <span><strong class="command">named</strong></span> will send in bytes.
5286                   Valid values are 512 to 4096 (values outside this
5287                   range will be silently adjusted).  The default
5288                   value is 4096.  The usual reason for setting
5289                   <span><strong class="command">max-udp-size</strong></span> to a non-default
5290                   value is to get UDP answers to pass through broken
5291                   firewalls that block fragmented packets and/or
5292                   block UDP packets that are greater than 512 bytes.
5293                   This is independent of the advertised receive
5294                   buffer (<span><strong class="command">edns-udp-size</strong></span>).
5295                 </p>
5296 <p>
5297                   Setting this to a low value will encourage additional
5298                   TCP traffic to the nameserver.
5299                 </p>
5300 </dd>
5301 <dt><span class="term"><span><strong class="command">masterfile-format</strong></span></span></dt>
5302 <dd>
5303 <p>Specifies
5304                   the file format of zone files (see
5305                   <a href="Bv9ARM.ch06.html#zonefile_format" title="Additional File Formats">the section called &#8220;Additional File Formats&#8221;</a>).
5306                   The default value is <code class="constant">text</code>, which is the
5307                   standard textual representation, except for slave zones,
5308                   in which the default value is <code class="constant">raw</code>.
5309                   Files in other formats than <code class="constant">text</code> are
5310                   typically expected to be generated by the
5311                   <span><strong class="command">named-compilezone</strong></span> tool, or dumped by
5312                   <span><strong class="command">named</strong></span>.
5313                 </p>
5314 <p>
5315                   Note that when a zone file in a different format than
5316                   <code class="constant">text</code> is loaded, <span><strong class="command">named</strong></span>
5317                   may omit some of the checks which would be performed for a
5318                   file in the <code class="constant">text</code> format.  In particular,
5319                   <span><strong class="command">check-names</strong></span> checks do not apply
5320                   for the <code class="constant">raw</code> format.  This means
5321                   a zone file in the <code class="constant">raw</code> format
5322                   must be generated with the same check level as that
5323                   specified in the <span><strong class="command">named</strong></span> configuration
5324                   file.  This statement sets the
5325                   <span><strong class="command">masterfile-format</strong></span> for all zones,
5326                   but can be overridden on a per-zone or per-view basis
5327                   by including a <span><strong class="command">masterfile-format</strong></span>
5328                   statement within the <span><strong class="command">zone</strong></span> or
5329                   <span><strong class="command">view</strong></span> block in the configuration
5330                   file.
5331                 </p>
5332 </dd>
5333 <dt>
5334 <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>
5335 </dt>
5336 <dd>
5337 <p>These set the
5338                   initial value (minimum) and maximum number of recursive
5339                   simultaneous clients for any given query
5340                   (&lt;qname,qtype,qclass&gt;) that the server will accept
5341                   before dropping additional clients.  <span><strong class="command">named</strong></span> will attempt to
5342                   self tune this value and changes will be logged.  The
5343                   default values are 10 and 100.
5344                 </p>
5345 <p>
5346                   This value should reflect how many queries come in for
5347                   a given name in the time it takes to resolve that name.
5348                   If the number of queries exceed this value, <span><strong class="command">named</strong></span> will
5349                   assume that it is dealing with a non-responsive zone
5350                   and will drop additional queries.  If it gets a response
5351                   after dropping queries, it will raise the estimate.  The
5352                   estimate will then be lowered in 20 minutes if it has
5353                   remained unchanged.
5354                 </p>
5355 <p>
5356                   If <span><strong class="command">clients-per-query</strong></span> is set to zero,
5357                   then there is no limit on the number of clients per query
5358                   and no queries will be dropped.
5359                 </p>
5360 <p>
5361                   If <span><strong class="command">max-clients-per-query</strong></span> is set to zero,
5362                   then there is no upper bound other than imposed by
5363                   <span><strong class="command">recursive-clients</strong></span>.
5364                 </p>
5365 </dd>
5366 <dt><span class="term"><span><strong class="command">notify-delay</strong></span></span></dt>
5367 <dd>
5368 <p>
5369                   The delay, in seconds, between sending sets of notify
5370                   messages for a zone.  The default is five (5) seconds.
5371                 </p>
5372 <p>
5373                   The overall rate that NOTIFY messages are sent for all
5374                   zones is controlled by <span><strong class="command">serial-query-rate</strong></span>.
5375                 </p>
5376 </dd>
5377 <dt><span class="term"><span><strong class="command">max-rsa-exponent-size</strong></span></span></dt>
5378 <dd><p>
5379                   The maximum RSA exponent size, in bits, that will
5380                   be accepted when validating.  Valid values are 35
5381                   to 4096 bits.  The default zero (0) is also accepted
5382                   and is equivalent to 4096.
5383                 </p></dd>
5384 </dl></div>
5385 </div>
5386 <div class="sect3" lang="en">
5387 <div class="titlepage"><div><div><h4 class="title">
5388 <a name="builtin"></a>Built-in server information zones</h4></div></div></div>
5389 <p>
5390             The server provides some helpful diagnostic information
5391             through a number of built-in zones under the
5392             pseudo-top-level-domain <code class="literal">bind</code> in the
5393             <span><strong class="command">CHAOS</strong></span> class.  These zones are part
5394             of a
5395             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
5396             class
5397             <span><strong class="command">CHAOS</strong></span> which is separate from the
5398             default view of class <span><strong class="command">IN</strong></span>. Most global
5399             configuration options (<span><strong class="command">allow-query</strong></span>,
5400             etc) will apply to this view, but some are locally
5401             overridden: <span><strong class="command">notify</strong></span>,
5402             <span><strong class="command">recursion</strong></span> and
5403             <span><strong class="command">allow-new-zones</strong></span> are
5404             always set to <strong class="userinput"><code>no</code></strong>.
5405           </p>
5406 <p>
5407             If you need to disable these zones, use the options
5408             below, or hide the built-in <span><strong class="command">CHAOS</strong></span>
5409             view by
5410             defining an explicit view of class <span><strong class="command">CHAOS</strong></span>
5411             that matches all clients.
5412           </p>
5413 <div class="variablelist"><dl>
5414 <dt><span class="term"><span><strong class="command">version</strong></span></span></dt>
5415 <dd><p>
5416                   The version the server should report
5417                   via a query of the name <code class="literal">version.bind</code>
5418                   with type <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
5419                   The default is the real version number of this server.
5420                   Specifying <span><strong class="command">version none</strong></span>
5421                   disables processing of the queries.
5422                 </p></dd>
5423 <dt><span class="term"><span><strong class="command">hostname</strong></span></span></dt>
5424 <dd><p>
5425                   The hostname the server should report via a query of
5426                   the name <code class="filename">hostname.bind</code>
5427                   with type <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
5428                   This defaults to the hostname of the machine hosting the
5429                   name server as
5430                   found by the gethostname() function.  The primary purpose of such queries
5431                   is to
5432                   identify which of a group of anycast servers is actually
5433                   answering your queries.  Specifying <span><strong class="command">hostname none;</strong></span>
5434                   disables processing of the queries.
5435                 </p></dd>
5436 <dt><span class="term"><span><strong class="command">server-id</strong></span></span></dt>
5437 <dd><p>
5438                   The ID the server should report when receiving a Name
5439                   Server Identifier (NSID) query, or a query of the name
5440                   <code class="filename">ID.SERVER</code> with type
5441                   <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
5442                   The primary purpose of such queries is to
5443                   identify which of a group of anycast servers is actually
5444                   answering your queries.  Specifying <span><strong class="command">server-id none;</strong></span>
5445                   disables processing of the queries.
5446                   Specifying <span><strong class="command">server-id hostname;</strong></span> will cause <span><strong class="command">named</strong></span> to
5447                   use the hostname as found by the gethostname() function.
5448                   The default <span><strong class="command">server-id</strong></span> is <span><strong class="command">none</strong></span>.
5449                 </p></dd>
5450 </dl></div>
5451 </div>
5452 <div class="sect3" lang="en">
5453 <div class="titlepage"><div><div><h4 class="title">
5454 <a name="empty"></a>Built-in Empty Zones</h4></div></div></div>
5455 <p>
5456             Named has some built-in empty zones (SOA and NS records only).
5457             These are for zones that should normally be answered locally
5458             and which queries should not be sent to the Internet's root
5459             servers.  The official servers which cover these namespaces
5460             return NXDOMAIN responses to these queries.  In particular,
5461             these cover the reverse namespaces for addresses from
5462             RFC 1918, RFC 4193, RFC 5737 and RFC 6598.  They also include the
5463             reverse namespace for IPv6 local address (locally assigned),
5464             IPv6 link local addresses, the IPv6 loopback address and the
5465             IPv6 unknown address.
5466           </p>
5467 <p>
5468             Named will attempt to determine if a built-in zone already exists
5469             or is active (covered by a forward-only forwarding declaration)
5470             and will not create an empty zone in that case.
5471           </p>
5472 <p>
5473             The current list of empty zones is:
5474             </p>
5475 <div class="itemizedlist"><ul type="disc">
5476 <li>10.IN-ADDR.ARPA</li>
5477 <li>16.172.IN-ADDR.ARPA</li>
5478 <li>17.172.IN-ADDR.ARPA</li>
5479 <li>18.172.IN-ADDR.ARPA</li>
5480 <li>19.172.IN-ADDR.ARPA</li>
5481 <li>20.172.IN-ADDR.ARPA</li>
5482 <li>21.172.IN-ADDR.ARPA</li>
5483 <li>22.172.IN-ADDR.ARPA</li>
5484 <li>23.172.IN-ADDR.ARPA</li>
5485 <li>24.172.IN-ADDR.ARPA</li>
5486 <li>25.172.IN-ADDR.ARPA</li>
5487 <li>26.172.IN-ADDR.ARPA</li>
5488 <li>27.172.IN-ADDR.ARPA</li>
5489 <li>28.172.IN-ADDR.ARPA</li>
5490 <li>29.172.IN-ADDR.ARPA</li>
5491 <li>30.172.IN-ADDR.ARPA</li>
5492 <li>31.172.IN-ADDR.ARPA</li>
5493 <li>168.192.IN-ADDR.ARPA</li>
5494 <li>64.100.IN-ADDR.ARPA</li>
5495 <li>65.100.IN-ADDR.ARPA</li>
5496 <li>66.100.IN-ADDR.ARPA</li>
5497 <li>67.100.IN-ADDR.ARPA</li>
5498 <li>68.100.IN-ADDR.ARPA</li>
5499 <li>69.100.IN-ADDR.ARPA</li>
5500 <li>70.100.IN-ADDR.ARPA</li>
5501 <li>71.100.IN-ADDR.ARPA</li>
5502 <li>72.100.IN-ADDR.ARPA</li>
5503 <li>73.100.IN-ADDR.ARPA</li>
5504 <li>74.100.IN-ADDR.ARPA</li>
5505 <li>75.100.IN-ADDR.ARPA</li>
5506 <li>76.100.IN-ADDR.ARPA</li>
5507 <li>77.100.IN-ADDR.ARPA</li>
5508 <li>78.100.IN-ADDR.ARPA</li>
5509 <li>79.100.IN-ADDR.ARPA</li>
5510 <li>80.100.IN-ADDR.ARPA</li>
5511 <li>81.100.IN-ADDR.ARPA</li>
5512 <li>82.100.IN-ADDR.ARPA</li>
5513 <li>83.100.IN-ADDR.ARPA</li>
5514 <li>84.100.IN-ADDR.ARPA</li>
5515 <li>85.100.IN-ADDR.ARPA</li>
5516 <li>86.100.IN-ADDR.ARPA</li>
5517 <li>87.100.IN-ADDR.ARPA</li>
5518 <li>88.100.IN-ADDR.ARPA</li>
5519 <li>89.100.IN-ADDR.ARPA</li>
5520 <li>90.100.IN-ADDR.ARPA</li>
5521 <li>91.100.IN-ADDR.ARPA</li>
5522 <li>92.100.IN-ADDR.ARPA</li>
5523 <li>93.100.IN-ADDR.ARPA</li>
5524 <li>94.100.IN-ADDR.ARPA</li>
5525 <li>95.100.IN-ADDR.ARPA</li>
5526 <li>96.100.IN-ADDR.ARPA</li>
5527 <li>97.100.IN-ADDR.ARPA</li>
5528 <li>98.100.IN-ADDR.ARPA</li>
5529 <li>99.100.IN-ADDR.ARPA</li>
5530 <li>100.100.IN-ADDR.ARPA</li>
5531 <li>101.100.IN-ADDR.ARPA</li>
5532 <li>102.100.IN-ADDR.ARPA</li>
5533 <li>103.100.IN-ADDR.ARPA</li>
5534 <li>104.100.IN-ADDR.ARPA</li>
5535 <li>105.100.IN-ADDR.ARPA</li>
5536 <li>106.100.IN-ADDR.ARPA</li>
5537 <li>107.100.IN-ADDR.ARPA</li>
5538 <li>108.100.IN-ADDR.ARPA</li>
5539 <li>109.100.IN-ADDR.ARPA</li>
5540 <li>110.100.IN-ADDR.ARPA</li>
5541 <li>111.100.IN-ADDR.ARPA</li>
5542 <li>112.100.IN-ADDR.ARPA</li>
5543 <li>113.100.IN-ADDR.ARPA</li>
5544 <li>114.100.IN-ADDR.ARPA</li>
5545 <li>115.100.IN-ADDR.ARPA</li>
5546 <li>116.100.IN-ADDR.ARPA</li>
5547 <li>117.100.IN-ADDR.ARPA</li>
5548 <li>118.100.IN-ADDR.ARPA</li>
5549 <li>119.100.IN-ADDR.ARPA</li>
5550 <li>120.100.IN-ADDR.ARPA</li>
5551 <li>121.100.IN-ADDR.ARPA</li>
5552 <li>122.100.IN-ADDR.ARPA</li>
5553 <li>123.100.IN-ADDR.ARPA</li>
5554 <li>124.100.IN-ADDR.ARPA</li>
5555 <li>125.100.IN-ADDR.ARPA</li>
5556 <li>126.100.IN-ADDR.ARPA</li>
5557 <li>127.100.IN-ADDR.ARPA</li>
5558 <li>0.IN-ADDR.ARPA</li>
5559 <li>127.IN-ADDR.ARPA</li>
5560 <li>254.169.IN-ADDR.ARPA</li>
5561 <li>2.0.192.IN-ADDR.ARPA</li>
5562 <li>100.51.198.IN-ADDR.ARPA</li>
5563 <li>113.0.203.IN-ADDR.ARPA</li>
5564 <li>255.255.255.255.IN-ADDR.ARPA</li>
5565 <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>
5566 <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>
5567 <li>8.B.D.0.1.0.0.2.IP6.ARPA</li>
5568 <li>D.F.IP6.ARPA</li>
5569 <li>8.E.F.IP6.ARPA</li>
5570 <li>9.E.F.IP6.ARPA</li>
5571 <li>A.E.F.IP6.ARPA</li>
5572 <li>B.E.F.IP6.ARPA</li>
5573 </ul></div>
5574 <p>
5575           </p>
5576 <p>
5577             Empty zones are settable at the view level and only apply to
5578             views of class IN.  Disabled empty zones are only inherited
5579             from options if there are no disabled empty zones specified
5580             at the view level.  To override the options list of disabled
5581             zones, you can disable the root zone at the view level, for example:
5582 </p>
5583 <pre class="programlisting">
5584             disable-empty-zone ".";
5585 </pre>
5586 <p>
5587           </p>
5588 <p>
5589             If you are using the address ranges covered here, you should
5590             already have reverse zones covering the addresses you use.
5591             In practice this appears to not be the case with many queries
5592             being made to the infrastructure servers for names in these
5593             spaces.  So many in fact that sacrificial servers were needed
5594             to be deployed to channel the query load away from the
5595             infrastructure servers.
5596           </p>
5597 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
5598 <h3 class="title">Note</h3>
5599             The real parent servers for these zones should disable all
5600             empty zone under the parent zone they serve.  For the real
5601             root servers, this is all built-in empty zones.  This will
5602             enable them to return referrals to deeper in the tree.
5603           </div>
5604 <div class="variablelist"><dl>
5605 <dt><span class="term"><span><strong class="command">empty-server</strong></span></span></dt>
5606 <dd><p>
5607                   Specify what server name will appear in the returned
5608                   SOA record for empty zones.  If none is specified, then
5609                   the zone's name will be used.
5610                 </p></dd>
5611 <dt><span class="term"><span><strong class="command">empty-contact</strong></span></span></dt>
5612 <dd><p>
5613                   Specify what contact name will appear in the returned
5614                   SOA record for empty zones.  If none is specified, then
5615                   "." will be used.
5616                 </p></dd>
5617 <dt><span class="term"><span><strong class="command">empty-zones-enable</strong></span></span></dt>
5618 <dd><p>
5619                   Enable or disable all empty zones.  By default, they
5620                   are enabled.
5621                 </p></dd>
5622 <dt><span class="term"><span><strong class="command">disable-empty-zone</strong></span></span></dt>
5623 <dd><p>
5624                   Disable individual empty zones.  By default, none are
5625                   disabled.  This option can be specified multiple times.
5626                 </p></dd>
5627 </dl></div>
5628 </div>
5629 <div class="sect3" lang="en">
5630 <div class="titlepage"><div><div><h4 class="title">
5631 <a name="acache"></a>Additional Section Caching</h4></div></div></div>
5632 <p>
5633             The additional section cache, also called <span><strong class="command">acache</strong></span>,
5634             is an internal cache to improve the response performance of BIND 9.
5635             When additional section caching is enabled, BIND 9 will
5636             cache an internal short-cut to the additional section content for
5637             each answer RR.
5638             Note that <span><strong class="command">acache</strong></span> is an internal caching
5639             mechanism of BIND 9, and is not related to the DNS caching
5640             server function.
5641           </p>
5642 <p>
5643             Additional section caching does not change the
5644             response content (except the RRsets ordering of the additional
5645             section, see below), but can improve the response performance
5646             significantly.
5647             It is particularly effective when BIND 9 acts as an authoritative
5648             server for a zone that has many delegations with many glue RRs.
5649           </p>
5650 <p>
5651             In order to obtain the maximum performance improvement
5652             from additional section caching, setting
5653             <span><strong class="command">additional-from-cache</strong></span>
5654             to <span><strong class="command">no</strong></span> is recommended, since the current
5655             implementation of <span><strong class="command">acache</strong></span>
5656             does not short-cut of additional section information from the
5657             DNS cache data.
5658           </p>
5659 <p>
5660             One obvious disadvantage of <span><strong class="command">acache</strong></span> is
5661             that it requires much more
5662             memory for the internal cached data.
5663             Thus, if the response performance does not matter and memory
5664             consumption is much more critical, the
5665             <span><strong class="command">acache</strong></span> mechanism can be
5666             disabled by setting <span><strong class="command">acache-enable</strong></span> to
5667             <span><strong class="command">no</strong></span>.
5668             It is also possible to specify the upper limit of memory
5669             consumption
5670             for acache by using <span><strong class="command">max-acache-size</strong></span>.
5671           </p>
5672 <p>
5673             Additional section caching also has a minor effect on the
5674             RRset ordering in the additional section.
5675             Without <span><strong class="command">acache</strong></span>,
5676             <span><strong class="command">cyclic</strong></span> order is effective for the additional
5677             section as well as the answer and authority sections.
5678             However, additional section caching fixes the ordering when it
5679             first caches an RRset for the additional section, and the same
5680             ordering will be kept in succeeding responses, regardless of the
5681             setting of <span><strong class="command">rrset-order</strong></span>.
5682             The effect of this should be minor, however, since an
5683             RRset in the additional section
5684             typically only contains a small number of RRs (and in many cases
5685             it only contains a single RR), in which case the
5686             ordering does not matter much.
5687           </p>
5688 <p>
5689             The following is a summary of options related to
5690             <span><strong class="command">acache</strong></span>.
5691           </p>
5692 <div class="variablelist"><dl>
5693 <dt><span class="term"><span><strong class="command">acache-enable</strong></span></span></dt>
5694 <dd><p>
5695                   If <span><strong class="command">yes</strong></span>, additional section caching is
5696                   enabled.  The default value is <span><strong class="command">no</strong></span>.
5697                 </p></dd>
5698 <dt><span class="term"><span><strong class="command">acache-cleaning-interval</strong></span></span></dt>
5699 <dd><p>
5700                   The server will remove stale cache entries, based on an LRU
5701                   based
5702                   algorithm, every <span><strong class="command">acache-cleaning-interval</strong></span> minutes.
5703                   The default is 60 minutes.
5704                   If set to 0, no periodic cleaning will occur.
5705                 </p></dd>
5706 <dt><span class="term"><span><strong class="command">max-acache-size</strong></span></span></dt>
5707 <dd><p>
5708                   The maximum amount of memory in bytes to use for the server's acache.
5709                   When the amount of data in the acache reaches this limit,
5710                   the server
5711                   will clean more aggressively so that the limit is not
5712                   exceeded.
5713                   In a server with multiple views, the limit applies
5714                   separately to the
5715                   acache of each view.
5716                   The default is <code class="literal">16M</code>.
5717                 </p></dd>
5718 </dl></div>
5719 </div>
5720 <div class="sect3" lang="en">
5721 <div class="titlepage"><div><div><h4 class="title">
5722 <a name="id2588200"></a>Content Filtering</h4></div></div></div>
5723 <p>
5724             <acronym class="acronym">BIND</acronym> 9 provides the ability to filter
5725             out DNS responses from external DNS servers containing
5726             certain types of data in the answer section.
5727             Specifically, it can reject address (A or AAAA) records if
5728             the corresponding IPv4 or IPv6 addresses match the given
5729             <code class="varname">address_match_list</code> of the
5730             <span><strong class="command">deny-answer-addresses</strong></span> option.
5731             It can also reject CNAME or DNAME records if the "alias"
5732             name (i.e., the CNAME alias or the substituted query name
5733             due to DNAME) matches the
5734             given <code class="varname">namelist</code> of the
5735             <span><strong class="command">deny-answer-aliases</strong></span> option, where
5736             "match" means the alias name is a subdomain of one of
5737             the <code class="varname">name_list</code> elements.
5738             If the optional <code class="varname">namelist</code> is specified
5739             with <span><strong class="command">except-from</strong></span>, records whose query name
5740             matches the list will be accepted regardless of the filter
5741             setting.
5742             Likewise, if the alias name is a subdomain of the
5743             corresponding zone, the <span><strong class="command">deny-answer-aliases</strong></span>
5744             filter will not apply;
5745             for example, even if "example.com" is specified for
5746             <span><strong class="command">deny-answer-aliases</strong></span>,
5747           </p>
5748 <pre class="programlisting">www.example.com. CNAME xxx.example.com.</pre>
5749 <p>
5750             returned by an "example.com" server will be accepted.
5751           </p>
5752 <p>
5753             In the <code class="varname">address_match_list</code> of the
5754             <span><strong class="command">deny-answer-addresses</strong></span> option, only
5755             <code class="varname">ip_addr</code>
5756             and <code class="varname">ip_prefix</code>
5757             are meaningful;
5758             any <code class="varname">key_id</code> will be silently ignored.
5759           </p>
5760 <p>
5761             If a response message is rejected due to the filtering,
5762             the entire message is discarded without being cached, and
5763             a SERVFAIL error will be returned to the client.
5764           </p>
5765 <p>
5766             This filtering is intended to prevent "DNS rebinding attacks," in
5767             which an attacker, in response to a query for a domain name the
5768             attacker controls, returns an IP address within your own network or
5769             an alias name within your own domain.
5770             A naive web browser or script could then serve as an
5771             unintended proxy, allowing the attacker
5772             to get access to an internal node of your local network
5773             that couldn't be externally accessed otherwise.
5774             See the paper available at
5775             <a href="http://portal.acm.org/citation.cfm?id=1315245.1315298" target="_top">
5776             http://portal.acm.org/citation.cfm?id=1315245.1315298
5777             </a>
5778             for more details about the attacks.
5779           </p>
5780 <p>
5781             For example, if you own a domain named "example.net" and
5782             your internal network uses an IPv4 prefix 192.0.2.0/24,
5783             you might specify the following rules:
5784           </p>
5785 <pre class="programlisting">deny-answer-addresses { 192.0.2.0/24; } except-from { "example.net"; };
5786 deny-answer-aliases { "example.net"; };
5787 </pre>
5788 <p>
5789             If an external attacker lets a web browser in your local
5790             network look up an IPv4 address of "attacker.example.com",
5791             the attacker's DNS server would return a response like this:
5792           </p>
5793 <pre class="programlisting">attacker.example.com. A 192.0.2.1</pre>
5794 <p>
5795             in the answer section.
5796             Since the rdata of this record (the IPv4 address) matches
5797             the specified prefix 192.0.2.0/24, this response will be
5798             ignored.
5799           </p>
5800 <p>
5801             On the other hand, if the browser looks up a legitimate
5802             internal web server "www.example.net" and the
5803             following response is returned to
5804             the <acronym class="acronym">BIND</acronym> 9 server
5805           </p>
5806 <pre class="programlisting">www.example.net. A 192.0.2.2</pre>
5807 <p>
5808             it will be accepted since the owner name "www.example.net"
5809             matches the <span><strong class="command">except-from</strong></span> element,
5810             "example.net".
5811           </p>
5812 <p>
5813             Note that this is not really an attack on the DNS per se.
5814             In fact, there is nothing wrong for an "external" name to
5815             be mapped to your "internal" IP address or domain name
5816             from the DNS point of view.
5817             It might actually be provided for a legitimate purpose,
5818             such as for debugging.
5819             As long as the mapping is provided by the correct owner,
5820             it is not possible or does not make sense to detect
5821             whether the intent of the mapping is legitimate or not
5822             within the DNS.
5823             The "rebinding" attack must primarily be protected at the
5824             application that uses the DNS.
5825             For a large site, however, it may be difficult to protect
5826             all possible applications at once.
5827             This filtering feature is provided only to help such an
5828             operational environment;
5829             it is generally discouraged to turn it on unless you are
5830             very sure you have no other choice and the attack is a
5831             real threat for your applications.
5832           </p>
5833 <p>
5834             Care should be particularly taken if you want to use this
5835             option for addresses within 127.0.0.0/8.
5836             These addresses are obviously "internal", but many
5837             applications conventionally rely on a DNS mapping from
5838             some name to such an address.
5839             Filtering out DNS records containing this address
5840             spuriously can break such applications.
5841           </p>
5842 </div>
5843 <div class="sect3" lang="en">
5844 <div class="titlepage"><div><div><h4 class="title">
5845 <a name="id2588394"></a>Response Policy Zone (RPZ) Rewriting</h4></div></div></div>
5846 <p>
5847             <acronym class="acronym">BIND</acronym> 9 includes a limited
5848             mechanism to modify DNS responses for requests
5849             analogous to email anti-spam DNS blacklists.
5850             Responses can be changed to deny the existence of domains(NXDOMAIN),
5851             deny the existence of IP addresses for domains (NODATA),
5852             or contain other IP addresses or data.
5853           </p>
5854 <p>
5855             Response policy zones are named in the
5856             <span><strong class="command">response-policy</strong></span> option for the view or among the
5857             global options if there is no response-policy option for the view.
5858             RPZs are ordinary DNS zones containing RRsets
5859             that can be queried normally if allowed.
5860             It is usually best to restrict those queries with something like
5861             <span><strong class="command">allow-query { localhost; };</strong></span>.
5862           </p>
5863 <p>
5864             Four policy triggers are encoded in RPZ records, QNAME, IP, NSIP,
5865             and NSDNAME.
5866             QNAME RPZ records triggered by query names of requests and targets
5867             of CNAME records resolved to generate the response.
5868             The owner name of a QNAME RPZ record is the query name relativized
5869             to the RPZ.
5870           </p>
5871 <p>
5872             The second kind of RPZ trigger is an IP address in an A and AAAA
5873             record in the ANSWER section of a response.
5874             IP address triggers are encoded in records that have owner names
5875             that are subdomains of <strong class="userinput"><code>rpz-ip</code></strong> relativized
5876             to the RPZ origin name and encode an IP address or address block.
5877             IPv4 trigger addresses are represented as
5878             <strong class="userinput"><code>prefixlength.B4.B3.B2.B1.rpz-ip</code></strong>.
5879             The prefix length must be between 1 and 32.
5880             All four bytes, B4, B3, B2, and B1, must be present.
5881             B4 is the decimal value of the least significant byte of the
5882             IPv4 address as in IN-ADDR.ARPA.
5883             IPv6 addresses are encoded in a format similar to the standard
5884             IPv6 text representation,
5885             <strong class="userinput"><code>prefixlength.W8.W7.W6.W5.W4.W3.W2.W1.rpz-ip</code></strong>.
5886             Each of W8,...,W1 is a one to four digit hexadecimal number
5887             representing 16 bits of the IPv6 address as in the standard text
5888             representation of IPv6 addresses, but reversed as in IN-ADDR.ARPA.
5889             All 8 words must be present except when consecutive
5890             zero words are replaced with <strong class="userinput"><code>.zz.</code></strong>
5891             analogous to double colons (::) in standard IPv6 text encodings.
5892             The prefix length must be between 1 and 128.
5893           </p>
5894 <p>
5895             NSDNAME triggers match names of authoritative servers
5896             for the query name, a parent of the query name, a CNAME for
5897             query name, or a parent of a CNAME.
5898             They are encoded as subdomains of
5899             <strong class="userinput"><code>rpz-nsdomain</code></strong> relativized
5900             to the RPZ origin name.
5901             NSIP triggers match IP addresses in A and
5902             AAAA RRsets for domains that can be checked against NSDNAME
5903             policy records.
5904             NSIP triggers are encoded like IP triggers except as subdomains of
5905             <strong class="userinput"><code>rpz-nsip</code></strong>.
5906             NSDNAME and NSIP triggers are checked only for names with at
5907             least <span><strong class="command">min-ns-dots</strong></span> dots.
5908             The default value of <span><strong class="command">min-ns-dots</strong></span> is 1 to
5909             exclude top level domains.
5910           </p>
5911 <p>
5912             The query response is checked against all RPZs, so
5913             two or more policy records can be triggered by a response.
5914             Because DNS responses can be rewritten according to at most one
5915             policy record, a single record encoding an action (other than
5916             <span><strong class="command">DISABLED</strong></span> actions) must be chosen.
5917             Triggers or the records that encode them are chosen in
5918             the following order:
5919             </p>
5920 <div class="itemizedlist"><ul type="disc">
5921 <li>Choose the triggered record in the zone that appears
5922                 first in the response-policy option.
5923               </li>
5924 <li>Prefer QNAME to IP to NSDNAME to NSIP triggers
5925                 in a single zone.
5926               </li>
5927 <li>Among NSDNAME triggers, prefer the
5928                 trigger that matches the smallest name under the DNSSEC ordering.
5929               </li>
5930 <li>Among IP or NSIP triggers, prefer the trigger
5931                 with the longest prefix.
5932               </li>
5933 <li>Among triggers with the same prefex length,
5934                 prefer the IP or NSIP trigger that matches
5935                 the smallest IP address.
5936               </li>
5937 </ul></div>
5938 <p>
5939           </p>
5940 <p>
5941             When the processing of a response is restarted to resolve
5942             DNAME or CNAME records and a policy record set has
5943             not been triggered,
5944             all RPZs are again consulted for the DNAME or CNAME names
5945             and addresses.
5946           </p>
5947 <p>
5948             RPZ record sets are sets of any types of DNS record except
5949             DNAME or DNSSEC that encode actions or responses to queries.
5950             </p>
5951 <div class="itemizedlist"><ul type="disc">
5952 <li>The <span><strong class="command">NXDOMAIN</strong></span> response is encoded
5953                 by a CNAME whose target is the root domain (.)
5954               </li>
5955 <li>A CNAME whose target is the wildcard top-level
5956                 domain (*.) specifies the <span><strong class="command">NODATA</strong></span> action,
5957                 which rewrites the response to NODATA or ANCOUNT=1.
5958               </li>
5959 <li>The <span><strong class="command">Local Data</strong></span> action is
5960                 represented by a set ordinary DNS records that are used
5961                 to answer queries.  Queries for record types not the
5962                 set are answered with NODATA.
5963
5964                 A special form of local data is a CNAME whose target is a
5965                 wildcard such as *.example.com.
5966                 It is used as if were an ordinary CNAME after the astrisk (*)
5967                 has been replaced with the query name.
5968                 The purpose for this special form is query logging in the
5969                 walled garden's authority DNS server.
5970               </li>
5971 <li>The <span><strong class="command">PASSTHRU</strong></span> policy is specified
5972                 by a CNAME whose target is <span><strong class="command">rpz-passthru.</strong></span>
5973                 It causes the response to not be rewritten
5974                 and is most often used to "poke holes" in policies for
5975                 CIDR blocks.
5976                 (A CNAME whose target is the variable part of its owner name
5977                 is an obsolete specification of the PASSTHRU policy.)
5978               </li>
5979 </ul></div>
5980 <p>
5981           </p>
5982 <p>
5983             The actions specified in an RPZ can be overridden with a
5984             <span><strong class="command">policy</strong></span> clause in the
5985             <span><strong class="command">response-policy</strong></span> option.
5986             An organization using an RPZ provided by another organization might
5987             use this mechanism to redirect domains to its own walled garden.
5988             </p>
5989 <div class="itemizedlist"><ul type="disc">
5990 <li>
5991 <span><strong class="command">GIVEN</strong></span> says "do not override but
5992                 perform the action specified in the zone."
5993               </li>
5994 <li>
5995 <span><strong class="command">DISABLED</strong></span> causes policy records to do
5996                 nothing but log what they might have done.
5997                 The response to the DNS query will be written according to
5998                 any triggered policy records that are not disabled.
5999                 Disabled policy zones should appear first,
6000                 because they will often not be logged
6001                 if a higher precedence trigger is found first.
6002               </li>
6003 <li>
6004 <span><strong class="command">PASSTHRU</strong></span> causes all policy records
6005                 to act as if they were CNAME records with targets the variable
6006                 part of their owner name.  They protect the response from
6007                 being changed.
6008               </li>
6009 <li>
6010 <span><strong class="command">NXDOMAIN</strong></span> causes all RPZ records
6011                 to specify NXDOMAIN policies.
6012               </li>
6013 <li>
6014 <span><strong class="command">NODATA</strong></span> overrides with the
6015                 NODATA policy
6016               </li>
6017 <li>
6018 <span><strong class="command">CNAME domain</strong></span> causes all RPZ
6019                 policy records to act as if they were "cname domain" records.
6020               </li>
6021 </ul></div>
6022 <p>
6023           </p>
6024 <p>
6025             By default, the actions encoded in an RPZ are applied
6026             only to queries that ask for recursion (RD=1).
6027             That default can be changed for a single RPZ or all RPZs in a view
6028             with a <span><strong class="command">recursive-only no</strong></span> clause.
6029             This feature is useful for serving the same zone files
6030             both inside and outside an RFC 1918 cloud and using RPZ to
6031             delete answers that would otherwise contain RFC 1918 values
6032             on the externally visible name server or view.
6033           </p>
6034 <p>
6035             Also by default, RPZ actions are applied only to DNS requests that
6036             either do not request DNSSEC metadata (DO=0) or when no DNSSEC
6037             records are available for request name in the original zone (not
6038             the response policy zone).
6039             This default can be changed for all RPZs in a view with a
6040             <span><strong class="command">break-dnssec yes</strong></span> clause.
6041             In that case, RPZ actions are applied regardless of DNSSEC.
6042             The name of the clause option reflects the fact that results
6043             rewritten by RPZ actions cannot verify.
6044           </p>
6045 <p>
6046             The TTL of a record modified by RPZ policies is set from the
6047             TTL of the relevant record in policy zone.  It is then limited
6048             to a maximum value.
6049             The <span><strong class="command">max-policy-ttl</strong></span> clause changes that
6050             maximum from its default of 5.
6051           </p>
6052 <p>
6053             For example, you might use this option statement
6054           </p>
6055 <pre class="programlisting">    response-policy { zone "badlist"; };</pre>
6056 <p>
6057             and this zone statement
6058           </p>
6059 <pre class="programlisting">    zone "badlist" {type master; file "master/badlist"; allow-query {none;}; };</pre>
6060 <p>
6061             with this zone file
6062           </p>
6063 <pre class="programlisting">$TTL 1H
6064 @                       SOA LOCALHOST. named-mgr.example.com (1 1h 15m 30d 2h)
6065                         NS  LOCALHOST.
6066
6067 ; QNAME policy records.  There are no periods (.) after the owner names.
6068 nxdomain.domain.com     CNAME   .               ; NXDOMAIN policy
6069 nodata.domain.com       CNAME   *.              ; NODATA policy
6070 bad.domain.com          A       10.0.0.1        ; redirect to a walled garden
6071                         AAAA    2001:2::1
6072
6073 ; do not rewrite (PASSTHRU) OK.DOMAIN.COM
6074 ok.domain.com           CNAME   rpz-passthru.
6075
6076 bzone.domain.com        CNAME   garden.example.com.
6077
6078 ; redirect x.bzone.domain.com to x.bzone.domain.com.garden.example.com
6079 *.bzone.domain.com      CNAME   *.garden.example.com.
6080
6081
6082 ; IP policy records that rewrite all answers for 127/8 except 127.0.0.1
6083 8.0.0.0.127.rpz-ip      CNAME   .
6084 32.1.0.0.127.rpz-ip     CNAME   rpz-passthru.
6085
6086 ; NSDNAME and NSIP policy records
6087 ns.domain.com.rpz-nsdname   CNAME   .
6088 48.zz.2.2001.rpz-nsip       CNAME   .
6089 </pre>
6090 <p>
6091             RPZ can affect server performance.
6092             Each configured response policy zone requires the server to
6093             perform one to four additional database lookups before a
6094             query can be answered.
6095             For example, a DNS server with four policy zones, each with all
6096             four kinds of response triggers, QNAME, IP, NSIP, and
6097             NSDNAME, requires a total of 17 times as many database
6098             lookups as a similar DNS server with no response policy zones.
6099             A <acronym class="acronym">BIND9</acronym> server with adequate memory and one
6100             response policy zone with QNAME and IP triggers might achieve a
6101             maximum queries-per-second rate about 20% lower.
6102             A server with four response policy zones with QNAME and IP
6103             triggers might have a maximum QPS rate about 50% lower.
6104           </p>
6105 <p>
6106             Responses rewritten by RPZ are counted in the
6107             <span><strong class="command">RPZRewrites</strong></span> statistics.
6108           </p>
6109 </div>
6110 <div class="sect3" lang="en">
6111 <div class="titlepage"><div><div><h4 class="title">
6112 <a name="id2588961"></a>Response Rate Limiting</h4></div></div></div>
6113 <p>
6114             This feature is only available when <acronym class="acronym">BIND</acronym> 9
6115             is compiled with the <strong class="userinput"><code>--enable-rrl</code></strong>
6116             option on the "configure" command line.
6117           </p>
6118 <p>
6119             Excessive almost identical UDP <span class="emphasis"><em>responses</em></span>
6120             can be controlled by configuring a
6121             <span><strong class="command">rate-limit</strong></span> clause in an
6122             <span><strong class="command">options</strong></span> or <span><strong class="command">view</strong></span> statement.
6123             This mechanism keeps authoritative BIND 9 from being used
6124             in amplifying reflection denial of service (DoS) attacks.
6125             Short truncated (TC=1) responses can be sent to provide
6126             rate-limited responses to legitimate clients within
6127             a range of forged, attacked IP addresses.
6128             Legitimate clients react to dropped or truncated response
6129             by retrying with UDP or with TCP respectively.
6130           </p>
6131 <p>
6132             This mechanism is intended for authoritative DNS servers.
6133             It can be used on recursive servers but can slow
6134             applications such as SMTP servers (mail receivers) and
6135             HTTP clients (web browsers) that repeatedly request the
6136             same domains.
6137             When possible, closing "open" recursive servers is better.
6138           </p>
6139 <p>
6140             Response rate limiting uses a "credit" or "token bucket" scheme.
6141             Each combination of identical response and client
6142             has a conceptual account that earns a specified number
6143             of credits every second.
6144             A prospective response debits its account by one.
6145             Responses are dropped or truncated
6146             while the account is negative.
6147             Responses are tracked within a rolling window of time
6148             which defaults to 15 seconds, but can be configured with
6149             the <span><strong class="command">window</strong></span> option to any value from
6150             1 to 3600 seconds (1 hour).
6151             The account cannot become more positive than
6152             the per-second limit
6153             or more negative than <span><strong class="command">window</strong></span>
6154             times the per-second limit.
6155             When the specified number of credits for a class of
6156             responses is set to 0, those responses are not rate limited.
6157           </p>
6158 <p>
6159             The notions of "identical response" and "DNS client"
6160             for rate limiting are not simplistic.
6161             All responses to an address block are counted as if to a
6162             single client.
6163             The prefix lengths of addresses blocks are
6164             specified with <span><strong class="command">ipv4-prefix-length</strong></span> (default 24)
6165             and <span><strong class="command">ipv6-prefix-length</strong></span> (default 56).
6166           </p>
6167 <p>
6168             All non-empty responses for a valid domain name (qname)
6169             and record type (qtype) are identical and have a limit specified
6170             with <span><strong class="command">responses-per-second</strong></span>
6171             (default 0 or no limit).
6172             All empty (NODATA) responses for a valid domain,
6173             regardless of query type, are identical.
6174             Responses in the NODATA class are limited by
6175             <span><strong class="command">nodata-per-second</strong></span>
6176             (default <span><strong class="command">responses-per-second</strong></span>).
6177             Requests for any and all undefined subdomains of a given
6178             valid domain result in NXDOMAIN errors, and are identical
6179             regardless of query type.
6180             They are limited by <span><strong class="command">nxdomain-per-second</strong></span>
6181             (default <span><strong class="command">responses-per-second</strong></span>).
6182             This controls some attacks using random names, but
6183             can be relaxed or turned off (set to 0)
6184             on servers that expect many legitimate
6185             NXDOMAIN responses, such as from anti-spam blacklists.
6186             Referrals or delegations to the server of a given
6187             domain are identical and are limited by
6188             <span><strong class="command">referrals-per-second</strong></span>
6189             (default <span><strong class="command">responses-per-second</strong></span>).
6190           </p>
6191 <p>
6192             Responses generated from local wildcards are counted and limited
6193             as if they were for the parent domain name.
6194             This controls flooding using random.wild.example.com.
6195           </p>
6196 <p>
6197             All requests that result in DNS errors other
6198             than NXDOMAIN, such as SERVFAIL and FORMERR, are identical
6199             regardless of requested name (qname) or record type (qtype).
6200             This controls attacks using invalid requests or distant,
6201             broken authoritative servers.
6202             By default the limit on errors is the same as the
6203             <span><strong class="command">responses-per-second</strong></span> value,
6204             but it can be set separately with
6205             <span><strong class="command">errors-per-second</strong></span>.
6206           </p>
6207 <p>
6208             Many attacks using DNS involve UDP requests with forged source
6209             addresses.
6210             Rate limiting prevents the use of BIND 9 to flood a network
6211             with responses to requests with forged source addresses,
6212             but could let a third party block responses to legitimate requests.
6213             There is a mechanism that can answer some legitimate
6214             requests from a client whose address is being forged in a flood.
6215             Setting <span><strong class="command">slip</strong></span> to 2 (its default) causes every
6216             other UDP request to be answered with a small truncated (TC=1)
6217             response.
6218             The small size and reduced frequency, and so lack of
6219             amplification, of "slipped" responses make them unattractive
6220             for reflection DoS attacks.
6221             <span><strong class="command">slip</strong></span> must be between 0 and 10.
6222             A value of 0 does not "slip":
6223             no truncated responses are sent due to rate limiting,
6224             all responses are dropped.
6225             A value of 1 causes every response to slip;
6226             values between 2 and 10 cause every n'th response to slip.
6227             Some error responses including REFUSED and SERVFAIL
6228             cannot be replaced with truncated responses and are instead
6229             leaked at the <span><strong class="command">slip</strong></span> rate.
6230           </p>
6231 <p>
6232             (NOTE: Dropped responses from an authoritative server may
6233             reduce the difficulty of a third party successfully forging
6234             a response to a recursive resolver. The best security
6235             against forged responses is for authoritative operators
6236             to sign their zones using DNSSEC and for resolver operators
6237             to validate the responses. When this is not an option,
6238             operators who are more concerned with response integrity
6239             than with flood mitigation may consider setting
6240             <span><strong class="command">slip</strong></span> to 1, causing all rate-limited
6241             responses to be truncated rather than dropped.  This reduces
6242             the effectiveness of rate-limiting against reflection attacks.)
6243           </p>
6244 <p>
6245             When the approximate query per second rate exceeds
6246             the <span><strong class="command">qps-scale</strong></span> value,
6247             then the <span><strong class="command">responses-per-second</strong></span>,
6248             <span><strong class="command">errors-per-second</strong></span>,
6249             <span><strong class="command">nxdomains-per-second</strong></span> and
6250             <span><strong class="command">all-per-second</strong></span> values are reduced by the
6251             ratio of the current rate to the <span><strong class="command">qps-scale</strong></span> value.
6252             This feature can tighten defenses during attacks.
6253             For example, with
6254             <span><strong class="command">qps-scale 250; responses-per-second 20;</strong></span> and
6255             a total query rate of 1000 queries/second for all queries from
6256             all DNS clients including via TCP,
6257             then the effective responses/second limit changes to
6258             (250/1000)*20 or 5.
6259             Responses sent via TCP are not limited
6260             but are counted to compute the query per second rate.
6261           </p>
6262 <p>
6263             Communities of DNS clients can be given their own parameters or no
6264             rate limiting by putting
6265             <span><strong class="command">rate-limit</strong></span> statements in <span><strong class="command">view</strong></span>
6266             statements instead of the global <span><strong class="command">option</strong></span>
6267             statement.
6268             A <span><strong class="command">rate-limit</strong></span> statement in a view replaces,
6269             rather than supplementing, a <span><strong class="command">rate-limit</strong></span>
6270             statement among the main options.
6271             DNS clients within a view can be exempted from rate limits
6272             with the <span><strong class="command">exempt-clients</strong></span> clause.
6273           </p>
6274 <p>
6275             UDP responses of all kinds can be limited with the
6276             <span><strong class="command">all-per-second</strong></span> phrase.
6277             This rate limiting is unlike the rate limiting provided by
6278             <span><strong class="command">responses-per-second</strong></span>,
6279             <span><strong class="command">errors-per-second</strong></span>, and
6280             <span><strong class="command">nxdomains-per-second</strong></span> on a DNS server
6281             which are often invisible to the victim of a DNS reflection attack.
6282             Unless the forged requests of the attack are the same as the
6283             legitimate requests of the victim, the victim's requests are
6284             not affected.
6285             Responses affected by an <span><strong class="command">all-per-second</strong></span> limit
6286             are always dropped; the <span><strong class="command">slip</strong></span> value has no
6287             effect.
6288             An <span><strong class="command">all-per-second</strong></span> limit should be
6289             at least 4 times as large as the other limits,
6290             because single DNS clients often send bursts of legitimate
6291             requests.
6292             For example, the receipt of a single mail message can prompt
6293             requests from an SMTP server for NS, PTR, A, and AAAA records
6294             as the incoming SMTP/TCP/IP connection is considered.
6295             The SMTP server can need additional NS, A, AAAA, MX, TXT, and SPF
6296             records as it considers the STMP <span><strong class="command">Mail From</strong></span>
6297             command.
6298             Web browsers often repeatedly resolve the same names that
6299             are repeated in HTML &lt;IMG&gt; tags in a page.
6300             <span><strong class="command">All-per-second</strong></span> is similar to the
6301             rate limiting offered by firewalls but often inferior.
6302             Attacks that justify ignoring the
6303             contents of DNS responses are likely to be attacks on the
6304             DNS server itself.
6305             They usually should be discarded before the DNS server
6306             spends resources making TCP connections or parsing DNS requests,
6307             but that rate limiting must be done before the
6308             DNS server sees the requests.
6309           </p>
6310 <p>
6311             The maximum size of the table used to track requests and
6312             rate limit responses is set with <span><strong class="command">max-table-size</strong></span>.
6313             Each entry in the table is between 40 and 80 bytes.
6314             The table needs approximately as many entries as the number
6315             of requests received per second.
6316             The default is 20,000.
6317             To reduce the cold start of growing the table,
6318             <span><strong class="command">min-table-size</strong></span> (default 500)
6319             can set the minimum table size.
6320             Enable <span><strong class="command">rate-limit</strong></span> category logging to monitor
6321             expansions of the table and inform
6322             choices for the initial and maximum table size.
6323           </p>
6324 <p>
6325             Use <span><strong class="command">log-only yes</strong></span> to test rate limiting parameters
6326             without actually dropping any requests.
6327           </p>
6328 <p>
6329             Responses dropped by rate limits are included in the
6330             <span><strong class="command">RateDropped</strong></span> and <span><strong class="command">QryDropped</strong></span>
6331             statistics.
6332             Responses that truncated by rate limits are included in
6333             <span><strong class="command">RateSlipped</strong></span> and <span><strong class="command">RespTruncated</strong></span>.
6334           </p>
6335 </div>
6336 </div>
6337 <div class="sect2" lang="en">
6338 <div class="titlepage"><div><div><h3 class="title">
6339 <a name="server_statement_grammar"></a><span><strong class="command">server</strong></span> Statement Grammar</h3></div></div></div>
6340 <pre class="programlisting"><span><strong class="command">server</strong></span> <em class="replaceable"><code>ip_addr[/prefixlen]</code></em> {
6341     [<span class="optional"> bogus <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6342     [<span class="optional"> provide-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6343     [<span class="optional"> request-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6344     [<span class="optional"> edns <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6345     [<span class="optional"> edns-udp-size <em class="replaceable"><code>number</code></em> ; </span>]
6346     [<span class="optional"> max-udp-size <em class="replaceable"><code>number</code></em> ; </span>]
6347     [<span class="optional"> transfers <em class="replaceable"><code>number</code></em> ; </span>]
6348     [<span class="optional"> transfer-format <em class="replaceable"><code>( one-answer | many-answers )</code></em> ; ]</span>]
6349     [<span class="optional"> keys <em class="replaceable"><code>{ string ; [<span class="optional"> string ; [<span class="optional">...</span>]</span>] }</code></em> ; </span>]
6350     [<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>]
6351     [<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>]
6352     [<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>]
6353     [<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>]
6354     [<span class="optional"> query-source [<span class="optional"> address ( <em class="replaceable"><code>ip_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]
6355                   [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]; </span>]
6356     [<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>]
6357                      [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]; </span>]
6358     [<span class="optional"> use-queryport-pool <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6359     [<span class="optional"> queryport-pool-ports <em class="replaceable"><code>number</code></em>; </span>]
6360     [<span class="optional"> queryport-pool-updateinterval <em class="replaceable"><code>number</code></em>; </span>]
6361 };
6362 </pre>
6363 </div>
6364 <div class="sect2" lang="en">
6365 <div class="titlepage"><div><div><h3 class="title">
6366 <a name="server_statement_definition_and_usage"></a><span><strong class="command">server</strong></span> Statement Definition and
6367             Usage</h3></div></div></div>
6368 <p>
6369             The <span><strong class="command">server</strong></span> statement defines
6370             characteristics
6371             to be associated with a remote name server.  If a prefix length is
6372             specified, then a range of servers is covered.  Only the most
6373             specific
6374             server clause applies regardless of the order in
6375             <code class="filename">named.conf</code>.
6376           </p>
6377 <p>
6378             The <span><strong class="command">server</strong></span> statement can occur at
6379             the top level of the
6380             configuration file or inside a <span><strong class="command">view</strong></span>
6381             statement.
6382             If a <span><strong class="command">view</strong></span> statement contains
6383             one or more <span><strong class="command">server</strong></span> statements, only
6384             those
6385             apply to the view and any top-level ones are ignored.
6386             If a view contains no <span><strong class="command">server</strong></span>
6387             statements,
6388             any top-level <span><strong class="command">server</strong></span> statements are
6389             used as
6390             defaults.
6391           </p>
6392 <p>
6393             If you discover that a remote server is giving out bad data,
6394             marking it as bogus will prevent further queries to it. The
6395             default
6396             value of <span><strong class="command">bogus</strong></span> is <span><strong class="command">no</strong></span>.
6397           </p>
6398 <p>
6399             The <span><strong class="command">provide-ixfr</strong></span> clause determines
6400             whether
6401             the local server, acting as master, will respond with an
6402             incremental
6403             zone transfer when the given remote server, a slave, requests it.
6404             If set to <span><strong class="command">yes</strong></span>, incremental transfer
6405             will be provided
6406             whenever possible. If set to <span><strong class="command">no</strong></span>,
6407             all transfers
6408             to the remote server will be non-incremental. If not set, the
6409             value
6410             of the <span><strong class="command">provide-ixfr</strong></span> option in the
6411             view or
6412             global options block is used as a default.
6413           </p>
6414 <p>
6415             The <span><strong class="command">request-ixfr</strong></span> clause determines
6416             whether
6417             the local server, acting as a slave, will request incremental zone
6418             transfers from the given remote server, a master. If not set, the
6419             value of the <span><strong class="command">request-ixfr</strong></span> option in
6420             the view or global options block is used as a default. It may
6421             also be set in the zone block and, if set there, it will
6422             override the global or view setting for that zone.
6423           </p>
6424 <p>
6425             IXFR requests to servers that do not support IXFR will
6426             automatically
6427             fall back to AXFR.  Therefore, there is no need to manually list
6428             which servers support IXFR and which ones do not; the global
6429             default
6430             of <span><strong class="command">yes</strong></span> should always work.
6431             The purpose of the <span><strong class="command">provide-ixfr</strong></span> and
6432             <span><strong class="command">request-ixfr</strong></span> clauses is
6433             to make it possible to disable the use of IXFR even when both
6434             master
6435             and slave claim to support it, for example if one of the servers
6436             is buggy and crashes or corrupts data when IXFR is used.
6437           </p>
6438 <p>
6439             The <span><strong class="command">edns</strong></span> clause determines whether
6440             the local server will attempt to use EDNS when communicating
6441             with the remote server.  The default is <span><strong class="command">yes</strong></span>.
6442           </p>
6443 <p>
6444             The <span><strong class="command">edns-udp-size</strong></span> option sets the EDNS UDP size
6445             that is advertised by <span><strong class="command">named</strong></span> when querying the remote server.
6446             Valid values are 512 to 4096 bytes (values outside this range will be
6447             silently adjusted).  This option is useful when you wish to
6448             advertises a different value to this server than the value you
6449             advertise globally, for example, when there is a firewall at the
6450             remote site that is blocking large replies.
6451           </p>
6452 <p>
6453             The <span><strong class="command">max-udp-size</strong></span> option sets the
6454             maximum EDNS UDP message size <span><strong class="command">named</strong></span> will send.  Valid
6455             values are 512 to 4096 bytes (values outside this range will
6456             be silently adjusted).  This option is useful when you
6457             know that there is a firewall that is blocking large
6458             replies from <span><strong class="command">named</strong></span>.
6459           </p>
6460 <p>
6461             The server supports two zone transfer methods. The first, <span><strong class="command">one-answer</strong></span>,
6462             uses one DNS message per resource record transferred. <span><strong class="command">many-answers</strong></span> packs
6463             as many resource records as possible into a message. <span><strong class="command">many-answers</strong></span> is
6464             more efficient, but is only known to be understood by <acronym class="acronym">BIND</acronym> 9, <acronym class="acronym">BIND</acronym>
6465             8.x, and patched versions of <acronym class="acronym">BIND</acronym>
6466             4.9.5. You can specify which method
6467             to use for a server with the <span><strong class="command">transfer-format</strong></span> option.
6468             If <span><strong class="command">transfer-format</strong></span> is not
6469             specified, the <span><strong class="command">transfer-format</strong></span>
6470             specified
6471             by the <span><strong class="command">options</strong></span> statement will be
6472             used.
6473           </p>
6474 <p><span><strong class="command">transfers</strong></span>
6475             is used to limit the number of concurrent inbound zone
6476             transfers from the specified server. If no
6477             <span><strong class="command">transfers</strong></span> clause is specified, the
6478             limit is set according to the
6479             <span><strong class="command">transfers-per-ns</strong></span> option.
6480           </p>
6481 <p>
6482             The <span><strong class="command">keys</strong></span> clause identifies a
6483             <span><strong class="command">key_id</strong></span> defined by the <span><strong class="command">key</strong></span> statement,
6484             to be used for transaction security (TSIG, <a href="Bv9ARM.ch04.html#tsig" title="TSIG">the section called &#8220;TSIG&#8221;</a>)
6485             when talking to the remote server.
6486             When a request is sent to the remote server, a request signature
6487             will be generated using the key specified here and appended to the
6488             message. A request originating from the remote server is not
6489             required
6490             to be signed by this key.
6491           </p>
6492 <p>
6493             Although the grammar of the <span><strong class="command">keys</strong></span>
6494             clause
6495             allows for multiple keys, only a single key per server is
6496             currently
6497             supported.
6498           </p>
6499 <p>
6500             The <span><strong class="command">transfer-source</strong></span> and
6501             <span><strong class="command">transfer-source-v6</strong></span> clauses specify
6502             the IPv4 and IPv6 source
6503             address to be used for zone transfer with the remote server,
6504             respectively.
6505             For an IPv4 remote server, only <span><strong class="command">transfer-source</strong></span> can
6506             be specified.
6507             Similarly, for an IPv6 remote server, only
6508             <span><strong class="command">transfer-source-v6</strong></span> can be
6509             specified.
6510             For more details, see the description of
6511             <span><strong class="command">transfer-source</strong></span> and
6512             <span><strong class="command">transfer-source-v6</strong></span> in
6513             <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
6514           </p>
6515 <p>
6516             The <span><strong class="command">notify-source</strong></span> and
6517             <span><strong class="command">notify-source-v6</strong></span> clauses specify the
6518             IPv4 and IPv6 source address to be used for notify
6519             messages sent to remote servers, respectively.  For an
6520             IPv4 remote server, only <span><strong class="command">notify-source</strong></span>
6521             can be specified.  Similarly, for an IPv6 remote server,
6522             only <span><strong class="command">notify-source-v6</strong></span> can be specified.
6523           </p>
6524 <p>
6525             The <span><strong class="command">query-source</strong></span> and
6526             <span><strong class="command">query-source-v6</strong></span> clauses specify the
6527             IPv4 and IPv6 source address to be used for queries
6528             sent to remote servers, respectively.  For an IPv4
6529             remote server, only <span><strong class="command">query-source</strong></span> can
6530             be specified.  Similarly, for an IPv6 remote server,
6531             only <span><strong class="command">query-source-v6</strong></span> can be specified.
6532           </p>
6533 </div>
6534 <div class="sect2" lang="en">
6535 <div class="titlepage"><div><div><h3 class="title">
6536 <a name="statschannels"></a><span><strong class="command">statistics-channels</strong></span> Statement Grammar</h3></div></div></div>
6537 <pre class="programlisting"><span><strong class="command">statistics-channels</strong></span> {
6538    [ inet ( ip_addr | * ) [ port ip_port ]
6539    [ allow { <em class="replaceable"><code> address_match_list </code></em> } ]; ]
6540    [ inet ...; ]
6541 };
6542 </pre>
6543 </div>
6544 <div class="sect2" lang="en">
6545 <div class="titlepage"><div><div><h3 class="title">
6546 <a name="id2590101"></a><span><strong class="command">statistics-channels</strong></span> Statement Definition and
6547             Usage</h3></div></div></div>
6548 <p>
6549           The <span><strong class="command">statistics-channels</strong></span> statement
6550           declares communication channels to be used by system
6551           administrators to get access to statistics information of
6552           the name server.
6553         </p>
6554 <p>
6555           This statement intends to be flexible to support multiple
6556           communication protocols in the future, but currently only
6557           HTTP access is supported.
6558           It requires that BIND 9 be compiled with libxml2;
6559           the <span><strong class="command">statistics-channels</strong></span> statement is
6560           still accepted even if it is built without the library,
6561           but any HTTP access will fail with an error.
6562         </p>
6563 <p>
6564           An <span><strong class="command">inet</strong></span> control channel is a TCP socket
6565           listening at the specified <span><strong class="command">ip_port</strong></span> on the
6566           specified <span><strong class="command">ip_addr</strong></span>, which can be an IPv4 or IPv6
6567           address.  An <span><strong class="command">ip_addr</strong></span> of <code class="literal">*</code> (asterisk) is
6568           interpreted as the IPv4 wildcard address; connections will be
6569           accepted on any of the system's IPv4 addresses.
6570           To listen on the IPv6 wildcard address,
6571           use an <span><strong class="command">ip_addr</strong></span> of <code class="literal">::</code>.
6572         </p>
6573 <p>
6574           If no port is specified, port 80 is used for HTTP channels.
6575           The asterisk "<code class="literal">*</code>" cannot be used for
6576           <span><strong class="command">ip_port</strong></span>.
6577         </p>
6578 <p>
6579           The attempt of opening a statistics channel is
6580           restricted by the optional <span><strong class="command">allow</strong></span> clause.
6581           Connections to the statistics channel are permitted based on the
6582           <span><strong class="command">address_match_list</strong></span>.
6583           If no <span><strong class="command">allow</strong></span> clause is present,
6584           <span><strong class="command">named</strong></span> accepts connection
6585           attempts from any address; since the statistics may
6586           contain sensitive internal information, it is highly
6587           recommended to restrict the source of connection requests
6588           appropriately.
6589         </p>
6590 <p>
6591           If no <span><strong class="command">statistics-channels</strong></span> statement is present,
6592           <span><strong class="command">named</strong></span> will not open any communication channels.
6593         </p>
6594 <p>
6595           If the statistics channel is configured to listen on 127.0.0.1
6596           port 8888, then the statistics are accessible in XML format at
6597           <a href="http://127.0.0.1:8888/" target="_top">http://127.0.0.1:8888/</a> or
6598           <a href="http://127.0.0.1:8888/xml" target="_top">http://127.0.0.1:8888/xml</a>. A CSS file is
6599           included which can format the XML statistics into tables 
6600           when viewed with a stylesheet-capable browser.  When
6601           <acronym class="acronym">BIND</acronym> 9 is configured with --enable-newstats, 
6602           a new XML schema is used (version 3) which adds additional
6603           zone statistics and uses a flatter tree for more efficient
6604           parsing.  The stylesheet included uses the Google Charts API
6605           to render data into into charts and graphs when using a
6606           javascript-capable browser.
6607         </p>
6608 <p>
6609           Applications that depend on a particular XML schema
6610           can request 
6611           <a href="http://127.0.0.1:8888/xml/v2" target="_top">http://127.0.0.1:8888/xml/v2</a> for version 2
6612           of the statistics XML schema or 
6613           <a href="http://127.0.0.1:8888/xml/v3" target="_top">http://127.0.0.1:8888/xml/v3</a> for version 3.
6614           If the requested schema is supported by the server, then
6615           it will respond; if not, it will return a "page not found"
6616           error.
6617         </p>
6618 </div>
6619 <div class="sect2" lang="en">
6620 <div class="titlepage"><div><div><h3 class="title">
6621 <a name="trusted-keys"></a><span><strong class="command">trusted-keys</strong></span> Statement Grammar</h3></div></div></div>
6622 <pre class="programlisting"><span><strong class="command">trusted-keys</strong></span> {
6623     <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> ;
6624     [<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>]
6625 };
6626 </pre>
6627 </div>
6628 <div class="sect2" lang="en">
6629 <div class="titlepage"><div><div><h3 class="title">
6630 <a name="id2590408"></a><span><strong class="command">trusted-keys</strong></span> Statement Definition
6631             and Usage</h3></div></div></div>
6632 <p>
6633             The <span><strong class="command">trusted-keys</strong></span> statement defines
6634             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
6635             public key for a non-authoritative zone is known, but
6636             cannot be securely obtained through DNS, either because
6637             it is the DNS root zone or because its parent zone is
6638             unsigned.  Once a key has been configured as a trusted
6639             key, it is treated as if it had been validated and
6640             proven secure. The resolver attempts DNSSEC validation
6641             on all DNS data in subdomains of a security root.
6642           </p>
6643 <p>
6644             All keys (and corresponding zones) listed in
6645             <span><strong class="command">trusted-keys</strong></span> are deemed to exist regardless
6646             of what parent zones say.  Similarly for all keys listed in
6647             <span><strong class="command">trusted-keys</strong></span> only those keys are
6648             used to validate the DNSKEY RRset.  The parent's DS RRset
6649             will not be used.
6650           </p>
6651 <p>
6652             The <span><strong class="command">trusted-keys</strong></span> statement can contain
6653             multiple key entries, each consisting of the key's
6654             domain name, flags, protocol, algorithm, and the Base-64
6655             representation of the key data.
6656             Spaces, tabs, newlines and carriage returns are ignored
6657             in the key data, so the configuration may be split up into
6658             multiple lines.
6659           </p>
6660 <p>
6661             <span><strong class="command">trusted-keys</strong></span> may be set at the top level
6662             of <code class="filename">named.conf</code> or within a view.  If it is
6663             set in both places, they are additive: keys defined at the top
6664             level are inherited by all views, but keys defined in a view
6665             are only used within that view.
6666           </p>
6667 </div>
6668 <div class="sect2" lang="en">
6669 <div class="titlepage"><div><div><h3 class="title">
6670 <a name="id2590523"></a><span><strong class="command">managed-keys</strong></span> Statement Grammar</h3></div></div></div>
6671 <pre class="programlisting"><span><strong class="command">managed-keys</strong></span> {
6672     <em class="replaceable"><code>name</code></em> <code class="literal">initial-key</code> <em class="replaceable"><code>flags</code></em> <em class="replaceable"><code>protocol</code></em> <em class="replaceable"><code>algorithm</code></em> <em class="replaceable"><code>key-data</code></em> ;
6673     [<span class="optional"> <em class="replaceable"><code>name</code></em> <code class="literal">initial-key</code> <em class="replaceable"><code>flags</code></em> <em class="replaceable"><code>protocol</code></em> <em class="replaceable"><code>algorithm</code></em> <em class="replaceable"><code>key-data</code></em> ; [<span class="optional">...</span>]</span>]
6674 };
6675 </pre>
6676 </div>
6677 <div class="sect2" lang="en">
6678 <div class="titlepage"><div><div><h3 class="title">
6679 <a name="managed-keys"></a><span><strong class="command">managed-keys</strong></span> Statement Definition
6680             and Usage</h3></div></div></div>
6681 <p>
6682             The <span><strong class="command">managed-keys</strong></span> statement, like 
6683             <span><strong class="command">trusted-keys</strong></span>, defines DNSSEC
6684             security roots.  The difference is that
6685             <span><strong class="command">managed-keys</strong></span> can be kept up to date
6686             automatically, without intervention from the resolver
6687             operator.
6688           </p>
6689 <p>
6690             Suppose, for example, that a zone's key-signing
6691             key was compromised, and the zone owner had to revoke and
6692             replace the key.  A resolver which had the old key in a
6693             <span><strong class="command">trusted-keys</strong></span> statement would be
6694             unable to validate this zone any longer; it would
6695             reply with a SERVFAIL response code.  This would
6696             continue until the resolver operator had updated the
6697             <span><strong class="command">trusted-keys</strong></span> statement with the new key.
6698           </p>
6699 <p>
6700             If, however, the zone were listed in a
6701             <span><strong class="command">managed-keys</strong></span> statement instead, then the
6702             zone owner could add a "stand-by" key to the zone in advance.
6703             <span><strong class="command">named</strong></span> would store the stand-by key, and
6704             when the original key was revoked, <span><strong class="command">named</strong></span>
6705             would be able to transition smoothly to the new key.  It would
6706             also recognize that the old key had been revoked, and cease
6707             using that key to validate answers, minimizing the damage that
6708             the compromised key could do.
6709           </p>
6710 <p>
6711             A <span><strong class="command">managed-keys</strong></span> statement contains a list of
6712             the keys to be managed, along with information about how the
6713             keys are to be initialized for the first time.  The only
6714             initialization method currently supported (as of
6715             <acronym class="acronym">BIND</acronym> 9.7.0) is <code class="literal">initial-key</code>.
6716             This means the <span><strong class="command">managed-keys</strong></span> statement must
6717             contain a copy of the initializing key.  (Future releases may
6718             allow keys to be initialized by other methods, eliminating this
6719             requirement.)
6720           </p>
6721 <p>
6722             Consequently, a <span><strong class="command">managed-keys</strong></span> statement
6723             appears similar to a <span><strong class="command">trusted-keys</strong></span>, differing
6724             in the presence of the second field, containing the keyword
6725             <code class="literal">initial-key</code>.  The difference is, whereas the
6726             keys listed in a <span><strong class="command">trusted-keys</strong></span> continue to be
6727             trusted until they are removed from
6728             <code class="filename">named.conf</code>, an initializing key listed 
6729             in a <span><strong class="command">managed-keys</strong></span> statement is only trusted
6730             <span class="emphasis"><em>once</em></span>: for as long as it takes to load the
6731             managed key database and start the RFC 5011 key maintenance
6732             process.
6733           </p>
6734 <p>
6735             The first time <span><strong class="command">named</strong></span> runs with a managed key
6736             configured in <code class="filename">named.conf</code>, it fetches the
6737             DNSKEY RRset directly from the zone apex, and validates it
6738             using the key specified in the <span><strong class="command">managed-keys</strong></span>
6739             statement.  If the DNSKEY RRset is validly signed, then it is
6740             used as the basis for a new managed keys database.
6741           </p>
6742 <p>
6743             From that point on, whenever <span><strong class="command">named</strong></span> runs, it
6744             sees the <span><strong class="command">managed-keys</strong></span> statement, checks to
6745             make sure RFC 5011 key maintenance has already been initialized
6746             for the specified domain, and if so, it simply moves on.  The
6747             key specified in the <span><strong class="command">managed-keys</strong></span> is not
6748             used to validate answers; it has been superseded by the key or
6749             keys stored in the managed keys database.
6750           </p>
6751 <p>
6752             The next time <span><strong class="command">named</strong></span> runs after a name
6753             has been <span class="emphasis"><em>removed</em></span> from the
6754             <span><strong class="command">managed-keys</strong></span> statement, the corresponding
6755             zone will be removed from the managed keys database,
6756             and RFC 5011 key maintenance will no longer be used for that
6757             domain.
6758           </p>
6759 <p>
6760             <span><strong class="command">named</strong></span> only maintains a single managed keys
6761             database; consequently, unlike <span><strong class="command">trusted-keys</strong></span>,
6762             <span><strong class="command">managed-keys</strong></span> may only be set at the top
6763             level of <code class="filename">named.conf</code>, not within a view.
6764           </p>
6765 <p>
6766             In the current implementation, the managed keys database is
6767             stored as a master-format zone file called
6768             <code class="filename">managed-keys.bind</code>.  When the key database
6769             is changed, the zone is updated.  As with any other dynamic
6770             zone, changes will be written into a journal file,
6771             <code class="filename">managed-keys.bind.jnl</code>.  They are committed
6772             to the master file as soon as possible afterward; in the case
6773             of the managed key database, this will usually occur within 30
6774             seconds.  So, whenever <span><strong class="command">named</strong></span> is using
6775             automatic key maintenance, those two files can be expected to
6776             exist in the working directory.  (For this reason among others,
6777             the working directory should be always be writable by
6778             <span><strong class="command">named</strong></span>.)
6779           </p>
6780 <p>
6781             If the <span><strong class="command">dnssec-validation</strong></span> option is
6782             set to <strong class="userinput"><code>auto</code></strong>, <span><strong class="command">named</strong></span>
6783             will automatically initialize a managed key for the
6784             root zone.  Similarly, if the <span><strong class="command">dnssec-lookaside</strong></span>
6785             option is set to <strong class="userinput"><code>auto</code></strong>,
6786             <span><strong class="command">named</strong></span> will automatically initialize
6787             a managed key for the zone <code class="literal">dlv.isc.org</code>.
6788             In both cases, the key that is used to initialize the key
6789             maintenance process is built into <span><strong class="command">named</strong></span>,
6790             and can be overridden from <span><strong class="command">bindkeys-file</strong></span>.
6791           </p>
6792 </div>
6793 <div class="sect2" lang="en">
6794 <div class="titlepage"><div><div><h3 class="title">
6795 <a name="view_statement_grammar"></a><span><strong class="command">view</strong></span> Statement Grammar</h3></div></div></div>
6796 <pre class="programlisting"><span><strong class="command">view</strong></span> <em class="replaceable"><code>view_name</code></em>
6797       [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6798       match-clients { <em class="replaceable"><code>address_match_list</code></em> };
6799       match-destinations { <em class="replaceable"><code>address_match_list</code></em> };
6800       match-recursive-only <em class="replaceable"><code>yes_or_no</code></em> ;
6801       [<span class="optional"> <em class="replaceable"><code>view_option</code></em>; ...</span>]
6802       [<span class="optional"> <em class="replaceable"><code>zone_statement</code></em>; ...</span>]
6803 };
6804 </pre>
6805 </div>
6806 <div class="sect2" lang="en">
6807 <div class="titlepage"><div><div><h3 class="title">
6808 <a name="id2590965"></a><span><strong class="command">view</strong></span> Statement Definition and Usage</h3></div></div></div>
6809 <p>
6810             The <span><strong class="command">view</strong></span> statement is a powerful
6811             feature
6812             of <acronym class="acronym">BIND</acronym> 9 that lets a name server
6813             answer a DNS query differently
6814             depending on who is asking. It is particularly useful for
6815             implementing
6816             split DNS setups without having to run multiple servers.
6817           </p>
6818 <p>
6819             Each <span><strong class="command">view</strong></span> statement defines a view
6820             of the
6821             DNS namespace that will be seen by a subset of clients.  A client
6822             matches
6823             a view if its source IP address matches the
6824             <code class="varname">address_match_list</code> of the view's
6825             <span><strong class="command">match-clients</strong></span> clause and its
6826             destination IP address matches
6827             the <code class="varname">address_match_list</code> of the
6828             view's
6829             <span><strong class="command">match-destinations</strong></span> clause.  If not
6830             specified, both
6831             <span><strong class="command">match-clients</strong></span> and <span><strong class="command">match-destinations</strong></span>
6832             default to matching all addresses.  In addition to checking IP
6833             addresses
6834             <span><strong class="command">match-clients</strong></span> and <span><strong class="command">match-destinations</strong></span>
6835             can also take <span><strong class="command">keys</strong></span> which provide an
6836             mechanism for the
6837             client to select the view.  A view can also be specified
6838             as <span><strong class="command">match-recursive-only</strong></span>, which
6839             means that only recursive
6840             requests from matching clients will match that view.
6841             The order of the <span><strong class="command">view</strong></span> statements is
6842             significant &#8212;
6843             a client request will be resolved in the context of the first
6844             <span><strong class="command">view</strong></span> that it matches.
6845           </p>
6846 <p>
6847             Zones defined within a <span><strong class="command">view</strong></span>
6848             statement will
6849             only be accessible to clients that match the <span><strong class="command">view</strong></span>.
6850             By defining a zone of the same name in multiple views, different
6851             zone data can be given to different clients, for example,
6852             "internal"
6853             and "external" clients in a split DNS setup.
6854           </p>
6855 <p>
6856             Many of the options given in the <span><strong class="command">options</strong></span> statement
6857             can also be used within a <span><strong class="command">view</strong></span>
6858             statement, and then
6859             apply only when resolving queries with that view.  When no
6860             view-specific
6861             value is given, the value in the <span><strong class="command">options</strong></span> statement
6862             is used as a default.  Also, zone options can have default values
6863             specified
6864             in the <span><strong class="command">view</strong></span> statement; these
6865             view-specific defaults
6866             take precedence over those in the <span><strong class="command">options</strong></span> statement.
6867           </p>
6868 <p>
6869             Views are class specific.  If no class is given, class IN
6870             is assumed.  Note that all non-IN views must contain a hint zone,
6871             since only the IN class has compiled-in default hints.
6872           </p>
6873 <p>
6874             If there are no <span><strong class="command">view</strong></span> statements in
6875             the config
6876             file, a default view that matches any client is automatically
6877             created
6878             in class IN. Any <span><strong class="command">zone</strong></span> statements
6879             specified on
6880             the top level of the configuration file are considered to be part
6881             of
6882             this default view, and the <span><strong class="command">options</strong></span>
6883             statement will
6884             apply to the default view. If any explicit <span><strong class="command">view</strong></span>
6885             statements are present, all <span><strong class="command">zone</strong></span>
6886             statements must
6887             occur inside <span><strong class="command">view</strong></span> statements.
6888           </p>
6889 <p>
6890             Here is an example of a typical split DNS setup implemented
6891             using <span><strong class="command">view</strong></span> statements:
6892           </p>
6893 <pre class="programlisting">view "internal" {
6894       // This should match our internal networks.
6895       match-clients { 10.0.0.0/8; };
6896
6897       // Provide recursive service to internal
6898       // clients only.
6899       recursion yes;
6900
6901       // Provide a complete view of the example.com
6902       // zone including addresses of internal hosts.
6903       zone "example.com" {
6904             type master;
6905             file "example-internal.db";
6906       };
6907 };
6908
6909 view "external" {
6910       // Match all clients not matched by the
6911       // previous view.
6912       match-clients { any; };
6913
6914       // Refuse recursive service to external clients.
6915       recursion no;
6916
6917       // Provide a restricted view of the example.com
6918       // zone containing only publicly accessible hosts.
6919       zone "example.com" {
6920            type master;
6921            file "example-external.db";
6922       };
6923 };
6924 </pre>
6925 </div>
6926 <div class="sect2" lang="en">
6927 <div class="titlepage"><div><div><h3 class="title">
6928 <a name="zone_statement_grammar"></a><span><strong class="command">zone</strong></span>
6929             Statement Grammar</h3></div></div></div>
6930 <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>] {
6931     type master;
6932     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6933     [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6934     [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6935     [<span class="optional"> allow-update { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6936     [<span class="optional"> update-check-ksk <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6937     [<span class="optional"> dnssec-dnskey-kskonly <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6938     [<span class="optional"> dnssec-loadkeys-interval <em class="replaceable"><code>number</code></em>; </span>]
6939     [<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>]
6940     [<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>] ;
6941                   [<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>]
6942     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6943     [<span class="optional"> check-mx (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6944     [<span class="optional"> check-wildcard <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6945     [<span class="optional"> check-spf ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
6946     [<span class="optional"> check-integrity <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6947     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
6948     [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
6949     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
6950     [<span class="optional"> journal <em class="replaceable"><code>string</code></em> ; </span>]
6951     [<span class="optional"> max-journal-size <em class="replaceable"><code>size_spec</code></em>; </span>]
6952     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
6953     [<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>]
6954     [<span class="optional"> ixfr-base <em class="replaceable"><code>string</code></em> ; </span>]
6955     [<span class="optional"> ixfr-from-differences <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6956     [<span class="optional"> ixfr-tmp-file <em class="replaceable"><code>string</code></em> ; </span>]
6957     [<span class="optional"> request-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6958     [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6959     [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em> ; </span>]
6960     [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em> ; </span>]
6961     [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em> ; </span>]
6962     [<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>]
6963     [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
6964     [<span class="optional"> notify-to-soa <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6965     [<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>]
6966     [<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>]
6967     [<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>]
6968     [<span class="optional"> zone-statistics <em class="replaceable"><code>full</code></em> | <em class="replaceable"><code>terse</code></em> | <em class="replaceable"><code>none</code></em>; </span>]
6969     [<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>]
6970     [<span class="optional"> sig-signing-nodes <em class="replaceable"><code>number</code></em> ; </span>]
6971     [<span class="optional"> sig-signing-signatures <em class="replaceable"><code>number</code></em> ; </span>]
6972     [<span class="optional"> sig-signing-type <em class="replaceable"><code>number</code></em> ; </span>]
6973     [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
6974     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6975     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6976     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6977     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6978     [<span class="optional"> key-directory <em class="replaceable"><code>path_name</code></em>; </span>]
6979     [<span class="optional"> auto-dnssec <code class="constant">allow</code>|<code class="constant">maintain</code>|<code class="constant">off</code>; </span>]
6980     [<span class="optional"> inline-signing <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6981     [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6982     [<span class="optional"> serial-update-method <code class="constant">increment</code>|<code class="constant">unixtime</code>; </span>]
6983 };
6984
6985 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6986     type slave;
6987     [<span class="optional"> allow-notify { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6988     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6989     [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6990     [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6991     [<span class="optional"> allow-update-forwarding { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6992     [<span class="optional"> dnssec-update-mode ( <em class="replaceable"><code>maintain</code></em> | <em class="replaceable"><code>no-resign</code></em> ); </span>]
6993     [<span class="optional"> update-check-ksk <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6994     [<span class="optional"> dnssec-dnskey-kskonly <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6995     [<span class="optional"> dnssec-loadkeys-interval <em class="replaceable"><code>number</code></em>; </span>]
6996     [<span class="optional"> dnssec-secure-to-insecure <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6997     [<span class="optional"> try-tcp-refresh <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6998     [<span class="optional"> also-notify [<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>
6999                               [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>]
7000                               [<span class="optional">key <em class="replaceable"><code>key</code></em></span>] ) ; [<span class="optional">...</span>] }; </span>]
7001     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
7002     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
7003     [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
7004     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
7005     [<span class="optional"> journal <em class="replaceable"><code>string</code></em> ; </span>]
7006     [<span class="optional"> max-journal-size <em class="replaceable"><code>size_spec</code></em>; </span>]
7007     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
7008     [<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>]
7009     [<span class="optional"> ixfr-base <em class="replaceable"><code>string</code></em> ; </span>]
7010     [<span class="optional"> ixfr-from-differences <em class="replaceable"><code>yes_or_no</code></em>; </span>]
7011     [<span class="optional"> ixfr-tmp-file <em class="replaceable"><code>string</code></em> ; </span>]
7012     [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
7013     [<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>
7014                               [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>]
7015                               [<span class="optional">key <em class="replaceable"><code>key</code></em></span>] ) ; [<span class="optional">...</span>] }; </span>]
7016     [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em> ; </span>]
7017     [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em> ; </span>]
7018     [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em> ; </span>]
7019     [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em> ; </span>]
7020     [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em> ; </span>]
7021     [<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>]
7022     [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
7023     [<span class="optional"> notify-to-soa <em class="replaceable"><code>yes_or_no</code></em>; </span>]
7024     [<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>]
7025     [<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>]
7026     [<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>]
7027     [<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>]
7028     [<span class="optional"> alt-transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
7029                              [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
7030     [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
7031     [<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>]
7032     [<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>]
7033     [<span class="optional"> zone-statistics <em class="replaceable"><code>full</code></em> | <em class="replaceable"><code>terse</code></em> | <em class="replaceable"><code>none</code></em>; </span>]
7034     [<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>]
7035     [<span class="optional"> sig-signing-nodes <em class="replaceable"><code>number</code></em> ; </span>]
7036     [<span class="optional"> sig-signing-signatures <em class="replaceable"><code>number</code></em> ; </span>]
7037     [<span class="optional"> sig-signing-type <em class="replaceable"><code>number</code></em> ; </span>]
7038     [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
7039     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
7040     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
7041     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
7042     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
7043     [<span class="optional"> key-directory <em class="replaceable"><code>path_name</code></em>; </span>]
7044     [<span class="optional"> auto-dnssec <code class="constant">allow</code>|<code class="constant">maintain</code>|<code class="constant">off</code>; </span>]
7045     [<span class="optional"> inline-signing <em class="replaceable"><code>yes_or_no</code></em>; </span>]
7046     [<span class="optional"> multi-master <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
7047     [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
7048 };
7049
7050 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
7051     type hint;
7052     file <em class="replaceable"><code>string</code></em> ;
7053     [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
7054     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>] // Not Implemented.
7055 };
7056
7057 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
7058     type stub;
7059     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
7060     [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
7061     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
7062     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
7063     [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
7064     [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
7065     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
7066     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
7067     [<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>]
7068     [<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>
7069                               [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>]
7070                               [<span class="optional">key <em class="replaceable"><code>key</code></em></span>] ) ; [<span class="optional">...</span>] }; </span>]
7071     [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em> ; </span>]
7072     [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em> ; </span>]
7073     [<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>]
7074     [<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>]
7075     [<span class="optional"> transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
7076                          [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
7077     [<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>]
7078     [<span class="optional"> alt-transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
7079                             [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
7080     [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
7081     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
7082     [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
7083     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
7084     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
7085     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
7086     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
7087     [<span class="optional"> multi-master <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
7088 };
7089
7090 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
7091     type static-stub;
7092     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
7093     [<span class="optional"> server-addresses { [<span class="optional"> <em class="replaceable"><code>ip_addr</code></em> ; ... </span>] }; </span>]
7094     [<span class="optional"> server-names { [<span class="optional"> <em class="replaceable"><code>namelist</code></em> </span>] }; </span>]  
7095     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
7096 };
7097
7098 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
7099     type forward;
7100     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
7101     [<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>]
7102     [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
7103 };
7104
7105 zone <em class="replaceable"><code>"."</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
7106     type redirect;
7107     file <em class="replaceable"><code>string</code></em> ;
7108     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
7109     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
7110 };
7111
7112 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
7113     type delegation-only;
7114 };
7115
7116 </pre>
7117 </div>
7118 <div class="sect2" lang="en">
7119 <div class="titlepage"><div><div><h3 class="title">
7120 <a name="id2592813"></a><span><strong class="command">zone</strong></span> Statement Definition and Usage</h3></div></div></div>
7121 <div class="sect3" lang="en">
7122 <div class="titlepage"><div><div><h4 class="title">
7123 <a name="id2592821"></a>Zone Types</h4></div></div></div>
7124 <div class="informaltable"><table border="1">
7125 <colgroup>
7126 <col>
7127 <col>
7128 </colgroup>
7129 <tbody>
7130 <tr>
7131 <td>
7132                       <p>
7133                         <code class="varname">master</code>
7134                       </p>
7135                     </td>
7136 <td>
7137                       <p>
7138                         The server has a master copy of the data
7139                         for the zone and will be able to provide authoritative
7140                         answers for
7141                         it.
7142                       </p>
7143                     </td>
7144 </tr>
7145 <tr>
7146 <td>
7147                       <p>
7148                         <code class="varname">slave</code>
7149                       </p>
7150                     </td>
7151 <td>
7152                       <p>
7153                         A slave zone is a replica of a master
7154                         zone. The <span><strong class="command">masters</strong></span> list
7155                         specifies one or more IP addresses
7156                         of master servers that the slave contacts to update
7157                         its copy of the zone.
7158                         Masters list elements can also be names of other
7159                         masters lists.
7160                         By default, transfers are made from port 53 on the
7161                         servers; this can
7162                         be changed for all servers by specifying a port number
7163                         before the
7164                         list of IP addresses, or on a per-server basis after
7165                         the IP address.
7166                         Authentication to the master can also be done with
7167                         per-server TSIG keys.
7168                         If a file is specified, then the
7169                         replica will be written to this file whenever the zone
7170                         is changed,
7171                         and reloaded from this file on a server restart. Use
7172                         of a file is
7173                         recommended, since it often speeds server startup and
7174                         eliminates
7175                         a needless waste of bandwidth. Note that for large
7176                         numbers (in the
7177                         tens or hundreds of thousands) of zones per server, it
7178                         is best to
7179                         use a two-level naming scheme for zone filenames. For
7180                         example,
7181                         a slave server for the zone <code class="literal">example.com</code> might place
7182                         the zone contents into a file called
7183                         <code class="filename">ex/example.com</code> where <code class="filename">ex/</code> is
7184                         just the first two letters of the zone name. (Most
7185                         operating systems
7186                         behave very slowly if you put 100000 files into
7187                         a single directory.)
7188                       </p>
7189                     </td>
7190 </tr>
7191 <tr>
7192 <td>
7193                       <p>
7194                         <code class="varname">stub</code>
7195                       </p>
7196                     </td>
7197 <td>
7198                       <p>
7199                         A stub zone is similar to a slave zone,
7200                         except that it replicates only the NS records of a
7201                         master zone instead
7202                         of the entire zone. Stub zones are not a standard part
7203                         of the DNS;
7204                         they are a feature specific to the <acronym class="acronym">BIND</acronym> implementation.
7205                       </p>
7206
7207                       <p>
7208                         Stub zones can be used to eliminate the need for glue
7209                         NS record
7210                         in a parent zone at the expense of maintaining a stub
7211                         zone entry and
7212                         a set of name server addresses in <code class="filename">named.conf</code>.
7213                         This usage is not recommended for new configurations,
7214                         and BIND 9
7215                         supports it only in a limited way.
7216                         In <acronym class="acronym">BIND</acronym> 4/8, zone
7217                         transfers of a parent zone
7218                         included the NS records from stub children of that
7219                         zone. This meant
7220                         that, in some cases, users could get away with
7221                         configuring child stubs
7222                         only in the master server for the parent zone. <acronym class="acronym">BIND</acronym>
7223                         9 never mixes together zone data from different zones
7224                         in this
7225                         way. Therefore, if a <acronym class="acronym">BIND</acronym> 9 master serving a parent
7226                         zone has child stub zones configured, all the slave
7227                         servers for the
7228                         parent zone also need to have the same child stub
7229                         zones
7230                         configured.
7231                       </p>
7232
7233                       <p>
7234                         Stub zones can also be used as a way of forcing the
7235                         resolution
7236                         of a given domain to use a particular set of
7237                         authoritative servers.
7238                         For example, the caching name servers on a private
7239                         network using
7240                         RFC1918 addressing may be configured with stub zones
7241                         for
7242                         <code class="literal">10.in-addr.arpa</code>
7243                         to use a set of internal name servers as the
7244                         authoritative
7245                         servers for that domain.
7246                       </p>
7247                     </td>
7248 </tr>
7249 <tr>
7250 <td>
7251                       <p>
7252                         <code class="varname">static-stub</code>
7253                       </p>
7254                     </td>
7255 <td>
7256                       <p>
7257                         A static-stub zone is similar to a stub zone
7258                         with the following exceptions:
7259                         the zone data is statically configured, rather
7260                         than transferred from a master server;
7261                         when recursion is necessary for a query that
7262                         matches a static-stub zone, the locally
7263                         configured data (nameserver names and glue addresses)
7264                         is always used even if different authoritative
7265                         information is cached.
7266                       </p>
7267                       <p>
7268                         Zone data is configured via the
7269                         <span><strong class="command">server-addresses</strong></span> and
7270                         <span><strong class="command">server-names</strong></span> zone options.
7271                       </p>
7272                       <p>
7273                         The zone data is maintained in the form of NS
7274                         and (if necessary) glue A or AAAA RRs
7275                         internally, which can be seen by dumping zone
7276                         databases by <span><strong class="command">rndc dumpdb -all</strong></span>.
7277                         The configured RRs are considered local configuration
7278                         parameters rather than public data.
7279                         Non recursive queries (i.e., those with the RD
7280                         bit off) to a static-stub zone are therefore
7281                         prohibited and will be responded with REFUSED.
7282                       </p>
7283                       <p>
7284                         Since the data is statically configured, no
7285                         zone maintenance action takes place for a static-stub
7286                         zone.
7287                         For example, there is no periodic refresh
7288                         attempt, and an incoming notify message
7289                         will be rejected with an rcode of NOTAUTH.
7290                       </p>
7291                       <p>
7292                         Each static-stub zone is configured with
7293                         internally generated NS and (if necessary)
7294                         glue A or AAAA RRs 
7295                       </p>
7296                     </td>
7297 </tr>
7298 <tr>
7299 <td>
7300                       <p>
7301                         <code class="varname">forward</code>
7302                       </p>
7303                     </td>
7304 <td>
7305                       <p>
7306                         A "forward zone" is a way to configure
7307                         forwarding on a per-domain basis.  A <span><strong class="command">zone</strong></span> statement
7308                         of type <span><strong class="command">forward</strong></span> can
7309                         contain a <span><strong class="command">forward</strong></span>
7310                         and/or <span><strong class="command">forwarders</strong></span>
7311                         statement,
7312                         which will apply to queries within the domain given by
7313                         the zone
7314                         name. If no <span><strong class="command">forwarders</strong></span>
7315                         statement is present or
7316                         an empty list for <span><strong class="command">forwarders</strong></span> is given, then no
7317                         forwarding will be done for the domain, canceling the
7318                         effects of
7319                         any forwarders in the <span><strong class="command">options</strong></span> statement. Thus
7320                         if you want to use this type of zone to change the
7321                         behavior of the
7322                         global <span><strong class="command">forward</strong></span> option
7323                         (that is, "forward first"
7324                         to, then "forward only", or vice versa, but want to
7325                         use the same
7326                         servers as set globally) you need to re-specify the
7327                         global forwarders.
7328                       </p>
7329                     </td>
7330 </tr>
7331 <tr>
7332 <td>
7333                       <p>
7334                         <code class="varname">hint</code>
7335                       </p>
7336                     </td>
7337 <td>
7338                       <p>
7339                         The initial set of root name servers is
7340                         specified using a "hint zone". When the server starts
7341                         up, it uses
7342                         the root hints to find a root name server and get the
7343                         most recent
7344                         list of root name servers. If no hint zone is
7345                         specified for class
7346                         IN, the server uses a compiled-in default set of root
7347                         servers hints.
7348                         Classes other than IN have no built-in defaults hints.
7349                       </p>
7350                     </td>
7351 </tr>
7352 <tr>
7353 <td>
7354                       <p>
7355                         <code class="varname">redirect</code>
7356                       </p>
7357                     </td>
7358 <td>
7359                       <p>
7360                         Redirect zones are used to provide answers to
7361                         queries when normal resolution would result in
7362                         NXDOMAIN being returned.
7363                         Only one redirect zone is supported
7364                         per view.  <span><strong class="command">allow-query</strong></span> can be
7365                         used to restrict which clients see these answers.
7366                       </p>
7367                       <p>
7368                         If the client has requested DNSSEC records (DO=1) and
7369                         the NXDOMAIN response is signed then no substitution
7370                         will occur.
7371                       </p>
7372                       <p>
7373                         To redirect all NXDOMAIN responses to
7374                         100.100.100.2 and
7375                         2001:ffff:ffff::100.100.100.2, one would
7376                         configure a type redirect zone named ".",
7377                         with the zone file containing wildcard records
7378                         that point to the desired addresses: 
7379                         <code class="literal">"*. IN A 100.100.100.2"</code>
7380                         and
7381                         <code class="literal">"*. IN AAAA 2001:ffff:ffff::100.100.100.2"</code>.
7382                       </p>
7383                       <p>
7384                         To redirect all Spanish names (under .ES) one
7385                         would use similar entries but with the names
7386                         "*.ES." instead of "*.".  To redirect all 
7387                         commercial Spanish names (under COM.ES) one
7388                         would use wildcard entries called "*.COM.ES.".
7389                       </p>
7390                       <p>
7391                         Note that the redirect zone supports all
7392                         possible types; it is not limited to A and
7393                         AAAA records.
7394                       </p>
7395                       <p>
7396                         Because redirect zones are not referenced
7397                         directly by name, they are not kept in the
7398                         zone lookup table with normal master and slave
7399                         zones. Consequently, it is not currently possible
7400                         to use
7401                         <span><strong class="command">rndc reload
7402                                 <em class="replaceable"><code>zonename</code></em></strong></span>
7403                         to reload a redirect zone.  However, when using
7404                         <span><strong class="command">rndc reload</strong></span> without specifying
7405                         a zone name, redirect zones will be reloaded along
7406                         with other zones.
7407                       </p>
7408                     </td>
7409 </tr>
7410 <tr>
7411 <td>
7412                       <p>
7413                         <code class="varname">delegation-only</code>
7414                       </p>
7415                     </td>
7416 <td>
7417                       <p>
7418                         This is used to enforce the delegation-only
7419                         status of infrastructure zones (e.g. COM,
7420                         NET, ORG).  Any answer that is received
7421                         without an explicit or implicit delegation
7422                         in the authority section will be treated
7423                         as NXDOMAIN.  This does not apply to the
7424                         zone apex.  This should not be applied to
7425                         leaf zones.
7426                       </p>
7427                       <p>
7428                         <code class="varname">delegation-only</code> has no
7429                         effect on answers received from forwarders.
7430                       </p>
7431                       <p>
7432                         See caveats in <a href="Bv9ARM.ch06.html#root_delegation_only"><span><strong class="command">root-delegation-only</strong></span></a>.
7433                       </p>
7434                     </td>
7435 </tr>
7436 </tbody>
7437 </table></div>
7438 </div>
7439 <div class="sect3" lang="en">
7440 <div class="titlepage"><div><div><h4 class="title">
7441 <a name="id2593429"></a>Class</h4></div></div></div>
7442 <p>
7443               The zone's name may optionally be followed by a class. If
7444               a class is not specified, class <code class="literal">IN</code> (for <code class="varname">Internet</code>),
7445               is assumed. This is correct for the vast majority of cases.
7446             </p>
7447 <p>
7448               The <code class="literal">hesiod</code> class is
7449               named for an information service from MIT's Project Athena. It
7450               is
7451               used to share information about various systems databases, such
7452               as users, groups, printers and so on. The keyword
7453               <code class="literal">HS</code> is
7454               a synonym for hesiod.
7455             </p>
7456 <p>
7457               Another MIT development is Chaosnet, a LAN protocol created
7458               in the mid-1970s. Zone data for it can be specified with the <code class="literal">CHAOS</code> class.
7459             </p>
7460 </div>
7461 <div class="sect3" lang="en">
7462 <div class="titlepage"><div><div><h4 class="title">
7463 <a name="id2593462"></a>Zone Options</h4></div></div></div>
7464 <div class="variablelist"><dl>
7465 <dt><span class="term"><span><strong class="command">allow-notify</strong></span></span></dt>
7466 <dd><p>
7467                     See the description of
7468                     <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>.
7469                   </p></dd>
7470 <dt><span class="term"><span><strong class="command">allow-query</strong></span></span></dt>
7471 <dd><p>
7472                     See the description of
7473                     <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>.
7474                   </p></dd>
7475 <dt><span class="term"><span><strong class="command">allow-query-on</strong></span></span></dt>
7476 <dd><p>
7477                     See the description of
7478                     <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>.
7479                   </p></dd>
7480 <dt><span class="term"><span><strong class="command">allow-transfer</strong></span></span></dt>
7481 <dd><p>
7482                     See the description of <span><strong class="command">allow-transfer</strong></span>
7483                     in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
7484                   </p></dd>
7485 <dt><span class="term"><span><strong class="command">allow-update</strong></span></span></dt>
7486 <dd><p>
7487                     See the description of <span><strong class="command">allow-update</strong></span>
7488                     in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
7489                   </p></dd>
7490 <dt><span class="term"><span><strong class="command">update-policy</strong></span></span></dt>
7491 <dd><p>
7492                     Specifies a "Simple Secure Update" policy. See
7493                     <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called &#8220;Dynamic Update Policies&#8221;</a>.
7494                   </p></dd>
7495 <dt><span class="term"><span><strong class="command">allow-update-forwarding</strong></span></span></dt>
7496 <dd><p>
7497                     See the description of <span><strong class="command">allow-update-forwarding</strong></span>
7498                     in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
7499                   </p></dd>
7500 <dt><span class="term"><span><strong class="command">also-notify</strong></span></span></dt>
7501 <dd><p>
7502                     Only meaningful if <span><strong class="command">notify</strong></span>
7503                     is
7504                     active for this zone. The set of machines that will
7505                     receive a
7506                     <code class="literal">DNS NOTIFY</code> message
7507                     for this zone is made up of all the listed name servers
7508                     (other than
7509                     the primary master) for the zone plus any IP addresses
7510                     specified
7511                     with <span><strong class="command">also-notify</strong></span>. A port
7512                     may be specified
7513                     with each <span><strong class="command">also-notify</strong></span>
7514                     address to send the notify
7515                     messages to a port other than the default of 53.
7516                     A TSIG key may also be specified to cause the
7517                     <code class="literal">NOTIFY</code> to be signed by the
7518                     given key.
7519                     <span><strong class="command">also-notify</strong></span> is not
7520                     meaningful for stub zones.
7521                     The default is the empty list.
7522                   </p></dd>
7523 <dt><span class="term"><span><strong class="command">check-names</strong></span></span></dt>
7524 <dd><p>
7525                     This option is used to restrict the character set and
7526                     syntax of
7527                     certain domain names in master files and/or DNS responses
7528                     received from the
7529                     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>
7530                     zones the default is <span><strong class="command">warn</strong></span>.
7531                     It is not implemented for <span><strong class="command">hint</strong></span> zones.
7532                   </p></dd>
7533 <dt><span class="term"><span><strong class="command">check-mx</strong></span></span></dt>
7534 <dd><p>
7535                     See the description of
7536                     <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>.
7537                   </p></dd>
7538 <dt><span class="term"><span><strong class="command">check-spf</strong></span></span></dt>
7539 <dd><p>
7540                     See the description of
7541                     <span><strong class="command">check-spf</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
7542                   </p></dd>
7543 <dt><span class="term"><span><strong class="command">check-wildcard</strong></span></span></dt>
7544 <dd><p>
7545                     See the description of
7546                     <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>.
7547                   </p></dd>
7548 <dt><span class="term"><span><strong class="command">check-integrity</strong></span></span></dt>
7549 <dd><p>
7550                     See the description of
7551                     <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>.
7552                   </p></dd>
7553 <dt><span class="term"><span><strong class="command">check-sibling</strong></span></span></dt>
7554 <dd><p>
7555                     See the description of
7556                     <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>.
7557                   </p></dd>
7558 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl</strong></span></span></dt>
7559 <dd><p>
7560                     See the description of
7561                     <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>.
7562                   </p></dd>
7563 <dt><span class="term"><span><strong class="command">update-check-ksk</strong></span></span></dt>
7564 <dd><p>
7565                     See the description of
7566                     <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>.
7567                   </p></dd>
7568 <dt><span class="term"><span><strong class="command">dnssec-update-mode</strong></span></span></dt>
7569 <dd><p>
7570                     See the description of
7571                     <span><strong class="command">dnssec-update-mode</strong></span> in <a href="Bv9ARM.ch06.html#options" title="options Statement Definition and
7572           Usage">the section called &#8220;<span><strong class="command">options</strong></span> Statement Definition and
7573           Usage&#8221;</a>.
7574                   </p></dd>
7575 <dt><span class="term"><span><strong class="command">dnssec-dnskey-kskonly</strong></span></span></dt>
7576 <dd><p>
7577                     See the description of
7578                     <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>.
7579                   </p></dd>
7580 <dt><span class="term"><span><strong class="command">try-tcp-refresh</strong></span></span></dt>
7581 <dd><p>
7582                     See the description of
7583                     <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>.
7584                   </p></dd>
7585 <dt><span class="term"><span><strong class="command">database</strong></span></span></dt>
7586 <dd>
7587 <p>
7588                     Specify the type of database to be used for storing the
7589                     zone data.  The string following the <span><strong class="command">database</strong></span> keyword
7590                     is interpreted as a list of whitespace-delimited words.
7591                     The first word
7592                     identifies the database type, and any subsequent words are
7593                     passed
7594                     as arguments to the database to be interpreted in a way
7595                     specific
7596                     to the database type.
7597                   </p>
7598 <p>
7599                     The default is <strong class="userinput"><code>"rbt"</code></strong>, BIND 9's
7600                     native in-memory
7601                     red-black-tree database.  This database does not take
7602                     arguments.
7603                   </p>
7604 <p>
7605                     Other values are possible if additional database drivers
7606                     have been linked into the server.  Some sample drivers are
7607                     included
7608                     with the distribution but none are linked in by default.
7609                   </p>
7610 </dd>
7611 <dt><span class="term"><span><strong class="command">dialup</strong></span></span></dt>
7612 <dd><p>
7613                     See the description of
7614                     <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>.
7615                   </p></dd>
7616 <dt><span class="term"><span><strong class="command">delegation-only</strong></span></span></dt>
7617 <dd>
7618 <p>
7619                     The flag only applies to hint and stub zones.  If set
7620                     to <strong class="userinput"><code>yes</code></strong>, then the zone will also be
7621                     treated as if it is also a delegation-only type zone.
7622                   </p>
7623 <p>
7624                     See caveats in <a href="Bv9ARM.ch06.html#root_delegation_only"><span><strong class="command">root-delegation-only</strong></span></a>.
7625                   </p>
7626 </dd>
7627 <dt><span class="term"><span><strong class="command">forward</strong></span></span></dt>
7628 <dd><p>
7629                     Only meaningful if the zone has a forwarders
7630                     list. The <span><strong class="command">only</strong></span> value causes
7631                     the lookup to fail
7632                     after trying the forwarders and getting no answer, while <span><strong class="command">first</strong></span> would
7633                     allow a normal lookup to be tried.
7634                   </p></dd>
7635 <dt><span class="term"><span><strong class="command">forwarders</strong></span></span></dt>
7636 <dd><p>
7637                     Used to override the list of global forwarders.
7638                     If it is not specified in a zone of type <span><strong class="command">forward</strong></span>,
7639                     no forwarding is done for the zone and the global options are
7640                     not used.
7641                   </p></dd>
7642 <dt><span class="term"><span><strong class="command">ixfr-base</strong></span></span></dt>
7643 <dd><p>
7644                     Was used in <acronym class="acronym">BIND</acronym> 8 to
7645                     specify the name
7646                     of the transaction log (journal) file for dynamic update
7647                     and IXFR.
7648                     <acronym class="acronym">BIND</acronym> 9 ignores the option
7649                     and constructs the name of the journal
7650                     file by appending "<code class="filename">.jnl</code>"
7651                     to the name of the
7652                     zone file.
7653                   </p></dd>
7654 <dt><span class="term"><span><strong class="command">ixfr-tmp-file</strong></span></span></dt>
7655 <dd><p>
7656                     Was an undocumented option in <acronym class="acronym">BIND</acronym> 8.
7657                     Ignored in <acronym class="acronym">BIND</acronym> 9.
7658                   </p></dd>
7659 <dt><span class="term"><span><strong class="command">journal</strong></span></span></dt>
7660 <dd><p>
7661                     Allow the default journal's filename to be overridden.
7662                     The default is the zone's filename with "<code class="filename">.jnl</code>" appended.
7663                     This is applicable to <span><strong class="command">master</strong></span> and <span><strong class="command">slave</strong></span> zones.
7664                   </p></dd>
7665 <dt><span class="term"><span><strong class="command">max-journal-size</strong></span></span></dt>
7666 <dd><p>
7667                     See the description of
7668                     <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>.
7669                   </p></dd>
7670 <dt><span class="term"><span><strong class="command">max-transfer-time-in</strong></span></span></dt>
7671 <dd><p>
7672                     See the description of
7673                     <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>.
7674                   </p></dd>
7675 <dt><span class="term"><span><strong class="command">max-transfer-idle-in</strong></span></span></dt>
7676 <dd><p>
7677                     See the description of
7678                     <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>.
7679                   </p></dd>
7680 <dt><span class="term"><span><strong class="command">max-transfer-time-out</strong></span></span></dt>
7681 <dd><p>
7682                     See the description of
7683                     <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>.
7684                   </p></dd>
7685 <dt><span class="term"><span><strong class="command">max-transfer-idle-out</strong></span></span></dt>
7686 <dd><p>
7687                     See the description of
7688                     <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>.
7689                   </p></dd>
7690 <dt><span class="term"><span><strong class="command">notify</strong></span></span></dt>
7691 <dd><p>
7692                     See the description of
7693                     <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>.
7694                   </p></dd>
7695 <dt><span class="term"><span><strong class="command">notify-delay</strong></span></span></dt>
7696 <dd><p>
7697                     See the description of
7698                     <span><strong class="command">notify-delay</strong></span> in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
7699                   </p></dd>
7700 <dt><span class="term"><span><strong class="command">notify-to-soa</strong></span></span></dt>
7701 <dd><p>
7702                     See the description of
7703                     <span><strong class="command">notify-to-soa</strong></span> in
7704                     <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
7705                   </p></dd>
7706 <dt><span class="term"><span><strong class="command">pubkey</strong></span></span></dt>
7707 <dd><p>
7708                     In <acronym class="acronym">BIND</acronym> 8, this option was
7709                     intended for specifying
7710                     a public zone key for verification of signatures in DNSSEC
7711                     signed
7712                     zones when they are loaded from disk. <acronym class="acronym">BIND</acronym> 9 does not verify signatures
7713                     on load and ignores the option.
7714                   </p></dd>
7715 <dt><span class="term"><span><strong class="command">zone-statistics</strong></span></span></dt>
7716 <dd><p>
7717                     If <strong class="userinput"><code>yes</code></strong>, the server will keep
7718                     statistical
7719                     information for this zone, which can be dumped to the
7720                     <span><strong class="command">statistics-file</strong></span> defined in
7721                     the server options.
7722                   </p></dd>
7723 <dt><span class="term"><span><strong class="command">server-addresses</strong></span></span></dt>
7724 <dd>
7725 <p>
7726                     Only meaningful for static-stub zones.
7727                     This is a list of IP addresses to which queries
7728                     should be sent in recursive resolution for the
7729                     zone.
7730                     A non empty list for this option will internally
7731                     configure the apex NS RR with associated glue A or
7732                     AAAA RRs.
7733                   </p>
7734 <p>
7735                     For example, if "example.com" is configured as a
7736                     static-stub zone with 192.0.2.1 and 2001:db8::1234
7737                     in a <span><strong class="command">server-addresses</strong></span> option,
7738                     the following RRs will be internally configured.
7739                   </p>
7740 <pre class="programlisting">example.com. NS example.com.
7741 example.com. A 192.0.2.1
7742 example.com. AAAA 2001:db8::1234</pre>
7743 <p>
7744                     These records are internally used to resolve
7745                     names under the static-stub zone.
7746                     For instance, if the server receives a query for
7747                     "www.example.com" with the RD bit on, the server
7748                     will initiate recursive resolution and send
7749                     queries to 192.0.2.1 and/or 2001:db8::1234.
7750                   </p>
7751 </dd>
7752 <dt><span class="term"><span><strong class="command">server-names</strong></span></span></dt>
7753 <dd>
7754 <p>
7755                     Only meaningful for static-stub zones.
7756                     This is a list of domain names of nameservers that
7757                     act as authoritative servers of the static-stub
7758                     zone.
7759                     These names will be resolved to IP addresses when
7760                     <span><strong class="command">named</strong></span> needs to send queries to
7761                     these servers.
7762                     To make this supplemental resolution successful,
7763                     these names must not be a subdomain of the origin
7764                     name of static-stub zone.
7765                     That is, when "example.net" is the origin of a
7766                     static-stub zone, "ns.example" and
7767                     "master.example.com" can be specified in the
7768                     <span><strong class="command">server-names</strong></span> option, but
7769                     "ns.example.net" cannot, and will be rejected by
7770                     the configuration parser.
7771                   </p>
7772 <p>
7773                     A non empty list for this option will internally
7774                     configure the apex NS RR with the specified names.
7775                     For example, if "example.com" is configured as a
7776                     static-stub zone with "ns1.example.net" and
7777                     "ns2.example.net"
7778                     in a <span><strong class="command">server-names</strong></span> option,
7779                     the following RRs will be internally configured.
7780                   </p>
7781 <pre class="programlisting">example.com. NS ns1.example.net.
7782 example.com. NS ns2.example.net.
7783 </pre>
7784 <p>
7785                     These records are internally used to resolve
7786                     names under the static-stub zone.
7787                     For instance, if the server receives a query for
7788                     "www.example.com" with the RD bit on, the server
7789                     initiate recursive resolution,
7790                     resolve "ns1.example.net" and/or
7791                     "ns2.example.net" to IP addresses, and then send
7792                     queries to (one or more of) these addresses.
7793                   </p>
7794 </dd>
7795 <dt><span class="term"><span><strong class="command">sig-validity-interval</strong></span></span></dt>
7796 <dd><p>
7797                     See the description of
7798                     <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>.
7799                   </p></dd>
7800 <dt><span class="term"><span><strong class="command">sig-signing-nodes</strong></span></span></dt>
7801 <dd><p>
7802                     See the description of
7803                     <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>.
7804                   </p></dd>
7805 <dt><span class="term"><span><strong class="command">sig-signing-signatures</strong></span></span></dt>
7806 <dd><p>
7807                     See the description of
7808                     <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>.
7809                   </p></dd>
7810 <dt><span class="term"><span><strong class="command">sig-signing-type</strong></span></span></dt>
7811 <dd><p>
7812                     See the description of
7813                     <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>.
7814                   </p></dd>
7815 <dt><span class="term"><span><strong class="command">transfer-source</strong></span></span></dt>
7816 <dd><p>
7817                     See the description of
7818                     <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>.
7819                   </p></dd>
7820 <dt><span class="term"><span><strong class="command">transfer-source-v6</strong></span></span></dt>
7821 <dd><p>
7822                     See the description of
7823                     <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>.
7824                   </p></dd>
7825 <dt><span class="term"><span><strong class="command">alt-transfer-source</strong></span></span></dt>
7826 <dd><p>
7827                     See the description of
7828                     <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>.
7829                   </p></dd>
7830 <dt><span class="term"><span><strong class="command">alt-transfer-source-v6</strong></span></span></dt>
7831 <dd><p>
7832                     See the description of
7833                     <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>.
7834                   </p></dd>
7835 <dt><span class="term"><span><strong class="command">use-alt-transfer-source</strong></span></span></dt>
7836 <dd><p>
7837                     See the description of
7838                     <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>.
7839                   </p></dd>
7840 <dt><span class="term"><span><strong class="command">notify-source</strong></span></span></dt>
7841 <dd><p>
7842                     See the description of
7843                     <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>.
7844                   </p></dd>
7845 <dt><span class="term"><span><strong class="command">notify-source-v6</strong></span></span></dt>
7846 <dd><p>
7847                     See the description of
7848                     <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>.
7849                   </p></dd>
7850 <dt>
7851 <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>
7852 </dt>
7853 <dd><p>
7854                     See the description in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
7855                   </p></dd>
7856 <dt><span class="term"><span><strong class="command">ixfr-from-differences</strong></span></span></dt>
7857 <dd><p>
7858                     See the description of
7859                     <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>.
7860                     (Note that the <span><strong class="command">ixfr-from-differences</strong></span>
7861                     <strong class="userinput"><code>master</code></strong> and
7862                     <strong class="userinput"><code>slave</code></strong> choices are not
7863                     available at the zone level.)
7864                   </p></dd>
7865 <dt><span class="term"><span><strong class="command">key-directory</strong></span></span></dt>
7866 <dd><p>
7867                     See the description of
7868                     <span><strong class="command">key-directory</strong></span> in <a href="Bv9ARM.ch06.html#options" title="options Statement Definition and
7869           Usage">the section called &#8220;<span><strong class="command">options</strong></span> Statement Definition and
7870           Usage&#8221;</a>.
7871                   </p></dd>
7872 <dt><span class="term"><span><strong class="command">auto-dnssec</strong></span></span></dt>
7873 <dd>
7874 <p>
7875                     Zones configured for dynamic DNS may also use this
7876                     option to allow varying levels of automatic DNSSEC key
7877                     management. There are three possible settings:
7878                   </p>
7879 <p>
7880                     <span><strong class="command">auto-dnssec allow;</strong></span> permits
7881                     keys to be updated and the zone fully re-signed
7882                     whenever the user issues the command <span><strong class="command">rndc sign
7883                     <em class="replaceable"><code>zonename</code></em></strong></span>.
7884                   </p>
7885 <p>
7886                     <span><strong class="command">auto-dnssec maintain;</strong></span> includes the
7887                     above, but also automatically adjusts the zone's DNSSEC
7888                     keys on schedule, according to the keys' timing metadata
7889                     (see <a href="man.dnssec-keygen.html" title="dnssec-keygen"><span class="refentrytitle"><span class="application">dnssec-keygen</span></span>(8)</a> and
7890                     <a href="man.dnssec-settime.html" title="dnssec-settime"><span class="refentrytitle"><span class="application">dnssec-settime</span></span>(8)</a>).  The command
7891                     <span><strong class="command">rndc sign
7892                     <em class="replaceable"><code>zonename</code></em></strong></span> causes
7893                     <span><strong class="command">named</strong></span> to load keys from the key
7894                     repository and sign the zone with all keys that are
7895                     active. 
7896                     <span><strong class="command">rndc loadkeys
7897                     <em class="replaceable"><code>zonename</code></em></strong></span> causes
7898                     <span><strong class="command">named</strong></span> to load keys from the key
7899                     repository and schedule key maintenance events to occur
7900                     in the future, but it does not sign the full zone
7901                     immediately.  Note: once keys have been loaded for a
7902                     zone the first time, the repository will be searched
7903                     for changes periodically, regardless of whether
7904                     <span><strong class="command">rndc loadkeys</strong></span> is used.  The recheck
7905                     interval is defined by
7906                     <span><strong class="command">dnssec-loadkeys-interval</strong></span>.)
7907                   </p>
7908 <p>
7909                     The default setting is <span><strong class="command">auto-dnssec off</strong></span>.
7910                   </p>
7911 </dd>
7912 <dt><span class="term"><span><strong class="command">serial-update-method</strong></span></span></dt>
7913 <dd>
7914 <p>
7915                     Zones configured for dynamic DNS may use this
7916                     option to set the update method that will be used for
7917                     the zone serial number in the SOA record.
7918                   </p>
7919 <p>
7920                     With the default setting of
7921                     <span><strong class="command">serial-update-method increment;</strong></span>, the
7922                     SOA serial number will be incremented by one each time
7923                     the zone is updated.
7924                   </p>
7925 <p>
7926                     When set to 
7927                     <span><strong class="command">serial-update-method unixtime;</strong></span>, the
7928                     SOA serial number will be set to the number of seconds
7929                     since the UNIX epoch, unless the serial number is
7930                     already greater than or equal to that value, in which
7931                     case it is simply incremented by one.
7932                   </p>
7933 </dd>
7934 <dt><span class="term"><span><strong class="command">inline-signing</strong></span></span></dt>
7935 <dd><p>
7936                     If <code class="literal">yes</code>, this enables
7937                     "bump in the wire" signing of a zone, where a
7938                     unsigned zone is transferred in or loaded from
7939                     disk and a signed version of the zone is served,
7940                     with possibly, a different serial number.  This
7941                     behaviour is disabled by default.
7942                   </p></dd>
7943 <dt><span class="term"><span><strong class="command">multi-master</strong></span></span></dt>
7944 <dd><p>
7945                     See the description of <span><strong class="command">multi-master</strong></span> in
7946                     <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
7947                   </p></dd>
7948 <dt><span class="term"><span><strong class="command">masterfile-format</strong></span></span></dt>
7949 <dd><p>
7950                     See the description of <span><strong class="command">masterfile-format</strong></span>
7951                     in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
7952                   </p></dd>
7953 <dt><span class="term"><span><strong class="command">dnssec-secure-to-insecure</strong></span></span></dt>
7954 <dd><p>
7955                     See the description of
7956                     <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>.
7957                   </p></dd>
7958 </dl></div>
7959 </div>
7960 <div class="sect3" lang="en">
7961 <div class="titlepage"><div><div><h4 class="title">
7962 <a name="dynamic_update_policies"></a>Dynamic Update Policies</h4></div></div></div>
7963 <p><acronym class="acronym">BIND</acronym> 9 supports two alternative
7964               methods of granting clients the right to perform
7965               dynamic updates to a zone, configured by the
7966               <span><strong class="command">allow-update</strong></span> and
7967               <span><strong class="command">update-policy</strong></span> option, respectively.
7968             </p>
7969 <p>
7970               The <span><strong class="command">allow-update</strong></span> clause works the
7971               same way as in previous versions of <acronym class="acronym">BIND</acronym>.
7972               It grants given clients the permission to update any
7973               record of any name in the zone.
7974             </p>
7975 <p>
7976               The <span><strong class="command">update-policy</strong></span> clause
7977               allows more fine-grained control over what updates are
7978               allowed.  A set of rules is specified, where each rule
7979               either grants or denies permissions for one or more
7980               names to be updated by one or more identities.  If
7981               the dynamic update request message is signed (that is,
7982               it includes either a TSIG or SIG(0) record), the
7983               identity of the signer can be determined.
7984             </p>
7985 <p>
7986               Rules are specified in the <span><strong class="command">update-policy</strong></span>
7987               zone option, and are only meaningful for master zones.
7988               When the <span><strong class="command">update-policy</strong></span> statement
7989               is present, it is a configuration error for the
7990               <span><strong class="command">allow-update</strong></span> statement to be
7991               present.  The <span><strong class="command">update-policy</strong></span> statement
7992               only examines the signer of a message; the source
7993               address is not relevant.
7994             </p>
7995 <p>
7996               There is a pre-defined <span><strong class="command">update-policy</strong></span>
7997               rule which can be switched on with the command
7998               <span><strong class="command">update-policy local;</strong></span>.
7999               Switching on this rule in a zone causes
8000               <span><strong class="command">named</strong></span> to generate a TSIG session
8001               key and place it in a file, and to allow that key
8002               to update the zone.  (By default, the file is
8003               <code class="filename">/var/run/named/session.key</code>, the key
8004               name is "local-ddns" and the key algorithm is HMAC-SHA256,
8005               but these values are configurable with the
8006               <span><strong class="command">session-keyfile</strong></span>,
8007               <span><strong class="command">session-keyname</strong></span> and
8008               <span><strong class="command">session-keyalg</strong></span> options, respectively).
8009             </p>
8010 <p>
8011               A client running on the local system, and with appropriate
8012               permissions, may read that file and use the key to sign update
8013               requests.  The zone's update policy will be set to allow that
8014               key to change any record within the zone.  Assuming the
8015               key name is "local-ddns", this policy is equivalent to:
8016             </p>
8017 <pre class="programlisting">update-policy { grant local-ddns zonesub any; };
8018             </pre>
8019 <p>
8020               The command <span><strong class="command">nsupdate -l</strong></span> sends update
8021               requests to localhost, and signs them using the session key.
8022             </p>
8023 <p>
8024               Other rule definitions look like this:
8025             </p>
8026 <pre class="programlisting">
8027 ( <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>]
8028 </pre>
8029 <p>
8030               Each rule grants or denies privileges.  Once a message has
8031               successfully matched a rule, the operation is immediately
8032               granted or denied and no further rules are examined.  A rule
8033               is matched when the signer matches the identity field, the
8034               name matches the name field in accordance with the nametype
8035               field, and the type matches the types specified in the type
8036               field.
8037             </p>
8038 <p>
8039               No signer is required for <em class="replaceable"><code>tcp-self</code></em>
8040               or <em class="replaceable"><code>6to4-self</code></em> however the standard
8041               reverse mapping / prefix conversion must match the identity
8042               field.
8043             </p>
8044 <p>
8045               The identity field specifies a name or a wildcard
8046               name.  Normally, this is the name of the TSIG or
8047               SIG(0) key used to sign the update request.  When a
8048               TKEY exchange has been used to create a shared secret,
8049               the identity of the shared secret is the same as the
8050               identity of the key used to authenticate the TKEY
8051               exchange.  TKEY is also the negotiation method used
8052               by GSS-TSIG, which establishes an identity that is
8053               the Kerberos principal of the client, such as
8054               <strong class="userinput"><code>"user@host.domain"</code></strong>.  When the
8055               <em class="replaceable"><code>identity</code></em> field specifies
8056               a wildcard name, it is subject to DNS wildcard
8057               expansion, so the rule will apply to multiple identities.
8058               The <em class="replaceable"><code>identity</code></em> field must
8059               contain a fully-qualified domain name.
8060             </p>
8061 <p>
8062               For nametypes <code class="varname">krb5-self</code>,
8063               <code class="varname">ms-self</code>, <code class="varname">krb5-subdomain</code>,
8064               and <code class="varname">ms-subdomain</code> the
8065               <em class="replaceable"><code>identity</code></em> field specifies
8066               the Windows or Kerberos realm of the machine belongs to.
8067             </p>
8068 <p>
8069               The <em class="replaceable"><code>nametype</code></em> field has 13
8070               values:
8071               <code class="varname">name</code>, <code class="varname">subdomain</code>,
8072               <code class="varname">wildcard</code>, <code class="varname">self</code>,
8073               <code class="varname">selfsub</code>, <code class="varname">selfwild</code>,
8074               <code class="varname">krb5-self</code>, <code class="varname">ms-self</code>,
8075               <code class="varname">krb5-subdomain</code>,
8076               <code class="varname">ms-subdomain</code>,
8077               <code class="varname">tcp-self</code>, <code class="varname">6to4-self</code>,
8078               <code class="varname">zonesub</code>, and <code class="varname">external</code>.
8079             </p>
8080 <div class="informaltable"><table border="1">
8081 <colgroup>
8082 <col>
8083 <col>
8084 </colgroup>
8085 <tbody>
8086 <tr>
8087 <td>
8088                       <p>
8089                         <code class="varname">name</code>
8090                       </p>
8091                     </td>
8092 <td>
8093                       <p>
8094                         Exact-match semantics.  This rule matches
8095                         when the name being updated is identical
8096                         to the contents of the
8097                         <em class="replaceable"><code>name</code></em> field.
8098                       </p>
8099                     </td>
8100 </tr>
8101 <tr>
8102 <td>
8103                       <p>
8104                         <code class="varname">subdomain</code>
8105                       </p>
8106                     </td>
8107 <td>
8108                       <p>
8109                         This rule matches when the name being updated
8110                         is a subdomain of, or identical to, the
8111                         contents of the <em class="replaceable"><code>name</code></em>
8112                         field.
8113                       </p>
8114                     </td>
8115 </tr>
8116 <tr>
8117 <td>
8118                       <p>
8119                         <code class="varname">zonesub</code>
8120                       </p>
8121                     </td>
8122 <td>
8123                       <p>
8124                         This rule is similar to subdomain, except that
8125                         it matches when the name being updated is a
8126                         subdomain of the zone in which the
8127                         <span><strong class="command">update-policy</strong></span> statement
8128                         appears.  This obviates the need to type the zone
8129                         name twice, and enables the use of a standard
8130                         <span><strong class="command">update-policy</strong></span> statement in
8131                         multiple zones without modification.
8132                       </p>
8133                       <p>
8134                         When this rule is used, the
8135                         <em class="replaceable"><code>name</code></em> field is omitted.
8136                       </p>
8137                     </td>
8138 </tr>
8139 <tr>
8140 <td>
8141                       <p>
8142                         <code class="varname">wildcard</code>
8143                       </p>
8144                     </td>
8145 <td>
8146                       <p>
8147                         The <em class="replaceable"><code>name</code></em> field
8148                         is subject to DNS wildcard expansion, and
8149                         this rule matches when the name being updated
8150                         name is a valid expansion of the wildcard.
8151                       </p>
8152                     </td>
8153 </tr>
8154 <tr>
8155 <td>
8156                       <p>
8157                         <code class="varname">self</code>
8158                       </p>
8159                     </td>
8160 <td>
8161                       <p>
8162                         This rule matches when the name being updated
8163                         matches the contents of the
8164                         <em class="replaceable"><code>identity</code></em> field.
8165                         The <em class="replaceable"><code>name</code></em> field
8166                         is ignored, but should be the same as the
8167                         <em class="replaceable"><code>identity</code></em> field.
8168                         The <code class="varname">self</code> nametype is
8169                         most useful when allowing using one key per
8170                         name to update, where the key has the same
8171                         name as the name to be updated.  The
8172                         <em class="replaceable"><code>identity</code></em> would
8173                         be specified as <code class="constant">*</code> (an asterisk) in
8174                         this case.
8175                       </p>
8176                     </td>
8177 </tr>
8178 <tr>
8179 <td>
8180                       <p>
8181                         <code class="varname">selfsub</code>
8182                       </p>
8183                     </td>
8184 <td>
8185                       <p>
8186                         This rule is similar to <code class="varname">self</code>
8187                         except that subdomains of <code class="varname">self</code>
8188                         can also be updated.
8189                       </p>
8190                     </td>
8191 </tr>
8192 <tr>
8193 <td>
8194                       <p>
8195                         <code class="varname">selfwild</code>
8196                       </p>
8197                     </td>
8198 <td>
8199                       <p>
8200                         This rule is similar to <code class="varname">self</code>
8201                         except that only subdomains of
8202                         <code class="varname">self</code> can be updated.
8203                       </p>
8204                     </td>
8205 </tr>
8206 <tr>
8207 <td>
8208                       <p>
8209                         <code class="varname">ms-self</code>
8210                       </p>
8211                     </td>
8212 <td>
8213                       <p>
8214                         This rule takes a Windows machine principal
8215                         (machine$@REALM) for machine in REALM and
8216                         and converts it machine.realm allowing the machine 
8217                         to update machine.realm.  The REALM to be matched
8218                         is specified in the <em class="replaceable"><code>identity</code></em>
8219                         field.
8220                       </p>
8221                     </td>
8222 </tr>
8223 <tr>
8224 <td>
8225                       <p>
8226                         <code class="varname">ms-subdomain</code>
8227                       </p>
8228                     </td>
8229 <td>
8230                       <p>
8231                         This rule takes a Windows machine principal 
8232                         (machine$@REALM) for machine in REALM and
8233                         converts it to machine.realm allowing the machine
8234                         to update subdomains of machine.realm.  The REALM
8235                         to be matched is specified in the
8236                         <em class="replaceable"><code>identity</code></em> field.
8237                       </p>
8238                     </td>
8239 </tr>
8240 <tr>
8241 <td>
8242                       <p>
8243                         <code class="varname">krb5-self</code>
8244                       </p>
8245                     </td>
8246 <td>
8247                       <p>
8248                         This rule takes a Kerberos machine principal
8249                         (host/machine@REALM) for machine in REALM and
8250                         and converts it machine.realm allowing the machine 
8251                         to update machine.realm.  The REALM to be matched
8252                         is specified in the <em class="replaceable"><code>identity</code></em>
8253                         field.
8254                       </p>
8255                     </td>
8256 </tr>
8257 <tr>
8258 <td>
8259                       <p>
8260                         <code class="varname">krb5-subdomain</code>
8261                       </p>
8262                     </td>
8263 <td>
8264                       <p>
8265                         This rule takes a Kerberos machine principal 
8266                         (host/machine@REALM) for machine in REALM and
8267                         converts it to machine.realm allowing the machine
8268                         to update subdomains of machine.realm.  The REALM
8269                         to be matched is specified in the
8270                         <em class="replaceable"><code>identity</code></em> field.
8271                       </p>
8272                     </td>
8273 </tr>
8274 <tr>
8275 <td>
8276                       <p>
8277                         <code class="varname">tcp-self</code>
8278                       </p>
8279                     </td>
8280 <td>
8281                       <p>
8282                         Allow updates that have been sent via TCP and
8283                         for which the standard mapping from the initiating
8284                         IP address into the IN-ADDR.ARPA and IP6.ARPA
8285                         namespaces match the name to be updated.
8286                       </p>
8287                       <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
8288 <h3 class="title">Note</h3>
8289                         It is theoretically possible to spoof these TCP
8290                         sessions.
8291                       </div>
8292                     </td>
8293 </tr>
8294 <tr>
8295 <td>
8296                       <p>
8297                         <code class="varname">6to4-self</code>
8298                       </p>
8299                     </td>
8300 <td>
8301                       <p>
8302                         Allow the 6to4 prefix to be update by any TCP
8303                         connection from the 6to4 network or from the
8304                         corresponding IPv4 address.  This is intended
8305                         to allow NS or DNAME RRsets to be added to the
8306                         reverse tree.
8307                       </p>
8308                       <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
8309 <h3 class="title">Note</h3>
8310                         It is theoretically possible to spoof these TCP
8311                         sessions.
8312                       </div>
8313                     </td>
8314 </tr>
8315 <tr>
8316 <td>
8317                       <p>
8318                         <code class="varname">external</code>
8319                       </p>
8320                     </td>
8321 <td>
8322                       <p>
8323                         This rule allows <span><strong class="command">named</strong></span>
8324                         to defer the decision of whether to allow a
8325                         given update to an external daemon.
8326                       </p>
8327                       <p>
8328                         The method of communicating with the daemon is
8329                         specified in the <em class="replaceable"><code>identity</code></em>
8330                         field, the format of which is
8331                         "<code class="constant">local:</code><em class="replaceable"><code>path</code></em>",
8332                         where <em class="replaceable"><code>path</code></em> is the location
8333                         of a UNIX-domain socket.  (Currently, "local" is the
8334                         only supported mechanism.)
8335                       </p>
8336                       <p>
8337                         Requests to the external daemon are sent over the
8338                         UNIX-domain socket as datagrams with the following
8339                         format:
8340                       </p>
8341                       <pre class="programlisting">
8342    Protocol version number (4 bytes, network byte order, currently 1)
8343    Request length (4 bytes, network byte order)
8344    Signer (null-terminated string)
8345    Name (null-terminated string)
8346    TCP source address (null-terminated string)
8347    Rdata type (null-terminated string)
8348    Key (null-terminated string)
8349    TKEY token length (4 bytes, network byte order)
8350    TKEY token (remainder of packet)</pre>
8351                       <p>
8352                         The daemon replies with a four-byte value in
8353                         network byte order, containing either 0 or 1; 0
8354                         indicates that the specified update is not
8355                         permitted, and 1 indicates that it is.
8356                       </p>
8357                     </td>
8358 </tr>
8359 </tbody>
8360 </table></div>
8361 <p>
8362               In all cases, the <em class="replaceable"><code>name</code></em>
8363               field must specify a fully-qualified domain name.
8364             </p>
8365 <p>
8366               If no types are explicitly specified, this rule matches
8367               all types except RRSIG, NS, SOA, NSEC and NSEC3. Types
8368               may be specified by name, including "ANY" (ANY matches
8369               all types except NSEC and NSEC3, which can never be
8370               updated).  Note that when an attempt is made to delete
8371               all records associated with a name, the rules are
8372               checked for each existing record type.
8373             </p>
8374 </div>
8375 </div>
8376 </div>
8377 <div class="sect1" lang="en">
8378 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
8379 <a name="id2596432"></a>Zone File</h2></div></div></div>
8380 <div class="sect2" lang="en">
8381 <div class="titlepage"><div><div><h3 class="title">
8382 <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>
8383 <p>
8384             This section, largely borrowed from RFC 1034, describes the
8385             concept of a Resource Record (RR) and explains when each is used.
8386             Since the publication of RFC 1034, several new RRs have been
8387             identified
8388             and implemented in the DNS. These are also included.
8389           </p>
8390 <div class="sect3" lang="en">
8391 <div class="titlepage"><div><div><h4 class="title">
8392 <a name="id2596450"></a>Resource Records</h4></div></div></div>
8393 <p>
8394               A domain name identifies a node.  Each node has a set of
8395               resource information, which may be empty.  The set of resource
8396               information associated with a particular name is composed of
8397               separate RRs. The order of RRs in a set is not significant and
8398               need not be preserved by name servers, resolvers, or other
8399               parts of the DNS. However, sorting of multiple RRs is
8400               permitted for optimization purposes, for example, to specify
8401               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>.
8402             </p>
8403 <p>
8404               The components of a Resource Record are:
8405             </p>
8406 <div class="informaltable"><table border="1">
8407 <colgroup>
8408 <col>
8409 <col>
8410 </colgroup>
8411 <tbody>
8412 <tr>
8413 <td>
8414                       <p>
8415                         owner name
8416                       </p>
8417                     </td>
8418 <td>
8419                       <p>
8420                         The domain name where the RR is found.
8421                       </p>
8422                     </td>
8423 </tr>
8424 <tr>
8425 <td>
8426                       <p>
8427                         type
8428                       </p>
8429                     </td>
8430 <td>
8431                       <p>
8432                         An encoded 16-bit value that specifies
8433                         the type of the resource record.
8434                       </p>
8435                     </td>
8436 </tr>
8437 <tr>
8438 <td>
8439                       <p>
8440                         TTL
8441                       </p>
8442                     </td>
8443 <td>
8444                       <p>
8445                         The time-to-live of the RR. This field
8446                         is a 32-bit integer in units of seconds, and is
8447                         primarily used by
8448                         resolvers when they cache RRs. The TTL describes how
8449                         long a RR can
8450                         be cached before it should be discarded.
8451                       </p>
8452                     </td>
8453 </tr>
8454 <tr>
8455 <td>
8456                       <p>
8457                         class
8458                       </p>
8459                     </td>
8460 <td>
8461                       <p>
8462                         An encoded 16-bit value that identifies
8463                         a protocol family or instance of a protocol.
8464                       </p>
8465                     </td>
8466 </tr>
8467 <tr>
8468 <td>
8469                       <p>
8470                         RDATA
8471                       </p>
8472                     </td>
8473 <td>
8474                       <p>
8475                         The resource data.  The format of the
8476                         data is type (and sometimes class) specific.
8477                       </p>
8478                     </td>
8479 </tr>
8480 </tbody>
8481 </table></div>
8482 <p>
8483               The following are <span class="emphasis"><em>types</em></span> of valid RRs:
8484             </p>
8485 <div class="informaltable"><table border="1">
8486 <colgroup>
8487 <col>
8488 <col>
8489 </colgroup>
8490 <tbody>
8491 <tr>
8492 <td>
8493                       <p>
8494                         A
8495                       </p>
8496                     </td>
8497 <td>
8498                       <p>
8499                         A host address.  In the IN class, this is a
8500                         32-bit IP address.  Described in RFC 1035.
8501                       </p>
8502                     </td>
8503 </tr>
8504 <tr>
8505 <td>
8506                       <p>
8507                         AAAA
8508                       </p>
8509                     </td>
8510 <td>
8511                       <p>
8512                         IPv6 address.  Described in RFC 1886.
8513                       </p>
8514                     </td>
8515 </tr>
8516 <tr>
8517 <td>
8518                       <p>
8519                         A6
8520                       </p>
8521                     </td>
8522 <td>
8523                       <p>
8524                         IPv6 address.  This can be a partial
8525                         address (a suffix) and an indirection to the name
8526                         where the rest of the
8527                         address (the prefix) can be found.  Experimental.
8528                         Described in RFC 2874.
8529                       </p>
8530                     </td>
8531 </tr>
8532 <tr>
8533 <td>
8534                       <p>
8535                         AFSDB
8536                       </p>
8537                     </td>
8538 <td>
8539                       <p>
8540                         Location of AFS database servers.
8541                         Experimental.  Described in RFC 1183.
8542                       </p>
8543                     </td>
8544 </tr>
8545 <tr>
8546 <td>
8547                       <p>
8548                         APL
8549                       </p>
8550                     </td>
8551 <td>
8552                       <p>
8553                         Address prefix list.  Experimental.
8554                         Described in RFC 3123.
8555                       </p>
8556                     </td>
8557 </tr>
8558 <tr>
8559 <td>
8560                       <p>
8561                         CERT
8562                       </p>
8563                     </td>
8564 <td>
8565                       <p>
8566                         Holds a digital certificate.
8567                         Described in RFC 2538.
8568                       </p>
8569                     </td>
8570 </tr>
8571 <tr>
8572 <td>
8573                       <p>
8574                         CNAME
8575                       </p>
8576                     </td>
8577 <td>
8578                       <p>
8579                         Identifies the canonical name of an alias.
8580                         Described in RFC 1035.
8581                       </p>
8582                     </td>
8583 </tr>
8584 <tr>
8585 <td>
8586                       <p>
8587                         DHCID
8588                       </p>
8589                     </td>
8590 <td>
8591                       <p>
8592                         Is used for identifying which DHCP client is
8593                         associated with this name.  Described in RFC 4701.
8594                       </p>
8595                     </td>
8596 </tr>
8597 <tr>
8598 <td>
8599                       <p>
8600                         DNAME
8601                       </p>
8602                     </td>
8603 <td>
8604                       <p>
8605                         Replaces the domain name specified with
8606                         another name to be looked up, effectively aliasing an
8607                         entire
8608                         subtree of the domain name space rather than a single
8609                         record
8610                         as in the case of the CNAME RR.
8611                         Described in RFC 2672.
8612                       </p>
8613                     </td>
8614 </tr>
8615 <tr>
8616 <td>
8617                       <p>
8618                         DNSKEY
8619                       </p>
8620                     </td>
8621 <td>
8622                       <p>
8623                         Stores a public key associated with a signed
8624                         DNS zone.  Described in RFC 4034.
8625                       </p>
8626                     </td>
8627 </tr>
8628 <tr>
8629 <td>
8630                       <p>
8631                         DS
8632                       </p>
8633                     </td>
8634 <td>
8635                       <p>
8636                         Stores the hash of a public key associated with a
8637                         signed DNS zone.  Described in RFC 4034.
8638                       </p>
8639                     </td>
8640 </tr>
8641 <tr>
8642 <td>
8643                       <p>
8644                         GPOS
8645                       </p>
8646                     </td>
8647 <td>
8648                       <p>
8649                         Specifies the global position.  Superseded by LOC.
8650                       </p>
8651                     </td>
8652 </tr>
8653 <tr>
8654 <td>
8655                       <p>
8656                         HINFO
8657                       </p>
8658                     </td>
8659 <td>
8660                       <p>
8661                         Identifies the CPU and OS used by a host.
8662                         Described in RFC 1035.
8663                       </p>
8664                     </td>
8665 </tr>
8666 <tr>
8667 <td>
8668                       <p>
8669                         IPSECKEY
8670                       </p>
8671                     </td>
8672 <td>
8673                       <p>
8674                         Provides a method for storing IPsec keying material in
8675                         DNS.  Described in RFC 4025.
8676                       </p>
8677                     </td>
8678 </tr>
8679 <tr>
8680 <td>
8681                       <p>
8682                         ISDN
8683                       </p>
8684                     </td>
8685 <td>
8686                       <p>
8687                         Representation of ISDN addresses.
8688                         Experimental.  Described in RFC 1183.
8689                       </p>
8690                     </td>
8691 </tr>
8692 <tr>
8693 <td>
8694                       <p>
8695                         KEY
8696                       </p>
8697                     </td>
8698 <td>
8699                       <p>
8700                         Stores a public key associated with a
8701                         DNS name.  Used in original DNSSEC; replaced
8702                         by DNSKEY in DNSSECbis, but still used with
8703                         SIG(0).  Described in RFCs 2535 and 2931.
8704                       </p>
8705                     </td>
8706 </tr>
8707 <tr>
8708 <td>
8709                       <p>
8710                         KX
8711                       </p>
8712                     </td>
8713 <td>
8714                       <p>
8715                         Identifies a key exchanger for this
8716                         DNS name.  Described in RFC 2230.
8717                       </p>
8718                     </td>
8719 </tr>
8720 <tr>
8721 <td>
8722                       <p>
8723                         LOC
8724                       </p>
8725                     </td>
8726 <td>
8727                       <p>
8728                         For storing GPS info.  Described in RFC 1876.
8729                         Experimental.
8730                       </p>
8731                     </td>
8732 </tr>
8733 <tr>
8734 <td>
8735                       <p>
8736                         MX
8737                       </p>
8738                     </td>
8739 <td>
8740                       <p>
8741                         Identifies a mail exchange for the domain with
8742                         a 16-bit preference value (lower is better)
8743                         followed by the host name of the mail exchange.
8744                         Described in RFC 974, RFC 1035.
8745                       </p>
8746                     </td>
8747 </tr>
8748 <tr>
8749 <td>
8750                       <p>
8751                         NAPTR
8752                       </p>
8753                     </td>
8754 <td>
8755                       <p>
8756                         Name authority pointer.  Described in RFC 2915.
8757                       </p>
8758                     </td>
8759 </tr>
8760 <tr>
8761 <td>
8762                       <p>
8763                         NSAP
8764                       </p>
8765                     </td>
8766 <td>
8767                       <p>
8768                         A network service access point.
8769                         Described in RFC 1706.
8770                       </p>
8771                     </td>
8772 </tr>
8773 <tr>
8774 <td>
8775                       <p>
8776                         NS
8777                       </p>
8778                     </td>
8779 <td>
8780                       <p>
8781                         The authoritative name server for the
8782                         domain.  Described in RFC 1035.
8783                       </p>
8784                     </td>
8785 </tr>
8786 <tr>
8787 <td>
8788                       <p>
8789                         NSEC
8790                       </p>
8791                     </td>
8792 <td>
8793                       <p>
8794                         Used in DNSSECbis to securely indicate that
8795                         RRs with an owner name in a certain name interval do
8796                         not exist in
8797                         a zone and indicate what RR types are present for an
8798                         existing name.
8799                         Described in RFC 4034.
8800                       </p>
8801                     </td>
8802 </tr>
8803 <tr>
8804 <td>
8805                       <p>
8806                         NSEC3
8807                       </p>
8808                     </td>
8809 <td>
8810                       <p>
8811                         Used in DNSSECbis to securely indicate that
8812                         RRs with an owner name in a certain name
8813                         interval do not exist in a zone and indicate
8814                         what RR types are present for an existing
8815                         name.  NSEC3 differs from NSEC in that it
8816                         prevents zone enumeration but is more
8817                         computationally expensive on both the server
8818                         and the client than NSEC.  Described in RFC
8819                         5155.
8820                       </p>
8821                     </td>
8822 </tr>
8823 <tr>
8824 <td>
8825                       <p>
8826                         NSEC3PARAM
8827                       </p>
8828                     </td>
8829 <td>
8830                       <p>
8831                         Used in DNSSECbis to tell the authoritative
8832                         server which NSEC3 chains are available to use.
8833                         Described in RFC 5155.
8834                       </p>
8835                     </td>
8836 </tr>
8837 <tr>
8838 <td>
8839                       <p>
8840                         NXT
8841                       </p>
8842                     </td>
8843 <td>
8844                       <p>
8845                         Used in DNSSEC to securely indicate that
8846                         RRs with an owner name in a certain name interval do
8847                         not exist in
8848                         a zone and indicate what RR types are present for an
8849                         existing name.
8850                         Used in original DNSSEC; replaced by NSEC in
8851                         DNSSECbis.
8852                         Described in RFC 2535.
8853                       </p>
8854                     </td>
8855 </tr>
8856 <tr>
8857 <td>
8858                       <p>
8859                         PTR
8860                       </p>
8861                     </td>
8862 <td>
8863                       <p>
8864                         A pointer to another part of the domain
8865                         name space.  Described in RFC 1035.
8866                       </p>
8867                     </td>
8868 </tr>
8869 <tr>
8870 <td>
8871                       <p>
8872                         PX
8873                       </p>
8874                     </td>
8875 <td>
8876                       <p>
8877                         Provides mappings between RFC 822 and X.400
8878                         addresses.  Described in RFC 2163.
8879                       </p>
8880                     </td>
8881 </tr>
8882 <tr>
8883 <td>
8884                       <p>
8885                         RP
8886                       </p>
8887                     </td>
8888 <td>
8889                       <p>
8890                         Information on persons responsible
8891                         for the domain.  Experimental.  Described in RFC 1183.
8892                       </p>
8893                     </td>
8894 </tr>
8895 <tr>
8896 <td>
8897                       <p>
8898                         RRSIG
8899                       </p>
8900                     </td>
8901 <td>
8902                       <p>
8903                         Contains DNSSECbis signature data.  Described
8904                         in RFC 4034.
8905                       </p>
8906                     </td>
8907 </tr>
8908 <tr>
8909 <td>
8910                       <p>
8911                         RT
8912                       </p>
8913                     </td>
8914 <td>
8915                       <p>
8916                         Route-through binding for hosts that
8917                         do not have their own direct wide area network
8918                         addresses.
8919                         Experimental.  Described in RFC 1183.
8920                       </p>
8921                     </td>
8922 </tr>
8923 <tr>
8924 <td>
8925                       <p>
8926                         SIG
8927                       </p>
8928                     </td>
8929 <td>
8930                       <p>
8931                         Contains DNSSEC signature data.  Used in
8932                         original DNSSEC; replaced by RRSIG in
8933                         DNSSECbis, but still used for SIG(0).
8934                         Described in RFCs 2535 and 2931.
8935                       </p>
8936                     </td>
8937 </tr>
8938 <tr>
8939 <td>
8940                       <p>
8941                         SOA
8942                       </p>
8943                     </td>
8944 <td>
8945                       <p>
8946                         Identifies the start of a zone of authority.
8947                         Described in RFC 1035.
8948                       </p>
8949                     </td>
8950 </tr>
8951 <tr>
8952 <td>
8953                       <p>
8954                         SPF
8955                       </p>
8956                     </td>
8957 <td>
8958                       <p>
8959                         Contains the Sender Policy Framework information
8960                         for a given email domain.  Described in RFC 4408.
8961                       </p>
8962                     </td>
8963 </tr>
8964 <tr>
8965 <td>
8966                       <p>
8967                         SRV
8968                       </p>
8969                     </td>
8970 <td>
8971                       <p>
8972                         Information about well known network
8973                         services (replaces WKS).  Described in RFC 2782.
8974                       </p>
8975                     </td>
8976 </tr>
8977 <tr>
8978 <td>
8979                       <p>
8980                         SSHFP
8981                       </p>
8982                     </td>
8983 <td>
8984                       <p>
8985                         Provides a way to securely publish a secure shell key's
8986                         fingerprint.  Described in RFC 4255.
8987                       </p>
8988                     </td>
8989 </tr>
8990 <tr>
8991 <td>
8992                       <p>
8993                         TXT
8994                       </p>
8995                     </td>
8996 <td>
8997                       <p>
8998                         Text records.  Described in RFC 1035.
8999                       </p>
9000                     </td>
9001 </tr>
9002 <tr>
9003 <td>
9004                       <p>
9005                         WKS
9006                       </p>
9007                     </td>
9008 <td>
9009                       <p>
9010                         Information about which well known
9011                         network services, such as SMTP, that a domain
9012                         supports. Historical.
9013                       </p>
9014                     </td>
9015 </tr>
9016 <tr>
9017 <td>
9018                       <p>
9019                         X25
9020                       </p>
9021                     </td>
9022 <td>
9023                       <p>
9024                         Representation of X.25 network addresses.
9025                         Experimental.  Described in RFC 1183.
9026                       </p>
9027                     </td>
9028 </tr>
9029 </tbody>
9030 </table></div>
9031 <p>
9032               The following <span class="emphasis"><em>classes</em></span> of resource records
9033               are currently valid in the DNS:
9034             </p>
9035 <div class="informaltable"><table border="1">
9036 <colgroup>
9037 <col>
9038 <col>
9039 </colgroup>
9040 <tbody>
9041 <tr>
9042 <td>
9043                       <p>
9044                         IN
9045                       </p>
9046                     </td>
9047 <td>
9048                       <p>
9049                         The Internet.
9050                       </p>
9051                     </td>
9052 </tr>
9053 <tr>
9054 <td>
9055                       <p>
9056                         CH
9057                       </p>
9058                     </td>
9059 <td>
9060                       <p>
9061                         Chaosnet, a LAN protocol created at MIT in the
9062                         mid-1970s.
9063                         Rarely used for its historical purpose, but reused for
9064                         BIND's
9065                         built-in server information zones, e.g.,
9066                         <code class="literal">version.bind</code>.
9067                       </p>
9068                     </td>
9069 </tr>
9070 <tr>
9071 <td>
9072                       <p>
9073                         HS
9074                       </p>
9075                     </td>
9076 <td>
9077                       <p>
9078                         Hesiod, an information service
9079                         developed by MIT's Project Athena. It is used to share
9080                         information
9081                         about various systems databases, such as users,
9082                         groups, printers
9083                         and so on.
9084                       </p>
9085                     </td>
9086 </tr>
9087 </tbody>
9088 </table></div>
9089 <p>
9090               The owner name is often implicit, rather than forming an
9091               integral
9092               part of the RR.  For example, many name servers internally form
9093               tree
9094               or hash structures for the name space, and chain RRs off nodes.
9095               The remaining RR parts are the fixed header (type, class, TTL)
9096               which is consistent for all RRs, and a variable part (RDATA)
9097               that
9098               fits the needs of the resource being described.
9099             </p>
9100 <p>
9101               The meaning of the TTL field is a time limit on how long an
9102               RR can be kept in a cache.  This limit does not apply to
9103               authoritative
9104               data in zones; it is also timed out, but by the refreshing
9105               policies
9106               for the zone.  The TTL is assigned by the administrator for the
9107               zone where the data originates.  While short TTLs can be used to
9108               minimize caching, and a zero TTL prohibits caching, the
9109               realities
9110               of Internet performance suggest that these times should be on
9111               the
9112               order of days for the typical host.  If a change can be
9113               anticipated,
9114               the TTL can be reduced prior to the change to minimize
9115               inconsistency
9116               during the change, and then increased back to its former value
9117               following
9118               the change.
9119             </p>
9120 <p>
9121               The data in the RDATA section of RRs is carried as a combination
9122               of binary strings and domain names.  The domain names are
9123               frequently
9124               used as "pointers" to other data in the DNS.
9125             </p>
9126 </div>
9127 <div class="sect3" lang="en">
9128 <div class="titlepage"><div><div><h4 class="title">
9129 <a name="id2598005"></a>Textual expression of RRs</h4></div></div></div>
9130 <p>
9131               RRs are represented in binary form in the packets of the DNS
9132               protocol, and are usually represented in highly encoded form
9133               when
9134               stored in a name server or resolver.  In the examples provided
9135               in
9136               RFC 1034, a style similar to that used in master files was
9137               employed
9138               in order to show the contents of RRs.  In this format, most RRs
9139               are shown on a single line, although continuation lines are
9140               possible
9141               using parentheses.
9142             </p>
9143 <p>
9144               The start of the line gives the owner of the RR.  If a line
9145               begins with a blank, then the owner is assumed to be the same as
9146               that of the previous RR.  Blank lines are often included for
9147               readability.
9148             </p>
9149 <p>
9150               Following the owner, we list the TTL, type, and class of the
9151               RR.  Class and type use the mnemonics defined above, and TTL is
9152               an integer before the type field.  In order to avoid ambiguity
9153               in
9154               parsing, type and class mnemonics are disjoint, TTLs are
9155               integers,
9156               and the type mnemonic is always last. The IN class and TTL
9157               values
9158               are often omitted from examples in the interests of clarity.
9159             </p>
9160 <p>
9161               The resource data or RDATA section of the RR are given using
9162               knowledge of the typical representation for the data.
9163             </p>
9164 <p>
9165               For example, we might show the RRs carried in a message as:
9166             </p>
9167 <div class="informaltable"><table border="1">
9168 <colgroup>
9169 <col>
9170 <col>
9171 <col>
9172 </colgroup>
9173 <tbody>
9174 <tr>
9175 <td>
9176                       <p>
9177                         <code class="literal">ISI.EDU.</code>
9178                       </p>
9179                     </td>
9180 <td>
9181                       <p>
9182                         <code class="literal">MX</code>
9183                       </p>
9184                     </td>
9185 <td>
9186                       <p>
9187                         <code class="literal">10 VENERA.ISI.EDU.</code>
9188                       </p>
9189                     </td>
9190 </tr>
9191 <tr>
9192 <td>
9193                       <p></p>
9194                     </td>
9195 <td>
9196                       <p>
9197                         <code class="literal">MX</code>
9198                       </p>
9199                     </td>
9200 <td>
9201                       <p>
9202                         <code class="literal">10 VAXA.ISI.EDU</code>
9203                       </p>
9204                     </td>
9205 </tr>
9206 <tr>
9207 <td>
9208                       <p>
9209                         <code class="literal">VENERA.ISI.EDU</code>
9210                       </p>
9211                     </td>
9212 <td>
9213                       <p>
9214                         <code class="literal">A</code>
9215                       </p>
9216                     </td>
9217 <td>
9218                       <p>
9219                         <code class="literal">128.9.0.32</code>
9220                       </p>
9221                     </td>
9222 </tr>
9223 <tr>
9224 <td>
9225                       <p></p>
9226                     </td>
9227 <td>
9228                       <p>
9229                         <code class="literal">A</code>
9230                       </p>
9231                     </td>
9232 <td>
9233                       <p>
9234                         <code class="literal">10.1.0.52</code>
9235                       </p>
9236                     </td>
9237 </tr>
9238 <tr>
9239 <td>
9240                       <p>
9241                         <code class="literal">VAXA.ISI.EDU</code>
9242                       </p>
9243                     </td>
9244 <td>
9245                       <p>
9246                         <code class="literal">A</code>
9247                       </p>
9248                     </td>
9249 <td>
9250                       <p>
9251                         <code class="literal">10.2.0.27</code>
9252                       </p>
9253                     </td>
9254 </tr>
9255 <tr>
9256 <td>
9257                       <p></p>
9258                     </td>
9259 <td>
9260                       <p>
9261                         <code class="literal">A</code>
9262                       </p>
9263                     </td>
9264 <td>
9265                       <p>
9266                         <code class="literal">128.9.0.33</code>
9267                       </p>
9268                     </td>
9269 </tr>
9270 </tbody>
9271 </table></div>
9272 <p>
9273               The MX RRs have an RDATA section which consists of a 16-bit
9274               number followed by a domain name.  The address RRs use a
9275               standard
9276               IP address format to contain a 32-bit internet address.
9277             </p>
9278 <p>
9279               The above example shows six RRs, with two RRs at each of three
9280               domain names.
9281             </p>
9282 <p>
9283               Similarly we might see:
9284             </p>
9285 <div class="informaltable"><table border="1">
9286 <colgroup>
9287 <col>
9288 <col>
9289 <col>
9290 </colgroup>
9291 <tbody>
9292 <tr>
9293 <td>
9294                       <p>
9295                         <code class="literal">XX.LCS.MIT.EDU.</code>
9296                       </p>
9297                     </td>
9298 <td>
9299                       <p>
9300                         <code class="literal">IN A</code>
9301                       </p>
9302                     </td>
9303 <td>
9304                       <p>
9305                         <code class="literal">10.0.0.44</code>
9306                       </p>
9307                     </td>
9308 </tr>
9309 <tr>
9310 <td> </td>
9311 <td>
9312                       <p>
9313                         <code class="literal">CH A</code>
9314                       </p>
9315                     </td>
9316 <td>
9317                       <p>
9318                         <code class="literal">MIT.EDU. 2420</code>
9319                       </p>
9320                     </td>
9321 </tr>
9322 </tbody>
9323 </table></div>
9324 <p>
9325               This example shows two addresses for
9326               <code class="literal">XX.LCS.MIT.EDU</code>, each of a different class.
9327             </p>
9328 </div>
9329 </div>
9330 <div class="sect2" lang="en">
9331 <div class="titlepage"><div><div><h3 class="title">
9332 <a name="id2598594"></a>Discussion of MX Records</h3></div></div></div>
9333 <p>
9334             As described above, domain servers store information as a
9335             series of resource records, each of which contains a particular
9336             piece of information about a given domain name (which is usually,
9337             but not always, a host). The simplest way to think of a RR is as
9338             a typed pair of data, a domain name matched with a relevant datum,
9339             and stored with some additional type information to help systems
9340             determine when the RR is relevant.
9341           </p>
9342 <p>
9343             MX records are used to control delivery of email. The data
9344             specified in the record is a priority and a domain name. The
9345             priority
9346             controls the order in which email delivery is attempted, with the
9347             lowest number first. If two priorities are the same, a server is
9348             chosen randomly. If no servers at a given priority are responding,
9349             the mail transport agent will fall back to the next largest
9350             priority.
9351             Priority numbers do not have any absolute meaning &#8212; they are
9352             relevant
9353             only respective to other MX records for that domain name. The
9354             domain
9355             name given is the machine to which the mail will be delivered.
9356             It <span class="emphasis"><em>must</em></span> have an associated address record
9357             (A or AAAA) &#8212; CNAME is not sufficient.
9358           </p>
9359 <p>
9360             For a given domain, if there is both a CNAME record and an
9361             MX record, the MX record is in error, and will be ignored.
9362             Instead,
9363             the mail will be delivered to the server specified in the MX
9364             record
9365             pointed to by the CNAME.
9366             For example:
9367           </p>
9368 <div class="informaltable"><table border="1">
9369 <colgroup>
9370 <col>
9371 <col>
9372 <col>
9373 <col>
9374 <col>
9375 </colgroup>
9376 <tbody>
9377 <tr>
9378 <td>
9379                     <p>
9380                       <code class="literal">example.com.</code>
9381                     </p>
9382                   </td>
9383 <td>
9384                     <p>
9385                       <code class="literal">IN</code>
9386                     </p>
9387                   </td>
9388 <td>
9389                     <p>
9390                       <code class="literal">MX</code>
9391                     </p>
9392                   </td>
9393 <td>
9394                     <p>
9395                       <code class="literal">10</code>
9396                     </p>
9397                   </td>
9398 <td>
9399                     <p>
9400                       <code class="literal">mail.example.com.</code>
9401                     </p>
9402                   </td>
9403 </tr>
9404 <tr>
9405 <td>
9406                     <p></p>
9407                   </td>
9408 <td>
9409                     <p>
9410                       <code class="literal">IN</code>
9411                     </p>
9412                   </td>
9413 <td>
9414                     <p>
9415                       <code class="literal">MX</code>
9416                     </p>
9417                   </td>
9418 <td>
9419                     <p>
9420                       <code class="literal">10</code>
9421                     </p>
9422                   </td>
9423 <td>
9424                     <p>
9425                       <code class="literal">mail2.example.com.</code>
9426                     </p>
9427                   </td>
9428 </tr>
9429 <tr>
9430 <td>
9431                     <p></p>
9432                   </td>
9433 <td>
9434                     <p>
9435                       <code class="literal">IN</code>
9436                     </p>
9437                   </td>
9438 <td>
9439                     <p>
9440                       <code class="literal">MX</code>
9441                     </p>
9442                   </td>
9443 <td>
9444                     <p>
9445                       <code class="literal">20</code>
9446                     </p>
9447                   </td>
9448 <td>
9449                     <p>
9450                       <code class="literal">mail.backup.org.</code>
9451                     </p>
9452                   </td>
9453 </tr>
9454 <tr>
9455 <td>
9456                     <p>
9457                       <code class="literal">mail.example.com.</code>
9458                     </p>
9459                   </td>
9460 <td>
9461                     <p>
9462                       <code class="literal">IN</code>
9463                     </p>
9464                   </td>
9465 <td>
9466                     <p>
9467                       <code class="literal">A</code>
9468                     </p>
9469                   </td>
9470 <td>
9471                     <p>
9472                       <code class="literal">10.0.0.1</code>
9473                     </p>
9474                   </td>
9475 <td>
9476                     <p></p>
9477                   </td>
9478 </tr>
9479 <tr>
9480 <td>
9481                     <p>
9482                       <code class="literal">mail2.example.com.</code>
9483                     </p>
9484                   </td>
9485 <td>
9486                     <p>
9487                       <code class="literal">IN</code>
9488                     </p>
9489                   </td>
9490 <td>
9491                     <p>
9492                       <code class="literal">A</code>
9493                     </p>
9494                   </td>
9495 <td>
9496                     <p>
9497                       <code class="literal">10.0.0.2</code>
9498                     </p>
9499                   </td>
9500 <td>
9501                     <p></p>
9502                   </td>
9503 </tr>
9504 </tbody>
9505 </table></div>
9506 <p>
9507             Mail delivery will be attempted to <code class="literal">mail.example.com</code> and
9508             <code class="literal">mail2.example.com</code> (in
9509             any order), and if neither of those succeed, delivery to <code class="literal">mail.backup.org</code> will
9510             be attempted.
9511           </p>
9512 </div>
9513 <div class="sect2" lang="en">
9514 <div class="titlepage"><div><div><h3 class="title">
9515 <a name="Setting_TTLs"></a>Setting TTLs</h3></div></div></div>
9516 <p>
9517             The time-to-live of the RR field is a 32-bit integer represented
9518             in units of seconds, and is primarily used by resolvers when they
9519             cache RRs. The TTL describes how long a RR can be cached before it
9520             should be discarded. The following three types of TTL are
9521             currently
9522             used in a zone file.
9523           </p>
9524 <div class="informaltable"><table border="1">
9525 <colgroup>
9526 <col>
9527 <col>
9528 </colgroup>
9529 <tbody>
9530 <tr>
9531 <td>
9532                     <p>
9533                       SOA
9534                     </p>
9535                   </td>
9536 <td>
9537                     <p>
9538                       The last field in the SOA is the negative
9539                       caching TTL. This controls how long other servers will
9540                       cache no-such-domain
9541                       (NXDOMAIN) responses from you.
9542                     </p>
9543                     <p>
9544                       The maximum time for
9545                       negative caching is 3 hours (3h).
9546                     </p>
9547                   </td>
9548 </tr>
9549 <tr>
9550 <td>
9551                     <p>
9552                       $TTL
9553                     </p>
9554                   </td>
9555 <td>
9556                     <p>
9557                       The $TTL directive at the top of the
9558                       zone file (before the SOA) gives a default TTL for every
9559                       RR without
9560                       a specific TTL set.
9561                     </p>
9562                   </td>
9563 </tr>
9564 <tr>
9565 <td>
9566                     <p>
9567                       RR TTLs
9568                     </p>
9569                   </td>
9570 <td>
9571                     <p>
9572                       Each RR can have a TTL as the second
9573                       field in the RR, which will control how long other
9574                       servers can cache
9575                       the it.
9576                     </p>
9577                   </td>
9578 </tr>
9579 </tbody>
9580 </table></div>
9581 <p>
9582             All of these TTLs default to units of seconds, though units
9583             can be explicitly specified, for example, <code class="literal">1h30m</code>.
9584           </p>
9585 </div>
9586 <div class="sect2" lang="en">
9587 <div class="titlepage"><div><div><h3 class="title">
9588 <a name="id2599209"></a>Inverse Mapping in IPv4</h3></div></div></div>
9589 <p>
9590             Reverse name resolution (that is, translation from IP address
9591             to name) is achieved by means of the <span class="emphasis"><em>in-addr.arpa</em></span> domain
9592             and PTR records. Entries in the in-addr.arpa domain are made in
9593             least-to-most significant order, read left to right. This is the
9594             opposite order to the way IP addresses are usually written. Thus,
9595             a machine with an IP address of 10.1.2.3 would have a
9596             corresponding
9597             in-addr.arpa name of
9598             3.2.1.10.in-addr.arpa. This name should have a PTR resource record
9599             whose data field is the name of the machine or, optionally,
9600             multiple
9601             PTR records if the machine has more than one name. For example,
9602             in the [<span class="optional">example.com</span>] domain:
9603           </p>
9604 <div class="informaltable"><table border="1">
9605 <colgroup>
9606 <col>
9607 <col>
9608 </colgroup>
9609 <tbody>
9610 <tr>
9611 <td>
9612                     <p>
9613                       <code class="literal">$ORIGIN</code>
9614                     </p>
9615                   </td>
9616 <td>
9617                     <p>
9618                       <code class="literal">2.1.10.in-addr.arpa</code>
9619                     </p>
9620                   </td>
9621 </tr>
9622 <tr>
9623 <td>
9624                     <p>
9625                       <code class="literal">3</code>
9626                     </p>
9627                   </td>
9628 <td>
9629                     <p>
9630                       <code class="literal">IN PTR foo.example.com.</code>
9631                     </p>
9632                   </td>
9633 </tr>
9634 </tbody>
9635 </table></div>
9636 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
9637 <h3 class="title">Note</h3>
9638 <p>
9639               The <span><strong class="command">$ORIGIN</strong></span> lines in the examples
9640               are for providing context to the examples only &#8212; they do not
9641               necessarily
9642               appear in the actual usage. They are only used here to indicate
9643               that the example is relative to the listed origin.
9644             </p>
9645 </div>
9646 </div>
9647 <div class="sect2" lang="en">
9648 <div class="titlepage"><div><div><h3 class="title">
9649 <a name="id2599336"></a>Other Zone File Directives</h3></div></div></div>
9650 <p>
9651             The Master File Format was initially defined in RFC 1035 and
9652             has subsequently been extended. While the Master File Format
9653             itself
9654             is class independent all records in a Master File must be of the
9655             same
9656             class.
9657           </p>
9658 <p>
9659             Master File Directives include <span><strong class="command">$ORIGIN</strong></span>, <span><strong class="command">$INCLUDE</strong></span>,
9660             and <span><strong class="command">$TTL.</strong></span>
9661           </p>
9662 <div class="sect3" lang="en">
9663 <div class="titlepage"><div><div><h4 class="title">
9664 <a name="id2599358"></a>The <span><strong class="command">@</strong></span> (at-sign)</h4></div></div></div>
9665 <p>
9666               When used in the label (or name) field, the asperand or
9667               at-sign (@) symbol represents the current origin.
9668               At the start of the zone file, it is the 
9669               &lt;<code class="varname">zone_name</code>&gt; (followed by
9670               trailing dot).
9671             </p>
9672 </div>
9673 <div class="sect3" lang="en">
9674 <div class="titlepage"><div><div><h4 class="title">
9675 <a name="id2599374"></a>The <span><strong class="command">$ORIGIN</strong></span> Directive</h4></div></div></div>
9676 <p>
9677               Syntax: <span><strong class="command">$ORIGIN</strong></span>
9678               <em class="replaceable"><code>domain-name</code></em>
9679               [<span class="optional"><em class="replaceable"><code>comment</code></em></span>]
9680             </p>
9681 <p><span><strong class="command">$ORIGIN</strong></span>
9682               sets the domain name that will be appended to any
9683               unqualified records. When a zone is first read in there
9684               is an implicit <span><strong class="command">$ORIGIN</strong></span>
9685               &lt;<code class="varname">zone_name</code>&gt;<span><strong class="command">.</strong></span>
9686               (followed by trailing dot).
9687               The current <span><strong class="command">$ORIGIN</strong></span> is appended to
9688               the domain specified in the <span><strong class="command">$ORIGIN</strong></span>
9689               argument if it is not absolute.
9690             </p>
9691 <pre class="programlisting">
9692 $ORIGIN example.com.
9693 WWW     CNAME   MAIN-SERVER
9694 </pre>
9695 <p>
9696               is equivalent to
9697             </p>
9698 <pre class="programlisting">
9699 WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
9700 </pre>
9701 </div>
9702 <div class="sect3" lang="en">
9703 <div class="titlepage"><div><div><h4 class="title">
9704 <a name="id2599435"></a>The <span><strong class="command">$INCLUDE</strong></span> Directive</h4></div></div></div>
9705 <p>
9706               Syntax: <span><strong class="command">$INCLUDE</strong></span>
9707               <em class="replaceable"><code>filename</code></em>
9708               [<span class="optional">
9709 <em class="replaceable"><code>origin</code></em> </span>]
9710               [<span class="optional"> <em class="replaceable"><code>comment</code></em> </span>]
9711             </p>
9712 <p>
9713               Read and process the file <code class="filename">filename</code> as
9714               if it were included into the file at this point.  If <span><strong class="command">origin</strong></span> is
9715               specified the file is processed with <span><strong class="command">$ORIGIN</strong></span> set
9716               to that value, otherwise the current <span><strong class="command">$ORIGIN</strong></span> is
9717               used.
9718             </p>
9719 <p>
9720               The origin and the current domain name
9721               revert to the values they had prior to the <span><strong class="command">$INCLUDE</strong></span> once
9722               the file has been read.
9723             </p>
9724 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
9725 <h3 class="title">Note</h3>
9726 <p>
9727                 RFC 1035 specifies that the current origin should be restored
9728                 after
9729                 an <span><strong class="command">$INCLUDE</strong></span>, but it is silent
9730                 on whether the current
9731                 domain name should also be restored.  BIND 9 restores both of
9732                 them.
9733                 This could be construed as a deviation from RFC 1035, a
9734                 feature, or both.
9735               </p>
9736 </div>
9737 </div>
9738 <div class="sect3" lang="en">
9739 <div class="titlepage"><div><div><h4 class="title">
9740 <a name="id2599505"></a>The <span><strong class="command">$TTL</strong></span> Directive</h4></div></div></div>
9741 <p>
9742               Syntax: <span><strong class="command">$TTL</strong></span>
9743               <em class="replaceable"><code>default-ttl</code></em>
9744               [<span class="optional">
9745 <em class="replaceable"><code>comment</code></em> </span>]
9746             </p>
9747 <p>
9748               Set the default Time To Live (TTL) for subsequent records
9749               with undefined TTLs. Valid TTLs are of the range 0-2147483647
9750               seconds.
9751             </p>
9752 <p><span><strong class="command">$TTL</strong></span>
9753                is defined in RFC 2308.
9754             </p>
9755 </div>
9756 </div>
9757 <div class="sect2" lang="en">
9758 <div class="titlepage"><div><div><h3 class="title">
9759 <a name="id2599541"></a><acronym class="acronym">BIND</acronym> Master File Extension: the  <span><strong class="command">$GENERATE</strong></span> Directive</h3></div></div></div>
9760 <p>
9761             Syntax: <span><strong class="command">$GENERATE</strong></span>
9762             <em class="replaceable"><code>range</code></em>
9763             <em class="replaceable"><code>lhs</code></em>
9764             [<span class="optional"><em class="replaceable"><code>ttl</code></em></span>]
9765             [<span class="optional"><em class="replaceable"><code>class</code></em></span>]
9766             <em class="replaceable"><code>type</code></em>
9767             <em class="replaceable"><code>rhs</code></em>
9768             [<span class="optional"><em class="replaceable"><code>comment</code></em></span>]
9769           </p>
9770 <p><span><strong class="command">$GENERATE</strong></span>
9771             is used to create a series of resource records that only
9772             differ from each other by an
9773             iterator. <span><strong class="command">$GENERATE</strong></span> can be used to
9774             easily generate the sets of records required to support
9775             sub /24 reverse delegations described in RFC 2317:
9776             Classless IN-ADDR.ARPA delegation.
9777           </p>
9778 <pre class="programlisting">$ORIGIN 0.0.192.IN-ADDR.ARPA.
9779 $GENERATE 1-2 @ NS SERVER$.EXAMPLE.
9780 $GENERATE 1-127 $ CNAME $.0</pre>
9781 <p>
9782             is equivalent to
9783           </p>
9784 <pre class="programlisting">0.0.0.192.IN-ADDR.ARPA. NS SERVER1.EXAMPLE.
9785 0.0.0.192.IN-ADDR.ARPA. NS SERVER2.EXAMPLE.
9786 1.0.0.192.IN-ADDR.ARPA. CNAME 1.0.0.0.192.IN-ADDR.ARPA.
9787 2.0.0.192.IN-ADDR.ARPA. CNAME 2.0.0.0.192.IN-ADDR.ARPA.
9788 ...
9789 127.0.0.192.IN-ADDR.ARPA. CNAME 127.0.0.0.192.IN-ADDR.ARPA.
9790 </pre>
9791 <p>
9792             Generate a set of A and MX records.  Note the MX's right hand
9793             side is a quoted string.  The quotes will be stripped when the
9794             right hand side is processed.
9795            </p>
9796 <pre class="programlisting">
9797 $ORIGIN EXAMPLE.
9798 $GENERATE 1-127 HOST-$ A 1.2.3.$
9799 $GENERATE 1-127 HOST-$ MX "0 ."</pre>
9800 <p>
9801             is equivalent to
9802           </p>
9803 <pre class="programlisting">HOST-1.EXAMPLE.   A  1.2.3.1
9804 HOST-1.EXAMPLE.   MX 0 .
9805 HOST-2.EXAMPLE.   A  1.2.3.2
9806 HOST-2.EXAMPLE.   MX 0 .
9807 HOST-3.EXAMPLE.   A  1.2.3.3
9808 HOST-3.EXAMPLE.   MX 0 .
9809 ...
9810 HOST-127.EXAMPLE. A  1.2.3.127
9811 HOST-127.EXAMPLE. MX 0 .
9812 </pre>
9813 <div class="informaltable"><table border="1">
9814 <colgroup>
9815 <col>
9816 <col>
9817 </colgroup>
9818 <tbody>
9819 <tr>
9820 <td>
9821                     <p><span><strong class="command">range</strong></span></p>
9822                   </td>
9823 <td>
9824                     <p>
9825                       This can be one of two forms: start-stop
9826                       or start-stop/step. If the first form is used, then step
9827                       is set to
9828                       1. All of start, stop and step must be positive.
9829                     </p>
9830                   </td>
9831 </tr>
9832 <tr>
9833 <td>
9834                     <p><span><strong class="command">lhs</strong></span></p>
9835                   </td>
9836 <td>
9837                     <p>This
9838                       describes the owner name of the resource records
9839                       to be created.  Any single <span><strong class="command">$</strong></span>
9840                       (dollar sign)
9841                       symbols within the <span><strong class="command">lhs</strong></span> string
9842                       are replaced by the iterator value.
9843
9844                       To get a $ in the output, you need to escape the
9845                       <span><strong class="command">$</strong></span> using a backslash
9846                       <span><strong class="command">\</strong></span>,
9847                       e.g. <span><strong class="command">\$</strong></span>. The
9848                       <span><strong class="command">$</strong></span> may optionally be followed
9849                       by modifiers which change the offset from the
9850                       iterator, field width and base.
9851
9852                       Modifiers are introduced by a
9853                       <span><strong class="command">{</strong></span> (left brace) immediately following the
9854                       <span><strong class="command">$</strong></span> as
9855                       <span><strong class="command">${offset[,width[,base]]}</strong></span>.
9856                       For example, <span><strong class="command">${-20,3,d}</strong></span>
9857                       subtracts 20 from the current value, prints the
9858                       result as a decimal in a zero-padded field of
9859                       width 3.
9860
9861                       Available output forms are decimal
9862                       (<span><strong class="command">d</strong></span>), octal
9863                       (<span><strong class="command">o</strong></span>), hexadecimal
9864                       (<span><strong class="command">x</strong></span> or <span><strong class="command">X</strong></span>
9865                       for uppercase) and nibble
9866                       (<span><strong class="command">n</strong></span> or <span><strong class="command">N</strong></span>\
9867                       for uppercase).  The default modifier is
9868                       <span><strong class="command">${0,0,d}</strong></span>.  If the
9869                       <span><strong class="command">lhs</strong></span> is not absolute, the
9870                       current <span><strong class="command">$ORIGIN</strong></span> is appended
9871                       to the name.
9872                     </p>
9873                     <p>
9874                       In nibble mode the value will be treated as
9875                       if it was a reversed hexadecimal string
9876                       with each hexadecimal digit as a separate
9877                       label.  The width field includes the label
9878                       separator.
9879                     </p>
9880                     <p>
9881                       For compatibility with earlier versions,
9882                       <span><strong class="command">$$</strong></span> is still recognized as
9883                       indicating a literal $ in the output.
9884                     </p>
9885                   </td>
9886 </tr>
9887 <tr>
9888 <td>
9889                     <p><span><strong class="command">ttl</strong></span></p>
9890                   </td>
9891 <td>
9892                     <p>
9893                       Specifies the time-to-live of the generated records. If
9894                       not specified this will be inherited using the
9895                       normal TTL inheritance rules.
9896                     </p>
9897                     <p><span><strong class="command">class</strong></span>
9898                       and <span><strong class="command">ttl</strong></span> can be
9899                       entered in either order.
9900                     </p>
9901                   </td>
9902 </tr>
9903 <tr>
9904 <td>
9905                     <p><span><strong class="command">class</strong></span></p>
9906                   </td>
9907 <td>
9908                     <p>
9909                       Specifies the class of the generated records.
9910                       This must match the zone class if it is
9911                       specified.
9912                     </p>
9913                     <p><span><strong class="command">class</strong></span>
9914                       and <span><strong class="command">ttl</strong></span> can be
9915                       entered in either order.
9916                     </p>
9917                   </td>
9918 </tr>
9919 <tr>
9920 <td>
9921                     <p><span><strong class="command">type</strong></span></p>
9922                   </td>
9923 <td>
9924                     <p>
9925                       Any valid type.
9926                     </p>
9927                   </td>
9928 </tr>
9929 <tr>
9930 <td>
9931                     <p><span><strong class="command">rhs</strong></span></p>
9932                   </td>
9933 <td>
9934                     <p>
9935                       <span><strong class="command">rhs</strong></span>, optionally, quoted string.
9936                     </p>
9937                   </td>
9938 </tr>
9939 </tbody>
9940 </table></div>
9941 <p>
9942             The <span><strong class="command">$GENERATE</strong></span> directive is a <acronym class="acronym">BIND</acronym> extension
9943             and not part of the standard zone file format.
9944           </p>
9945 <p>
9946             BIND 8 does not support the optional TTL and CLASS fields.
9947           </p>
9948 </div>
9949 <div class="sect2" lang="en">
9950 <div class="titlepage"><div><div><h3 class="title">
9951 <a name="zonefile_format"></a>Additional File Formats</h3></div></div></div>
9952 <p>
9953             In addition to the standard textual format, BIND 9
9954             supports the ability to read or dump to zone files in
9955             other formats.  The <code class="constant">raw</code> format is
9956             currently available as an additional format.  It is a
9957             binary format representing BIND 9's internal data
9958             structure directly, thereby remarkably improving the
9959             loading time.
9960           </p>
9961 <p>
9962             For a primary server, a zone file in the
9963             <code class="constant">raw</code> format is expected to be
9964             generated from a textual zone file by the
9965             <span><strong class="command">named-compilezone</strong></span> command.  For a
9966             secondary server or for a dynamic zone, it is automatically
9967             generated (if this format is specified by the
9968             <span><strong class="command">masterfile-format</strong></span> option) when
9969             <span><strong class="command">named</strong></span> dumps the zone contents after
9970             zone transfer or when applying prior updates.
9971           </p>
9972 <p>
9973             If a zone file in a binary format needs manual modification,
9974             it first must be converted to a textual form by the
9975             <span><strong class="command">named-compilezone</strong></span> command.  All
9976             necessary modification should go to the text file, which
9977             should then be converted to the binary form by the
9978             <span><strong class="command">named-compilezone</strong></span> command again.
9979           </p>
9980 <p>
9981              Although the <code class="constant">raw</code> format uses the
9982              network byte order and avoids architecture-dependent
9983              data alignment so that it is as much portable as
9984              possible, it is primarily expected to be used inside
9985              the same single system.  In order to export a zone
9986              file in the <code class="constant">raw</code> format or make a
9987              portable backup of the file, it is recommended to
9988              convert the file to the standard textual representation.
9989           </p>
9990 </div>
9991 </div>
9992 <div class="sect1" lang="en">
9993 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
9994 <a name="statistics"></a>BIND9 Statistics</h2></div></div></div>
9995 <p>
9996           <acronym class="acronym">BIND</acronym> 9 maintains lots of statistics
9997           information and provides several interfaces for users to
9998           get access to the statistics.
9999           The available statistics include all statistics counters
10000           that were available in <acronym class="acronym">BIND</acronym> 8 and
10001           are meaningful in <acronym class="acronym">BIND</acronym> 9,
10002           and other information that is considered useful.
10003         </p>
10004 <p>
10005           The statistics information is categorized into the following
10006           sections.
10007         </p>
10008 <div class="informaltable"><table border="1">
10009 <colgroup>
10010 <col>
10011 <col>
10012 </colgroup>
10013 <tbody>
10014 <tr>
10015 <td>
10016                   <p>Incoming Requests</p>
10017                 </td>
10018 <td>
10019                   <p>
10020                     The number of incoming DNS requests for each OPCODE.
10021                   </p>
10022                 </td>
10023 </tr>
10024 <tr>
10025 <td>
10026                   <p>Incoming Queries</p>
10027                 </td>
10028 <td>
10029                   <p>
10030                     The number of incoming queries for each RR type.
10031                   </p>
10032                 </td>
10033 </tr>
10034 <tr>
10035 <td>
10036                   <p>Outgoing Queries</p>
10037                 </td>
10038 <td>
10039                   <p>
10040                     The number of outgoing queries for each RR
10041                     type sent from the internal resolver.
10042                     Maintained per view.
10043                   </p>
10044                 </td>
10045 </tr>
10046 <tr>
10047 <td>
10048                   <p>Name Server Statistics</p>
10049                 </td>
10050 <td>
10051                   <p>
10052                     Statistics counters about incoming request processing.
10053                   </p>
10054                 </td>
10055 </tr>
10056 <tr>
10057 <td>
10058                   <p>Zone Maintenance Statistics</p>
10059                 </td>
10060 <td>
10061                   <p>
10062                     Statistics counters regarding zone maintenance
10063                     operations such as zone transfers.
10064                   </p>
10065                 </td>
10066 </tr>
10067 <tr>
10068 <td>
10069                   <p>Resolver Statistics</p>
10070                 </td>
10071 <td>
10072                   <p>
10073                     Statistics counters about name resolution
10074                     performed in the internal resolver.
10075                     Maintained per view.
10076                   </p>
10077                 </td>
10078 </tr>
10079 <tr>
10080 <td>
10081                   <p>Cache DB RRsets</p>
10082                 </td>
10083 <td>
10084                   <p>
10085                     The number of RRsets per RR type and nonexistent
10086                     names stored in the cache database.
10087                     If the exclamation mark (!) is printed for a RR
10088                     type, it means that particular type of RRset is
10089                     known to be nonexistent (this is also known as
10090                     "NXRRSET").
10091                     Maintained per view.
10092                   </p>
10093                 </td>
10094 </tr>
10095 <tr>
10096 <td>
10097                   <p>Socket I/O Statistics</p>
10098                 </td>
10099 <td>
10100                   <p>
10101                     Statistics counters about network related events.
10102                   </p>
10103                 </td>
10104 </tr>
10105 </tbody>
10106 </table></div>
10107 <p>
10108           A subset of Name Server Statistics is collected and shown
10109           per zone for which the server has the authority when
10110           <span><strong class="command">zone-statistics</strong></span> is set to
10111           <strong class="userinput"><code>yes</code></strong>.
10112           These statistics counters are shown with their zone and view
10113           names.
10114           In some cases the view names are omitted for the default view.
10115         </p>
10116 <p>
10117           There are currently two user interfaces to get access to the
10118           statistics.
10119           One is in the plain text format dumped to the file specified
10120           by the <span><strong class="command">statistics-file</strong></span> configuration option.
10121           The other is remotely accessible via a statistics channel
10122           when the <span><strong class="command">statistics-channels</strong></span> statement
10123           is specified in the configuration file
10124           (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>.)
10125         </p>
10126 <div class="sect3" lang="en">
10127 <div class="titlepage"><div><div><h4 class="title">
10128 <a name="statsfile"></a>The Statistics File</h4></div></div></div>
10129 <p>
10130             The text format statistics dump begins with a line, like:
10131           </p>
10132 <p>
10133             <span><strong class="command">+++ Statistics Dump +++ (973798949)</strong></span>
10134           </p>
10135 <p>
10136             The number in parentheses is a standard
10137             Unix-style timestamp, measured as seconds since January 1, 1970.
10138
10139             Following
10140             that line is a set of statistics information, which is categorized
10141             as described above.
10142             Each section begins with a line, like:
10143           </p>
10144 <p>
10145             <span><strong class="command">++ Name Server Statistics ++</strong></span>
10146           </p>
10147 <p>
10148             Each section consists of lines, each containing the statistics
10149             counter value followed by its textual description.
10150             See below for available counters.
10151             For brevity, counters that have a value of 0 are not shown
10152             in the statistics file.
10153           </p>
10154 <p>
10155             The statistics dump ends with the line where the
10156             number is identical to the number in the beginning line; for example:
10157           </p>
10158 <p>
10159             <span><strong class="command">--- Statistics Dump --- (973798949)</strong></span>
10160           </p>
10161 </div>
10162 <div class="sect2" lang="en">
10163 <div class="titlepage"><div><div><h3 class="title">
10164 <a name="statistics_counters"></a>Statistics Counters</h3></div></div></div>
10165 <p>
10166             The following tables summarize statistics counters that
10167             <acronym class="acronym">BIND</acronym> 9 provides.
10168             For each row of the tables, the leftmost column is the
10169             abbreviated symbol name of that counter.
10170             These symbols are shown in the statistics information
10171             accessed via an HTTP statistics channel.
10172             The rightmost column gives the description of the counter,
10173             which is also shown in the statistics file
10174             (but, in this document, possibly with slight modification
10175             for better readability).
10176             Additional notes may also be provided in this column.
10177             When a middle column exists between these two columns,
10178             it gives the corresponding counter name of the
10179             <acronym class="acronym">BIND</acronym> 8 statistics, if applicable.
10180           </p>
10181 <div class="sect3" lang="en">
10182 <div class="titlepage"><div><div><h4 class="title">
10183 <a name="id2600631"></a>Name Server Statistics Counters</h4></div></div></div>
10184 <div class="informaltable"><table border="1">
10185 <colgroup>
10186 <col>
10187 <col>
10188 <col>
10189 </colgroup>
10190 <tbody>
10191 <tr>
10192 <td>
10193                       <p>
10194                         <span class="emphasis"><em>Symbol</em></span>
10195                       </p>
10196                     </td>
10197 <td>
10198                       <p>
10199                         <span class="emphasis"><em>BIND8 Symbol</em></span>
10200                       </p>
10201                     </td>
10202 <td>
10203                       <p>
10204                         <span class="emphasis"><em>Description</em></span>
10205                       </p>
10206                     </td>
10207 </tr>
10208 <tr>
10209 <td>
10210                       <p><span><strong class="command">Requestv4</strong></span></p>
10211                     </td>
10212 <td>
10213                       <p><span><strong class="command">RQ</strong></span></p>
10214                     </td>
10215 <td>
10216                       <p>
10217                         IPv4 requests received.
10218                         Note: this also counts non query requests.
10219                       </p>
10220                     </td>
10221 </tr>
10222 <tr>
10223 <td>
10224                       <p><span><strong class="command">Requestv6</strong></span></p>
10225                     </td>
10226 <td>
10227                       <p><span><strong class="command">RQ</strong></span></p>
10228                     </td>
10229 <td>
10230                       <p>
10231                         IPv6 requests received.
10232                         Note: this also counts non query requests.
10233                       </p>
10234                     </td>
10235 </tr>
10236 <tr>
10237 <td>
10238                       <p><span><strong class="command">ReqEdns0</strong></span></p>
10239                     </td>
10240 <td>
10241                       <p><span><strong class="command"></strong></span></p>
10242                     </td>
10243 <td>
10244                       <p>
10245                         Requests with EDNS(0) received.
10246                       </p>
10247                     </td>
10248 </tr>
10249 <tr>
10250 <td>
10251                       <p><span><strong class="command">ReqBadEDNSVer</strong></span></p>
10252                     </td>
10253 <td>
10254                       <p><span><strong class="command"></strong></span></p>
10255                     </td>
10256 <td>
10257                       <p>
10258                         Requests with unsupported EDNS version received.
10259                       </p>
10260                     </td>
10261 </tr>
10262 <tr>
10263 <td>
10264                       <p><span><strong class="command">ReqTSIG</strong></span></p>
10265                     </td>
10266 <td>
10267                       <p><span><strong class="command"></strong></span></p>
10268                     </td>
10269 <td>
10270                       <p>
10271                         Requests with TSIG received.
10272                       </p>
10273                     </td>
10274 </tr>
10275 <tr>
10276 <td>
10277                       <p><span><strong class="command">ReqSIG0</strong></span></p>
10278                     </td>
10279 <td>
10280                       <p><span><strong class="command"></strong></span></p>
10281                     </td>
10282 <td>
10283                       <p>
10284                         Requests with SIG(0) received.
10285                       </p>
10286                     </td>
10287 </tr>
10288 <tr>
10289 <td>
10290                       <p><span><strong class="command">ReqBadSIG</strong></span></p>
10291                     </td>
10292 <td>
10293                       <p><span><strong class="command"></strong></span></p>
10294                     </td>
10295 <td>
10296                       <p>
10297                         Requests with invalid (TSIG or SIG(0)) signature.
10298                       </p>
10299                     </td>
10300 </tr>
10301 <tr>
10302 <td>
10303                       <p><span><strong class="command">ReqTCP</strong></span></p>
10304                     </td>
10305 <td>
10306                       <p><span><strong class="command">RTCP</strong></span></p>
10307                     </td>
10308 <td>
10309                       <p>
10310                         TCP requests received.
10311                       </p>
10312                     </td>
10313 </tr>
10314 <tr>
10315 <td>
10316                       <p><span><strong class="command">AuthQryRej</strong></span></p>
10317                     </td>
10318 <td>
10319                       <p><span><strong class="command">RUQ</strong></span></p>
10320                     </td>
10321 <td>
10322                       <p>
10323                         Authoritative (non recursive) queries rejected.
10324                       </p>
10325                     </td>
10326 </tr>
10327 <tr>
10328 <td>
10329                       <p><span><strong class="command">RecQryRej</strong></span></p>
10330                     </td>
10331 <td>
10332                       <p><span><strong class="command">RURQ</strong></span></p>
10333                     </td>
10334 <td>
10335                       <p>
10336                         Recursive queries rejected.
10337                       </p>
10338                     </td>
10339 </tr>
10340 <tr>
10341 <td>
10342                       <p><span><strong class="command">XfrRej</strong></span></p>
10343                     </td>
10344 <td>
10345                       <p><span><strong class="command">RUXFR</strong></span></p>
10346                     </td>
10347 <td>
10348                       <p>
10349                         Zone transfer requests rejected.
10350                       </p>
10351                     </td>
10352 </tr>
10353 <tr>
10354 <td>
10355                       <p><span><strong class="command">UpdateRej</strong></span></p>
10356                     </td>
10357 <td>
10358                       <p><span><strong class="command">RUUpd</strong></span></p>
10359                     </td>
10360 <td>
10361                       <p>
10362                         Dynamic update requests rejected.
10363                       </p>
10364                     </td>
10365 </tr>
10366 <tr>
10367 <td>
10368                       <p><span><strong class="command">Response</strong></span></p>
10369                     </td>
10370 <td>
10371                       <p><span><strong class="command">SAns</strong></span></p>
10372                     </td>
10373 <td>
10374                       <p>
10375                         Responses sent.
10376                       </p>
10377                     </td>
10378 </tr>
10379 <tr>
10380 <td>
10381                       <p><span><strong class="command">RespTruncated</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 sent.
10389                       </p>
10390                     </td>
10391 </tr>
10392 <tr>
10393 <td>
10394                       <p><span><strong class="command">RespEDNS0</strong></span></p>
10395                     </td>
10396 <td>
10397                       <p><span><strong class="command"></strong></span></p>
10398                     </td>
10399 <td>
10400                       <p>
10401                         Responses with EDNS(0) sent.
10402                       </p>
10403                     </td>
10404 </tr>
10405 <tr>
10406 <td>
10407                       <p><span><strong class="command">RespTSIG</strong></span></p>
10408                     </td>
10409 <td>
10410                       <p><span><strong class="command"></strong></span></p>
10411                     </td>
10412 <td>
10413                       <p>
10414                         Responses with TSIG sent.
10415                       </p>
10416                     </td>
10417 </tr>
10418 <tr>
10419 <td>
10420                       <p><span><strong class="command">RespSIG0</strong></span></p>
10421                     </td>
10422 <td>
10423                       <p><span><strong class="command"></strong></span></p>
10424                     </td>
10425 <td>
10426                       <p>
10427                         Responses with SIG(0) sent.
10428                       </p>
10429                     </td>
10430 </tr>
10431 <tr>
10432 <td>
10433                       <p><span><strong class="command">QrySuccess</strong></span></p>
10434                     </td>
10435 <td>
10436                       <p><span><strong class="command"></strong></span></p>
10437                     </td>
10438 <td>
10439                       <p>
10440                         Queries resulted in a successful answer.
10441                         This means the query which returns a NOERROR response
10442                         with at least one answer RR.
10443                         This corresponds to the
10444                         <span><strong class="command">success</strong></span> counter
10445                         of previous versions of
10446                         <acronym class="acronym">BIND</acronym> 9.
10447                       </p>
10448                     </td>
10449 </tr>
10450 <tr>
10451 <td>
10452                       <p><span><strong class="command">QryAuthAns</strong></span></p>
10453                     </td>
10454 <td>
10455                       <p><span><strong class="command"></strong></span></p>
10456                     </td>
10457 <td>
10458                       <p>
10459                         Queries resulted in authoritative answer.
10460                       </p>
10461                     </td>
10462 </tr>
10463 <tr>
10464 <td>
10465                       <p><span><strong class="command">QryNoauthAns</strong></span></p>
10466                     </td>
10467 <td>
10468                       <p><span><strong class="command">SNaAns</strong></span></p>
10469                     </td>
10470 <td>
10471                       <p>
10472                         Queries resulted in non authoritative answer.
10473                       </p>
10474                     </td>
10475 </tr>
10476 <tr>
10477 <td>
10478                       <p><span><strong class="command">QryReferral</strong></span></p>
10479                     </td>
10480 <td>
10481                       <p><span><strong class="command"></strong></span></p>
10482                     </td>
10483 <td>
10484                       <p>
10485                         Queries resulted in referral answer.
10486                         This corresponds to the
10487                         <span><strong class="command">referral</strong></span> counter
10488                         of previous versions of
10489                         <acronym class="acronym">BIND</acronym> 9.
10490                       </p>
10491                     </td>
10492 </tr>
10493 <tr>
10494 <td>
10495                       <p><span><strong class="command">QryNxrrset</strong></span></p>
10496                     </td>
10497 <td>
10498                       <p><span><strong class="command"></strong></span></p>
10499                     </td>
10500 <td>
10501                       <p>
10502                         Queries resulted in NOERROR responses with no data.
10503                         This corresponds to the
10504                         <span><strong class="command">nxrrset</strong></span> counter
10505                         of previous versions of
10506                         <acronym class="acronym">BIND</acronym> 9.
10507                       </p>
10508                     </td>
10509 </tr>
10510 <tr>
10511 <td>
10512                       <p><span><strong class="command">QrySERVFAIL</strong></span></p>
10513                     </td>
10514 <td>
10515                       <p><span><strong class="command">SFail</strong></span></p>
10516                     </td>
10517 <td>
10518                       <p>
10519                         Queries resulted in SERVFAIL.
10520                       </p>
10521                     </td>
10522 </tr>
10523 <tr>
10524 <td>
10525                       <p><span><strong class="command">QryFORMERR</strong></span></p>
10526                     </td>
10527 <td>
10528                       <p><span><strong class="command">SFErr</strong></span></p>
10529                     </td>
10530 <td>
10531                       <p>
10532                         Queries resulted in FORMERR.
10533                       </p>
10534                     </td>
10535 </tr>
10536 <tr>
10537 <td>
10538                       <p><span><strong class="command">QryNXDOMAIN</strong></span></p>
10539                     </td>
10540 <td>
10541                       <p><span><strong class="command">SNXD</strong></span></p>
10542                     </td>
10543 <td>
10544                       <p>
10545                         Queries resulted in NXDOMAIN.
10546                         This corresponds to the
10547                         <span><strong class="command">nxdomain</strong></span> counter
10548                         of previous versions of
10549                         <acronym class="acronym">BIND</acronym> 9.
10550                       </p>
10551                     </td>
10552 </tr>
10553 <tr>
10554 <td>
10555                       <p><span><strong class="command">QryRecursion</strong></span></p>
10556                     </td>
10557 <td>
10558                       <p><span><strong class="command">RFwdQ</strong></span></p>
10559                     </td>
10560 <td>
10561                       <p>
10562                         Queries which caused the server
10563                         to perform recursion in order to find the final answer.
10564                         This corresponds to the
10565                         <span><strong class="command">recursion</strong></span> counter
10566                         of previous versions of
10567                         <acronym class="acronym">BIND</acronym> 9.
10568                       </p>
10569                     </td>
10570 </tr>
10571 <tr>
10572 <td>
10573                       <p><span><strong class="command">QryDuplicate</strong></span></p>
10574                     </td>
10575 <td>
10576                       <p><span><strong class="command">RDupQ</strong></span></p>
10577                     </td>
10578 <td>
10579                       <p>
10580                         Queries which the server attempted to
10581                         recurse but discovered an existing query with the same
10582                         IP address, port, query ID, name, type and class
10583                         already being processed.
10584                         This corresponds to the
10585                         <span><strong class="command">duplicate</strong></span> counter
10586                         of previous versions of
10587                         <acronym class="acronym">BIND</acronym> 9.
10588                       </p>
10589                     </td>
10590 </tr>
10591 <tr>
10592 <td>
10593                       <p><span><strong class="command">QryDropped</strong></span></p>
10594                     </td>
10595 <td>
10596                       <p><span><strong class="command"></strong></span></p>
10597                     </td>
10598 <td>
10599                       <p>
10600                         Recursive queries for which the server
10601                         discovered an excessive number of existing
10602                         recursive queries for the same name, type and
10603                         class and were subsequently dropped.
10604                         This is the number of dropped queries due to
10605                         the reason explained with the
10606                         <span><strong class="command">clients-per-query</strong></span>
10607                         and
10608                         <span><strong class="command">max-clients-per-query</strong></span>
10609                         options
10610                         (see the description about
10611                         <a href="Bv9ARM.ch06.html#clients-per-query"><span><strong class="command">clients-per-query</strong></span></a>.)
10612                         This corresponds to the
10613                         <span><strong class="command">dropped</strong></span> counter
10614                         of previous versions of
10615                         <acronym class="acronym">BIND</acronym> 9.
10616                       </p>
10617                     </td>
10618 </tr>
10619 <tr>
10620 <td>
10621                       <p><span><strong class="command">QryFailure</strong></span></p>
10622                     </td>
10623 <td>
10624                       <p><span><strong class="command"></strong></span></p>
10625                     </td>
10626 <td>
10627                       <p>
10628                         Other query failures.
10629                         This corresponds to the
10630                         <span><strong class="command">failure</strong></span> counter
10631                         of previous versions of
10632                         <acronym class="acronym">BIND</acronym> 9.
10633                         Note: this counter is provided mainly for
10634                         backward compatibility with the previous versions.
10635                         Normally a more fine-grained counters such as
10636                         <span><strong class="command">AuthQryRej</strong></span> and
10637                         <span><strong class="command">RecQryRej</strong></span>
10638                         that would also fall into this counter are provided,
10639                         and so this counter would not be of much
10640                         interest in practice.
10641                       </p>
10642                     </td>
10643 </tr>
10644 <tr>
10645 <td>
10646                       <p><span><strong class="command">XfrReqDone</strong></span></p>
10647                     </td>
10648 <td>
10649                       <p><span><strong class="command"></strong></span></p>
10650                     </td>
10651 <td>
10652                       <p>
10653                         Requested zone transfers completed.
10654                       </p>
10655                     </td>
10656 </tr>
10657 <tr>
10658 <td>
10659                       <p><span><strong class="command">UpdateReqFwd</strong></span></p>
10660                     </td>
10661 <td>
10662                       <p><span><strong class="command"></strong></span></p>
10663                     </td>
10664 <td>
10665                       <p>
10666                         Update requests forwarded.
10667                       </p>
10668                     </td>
10669 </tr>
10670 <tr>
10671 <td>
10672                       <p><span><strong class="command">UpdateRespFwd</strong></span></p>
10673                     </td>
10674 <td>
10675                       <p><span><strong class="command"></strong></span></p>
10676                     </td>
10677 <td>
10678                       <p>
10679                         Update responses forwarded.
10680                       </p>
10681                     </td>
10682 </tr>
10683 <tr>
10684 <td>
10685                       <p><span><strong class="command">UpdateFwdFail</strong></span></p>
10686                     </td>
10687 <td>
10688                       <p><span><strong class="command"></strong></span></p>
10689                     </td>
10690 <td>
10691                       <p>
10692                         Dynamic update forward failed.
10693                       </p>
10694                     </td>
10695 </tr>
10696 <tr>
10697 <td>
10698                       <p><span><strong class="command">UpdateDone</strong></span></p>
10699                     </td>
10700 <td>
10701                       <p><span><strong class="command"></strong></span></p>
10702                     </td>
10703 <td>
10704                       <p>
10705                         Dynamic updates completed.
10706                       </p>
10707                     </td>
10708 </tr>
10709 <tr>
10710 <td>
10711                       <p><span><strong class="command">UpdateFail</strong></span></p>
10712                     </td>
10713 <td>
10714                       <p><span><strong class="command"></strong></span></p>
10715                     </td>
10716 <td>
10717                       <p>
10718                         Dynamic updates failed.
10719                       </p>
10720                     </td>
10721 </tr>
10722 <tr>
10723 <td>
10724                       <p><span><strong class="command">UpdateBadPrereq</strong></span></p>
10725                     </td>
10726 <td>
10727                       <p><span><strong class="command"></strong></span></p>
10728                     </td>
10729 <td>
10730                       <p>
10731                         Dynamic updates rejected due to prerequisite failure.
10732                       </p>
10733                     </td>
10734 </tr>
10735 <tr>
10736 <td>
10737                       <p><span><strong class="command">RPZRewrites</strong></span></p>
10738                     </td>
10739 <td>
10740                       <p><span><strong class="command"></strong></span></p>
10741                     </td>
10742 <td>
10743                       <p>
10744                         Response policy zone rewrites.
10745                       </p>
10746                     </td>
10747 </tr>
10748 <tr>
10749 <td>
10750                       <p><span><strong class="command">RateDropped</strong></span></p>
10751                     </td>
10752 <td>
10753                       <p><span><strong class="command"></strong></span></p>
10754                     </td>
10755 <td>
10756                       <p>
10757                         Responses dropped by rate limits.
10758                       </p>
10759                     </td>
10760 </tr>
10761 <tr>
10762 <td>
10763                       <p><span><strong class="command">RateSlipped</strong></span></p>
10764                     </td>
10765 <td>
10766                       <p><span><strong class="command"></strong></span></p>
10767                     </td>
10768 <td>
10769                       <p>
10770                         Responses truncated by rate limits.
10771                       </p>
10772                     </td>
10773 </tr>
10774 </tbody>
10775 </table></div>
10776 </div>
10777 <div class="sect3" lang="en">
10778 <div class="titlepage"><div><div><h4 class="title">
10779 <a name="id2602268"></a>Zone Maintenance Statistics Counters</h4></div></div></div>
10780 <div class="informaltable"><table border="1">
10781 <colgroup>
10782 <col>
10783 <col>
10784 </colgroup>
10785 <tbody>
10786 <tr>
10787 <td>
10788                       <p>
10789                         <span class="emphasis"><em>Symbol</em></span>
10790                       </p>
10791                     </td>
10792 <td>
10793                       <p>
10794                         <span class="emphasis"><em>Description</em></span>
10795                       </p>
10796                     </td>
10797 </tr>
10798 <tr>
10799 <td>
10800                       <p><span><strong class="command">NotifyOutv4</strong></span></p>
10801                     </td>
10802 <td>
10803                       <p>
10804                         IPv4 notifies sent.
10805                       </p>
10806                     </td>
10807 </tr>
10808 <tr>
10809 <td>
10810                       <p><span><strong class="command">NotifyOutv6</strong></span></p>
10811                     </td>
10812 <td>
10813                       <p>
10814                         IPv6 notifies sent.
10815                       </p>
10816                     </td>
10817 </tr>
10818 <tr>
10819 <td>
10820                       <p><span><strong class="command">NotifyInv4</strong></span></p>
10821                     </td>
10822 <td>
10823                       <p>
10824                         IPv4 notifies received.
10825                       </p>
10826                     </td>
10827 </tr>
10828 <tr>
10829 <td>
10830                       <p><span><strong class="command">NotifyInv6</strong></span></p>
10831                     </td>
10832 <td>
10833                       <p>
10834                         IPv6 notifies received.
10835                       </p>
10836                     </td>
10837 </tr>
10838 <tr>
10839 <td>
10840                       <p><span><strong class="command">NotifyRej</strong></span></p>
10841                     </td>
10842 <td>
10843                       <p>
10844                         Incoming notifies rejected.
10845                       </p>
10846                     </td>
10847 </tr>
10848 <tr>
10849 <td>
10850                       <p><span><strong class="command">SOAOutv4</strong></span></p>
10851                     </td>
10852 <td>
10853                       <p>
10854                         IPv4 SOA queries sent.
10855                       </p>
10856                     </td>
10857 </tr>
10858 <tr>
10859 <td>
10860                       <p><span><strong class="command">SOAOutv6</strong></span></p>
10861                     </td>
10862 <td>
10863                       <p>
10864                         IPv6 SOA queries sent.
10865                       </p>
10866                     </td>
10867 </tr>
10868 <tr>
10869 <td>
10870                       <p><span><strong class="command">AXFRReqv4</strong></span></p>
10871                     </td>
10872 <td>
10873                       <p>
10874                         IPv4 AXFR requested.
10875                       </p>
10876                     </td>
10877 </tr>
10878 <tr>
10879 <td>
10880                       <p><span><strong class="command">AXFRReqv6</strong></span></p>
10881                     </td>
10882 <td>
10883                       <p>
10884                         IPv6 AXFR requested.
10885                       </p>
10886                     </td>
10887 </tr>
10888 <tr>
10889 <td>
10890                       <p><span><strong class="command">IXFRReqv4</strong></span></p>
10891                     </td>
10892 <td>
10893                       <p>
10894                         IPv4 IXFR requested.
10895                       </p>
10896                     </td>
10897 </tr>
10898 <tr>
10899 <td>
10900                       <p><span><strong class="command">IXFRReqv6</strong></span></p>
10901                     </td>
10902 <td>
10903                       <p>
10904                         IPv6 IXFR requested.
10905                       </p>
10906                     </td>
10907 </tr>
10908 <tr>
10909 <td>
10910                       <p><span><strong class="command">XfrSuccess</strong></span></p>
10911                     </td>
10912 <td>
10913                       <p>
10914                         Zone transfer requests succeeded.
10915                       </p>
10916                     </td>
10917 </tr>
10918 <tr>
10919 <td>
10920                       <p><span><strong class="command">XfrFail</strong></span></p>
10921                     </td>
10922 <td>
10923                       <p>
10924                         Zone transfer requests failed.
10925                       </p>
10926                     </td>
10927 </tr>
10928 </tbody>
10929 </table></div>
10930 </div>
10931 <div class="sect3" lang="en">
10932 <div class="titlepage"><div><div><h4 class="title">
10933 <a name="id2602720"></a>Resolver Statistics Counters</h4></div></div></div>
10934 <div class="informaltable"><table border="1">
10935 <colgroup>
10936 <col>
10937 <col>
10938 <col>
10939 </colgroup>
10940 <tbody>
10941 <tr>
10942 <td>
10943                       <p>
10944                         <span class="emphasis"><em>Symbol</em></span>
10945                       </p>
10946                     </td>
10947 <td>
10948                       <p>
10949                         <span class="emphasis"><em>BIND8 Symbol</em></span>
10950                       </p>
10951                     </td>
10952 <td>
10953                       <p>
10954                         <span class="emphasis"><em>Description</em></span>
10955                       </p>
10956                     </td>
10957 </tr>
10958 <tr>
10959 <td>
10960                       <p><span><strong class="command">Queryv4</strong></span></p>
10961                     </td>
10962 <td>
10963                       <p><span><strong class="command">SFwdQ</strong></span></p>
10964                     </td>
10965 <td>
10966                       <p>
10967                         IPv4 queries sent.
10968                       </p>
10969                     </td>
10970 </tr>
10971 <tr>
10972 <td>
10973                       <p><span><strong class="command">Queryv6</strong></span></p>
10974                     </td>
10975 <td>
10976                       <p><span><strong class="command">SFwdQ</strong></span></p>
10977                     </td>
10978 <td>
10979                       <p>
10980                         IPv6 queries sent.
10981                       </p>
10982                     </td>
10983 </tr>
10984 <tr>
10985 <td>
10986                       <p><span><strong class="command">Responsev4</strong></span></p>
10987                     </td>
10988 <td>
10989                       <p><span><strong class="command">RR</strong></span></p>
10990                     </td>
10991 <td>
10992                       <p>
10993                         IPv4 responses received.
10994                       </p>
10995                     </td>
10996 </tr>
10997 <tr>
10998 <td>
10999                       <p><span><strong class="command">Responsev6</strong></span></p>
11000                     </td>
11001 <td>
11002                       <p><span><strong class="command">RR</strong></span></p>
11003                     </td>
11004 <td>
11005                       <p>
11006                         IPv6 responses received.
11007                       </p>
11008                     </td>
11009 </tr>
11010 <tr>
11011 <td>
11012                       <p><span><strong class="command">NXDOMAIN</strong></span></p>
11013                     </td>
11014 <td>
11015                       <p><span><strong class="command">RNXD</strong></span></p>
11016                     </td>
11017 <td>
11018                       <p>
11019                         NXDOMAIN received.
11020                       </p>
11021                     </td>
11022 </tr>
11023 <tr>
11024 <td>
11025                       <p><span><strong class="command">SERVFAIL</strong></span></p>
11026                     </td>
11027 <td>
11028                       <p><span><strong class="command">RFail</strong></span></p>
11029                     </td>
11030 <td>
11031                       <p>
11032                         SERVFAIL received.
11033                       </p>
11034                     </td>
11035 </tr>
11036 <tr>
11037 <td>
11038                       <p><span><strong class="command">FORMERR</strong></span></p>
11039                     </td>
11040 <td>
11041                       <p><span><strong class="command">RFErr</strong></span></p>
11042                     </td>
11043 <td>
11044                       <p>
11045                         FORMERR received.
11046                       </p>
11047                     </td>
11048 </tr>
11049 <tr>
11050 <td>
11051                       <p><span><strong class="command">OtherError</strong></span></p>
11052                     </td>
11053 <td>
11054                       <p><span><strong class="command">RErr</strong></span></p>
11055                     </td>
11056 <td>
11057                       <p>
11058                         Other errors received.
11059                       </p>
11060                     </td>
11061 </tr>
11062 <tr>
11063 <td>
11064                       <p><span><strong class="command">EDNS0Fail</strong></span></p>
11065                                                  </td>
11066 <td>
11067                       <p><span><strong class="command"></strong></span></p>
11068                     </td>
11069 <td>
11070                       <p>
11071                         EDNS(0) query failures.
11072                       </p>
11073                     </td>
11074 </tr>
11075 <tr>
11076 <td>
11077                       <p><span><strong class="command">Mismatch</strong></span></p>
11078                     </td>
11079 <td>
11080                       <p><span><strong class="command">RDupR</strong></span></p>
11081                     </td>
11082 <td>
11083                       <p>
11084                         Mismatch responses received.
11085                         The DNS ID, response's source address,
11086                         and/or the response's source port does not
11087                         match what was expected.
11088                         (The port must be 53 or as defined by
11089                         the <span><strong class="command">port</strong></span> option.)
11090                         This may be an indication of a cache
11091                         poisoning attempt.
11092                       </p>
11093                     </td>
11094 </tr>
11095 <tr>
11096 <td>
11097                       <p><span><strong class="command">Truncated</strong></span></p>
11098                     </td>
11099 <td>
11100                       <p><span><strong class="command"></strong></span></p>
11101                     </td>
11102 <td>
11103                       <p>
11104                         Truncated responses received.
11105                       </p>
11106                     </td>
11107 </tr>
11108 <tr>
11109 <td>
11110                       <p><span><strong class="command">Lame</strong></span></p>
11111                     </td>
11112 <td>
11113                       <p><span><strong class="command">RLame</strong></span></p>
11114                     </td>
11115 <td>
11116                       <p>
11117                         Lame delegations received.
11118                       </p>
11119                     </td>
11120 </tr>
11121 <tr>
11122 <td>
11123                       <p><span><strong class="command">Retry</strong></span></p>
11124                     </td>
11125 <td>
11126                       <p><span><strong class="command">SDupQ</strong></span></p>
11127                     </td>
11128 <td>
11129                       <p>
11130                         Query retries performed.
11131                       </p>
11132                     </td>
11133 </tr>
11134 <tr>
11135 <td>
11136                       <p><span><strong class="command">QueryAbort</strong></span></p>
11137                     </td>
11138 <td>
11139                       <p><span><strong class="command"></strong></span></p>
11140                     </td>
11141 <td>
11142                       <p>
11143                         Queries aborted due to quota control.
11144                       </p>
11145                     </td>
11146 </tr>
11147 <tr>
11148 <td>
11149                       <p><span><strong class="command">QuerySockFail</strong></span></p>
11150                     </td>
11151 <td>
11152                       <p><span><strong class="command"></strong></span></p>
11153                     </td>
11154 <td>
11155                       <p>
11156                         Failures in opening query sockets.
11157                         One common reason for such failures is a
11158                         failure of opening a new socket due to a
11159                         limitation on file descriptors.
11160                       </p>
11161                     </td>
11162 </tr>
11163 <tr>
11164 <td>
11165                       <p><span><strong class="command">QueryTimeout</strong></span></p>
11166                     </td>
11167 <td>
11168                       <p><span><strong class="command"></strong></span></p>
11169                     </td>
11170 <td>
11171                       <p>
11172                         Query timeouts.
11173                       </p>
11174                     </td>
11175 </tr>
11176 <tr>
11177 <td>
11178                       <p><span><strong class="command">GlueFetchv4</strong></span></p>
11179                     </td>
11180 <td>
11181                       <p><span><strong class="command">SSysQ</strong></span></p>
11182                     </td>
11183 <td>
11184                       <p>
11185                         IPv4 NS address fetches invoked.
11186                       </p>
11187                     </td>
11188 </tr>
11189 <tr>
11190 <td>
11191                       <p><span><strong class="command">GlueFetchv6</strong></span></p>
11192                     </td>
11193 <td>
11194                       <p><span><strong class="command">SSysQ</strong></span></p>
11195                     </td>
11196 <td>
11197                       <p>
11198                         IPv6 NS address fetches invoked.
11199                       </p>
11200                     </td>
11201 </tr>
11202 <tr>
11203 <td>
11204                       <p><span><strong class="command">GlueFetchv4Fail</strong></span></p>
11205                     </td>
11206 <td>
11207                       <p><span><strong class="command"></strong></span></p>
11208                     </td>
11209 <td>
11210                       <p>
11211                         IPv4 NS address fetch failed.
11212                       </p>
11213                     </td>
11214 </tr>
11215 <tr>
11216 <td>
11217                       <p><span><strong class="command">GlueFetchv6Fail</strong></span></p>
11218                     </td>
11219 <td>
11220                       <p><span><strong class="command"></strong></span></p>
11221                     </td>
11222 <td>
11223                       <p>
11224                         IPv6 NS address fetch failed.
11225                       </p>
11226                     </td>
11227 </tr>
11228 <tr>
11229 <td>
11230                       <p><span><strong class="command">ValAttempt</strong></span></p>
11231                     </td>
11232 <td>
11233                       <p><span><strong class="command"></strong></span></p>
11234                     </td>
11235 <td>
11236                       <p>
11237                         DNSSEC validation attempted.
11238                       </p>
11239                     </td>
11240 </tr>
11241 <tr>
11242 <td>
11243                       <p><span><strong class="command">ValOk</strong></span></p>
11244                     </td>
11245 <td>
11246                       <p><span><strong class="command"></strong></span></p>
11247                     </td>
11248 <td>
11249                       <p>
11250                         DNSSEC validation succeeded.
11251                       </p>
11252                     </td>
11253 </tr>
11254 <tr>
11255 <td>
11256                       <p><span><strong class="command">ValNegOk</strong></span></p>
11257                     </td>
11258 <td>
11259                       <p><span><strong class="command"></strong></span></p>
11260                     </td>
11261 <td>
11262                       <p>
11263                         DNSSEC validation on negative information succeeded.
11264                       </p>
11265                     </td>
11266 </tr>
11267 <tr>
11268 <td>
11269                       <p><span><strong class="command">ValFail</strong></span></p>
11270                     </td>
11271 <td>
11272                       <p><span><strong class="command"></strong></span></p>
11273                     </td>
11274 <td>
11275                       <p>
11276                         DNSSEC validation failed.
11277                       </p>
11278                     </td>
11279 </tr>
11280 <tr>
11281 <td>
11282                       <p><span><strong class="command">QryRTTnn</strong></span></p>
11283                     </td>
11284 <td>
11285                       <p><span><strong class="command"></strong></span></p>
11286                     </td>
11287 <td>
11288                       <p>
11289                         Frequency table on round trip times (RTTs) of
11290                         queries.
11291                         Each <span><strong class="command">nn</strong></span> specifies the corresponding
11292                         frequency.
11293                         In the sequence of
11294                         <span><strong class="command">nn_1</strong></span>,
11295                         <span><strong class="command">nn_2</strong></span>,
11296                         ...,
11297                         <span><strong class="command">nn_m</strong></span>,
11298                         the value of <span><strong class="command">nn_i</strong></span> is the
11299                         number of queries whose RTTs are between
11300                         <span><strong class="command">nn_(i-1)</strong></span> (inclusive) and
11301                         <span><strong class="command">nn_i</strong></span> (exclusive) milliseconds.
11302                         For the sake of convenience we define
11303                         <span><strong class="command">nn_0</strong></span> to be 0.
11304                         The last entry should be represented as
11305                         <span><strong class="command">nn_m+</strong></span>, which means the
11306                         number of queries whose RTTs are equal to or over
11307                         <span><strong class="command">nn_m</strong></span> milliseconds.
11308                       </p>
11309                     </td>
11310 </tr>
11311 </tbody>
11312 </table></div>
11313 </div>
11314 <div class="sect3" lang="en">
11315 <div class="titlepage"><div><div><h4 class="title">
11316 <a name="id2603673"></a>Socket I/O Statistics Counters</h4></div></div></div>
11317 <p>
11318               Socket I/O statistics counters are defined per socket
11319               types, which are
11320               <span><strong class="command">UDP4</strong></span> (UDP/IPv4),
11321               <span><strong class="command">UDP6</strong></span> (UDP/IPv6),
11322               <span><strong class="command">TCP4</strong></span> (TCP/IPv4),
11323               <span><strong class="command">TCP6</strong></span> (TCP/IPv6),
11324               <span><strong class="command">Unix</strong></span> (Unix Domain), and
11325               <span><strong class="command">FDwatch</strong></span> (sockets opened outside the
11326               socket module).
11327               In the following table <span><strong class="command">&lt;TYPE&gt;</strong></span>
11328               represents a socket type.
11329               Not all counters are available for all socket types;
11330               exceptions are noted in the description field.
11331             </p>
11332 <div class="informaltable"><table border="1">
11333 <colgroup>
11334 <col>
11335 <col>
11336 </colgroup>
11337 <tbody>
11338 <tr>
11339 <td>
11340                       <p>
11341                         <span class="emphasis"><em>Symbol</em></span>
11342                       </p>
11343                     </td>
11344 <td>
11345                       <p>
11346                         <span class="emphasis"><em>Description</em></span>
11347                       </p>
11348                     </td>
11349 </tr>
11350 <tr>
11351 <td>
11352                       <p><span><strong class="command">&lt;TYPE&gt;Open</strong></span></p>
11353                     </td>
11354 <td>
11355                       <p>
11356                         Sockets opened successfully.
11357                         This counter is not applicable to the
11358                         <span><strong class="command">FDwatch</strong></span> type.
11359                       </p>
11360                     </td>
11361 </tr>
11362 <tr>
11363 <td>
11364                       <p><span><strong class="command">&lt;TYPE&gt;OpenFail</strong></span></p>
11365                     </td>
11366 <td>
11367                       <p>
11368                         Failures of opening sockets.
11369                         This counter is not applicable to the
11370                         <span><strong class="command">FDwatch</strong></span> type.
11371                       </p>
11372                     </td>
11373 </tr>
11374 <tr>
11375 <td>
11376                       <p><span><strong class="command">&lt;TYPE&gt;Close</strong></span></p>
11377                     </td>
11378 <td>
11379                       <p>
11380                         Sockets closed.
11381                       </p>
11382                     </td>
11383 </tr>
11384 <tr>
11385 <td>
11386                       <p><span><strong class="command">&lt;TYPE&gt;BindFail</strong></span></p>
11387                     </td>
11388 <td>
11389                       <p>
11390                         Failures of binding sockets.
11391                       </p>
11392                     </td>
11393 </tr>
11394 <tr>
11395 <td>
11396                       <p><span><strong class="command">&lt;TYPE&gt;ConnFail</strong></span></p>
11397                     </td>
11398 <td>
11399                       <p>
11400                         Failures of connecting sockets.
11401                       </p>
11402                     </td>
11403 </tr>
11404 <tr>
11405 <td>
11406                       <p><span><strong class="command">&lt;TYPE&gt;Conn</strong></span></p>
11407                     </td>
11408 <td>
11409                       <p>
11410                         Connections established successfully.
11411                       </p>
11412                     </td>
11413 </tr>
11414 <tr>
11415 <td>
11416                       <p><span><strong class="command">&lt;TYPE&gt;AcceptFail</strong></span></p>
11417                     </td>
11418 <td>
11419                       <p>
11420                         Failures of accepting incoming connection requests.
11421                         This counter is not applicable to the
11422                         <span><strong class="command">UDP</strong></span> and
11423                         <span><strong class="command">FDwatch</strong></span> types.
11424                       </p>
11425                     </td>
11426 </tr>
11427 <tr>
11428 <td>
11429                       <p><span><strong class="command">&lt;TYPE&gt;Accept</strong></span></p>
11430                     </td>
11431 <td>
11432                       <p>
11433                         Incoming connections successfully accepted.
11434                         This counter is not applicable to the
11435                         <span><strong class="command">UDP</strong></span> and
11436                         <span><strong class="command">FDwatch</strong></span> types.
11437                       </p>
11438                     </td>
11439 </tr>
11440 <tr>
11441 <td>
11442                       <p><span><strong class="command">&lt;TYPE&gt;SendErr</strong></span></p>
11443                     </td>
11444 <td>
11445                       <p>
11446                         Errors in socket send operations.
11447                         This counter corresponds
11448                         to <span><strong class="command">SErr</strong></span> counter of
11449                         <span><strong class="command">BIND</strong></span> 8.
11450                       </p>
11451                     </td>
11452 </tr>
11453 <tr>
11454 <td>
11455                       <p><span><strong class="command">&lt;TYPE&gt;RecvErr</strong></span></p>
11456                     </td>
11457 <td>
11458                       <p>
11459                         Errors in socket receive operations.
11460                         This includes errors of send operations on a
11461                         connected UDP socket notified by an ICMP error
11462                         message.
11463                       </p>
11464                     </td>
11465 </tr>
11466 </tbody>
11467 </table></div>
11468 </div>
11469 <div class="sect3" lang="en">
11470 <div class="titlepage"><div><div><h4 class="title">
11471 <a name="id2604115"></a>Compatibility with <span class="emphasis"><em>BIND</em></span> 8 Counters</h4></div></div></div>
11472 <p>
11473               Most statistics counters that were available
11474               in <span><strong class="command">BIND</strong></span> 8 are also supported in
11475               <span><strong class="command">BIND</strong></span> 9 as shown in the above tables.
11476               Here are notes about other counters that do not appear
11477               in these tables.
11478             </p>
11479 <div class="variablelist"><dl>
11480 <dt><span class="term"><span><strong class="command">RFwdR,SFwdR</strong></span></span></dt>
11481 <dd><p>
11482                     These counters are not supported
11483                     because <span><strong class="command">BIND</strong></span> 9 does not adopt
11484                     the notion of <span class="emphasis"><em>forwarding</em></span>
11485                     as <span><strong class="command">BIND</strong></span> 8 did.
11486                   </p></dd>
11487 <dt><span class="term"><span><strong class="command">RAXFR</strong></span></span></dt>
11488 <dd><p>
11489                     This counter is accessible in the Incoming Queries section.
11490                   </p></dd>
11491 <dt><span class="term"><span><strong class="command">RIQ</strong></span></span></dt>
11492 <dd><p>
11493                     This counter is accessible in the Incoming Requests section.
11494                   </p></dd>
11495 <dt><span class="term"><span><strong class="command">ROpts</strong></span></span></dt>
11496 <dd><p>
11497                     This counter is not supported
11498                     because <span><strong class="command">BIND</strong></span> 9 does not care
11499                     about IP options in the first place.
11500                   </p></dd>
11501 </dl></div>
11502 </div>
11503 </div>
11504 </div>
11505 </div>
11506 <div class="navfooter">
11507 <hr>
11508 <table width="100%" summary="Navigation footer">
11509 <tr>
11510 <td width="40%" align="left">
11511 <a accesskey="p" href="Bv9ARM.ch05.html">Prev</a> </td>
11512 <td width="20%" align="center"> </td>
11513 <td width="40%" align="right"> <a accesskey="n" href="Bv9ARM.ch07.html">Next</a>
11514 </td>
11515 </tr>
11516 <tr>
11517 <td width="40%" align="left" valign="top">Chapter 5. The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver </td>
11518 <td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
11519 <td width="40%" align="right" valign="top"> Chapter 7. <acronym class="acronym">BIND</acronym> 9 Security Considerations</td>
11520 </tr>
11521 </table>
11522 </div>
11523 </body>
11524 </html>