cvs updates from Wed Dec 15 17:45:22 EST 2010
[tridge/bind9.git] / doc / arm / Bv9ARM.ch06.html
1 <!--
2  - Copyright (C) 2004-2010 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: Bv9ARM.ch06.html,v 1.264 2010/12/09 01:14:11 tbox Exp $ -->
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#id2574267">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#id2574921"><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#id2575111"><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#id2575402"><span><strong class="command">include</strong></span> Statement Grammar</a></span></dt>
62 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2575419"><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#id2575443"><span><strong class="command">key</strong></span> Statement Grammar</a></span></dt>
65 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2575466"><span><strong class="command">key</strong></span> Statement Definition and Usage</a></span></dt>
66 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2575625"><span><strong class="command">logging</strong></span> Statement Grammar</a></span></dt>
67 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2575751"><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#id2577886"><span><strong class="command">lwres</strong></span> Statement Grammar</a></span></dt>
70 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2577960"><span><strong class="command">lwres</strong></span> Statement Definition and Usage</a></span></dt>
71 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2578024"><span><strong class="command">masters</strong></span> Statement Grammar</a></span></dt>
72 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2578068"><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#id2578083"><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#id2588725"><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#id2588933"><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#id2589048"><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#id2589474"><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#id2591047"><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#id2593802">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#id2596101">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#id2596648">Inverse Mapping in IPv4</a></span></dt>
101 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2596775">Other Zone File Directives</a></span></dt>
102 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2597048"><acronym class="acronym">BIND</acronym> Master File Extension: the  <span><strong class="command">$GENERATE</strong></span> Directive</a></span></dt>
103 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#zonefile_format">Additional File Formats</a></span></dt>
104 </dl></dd>
105 <dt><span class="sect1"><a href="Bv9ARM.ch06.html#statistics">BIND9 Statistics</a></span></dt>
106 <dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch06.html#statistics_counters">Statistics Counters</a></span></dt></dl></dd>
107 </dl>
108 </div>
109 <p>
110       <acronym class="acronym">BIND</acronym> 9 configuration is broadly similar
111       to <acronym class="acronym">BIND</acronym> 8; however, there are a few new
112       areas
113       of configuration, such as views. <acronym class="acronym">BIND</acronym>
114       8 configuration files should work with few alterations in <acronym class="acronym">BIND</acronym>
115       9, although more complex configurations should be reviewed to check
116       if they can be more efficiently implemented using the new features
117       found in <acronym class="acronym">BIND</acronym> 9.
118     </p>
119 <p>
120       <acronym class="acronym">BIND</acronym> 4 configuration files can be
121       converted to the new format
122       using the shell script
123       <code class="filename">contrib/named-bootconf/named-bootconf.sh</code>.
124     </p>
125 <div class="sect1" lang="en">
126 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
127 <a name="configuration_file_elements"></a>Configuration File Elements</h2></div></div></div>
128 <p>
129         Following is a list of elements used throughout the <acronym class="acronym">BIND</acronym> configuration
130         file documentation:
131       </p>
132 <div class="informaltable"><table border="1">
133 <colgroup>
134 <col>
135 <col>
136 </colgroup>
137 <tbody>
138 <tr>
139 <td>
140                 <p>
141                   <code class="varname">acl_name</code>
142                 </p>
143               </td>
144 <td>
145                 <p>
146                   The name of an <code class="varname">address_match_list</code> as
147                   defined by the <span><strong class="command">acl</strong></span> statement.
148                 </p>
149               </td>
150 </tr>
151 <tr>
152 <td>
153                 <p>
154                   <code class="varname">address_match_list</code>
155                 </p>
156               </td>
157 <td>
158                 <p>
159                   A list of one or more
160                   <code class="varname">ip_addr</code>,
161                   <code class="varname">ip_prefix</code>, <code class="varname">key_id</code>,
162                   or <code class="varname">acl_name</code> elements, see
163                   <a href="Bv9ARM.ch06.html#address_match_lists" title="Address Match Lists">the section called &#8220;Address Match Lists&#8221;</a>.
164                 </p>
165               </td>
166 </tr>
167 <tr>
168 <td>
169                 <p>
170                   <code class="varname">masters_list</code>
171                 </p>
172               </td>
173 <td>
174                 <p>
175                   A named list of one or more <code class="varname">ip_addr</code>
176                   with optional <code class="varname">key_id</code> and/or
177                   <code class="varname">ip_port</code>.
178                   A <code class="varname">masters_list</code> may include other
179                   <code class="varname">masters_lists</code>.
180                 </p>
181               </td>
182 </tr>
183 <tr>
184 <td>
185                 <p>
186                   <code class="varname">domain_name</code>
187                 </p>
188               </td>
189 <td>
190                 <p>
191                   A quoted string which will be used as
192                   a DNS name, for example "<code class="literal">my.test.domain</code>".
193                 </p>
194               </td>
195 </tr>
196 <tr>
197 <td>
198                 <p>
199                   <code class="varname">namelist</code>
200                 </p>
201               </td>
202 <td>
203                 <p>
204                   A list of one or more <code class="varname">domain_name</code>
205                   elements.
206                 </p>
207               </td>
208 </tr>
209 <tr>
210 <td>
211                 <p>
212                   <code class="varname">dotted_decimal</code>
213                 </p>
214               </td>
215 <td>
216                 <p>
217                   One to four integers valued 0 through
218                   255 separated by dots (`.'), such as <span><strong class="command">123</strong></span>,
219                   <span><strong class="command">45.67</strong></span> or <span><strong class="command">89.123.45.67</strong></span>.
220                 </p>
221               </td>
222 </tr>
223 <tr>
224 <td>
225                 <p>
226                   <code class="varname">ip4_addr</code>
227                 </p>
228               </td>
229 <td>
230                 <p>
231                   An IPv4 address with exactly four elements
232                   in <code class="varname">dotted_decimal</code> notation.
233                 </p>
234               </td>
235 </tr>
236 <tr>
237 <td>
238                 <p>
239                   <code class="varname">ip6_addr</code>
240                 </p>
241               </td>
242 <td>
243                 <p>
244                   An IPv6 address, such as <span><strong class="command">2001:db8::1234</strong></span>.
245                   IPv6 scoped addresses that have ambiguity on their
246                   scope zones must be disambiguated by an appropriate
247                   zone ID with the percent character (`%') as
248                   delimiter.  It is strongly recommended to use
249                   string zone names rather than numeric identifiers,
250                   in order to be robust against system configuration
251                   changes.  However, since there is no standard
252                   mapping for such names and identifier values,
253                   currently only interface names as link identifiers
254                   are supported, assuming one-to-one mapping between
255                   interfaces and links.  For example, a link-local
256                   address <span><strong class="command">fe80::1</strong></span> on the link
257                   attached to the interface <span><strong class="command">ne0</strong></span>
258                   can be specified as <span><strong class="command">fe80::1%ne0</strong></span>.
259                   Note that on most systems link-local addresses
260                   always have the ambiguity, and need to be
261                   disambiguated.
262                 </p>
263               </td>
264 </tr>
265 <tr>
266 <td>
267                 <p>
268                   <code class="varname">ip_addr</code>
269                 </p>
270               </td>
271 <td>
272                 <p>
273                   An <code class="varname">ip4_addr</code> or <code class="varname">ip6_addr</code>.
274                 </p>
275               </td>
276 </tr>
277 <tr>
278 <td>
279                 <p>
280                   <code class="varname">ip_port</code>
281                 </p>
282               </td>
283 <td>
284                 <p>
285                   An IP port <code class="varname">number</code>.
286                   The <code class="varname">number</code> is limited to 0
287                   through 65535, with values
288                   below 1024 typically restricted to use by processes running
289                   as root.
290                   In some cases, an asterisk (`*') character can be used as a
291                   placeholder to
292                   select a random high-numbered port.
293                 </p>
294               </td>
295 </tr>
296 <tr>
297 <td>
298                 <p>
299                   <code class="varname">ip_prefix</code>
300                 </p>
301               </td>
302 <td>
303                 <p>
304                   An IP network specified as an <code class="varname">ip_addr</code>,
305                   followed by a slash (`/') and then the number of bits in the
306                   netmask.
307                   Trailing zeros in a <code class="varname">ip_addr</code>
308                   may omitted.
309                   For example, <span><strong class="command">127/8</strong></span> is the
310                   network <span><strong class="command">127.0.0.0</strong></span> with
311                   netmask <span><strong class="command">255.0.0.0</strong></span> and <span><strong class="command">1.2.3.0/28</strong></span> is
312                   network <span><strong class="command">1.2.3.0</strong></span> with netmask <span><strong class="command">255.255.255.240</strong></span>.
313                 </p>
314                 <p>
315                   When specifying a prefix involving a IPv6 scoped address
316                   the scope may be omitted.  In that case the prefix will
317                   match packets from any scope.
318                 </p>
319               </td>
320 </tr>
321 <tr>
322 <td>
323                 <p>
324                   <code class="varname">key_id</code>
325                 </p>
326               </td>
327 <td>
328                 <p>
329                   A <code class="varname">domain_name</code> representing
330                   the name of a shared key, to be used for transaction
331                   security.
332                 </p>
333               </td>
334 </tr>
335 <tr>
336 <td>
337                 <p>
338                   <code class="varname">key_list</code>
339                 </p>
340               </td>
341 <td>
342                 <p>
343                   A list of one or more
344                   <code class="varname">key_id</code>s,
345                   separated by semicolons and ending with a semicolon.
346                 </p>
347               </td>
348 </tr>
349 <tr>
350 <td>
351                 <p>
352                   <code class="varname">number</code>
353                 </p>
354               </td>
355 <td>
356                 <p>
357                   A non-negative 32-bit integer
358                   (i.e., a number between 0 and 4294967295, inclusive).
359                   Its acceptable value might further
360                   be limited by the context in which it is used.
361                 </p>
362               </td>
363 </tr>
364 <tr>
365 <td>
366                 <p>
367                   <code class="varname">path_name</code>
368                 </p>
369               </td>
370 <td>
371                 <p>
372                   A quoted string which will be used as
373                   a pathname, such as <code class="filename">zones/master/my.test.domain</code>.
374                 </p>
375               </td>
376 </tr>
377 <tr>
378 <td>
379                 <p>
380                   <code class="varname">port_list</code>
381                 </p>
382               </td>
383 <td>
384                 <p>
385                   A list of an <code class="varname">ip_port</code> or a port
386                   range.
387                   A port range is specified in the form of
388                   <strong class="userinput"><code>range</code></strong> followed by
389                   two <code class="varname">ip_port</code>s,
390                   <code class="varname">port_low</code> and
391                   <code class="varname">port_high</code>, which represents
392                   port numbers from <code class="varname">port_low</code> through
393                   <code class="varname">port_high</code>, inclusive.
394                   <code class="varname">port_low</code> must not be larger than
395                   <code class="varname">port_high</code>.
396                   For example,
397                   <strong class="userinput"><code>range 1024 65535</code></strong> represents
398                   ports from 1024 through 65535.
399                   In either case an asterisk (`*') character is not
400                   allowed as a valid <code class="varname">ip_port</code>.
401                 </p>
402               </td>
403 </tr>
404 <tr>
405 <td>
406                 <p>
407                   <code class="varname">size_spec</code>
408                 </p>
409               </td>
410 <td>
411                 <p>
412                   A number, the word <strong class="userinput"><code>unlimited</code></strong>,
413                   or the word <strong class="userinput"><code>default</code></strong>.
414                 </p>
415                 <p>
416                   An <code class="varname">unlimited</code> <code class="varname">size_spec</code> requests unlimited
417                   use, or the maximum available amount. A <code class="varname">default size_spec</code> uses
418                   the limit that was in force when the server was started.
419                 </p>
420                 <p>
421                   A <code class="varname">number</code> can optionally be
422                   followed by a scaling factor:
423                   <strong class="userinput"><code>K</code></strong> or <strong class="userinput"><code>k</code></strong>
424                   for kilobytes,
425                   <strong class="userinput"><code>M</code></strong> or <strong class="userinput"><code>m</code></strong>
426                   for megabytes, and
427                   <strong class="userinput"><code>G</code></strong> or <strong class="userinput"><code>g</code></strong> for gigabytes,
428                   which scale by 1024, 1024*1024, and 1024*1024*1024
429                   respectively.
430                 </p>
431                 <p>
432                   The value must be representable as a 64-bit unsigned integer
433                   (0 to 18446744073709551615, inclusive).
434                   Using <code class="varname">unlimited</code> is the best
435                   way
436                   to safely set a really large number.
437                 </p>
438               </td>
439 </tr>
440 <tr>
441 <td>
442                 <p>
443                   <code class="varname">yes_or_no</code>
444                 </p>
445               </td>
446 <td>
447                 <p>
448                   Either <strong class="userinput"><code>yes</code></strong> or <strong class="userinput"><code>no</code></strong>.
449                   The words <strong class="userinput"><code>true</code></strong> and <strong class="userinput"><code>false</code></strong> are
450                   also accepted, as are the numbers <strong class="userinput"><code>1</code></strong>
451                   and <strong class="userinput"><code>0</code></strong>.
452                 </p>
453               </td>
454 </tr>
455 <tr>
456 <td>
457                 <p>
458                   <code class="varname">dialup_option</code>
459                 </p>
460               </td>
461 <td>
462                 <p>
463                   One of <strong class="userinput"><code>yes</code></strong>,
464                   <strong class="userinput"><code>no</code></strong>, <strong class="userinput"><code>notify</code></strong>,
465                   <strong class="userinput"><code>notify-passive</code></strong>, <strong class="userinput"><code>refresh</code></strong> or
466                   <strong class="userinput"><code>passive</code></strong>.
467                   When used in a zone, <strong class="userinput"><code>notify-passive</code></strong>,
468                   <strong class="userinput"><code>refresh</code></strong>, and <strong class="userinput"><code>passive</code></strong>
469                   are restricted to slave and stub zones.
470                 </p>
471               </td>
472 </tr>
473 </tbody>
474 </table></div>
475 <div class="sect2" lang="en">
476 <div class="titlepage"><div><div><h3 class="title">
477 <a name="address_match_lists"></a>Address Match Lists</h3></div></div></div>
478 <div class="sect3" lang="en">
479 <div class="titlepage"><div><div><h4 class="title">
480 <a name="id2574034"></a>Syntax</h4></div></div></div>
481 <pre class="programlisting"><code class="varname">address_match_list</code> = address_match_list_element ;
482   [<span class="optional"> address_match_list_element; ... </span>]
483 <code class="varname">address_match_list_element</code> = [<span class="optional"> ! </span>] (ip_address [<span class="optional">/length</span>] |
484    key key_id | acl_name | { address_match_list } )
485 </pre>
486 </div>
487 <div class="sect3" lang="en">
488 <div class="titlepage"><div><div><h4 class="title">
489 <a name="id2574061"></a>Definition and Usage</h4></div></div></div>
490 <p>
491             Address match lists are primarily used to determine access
492             control for various server operations. They are also used in
493             the <span><strong class="command">listen-on</strong></span> and <span><strong class="command">sortlist</strong></span>
494             statements. The elements which constitute an address match
495             list can be any of the following:
496           </p>
497 <div class="itemizedlist"><ul type="disc">
498 <li>an IP address (IPv4 or IPv6)</li>
499 <li>an IP prefix (in `/' notation)</li>
500 <li>
501                 a key ID, as defined by the <span><strong class="command">key</strong></span>
502                 statement
503               </li>
504 <li>the name of an address match list defined with
505                 the <span><strong class="command">acl</strong></span> statement
506               </li>
507 <li>a nested address match list enclosed in braces</li>
508 </ul></div>
509 <p>
510             Elements can be negated with a leading exclamation mark (`!'),
511             and the match list names "any", "none", "localhost", and
512             "localnets" are predefined. More information on those names
513             can be found in the description of the acl statement.
514           </p>
515 <p>
516             The addition of the key clause made the name of this syntactic
517             element something of a misnomer, since security keys can be used
518             to validate access without regard to a host or network address.
519             Nonetheless, the term "address match list" is still used
520             throughout the documentation.
521           </p>
522 <p>
523             When a given IP address or prefix is compared to an address
524             match list, the comparison takes place in approximately O(1)
525             time.  However, key comparisons require that the list of keys
526             be traversed until a matching key is found, and therefore may
527             be somewhat slower.
528           </p>
529 <p>
530             The interpretation of a match depends on whether the list is being
531             used for access control, defining <span><strong class="command">listen-on</strong></span> ports, or in a
532             <span><strong class="command">sortlist</strong></span>, and whether the element was negated.
533           </p>
534 <p>
535             When used as an access control list, a non-negated match
536             allows access and a negated match denies access. If
537             there is no match, access is denied. The clauses
538             <span><strong class="command">allow-notify</strong></span>,
539             <span><strong class="command">allow-recursion</strong></span>,
540             <span><strong class="command">allow-recursion-on</strong></span>,
541             <span><strong class="command">allow-query</strong></span>,
542             <span><strong class="command">allow-query-on</strong></span>,
543             <span><strong class="command">allow-query-cache</strong></span>,
544             <span><strong class="command">allow-query-cache-on</strong></span>,
545             <span><strong class="command">allow-transfer</strong></span>,
546             <span><strong class="command">allow-update</strong></span>,
547             <span><strong class="command">allow-update-forwarding</strong></span>, and
548             <span><strong class="command">blackhole</strong></span> all use address match
549             lists.  Similarly, the <span><strong class="command">listen-on</strong></span> option will cause the
550             server to refuse queries on any of the machine's
551             addresses which do not match the list.
552           </p>
553 <p>
554             Order of insertion is significant.  If more than one element
555             in an ACL is found to match a given IP address or prefix,
556             preference will be given to the one that came
557             <span class="emphasis"><em>first</em></span> in the ACL definition.
558             Because of this first-match behavior, an element that
559             defines a subset of another element in the list should
560             come before the broader element, regardless of whether
561             either is negated. For example, in
562             <span><strong class="command">1.2.3/24; ! 1.2.3.13;</strong></span>
563             the 1.2.3.13 element is completely useless because the
564             algorithm will match any lookup for 1.2.3.13 to the 1.2.3/24
565             element.  Using <span><strong class="command">! 1.2.3.13; 1.2.3/24</strong></span> fixes
566             that problem by having 1.2.3.13 blocked by the negation, but
567             all other 1.2.3.* hosts fall through.
568           </p>
569 </div>
570 </div>
571 <div class="sect2" lang="en">
572 <div class="titlepage"><div><div><h3 class="title">
573 <a name="id2574267"></a>Comment Syntax</h3></div></div></div>
574 <p>
575           The <acronym class="acronym">BIND</acronym> 9 comment syntax allows for
576           comments to appear
577           anywhere that whitespace may appear in a <acronym class="acronym">BIND</acronym> configuration
578           file. To appeal to programmers of all kinds, they can be written
579           in the C, C++, or shell/perl style.
580         </p>
581 <div class="sect3" lang="en">
582 <div class="titlepage"><div><div><h4 class="title">
583 <a name="id2574282"></a>Syntax</h4></div></div></div>
584 <p>
585             </p>
586 <pre class="programlisting">/* This is a <acronym class="acronym">BIND</acronym> comment as in C */</pre>
587 <p>
588             </p>
589 <pre class="programlisting">// This is a <acronym class="acronym">BIND</acronym> comment as in C++</pre>
590 <p>
591             </p>
592 <pre class="programlisting"># This is a <acronym class="acronym">BIND</acronym> comment as in common UNIX shells
593 # and perl</pre>
594 <p>
595           </p>
596 </div>
597 <div class="sect3" lang="en">
598 <div class="titlepage"><div><div><h4 class="title">
599 <a name="id2574312"></a>Definition and Usage</h4></div></div></div>
600 <p>
601             Comments may appear anywhere that whitespace may appear in
602             a <acronym class="acronym">BIND</acronym> configuration file.
603           </p>
604 <p>
605             C-style comments start with the two characters /* (slash,
606             star) and end with */ (star, slash). Because they are completely
607             delimited with these characters, they can be used to comment only
608             a portion of a line or to span multiple lines.
609           </p>
610 <p>
611             C-style comments cannot be nested. For example, the following
612             is not valid because the entire comment ends with the first */:
613           </p>
614 <p>
615
616 </p>
617 <pre class="programlisting">/* This is the start of a comment.
618    This is still part of the comment.
619 /* This is an incorrect attempt at nesting a comment. */
620    This is no longer in any comment. */
621 </pre>
622 <p>
623
624           </p>
625 <p>
626             C++-style comments start with the two characters // (slash,
627             slash) and continue to the end of the physical line. They cannot
628             be continued across multiple physical lines; to have one logical
629             comment span multiple lines, each line must use the // pair.
630             For example:
631           </p>
632 <p>
633
634 </p>
635 <pre class="programlisting">// This is the start of a comment.  The next line
636 // is a new comment, even though it is logically
637 // part of the previous comment.
638 </pre>
639 <p>
640
641           </p>
642 <p>
643             Shell-style (or perl-style, if you prefer) comments start
644             with the character <code class="literal">#</code> (number sign)
645             and continue to the end of the
646             physical line, as in C++ comments.
647             For example:
648           </p>
649 <p>
650
651 </p>
652 <pre class="programlisting"># This is the start of a comment.  The next line
653 # is a new comment, even though it is logically
654 # part of the previous comment.
655 </pre>
656 <p>
657
658           </p>
659 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
660 <h3 class="title">Warning</h3>
661 <p>
662               You cannot use the semicolon (`;') character
663               to start a comment such as you would in a zone file. The
664               semicolon indicates the end of a configuration
665               statement.
666             </p>
667 </div>
668 </div>
669 </div>
670 </div>
671 <div class="sect1" lang="en">
672 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
673 <a name="Configuration_File_Grammar"></a>Configuration File Grammar</h2></div></div></div>
674 <p>
675         A <acronym class="acronym">BIND</acronym> 9 configuration consists of
676         statements and comments.
677         Statements end with a semicolon. Statements and comments are the
678         only elements that can appear without enclosing braces. Many
679         statements contain a block of sub-statements, which are also
680         terminated with a semicolon.
681       </p>
682 <p>
683         The following statements are supported:
684       </p>
685 <div class="informaltable"><table border="1">
686 <colgroup>
687 <col>
688 <col>
689 </colgroup>
690 <tbody>
691 <tr>
692 <td>
693                 <p><span><strong class="command">acl</strong></span></p>
694               </td>
695 <td>
696                 <p>
697                   defines a named IP address
698                   matching list, for access control and other uses.
699                 </p>
700               </td>
701 </tr>
702 <tr>
703 <td>
704                 <p><span><strong class="command">controls</strong></span></p>
705               </td>
706 <td>
707                 <p>
708                   declares control channels to be used
709                   by the <span><strong class="command">rndc</strong></span> utility.
710                 </p>
711               </td>
712 </tr>
713 <tr>
714 <td>
715                 <p><span><strong class="command">include</strong></span></p>
716               </td>
717 <td>
718                 <p>
719                   includes a file.
720                 </p>
721               </td>
722 </tr>
723 <tr>
724 <td>
725                 <p><span><strong class="command">key</strong></span></p>
726               </td>
727 <td>
728                 <p>
729                   specifies key information for use in
730                   authentication and authorization using TSIG.
731                 </p>
732               </td>
733 </tr>
734 <tr>
735 <td>
736                 <p><span><strong class="command">logging</strong></span></p>
737               </td>
738 <td>
739                 <p>
740                   specifies what the server logs, and where
741                   the log messages are sent.
742                 </p>
743               </td>
744 </tr>
745 <tr>
746 <td>
747                 <p><span><strong class="command">lwres</strong></span></p>
748               </td>
749 <td>
750                 <p>
751                   configures <span><strong class="command">named</strong></span> to
752                   also act as a light-weight resolver daemon (<span><strong class="command">lwresd</strong></span>).
753                 </p>
754               </td>
755 </tr>
756 <tr>
757 <td>
758                 <p><span><strong class="command">masters</strong></span></p>
759               </td>
760 <td>
761                 <p>
762                   defines a named masters list for
763                   inclusion in stub and slave zone masters clauses.
764                 </p>
765               </td>
766 </tr>
767 <tr>
768 <td>
769                 <p><span><strong class="command">options</strong></span></p>
770               </td>
771 <td>
772                 <p>
773                   controls global server configuration
774                   options and sets defaults for other statements.
775                 </p>
776               </td>
777 </tr>
778 <tr>
779 <td>
780                 <p><span><strong class="command">server</strong></span></p>
781               </td>
782 <td>
783                 <p>
784                   sets certain configuration options on
785                   a per-server basis.
786                 </p>
787               </td>
788 </tr>
789 <tr>
790 <td>
791                 <p><span><strong class="command">statistics-channels</strong></span></p>
792               </td>
793 <td>
794                 <p>
795                   declares communication channels to get access to
796                   <span><strong class="command">named</strong></span> statistics.
797                 </p>
798               </td>
799 </tr>
800 <tr>
801 <td>
802                 <p><span><strong class="command">trusted-keys</strong></span></p>
803               </td>
804 <td>
805                 <p>
806                   defines trusted DNSSEC keys.
807                 </p>
808               </td>
809 </tr>
810 <tr>
811 <td>
812                 <p><span><strong class="command">managed-keys</strong></span></p>
813               </td>
814 <td>
815                 <p>
816                   lists DNSSEC keys to be kept up to date
817                   using RFC 5011 trust anchor maintenance.
818                 </p>
819               </td>
820 </tr>
821 <tr>
822 <td>
823                 <p><span><strong class="command">view</strong></span></p>
824               </td>
825 <td>
826                 <p>
827                   defines a view.
828                 </p>
829               </td>
830 </tr>
831 <tr>
832 <td>
833                 <p><span><strong class="command">zone</strong></span></p>
834               </td>
835 <td>
836                 <p>
837                   defines a zone.
838                 </p>
839               </td>
840 </tr>
841 </tbody>
842 </table></div>
843 <p>
844         The <span><strong class="command">logging</strong></span> and
845         <span><strong class="command">options</strong></span> statements may only occur once
846         per
847         configuration.
848       </p>
849 <div class="sect2" lang="en">
850 <div class="titlepage"><div><div><h3 class="title">
851 <a name="id2574921"></a><span><strong class="command">acl</strong></span> Statement Grammar</h3></div></div></div>
852 <pre class="programlisting"><span><strong class="command">acl</strong></span> acl-name {
853     address_match_list
854 };
855 </pre>
856 </div>
857 <div class="sect2" lang="en">
858 <div class="titlepage"><div><div><h3 class="title">
859 <a name="acl"></a><span><strong class="command">acl</strong></span> Statement Definition and
860           Usage</h3></div></div></div>
861 <p>
862           The <span><strong class="command">acl</strong></span> statement assigns a symbolic
863           name to an address match list. It gets its name from a primary
864           use of address match lists: Access Control Lists (ACLs).
865         </p>
866 <p>
867           Note that an address match list's name must be defined
868           with <span><strong class="command">acl</strong></span> before it can be used
869           elsewhere; no forward references are allowed.
870         </p>
871 <p>
872           The following ACLs are built-in:
873         </p>
874 <div class="informaltable"><table border="1">
875 <colgroup>
876 <col>
877 <col>
878 </colgroup>
879 <tbody>
880 <tr>
881 <td>
882                   <p><span><strong class="command">any</strong></span></p>
883                 </td>
884 <td>
885                   <p>
886                     Matches all hosts.
887                   </p>
888                 </td>
889 </tr>
890 <tr>
891 <td>
892                   <p><span><strong class="command">none</strong></span></p>
893                 </td>
894 <td>
895                   <p>
896                     Matches no hosts.
897                   </p>
898                 </td>
899 </tr>
900 <tr>
901 <td>
902                   <p><span><strong class="command">localhost</strong></span></p>
903                 </td>
904 <td>
905                   <p>
906                     Matches the IPv4 and IPv6 addresses of all network
907                     interfaces on the system.
908                   </p>
909                 </td>
910 </tr>
911 <tr>
912 <td>
913                   <p><span><strong class="command">localnets</strong></span></p>
914                 </td>
915 <td>
916                   <p>
917                     Matches any host on an IPv4 or IPv6 network
918                     for which the system has an interface.
919                     Some systems do not provide a way to determine the prefix
920                     lengths of
921                     local IPv6 addresses.
922                     In such a case, <span><strong class="command">localnets</strong></span>
923                     only matches the local
924                     IPv6 addresses, just like <span><strong class="command">localhost</strong></span>.
925                   </p>
926                 </td>
927 </tr>
928 </tbody>
929 </table></div>
930 </div>
931 <div class="sect2" lang="en">
932 <div class="titlepage"><div><div><h3 class="title">
933 <a name="id2575111"></a><span><strong class="command">controls</strong></span> Statement Grammar</h3></div></div></div>
934 <pre class="programlisting"><span><strong class="command">controls</strong></span> {
935    [ inet ( ip_addr | * ) [ port ip_port ]
936                 allow { <em class="replaceable"><code> address_match_list </code></em> }
937                 keys { <em class="replaceable"><code>key_list</code></em> }; ]
938    [ inet ...; ]
939    [ unix <em class="replaceable"><code>path</code></em> perm <em class="replaceable"><code>number</code></em> owner <em class="replaceable"><code>number</code></em> group <em class="replaceable"><code>number</code></em>
940      keys { <em class="replaceable"><code>key_list</code></em> }; ]
941    [ unix ...; ]
942 };
943 </pre>
944 </div>
945 <div class="sect2" lang="en">
946 <div class="titlepage"><div><div><h3 class="title">
947 <a name="controls_statement_definition_and_usage"></a><span><strong class="command">controls</strong></span> Statement Definition and
948           Usage</h3></div></div></div>
949 <p>
950           The <span><strong class="command">controls</strong></span> statement declares control
951           channels to be used by system administrators to control the
952           operation of the name server. These control channels are
953           used by the <span><strong class="command">rndc</strong></span> utility to send
954           commands to and retrieve non-DNS results from a name server.
955         </p>
956 <p>
957           An <span><strong class="command">inet</strong></span> control channel is a TCP socket
958           listening at the specified <span><strong class="command">ip_port</strong></span> on the
959           specified <span><strong class="command">ip_addr</strong></span>, which can be an IPv4 or IPv6
960           address.  An <span><strong class="command">ip_addr</strong></span> of <code class="literal">*</code> (asterisk) is
961           interpreted as the IPv4 wildcard address; connections will be
962           accepted on any of the system's IPv4 addresses.
963           To listen on the IPv6 wildcard address,
964           use an <span><strong class="command">ip_addr</strong></span> of <code class="literal">::</code>.
965           If you will only use <span><strong class="command">rndc</strong></span> on the local host,
966           using the loopback address (<code class="literal">127.0.0.1</code>
967           or <code class="literal">::1</code>) is recommended for maximum security.
968         </p>
969 <p>
970           If no port is specified, port 953 is used. The asterisk
971           "<code class="literal">*</code>" cannot be used for <span><strong class="command">ip_port</strong></span>.
972         </p>
973 <p>
974           The ability to issue commands over the control channel is
975           restricted by the <span><strong class="command">allow</strong></span> and
976           <span><strong class="command">keys</strong></span> clauses.
977           Connections to the control channel are permitted based on the
978           <span><strong class="command">address_match_list</strong></span>.  This is for simple
979           IP address based filtering only; any <span><strong class="command">key_id</strong></span>
980           elements of the <span><strong class="command">address_match_list</strong></span>
981           are ignored.
982         </p>
983 <p>
984           A <span><strong class="command">unix</strong></span> control channel is a UNIX domain
985           socket listening at the specified path in the file system.
986           Access to the socket is specified by the <span><strong class="command">perm</strong></span>,
987           <span><strong class="command">owner</strong></span> and <span><strong class="command">group</strong></span> clauses.
988           Note on some platforms (SunOS and Solaris) the permissions
989           (<span><strong class="command">perm</strong></span>) are applied to the parent directory
990           as the permissions on the socket itself are ignored.
991         </p>
992 <p>
993           The primary authorization mechanism of the command
994           channel is the <span><strong class="command">key_list</strong></span>, which
995           contains a list of <span><strong class="command">key_id</strong></span>s.
996           Each <span><strong class="command">key_id</strong></span> in the <span><strong class="command">key_list</strong></span>
997           is authorized to execute commands over the control channel.
998           See <a href="Bv9ARM.ch03.html#rndc">Remote Name Daemon Control application</a> in <a href="Bv9ARM.ch03.html#admin_tools" title="Administrative Tools">the section called &#8220;Administrative Tools&#8221;</a>)
999           for information about configuring keys in <span><strong class="command">rndc</strong></span>.
1000         </p>
1001 <p>
1002           If no <span><strong class="command">controls</strong></span> statement is present,
1003           <span><strong class="command">named</strong></span> will set up a default
1004           control channel listening on the loopback address 127.0.0.1
1005           and its IPv6 counterpart ::1.
1006           In this case, and also when the <span><strong class="command">controls</strong></span> statement
1007           is present but does not have a <span><strong class="command">keys</strong></span> clause,
1008           <span><strong class="command">named</strong></span> will attempt to load the command channel key
1009           from the file <code class="filename">rndc.key</code> in
1010           <code class="filename">/etc</code> (or whatever <code class="varname">sysconfdir</code>
1011           was specified as when <acronym class="acronym">BIND</acronym> was built).
1012           To create a <code class="filename">rndc.key</code> file, run
1013           <strong class="userinput"><code>rndc-confgen -a</code></strong>.
1014         </p>
1015 <p>
1016           The <code class="filename">rndc.key</code> feature was created to
1017           ease the transition of systems from <acronym class="acronym">BIND</acronym> 8,
1018           which did not have digital signatures on its command channel
1019           messages and thus did not have a <span><strong class="command">keys</strong></span> clause.
1020
1021           It makes it possible to use an existing <acronym class="acronym">BIND</acronym> 8
1022           configuration file in <acronym class="acronym">BIND</acronym> 9 unchanged,
1023           and still have <span><strong class="command">rndc</strong></span> work the same way
1024           <span><strong class="command">ndc</strong></span> worked in BIND 8, simply by executing the
1025           command <strong class="userinput"><code>rndc-confgen -a</code></strong> after BIND 9 is
1026           installed.
1027         </p>
1028 <p>
1029           Since the <code class="filename">rndc.key</code> feature
1030           is only intended to allow the backward-compatible usage of
1031           <acronym class="acronym">BIND</acronym> 8 configuration files, this
1032           feature does not
1033           have a high degree of configurability.  You cannot easily change
1034           the key name or the size of the secret, so you should make a
1035           <code class="filename">rndc.conf</code> with your own key if you
1036           wish to change
1037           those things.  The <code class="filename">rndc.key</code> file
1038           also has its
1039           permissions set such that only the owner of the file (the user that
1040           <span><strong class="command">named</strong></span> is running as) can access it.
1041           If you
1042           desire greater flexibility in allowing other users to access
1043           <span><strong class="command">rndc</strong></span> commands, then you need to create
1044           a
1045           <code class="filename">rndc.conf</code> file and make it group
1046           readable by a group
1047           that contains the users who should have access.
1048         </p>
1049 <p>
1050           To disable the command channel, use an empty
1051           <span><strong class="command">controls</strong></span> statement:
1052           <span><strong class="command">controls { };</strong></span>.
1053         </p>
1054 </div>
1055 <div class="sect2" lang="en">
1056 <div class="titlepage"><div><div><h3 class="title">
1057 <a name="id2575402"></a><span><strong class="command">include</strong></span> Statement Grammar</h3></div></div></div>
1058 <pre class="programlisting"><span><strong class="command">include</strong></span> <em class="replaceable"><code>filename</code></em>;</pre>
1059 </div>
1060 <div class="sect2" lang="en">
1061 <div class="titlepage"><div><div><h3 class="title">
1062 <a name="id2575419"></a><span><strong class="command">include</strong></span> Statement Definition and
1063           Usage</h3></div></div></div>
1064 <p>
1065           The <span><strong class="command">include</strong></span> statement inserts the
1066           specified file at the point where the <span><strong class="command">include</strong></span>
1067           statement is encountered. The <span><strong class="command">include</strong></span>
1068                 statement facilitates the administration of configuration
1069           files
1070           by permitting the reading or writing of some things but not
1071           others. For example, the statement could include private keys
1072           that are readable only by the name server.
1073         </p>
1074 </div>
1075 <div class="sect2" lang="en">
1076 <div class="titlepage"><div><div><h3 class="title">
1077 <a name="id2575443"></a><span><strong class="command">key</strong></span> Statement Grammar</h3></div></div></div>
1078 <pre class="programlisting"><span><strong class="command">key</strong></span> <em class="replaceable"><code>key_id</code></em> {
1079     algorithm <em class="replaceable"><code>string</code></em>;
1080     secret <em class="replaceable"><code>string</code></em>;
1081 };
1082 </pre>
1083 </div>
1084 <div class="sect2" lang="en">
1085 <div class="titlepage"><div><div><h3 class="title">
1086 <a name="id2575466"></a><span><strong class="command">key</strong></span> Statement Definition and Usage</h3></div></div></div>
1087 <p>
1088           The <span><strong class="command">key</strong></span> statement defines a shared
1089           secret key for use with TSIG (see <a href="Bv9ARM.ch04.html#tsig" title="TSIG">the section called &#8220;TSIG&#8221;</a>)
1090           or the command channel
1091           (see <a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage" title="controls Statement Definition and
1092           Usage">the section called &#8220;<span><strong class="command">controls</strong></span> Statement Definition and
1093           Usage&#8221;</a>).
1094         </p>
1095 <p>
1096           The <span><strong class="command">key</strong></span> statement can occur at the
1097           top level
1098           of the configuration file or inside a <span><strong class="command">view</strong></span>
1099           statement.  Keys defined in top-level <span><strong class="command">key</strong></span>
1100           statements can be used in all views.  Keys intended for use in
1101           a <span><strong class="command">controls</strong></span> statement
1102           (see <a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage" title="controls Statement Definition and
1103           Usage">the section called &#8220;<span><strong class="command">controls</strong></span> Statement Definition and
1104           Usage&#8221;</a>)
1105           must be defined at the top level.
1106         </p>
1107 <p>
1108           The <em class="replaceable"><code>key_id</code></em>, also known as the
1109           key name, is a domain name uniquely identifying the key. It can
1110           be used in a <span><strong class="command">server</strong></span>
1111           statement to cause requests sent to that
1112           server to be signed with this key, or in address match lists to
1113           verify that incoming requests have been signed with a key
1114           matching this name, algorithm, and secret.
1115         </p>
1116 <p>
1117           The <em class="replaceable"><code>algorithm_id</code></em> is a string
1118           that specifies a security/authentication algorithm.  Named
1119           supports <code class="literal">hmac-md5</code>,
1120           <code class="literal">hmac-sha1</code>, <code class="literal">hmac-sha224</code>,
1121           <code class="literal">hmac-sha256</code>, <code class="literal">hmac-sha384</code>
1122           and <code class="literal">hmac-sha512</code> TSIG authentication.
1123           Truncated hashes are supported by appending the minimum
1124           number of required bits preceded by a dash, e.g.
1125           <code class="literal">hmac-sha1-80</code>.  The
1126           <em class="replaceable"><code>secret_string</code></em> is the secret
1127           to be used by the algorithm, and is treated as a base-64
1128           encoded string.
1129         </p>
1130 </div>
1131 <div class="sect2" lang="en">
1132 <div class="titlepage"><div><div><h3 class="title">
1133 <a name="id2575625"></a><span><strong class="command">logging</strong></span> Statement Grammar</h3></div></div></div>
1134 <pre class="programlisting"><span><strong class="command">logging</strong></span> {
1135    [ <span><strong class="command">channel</strong></span> <em class="replaceable"><code>channel_name</code></em> {
1136      ( <span><strong class="command">file</strong></span> <em class="replaceable"><code>path_name</code></em>
1137          [ <span><strong class="command">versions</strong></span> ( <em class="replaceable"><code>number</code></em> | <span><strong class="command">unlimited</strong></span> ) ]
1138          [ <span><strong class="command">size</strong></span> <em class="replaceable"><code>size spec</code></em> ]
1139        | <span><strong class="command">syslog</strong></span> <em class="replaceable"><code>syslog_facility</code></em>
1140        | <span><strong class="command">stderr</strong></span>
1141        | <span><strong class="command">null</strong></span> );
1142      [ <span><strong class="command">severity</strong></span> (<code class="option">critical</code> | <code class="option">error</code> | <code class="option">warning</code> | <code class="option">notice</code> |
1143                  <code class="option">info</code> | <code class="option">debug</code> [ <em class="replaceable"><code>level</code></em> ] | <code class="option">dynamic</code> ); ]
1144      [ <span><strong class="command">print-category</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1145      [ <span><strong class="command">print-severity</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1146      [ <span><strong class="command">print-time</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1147    }; ]
1148    [ <span><strong class="command">category</strong></span> <em class="replaceable"><code>category_name</code></em> {
1149      <em class="replaceable"><code>channel_name</code></em> ; [ <em class="replaceable"><code>channel_name</code></em> ; ... ]
1150    }; ]
1151    ...
1152 };
1153 </pre>
1154 </div>
1155 <div class="sect2" lang="en">
1156 <div class="titlepage"><div><div><h3 class="title">
1157 <a name="id2575751"></a><span><strong class="command">logging</strong></span> Statement Definition and
1158           Usage</h3></div></div></div>
1159 <p>
1160           The <span><strong class="command">logging</strong></span> statement configures a
1161           wide
1162           variety of logging options for the name server. Its <span><strong class="command">channel</strong></span> phrase
1163           associates output methods, format options and severity levels with
1164           a name that can then be used with the <span><strong class="command">category</strong></span> phrase
1165           to select how various classes of messages are logged.
1166         </p>
1167 <p>
1168           Only one <span><strong class="command">logging</strong></span> statement is used to
1169           define
1170           as many channels and categories as are wanted. If there is no <span><strong class="command">logging</strong></span> statement,
1171           the logging configuration will be:
1172         </p>
1173 <pre class="programlisting">logging {
1174      category default { default_syslog; default_debug; };
1175      category unmatched { null; };
1176 };
1177 </pre>
1178 <p>
1179           In <acronym class="acronym">BIND</acronym> 9, the logging configuration
1180           is only established when
1181           the entire configuration file has been parsed.  In <acronym class="acronym">BIND</acronym> 8, it was
1182           established as soon as the <span><strong class="command">logging</strong></span>
1183           statement
1184           was parsed. When the server is starting up, all logging messages
1185           regarding syntax errors in the configuration file go to the default
1186           channels, or to standard error if the "<code class="option">-g</code>" option
1187           was specified.
1188         </p>
1189 <div class="sect3" lang="en">
1190 <div class="titlepage"><div><div><h4 class="title">
1191 <a name="id2575872"></a>The <span><strong class="command">channel</strong></span> Phrase</h4></div></div></div>
1192 <p>
1193             All log output goes to one or more <span class="emphasis"><em>channels</em></span>;
1194             you can make as many of them as you want.
1195           </p>
1196 <p>
1197             Every channel definition must include a destination clause that
1198             says whether messages selected for the channel go to a file, to a
1199             particular syslog facility, to the standard error stream, or are
1200             discarded. It can optionally also limit the message severity level
1201             that will be accepted by the channel (the default is
1202             <span><strong class="command">info</strong></span>), and whether to include a
1203             <span><strong class="command">named</strong></span>-generated time stamp, the
1204             category name
1205             and/or severity level (the default is not to include any).
1206           </p>
1207 <p>
1208             The <span><strong class="command">null</strong></span> destination clause
1209             causes all messages sent to the channel to be discarded;
1210             in that case, other options for the channel are meaningless.
1211           </p>
1212 <p>
1213             The <span><strong class="command">file</strong></span> destination clause directs
1214             the channel
1215             to a disk file.  It can include limitations
1216             both on how large the file is allowed to become, and how many
1217             versions
1218             of the file will be saved each time the file is opened.
1219           </p>
1220 <p>
1221             If you use the <span><strong class="command">versions</strong></span> log file
1222             option, then
1223             <span><strong class="command">named</strong></span> will retain that many backup
1224             versions of the file by
1225             renaming them when opening.  For example, if you choose to keep
1226             three old versions
1227             of the file <code class="filename">lamers.log</code>, then just
1228             before it is opened
1229             <code class="filename">lamers.log.1</code> is renamed to
1230             <code class="filename">lamers.log.2</code>, <code class="filename">lamers.log.0</code> is renamed
1231             to <code class="filename">lamers.log.1</code>, and <code class="filename">lamers.log</code> is
1232             renamed to <code class="filename">lamers.log.0</code>.
1233             You can say <span><strong class="command">versions unlimited</strong></span> to
1234             not limit
1235             the number of versions.
1236             If a <span><strong class="command">size</strong></span> option is associated with
1237             the log file,
1238             then renaming is only done when the file being opened exceeds the
1239             indicated size.  No backup versions are kept by default; any
1240             existing
1241             log file is simply appended.
1242           </p>
1243 <p>
1244             The <span><strong class="command">size</strong></span> option for files is used
1245             to limit log
1246             growth. If the file ever exceeds the size, then <span><strong class="command">named</strong></span> will
1247             stop writing to the file unless it has a <span><strong class="command">versions</strong></span> option
1248             associated with it.  If backup versions are kept, the files are
1249             rolled as
1250             described above and a new one begun.  If there is no
1251             <span><strong class="command">versions</strong></span> option, no more data will
1252             be written to the log
1253             until some out-of-band mechanism removes or truncates the log to
1254             less than the
1255             maximum size.  The default behavior is not to limit the size of
1256             the
1257             file.
1258           </p>
1259 <p>
1260             Example usage of the <span><strong class="command">size</strong></span> and
1261             <span><strong class="command">versions</strong></span> options:
1262           </p>
1263 <pre class="programlisting">channel an_example_channel {
1264     file "example.log" versions 3 size 20m;
1265     print-time yes;
1266     print-category yes;
1267 };
1268 </pre>
1269 <p>
1270             The <span><strong class="command">syslog</strong></span> destination clause
1271             directs the
1272             channel to the system log.  Its argument is a
1273             syslog facility as described in the <span><strong class="command">syslog</strong></span> man
1274             page. Known facilities are <span><strong class="command">kern</strong></span>, <span><strong class="command">user</strong></span>,
1275             <span><strong class="command">mail</strong></span>, <span><strong class="command">daemon</strong></span>, <span><strong class="command">auth</strong></span>,
1276             <span><strong class="command">syslog</strong></span>, <span><strong class="command">lpr</strong></span>, <span><strong class="command">news</strong></span>,
1277             <span><strong class="command">uucp</strong></span>, <span><strong class="command">cron</strong></span>, <span><strong class="command">authpriv</strong></span>,
1278             <span><strong class="command">ftp</strong></span>, <span><strong class="command">local0</strong></span>, <span><strong class="command">local1</strong></span>,
1279             <span><strong class="command">local2</strong></span>, <span><strong class="command">local3</strong></span>, <span><strong class="command">local4</strong></span>,
1280             <span><strong class="command">local5</strong></span>, <span><strong class="command">local6</strong></span> and
1281             <span><strong class="command">local7</strong></span>, however not all facilities
1282             are supported on
1283             all operating systems.
1284             How <span><strong class="command">syslog</strong></span> will handle messages
1285             sent to
1286             this facility is described in the <span><strong class="command">syslog.conf</strong></span> man
1287             page. If you have a system which uses a very old version of <span><strong class="command">syslog</strong></span> that
1288             only uses two arguments to the <span><strong class="command">openlog()</strong></span> function,
1289             then this clause is silently ignored.
1290           </p>
1291 <p>
1292             The <span><strong class="command">severity</strong></span> clause works like <span><strong class="command">syslog</strong></span>'s
1293             "priorities", except that they can also be used if you are writing
1294             straight to a file rather than using <span><strong class="command">syslog</strong></span>.
1295             Messages which are not at least of the severity level given will
1296             not be selected for the channel; messages of higher severity
1297             levels
1298             will be accepted.
1299           </p>
1300 <p>
1301             If you are using <span><strong class="command">syslog</strong></span>, then the <span><strong class="command">syslog.conf</strong></span> priorities
1302             will also determine what eventually passes through. For example,
1303             defining a channel facility and severity as <span><strong class="command">daemon</strong></span> and <span><strong class="command">debug</strong></span> but
1304             only logging <span><strong class="command">daemon.warning</strong></span> via <span><strong class="command">syslog.conf</strong></span> will
1305             cause messages of severity <span><strong class="command">info</strong></span> and
1306             <span><strong class="command">notice</strong></span> to
1307             be dropped. If the situation were reversed, with <span><strong class="command">named</strong></span> writing
1308             messages of only <span><strong class="command">warning</strong></span> or higher,
1309             then <span><strong class="command">syslogd</strong></span> would
1310             print all messages it received from the channel.
1311           </p>
1312 <p>
1313             The <span><strong class="command">stderr</strong></span> destination clause
1314             directs the
1315             channel to the server's standard error stream.  This is intended
1316             for
1317             use when the server is running as a foreground process, for
1318             example
1319             when debugging a configuration.
1320           </p>
1321 <p>
1322             The server can supply extensive debugging information when
1323             it is in debugging mode. If the server's global debug level is
1324             greater
1325             than zero, then debugging mode will be active. The global debug
1326             level is set either by starting the <span><strong class="command">named</strong></span> server
1327             with the <code class="option">-d</code> flag followed by a positive integer,
1328             or by running <span><strong class="command">rndc trace</strong></span>.
1329             The global debug level
1330             can be set to zero, and debugging mode turned off, by running <span><strong class="command">rndc
1331 notrace</strong></span>. All debugging messages in the server have a debug
1332             level, and higher debug levels give more detailed output. Channels
1333             that specify a specific debug severity, for example:
1334           </p>
1335 <pre class="programlisting">channel specific_debug_level {
1336     file "foo";
1337     severity debug 3;
1338 };
1339 </pre>
1340 <p>
1341             will get debugging output of level 3 or less any time the
1342             server is in debugging mode, regardless of the global debugging
1343             level. Channels with <span><strong class="command">dynamic</strong></span>
1344             severity use the
1345             server's global debug level to determine what messages to print.
1346           </p>
1347 <p>
1348             If <span><strong class="command">print-time</strong></span> has been turned on,
1349             then
1350             the date and time will be logged. <span><strong class="command">print-time</strong></span> may
1351             be specified for a <span><strong class="command">syslog</strong></span> channel,
1352             but is usually
1353             pointless since <span><strong class="command">syslog</strong></span> also logs
1354             the date and
1355             time. If <span><strong class="command">print-category</strong></span> is
1356             requested, then the
1357             category of the message will be logged as well. Finally, if <span><strong class="command">print-severity</strong></span> is
1358             on, then the severity level of the message will be logged. The <span><strong class="command">print-</strong></span> options may
1359             be used in any combination, and will always be printed in the
1360             following
1361             order: time, category, severity. Here is an example where all
1362             three <span><strong class="command">print-</strong></span> options
1363             are on:
1364           </p>
1365 <p>
1366             <code class="computeroutput">28-Feb-2000 15:05:32.863 general: notice: running</code>
1367           </p>
1368 <p>
1369             There are four predefined channels that are used for
1370             <span><strong class="command">named</strong></span>'s default logging as follows.
1371             How they are
1372             used is described in <a href="Bv9ARM.ch06.html#the_category_phrase" title="The category Phrase">the section called &#8220;The <span><strong class="command">category</strong></span> Phrase&#8221;</a>.
1373           </p>
1374 <pre class="programlisting">channel default_syslog {
1375     // send to syslog's daemon facility
1376     syslog daemon;
1377     // only send priority info and higher
1378     severity info;
1379
1380 channel default_debug {
1381     // write to named.run in the working directory
1382     // Note: stderr is used instead of "named.run" if
1383     // the server is started with the '-f' option.
1384     file "named.run";
1385     // log at the server's current debug level
1386     severity dynamic;
1387 };
1388
1389 channel default_stderr {
1390     // writes to stderr
1391     stderr;
1392     // only send priority info and higher
1393     severity info;
1394 };
1395
1396 channel null {
1397    // toss anything sent to this channel
1398    null;
1399 };
1400 </pre>
1401 <p>
1402             The <span><strong class="command">default_debug</strong></span> channel has the
1403             special
1404             property that it only produces output when the server's debug
1405             level is
1406             nonzero.  It normally writes to a file called <code class="filename">named.run</code>
1407             in the server's working directory.
1408           </p>
1409 <p>
1410             For security reasons, when the "<code class="option">-u</code>"
1411             command line option is used, the <code class="filename">named.run</code> file
1412             is created only after <span><strong class="command">named</strong></span> has
1413             changed to the
1414             new UID, and any debug output generated while <span><strong class="command">named</strong></span> is
1415             starting up and still running as root is discarded.  If you need
1416             to capture this output, you must run the server with the "<code class="option">-g</code>"
1417             option and redirect standard error to a file.
1418           </p>
1419 <p>
1420             Once a channel is defined, it cannot be redefined. Thus you
1421             cannot alter the built-in channels directly, but you can modify
1422             the default logging by pointing categories at channels you have
1423             defined.
1424           </p>
1425 </div>
1426 <div class="sect3" lang="en">
1427 <div class="titlepage"><div><div><h4 class="title">
1428 <a name="the_category_phrase"></a>The <span><strong class="command">category</strong></span> Phrase</h4></div></div></div>
1429 <p>
1430             There are many categories, so you can send the logs you want
1431             to see wherever you want, without seeing logs you don't want. If
1432             you don't specify a list of channels for a category, then log
1433             messages
1434             in that category will be sent to the <span><strong class="command">default</strong></span> category
1435             instead. If you don't specify a default category, the following
1436             "default default" is used:
1437           </p>
1438 <pre class="programlisting">category default { default_syslog; default_debug; };
1439 </pre>
1440 <p>
1441             As an example, let's say you want to log security events to
1442             a file, but you also want keep the default logging behavior. You'd
1443             specify the following:
1444           </p>
1445 <pre class="programlisting">channel my_security_channel {
1446     file "my_security_file";
1447     severity info;
1448 };
1449 category security {
1450     my_security_channel;
1451     default_syslog;
1452     default_debug;
1453 };</pre>
1454 <p>
1455             To discard all messages in a category, specify the <span><strong class="command">null</strong></span> channel:
1456           </p>
1457 <pre class="programlisting">category xfer-out { null; };
1458 category notify { null; };
1459 </pre>
1460 <p>
1461             Following are the available categories and brief descriptions
1462             of the types of log information they contain. More
1463             categories may be added in future <acronym class="acronym">BIND</acronym> releases.
1464           </p>
1465 <div class="informaltable"><table border="1">
1466 <colgroup>
1467 <col>
1468 <col>
1469 </colgroup>
1470 <tbody>
1471 <tr>
1472 <td>
1473                     <p><span><strong class="command">default</strong></span></p>
1474                   </td>
1475 <td>
1476                     <p>
1477                       The default category defines the logging
1478                       options for those categories where no specific
1479                       configuration has been
1480                       defined.
1481                     </p>
1482                   </td>
1483 </tr>
1484 <tr>
1485 <td>
1486                     <p><span><strong class="command">general</strong></span></p>
1487                   </td>
1488 <td>
1489                     <p>
1490                       The catch-all. Many things still aren't
1491                       classified into categories, and they all end up here.
1492                     </p>
1493                   </td>
1494 </tr>
1495 <tr>
1496 <td>
1497                     <p><span><strong class="command">database</strong></span></p>
1498                   </td>
1499 <td>
1500                     <p>
1501                       Messages relating to the databases used
1502                       internally by the name server to store zone and cache
1503                       data.
1504                     </p>
1505                   </td>
1506 </tr>
1507 <tr>
1508 <td>
1509                     <p><span><strong class="command">security</strong></span></p>
1510                   </td>
1511 <td>
1512                     <p>
1513                       Approval and denial of requests.
1514                     </p>
1515                   </td>
1516 </tr>
1517 <tr>
1518 <td>
1519                     <p><span><strong class="command">config</strong></span></p>
1520                   </td>
1521 <td>
1522                     <p>
1523                       Configuration file parsing and processing.
1524                     </p>
1525                   </td>
1526 </tr>
1527 <tr>
1528 <td>
1529                     <p><span><strong class="command">resolver</strong></span></p>
1530                   </td>
1531 <td>
1532                     <p>
1533                       DNS resolution, such as the recursive
1534                       lookups performed on behalf of clients by a caching name
1535                       server.
1536                     </p>
1537                   </td>
1538 </tr>
1539 <tr>
1540 <td>
1541                     <p><span><strong class="command">xfer-in</strong></span></p>
1542                   </td>
1543 <td>
1544                     <p>
1545                       Zone transfers the server is receiving.
1546                     </p>
1547                   </td>
1548 </tr>
1549 <tr>
1550 <td>
1551                     <p><span><strong class="command">xfer-out</strong></span></p>
1552                   </td>
1553 <td>
1554                     <p>
1555                       Zone transfers the server is sending.
1556                     </p>
1557                   </td>
1558 </tr>
1559 <tr>
1560 <td>
1561                     <p><span><strong class="command">notify</strong></span></p>
1562                   </td>
1563 <td>
1564                     <p>
1565                       The NOTIFY protocol.
1566                     </p>
1567                   </td>
1568 </tr>
1569 <tr>
1570 <td>
1571                     <p><span><strong class="command">client</strong></span></p>
1572                   </td>
1573 <td>
1574                     <p>
1575                       Processing of client requests.
1576                     </p>
1577                   </td>
1578 </tr>
1579 <tr>
1580 <td>
1581                     <p><span><strong class="command">unmatched</strong></span></p>
1582                   </td>
1583 <td>
1584                     <p>
1585                       Messages that <span><strong class="command">named</strong></span> was unable to determine the
1586                       class of or for which there was no matching <span><strong class="command">view</strong></span>.
1587                       A one line summary is also logged to the <span><strong class="command">client</strong></span> category.
1588                       This category is best sent to a file or stderr, by
1589                       default it is sent to
1590                       the <span><strong class="command">null</strong></span> channel.
1591                     </p>
1592                   </td>
1593 </tr>
1594 <tr>
1595 <td>
1596                     <p><span><strong class="command">network</strong></span></p>
1597                   </td>
1598 <td>
1599                     <p>
1600                       Network operations.
1601                     </p>
1602                   </td>
1603 </tr>
1604 <tr>
1605 <td>
1606                     <p><span><strong class="command">update</strong></span></p>
1607                   </td>
1608 <td>
1609                     <p>
1610                       Dynamic updates.
1611                     </p>
1612                   </td>
1613 </tr>
1614 <tr>
1615 <td>
1616                     <p><span><strong class="command">update-security</strong></span></p>
1617                   </td>
1618 <td>
1619                     <p>
1620                       Approval and denial of update requests.
1621                     </p>
1622                   </td>
1623 </tr>
1624 <tr>
1625 <td>
1626                     <p><span><strong class="command">queries</strong></span></p>
1627                   </td>
1628 <td>
1629                     <p>
1630                       Specify where queries should be logged to.
1631                     </p>
1632                     <p>
1633                       At startup, specifying the category <span><strong class="command">queries</strong></span> will also
1634                       enable query logging unless <span><strong class="command">querylog</strong></span> option has been
1635                       specified.
1636                     </p>
1637
1638                     <p>
1639                       The query log entry reports the client's IP
1640                       address and port number, and the query name,
1641                       class and type.  Next it reports whether the
1642                       Recursion Desired flag was set (+ if set, -
1643                       if not set), if the query was signed (S),
1644                       EDNS was in use (E), if TCP was used (T), if
1645                       DO (DNSSEC Ok) was set (D), or if CD (Checking
1646                       Disabled) was set (C).  After this the
1647                       destination address the query was sent to is
1648                       reported.
1649                     </p>
1650
1651                     <p>
1652                       <code class="computeroutput">client 127.0.0.1#62536: query: www.example.com IN AAAA +SE</code>
1653                     </p>
1654                     <p>
1655                       <code class="computeroutput">client ::1#62537: query: www.example.net IN AAAA -SE</code>
1656                     </p>
1657                   </td>
1658 </tr>
1659 <tr>
1660 <td>
1661                     <p><span><strong class="command">query-errors</strong></span></p>
1662                   </td>
1663 <td>
1664                     <p>
1665                       Information about queries that resulted in some
1666                       failure.
1667                     </p>
1668                   </td>
1669 </tr>
1670 <tr>
1671 <td>
1672                     <p><span><strong class="command">dispatch</strong></span></p>
1673                   </td>
1674 <td>
1675                     <p>
1676                       Dispatching of incoming packets to the
1677                       server modules where they are to be processed.
1678                     </p>
1679                   </td>
1680 </tr>
1681 <tr>
1682 <td>
1683                     <p><span><strong class="command">dnssec</strong></span></p>
1684                   </td>
1685 <td>
1686                     <p>
1687                       DNSSEC and TSIG protocol processing.
1688                     </p>
1689                   </td>
1690 </tr>
1691 <tr>
1692 <td>
1693                     <p><span><strong class="command">lame-servers</strong></span></p>
1694                   </td>
1695 <td>
1696                     <p>
1697                       Lame servers.  These are misconfigurations
1698                       in remote servers, discovered by BIND 9 when trying to
1699                       query those servers during resolution.
1700                     </p>
1701                   </td>
1702 </tr>
1703 <tr>
1704 <td>
1705                     <p><span><strong class="command">delegation-only</strong></span></p>
1706                   </td>
1707 <td>
1708                     <p>
1709                       Delegation only.  Logs queries that have been
1710                       forced to NXDOMAIN as the result of a
1711                       delegation-only zone or a
1712                       <span><strong class="command">delegation-only</strong></span> in a hint
1713                       or stub zone declaration.
1714                     </p>
1715                   </td>
1716 </tr>
1717 <tr>
1718 <td>
1719                     <p><span><strong class="command">edns-disabled</strong></span></p>
1720                   </td>
1721 <td>
1722                     <p>
1723                       Log queries that have been forced to use plain
1724                       DNS due to timeouts.  This is often due to
1725                       the remote servers not being RFC 1034 compliant
1726                       (not always returning FORMERR or similar to
1727                       EDNS queries and other extensions to the DNS
1728                       when they are not understood).  In other words, this is
1729                       targeted at servers that fail to respond to
1730                       DNS queries that they don't understand.
1731                     </p>
1732                     <p>
1733                       Note: the log message can also be due to
1734                       packet loss.  Before reporting servers for
1735                       non-RFC 1034 compliance they should be re-tested
1736                       to determine the nature of the non-compliance.
1737                       This testing should prevent or reduce the
1738                       number of false-positive reports.
1739                     </p>
1740                     <p>
1741                       Note: eventually <span><strong class="command">named</strong></span> will have to stop
1742                       treating such timeouts as due to RFC 1034 non
1743                       compliance and start treating it as plain
1744                       packet loss.  Falsely classifying packet
1745                       loss as due to RFC 1034 non compliance impacts
1746                       on DNSSEC validation which requires EDNS for
1747                       the DNSSEC records to be returned.
1748                     </p>
1749                   </td>
1750 </tr>
1751 </tbody>
1752 </table></div>
1753 </div>
1754 <div class="sect3" lang="en">
1755 <div class="titlepage"><div><div><h4 class="title">
1756 <a name="id2577230"></a>The <span><strong class="command">query-errors</strong></span> Category</h4></div></div></div>
1757 <p>
1758             The <span><strong class="command">query-errors</strong></span> category is
1759             specifically intended for debugging purposes: To identify
1760             why and how specific queries result in responses which
1761             indicate an error.
1762             Messages of this category are therefore only logged
1763             with <span><strong class="command">debug</strong></span> levels.
1764           </p>
1765 <p>
1766             At the debug levels of 1 or higher, each response with the
1767             rcode of SERVFAIL is logged as follows:
1768           </p>
1769 <p>
1770             <code class="computeroutput">client 127.0.0.1#61502: query failed (SERVFAIL) for www.example.com/IN/AAAA at query.c:3880</code>
1771           </p>
1772 <p>
1773             This means an error resulting in SERVFAIL was
1774             detected at line 3880 of source file
1775             <code class="filename">query.c</code>.
1776             Log messages of this level will particularly
1777             help identify the cause of SERVFAIL for an
1778             authoritative server.
1779           </p>
1780 <p>
1781             At the debug levels of 2 or higher, detailed context
1782             information of recursive resolutions that resulted in
1783             SERVFAIL is logged.
1784             The log message will look like as follows:
1785           </p>
1786 <p>
1787
1788             </p>
1789 <pre class="programlisting">
1790 fetch completed at resolver.c:2970 for www.example.com/A
1791 in 30.000183: timed out/success [domain:example.com,
1792 referral:2,restart:7,qrysent:8,timeout:5,lame:0,neterr:0,
1793 badresp:1,adberr:0,findfail:0,valfail:0]
1794             </pre>
1795 <p>
1796           </p>
1797 <p>
1798             The first part before the colon shows that a recursive
1799             resolution for AAAA records of www.example.com completed
1800             in 30.000183 seconds and the final result that led to the
1801             SERVFAIL was determined at line 2970 of source file
1802             <code class="filename">resolver.c</code>.
1803           </p>
1804 <p>
1805             The following part shows the detected final result and the
1806             latest result of DNSSEC validation.
1807             The latter is always success when no validation attempt
1808             is made.
1809             In this example, this query resulted in SERVFAIL probably
1810             because all name servers are down or unreachable, leading
1811             to a timeout in 30 seconds.
1812             DNSSEC validation was probably not attempted.
1813           </p>
1814 <p>
1815             The last part enclosed in square brackets shows statistics
1816             information collected for this particular resolution
1817             attempt.
1818             The <code class="varname">domain</code> field shows the deepest zone
1819             that the resolver reached;
1820             it is the zone where the error was finally detected.
1821             The meaning of the other fields is summarized in the
1822             following table.
1823           </p>
1824 <div class="informaltable"><table border="1">
1825 <colgroup>
1826 <col>
1827 <col>
1828 </colgroup>
1829 <tbody>
1830 <tr>
1831 <td>
1832                     <p><code class="varname">referral</code></p>
1833                   </td>
1834 <td>
1835                     <p>
1836                       The number of referrals the resolver received
1837                       throughout the resolution process.
1838                       In the above example this is 2, which are most
1839                       likely com and example.com.
1840                     </p>
1841                   </td>
1842 </tr>
1843 <tr>
1844 <td>
1845                     <p><code class="varname">restart</code></p>
1846                   </td>
1847 <td>
1848                     <p>
1849                       The number of cycles that the resolver tried
1850                       remote servers at the <code class="varname">domain</code>
1851                       zone.
1852                       In each cycle the resolver sends one query
1853                       (possibly resending it, depending on the response)
1854                       to each known name server of
1855                       the <code class="varname">domain</code> zone.
1856                     </p>
1857                   </td>
1858 </tr>
1859 <tr>
1860 <td>
1861                     <p><code class="varname">qrysent</code></p>
1862                   </td>
1863 <td>
1864                     <p>
1865                       The number of queries the resolver sent at the
1866                       <code class="varname">domain</code> zone.
1867                     </p>
1868                   </td>
1869 </tr>
1870 <tr>
1871 <td>
1872                     <p><code class="varname">timeout</code></p>
1873                   </td>
1874 <td>
1875                     <p>
1876                       The number of timeouts since the resolver
1877                       received the last response.
1878                     </p>
1879                   </td>
1880 </tr>
1881 <tr>
1882 <td>
1883                     <p><code class="varname">lame</code></p>
1884                   </td>
1885 <td>
1886                     <p>
1887                       The number of lame servers the resolver detected
1888                       at the <code class="varname">domain</code> zone.
1889                       A server is detected to be lame either by an
1890                       invalid response or as a result of lookup in
1891                       BIND9's address database (ADB), where lame
1892                       servers are cached.
1893                     </p>
1894                   </td>
1895 </tr>
1896 <tr>
1897 <td>
1898                     <p><code class="varname">neterr</code></p>
1899                   </td>
1900 <td>
1901                     <p>
1902                       The number of erroneous results that the
1903                       resolver encountered in sending queries
1904                       at the <code class="varname">domain</code> zone.
1905                       One common case is the remote server is
1906                       unreachable and the resolver receives an ICMP
1907                       unreachable error message.
1908                     </p>
1909                   </td>
1910 </tr>
1911 <tr>
1912 <td>
1913                     <p><code class="varname">badresp</code></p>
1914                   </td>
1915 <td>
1916                     <p>
1917                       The number of unexpected responses (other than
1918                       <code class="varname">lame</code>) to queries sent by the
1919                       resolver at the <code class="varname">domain</code> zone.
1920                     </p>
1921                   </td>
1922 </tr>
1923 <tr>
1924 <td>
1925                     <p><code class="varname">adberr</code></p>
1926                   </td>
1927 <td>
1928                     <p>
1929                       Failures in finding remote server addresses
1930                       of the <code class="varname">domain</code> zone in the ADB.
1931                       One common case of this is that the remote
1932                       server's name does not have any address records.
1933                     </p>
1934                   </td>
1935 </tr>
1936 <tr>
1937 <td>
1938                     <p><code class="varname">findfail</code></p>
1939                   </td>
1940 <td>
1941                     <p>
1942                       Failures of resolving remote server addresses.
1943                       This is a total number of failures throughout
1944                       the resolution process.
1945                     </p>
1946                   </td>
1947 </tr>
1948 <tr>
1949 <td>
1950                     <p><code class="varname">valfail</code></p>
1951                   </td>
1952 <td>
1953                     <p>
1954                       Failures of DNSSEC validation.
1955                       Validation failures are counted throughout
1956                       the resolution process (not limited to
1957                       the <code class="varname">domain</code> zone), but should
1958                       only happen in <code class="varname">domain</code>.
1959                     </p>
1960                   </td>
1961 </tr>
1962 </tbody>
1963 </table></div>
1964 <p>
1965             At the debug levels of 3 or higher, the same messages
1966             as those at the debug 1 level are logged for other errors
1967             than SERVFAIL.
1968             Note that negative responses such as NXDOMAIN are not
1969             regarded as errors here.
1970           </p>
1971 <p>
1972             At the debug levels of 4 or higher, the same messages
1973             as those at the debug 2 level are logged for other errors
1974             than SERVFAIL.
1975             Unlike the above case of level 3, messages are logged for
1976             negative responses.
1977             This is because any unexpected results can be difficult to
1978             debug in the recursion case.
1979           </p>
1980 </div>
1981 </div>
1982 <div class="sect2" lang="en">
1983 <div class="titlepage"><div><div><h3 class="title">
1984 <a name="id2577886"></a><span><strong class="command">lwres</strong></span> Statement Grammar</h3></div></div></div>
1985 <p>
1986            This is the grammar of the <span><strong class="command">lwres</strong></span>
1987           statement in the <code class="filename">named.conf</code> file:
1988         </p>
1989 <pre class="programlisting"><span><strong class="command">lwres</strong></span> {
1990     [<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>] ;
1991                 [<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>]
1992     [<span class="optional"> view <em class="replaceable"><code>view_name</code></em>; </span>]
1993     [<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>]
1994     [<span class="optional"> ndots <em class="replaceable"><code>number</code></em>; </span>]
1995 };
1996 </pre>
1997 </div>
1998 <div class="sect2" lang="en">
1999 <div class="titlepage"><div><div><h3 class="title">
2000 <a name="id2577960"></a><span><strong class="command">lwres</strong></span> Statement Definition and Usage</h3></div></div></div>
2001 <p>
2002           The <span><strong class="command">lwres</strong></span> statement configures the
2003           name
2004           server to also act as a lightweight resolver server. (See
2005           <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
2006           <span><strong class="command">lwres</strong></span> statements configuring
2007           lightweight resolver servers with different properties.
2008         </p>
2009 <p>
2010           The <span><strong class="command">listen-on</strong></span> statement specifies a
2011           list of
2012           addresses (and ports) that this instance of a lightweight resolver
2013           daemon
2014           should accept requests on.  If no port is specified, port 921 is
2015           used.
2016           If this statement is omitted, requests will be accepted on
2017           127.0.0.1,
2018           port 921.
2019         </p>
2020 <p>
2021           The <span><strong class="command">view</strong></span> statement binds this
2022           instance of a
2023           lightweight resolver daemon to a view in the DNS namespace, so that
2024           the
2025           response will be constructed in the same manner as a normal DNS
2026           query
2027           matching this view.  If this statement is omitted, the default view
2028           is
2029           used, and if there is no default view, an error is triggered.
2030         </p>
2031 <p>
2032           The <span><strong class="command">search</strong></span> statement is equivalent to
2033           the
2034           <span><strong class="command">search</strong></span> statement in
2035           <code class="filename">/etc/resolv.conf</code>.  It provides a
2036           list of domains
2037           which are appended to relative names in queries.
2038         </p>
2039 <p>
2040           The <span><strong class="command">ndots</strong></span> statement is equivalent to
2041           the
2042           <span><strong class="command">ndots</strong></span> statement in
2043           <code class="filename">/etc/resolv.conf</code>.  It indicates the
2044           minimum
2045           number of dots in a relative domain name that should result in an
2046           exact match lookup before search path elements are appended.
2047         </p>
2048 </div>
2049 <div class="sect2" lang="en">
2050 <div class="titlepage"><div><div><h3 class="title">
2051 <a name="id2578024"></a><span><strong class="command">masters</strong></span> Statement Grammar</h3></div></div></div>
2052 <pre class="programlisting">
2053 <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> | 
2054       <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>] };
2055 </pre>
2056 </div>
2057 <div class="sect2" lang="en">
2058 <div class="titlepage"><div><div><h3 class="title">
2059 <a name="id2578068"></a><span><strong class="command">masters</strong></span> Statement Definition and
2060           Usage</h3></div></div></div>
2061 <p><span><strong class="command">masters</strong></span>
2062           lists allow for a common set of masters to be easily used by
2063           multiple stub and slave zones.
2064         </p>
2065 </div>
2066 <div class="sect2" lang="en">
2067 <div class="titlepage"><div><div><h3 class="title">
2068 <a name="id2578083"></a><span><strong class="command">options</strong></span> Statement Grammar</h3></div></div></div>
2069 <p>
2070           This is the grammar of the <span><strong class="command">options</strong></span>
2071           statement in the <code class="filename">named.conf</code> file:
2072         </p>
2073 <pre class="programlisting"><span><strong class="command">options</strong></span> {
2074     [<span class="optional"> attach-cache <em class="replaceable"><code>cache_name</code></em>; </span>]
2075     [<span class="optional"> version <em class="replaceable"><code>version_string</code></em>; </span>]
2076     [<span class="optional"> hostname <em class="replaceable"><code>hostname_string</code></em>; </span>]
2077     [<span class="optional"> server-id <em class="replaceable"><code>server_id_string</code></em>; </span>]
2078     [<span class="optional"> directory <em class="replaceable"><code>path_name</code></em>; </span>]
2079     [<span class="optional"> key-directory <em class="replaceable"><code>path_name</code></em>; </span>]
2080     [<span class="optional"> managed-keys-directory <em class="replaceable"><code>path_name</code></em>; </span>]
2081     [<span class="optional"> named-xfer <em class="replaceable"><code>path_name</code></em>; </span>]
2082     [<span class="optional"> tkey-gssapi-credential <em class="replaceable"><code>principal</code></em>; </span>]
2083     [<span class="optional"> tkey-domain <em class="replaceable"><code>domainname</code></em>; </span>]
2084     [<span class="optional"> tkey-dhkey <em class="replaceable"><code>key_name</code></em> <em class="replaceable"><code>key_tag</code></em>; </span>]
2085     [<span class="optional"> cache-file <em class="replaceable"><code>path_name</code></em>; </span>]
2086     [<span class="optional"> dump-file <em class="replaceable"><code>path_name</code></em>; </span>]
2087     [<span class="optional"> bindkeys-file <em class="replaceable"><code>path_name</code></em>; </span>]
2088     [<span class="optional"> memstatistics <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2089     [<span class="optional"> memstatistics-file <em class="replaceable"><code>path_name</code></em>; </span>]
2090     [<span class="optional"> pid-file <em class="replaceable"><code>path_name</code></em>; </span>]
2091     [<span class="optional"> recursing-file <em class="replaceable"><code>path_name</code></em>; </span>]
2092     [<span class="optional"> statistics-file <em class="replaceable"><code>path_name</code></em>; </span>]
2093     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2094     [<span class="optional"> auth-nxdomain <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2095     [<span class="optional"> deallocate-on-exit <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2096     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em>; </span>]
2097     [<span class="optional"> fake-iquery <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2098     [<span class="optional"> fetch-glue <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2099     [<span class="optional"> flush-zones-on-shutdown <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2100     [<span class="optional"> has-old-clients <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2101     [<span class="optional"> host-statistics <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2102     [<span class="optional"> host-statistics-max <em class="replaceable"><code>number</code></em>; </span>]
2103     [<span class="optional"> minimal-responses <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2104     [<span class="optional"> multiple-cnames <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2105     [<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>]
2106     [<span class="optional"> recursion <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2107     [<span class="optional"> rfc2308-type1 <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2108     [<span class="optional"> use-id-pool <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2109     [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2110     [<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>]
2111     [<span class="optional"> dnssec-enable <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2112     [<span class="optional"> dnssec-validation <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2113     [<span class="optional"> dnssec-lookaside ( <em class="replaceable"><code>auto</code></em> | 
2114                         <em class="replaceable"><code>domain</code></em> trust-anchor <em class="replaceable"><code>domain</code></em> ); </span>]
2115     [<span class="optional"> dnssec-must-be-secure <em class="replaceable"><code>domain yes_or_no</code></em>; </span>]
2116     [<span class="optional"> dnssec-accept-expired <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2117     [<span class="optional"> forward ( <em class="replaceable"><code>only</code></em> | <em class="replaceable"><code>first</code></em> ); </span>]
2118     [<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>]
2119     [<span class="optional"> dual-stack-servers [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] {
2120         ( <em class="replaceable"><code>domain_name</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] |
2121           <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ) ; 
2122         ... }; </span>]
2123     [<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> )
2124         ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
2125     [<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>]
2126     [<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>]
2127     [<span class="optional"> check-wildcard <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2128     [<span class="optional"> check-integrity <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2129     [<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>]
2130     [<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>]
2131     [<span class="optional"> check-sibling <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2132     [<span class="optional"> allow-new-zones { <em class="replaceable"><code>yes_or_no</code></em> }; </span>]
2133     [<span class="optional"> allow-notify { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2134     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2135     [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2136     [<span class="optional"> allow-query-cache { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2137     [<span class="optional"> allow-query-cache-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2138     [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2139     [<span class="optional"> allow-recursion { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2140     [<span class="optional"> allow-recursion-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2141     [<span class="optional"> allow-update { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2142     [<span class="optional"> allow-update-forwarding { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2143     [<span class="optional"> update-check-ksk <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2144     [<span class="optional"> dnssec-dnskey-kskonly <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2145     [<span class="optional"> dnssec-secure-to-insecure <em class="replaceable"><code>yes_or_no</code></em> ;</span>]
2146     [<span class="optional"> try-tcp-refresh <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2147     [<span class="optional"> allow-v6-synthesis { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2148     [<span class="optional"> blackhole { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2149     [<span class="optional"> use-v4-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2150     [<span class="optional"> avoid-v4-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2151     [<span class="optional"> use-v6-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2152     [<span class="optional"> avoid-v6-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2153     [<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>]
2154     [<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>]
2155     [<span class="optional"> query-source ( ( <em class="replaceable"><code>ip4_addr</code></em> | <em class="replaceable"><code>*</code></em> )
2156         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] |
2157         [<span class="optional"> address ( <em class="replaceable"><code>ip4_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]
2158         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] ) ; </span>]
2159     [<span class="optional"> query-source-v6 ( ( <em class="replaceable"><code>ip6_addr</code></em> | <em class="replaceable"><code>*</code></em> )
2160         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] | 
2161         [<span class="optional"> address ( <em class="replaceable"><code>ip6_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] 
2162         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] ) ; </span>]
2163     [<span class="optional"> use-queryport-pool <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2164     [<span class="optional"> queryport-pool-ports <em class="replaceable"><code>number</code></em>; </span>]
2165     [<span class="optional"> queryport-pool-updateinterval <em class="replaceable"><code>number</code></em>; </span>]
2166     [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em>; </span>]
2167     [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em>; </span>]
2168     [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em>; </span>]
2169     [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em>; </span>]
2170     [<span class="optional"> tcp-clients <em class="replaceable"><code>number</code></em>; </span>]
2171     [<span class="optional"> reserved-sockets <em class="replaceable"><code>number</code></em>; </span>]
2172     [<span class="optional"> recursive-clients <em class="replaceable"><code>number</code></em>; </span>]
2173     [<span class="optional"> serial-query-rate <em class="replaceable"><code>number</code></em>; </span>]
2174     [<span class="optional"> serial-queries <em class="replaceable"><code>number</code></em>; </span>]
2175     [<span class="optional"> tcp-listen-queue <em class="replaceable"><code>number</code></em>; </span>]
2176     [<span class="optional"> transfer-format <em class="replaceable"><code>( one-answer | many-answers )</code></em>; </span>]
2177     [<span class="optional"> transfers-in  <em class="replaceable"><code>number</code></em>; </span>]
2178     [<span class="optional"> transfers-out <em class="replaceable"><code>number</code></em>; </span>]
2179     [<span class="optional"> transfers-per-ns <em class="replaceable"><code>number</code></em>; </span>]
2180     [<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>]
2181     [<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>]
2182     [<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>]
2183     [<span class="optional"> alt-transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
2184                              [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
2185     [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2186     [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
2187     [<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>]
2188     [<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>]
2189     [<span class="optional"> notify-to-soa <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2190     [<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>] ;
2191                   [<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>]
2192     [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em>; </span>]
2193     [<span class="optional"> max-journal-size <em class="replaceable"><code>size_spec</code></em>; </span>]
2194     [<span class="optional"> coresize <em class="replaceable"><code>size_spec</code></em> ; </span>]
2195     [<span class="optional"> datasize <em class="replaceable"><code>size_spec</code></em> ; </span>]
2196     [<span class="optional"> files <em class="replaceable"><code>size_spec</code></em> ; </span>]
2197     [<span class="optional"> stacksize <em class="replaceable"><code>size_spec</code></em> ; </span>]
2198     [<span class="optional"> cleaning-interval <em class="replaceable"><code>number</code></em>; </span>]
2199     [<span class="optional"> heartbeat-interval <em class="replaceable"><code>number</code></em>; </span>]
2200     [<span class="optional"> interface-interval <em class="replaceable"><code>number</code></em>; </span>]
2201     [<span class="optional"> statistics-interval <em class="replaceable"><code>number</code></em>; </span>]
2202     [<span class="optional"> topology { <em class="replaceable"><code>address_match_list</code></em> }</span>];
2203     [<span class="optional"> sortlist { <em class="replaceable"><code>address_match_list</code></em> }</span>];
2204     [<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>] };
2205     [<span class="optional"> lame-ttl <em class="replaceable"><code>number</code></em>; </span>]
2206     [<span class="optional"> max-ncache-ttl <em class="replaceable"><code>number</code></em>; </span>]
2207     [<span class="optional"> max-cache-ttl <em class="replaceable"><code>number</code></em>; </span>]
2208     [<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>]
2209     [<span class="optional"> sig-signing-nodes <em class="replaceable"><code>number</code></em> ; </span>]
2210     [<span class="optional"> sig-signing-signatures <em class="replaceable"><code>number</code></em> ; </span>]
2211     [<span class="optional"> sig-signing-type <em class="replaceable"><code>number</code></em> ; </span>]
2212     [<span class="optional"> min-roots <em class="replaceable"><code>number</code></em>; </span>]
2213     [<span class="optional"> use-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2214     [<span class="optional"> provide-ixfr <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2215     [<span class="optional"> request-ixfr <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2216     [<span class="optional"> treat-cr-as-space <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2217     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
2218     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
2219     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
2220     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
2221     [<span class="optional"> port <em class="replaceable"><code>ip_port</code></em>; </span>]
2222     [<span class="optional"> additional-from-auth <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2223     [<span class="optional"> additional-from-cache <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2224     [<span class="optional"> random-device <em class="replaceable"><code>path_name</code></em> ; </span>]
2225     [<span class="optional"> max-cache-size <em class="replaceable"><code>size_spec</code></em> ; </span>]
2226     [<span class="optional"> match-mapped-addresses <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2227     [<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>]
2228     [<span class="optional"> filter-aaaa { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2229     [<span class="optional"> dns64 <em class="replaceable"><code>IPv6-prefix</code></em> {
2230         [<span class="optional"> clients { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2231         [<span class="optional"> mapped { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2232         [<span class="optional"> exclude { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2233         [<span class="optional"> suffix IPv6-address; </span>]
2234         [<span class="optional"> recursion-only <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2235         [<span class="optional"> break-dnssec <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2236     }; </span>];
2237     [<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>]
2238     [<span class="optional"> edns-udp-size <em class="replaceable"><code>number</code></em>; </span>]
2239     [<span class="optional"> max-udp-size <em class="replaceable"><code>number</code></em>; </span>]
2240     [<span class="optional"> root-delegation-only [<span class="optional"> exclude { <em class="replaceable"><code>namelist</code></em> } </span>] ; </span>]
2241     [<span class="optional"> querylog <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2242     [<span class="optional"> disable-algorithms <em class="replaceable"><code>domain</code></em> { <em class="replaceable"><code>algorithm</code></em>;
2243                                 [<span class="optional"> <em class="replaceable"><code>algorithm</code></em>; </span>] }; </span>]
2244     [<span class="optional"> acache-enable <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2245     [<span class="optional"> acache-cleaning-interval <em class="replaceable"><code>number</code></em>; </span>]
2246     [<span class="optional"> max-acache-size <em class="replaceable"><code>size_spec</code></em> ; </span>]
2247     [<span class="optional"> clients-per-query <em class="replaceable"><code>number</code></em> ; </span>]
2248     [<span class="optional"> max-clients-per-query <em class="replaceable"><code>number</code></em> ; </span>]
2249     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
2250     [<span class="optional"> empty-server <em class="replaceable"><code>name</code></em> ; </span>]
2251     [<span class="optional"> empty-contact <em class="replaceable"><code>name</code></em> ; </span>]
2252     [<span class="optional"> empty-zones-enable <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2253     [<span class="optional"> disable-empty-zone <em class="replaceable"><code>zone_name</code></em> ; </span>]
2254     [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2255     [<span class="optional"> zero-no-soa-ttl-cache <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2256     [<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>]
2257     [<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>]
2258 };
2259 </pre>
2260 </div>
2261 <div class="sect2" lang="en">
2262 <div class="titlepage"><div><div><h3 class="title">
2263 <a name="options"></a><span><strong class="command">options</strong></span> Statement Definition and
2264           Usage</h3></div></div></div>
2265 <p>
2266           The <span><strong class="command">options</strong></span> statement sets up global
2267           options
2268           to be used by <acronym class="acronym">BIND</acronym>. This statement
2269           may appear only
2270           once in a configuration file. If there is no <span><strong class="command">options</strong></span>
2271           statement, an options block with each option set to its default will
2272           be used.
2273         </p>
2274 <div class="variablelist"><dl>
2275 <dt><span class="term"><span><strong class="command">attach-cache</strong></span></span></dt>
2276 <dd>
2277 <p>
2278                   Allows multiple views to share a single cache
2279                   database.
2280                   Each view has its own cache database by default, but
2281                   if multiple views have the same operational policy
2282                   for name resolution and caching, those views can
2283                   share a single cache to save memory and possibly
2284                   improve resolution efficiency by using this option.
2285                 </p>
2286 <p>
2287                   The <span><strong class="command">attach-cache</strong></span> option
2288                   may also be specified in <span><strong class="command">view</strong></span>
2289                   statements, in which case it overrides the
2290                   global <span><strong class="command">attach-cache</strong></span> option.
2291                 </p>
2292 <p>
2293                   The <em class="replaceable"><code>cache_name</code></em> specifies
2294                   the cache to be shared.
2295                   When the <span><strong class="command">named</strong></span> server configures
2296                   views which are supposed to share a cache, it
2297                   creates a cache with the specified name for the
2298                   first view of these sharing views.
2299                   The rest of the views will simply refer to the
2300                   already created cache.
2301                 </p>
2302 <p>
2303                   One common configuration to share a cache would be to
2304                   allow all views to share a single cache.
2305                   This can be done by specifying
2306                   the <span><strong class="command">attach-cache</strong></span> as a global
2307                   option with an arbitrary name.
2308                 </p>
2309 <p>
2310                   Another possible operation is to allow a subset of
2311                   all views to share a cache while the others to
2312                   retain their own caches.
2313                   For example, if there are three views A, B, and C,
2314                   and only A and B should share a cache, specify the
2315                   <span><strong class="command">attach-cache</strong></span> option as a view A (or
2316                   B)'s option, referring to the other view name:
2317                 </p>
2318 <pre class="programlisting">
2319   view "A" {
2320     // this view has its own cache
2321     ...
2322   };
2323   view "B" {
2324     // this view refers to A's cache
2325     attach-cache "A";
2326   };
2327   view "C" {
2328     // this view has its own cache
2329     ...
2330   };
2331 </pre>
2332 <p>
2333                   Views that share a cache must have the same policy
2334                   on configurable parameters that may affect caching.
2335                   The current implementation requires the following
2336                   configurable options be consistent among these
2337                   views:
2338                   <span><strong class="command">check-names</strong></span>,
2339                   <span><strong class="command">cleaning-interval</strong></span>,
2340                   <span><strong class="command">dnssec-accept-expired</strong></span>,
2341                   <span><strong class="command">dnssec-validation</strong></span>,
2342                   <span><strong class="command">max-cache-ttl</strong></span>,
2343                   <span><strong class="command">max-ncache-ttl</strong></span>,
2344                   <span><strong class="command">max-cache-size</strong></span>, and
2345                   <span><strong class="command">zero-no-soa-ttl</strong></span>.
2346                 </p>
2347 <p>
2348                   Note that there may be other parameters that may
2349                   cause confusion if they are inconsistent for
2350                   different views that share a single cache.
2351                   For example, if these views define different sets of
2352                   forwarders that can return different answers for the
2353                   same question, sharing the answer does not make
2354                   sense or could even be harmful.
2355                   It is administrator's responsibility to ensure
2356                   configuration differences in different views do
2357                   not cause disruption with a shared cache.
2358                 </p>
2359 </dd>
2360 <dt><span class="term"><span><strong class="command">directory</strong></span></span></dt>
2361 <dd><p>
2362                 The working directory of the server.
2363                 Any non-absolute pathnames in the configuration file will be
2364                 taken
2365                 as relative to this directory. The default location for most
2366                 server
2367                 output files (e.g. <code class="filename">named.run</code>)
2368                 is this directory.
2369                 If a directory is not specified, the working directory
2370                 defaults to `<code class="filename">.</code>', the directory from
2371                 which the server
2372                 was started. The directory specified should be an absolute
2373                 path.
2374               </p></dd>
2375 <dt><span class="term"><span><strong class="command">key-directory</strong></span></span></dt>
2376 <dd><p>
2377                 When performing dynamic update of secure zones, the
2378                 directory where the public and private DNSSEC key files
2379                 should be found, if different than the current working
2380                 directory.  (Note that this option has no effect on the
2381                 paths for files containing non-DNSSEC keys such as
2382                 <code class="filename">bind.keys</code>,
2383                 <code class="filename">rndc.key</code> or
2384                 <code class="filename">session.key</code>.)
2385               </p></dd>
2386 <dt><span class="term"><span><strong class="command">managed-keys-directory</strong></span></span></dt>
2387 <dd><p>
2388                 The directory used to hold the files used to track managed keys.
2389                 By default it is the working directory.  It there are no
2390                 views then the file <code class="filename">managed-keys.bind</code>
2391                 otherwise a SHA256 hash of the view name is used with
2392                 <code class="filename">.mkeys</code> extension added.
2393               </p></dd>
2394 <dt><span class="term"><span><strong class="command">named-xfer</strong></span></span></dt>
2395 <dd><p>
2396                 <span class="emphasis"><em>This option is obsolete.</em></span> It
2397                 was used in <acronym class="acronym">BIND</acronym> 8 to specify
2398                 the pathname to the <span><strong class="command">named-xfer</strong></span>
2399                 program.  In <acronym class="acronym">BIND</acronym> 9, no separate
2400                 <span><strong class="command">named-xfer</strong></span> program is needed;
2401                 its functionality is built into the name server.
2402               </p></dd>
2403 <dt><span class="term"><span><strong class="command">tkey-gssapi-credential</strong></span></span></dt>
2404 <dd><p>
2405                 The security credential with which the server should
2406                 authenticate keys requested by the GSS-TSIG protocol.
2407                 Currently only Kerberos 5 authentication is available
2408                 and the credential is a Kerberos principal which
2409                 the server can acquire through the default system
2410                 key file, normally <code class="filename">/etc/krb5.keytab</code>.
2411                 Normally this principal is of the form
2412                 "<strong class="userinput"><code>DNS/</code></strong><code class="varname">server.domain</code>".
2413                 To use GSS-TSIG, <span><strong class="command">tkey-domain</strong></span>
2414                 must also be set.
2415               </p></dd>
2416 <dt><span class="term"><span><strong class="command">tkey-domain</strong></span></span></dt>
2417 <dd><p>
2418                 The domain appended to the names of all shared keys
2419                 generated with <span><strong class="command">TKEY</strong></span>.  When a
2420                 client requests a <span><strong class="command">TKEY</strong></span> exchange,
2421                 it may or may not specify the desired name for the
2422                 key. If present, the name of the shared key will
2423                 be <code class="varname">client specified part</code> +
2424                 <code class="varname">tkey-domain</code>.  Otherwise, the
2425                 name of the shared key will be <code class="varname">random hex
2426                 digits</code> + <code class="varname">tkey-domain</code>.
2427                 In most cases, the <span><strong class="command">domainname</strong></span>
2428                 should be the server's domain name, or an otherwise
2429                 non-existent subdomain like
2430                 "_tkey.<code class="varname">domainname</code>".  If you are
2431                 using GSS-TSIG, this variable must be defined.
2432               </p></dd>
2433 <dt><span class="term"><span><strong class="command">tkey-dhkey</strong></span></span></dt>
2434 <dd><p>
2435                 The Diffie-Hellman key used by the server
2436                 to generate shared keys with clients using the Diffie-Hellman
2437                 mode
2438                 of <span><strong class="command">TKEY</strong></span>. The server must be
2439                 able to load the
2440                 public and private keys from files in the working directory.
2441                 In
2442                 most cases, the keyname should be the server's host name.
2443               </p></dd>
2444 <dt><span class="term"><span><strong class="command">cache-file</strong></span></span></dt>
2445 <dd><p>
2446                 This is for testing only.  Do not use.
2447               </p></dd>
2448 <dt><span class="term"><span><strong class="command">dump-file</strong></span></span></dt>
2449 <dd><p>
2450                 The pathname of the file the server dumps
2451                 the database to when instructed to do so with
2452                 <span><strong class="command">rndc dumpdb</strong></span>.
2453                 If not specified, the default is <code class="filename">named_dump.db</code>.
2454               </p></dd>
2455 <dt><span class="term"><span><strong class="command">memstatistics-file</strong></span></span></dt>
2456 <dd><p>
2457                 The pathname of the file the server writes memory
2458                 usage statistics to on exit. If not specified,
2459                 the default is <code class="filename">named.memstats</code>.
2460               </p></dd>
2461 <dt><span class="term"><span><strong class="command">pid-file</strong></span></span></dt>
2462 <dd><p>
2463                 The pathname of the file the server writes its process ID
2464                 in. If not specified, the default is
2465                 <code class="filename">/var/run/named/named.pid</code>.
2466                 The PID file is used by programs that want to send signals to
2467                 the running
2468                 name server. Specifying <span><strong class="command">pid-file none</strong></span> disables the
2469                 use of a PID file &#8212; no file will be written and any
2470                 existing one will be removed.  Note that <span><strong class="command">none</strong></span>
2471                 is a keyword, not a filename, and therefore is not enclosed
2472                 in
2473                 double quotes.
2474               </p></dd>
2475 <dt><span class="term"><span><strong class="command">recursing-file</strong></span></span></dt>
2476 <dd><p>
2477                 The pathname of the file the server dumps
2478                 the queries that are currently recursing when instructed
2479                 to do so with <span><strong class="command">rndc recursing</strong></span>.
2480                 If not specified, the default is <code class="filename">named.recursing</code>.
2481               </p></dd>
2482 <dt><span class="term"><span><strong class="command">statistics-file</strong></span></span></dt>
2483 <dd><p>
2484                 The pathname of the file the server appends statistics
2485                 to when instructed to do so using <span><strong class="command">rndc stats</strong></span>.
2486                 If not specified, the default is <code class="filename">named.stats</code> in the
2487                 server's current directory.  The format of the file is
2488                 described
2489                 in <a href="Bv9ARM.ch06.html#statsfile" title="The Statistics File">the section called &#8220;The Statistics File&#8221;</a>.
2490               </p></dd>
2491 <dt><span class="term"><span><strong class="command">bindkeys-file</strong></span></span></dt>
2492 <dd><p>
2493                 The pathname of a file to override the built-in trusted
2494                 keys provided by <span><strong class="command">named</strong></span>.
2495                 See the discussion of <span><strong class="command">dnssec-lookaside</strong></span>
2496                 for details.  If not specified, the default is
2497                 <code class="filename">/etc/bind.keys</code>.
2498               </p></dd>
2499 <dt><span class="term"><span><strong class="command">secroots-file</strong></span></span></dt>
2500 <dd><p>
2501                 The pathname of the file the server dumps
2502                 security roots to when instructed to do so with
2503                 <span><strong class="command">rndc secroots</strong></span>.
2504                 If not specified, the default is <code class="filename">named.secroots</code>.
2505               </p></dd>
2506 <dt><span class="term"><span><strong class="command">session-keyfile</strong></span></span></dt>
2507 <dd><p>
2508                 The pathname of the file into which to write a TSIG
2509                 session key generated by <span><strong class="command">named</strong></span> for use by
2510                 <span><strong class="command">nsupdate -l</strong></span>.  If not specified, the
2511                 default is <code class="filename">/var/run/named/session.key</code>.
2512                 (See <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called &#8220;Dynamic Update Policies&#8221;</a>, and in
2513                 particular the discussion of the
2514                 <span><strong class="command">update-policy</strong></span> statement's
2515                 <strong class="userinput"><code>local</code></strong> option for more
2516                 information about this feature.)
2517               </p></dd>
2518 <dt><span class="term"><span><strong class="command">session-keyname</strong></span></span></dt>
2519 <dd><p>
2520                 The key name to use for the TSIG session key.
2521                 If not specified, the default is "local-ddns".
2522               </p></dd>
2523 <dt><span class="term"><span><strong class="command">session-keyalg</strong></span></span></dt>
2524 <dd><p>
2525                 The algorithm to use for the TSIG session key.
2526                 Valid values are hmac-sha1, hmac-sha224, hmac-sha256,
2527                 hmac-sha384, hmac-sha512 and hmac-md5.  If not
2528                 specified, the default is hmac-sha256.
2529               </p></dd>
2530 <dt><span class="term"><span><strong class="command">session-keyfile</strong></span></span></dt>
2531 <dd><p>
2532                 The pathname of the file into which to write a session TSIG
2533                 key for use by <span><strong class="command">nsupdate -l</strong></span>.  (See the
2534                 discussion of the <span><strong class="command">update-policy</strong></span>
2535                 statement's <strong class="userinput"><code>local</code></strong> option for more
2536                 details on this feature.)
2537               </p></dd>
2538 <dt><span class="term"><span><strong class="command">port</strong></span></span></dt>
2539 <dd><p>
2540                 The UDP/TCP port number the server uses for
2541                 receiving and sending DNS protocol traffic.
2542                 The default is 53.  This option is mainly intended for server
2543                 testing;
2544                 a server using a port other than 53 will not be able to
2545                 communicate with
2546                 the global DNS.
2547               </p></dd>
2548 <dt><span class="term"><span><strong class="command">random-device</strong></span></span></dt>
2549 <dd><p>
2550                 The source of entropy to be used by the server.  Entropy is
2551                 primarily needed
2552                 for DNSSEC operations, such as TKEY transactions and dynamic
2553                 update of signed
2554                 zones.  This options specifies the device (or file) from which
2555                 to read
2556                 entropy.  If this is a file, operations requiring entropy will
2557                 fail when the
2558                 file has been exhausted.  If not specified, the default value
2559                 is
2560                 <code class="filename">/dev/random</code>
2561                 (or equivalent) when present, and none otherwise.  The
2562                 <span><strong class="command">random-device</strong></span> option takes
2563                 effect during
2564                 the initial configuration load at server startup time and
2565                 is ignored on subsequent reloads.
2566               </p></dd>
2567 <dt><span class="term"><span><strong class="command">preferred-glue</strong></span></span></dt>
2568 <dd><p>
2569                 If specified, the listed type (A or AAAA) will be emitted
2570                 before other glue
2571                 in the additional section of a query response.
2572                 The default is not to prefer any type (NONE).
2573               </p></dd>
2574 <dt>
2575 <a name="root_delegation_only"></a><span class="term"><span><strong class="command">root-delegation-only</strong></span></span>
2576 </dt>
2577 <dd>
2578 <p>
2579                 Turn on enforcement of delegation-only in TLDs
2580                 (top level domains) and root zones with an optional
2581                 exclude list.
2582               </p>
2583 <p>
2584                 DS queries are expected to be made to and be answered by
2585                 delegation only zones.  Such queries and responses are
2586                 treated as an exception to delegation-only processing
2587                 and are not converted to NXDOMAIN responses provided
2588                 a CNAME is not discovered at the query name.
2589               </p>
2590 <p>
2591                 If a delegation only zone server also serves a child
2592                 zone it is not always possible to determine whether
2593                 an answer comes from the delegation only zone or the
2594                 child zone.  SOA NS and DNSKEY records are apex
2595                 only records and a matching response that contains
2596                 these records or DS is treated as coming from a
2597                 child zone.  RRSIG records are also examined to see
2598                 if they are signed by a child zone or not.  The
2599                 authority section is also examined to see if there
2600                 is evidence that the answer is from the child zone.
2601                 Answers that are determined to be from a child zone
2602                 are not converted to NXDOMAIN responses.  Despite
2603                 all these checks there is still a possibility of
2604                 false negatives when a child zone is being served.
2605               </p>
2606 <p>
2607                 Similarly false positives can arise from empty nodes
2608                 (no records at the name) in the delegation only zone
2609                 when the query type is not ANY.
2610               </p>
2611 <p>
2612                 Note some TLDs are not delegation only (e.g. "DE", "LV",
2613                 "US" and "MUSEUM").  This list is not exhaustive.
2614               </p>
2615 <pre class="programlisting">
2616 options {
2617         root-delegation-only exclude { "de"; "lv"; "us"; "museum"; };
2618 };
2619 </pre>
2620 </dd>
2621 <dt><span class="term"><span><strong class="command">disable-algorithms</strong></span></span></dt>
2622 <dd><p>
2623                 Disable the specified DNSSEC algorithms at and below the
2624                 specified name.
2625                 Multiple <span><strong class="command">disable-algorithms</strong></span>
2626                 statements are allowed.
2627                 Only the most specific will be applied.
2628               </p></dd>
2629 <dt><span class="term"><span><strong class="command">dnssec-lookaside</strong></span></span></dt>
2630 <dd>
2631 <p>
2632                 When set, <span><strong class="command">dnssec-lookaside</strong></span> provides the
2633                 validator with an alternate method to validate DNSKEY
2634                 records at the top of a zone.  When a DNSKEY is at or
2635                 below a domain specified by the deepest
2636                 <span><strong class="command">dnssec-lookaside</strong></span>, and the normal DNSSEC
2637                 validation has left the key untrusted, the trust-anchor
2638                 will be appended to the key name and a DLV record will be
2639                 looked up to see if it can validate the key.  If the DLV
2640                 record validates a DNSKEY (similarly to the way a DS
2641                 record does) the DNSKEY RRset is deemed to be trusted.
2642               </p>
2643 <p>
2644                 If <span><strong class="command">dnssec-lookaside</strong></span> is set to
2645                 <strong class="userinput"><code>auto</code></strong>, then built-in default
2646                 values for the DLV domain and trust anchor will be
2647                 used, along with a built-in key for validation.
2648               </p>
2649 <p>
2650                 The default DLV key is stored in the file
2651                 <code class="filename">bind.keys</code>, which
2652                 <span><strong class="command">named</strong></span> loads at startup if
2653                 <span><strong class="command">dnssec-lookaside</strong></span> is set to
2654                 <code class="constant">auto</code>.  A copy of that file is
2655                 installed along with <acronym class="acronym">BIND</acronym> 9, and is
2656                 current as of the release date.  If the DLV key expires, a
2657                 new copy of <code class="filename">bind.keys</code> can be downloaded
2658                 from <a href="" target="_top">https://www.isc.org/solutions/dlv</a>.
2659               </p>
2660 <p>
2661                 (To prevent problems if <code class="filename">bind.keys</code> is
2662                 not found, the current key is also compiled in to
2663                 <span><strong class="command">named</strong></span>.  Relying on this is not
2664                 recommended, however, as it requires <span><strong class="command">named</strong></span>
2665                 to be recompiled with a new key when the DLV key expires.)
2666               </p>
2667 <p>
2668                 NOTE: Using <code class="filename">bind.keys</code> to store
2669                 locally-configured keys is possible, but not
2670                 recommended, as the file will be overwritten whenever
2671                 <acronym class="acronym">BIND</acronym> 9 is re-installed or upgraded.
2672               </p>
2673 </dd>
2674 <dt><span class="term"><span><strong class="command">dnssec-must-be-secure</strong></span></span></dt>
2675 <dd><p>
2676                 Specify hierarchies which must be or may not be secure
2677                 (signed and validated).  If <strong class="userinput"><code>yes</code></strong>,
2678                 then <span><strong class="command">named</strong></span> will only accept answers if
2679                 they are secure.  If <strong class="userinput"><code>no</code></strong>, then normal
2680                 DNSSEC validation applies allowing for insecure answers to
2681                 be accepted.  The specified domain must be under a
2682                 <span><strong class="command">trusted-keys</strong></span> or
2683                 <span><strong class="command">managed-keys</strong></span> statement, or
2684                 <span><strong class="command">dnssec-lookaside</strong></span> must be active.
2685               </p></dd>
2686 <dt><span class="term"><span><strong class="command">dns64</strong></span></span></dt>
2687 <dd>
2688 <p>
2689                 This directive instructs <span><strong class="command">named</strong></span> to
2690                 return mapped IPv4 addresses to AAAA queries when
2691                 there are no AAAA records.  It is intended to be
2692                 used in conjunction with a NAT64.  Each
2693                 <span><strong class="command">dns64</strong></span> defines one DNS64 prefix.
2694                 Multiple DNS64 prefixes can be defined.
2695               </p>
2696 <p>
2697                 Compatible IPv6 prefixes have lengths of 32, 40, 48, 56,
2698                 64 and 96 as per RFC 6052.
2699               </p>
2700 <p>
2701                 Each <span><strong class="command">dns64</strong></span> supports a optional
2702                 <span><strong class="command">clients</strong></span> acl which defines which clients
2703                 see this directive.  If not defined it defaults to
2704                 <strong class="userinput"><code>any;</code></strong>.
2705               </p>
2706 <p>
2707                 Each <span><strong class="command">dns64</strong></span> supports a optional
2708                 <span><strong class="command">mapped</strong></span> acl which selects which
2709                 IPv4 addresses are to be mapped are in the corresponding        
2710                 A RRset.  If not defined it defaults to
2711                 <strong class="userinput"><code>any;</code></strong>.
2712               </p>
2713 <p>
2714                 Each <span><strong class="command">dns64</strong></span> supports a optional
2715                 <span><strong class="command">exclude</strong></span> acl which selects which
2716                 IPv6 addresses will be ignored for the purposes
2717                 of determining if dns64 is to be applied.  Any
2718                 non matching address will prevent any further
2719                 DNS64 processing from occuring for this client.
2720               </p>
2721 <p>
2722                 A optional <span><strong class="command">suffix</strong></span> can also
2723                 be defined to set the bits trailing the mapped
2724                 IPv4 address bits.  By default these bits are
2725                 set to <strong class="userinput"><code>::</code></strong>.  The bits
2726                 matching the prefix and mapped IPv4 address
2727                 must be zero.
2728               </p>
2729 <pre class="programlisting">
2730         acl rfc1918 { 10/8; 192.168/16; 172.16/12; };
2731
2732         dns64 64:FF9B::/96 {
2733                 clients { any; };
2734                 mapped { !rfc1918; any; };
2735                 exclude { 64:FF9B::/96; ::ffff:0000:0000/96; };
2736                 suffix ::;
2737         };
2738 </pre>
2739 </dd>
2740 </dl></div>
2741 <div class="sect3" lang="en">
2742 <div class="titlepage"><div><div><h4 class="title">
2743 <a name="boolean_options"></a>Boolean Options</h4></div></div></div>
2744 <div class="variablelist"><dl>
2745 <dt><span class="term"><span><strong class="command">allow-new-zones</strong></span></span></dt>
2746 <dd><p>
2747                   If <strong class="userinput"><code>yes</code></strong>, then zones can be
2748                   added at runtime via <span><strong class="command">rndc addzone</strong></span>
2749                   or deleted via <span><strong class="command">rndc delzone</strong></span>.
2750                   The default is <strong class="userinput"><code>no</code></strong>.
2751                 </p></dd>
2752 <dt><span class="term"><span><strong class="command">auth-nxdomain</strong></span></span></dt>
2753 <dd><p>
2754                   If <strong class="userinput"><code>yes</code></strong>, then the <span><strong class="command">AA</strong></span> bit
2755                   is always set on NXDOMAIN responses, even if the server is
2756                   not actually
2757                   authoritative. The default is <strong class="userinput"><code>no</code></strong>;
2758                   this is
2759                   a change from <acronym class="acronym">BIND</acronym> 8. If you
2760                   are using very old DNS software, you
2761                   may need to set it to <strong class="userinput"><code>yes</code></strong>.
2762                 </p></dd>
2763 <dt><span class="term"><span><strong class="command">deallocate-on-exit</strong></span></span></dt>
2764 <dd><p>
2765                   This option was used in <acronym class="acronym">BIND</acronym>
2766                   8 to enable checking
2767                   for memory leaks on exit. <acronym class="acronym">BIND</acronym> 9 ignores the option and always performs
2768                   the checks.
2769                 </p></dd>
2770 <dt><span class="term"><span><strong class="command">memstatistics</strong></span></span></dt>
2771 <dd><p>
2772                   Write memory statistics to the file specified by
2773                   <span><strong class="command">memstatistics-file</strong></span> at exit.
2774                   The default is <strong class="userinput"><code>no</code></strong> unless
2775                   '-m record' is specified on the command line in
2776                   which case it is <strong class="userinput"><code>yes</code></strong>.
2777                 </p></dd>
2778 <dt><span class="term"><span><strong class="command">dialup</strong></span></span></dt>
2779 <dd>
2780 <p>
2781                   If <strong class="userinput"><code>yes</code></strong>, then the
2782                   server treats all zones as if they are doing zone transfers
2783                   across
2784                   a dial-on-demand dialup link, which can be brought up by
2785                   traffic
2786                   originating from this server. This has different effects
2787                   according
2788                   to zone type and concentrates the zone maintenance so that
2789                   it all
2790                   happens in a short interval, once every <span><strong class="command">heartbeat-interval</strong></span> and
2791                   hopefully during the one call. It also suppresses some of
2792                   the normal
2793                   zone maintenance traffic. The default is <strong class="userinput"><code>no</code></strong>.
2794                 </p>
2795 <p>
2796                   The <span><strong class="command">dialup</strong></span> option
2797                   may also be specified in the <span><strong class="command">view</strong></span> and
2798                   <span><strong class="command">zone</strong></span> statements,
2799                   in which case it overrides the global <span><strong class="command">dialup</strong></span>
2800                   option.
2801                 </p>
2802 <p>
2803                   If the zone is a master zone, then the server will send out a
2804                   NOTIFY
2805                   request to all the slaves (default). This should trigger the
2806                   zone serial
2807                   number check in the slave (providing it supports NOTIFY)
2808                   allowing the slave
2809                   to verify the zone while the connection is active.
2810                   The set of servers to which NOTIFY is sent can be controlled
2811                   by
2812                   <span><strong class="command">notify</strong></span> and <span><strong class="command">also-notify</strong></span>.
2813                 </p>
2814 <p>
2815                   If the
2816                   zone is a slave or stub zone, then the server will suppress
2817                   the regular
2818                   "zone up to date" (refresh) queries and only perform them
2819                   when the
2820                   <span><strong class="command">heartbeat-interval</strong></span> expires in
2821                   addition to sending
2822                   NOTIFY requests.
2823                 </p>
2824 <p>
2825                   Finer control can be achieved by using
2826                   <strong class="userinput"><code>notify</code></strong> which only sends NOTIFY
2827                   messages,
2828                   <strong class="userinput"><code>notify-passive</code></strong> which sends NOTIFY
2829                   messages and
2830                   suppresses the normal refresh queries, <strong class="userinput"><code>refresh</code></strong>
2831                   which suppresses normal refresh processing and sends refresh
2832                   queries
2833                   when the <span><strong class="command">heartbeat-interval</strong></span>
2834                   expires, and
2835                   <strong class="userinput"><code>passive</code></strong> which just disables normal
2836                   refresh
2837                   processing.
2838                 </p>
2839 <div class="informaltable"><table border="1">
2840 <colgroup>
2841 <col>
2842 <col>
2843 <col>
2844 <col>
2845 </colgroup>
2846 <tbody>
2847 <tr>
2848 <td>
2849                           <p>
2850                             dialup mode
2851                           </p>
2852                         </td>
2853 <td>
2854                           <p>
2855                             normal refresh
2856                           </p>
2857                         </td>
2858 <td>
2859                           <p>
2860                             heart-beat refresh
2861                           </p>
2862                         </td>
2863 <td>
2864                           <p>
2865                             heart-beat notify
2866                           </p>
2867                         </td>
2868 </tr>
2869 <tr>
2870 <td>
2871                           <p><span><strong class="command">no</strong></span> (default)</p>
2872                         </td>
2873 <td>
2874                           <p>
2875                             yes
2876                           </p>
2877                         </td>
2878 <td>
2879                           <p>
2880                             no
2881                           </p>
2882                         </td>
2883 <td>
2884                           <p>
2885                             no
2886                           </p>
2887                         </td>
2888 </tr>
2889 <tr>
2890 <td>
2891                           <p><span><strong class="command">yes</strong></span></p>
2892                         </td>
2893 <td>
2894                           <p>
2895                             no
2896                           </p>
2897                         </td>
2898 <td>
2899                           <p>
2900                             yes
2901                           </p>
2902                         </td>
2903 <td>
2904                           <p>
2905                             yes
2906                           </p>
2907                         </td>
2908 </tr>
2909 <tr>
2910 <td>
2911                           <p><span><strong class="command">notify</strong></span></p>
2912                         </td>
2913 <td>
2914                           <p>
2915                             yes
2916                           </p>
2917                         </td>
2918 <td>
2919                           <p>
2920                             no
2921                           </p>
2922                         </td>
2923 <td>
2924                           <p>
2925                             yes
2926                           </p>
2927                         </td>
2928 </tr>
2929 <tr>
2930 <td>
2931                           <p><span><strong class="command">refresh</strong></span></p>
2932                         </td>
2933 <td>
2934                           <p>
2935                             no
2936                           </p>
2937                         </td>
2938 <td>
2939                           <p>
2940                             yes
2941                           </p>
2942                         </td>
2943 <td>
2944                           <p>
2945                             no
2946                           </p>
2947                         </td>
2948 </tr>
2949 <tr>
2950 <td>
2951                           <p><span><strong class="command">passive</strong></span></p>
2952                         </td>
2953 <td>
2954                           <p>
2955                             no
2956                           </p>
2957                         </td>
2958 <td>
2959                           <p>
2960                             no
2961                           </p>
2962                         </td>
2963 <td>
2964                           <p>
2965                             no
2966                           </p>
2967                         </td>
2968 </tr>
2969 <tr>
2970 <td>
2971                           <p><span><strong class="command">notify-passive</strong></span></p>
2972                         </td>
2973 <td>
2974                           <p>
2975                             no
2976                           </p>
2977                         </td>
2978 <td>
2979                           <p>
2980                             no
2981                           </p>
2982                         </td>
2983 <td>
2984                           <p>
2985                             yes
2986                           </p>
2987                         </td>
2988 </tr>
2989 </tbody>
2990 </table></div>
2991 <p>
2992                   Note that normal NOTIFY processing is not affected by
2993                   <span><strong class="command">dialup</strong></span>.
2994                 </p>
2995 </dd>
2996 <dt><span class="term"><span><strong class="command">fake-iquery</strong></span></span></dt>
2997 <dd><p>
2998                   In <acronym class="acronym">BIND</acronym> 8, this option
2999                   enabled simulating the obsolete DNS query type
3000                   IQUERY. <acronym class="acronym">BIND</acronym> 9 never does
3001                   IQUERY simulation.
3002                 </p></dd>
3003 <dt><span class="term"><span><strong class="command">fetch-glue</strong></span></span></dt>
3004 <dd><p>
3005                   This option is obsolete.
3006                   In BIND 8, <strong class="userinput"><code>fetch-glue yes</code></strong>
3007                   caused the server to attempt to fetch glue resource records
3008                   it
3009                   didn't have when constructing the additional
3010                   data section of a response.  This is now considered a bad
3011                   idea
3012                   and BIND 9 never does it.
3013                 </p></dd>
3014 <dt><span class="term"><span><strong class="command">flush-zones-on-shutdown</strong></span></span></dt>
3015 <dd><p>
3016                   When the nameserver exits due receiving SIGTERM,
3017                   flush or do not flush any pending zone writes.  The default
3018                   is
3019                   <span><strong class="command">flush-zones-on-shutdown</strong></span> <strong class="userinput"><code>no</code></strong>.
3020                 </p></dd>
3021 <dt><span class="term"><span><strong class="command">has-old-clients</strong></span></span></dt>
3022 <dd><p>
3023                   This option was incorrectly implemented
3024                   in <acronym class="acronym">BIND</acronym> 8, and is ignored by <acronym class="acronym">BIND</acronym> 9.
3025                   To achieve the intended effect
3026                   of
3027                   <span><strong class="command">has-old-clients</strong></span> <strong class="userinput"><code>yes</code></strong>, specify
3028                   the two separate options <span><strong class="command">auth-nxdomain</strong></span> <strong class="userinput"><code>yes</code></strong>
3029                   and <span><strong class="command">rfc2308-type1</strong></span> <strong class="userinput"><code>no</code></strong> instead.
3030                 </p></dd>
3031 <dt><span class="term"><span><strong class="command">host-statistics</strong></span></span></dt>
3032 <dd><p>
3033                   In BIND 8, this enables keeping of
3034                   statistics for every host that the name server interacts
3035                   with.
3036                   Not implemented in BIND 9.
3037                 </p></dd>
3038 <dt><span class="term"><span><strong class="command">maintain-ixfr-base</strong></span></span></dt>
3039 <dd><p>
3040                   <span class="emphasis"><em>This option is obsolete</em></span>.
3041                   It was used in <acronym class="acronym">BIND</acronym> 8 to
3042                   determine whether a transaction log was
3043                   kept for Incremental Zone Transfer. <acronym class="acronym">BIND</acronym> 9 maintains a transaction
3044                   log whenever possible.  If you need to disable outgoing
3045                   incremental zone
3046                   transfers, use <span><strong class="command">provide-ixfr</strong></span> <strong class="userinput"><code>no</code></strong>.
3047                 </p></dd>
3048 <dt><span class="term"><span><strong class="command">minimal-responses</strong></span></span></dt>
3049 <dd><p>
3050                   If <strong class="userinput"><code>yes</code></strong>, then when generating
3051                   responses the server will only add records to the authority
3052                   and additional data sections when they are required (e.g.
3053                   delegations, negative responses).  This may improve the
3054                   performance of the server.
3055                   The default is <strong class="userinput"><code>no</code></strong>.
3056                 </p></dd>
3057 <dt><span class="term"><span><strong class="command">multiple-cnames</strong></span></span></dt>
3058 <dd><p>
3059                   This option was used in <acronym class="acronym">BIND</acronym> 8 to allow
3060                   a domain name to have multiple CNAME records in violation of
3061                   the DNS standards.  <acronym class="acronym">BIND</acronym> 9.2 onwards
3062                   always strictly enforces the CNAME rules both in master
3063                   files and dynamic updates.
3064                 </p></dd>
3065 <dt><span class="term"><span><strong class="command">notify</strong></span></span></dt>
3066 <dd>
3067 <p>
3068                   If <strong class="userinput"><code>yes</code></strong> (the default),
3069                   DNS NOTIFY messages are sent when a zone the server is
3070                   authoritative for
3071                   changes, see <a href="Bv9ARM.ch04.html#notify" title="Notify">the section called &#8220;Notify&#8221;</a>.  The messages are
3072                   sent to the
3073                   servers listed in the zone's NS records (except the master
3074                   server identified
3075                   in the SOA MNAME field), and to any servers listed in the
3076                   <span><strong class="command">also-notify</strong></span> option.
3077                 </p>
3078 <p>
3079                   If <strong class="userinput"><code>master-only</code></strong>, notifies are only
3080                   sent
3081                   for master zones.
3082                   If <strong class="userinput"><code>explicit</code></strong>, notifies are sent only
3083                   to
3084                   servers explicitly listed using <span><strong class="command">also-notify</strong></span>.
3085                   If <strong class="userinput"><code>no</code></strong>, no notifies are sent.
3086                 </p>
3087 <p>
3088                   The <span><strong class="command">notify</strong></span> option may also be
3089                   specified in the <span><strong class="command">zone</strong></span>
3090                   statement,
3091                   in which case it overrides the <span><strong class="command">options notify</strong></span> statement.
3092                   It would only be necessary to turn off this option if it
3093                   caused slaves
3094                   to crash.
3095                 </p>
3096 </dd>
3097 <dt><span class="term"><span><strong class="command">notify-to-soa</strong></span></span></dt>
3098 <dd><p>
3099                   If <strong class="userinput"><code>yes</code></strong> do not check the nameservers
3100                   in the NS RRset against the SOA MNAME.  Normally a NOTIFY
3101                   message is not sent to the SOA MNAME (SOA ORIGIN) as it is
3102                   supposed to contain the name of the ultimate master.
3103                   Sometimes, however, a slave is listed as the SOA MNAME in
3104                   hidden master configurations and in that case you would
3105                   want the ultimate master to still send NOTIFY messages to
3106                   all the nameservers listed in the NS RRset.
3107                 </p></dd>
3108 <dt><span class="term"><span><strong class="command">recursion</strong></span></span></dt>
3109 <dd><p>
3110                   If <strong class="userinput"><code>yes</code></strong>, and a
3111                   DNS query requests recursion, then the server will attempt
3112                   to do
3113                   all the work required to answer the query. If recursion is
3114                   off
3115                   and the server does not already know the answer, it will
3116                   return a
3117                   referral response. The default is
3118                   <strong class="userinput"><code>yes</code></strong>.
3119                   Note that setting <span><strong class="command">recursion no</strong></span> does not prevent
3120                   clients from getting data from the server's cache; it only
3121                   prevents new data from being cached as an effect of client
3122                   queries.
3123                   Caching may still occur as an effect the server's internal
3124                   operation, such as NOTIFY address lookups.
3125                   See also <span><strong class="command">fetch-glue</strong></span> above.
3126                 </p></dd>
3127 <dt><span class="term"><span><strong class="command">rfc2308-type1</strong></span></span></dt>
3128 <dd>
3129 <p>
3130                   Setting this to <strong class="userinput"><code>yes</code></strong> will
3131                   cause the server to send NS records along with the SOA
3132                   record for negative
3133                   answers. The default is <strong class="userinput"><code>no</code></strong>.
3134                 </p>
3135 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3136 <h3 class="title">Note</h3>
3137 <p>
3138                     Not yet implemented in <acronym class="acronym">BIND</acronym>
3139                     9.
3140                   </p>
3141 </div>
3142 </dd>
3143 <dt><span class="term"><span><strong class="command">use-id-pool</strong></span></span></dt>
3144 <dd><p>
3145                   <span class="emphasis"><em>This option is obsolete</em></span>.
3146                   <acronym class="acronym">BIND</acronym> 9 always allocates query
3147                   IDs from a pool.
3148                 </p></dd>
3149 <dt><span class="term"><span><strong class="command">zone-statistics</strong></span></span></dt>
3150 <dd><p>
3151                   If <strong class="userinput"><code>yes</code></strong>, the server will collect
3152                   statistical data on all zones (unless specifically turned
3153                   off
3154                   on a per-zone basis by specifying <span><strong class="command">zone-statistics no</strong></span>
3155                   in the <span><strong class="command">zone</strong></span> statement).
3156                   The default is <strong class="userinput"><code>no</code></strong>.
3157                   These statistics may be accessed
3158                   using <span><strong class="command">rndc stats</strong></span>, which will
3159                   dump them to the file listed
3160                   in the <span><strong class="command">statistics-file</strong></span>.  See
3161                   also <a href="Bv9ARM.ch06.html#statsfile" title="The Statistics File">the section called &#8220;The Statistics File&#8221;</a>.
3162                 </p></dd>
3163 <dt><span class="term"><span><strong class="command">use-ixfr</strong></span></span></dt>
3164 <dd><p>
3165                   <span class="emphasis"><em>This option is obsolete</em></span>.
3166                   If you need to disable IXFR to a particular server or
3167                   servers, see
3168                   the information on the <span><strong class="command">provide-ixfr</strong></span> option
3169                   in <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
3170             Usage">the section called &#8220;<span><strong class="command">server</strong></span> Statement Definition and
3171             Usage&#8221;</a>.
3172                   See also
3173                   <a href="Bv9ARM.ch04.html#incremental_zone_transfers" title="Incremental Zone Transfers (IXFR)">the section called &#8220;Incremental Zone Transfers (IXFR)&#8221;</a>.
3174                 </p></dd>
3175 <dt><span class="term"><span><strong class="command">provide-ixfr</strong></span></span></dt>
3176 <dd><p>
3177                   See the description of
3178                   <span><strong class="command">provide-ixfr</strong></span> in
3179                   <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
3180             Usage">the section called &#8220;<span><strong class="command">server</strong></span> Statement Definition and
3181             Usage&#8221;</a>.
3182                 </p></dd>
3183 <dt><span class="term"><span><strong class="command">request-ixfr</strong></span></span></dt>
3184 <dd><p>
3185                   See the description of
3186                   <span><strong class="command">request-ixfr</strong></span> in
3187                   <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
3188             Usage">the section called &#8220;<span><strong class="command">server</strong></span> Statement Definition and
3189             Usage&#8221;</a>.
3190                 </p></dd>
3191 <dt><span class="term"><span><strong class="command">treat-cr-as-space</strong></span></span></dt>
3192 <dd><p>
3193                   This option was used in <acronym class="acronym">BIND</acronym>
3194                   8 to make
3195                   the server treat carriage return ("<span><strong class="command">\r</strong></span>") characters the same way
3196                   as a space or tab character,
3197                   to facilitate loading of zone files on a UNIX system that
3198                   were generated
3199                   on an NT or DOS machine. In <acronym class="acronym">BIND</acronym> 9, both UNIX "<span><strong class="command">\n</strong></span>"
3200                   and NT/DOS "<span><strong class="command">\r\n</strong></span>" newlines
3201                   are always accepted,
3202                   and the option is ignored.
3203                 </p></dd>
3204 <dt>
3205 <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>
3206 </dt>
3207 <dd>
3208 <p>
3209                   These options control the behavior of an authoritative
3210                   server when
3211                   answering queries which have additional data, or when
3212                   following CNAME
3213                   and DNAME chains.
3214                 </p>
3215 <p>
3216                   When both of these options are set to <strong class="userinput"><code>yes</code></strong>
3217                   (the default) and a
3218                   query is being answered from authoritative data (a zone
3219                   configured into the server), the additional data section of
3220                   the
3221                   reply will be filled in using data from other authoritative
3222                   zones
3223                   and from the cache.  In some situations this is undesirable,
3224                   such
3225                   as when there is concern over the correctness of the cache,
3226                   or
3227                   in servers where slave zones may be added and modified by
3228                   untrusted third parties.  Also, avoiding
3229                   the search for this additional data will speed up server
3230                   operations
3231                   at the possible expense of additional queries to resolve
3232                   what would
3233                   otherwise be provided in the additional section.
3234                 </p>
3235 <p>
3236                   For example, if a query asks for an MX record for host <code class="literal">foo.example.com</code>,
3237                   and the record found is "<code class="literal">MX 10 mail.example.net</code>", normally the address
3238                   records (A and AAAA) for <code class="literal">mail.example.net</code> will be provided as well,
3239                   if known, even though they are not in the example.com zone.
3240                   Setting these options to <span><strong class="command">no</strong></span>
3241                   disables this behavior and makes
3242                   the server only search for additional data in the zone it
3243                   answers from.
3244                 </p>
3245 <p>
3246                   These options are intended for use in authoritative-only
3247                   servers, or in authoritative-only views.  Attempts to set
3248                   them to <span><strong class="command">no</strong></span> without also
3249                   specifying
3250                   <span><strong class="command">recursion no</strong></span> will cause the
3251                   server to
3252                   ignore the options and log a warning message.
3253                 </p>
3254 <p>
3255                   Specifying <span><strong class="command">additional-from-cache no</strong></span> actually
3256                   disables the use of the cache not only for additional data
3257                   lookups
3258                   but also when looking up the answer.  This is usually the
3259                   desired
3260                   behavior in an authoritative-only server where the
3261                   correctness of
3262                   the cached data is an issue.
3263                 </p>
3264 <p>
3265                   When a name server is non-recursively queried for a name
3266                   that is not
3267                   below the apex of any served zone, it normally answers with
3268                   an
3269                   "upwards referral" to the root servers or the servers of
3270                   some other
3271                   known parent of the query name.  Since the data in an
3272                   upwards referral
3273                   comes from the cache, the server will not be able to provide
3274                   upwards
3275                   referrals when <span><strong class="command">additional-from-cache no</strong></span>
3276                   has been specified.  Instead, it will respond to such
3277                   queries
3278                   with REFUSED.  This should not cause any problems since
3279                   upwards referrals are not required for the resolution
3280                   process.
3281                 </p>
3282 </dd>
3283 <dt><span class="term"><span><strong class="command">match-mapped-addresses</strong></span></span></dt>
3284 <dd>
3285 <p>
3286                   If <strong class="userinput"><code>yes</code></strong>, then an
3287                   IPv4-mapped IPv6 address will match any address match
3288                   list entries that match the corresponding IPv4 address.
3289                 </p>
3290 <p>
3291                   This option was introduced to work around a kernel quirk
3292                   in some operating systems that causes IPv4 TCP
3293                   connections, such as zone transfers, to be accepted on an
3294                   IPv6 socket using mapped addresses.  This caused address
3295                   match lists designed for IPv4 to fail to match.  However,
3296                   <span><strong class="command">named</strong></span> now solves this problem
3297                   internally.  The use of this option is discouraged.
3298                 </p>
3299 </dd>
3300 <dt><span class="term"><span><strong class="command">filter-aaaa-on-v4</strong></span></span></dt>
3301 <dd>
3302 <p>
3303                   This option is only available when
3304                   <acronym class="acronym">BIND</acronym> 9 is compiled with the
3305                   <strong class="userinput"><code>--enable-filter-aaaa</code></strong> option on the
3306                   "configure" command line.  It is intended to help the
3307                   transition from IPv4 to IPv6 by not giving IPv6 addresses
3308                   to DNS clients unless they have connections to the IPv6
3309                   Internet.  This is not recommended unless absolutely
3310                   necessary.  The default is <strong class="userinput"><code>no</code></strong>.
3311                   The <span><strong class="command">filter-aaaa-on-v4</strong></span> option
3312                   may also be specified in <span><strong class="command">view</strong></span> statements
3313                   to override the global <span><strong class="command">filter-aaaa-on-v4</strong></span>
3314                   option.
3315                 </p>
3316 <p>
3317                   If <strong class="userinput"><code>yes</code></strong>,
3318                   the DNS client is at an IPv4 address, in <span><strong class="command">filter-aaaa</strong></span>,
3319                   and if the response does not include DNSSEC signatures, 
3320                   then all AAAA records are deleted from the response.
3321                   This filtering applies to all responses and not only
3322                   authoritative responses.
3323                 </p>
3324 <p>
3325                   If <strong class="userinput"><code>break-dnssec</code></strong>,
3326                   then AAAA records are deleted even when dnssec is enabled.
3327                   As suggested by the name, this makes the response not verify,
3328                   because the DNSSEC protocol is designed detect deletions.
3329                 </p>
3330 <p>
3331                   This mechanism can erroneously cause other servers to 
3332                   not give AAAA records to their clients.  
3333                   A recursing server with both IPv6 and IPv4 network connections
3334                   that queries an authoritative server using this mechanism
3335                   via IPv4 will be denied AAAA records even if its client is
3336                   using IPv6.
3337                 </p>
3338 <p>
3339                   This mechanism is applied to authoritative as well as
3340                   non-authoritative records.
3341                   A client using IPv4 that is not allowed recursion can
3342                   erroneously be given AAAA records because the server is not
3343                   allowed to check for A records.
3344                 </p>
3345 <p>
3346                   Some AAAA records are given to IPv4 clients in glue records.
3347                   IPv4 clients that are servers can then erroneously
3348                   answer requests for AAAA records received via IPv4.
3349                 </p>
3350 </dd>
3351 <dt><span class="term"><span><strong class="command">ixfr-from-differences</strong></span></span></dt>
3352 <dd>
3353 <p>
3354                   When <strong class="userinput"><code>yes</code></strong> and the server loads a new version of a master
3355                   zone from its zone file or receives a new version of a slave
3356                   file by a non-incremental zone transfer, it will compare
3357                   the new version to the previous one and calculate a set
3358                   of differences.  The differences are then logged in the
3359                   zone's journal file such that the changes can be transmitted
3360                   to downstream slaves as an incremental zone transfer.
3361                 </p>
3362 <p>
3363                   By allowing incremental zone transfers to be used for
3364                   non-dynamic zones, this option saves bandwidth at the
3365                   expense of increased CPU and memory consumption at the
3366                   master.
3367                   In particular, if the new version of a zone is completely
3368                   different from the previous one, the set of differences
3369                   will be of a size comparable to the combined size of the
3370                   old and new zone version, and the server will need to
3371                   temporarily allocate memory to hold this complete
3372                   difference set.
3373                 </p>
3374 <p><span><strong class="command">ixfr-from-differences</strong></span>
3375                   also accepts <span><strong class="command">master</strong></span> and
3376                   <span><strong class="command">slave</strong></span> at the view and options
3377                   levels which causes
3378                   <span><strong class="command">ixfr-from-differences</strong></span> to be enabled for
3379                   all <span><strong class="command">master</strong></span> or
3380                   <span><strong class="command">slave</strong></span> zones respectively.
3381                   It is off by default.
3382                 </p>
3383 </dd>
3384 <dt><span class="term"><span><strong class="command">multi-master</strong></span></span></dt>
3385 <dd><p>
3386                   This should be set when you have multiple masters for a zone
3387                   and the
3388                   addresses refer to different machines.  If <strong class="userinput"><code>yes</code></strong>, <span><strong class="command">named</strong></span> will
3389                   not log
3390                   when the serial number on the master is less than what <span><strong class="command">named</strong></span>
3391                   currently
3392                   has.  The default is <strong class="userinput"><code>no</code></strong>.
3393                 </p></dd>
3394 <dt><span class="term"><span><strong class="command">dnssec-enable</strong></span></span></dt>
3395 <dd><p>
3396                   Enable DNSSEC support in <span><strong class="command">named</strong></span>.  Unless set to <strong class="userinput"><code>yes</code></strong>,
3397                   <span><strong class="command">named</strong></span> behaves as if it does not support DNSSEC.
3398                   The default is <strong class="userinput"><code>yes</code></strong>.
3399                 </p></dd>
3400 <dt><span class="term"><span><strong class="command">dnssec-validation</strong></span></span></dt>
3401 <dd><p>
3402                   Enable DNSSEC validation in <span><strong class="command">named</strong></span>.
3403                   Note <span><strong class="command">dnssec-enable</strong></span> also needs to be
3404                   set to <strong class="userinput"><code>yes</code></strong> to be effective.
3405                   The default is <strong class="userinput"><code>yes</code></strong>.
3406                 </p></dd>
3407 <dt><span class="term"><span><strong class="command">dnssec-accept-expired</strong></span></span></dt>
3408 <dd><p>
3409                   Accept expired signatures when verifying DNSSEC signatures.
3410                   The default is <strong class="userinput"><code>no</code></strong>.
3411                   Setting this option to <strong class="userinput"><code>yes</code></strong>
3412                   leaves <span><strong class="command">named</strong></span> vulnerable to
3413                   replay attacks.
3414                 </p></dd>
3415 <dt><span class="term"><span><strong class="command">querylog</strong></span></span></dt>
3416 <dd><p>
3417                   Specify whether query logging should be started when <span><strong class="command">named</strong></span>
3418                   starts.
3419                   If <span><strong class="command">querylog</strong></span> is not specified,
3420                   then the query logging
3421                   is determined by the presence of the logging category <span><strong class="command">queries</strong></span>.
3422                 </p></dd>
3423 <dt><span class="term"><span><strong class="command">check-names</strong></span></span></dt>
3424 <dd>
3425 <p>
3426                   This option is used to restrict the character set and syntax
3427                   of
3428                   certain domain names in master files and/or DNS responses
3429                   received
3430                   from the network.  The default varies according to usage
3431                   area.  For
3432                   <span><strong class="command">master</strong></span> zones the default is <span><strong class="command">fail</strong></span>.
3433                   For <span><strong class="command">slave</strong></span> zones the default
3434                   is <span><strong class="command">warn</strong></span>.
3435                   For answers received from the network (<span><strong class="command">response</strong></span>)
3436                   the default is <span><strong class="command">ignore</strong></span>.
3437                 </p>
3438 <p>
3439                   The rules for legal hostnames and mail domains are derived
3440                   from RFC 952 and RFC 821 as modified by RFC 1123.
3441                 </p>
3442 <p><span><strong class="command">check-names</strong></span>
3443                   applies to the owner names of A, AAAA and MX records.
3444                   It also applies to the domain names in the RDATA of NS, SOA,
3445                   MX, and SRV records.
3446                   It also applies to the RDATA of PTR records where the owner
3447                   name indicated that it is a reverse lookup of a hostname
3448                   (the owner name ends in IN-ADDR.ARPA, IP6.ARPA, or IP6.INT).
3449                 </p>
3450 </dd>
3451 <dt><span class="term"><span><strong class="command">check-dup-records</strong></span></span></dt>
3452 <dd><p>
3453                   Check master zones for records that are treated as different
3454                   by DNSSEC but are semantically equal in plain DNS.  The
3455                   default is to <span><strong class="command">warn</strong></span>.  Other possible
3456                   values are <span><strong class="command">fail</strong></span> and
3457                   <span><strong class="command">ignore</strong></span>.
3458                 </p></dd>
3459 <dt><span class="term"><span><strong class="command">check-mx</strong></span></span></dt>
3460 <dd><p>
3461                   Check whether the MX record appears to refer to a IP address.
3462                   The default is to <span><strong class="command">warn</strong></span>.  Other possible
3463                   values are <span><strong class="command">fail</strong></span> and
3464                   <span><strong class="command">ignore</strong></span>.
3465                 </p></dd>
3466 <dt><span class="term"><span><strong class="command">check-mx</strong></span></span></dt>
3467 <dd><p>
3468                   Check whether the MX record appears to refer to a IP address.
3469                   The default is to <span><strong class="command">warn</strong></span>.  Other possible
3470                   values are <span><strong class="command">fail</strong></span> and
3471                   <span><strong class="command">ignore</strong></span>.
3472                 </p></dd>
3473 <dt><span class="term"><span><strong class="command">check-wildcard</strong></span></span></dt>
3474 <dd><p>
3475                   This option is used to check for non-terminal wildcards.
3476                   The use of non-terminal wildcards is almost always as a
3477                   result of a failure
3478                   to understand the wildcard matching algorithm (RFC 1034).
3479                   This option
3480                   affects master zones.  The default (<span><strong class="command">yes</strong></span>) is to check
3481                   for non-terminal wildcards and issue a warning.
3482                 </p></dd>
3483 <dt><span class="term"><span><strong class="command">check-integrity</strong></span></span></dt>
3484 <dd><p>
3485                   Perform post load zone integrity checks on master
3486                   zones.  This checks that MX and SRV records refer
3487                   to address (A or AAAA) records and that glue
3488                   address records exist for delegated zones.  For
3489                   MX and SRV records only in-zone hostnames are
3490                   checked (for out-of-zone hostnames use
3491                   <span><strong class="command">named-checkzone</strong></span>).
3492                   For NS records only names below top of zone are
3493                   checked (for out-of-zone names and glue consistency
3494                   checks use <span><strong class="command">named-checkzone</strong></span>).
3495                   The default is <span><strong class="command">yes</strong></span>.
3496                 </p></dd>
3497 <dt><span class="term"><span><strong class="command">check-mx-cname</strong></span></span></dt>
3498 <dd><p>
3499                   If <span><strong class="command">check-integrity</strong></span> is set then
3500                   fail, warn or ignore MX records that refer
3501                   to CNAMES.  The default is to <span><strong class="command">warn</strong></span>.
3502                 </p></dd>
3503 <dt><span class="term"><span><strong class="command">check-srv-cname</strong></span></span></dt>
3504 <dd><p>
3505                   If <span><strong class="command">check-integrity</strong></span> is set then
3506                   fail, warn or ignore SRV records that refer
3507                   to CNAMES.  The default is to <span><strong class="command">warn</strong></span>.
3508                 </p></dd>
3509 <dt><span class="term"><span><strong class="command">check-sibling</strong></span></span></dt>
3510 <dd><p>
3511                   When performing integrity checks, also check that
3512                   sibling glue exists.  The default is <span><strong class="command">yes</strong></span>.
3513                 </p></dd>
3514 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl</strong></span></span></dt>
3515 <dd><p>
3516                   When returning authoritative negative responses to
3517                   SOA queries set the TTL of the SOA record returned in
3518                   the authority section to zero.
3519                   The default is <span><strong class="command">yes</strong></span>.
3520                 </p></dd>
3521 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl-cache</strong></span></span></dt>
3522 <dd><p>
3523                   When caching a negative response to a SOA query
3524                   set the TTL to zero.
3525                   The default is <span><strong class="command">no</strong></span>.
3526                 </p></dd>
3527 <dt><span class="term"><span><strong class="command">update-check-ksk</strong></span></span></dt>
3528 <dd>
3529 <p>
3530                   When set to the default value of <code class="literal">yes</code>,
3531                   check the KSK bit in each key to determine how the key
3532                   should be used when generating RRSIGs for a secure zone.
3533                 </p>
3534 <p>
3535                   Ordinarily, zone-signing keys (that is, keys without the
3536                   KSK bit set) are used to sign the entire zone, while
3537                   key-signing keys (keys with the KSK bit set) are only
3538                   used to sign the DNSKEY RRset at the zone apex.
3539                   However, if this option is set to <code class="literal">no</code>,
3540                   then the KSK bit is ignored; KSKs are treated as if they
3541                   were ZSKs and are used to sign the entire zone.  This is
3542                   similar to the <span><strong class="command">dnssec-signzone -z</strong></span>
3543                   command line option.
3544                 </p>
3545 <p>
3546                   When this option is set to <code class="literal">yes</code>, there
3547                   must be at least two active keys for every algorithm
3548                   represented in the DNSKEY RRset: at least one KSK and one
3549                   ZSK per algorithm.  If there is any algorithm for which
3550                   this requirement is not met, this option will be ignored
3551                   for that algorithm.
3552                 </p>
3553 </dd>
3554 <dt><span class="term"><span><strong class="command">dnssec-dnskey-kskonly</strong></span></span></dt>
3555 <dd>
3556 <p>
3557                   When this option and <span><strong class="command">update-check-ksk</strong></span>
3558                   are both set to <code class="literal">yes</code>, only key-signing
3559                   keys (that is, keys with the KSK bit set) will be used
3560                   to sign the DNSKEY RRset at the zone apex.  Zone-signing
3561                   keys (keys without the KSK bit set) will be used to sign
3562                   the remainder of the zone, but not the DNSKEY RRset.
3563                   This is similar to the
3564                   <span><strong class="command">dnssec-signzone -x</strong></span> command line option.
3565                 </p>
3566 <p>
3567                   The default is <span><strong class="command">no</strong></span>.  If
3568                   <span><strong class="command">update-check-ksk</strong></span> is set to
3569                   <code class="literal">no</code>, this option is ignored.
3570                 </p>
3571 </dd>
3572 <dt><span class="term"><span><strong class="command">try-tcp-refresh</strong></span></span></dt>
3573 <dd><p>
3574                   Try to refresh the zone using TCP if UDP queries fail.
3575                   For BIND 8 compatibility, the default is
3576                   <span><strong class="command">yes</strong></span>.
3577                 </p></dd>
3578 <dt><span class="term"><span><strong class="command">dnssec-secure-to-insecure</strong></span></span></dt>
3579 <dd>
3580 <p>
3581                   Allow a dynamic zone to transition from secure to
3582                   insecure (i.e., signed to unsigned) by deleting all
3583                   of the DNSKEY records.  The default is <span><strong class="command">no</strong></span>.
3584                   If set to <span><strong class="command">yes</strong></span>, and if the DNSKEY RRset
3585                   at the zone apex is deleted, all RRSIG and NSEC records
3586                   will be removed from the zone as well.
3587                 </p>
3588 <p>
3589                   If the zone uses NSEC3, then it is also necessary to
3590                   delete the NSEC3PARAM RRset from the zone apex; this will
3591                   cause the removal of all corresponding NSEC3 records.
3592                   (It is expected that this requirement will be eliminated
3593                   in a future release.)
3594                 </p>
3595 <p>
3596                   Note that if a zone has been configured with
3597                   <span><strong class="command">auto-dnssec maintain</strong></span> and the
3598                   private keys remain accessible in the key repository,
3599                   then the zone will be automatically signed again the
3600                   next time <span><strong class="command">named</strong></span> is started.
3601                 </p>
3602 </dd>
3603 </dl></div>
3604 </div>
3605 <div class="sect3" lang="en">
3606 <div class="titlepage"><div><div><h4 class="title">
3607 <a name="id2583384"></a>Forwarding</h4></div></div></div>
3608 <p>
3609             The forwarding facility can be used to create a large site-wide
3610             cache on a few servers, reducing traffic over links to external
3611             name servers. It can also be used to allow queries by servers that
3612             do not have direct access to the Internet, but wish to look up
3613             exterior
3614             names anyway. Forwarding occurs only on those queries for which
3615             the server is not authoritative and does not have the answer in
3616             its cache.
3617           </p>
3618 <div class="variablelist"><dl>
3619 <dt><span class="term"><span><strong class="command">forward</strong></span></span></dt>
3620 <dd><p>
3621                   This option is only meaningful if the
3622                   forwarders list is not empty. A value of <code class="varname">first</code>,
3623                   the default, causes the server to query the forwarders
3624                   first &#8212; and
3625                   if that doesn't answer the question, the server will then
3626                   look for
3627                   the answer itself. If <code class="varname">only</code> is
3628                   specified, the
3629                   server will only query the forwarders.
3630                 </p></dd>
3631 <dt><span class="term"><span><strong class="command">forwarders</strong></span></span></dt>
3632 <dd><p>
3633                   Specifies the IP addresses to be used
3634                   for forwarding. The default is the empty list (no
3635                   forwarding).
3636                 </p></dd>
3637 </dl></div>
3638 <p>
3639             Forwarding can also be configured on a per-domain basis, allowing
3640             for the global forwarding options to be overridden in a variety
3641             of ways. You can set particular domains to use different
3642             forwarders,
3643             or have a different <span><strong class="command">forward only/first</strong></span> behavior,
3644             or not forward at all, see <a href="Bv9ARM.ch06.html#zone_statement_grammar" title="zone
3645             Statement Grammar">the section called &#8220;<span><strong class="command">zone</strong></span>
3646             Statement Grammar&#8221;</a>.
3647           </p>
3648 </div>
3649 <div class="sect3" lang="en">
3650 <div class="titlepage"><div><div><h4 class="title">
3651 <a name="id2583443"></a>Dual-stack Servers</h4></div></div></div>
3652 <p>
3653             Dual-stack servers are used as servers of last resort to work
3654             around
3655             problems in reachability due the lack of support for either IPv4
3656             or IPv6
3657             on the host machine.
3658           </p>
3659 <div class="variablelist"><dl>
3660 <dt><span class="term"><span><strong class="command">dual-stack-servers</strong></span></span></dt>
3661 <dd><p>
3662                   Specifies host names or addresses of machines with access to
3663                   both IPv4 and IPv6 transports. If a hostname is used, the
3664                   server must be able
3665                   to resolve the name using only the transport it has.  If the
3666                   machine is dual
3667                   stacked, then the <span><strong class="command">dual-stack-servers</strong></span> have no effect unless
3668                   access to a transport has been disabled on the command line
3669                   (e.g. <span><strong class="command">named -4</strong></span>).
3670                 </p></dd>
3671 </dl></div>
3672 </div>
3673 <div class="sect3" lang="en">
3674 <div class="titlepage"><div><div><h4 class="title">
3675 <a name="access_control"></a>Access Control</h4></div></div></div>
3676 <p>
3677             Access to the server can be restricted based on the IP address
3678             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
3679             details on how to specify IP address lists.
3680           </p>
3681 <div class="variablelist"><dl>
3682 <dt><span class="term"><span><strong class="command">allow-notify</strong></span></span></dt>
3683 <dd><p>
3684                   Specifies which hosts are allowed to
3685                   notify this server, a slave, of zone changes in addition
3686                   to the zone masters.
3687                   <span><strong class="command">allow-notify</strong></span> may also be
3688                   specified in the
3689                   <span><strong class="command">zone</strong></span> statement, in which case
3690                   it overrides the
3691                   <span><strong class="command">options allow-notify</strong></span>
3692                   statement.  It is only meaningful
3693                   for a slave zone.  If not specified, the default is to
3694                   process notify messages
3695                   only from a zone's master.
3696                 </p></dd>
3697 <dt><span class="term"><span><strong class="command">allow-query</strong></span></span></dt>
3698 <dd>
3699 <p>
3700                   Specifies which hosts are allowed to ask ordinary
3701                   DNS questions. <span><strong class="command">allow-query</strong></span> may
3702                   also be specified in the <span><strong class="command">zone</strong></span>
3703                   statement, in which case it overrides the
3704                   <span><strong class="command">options allow-query</strong></span> statement.
3705                   If not specified, the default is to allow queries
3706                   from all hosts.
3707                 </p>
3708 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3709 <h3 class="title">Note</h3>
3710 <p>
3711                     <span><strong class="command">allow-query-cache</strong></span> is now
3712                     used to specify access to the cache.
3713                   </p>
3714 </div>
3715 </dd>
3716 <dt><span class="term"><span><strong class="command">allow-query-on</strong></span></span></dt>
3717 <dd>
3718 <p>
3719                   Specifies which local addresses can accept ordinary
3720                   DNS questions. This makes it possible, for instance,
3721                   to allow queries on internal-facing interfaces but
3722                   disallow them on external-facing ones, without
3723                   necessarily knowing the internal network's addresses.
3724                 </p>
3725 <p>
3726                   <span><strong class="command">allow-query-on</strong></span> may
3727                   also be specified in the <span><strong class="command">zone</strong></span>
3728                   statement, in which case it overrides the
3729                   <span><strong class="command">options allow-query-on</strong></span> statement.
3730                 </p>
3731 <p>
3732                   If not specified, the default is to allow queries
3733                   on all addresses.
3734                 </p>
3735 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3736 <h3 class="title">Note</h3>
3737 <p>
3738                     <span><strong class="command">allow-query-cache</strong></span> is
3739                     used to specify access to the cache.
3740                   </p>
3741 </div>
3742 </dd>
3743 <dt><span class="term"><span><strong class="command">allow-query-cache</strong></span></span></dt>
3744 <dd><p>
3745                   Specifies which hosts are allowed to get answers
3746                   from the cache.  If <span><strong class="command">allow-query-cache</strong></span>
3747                   is not set then <span><strong class="command">allow-recursion</strong></span>
3748                   is used if set, otherwise <span><strong class="command">allow-query</strong></span>
3749                   is used if set unless <span><strong class="command">recursion no;</strong></span> is
3750                   set in which case <span><strong class="command">none;</strong></span> is used,
3751                   otherwise the default (<span><strong class="command">localnets;</strong></span>
3752                   <span><strong class="command">localhost;</strong></span>) is used.
3753                 </p></dd>
3754 <dt><span class="term"><span><strong class="command">allow-query-cache-on</strong></span></span></dt>
3755 <dd><p>
3756                   Specifies which local addresses can give answers
3757                   from the cache.  If not specified, the default is
3758                   to allow cache queries on any address,
3759                   <span><strong class="command">localnets</strong></span> and
3760                   <span><strong class="command">localhost</strong></span>.
3761                 </p></dd>
3762 <dt><span class="term"><span><strong class="command">allow-recursion</strong></span></span></dt>
3763 <dd><p>
3764                   Specifies which hosts are allowed to make recursive
3765                   queries through this server. If
3766                   <span><strong class="command">allow-recursion</strong></span> is not set
3767                   then <span><strong class="command">allow-query-cache</strong></span> is
3768                   used if set, otherwise <span><strong class="command">allow-query</strong></span>
3769                   is used if set, otherwise the default
3770                   (<span><strong class="command">localnets;</strong></span>
3771                   <span><strong class="command">localhost;</strong></span>) is used.
3772                 </p></dd>
3773 <dt><span class="term"><span><strong class="command">allow-recursion-on</strong></span></span></dt>
3774 <dd><p>
3775                   Specifies which local addresses can accept recursive
3776                   queries.  If not specified, the default is to allow
3777                   recursive queries on all addresses.
3778                 </p></dd>
3779 <dt><span class="term"><span><strong class="command">allow-update</strong></span></span></dt>
3780 <dd><p>
3781                   Specifies which hosts are allowed to
3782                   submit Dynamic DNS updates for master zones. The default is
3783                   to deny
3784                   updates from all hosts.  Note that allowing updates based
3785                   on the requestor's IP address is insecure; see
3786                   <a href="Bv9ARM.ch07.html#dynamic_update_security" title="Dynamic Update Security">the section called &#8220;Dynamic Update Security&#8221;</a> for details.
3787                 </p></dd>
3788 <dt><span class="term"><span><strong class="command">allow-update-forwarding</strong></span></span></dt>
3789 <dd>
3790 <p>
3791                   Specifies which hosts are allowed to
3792                   submit Dynamic DNS updates to slave zones to be forwarded to
3793                   the
3794                   master.  The default is <strong class="userinput"><code>{ none; }</code></strong>,
3795                   which
3796                   means that no update forwarding will be performed.  To
3797                   enable
3798                   update forwarding, specify
3799                   <strong class="userinput"><code>allow-update-forwarding { any; };</code></strong>.
3800                   Specifying values other than <strong class="userinput"><code>{ none; }</code></strong> or
3801                   <strong class="userinput"><code>{ any; }</code></strong> is usually
3802                   counterproductive, since
3803                   the responsibility for update access control should rest
3804                   with the
3805                   master server, not the slaves.
3806                 </p>
3807 <p>
3808                   Note that enabling the update forwarding feature on a slave
3809                   server
3810                   may expose master servers relying on insecure IP address
3811                   based
3812                   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>
3813                   for more details.
3814                 </p>
3815 </dd>
3816 <dt><span class="term"><span><strong class="command">allow-v6-synthesis</strong></span></span></dt>
3817 <dd><p>
3818                   This option was introduced for the smooth transition from
3819                   AAAA
3820                   to A6 and from "nibble labels" to binary labels.
3821                   However, since both A6 and binary labels were then
3822                   deprecated,
3823                   this option was also deprecated.
3824                   It is now ignored with some warning messages.
3825                 </p></dd>
3826 <dt><span class="term"><span><strong class="command">allow-transfer</strong></span></span></dt>
3827 <dd><p>
3828                   Specifies which hosts are allowed to
3829                   receive zone transfers from the server. <span><strong class="command">allow-transfer</strong></span> may
3830                   also be specified in the <span><strong class="command">zone</strong></span>
3831                   statement, in which
3832                   case it overrides the <span><strong class="command">options allow-transfer</strong></span> statement.
3833                   If not specified, the default is to allow transfers to all
3834                   hosts.
3835                 </p></dd>
3836 <dt><span class="term"><span><strong class="command">blackhole</strong></span></span></dt>
3837 <dd><p>
3838                   Specifies a list of addresses that the
3839                   server will not accept queries from or use to resolve a
3840                   query. Queries
3841                   from these addresses will not be responded to. The default
3842                   is <strong class="userinput"><code>none</code></strong>.
3843                 </p></dd>
3844 <dt><span class="term"><span><strong class="command">filter-aaaa</strong></span></span></dt>
3845 <dd><p>
3846                   Specifies a list of addresses to which
3847                   <span><strong class="command">filter-aaaa-on-v4</strong></span>
3848                   is applies.  The default is <strong class="userinput"><code>any</code></strong>.
3849                 </p></dd>
3850 </dl></div>
3851 </div>
3852 <div class="sect3" lang="en">
3853 <div class="titlepage"><div><div><h4 class="title">
3854 <a name="id2584038"></a>Interfaces</h4></div></div></div>
3855 <p>
3856             The interfaces and ports that the server will answer queries
3857             from may be specified using the <span><strong class="command">listen-on</strong></span> option. <span><strong class="command">listen-on</strong></span> takes
3858             an optional port and an <code class="varname">address_match_list</code>.
3859             The server will listen on all interfaces allowed by the address
3860             match list. If a port is not specified, port 53 will be used.
3861           </p>
3862 <p>
3863             Multiple <span><strong class="command">listen-on</strong></span> statements are
3864             allowed.
3865             For example,
3866           </p>
3867 <pre class="programlisting">listen-on { 5.6.7.8; };
3868 listen-on port 1234 { !1.2.3.4; 1.2/16; };
3869 </pre>
3870 <p>
3871             will enable the name server on port 53 for the IP address
3872             5.6.7.8, and on port 1234 of an address on the machine in net
3873             1.2 that is not 1.2.3.4.
3874           </p>
3875 <p>
3876             If no <span><strong class="command">listen-on</strong></span> is specified, the
3877             server will listen on port 53 on all IPv4 interfaces.
3878           </p>
3879 <p>
3880             The <span><strong class="command">listen-on-v6</strong></span> option is used to
3881             specify the interfaces and the ports on which the server will
3882             listen
3883             for incoming queries sent using IPv6.
3884           </p>
3885 <p>
3886             When </p>
3887 <pre class="programlisting">{ any; }</pre>
3888 <p> is
3889             specified
3890             as the <code class="varname">address_match_list</code> for the
3891             <span><strong class="command">listen-on-v6</strong></span> option,
3892             the server does not bind a separate socket to each IPv6 interface
3893             address as it does for IPv4 if the operating system has enough API
3894             support for IPv6 (specifically if it conforms to RFC 3493 and RFC
3895             3542).
3896             Instead, it listens on the IPv6 wildcard address.
3897             If the system only has incomplete API support for IPv6, however,
3898             the behavior is the same as that for IPv4.
3899           </p>
3900 <p>
3901             A list of particular IPv6 addresses can also be specified, in
3902             which case
3903             the server listens on a separate socket for each specified
3904             address,
3905             regardless of whether the desired API is supported by the system.
3906           </p>
3907 <p>
3908             Multiple <span><strong class="command">listen-on-v6</strong></span> options can
3909             be used.
3910             For example,
3911           </p>
3912 <pre class="programlisting">listen-on-v6 { any; };
3913 listen-on-v6 port 1234 { !2001:db8::/32; any; };
3914 </pre>
3915 <p>
3916             will enable the name server on port 53 for any IPv6 addresses
3917             (with a single wildcard socket),
3918             and on port 1234 of IPv6 addresses that is not in the prefix
3919             2001:db8::/32 (with separate sockets for each matched address.)
3920           </p>
3921 <p>
3922             To make the server not listen on any IPv6 address, use
3923           </p>
3924 <pre class="programlisting">listen-on-v6 { none; };
3925 </pre>
3926 <p>
3927             If no <span><strong class="command">listen-on-v6</strong></span> option is
3928             specified, the server will not listen on any IPv6 address
3929             unless <span><strong class="command">-6</strong></span> is specified when <span><strong class="command">named</strong></span> is
3930             invoked.  If <span><strong class="command">-6</strong></span> is specified then
3931             <span><strong class="command">named</strong></span> will listen on port 53 on all IPv6 interfaces by default.
3932           </p>
3933 </div>
3934 <div class="sect3" lang="en">
3935 <div class="titlepage"><div><div><h4 class="title">
3936 <a name="query_address"></a>Query Address</h4></div></div></div>
3937 <p>
3938             If the server doesn't know the answer to a question, it will
3939             query other name servers. <span><strong class="command">query-source</strong></span> specifies
3940             the address and port used for such queries. For queries sent over
3941             IPv6, there is a separate <span><strong class="command">query-source-v6</strong></span> option.
3942             If <span><strong class="command">address</strong></span> is <span><strong class="command">*</strong></span> (asterisk) or is omitted,
3943             a wildcard IP address (<span><strong class="command">INADDR_ANY</strong></span>)
3944             will be used.
3945           </p>
3946 <p>
3947             If <span><strong class="command">port</strong></span> is <span><strong class="command">*</strong></span> or is omitted,
3948             a random port number from a pre-configured
3949             range is picked up and will be used for each query.
3950             The port range(s) is that specified in
3951             the <span><strong class="command">use-v4-udp-ports</strong></span> (for IPv4)
3952             and <span><strong class="command">use-v6-udp-ports</strong></span> (for IPv6)
3953             options, excluding the ranges specified in
3954             the <span><strong class="command">avoid-v4-udp-ports</strong></span>
3955             and <span><strong class="command">avoid-v6-udp-ports</strong></span> options, respectively.
3956           </p>
3957 <p>
3958             The defaults of the <span><strong class="command">query-source</strong></span> and
3959             <span><strong class="command">query-source-v6</strong></span> options
3960             are:
3961           </p>
3962 <pre class="programlisting">query-source address * port *;
3963 query-source-v6 address * port *;
3964 </pre>
3965 <p>
3966             If <span><strong class="command">use-v4-udp-ports</strong></span> or
3967             <span><strong class="command">use-v6-udp-ports</strong></span> is unspecified,
3968             <span><strong class="command">named</strong></span> will check if the operating
3969             system provides a programming interface to retrieve the
3970             system's default range for ephemeral ports.
3971             If such an interface is available,
3972             <span><strong class="command">named</strong></span> will use the corresponding system
3973             default range; otherwise, it will use its own defaults:
3974          </p>
3975 <pre class="programlisting">use-v4-udp-ports { range 1024 65535; };
3976 use-v6-udp-ports { range 1024 65535; };
3977 </pre>
3978 <p>
3979             Note: make sure the ranges be sufficiently large for
3980             security.  A desirable size depends on various parameters,
3981             but we generally recommend it contain at least 16384 ports
3982             (14 bits of entropy).
3983             Note also that the system's default range when used may be
3984             too small for this purpose, and that the range may even be
3985             changed while <span><strong class="command">named</strong></span> is running; the new
3986             range will automatically be applied when <span><strong class="command">named</strong></span>
3987             is reloaded.
3988             It is encouraged to
3989             configure <span><strong class="command">use-v4-udp-ports</strong></span> and
3990             <span><strong class="command">use-v6-udp-ports</strong></span> explicitly so that the
3991             ranges are sufficiently large and are reasonably
3992             independent from the ranges used by other applications.
3993           </p>
3994 <p>
3995             Note: the operational configuration
3996             where <span><strong class="command">named</strong></span> runs may prohibit the use
3997             of some ports.  For example, UNIX systems will not allow
3998             <span><strong class="command">named</strong></span> running without a root privilege
3999             to use ports less than 1024.
4000             If such ports are included in the specified (or detected)
4001             set of query ports, the corresponding query attempts will
4002             fail, resulting in resolution failures or delay.
4003             It is therefore important to configure the set of ports
4004             that can be safely used in the expected operational environment.
4005           </p>
4006 <p>
4007             The defaults of the <span><strong class="command">avoid-v4-udp-ports</strong></span> and
4008             <span><strong class="command">avoid-v6-udp-ports</strong></span> options
4009             are:
4010           </p>
4011 <pre class="programlisting">avoid-v4-udp-ports {};
4012 avoid-v6-udp-ports {};
4013 </pre>
4014 <p>
4015             Note: BIND 9.5.0 introduced
4016             the <span><strong class="command">use-queryport-pool</strong></span> 
4017             option to support a pool of such random ports, but this
4018             option is now obsolete because reusing the same ports in
4019             the pool may not be sufficiently secure.
4020             For the same reason, it is generally strongly discouraged to
4021             specify a particular port for the
4022             <span><strong class="command">query-source</strong></span> or
4023             <span><strong class="command">query-source-v6</strong></span> options;
4024             it implicitly disables the use of randomized port numbers.
4025           </p>
4026 <div class="variablelist"><dl>
4027 <dt><span class="term"><span><strong class="command">use-queryport-pool</strong></span></span></dt>
4028 <dd><p>
4029                   This option is obsolete.
4030                 </p></dd>
4031 <dt><span class="term"><span><strong class="command">queryport-pool-ports</strong></span></span></dt>
4032 <dd><p>
4033                   This option is obsolete.
4034                 </p></dd>
4035 <dt><span class="term"><span><strong class="command">queryport-pool-updateinterval</strong></span></span></dt>
4036 <dd><p>
4037                   This option is obsolete.
4038                 </p></dd>
4039 </dl></div>
4040 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4041 <h3 class="title">Note</h3>
4042 <p>
4043               The address specified in the <span><strong class="command">query-source</strong></span> option
4044               is used for both UDP and TCP queries, but the port applies only
4045               to UDP queries.  TCP queries always use a random
4046               unprivileged port.
4047             </p>
4048 </div>
4049 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4050 <h3 class="title">Note</h3>
4051 <p>
4052               Solaris 2.5.1 and earlier does not support setting the source
4053               address for TCP sockets.
4054             </p>
4055 </div>
4056 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4057 <h3 class="title">Note</h3>
4058 <p>
4059               See also <span><strong class="command">transfer-source</strong></span> and
4060               <span><strong class="command">notify-source</strong></span>.
4061             </p>
4062 </div>
4063 </div>
4064 <div class="sect3" lang="en">
4065 <div class="titlepage"><div><div><h4 class="title">
4066 <a name="zone_transfers"></a>Zone Transfers</h4></div></div></div>
4067 <p>
4068             <acronym class="acronym">BIND</acronym> has mechanisms in place to
4069             facilitate zone transfers
4070             and set limits on the amount of load that transfers place on the
4071             system. The following options apply to zone transfers.
4072           </p>
4073 <div class="variablelist"><dl>
4074 <dt><span class="term"><span><strong class="command">also-notify</strong></span></span></dt>
4075 <dd><p>
4076                   Defines a global list of IP addresses of name servers
4077                   that are also sent NOTIFY messages whenever a fresh copy of
4078                   the
4079                   zone is loaded, in addition to the servers listed in the
4080                   zone's NS records.
4081                   This helps to ensure that copies of the zones will
4082                   quickly converge on stealth servers.
4083                   Optionally, a port may be specified with each
4084                   <span><strong class="command">also-notify</strong></span> address to send
4085                   the notify messages to a port other than the
4086                   default of 53.
4087                   If an <span><strong class="command">also-notify</strong></span> list
4088                   is given in a <span><strong class="command">zone</strong></span> statement,
4089                   it will override
4090                   the <span><strong class="command">options also-notify</strong></span>
4091                   statement. When a <span><strong class="command">zone notify</strong></span>
4092                   statement
4093                   is set to <span><strong class="command">no</strong></span>, the IP
4094                   addresses in the global <span><strong class="command">also-notify</strong></span> list will
4095                   not be sent NOTIFY messages for that zone. The default is
4096                   the empty
4097                   list (no global notification list).
4098                 </p></dd>
4099 <dt><span class="term"><span><strong class="command">max-transfer-time-in</strong></span></span></dt>
4100 <dd><p>
4101                   Inbound zone transfers running longer than
4102                   this many minutes will be terminated. The default is 120
4103                   minutes
4104                   (2 hours).  The maximum value is 28 days (40320 minutes).
4105                 </p></dd>
4106 <dt><span class="term"><span><strong class="command">max-transfer-idle-in</strong></span></span></dt>
4107 <dd><p>
4108                   Inbound zone transfers making no progress
4109                   in this many minutes will be terminated. The default is 60
4110                   minutes
4111                   (1 hour).  The maximum value is 28 days (40320 minutes).
4112                 </p></dd>
4113 <dt><span class="term"><span><strong class="command">max-transfer-time-out</strong></span></span></dt>
4114 <dd><p>
4115                   Outbound zone transfers running longer than
4116                   this many minutes will be terminated. The default is 120
4117                   minutes
4118                   (2 hours).  The maximum value is 28 days (40320 minutes).
4119                 </p></dd>
4120 <dt><span class="term"><span><strong class="command">max-transfer-idle-out</strong></span></span></dt>
4121 <dd><p>
4122                   Outbound zone transfers making no progress
4123                   in this many minutes will be terminated.  The default is 60
4124                   minutes (1
4125                   hour).  The maximum value is 28 days (40320 minutes).
4126                 </p></dd>
4127 <dt><span class="term"><span><strong class="command">serial-query-rate</strong></span></span></dt>
4128 <dd><p>
4129                   Slave servers will periodically query master servers
4130                   to find out if zone serial numbers have changed. Each such
4131                   query uses
4132                   a minute amount of the slave server's network bandwidth.  To
4133                   limit the
4134                   amount of bandwidth used, BIND 9 limits the rate at which
4135                   queries are
4136                   sent.  The value of the <span><strong class="command">serial-query-rate</strong></span> option,
4137                   an integer, is the maximum number of queries sent per
4138                   second.
4139                   The default is 20.
4140                 </p></dd>
4141 <dt><span class="term"><span><strong class="command">serial-queries</strong></span></span></dt>
4142 <dd><p>
4143                   In BIND 8, the <span><strong class="command">serial-queries</strong></span>
4144                   option
4145                   set the maximum number of concurrent serial number queries
4146                   allowed to be outstanding at any given time.
4147                   BIND 9 does not limit the number of outstanding
4148                   serial queries and ignores the <span><strong class="command">serial-queries</strong></span> option.
4149                   Instead, it limits the rate at which the queries are sent
4150                   as defined using the <span><strong class="command">serial-query-rate</strong></span> option.
4151                 </p></dd>
4152 <dt><span class="term"><span><strong class="command">transfer-format</strong></span></span></dt>
4153 <dd><p>
4154                   Zone transfers can be sent using two different formats,
4155                   <span><strong class="command">one-answer</strong></span> and
4156                   <span><strong class="command">many-answers</strong></span>.
4157                   The <span><strong class="command">transfer-format</strong></span> option is used
4158                   on the master server to determine which format it sends.
4159                   <span><strong class="command">one-answer</strong></span> uses one DNS message per
4160                   resource record transferred.
4161                   <span><strong class="command">many-answers</strong></span> packs as many resource
4162                   records as possible into a message.
4163                   <span><strong class="command">many-answers</strong></span> is more efficient, but is
4164                   only supported by relatively new slave servers,
4165                   such as <acronym class="acronym">BIND</acronym> 9, <acronym class="acronym">BIND</acronym>
4166                   8.x and <acronym class="acronym">BIND</acronym> 4.9.5 onwards.
4167                   The <span><strong class="command">many-answers</strong></span> format is also supported by
4168                   recent Microsoft Windows nameservers.
4169                   The default is <span><strong class="command">many-answers</strong></span>.
4170                   <span><strong class="command">transfer-format</strong></span> may be overridden on a
4171                   per-server basis by using the <span><strong class="command">server</strong></span>
4172                   statement.
4173                 </p></dd>
4174 <dt><span class="term"><span><strong class="command">transfers-in</strong></span></span></dt>
4175 <dd><p>
4176                   The maximum number of inbound zone transfers
4177                   that can be running concurrently. The default value is <code class="literal">10</code>.
4178                   Increasing <span><strong class="command">transfers-in</strong></span> may
4179                   speed up the convergence
4180                   of slave zones, but it also may increase the load on the
4181                   local system.
4182                 </p></dd>
4183 <dt><span class="term"><span><strong class="command">transfers-out</strong></span></span></dt>
4184 <dd><p>
4185                   The maximum number of outbound zone transfers
4186                   that can be running concurrently. Zone transfer requests in
4187                   excess
4188                   of the limit will be refused. The default value is <code class="literal">10</code>.
4189                 </p></dd>
4190 <dt><span class="term"><span><strong class="command">transfers-per-ns</strong></span></span></dt>
4191 <dd><p>
4192                   The maximum number of inbound zone transfers
4193                   that can be concurrently transferring from a given remote
4194                   name server.
4195                   The default value is <code class="literal">2</code>.
4196                   Increasing <span><strong class="command">transfers-per-ns</strong></span>
4197                   may
4198                   speed up the convergence of slave zones, but it also may
4199                   increase
4200                   the load on the remote name server. <span><strong class="command">transfers-per-ns</strong></span> may
4201                   be overridden on a per-server basis by using the <span><strong class="command">transfers</strong></span> phrase
4202                   of the <span><strong class="command">server</strong></span> statement.
4203                 </p></dd>
4204 <dt><span class="term"><span><strong class="command">transfer-source</strong></span></span></dt>
4205 <dd>
4206 <p><span><strong class="command">transfer-source</strong></span>
4207                   determines which local address will be bound to IPv4
4208                   TCP connections used to fetch zones transferred
4209                   inbound by the server.  It also determines the
4210                   source IPv4 address, and optionally the UDP port,
4211                   used for the refresh queries and forwarded dynamic
4212                   updates.  If not set, it defaults to a system
4213                   controlled value which will usually be the address
4214                   of the interface "closest to" the remote end. This
4215                   address must appear in the remote end's
4216                   <span><strong class="command">allow-transfer</strong></span> option for the
4217                   zone being transferred, if one is specified. This
4218                   statement sets the
4219                   <span><strong class="command">transfer-source</strong></span> for all zones,
4220                   but can be overridden on a per-view or per-zone
4221                   basis by including a
4222                   <span><strong class="command">transfer-source</strong></span> statement within
4223                   the <span><strong class="command">view</strong></span> or
4224                   <span><strong class="command">zone</strong></span> block in the configuration
4225                   file.
4226                 </p>
4227 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4228 <h3 class="title">Note</h3>
4229 <p>
4230                     Solaris 2.5.1 and earlier does not support setting the
4231                     source address for TCP sockets.
4232                   </p>
4233 </div>
4234 </dd>
4235 <dt><span class="term"><span><strong class="command">transfer-source-v6</strong></span></span></dt>
4236 <dd><p>
4237                   The same as <span><strong class="command">transfer-source</strong></span>,
4238                   except zone transfers are performed using IPv6.
4239                 </p></dd>
4240 <dt><span class="term"><span><strong class="command">alt-transfer-source</strong></span></span></dt>
4241 <dd>
4242 <p>
4243                   An alternate transfer source if the one listed in
4244                   <span><strong class="command">transfer-source</strong></span> fails and
4245                   <span><strong class="command">use-alt-transfer-source</strong></span> is
4246                   set.
4247                 </p>
4248 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4249 <h3 class="title">Note</h3>
4250                   If you do not wish the alternate transfer source
4251                   to be used, you should set
4252                   <span><strong class="command">use-alt-transfer-source</strong></span>
4253                   appropriately and you should not depend upon
4254                   getting an answer back to the first refresh
4255                   query.
4256                 </div>
4257 </dd>
4258 <dt><span class="term"><span><strong class="command">alt-transfer-source-v6</strong></span></span></dt>
4259 <dd><p>
4260                   An alternate transfer source if the one listed in
4261                   <span><strong class="command">transfer-source-v6</strong></span> fails and
4262                   <span><strong class="command">use-alt-transfer-source</strong></span> is
4263                   set.
4264                 </p></dd>
4265 <dt><span class="term"><span><strong class="command">use-alt-transfer-source</strong></span></span></dt>
4266 <dd><p>
4267                   Use the alternate transfer sources or not.  If views are
4268                   specified this defaults to <span><strong class="command">no</strong></span>
4269                   otherwise it defaults to
4270                   <span><strong class="command">yes</strong></span> (for BIND 8
4271                   compatibility).
4272                 </p></dd>
4273 <dt><span class="term"><span><strong class="command">notify-source</strong></span></span></dt>
4274 <dd>
4275 <p><span><strong class="command">notify-source</strong></span>
4276                   determines which local source address, and
4277                   optionally UDP port, will be used to send NOTIFY
4278                   messages.  This address must appear in the slave
4279                   server's <span><strong class="command">masters</strong></span> zone clause or
4280                   in an <span><strong class="command">allow-notify</strong></span> clause.  This
4281                   statement sets the <span><strong class="command">notify-source</strong></span>
4282                   for all zones, but can be overridden on a per-zone or
4283                   per-view basis by including a
4284                   <span><strong class="command">notify-source</strong></span> statement within
4285                   the <span><strong class="command">zone</strong></span> or
4286                   <span><strong class="command">view</strong></span> block in the configuration
4287                   file.
4288                 </p>
4289 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4290 <h3 class="title">Note</h3>
4291 <p>
4292                     Solaris 2.5.1 and earlier does not support setting the
4293                     source address for TCP sockets.
4294                   </p>
4295 </div>
4296 </dd>
4297 <dt><span class="term"><span><strong class="command">notify-source-v6</strong></span></span></dt>
4298 <dd><p>
4299                   Like <span><strong class="command">notify-source</strong></span>,
4300                   but applies to notify messages sent to IPv6 addresses.
4301                 </p></dd>
4302 </dl></div>
4303 </div>
4304 <div class="sect3" lang="en">
4305 <div class="titlepage"><div><div><h4 class="title">
4306 <a name="id2585309"></a>UDP Port Lists</h4></div></div></div>
4307 <p>
4308             <span><strong class="command">use-v4-udp-ports</strong></span>,
4309             <span><strong class="command">avoid-v4-udp-ports</strong></span>,
4310             <span><strong class="command">use-v6-udp-ports</strong></span>, and
4311             <span><strong class="command">avoid-v6-udp-ports</strong></span>
4312             specify a list of IPv4 and IPv6 UDP ports that will be
4313             used or not used as source ports for UDP messages.
4314             See <a href="Bv9ARM.ch06.html#query_address" title="Query Address">the section called &#8220;Query Address&#8221;</a> about how the
4315             available ports are determined.
4316             For example, with the following configuration
4317           </p>
4318 <pre class="programlisting">
4319 use-v6-udp-ports { range 32768 65535; };
4320 avoid-v6-udp-ports { 40000; range 50000 60000; };
4321 </pre>
4322 <p>
4323              UDP ports of IPv6 messages sent
4324              from <span><strong class="command">named</strong></span> will be in one
4325              of the following ranges: 32768 to 39999, 40001 to 49999,
4326              and 60001 to 65535.
4327            </p>
4328 <p>
4329              <span><strong class="command">avoid-v4-udp-ports</strong></span> and
4330              <span><strong class="command">avoid-v6-udp-ports</strong></span> can be used
4331              to prevent <span><strong class="command">named</strong></span> from choosing as its random source port a
4332              port that is blocked by your firewall or a port that is
4333              used by other applications;
4334              if a query went out with a source port blocked by a
4335              firewall, the
4336              answer would not get by the firewall and the name server would
4337              have to query again.
4338              Note: the desired range can also be represented only with
4339              <span><strong class="command">use-v4-udp-ports</strong></span> and
4340              <span><strong class="command">use-v6-udp-ports</strong></span>, and the
4341              <span><strong class="command">avoid-</strong></span> options are redundant in that
4342              sense; they are provided for backward compatibility and
4343              to possibly simplify the port specification.
4344            </p>
4345 </div>
4346 <div class="sect3" lang="en">
4347 <div class="titlepage"><div><div><h4 class="title">
4348 <a name="id2585369"></a>Operating System Resource Limits</h4></div></div></div>
4349 <p>
4350             The server's usage of many system resources can be limited.
4351             Scaled values are allowed when specifying resource limits.  For
4352             example, <span><strong class="command">1G</strong></span> can be used instead of
4353             <span><strong class="command">1073741824</strong></span> to specify a limit of
4354             one
4355             gigabyte. <span><strong class="command">unlimited</strong></span> requests
4356             unlimited use, or the
4357             maximum available amount. <span><strong class="command">default</strong></span>
4358             uses the limit
4359             that was in force when the server was started. See the description
4360             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>.
4361           </p>
4362 <p>
4363             The following options set operating system resource limits for
4364             the name server process.  Some operating systems don't support
4365             some or
4366             any of the limits. On such systems, a warning will be issued if
4367             the
4368             unsupported limit is used.
4369           </p>
4370 <div class="variablelist"><dl>
4371 <dt><span class="term"><span><strong class="command">coresize</strong></span></span></dt>
4372 <dd><p>
4373                   The maximum size of a core dump. The default
4374                   is <code class="literal">default</code>.
4375                 </p></dd>
4376 <dt><span class="term"><span><strong class="command">datasize</strong></span></span></dt>
4377 <dd><p>
4378                   The maximum amount of data memory the server
4379                   may use. The default is <code class="literal">default</code>.
4380                   This is a hard limit on server memory usage.
4381                   If the server attempts to allocate memory in excess of this
4382                   limit, the allocation will fail, which may in turn leave
4383                   the server unable to perform DNS service.  Therefore,
4384                   this option is rarely useful as a way of limiting the
4385                   amount of memory used by the server, but it can be used
4386                   to raise an operating system data size limit that is
4387                   too small by default.  If you wish to limit the amount
4388                   of memory used by the server, use the
4389                   <span><strong class="command">max-cache-size</strong></span> and
4390                   <span><strong class="command">recursive-clients</strong></span>
4391                   options instead.
4392                 </p></dd>
4393 <dt><span class="term"><span><strong class="command">files</strong></span></span></dt>
4394 <dd><p>
4395                   The maximum number of files the server
4396                   may have open concurrently. The default is <code class="literal">unlimited</code>.
4397                 </p></dd>
4398 <dt><span class="term"><span><strong class="command">stacksize</strong></span></span></dt>
4399 <dd><p>
4400                   The maximum amount of stack memory the server
4401                   may use. The default is <code class="literal">default</code>.
4402                 </p></dd>
4403 </dl></div>
4404 </div>
4405 <div class="sect3" lang="en">
4406 <div class="titlepage"><div><div><h4 class="title">
4407 <a name="server_resource_limits"></a>Server  Resource Limits</h4></div></div></div>
4408 <p>
4409             The following options set limits on the server's
4410             resource consumption that are enforced internally by the
4411             server rather than the operating system.
4412           </p>
4413 <div class="variablelist"><dl>
4414 <dt><span class="term"><span><strong class="command">max-ixfr-log-size</strong></span></span></dt>
4415 <dd><p>
4416                   This option is obsolete; it is accepted
4417                   and ignored for BIND 8 compatibility.  The option
4418                   <span><strong class="command">max-journal-size</strong></span> performs a
4419                   similar function in BIND 9.
4420                 </p></dd>
4421 <dt><span class="term"><span><strong class="command">max-journal-size</strong></span></span></dt>
4422 <dd><p>
4423                   Sets a maximum size for each journal file
4424                   (see <a href="Bv9ARM.ch04.html#journal" title="The journal file">the section called &#8220;The journal file&#8221;</a>).  When the journal file
4425                   approaches
4426                   the specified size, some of the oldest transactions in the
4427                   journal
4428                   will be automatically removed.  The default is
4429                   <code class="literal">unlimited</code>.
4430                   This may also be set on a per-zone basis.
4431                 </p></dd>
4432 <dt><span class="term"><span><strong class="command">host-statistics-max</strong></span></span></dt>
4433 <dd><p>
4434                   In BIND 8, specifies the maximum number of host statistics
4435                   entries to be kept.
4436                   Not implemented in BIND 9.
4437                 </p></dd>
4438 <dt><span class="term"><span><strong class="command">recursive-clients</strong></span></span></dt>
4439 <dd><p>
4440                   The maximum number of simultaneous recursive lookups
4441                   the server will perform on behalf of clients.  The default
4442                   is
4443                   <code class="literal">1000</code>.  Because each recursing
4444                   client uses a fair
4445                   bit of memory, on the order of 20 kilobytes, the value of
4446                   the
4447                   <span><strong class="command">recursive-clients</strong></span> option may
4448                   have to be decreased
4449                   on hosts with limited memory.
4450                 </p></dd>
4451 <dt><span class="term"><span><strong class="command">tcp-clients</strong></span></span></dt>
4452 <dd><p>
4453                   The maximum number of simultaneous client TCP
4454                   connections that the server will accept.
4455                   The default is <code class="literal">100</code>.
4456                 </p></dd>
4457 <dt><span class="term"><span><strong class="command">reserved-sockets</strong></span></span></dt>
4458 <dd>
4459 <p>
4460                   The number of file descriptors reserved for TCP, stdio,
4461                   etc.  This needs to be big enough to cover the number of
4462                   interfaces <span><strong class="command">named</strong></span> listens on, <span><strong class="command">tcp-clients</strong></span> as well as
4463                   to provide room for outgoing TCP queries and incoming zone
4464                   transfers.  The default is <code class="literal">512</code>.
4465                   The minimum value is <code class="literal">128</code> and the
4466                   maximum value is <code class="literal">128</code> less than
4467                   maxsockets (-S).  This option may be removed in the future.
4468                 </p>
4469 <p>
4470                   This option has little effect on Windows.
4471                 </p>
4472 </dd>
4473 <dt><span class="term"><span><strong class="command">max-cache-size</strong></span></span></dt>
4474 <dd><p>
4475                   The maximum amount of memory to use for the
4476                   server's cache, in bytes.
4477                   When the amount of data in the cache
4478                   reaches this limit, the server will cause records to expire
4479                   prematurely based on an LRU based strategy so that
4480                   the limit is not exceeded.
4481                   A value of 0 is special, meaning that
4482                   records are purged from the cache only when their
4483                   TTLs expire.
4484                   Another special keyword <strong class="userinput"><code>unlimited</code></strong>
4485                   means the maximum value of 32-bit unsigned integers
4486                   (0xffffffff), which may not have the same effect as
4487                   0 on machines that support more than 32 bits of
4488                   memory space.
4489                   Any positive values less than 2MB will be ignored reset
4490                   to 2MB.
4491                   In a server with multiple views, the limit applies
4492                   separately to the cache of each view.
4493                   The default is 0.
4494                 </p></dd>
4495 <dt><span class="term"><span><strong class="command">tcp-listen-queue</strong></span></span></dt>
4496 <dd><p>
4497                   The listen queue depth.  The default and minimum is 3.
4498                   If the kernel supports the accept filter "dataready" this
4499                   also controls how
4500                   many TCP connections that will be queued in kernel space
4501                   waiting for
4502                   some data before being passed to accept.  Values less than 3
4503                   will be
4504                   silently raised.
4505                 </p></dd>
4506 </dl></div>
4507 </div>
4508 <div class="sect3" lang="en">
4509 <div class="titlepage"><div><div><h4 class="title">
4510 <a name="id2585655"></a>Periodic Task Intervals</h4></div></div></div>
4511 <div class="variablelist"><dl>
4512 <dt><span class="term"><span><strong class="command">cleaning-interval</strong></span></span></dt>
4513 <dd><p>
4514                   This interval is effectively obsolete.  Previously,
4515                   the server would remove expired resource records
4516                   from the cache every <span><strong class="command">cleaning-interval</strong></span> minutes.
4517                   <acronym class="acronym">BIND</acronym> 9 now manages cache
4518                   memory in a more sophisticated manner and does not
4519                   rely on the periodic cleaning any more.
4520                   Specifying this option therefore has no effect on
4521                   the server's behavior.
4522                 </p></dd>
4523 <dt><span class="term"><span><strong class="command">heartbeat-interval</strong></span></span></dt>
4524 <dd><p>
4525                   The server will perform zone maintenance tasks
4526                   for all zones marked as <span><strong class="command">dialup</strong></span> whenever this
4527                   interval expires. The default is 60 minutes. Reasonable
4528                   values are up
4529                   to 1 day (1440 minutes).  The maximum value is 28 days
4530                   (40320 minutes).
4531                   If set to 0, no zone maintenance for these zones will occur.
4532                 </p></dd>
4533 <dt><span class="term"><span><strong class="command">interface-interval</strong></span></span></dt>
4534 <dd><p>
4535                   The server will scan the network interface list
4536                   every <span><strong class="command">interface-interval</strong></span>
4537                   minutes. The default
4538                   is 60 minutes. The maximum value is 28 days (40320 minutes).
4539                   If set to 0, interface scanning will only occur when
4540                   the configuration file is  loaded. After the scan, the
4541                   server will
4542                   begin listening for queries on any newly discovered
4543                   interfaces (provided they are allowed by the
4544                   <span><strong class="command">listen-on</strong></span> configuration), and
4545                   will
4546                   stop listening on interfaces that have gone away.
4547                 </p></dd>
4548 <dt><span class="term"><span><strong class="command">statistics-interval</strong></span></span></dt>
4549 <dd>
4550 <p>
4551                   Name server statistics will be logged
4552                   every <span><strong class="command">statistics-interval</strong></span>
4553                   minutes. The default is
4554                   60. The maximum value is 28 days (40320 minutes).
4555                   If set to 0, no statistics will be logged.
4556                   </p>
4557 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4558 <h3 class="title">Note</h3>
4559 <p>
4560                     Not yet implemented in
4561                     <acronym class="acronym">BIND</acronym> 9.
4562                   </p>
4563 </div>
4564 </dd>
4565 </dl></div>
4566 </div>
4567 <div class="sect3" lang="en">
4568 <div class="titlepage"><div><div><h4 class="title">
4569 <a name="topology"></a>Topology</h4></div></div></div>
4570 <p>
4571             All other things being equal, when the server chooses a name
4572             server
4573             to query from a list of name servers, it prefers the one that is
4574             topologically closest to itself. The <span><strong class="command">topology</strong></span> statement
4575             takes an <span><strong class="command">address_match_list</strong></span> and
4576             interprets it
4577             in a special way. Each top-level list element is assigned a
4578             distance.
4579             Non-negated elements get a distance based on their position in the
4580             list, where the closer the match is to the start of the list, the
4581             shorter the distance is between it and the server. A negated match
4582             will be assigned the maximum distance from the server. If there
4583             is no match, the address will get a distance which is further than
4584             any non-negated list element, and closer than any negated element.
4585             For example,
4586           </p>
4587 <pre class="programlisting">topology {
4588     10/8;
4589     !1.2.3/24;
4590     { 1.2/16; 3/8; };
4591 };</pre>
4592 <p>
4593             will prefer servers on network 10 the most, followed by hosts
4594             on network 1.2.0.0 (netmask 255.255.0.0) and network 3, with the
4595             exception of hosts on network 1.2.3 (netmask 255.255.255.0), which
4596             is preferred least of all.
4597           </p>
4598 <p>
4599             The default topology is
4600           </p>
4601 <pre class="programlisting">    topology { localhost; localnets; };
4602 </pre>
4603 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4604 <h3 class="title">Note</h3>
4605 <p>
4606               The <span><strong class="command">topology</strong></span> option
4607               is not implemented in <acronym class="acronym">BIND</acronym> 9.
4608             </p>
4609 </div>
4610 </div>
4611 <div class="sect3" lang="en">
4612 <div class="titlepage"><div><div><h4 class="title">
4613 <a name="the_sortlist_statement"></a>The <span><strong class="command">sortlist</strong></span> Statement</h4></div></div></div>
4614 <p>
4615             The response to a DNS query may consist of multiple resource
4616             records (RRs) forming a resource records set (RRset).
4617             The name server will normally return the
4618             RRs within the RRset in an indeterminate order
4619             (but see the <span><strong class="command">rrset-order</strong></span>
4620             statement in <a href="Bv9ARM.ch06.html#rrset_ordering" title="RRset Ordering">the section called &#8220;RRset Ordering&#8221;</a>).
4621             The client resolver code should rearrange the RRs as appropriate,
4622             that is, using any addresses on the local net in preference to
4623             other addresses.
4624             However, not all resolvers can do this or are correctly
4625             configured.
4626             When a client is using a local server, the sorting can be performed
4627             in the server, based on the client's address. This only requires
4628             configuring the name servers, not all the clients.
4629           </p>
4630 <p>
4631             The <span><strong class="command">sortlist</strong></span> statement (see below)
4632             takes
4633             an <span><strong class="command">address_match_list</strong></span> and
4634             interprets it even
4635             more specifically than the <span><strong class="command">topology</strong></span>
4636             statement
4637             does (<a href="Bv9ARM.ch06.html#topology" title="Topology">the section called &#8220;Topology&#8221;</a>).
4638             Each top level statement in the <span><strong class="command">sortlist</strong></span> must
4639             itself be an explicit <span><strong class="command">address_match_list</strong></span> with
4640             one or two elements. The first element (which may be an IP
4641             address,
4642             an IP prefix, an ACL name or a nested <span><strong class="command">address_match_list</strong></span>)
4643             of each top level list is checked against the source address of
4644             the query until a match is found.
4645           </p>
4646 <p>
4647             Once the source address of the query has been matched, if
4648             the top level statement contains only one element, the actual
4649             primitive
4650             element that matched the source address is used to select the
4651             address
4652             in the response to move to the beginning of the response. If the
4653             statement is a list of two elements, then the second element is
4654             treated the same as the <span><strong class="command">address_match_list</strong></span> in
4655             a <span><strong class="command">topology</strong></span> statement. Each top
4656             level element
4657             is assigned a distance and the address in the response with the
4658             minimum
4659             distance is moved to the beginning of the response.
4660           </p>
4661 <p>
4662             In the following example, any queries received from any of
4663             the addresses of the host itself will get responses preferring
4664             addresses
4665             on any of the locally connected networks. Next most preferred are
4666             addresses
4667             on the 192.168.1/24 network, and after that either the
4668             192.168.2/24
4669             or
4670             192.168.3/24 network with no preference shown between these two
4671             networks. Queries received from a host on the 192.168.1/24 network
4672             will prefer other addresses on that network to the 192.168.2/24
4673             and
4674             192.168.3/24 networks. Queries received from a host on the
4675             192.168.4/24
4676             or the 192.168.5/24 network will only prefer other addresses on
4677             their directly connected networks.
4678           </p>
4679 <pre class="programlisting">sortlist {
4680     // IF the local host
4681     // THEN first fit on the following nets
4682     { localhost;
4683         { localnets;
4684             192.168.1/24;
4685             { 192.168.2/24; 192.168.3/24; }; }; };
4686     // IF on class C 192.168.1 THEN use .1, or .2 or .3
4687     { 192.168.1/24;
4688         { 192.168.1/24;
4689             { 192.168.2/24; 192.168.3/24; }; }; };
4690     // IF on class C 192.168.2 THEN use .2, or .1 or .3
4691     { 192.168.2/24;
4692         { 192.168.2/24;
4693             { 192.168.1/24; 192.168.3/24; }; }; };
4694     // IF on class C 192.168.3 THEN use .3, or .1 or .2
4695     { 192.168.3/24;
4696         { 192.168.3/24;
4697             { 192.168.1/24; 192.168.2/24; }; }; };
4698     // IF .4 or .5 THEN prefer that net
4699     { { 192.168.4/24; 192.168.5/24; };
4700     };
4701 };</pre>
4702 <p>
4703             The following example will give reasonable behavior for the
4704             local host and hosts on directly connected networks. It is similar
4705             to the behavior of the address sort in <acronym class="acronym">BIND</acronym> 4.9.x. Responses sent
4706             to queries from the local host will favor any of the directly
4707             connected
4708             networks. Responses sent to queries from any other hosts on a
4709             directly
4710             connected network will prefer addresses on that same network.
4711             Responses
4712             to other queries will not be sorted.
4713           </p>
4714 <pre class="programlisting">sortlist {
4715            { localhost; localnets; };
4716            { localnets; };
4717 };
4718 </pre>
4719 </div>
4720 <div class="sect3" lang="en">
4721 <div class="titlepage"><div><div><h4 class="title">
4722 <a name="rrset_ordering"></a>RRset Ordering</h4></div></div></div>
4723 <p>
4724             When multiple records are returned in an answer it may be
4725             useful to configure the order of the records placed into the
4726             response.
4727             The <span><strong class="command">rrset-order</strong></span> statement permits
4728             configuration
4729             of the ordering of the records in a multiple record response.
4730             See also the <span><strong class="command">sortlist</strong></span> statement,
4731             <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>.
4732           </p>
4733 <p>
4734             An <span><strong class="command">order_spec</strong></span> is defined as
4735             follows:
4736           </p>
4737 <p>
4738             [<span class="optional">class <em class="replaceable"><code>class_name</code></em></span>]
4739             [<span class="optional">type <em class="replaceable"><code>type_name</code></em></span>]
4740             [<span class="optional">name <em class="replaceable"><code>"domain_name"</code></em></span>]
4741             order <em class="replaceable"><code>ordering</code></em>
4742           </p>
4743 <p>
4744             If no class is specified, the default is <span><strong class="command">ANY</strong></span>.
4745             If no type is specified, the default is <span><strong class="command">ANY</strong></span>.
4746             If no name is specified, the default is "<span><strong class="command">*</strong></span>" (asterisk).
4747           </p>
4748 <p>
4749             The legal values for <span><strong class="command">ordering</strong></span> are:
4750           </p>
4751 <div class="informaltable"><table border="1">
4752 <colgroup>
4753 <col>
4754 <col>
4755 </colgroup>
4756 <tbody>
4757 <tr>
4758 <td>
4759                     <p><span><strong class="command">fixed</strong></span></p>
4760                   </td>
4761 <td>
4762                     <p>
4763                       Records are returned in the order they
4764                       are defined in the zone file.
4765                     </p>
4766                   </td>
4767 </tr>
4768 <tr>
4769 <td>
4770                     <p><span><strong class="command">random</strong></span></p>
4771                   </td>
4772 <td>
4773                     <p>
4774                       Records are returned in some random order.
4775                     </p>
4776                   </td>
4777 </tr>
4778 <tr>
4779 <td>
4780                     <p><span><strong class="command">cyclic</strong></span></p>
4781                   </td>
4782 <td>
4783                     <p>
4784                       Records are returned in a cyclic round-robin order.
4785                     </p>
4786                     <p>
4787                       If <acronym class="acronym">BIND</acronym> is configured with the
4788                       "--enable-fixed-rrset" option at compile time, then
4789                       the initial ordering of the RRset will match the
4790                       one specified in the zone file.
4791                     </p>
4792                   </td>
4793 </tr>
4794 </tbody>
4795 </table></div>
4796 <p>
4797             For example:
4798           </p>
4799 <pre class="programlisting">rrset-order {
4800    class IN type A name "host.example.com" order random;
4801    order cyclic;
4802 };
4803 </pre>
4804 <p>
4805             will cause any responses for type A records in class IN that
4806             have "<code class="literal">host.example.com</code>" as a
4807             suffix, to always be returned
4808             in random order. All other records are returned in cyclic order.
4809           </p>
4810 <p>
4811             If multiple <span><strong class="command">rrset-order</strong></span> statements
4812             appear,
4813             they are not combined &#8212; the last one applies.
4814           </p>
4815 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4816 <h3 class="title">Note</h3>
4817 <p>
4818               In this release of <acronym class="acronym">BIND</acronym> 9, the
4819               <span><strong class="command">rrset-order</strong></span> statement does not support
4820               "fixed" ordering by default.  Fixed ordering can be enabled
4821               at compile time by specifying "--enable-fixed-rrset" on
4822               the "configure" command line.
4823             </p>
4824 </div>
4825 </div>
4826 <div class="sect3" lang="en">
4827 <div class="titlepage"><div><div><h4 class="title">
4828 <a name="tuning"></a>Tuning</h4></div></div></div>
4829 <div class="variablelist"><dl>
4830 <dt><span class="term"><span><strong class="command">lame-ttl</strong></span></span></dt>
4831 <dd>
4832 <p>
4833                   Sets the number of seconds to cache a
4834                   lame server indication. 0 disables caching. (This is
4835                   <span class="bold"><strong>NOT</strong></span> recommended.)
4836                   The default is <code class="literal">600</code> (10 minutes) and the
4837                   maximum value is
4838                   <code class="literal">1800</code> (30 minutes).
4839                 </p>
4840 <p>
4841                   Lame-ttl also controls the amount of time DNSSEC
4842                   validation failures are cached.  There is a minimum
4843                   of 30 seconds applied to bad cache entries if the
4844                   lame-ttl is set to less than 30 seconds.
4845                 </p>
4846 </dd>
4847 <dt><span class="term"><span><strong class="command">max-ncache-ttl</strong></span></span></dt>
4848 <dd><p>
4849                   To reduce network traffic and increase performance,
4850                   the server stores negative answers. <span><strong class="command">max-ncache-ttl</strong></span> is
4851                   used to set a maximum retention time for these answers in
4852                   the server
4853                   in seconds. The default
4854                   <span><strong class="command">max-ncache-ttl</strong></span> is <code class="literal">10800</code> seconds (3 hours).
4855                   <span><strong class="command">max-ncache-ttl</strong></span> cannot exceed
4856                   7 days and will
4857                   be silently truncated to 7 days if set to a greater value.
4858                 </p></dd>
4859 <dt><span class="term"><span><strong class="command">max-cache-ttl</strong></span></span></dt>
4860 <dd><p>
4861                   Sets the maximum time for which the server will
4862                   cache ordinary (positive) answers. The default is
4863                   one week (7 days).
4864                   A value of zero may cause all queries to return
4865                   SERVFAIL, because of lost caches of intermediate
4866                   RRsets (such as NS and glue AAAA/A records) in the
4867                   resolution process.
4868                 </p></dd>
4869 <dt><span class="term"><span><strong class="command">min-roots</strong></span></span></dt>
4870 <dd>
4871 <p>
4872                   The minimum number of root servers that
4873                   is required for a request for the root servers to be
4874                   accepted. The default
4875                   is <strong class="userinput"><code>2</code></strong>.
4876                 </p>
4877 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4878 <h3 class="title">Note</h3>
4879 <p>
4880                     Not implemented in <acronym class="acronym">BIND</acronym> 9.
4881                   </p>
4882 </div>
4883 </dd>
4884 <dt><span class="term"><span><strong class="command">sig-validity-interval</strong></span></span></dt>
4885 <dd>
4886 <p>
4887                   Specifies the number of days into the future when
4888                   DNSSEC signatures automatically generated as a
4889                   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
4890                   is an optional second field which specifies how
4891                   long before expiry that the signatures will be
4892                   regenerated.  If not specified, the signatures will
4893                   be regenerated at 1/4 of base interval.  The second
4894                   field is specified in days if the base interval is
4895                   greater than 7 days otherwise it is specified in hours.
4896                   The default base interval is <code class="literal">30</code> days
4897                   giving a re-signing interval of 7 1/2 days.  The maximum
4898                   values are 10 years (3660 days).
4899                 </p>
4900 <p>
4901                   The signature inception time is unconditionally
4902                   set to one hour before the current time to allow
4903                   for a limited amount of clock skew.
4904                 </p>
4905 <p>
4906                   The <span><strong class="command">sig-validity-interval</strong></span>
4907                   should be, at least, several multiples of the SOA
4908                   expire interval to allow for reasonable interaction
4909                   between the various timer and expiry dates.
4910                 </p>
4911 </dd>
4912 <dt><span class="term"><span><strong class="command">sig-signing-nodes</strong></span></span></dt>
4913 <dd><p>
4914                   Specify the maximum number of nodes to be
4915                   examined in each quantum when signing a zone with
4916                   a new DNSKEY. The default is
4917                   <code class="literal">100</code>.
4918                 </p></dd>
4919 <dt><span class="term"><span><strong class="command">sig-signing-signatures</strong></span></span></dt>
4920 <dd><p>
4921                   Specify a threshold number of signatures that
4922                   will terminate processing a quantum when signing
4923                   a zone with a new DNSKEY.  The default is
4924                   <code class="literal">10</code>.
4925                 </p></dd>
4926 <dt><span class="term"><span><strong class="command">sig-signing-type</strong></span></span></dt>
4927 <dd>
4928 <p>
4929                   Specify a private RDATA type to be used when generating
4930                   key signing records.  The default is
4931                   <code class="literal">65535</code>.
4932                 </p>
4933 <p>
4934                   It is expected that this parameter may be removed
4935                   in a future version once there is a standard type.
4936                 </p>
4937 </dd>
4938 <dt>
4939 <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>
4940 </dt>
4941 <dd>
4942 <p>
4943                   These options control the server's behavior on refreshing a
4944                   zone
4945                   (querying for SOA changes) or retrying failed transfers.
4946                   Usually the SOA values for the zone are used, but these
4947                   values
4948                   are set by the master, giving slave server administrators
4949                   little
4950                   control over their contents.
4951                 </p>
4952 <p>
4953                   These options allow the administrator to set a minimum and
4954                   maximum
4955                   refresh and retry time either per-zone, per-view, or
4956                   globally.
4957                   These options are valid for slave and stub zones,
4958                   and clamp the SOA refresh and retry times to the specified
4959                   values.
4960                 </p>
4961 <p>
4962                   The following defaults apply.
4963                   <span><strong class="command">min-refresh-time</strong></span> 300 seconds,
4964                   <span><strong class="command">max-refresh-time</strong></span> 2419200 seconds
4965                   (4 weeks), <span><strong class="command">min-retry-time</strong></span> 500 seconds,
4966                   and <span><strong class="command">max-retry-time</strong></span> 1209600 seconds
4967                   (2 weeks).
4968                 </p>
4969 </dd>
4970 <dt><span class="term"><span><strong class="command">edns-udp-size</strong></span></span></dt>
4971 <dd>
4972 <p>
4973                   Sets the advertised EDNS UDP buffer size in bytes
4974                   to control the size of packets received.
4975                   Valid values are 1024 to 4096 (values outside this range
4976                   will be silently adjusted).  The default value
4977                   is 4096.  The usual reason for setting
4978                   <span><strong class="command">edns-udp-size</strong></span> to a non-default
4979                   value is to get UDP answers to pass through broken
4980                   firewalls that block fragmented packets and/or
4981                   block UDP packets that are greater than 512 bytes.
4982                 </p>
4983 <p>
4984                   <span><strong class="command">named</strong></span> will fallback to using 512 bytes
4985                   if it get a series of timeout at the initial value.  512
4986                   bytes is not being offered to encourage sites to fix their
4987                   firewalls.  Small EDNS UDP sizes will result in the
4988                   excessive use of TCP.
4989                 </p>
4990 </dd>
4991 <dt><span class="term"><span><strong class="command">max-udp-size</strong></span></span></dt>
4992 <dd>
4993 <p>
4994                   Sets the maximum EDNS UDP message size
4995                   <span><strong class="command">named</strong></span> will send in bytes.
4996                   Valid values are 512 to 4096 (values outside this
4997                   range will be silently adjusted).  The default
4998                   value is 4096.  The usual reason for setting
4999                   <span><strong class="command">max-udp-size</strong></span> to a non-default
5000                   value is to get UDP answers to pass through broken
5001                   firewalls that block fragmented packets and/or
5002                   block UDP packets that are greater than 512 bytes.
5003                   This is independent of the advertised receive
5004                   buffer (<span><strong class="command">edns-udp-size</strong></span>).
5005                 </p>
5006 <p>
5007                   Setting this to a low value will encourge additional
5008                   TCP traffic to the nameserver.
5009                 </p>
5010 </dd>
5011 <dt><span class="term"><span><strong class="command">masterfile-format</strong></span></span></dt>
5012 <dd><p>Specifies
5013                   the file format of zone files (see
5014                   <a href="Bv9ARM.ch06.html#zonefile_format" title="Additional File Formats">the section called &#8220;Additional File Formats&#8221;</a>).
5015                   The default value is <code class="constant">text</code>, which is the
5016                   standard textual representation.  Files in other formats
5017                   than <code class="constant">text</code> are typically expected
5018                   to be generated by the <span><strong class="command">named-compilezone</strong></span> tool.
5019                   Note that when a zone file in a different format than
5020                   <code class="constant">text</code> is loaded, <span><strong class="command">named</strong></span>
5021                   may omit some of the checks which would be performed for a
5022                   file in the <code class="constant">text</code> format.  In particular,
5023                   <span><strong class="command">check-names</strong></span> checks do not apply
5024                   for the <code class="constant">raw</code> format.  This means
5025                   a zone file in the <code class="constant">raw</code> format
5026                   must be generated with the same check level as that
5027                   specified in the <span><strong class="command">named</strong></span> configuration
5028                   file.  This statement sets the
5029                   <span><strong class="command">masterfile-format</strong></span> for all zones,
5030                   but can be overridden on a per-zone or per-view basis
5031                   by including a <span><strong class="command">masterfile-format</strong></span>
5032                   statement within the <span><strong class="command">zone</strong></span> or
5033                   <span><strong class="command">view</strong></span> block in the configuration
5034                   file.
5035                 </p></dd>
5036 <dt>
5037 <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>
5038 </dt>
5039 <dd>
5040 <p>These set the
5041                   initial value (minimum) and maximum number of recursive
5042                   simultaneous clients for any given query
5043                   (&lt;qname,qtype,qclass&gt;) that the server will accept
5044                   before dropping additional clients.  <span><strong class="command">named</strong></span> will attempt to
5045                   self tune this value and changes will be logged.  The
5046                   default values are 10 and 100.
5047                 </p>
5048 <p>
5049                   This value should reflect how many queries come in for
5050                   a given name in the time it takes to resolve that name.
5051                   If the number of queries exceed this value, <span><strong class="command">named</strong></span> will
5052                   assume that it is dealing with a non-responsive zone
5053                   and will drop additional queries.  If it gets a response
5054                   after dropping queries, it will raise the estimate.  The
5055                   estimate will then be lowered in 20 minutes if it has
5056                   remained unchanged.
5057                 </p>
5058 <p>
5059                   If <span><strong class="command">clients-per-query</strong></span> is set to zero,
5060                   then there is no limit on the number of clients per query
5061                   and no queries will be dropped.
5062                 </p>
5063 <p>
5064                   If <span><strong class="command">max-clients-per-query</strong></span> is set to zero,
5065                   then there is no upper bound other than imposed by
5066                   <span><strong class="command">recursive-clients</strong></span>.
5067                 </p>
5068 </dd>
5069 <dt><span class="term"><span><strong class="command">notify-delay</strong></span></span></dt>
5070 <dd><p>
5071                   The delay, in seconds, between sending sets of notify
5072                   messages for a zone.  The default is five (5) seconds.
5073                 </p></dd>
5074 </dl></div>
5075 </div>
5076 <div class="sect3" lang="en">
5077 <div class="titlepage"><div><div><h4 class="title">
5078 <a name="builtin"></a>Built-in server information zones</h4></div></div></div>
5079 <p>
5080             The server provides some helpful diagnostic information
5081             through a number of built-in zones under the
5082             pseudo-top-level-domain <code class="literal">bind</code> in the
5083             <span><strong class="command">CHAOS</strong></span> class.  These zones are part
5084             of a
5085             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
5086             class
5087             <span><strong class="command">CHAOS</strong></span> which is separate from the
5088             default view of
5089             class <span><strong class="command">IN</strong></span>; therefore, any global
5090             server options
5091             such as <span><strong class="command">allow-query</strong></span> do not apply
5092             the these zones.
5093             If you feel the need to disable these zones, use the options
5094             below, or hide the built-in <span><strong class="command">CHAOS</strong></span>
5095             view by
5096             defining an explicit view of class <span><strong class="command">CHAOS</strong></span>
5097             that matches all clients.
5098           </p>
5099 <div class="variablelist"><dl>
5100 <dt><span class="term"><span><strong class="command">version</strong></span></span></dt>
5101 <dd><p>
5102                   The version the server should report
5103                   via a query of the name <code class="literal">version.bind</code>
5104                   with type <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
5105                   The default is the real version number of this server.
5106                   Specifying <span><strong class="command">version none</strong></span>
5107                   disables processing of the queries.
5108                 </p></dd>
5109 <dt><span class="term"><span><strong class="command">hostname</strong></span></span></dt>
5110 <dd><p>
5111                   The hostname the server should report via a query of
5112                   the name <code class="filename">hostname.bind</code>
5113                   with type <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
5114                   This defaults to the hostname of the machine hosting the
5115                   name server as
5116                   found by the gethostname() function.  The primary purpose of such queries
5117                   is to
5118                   identify which of a group of anycast servers is actually
5119                   answering your queries.  Specifying <span><strong class="command">hostname none;</strong></span>
5120                   disables processing of the queries.
5121                 </p></dd>
5122 <dt><span class="term"><span><strong class="command">server-id</strong></span></span></dt>
5123 <dd><p>
5124                   The ID the server should report when receiving a Name
5125                   Server Identifier (NSID) query, or a query of the name
5126                   <code class="filename">ID.SERVER</code> with type
5127                   <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
5128                   The primary purpose of such queries is to
5129                   identify which of a group of anycast servers is actually
5130                   answering your queries.  Specifying <span><strong class="command">server-id none;</strong></span>
5131                   disables processing of the queries.
5132                   Specifying <span><strong class="command">server-id hostname;</strong></span> will cause <span><strong class="command">named</strong></span> to
5133                   use the hostname as found by the gethostname() function.
5134                   The default <span><strong class="command">server-id</strong></span> is <span><strong class="command">none</strong></span>.
5135                 </p></dd>
5136 </dl></div>
5137 </div>
5138 <div class="sect3" lang="en">
5139 <div class="titlepage"><div><div><h4 class="title">
5140 <a name="empty"></a>Built-in Empty Zones</h4></div></div></div>
5141 <p>
5142             Named has some built-in empty zones (SOA and NS records only).
5143             These are for zones that should normally be answered locally
5144             and which queries should not be sent to the Internet's root
5145             servers.  The official servers which cover these namespaces
5146             return NXDOMAIN responses to these queries.  In particular,
5147             these cover the reverse namespace for addresses from RFC 1918 and
5148             RFC 3330.  They also include the reverse namespace for IPv6 local
5149             address (locally assigned), IPv6 link local addresses, the IPv6
5150             loopback address and the IPv6 unknown address.
5151           </p>
5152 <p>
5153             Named will attempt to determine if a built-in zone already exists
5154             or is active (covered by a forward-only forwarding declaration)
5155             and will not create an empty zone in that case.
5156           </p>
5157 <p>
5158             The current list of empty zones is:
5159             </p>
5160 <div class="itemizedlist"><ul type="disc">
5161 <li>0.IN-ADDR.ARPA</li>
5162 <li>127.IN-ADDR.ARPA</li>
5163 <li>254.169.IN-ADDR.ARPA</li>
5164 <li>2.0.192.IN-ADDR.ARPA</li>
5165 <li>100.51.198.IN-ADDR.ARPA</li>
5166 <li>113.0.203.IN-ADDR.ARPA</li>
5167 <li>255.255.255.255.IN-ADDR.ARPA</li>
5168 <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>
5169 <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>
5170 <li>8.B.D.0.1.0.0.2.IP6.ARPA</li>
5171 <li>D.F.IP6.ARPA</li>
5172 <li>8.E.F.IP6.ARPA</li>
5173 <li>9.E.F.IP6.ARPA</li>
5174 <li>A.E.F.IP6.ARPA</li>
5175 <li>B.E.F.IP6.ARPA</li>
5176 </ul></div>
5177 <p>
5178           </p>
5179 <p>
5180             Empty zones are settable at the view level and only apply to
5181             views of class IN.  Disabled empty zones are only inherited
5182             from options if there are no disabled empty zones specified
5183             at the view level.  To override the options list of disabled
5184             zones, you can disable the root zone at the view level, for example:
5185 </p>
5186 <pre class="programlisting">
5187             disable-empty-zone ".";
5188 </pre>
5189 <p>
5190           </p>
5191 <p>
5192             If you are using the address ranges covered here, you should
5193             already have reverse zones covering the addresses you use.
5194             In practice this appears to not be the case with many queries
5195             being made to the infrastructure servers for names in these
5196             spaces.  So many in fact that sacrificial servers were needed
5197             to be deployed to channel the query load away from the
5198             infrastructure servers.
5199           </p>
5200 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
5201 <h3 class="title">Note</h3>
5202             The real parent servers for these zones should disable all
5203             empty zone under the parent zone they serve.  For the real
5204             root servers, this is all built-in empty zones.  This will
5205             enable them to return referrals to deeper in the tree.
5206           </div>
5207 <div class="variablelist"><dl>
5208 <dt><span class="term"><span><strong class="command">empty-server</strong></span></span></dt>
5209 <dd><p>
5210                   Specify what server name will appear in the returned
5211                   SOA record for empty zones.  If none is specified, then
5212                   the zone's name will be used.
5213                 </p></dd>
5214 <dt><span class="term"><span><strong class="command">empty-contact</strong></span></span></dt>
5215 <dd><p>
5216                   Specify what contact name will appear in the returned
5217                   SOA record for empty zones.  If none is specified, then
5218                   "." will be used.
5219                 </p></dd>
5220 <dt><span class="term"><span><strong class="command">empty-zones-enable</strong></span></span></dt>
5221 <dd><p>
5222                   Enable or disable all empty zones.  By default, they
5223                   are enabled.
5224                 </p></dd>
5225 <dt><span class="term"><span><strong class="command">disable-empty-zone</strong></span></span></dt>
5226 <dd><p>
5227                   Disable individual empty zones.  By default, none are
5228                   disabled.  This option can be specified multiple times.
5229                 </p></dd>
5230 </dl></div>
5231 </div>
5232 <div class="sect3" lang="en">
5233 <div class="titlepage"><div><div><h4 class="title">
5234 <a name="acache"></a>Additional Section Caching</h4></div></div></div>
5235 <p>
5236             The additional section cache, also called <span><strong class="command">acache</strong></span>,
5237             is an internal cache to improve the response performance of BIND 9.
5238             When additional section caching is enabled, BIND 9 will
5239             cache an internal short-cut to the additional section content for
5240             each answer RR.
5241             Note that <span><strong class="command">acache</strong></span> is an internal caching
5242             mechanism of BIND 9, and is not related to the DNS caching
5243             server function.
5244           </p>
5245 <p>
5246             Additional section caching does not change the
5247             response content (except the RRsets ordering of the additional
5248             section, see below), but can improve the response performance
5249             significantly.
5250             It is particularly effective when BIND 9 acts as an authoritative
5251             server for a zone that has many delegations with many glue RRs.
5252           </p>
5253 <p>
5254             In order to obtain the maximum performance improvement
5255             from additional section caching, setting
5256             <span><strong class="command">additional-from-cache</strong></span>
5257             to <span><strong class="command">no</strong></span> is recommended, since the current
5258             implementation of <span><strong class="command">acache</strong></span>
5259             does not short-cut of additional section information from the
5260             DNS cache data.
5261           </p>
5262 <p>
5263             One obvious disadvantage of <span><strong class="command">acache</strong></span> is
5264             that it requires much more
5265             memory for the internal cached data.
5266             Thus, if the response performance does not matter and memory
5267             consumption is much more critical, the
5268             <span><strong class="command">acache</strong></span> mechanism can be
5269             disabled by setting <span><strong class="command">acache-enable</strong></span> to
5270             <span><strong class="command">no</strong></span>.
5271             It is also possible to specify the upper limit of memory
5272             consumption
5273             for acache by using <span><strong class="command">max-acache-size</strong></span>.
5274           </p>
5275 <p>
5276             Additional section caching also has a minor effect on the
5277             RRset ordering in the additional section.
5278             Without <span><strong class="command">acache</strong></span>,
5279             <span><strong class="command">cyclic</strong></span> order is effective for the additional
5280             section as well as the answer and authority sections.
5281             However, additional section caching fixes the ordering when it
5282             first caches an RRset for the additional section, and the same
5283             ordering will be kept in succeeding responses, regardless of the
5284             setting of <span><strong class="command">rrset-order</strong></span>.
5285             The effect of this should be minor, however, since an
5286             RRset in the additional section
5287             typically only contains a small number of RRs (and in many cases
5288             it only contains a single RR), in which case the
5289             ordering does not matter much.
5290           </p>
5291 <p>
5292             The following is a summary of options related to
5293             <span><strong class="command">acache</strong></span>.
5294           </p>
5295 <div class="variablelist"><dl>
5296 <dt><span class="term"><span><strong class="command">acache-enable</strong></span></span></dt>
5297 <dd><p>
5298                   If <span><strong class="command">yes</strong></span>, additional section caching is
5299                   enabled.  The default value is <span><strong class="command">no</strong></span>.
5300                 </p></dd>
5301 <dt><span class="term"><span><strong class="command">acache-cleaning-interval</strong></span></span></dt>
5302 <dd><p>
5303                   The server will remove stale cache entries, based on an LRU
5304                   based
5305                   algorithm, every <span><strong class="command">acache-cleaning-interval</strong></span> minutes.
5306                   The default is 60 minutes.
5307                   If set to 0, no periodic cleaning will occur.
5308                 </p></dd>
5309 <dt><span class="term"><span><strong class="command">max-acache-size</strong></span></span></dt>
5310 <dd><p>
5311                   The maximum amount of memory in bytes to use for the server's acache.
5312                   When the amount of data in the acache reaches this limit,
5313                   the server
5314                   will clean more aggressively so that the limit is not
5315                   exceeded.
5316                   In a server with multiple views, the limit applies
5317                   separately to the
5318                   acache of each view.
5319                   The default is <code class="literal">16M</code>.
5320                 </p></dd>
5321 </dl></div>
5322 </div>
5323 <div class="sect3" lang="en">
5324 <div class="titlepage"><div><div><h4 class="title">
5325 <a name="id2587836"></a>Content Filtering</h4></div></div></div>
5326 <p>
5327             <acronym class="acronym">BIND</acronym> 9 provides the ability to filter
5328             out DNS responses from external DNS servers containing
5329             certain types of data in the answer section.
5330             Specifically, it can reject address (A or AAAA) records if
5331             the corresponding IPv4 or IPv6 addresses match the given
5332             <code class="varname">address_match_list</code> of the
5333             <span><strong class="command">deny-answer-addresses</strong></span> option.
5334             It can also reject CNAME or DNAME records if the "alias"
5335             name (i.e., the CNAME alias or the substituted query name
5336             due to DNAME) matches the
5337             given <code class="varname">namelist</code> of the
5338             <span><strong class="command">deny-answer-aliases</strong></span> option, where
5339             "match" means the alias name is a subdomain of one of
5340             the <code class="varname">name_list</code> elements.
5341             If the optional <code class="varname">namelist</code> is specified
5342             with <span><strong class="command">except-from</strong></span>, records whose query name
5343             matches the list will be accepted regardless of the filter
5344             setting.
5345             Likewise, if the alias name is a subdomain of the
5346             corresponding zone, the <span><strong class="command">deny-answer-aliases</strong></span>
5347             filter will not apply;
5348             for example, even if "example.com" is specified for
5349             <span><strong class="command">deny-answer-aliases</strong></span>,
5350           </p>
5351 <pre class="programlisting">www.example.com. CNAME xxx.example.com.</pre>
5352 <p>
5353             returned by an "example.com" server will be accepted.
5354           </p>
5355 <p>
5356             In the <code class="varname">address_match_list</code> of the
5357             <span><strong class="command">deny-answer-addresses</strong></span> option, only
5358             <code class="varname">ip_addr</code>
5359             and <code class="varname">ip_prefix</code>
5360             are meaningful;
5361             any <code class="varname">key_id</code> will be silently ignored.
5362           </p>
5363 <p>
5364             If a response message is rejected due to the filtering,
5365             the entire message is discarded without being cached, and
5366             a SERVFAIL error will be returned to the client.
5367           </p>
5368 <p>
5369             This filtering is intended to prevent "DNS rebinding attacks," in
5370             which an attacker, in response to a query for a domain name the
5371             attacker controls, returns an IP address within your own network or
5372             an alias name within your own domain.
5373             A naive web browser or script could then serve as an
5374             unintended proxy, allowing the attacker
5375             to get access to an internal node of your local network
5376             that couldn't be externally accessed otherwise.
5377             See the paper available at
5378             <a href="" target="_top">
5379             http://portal.acm.org/citation.cfm?id=1315245.1315298
5380             </a>
5381             for more details about the attacks.
5382           </p>
5383 <p>
5384             For example, if you own a domain named "example.net" and
5385             your internal network uses an IPv4 prefix 192.0.2.0/24,
5386             you might specify the following rules:
5387           </p>
5388 <pre class="programlisting">deny-answer-addresses { 192.0.2.0/24; } except-from { "example.net"; };
5389 deny-answer-aliases { "example.net"; };
5390 </pre>
5391 <p>
5392             If an external attacker lets a web browser in your local
5393             network look up an IPv4 address of "attacker.example.com",
5394             the attacker's DNS server would return a response like this:
5395           </p>
5396 <pre class="programlisting">attacker.example.com. A 192.0.2.1</pre>
5397 <p>
5398             in the answer section.
5399             Since the rdata of this record (the IPv4 address) matches
5400             the specified prefix 192.0.2.0/24, this response will be
5401             ignored.
5402           </p>
5403 <p>
5404             On the other hand, if the browser looks up a legitimate
5405             internal web server "www.example.net" and the
5406             following response is returned to
5407             the <acronym class="acronym">BIND</acronym> 9 server
5408           </p>
5409 <pre class="programlisting">www.example.net. A 192.0.2.2</pre>
5410 <p>
5411             it will be accepted since the owner name "www.example.net"
5412             matches the <span><strong class="command">except-from</strong></span> element,
5413             "example.net".
5414           </p>
5415 <p>
5416             Note that this is not really an attack on the DNS per se.
5417             In fact, there is nothing wrong for an "external" name to
5418             be mapped to your "internal" IP address or domain name
5419             from the DNS point of view.
5420             It might actually be provided for a legitimate purpose,
5421             such as for debugging.
5422             As long as the mapping is provided by the correct owner,
5423             it is not possible or does not make sense to detect
5424             whether the intent of the mapping is legitimate or not
5425             within the DNS.
5426             The "rebinding" attack must primarily be protected at the
5427             application that uses the DNS.
5428             For a large site, however, it may be difficult to protect
5429             all possible applications at once.
5430             This filtering feature is provided only to help such an
5431             operational environment;
5432             it is generally discouraged to turn it on unless you are
5433             very sure you have no other choice and the attack is a
5434             real threat for your applications.
5435           </p>
5436 <p>
5437             Care should be particularly taken if you want to use this
5438             option for addresses within 127.0.0.0/8.
5439             These addresses are obviously "internal", but many
5440             applications conventionally rely on a DNS mapping from
5441             some name to such an address.
5442             Filtering out DNS records containing this address
5443             spuriously can break such applications.
5444           </p>
5445 </div>
5446 </div>
5447 <div class="sect2" lang="en">
5448 <div class="titlepage"><div><div><h3 class="title">
5449 <a name="server_statement_grammar"></a><span><strong class="command">server</strong></span> Statement Grammar</h3></div></div></div>
5450 <pre class="programlisting"><span><strong class="command">server</strong></span> <em class="replaceable"><code>ip_addr[/prefixlen]</code></em> {
5451     [<span class="optional"> bogus <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5452     [<span class="optional"> provide-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5453     [<span class="optional"> request-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5454     [<span class="optional"> edns <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5455     [<span class="optional"> edns-udp-size <em class="replaceable"><code>number</code></em> ; </span>]
5456     [<span class="optional"> max-udp-size <em class="replaceable"><code>number</code></em> ; </span>]
5457     [<span class="optional"> transfers <em class="replaceable"><code>number</code></em> ; </span>]
5458     [<span class="optional"> transfer-format <em class="replaceable"><code>( one-answer | many-answers )</code></em> ; ]</span>]
5459     [<span class="optional"> keys <em class="replaceable"><code>{ string ; [<span class="optional"> string ; [<span class="optional">...</span>]</span>] }</code></em> ; </span>]
5460     [<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>]
5461     [<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>]
5462     [<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>]
5463     [<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>]
5464     [<span class="optional"> query-source [<span class="optional"> address ( <em class="replaceable"><code>ip_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]
5465                   [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]; </span>]
5466     [<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>]
5467                      [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]; </span>]
5468     [<span class="optional"> use-queryport-pool <em class="replaceable"><code>yes_or_no</code></em>; </span>]
5469     [<span class="optional"> queryport-pool-ports <em class="replaceable"><code>number</code></em>; </span>]
5470     [<span class="optional"> queryport-pool-updateinterval <em class="replaceable"><code>number</code></em>; </span>]
5471 };
5472 </pre>
5473 </div>
5474 <div class="sect2" lang="en">
5475 <div class="titlepage"><div><div><h3 class="title">
5476 <a name="server_statement_definition_and_usage"></a><span><strong class="command">server</strong></span> Statement Definition and
5477             Usage</h3></div></div></div>
5478 <p>
5479             The <span><strong class="command">server</strong></span> statement defines
5480             characteristics
5481             to be associated with a remote name server.  If a prefix length is
5482             specified, then a range of servers is covered.  Only the most
5483             specific
5484             server clause applies regardless of the order in
5485             <code class="filename">named.conf</code>.
5486           </p>
5487 <p>
5488             The <span><strong class="command">server</strong></span> statement can occur at
5489             the top level of the
5490             configuration file or inside a <span><strong class="command">view</strong></span>
5491             statement.
5492             If a <span><strong class="command">view</strong></span> statement contains
5493             one or more <span><strong class="command">server</strong></span> statements, only
5494             those
5495             apply to the view and any top-level ones are ignored.
5496             If a view contains no <span><strong class="command">server</strong></span>
5497             statements,
5498             any top-level <span><strong class="command">server</strong></span> statements are
5499             used as
5500             defaults.
5501           </p>
5502 <p>
5503             If you discover that a remote server is giving out bad data,
5504             marking it as bogus will prevent further queries to it. The
5505             default
5506             value of <span><strong class="command">bogus</strong></span> is <span><strong class="command">no</strong></span>.
5507           </p>
5508 <p>
5509             The <span><strong class="command">provide-ixfr</strong></span> clause determines
5510             whether
5511             the local server, acting as master, will respond with an
5512             incremental
5513             zone transfer when the given remote server, a slave, requests it.
5514             If set to <span><strong class="command">yes</strong></span>, incremental transfer
5515             will be provided
5516             whenever possible. If set to <span><strong class="command">no</strong></span>,
5517             all transfers
5518             to the remote server will be non-incremental. If not set, the
5519             value
5520             of the <span><strong class="command">provide-ixfr</strong></span> option in the
5521             view or
5522             global options block is used as a default.
5523           </p>
5524 <p>
5525             The <span><strong class="command">request-ixfr</strong></span> clause determines
5526             whether
5527             the local server, acting as a slave, will request incremental zone
5528             transfers from the given remote server, a master. If not set, the
5529             value of the <span><strong class="command">request-ixfr</strong></span> option in
5530             the view or
5531             global options block is used as a default.
5532           </p>
5533 <p>
5534             IXFR requests to servers that do not support IXFR will
5535             automatically
5536             fall back to AXFR.  Therefore, there is no need to manually list
5537             which servers support IXFR and which ones do not; the global
5538             default
5539             of <span><strong class="command">yes</strong></span> should always work.
5540             The purpose of the <span><strong class="command">provide-ixfr</strong></span> and
5541             <span><strong class="command">request-ixfr</strong></span> clauses is
5542             to make it possible to disable the use of IXFR even when both
5543             master
5544             and slave claim to support it, for example if one of the servers
5545             is buggy and crashes or corrupts data when IXFR is used.
5546           </p>
5547 <p>
5548             The <span><strong class="command">edns</strong></span> clause determines whether
5549             the local server will attempt to use EDNS when communicating
5550             with the remote server.  The default is <span><strong class="command">yes</strong></span>.
5551           </p>
5552 <p>
5553             The <span><strong class="command">edns-udp-size</strong></span> option sets the EDNS UDP size
5554             that is advertised by <span><strong class="command">named</strong></span> when querying the remote server.
5555             Valid values are 512 to 4096 bytes (values outside this range will be
5556             silently adjusted).  This option is useful when you wish to
5557             advertises a different value to this server than the value you
5558             advertise globally, for example, when there is a firewall at the
5559             remote site that is blocking large replies.
5560           </p>
5561 <p>
5562             The <span><strong class="command">max-udp-size</strong></span> option sets the
5563             maximum EDNS UDP message size <span><strong class="command">named</strong></span> will send.  Valid
5564             values are 512 to 4096 bytes (values outside this range will
5565             be silently adjusted).  This option is useful when you
5566             know that there is a firewall that is blocking large
5567             replies from <span><strong class="command">named</strong></span>.
5568           </p>
5569 <p>
5570             The server supports two zone transfer methods. The first, <span><strong class="command">one-answer</strong></span>,
5571             uses one DNS message per resource record transferred. <span><strong class="command">many-answers</strong></span> packs
5572             as many resource records as possible into a message. <span><strong class="command">many-answers</strong></span> is
5573             more efficient, but is only known to be understood by <acronym class="acronym">BIND</acronym> 9, <acronym class="acronym">BIND</acronym>
5574             8.x, and patched versions of <acronym class="acronym">BIND</acronym>
5575             4.9.5. You can specify which method
5576             to use for a server with the <span><strong class="command">transfer-format</strong></span> option.
5577             If <span><strong class="command">transfer-format</strong></span> is not
5578             specified, the <span><strong class="command">transfer-format</strong></span>
5579             specified
5580             by the <span><strong class="command">options</strong></span> statement will be
5581             used.
5582           </p>
5583 <p><span><strong class="command">transfers</strong></span>
5584             is used to limit the number of concurrent inbound zone
5585             transfers from the specified server. If no
5586             <span><strong class="command">transfers</strong></span> clause is specified, the
5587             limit is set according to the
5588             <span><strong class="command">transfers-per-ns</strong></span> option.
5589           </p>
5590 <p>
5591             The <span><strong class="command">keys</strong></span> clause identifies a
5592             <span><strong class="command">key_id</strong></span> defined by the <span><strong class="command">key</strong></span> statement,
5593             to be used for transaction security (TSIG, <a href="Bv9ARM.ch04.html#tsig" title="TSIG">the section called &#8220;TSIG&#8221;</a>)
5594             when talking to the remote server.
5595             When a request is sent to the remote server, a request signature
5596             will be generated using the key specified here and appended to the
5597             message. A request originating from the remote server is not
5598             required
5599             to be signed by this key.
5600           </p>
5601 <p>
5602             Although the grammar of the <span><strong class="command">keys</strong></span>
5603             clause
5604             allows for multiple keys, only a single key per server is
5605             currently
5606             supported.
5607           </p>
5608 <p>
5609             The <span><strong class="command">transfer-source</strong></span> and
5610             <span><strong class="command">transfer-source-v6</strong></span> clauses specify
5611             the IPv4 and IPv6 source
5612             address to be used for zone transfer with the remote server,
5613             respectively.
5614             For an IPv4 remote server, only <span><strong class="command">transfer-source</strong></span> can
5615             be specified.
5616             Similarly, for an IPv6 remote server, only
5617             <span><strong class="command">transfer-source-v6</strong></span> can be
5618             specified.
5619             For more details, see the description of
5620             <span><strong class="command">transfer-source</strong></span> and
5621             <span><strong class="command">transfer-source-v6</strong></span> in
5622             <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
5623           </p>
5624 <p>
5625             The <span><strong class="command">notify-source</strong></span> and
5626             <span><strong class="command">notify-source-v6</strong></span> clauses specify the
5627             IPv4 and IPv6 source address to be used for notify
5628             messages sent to remote servers, respectively.  For an
5629             IPv4 remote server, only <span><strong class="command">notify-source</strong></span>
5630             can be specified.  Similarly, for an IPv6 remote server,
5631             only <span><strong class="command">notify-source-v6</strong></span> can be specified.
5632           </p>
5633 <p>
5634             The <span><strong class="command">query-source</strong></span> and
5635             <span><strong class="command">query-source-v6</strong></span> clauses specify the
5636             IPv4 and IPv6 source address to be used for queries
5637             sent to remote servers, respectively.  For an IPv4
5638             remote server, only <span><strong class="command">query-source</strong></span> can
5639             be specified.  Similarly, for an IPv6 remote server,
5640             only <span><strong class="command">query-source-v6</strong></span> can be specified.
5641           </p>
5642 </div>
5643 <div class="sect2" lang="en">
5644 <div class="titlepage"><div><div><h3 class="title">
5645 <a name="statschannels"></a><span><strong class="command">statistics-channels</strong></span> Statement Grammar</h3></div></div></div>
5646 <pre class="programlisting"><span><strong class="command">statistics-channels</strong></span> {
5647    [ inet ( ip_addr | * ) [ port ip_port ]
5648    [ allow { <em class="replaceable"><code> address_match_list </code></em> } ]; ]
5649    [ inet ...; ]
5650 };
5651 </pre>
5652 </div>
5653 <div class="sect2" lang="en">
5654 <div class="titlepage"><div><div><h3 class="title">
5655 <a name="id2588725"></a><span><strong class="command">statistics-channels</strong></span> Statement Definition and
5656             Usage</h3></div></div></div>
5657 <p>
5658           The <span><strong class="command">statistics-channels</strong></span> statement
5659           declares communication channels to be used by system
5660           administrators to get access to statistics information of
5661           the name server.
5662         </p>
5663 <p>
5664           This statement intends to be flexible to support multiple
5665           communication protocols in the future, but currently only
5666           HTTP access is supported.
5667           It requires that BIND 9 be compiled with libxml2;
5668           the <span><strong class="command">statistics-channels</strong></span> statement is
5669           still accepted even if it is built without the library,
5670           but any HTTP access will fail with an error.
5671         </p>
5672 <p>
5673           An <span><strong class="command">inet</strong></span> control channel is a TCP socket
5674           listening at the specified <span><strong class="command">ip_port</strong></span> on the
5675           specified <span><strong class="command">ip_addr</strong></span>, which can be an IPv4 or IPv6
5676           address.  An <span><strong class="command">ip_addr</strong></span> of <code class="literal">*</code> (asterisk) is
5677           interpreted as the IPv4 wildcard address; connections will be
5678           accepted on any of the system's IPv4 addresses.
5679           To listen on the IPv6 wildcard address,
5680           use an <span><strong class="command">ip_addr</strong></span> of <code class="literal">::</code>.
5681         </p>
5682 <p>
5683           If no port is specified, port 80 is used for HTTP channels.
5684           The asterisk "<code class="literal">*</code>" cannot be used for
5685           <span><strong class="command">ip_port</strong></span>.
5686         </p>
5687 <p>
5688           The attempt of opening a statistics channel is
5689           restricted by the optional <span><strong class="command">allow</strong></span> clause.
5690           Connections to the statistics channel are permitted based on the
5691           <span><strong class="command">address_match_list</strong></span>.
5692           If no <span><strong class="command">allow</strong></span> clause is present,
5693           <span><strong class="command">named</strong></span> accepts connection
5694           attempts from any address; since the statistics may
5695           contain sensitive internal information, it is highly
5696           recommended to restrict the source of connection requests
5697           appropriately.
5698         </p>
5699 <p>
5700           If no <span><strong class="command">statistics-channels</strong></span> statement is present,
5701           <span><strong class="command">named</strong></span> will not open any communication channels.
5702         </p>
5703 </div>
5704 <div class="sect2" lang="en">
5705 <div class="titlepage"><div><div><h3 class="title">
5706 <a name="trusted-keys"></a><span><strong class="command">trusted-keys</strong></span> Statement Grammar</h3></div></div></div>
5707 <pre class="programlisting"><span><strong class="command">trusted-keys</strong></span> {
5708     <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> ;
5709     [<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>]
5710 };
5711 </pre>
5712 </div>
5713 <div class="sect2" lang="en">
5714 <div class="titlepage"><div><div><h3 class="title">
5715 <a name="id2588933"></a><span><strong class="command">trusted-keys</strong></span> Statement Definition
5716             and Usage</h3></div></div></div>
5717 <p>
5718             The <span><strong class="command">trusted-keys</strong></span> statement defines
5719             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
5720             public key for a non-authoritative zone is known, but
5721             cannot be securely obtained through DNS, either because
5722             it is the DNS root zone or because its parent zone is
5723             unsigned.  Once a key has been configured as a trusted
5724             key, it is treated as if it had been validated and
5725             proven secure. The resolver attempts DNSSEC validation
5726             on all DNS data in subdomains of a security root.
5727           </p>
5728 <p>
5729             All keys (and corresponding zones) listed in
5730             <span><strong class="command">trusted-keys</strong></span> are deemed to exist regardless
5731             of what parent zones say.  Similarly for all keys listed in
5732             <span><strong class="command">trusted-keys</strong></span> only those keys are
5733             used to validate the DNSKEY RRset.  The parent's DS RRset
5734             will not be used.
5735           </p>
5736 <p>
5737             The <span><strong class="command">trusted-keys</strong></span> statement can contain
5738             multiple key entries, each consisting of the key's
5739             domain name, flags, protocol, algorithm, and the Base-64
5740             representation of the key data.
5741             Spaces, tabs, newlines and carriage returns are ignored
5742             in the key data, so the configuration may be split up into
5743             multiple lines.
5744           </p>
5745 <p>
5746             <span><strong class="command">trusted-keys</strong></span> may be set at the top level
5747             of <code class="filename">named.conf</code> or within a view.  If it is
5748             set in both places, they are additive: keys defined at the top
5749             level are inherited by all views, but keys defined in a view
5750             are only used within that view.
5751           </p>
5752 </div>
5753 <div class="sect2" lang="en">
5754 <div class="titlepage"><div><div><h3 class="title">
5755 <a name="id2589048"></a><span><strong class="command">managed-keys</strong></span> Statement Grammar</h3></div></div></div>
5756 <pre class="programlisting"><span><strong class="command">managed-keys</strong></span> {
5757     <em class="replaceable"><code>string</code></em> initial-key <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>string</code></em> ;
5758     [<span class="optional"> <em class="replaceable"><code>string</code></em> initial-key <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>string</code></em> ; [<span class="optional">...</span>]</span>]
5759 };
5760 </pre>
5761 </div>
5762 <div class="sect2" lang="en">
5763 <div class="titlepage"><div><div><h3 class="title">
5764 <a name="managed-keys"></a><span><strong class="command">managed-keys</strong></span> Statement Definition
5765             and Usage</h3></div></div></div>
5766 <p>
5767             The <span><strong class="command">managed-keys</strong></span> statement, like 
5768             <span><strong class="command">trusted-keys</strong></span>, defines DNSSEC
5769             security roots.  The difference is that
5770             <span><strong class="command">managed-keys</strong></span> can be kept up to date
5771             automatically, without intervention from the resolver
5772             operator.
5773           </p>
5774 <p>
5775             Suppose, for example, that a zone's key-signing
5776             key was compromised, and the zone owner had to revoke and
5777             replace the key.  A resolver which had the old key in a
5778             <span><strong class="command">trusted-keys</strong></span> statement would be
5779             unable to validate this zone any longer; it would
5780             reply with a SERVFAIL response code.  This would
5781             continue until the resolver operator had updated the
5782             <span><strong class="command">trusted-keys</strong></span> statement with the new key.
5783           </p>
5784 <p>
5785             If, however, the zone were listed in a
5786             <span><strong class="command">managed-keys</strong></span> statement instead, then the
5787             zone owner could add a "stand-by" key to the zone in advance.
5788             <span><strong class="command">named</strong></span> would store the stand-by key, and
5789             when the original key was revoked, <span><strong class="command">named</strong></span>
5790             would be able to transition smoothly to the new key.  It would
5791             also recognize that the old key had been revoked, and cease
5792             using that key to validate answers, minimizing the damage that
5793             the compromised key could do.
5794           </p>
5795 <p>
5796             A <span><strong class="command">managed-keys</strong></span> statement contains a list of
5797             the keys to be managed, along with information about how the
5798             keys are to be initialized for the first time.  The only
5799             initialization method currently supported (as of
5800             <acronym class="acronym">BIND</acronym> 9.7.0) is <code class="literal">initial-key</code>.
5801             This means the <span><strong class="command">managed-keys</strong></span> statement must
5802             contain a copy of the initializing key.  (Future releases may
5803             allow keys to be initialized by other methods, eliminating this
5804             requirement.)
5805           </p>
5806 <p>
5807             Consequently, a <span><strong class="command">managed-keys</strong></span> statement
5808             appears similar to a <span><strong class="command">trusted-keys</strong></span>, differing
5809             in the presence of the second field, containing the keyword
5810             <code class="literal">initial-key</code>.  The difference is, whereas the
5811             keys listed in a <span><strong class="command">trusted-keys</strong></span> continue to be
5812             trusted until they are removed from
5813             <code class="filename">named.conf</code>, an initializing key listed 
5814             in a <span><strong class="command">managed-keys</strong></span> statement is only trusted
5815             <span class="emphasis"><em>once</em></span>: for as long as it takes to load the
5816             managed key database and start the RFC 5011 key maintenance
5817             process.
5818           </p>
5819 <p>
5820             The first time <span><strong class="command">named</strong></span> runs with a managed key
5821             configured in <code class="filename">named.conf</code>, it fetches the
5822             DNSKEY RRset directly from the zone apex, and validates it
5823             using the key specified in the <span><strong class="command">managed-keys</strong></span>
5824             statement.  If the DNSKEY RRset is validly signed, then it is
5825             used as the basis for a new managed keys database.
5826           </p>
5827 <p>
5828             From that point on, whenever <span><strong class="command">named</strong></span> runs, it
5829             sees the <span><strong class="command">managed-keys</strong></span> statement, checks to
5830             make sure RFC 5011 key maintenance has already been initialized
5831             for the specified domain, and if so, it simply moves on.  The
5832             key specified in the <span><strong class="command">managed-keys</strong></span> is not
5833             used to validate answers; it has been superseded by the key or
5834             keys stored in the managed keys database.
5835           </p>
5836 <p>
5837             The next time <span><strong class="command">named</strong></span> runs after a name
5838             has been <span class="emphasis"><em>removed</em></span> from the
5839             <span><strong class="command">managed-keys</strong></span> statement, the corresponding
5840             zone will be removed from the managed keys database,
5841             and RFC 5011 key maintenance will no longer be used for that
5842             domain.
5843           </p>
5844 <p>
5845             <span><strong class="command">named</strong></span> only maintains a single managed keys
5846             database; consequently, unlike <span><strong class="command">trusted-keys</strong></span>,
5847             <span><strong class="command">managed-keys</strong></span> may only be set at the top
5848             level of <code class="filename">named.conf</code>, not within a view.
5849           </p>
5850 <p>
5851             In the current implementation, the managed keys database is
5852             stored as a master-format zone file called
5853             <code class="filename">managed-keys.bind</code>.  When the key database
5854             is changed, the zone is updated.  As with any other dynamic
5855             zone, changes will be written into a journal file,
5856             <code class="filename">managed-keys.bind.jnl</code>.  They are committed
5857             to the master file as soon as possible afterward; in the case
5858             of the managed key database, this will usually occur within 30
5859             seconds.  So, whenever <span><strong class="command">named</strong></span> is using
5860             automatic key maintenace, those two files can be expected to
5861             exist in the working directory.  (For this reason among others,
5862             the working directory should be always be writable by
5863             <span><strong class="command">named</strong></span>.)
5864           </p>
5865 <p>
5866             If the <span><strong class="command">dnssec-lookaside</strong></span> option is
5867             set to <strong class="userinput"><code>auto</code></strong>, <span><strong class="command">named</strong></span>
5868             will automatically initialize a managed key for the
5869             zone <code class="literal">dlv.isc.org</code>.  The key that is
5870             used to initialize the key maintenance process is built
5871             into <span><strong class="command">named</strong></span>, and can be overridden
5872             from <span><strong class="command">bindkeys-file</strong></span>.
5873           </p>
5874 </div>
5875 <div class="sect2" lang="en">
5876 <div class="titlepage"><div><div><h3 class="title">
5877 <a name="view_statement_grammar"></a><span><strong class="command">view</strong></span> Statement Grammar</h3></div></div></div>
5878 <pre class="programlisting"><span><strong class="command">view</strong></span> <em class="replaceable"><code>view_name</code></em>
5879       [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
5880       match-clients { <em class="replaceable"><code>address_match_list</code></em> };
5881       match-destinations { <em class="replaceable"><code>address_match_list</code></em> };
5882       match-recursive-only <em class="replaceable"><code>yes_or_no</code></em> ;
5883       [<span class="optional"> <em class="replaceable"><code>view_option</code></em>; ...</span>]
5884       [<span class="optional"> <em class="replaceable"><code>zone_statement</code></em>; ...</span>]
5885 };
5886 </pre>
5887 </div>
5888 <div class="sect2" lang="en">
5889 <div class="titlepage"><div><div><h3 class="title">
5890 <a name="id2589474"></a><span><strong class="command">view</strong></span> Statement Definition and Usage</h3></div></div></div>
5891 <p>
5892             The <span><strong class="command">view</strong></span> statement is a powerful
5893             feature
5894             of <acronym class="acronym">BIND</acronym> 9 that lets a name server
5895             answer a DNS query differently
5896             depending on who is asking. It is particularly useful for
5897             implementing
5898             split DNS setups without having to run multiple servers.
5899           </p>
5900 <p>
5901             Each <span><strong class="command">view</strong></span> statement defines a view
5902             of the
5903             DNS namespace that will be seen by a subset of clients.  A client
5904             matches
5905             a view if its source IP address matches the
5906             <code class="varname">address_match_list</code> of the view's
5907             <span><strong class="command">match-clients</strong></span> clause and its
5908             destination IP address matches
5909             the <code class="varname">address_match_list</code> of the
5910             view's
5911             <span><strong class="command">match-destinations</strong></span> clause.  If not
5912             specified, both
5913             <span><strong class="command">match-clients</strong></span> and <span><strong class="command">match-destinations</strong></span>
5914             default to matching all addresses.  In addition to checking IP
5915             addresses
5916             <span><strong class="command">match-clients</strong></span> and <span><strong class="command">match-destinations</strong></span>
5917             can also take <span><strong class="command">keys</strong></span> which provide an
5918             mechanism for the
5919             client to select the view.  A view can also be specified
5920             as <span><strong class="command">match-recursive-only</strong></span>, which
5921             means that only recursive
5922             requests from matching clients will match that view.
5923             The order of the <span><strong class="command">view</strong></span> statements is
5924             significant &#8212;
5925             a client request will be resolved in the context of the first
5926             <span><strong class="command">view</strong></span> that it matches.
5927           </p>
5928 <p>
5929             Zones defined within a <span><strong class="command">view</strong></span>
5930             statement will
5931             only be accessible to clients that match the <span><strong class="command">view</strong></span>.
5932             By defining a zone of the same name in multiple views, different
5933             zone data can be given to different clients, for example,
5934             "internal"
5935             and "external" clients in a split DNS setup.
5936           </p>
5937 <p>
5938             Many of the options given in the <span><strong class="command">options</strong></span> statement
5939             can also be used within a <span><strong class="command">view</strong></span>
5940             statement, and then
5941             apply only when resolving queries with that view.  When no
5942             view-specific
5943             value is given, the value in the <span><strong class="command">options</strong></span> statement
5944             is used as a default.  Also, zone options can have default values
5945             specified
5946             in the <span><strong class="command">view</strong></span> statement; these
5947             view-specific defaults
5948             take precedence over those in the <span><strong class="command">options</strong></span> statement.
5949           </p>
5950 <p>
5951             Views are class specific.  If no class is given, class IN
5952             is assumed.  Note that all non-IN views must contain a hint zone,
5953             since only the IN class has compiled-in default hints.
5954           </p>
5955 <p>
5956             If there are no <span><strong class="command">view</strong></span> statements in
5957             the config
5958             file, a default view that matches any client is automatically
5959             created
5960             in class IN. Any <span><strong class="command">zone</strong></span> statements
5961             specified on
5962             the top level of the configuration file are considered to be part
5963             of
5964             this default view, and the <span><strong class="command">options</strong></span>
5965             statement will
5966             apply to the default view. If any explicit <span><strong class="command">view</strong></span>
5967             statements are present, all <span><strong class="command">zone</strong></span>
5968             statements must
5969             occur inside <span><strong class="command">view</strong></span> statements.
5970           </p>
5971 <p>
5972             Here is an example of a typical split DNS setup implemented
5973             using <span><strong class="command">view</strong></span> statements:
5974           </p>
5975 <pre class="programlisting">view "internal" {
5976       // This should match our internal networks.
5977       match-clients { 10.0.0.0/8; };
5978
5979       // Provide recursive service to internal
5980       // clients only.
5981       recursion yes;
5982
5983       // Provide a complete view of the example.com
5984       // zone including addresses of internal hosts.
5985       zone "example.com" {
5986             type master;
5987             file "example-internal.db";
5988       };
5989 };
5990
5991 view "external" {
5992       // Match all clients not matched by the
5993       // previous view.
5994       match-clients { any; };
5995
5996       // Refuse recursive service to external clients.
5997       recursion no;
5998
5999       // Provide a restricted view of the example.com
6000       // zone containing only publicly accessible hosts.
6001       zone "example.com" {
6002            type master;
6003            file "example-external.db";
6004       };
6005 };
6006 </pre>
6007 </div>
6008 <div class="sect2" lang="en">
6009 <div class="titlepage"><div><div><h3 class="title">
6010 <a name="zone_statement_grammar"></a><span><strong class="command">zone</strong></span>
6011             Statement Grammar</h3></div></div></div>
6012 <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>] {
6013     type master;
6014     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6015     [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6016     [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6017     [<span class="optional"> allow-update { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6018     [<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>]
6019     [<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>] ;
6020                   [<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>]
6021     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6022     [<span class="optional"> check-mx (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6023     [<span class="optional"> check-wildcard <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6024     [<span class="optional"> check-integrity <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6025     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
6026     [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
6027     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
6028     [<span class="optional"> journal <em class="replaceable"><code>string</code></em> ; </span>]
6029     [<span class="optional"> max-journal-size <em class="replaceable"><code>size_spec</code></em>; </span>]
6030     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
6031     [<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>]
6032     [<span class="optional"> ixfr-base <em class="replaceable"><code>string</code></em> ; </span>]
6033     [<span class="optional"> ixfr-from-differences <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6034     [<span class="optional"> ixfr-tmp-file <em class="replaceable"><code>string</code></em> ; </span>]
6035     [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6036     [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em> ; </span>]
6037     [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em> ; </span>]
6038     [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em> ; </span>]
6039     [<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>]
6040     [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
6041     [<span class="optional"> notify-to-soa <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6042     [<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>]
6043     [<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>]
6044     [<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>]
6045     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6046     [<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>]
6047     [<span class="optional"> sig-signing-nodes <em class="replaceable"><code>number</code></em> ; </span>]
6048     [<span class="optional"> sig-signing-signatures <em class="replaceable"><code>number</code></em> ; </span>]
6049     [<span class="optional"> sig-signing-type <em class="replaceable"><code>number</code></em> ; </span>]
6050     [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
6051     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6052     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6053     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6054     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6055     [<span class="optional"> key-directory <em class="replaceable"><code>path_name</code></em>; </span>]
6056     [<span class="optional"> auto-dnssec <code class="constant">allow</code>|<code class="constant">maintain</code>|<code class="constant">create</code>|<code class="constant">off</code>; </span>]
6057     [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6058 };
6059
6060 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6061     type slave;
6062     [<span class="optional"> allow-notify { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6063     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6064     [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6065     [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6066     [<span class="optional"> allow-update-forwarding { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6067     [<span class="optional"> update-check-ksk <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6068     [<span class="optional"> dnssec-dnskey-kskonly <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6069     [<span class="optional"> dnssec-secure-to-insecure <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6070     [<span class="optional"> try-tcp-refresh <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6071     [<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>] ;
6072                   [<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>]
6073     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6074     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
6075     [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
6076     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
6077     [<span class="optional"> journal <em class="replaceable"><code>string</code></em> ; </span>]
6078     [<span class="optional"> max-journal-size <em class="replaceable"><code>size_spec</code></em>; </span>]
6079     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
6080     [<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>]
6081     [<span class="optional"> ixfr-base <em class="replaceable"><code>string</code></em> ; </span>]
6082     [<span class="optional"> ixfr-from-differences <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6083     [<span class="optional"> ixfr-tmp-file <em class="replaceable"><code>string</code></em> ; </span>]
6084     [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6085     [<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>
6086                               [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>]
6087                               [<span class="optional">key <em class="replaceable"><code>key</code></em></span>] ) ; [<span class="optional">...</span>] }; </span>]
6088     [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em> ; </span>]
6089     [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em> ; </span>]
6090     [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em> ; </span>]
6091     [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em> ; </span>]
6092     [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em> ; </span>]
6093     [<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>]
6094     [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
6095     [<span class="optional"> notify-to-soa <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6096     [<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>]
6097     [<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>]
6098     [<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>]
6099     [<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>]
6100     [<span class="optional"> alt-transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
6101                              [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6102     [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6103     [<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>]
6104     [<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>]
6105     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6106     [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
6107     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6108     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6109     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6110     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6111     [<span class="optional"> multi-master <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6112     [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6113 };
6114
6115 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6116     type hint;
6117     file <em class="replaceable"><code>string</code></em> ;
6118     [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6119     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>] // Not Implemented.
6120 };
6121
6122 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6123     type stub;
6124     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6125     [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6126     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6127     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
6128     [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6129     [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
6130     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
6131     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
6132     [<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>]
6133     [<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>
6134                               [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>]
6135                               [<span class="optional">key <em class="replaceable"><code>key</code></em></span>] ) ; [<span class="optional">...</span>] }; </span>]
6136     [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em> ; </span>]
6137     [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em> ; </span>]
6138     [<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>]
6139     [<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>]
6140     [<span class="optional"> transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
6141                          [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6142     [<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>]
6143     [<span class="optional"> alt-transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
6144                             [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6145     [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6146     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6147     [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
6148     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6149     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6150     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6151     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6152     [<span class="optional"> multi-master <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6153 };
6154
6155 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6156     type forward;
6157     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
6158     [<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>]
6159     [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6160 };
6161
6162 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6163     type delegation-only;
6164 };
6165
6166 </pre>
6167 </div>
6168 <div class="sect2" lang="en">
6169 <div class="titlepage"><div><div><h3 class="title">
6170 <a name="id2591047"></a><span><strong class="command">zone</strong></span> Statement Definition and Usage</h3></div></div></div>
6171 <div class="sect3" lang="en">
6172 <div class="titlepage"><div><div><h4 class="title">
6173 <a name="id2591054"></a>Zone Types</h4></div></div></div>
6174 <div class="informaltable"><table border="1">
6175 <colgroup>
6176 <col>
6177 <col>
6178 </colgroup>
6179 <tbody>
6180 <tr>
6181 <td>
6182                       <p>
6183                         <code class="varname">master</code>
6184                       </p>
6185                     </td>
6186 <td>
6187                       <p>
6188                         The server has a master copy of the data
6189                         for the zone and will be able to provide authoritative
6190                         answers for
6191                         it.
6192                       </p>
6193                     </td>
6194 </tr>
6195 <tr>
6196 <td>
6197                       <p>
6198                         <code class="varname">slave</code>
6199                       </p>
6200                     </td>
6201 <td>
6202                       <p>
6203                         A slave zone is a replica of a master
6204                         zone. The <span><strong class="command">masters</strong></span> list
6205                         specifies one or more IP addresses
6206                         of master servers that the slave contacts to update
6207                         its copy of the zone.
6208                         Masters list elements can also be names of other
6209                         masters lists.
6210                         By default, transfers are made from port 53 on the
6211                         servers; this can
6212                         be changed for all servers by specifying a port number
6213                         before the
6214                         list of IP addresses, or on a per-server basis after
6215                         the IP address.
6216                         Authentication to the master can also be done with
6217                         per-server TSIG keys.
6218                         If a file is specified, then the
6219                         replica will be written to this file whenever the zone
6220                         is changed,
6221                         and reloaded from this file on a server restart. Use
6222                         of a file is
6223                         recommended, since it often speeds server startup and
6224                         eliminates
6225                         a needless waste of bandwidth. Note that for large
6226                         numbers (in the
6227                         tens or hundreds of thousands) of zones per server, it
6228                         is best to
6229                         use a two-level naming scheme for zone filenames. For
6230                         example,
6231                         a slave server for the zone <code class="literal">example.com</code> might place
6232                         the zone contents into a file called
6233                         <code class="filename">ex/example.com</code> where <code class="filename">ex/</code> is
6234                         just the first two letters of the zone name. (Most
6235                         operating systems
6236                         behave very slowly if you put 100000 files into
6237                         a single directory.)
6238                       </p>
6239                     </td>
6240 </tr>
6241 <tr>
6242 <td>
6243                       <p>
6244                         <code class="varname">stub</code>
6245                       </p>
6246                     </td>
6247 <td>
6248                       <p>
6249                         A stub zone is similar to a slave zone,
6250                         except that it replicates only the NS records of a
6251                         master zone instead
6252                         of the entire zone. Stub zones are not a standard part
6253                         of the DNS;
6254                         they are a feature specific to the <acronym class="acronym">BIND</acronym> implementation.
6255                       </p>
6256
6257                       <p>
6258                         Stub zones can be used to eliminate the need for glue
6259                         NS record
6260                         in a parent zone at the expense of maintaining a stub
6261                         zone entry and
6262                         a set of name server addresses in <code class="filename">named.conf</code>.
6263                         This usage is not recommended for new configurations,
6264                         and BIND 9
6265                         supports it only in a limited way.
6266                         In <acronym class="acronym">BIND</acronym> 4/8, zone
6267                         transfers of a parent zone
6268                         included the NS records from stub children of that
6269                         zone. This meant
6270                         that, in some cases, users could get away with
6271                         configuring child stubs
6272                         only in the master server for the parent zone. <acronym class="acronym">BIND</acronym>
6273                         9 never mixes together zone data from different zones
6274                         in this
6275                         way. Therefore, if a <acronym class="acronym">BIND</acronym> 9 master serving a parent
6276                         zone has child stub zones configured, all the slave
6277                         servers for the
6278                         parent zone also need to have the same child stub
6279                         zones
6280                         configured.
6281                       </p>
6282
6283                       <p>
6284                         Stub zones can also be used as a way of forcing the
6285                         resolution
6286                         of a given domain to use a particular set of
6287                         authoritative servers.
6288                         For example, the caching name servers on a private
6289                         network using
6290                         RFC1918 addressing may be configured with stub zones
6291                         for
6292                         <code class="literal">10.in-addr.arpa</code>
6293                         to use a set of internal name servers as the
6294                         authoritative
6295                         servers for that domain.
6296                       </p>
6297                     </td>
6298 </tr>
6299 <tr>
6300 <td>
6301                       <p>
6302                         <code class="varname">forward</code>
6303                       </p>
6304                     </td>
6305 <td>
6306                       <p>
6307                         A "forward zone" is a way to configure
6308                         forwarding on a per-domain basis.  A <span><strong class="command">zone</strong></span> statement
6309                         of type <span><strong class="command">forward</strong></span> can
6310                         contain a <span><strong class="command">forward</strong></span>
6311                         and/or <span><strong class="command">forwarders</strong></span>
6312                         statement,
6313                         which will apply to queries within the domain given by
6314                         the zone
6315                         name. If no <span><strong class="command">forwarders</strong></span>
6316                         statement is present or
6317                         an empty list for <span><strong class="command">forwarders</strong></span> is given, then no
6318                         forwarding will be done for the domain, canceling the
6319                         effects of
6320                         any forwarders in the <span><strong class="command">options</strong></span> statement. Thus
6321                         if you want to use this type of zone to change the
6322                         behavior of the
6323                         global <span><strong class="command">forward</strong></span> option
6324                         (that is, "forward first"
6325                         to, then "forward only", or vice versa, but want to
6326                         use the same
6327                         servers as set globally) you need to re-specify the
6328                         global forwarders.
6329                       </p>
6330                     </td>
6331 </tr>
6332 <tr>
6333 <td>
6334                       <p>
6335                         <code class="varname">hint</code>
6336                       </p>
6337                     </td>
6338 <td>
6339                       <p>
6340                         The initial set of root name servers is
6341                         specified using a "hint zone". When the server starts
6342                         up, it uses
6343                         the root hints to find a root name server and get the
6344                         most recent
6345                         list of root name servers. If no hint zone is
6346                         specified for class
6347                         IN, the server uses a compiled-in default set of root
6348                         servers hints.
6349                         Classes other than IN have no built-in defaults hints.
6350                       </p>
6351                     </td>
6352 </tr>
6353 <tr>
6354 <td>
6355                       <p>
6356                         <code class="varname">delegation-only</code>
6357                       </p>
6358                     </td>
6359 <td>
6360                       <p>
6361                         This is used to enforce the delegation-only
6362                         status of infrastructure zones (e.g. COM,
6363                         NET, ORG).  Any answer that is received
6364                         without an explicit or implicit delegation
6365                         in the authority section will be treated
6366                         as NXDOMAIN.  This does not apply to the
6367                         zone apex.  This should not be applied to
6368                         leaf zones.
6369                       </p>
6370                       <p>
6371                         <code class="varname">delegation-only</code> has no
6372                         effect on answers received from forwarders.
6373                       </p>
6374                       <p>
6375                         See caveats in <a href="Bv9ARM.ch06.html#root_delegation_only"><span><strong class="command">root-delegation-only</strong></span></a>.
6376                       </p>
6377                     </td>
6378 </tr>
6379 </tbody>
6380 </table></div>
6381 </div>
6382 <div class="sect3" lang="en">
6383 <div class="titlepage"><div><div><h4 class="title">
6384 <a name="id2591414"></a>Class</h4></div></div></div>
6385 <p>
6386               The zone's name may optionally be followed by a class. If
6387               a class is not specified, class <code class="literal">IN</code> (for <code class="varname">Internet</code>),
6388               is assumed. This is correct for the vast majority of cases.
6389             </p>
6390 <p>
6391               The <code class="literal">hesiod</code> class is
6392               named for an information service from MIT's Project Athena. It
6393               is
6394               used to share information about various systems databases, such
6395               as users, groups, printers and so on. The keyword
6396               <code class="literal">HS</code> is
6397               a synonym for hesiod.
6398             </p>
6399 <p>
6400               Another MIT development is Chaosnet, a LAN protocol created
6401               in the mid-1970s. Zone data for it can be specified with the <code class="literal">CHAOS</code> class.
6402             </p>
6403 </div>
6404 <div class="sect3" lang="en">
6405 <div class="titlepage"><div><div><h4 class="title">
6406 <a name="id2591447"></a>Zone Options</h4></div></div></div>
6407 <div class="variablelist"><dl>
6408 <dt><span class="term"><span><strong class="command">allow-notify</strong></span></span></dt>
6409 <dd><p>
6410                     See the description of
6411                     <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>.
6412                   </p></dd>
6413 <dt><span class="term"><span><strong class="command">allow-query</strong></span></span></dt>
6414 <dd><p>
6415                     See the description of
6416                     <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>.
6417                   </p></dd>
6418 <dt><span class="term"><span><strong class="command">allow-query-on</strong></span></span></dt>
6419 <dd><p>
6420                     See the description of
6421                     <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>.
6422                   </p></dd>
6423 <dt><span class="term"><span><strong class="command">allow-transfer</strong></span></span></dt>
6424 <dd><p>
6425                     See the description of <span><strong class="command">allow-transfer</strong></span>
6426                     in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
6427                   </p></dd>
6428 <dt><span class="term"><span><strong class="command">allow-update</strong></span></span></dt>
6429 <dd><p>
6430                     See the description of <span><strong class="command">allow-update</strong></span>
6431                     in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
6432                   </p></dd>
6433 <dt><span class="term"><span><strong class="command">update-policy</strong></span></span></dt>
6434 <dd><p>
6435                     Specifies a "Simple Secure Update" policy. See
6436                     <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called &#8220;Dynamic Update Policies&#8221;</a>.
6437                   </p></dd>
6438 <dt><span class="term"><span><strong class="command">allow-update-forwarding</strong></span></span></dt>
6439 <dd><p>
6440                     See the description of <span><strong class="command">allow-update-forwarding</strong></span>
6441                     in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
6442                   </p></dd>
6443 <dt><span class="term"><span><strong class="command">also-notify</strong></span></span></dt>
6444 <dd><p>
6445                     Only meaningful if <span><strong class="command">notify</strong></span>
6446                     is
6447                     active for this zone. The set of machines that will
6448                     receive a
6449                     <code class="literal">DNS NOTIFY</code> message
6450                     for this zone is made up of all the listed name servers
6451                     (other than
6452                     the primary master) for the zone plus any IP addresses
6453                     specified
6454                     with <span><strong class="command">also-notify</strong></span>. A port
6455                     may be specified
6456                     with each <span><strong class="command">also-notify</strong></span>
6457                     address to send the notify
6458                     messages to a port other than the default of 53.
6459                     <span><strong class="command">also-notify</strong></span> is not
6460                     meaningful for stub zones.
6461                     The default is the empty list.
6462                   </p></dd>
6463 <dt><span class="term"><span><strong class="command">check-names</strong></span></span></dt>
6464 <dd><p>
6465                     This option is used to restrict the character set and
6466                     syntax of
6467                     certain domain names in master files and/or DNS responses
6468                     received from the
6469                     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>
6470                     zones the default is <span><strong class="command">warn</strong></span>.
6471                     It is not implemented for <span><strong class="command">hint</strong></span> zones.
6472                   </p></dd>
6473 <dt><span class="term"><span><strong class="command">check-mx</strong></span></span></dt>
6474 <dd><p>
6475                     See the description of
6476                     <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>.
6477                   </p></dd>
6478 <dt><span class="term"><span><strong class="command">check-wildcard</strong></span></span></dt>
6479 <dd><p>
6480                     See the description of
6481                     <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>.
6482                   </p></dd>
6483 <dt><span class="term"><span><strong class="command">check-integrity</strong></span></span></dt>
6484 <dd><p>
6485                     See the description of
6486                     <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>.
6487                   </p></dd>
6488 <dt><span class="term"><span><strong class="command">check-sibling</strong></span></span></dt>
6489 <dd><p>
6490                     See the description of
6491                     <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>.
6492                   </p></dd>
6493 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl</strong></span></span></dt>
6494 <dd><p>
6495                     See the description of
6496                     <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>.
6497                   </p></dd>
6498 <dt><span class="term"><span><strong class="command">update-check-ksk</strong></span></span></dt>
6499 <dd><p>
6500                     See the description of
6501                     <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>.
6502                   </p></dd>
6503 <dt><span class="term"><span><strong class="command">dnssec-dnskey-kskonly</strong></span></span></dt>
6504 <dd><p>
6505                     See the description of
6506                     <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>.
6507                   </p></dd>
6508 <dt><span class="term"><span><strong class="command">try-tcp-refresh</strong></span></span></dt>
6509 <dd><p>
6510                     See the description of
6511                     <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>.
6512                   </p></dd>
6513 <dt><span class="term"><span><strong class="command">database</strong></span></span></dt>
6514 <dd>
6515 <p>
6516                     Specify the type of database to be used for storing the
6517                     zone data.  The string following the <span><strong class="command">database</strong></span> keyword
6518                     is interpreted as a list of whitespace-delimited words.
6519                     The first word
6520                     identifies the database type, and any subsequent words are
6521                     passed
6522                     as arguments to the database to be interpreted in a way
6523                     specific
6524                     to the database type.
6525                   </p>
6526 <p>
6527                     The default is <strong class="userinput"><code>"rbt"</code></strong>, BIND 9's
6528                     native in-memory
6529                     red-black-tree database.  This database does not take
6530                     arguments.
6531                   </p>
6532 <p>
6533                     Other values are possible if additional database drivers
6534                     have been linked into the server.  Some sample drivers are
6535                     included
6536                     with the distribution but none are linked in by default.
6537                   </p>
6538 </dd>
6539 <dt><span class="term"><span><strong class="command">dialup</strong></span></span></dt>
6540 <dd><p>
6541                     See the description of
6542                     <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>.
6543                   </p></dd>
6544 <dt><span class="term"><span><strong class="command">delegation-only</strong></span></span></dt>
6545 <dd>
6546 <p>
6547                     The flag only applies to hint and stub zones.  If set
6548                     to <strong class="userinput"><code>yes</code></strong>, then the zone will also be
6549                     treated as if it is also a delegation-only type zone.
6550                   </p>
6551 <p>
6552                     See caveats in <a href="Bv9ARM.ch06.html#root_delegation_only"><span><strong class="command">root-delegation-only</strong></span></a>.
6553                   </p>
6554 </dd>
6555 <dt><span class="term"><span><strong class="command">forward</strong></span></span></dt>
6556 <dd><p>
6557                     Only meaningful if the zone has a forwarders
6558                     list. The <span><strong class="command">only</strong></span> value causes
6559                     the lookup to fail
6560                     after trying the forwarders and getting no answer, while <span><strong class="command">first</strong></span> would
6561                     allow a normal lookup to be tried.
6562                   </p></dd>
6563 <dt><span class="term"><span><strong class="command">forwarders</strong></span></span></dt>
6564 <dd><p>
6565                     Used to override the list of global forwarders.
6566                     If it is not specified in a zone of type <span><strong class="command">forward</strong></span>,
6567                     no forwarding is done for the zone and the global options are
6568                     not used.
6569                   </p></dd>
6570 <dt><span class="term"><span><strong class="command">ixfr-base</strong></span></span></dt>
6571 <dd><p>
6572                     Was used in <acronym class="acronym">BIND</acronym> 8 to
6573                     specify the name
6574                     of the transaction log (journal) file for dynamic update
6575                     and IXFR.
6576                     <acronym class="acronym">BIND</acronym> 9 ignores the option
6577                     and constructs the name of the journal
6578                     file by appending "<code class="filename">.jnl</code>"
6579                     to the name of the
6580                     zone file.
6581                   </p></dd>
6582 <dt><span class="term"><span><strong class="command">ixfr-tmp-file</strong></span></span></dt>
6583 <dd><p>
6584                     Was an undocumented option in <acronym class="acronym">BIND</acronym> 8.
6585                     Ignored in <acronym class="acronym">BIND</acronym> 9.
6586                   </p></dd>
6587 <dt><span class="term"><span><strong class="command">journal</strong></span></span></dt>
6588 <dd><p>
6589                     Allow the default journal's filename to be overridden.
6590                     The default is the zone's filename with "<code class="filename">.jnl</code>" appended.
6591                     This is applicable to <span><strong class="command">master</strong></span> and <span><strong class="command">slave</strong></span> zones.
6592                   </p></dd>
6593 <dt><span class="term"><span><strong class="command">max-journal-size</strong></span></span></dt>
6594 <dd><p>
6595                     See the description of
6596                     <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>.
6597                   </p></dd>
6598 <dt><span class="term"><span><strong class="command">max-transfer-time-in</strong></span></span></dt>
6599 <dd><p>
6600                     See the description of
6601                     <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>.
6602                   </p></dd>
6603 <dt><span class="term"><span><strong class="command">max-transfer-idle-in</strong></span></span></dt>
6604 <dd><p>
6605                     See the description of
6606                     <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>.
6607                   </p></dd>
6608 <dt><span class="term"><span><strong class="command">max-transfer-time-out</strong></span></span></dt>
6609 <dd><p>
6610                     See the description of
6611                     <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>.
6612                   </p></dd>
6613 <dt><span class="term"><span><strong class="command">max-transfer-idle-out</strong></span></span></dt>
6614 <dd><p>
6615                     See the description of
6616                     <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>.
6617                   </p></dd>
6618 <dt><span class="term"><span><strong class="command">notify</strong></span></span></dt>
6619 <dd><p>
6620                     See the description of
6621                     <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>.
6622                   </p></dd>
6623 <dt><span class="term"><span><strong class="command">notify-delay</strong></span></span></dt>
6624 <dd><p>
6625                     See the description of
6626                     <span><strong class="command">notify-delay</strong></span> in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
6627                   </p></dd>
6628 <dt><span class="term"><span><strong class="command">notify-to-soa</strong></span></span></dt>
6629 <dd><p>
6630                     See the description of
6631                     <span><strong class="command">notify-to-soa</strong></span> in
6632                     <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
6633                   </p></dd>
6634 <dt><span class="term"><span><strong class="command">pubkey</strong></span></span></dt>
6635 <dd><p>
6636                     In <acronym class="acronym">BIND</acronym> 8, this option was
6637                     intended for specifying
6638                     a public zone key for verification of signatures in DNSSEC
6639                     signed
6640                     zones when they are loaded from disk. <acronym class="acronym">BIND</acronym> 9 does not verify signatures
6641                     on load and ignores the option.
6642                   </p></dd>
6643 <dt><span class="term"><span><strong class="command">zone-statistics</strong></span></span></dt>
6644 <dd><p>
6645                     If <strong class="userinput"><code>yes</code></strong>, the server will keep
6646                     statistical
6647                     information for this zone, which can be dumped to the
6648                     <span><strong class="command">statistics-file</strong></span> defined in
6649                     the server options.
6650                   </p></dd>
6651 <dt><span class="term"><span><strong class="command">sig-validity-interval</strong></span></span></dt>
6652 <dd><p>
6653                     See the description of
6654                     <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>.
6655                   </p></dd>
6656 <dt><span class="term"><span><strong class="command">sig-signing-nodes</strong></span></span></dt>
6657 <dd><p>
6658                     See the description of
6659                     <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>.
6660                   </p></dd>
6661 <dt><span class="term"><span><strong class="command">sig-signing-signatures</strong></span></span></dt>
6662 <dd><p>
6663                     See the description of
6664                     <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>.
6665                   </p></dd>
6666 <dt><span class="term"><span><strong class="command">sig-signing-type</strong></span></span></dt>
6667 <dd><p>
6668                     See the description of
6669                     <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>.
6670                   </p></dd>
6671 <dt><span class="term"><span><strong class="command">transfer-source</strong></span></span></dt>
6672 <dd><p>
6673                     See the description of
6674                     <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>.
6675                   </p></dd>
6676 <dt><span class="term"><span><strong class="command">transfer-source-v6</strong></span></span></dt>
6677 <dd><p>
6678                     See the description of
6679                     <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>.
6680                   </p></dd>
6681 <dt><span class="term"><span><strong class="command">alt-transfer-source</strong></span></span></dt>
6682 <dd><p>
6683                     See the description of
6684                     <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>.
6685                   </p></dd>
6686 <dt><span class="term"><span><strong class="command">alt-transfer-source-v6</strong></span></span></dt>
6687 <dd><p>
6688                     See the description of
6689                     <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>.
6690                   </p></dd>
6691 <dt><span class="term"><span><strong class="command">use-alt-transfer-source</strong></span></span></dt>
6692 <dd><p>
6693                     See the description of
6694                     <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>.
6695                   </p></dd>
6696 <dt><span class="term"><span><strong class="command">notify-source</strong></span></span></dt>
6697 <dd><p>
6698                     See the description of
6699                     <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>.
6700                   </p></dd>
6701 <dt><span class="term"><span><strong class="command">notify-source-v6</strong></span></span></dt>
6702 <dd><p>
6703                     See the description of
6704                     <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>.
6705                   </p></dd>
6706 <dt>
6707 <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>
6708 </dt>
6709 <dd><p>
6710                     See the description in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
6711                   </p></dd>
6712 <dt><span class="term"><span><strong class="command">ixfr-from-differences</strong></span></span></dt>
6713 <dd><p>
6714                     See the description of
6715                     <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>.
6716                     (Note that the <span><strong class="command">ixfr-from-differences</strong></span>
6717                     <strong class="userinput"><code>master</code></strong> and
6718                     <strong class="userinput"><code>slave</code></strong> choices are not
6719                     available at the zone level.)
6720                   </p></dd>
6721 <dt><span class="term"><span><strong class="command">key-directory</strong></span></span></dt>
6722 <dd><p>
6723                     See the description of
6724                     <span><strong class="command">key-directory</strong></span> in <a href="Bv9ARM.ch06.html#options" title="options Statement Definition and
6725           Usage">the section called &#8220;<span><strong class="command">options</strong></span> Statement Definition and
6726           Usage&#8221;</a>.
6727                   </p></dd>
6728 <dt><span class="term"><span><strong class="command">auto-dnssec</strong></span></span></dt>
6729 <dd>
6730 <p>
6731                     Zones configured for dynamic DNS may also use this
6732                     option to allow varying levels of autonatic DNSSEC key
6733                     management. There are four possible settings:
6734                   </p>
6735 <p>
6736                     <span><strong class="command">auto-dnssec allow;</strong></span> permits
6737                     keys to be updated and the zone fully re-signed
6738                     whenever the user issues the command <span><strong class="command">rndc sign
6739                     <em class="replaceable"><code>zonename</code></em></strong></span>.
6740                   </p>
6741 <p>
6742                     <span><strong class="command">auto-dnssec maintain;</strong></span> includes the
6743                     above, but also automatically adjusts the zone's DNSSEC
6744                     keys on schedule, according to the keys' timing metadata
6745                     (see <a href="man.dnssec-keygen.html" title="dnssec-keygen"><span class="refentrytitle"><span class="application">dnssec-keygen</span></span>(8)</a> and
6746                     <a href="man.dnssec-settime.html" title="dnssec-settime"><span class="refentrytitle"><span class="application">dnssec-settime</span></span>(8)</a>).  The command
6747                     <span><strong class="command">rndc sign
6748                     <em class="replaceable"><code>zonename</code></em></strong></span> causes
6749                     <span><strong class="command">named</strong></span> to load keys from the key
6750                     repository and sign the zone with all keys that are
6751                     active. 
6752                     <span><strong class="command">rndc loadkeys
6753                     <em class="replaceable"><code>zonename</code></em></strong></span> causes
6754                     <span><strong class="command">named</strong></span> to load keys from the key
6755                     repository and schedule key maintenance events to occur
6756                     in the future, but it does not sign the full zone
6757                     immediately.
6758                   </p>
6759 <p>
6760                     <span><strong class="command">auto-dnssec create;</strong></span> includes the
6761                     above, but also allows <span><strong class="command">named</strong></span>
6762                     to create new keys in the key repository when needed.
6763                     (NOTE: This option is not yet implemented; the syntax is
6764                     being reserved for future use.)
6765                   </p>
6766 <p>
6767                     The default setting is <span><strong class="command">auto-dnssec off</strong></span>.
6768                   </p>
6769 </dd>
6770 <dt><span class="term"><span><strong class="command">multi-master</strong></span></span></dt>
6771 <dd><p>
6772                     See the description of <span><strong class="command">multi-master</strong></span> in
6773                     <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
6774                   </p></dd>
6775 <dt><span class="term"><span><strong class="command">masterfile-format</strong></span></span></dt>
6776 <dd><p>
6777                     See the description of <span><strong class="command">masterfile-format</strong></span>
6778                     in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
6779                   </p></dd>
6780 <dt><span class="term"><span><strong class="command">dnssec-secure-to-insecure</strong></span></span></dt>
6781 <dd><p>
6782                     See the description of
6783                     <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>.
6784                   </p></dd>
6785 </dl></div>
6786 </div>
6787 <div class="sect3" lang="en">
6788 <div class="titlepage"><div><div><h4 class="title">
6789 <a name="dynamic_update_policies"></a>Dynamic Update Policies</h4></div></div></div>
6790 <p><acronym class="acronym">BIND</acronym> 9 supports two alternative
6791               methods of granting clients the right to perform
6792               dynamic updates to a zone, configured by the
6793               <span><strong class="command">allow-update</strong></span> and
6794               <span><strong class="command">update-policy</strong></span> option, respectively.
6795             </p>
6796 <p>
6797               The <span><strong class="command">allow-update</strong></span> clause works the
6798               same way as in previous versions of <acronym class="acronym">BIND</acronym>.
6799               It grants given clients the permission to update any
6800               record of any name in the zone.
6801             </p>
6802 <p>
6803               The <span><strong class="command">update-policy</strong></span> clause
6804               allows more fine-grained control over what updates are
6805               allowed.  A set of rules is specified, where each rule
6806               either grants or denies permissions for one or more
6807               names to be updated by one or more identities.  If
6808               the dynamic update request message is signed (that is,
6809               it includes either a TSIG or SIG(0) record), the
6810               identity of the signer can be determined.
6811             </p>
6812 <p>
6813               Rules are specified in the <span><strong class="command">update-policy</strong></span>
6814               zone option, and are only meaningful for master zones.
6815               When the <span><strong class="command">update-policy</strong></span> statement
6816               is present, it is a configuration error for the
6817               <span><strong class="command">allow-update</strong></span> statement to be
6818               present.  The <span><strong class="command">update-policy</strong></span> statement
6819               only examines the signer of a message; the source
6820               address is not relevant.
6821             </p>
6822 <p>
6823               There is a pre-defined <span><strong class="command">update-policy</strong></span>
6824               rule which can be switched on with the command
6825               <span><strong class="command">update-policy local;</strong></span>.
6826               Switching on this rule in a zone causes
6827               <span><strong class="command">named</strong></span> to generate a TSIG session
6828               key and place it in a file, and to allow that key
6829               to update the zone.  (By default, the file is
6830               <code class="filename">/var/run/named/session.key</code>, the key
6831               name is "local-ddns" and the key algorithm is HMAC-SHA256,
6832               but these values are configurable with the
6833               <span><strong class="command">session-keyfile</strong></span>,
6834               <span><strong class="command">session-keyname</strong></span> and
6835               <span><strong class="command">session-keyalg</strong></span> options, respectively).
6836             </p>
6837 <p>
6838               A client running on the local system, and with appropriate
6839               permissions, may read that file and use the key to sign update
6840               requests.  The zone's update policy will be set to allow that
6841               key to change any record within the zone.  Assuming the
6842               key name is "local-ddns", this policy is equivalent to:
6843             </p>
6844 <pre class="programlisting">update-policy { grant local-ddns zonesub any; };
6845             </pre>
6846 <p>
6847               The command <span><strong class="command">nsupdate -l</strong></span> sends update
6848               requests to localhost, and signs them using the session key.
6849             </p>
6850 <p>
6851               Other rule definitions look like this:
6852             </p>
6853 <pre class="programlisting">
6854 ( <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>]
6855 </pre>
6856 <p>
6857               Each rule grants or denies privileges.  Once a message has
6858               successfully matched a rule, the operation is immediately
6859               granted or denied and no further rules are examined.  A rule
6860               is matched when the signer matches the identity field, the
6861               name matches the name field in accordance with the nametype
6862               field, and the type matches the types specified in the type
6863               field.
6864             </p>
6865 <p>
6866               No signer is required for <em class="replaceable"><code>tcp-self</code></em>
6867               or <em class="replaceable"><code>6to4-self</code></em> however the standard
6868               reverse mapping / prefix conversion must match the identity
6869               field.
6870             </p>
6871 <p>
6872               The identity field specifies a name or a wildcard
6873               name.  Normally, this is the name of the TSIG or
6874               SIG(0) key used to sign the update request.  When a
6875               TKEY exchange has been used to create a shared secret,
6876               the identity of the shared secret is the same as the
6877               identity of the key used to authenticate the TKEY
6878               exchange.  TKEY is also the negotiation method used
6879               by GSS-TSIG, which establishes an identity that is
6880               the Kerberos principal of the client, such as
6881               <strong class="userinput"><code>"user@host.domain"</code></strong>.  When the
6882               <em class="replaceable"><code>identity</code></em> field specifies
6883               a wildcard name, it is subject to DNS wildcard
6884               expansion, so the rule will apply to multiple identities.
6885               The <em class="replaceable"><code>identity</code></em> field must
6886               contain a fully-qualified domain name.
6887             </p>
6888 <p>
6889               The <em class="replaceable"><code>nametype</code></em> field has 13
6890               values:
6891               <code class="varname">name</code>, <code class="varname">subdomain</code>,
6892               <code class="varname">wildcard</code>, <code class="varname">self</code>,
6893               <code class="varname">selfsub</code>, <code class="varname">selfwild</code>,
6894               <code class="varname">krb5-self</code>, <code class="varname">ms-self</code>,
6895               <code class="varname">krb5-subdomain</code>,
6896               <code class="varname">ms-subdomain</code>,
6897               <code class="varname">tcp-self</code>, <code class="varname">6to4-self</code>,
6898               and <code class="varname">zonesub</code>.
6899             </p>
6900 <div class="informaltable"><table border="1">
6901 <colgroup>
6902 <col>
6903 <col>
6904 </colgroup>
6905 <tbody>
6906 <tr>
6907 <td>
6908                       <p>
6909                         <code class="varname">name</code>
6910                       </p>
6911                     </td>
6912 <td>
6913                       <p>
6914                         Exact-match semantics.  This rule matches
6915                         when the name being updated is identical
6916                         to the contents of the
6917                         <em class="replaceable"><code>name</code></em> field.
6918                       </p>
6919                     </td>
6920 </tr>
6921 <tr>
6922 <td>
6923                       <p>
6924                         <code class="varname">subdomain</code>
6925                       </p>
6926                     </td>
6927 <td>
6928                       <p>
6929                         This rule matches when the name being updated
6930                         is a subdomain of, or identical to, the
6931                         contents of the <em class="replaceable"><code>name</code></em>
6932                         field.
6933                       </p>
6934                     </td>
6935 </tr>
6936 <tr>
6937 <td>
6938                       <p>
6939                         <code class="varname">zonesub</code>
6940                       </p>
6941                     </td>
6942 <td>
6943                       <p>
6944                         This rule is similar to subdomain, except that
6945                         it matches when the name being updated is a
6946                         subdomain of the zone in which the
6947                         <span><strong class="command">update-policy</strong></span> statement
6948                         appears.  This obviates the need to type the zone
6949                         name twice, and enables the use of a standard
6950                         <span><strong class="command">update-policy</strong></span> statement in
6951                         multiple zones without modification.
6952                       </p>
6953                       <p>
6954                         When this rule is used, the
6955                         <em class="replaceable"><code>name</code></em> field is omitted.
6956                       </p>
6957                     </td>
6958 </tr>
6959 <tr>
6960 <td>
6961                       <p>
6962                         <code class="varname">wildcard</code>
6963                       </p>
6964                     </td>
6965 <td>
6966                       <p>
6967                         The <em class="replaceable"><code>name</code></em> field
6968                         is subject to DNS wildcard expansion, and
6969                         this rule matches when the name being updated
6970                         name is a valid expansion of the wildcard.
6971                       </p>
6972                     </td>
6973 </tr>
6974 <tr>
6975 <td>
6976                       <p>
6977                         <code class="varname">self</code>
6978                       </p>
6979                     </td>
6980 <td>
6981                       <p>
6982                         This rule matches when the name being updated
6983                         matches the contents of the
6984                         <em class="replaceable"><code>identity</code></em> field.
6985                         The <em class="replaceable"><code>name</code></em> field
6986                         is ignored, but should be the same as the
6987                         <em class="replaceable"><code>identity</code></em> field.
6988                         The <code class="varname">self</code> nametype is
6989                         most useful when allowing using one key per
6990                         name to update, where the key has the same
6991                         name as the name to be updated.  The
6992                         <em class="replaceable"><code>identity</code></em> would
6993                         be specified as <code class="constant">*</code> (an asterisk) in
6994                         this case.
6995                       </p>
6996                     </td>
6997 </tr>
6998 <tr>
6999 <td>
7000                       <p>
7001                         <code class="varname">selfsub</code>
7002                       </p>
7003                     </td>
7004 <td>
7005                       <p>
7006                         This rule is similar to <code class="varname">self</code>
7007                         except that subdomains of <code class="varname">self</code>
7008                         can also be updated.
7009                       </p>
7010                     </td>
7011 </tr>
7012 <tr>
7013 <td>
7014                       <p>
7015                         <code class="varname">selfwild</code>
7016                       </p>
7017                     </td>
7018 <td>
7019                       <p>
7020                         This rule is similar to <code class="varname">self</code>
7021                         except that only subdomains of
7022                         <code class="varname">self</code> can be updated.
7023                       </p>
7024                     </td>
7025 </tr>
7026 <tr>
7027 <td>
7028                       <p>
7029                         <code class="varname">tcp-self</code>
7030                       </p>
7031                     </td>
7032 <td>
7033                       <p>
7034                         Allow updates that have been sent via TCP and
7035                         for which the standard mapping from the initiating
7036                         IP address into the IN-ADDR.ARPA and IP6.ARPA
7037                         namespaces match the name to be updated.
7038                       </p>
7039                       <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
7040 <h3 class="title">Note</h3>
7041                         It is theoretically possible to spoof these TCP
7042                         sessions.
7043                       </div>
7044                     </td>
7045 </tr>
7046 <tr>
7047 <td>
7048                       <p>
7049                         <code class="varname">6to4-self</code>
7050                       </p>
7051                     </td>
7052 <td>
7053                       <p>
7054                         Allow the 6to4 prefix to be update by any TCP
7055                         connection from the 6to4 network or from the
7056                         corresponding IPv4 address.  This is intended
7057                         to allow NS or DNAME RRsets to be added to the
7058                         reverse tree.
7059                       </p>
7060                       <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
7061 <h3 class="title">Note</h3>
7062                         It is theoretically possible to spoof these TCP
7063                         sessions.
7064                       </div>
7065                     </td>
7066 </tr>
7067 </tbody>
7068 </table></div>
7069 <p>
7070               In all cases, the <em class="replaceable"><code>name</code></em>
7071               field must
7072               specify a fully-qualified domain name.
7073             </p>
7074 <p>
7075               If no types are explicitly specified, this rule matches
7076               all types except RRSIG, NS, SOA, NSEC and NSEC3. Types
7077               may be specified by name, including "ANY" (ANY matches
7078               all types except NSEC and NSEC3, which can never be
7079               updated).  Note that when an attempt is made to delete
7080               all records associated with a name, the rules are
7081               checked for each existing record type.
7082             </p>
7083 </div>
7084 </div>
7085 </div>
7086 <div class="sect1" lang="en">
7087 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
7088 <a name="id2593802"></a>Zone File</h2></div></div></div>
7089 <div class="sect2" lang="en">
7090 <div class="titlepage"><div><div><h3 class="title">
7091 <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>
7092 <p>
7093             This section, largely borrowed from RFC 1034, describes the
7094             concept of a Resource Record (RR) and explains when each is used.
7095             Since the publication of RFC 1034, several new RRs have been
7096             identified
7097             and implemented in the DNS. These are also included.
7098           </p>
7099 <div class="sect3" lang="en">
7100 <div class="titlepage"><div><div><h4 class="title">
7101 <a name="id2593820"></a>Resource Records</h4></div></div></div>
7102 <p>
7103               A domain name identifies a node.  Each node has a set of
7104               resource information, which may be empty.  The set of resource
7105               information associated with a particular name is composed of
7106               separate RRs. The order of RRs in a set is not significant and
7107               need not be preserved by name servers, resolvers, or other
7108               parts of the DNS. However, sorting of multiple RRs is
7109               permitted for optimization purposes, for example, to specify
7110               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>.
7111             </p>
7112 <p>
7113               The components of a Resource Record are:
7114             </p>
7115 <div class="informaltable"><table border="1">
7116 <colgroup>
7117 <col>
7118 <col>
7119 </colgroup>
7120 <tbody>
7121 <tr>
7122 <td>
7123                       <p>
7124                         owner name
7125                       </p>
7126                     </td>
7127 <td>
7128                       <p>
7129                         The domain name where the RR is found.
7130                       </p>
7131                     </td>
7132 </tr>
7133 <tr>
7134 <td>
7135                       <p>
7136                         type
7137                       </p>
7138                     </td>
7139 <td>
7140                       <p>
7141                         An encoded 16-bit value that specifies
7142                         the type of the resource record.
7143                       </p>
7144                     </td>
7145 </tr>
7146 <tr>
7147 <td>
7148                       <p>
7149                         TTL
7150                       </p>
7151                     </td>
7152 <td>
7153                       <p>
7154                         The time-to-live of the RR. This field
7155                         is a 32-bit integer in units of seconds, and is
7156                         primarily used by
7157                         resolvers when they cache RRs. The TTL describes how
7158                         long a RR can
7159                         be cached before it should be discarded.
7160                       </p>
7161                     </td>
7162 </tr>
7163 <tr>
7164 <td>
7165                       <p>
7166                         class
7167                       </p>
7168                     </td>
7169 <td>
7170                       <p>
7171                         An encoded 16-bit value that identifies
7172                         a protocol family or instance of a protocol.
7173                       </p>
7174                     </td>
7175 </tr>
7176 <tr>
7177 <td>
7178                       <p>
7179                         RDATA
7180                       </p>
7181                     </td>
7182 <td>
7183                       <p>
7184                         The resource data.  The format of the
7185                         data is type (and sometimes class) specific.
7186                       </p>
7187                     </td>
7188 </tr>
7189 </tbody>
7190 </table></div>
7191 <p>
7192               The following are <span class="emphasis"><em>types</em></span> of valid RRs:
7193             </p>
7194 <div class="informaltable"><table border="1">
7195 <colgroup>
7196 <col>
7197 <col>
7198 </colgroup>
7199 <tbody>
7200 <tr>
7201 <td>
7202                       <p>
7203                         A
7204                       </p>
7205                     </td>
7206 <td>
7207                       <p>
7208                         A host address.  In the IN class, this is a
7209                         32-bit IP address.  Described in RFC 1035.
7210                       </p>
7211                     </td>
7212 </tr>
7213 <tr>
7214 <td>
7215                       <p>
7216                         AAAA
7217                       </p>
7218                     </td>
7219 <td>
7220                       <p>
7221                         IPv6 address.  Described in RFC 1886.
7222                       </p>
7223                     </td>
7224 </tr>
7225 <tr>
7226 <td>
7227                       <p>
7228                         A6
7229                       </p>
7230                     </td>
7231 <td>
7232                       <p>
7233                         IPv6 address.  This can be a partial
7234                         address (a suffix) and an indirection to the name
7235                         where the rest of the
7236                         address (the prefix) can be found.  Experimental.
7237                         Described in RFC 2874.
7238                       </p>
7239                     </td>
7240 </tr>
7241 <tr>
7242 <td>
7243                       <p>
7244                         AFSDB
7245                       </p>
7246                     </td>
7247 <td>
7248                       <p>
7249                         Location of AFS database servers.
7250                         Experimental.  Described in RFC 1183.
7251                       </p>
7252                     </td>
7253 </tr>
7254 <tr>
7255 <td>
7256                       <p>
7257                         APL
7258                       </p>
7259                     </td>
7260 <td>
7261                       <p>
7262                         Address prefix list.  Experimental.
7263                         Described in RFC 3123.
7264                       </p>
7265                     </td>
7266 </tr>
7267 <tr>
7268 <td>
7269                       <p>
7270                         CERT
7271                       </p>
7272                     </td>
7273 <td>
7274                       <p>
7275                         Holds a digital certificate.
7276                         Described in RFC 2538.
7277                       </p>
7278                     </td>
7279 </tr>
7280 <tr>
7281 <td>
7282                       <p>
7283                         CNAME
7284                       </p>
7285                     </td>
7286 <td>
7287                       <p>
7288                         Identifies the canonical name of an alias.
7289                         Described in RFC 1035.
7290                       </p>
7291                     </td>
7292 </tr>
7293 <tr>
7294 <td>
7295                       <p>
7296                         DHCID
7297                       </p>
7298                     </td>
7299 <td>
7300                       <p>
7301                         Is used for identifying which DHCP client is
7302                         associated with this name.  Described in RFC 4701.
7303                       </p>
7304                     </td>
7305 </tr>
7306 <tr>
7307 <td>
7308                       <p>
7309                         DNAME
7310                       </p>
7311                     </td>
7312 <td>
7313                       <p>
7314                         Replaces the domain name specified with
7315                         another name to be looked up, effectively aliasing an
7316                         entire
7317                         subtree of the domain name space rather than a single
7318                         record
7319                         as in the case of the CNAME RR.
7320                         Described in RFC 2672.
7321                       </p>
7322                     </td>
7323 </tr>
7324 <tr>
7325 <td>
7326                       <p>
7327                         DNSKEY
7328                       </p>
7329                     </td>
7330 <td>
7331                       <p>
7332                         Stores a public key associated with a signed
7333                         DNS zone.  Described in RFC 4034.
7334                       </p>
7335                     </td>
7336 </tr>
7337 <tr>
7338 <td>
7339                       <p>
7340                         DS
7341                       </p>
7342                     </td>
7343 <td>
7344                       <p>
7345                         Stores the hash of a public key associated with a
7346                         signed DNS zone.  Described in RFC 4034.
7347                       </p>
7348                     </td>
7349 </tr>
7350 <tr>
7351 <td>
7352                       <p>
7353                         GPOS
7354                       </p>
7355                     </td>
7356 <td>
7357                       <p>
7358                         Specifies the global position.  Superseded by LOC.
7359                       </p>
7360                     </td>
7361 </tr>
7362 <tr>
7363 <td>
7364                       <p>
7365                         HINFO
7366                       </p>
7367                     </td>
7368 <td>
7369                       <p>
7370                         Identifies the CPU and OS used by a host.
7371                         Described in RFC 1035.
7372                       </p>
7373                     </td>
7374 </tr>
7375 <tr>
7376 <td>
7377                       <p>
7378                         IPSECKEY
7379                       </p>
7380                     </td>
7381 <td>
7382                       <p>
7383                         Provides a method for storing IPsec keying material in
7384                         DNS.  Described in RFC 4025.
7385                       </p>
7386                     </td>
7387 </tr>
7388 <tr>
7389 <td>
7390                       <p>
7391                         ISDN
7392                       </p>
7393                     </td>
7394 <td>
7395                       <p>
7396                         Representation of ISDN addresses.
7397                         Experimental.  Described in RFC 1183.
7398                       </p>
7399                     </td>
7400 </tr>
7401 <tr>
7402 <td>
7403                       <p>
7404                         KEY
7405                       </p>
7406                     </td>
7407 <td>
7408                       <p>
7409                         Stores a public key associated with a
7410                         DNS name.  Used in original DNSSEC; replaced
7411                         by DNSKEY in DNSSECbis, but still used with
7412                         SIG(0).  Described in RFCs 2535 and 2931.
7413                       </p>
7414                     </td>
7415 </tr>
7416 <tr>
7417 <td>
7418                       <p>
7419                         KX
7420                       </p>
7421                     </td>
7422 <td>
7423                       <p>
7424                         Identifies a key exchanger for this
7425                         DNS name.  Described in RFC 2230.
7426                       </p>
7427                     </td>
7428 </tr>
7429 <tr>
7430 <td>
7431                       <p>
7432                         LOC
7433                       </p>
7434                     </td>
7435 <td>
7436                       <p>
7437                         For storing GPS info.  Described in RFC 1876.
7438                         Experimental.
7439                       </p>
7440                     </td>
7441 </tr>
7442 <tr>
7443 <td>
7444                       <p>
7445                         MX
7446                       </p>
7447                     </td>
7448 <td>
7449                       <p>
7450                         Identifies a mail exchange for the domain with
7451                         a 16-bit preference value (lower is better)
7452                         followed by the host name of the mail exchange.
7453                         Described in RFC 974, RFC 1035.
7454                       </p>
7455                     </td>
7456 </tr>
7457 <tr>
7458 <td>
7459                       <p>
7460                         NAPTR
7461                       </p>
7462                     </td>
7463 <td>
7464                       <p>
7465                         Name authority pointer.  Described in RFC 2915.
7466                       </p>
7467                     </td>
7468 </tr>
7469 <tr>
7470 <td>
7471                       <p>
7472                         NSAP
7473                       </p>
7474                     </td>
7475 <td>
7476                       <p>
7477                         A network service access point.
7478                         Described in RFC 1706.
7479                       </p>
7480                     </td>
7481 </tr>
7482 <tr>
7483 <td>
7484                       <p>
7485                         NS
7486                       </p>
7487                     </td>
7488 <td>
7489                       <p>
7490                         The authoritative name server for the
7491                         domain.  Described in RFC 1035.
7492                       </p>
7493                     </td>
7494 </tr>
7495 <tr>
7496 <td>
7497                       <p>
7498                         NSEC
7499                       </p>
7500                     </td>
7501 <td>
7502                       <p>
7503                         Used in DNSSECbis to securely indicate that
7504                         RRs with an owner name in a certain name interval do
7505                         not exist in
7506                         a zone and indicate what RR types are present for an
7507                         existing name.
7508                         Described in RFC 4034.
7509                       </p>
7510                     </td>
7511 </tr>
7512 <tr>
7513 <td>
7514                       <p>
7515                         NSEC3
7516                       </p>
7517                     </td>
7518 <td>
7519                       <p>
7520                         Used in DNSSECbis to securely indicate that
7521                         RRs with an owner name in a certain name
7522                         interval do not exist in a zone and indicate
7523                         what RR types are present for an existing
7524                         name.  NSEC3 differs from NSEC in that it
7525                         prevents zone enumeration but is more
7526                         computationally expensive on both the server
7527                         and the client than NSEC.  Described in RFC
7528                         5155.
7529                       </p>
7530                     </td>
7531 </tr>
7532 <tr>
7533 <td>
7534                       <p>
7535                         NSEC3PARAM
7536                       </p>
7537                     </td>
7538 <td>
7539                       <p>
7540                         Used in DNSSECbis to tell the authoritative
7541                         server which NSEC3 chains are available to use.
7542                         Described in RFC 5155.
7543                       </p>
7544                     </td>
7545 </tr>
7546 <tr>
7547 <td>
7548                       <p>
7549                         NXT
7550                       </p>
7551                     </td>
7552 <td>
7553                       <p>
7554                         Used in DNSSEC to securely indicate that
7555                         RRs with an owner name in a certain name interval do
7556                         not exist in
7557                         a zone and indicate what RR types are present for an
7558                         existing name.
7559                         Used in original DNSSEC; replaced by NSEC in
7560                         DNSSECbis.
7561                         Described in RFC 2535.
7562                       </p>
7563                     </td>
7564 </tr>
7565 <tr>
7566 <td>
7567                       <p>
7568                         PTR
7569                       </p>
7570                     </td>
7571 <td>
7572                       <p>
7573                         A pointer to another part of the domain
7574                         name space.  Described in RFC 1035.
7575                       </p>
7576                     </td>
7577 </tr>
7578 <tr>
7579 <td>
7580                       <p>
7581                         PX
7582                       </p>
7583                     </td>
7584 <td>
7585                       <p>
7586                         Provides mappings between RFC 822 and X.400
7587                         addresses.  Described in RFC 2163.
7588                       </p>
7589                     </td>
7590 </tr>
7591 <tr>
7592 <td>
7593                       <p>
7594                         RP
7595                       </p>
7596                     </td>
7597 <td>
7598                       <p>
7599                         Information on persons responsible
7600                         for the domain.  Experimental.  Described in RFC 1183.
7601                       </p>
7602                     </td>
7603 </tr>
7604 <tr>
7605 <td>
7606                       <p>
7607                         RRSIG
7608                       </p>
7609                     </td>
7610 <td>
7611                       <p>
7612                         Contains DNSSECbis signature data.  Described
7613                         in RFC 4034.
7614                       </p>
7615                     </td>
7616 </tr>
7617 <tr>
7618 <td>
7619                       <p>
7620                         RT
7621                       </p>
7622                     </td>
7623 <td>
7624                       <p>
7625                         Route-through binding for hosts that
7626                         do not have their own direct wide area network
7627                         addresses.
7628                         Experimental.  Described in RFC 1183.
7629                       </p>
7630                     </td>
7631 </tr>
7632 <tr>
7633 <td>
7634                       <p>
7635                         SIG
7636                       </p>
7637                     </td>
7638 <td>
7639                       <p>
7640                         Contains DNSSEC signature data.  Used in
7641                         original DNSSEC; replaced by RRSIG in
7642                         DNSSECbis, but still used for SIG(0).
7643                         Described in RFCs 2535 and 2931.
7644                       </p>
7645                     </td>
7646 </tr>
7647 <tr>
7648 <td>
7649                       <p>
7650                         SOA
7651                       </p>
7652                     </td>
7653 <td>
7654                       <p>
7655                         Identifies the start of a zone of authority.
7656                         Described in RFC 1035.
7657                       </p>
7658                     </td>
7659 </tr>
7660 <tr>
7661 <td>
7662                       <p>
7663                         SPF
7664                       </p>
7665                     </td>
7666 <td>
7667                       <p>
7668                         Contains the Sender Policy Framework information
7669                         for a given email domain.  Described in RFC 4408.
7670                       </p>
7671                     </td>
7672 </tr>
7673 <tr>
7674 <td>
7675                       <p>
7676                         SRV
7677                       </p>
7678                     </td>
7679 <td>
7680                       <p>
7681                         Information about well known network
7682                         services (replaces WKS).  Described in RFC 2782.
7683                       </p>
7684                     </td>
7685 </tr>
7686 <tr>
7687 <td>
7688                       <p>
7689                         SSHFP
7690                       </p>
7691                     </td>
7692 <td>
7693                       <p>
7694                         Provides a way to securely publish a secure shell key's
7695                         fingerprint.  Described in RFC 4255.
7696                       </p>
7697                     </td>
7698 </tr>
7699 <tr>
7700 <td>
7701                       <p>
7702                         TXT
7703                       </p>
7704                     </td>
7705 <td>
7706                       <p>
7707                         Text records.  Described in RFC 1035.
7708                       </p>
7709                     </td>
7710 </tr>
7711 <tr>
7712 <td>
7713                       <p>
7714                         WKS
7715                       </p>
7716                     </td>
7717 <td>
7718                       <p>
7719                         Information about which well known
7720                         network services, such as SMTP, that a domain
7721                         supports. Historical.
7722                       </p>
7723                     </td>
7724 </tr>
7725 <tr>
7726 <td>
7727                       <p>
7728                         X25
7729                       </p>
7730                     </td>
7731 <td>
7732                       <p>
7733                         Representation of X.25 network addresses.
7734                         Experimental.  Described in RFC 1183.
7735                       </p>
7736                     </td>
7737 </tr>
7738 </tbody>
7739 </table></div>
7740 <p>
7741               The following <span class="emphasis"><em>classes</em></span> of resource records
7742               are currently valid in the DNS:
7743             </p>
7744 <div class="informaltable"><table border="1">
7745 <colgroup>
7746 <col>
7747 <col>
7748 </colgroup>
7749 <tbody>
7750 <tr>
7751 <td>
7752                       <p>
7753                         IN
7754                       </p>
7755                     </td>
7756 <td>
7757                       <p>
7758                         The Internet.
7759                       </p>
7760                     </td>
7761 </tr>
7762 <tr>
7763 <td>
7764                       <p>
7765                         CH
7766                       </p>
7767                     </td>
7768 <td>
7769                       <p>
7770                         Chaosnet, a LAN protocol created at MIT in the
7771                         mid-1970s.
7772                         Rarely used for its historical purpose, but reused for
7773                         BIND's
7774                         built-in server information zones, e.g.,
7775                         <code class="literal">version.bind</code>.
7776                       </p>
7777                     </td>
7778 </tr>
7779 <tr>
7780 <td>
7781                       <p>
7782                         HS
7783                       </p>
7784                     </td>
7785 <td>
7786                       <p>
7787                         Hesiod, an information service
7788                         developed by MIT's Project Athena. It is used to share
7789                         information
7790                         about various systems databases, such as users,
7791                         groups, printers
7792                         and so on.
7793                       </p>
7794                     </td>
7795 </tr>
7796 </tbody>
7797 </table></div>
7798 <p>
7799               The owner name is often implicit, rather than forming an
7800               integral
7801               part of the RR.  For example, many name servers internally form
7802               tree
7803               or hash structures for the name space, and chain RRs off nodes.
7804               The remaining RR parts are the fixed header (type, class, TTL)
7805               which is consistent for all RRs, and a variable part (RDATA)
7806               that
7807               fits the needs of the resource being described.
7808             </p>
7809 <p>
7810               The meaning of the TTL field is a time limit on how long an
7811               RR can be kept in a cache.  This limit does not apply to
7812               authoritative
7813               data in zones; it is also timed out, but by the refreshing
7814               policies
7815               for the zone.  The TTL is assigned by the administrator for the
7816               zone where the data originates.  While short TTLs can be used to
7817               minimize caching, and a zero TTL prohibits caching, the
7818               realities
7819               of Internet performance suggest that these times should be on
7820               the
7821               order of days for the typical host.  If a change can be
7822               anticipated,
7823               the TTL can be reduced prior to the change to minimize
7824               inconsistency
7825               during the change, and then increased back to its former value
7826               following
7827               the change.
7828             </p>
7829 <p>
7830               The data in the RDATA section of RRs is carried as a combination
7831               of binary strings and domain names.  The domain names are
7832               frequently
7833               used as "pointers" to other data in the DNS.
7834             </p>
7835 </div>
7836 <div class="sect3" lang="en">
7837 <div class="titlepage"><div><div><h4 class="title">
7838 <a name="id2595512"></a>Textual expression of RRs</h4></div></div></div>
7839 <p>
7840               RRs are represented in binary form in the packets of the DNS
7841               protocol, and are usually represented in highly encoded form
7842               when
7843               stored in a name server or resolver.  In the examples provided
7844               in
7845               RFC 1034, a style similar to that used in master files was
7846               employed
7847               in order to show the contents of RRs.  In this format, most RRs
7848               are shown on a single line, although continuation lines are
7849               possible
7850               using parentheses.
7851             </p>
7852 <p>
7853               The start of the line gives the owner of the RR.  If a line
7854               begins with a blank, then the owner is assumed to be the same as
7855               that of the previous RR.  Blank lines are often included for
7856               readability.
7857             </p>
7858 <p>
7859               Following the owner, we list the TTL, type, and class of the
7860               RR.  Class and type use the mnemonics defined above, and TTL is
7861               an integer before the type field.  In order to avoid ambiguity
7862               in
7863               parsing, type and class mnemonics are disjoint, TTLs are
7864               integers,
7865               and the type mnemonic is always last. The IN class and TTL
7866               values
7867               are often omitted from examples in the interests of clarity.
7868             </p>
7869 <p>
7870               The resource data or RDATA section of the RR are given using
7871               knowledge of the typical representation for the data.
7872             </p>
7873 <p>
7874               For example, we might show the RRs carried in a message as:
7875             </p>
7876 <div class="informaltable"><table border="1">
7877 <colgroup>
7878 <col>
7879 <col>
7880 <col>
7881 </colgroup>
7882 <tbody>
7883 <tr>
7884 <td>
7885                       <p>
7886                         <code class="literal">ISI.EDU.</code>
7887                       </p>
7888                     </td>
7889 <td>
7890                       <p>
7891                         <code class="literal">MX</code>
7892                       </p>
7893                     </td>
7894 <td>
7895                       <p>
7896                         <code class="literal">10 VENERA.ISI.EDU.</code>
7897                       </p>
7898                     </td>
7899 </tr>
7900 <tr>
7901 <td>
7902                       <p></p>
7903                     </td>
7904 <td>
7905                       <p>
7906                         <code class="literal">MX</code>
7907                       </p>
7908                     </td>
7909 <td>
7910                       <p>
7911                         <code class="literal">10 VAXA.ISI.EDU</code>
7912                       </p>
7913                     </td>
7914 </tr>
7915 <tr>
7916 <td>
7917                       <p>
7918                         <code class="literal">VENERA.ISI.EDU</code>
7919                       </p>
7920                     </td>
7921 <td>
7922                       <p>
7923                         <code class="literal">A</code>
7924                       </p>
7925                     </td>
7926 <td>
7927                       <p>
7928                         <code class="literal">128.9.0.32</code>
7929                       </p>
7930                     </td>
7931 </tr>
7932 <tr>
7933 <td>
7934                       <p></p>
7935                     </td>
7936 <td>
7937                       <p>
7938                         <code class="literal">A</code>
7939                       </p>
7940                     </td>
7941 <td>
7942                       <p>
7943                         <code class="literal">10.1.0.52</code>
7944                       </p>
7945                     </td>
7946 </tr>
7947 <tr>
7948 <td>
7949                       <p>
7950                         <code class="literal">VAXA.ISI.EDU</code>
7951                       </p>
7952                     </td>
7953 <td>
7954                       <p>
7955                         <code class="literal">A</code>
7956                       </p>
7957                     </td>
7958 <td>
7959                       <p>
7960                         <code class="literal">10.2.0.27</code>
7961                       </p>
7962                     </td>
7963 </tr>
7964 <tr>
7965 <td>
7966                       <p></p>
7967                     </td>
7968 <td>
7969                       <p>
7970                         <code class="literal">A</code>
7971                       </p>
7972                     </td>
7973 <td>
7974                       <p>
7975                         <code class="literal">128.9.0.33</code>
7976                       </p>
7977                     </td>
7978 </tr>
7979 </tbody>
7980 </table></div>
7981 <p>
7982               The MX RRs have an RDATA section which consists of a 16-bit
7983               number followed by a domain name.  The address RRs use a
7984               standard
7985               IP address format to contain a 32-bit internet address.
7986             </p>
7987 <p>
7988               The above example shows six RRs, with two RRs at each of three
7989               domain names.
7990             </p>
7991 <p>
7992               Similarly we might see:
7993             </p>
7994 <div class="informaltable"><table border="1">
7995 <colgroup>
7996 <col>
7997 <col>
7998 <col>
7999 </colgroup>
8000 <tbody>
8001 <tr>
8002 <td>
8003                       <p>
8004                         <code class="literal">XX.LCS.MIT.EDU.</code>
8005                       </p>
8006                     </td>
8007 <td>
8008                       <p>
8009                         <code class="literal">IN A</code>
8010                       </p>
8011                     </td>
8012 <td>
8013                       <p>
8014                         <code class="literal">10.0.0.44</code>
8015                       </p>
8016                     </td>
8017 </tr>
8018 <tr>
8019 <td> </td>
8020 <td>
8021                       <p>
8022                         <code class="literal">CH A</code>
8023                       </p>
8024                     </td>
8025 <td>
8026                       <p>
8027                         <code class="literal">MIT.EDU. 2420</code>
8028                       </p>
8029                     </td>
8030 </tr>
8031 </tbody>
8032 </table></div>
8033 <p>
8034               This example shows two addresses for
8035               <code class="literal">XX.LCS.MIT.EDU</code>, each of a different class.
8036             </p>
8037 </div>
8038 </div>
8039 <div class="sect2" lang="en">
8040 <div class="titlepage"><div><div><h3 class="title">
8041 <a name="id2596101"></a>Discussion of MX Records</h3></div></div></div>
8042 <p>
8043             As described above, domain servers store information as a
8044             series of resource records, each of which contains a particular
8045             piece of information about a given domain name (which is usually,
8046             but not always, a host). The simplest way to think of a RR is as
8047             a typed pair of data, a domain name matched with a relevant datum,
8048             and stored with some additional type information to help systems
8049             determine when the RR is relevant.
8050           </p>
8051 <p>
8052             MX records are used to control delivery of email. The data
8053             specified in the record is a priority and a domain name. The
8054             priority
8055             controls the order in which email delivery is attempted, with the
8056             lowest number first. If two priorities are the same, a server is
8057             chosen randomly. If no servers at a given priority are responding,
8058             the mail transport agent will fall back to the next largest
8059             priority.
8060             Priority numbers do not have any absolute meaning &#8212; they are
8061             relevant
8062             only respective to other MX records for that domain name. The
8063             domain
8064             name given is the machine to which the mail will be delivered.
8065             It <span class="emphasis"><em>must</em></span> have an associated address record
8066             (A or AAAA) &#8212; CNAME is not sufficient.
8067           </p>
8068 <p>
8069             For a given domain, if there is both a CNAME record and an
8070             MX record, the MX record is in error, and will be ignored.
8071             Instead,
8072             the mail will be delivered to the server specified in the MX
8073             record
8074             pointed to by the CNAME.
8075             For example:
8076           </p>
8077 <div class="informaltable"><table border="1">
8078 <colgroup>
8079 <col>
8080 <col>
8081 <col>
8082 <col>
8083 <col>
8084 </colgroup>
8085 <tbody>
8086 <tr>
8087 <td>
8088                     <p>
8089                       <code class="literal">example.com.</code>
8090                     </p>
8091                   </td>
8092 <td>
8093                     <p>
8094                       <code class="literal">IN</code>
8095                     </p>
8096                   </td>
8097 <td>
8098                     <p>
8099                       <code class="literal">MX</code>
8100                     </p>
8101                   </td>
8102 <td>
8103                     <p>
8104                       <code class="literal">10</code>
8105                     </p>
8106                   </td>
8107 <td>
8108                     <p>
8109                       <code class="literal">mail.example.com.</code>
8110                     </p>
8111                   </td>
8112 </tr>
8113 <tr>
8114 <td>
8115                     <p></p>
8116                   </td>
8117 <td>
8118                     <p>
8119                       <code class="literal">IN</code>
8120                     </p>
8121                   </td>
8122 <td>
8123                     <p>
8124                       <code class="literal">MX</code>
8125                     </p>
8126                   </td>
8127 <td>
8128                     <p>
8129                       <code class="literal">10</code>
8130                     </p>
8131                   </td>
8132 <td>
8133                     <p>
8134                       <code class="literal">mail2.example.com.</code>
8135                     </p>
8136                   </td>
8137 </tr>
8138 <tr>
8139 <td>
8140                     <p></p>
8141                   </td>
8142 <td>
8143                     <p>
8144                       <code class="literal">IN</code>
8145                     </p>
8146                   </td>
8147 <td>
8148                     <p>
8149                       <code class="literal">MX</code>
8150                     </p>
8151                   </td>
8152 <td>
8153                     <p>
8154                       <code class="literal">20</code>
8155                     </p>
8156                   </td>
8157 <td>
8158                     <p>
8159                       <code class="literal">mail.backup.org.</code>
8160                     </p>
8161                   </td>
8162 </tr>
8163 <tr>
8164 <td>
8165                     <p>
8166                       <code class="literal">mail.example.com.</code>
8167                     </p>
8168                   </td>
8169 <td>
8170                     <p>
8171                       <code class="literal">IN</code>
8172                     </p>
8173                   </td>
8174 <td>
8175                     <p>
8176                       <code class="literal">A</code>
8177                     </p>
8178                   </td>
8179 <td>
8180                     <p>
8181                       <code class="literal">10.0.0.1</code>
8182                     </p>
8183                   </td>
8184 <td>
8185                     <p></p>
8186                   </td>
8187 </tr>
8188 <tr>
8189 <td>
8190                     <p>
8191                       <code class="literal">mail2.example.com.</code>
8192                     </p>
8193                   </td>
8194 <td>
8195                     <p>
8196                       <code class="literal">IN</code>
8197                     </p>
8198                   </td>
8199 <td>
8200                     <p>
8201                       <code class="literal">A</code>
8202                     </p>
8203                   </td>
8204 <td>
8205                     <p>
8206                       <code class="literal">10.0.0.2</code>
8207                     </p>
8208                   </td>
8209 <td>
8210                     <p></p>
8211                   </td>
8212 </tr>
8213 </tbody>
8214 </table></div>
8215 <p>
8216             Mail delivery will be attempted to <code class="literal">mail.example.com</code> and
8217             <code class="literal">mail2.example.com</code> (in
8218             any order), and if neither of those succeed, delivery to <code class="literal">mail.backup.org</code> will
8219             be attempted.
8220           </p>
8221 </div>
8222 <div class="sect2" lang="en">
8223 <div class="titlepage"><div><div><h3 class="title">
8224 <a name="Setting_TTLs"></a>Setting TTLs</h3></div></div></div>
8225 <p>
8226             The time-to-live of the RR field is a 32-bit integer represented
8227             in units of seconds, and is primarily used by resolvers when they
8228             cache RRs. The TTL describes how long a RR can be cached before it
8229             should be discarded. The following three types of TTL are
8230             currently
8231             used in a zone file.
8232           </p>
8233 <div class="informaltable"><table border="1">
8234 <colgroup>
8235 <col>
8236 <col>
8237 </colgroup>
8238 <tbody>
8239 <tr>
8240 <td>
8241                     <p>
8242                       SOA
8243                     </p>
8244                   </td>
8245 <td>
8246                     <p>
8247                       The last field in the SOA is the negative
8248                       caching TTL. This controls how long other servers will
8249                       cache no-such-domain
8250                       (NXDOMAIN) responses from you.
8251                     </p>
8252                     <p>
8253                       The maximum time for
8254                       negative caching is 3 hours (3h).
8255                     </p>
8256                   </td>
8257 </tr>
8258 <tr>
8259 <td>
8260                     <p>
8261                       $TTL
8262                     </p>
8263                   </td>
8264 <td>
8265                     <p>
8266                       The $TTL directive at the top of the
8267                       zone file (before the SOA) gives a default TTL for every
8268                       RR without
8269                       a specific TTL set.
8270                     </p>
8271                   </td>
8272 </tr>
8273 <tr>
8274 <td>
8275                     <p>
8276                       RR TTLs
8277                     </p>
8278                   </td>
8279 <td>
8280                     <p>
8281                       Each RR can have a TTL as the second
8282                       field in the RR, which will control how long other
8283                       servers can cache
8284                       the it.
8285                     </p>
8286                   </td>
8287 </tr>
8288 </tbody>
8289 </table></div>
8290 <p>
8291             All of these TTLs default to units of seconds, though units
8292             can be explicitly specified, for example, <code class="literal">1h30m</code>.
8293           </p>
8294 </div>
8295 <div class="sect2" lang="en">
8296 <div class="titlepage"><div><div><h3 class="title">
8297 <a name="id2596648"></a>Inverse Mapping in IPv4</h3></div></div></div>
8298 <p>
8299             Reverse name resolution (that is, translation from IP address
8300             to name) is achieved by means of the <span class="emphasis"><em>in-addr.arpa</em></span> domain
8301             and PTR records. Entries in the in-addr.arpa domain are made in
8302             least-to-most significant order, read left to right. This is the
8303             opposite order to the way IP addresses are usually written. Thus,
8304             a machine with an IP address of 10.1.2.3 would have a
8305             corresponding
8306             in-addr.arpa name of
8307             3.2.1.10.in-addr.arpa. This name should have a PTR resource record
8308             whose data field is the name of the machine or, optionally,
8309             multiple
8310             PTR records if the machine has more than one name. For example,
8311             in the [<span class="optional">example.com</span>] domain:
8312           </p>
8313 <div class="informaltable"><table border="1">
8314 <colgroup>
8315 <col>
8316 <col>
8317 </colgroup>
8318 <tbody>
8319 <tr>
8320 <td>
8321                     <p>
8322                       <code class="literal">$ORIGIN</code>
8323                     </p>
8324                   </td>
8325 <td>
8326                     <p>
8327                       <code class="literal">2.1.10.in-addr.arpa</code>
8328                     </p>
8329                   </td>
8330 </tr>
8331 <tr>
8332 <td>
8333                     <p>
8334                       <code class="literal">3</code>
8335                     </p>
8336                   </td>
8337 <td>
8338                     <p>
8339                       <code class="literal">IN PTR foo.example.com.</code>
8340                     </p>
8341                   </td>
8342 </tr>
8343 </tbody>
8344 </table></div>
8345 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
8346 <h3 class="title">Note</h3>
8347 <p>
8348               The <span><strong class="command">$ORIGIN</strong></span> lines in the examples
8349               are for providing context to the examples only &#8212; they do not
8350               necessarily
8351               appear in the actual usage. They are only used here to indicate
8352               that the example is relative to the listed origin.
8353             </p>
8354 </div>
8355 </div>
8356 <div class="sect2" lang="en">
8357 <div class="titlepage"><div><div><h3 class="title">
8358 <a name="id2596775"></a>Other Zone File Directives</h3></div></div></div>
8359 <p>
8360             The Master File Format was initially defined in RFC 1035 and
8361             has subsequently been extended. While the Master File Format
8362             itself
8363             is class independent all records in a Master File must be of the
8364             same
8365             class.
8366           </p>
8367 <p>
8368             Master File Directives include <span><strong class="command">$ORIGIN</strong></span>, <span><strong class="command">$INCLUDE</strong></span>,
8369             and <span><strong class="command">$TTL.</strong></span>
8370           </p>
8371 <div class="sect3" lang="en">
8372 <div class="titlepage"><div><div><h4 class="title">
8373 <a name="id2596866"></a>The <span><strong class="command">@</strong></span> (at-sign)</h4></div></div></div>
8374 <p>
8375               When used in the label (or name) field, the asperand or
8376               at-sign (@) symbol represents the current origin.
8377               At the start of the zone file, it is the 
8378               &lt;<code class="varname">zone_name</code>&gt; (followed by
8379               trailing dot).
8380             </p>
8381 </div>
8382 <div class="sect3" lang="en">
8383 <div class="titlepage"><div><div><h4 class="title">
8384 <a name="id2596882"></a>The <span><strong class="command">$ORIGIN</strong></span> Directive</h4></div></div></div>
8385 <p>
8386               Syntax: <span><strong class="command">$ORIGIN</strong></span>
8387               <em class="replaceable"><code>domain-name</code></em>
8388               [<span class="optional"><em class="replaceable"><code>comment</code></em></span>]
8389             </p>
8390 <p><span><strong class="command">$ORIGIN</strong></span>
8391               sets the domain name that will be appended to any
8392               unqualified records. When a zone is first read in there
8393               is an implicit <span><strong class="command">$ORIGIN</strong></span>
8394               &lt;<code class="varname">zone_name</code>&gt;<span><strong class="command">.</strong></span>
8395               (followed by trailing dot).
8396               The current <span><strong class="command">$ORIGIN</strong></span> is appended to
8397               the domain specified in the <span><strong class="command">$ORIGIN</strong></span>
8398               argument if it is not absolute.
8399             </p>
8400 <pre class="programlisting">
8401 $ORIGIN example.com.
8402 WWW     CNAME   MAIN-SERVER
8403 </pre>
8404 <p>
8405               is equivalent to
8406             </p>
8407 <pre class="programlisting">
8408 WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
8409 </pre>
8410 </div>
8411 <div class="sect3" lang="en">
8412 <div class="titlepage"><div><div><h4 class="title">
8413 <a name="id2596942"></a>The <span><strong class="command">$INCLUDE</strong></span> Directive</h4></div></div></div>
8414 <p>
8415               Syntax: <span><strong class="command">$INCLUDE</strong></span>
8416               <em class="replaceable"><code>filename</code></em>
8417               [<span class="optional">
8418 <em class="replaceable"><code>origin</code></em> </span>]
8419               [<span class="optional"> <em class="replaceable"><code>comment</code></em> </span>]
8420             </p>
8421 <p>
8422               Read and process the file <code class="filename">filename</code> as
8423               if it were included into the file at this point.  If <span><strong class="command">origin</strong></span> is
8424               specified the file is processed with <span><strong class="command">$ORIGIN</strong></span> set
8425               to that value, otherwise the current <span><strong class="command">$ORIGIN</strong></span> is
8426               used.
8427             </p>
8428 <p>
8429               The origin and the current domain name
8430               revert to the values they had prior to the <span><strong class="command">$INCLUDE</strong></span> once
8431               the file has been read.
8432             </p>
8433 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
8434 <h3 class="title">Note</h3>
8435 <p>
8436                 RFC 1035 specifies that the current origin should be restored
8437                 after
8438                 an <span><strong class="command">$INCLUDE</strong></span>, but it is silent
8439                 on whether the current
8440                 domain name should also be restored.  BIND 9 restores both of
8441                 them.
8442                 This could be construed as a deviation from RFC 1035, a
8443                 feature, or both.
8444               </p>
8445 </div>
8446 </div>
8447 <div class="sect3" lang="en">
8448 <div class="titlepage"><div><div><h4 class="title">
8449 <a name="id2597012"></a>The <span><strong class="command">$TTL</strong></span> Directive</h4></div></div></div>
8450 <p>
8451               Syntax: <span><strong class="command">$TTL</strong></span>
8452               <em class="replaceable"><code>default-ttl</code></em>
8453               [<span class="optional">
8454 <em class="replaceable"><code>comment</code></em> </span>]
8455             </p>
8456 <p>
8457               Set the default Time To Live (TTL) for subsequent records
8458               with undefined TTLs. Valid TTLs are of the range 0-2147483647
8459               seconds.
8460             </p>
8461 <p><span><strong class="command">$TTL</strong></span>
8462                is defined in RFC 2308.
8463             </p>
8464 </div>
8465 </div>
8466 <div class="sect2" lang="en">
8467 <div class="titlepage"><div><div><h3 class="title">
8468 <a name="id2597048"></a><acronym class="acronym">BIND</acronym> Master File Extension: the  <span><strong class="command">$GENERATE</strong></span> Directive</h3></div></div></div>
8469 <p>
8470             Syntax: <span><strong class="command">$GENERATE</strong></span>
8471             <em class="replaceable"><code>range</code></em>
8472             <em class="replaceable"><code>lhs</code></em>
8473             [<span class="optional"><em class="replaceable"><code>ttl</code></em></span>]
8474             [<span class="optional"><em class="replaceable"><code>class</code></em></span>]
8475             <em class="replaceable"><code>type</code></em>
8476             <em class="replaceable"><code>rhs</code></em>
8477             [<span class="optional"><em class="replaceable"><code>comment</code></em></span>]
8478           </p>
8479 <p><span><strong class="command">$GENERATE</strong></span>
8480             is used to create a series of resource records that only
8481             differ from each other by an
8482             iterator. <span><strong class="command">$GENERATE</strong></span> can be used to
8483             easily generate the sets of records required to support
8484             sub /24 reverse delegations described in RFC 2317:
8485             Classless IN-ADDR.ARPA delegation.
8486           </p>
8487 <pre class="programlisting">$ORIGIN 0.0.192.IN-ADDR.ARPA.
8488 $GENERATE 1-2 @ NS SERVER$.EXAMPLE.
8489 $GENERATE 1-127 $ CNAME $.0</pre>
8490 <p>
8491             is equivalent to
8492           </p>
8493 <pre class="programlisting">0.0.0.192.IN-ADDR.ARPA. NS SERVER1.EXAMPLE.
8494 0.0.0.192.IN-ADDR.ARPA. NS SERVER2.EXAMPLE.
8495 1.0.0.192.IN-ADDR.ARPA. CNAME 1.0.0.0.192.IN-ADDR.ARPA.
8496 2.0.0.192.IN-ADDR.ARPA. CNAME 2.0.0.0.192.IN-ADDR.ARPA.
8497 ...
8498 127.0.0.192.IN-ADDR.ARPA. CNAME 127.0.0.0.192.IN-ADDR.ARPA.
8499 </pre>
8500 <p>
8501             Generate a set of A and MX records.  Note the MX's right hand
8502             side is a quoted string.  The quotes will be stripped when the
8503             right hand side is processed.
8504            </p>
8505 <pre class="programlisting">
8506 $ORIGIN EXAMPLE.
8507 $GENERATE 1-127 HOST-$ A 1.2.3.$
8508 $GENERATE 1-127 HOST-$ MX "0 ."</pre>
8509 <p>
8510             is equivalent to
8511           </p>
8512 <pre class="programlisting">HOST-1.EXAMPLE.   A  1.2.3.1
8513 HOST-1.EXAMPLE.   MX 0 .
8514 HOST-2.EXAMPLE.   A  1.2.3.2
8515 HOST-2.EXAMPLE.   MX 0 .
8516 HOST-3.EXAMPLE.   A  1.2.3.3
8517 HOST-3.EXAMPLE.   MX 0 .
8518 ...
8519 HOST-127.EXAMPLE. A  1.2.3.127
8520 HOST-127.EXAMPLE. MX 0 .
8521 </pre>
8522 <div class="informaltable"><table border="1">
8523 <colgroup>
8524 <col>
8525 <col>
8526 </colgroup>
8527 <tbody>
8528 <tr>
8529 <td>
8530                     <p><span><strong class="command">range</strong></span></p>
8531                   </td>
8532 <td>
8533                     <p>
8534                       This can be one of two forms: start-stop
8535                       or start-stop/step. If the first form is used, then step
8536                       is set to
8537                       1. All of start, stop and step must be positive.
8538                     </p>
8539                   </td>
8540 </tr>
8541 <tr>
8542 <td>
8543                     <p><span><strong class="command">lhs</strong></span></p>
8544                   </td>
8545 <td>
8546                     <p>This
8547                       describes the owner name of the resource records
8548                       to be created.  Any single <span><strong class="command">$</strong></span>
8549                       (dollar sign)
8550                       symbols within the <span><strong class="command">lhs</strong></span> string
8551                       are replaced by the iterator value.
8552
8553                       To get a $ in the output, you need to escape the
8554                       <span><strong class="command">$</strong></span> using a backslash
8555                       <span><strong class="command">\</strong></span>,
8556                       e.g. <span><strong class="command">\$</strong></span>. The
8557                       <span><strong class="command">$</strong></span> may optionally be followed
8558                       by modifiers which change the offset from the
8559                       iterator, field width and base.
8560
8561                       Modifiers are introduced by a
8562                       <span><strong class="command">{</strong></span> (left brace) immediately following the
8563                       <span><strong class="command">$</strong></span> as
8564                       <span><strong class="command">${offset[,width[,base]]}</strong></span>.
8565                       For example, <span><strong class="command">${-20,3,d}</strong></span>
8566                       subtracts 20 from the current value, prints the
8567                       result as a decimal in a zero-padded field of
8568                       width 3.
8569
8570                       Available output forms are decimal
8571                       (<span><strong class="command">d</strong></span>), octal
8572                       (<span><strong class="command">o</strong></span>), hexadecimal
8573                       (<span><strong class="command">x</strong></span> or <span><strong class="command">X</strong></span>
8574                       for uppercase) and nibble
8575                       (<span><strong class="command">n</strong></span> or <span><strong class="command">N</strong></span>\
8576                       for uppercase).  The default modifier is
8577                       <span><strong class="command">${0,0,d}</strong></span>.  If the
8578                       <span><strong class="command">lhs</strong></span> is not absolute, the
8579                       current <span><strong class="command">$ORIGIN</strong></span> is appended
8580                       to the name.
8581                     </p>
8582                     <p>
8583                       In nibble mode the value will be treated as
8584                       if it was a reversed hexadecimal string
8585                       with each hexadecimal digit as a separate
8586                       label.  The width field includes the label
8587                       separator.
8588                     </p>
8589                     <p>
8590                       For compatibility with earlier versions,
8591                       <span><strong class="command">$$</strong></span> is still recognized as
8592                       indicating a literal $ in the output.
8593                     </p>
8594                   </td>
8595 </tr>
8596 <tr>
8597 <td>
8598                     <p><span><strong class="command">ttl</strong></span></p>
8599                   </td>
8600 <td>
8601                     <p>
8602                       Specifies the time-to-live of the generated records. If
8603                       not specified this will be inherited using the
8604                       normal TTL inheritance rules.
8605                     </p>
8606                     <p><span><strong class="command">class</strong></span>
8607                       and <span><strong class="command">ttl</strong></span> can be
8608                       entered in either order.
8609                     </p>
8610                   </td>
8611 </tr>
8612 <tr>
8613 <td>
8614                     <p><span><strong class="command">class</strong></span></p>
8615                   </td>
8616 <td>
8617                     <p>
8618                       Specifies the class of the generated records.
8619                       This must match the zone class if it is
8620                       specified.
8621                     </p>
8622                     <p><span><strong class="command">class</strong></span>
8623                       and <span><strong class="command">ttl</strong></span> can be
8624                       entered in either order.
8625                     </p>
8626                   </td>
8627 </tr>
8628 <tr>
8629 <td>
8630                     <p><span><strong class="command">type</strong></span></p>
8631                   </td>
8632 <td>
8633                     <p>
8634                       Any valid type.
8635                     </p>
8636                   </td>
8637 </tr>
8638 <tr>
8639 <td>
8640                     <p><span><strong class="command">rhs</strong></span></p>
8641                   </td>
8642 <td>
8643                     <p>
8644                       <span><strong class="command">rhs</strong></span>, optionally, quoted string.
8645                     </p>
8646                   </td>
8647 </tr>
8648 </tbody>
8649 </table></div>
8650 <p>
8651             The <span><strong class="command">$GENERATE</strong></span> directive is a <acronym class="acronym">BIND</acronym> extension
8652             and not part of the standard zone file format.
8653           </p>
8654 <p>
8655             BIND 8 does not support the optional TTL and CLASS fields.
8656           </p>
8657 </div>
8658 <div class="sect2" lang="en">
8659 <div class="titlepage"><div><div><h3 class="title">
8660 <a name="zonefile_format"></a>Additional File Formats</h3></div></div></div>
8661 <p>
8662             In addition to the standard textual format, BIND 9
8663             supports the ability to read or dump to zone files in
8664             other formats.  The <code class="constant">raw</code> format is
8665             currently available as an additional format.  It is a
8666             binary format representing BIND 9's internal data
8667             structure directly, thereby remarkably improving the
8668             loading time.
8669           </p>
8670 <p>
8671             For a primary server, a zone file in the
8672             <code class="constant">raw</code> format is expected to be
8673             generated from a textual zone file by the
8674             <span><strong class="command">named-compilezone</strong></span> command.  For a
8675             secondary server or for a dynamic zone, it is automatically
8676             generated (if this format is specified by the
8677             <span><strong class="command">masterfile-format</strong></span> option) when
8678             <span><strong class="command">named</strong></span> dumps the zone contents after
8679             zone transfer or when applying prior updates.
8680           </p>
8681 <p>
8682             If a zone file in a binary format needs manual modification,
8683             it first must be converted to a textual form by the
8684             <span><strong class="command">named-compilezone</strong></span> command.  All
8685             necessary modification should go to the text file, which
8686             should then be converted to the binary form by the
8687             <span><strong class="command">named-compilezone</strong></span> command again.
8688           </p>
8689 <p>
8690              Although the <code class="constant">raw</code> format uses the
8691              network byte order and avoids architecture-dependent
8692              data alignment so that it is as much portable as
8693              possible, it is primarily expected to be used inside
8694              the same single system.  In order to export a zone
8695              file in the <code class="constant">raw</code> format or make a
8696              portable backup of the file, it is recommended to
8697              convert the file to the standard textual representation.
8698           </p>
8699 </div>
8700 </div>
8701 <div class="sect1" lang="en">
8702 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
8703 <a name="statistics"></a>BIND9 Statistics</h2></div></div></div>
8704 <p>
8705           <acronym class="acronym">BIND</acronym> 9 maintains lots of statistics
8706           information and provides several interfaces for users to
8707           get access to the statistics.
8708           The available statistics include all statistics counters
8709           that were available in <acronym class="acronym">BIND</acronym> 8 and
8710           are meaningful in <acronym class="acronym">BIND</acronym> 9,
8711           and other information that is considered useful.
8712         </p>
8713 <p>
8714           The statistics information is categorized into the following
8715           sections.
8716         </p>
8717 <div class="informaltable"><table border="1">
8718 <colgroup>
8719 <col>
8720 <col>
8721 </colgroup>
8722 <tbody>
8723 <tr>
8724 <td>
8725                   <p>Incoming Requests</p>
8726                 </td>
8727 <td>
8728                   <p>
8729                     The number of incoming DNS requests for each OPCODE.
8730                   </p>
8731                 </td>
8732 </tr>
8733 <tr>
8734 <td>
8735                   <p>Incoming Queries</p>
8736                 </td>
8737 <td>
8738                   <p>
8739                     The number of incoming queries for each RR type.
8740                   </p>
8741                 </td>
8742 </tr>
8743 <tr>
8744 <td>
8745                   <p>Outgoing Queries</p>
8746                 </td>
8747 <td>
8748                   <p>
8749                     The number of outgoing queries for each RR
8750                     type sent from the internal resolver.
8751                     Maintained per view.
8752                   </p>
8753                 </td>
8754 </tr>
8755 <tr>
8756 <td>
8757                   <p>Name Server Statistics</p>
8758                 </td>
8759 <td>
8760                   <p>
8761                     Statistics counters about incoming request processing.
8762                   </p>
8763                 </td>
8764 </tr>
8765 <tr>
8766 <td>
8767                   <p>Zone Maintenance Statistics</p>
8768                 </td>
8769 <td>
8770                   <p>
8771                     Statistics counters regarding zone maintenance
8772                     operations such as zone transfers.
8773                   </p>
8774                 </td>
8775 </tr>
8776 <tr>
8777 <td>
8778                   <p>Resolver Statistics</p>
8779                 </td>
8780 <td>
8781                   <p>
8782                     Statistics counters about name resolution
8783                     performed in the internal resolver.
8784                     Maintained per view.
8785                   </p>
8786                 </td>
8787 </tr>
8788 <tr>
8789 <td>
8790                   <p>Cache DB RRsets</p>
8791                 </td>
8792 <td>
8793                   <p>
8794                     The number of RRsets per RR type and nonexistent
8795                     names stored in the cache database.
8796                     If the exclamation mark (!) is printed for a RR
8797                     type, it means that particular type of RRset is
8798                     known to be nonexistent (this is also known as
8799                     "NXRRSET").
8800                     Maintained per view.
8801                   </p>
8802                 </td>
8803 </tr>
8804 <tr>
8805 <td>
8806                   <p>Socket I/O Statistics</p>
8807                 </td>
8808 <td>
8809                   <p>
8810                     Statistics counters about network related events.
8811                   </p>
8812                 </td>
8813 </tr>
8814 </tbody>
8815 </table></div>
8816 <p>
8817           A subset of Name Server Statistics is collected and shown
8818           per zone for which the server has the authority when
8819           <span><strong class="command">zone-statistics</strong></span> is set to
8820           <strong class="userinput"><code>yes</code></strong>.
8821           These statistics counters are shown with their zone and view
8822           names.
8823           In some cases the view names are omitted for the default view.
8824         </p>
8825 <p>
8826           There are currently two user interfaces to get access to the
8827           statistics.
8828           One is in the plain text format dumped to the file specified
8829           by the <span><strong class="command">statistics-file</strong></span> configuration option.
8830           The other is remotely accessible via a statistics channel
8831           when the <span><strong class="command">statistics-channels</strong></span> statement
8832           is specified in the configuration file
8833           (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>.)
8834         </p>
8835 <div class="sect3" lang="en">
8836 <div class="titlepage"><div><div><h4 class="title">
8837 <a name="statsfile"></a>The Statistics File</h4></div></div></div>
8838 <p>
8839             The text format statistics dump begins with a line, like:
8840           </p>
8841 <p>
8842             <span><strong class="command">+++ Statistics Dump +++ (973798949)</strong></span>
8843           </p>
8844 <p>
8845             The number in parentheses is a standard
8846             Unix-style timestamp, measured as seconds since January 1, 1970.
8847
8848             Following
8849             that line is a set of statistics information, which is categorized
8850             as described above.
8851             Each section begins with a line, like:
8852           </p>
8853 <p>
8854             <span><strong class="command">++ Name Server Statistics ++</strong></span>
8855           </p>
8856 <p>
8857             Each section consists of lines, each containing the statistics
8858             counter value followed by its textual description.
8859             See below for available counters.
8860             For brevity, counters that have a value of 0 are not shown
8861             in the statistics file.
8862           </p>
8863 <p>
8864             The statistics dump ends with the line where the
8865             number is identical to the number in the beginning line; for example:
8866           </p>
8867 <p>
8868             <span><strong class="command">--- Statistics Dump --- (973798949)</strong></span>
8869           </p>
8870 </div>
8871 <div class="sect2" lang="en">
8872 <div class="titlepage"><div><div><h3 class="title">
8873 <a name="statistics_counters"></a>Statistics Counters</h3></div></div></div>
8874 <p>
8875             The following tables summarize statistics counters that
8876             <acronym class="acronym">BIND</acronym> 9 provides.
8877             For each row of the tables, the leftmost column is the
8878             abbreviated symbol name of that counter.
8879             These symbols are shown in the statistics information
8880             accessed via an HTTP statistics channel.
8881             The rightmost column gives the description of the counter,
8882             which is also shown in the statistics file
8883             (but, in this document, possibly with slight modification
8884             for better readability).
8885             Additional notes may also be provided in this column.
8886             When a middle column exists between these two columns,
8887             it gives the corresponding counter name of the
8888             <acronym class="acronym">BIND</acronym> 8 statistics, if applicable.
8889           </p>
8890 <div class="sect3" lang="en">
8891 <div class="titlepage"><div><div><h4 class="title">
8892 <a name="id2598138"></a>Name Server Statistics Counters</h4></div></div></div>
8893 <div class="informaltable"><table border="1">
8894 <colgroup>
8895 <col>
8896 <col>
8897 <col>
8898 </colgroup>
8899 <tbody>
8900 <tr>
8901 <td>
8902                       <p>
8903                         <span class="emphasis"><em>Symbol</em></span>
8904                       </p>
8905                     </td>
8906 <td>
8907                       <p>
8908                         <span class="emphasis"><em>BIND8 Symbol</em></span>
8909                       </p>
8910                     </td>
8911 <td>
8912                       <p>
8913                         <span class="emphasis"><em>Description</em></span>
8914                       </p>
8915                     </td>
8916 </tr>
8917 <tr>
8918 <td>
8919                       <p><span><strong class="command">Requestv4</strong></span></p>
8920                     </td>
8921 <td>
8922                       <p><span><strong class="command">RQ</strong></span></p>
8923                     </td>
8924 <td>
8925                       <p>
8926                         IPv4 requests received.
8927                         Note: this also counts non query requests.
8928                       </p>
8929                     </td>
8930 </tr>
8931 <tr>
8932 <td>
8933                       <p><span><strong class="command">Requestv6</strong></span></p>
8934                     </td>
8935 <td>
8936                       <p><span><strong class="command">RQ</strong></span></p>
8937                     </td>
8938 <td>
8939                       <p>
8940                         IPv6 requests received.
8941                         Note: this also counts non query requests.
8942                       </p>
8943                     </td>
8944 </tr>
8945 <tr>
8946 <td>
8947                       <p><span><strong class="command">ReqEdns0</strong></span></p>
8948                     </td>
8949 <td>
8950                       <p><span><strong class="command"></strong></span></p>
8951                     </td>
8952 <td>
8953                       <p>
8954                         Requests with EDNS(0) received.
8955                       </p>
8956                     </td>
8957 </tr>
8958 <tr>
8959 <td>
8960                       <p><span><strong class="command">ReqBadEDNSVer</strong></span></p>
8961                     </td>
8962 <td>
8963                       <p><span><strong class="command"></strong></span></p>
8964                     </td>
8965 <td>
8966                       <p>
8967                         Requests with unsupported EDNS version received.
8968                       </p>
8969                     </td>
8970 </tr>
8971 <tr>
8972 <td>
8973                       <p><span><strong class="command">ReqTSIG</strong></span></p>
8974                     </td>
8975 <td>
8976                       <p><span><strong class="command"></strong></span></p>
8977                     </td>
8978 <td>
8979                       <p>
8980                         Requests with TSIG received.
8981                       </p>
8982                     </td>
8983 </tr>
8984 <tr>
8985 <td>
8986                       <p><span><strong class="command">ReqSIG0</strong></span></p>
8987                     </td>
8988 <td>
8989                       <p><span><strong class="command"></strong></span></p>
8990                     </td>
8991 <td>
8992                       <p>
8993                         Requests with SIG(0) received.
8994                       </p>
8995                     </td>
8996 </tr>
8997 <tr>
8998 <td>
8999                       <p><span><strong class="command">ReqBadSIG</strong></span></p>
9000                     </td>
9001 <td>
9002                       <p><span><strong class="command"></strong></span></p>
9003                     </td>
9004 <td>
9005                       <p>
9006                         Requests with invalid (TSIG or SIG(0)) signature.
9007                       </p>
9008                     </td>
9009 </tr>
9010 <tr>
9011 <td>
9012                       <p><span><strong class="command">ReqTCP</strong></span></p>
9013                     </td>
9014 <td>
9015                       <p><span><strong class="command">RTCP</strong></span></p>
9016                     </td>
9017 <td>
9018                       <p>
9019                         TCP requests received.
9020                       </p>
9021                     </td>
9022 </tr>
9023 <tr>
9024 <td>
9025                       <p><span><strong class="command">AuthQryRej</strong></span></p>
9026                     </td>
9027 <td>
9028                       <p><span><strong class="command">RUQ</strong></span></p>
9029                     </td>
9030 <td>
9031                       <p>
9032                         Authoritative (non recursive) queries rejected.
9033                       </p>
9034                     </td>
9035 </tr>
9036 <tr>
9037 <td>
9038                       <p><span><strong class="command">RecQryRej</strong></span></p>
9039                     </td>
9040 <td>
9041                       <p><span><strong class="command">RURQ</strong></span></p>
9042                     </td>
9043 <td>
9044                       <p>
9045                         Recursive queries rejected.
9046                       </p>
9047                     </td>
9048 </tr>
9049 <tr>
9050 <td>
9051                       <p><span><strong class="command">XfrRej</strong></span></p>
9052                     </td>
9053 <td>
9054                       <p><span><strong class="command">RUXFR</strong></span></p>
9055                     </td>
9056 <td>
9057                       <p>
9058                         Zone transfer requests rejected.
9059                       </p>
9060                     </td>
9061 </tr>
9062 <tr>
9063 <td>
9064                       <p><span><strong class="command">UpdateRej</strong></span></p>
9065                     </td>
9066 <td>
9067                       <p><span><strong class="command">RUUpd</strong></span></p>
9068                     </td>
9069 <td>
9070                       <p>
9071                         Dynamic update requests rejected.
9072                       </p>
9073                     </td>
9074 </tr>
9075 <tr>
9076 <td>
9077                       <p><span><strong class="command">Response</strong></span></p>
9078                     </td>
9079 <td>
9080                       <p><span><strong class="command">SAns</strong></span></p>
9081                     </td>
9082 <td>
9083                       <p>
9084                         Responses sent.
9085                       </p>
9086                     </td>
9087 </tr>
9088 <tr>
9089 <td>
9090                       <p><span><strong class="command">RespTruncated</strong></span></p>
9091                     </td>
9092 <td>
9093                       <p><span><strong class="command"></strong></span></p>
9094                     </td>
9095 <td>
9096                       <p>
9097                         Truncated responses sent.
9098                       </p>
9099                     </td>
9100 </tr>
9101 <tr>
9102 <td>
9103                       <p><span><strong class="command">RespEDNS0</strong></span></p>
9104                     </td>
9105 <td>
9106                       <p><span><strong class="command"></strong></span></p>
9107                     </td>
9108 <td>
9109                       <p>
9110                         Responses with EDNS(0) sent.
9111                       </p>
9112                     </td>
9113 </tr>
9114 <tr>
9115 <td>
9116                       <p><span><strong class="command">RespTSIG</strong></span></p>
9117                     </td>
9118 <td>
9119                       <p><span><strong class="command"></strong></span></p>
9120                     </td>
9121 <td>
9122                       <p>
9123                         Responses with TSIG sent.
9124                       </p>
9125                     </td>
9126 </tr>
9127 <tr>
9128 <td>
9129                       <p><span><strong class="command">RespSIG0</strong></span></p>
9130                     </td>
9131 <td>
9132                       <p><span><strong class="command"></strong></span></p>
9133                     </td>
9134 <td>
9135                       <p>
9136                         Responses with SIG(0) sent.
9137                       </p>
9138                     </td>
9139 </tr>
9140 <tr>
9141 <td>
9142                       <p><span><strong class="command">QrySuccess</strong></span></p>
9143                     </td>
9144 <td>
9145                       <p><span><strong class="command"></strong></span></p>
9146                     </td>
9147 <td>
9148                       <p>
9149                         Queries resulted in a successful answer.
9150                         This means the query which returns a NOERROR response
9151                         with at least one answer RR.
9152                         This corresponds to the
9153                         <span><strong class="command">success</strong></span> counter
9154                         of previous versions of
9155                         <acronym class="acronym">BIND</acronym> 9.
9156                       </p>
9157                     </td>
9158 </tr>
9159 <tr>
9160 <td>
9161                       <p><span><strong class="command">QryAuthAns</strong></span></p>
9162                     </td>
9163 <td>
9164                       <p><span><strong class="command"></strong></span></p>
9165                     </td>
9166 <td>
9167                       <p>
9168                         Queries resulted in authoritative answer.
9169                       </p>
9170                     </td>
9171 </tr>
9172 <tr>
9173 <td>
9174                       <p><span><strong class="command">QryNoauthAns</strong></span></p>
9175                     </td>
9176 <td>
9177                       <p><span><strong class="command">SNaAns</strong></span></p>
9178                     </td>
9179 <td>
9180                       <p>
9181                         Queries resulted in non authoritative answer.
9182                       </p>
9183                     </td>
9184 </tr>
9185 <tr>
9186 <td>
9187                       <p><span><strong class="command">QryReferral</strong></span></p>
9188                     </td>
9189 <td>
9190                       <p><span><strong class="command"></strong></span></p>
9191                     </td>
9192 <td>
9193                       <p>
9194                         Queries resulted in referral answer.
9195                         This corresponds to the
9196                         <span><strong class="command">referral</strong></span> counter
9197                         of previous versions of
9198                         <acronym class="acronym">BIND</acronym> 9.
9199                       </p>
9200                     </td>
9201 </tr>
9202 <tr>
9203 <td>
9204                       <p><span><strong class="command">QryNxrrset</strong></span></p>
9205                     </td>
9206 <td>
9207                       <p><span><strong class="command"></strong></span></p>
9208                     </td>
9209 <td>
9210                       <p>
9211                         Queries resulted in NOERROR responses with no data.
9212                         This corresponds to the
9213                         <span><strong class="command">nxrrset</strong></span> counter
9214                         of previous versions of
9215                         <acronym class="acronym">BIND</acronym> 9.
9216                       </p>
9217                     </td>
9218 </tr>
9219 <tr>
9220 <td>
9221                       <p><span><strong class="command">QrySERVFAIL</strong></span></p>
9222                     </td>
9223 <td>
9224                       <p><span><strong class="command">SFail</strong></span></p>
9225                     </td>
9226 <td>
9227                       <p>
9228                         Queries resulted in SERVFAIL.
9229                       </p>
9230                     </td>
9231 </tr>
9232 <tr>
9233 <td>
9234                       <p><span><strong class="command">QryFORMERR</strong></span></p>
9235                     </td>
9236 <td>
9237                       <p><span><strong class="command">SFErr</strong></span></p>
9238                     </td>
9239 <td>
9240                       <p>
9241                         Queries resulted in FORMERR.
9242                       </p>
9243                     </td>
9244 </tr>
9245 <tr>
9246 <td>
9247                       <p><span><strong class="command">QryNXDOMAIN</strong></span></p>
9248                     </td>
9249 <td>
9250                       <p><span><strong class="command">SNXD</strong></span></p>
9251                     </td>
9252 <td>
9253                       <p>
9254                         Queries resulted in NXDOMAIN.
9255                         This corresponds to the
9256                         <span><strong class="command">nxdomain</strong></span> counter
9257                         of previous versions of
9258                         <acronym class="acronym">BIND</acronym> 9.
9259                       </p>
9260                     </td>
9261 </tr>
9262 <tr>
9263 <td>
9264                       <p><span><strong class="command">QryRecursion</strong></span></p>
9265                     </td>
9266 <td>
9267                       <p><span><strong class="command">RFwdQ</strong></span></p>
9268                     </td>
9269 <td>
9270                       <p>
9271                         Queries which caused the server
9272                         to perform recursion in order to find the final answer.
9273                         This corresponds to the
9274                         <span><strong class="command">recursion</strong></span> counter
9275                         of previous versions of
9276                         <acronym class="acronym">BIND</acronym> 9.
9277                       </p>
9278                     </td>
9279 </tr>
9280 <tr>
9281 <td>
9282                       <p><span><strong class="command">QryDuplicate</strong></span></p>
9283                     </td>
9284 <td>
9285                       <p><span><strong class="command">RDupQ</strong></span></p>
9286                     </td>
9287 <td>
9288                       <p>
9289                         Queries which the server attempted to
9290                         recurse but discovered an existing query with the same
9291                         IP address, port, query ID, name, type and class
9292                         already being processed.
9293                         This corresponds to the
9294                         <span><strong class="command">duplicate</strong></span> counter
9295                         of previous versions of
9296                         <acronym class="acronym">BIND</acronym> 9.
9297                       </p>
9298                     </td>
9299 </tr>
9300 <tr>
9301 <td>
9302                       <p><span><strong class="command">QryDropped</strong></span></p>
9303                     </td>
9304 <td>
9305                       <p><span><strong class="command"></strong></span></p>
9306                     </td>
9307 <td>
9308                       <p>
9309                         Recursive queries for which the server
9310                         discovered an excessive number of existing
9311                         recursive queries for the same name, type and
9312                         class and were subsequently dropped.
9313                         This is the number of dropped queries due to
9314                         the reason explained with the
9315                         <span><strong class="command">clients-per-query</strong></span>
9316                         and
9317                         <span><strong class="command">max-clients-per-query</strong></span>
9318                         options
9319                         (see the description about
9320                         <a href="Bv9ARM.ch06.html#clients-per-query"><span><strong class="command">clients-per-query</strong></span></a>.)
9321                         This corresponds to the
9322                         <span><strong class="command">dropped</strong></span> counter
9323                         of previous versions of
9324                         <acronym class="acronym">BIND</acronym> 9.
9325                       </p>
9326                     </td>
9327 </tr>
9328 <tr>
9329 <td>
9330                       <p><span><strong class="command">QryFailure</strong></span></p>
9331                     </td>
9332 <td>
9333                       <p><span><strong class="command"></strong></span></p>
9334                     </td>
9335 <td>
9336                       <p>
9337                         Other query failures.
9338                         This corresponds to the
9339                         <span><strong class="command">failure</strong></span> counter
9340                         of previous versions of
9341                         <acronym class="acronym">BIND</acronym> 9.
9342                         Note: this counter is provided mainly for
9343                         backward compatibility with the previous versions.
9344                         Normally a more fine-grained counters such as
9345                         <span><strong class="command">AuthQryRej</strong></span> and
9346                         <span><strong class="command">RecQryRej</strong></span>
9347                         that would also fall into this counter are provided,
9348                         and so this counter would not be of much
9349                         interest in practice.
9350                       </p>
9351                     </td>
9352 </tr>
9353 <tr>
9354 <td>
9355                       <p><span><strong class="command">XfrReqDone</strong></span></p>
9356                     </td>
9357 <td>
9358                       <p><span><strong class="command"></strong></span></p>
9359                     </td>
9360 <td>
9361                       <p>
9362                         Requested zone transfers completed.
9363                       </p>
9364                     </td>
9365 </tr>
9366 <tr>
9367 <td>
9368                       <p><span><strong class="command">UpdateReqFwd</strong></span></p>
9369                     </td>
9370 <td>
9371                       <p><span><strong class="command"></strong></span></p>
9372                     </td>
9373 <td>
9374                       <p>
9375                         Update requests forwarded.
9376                       </p>
9377                     </td>
9378 </tr>
9379 <tr>
9380 <td>
9381                       <p><span><strong class="command">UpdateRespFwd</strong></span></p>
9382                     </td>
9383 <td>
9384                       <p><span><strong class="command"></strong></span></p>
9385                     </td>
9386 <td>
9387                       <p>
9388                         Update responses forwarded.
9389                       </p>
9390                     </td>
9391 </tr>
9392 <tr>
9393 <td>
9394                       <p><span><strong class="command">UpdateFwdFail</strong></span></p>
9395                     </td>
9396 <td>
9397                       <p><span><strong class="command"></strong></span></p>
9398                     </td>
9399 <td>
9400                       <p>
9401                         Dynamic update forward failed.
9402                       </p>
9403                     </td>
9404 </tr>
9405 <tr>
9406 <td>
9407                       <p><span><strong class="command">UpdateDone</strong></span></p>
9408                     </td>
9409 <td>
9410                       <p><span><strong class="command"></strong></span></p>
9411                     </td>
9412 <td>
9413                       <p>
9414                         Dynamic updates completed.
9415                       </p>
9416                     </td>
9417 </tr>
9418 <tr>
9419 <td>
9420                       <p><span><strong class="command">UpdateFail</strong></span></p>
9421                     </td>
9422 <td>
9423                       <p><span><strong class="command"></strong></span></p>
9424                     </td>
9425 <td>
9426                       <p>
9427                         Dynamic updates failed.
9428                       </p>
9429                     </td>
9430 </tr>
9431 <tr>
9432 <td>
9433                       <p><span><strong class="command">UpdateBadPrereq</strong></span></p>
9434                     </td>
9435 <td>
9436                       <p><span><strong class="command"></strong></span></p>
9437                     </td>
9438 <td>
9439                       <p>
9440                         Dynamic updates rejected due to prerequisite failure.
9441                       </p>
9442                     </td>
9443 </tr>
9444 </tbody>
9445 </table></div>
9446 </div>
9447 <div class="sect3" lang="en">
9448 <div class="titlepage"><div><div><h4 class="title">
9449 <a name="id2599611"></a>Zone Maintenance Statistics Counters</h4></div></div></div>
9450 <div class="informaltable"><table border="1">
9451 <colgroup>
9452 <col>
9453 <col>
9454 </colgroup>
9455 <tbody>
9456 <tr>
9457 <td>
9458                       <p>
9459                         <span class="emphasis"><em>Symbol</em></span>
9460                       </p>
9461                     </td>
9462 <td>
9463                       <p>
9464                         <span class="emphasis"><em>Description</em></span>
9465                       </p>
9466                     </td>
9467 </tr>
9468 <tr>
9469 <td>
9470                       <p><span><strong class="command">NotifyOutv4</strong></span></p>
9471                     </td>
9472 <td>
9473                       <p>
9474                         IPv4 notifies sent.
9475                       </p>
9476                     </td>
9477 </tr>
9478 <tr>
9479 <td>
9480                       <p><span><strong class="command">NotifyOutv6</strong></span></p>
9481                     </td>
9482 <td>
9483                       <p>
9484                         IPv6 notifies sent.
9485                       </p>
9486                     </td>
9487 </tr>
9488 <tr>
9489 <td>
9490                       <p><span><strong class="command">NotifyInv4</strong></span></p>
9491                     </td>
9492 <td>
9493                       <p>
9494                         IPv4 notifies received.
9495                       </p>
9496                     </td>
9497 </tr>
9498 <tr>
9499 <td>
9500                       <p><span><strong class="command">NotifyInv6</strong></span></p>
9501                     </td>
9502 <td>
9503                       <p>
9504                         IPv6 notifies received.
9505                       </p>
9506                     </td>
9507 </tr>
9508 <tr>
9509 <td>
9510                       <p><span><strong class="command">NotifyRej</strong></span></p>
9511                     </td>
9512 <td>
9513                       <p>
9514                         Incoming notifies rejected.
9515                       </p>
9516                     </td>
9517 </tr>
9518 <tr>
9519 <td>
9520                       <p><span><strong class="command">SOAOutv4</strong></span></p>
9521                     </td>
9522 <td>
9523                       <p>
9524                         IPv4 SOA queries sent.
9525                       </p>
9526                     </td>
9527 </tr>
9528 <tr>
9529 <td>
9530                       <p><span><strong class="command">SOAOutv6</strong></span></p>
9531                     </td>
9532 <td>
9533                       <p>
9534                         IPv6 SOA queries sent.
9535                       </p>
9536                     </td>
9537 </tr>
9538 <tr>
9539 <td>
9540                       <p><span><strong class="command">AXFRReqv4</strong></span></p>
9541                     </td>
9542 <td>
9543                       <p>
9544                         IPv4 AXFR requested.
9545                       </p>
9546                     </td>
9547 </tr>
9548 <tr>
9549 <td>
9550                       <p><span><strong class="command">AXFRReqv6</strong></span></p>
9551                     </td>
9552 <td>
9553                       <p>
9554                         IPv6 AXFR requested.
9555                       </p>
9556                     </td>
9557 </tr>
9558 <tr>
9559 <td>
9560                       <p><span><strong class="command">IXFRReqv4</strong></span></p>
9561                     </td>
9562 <td>
9563                       <p>
9564                         IPv4 IXFR requested.
9565                       </p>
9566                     </td>
9567 </tr>
9568 <tr>
9569 <td>
9570                       <p><span><strong class="command">IXFRReqv6</strong></span></p>
9571                     </td>
9572 <td>
9573                       <p>
9574                         IPv6 IXFR requested.
9575                       </p>
9576                     </td>
9577 </tr>
9578 <tr>
9579 <td>
9580                       <p><span><strong class="command">XfrSuccess</strong></span></p>
9581                     </td>
9582 <td>
9583                       <p>
9584                         Zone transfer requests succeeded.
9585                       </p>
9586                     </td>
9587 </tr>
9588 <tr>
9589 <td>
9590                       <p><span><strong class="command">XfrFail</strong></span></p>
9591                     </td>
9592 <td>
9593                       <p>
9594                         Zone transfer requests failed.
9595                       </p>
9596                     </td>
9597 </tr>
9598 </tbody>
9599 </table></div>
9600 </div>
9601 <div class="sect3" lang="en">
9602 <div class="titlepage"><div><div><h4 class="title">
9603 <a name="id2599994"></a>Resolver Statistics Counters</h4></div></div></div>
9604 <div class="informaltable"><table border="1">
9605 <colgroup>
9606 <col>
9607 <col>
9608 <col>
9609 </colgroup>
9610 <tbody>
9611 <tr>
9612 <td>
9613                       <p>
9614                         <span class="emphasis"><em>Symbol</em></span>
9615                       </p>
9616                     </td>
9617 <td>
9618                       <p>
9619                         <span class="emphasis"><em>BIND8 Symbol</em></span>
9620                       </p>
9621                     </td>
9622 <td>
9623                       <p>
9624                         <span class="emphasis"><em>Description</em></span>
9625                       </p>
9626                     </td>
9627 </tr>
9628 <tr>
9629 <td>
9630                       <p><span><strong class="command">Queryv4</strong></span></p>
9631                     </td>
9632 <td>
9633                       <p><span><strong class="command">SFwdQ</strong></span></p>
9634                     </td>
9635 <td>
9636                       <p>
9637                         IPv4 queries sent.
9638                       </p>
9639                     </td>
9640 </tr>
9641 <tr>
9642 <td>
9643                       <p><span><strong class="command">Queryv6</strong></span></p>
9644                     </td>
9645 <td>
9646                       <p><span><strong class="command">SFwdQ</strong></span></p>
9647                     </td>
9648 <td>
9649                       <p>
9650                         IPv6 queries sent.
9651                       </p>
9652                     </td>
9653 </tr>
9654 <tr>
9655 <td>
9656                       <p><span><strong class="command">Responsev4</strong></span></p>
9657                     </td>
9658 <td>
9659                       <p><span><strong class="command">RR</strong></span></p>
9660                     </td>
9661 <td>
9662                       <p>
9663                         IPv4 responses received.
9664                       </p>
9665                     </td>
9666 </tr>
9667 <tr>
9668 <td>
9669                       <p><span><strong class="command">Responsev6</strong></span></p>
9670                     </td>
9671 <td>
9672                       <p><span><strong class="command">RR</strong></span></p>
9673                     </td>
9674 <td>
9675                       <p>
9676                         IPv6 responses received.
9677                       </p>
9678                     </td>
9679 </tr>
9680 <tr>
9681 <td>
9682                       <p><span><strong class="command">NXDOMAIN</strong></span></p>
9683                     </td>
9684 <td>
9685                       <p><span><strong class="command">RNXD</strong></span></p>
9686                     </td>
9687 <td>
9688                       <p>
9689                         NXDOMAIN received.
9690                       </p>
9691                     </td>
9692 </tr>
9693 <tr>
9694 <td>
9695                       <p><span><strong class="command">SERVFAIL</strong></span></p>
9696                     </td>
9697 <td>
9698                       <p><span><strong class="command">RFail</strong></span></p>
9699                     </td>
9700 <td>
9701                       <p>
9702                         SERVFAIL received.
9703                       </p>
9704                     </td>
9705 </tr>
9706 <tr>
9707 <td>
9708                       <p><span><strong class="command">FORMERR</strong></span></p>
9709                     </td>
9710 <td>
9711                       <p><span><strong class="command">RFErr</strong></span></p>
9712                     </td>
9713 <td>
9714                       <p>
9715                         FORMERR received.
9716                       </p>
9717                     </td>
9718 </tr>
9719 <tr>
9720 <td>
9721                       <p><span><strong class="command">OtherError</strong></span></p>
9722                     </td>
9723 <td>
9724                       <p><span><strong class="command">RErr</strong></span></p>
9725                     </td>
9726 <td>
9727                       <p>
9728                         Other errors received.
9729                       </p>
9730                     </td>
9731 </tr>
9732 <tr>
9733 <td>
9734                       <p><span><strong class="command">EDNS0Fail</strong></span></p>
9735                                                  </td>
9736 <td>
9737                       <p><span><strong class="command"></strong></span></p>
9738                     </td>
9739 <td>
9740                       <p>
9741                         EDNS(0) query failures.
9742                       </p>
9743                     </td>
9744 </tr>
9745 <tr>
9746 <td>
9747                       <p><span><strong class="command">Mismatch</strong></span></p>
9748                     </td>
9749 <td>
9750                       <p><span><strong class="command">RDupR</strong></span></p>
9751                     </td>
9752 <td>
9753                       <p>
9754                         Mismatch responses received.
9755                         The DNS ID, response's source address,
9756                         and/or the response's source port does not
9757                         match what was expected.
9758                         (The port must be 53 or as defined by
9759                         the <span><strong class="command">port</strong></span> option.)
9760                         This may be an indication of a cache
9761                         poisoning attempt.
9762                       </p>
9763                     </td>
9764 </tr>
9765 <tr>
9766 <td>
9767                       <p><span><strong class="command">Truncated</strong></span></p>
9768                     </td>
9769 <td>
9770                       <p><span><strong class="command"></strong></span></p>
9771                     </td>
9772 <td>
9773                       <p>
9774                         Truncated responses received.
9775                       </p>
9776                     </td>
9777 </tr>
9778 <tr>
9779 <td>
9780                       <p><span><strong class="command">Lame</strong></span></p>
9781                     </td>
9782 <td>
9783                       <p><span><strong class="command">RLame</strong></span></p>
9784                     </td>
9785 <td>
9786                       <p>
9787                         Lame delegations received.
9788                       </p>
9789                     </td>
9790 </tr>
9791 <tr>
9792 <td>
9793                       <p><span><strong class="command">Retry</strong></span></p>
9794                     </td>
9795 <td>
9796                       <p><span><strong class="command">SDupQ</strong></span></p>
9797                     </td>
9798 <td>
9799                       <p>
9800                         Query retries performed.
9801                       </p>
9802                     </td>
9803 </tr>
9804 <tr>
9805 <td>
9806                       <p><span><strong class="command">QueryAbort</strong></span></p>
9807                     </td>
9808 <td>
9809                       <p><span><strong class="command"></strong></span></p>
9810                     </td>
9811 <td>
9812                       <p>
9813                         Queries aborted due to quota control.
9814                       </p>
9815                     </td>
9816 </tr>
9817 <tr>
9818 <td>
9819                       <p><span><strong class="command">QuerySockFail</strong></span></p>
9820                     </td>
9821 <td>
9822                       <p><span><strong class="command"></strong></span></p>
9823                     </td>
9824 <td>
9825                       <p>
9826                         Failures in opening query sockets.
9827                         One common reason for such failures is a
9828                         failure of opening a new socket due to a
9829                         limitation on file descriptors.
9830                       </p>
9831                     </td>
9832 </tr>
9833 <tr>
9834 <td>
9835                       <p><span><strong class="command">QueryTimeout</strong></span></p>
9836                     </td>
9837 <td>
9838                       <p><span><strong class="command"></strong></span></p>
9839                     </td>
9840 <td>
9841                       <p>
9842                         Query timeouts.
9843                       </p>
9844                     </td>
9845 </tr>
9846 <tr>
9847 <td>
9848                       <p><span><strong class="command">GlueFetchv4</strong></span></p>
9849                     </td>
9850 <td>
9851                       <p><span><strong class="command">SSysQ</strong></span></p>
9852                     </td>
9853 <td>
9854                       <p>
9855                         IPv4 NS address fetches invoked.
9856                       </p>
9857                     </td>
9858 </tr>
9859 <tr>
9860 <td>
9861                       <p><span><strong class="command">GlueFetchv6</strong></span></p>
9862                     </td>
9863 <td>
9864                       <p><span><strong class="command">SSysQ</strong></span></p>
9865                     </td>
9866 <td>
9867                       <p>
9868                         IPv6 NS address fetches invoked.
9869                       </p>
9870                     </td>
9871 </tr>
9872 <tr>
9873 <td>
9874                       <p><span><strong class="command">GlueFetchv4Fail</strong></span></p>
9875                     </td>
9876 <td>
9877                       <p><span><strong class="command"></strong></span></p>
9878                     </td>
9879 <td>
9880                       <p>
9881                         IPv4 NS address fetch failed.
9882                       </p>
9883                     </td>
9884 </tr>
9885 <tr>
9886 <td>
9887                       <p><span><strong class="command">GlueFetchv6Fail</strong></span></p>
9888                     </td>
9889 <td>
9890                       <p><span><strong class="command"></strong></span></p>
9891                     </td>
9892 <td>
9893                       <p>
9894                         IPv6 NS address fetch failed.
9895                       </p>
9896                     </td>
9897 </tr>
9898 <tr>
9899 <td>
9900                       <p><span><strong class="command">ValAttempt</strong></span></p>
9901                     </td>
9902 <td>
9903                       <p><span><strong class="command"></strong></span></p>
9904                     </td>
9905 <td>
9906                       <p>
9907                         DNSSEC validation attempted.
9908                       </p>
9909                     </td>
9910 </tr>
9911 <tr>
9912 <td>
9913                       <p><span><strong class="command">ValOk</strong></span></p>
9914                     </td>
9915 <td>
9916                       <p><span><strong class="command"></strong></span></p>
9917                     </td>
9918 <td>
9919                       <p>
9920                         DNSSEC validation succeeded.
9921                       </p>
9922                     </td>
9923 </tr>
9924 <tr>
9925 <td>
9926                       <p><span><strong class="command">ValNegOk</strong></span></p>
9927                     </td>
9928 <td>
9929                       <p><span><strong class="command"></strong></span></p>
9930                     </td>
9931 <td>
9932                       <p>
9933                         DNSSEC validation on negative information succeeded.
9934                       </p>
9935                     </td>
9936 </tr>
9937 <tr>
9938 <td>
9939                       <p><span><strong class="command">ValFail</strong></span></p>
9940                     </td>
9941 <td>
9942                       <p><span><strong class="command"></strong></span></p>
9943                     </td>
9944 <td>
9945                       <p>
9946                         DNSSEC validation failed.
9947                       </p>
9948                     </td>
9949 </tr>
9950 <tr>
9951 <td>
9952                       <p><span><strong class="command">QryRTTnn</strong></span></p>
9953                     </td>
9954 <td>
9955                       <p><span><strong class="command"></strong></span></p>
9956                     </td>
9957 <td>
9958                       <p>
9959                         Frequency table on round trip times (RTTs) of
9960                         queries.
9961                         Each <span><strong class="command">nn</strong></span> specifies the corresponding
9962                         frequency.
9963                         In the sequence of
9964                         <span><strong class="command">nn_1</strong></span>,
9965                         <span><strong class="command">nn_2</strong></span>,
9966                         ...,
9967                         <span><strong class="command">nn_m</strong></span>,
9968                         the value of <span><strong class="command">nn_i</strong></span> is the
9969                         number of queries whose RTTs are between
9970                         <span><strong class="command">nn_(i-1)</strong></span> (inclusive) and
9971                         <span><strong class="command">nn_i</strong></span> (exclusive) milliseconds.
9972                         For the sake of convenience we define
9973                         <span><strong class="command">nn_0</strong></span> to be 0.
9974                         The last entry should be represented as
9975                         <span><strong class="command">nn_m+</strong></span>, which means the
9976                         number of queries whose RTTs are equal to or over
9977                         <span><strong class="command">nn_m</strong></span> milliseconds.
9978                       </p>
9979                     </td>
9980 </tr>
9981 </tbody>
9982 </table></div>
9983 </div>
9984 <div class="sect3" lang="en">
9985 <div class="titlepage"><div><div><h4 class="title">
9986 <a name="id2601016"></a>Socket I/O Statistics Counters</h4></div></div></div>
9987 <p>
9988               Socket I/O statistics counters are defined per socket
9989               types, which are
9990               <span><strong class="command">UDP4</strong></span> (UDP/IPv4),
9991               <span><strong class="command">UDP6</strong></span> (UDP/IPv6),
9992               <span><strong class="command">TCP4</strong></span> (TCP/IPv4),
9993               <span><strong class="command">TCP6</strong></span> (TCP/IPv6),
9994               <span><strong class="command">Unix</strong></span> (Unix Domain), and
9995               <span><strong class="command">FDwatch</strong></span> (sockets opened outside the
9996               socket module).
9997               In the following table <span><strong class="command">&lt;TYPE&gt;</strong></span>
9998               represents a socket type.
9999               Not all counters are available for all socket types;
10000               exceptions are noted in the description field.
10001             </p>
10002 <div class="informaltable"><table border="1">
10003 <colgroup>
10004 <col>
10005 <col>
10006 </colgroup>
10007 <tbody>
10008 <tr>
10009 <td>
10010                       <p>
10011                         <span class="emphasis"><em>Symbol</em></span>
10012                       </p>
10013                     </td>
10014 <td>
10015                       <p>
10016                         <span class="emphasis"><em>Description</em></span>
10017                       </p>
10018                     </td>
10019 </tr>
10020 <tr>
10021 <td>
10022                       <p><span><strong class="command">&lt;TYPE&gt;Open</strong></span></p>
10023                     </td>
10024 <td>
10025                       <p>
10026                         Sockets opened successfully.
10027                         This counter is not applicable to the
10028                         <span><strong class="command">FDwatch</strong></span> type.
10029                       </p>
10030                     </td>
10031 </tr>
10032 <tr>
10033 <td>
10034                       <p><span><strong class="command">&lt;TYPE&gt;OpenFail</strong></span></p>
10035                     </td>
10036 <td>
10037                       <p>
10038                         Failures of opening sockets.
10039                         This counter is not applicable to the
10040                         <span><strong class="command">FDwatch</strong></span> type.
10041                       </p>
10042                     </td>
10043 </tr>
10044 <tr>
10045 <td>
10046                       <p><span><strong class="command">&lt;TYPE&gt;Close</strong></span></p>
10047                     </td>
10048 <td>
10049                       <p>
10050                         Sockets closed.
10051                       </p>
10052                     </td>
10053 </tr>
10054 <tr>
10055 <td>
10056                       <p><span><strong class="command">&lt;TYPE&gt;BindFail</strong></span></p>
10057                     </td>
10058 <td>
10059                       <p>
10060                         Failures of binding sockets.
10061                       </p>
10062                     </td>
10063 </tr>
10064 <tr>
10065 <td>
10066                       <p><span><strong class="command">&lt;TYPE&gt;ConnFail</strong></span></p>
10067                     </td>
10068 <td>
10069                       <p>
10070                         Failures of connecting sockets.
10071                       </p>
10072                     </td>
10073 </tr>
10074 <tr>
10075 <td>
10076                       <p><span><strong class="command">&lt;TYPE&gt;Conn</strong></span></p>
10077                     </td>
10078 <td>
10079                       <p>
10080                         Connections established successfully.
10081                       </p>
10082                     </td>
10083 </tr>
10084 <tr>
10085 <td>
10086                       <p><span><strong class="command">&lt;TYPE&gt;AcceptFail</strong></span></p>
10087                     </td>
10088 <td>
10089                       <p>
10090                         Failures of accepting incoming connection requests.
10091                         This counter is not applicable to the
10092                         <span><strong class="command">UDP</strong></span> and
10093                         <span><strong class="command">FDwatch</strong></span> types.
10094                       </p>
10095                     </td>
10096 </tr>
10097 <tr>
10098 <td>
10099                       <p><span><strong class="command">&lt;TYPE&gt;Accept</strong></span></p>
10100                     </td>
10101 <td>
10102                       <p>
10103                         Incoming connections successfully accepted.
10104                         This counter is not applicable to the
10105                         <span><strong class="command">UDP</strong></span> and
10106                         <span><strong class="command">FDwatch</strong></span> types.
10107                       </p>
10108                     </td>
10109 </tr>
10110 <tr>
10111 <td>
10112                       <p><span><strong class="command">&lt;TYPE&gt;SendErr</strong></span></p>
10113                     </td>
10114 <td>
10115                       <p>
10116                         Errors in socket send operations.
10117                         This counter corresponds
10118                         to <span><strong class="command">SErr</strong></span> counter of
10119                         <span><strong class="command">BIND</strong></span> 8.
10120                       </p>
10121                     </td>
10122 </tr>
10123 <tr>
10124 <td>
10125                       <p><span><strong class="command">&lt;TYPE&gt;RecvErr</strong></span></p>
10126                     </td>
10127 <td>
10128                       <p>
10129                         Errors in socket receive operations.
10130                         This includes errors of send operations on a
10131                         connected UDP socket notified by an ICMP error
10132                         message.
10133                       </p>
10134                     </td>
10135 </tr>
10136 </tbody>
10137 </table></div>
10138 </div>
10139 <div class="sect3" lang="en">
10140 <div class="titlepage"><div><div><h4 class="title">
10141 <a name="id2601458"></a>Compatibility with <span class="emphasis"><em>BIND</em></span> 8 Counters</h4></div></div></div>
10142 <p>
10143               Most statistics counters that were available
10144               in <span><strong class="command">BIND</strong></span> 8 are also supported in
10145               <span><strong class="command">BIND</strong></span> 9 as shown in the above tables.
10146               Here are notes about other counters that do not appear
10147               in these tables.
10148             </p>
10149 <div class="variablelist"><dl>
10150 <dt><span class="term"><span><strong class="command">RFwdR,SFwdR</strong></span></span></dt>
10151 <dd><p>
10152                     These counters are not supported
10153                     because <span><strong class="command">BIND</strong></span> 9 does not adopt
10154                     the notion of <span class="emphasis"><em>forwarding</em></span>
10155                     as <span><strong class="command">BIND</strong></span> 8 did.
10156                   </p></dd>
10157 <dt><span class="term"><span><strong class="command">RAXFR</strong></span></span></dt>
10158 <dd><p>
10159                     This counter is accessible in the Incoming Queries section.
10160                   </p></dd>
10161 <dt><span class="term"><span><strong class="command">RIQ</strong></span></span></dt>
10162 <dd><p>
10163                     This counter is accessible in the Incoming Requests section.
10164                   </p></dd>
10165 <dt><span class="term"><span><strong class="command">ROpts</strong></span></span></dt>
10166 <dd><p>
10167                     This counter is not supported
10168                     because <span><strong class="command">BIND</strong></span> 9 does not care
10169                     about IP options in the first place.
10170                   </p></dd>
10171 </dl></div>
10172 </div>
10173 </div>
10174 </div>
10175 </div>
10176 <div class="navfooter">
10177 <hr>
10178 <table width="100%" summary="Navigation footer">
10179 <tr>
10180 <td width="40%" align="left">
10181 <a accesskey="p" href="Bv9ARM.ch05.html">Prev</a> </td>
10182 <td width="20%" align="center"> </td>
10183 <td width="40%" align="right"> <a accesskey="n" href="Bv9ARM.ch07.html">Next</a>
10184 </td>
10185 </tr>
10186 <tr>
10187 <td width="40%" align="left" valign="top">Chapter 5. The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver </td>
10188 <td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
10189 <td width="40%" align="right" valign="top"> Chapter 7. <acronym class="acronym">BIND</acronym> 9 Security Considerations</td>
10190 </tr>
10191 </table>
10192 </div>
10193 </body>
10194 </html>