]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - contrib/bind9/doc/arm/Bv9ARM.ch06.html
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / contrib / bind9 / doc / arm / Bv9ARM.ch06.html
1 <!--
2  - Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
3  - Copyright (C) 2000-2003 Internet Software Consortium.
4  - 
5  - Permission to use, copy, modify, and 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.82.18.88 2008/10/18 01:29:58 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#id2573436">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#id2574117"><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#id2574307"><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#id2574736"><span><strong class="command">include</strong></span> Statement Grammar</a></span></dt>
62 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574753"><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#id2574776"><span><strong class="command">key</strong></span> Statement Grammar</a></span></dt>
65 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574800"><span><strong class="command">key</strong></span> Statement Definition and Usage</a></span></dt>
66 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574958"><span><strong class="command">logging</strong></span> Statement Grammar</a></span></dt>
67 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2575084"><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#id2576435"><span><strong class="command">lwres</strong></span> Statement Grammar</a></span></dt>
70 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2576508"><span><strong class="command">lwres</strong></span> Statement Definition and Usage</a></span></dt>
71 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2576572"><span><strong class="command">masters</strong></span> Statement Grammar</a></span></dt>
72 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2576616"><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#id2576631"><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#id2585614"><span><strong class="command">trusted-keys</strong></span> Statement Grammar</a></span></dt>
81 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2585666"><span><strong class="command">trusted-keys</strong></span> Statement Definition
82             and Usage</a></span></dt>
83 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#view_statement_grammar"><span><strong class="command">view</strong></span> Statement Grammar</a></span></dt>
84 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2585748"><span><strong class="command">view</strong></span> Statement Definition and Usage</a></span></dt>
85 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#zone_statement_grammar"><span><strong class="command">zone</strong></span>
86             Statement Grammar</a></span></dt>
87 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2587332"><span><strong class="command">zone</strong></span> Statement Definition and Usage</a></span></dt>
88 </dl></dd>
89 <dt><span class="sect1"><a href="Bv9ARM.ch06.html#id2589477">Zone File</a></span></dt>
90 <dd><dl>
91 <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>
92 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2591500">Discussion of MX Records</a></span></dt>
93 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#Setting_TTLs">Setting TTLs</a></span></dt>
94 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2592188">Inverse Mapping in IPv4</a></span></dt>
95 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2592384">Other Zone File Directives</a></span></dt>
96 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2592572"><acronym class="acronym">BIND</acronym> Master File Extension: the  <span><strong class="command">$GENERATE</strong></span> Directive</a></span></dt>
97 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#zonefile_format">Additional File Formats</a></span></dt>
98 </dl></dd>
99 </dl>
100 </div>
101 <p>
102       <acronym class="acronym">BIND</acronym> 9 configuration is broadly similar
103       to <acronym class="acronym">BIND</acronym> 8; however, there are a few new
104       areas
105       of configuration, such as views. <acronym class="acronym">BIND</acronym>
106       8 configuration files should work with few alterations in <acronym class="acronym">BIND</acronym>
107       9, although more complex configurations should be reviewed to check
108       if they can be more efficiently implemented using the new features
109       found in <acronym class="acronym">BIND</acronym> 9.
110     </p>
111 <p>
112       <acronym class="acronym">BIND</acronym> 4 configuration files can be
113       converted to the new format
114       using the shell script
115       <code class="filename">contrib/named-bootconf/named-bootconf.sh</code>.
116     </p>
117 <div class="sect1" lang="en">
118 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
119 <a name="configuration_file_elements"></a>Configuration File Elements</h2></div></div></div>
120 <p>
121         Following is a list of elements used throughout the <acronym class="acronym">BIND</acronym> configuration
122         file documentation:
123       </p>
124 <div class="informaltable"><table border="1">
125 <colgroup>
126 <col>
127 <col>
128 </colgroup>
129 <tbody>
130 <tr>
131 <td>
132                 <p>
133                   <code class="varname">acl_name</code>
134                 </p>
135               </td>
136 <td>
137                 <p>
138                   The name of an <code class="varname">address_match_list</code> as
139                   defined by the <span><strong class="command">acl</strong></span> statement.
140                 </p>
141               </td>
142 </tr>
143 <tr>
144 <td>
145                 <p>
146                   <code class="varname">address_match_list</code>
147                 </p>
148               </td>
149 <td>
150                 <p>
151                   A list of one or more
152                   <code class="varname">ip_addr</code>,
153                   <code class="varname">ip_prefix</code>, <code class="varname">key_id</code>,
154                   or <code class="varname">acl_name</code> elements, see
155                   <a href="Bv9ARM.ch06.html#address_match_lists" title="Address Match Lists">the section called &#8220;Address Match Lists&#8221;</a>.
156                 </p>
157               </td>
158 </tr>
159 <tr>
160 <td>
161                 <p>
162                   <code class="varname">masters_list</code>
163                 </p>
164               </td>
165 <td>
166                 <p>
167                   A named list of one or more <code class="varname">ip_addr</code>
168                   with optional <code class="varname">key_id</code> and/or
169                   <code class="varname">ip_port</code>.
170                   A <code class="varname">masters_list</code> may include other
171                   <code class="varname">masters_lists</code>.
172                 </p>
173               </td>
174 </tr>
175 <tr>
176 <td>
177                 <p>
178                   <code class="varname">domain_name</code>
179                 </p>
180               </td>
181 <td>
182                 <p>
183                   A quoted string which will be used as
184                   a DNS name, for example "<code class="literal">my.test.domain</code>".
185                 </p>
186               </td>
187 </tr>
188 <tr>
189 <td>
190                 <p>
191                   <code class="varname">dotted_decimal</code>
192                 </p>
193               </td>
194 <td>
195                 <p>
196                   One to four integers valued 0 through
197                   255 separated by dots (`.'), such as <span><strong class="command">123</strong></span>,
198                   <span><strong class="command">45.67</strong></span> or <span><strong class="command">89.123.45.67</strong></span>.
199                 </p>
200               </td>
201 </tr>
202 <tr>
203 <td>
204                 <p>
205                   <code class="varname">ip4_addr</code>
206                 </p>
207               </td>
208 <td>
209                 <p>
210                   An IPv4 address with exactly four elements
211                   in <code class="varname">dotted_decimal</code> notation.
212                 </p>
213               </td>
214 </tr>
215 <tr>
216 <td>
217                 <p>
218                   <code class="varname">ip6_addr</code>
219                 </p>
220               </td>
221 <td>
222                 <p>
223                   An IPv6 address, such as <span><strong class="command">2001:db8::1234</strong></span>.
224                   IPv6 scoped addresses that have ambiguity on their scope
225                   zones must be
226                   disambiguated by an appropriate zone ID with the percent
227                   character
228                   (`%') as delimiter.
229                   It is strongly recommended to use string zone names rather
230                   than
231                   numeric identifiers, in order to be robust against system
232                   configuration changes.
233                   However, since there is no standard mapping for such names
234                   and
235                   identifier values, currently only interface names as link
236                   identifiers
237                   are supported, assuming one-to-one mapping between
238                   interfaces and links.
239                   For example, a link-local address <span><strong class="command">fe80::1</strong></span> on the
240                   link attached to the interface <span><strong class="command">ne0</strong></span>
241                   can be specified as <span><strong class="command">fe80::1%ne0</strong></span>.
242                   Note that on most systems link-local addresses always have
243                   the
244                   ambiguity, and need to be disambiguated.
245                 </p>
246               </td>
247 </tr>
248 <tr>
249 <td>
250                 <p>
251                   <code class="varname">ip_addr</code>
252                 </p>
253               </td>
254 <td>
255                 <p>
256                   An <code class="varname">ip4_addr</code> or <code class="varname">ip6_addr</code>.
257                 </p>
258               </td>
259 </tr>
260 <tr>
261 <td>
262                 <p>
263                   <code class="varname">ip_port</code>
264                 </p>
265               </td>
266 <td>
267                 <p>
268                   An IP port <code class="varname">number</code>.
269                   The <code class="varname">number</code> is limited to 0
270                   through 65535, with values
271                   below 1024 typically restricted to use by processes running
272                   as root.
273                   In some cases, an asterisk (`*') character can be used as a
274                   placeholder to
275                   select a random high-numbered port.
276                 </p>
277               </td>
278 </tr>
279 <tr>
280 <td>
281                 <p>
282                   <code class="varname">ip_prefix</code>
283                 </p>
284               </td>
285 <td>
286                 <p>
287                   An IP network specified as an <code class="varname">ip_addr</code>,
288                   followed by a slash (`/') and then the number of bits in the
289                   netmask.
290                   Trailing zeros in a <code class="varname">ip_addr</code>
291                   may omitted.
292                   For example, <span><strong class="command">127/8</strong></span> is the
293                   network <span><strong class="command">127.0.0.0</strong></span> with
294                   netmask <span><strong class="command">255.0.0.0</strong></span> and <span><strong class="command">1.2.3.0/28</strong></span> is
295                   network <span><strong class="command">1.2.3.0</strong></span> with netmask <span><strong class="command">255.255.255.240</strong></span>.
296                 </p>
297               </td>
298 </tr>
299 <tr>
300 <td>
301                 <p>
302                   <code class="varname">key_id</code>
303                 </p>
304               </td>
305 <td>
306                 <p>
307                   A <code class="varname">domain_name</code> representing
308                   the name of a shared key, to be used for transaction
309                   security.
310                 </p>
311               </td>
312 </tr>
313 <tr>
314 <td>
315                 <p>
316                   <code class="varname">key_list</code>
317                 </p>
318               </td>
319 <td>
320                 <p>
321                   A list of one or more
322                   <code class="varname">key_id</code>s,
323                   separated by semicolons and ending with a semicolon.
324                 </p>
325               </td>
326 </tr>
327 <tr>
328 <td>
329                 <p>
330                   <code class="varname">number</code>
331                 </p>
332               </td>
333 <td>
334                 <p>
335                   A non-negative 32-bit integer
336                   (i.e., a number between 0 and 4294967295, inclusive).
337                   Its acceptable value might further
338                   be limited by the context in which it is used.
339                 </p>
340               </td>
341 </tr>
342 <tr>
343 <td>
344                 <p>
345                   <code class="varname">path_name</code>
346                 </p>
347               </td>
348 <td>
349                 <p>
350                   A quoted string which will be used as
351                   a pathname, such as <code class="filename">zones/master/my.test.domain</code>.
352                 </p>
353               </td>
354 </tr>
355 <tr>
356 <td>
357                 <p>
358                   <code class="varname">port_list</code>
359                 </p>
360               </td>
361 <td>
362                 <p>
363                   A list of an <code class="varname">ip_port</code> or a port
364                   range.
365                   A port range is specified in the form of
366                   <strong class="userinput"><code>range</code></strong> followed by
367                   two <code class="varname">ip_port</code>s,
368                   <code class="varname">port_low</code> and
369                   <code class="varname">port_high</code>, which represents
370                   port numbers from <code class="varname">port_low</code> through
371                   <code class="varname">port_high</code>, inclusive.
372                   <code class="varname">port_low</code> must not be larger than
373                   <code class="varname">port_high</code>.
374                   For example,
375                   <strong class="userinput"><code>range 1024 65535</code></strong> represents
376                   ports from 1024 through 65535.
377                   In either case an asterisk (`*') character is not
378                   allowed as a valid <code class="varname">ip_port</code>.
379                 </p>
380               </td>
381 </tr>
382 <tr>
383 <td>
384                 <p>
385                   <code class="varname">size_spec</code>
386                 </p>
387               </td>
388 <td>
389                 <p>
390                   A number, the word <strong class="userinput"><code>unlimited</code></strong>,
391                   or the word <strong class="userinput"><code>default</code></strong>.
392                 </p>
393                 <p>
394                   An <code class="varname">unlimited</code> <code class="varname">size_spec</code> requests unlimited
395                   use, or the maximum available amount. A <code class="varname">default size_spec</code> uses
396                   the limit that was in force when the server was started.
397                 </p>
398                 <p>
399                   A <code class="varname">number</code> can optionally be
400                   followed by a scaling factor:
401                   <strong class="userinput"><code>K</code></strong> or <strong class="userinput"><code>k</code></strong>
402                   for kilobytes,
403                   <strong class="userinput"><code>M</code></strong> or <strong class="userinput"><code>m</code></strong>
404                   for megabytes, and
405                   <strong class="userinput"><code>G</code></strong> or <strong class="userinput"><code>g</code></strong> for gigabytes,
406                   which scale by 1024, 1024*1024, and 1024*1024*1024
407                   respectively.
408                 </p>
409                 <p>
410                   The value must be representable as a 64-bit unsigned integer
411                   (0 to 18446744073709551615, inclusive).
412                   Using <code class="varname">unlimited</code> is the best
413                   way
414                   to safely set a really large number.
415                 </p>
416               </td>
417 </tr>
418 <tr>
419 <td>
420                 <p>
421                   <code class="varname">yes_or_no</code>
422                 </p>
423               </td>
424 <td>
425                 <p>
426                   Either <strong class="userinput"><code>yes</code></strong> or <strong class="userinput"><code>no</code></strong>.
427                   The words <strong class="userinput"><code>true</code></strong> and <strong class="userinput"><code>false</code></strong> are
428                   also accepted, as are the numbers <strong class="userinput"><code>1</code></strong>
429                   and <strong class="userinput"><code>0</code></strong>.
430                 </p>
431               </td>
432 </tr>
433 <tr>
434 <td>
435                 <p>
436                   <code class="varname">dialup_option</code>
437                 </p>
438               </td>
439 <td>
440                 <p>
441                   One of <strong class="userinput"><code>yes</code></strong>,
442                   <strong class="userinput"><code>no</code></strong>, <strong class="userinput"><code>notify</code></strong>,
443                   <strong class="userinput"><code>notify-passive</code></strong>, <strong class="userinput"><code>refresh</code></strong> or
444                   <strong class="userinput"><code>passive</code></strong>.
445                   When used in a zone, <strong class="userinput"><code>notify-passive</code></strong>,
446                   <strong class="userinput"><code>refresh</code></strong>, and <strong class="userinput"><code>passive</code></strong>
447                   are restricted to slave and stub zones.
448                 </p>
449               </td>
450 </tr>
451 </tbody>
452 </table></div>
453 <div class="sect2" lang="en">
454 <div class="titlepage"><div><div><h3 class="title">
455 <a name="address_match_lists"></a>Address Match Lists</h3></div></div></div>
456 <div class="sect3" lang="en">
457 <div class="titlepage"><div><div><h4 class="title">
458 <a name="id2573302"></a>Syntax</h4></div></div></div>
459 <pre class="programlisting"><code class="varname">address_match_list</code> = address_match_list_element ;
460   [<span class="optional"> address_match_list_element; ... </span>]
461 <code class="varname">address_match_list_element</code> = [<span class="optional"> ! </span>] (ip_address [<span class="optional">/length</span>] |
462    key key_id | acl_name | { address_match_list } )
463 </pre>
464 </div>
465 <div class="sect3" lang="en">
466 <div class="titlepage"><div><div><h4 class="title">
467 <a name="id2573330"></a>Definition and Usage</h4></div></div></div>
468 <p>
469             Address match lists are primarily used to determine access
470             control for various server operations. They are also used in
471             the <span><strong class="command">listen-on</strong></span> and <span><strong class="command">sortlist</strong></span>
472             statements. The elements
473             which constitute an address match list can be any of the
474             following:
475           </p>
476 <div class="itemizedlist"><ul type="disc">
477 <li>an IP address (IPv4 or IPv6)</li>
478 <li>an IP prefix (in `/' notation)</li>
479 <li>
480                 a key ID, as defined by the <span><strong class="command">key</strong></span>
481                 statement
482               </li>
483 <li>the name of an address match list defined with
484                 the <span><strong class="command">acl</strong></span> statement
485               </li>
486 <li>a nested address match list enclosed in braces</li>
487 </ul></div>
488 <p>
489             Elements can be negated with a leading exclamation mark (`!'),
490             and the match list names "any", "none", "localhost", and
491             "localnets"
492             are predefined. More information on those names can be found in
493             the description of the acl statement.
494           </p>
495 <p>
496             The addition of the key clause made the name of this syntactic
497             element something of a misnomer, since security keys can be used
498             to validate access without regard to a host or network address.
499             Nonetheless,
500             the term "address match list" is still used throughout the
501             documentation.
502           </p>
503 <p>
504             When a given IP address or prefix is compared to an address
505             match list, the list is traversed in order until an element
506             matches.
507             The interpretation of a match depends on whether the list is being
508             used
509             for access control, defining listen-on ports, or in a sortlist,
510             and whether the element was negated.
511           </p>
512 <p>
513             When used as an access control list, a non-negated match
514             allows access and a negated match denies access. If
515             there is no match, access is denied. The clauses
516             <span><strong class="command">allow-notify</strong></span>,
517             <span><strong class="command">allow-query</strong></span>,
518             <span><strong class="command">allow-query-cache</strong></span>,
519             <span><strong class="command">allow-transfer</strong></span>,
520             <span><strong class="command">allow-update</strong></span>,
521             <span><strong class="command">allow-update-forwarding</strong></span>, and
522             <span><strong class="command">blackhole</strong></span> all use address match
523             lists.  Similarly, the listen-on option will cause the
524             server to not accept queries on any of the machine's
525             addresses which do not match the list.
526           </p>
527 <p>
528             Because of the first-match aspect of the algorithm, an element
529             that defines a subset of another element in the list should come
530             before the broader element, regardless of whether either is
531             negated. For
532             example, in
533             <span><strong class="command">1.2.3/24; ! 1.2.3.13;</strong></span> the 1.2.3.13
534             element is
535             completely useless because the algorithm will match any lookup for
536             1.2.3.13 to the 1.2.3/24 element.
537             Using <span><strong class="command">! 1.2.3.13; 1.2.3/24</strong></span> fixes
538             that problem by having 1.2.3.13 blocked by the negation but all
539             other 1.2.3.* hosts fall through.
540           </p>
541 </div>
542 </div>
543 <div class="sect2" lang="en">
544 <div class="titlepage"><div><div><h3 class="title">
545 <a name="id2573436"></a>Comment Syntax</h3></div></div></div>
546 <p>
547           The <acronym class="acronym">BIND</acronym> 9 comment syntax allows for
548           comments to appear
549           anywhere that whitespace may appear in a <acronym class="acronym">BIND</acronym> configuration
550           file. To appeal to programmers of all kinds, they can be written
551           in the C, C++, or shell/perl style.
552         </p>
553 <div class="sect3" lang="en">
554 <div class="titlepage"><div><div><h4 class="title">
555 <a name="id2573588"></a>Syntax</h4></div></div></div>
556 <p>
557             </p>
558 <pre class="programlisting">/* This is a <acronym class="acronym">BIND</acronym> comment as in C */</pre>
559 <p>
560             </p>
561 <pre class="programlisting">// This is a <acronym class="acronym">BIND</acronym> comment as in C++</pre>
562 <p>
563             </p>
564 <pre class="programlisting"># This is a <acronym class="acronym">BIND</acronym> comment as in common UNIX shells and perl</pre>
565 <p>
566           </p>
567 </div>
568 <div class="sect3" lang="en">
569 <div class="titlepage"><div><div><h4 class="title">
570 <a name="id2573618"></a>Definition and Usage</h4></div></div></div>
571 <p>
572             Comments may appear anywhere that whitespace may appear in
573             a <acronym class="acronym">BIND</acronym> configuration file.
574           </p>
575 <p>
576             C-style comments start with the two characters /* (slash,
577             star) and end with */ (star, slash). Because they are completely
578             delimited with these characters, they can be used to comment only
579             a portion of a line or to span multiple lines.
580           </p>
581 <p>
582             C-style comments cannot be nested. For example, the following
583             is not valid because the entire comment ends with the first */:
584           </p>
585 <p>
586
587 </p>
588 <pre class="programlisting">/* This is the start of a comment.
589    This is still part of the comment.
590 /* This is an incorrect attempt at nesting a comment. */
591    This is no longer in any comment. */
592 </pre>
593 <p>
594
595           </p>
596 <p>
597             C++-style comments start with the two characters // (slash,
598             slash) and continue to the end of the physical line. They cannot
599             be continued across multiple physical lines; to have one logical
600             comment span multiple lines, each line must use the // pair.
601           </p>
602 <p>
603             For example:
604           </p>
605 <p>
606
607 </p>
608 <pre class="programlisting">// This is the start of a comment.  The next line
609 // is a new comment, even though it is logically
610 // part of the previous comment.
611 </pre>
612 <p>
613
614           </p>
615 <p>
616             Shell-style (or perl-style, if you prefer) comments start
617             with the character <code class="literal">#</code> (number sign)
618             and continue to the end of the
619             physical line, as in C++ comments.
620           </p>
621 <p>
622             For example:
623           </p>
624 <p>
625
626 </p>
627 <pre class="programlisting"># This is the start of a comment.  The next line
628 # is a new comment, even though it is logically
629 # part of the previous comment.
630 </pre>
631 <p>
632
633           </p>
634 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
635 <h3 class="title">Warning</h3>
636 <p>
637               You cannot use the semicolon (`;') character
638               to start a comment such as you would in a zone file. The
639               semicolon indicates the end of a configuration
640               statement.
641             </p>
642 </div>
643 </div>
644 </div>
645 </div>
646 <div class="sect1" lang="en">
647 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
648 <a name="Configuration_File_Grammar"></a>Configuration File Grammar</h2></div></div></div>
649 <p>
650         A <acronym class="acronym">BIND</acronym> 9 configuration consists of
651         statements and comments.
652         Statements end with a semicolon. Statements and comments are the
653         only elements that can appear without enclosing braces. Many
654         statements contain a block of sub-statements, which are also
655         terminated with a semicolon.
656       </p>
657 <p>
658         The following statements are supported:
659       </p>
660 <div class="informaltable"><table border="1">
661 <colgroup>
662 <col>
663 <col>
664 </colgroup>
665 <tbody>
666 <tr>
667 <td>
668                 <p><span><strong class="command">acl</strong></span></p>
669               </td>
670 <td>
671                 <p>
672                   defines a named IP address
673                   matching list, for access control and other uses.
674                 </p>
675               </td>
676 </tr>
677 <tr>
678 <td>
679                 <p><span><strong class="command">controls</strong></span></p>
680               </td>
681 <td>
682                 <p>
683                   declares control channels to be used
684                   by the <span><strong class="command">rndc</strong></span> utility.
685                 </p>
686               </td>
687 </tr>
688 <tr>
689 <td>
690                 <p><span><strong class="command">include</strong></span></p>
691               </td>
692 <td>
693                 <p>
694                   includes a file.
695                 </p>
696               </td>
697 </tr>
698 <tr>
699 <td>
700                 <p><span><strong class="command">key</strong></span></p>
701               </td>
702 <td>
703                 <p>
704                   specifies key information for use in
705                   authentication and authorization using TSIG.
706                 </p>
707               </td>
708 </tr>
709 <tr>
710 <td>
711                 <p><span><strong class="command">logging</strong></span></p>
712               </td>
713 <td>
714                 <p>
715                   specifies what the server logs, and where
716                   the log messages are sent.
717                 </p>
718               </td>
719 </tr>
720 <tr>
721 <td>
722                 <p><span><strong class="command">lwres</strong></span></p>
723               </td>
724 <td>
725                 <p>
726                   configures <span><strong class="command">named</strong></span> to
727                   also act as a light-weight resolver daemon (<span><strong class="command">lwresd</strong></span>).
728                 </p>
729               </td>
730 </tr>
731 <tr>
732 <td>
733                 <p><span><strong class="command">masters</strong></span></p>
734               </td>
735 <td>
736                 <p>
737                   defines a named masters list for
738                   inclusion in stub and slave zone masters clauses.
739                 </p>
740               </td>
741 </tr>
742 <tr>
743 <td>
744                 <p><span><strong class="command">options</strong></span></p>
745               </td>
746 <td>
747                 <p>
748                   controls global server configuration
749                   options and sets defaults for other statements.
750                 </p>
751               </td>
752 </tr>
753 <tr>
754 <td>
755                 <p><span><strong class="command">server</strong></span></p>
756               </td>
757 <td>
758                 <p>
759                   sets certain configuration options on
760                   a per-server basis.
761                 </p>
762               </td>
763 </tr>
764 <tr>
765 <td>
766                 <p><span><strong class="command">trusted-keys</strong></span></p>
767               </td>
768 <td>
769                 <p>
770                   defines trusted DNSSEC keys.
771                 </p>
772               </td>
773 </tr>
774 <tr>
775 <td>
776                 <p><span><strong class="command">view</strong></span></p>
777               </td>
778 <td>
779                 <p>
780                   defines a view.
781                 </p>
782               </td>
783 </tr>
784 <tr>
785 <td>
786                 <p><span><strong class="command">zone</strong></span></p>
787               </td>
788 <td>
789                 <p>
790                   defines a zone.
791                 </p>
792               </td>
793 </tr>
794 </tbody>
795 </table></div>
796 <p>
797         The <span><strong class="command">logging</strong></span> and
798         <span><strong class="command">options</strong></span> statements may only occur once
799         per
800         configuration.
801       </p>
802 <div class="sect2" lang="en">
803 <div class="titlepage"><div><div><h3 class="title">
804 <a name="id2574117"></a><span><strong class="command">acl</strong></span> Statement Grammar</h3></div></div></div>
805 <pre class="programlisting"><span><strong class="command">acl</strong></span> acl-name {
806     address_match_list
807 };
808 </pre>
809 </div>
810 <div class="sect2" lang="en">
811 <div class="titlepage"><div><div><h3 class="title">
812 <a name="acl"></a><span><strong class="command">acl</strong></span> Statement Definition and
813           Usage</h3></div></div></div>
814 <p>
815           The <span><strong class="command">acl</strong></span> statement assigns a symbolic
816           name to an address match list. It gets its name from a primary
817           use of address match lists: Access Control Lists (ACLs).
818         </p>
819 <p>
820           Note that an address match list's name must be defined
821           with <span><strong class="command">acl</strong></span> before it can be used
822           elsewhere; no
823           forward references are allowed.
824         </p>
825 <p>
826           The following ACLs are built-in:
827         </p>
828 <div class="informaltable"><table border="1">
829 <colgroup>
830 <col>
831 <col>
832 </colgroup>
833 <tbody>
834 <tr>
835 <td>
836                   <p><span><strong class="command">any</strong></span></p>
837                 </td>
838 <td>
839                   <p>
840                     Matches all hosts.
841                   </p>
842                 </td>
843 </tr>
844 <tr>
845 <td>
846                   <p><span><strong class="command">none</strong></span></p>
847                 </td>
848 <td>
849                   <p>
850                     Matches no hosts.
851                   </p>
852                 </td>
853 </tr>
854 <tr>
855 <td>
856                   <p><span><strong class="command">localhost</strong></span></p>
857                 </td>
858 <td>
859                   <p>
860                     Matches the IPv4 and IPv6 addresses of all network
861                     interfaces on the system.
862                   </p>
863                 </td>
864 </tr>
865 <tr>
866 <td>
867                   <p><span><strong class="command">localnets</strong></span></p>
868                 </td>
869 <td>
870                   <p>
871                     Matches any host on an IPv4 or IPv6 network
872                     for which the system has an interface.
873                     Some systems do not provide a way to determine the prefix
874                     lengths of
875                     local IPv6 addresses.
876                     In such a case, <span><strong class="command">localnets</strong></span>
877                     only matches the local
878                     IPv6 addresses, just like <span><strong class="command">localhost</strong></span>.
879                   </p>
880                 </td>
881 </tr>
882 </tbody>
883 </table></div>
884 </div>
885 <div class="sect2" lang="en">
886 <div class="titlepage"><div><div><h3 class="title">
887 <a name="id2574307"></a><span><strong class="command">controls</strong></span> Statement Grammar</h3></div></div></div>
888 <pre class="programlisting"><span><strong class="command">controls</strong></span> {
889    [ inet ( ip_addr | * ) [ port ip_port ] allow { <em class="replaceable"><code> address_match_list </code></em> }
890                 keys { <em class="replaceable"><code>key_list</code></em> }; ]
891    [ inet ...; ]
892    [ 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> keys { <em class="replaceable"><code>key_list</code></em> }; ]
893    [ unix ...; ]
894 };
895 </pre>
896 </div>
897 <div class="sect2" lang="en">
898 <div class="titlepage"><div><div><h3 class="title">
899 <a name="controls_statement_definition_and_usage"></a><span><strong class="command">controls</strong></span> Statement Definition and
900           Usage</h3></div></div></div>
901 <p>
902           The <span><strong class="command">controls</strong></span> statement declares control
903           channels to be used by system administrators to control the
904           operation of the name server. These control channels are
905           used by the <span><strong class="command">rndc</strong></span> utility to send
906           commands to and retrieve non-DNS results from a name server.
907         </p>
908 <p>
909           An <span><strong class="command">inet</strong></span> control channel is a TCP socket
910           listening at the specified <span><strong class="command">ip_port</strong></span> on the
911           specified <span><strong class="command">ip_addr</strong></span>, which can be an IPv4 or IPv6
912           address.  An <span><strong class="command">ip_addr</strong></span> of <code class="literal">*</code> (asterisk) is
913           interpreted as the IPv4 wildcard address; connections will be
914           accepted on any of the system's IPv4 addresses.
915           To listen on the IPv6 wildcard address,
916           use an <span><strong class="command">ip_addr</strong></span> of <code class="literal">::</code>.
917           If you will only use <span><strong class="command">rndc</strong></span> on the local host,
918           using the loopback address (<code class="literal">127.0.0.1</code>
919           or <code class="literal">::1</code>) is recommended for maximum security.
920         </p>
921 <p>
922           If no port is specified, port 953 is used. The asterisk
923           "<code class="literal">*</code>" cannot be used for <span><strong class="command">ip_port</strong></span>.
924         </p>
925 <p>
926           The ability to issue commands over the control channel is
927           restricted by the <span><strong class="command">allow</strong></span> and
928           <span><strong class="command">keys</strong></span> clauses.
929           Connections to the control channel are permitted based on the
930           <span><strong class="command">address_match_list</strong></span>.  This is for simple
931           IP address based filtering only; any <span><strong class="command">key_id</strong></span>
932           elements of the <span><strong class="command">address_match_list</strong></span>
933           are ignored.
934         </p>
935 <p>
936           A <span><strong class="command">unix</strong></span> control channel is a UNIX domain
937           socket listening at the specified path in the file system.
938           Access to the socket is specified by the <span><strong class="command">perm</strong></span>,
939           <span><strong class="command">owner</strong></span> and <span><strong class="command">group</strong></span> clauses.
940           Note on some platforms (SunOS and Solaris) the permissions
941           (<span><strong class="command">perm</strong></span>) are applied to the parent directory
942           as the permissions on the socket itself are ignored.
943         </p>
944 <p>
945           The primary authorization mechanism of the command
946           channel is the <span><strong class="command">key_list</strong></span>, which
947           contains a list of <span><strong class="command">key_id</strong></span>s.
948           Each <span><strong class="command">key_id</strong></span> in the <span><strong class="command">key_list</strong></span>
949           is authorized to execute commands over the control channel.
950           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>)
951           for information about configuring keys in <span><strong class="command">rndc</strong></span>.
952         </p>
953 <p>
954           If no <span><strong class="command">controls</strong></span> statement is present,
955           <span><strong class="command">named</strong></span> will set up a default
956           control channel listening on the loopback address 127.0.0.1
957           and its IPv6 counterpart ::1.
958           In this case, and also when the <span><strong class="command">controls</strong></span> statement
959           is present but does not have a <span><strong class="command">keys</strong></span> clause,
960           <span><strong class="command">named</strong></span> will attempt to load the command channel key
961           from the file <code class="filename">rndc.key</code> in
962           <code class="filename">/etc</code> (or whatever <code class="varname">sysconfdir</code>
963           was specified as when <acronym class="acronym">BIND</acronym> was built).
964           To create a <code class="filename">rndc.key</code> file, run
965           <strong class="userinput"><code>rndc-confgen -a</code></strong>.
966         </p>
967 <p>
968           The <code class="filename">rndc.key</code> feature was created to
969           ease the transition of systems from <acronym class="acronym">BIND</acronym> 8,
970           which did not have digital signatures on its command channel
971           messages and thus did not have a <span><strong class="command">keys</strong></span> clause.
972
973           It makes it possible to use an existing <acronym class="acronym">BIND</acronym> 8
974           configuration file in <acronym class="acronym">BIND</acronym> 9 unchanged,
975           and still have <span><strong class="command">rndc</strong></span> work the same way
976           <span><strong class="command">ndc</strong></span> worked in BIND 8, simply by executing the
977           command <strong class="userinput"><code>rndc-confgen -a</code></strong> after BIND 9 is
978           installed.
979         </p>
980 <p>
981           Since the <code class="filename">rndc.key</code> feature
982           is only intended to allow the backward-compatible usage of
983           <acronym class="acronym">BIND</acronym> 8 configuration files, this
984           feature does not
985           have a high degree of configurability.  You cannot easily change
986           the key name or the size of the secret, so you should make a
987           <code class="filename">rndc.conf</code> with your own key if you
988           wish to change
989           those things.  The <code class="filename">rndc.key</code> file
990           also has its
991           permissions set such that only the owner of the file (the user that
992           <span><strong class="command">named</strong></span> is running as) can access it.
993           If you
994           desire greater flexibility in allowing other users to access
995           <span><strong class="command">rndc</strong></span> commands, then you need to create
996           a
997           <code class="filename">rndc.conf</code> file and make it group
998           readable by a group
999           that contains the users who should have access.
1000         </p>
1001 <p>
1002           To disable the command channel, use an empty
1003           <span><strong class="command">controls</strong></span> statement:
1004           <span><strong class="command">controls { };</strong></span>.
1005         </p>
1006 </div>
1007 <div class="sect2" lang="en">
1008 <div class="titlepage"><div><div><h3 class="title">
1009 <a name="id2574736"></a><span><strong class="command">include</strong></span> Statement Grammar</h3></div></div></div>
1010 <pre class="programlisting"><span><strong class="command">include</strong></span> <em class="replaceable"><code>filename</code></em>;</pre>
1011 </div>
1012 <div class="sect2" lang="en">
1013 <div class="titlepage"><div><div><h3 class="title">
1014 <a name="id2574753"></a><span><strong class="command">include</strong></span> Statement Definition and
1015           Usage</h3></div></div></div>
1016 <p>
1017           The <span><strong class="command">include</strong></span> statement inserts the
1018           specified file at the point where the <span><strong class="command">include</strong></span>
1019           statement is encountered. The <span><strong class="command">include</strong></span>
1020                 statement facilitates the administration of configuration
1021           files
1022           by permitting the reading or writing of some things but not
1023           others. For example, the statement could include private keys
1024           that are readable only by the name server.
1025         </p>
1026 </div>
1027 <div class="sect2" lang="en">
1028 <div class="titlepage"><div><div><h3 class="title">
1029 <a name="id2574776"></a><span><strong class="command">key</strong></span> Statement Grammar</h3></div></div></div>
1030 <pre class="programlisting"><span><strong class="command">key</strong></span> <em class="replaceable"><code>key_id</code></em> {
1031     algorithm <em class="replaceable"><code>string</code></em>;
1032     secret <em class="replaceable"><code>string</code></em>;
1033 };
1034 </pre>
1035 </div>
1036 <div class="sect2" lang="en">
1037 <div class="titlepage"><div><div><h3 class="title">
1038 <a name="id2574800"></a><span><strong class="command">key</strong></span> Statement Definition and Usage</h3></div></div></div>
1039 <p>
1040           The <span><strong class="command">key</strong></span> statement defines a shared
1041           secret key for use with TSIG (see <a href="Bv9ARM.ch04.html#tsig" title="TSIG">the section called &#8220;TSIG&#8221;</a>)
1042           or the command channel
1043           (see <a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage" title="controls Statement Definition and
1044           Usage">the section called &#8220;<span><strong class="command">controls</strong></span> Statement Definition and
1045           Usage&#8221;</a>).
1046         </p>
1047 <p>
1048           The <span><strong class="command">key</strong></span> statement can occur at the
1049           top level
1050           of the configuration file or inside a <span><strong class="command">view</strong></span>
1051           statement.  Keys defined in top-level <span><strong class="command">key</strong></span>
1052           statements can be used in all views.  Keys intended for use in
1053           a <span><strong class="command">controls</strong></span> statement
1054           (see <a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage" title="controls Statement Definition and
1055           Usage">the section called &#8220;<span><strong class="command">controls</strong></span> Statement Definition and
1056           Usage&#8221;</a>)
1057           must be defined at the top level.
1058         </p>
1059 <p>
1060           The <em class="replaceable"><code>key_id</code></em>, also known as the
1061           key name, is a domain name uniquely identifying the key. It can
1062           be used in a <span><strong class="command">server</strong></span>
1063           statement to cause requests sent to that
1064           server to be signed with this key, or in address match lists to
1065           verify that incoming requests have been signed with a key
1066           matching this name, algorithm, and secret.
1067         </p>
1068 <p>
1069           The <em class="replaceable"><code>algorithm_id</code></em> is a string
1070           that specifies a security/authentication algorithm.  Named
1071           supports <code class="literal">hmac-md5</code>,
1072           <code class="literal">hmac-sha1</code>, <code class="literal">hmac-sha224</code>,
1073           <code class="literal">hmac-sha256</code>, <code class="literal">hmac-sha384</code>
1074           and <code class="literal">hmac-sha512</code> TSIG authentication.
1075           Truncated hashes are supported by appending the minimum
1076           number of required bits preceded by a dash, e.g.
1077           <code class="literal">hmac-sha1-80</code>.  The
1078           <em class="replaceable"><code>secret_string</code></em> is the secret
1079           to be used by the algorithm, and is treated as a base-64
1080           encoded string.
1081         </p>
1082 </div>
1083 <div class="sect2" lang="en">
1084 <div class="titlepage"><div><div><h3 class="title">
1085 <a name="id2574958"></a><span><strong class="command">logging</strong></span> Statement Grammar</h3></div></div></div>
1086 <pre class="programlisting"><span><strong class="command">logging</strong></span> {
1087    [ <span><strong class="command">channel</strong></span> <em class="replaceable"><code>channel_name</code></em> {
1088      ( <span><strong class="command">file</strong></span> <em class="replaceable"><code>path name</code></em>
1089          [ <span><strong class="command">versions</strong></span> ( <em class="replaceable"><code>number</code></em> | <span><strong class="command">unlimited</strong></span> ) ]
1090          [ <span><strong class="command">size</strong></span> <em class="replaceable"><code>size spec</code></em> ]
1091        | <span><strong class="command">syslog</strong></span> <em class="replaceable"><code>syslog_facility</code></em>
1092        | <span><strong class="command">stderr</strong></span>
1093        | <span><strong class="command">null</strong></span> );
1094      [ <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> |
1095                  <code class="option">info</code> | <code class="option">debug</code> [ <em class="replaceable"><code>level</code></em> ] | <code class="option">dynamic</code> ); ]
1096      [ <span><strong class="command">print-category</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1097      [ <span><strong class="command">print-severity</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1098      [ <span><strong class="command">print-time</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1099    }; ]
1100    [ <span><strong class="command">category</strong></span> <em class="replaceable"><code>category_name</code></em> {
1101      <em class="replaceable"><code>channel_name</code></em> ; [ <em class="replaceable"><code>channel_name</code></em> ; ... ]
1102    }; ]
1103    ...
1104 };
1105 </pre>
1106 </div>
1107 <div class="sect2" lang="en">
1108 <div class="titlepage"><div><div><h3 class="title">
1109 <a name="id2575084"></a><span><strong class="command">logging</strong></span> Statement Definition and
1110           Usage</h3></div></div></div>
1111 <p>
1112           The <span><strong class="command">logging</strong></span> statement configures a
1113           wide
1114           variety of logging options for the name server. Its <span><strong class="command">channel</strong></span> phrase
1115           associates output methods, format options and severity levels with
1116           a name that can then be used with the <span><strong class="command">category</strong></span> phrase
1117           to select how various classes of messages are logged.
1118         </p>
1119 <p>
1120           Only one <span><strong class="command">logging</strong></span> statement is used to
1121           define
1122           as many channels and categories as are wanted. If there is no <span><strong class="command">logging</strong></span> statement,
1123           the logging configuration will be:
1124         </p>
1125 <pre class="programlisting">logging {
1126      category default { default_syslog; default_debug; };
1127      category unmatched { null; };
1128 };
1129 </pre>
1130 <p>
1131           In <acronym class="acronym">BIND</acronym> 9, the logging configuration
1132           is only established when
1133           the entire configuration file has been parsed.  In <acronym class="acronym">BIND</acronym> 8, it was
1134           established as soon as the <span><strong class="command">logging</strong></span>
1135           statement
1136           was parsed. When the server is starting up, all logging messages
1137           regarding syntax errors in the configuration file go to the default
1138           channels, or to standard error if the "<code class="option">-g</code>" option
1139           was specified.
1140         </p>
1141 <div class="sect3" lang="en">
1142 <div class="titlepage"><div><div><h4 class="title">
1143 <a name="id2575137"></a>The <span><strong class="command">channel</strong></span> Phrase</h4></div></div></div>
1144 <p>
1145             All log output goes to one or more <span class="emphasis"><em>channels</em></span>;
1146             you can make as many of them as you want.
1147           </p>
1148 <p>
1149             Every channel definition must include a destination clause that
1150             says whether messages selected for the channel go to a file, to a
1151             particular syslog facility, to the standard error stream, or are
1152             discarded. It can optionally also limit the message severity level
1153             that will be accepted by the channel (the default is
1154             <span><strong class="command">info</strong></span>), and whether to include a
1155             <span><strong class="command">named</strong></span>-generated time stamp, the
1156             category name
1157             and/or severity level (the default is not to include any).
1158           </p>
1159 <p>
1160             The <span><strong class="command">null</strong></span> destination clause
1161             causes all messages sent to the channel to be discarded;
1162             in that case, other options for the channel are meaningless.
1163           </p>
1164 <p>
1165             The <span><strong class="command">file</strong></span> destination clause directs
1166             the channel
1167             to a disk file.  It can include limitations
1168             both on how large the file is allowed to become, and how many
1169             versions
1170             of the file will be saved each time the file is opened.
1171           </p>
1172 <p>
1173             If you use the <span><strong class="command">versions</strong></span> log file
1174             option, then
1175             <span><strong class="command">named</strong></span> will retain that many backup
1176             versions of the file by
1177             renaming them when opening.  For example, if you choose to keep
1178             three old versions
1179             of the file <code class="filename">lamers.log</code>, then just
1180             before it is opened
1181             <code class="filename">lamers.log.1</code> is renamed to
1182             <code class="filename">lamers.log.2</code>, <code class="filename">lamers.log.0</code> is renamed
1183             to <code class="filename">lamers.log.1</code>, and <code class="filename">lamers.log</code> is
1184             renamed to <code class="filename">lamers.log.0</code>.
1185             You can say <span><strong class="command">versions unlimited</strong></span> to
1186             not limit
1187             the number of versions.
1188             If a <span><strong class="command">size</strong></span> option is associated with
1189             the log file,
1190             then renaming is only done when the file being opened exceeds the
1191             indicated size.  No backup versions are kept by default; any
1192             existing
1193             log file is simply appended.
1194           </p>
1195 <p>
1196             The <span><strong class="command">size</strong></span> option for files is used
1197             to limit log
1198             growth. If the file ever exceeds the size, then <span><strong class="command">named</strong></span> will
1199             stop writing to the file unless it has a <span><strong class="command">versions</strong></span> option
1200             associated with it.  If backup versions are kept, the files are
1201             rolled as
1202             described above and a new one begun.  If there is no
1203             <span><strong class="command">versions</strong></span> option, no more data will
1204             be written to the log
1205             until some out-of-band mechanism removes or truncates the log to
1206             less than the
1207             maximum size.  The default behavior is not to limit the size of
1208             the
1209             file.
1210           </p>
1211 <p>
1212             Example usage of the <span><strong class="command">size</strong></span> and
1213             <span><strong class="command">versions</strong></span> options:
1214           </p>
1215 <pre class="programlisting">channel an_example_channel {
1216     file "example.log" versions 3 size 20m;
1217     print-time yes;
1218     print-category yes;
1219 };
1220 </pre>
1221 <p>
1222             The <span><strong class="command">syslog</strong></span> destination clause
1223             directs the
1224             channel to the system log.  Its argument is a
1225             syslog facility as described in the <span><strong class="command">syslog</strong></span> man
1226             page. Known facilities are <span><strong class="command">kern</strong></span>, <span><strong class="command">user</strong></span>,
1227             <span><strong class="command">mail</strong></span>, <span><strong class="command">daemon</strong></span>, <span><strong class="command">auth</strong></span>,
1228             <span><strong class="command">syslog</strong></span>, <span><strong class="command">lpr</strong></span>, <span><strong class="command">news</strong></span>,
1229             <span><strong class="command">uucp</strong></span>, <span><strong class="command">cron</strong></span>, <span><strong class="command">authpriv</strong></span>,
1230             <span><strong class="command">ftp</strong></span>, <span><strong class="command">local0</strong></span>, <span><strong class="command">local1</strong></span>,
1231             <span><strong class="command">local2</strong></span>, <span><strong class="command">local3</strong></span>, <span><strong class="command">local4</strong></span>,
1232             <span><strong class="command">local5</strong></span>, <span><strong class="command">local6</strong></span> and
1233             <span><strong class="command">local7</strong></span>, however not all facilities
1234             are supported on
1235             all operating systems.
1236             How <span><strong class="command">syslog</strong></span> will handle messages
1237             sent to
1238             this facility is described in the <span><strong class="command">syslog.conf</strong></span> man
1239             page. If you have a system which uses a very old version of <span><strong class="command">syslog</strong></span> that
1240             only uses two arguments to the <span><strong class="command">openlog()</strong></span> function,
1241             then this clause is silently ignored.
1242           </p>
1243 <p>
1244             The <span><strong class="command">severity</strong></span> clause works like <span><strong class="command">syslog</strong></span>'s
1245             "priorities", except that they can also be used if you are writing
1246             straight to a file rather than using <span><strong class="command">syslog</strong></span>.
1247             Messages which are not at least of the severity level given will
1248             not be selected for the channel; messages of higher severity
1249             levels
1250             will be accepted.
1251           </p>
1252 <p>
1253             If you are using <span><strong class="command">syslog</strong></span>, then the <span><strong class="command">syslog.conf</strong></span> priorities
1254             will also determine what eventually passes through. For example,
1255             defining a channel facility and severity as <span><strong class="command">daemon</strong></span> and <span><strong class="command">debug</strong></span> but
1256             only logging <span><strong class="command">daemon.warning</strong></span> via <span><strong class="command">syslog.conf</strong></span> will
1257             cause messages of severity <span><strong class="command">info</strong></span> and
1258             <span><strong class="command">notice</strong></span> to
1259             be dropped. If the situation were reversed, with <span><strong class="command">named</strong></span> writing
1260             messages of only <span><strong class="command">warning</strong></span> or higher,
1261             then <span><strong class="command">syslogd</strong></span> would
1262             print all messages it received from the channel.
1263           </p>
1264 <p>
1265             The <span><strong class="command">stderr</strong></span> destination clause
1266             directs the
1267             channel to the server's standard error stream.  This is intended
1268             for
1269             use when the server is running as a foreground process, for
1270             example
1271             when debugging a configuration.
1272           </p>
1273 <p>
1274             The server can supply extensive debugging information when
1275             it is in debugging mode. If the server's global debug level is
1276             greater
1277             than zero, then debugging mode will be active. The global debug
1278             level is set either by starting the <span><strong class="command">named</strong></span> server
1279             with the <code class="option">-d</code> flag followed by a positive integer,
1280             or by running <span><strong class="command">rndc trace</strong></span>.
1281             The global debug level
1282             can be set to zero, and debugging mode turned off, by running <span><strong class="command">rndc
1283 notrace</strong></span>. All debugging messages in the server have a debug
1284             level, and higher debug levels give more detailed output. Channels
1285             that specify a specific debug severity, for example:
1286           </p>
1287 <pre class="programlisting">channel specific_debug_level {
1288     file "foo";
1289     severity debug 3;
1290 };
1291 </pre>
1292 <p>
1293             will get debugging output of level 3 or less any time the
1294             server is in debugging mode, regardless of the global debugging
1295             level. Channels with <span><strong class="command">dynamic</strong></span>
1296             severity use the
1297             server's global debug level to determine what messages to print.
1298           </p>
1299 <p>
1300             If <span><strong class="command">print-time</strong></span> has been turned on,
1301             then
1302             the date and time will be logged. <span><strong class="command">print-time</strong></span> may
1303             be specified for a <span><strong class="command">syslog</strong></span> channel,
1304             but is usually
1305             pointless since <span><strong class="command">syslog</strong></span> also prints
1306             the date and
1307             time. If <span><strong class="command">print-category</strong></span> is
1308             requested, then the
1309             category of the message will be logged as well. Finally, if <span><strong class="command">print-severity</strong></span> is
1310             on, then the severity level of the message will be logged. The <span><strong class="command">print-</strong></span> options may
1311             be used in any combination, and will always be printed in the
1312             following
1313             order: time, category, severity. Here is an example where all
1314             three <span><strong class="command">print-</strong></span> options
1315             are on:
1316           </p>
1317 <p>
1318             <code class="computeroutput">28-Feb-2000 15:05:32.863 general: notice: running</code>
1319           </p>
1320 <p>
1321             There are four predefined channels that are used for
1322             <span><strong class="command">named</strong></span>'s default logging as follows.
1323             How they are
1324             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>.
1325           </p>
1326 <pre class="programlisting">channel default_syslog {
1327     syslog daemon;                      // send to syslog's daemon
1328                                         // facility
1329     severity info;                      // only send priority info
1330                                         // and higher
1331 };
1332
1333 channel default_debug {
1334     file "named.run";                   // write to named.run in
1335                                         // the working directory
1336                                         // Note: stderr is used instead
1337                                         // of "named.run"
1338                                         // if the server is started
1339                                         // with the '-f' option.
1340     severity dynamic;                   // log at the server's
1341                                         // current debug level
1342 };
1343
1344 channel default_stderr {
1345     stderr;                             // writes to stderr
1346     severity info;                      // only send priority info
1347                                         // and higher
1348 };
1349
1350 channel null {
1351    null;                                // toss anything sent to
1352                                         // this channel
1353 };
1354 </pre>
1355 <p>
1356             The <span><strong class="command">default_debug</strong></span> channel has the
1357             special
1358             property that it only produces output when the server's debug
1359             level is
1360             nonzero.  It normally writes to a file called <code class="filename">named.run</code>
1361             in the server's working directory.
1362           </p>
1363 <p>
1364             For security reasons, when the "<code class="option">-u</code>"
1365             command line option is used, the <code class="filename">named.run</code> file
1366             is created only after <span><strong class="command">named</strong></span> has
1367             changed to the
1368             new UID, and any debug output generated while <span><strong class="command">named</strong></span> is
1369             starting up and still running as root is discarded.  If you need
1370             to capture this output, you must run the server with the "<code class="option">-g</code>"
1371             option and redirect standard error to a file.
1372           </p>
1373 <p>
1374             Once a channel is defined, it cannot be redefined. Thus you
1375             cannot alter the built-in channels directly, but you can modify
1376             the default logging by pointing categories at channels you have
1377             defined.
1378           </p>
1379 </div>
1380 <div class="sect3" lang="en">
1381 <div class="titlepage"><div><div><h4 class="title">
1382 <a name="the_category_phrase"></a>The <span><strong class="command">category</strong></span> Phrase</h4></div></div></div>
1383 <p>
1384             There are many categories, so you can send the logs you want
1385             to see wherever you want, without seeing logs you don't want. If
1386             you don't specify a list of channels for a category, then log
1387             messages
1388             in that category will be sent to the <span><strong class="command">default</strong></span> category
1389             instead. If you don't specify a default category, the following
1390             "default default" is used:
1391           </p>
1392 <pre class="programlisting">category default { default_syslog; default_debug; };
1393 </pre>
1394 <p>
1395             As an example, let's say you want to log security events to
1396             a file, but you also want keep the default logging behavior. You'd
1397             specify the following:
1398           </p>
1399 <pre class="programlisting">channel my_security_channel {
1400     file "my_security_file";
1401     severity info;
1402 };
1403 category security {
1404     my_security_channel;
1405     default_syslog;
1406     default_debug;
1407 };</pre>
1408 <p>
1409             To discard all messages in a category, specify the <span><strong class="command">null</strong></span> channel:
1410           </p>
1411 <pre class="programlisting">category xfer-out { null; };
1412 category notify { null; };
1413 </pre>
1414 <p>
1415             Following are the available categories and brief descriptions
1416             of the types of log information they contain. More
1417             categories may be added in future <acronym class="acronym">BIND</acronym> releases.
1418           </p>
1419 <div class="informaltable"><table border="1">
1420 <colgroup>
1421 <col>
1422 <col>
1423 </colgroup>
1424 <tbody>
1425 <tr>
1426 <td>
1427                     <p><span><strong class="command">default</strong></span></p>
1428                   </td>
1429 <td>
1430                     <p>
1431                       The default category defines the logging
1432                       options for those categories where no specific
1433                       configuration has been
1434                       defined.
1435                     </p>
1436                   </td>
1437 </tr>
1438 <tr>
1439 <td>
1440                     <p><span><strong class="command">general</strong></span></p>
1441                   </td>
1442 <td>
1443                     <p>
1444                       The catch-all. Many things still aren't
1445                       classified into categories, and they all end up here.
1446                     </p>
1447                   </td>
1448 </tr>
1449 <tr>
1450 <td>
1451                     <p><span><strong class="command">database</strong></span></p>
1452                   </td>
1453 <td>
1454                     <p>
1455                       Messages relating to the databases used
1456                       internally by the name server to store zone and cache
1457                       data.
1458                     </p>
1459                   </td>
1460 </tr>
1461 <tr>
1462 <td>
1463                     <p><span><strong class="command">security</strong></span></p>
1464                   </td>
1465 <td>
1466                     <p>
1467                       Approval and denial of requests.
1468                     </p>
1469                   </td>
1470 </tr>
1471 <tr>
1472 <td>
1473                     <p><span><strong class="command">config</strong></span></p>
1474                   </td>
1475 <td>
1476                     <p>
1477                       Configuration file parsing and processing.
1478                     </p>
1479                   </td>
1480 </tr>
1481 <tr>
1482 <td>
1483                     <p><span><strong class="command">resolver</strong></span></p>
1484                   </td>
1485 <td>
1486                     <p>
1487                       DNS resolution, such as the recursive
1488                       lookups performed on behalf of clients by a caching name
1489                       server.
1490                     </p>
1491                   </td>
1492 </tr>
1493 <tr>
1494 <td>
1495                     <p><span><strong class="command">xfer-in</strong></span></p>
1496                   </td>
1497 <td>
1498                     <p>
1499                       Zone transfers the server is receiving.
1500                     </p>
1501                   </td>
1502 </tr>
1503 <tr>
1504 <td>
1505                     <p><span><strong class="command">xfer-out</strong></span></p>
1506                   </td>
1507 <td>
1508                     <p>
1509                       Zone transfers the server is sending.
1510                     </p>
1511                   </td>
1512 </tr>
1513 <tr>
1514 <td>
1515                     <p><span><strong class="command">notify</strong></span></p>
1516                   </td>
1517 <td>
1518                     <p>
1519                       The NOTIFY protocol.
1520                     </p>
1521                   </td>
1522 </tr>
1523 <tr>
1524 <td>
1525                     <p><span><strong class="command">client</strong></span></p>
1526                   </td>
1527 <td>
1528                     <p>
1529                       Processing of client requests.
1530                     </p>
1531                   </td>
1532 </tr>
1533 <tr>
1534 <td>
1535                     <p><span><strong class="command">unmatched</strong></span></p>
1536                   </td>
1537 <td>
1538                     <p>
1539                       Messages that named was unable to determine the
1540                       class of or for which there was no matching <span><strong class="command">view</strong></span>.
1541                       A one line summary is also logged to the <span><strong class="command">client</strong></span> category.
1542                       This category is best sent to a file or stderr, by
1543                       default it is sent to
1544                       the <span><strong class="command">null</strong></span> channel.
1545                     </p>
1546                   </td>
1547 </tr>
1548 <tr>
1549 <td>
1550                     <p><span><strong class="command">network</strong></span></p>
1551                   </td>
1552 <td>
1553                     <p>
1554                       Network operations.
1555                     </p>
1556                   </td>
1557 </tr>
1558 <tr>
1559 <td>
1560                     <p><span><strong class="command">update</strong></span></p>
1561                   </td>
1562 <td>
1563                     <p>
1564                       Dynamic updates.
1565                     </p>
1566                   </td>
1567 </tr>
1568 <tr>
1569 <td>
1570                     <p><span><strong class="command">update-security</strong></span></p>
1571                   </td>
1572 <td>
1573                     <p>
1574                       Approval and denial of update requests.
1575                     </p>
1576                   </td>
1577 </tr>
1578 <tr>
1579 <td>
1580                     <p><span><strong class="command">queries</strong></span></p>
1581                   </td>
1582 <td>
1583                     <p>
1584                       Specify where queries should be logged to.
1585                     </p>
1586                     <p>
1587                       At startup, specifying the category <span><strong class="command">queries</strong></span> will also
1588                       enable query logging unless <span><strong class="command">querylog</strong></span> option has been
1589                       specified.
1590                     </p>
1591                     <p>
1592                       The query log entry reports the client's IP address and
1593                       port number, and the
1594                       query name, class and type.  It also reports whether the
1595                       Recursion Desired
1596                       flag was set (+ if set, - if not set), EDNS was in use
1597                       (E) or if the
1598                       query was signed (S).
1599                     </p>
1600                     <p>
1601                       <code class="computeroutput">client 127.0.0.1#62536: query: www.example.com IN AAAA +SE</code>
1602                     </p>
1603                     <p>
1604                       <code class="computeroutput">client ::1#62537: query: www.example.net IN AAAA -SE</code>
1605                     </p>
1606                   </td>
1607 </tr>
1608 <tr>
1609 <td>
1610                     <p><span><strong class="command">dispatch</strong></span></p>
1611                   </td>
1612 <td>
1613                     <p>
1614                       Dispatching of incoming packets to the
1615                       server modules where they are to be processed.
1616                     </p>
1617                   </td>
1618 </tr>
1619 <tr>
1620 <td>
1621                     <p><span><strong class="command">dnssec</strong></span></p>
1622                   </td>
1623 <td>
1624                     <p>
1625                       DNSSEC and TSIG protocol processing.
1626                     </p>
1627                   </td>
1628 </tr>
1629 <tr>
1630 <td>
1631                     <p><span><strong class="command">lame-servers</strong></span></p>
1632                   </td>
1633 <td>
1634                     <p>
1635                       Lame servers.  These are misconfigurations
1636                       in remote servers, discovered by BIND 9 when trying to
1637                       query
1638                       those servers during resolution.
1639                     </p>
1640                   </td>
1641 </tr>
1642 <tr>
1643 <td>
1644                     <p><span><strong class="command">delegation-only</strong></span></p>
1645                   </td>
1646 <td>
1647                     <p>
1648                       Delegation only.  Logs queries that have have
1649                       been forced to NXDOMAIN as the result of a
1650                       delegation-only zone or
1651                       a <span><strong class="command">delegation-only</strong></span> in a
1652                       hint or stub zone declaration.
1653                     </p>
1654                   </td>
1655 </tr>
1656 </tbody>
1657 </table></div>
1658 </div>
1659 </div>
1660 <div class="sect2" lang="en">
1661 <div class="titlepage"><div><div><h3 class="title">
1662 <a name="id2576435"></a><span><strong class="command">lwres</strong></span> Statement Grammar</h3></div></div></div>
1663 <p>
1664            This is the grammar of the <span><strong class="command">lwres</strong></span>
1665           statement in the <code class="filename">named.conf</code> file:
1666         </p>
1667 <pre class="programlisting"><span><strong class="command">lwres</strong></span> {
1668     [<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>] ; [<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>]
1669     [<span class="optional"> view <em class="replaceable"><code>view_name</code></em>; </span>]
1670     [<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>]
1671     [<span class="optional"> ndots <em class="replaceable"><code>number</code></em>; </span>]
1672 };
1673 </pre>
1674 </div>
1675 <div class="sect2" lang="en">
1676 <div class="titlepage"><div><div><h3 class="title">
1677 <a name="id2576508"></a><span><strong class="command">lwres</strong></span> Statement Definition and Usage</h3></div></div></div>
1678 <p>
1679           The <span><strong class="command">lwres</strong></span> statement configures the
1680           name
1681           server to also act as a lightweight resolver server. (See
1682           <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
1683           <span><strong class="command">lwres</strong></span> statements configuring
1684           lightweight resolver servers with different properties.
1685         </p>
1686 <p>
1687           The <span><strong class="command">listen-on</strong></span> statement specifies a
1688           list of
1689           addresses (and ports) that this instance of a lightweight resolver
1690           daemon
1691           should accept requests on.  If no port is specified, port 921 is
1692           used.
1693           If this statement is omitted, requests will be accepted on
1694           127.0.0.1,
1695           port 921.
1696         </p>
1697 <p>
1698           The <span><strong class="command">view</strong></span> statement binds this
1699           instance of a
1700           lightweight resolver daemon to a view in the DNS namespace, so that
1701           the
1702           response will be constructed in the same manner as a normal DNS
1703           query
1704           matching this view.  If this statement is omitted, the default view
1705           is
1706           used, and if there is no default view, an error is triggered.
1707         </p>
1708 <p>
1709           The <span><strong class="command">search</strong></span> statement is equivalent to
1710           the
1711           <span><strong class="command">search</strong></span> statement in
1712           <code class="filename">/etc/resolv.conf</code>.  It provides a
1713           list of domains
1714           which are appended to relative names in queries.
1715         </p>
1716 <p>
1717           The <span><strong class="command">ndots</strong></span> statement is equivalent to
1718           the
1719           <span><strong class="command">ndots</strong></span> statement in
1720           <code class="filename">/etc/resolv.conf</code>.  It indicates the
1721           minimum
1722           number of dots in a relative domain name that should result in an
1723           exact match lookup before search path elements are appended.
1724         </p>
1725 </div>
1726 <div class="sect2" lang="en">
1727 <div class="titlepage"><div><div><h3 class="title">
1728 <a name="id2576572"></a><span><strong class="command">masters</strong></span> Statement Grammar</h3></div></div></div>
1729 <pre class="programlisting">
1730 <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> | <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>] };
1731 </pre>
1732 </div>
1733 <div class="sect2" lang="en">
1734 <div class="titlepage"><div><div><h3 class="title">
1735 <a name="id2576616"></a><span><strong class="command">masters</strong></span> Statement Definition and
1736           Usage</h3></div></div></div>
1737 <p><span><strong class="command">masters</strong></span>
1738           lists allow for a common set of masters to be easily used by
1739           multiple stub and slave zones.
1740         </p>
1741 </div>
1742 <div class="sect2" lang="en">
1743 <div class="titlepage"><div><div><h3 class="title">
1744 <a name="id2576631"></a><span><strong class="command">options</strong></span> Statement Grammar</h3></div></div></div>
1745 <p>
1746           This is the grammar of the <span><strong class="command">options</strong></span>
1747           statement in the <code class="filename">named.conf</code> file:
1748         </p>
1749 <pre class="programlisting"><span><strong class="command">options</strong></span> {
1750     [<span class="optional"> version <em class="replaceable"><code>version_string</code></em>; </span>]
1751     [<span class="optional"> hostname <em class="replaceable"><code>hostname_string</code></em>; </span>]
1752     [<span class="optional"> server-id <em class="replaceable"><code>server_id_string</code></em>; </span>]
1753     [<span class="optional"> directory <em class="replaceable"><code>path_name</code></em>; </span>]
1754     [<span class="optional"> key-directory <em class="replaceable"><code>path_name</code></em>; </span>]
1755     [<span class="optional"> named-xfer <em class="replaceable"><code>path_name</code></em>; </span>]
1756     [<span class="optional"> tkey-domain <em class="replaceable"><code>domainname</code></em>; </span>]
1757     [<span class="optional"> tkey-dhkey <em class="replaceable"><code>key_name</code></em> <em class="replaceable"><code>key_tag</code></em>; </span>]
1758     [<span class="optional"> cache-file <em class="replaceable"><code>path_name</code></em>; </span>]
1759     [<span class="optional"> dump-file <em class="replaceable"><code>path_name</code></em>; </span>]
1760     [<span class="optional"> memstatistics-file <em class="replaceable"><code>path_name</code></em>; </span>]
1761     [<span class="optional"> pid-file <em class="replaceable"><code>path_name</code></em>; </span>]
1762     [<span class="optional"> recursing-file <em class="replaceable"><code>path_name</code></em>; </span>]
1763     [<span class="optional"> statistics-file <em class="replaceable"><code>path_name</code></em>; </span>]
1764     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1765     [<span class="optional"> auth-nxdomain <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1766     [<span class="optional"> deallocate-on-exit <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1767     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em>; </span>]
1768     [<span class="optional"> fake-iquery <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1769     [<span class="optional"> fetch-glue <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1770     [<span class="optional"> flush-zones-on-shutdown <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1771     [<span class="optional"> has-old-clients <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1772     [<span class="optional"> host-statistics <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1773     [<span class="optional"> host-statistics-max <em class="replaceable"><code>number</code></em>; </span>]
1774     [<span class="optional"> minimal-responses <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1775     [<span class="optional"> multiple-cnames <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1776     [<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>]
1777     [<span class="optional"> recursion <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1778     [<span class="optional"> rfc2308-type1 <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1779     [<span class="optional"> use-id-pool <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1780     [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1781     [<span class="optional"> dnssec-enable <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1782     [<span class="optional"> dnssec-validation <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1783     [<span class="optional"> dnssec-lookaside <em class="replaceable"><code>domain</code></em> trust-anchor <em class="replaceable"><code>domain</code></em>; </span>]
1784     [<span class="optional"> dnssec-must-be-secure <em class="replaceable"><code>domain yes_or_no</code></em>; </span>]
1785     [<span class="optional"> dnssec-accept-expired <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1786     [<span class="optional"> forward ( <em class="replaceable"><code>only</code></em> | <em class="replaceable"><code>first</code></em> ); </span>]
1787     [<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>]
1788     [<span class="optional"> dual-stack-servers [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] {
1789         ( <em class="replaceable"><code>domain_name</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] |
1790           <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ) ; 
1791         ... }; </span>]
1792     [<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> )
1793         ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
1794     [<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>]
1795     [<span class="optional"> check-wildcard <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1796     [<span class="optional"> check-integrity <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1797     [<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>]
1798     [<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>]
1799     [<span class="optional"> check-sibling <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1800     [<span class="optional"> allow-notify { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
1801     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
1802     [<span class="optional"> allow-query-cache { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
1803     [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
1804     [<span class="optional"> allow-recursion { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
1805     [<span class="optional"> allow-update { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
1806     [<span class="optional"> allow-update-forwarding { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
1807     [<span class="optional"> update-check-ksk <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1808     [<span class="optional"> allow-v6-synthesis { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
1809     [<span class="optional"> blackhole { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
1810     [<span class="optional"> use-v4-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
1811     [<span class="optional"> avoid-v4-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
1812     [<span class="optional"> use-v6-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
1813     [<span class="optional"> avoid-v6-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
1814     [<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>]
1815     [<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>]
1816     [<span class="optional"> query-source ( ( <em class="replaceable"><code>ip4_addr</code></em> | <em class="replaceable"><code>*</code></em> )
1817         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] |
1818         [<span class="optional"> address ( <em class="replaceable"><code>ip4_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]
1819         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] ) ; </span>]
1820     [<span class="optional"> query-source-v6 ( ( <em class="replaceable"><code>ip6_addr</code></em> | <em class="replaceable"><code>*</code></em> )
1821         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] | 
1822         [<span class="optional"> address ( <em class="replaceable"><code>ip6_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] 
1823         [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] ) ; </span>]
1824     [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em>; </span>]
1825     [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em>; </span>]
1826     [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em>; </span>]
1827     [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em>; </span>]
1828     [<span class="optional"> tcp-clients <em class="replaceable"><code>number</code></em>; </span>]
1829     [<span class="optional"> reserved-sockets <em class="replaceable"><code>number</code></em>; </span>]
1830     [<span class="optional"> recursive-clients <em class="replaceable"><code>number</code></em>; </span>]
1831     [<span class="optional"> serial-query-rate <em class="replaceable"><code>number</code></em>; </span>]
1832     [<span class="optional"> serial-queries <em class="replaceable"><code>number</code></em>; </span>]
1833     [<span class="optional"> tcp-listen-queue <em class="replaceable"><code>number</code></em>; </span>]
1834     [<span class="optional"> transfer-format <em class="replaceable"><code>( one-answer | many-answers )</code></em>; </span>]
1835     [<span class="optional"> transfers-in  <em class="replaceable"><code>number</code></em>; </span>]
1836     [<span class="optional"> transfers-out <em class="replaceable"><code>number</code></em>; </span>]
1837     [<span class="optional"> transfers-per-ns <em class="replaceable"><code>number</code></em>; </span>]
1838     [<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>]
1839     [<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>]
1840     [<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>]
1841     [<span class="optional"> alt-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>]
1842     [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1843     [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
1844     [<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>]
1845     [<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>]
1846     [<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>] ; [<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>]
1847     [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em>; </span>]
1848     [<span class="optional"> max-journal-size <em class="replaceable"><code>size_spec</code></em>; </span>]
1849     [<span class="optional"> coresize <em class="replaceable"><code>size_spec</code></em> ; </span>]
1850     [<span class="optional"> datasize <em class="replaceable"><code>size_spec</code></em> ; </span>]
1851     [<span class="optional"> files <em class="replaceable"><code>size_spec</code></em> ; </span>]
1852     [<span class="optional"> stacksize <em class="replaceable"><code>size_spec</code></em> ; </span>]
1853     [<span class="optional"> cleaning-interval <em class="replaceable"><code>number</code></em>; </span>]
1854     [<span class="optional"> heartbeat-interval <em class="replaceable"><code>number</code></em>; </span>]
1855     [<span class="optional"> interface-interval <em class="replaceable"><code>number</code></em>; </span>]
1856     [<span class="optional"> statistics-interval <em class="replaceable"><code>number</code></em>; </span>]
1857     [<span class="optional"> topology { <em class="replaceable"><code>address_match_list</code></em> }</span>];
1858     [<span class="optional"> sortlist { <em class="replaceable"><code>address_match_list</code></em> }</span>];
1859     [<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>] };
1860     [<span class="optional"> lame-ttl <em class="replaceable"><code>number</code></em>; </span>]
1861     [<span class="optional"> max-ncache-ttl <em class="replaceable"><code>number</code></em>; </span>]
1862     [<span class="optional"> max-cache-ttl <em class="replaceable"><code>number</code></em>; </span>]
1863     [<span class="optional"> sig-validity-interval <em class="replaceable"><code>number</code></em> ; </span>]
1864     [<span class="optional"> min-roots <em class="replaceable"><code>number</code></em>; </span>]
1865     [<span class="optional"> use-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
1866     [<span class="optional"> provide-ixfr <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1867     [<span class="optional"> request-ixfr <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1868     [<span class="optional"> treat-cr-as-space <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
1869     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
1870     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
1871     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
1872     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
1873     [<span class="optional"> port <em class="replaceable"><code>ip_port</code></em>; </span>]
1874     [<span class="optional"> additional-from-auth <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
1875     [<span class="optional"> additional-from-cache <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
1876     [<span class="optional"> random-device <em class="replaceable"><code>path_name</code></em> ; </span>]
1877     [<span class="optional"> max-cache-size <em class="replaceable"><code>size_spec</code></em> ; </span>]
1878     [<span class="optional"> match-mapped-addresses <em class="replaceable"><code>yes_or_no</code></em>; </span>]
1879     [<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>]
1880     [<span class="optional"> edns-udp-size <em class="replaceable"><code>number</code></em>; </span>]
1881     [<span class="optional"> max-udp-size <em class="replaceable"><code>number</code></em>; </span>]
1882     [<span class="optional"> root-delegation-only [<span class="optional"> exclude { <em class="replaceable"><code>namelist</code></em> } </span>] ; </span>]
1883     [<span class="optional"> querylog <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
1884     [<span class="optional"> disable-algorithms <em class="replaceable"><code>domain</code></em> { <em class="replaceable"><code>algorithm</code></em>; [<span class="optional"> <em class="replaceable"><code>algorithm</code></em>; </span>] }; </span>]
1885     [<span class="optional"> acache-enable <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
1886     [<span class="optional"> acache-cleaning-interval <em class="replaceable"><code>number</code></em>; </span>]
1887     [<span class="optional"> max-acache-size <em class="replaceable"><code>size_spec</code></em> ; </span>]
1888     [<span class="optional"> clients-per-query <em class="replaceable"><code>number</code></em> ; </span>]
1889     [<span class="optional"> max-clients-per-query <em class="replaceable"><code>number</code></em> ; </span>]
1890     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
1891     [<span class="optional"> empty-server <em class="replaceable"><code>name</code></em> ; </span>]
1892     [<span class="optional"> empty-contact <em class="replaceable"><code>name</code></em> ; </span>]
1893     [<span class="optional"> empty-zones-enable <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
1894     [<span class="optional"> disable-empty-zone <em class="replaceable"><code>zone_name</code></em> ; </span>]
1895     [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
1896     [<span class="optional"> zero-no-soa-ttl-cache <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
1897 };
1898 </pre>
1899 </div>
1900 <div class="sect2" lang="en">
1901 <div class="titlepage"><div><div><h3 class="title">
1902 <a name="options"></a><span><strong class="command">options</strong></span> Statement Definition and
1903           Usage</h3></div></div></div>
1904 <p>
1905           The <span><strong class="command">options</strong></span> statement sets up global
1906           options
1907           to be used by <acronym class="acronym">BIND</acronym>. This statement
1908           may appear only
1909           once in a configuration file. If there is no <span><strong class="command">options</strong></span>
1910           statement, an options block with each option set to its default will
1911           be used.
1912         </p>
1913 <div class="variablelist"><dl>
1914 <dt><span class="term"><span><strong class="command">directory</strong></span></span></dt>
1915 <dd><p>
1916                 The working directory of the server.
1917                 Any non-absolute pathnames in the configuration file will be
1918                 taken
1919                 as relative to this directory. The default location for most
1920                 server
1921                 output files (e.g. <code class="filename">named.run</code>)
1922                 is this directory.
1923                 If a directory is not specified, the working directory
1924                 defaults to `<code class="filename">.</code>', the directory from
1925                 which the server
1926                 was started. The directory specified should be an absolute
1927                 path.
1928               </p></dd>
1929 <dt><span class="term"><span><strong class="command">key-directory</strong></span></span></dt>
1930 <dd><p>
1931                 When performing dynamic update of secure zones, the
1932                 directory where the public and private key files should be
1933                 found,
1934                 if different than the current working directory.  The
1935                 directory specified
1936                 must be an absolute path.
1937               </p></dd>
1938 <dt><span class="term"><span><strong class="command">named-xfer</strong></span></span></dt>
1939 <dd><p>
1940                 <span class="emphasis"><em>This option is obsolete.</em></span>
1941                 It was used in <acronym class="acronym">BIND</acronym> 8 to
1942                 specify the pathname to the <span><strong class="command">named-xfer</strong></span> program.
1943                 In <acronym class="acronym">BIND</acronym> 9, no separate <span><strong class="command">named-xfer</strong></span> program is
1944                 needed; its functionality is built into the name server.
1945               </p></dd>
1946 <dt><span class="term"><span><strong class="command">tkey-domain</strong></span></span></dt>
1947 <dd><p>
1948                 The domain appended to the names of all
1949                 shared keys generated with
1950                 <span><strong class="command">TKEY</strong></span>. When a client
1951                 requests a <span><strong class="command">TKEY</strong></span> exchange, it
1952                 may or may not specify
1953                 the desired name for the key. If present, the name of the
1954                 shared
1955                 key will be "<code class="varname">client specified part</code>" +
1956                 "<code class="varname">tkey-domain</code>".
1957                 Otherwise, the name of the shared key will be "<code class="varname">random hex
1958 digits</code>" + "<code class="varname">tkey-domain</code>". In most cases,
1959                 the <span><strong class="command">domainname</strong></span> should be the
1960                 server's domain
1961                 name.
1962               </p></dd>
1963 <dt><span class="term"><span><strong class="command">tkey-dhkey</strong></span></span></dt>
1964 <dd><p>
1965                 The Diffie-Hellman key used by the server
1966                 to generate shared keys with clients using the Diffie-Hellman
1967                 mode
1968                 of <span><strong class="command">TKEY</strong></span>. The server must be
1969                 able to load the
1970                 public and private keys from files in the working directory.
1971                 In
1972                 most cases, the keyname should be the server's host name.
1973               </p></dd>
1974 <dt><span class="term"><span><strong class="command">cache-file</strong></span></span></dt>
1975 <dd><p>
1976                 This is for testing only.  Do not use.
1977               </p></dd>
1978 <dt><span class="term"><span><strong class="command">dump-file</strong></span></span></dt>
1979 <dd><p>
1980                 The pathname of the file the server dumps
1981                 the database to when instructed to do so with
1982                 <span><strong class="command">rndc dumpdb</strong></span>.
1983                 If not specified, the default is <code class="filename">named_dump.db</code>.
1984               </p></dd>
1985 <dt><span class="term"><span><strong class="command">memstatistics-file</strong></span></span></dt>
1986 <dd>
1987 <p>
1988                 The pathname of the file the server writes memory
1989                 usage statistics to on exit.  If specified the
1990                 statistics will be written to the file on exit.
1991               </p>
1992 <p>
1993                 In <acronym class="acronym">BIND</acronym> 9.5 and later this will
1994                 default to <code class="filename">named.memstats</code>.
1995                 <acronym class="acronym">BIND</acronym> 9.5 will also introduce
1996                 <span><strong class="command">memstatistics</strong></span> to control the
1997                 writing.
1998               </p>
1999 </dd>
2000 <dt><span class="term"><span><strong class="command">pid-file</strong></span></span></dt>
2001 <dd><p>
2002                 The pathname of the file the server writes its process ID
2003                 in. If not specified, the default is <code class="filename">/var/run/named.pid</code>.
2004                 The pid-file is used by programs that want to send signals to
2005                 the running
2006                 name server. Specifying <span><strong class="command">pid-file none</strong></span> disables the
2007                 use of a PID file &#8212; no file will be written and any
2008                 existing one will be removed.  Note that <span><strong class="command">none</strong></span>
2009                 is a keyword, not a filename, and therefore is not enclosed
2010                 in
2011                 double quotes.
2012               </p></dd>
2013 <dt><span class="term"><span><strong class="command">recursing-file</strong></span></span></dt>
2014 <dd><p>
2015                 The pathname of the file the server dumps
2016                 the queries that are currently recursing when instructed
2017                 to do so with <span><strong class="command">rndc recursing</strong></span>.
2018                 If not specified, the default is <code class="filename">named.recursing</code>.
2019               </p></dd>
2020 <dt><span class="term"><span><strong class="command">statistics-file</strong></span></span></dt>
2021 <dd><p>
2022                 The pathname of the file the server appends statistics
2023                 to when instructed to do so using <span><strong class="command">rndc stats</strong></span>.
2024                 If not specified, the default is <code class="filename">named.stats</code> in the
2025                 server's current directory.  The format of the file is
2026                 described
2027                 in <a href="Bv9ARM.ch06.html#statsfile" title="The Statistics File">the section called &#8220;The Statistics File&#8221;</a>.
2028               </p></dd>
2029 <dt><span class="term"><span><strong class="command">port</strong></span></span></dt>
2030 <dd><p>
2031                 The UDP/TCP port number the server uses for
2032                 receiving and sending DNS protocol traffic.
2033                 The default is 53.  This option is mainly intended for server
2034                 testing;
2035                 a server using a port other than 53 will not be able to
2036                 communicate with
2037                 the global DNS.
2038               </p></dd>
2039 <dt><span class="term"><span><strong class="command">random-device</strong></span></span></dt>
2040 <dd><p>
2041                 The source of entropy to be used by the server.  Entropy is
2042                 primarily needed
2043                 for DNSSEC operations, such as TKEY transactions and dynamic
2044                 update of signed
2045                 zones.  This options specifies the device (or file) from which
2046                 to read
2047                 entropy.  If this is a file, operations requiring entropy will
2048                 fail when the
2049                 file has been exhausted.  If not specified, the default value
2050                 is
2051                 <code class="filename">/dev/random</code>
2052                 (or equivalent) when present, and none otherwise.  The
2053                 <span><strong class="command">random-device</strong></span> option takes
2054                 effect during
2055                 the initial configuration load at server startup time and
2056                 is ignored on subsequent reloads.
2057               </p></dd>
2058 <dt><span class="term"><span><strong class="command">preferred-glue</strong></span></span></dt>
2059 <dd><p>
2060                 If specified, the listed type (A or AAAA) will be emitted
2061                 before other glue
2062                 in the additional section of a query response.
2063                 The default is not to prefer any type (NONE).
2064               </p></dd>
2065 <dt><span class="term"><span><strong class="command">root-delegation-only</strong></span></span></dt>
2066 <dd>
2067 <p>
2068                 Turn on enforcement of delegation-only in TLDs (top level domains) and root zones
2069                 with an optional
2070                 exclude list.
2071               </p>
2072 <p>
2073                 Note some TLDs are not delegation only (e.g. "DE", "LV", "US"
2074                 and "MUSEUM").
2075               </p>
2076 <pre class="programlisting">
2077 options {
2078         root-delegation-only exclude { "de"; "lv"; "us"; "museum"; };
2079 };
2080 </pre>
2081 </dd>
2082 <dt><span class="term"><span><strong class="command">disable-algorithms</strong></span></span></dt>
2083 <dd><p>
2084                 Disable the specified DNSSEC algorithms at and below the
2085                 specified name.
2086                 Multiple <span><strong class="command">disable-algorithms</strong></span>
2087                 statements are allowed.
2088                 Only the most specific will be applied.
2089               </p></dd>
2090 <dt><span class="term"><span><strong class="command">dnssec-lookaside</strong></span></span></dt>
2091 <dd><p>
2092                 When set, <span><strong class="command">dnssec-lookaside</strong></span>
2093                 provides the
2094                 validator with an alternate method to validate DNSKEY records
2095                 at the
2096                 top of a zone.  When a DNSKEY is at or below a domain
2097                 specified by the
2098                 deepest <span><strong class="command">dnssec-lookaside</strong></span>, and
2099                 the normal dnssec validation
2100                 has left the key untrusted, the trust-anchor will be append to
2101                 the key
2102                 name and a DLV record will be looked up to see if it can
2103                 validate the
2104                 key.  If the DLV record validates a DNSKEY (similarly to the
2105                 way a DS
2106                 record does) the DNSKEY RRset is deemed to be trusted.
2107               </p></dd>
2108 <dt><span class="term"><span><strong class="command">dnssec-must-be-secure</strong></span></span></dt>
2109 <dd><p>
2110                 Specify hierarchies which must be or may not be secure (signed and
2111                 validated).
2112                 If <strong class="userinput"><code>yes</code></strong>, then named will only accept
2113                 answers if they
2114                 are secure.
2115                 If <strong class="userinput"><code>no</code></strong>, then normal dnssec validation
2116                 applies
2117                 allowing for insecure answers to be accepted.
2118                 The specified domain must be under a <span><strong class="command">trusted-key</strong></span> or
2119                 <span><strong class="command">dnssec-lookaside</strong></span> must be
2120                 active.
2121               </p></dd>
2122 </dl></div>
2123 <div class="sect3" lang="en">
2124 <div class="titlepage"><div><div><h4 class="title">
2125 <a name="boolean_options"></a>Boolean Options</h4></div></div></div>
2126 <div class="variablelist"><dl>
2127 <dt><span class="term"><span><strong class="command">auth-nxdomain</strong></span></span></dt>
2128 <dd><p>
2129                   If <strong class="userinput"><code>yes</code></strong>, then the <span><strong class="command">AA</strong></span> bit
2130                   is always set on NXDOMAIN responses, even if the server is
2131                   not actually
2132                   authoritative. The default is <strong class="userinput"><code>no</code></strong>;
2133                   this is
2134                   a change from <acronym class="acronym">BIND</acronym> 8. If you
2135                   are using very old DNS software, you
2136                   may need to set it to <strong class="userinput"><code>yes</code></strong>.
2137                 </p></dd>
2138 <dt><span class="term"><span><strong class="command">deallocate-on-exit</strong></span></span></dt>
2139 <dd><p>
2140                   This option was used in <acronym class="acronym">BIND</acronym>
2141                   8 to enable checking
2142                   for memory leaks on exit. <acronym class="acronym">BIND</acronym> 9 ignores the option and always performs
2143                   the checks.
2144                 </p></dd>
2145 <dt><span class="term"><span><strong class="command">dialup</strong></span></span></dt>
2146 <dd>
2147 <p>
2148                   If <strong class="userinput"><code>yes</code></strong>, then the
2149                   server treats all zones as if they are doing zone transfers
2150                   across
2151                   a dial-on-demand dialup link, which can be brought up by
2152                   traffic
2153                   originating from this server. This has different effects
2154                   according
2155                   to zone type and concentrates the zone maintenance so that
2156                   it all
2157                   happens in a short interval, once every <span><strong class="command">heartbeat-interval</strong></span> and
2158                   hopefully during the one call. It also suppresses some of
2159                   the normal
2160                   zone maintenance traffic. The default is <strong class="userinput"><code>no</code></strong>.
2161                 </p>
2162 <p>
2163                   The <span><strong class="command">dialup</strong></span> option
2164                   may also be specified in the <span><strong class="command">view</strong></span> and
2165                   <span><strong class="command">zone</strong></span> statements,
2166                   in which case it overrides the global <span><strong class="command">dialup</strong></span>
2167                   option.
2168                 </p>
2169 <p>
2170                   If the zone is a master zone, then the server will send out a
2171                   NOTIFY
2172                   request to all the slaves (default). This should trigger the
2173                   zone serial
2174                   number check in the slave (providing it supports NOTIFY)
2175                   allowing the slave
2176                   to verify the zone while the connection is active.
2177                   The set of servers to which NOTIFY is sent can be controlled
2178                   by
2179                   <span><strong class="command">notify</strong></span> and <span><strong class="command">also-notify</strong></span>.
2180                 </p>
2181 <p>
2182                   If the
2183                   zone is a slave or stub zone, then the server will suppress
2184                   the regular
2185                   "zone up to date" (refresh) queries and only perform them
2186                   when the
2187                   <span><strong class="command">heartbeat-interval</strong></span> expires in
2188                   addition to sending
2189                   NOTIFY requests.
2190                 </p>
2191 <p>
2192                   Finer control can be achieved by using
2193                   <strong class="userinput"><code>notify</code></strong> which only sends NOTIFY
2194                   messages,
2195                   <strong class="userinput"><code>notify-passive</code></strong> which sends NOTIFY
2196                   messages and
2197                   suppresses the normal refresh queries, <strong class="userinput"><code>refresh</code></strong>
2198                   which suppresses normal refresh processing and sends refresh
2199                   queries
2200                   when the <span><strong class="command">heartbeat-interval</strong></span>
2201                   expires, and
2202                   <strong class="userinput"><code>passive</code></strong> which just disables normal
2203                   refresh
2204                   processing.
2205                 </p>
2206 <div class="informaltable"><table border="1">
2207 <colgroup>
2208 <col>
2209 <col>
2210 <col>
2211 <col>
2212 </colgroup>
2213 <tbody>
2214 <tr>
2215 <td>
2216                           <p>
2217                             dialup mode
2218                           </p>
2219                         </td>
2220 <td>
2221                           <p>
2222                             normal refresh
2223                           </p>
2224                         </td>
2225 <td>
2226                           <p>
2227                             heart-beat refresh
2228                           </p>
2229                         </td>
2230 <td>
2231                           <p>
2232                             heart-beat notify
2233                           </p>
2234                         </td>
2235 </tr>
2236 <tr>
2237 <td>
2238                           <p><span><strong class="command">no</strong></span> (default)</p>
2239                         </td>
2240 <td>
2241                           <p>
2242                             yes
2243                           </p>
2244                         </td>
2245 <td>
2246                           <p>
2247                             no
2248                           </p>
2249                         </td>
2250 <td>
2251                           <p>
2252                             no
2253                           </p>
2254                         </td>
2255 </tr>
2256 <tr>
2257 <td>
2258                           <p><span><strong class="command">yes</strong></span></p>
2259                         </td>
2260 <td>
2261                           <p>
2262                             no
2263                           </p>
2264                         </td>
2265 <td>
2266                           <p>
2267                             yes
2268                           </p>
2269                         </td>
2270 <td>
2271                           <p>
2272                             yes
2273                           </p>
2274                         </td>
2275 </tr>
2276 <tr>
2277 <td>
2278                           <p><span><strong class="command">notify</strong></span></p>
2279                         </td>
2280 <td>
2281                           <p>
2282                             yes
2283                           </p>
2284                         </td>
2285 <td>
2286                           <p>
2287                             no
2288                           </p>
2289                         </td>
2290 <td>
2291                           <p>
2292                             yes
2293                           </p>
2294                         </td>
2295 </tr>
2296 <tr>
2297 <td>
2298                           <p><span><strong class="command">refresh</strong></span></p>
2299                         </td>
2300 <td>
2301                           <p>
2302                             no
2303                           </p>
2304                         </td>
2305 <td>
2306                           <p>
2307                             yes
2308                           </p>
2309                         </td>
2310 <td>
2311                           <p>
2312                             no
2313                           </p>
2314                         </td>
2315 </tr>
2316 <tr>
2317 <td>
2318                           <p><span><strong class="command">passive</strong></span></p>
2319                         </td>
2320 <td>
2321                           <p>
2322                             no
2323                           </p>
2324                         </td>
2325 <td>
2326                           <p>
2327                             no
2328                           </p>
2329                         </td>
2330 <td>
2331                           <p>
2332                             no
2333                           </p>
2334                         </td>
2335 </tr>
2336 <tr>
2337 <td>
2338                           <p><span><strong class="command">notify-passive</strong></span></p>
2339                         </td>
2340 <td>
2341                           <p>
2342                             no
2343                           </p>
2344                         </td>
2345 <td>
2346                           <p>
2347                             no
2348                           </p>
2349                         </td>
2350 <td>
2351                           <p>
2352                             yes
2353                           </p>
2354                         </td>
2355 </tr>
2356 </tbody>
2357 </table></div>
2358 <p>
2359                   Note that normal NOTIFY processing is not affected by
2360                   <span><strong class="command">dialup</strong></span>.
2361                 </p>
2362 </dd>
2363 <dt><span class="term"><span><strong class="command">fake-iquery</strong></span></span></dt>
2364 <dd><p>
2365                   In <acronym class="acronym">BIND</acronym> 8, this option
2366                   enabled simulating the obsolete DNS query type
2367                   IQUERY. <acronym class="acronym">BIND</acronym> 9 never does
2368                   IQUERY simulation.
2369                 </p></dd>
2370 <dt><span class="term"><span><strong class="command">fetch-glue</strong></span></span></dt>
2371 <dd><p>
2372                   This option is obsolete.
2373                   In BIND 8, <strong class="userinput"><code>fetch-glue yes</code></strong>
2374                   caused the server to attempt to fetch glue resource records
2375                   it
2376                   didn't have when constructing the additional
2377                   data section of a response.  This is now considered a bad
2378                   idea
2379                   and BIND 9 never does it.
2380                 </p></dd>
2381 <dt><span class="term"><span><strong class="command">flush-zones-on-shutdown</strong></span></span></dt>
2382 <dd><p>
2383                   When the nameserver exits due receiving SIGTERM,
2384                   flush or do not flush any pending zone writes.  The default
2385                   is
2386                   <span><strong class="command">flush-zones-on-shutdown</strong></span> <strong class="userinput"><code>no</code></strong>.
2387                 </p></dd>
2388 <dt><span class="term"><span><strong class="command">has-old-clients</strong></span></span></dt>
2389 <dd><p>
2390                   This option was incorrectly implemented
2391                   in <acronym class="acronym">BIND</acronym> 8, and is ignored by <acronym class="acronym">BIND</acronym> 9.
2392                   To achieve the intended effect
2393                   of
2394                   <span><strong class="command">has-old-clients</strong></span> <strong class="userinput"><code>yes</code></strong>, specify
2395                   the two separate options <span><strong class="command">auth-nxdomain</strong></span> <strong class="userinput"><code>yes</code></strong>
2396                   and <span><strong class="command">rfc2308-type1</strong></span> <strong class="userinput"><code>no</code></strong> instead.
2397                 </p></dd>
2398 <dt><span class="term"><span><strong class="command">host-statistics</strong></span></span></dt>
2399 <dd><p>
2400                   In BIND 8, this enables keeping of
2401                   statistics for every host that the name server interacts
2402                   with.
2403                   Not implemented in BIND 9.
2404                 </p></dd>
2405 <dt><span class="term"><span><strong class="command">maintain-ixfr-base</strong></span></span></dt>
2406 <dd><p>
2407                   <span class="emphasis"><em>This option is obsolete</em></span>.
2408                   It was used in <acronym class="acronym">BIND</acronym> 8 to
2409                   determine whether a transaction log was
2410                   kept for Incremental Zone Transfer. <acronym class="acronym">BIND</acronym> 9 maintains a transaction
2411                   log whenever possible.  If you need to disable outgoing
2412                   incremental zone
2413                   transfers, use <span><strong class="command">provide-ixfr</strong></span> <strong class="userinput"><code>no</code></strong>.
2414                 </p></dd>
2415 <dt><span class="term"><span><strong class="command">minimal-responses</strong></span></span></dt>
2416 <dd><p>
2417                   If <strong class="userinput"><code>yes</code></strong>, then when generating
2418                   responses the server will only add records to the authority
2419                   and additional data sections when they are required (e.g.
2420                   delegations, negative responses).  This may improve the
2421                   performance of the server.
2422                   The default is <strong class="userinput"><code>no</code></strong>.
2423                 </p></dd>
2424 <dt><span class="term"><span><strong class="command">multiple-cnames</strong></span></span></dt>
2425 <dd><p>
2426                   This option was used in <acronym class="acronym">BIND</acronym> 8 to allow
2427                   a domain name to have multiple CNAME records in violation of
2428                   the DNS standards.  <acronym class="acronym">BIND</acronym> 9.2 onwards
2429                   always strictly enforces the CNAME rules both in master
2430                   files and dynamic updates.
2431                 </p></dd>
2432 <dt><span class="term"><span><strong class="command">notify</strong></span></span></dt>
2433 <dd>
2434 <p>
2435                   If <strong class="userinput"><code>yes</code></strong> (the default),
2436                   DNS NOTIFY messages are sent when a zone the server is
2437                   authoritative for
2438                   changes, see <a href="Bv9ARM.ch04.html#notify" title="Notify">the section called &#8220;Notify&#8221;</a>.  The messages are
2439                   sent to the
2440                   servers listed in the zone's NS records (except the master
2441                   server identified
2442                   in the SOA MNAME field), and to any servers listed in the
2443                   <span><strong class="command">also-notify</strong></span> option.
2444                 </p>
2445 <p>
2446                   If <strong class="userinput"><code>master-only</code></strong>, notifies are only
2447                   sent
2448                   for master zones.
2449                   If <strong class="userinput"><code>explicit</code></strong>, notifies are sent only
2450                   to
2451                   servers explicitly listed using <span><strong class="command">also-notify</strong></span>.
2452                   If <strong class="userinput"><code>no</code></strong>, no notifies are sent.
2453                 </p>
2454 <p>
2455                   The <span><strong class="command">notify</strong></span> option may also be
2456                   specified in the <span><strong class="command">zone</strong></span>
2457                   statement,
2458                   in which case it overrides the <span><strong class="command">options notify</strong></span> statement.
2459                   It would only be necessary to turn off this option if it
2460                   caused slaves
2461                   to crash.
2462                 </p>
2463 </dd>
2464 <dt><span class="term"><span><strong class="command">recursion</strong></span></span></dt>
2465 <dd><p>
2466                   If <strong class="userinput"><code>yes</code></strong>, and a
2467                   DNS query requests recursion, then the server will attempt
2468                   to do
2469                   all the work required to answer the query. If recursion is
2470                   off
2471                   and the server does not already know the answer, it will
2472                   return a
2473                   referral response. The default is
2474                   <strong class="userinput"><code>yes</code></strong>.
2475                   Note that setting <span><strong class="command">recursion no</strong></span> does not prevent
2476                   clients from getting data from the server's cache; it only
2477                   prevents new data from being cached as an effect of client
2478                   queries.
2479                   Caching may still occur as an effect the server's internal
2480                   operation, such as NOTIFY address lookups.
2481                   See also <span><strong class="command">fetch-glue</strong></span> above.
2482                 </p></dd>
2483 <dt><span class="term"><span><strong class="command">rfc2308-type1</strong></span></span></dt>
2484 <dd>
2485 <p>
2486                   Setting this to <strong class="userinput"><code>yes</code></strong> will
2487                   cause the server to send NS records along with the SOA
2488                   record for negative
2489                   answers. The default is <strong class="userinput"><code>no</code></strong>.
2490                 </p>
2491 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
2492 <h3 class="title">Note</h3>
2493 <p>
2494                     Not yet implemented in <acronym class="acronym">BIND</acronym>
2495                     9.
2496                   </p>
2497 </div>
2498 </dd>
2499 <dt><span class="term"><span><strong class="command">use-id-pool</strong></span></span></dt>
2500 <dd><p>
2501                   <span class="emphasis"><em>This option is obsolete</em></span>.
2502                   <acronym class="acronym">BIND</acronym> 9 always allocates query
2503                   IDs from a pool.
2504                 </p></dd>
2505 <dt><span class="term"><span><strong class="command">zone-statistics</strong></span></span></dt>
2506 <dd><p>
2507                   If <strong class="userinput"><code>yes</code></strong>, the server will collect
2508                   statistical data on all zones (unless specifically turned
2509                   off
2510                   on a per-zone basis by specifying <span><strong class="command">zone-statistics no</strong></span>
2511                   in the <span><strong class="command">zone</strong></span> statement).
2512                   These statistics may be accessed
2513                   using <span><strong class="command">rndc stats</strong></span>, which will
2514                   dump them to the file listed
2515                   in the <span><strong class="command">statistics-file</strong></span>.  See
2516                   also <a href="Bv9ARM.ch06.html#statsfile" title="The Statistics File">the section called &#8220;The Statistics File&#8221;</a>.
2517                 </p></dd>
2518 <dt><span class="term"><span><strong class="command">use-ixfr</strong></span></span></dt>
2519 <dd><p>
2520                   <span class="emphasis"><em>This option is obsolete</em></span>.
2521                   If you need to disable IXFR to a particular server or
2522                   servers, see
2523                   the information on the <span><strong class="command">provide-ixfr</strong></span> option
2524                   in <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
2525             Usage">the section called &#8220;<span><strong class="command">server</strong></span> Statement Definition and
2526             Usage&#8221;</a>.
2527                   See also
2528                   <a href="Bv9ARM.ch04.html#incremental_zone_transfers" title="Incremental Zone Transfers (IXFR)">the section called &#8220;Incremental Zone Transfers (IXFR)&#8221;</a>.
2529                 </p></dd>
2530 <dt><span class="term"><span><strong class="command">provide-ixfr</strong></span></span></dt>
2531 <dd><p>
2532                   See the description of
2533                   <span><strong class="command">provide-ixfr</strong></span> in
2534                   <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
2535             Usage">the section called &#8220;<span><strong class="command">server</strong></span> Statement Definition and
2536             Usage&#8221;</a>.
2537                 </p></dd>
2538 <dt><span class="term"><span><strong class="command">request-ixfr</strong></span></span></dt>
2539 <dd><p>
2540                   See the description of
2541                   <span><strong class="command">request-ixfr</strong></span> in
2542                   <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
2543             Usage">the section called &#8220;<span><strong class="command">server</strong></span> Statement Definition and
2544             Usage&#8221;</a>.
2545                 </p></dd>
2546 <dt><span class="term"><span><strong class="command">treat-cr-as-space</strong></span></span></dt>
2547 <dd><p>
2548                   This option was used in <acronym class="acronym">BIND</acronym>
2549                   8 to make
2550                   the server treat carriage return ("<span><strong class="command">\r</strong></span>") characters the same way
2551                   as a space or tab character,
2552                   to facilitate loading of zone files on a UNIX system that
2553                   were generated
2554                   on an NT or DOS machine. In <acronym class="acronym">BIND</acronym> 9, both UNIX "<span><strong class="command">\n</strong></span>"
2555                   and NT/DOS "<span><strong class="command">\r\n</strong></span>" newlines
2556                   are always accepted,
2557                   and the option is ignored.
2558                 </p></dd>
2559 <dt>
2560 <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>
2561 </dt>
2562 <dd>
2563 <p>
2564                   These options control the behavior of an authoritative
2565                   server when
2566                   answering queries which have additional data, or when
2567                   following CNAME
2568                   and DNAME chains.
2569                 </p>
2570 <p>
2571                   When both of these options are set to <strong class="userinput"><code>yes</code></strong>
2572                   (the default) and a
2573                   query is being answered from authoritative data (a zone
2574                   configured into the server), the additional data section of
2575                   the
2576                   reply will be filled in using data from other authoritative
2577                   zones
2578                   and from the cache.  In some situations this is undesirable,
2579                   such
2580                   as when there is concern over the correctness of the cache,
2581                   or
2582                   in servers where slave zones may be added and modified by
2583                   untrusted third parties.  Also, avoiding
2584                   the search for this additional data will speed up server
2585                   operations
2586                   at the possible expense of additional queries to resolve
2587                   what would
2588                   otherwise be provided in the additional section.
2589                 </p>
2590 <p>
2591                   For example, if a query asks for an MX record for host <code class="literal">foo.example.com</code>,
2592                   and the record found is "<code class="literal">MX 10 mail.example.net</code>", normally the address
2593                   records (A and AAAA) for <code class="literal">mail.example.net</code> will be provided as well,
2594                   if known, even though they are not in the example.com zone.
2595                   Setting these options to <span><strong class="command">no</strong></span>
2596                   disables this behavior and makes
2597                   the server only search for additional data in the zone it
2598                   answers from.
2599                 </p>
2600 <p>
2601                   These options are intended for use in authoritative-only
2602                   servers, or in authoritative-only views.  Attempts to set
2603                   them to <span><strong class="command">no</strong></span> without also
2604                   specifying
2605                   <span><strong class="command">recursion no</strong></span> will cause the
2606                   server to
2607                   ignore the options and log a warning message.
2608                 </p>
2609 <p>
2610                   Specifying <span><strong class="command">additional-from-cache no</strong></span> actually
2611                   disables the use of the cache not only for additional data
2612                   lookups
2613                   but also when looking up the answer.  This is usually the
2614                   desired
2615                   behavior in an authoritative-only server where the
2616                   correctness of
2617                   the cached data is an issue.
2618                 </p>
2619 <p>
2620                   When a name server is non-recursively queried for a name
2621                   that is not
2622                   below the apex of any served zone, it normally answers with
2623                   an
2624                   "upwards referral" to the root servers or the servers of
2625                   some other
2626                   known parent of the query name.  Since the data in an
2627                   upwards referral
2628                   comes from the cache, the server will not be able to provide
2629                   upwards
2630                   referrals when <span><strong class="command">additional-from-cache no</strong></span>
2631                   has been specified.  Instead, it will respond to such
2632                   queries
2633                   with REFUSED.  This should not cause any problems since
2634                   upwards referrals are not required for the resolution
2635                   process.
2636                 </p>
2637 </dd>
2638 <dt><span class="term"><span><strong class="command">match-mapped-addresses</strong></span></span></dt>
2639 <dd><p>
2640                   If <strong class="userinput"><code>yes</code></strong>, then an
2641                   IPv4-mapped IPv6 address will match any address match
2642                   list entries that match the corresponding IPv4 address.
2643                   Enabling this option is sometimes useful on IPv6-enabled
2644                   Linux
2645                   systems, to work around a kernel quirk that causes IPv4
2646                   TCP connections such as zone transfers to be accepted
2647                   on an IPv6 socket using mapped addresses, causing
2648                   address match lists designed for IPv4 to fail to match.
2649                   The use of this option for any other purpose is discouraged.
2650                 </p></dd>
2651 <dt><span class="term"><span><strong class="command">ixfr-from-differences</strong></span></span></dt>
2652 <dd>
2653 <p>
2654                   When <strong class="userinput"><code>yes</code></strong> and the server loads a new version of a master
2655                   zone from its zone file or receives a new version of a slave
2656                   file by a non-incremental zone transfer, it will compare
2657                   the new version to the previous one and calculate a set
2658                   of differences.  The differences are then logged in the
2659                   zone's journal file such that the changes can be transmitted
2660                   to downstream slaves as an incremental zone transfer.
2661                 </p>
2662 <p>
2663                   By allowing incremental zone transfers to be used for
2664                   non-dynamic zones, this option saves bandwidth at the
2665                   expense of increased CPU and memory consumption at the
2666                   master.
2667                   In particular, if the new version of a zone is completely
2668                   different from the previous one, the set of differences
2669                   will be of a size comparable to the combined size of the
2670                   old and new zone version, and the server will need to
2671                   temporarily allocate memory to hold this complete
2672                   difference set.
2673                 </p>
2674 <p><span><strong class="command">ixfr-from-differences</strong></span>
2675                   also accepts <span><strong class="command">master</strong></span> and
2676                   <span><strong class="command">slave</strong></span> at the view and options
2677                   levels which causes
2678                   <span><strong class="command">ixfr-from-differences</strong></span> to apply to
2679                   all <span><strong class="command">master</strong></span> or
2680                   <span><strong class="command">slave</strong></span> zones respectively.
2681                 </p>
2682 </dd>
2683 <dt><span class="term"><span><strong class="command">multi-master</strong></span></span></dt>
2684 <dd><p>
2685                   This should be set when you have multiple masters for a zone
2686                   and the
2687                   addresses refer to different machines.  If <strong class="userinput"><code>yes</code></strong>, named will
2688                   not log
2689                   when the serial number on the master is less than what named
2690                   currently
2691                   has.  The default is <strong class="userinput"><code>no</code></strong>.
2692                 </p></dd>
2693 <dt><span class="term"><span><strong class="command">dnssec-enable</strong></span></span></dt>
2694 <dd><p>
2695                   Enable DNSSEC support in named.  Unless set to <strong class="userinput"><code>yes</code></strong>,
2696                   named behaves as if it does not support DNSSEC.
2697                   The default is <strong class="userinput"><code>yes</code></strong>.
2698                 </p></dd>
2699 <dt><span class="term"><span><strong class="command">dnssec-validation</strong></span></span></dt>
2700 <dd><p>
2701                   Enable DNSSEC validation in named.
2702                   Note <span><strong class="command">dnssec-enable</strong></span> also needs to be
2703                   set to <strong class="userinput"><code>yes</code></strong> to be effective.
2704                   The default is <strong class="userinput"><code>no</code></strong>.
2705                 </p></dd>
2706 <dt><span class="term"><span><strong class="command">dnssec-accept-expired</strong></span></span></dt>
2707 <dd><p>
2708                   Accept expired signatures when verifying DNSSEC signatures.
2709                   The default is <strong class="userinput"><code>no</code></strong>.
2710                   Setting this option to "yes" leaves named vulnerable to replay attacks.
2711                 </p></dd>
2712 <dt><span class="term"><span><strong class="command">querylog</strong></span></span></dt>
2713 <dd><p>
2714                   Specify whether query logging should be started when named
2715                   starts.
2716                   If <span><strong class="command">querylog</strong></span> is not specified,
2717                   then the query logging
2718                   is determined by the presence of the logging category <span><strong class="command">queries</strong></span>.
2719                 </p></dd>
2720 <dt><span class="term"><span><strong class="command">check-names</strong></span></span></dt>
2721 <dd>
2722 <p>
2723                   This option is used to restrict the character set and syntax
2724                   of
2725                   certain domain names in master files and/or DNS responses
2726                   received
2727                   from the network.  The default varies according to usage
2728                   area.  For
2729                   <span><strong class="command">master</strong></span> zones the default is <span><strong class="command">fail</strong></span>.
2730                   For <span><strong class="command">slave</strong></span> zones the default
2731                   is <span><strong class="command">warn</strong></span>.
2732                   For answers received from the network (<span><strong class="command">response</strong></span>)
2733                   the default is <span><strong class="command">ignore</strong></span>.
2734                 </p>
2735 <p>
2736                   The rules for legal hostnames and mail domains are derived
2737                   from RFC 952 and RFC 821 as modified by RFC 1123.
2738                 </p>
2739 <p><span><strong class="command">check-names</strong></span>
2740                   applies to the owner names of A, AAA and MX records.
2741                   It also applies to the domain names in the RDATA of NS, SOA
2742                   and MX records.
2743                   It also applies to the RDATA of PTR records where the owner
2744                   name indicated that it is a reverse lookup of a hostname
2745                   (the owner name ends in IN-ADDR.ARPA, IP6.ARPA, or IP6.INT).
2746                 </p>
2747 </dd>
2748 <dt><span class="term"><span><strong class="command">check-mx</strong></span></span></dt>
2749 <dd><p>
2750                   Check whether the MX record appears to refer to a IP address.
2751                   The default is to <span><strong class="command">warn</strong></span>.  Other possible
2752                   values are <span><strong class="command">fail</strong></span> and
2753                   <span><strong class="command">ignore</strong></span>.
2754                 </p></dd>
2755 <dt><span class="term"><span><strong class="command">check-wildcard</strong></span></span></dt>
2756 <dd><p>
2757                   This option is used to check for non-terminal wildcards.
2758                   The use of non-terminal wildcards is almost always as a
2759                   result of a failure
2760                   to understand the wildcard matching algorithm (RFC 1034).
2761                   This option
2762                   affects master zones.  The default (<span><strong class="command">yes</strong></span>) is to check
2763                   for non-terminal wildcards and issue a warning.
2764                 </p></dd>
2765 <dt><span class="term"><span><strong class="command">check-integrity</strong></span></span></dt>
2766 <dd><p>
2767                   Perform post load zone integrity checks on master
2768                   zones.  This checks that MX and SRV records refer
2769                   to address (A or AAAA) records and that glue
2770                   address records exist for delegated zones.  For
2771                   MX and SRV records only in-zone hostnames are
2772                   checked (for out-of-zone hostnames use
2773                   <span><strong class="command">named-checkzone</strong></span>).
2774                   For NS records only names below top of zone are
2775                   checked (for out-of-zone names and glue consistency
2776                   checks use <span><strong class="command">named-checkzone</strong></span>).
2777                   The default is <span><strong class="command">yes</strong></span>.
2778                 </p></dd>
2779 <dt><span class="term"><span><strong class="command">check-mx-cname</strong></span></span></dt>
2780 <dd><p>
2781                   If <span><strong class="command">check-integrity</strong></span> is set then
2782                   fail, warn or ignore MX records that refer
2783                   to CNAMES.  The default is to <span><strong class="command">warn</strong></span>.
2784                 </p></dd>
2785 <dt><span class="term"><span><strong class="command">check-srv-cname</strong></span></span></dt>
2786 <dd><p>
2787                   If <span><strong class="command">check-integrity</strong></span> is set then
2788                   fail, warn or ignore SRV records that refer
2789                   to CNAMES.  The default is to <span><strong class="command">warn</strong></span>.
2790                 </p></dd>
2791 <dt><span class="term"><span><strong class="command">check-sibling</strong></span></span></dt>
2792 <dd><p>
2793                   When performing integrity checks, also check that
2794                   sibling glue exists.  The default is <span><strong class="command">yes</strong></span>.
2795                 </p></dd>
2796 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl</strong></span></span></dt>
2797 <dd><p>
2798                   When returning authoritative negative responses to
2799                   SOA queries set the TTL of the SOA recored returned in
2800                   the authority section to zero.
2801                   The default is <span><strong class="command">yes</strong></span>.
2802                 </p></dd>
2803 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl-cache</strong></span></span></dt>
2804 <dd><p>
2805                   When caching a negative response to a SOA query
2806                   set the TTL to zero.
2807                   The default is <span><strong class="command">no</strong></span>.
2808                 </p></dd>
2809 <dt><span class="term"><span><strong class="command">update-check-ksk</strong></span></span></dt>
2810 <dd><p>
2811                   When regenerating the RRSIGs following a UPDATE
2812                   request to a secure zone, check the KSK flag on
2813                   the DNSKEY RR to determine if this key should be
2814                   used to generate the RRSIG.  This flag is ignored
2815                   if there are not DNSKEY RRs both with and without
2816                   a KSK.
2817                   The default is <span><strong class="command">yes</strong></span>.
2818                 </p></dd>
2819 </dl></div>
2820 </div>
2821 <div class="sect3" lang="en">
2822 <div class="titlepage"><div><div><h4 class="title">
2823 <a name="id2580525"></a>Forwarding</h4></div></div></div>
2824 <p>
2825             The forwarding facility can be used to create a large site-wide
2826             cache on a few servers, reducing traffic over links to external
2827             name servers. It can also be used to allow queries by servers that
2828             do not have direct access to the Internet, but wish to look up
2829             exterior
2830             names anyway. Forwarding occurs only on those queries for which
2831             the server is not authoritative and does not have the answer in
2832             its cache.
2833           </p>
2834 <div class="variablelist"><dl>
2835 <dt><span class="term"><span><strong class="command">forward</strong></span></span></dt>
2836 <dd><p>
2837                   This option is only meaningful if the
2838                   forwarders list is not empty. A value of <code class="varname">first</code>,
2839                   the default, causes the server to query the forwarders
2840                   first &#8212; and
2841                   if that doesn't answer the question, the server will then
2842                   look for
2843                   the answer itself. If <code class="varname">only</code> is
2844                   specified, the
2845                   server will only query the forwarders.
2846                 </p></dd>
2847 <dt><span class="term"><span><strong class="command">forwarders</strong></span></span></dt>
2848 <dd><p>
2849                   Specifies the IP addresses to be used
2850                   for forwarding. The default is the empty list (no
2851                   forwarding).
2852                 </p></dd>
2853 </dl></div>
2854 <p>
2855             Forwarding can also be configured on a per-domain basis, allowing
2856             for the global forwarding options to be overridden in a variety
2857             of ways. You can set particular domains to use different
2858             forwarders,
2859             or have a different <span><strong class="command">forward only/first</strong></span> behavior,
2860             or not forward at all, see <a href="Bv9ARM.ch06.html#zone_statement_grammar" title="zone
2861             Statement Grammar">the section called &#8220;<span><strong class="command">zone</strong></span>
2862             Statement Grammar&#8221;</a>.
2863           </p>
2864 </div>
2865 <div class="sect3" lang="en">
2866 <div class="titlepage"><div><div><h4 class="title">
2867 <a name="id2580721"></a>Dual-stack Servers</h4></div></div></div>
2868 <p>
2869             Dual-stack servers are used as servers of last resort to work
2870             around
2871             problems in reachability due the lack of support for either IPv4
2872             or IPv6
2873             on the host machine.
2874           </p>
2875 <div class="variablelist"><dl>
2876 <dt><span class="term"><span><strong class="command">dual-stack-servers</strong></span></span></dt>
2877 <dd><p>
2878                   Specifies host names or addresses of machines with access to
2879                   both IPv4 and IPv6 transports. If a hostname is used, the
2880                   server must be able
2881                   to resolve the name using only the transport it has.  If the
2882                   machine is dual
2883                   stacked, then the <span><strong class="command">dual-stack-servers</strong></span> have no effect unless
2884                   access to a transport has been disabled on the command line
2885                   (e.g. <span><strong class="command">named -4</strong></span>).
2886                 </p></dd>
2887 </dl></div>
2888 </div>
2889 <div class="sect3" lang="en">
2890 <div class="titlepage"><div><div><h4 class="title">
2891 <a name="access_control"></a>Access Control</h4></div></div></div>
2892 <p>
2893             Access to the server can be restricted based on the IP address
2894             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
2895             details on how to specify IP address lists.
2896           </p>
2897 <div class="variablelist"><dl>
2898 <dt><span class="term"><span><strong class="command">allow-notify</strong></span></span></dt>
2899 <dd><p>
2900                   Specifies which hosts are allowed to
2901                   notify this server, a slave, of zone changes in addition
2902                   to the zone masters.
2903                   <span><strong class="command">allow-notify</strong></span> may also be
2904                   specified in the
2905                   <span><strong class="command">zone</strong></span> statement, in which case
2906                   it overrides the
2907                   <span><strong class="command">options allow-notify</strong></span>
2908                   statement.  It is only meaningful
2909                   for a slave zone.  If not specified, the default is to
2910                   process notify messages
2911                   only from a zone's master.
2912                 </p></dd>
2913 <dt><span class="term"><span><strong class="command">allow-query</strong></span></span></dt>
2914 <dd>
2915 <p>
2916                   Specifies which hosts are allowed to ask ordinary
2917                   DNS questions. <span><strong class="command">allow-query</strong></span> may
2918                   also be specified in the <span><strong class="command">zone</strong></span>
2919                   statement, in which case it overrides the
2920                   <span><strong class="command">options allow-query</strong></span> statement.
2921                   If not specified, the default is to allow queries
2922                   from all hosts.
2923                 </p>
2924 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
2925 <h3 class="title">Note</h3>
2926 <p>
2927                     <span><strong class="command">allow-query-cache</strong></span> is now
2928                     used to specify access to the cache.
2929                   </p>
2930 </div>
2931 </dd>
2932 <dt><span class="term"><span><strong class="command">allow-query-cache</strong></span></span></dt>
2933 <dd><p>
2934                   Specifies which hosts are allowed to get answers
2935                   from the cache.  If <span><strong class="command">allow-query-cache</strong></span>
2936                   is not set then <span><strong class="command">allow-recursion</strong></span>
2937                   is used if set, otherwise <span><strong class="command">allow-query</strong></span>
2938                   is used if set, otherwise the default
2939                   (<span><strong class="command">localnets;</strong></span>
2940                   <span><strong class="command">localhost;</strong></span>) is used.
2941                 </p></dd>
2942 <dt><span class="term"><span><strong class="command">allow-recursion</strong></span></span></dt>
2943 <dd><p>
2944                   Specifies which hosts are allowed to make recursive
2945                   queries through this server. If
2946                   <span><strong class="command">allow-recursion</strong></span> is not set
2947                   then <span><strong class="command">allow-query-cache</strong></span> is
2948                   used if set, otherwise <span><strong class="command">allow-query</strong></span>
2949                   is used if set, otherwise the default
2950                   (<span><strong class="command">localnets;</strong></span>
2951                   <span><strong class="command">localhost;</strong></span>) is used.
2952                 </p></dd>
2953 <dt><span class="term"><span><strong class="command">allow-update</strong></span></span></dt>
2954 <dd><p>
2955                   Specifies which hosts are allowed to
2956                   submit Dynamic DNS updates for master zones. The default is
2957                   to deny
2958                   updates from all hosts.  Note that allowing updates based
2959                   on the requestor's IP address is insecure; see
2960                   <a href="Bv9ARM.ch07.html#dynamic_update_security" title="Dynamic Update Security">the section called &#8220;Dynamic Update Security&#8221;</a> for details.
2961                 </p></dd>
2962 <dt><span class="term"><span><strong class="command">allow-update-forwarding</strong></span></span></dt>
2963 <dd>
2964 <p>
2965                   Specifies which hosts are allowed to
2966                   submit Dynamic DNS updates to slave zones to be forwarded to
2967                   the
2968                   master.  The default is <strong class="userinput"><code>{ none; }</code></strong>,
2969                   which
2970                   means that no update forwarding will be performed.  To
2971                   enable
2972                   update forwarding, specify
2973                   <strong class="userinput"><code>allow-update-forwarding { any; };</code></strong>.
2974                   Specifying values other than <strong class="userinput"><code>{ none; }</code></strong> or
2975                   <strong class="userinput"><code>{ any; }</code></strong> is usually
2976                   counterproductive, since
2977                   the responsibility for update access control should rest
2978                   with the
2979                   master server, not the slaves.
2980                 </p>
2981 <p>
2982                   Note that enabling the update forwarding feature on a slave
2983                   server
2984                   may expose master servers relying on insecure IP address
2985                   based
2986                   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>
2987                   for more details.
2988                 </p>
2989 </dd>
2990 <dt><span class="term"><span><strong class="command">allow-v6-synthesis</strong></span></span></dt>
2991 <dd><p>
2992                   This option was introduced for the smooth transition from
2993                   AAAA
2994                   to A6 and from "nibble labels" to binary labels.
2995                   However, since both A6 and binary labels were then
2996                   deprecated,
2997                   this option was also deprecated.
2998                   It is now ignored with some warning messages.
2999                 </p></dd>
3000 <dt><span class="term"><span><strong class="command">allow-transfer</strong></span></span></dt>
3001 <dd><p>
3002                   Specifies which hosts are allowed to
3003                   receive zone transfers from the server. <span><strong class="command">allow-transfer</strong></span> may
3004                   also be specified in the <span><strong class="command">zone</strong></span>
3005                   statement, in which
3006                   case it overrides the <span><strong class="command">options allow-transfer</strong></span> statement.
3007                   If not specified, the default is to allow transfers to all
3008                   hosts.
3009                 </p></dd>
3010 <dt><span class="term"><span><strong class="command">blackhole</strong></span></span></dt>
3011 <dd><p>
3012                   Specifies a list of addresses that the
3013                   server will not accept queries from or use to resolve a
3014                   query. Queries
3015                   from these addresses will not be responded to. The default
3016                   is <strong class="userinput"><code>none</code></strong>.
3017                 </p></dd>
3018 </dl></div>
3019 </div>
3020 <div class="sect3" lang="en">
3021 <div class="titlepage"><div><div><h4 class="title">
3022 <a name="id2581142"></a>Interfaces</h4></div></div></div>
3023 <p>
3024             The interfaces and ports that the server will answer queries
3025             from may be specified using the <span><strong class="command">listen-on</strong></span> option. <span><strong class="command">listen-on</strong></span> takes
3026             an optional port, and an <code class="varname">address_match_list</code>.
3027             The server will listen on all interfaces allowed by the address
3028             match list. If a port is not specified, port 53 will be used.
3029           </p>
3030 <p>
3031             Multiple <span><strong class="command">listen-on</strong></span> statements are
3032             allowed.
3033             For example,
3034           </p>
3035 <pre class="programlisting">listen-on { 5.6.7.8; };
3036 listen-on port 1234 { !1.2.3.4; 1.2/16; };
3037 </pre>
3038 <p>
3039             will enable the name server on port 53 for the IP address
3040             5.6.7.8, and on port 1234 of an address on the machine in net
3041             1.2 that is not 1.2.3.4.
3042           </p>
3043 <p>
3044             If no <span><strong class="command">listen-on</strong></span> is specified, the
3045             server will listen on port 53 on all interfaces.
3046           </p>
3047 <p>
3048             The <span><strong class="command">listen-on-v6</strong></span> option is used to
3049             specify the interfaces and the ports on which the server will
3050             listen
3051             for incoming queries sent using IPv6.
3052           </p>
3053 <p>
3054             When </p>
3055 <pre class="programlisting">{ any; }</pre>
3056 <p> is
3057             specified
3058             as the <code class="varname">address_match_list</code> for the
3059             <span><strong class="command">listen-on-v6</strong></span> option,
3060             the server does not bind a separate socket to each IPv6 interface
3061             address as it does for IPv4 if the operating system has enough API
3062             support for IPv6 (specifically if it conforms to RFC 3493 and RFC
3063             3542).
3064             Instead, it listens on the IPv6 wildcard address.
3065             If the system only has incomplete API support for IPv6, however,
3066             the behavior is the same as that for IPv4.
3067           </p>
3068 <p>
3069             A list of particular IPv6 addresses can also be specified, in
3070             which case
3071             the server listens on a separate socket for each specified
3072             address,
3073             regardless of whether the desired API is supported by the system.
3074           </p>
3075 <p>
3076             Multiple <span><strong class="command">listen-on-v6</strong></span> options can
3077             be used.
3078             For example,
3079           </p>
3080 <pre class="programlisting">listen-on-v6 { any; };
3081 listen-on-v6 port 1234 { !2001:db8::/32; any; };
3082 </pre>
3083 <p>
3084             will enable the name server on port 53 for any IPv6 addresses
3085             (with a single wildcard socket),
3086             and on port 1234 of IPv6 addresses that is not in the prefix
3087             2001:db8::/32 (with separate sockets for each matched address.)
3088           </p>
3089 <p>
3090             To make the server not listen on any IPv6 address, use
3091           </p>
3092 <pre class="programlisting">listen-on-v6 { none; };
3093 </pre>
3094 <p>
3095             If no <span><strong class="command">listen-on-v6</strong></span> option is
3096             specified,
3097             the server will not listen on any IPv6 address.
3098           </p>
3099 </div>
3100 <div class="sect3" lang="en">
3101 <div class="titlepage"><div><div><h4 class="title">
3102 <a name="query_address"></a>Query Address</h4></div></div></div>
3103 <p>
3104             If the server doesn't know the answer to a question, it will
3105             query other name servers. <span><strong class="command">query-source</strong></span> specifies
3106             the address and port used for such queries. For queries sent over
3107             IPv6, there is a separate <span><strong class="command">query-source-v6</strong></span> option.
3108             If <span><strong class="command">address</strong></span> is <span><strong class="command">*</strong></span> (asterisk) or is omitted,
3109             a wildcard IP address (<span><strong class="command">INADDR_ANY</strong></span>)
3110             will be used.
3111           </p>
3112 <p>
3113             If <span><strong class="command">port</strong></span> is <span><strong class="command">*</strong></span> or is omitted,
3114             a random port number from a pre-configured
3115             range is picked up and will be used for each query.
3116             The port range(s) is that specified in
3117             the <span><strong class="command">use-v4-udp-ports</strong></span> (for IPv4)
3118             and <span><strong class="command">use-v6-udp-ports</strong></span> (for IPv6)
3119             options, excluding the ranges specified in
3120             the <span><strong class="command">avoid-v4-udp-ports</strong></span>
3121             and <span><strong class="command">avoid-v6-udp-ports</strong></span> options, respectively.
3122           </p>
3123 <p>
3124             The defaults of the <span><strong class="command">query-source</strong></span> and
3125             <span><strong class="command">query-source-v6</strong></span> options
3126             are:
3127           </p>
3128 <pre class="programlisting">query-source address * port *;
3129 query-source-v6 address * port *;
3130 </pre>
3131 <p>
3132             If <span><strong class="command">use-v4-udp-ports</strong></span> or
3133             <span><strong class="command">use-v6-udp-ports</strong></span> is unspecified,
3134             <span><strong class="command">named</strong></span> will check if the operating
3135             system provides a programming interface to retrieve the
3136             system's default range for ephemeral ports.
3137             If such an interface is available,
3138             <span><strong class="command">named</strong></span> will use the corresponding system
3139             default range; otherwise, it will use its own defaults:
3140          </p>
3141 <pre class="programlisting">use-v4-udp-ports { range 1024 65535; };
3142 use-v6-udp-ports { range 1024 65535; };
3143 </pre>
3144 <p>
3145             Note: make sure the ranges be sufficiently large for
3146             security.  A desirable size depends on various parameters,
3147             but we generally recommend it contain at least 16384 ports
3148             (14 bits of entropy).
3149             Note also that the system's default range when used may be
3150             too small for this purpose, and that the range may even be
3151             changed while <span><strong class="command">named</strong></span> is running; the new
3152             range will automatically be applied when <span><strong class="command">named</strong></span>
3153             is reloaded.
3154             It is encouraged to
3155             configure <span><strong class="command">use-v4-udp-ports</strong></span> and
3156             <span><strong class="command">use-v6-udp-ports</strong></span> explicitly so that the
3157             ranges are sufficiently large and are reasonably
3158             independent from the ranges used by other applications.
3159           </p>
3160 <p>
3161             Note: the operational configuration
3162             where <span><strong class="command">named</strong></span> runs may prohibit the use
3163             of some ports.  For example, UNIX systems will not allow
3164             <span><strong class="command">named</strong></span> running without a root privilege
3165             to use ports less than 1024.
3166             If such ports are included in the specified (or detected)
3167             set of query ports, the corresponding query attempts will
3168             fail, resulting in resolution failures or delay.
3169             It is therefore important to configure the set of ports
3170             that can be safely used in the expected operational environment.
3171           </p>
3172 <p>
3173             The defaults of the <span><strong class="command">avoid-v4-udp-ports</strong></span> and
3174             <span><strong class="command">avoid-v6-udp-ports</strong></span> options
3175             are:
3176           </p>
3177 <pre class="programlisting">avoid-v4-udp-ports {};
3178 avoid-v6-udp-ports {};
3179 </pre>
3180 <p>
3181             Note: it is generally strongly discouraged to
3182             specify a particular port for the
3183             <span><strong class="command">query-source</strong></span> or
3184             <span><strong class="command">query-source-v6</strong></span> options;
3185             it implicitly disables the use of randomized port numbers
3186             and can be insecure.
3187           </p>
3188 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3189 <h3 class="title">Note</h3>
3190 <p>
3191               The address specified in the <span><strong class="command">query-source</strong></span> option
3192               is used for both UDP and TCP queries, but the port applies only
3193               to
3194               UDP queries.  TCP queries always use a random
3195               unprivileged port.
3196             </p>
3197 </div>
3198 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3199 <h3 class="title">Note</h3>
3200 <p>
3201               Solaris 2.5.1 and earlier does not support setting the source
3202               address for TCP sockets.
3203             </p>
3204 </div>
3205 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3206 <h3 class="title">Note</h3>
3207 <p>
3208               See also <span><strong class="command">transfer-source</strong></span> and
3209               <span><strong class="command">notify-source</strong></span>.
3210             </p>
3211 </div>
3212 </div>
3213 <div class="sect3" lang="en">
3214 <div class="titlepage"><div><div><h4 class="title">
3215 <a name="zone_transfers"></a>Zone Transfers</h4></div></div></div>
3216 <p>
3217             <acronym class="acronym">BIND</acronym> has mechanisms in place to
3218             facilitate zone transfers
3219             and set limits on the amount of load that transfers place on the
3220             system. The following options apply to zone transfers.
3221           </p>
3222 <div class="variablelist"><dl>
3223 <dt><span class="term"><span><strong class="command">also-notify</strong></span></span></dt>
3224 <dd><p>
3225                   Defines a global list of IP addresses of name servers
3226                   that are also sent NOTIFY messages whenever a fresh copy of
3227                   the
3228                   zone is loaded, in addition to the servers listed in the
3229                   zone's NS records.
3230                   This helps to ensure that copies of the zones will
3231                   quickly converge on stealth servers. If an <span><strong class="command">also-notify</strong></span> list
3232                   is given in a <span><strong class="command">zone</strong></span> statement,
3233                   it will override
3234                   the <span><strong class="command">options also-notify</strong></span>
3235                   statement. When a <span><strong class="command">zone notify</strong></span>
3236                   statement
3237                   is set to <span><strong class="command">no</strong></span>, the IP
3238                   addresses in the global <span><strong class="command">also-notify</strong></span> list will
3239                   not be sent NOTIFY messages for that zone. The default is
3240                   the empty
3241                   list (no global notification list).
3242                 </p></dd>
3243 <dt><span class="term"><span><strong class="command">max-transfer-time-in</strong></span></span></dt>
3244 <dd><p>
3245                   Inbound zone transfers running longer than
3246                   this many minutes will be terminated. The default is 120
3247                   minutes
3248                   (2 hours).  The maximum value is 28 days (40320 minutes).
3249                 </p></dd>
3250 <dt><span class="term"><span><strong class="command">max-transfer-idle-in</strong></span></span></dt>
3251 <dd><p>
3252                   Inbound zone transfers making no progress
3253                   in this many minutes will be terminated. The default is 60
3254                   minutes
3255                   (1 hour).  The maximum value is 28 days (40320 minutes).
3256                 </p></dd>
3257 <dt><span class="term"><span><strong class="command">max-transfer-time-out</strong></span></span></dt>
3258 <dd><p>
3259                   Outbound zone transfers running longer than
3260                   this many minutes will be terminated. The default is 120
3261                   minutes
3262                   (2 hours).  The maximum value is 28 days (40320 minutes).
3263                 </p></dd>
3264 <dt><span class="term"><span><strong class="command">max-transfer-idle-out</strong></span></span></dt>
3265 <dd><p>
3266                   Outbound zone transfers making no progress
3267                   in this many minutes will be terminated.  The default is 60
3268                   minutes (1
3269                   hour).  The maximum value is 28 days (40320 minutes).
3270                 </p></dd>
3271 <dt><span class="term"><span><strong class="command">serial-query-rate</strong></span></span></dt>
3272 <dd><p>
3273                   Slave servers will periodically query master servers
3274                   to find out if zone serial numbers have changed. Each such
3275                   query uses
3276                   a minute amount of the slave server's network bandwidth.  To
3277                   limit the
3278                   amount of bandwidth used, BIND 9 limits the rate at which
3279                   queries are
3280                   sent.  The value of the <span><strong class="command">serial-query-rate</strong></span> option,
3281                   an integer, is the maximum number of queries sent per
3282                   second.
3283                   The default is 20.
3284                 </p></dd>
3285 <dt><span class="term"><span><strong class="command">serial-queries</strong></span></span></dt>
3286 <dd><p>
3287                   In BIND 8, the <span><strong class="command">serial-queries</strong></span>
3288                   option
3289                   set the maximum number of concurrent serial number queries
3290                   allowed to be outstanding at any given time.
3291                   BIND 9 does not limit the number of outstanding
3292                   serial queries and ignores the <span><strong class="command">serial-queries</strong></span> option.
3293                   Instead, it limits the rate at which the queries are sent
3294                   as defined using the <span><strong class="command">serial-query-rate</strong></span> option.
3295                 </p></dd>
3296 <dt><span class="term"><span><strong class="command">transfer-format</strong></span></span></dt>
3297 <dd><p>
3298                   Zone transfers can be sent using two different formats,
3299                   <span><strong class="command">one-answer</strong></span> and
3300                   <span><strong class="command">many-answers</strong></span>.
3301                   The <span><strong class="command">transfer-format</strong></span> option is used
3302                   on the master server to determine which format it sends.
3303                   <span><strong class="command">one-answer</strong></span> uses one DNS message per
3304                   resource record transferred.
3305                   <span><strong class="command">many-answers</strong></span> packs as many resource
3306                   records as possible into a message.
3307                   <span><strong class="command">many-answers</strong></span> is more efficient, but is
3308                   only supported by relatively new slave servers,
3309                   such as <acronym class="acronym">BIND</acronym> 9, <acronym class="acronym">BIND</acronym>
3310                   8.x and <acronym class="acronym">BIND</acronym> 4.9.5 onwards.
3311                   The <span><strong class="command">many-answers</strong></span> format is also supported by
3312                   recent Microsoft Windows nameservers.
3313                   The default is <span><strong class="command">many-answers</strong></span>.
3314                   <span><strong class="command">transfer-format</strong></span> may be overridden on a
3315                   per-server basis by using the <span><strong class="command">server</strong></span>
3316                   statement.
3317                 </p></dd>
3318 <dt><span class="term"><span><strong class="command">transfers-in</strong></span></span></dt>
3319 <dd><p>
3320                   The maximum number of inbound zone transfers
3321                   that can be running concurrently. The default value is <code class="literal">10</code>.
3322                   Increasing <span><strong class="command">transfers-in</strong></span> may
3323                   speed up the convergence
3324                   of slave zones, but it also may increase the load on the
3325                   local system.
3326                 </p></dd>
3327 <dt><span class="term"><span><strong class="command">transfers-out</strong></span></span></dt>
3328 <dd><p>
3329                   The maximum number of outbound zone transfers
3330                   that can be running concurrently. Zone transfer requests in
3331                   excess
3332                   of the limit will be refused. The default value is <code class="literal">10</code>.
3333                 </p></dd>
3334 <dt><span class="term"><span><strong class="command">transfers-per-ns</strong></span></span></dt>
3335 <dd><p>
3336                   The maximum number of inbound zone transfers
3337                   that can be concurrently transferring from a given remote
3338                   name server.
3339                   The default value is <code class="literal">2</code>.
3340                   Increasing <span><strong class="command">transfers-per-ns</strong></span>
3341                   may
3342                   speed up the convergence of slave zones, but it also may
3343                   increase
3344                   the load on the remote name server. <span><strong class="command">transfers-per-ns</strong></span> may
3345                   be overridden on a per-server basis by using the <span><strong class="command">transfers</strong></span> phrase
3346                   of the <span><strong class="command">server</strong></span> statement.
3347                 </p></dd>
3348 <dt><span class="term"><span><strong class="command">transfer-source</strong></span></span></dt>
3349 <dd>
3350 <p><span><strong class="command">transfer-source</strong></span>
3351                   determines which local address will be bound to IPv4
3352                   TCP connections used to fetch zones transferred
3353                   inbound by the server.  It also determines the
3354                   source IPv4 address, and optionally the UDP port,
3355                   used for the refresh queries and forwarded dynamic
3356                   updates.  If not set, it defaults to a system
3357                   controlled value which will usually be the address
3358                   of the interface "closest to" the remote end. This
3359                   address must appear in the remote end's
3360                   <span><strong class="command">allow-transfer</strong></span> option for the
3361                   zone being transferred, if one is specified. This
3362                   statement sets the
3363                   <span><strong class="command">transfer-source</strong></span> for all zones,
3364                   but can be overridden on a per-view or per-zone
3365                   basis by including a
3366                   <span><strong class="command">transfer-source</strong></span> statement within
3367                   the <span><strong class="command">view</strong></span> or
3368                   <span><strong class="command">zone</strong></span> block in the configuration
3369                   file.
3370                 </p>
3371 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3372 <h3 class="title">Note</h3>
3373 <p>
3374                     Solaris 2.5.1 and earlier does not support setting the
3375                     source address for TCP sockets.
3376                   </p>
3377 </div>
3378 </dd>
3379 <dt><span class="term"><span><strong class="command">transfer-source-v6</strong></span></span></dt>
3380 <dd><p>
3381                   The same as <span><strong class="command">transfer-source</strong></span>,
3382                   except zone transfers are performed using IPv6.
3383                 </p></dd>
3384 <dt><span class="term"><span><strong class="command">alt-transfer-source</strong></span></span></dt>
3385 <dd>
3386 <p>
3387                   An alternate transfer source if the one listed in
3388                   <span><strong class="command">transfer-source</strong></span> fails and
3389                   <span><strong class="command">use-alt-transfer-source</strong></span> is
3390                   set.
3391                 </p>
3392 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3393 <h3 class="title">Note</h3>
3394                   If you do not wish the alternate transfer source
3395                   to be used, you should set
3396                   <span><strong class="command">use-alt-transfer-source</strong></span>
3397                   appropriately and you should not depend upon
3398                   getting a answer back to the first refresh
3399                   query.
3400                 </div>
3401 </dd>
3402 <dt><span class="term"><span><strong class="command">alt-transfer-source-v6</strong></span></span></dt>
3403 <dd><p>
3404                   An alternate transfer source if the one listed in
3405                   <span><strong class="command">transfer-source-v6</strong></span> fails and
3406                   <span><strong class="command">use-alt-transfer-source</strong></span> is
3407                   set.
3408                 </p></dd>
3409 <dt><span class="term"><span><strong class="command">use-alt-transfer-source</strong></span></span></dt>
3410 <dd><p>
3411                   Use the alternate transfer sources or not.  If views are
3412                   specified this defaults to <span><strong class="command">no</strong></span>
3413                   otherwise it defaults to
3414                   <span><strong class="command">yes</strong></span> (for BIND 8
3415                   compatibility).
3416                 </p></dd>
3417 <dt><span class="term"><span><strong class="command">notify-source</strong></span></span></dt>
3418 <dd>
3419 <p><span><strong class="command">notify-source</strong></span>
3420                   determines which local source address, and
3421                   optionally UDP port, will be used to send NOTIFY
3422                   messages.  This address must appear in the slave
3423                   server's <span><strong class="command">masters</strong></span> zone clause or
3424                   in an <span><strong class="command">allow-notify</strong></span> clause.  This
3425                   statement sets the <span><strong class="command">notify-source</strong></span>
3426                   for all zones, but can be overridden on a per-zone or
3427                   per-view basis by including a
3428                   <span><strong class="command">notify-source</strong></span> statement within
3429                   the <span><strong class="command">zone</strong></span> or
3430                   <span><strong class="command">view</strong></span> block in the configuration
3431                   file.
3432                 </p>
3433 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3434 <h3 class="title">Note</h3>
3435 <p>
3436                     Solaris 2.5.1 and earlier does not support setting the
3437                     source address for TCP sockets.
3438                   </p>
3439 </div>
3440 </dd>
3441 <dt><span class="term"><span><strong class="command">notify-source-v6</strong></span></span></dt>
3442 <dd><p>
3443                   Like <span><strong class="command">notify-source</strong></span>,
3444                   but applies to notify messages sent to IPv6 addresses.
3445                 </p></dd>
3446 </dl></div>
3447 </div>
3448 <div class="sect3" lang="en">
3449 <div class="titlepage"><div><div><h4 class="title">
3450 <a name="id2582140"></a>UDP Port Lists</h4></div></div></div>
3451 <p>
3452             <span><strong class="command">use-v4-udp-ports</strong></span>,
3453             <span><strong class="command">avoid-v4-udp-ports</strong></span>,
3454             <span><strong class="command">use-v6-udp-ports</strong></span>, and
3455             <span><strong class="command">avoid-v6-udp-ports</strong></span>
3456             specify a list of IPv4 and IPv6 UDP ports that will be
3457             used or not used as source ports for UDP messages.
3458             See <a href="Bv9ARM.ch06.html#query_address" title="Query Address">the section called &#8220;Query Address&#8221;</a> about how the
3459             available ports are determined.
3460             For example, with the following configuration
3461           </p>
3462 <pre class="programlisting">
3463 use-v6-udp-ports { range 32768 65535; };
3464 avoid-v6-udp-ports { 40000; range 50000 60000; };
3465 </pre>
3466 <p>
3467              UDP ports of IPv6 messages sent
3468              from <span><strong class="command">named</strong></span> will be in one
3469              of the following ranges: 32768 to 39999, 40001 to 49999,
3470              and 60001 to 65535.
3471            </p>
3472 <p>
3473              <span><strong class="command">avoid-v4-udp-ports</strong></span> and
3474              <span><strong class="command">avoid-v6-udp-ports</strong></span> can be used
3475              to prevent <span><strong class="command">named</strong></span> from choosing as its random source port a
3476              port that is blocked by your firewall or a port that is
3477              used by other applications;
3478              if a query went out with a source port blocked by a
3479              firewall, the
3480              answer would not get by the firewall and the name server would
3481              have to query again.
3482              Note: the desired range can also be represented only with
3483              <span><strong class="command">use-v4-udp-ports</strong></span> and
3484              <span><strong class="command">use-v6-udp-ports</strong></span>, and the
3485              <span><strong class="command">avoid-</strong></span> options are redundant in that
3486              sense; they are provided for backward compatibility and
3487              to possibly simplify the port specification.
3488            </p>
3489 </div>
3490 <div class="sect3" lang="en">
3491 <div class="titlepage"><div><div><h4 class="title">
3492 <a name="id2582200"></a>Operating System Resource Limits</h4></div></div></div>
3493 <p>
3494             The server's usage of many system resources can be limited.
3495             Scaled values are allowed when specifying resource limits.  For
3496             example, <span><strong class="command">1G</strong></span> can be used instead of
3497             <span><strong class="command">1073741824</strong></span> to specify a limit of
3498             one
3499             gigabyte. <span><strong class="command">unlimited</strong></span> requests
3500             unlimited use, or the
3501             maximum available amount. <span><strong class="command">default</strong></span>
3502             uses the limit
3503             that was in force when the server was started. See the description
3504             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>.
3505           </p>
3506 <p>
3507             The following options set operating system resource limits for
3508             the name server process.  Some operating systems don't support
3509             some or
3510             any of the limits. On such systems, a warning will be issued if
3511             the
3512             unsupported limit is used.
3513           </p>
3514 <div class="variablelist"><dl>
3515 <dt><span class="term"><span><strong class="command">coresize</strong></span></span></dt>
3516 <dd><p>
3517                   The maximum size of a core dump. The default
3518                   is <code class="literal">default</code>.
3519                 </p></dd>
3520 <dt><span class="term"><span><strong class="command">datasize</strong></span></span></dt>
3521 <dd><p>
3522                   The maximum amount of data memory the server
3523                   may use. The default is <code class="literal">default</code>.
3524                   This is a hard limit on server memory usage.
3525                   If the server attempts to allocate memory in excess of this
3526                   limit, the allocation will fail, which may in turn leave
3527                   the server unable to perform DNS service.  Therefore,
3528                   this option is rarely useful as a way of limiting the
3529                   amount of memory used by the server, but it can be used
3530                   to raise an operating system data size limit that is
3531                   too small by default.  If you wish to limit the amount
3532                   of memory used by the server, use the
3533                   <span><strong class="command">max-cache-size</strong></span> and
3534                   <span><strong class="command">recursive-clients</strong></span>
3535                   options instead.
3536                 </p></dd>
3537 <dt><span class="term"><span><strong class="command">files</strong></span></span></dt>
3538 <dd><p>
3539                   The maximum number of files the server
3540                   may have open concurrently. The default is <code class="literal">unlimited</code>.
3541                 </p></dd>
3542 <dt><span class="term"><span><strong class="command">stacksize</strong></span></span></dt>
3543 <dd><p>
3544                   The maximum amount of stack memory the server
3545                   may use. The default is <code class="literal">default</code>.
3546                 </p></dd>
3547 </dl></div>
3548 </div>
3549 <div class="sect3" lang="en">
3550 <div class="titlepage"><div><div><h4 class="title">
3551 <a name="id2582452"></a>Server  Resource Limits</h4></div></div></div>
3552 <p>
3553             The following options set limits on the server's
3554             resource consumption that are enforced internally by the
3555             server rather than the operating system.
3556           </p>
3557 <div class="variablelist"><dl>
3558 <dt><span class="term"><span><strong class="command">max-ixfr-log-size</strong></span></span></dt>
3559 <dd><p>
3560                   This option is obsolete; it is accepted
3561                   and ignored for BIND 8 compatibility.  The option
3562                   <span><strong class="command">max-journal-size</strong></span> performs a
3563                   similar function in BIND 9.
3564                 </p></dd>
3565 <dt><span class="term"><span><strong class="command">max-journal-size</strong></span></span></dt>
3566 <dd><p>
3567                   Sets a maximum size for each journal file
3568                   (see <a href="Bv9ARM.ch04.html#journal" title="The journal file">the section called &#8220;The journal file&#8221;</a>).  When the journal file
3569                   approaches
3570                   the specified size, some of the oldest transactions in the
3571                   journal
3572                   will be automatically removed.  The default is
3573                   <code class="literal">unlimited</code>.
3574                 </p></dd>
3575 <dt><span class="term"><span><strong class="command">host-statistics-max</strong></span></span></dt>
3576 <dd><p>
3577                   In BIND 8, specifies the maximum number of host statistics
3578                   entries to be kept.
3579                   Not implemented in BIND 9.
3580                 </p></dd>
3581 <dt><span class="term"><span><strong class="command">recursive-clients</strong></span></span></dt>
3582 <dd><p>
3583                   The maximum number of simultaneous recursive lookups
3584                   the server will perform on behalf of clients.  The default
3585                   is
3586                   <code class="literal">1000</code>.  Because each recursing
3587                   client uses a fair
3588                   bit of memory, on the order of 20 kilobytes, the value of
3589                   the
3590                   <span><strong class="command">recursive-clients</strong></span> option may
3591                   have to be decreased
3592                   on hosts with limited memory.
3593                 </p></dd>
3594 <dt><span class="term"><span><strong class="command">tcp-clients</strong></span></span></dt>
3595 <dd><p>
3596                   The maximum number of simultaneous client TCP
3597                   connections that the server will accept.
3598                   The default is <code class="literal">100</code>.
3599                 </p></dd>
3600 <dt><span class="term"><span><strong class="command">reserved-sockets</strong></span></span></dt>
3601 <dd>
3602 <p>
3603                   The number of file descriptors reserved for TCP, stdio,
3604                   etc.  This needs to be big enough to cover the number of
3605                   interfaces named listens on, tcp-clients as well as
3606                   to provide room for outgoing TCP queries and incoming zone
3607                   transfers.  The default is <code class="literal">512</code>.
3608                   The minimum value is <code class="literal">128</code> and the
3609                   maximum value is <code class="literal">128</code> less than
3610                   maxsockets (-S).  This option may be removed in the future.
3611                 </p>
3612 <p>
3613                   This option has little effect on Windows.
3614                 </p>
3615 </dd>
3616 <dt><span class="term"><span><strong class="command">max-cache-size</strong></span></span></dt>
3617 <dd><p>
3618                   The maximum amount of memory to use for the
3619                   server's cache, in bytes.
3620                   When the amount of data in the cache
3621                   reaches this limit, the server will cause records to expire
3622                   prematurely so that the limit is not exceeded.
3623                   A value of 0 is special, meaning that
3624                   records are purged from the cache only when their
3625                   TTLs expire.
3626                   Another special keyword <strong class="userinput"><code>unlimited</code></strong>
3627                   means the maximum value of 32-bit unsigned integers
3628                   (0xffffffff), which may not have the same effect as
3629                   0 on machines that support more than 32 bits of
3630                   memory space.
3631                   Any positive values less than 2MB will be ignored reset
3632                   to 2MB.
3633                   In a server with multiple views, the limit applies
3634                   separately to the cache of each view.
3635                   The default is 0.
3636                 </p></dd>
3637 <dt><span class="term"><span><strong class="command">tcp-listen-queue</strong></span></span></dt>
3638 <dd><p>
3639                   The listen queue depth.  The default and minimum is 3.
3640                   If the kernel supports the accept filter "dataready" this
3641                   also controls how
3642                   many TCP connections that will be queued in kernel space
3643                   waiting for
3644                   some data before being passed to accept.  Values less than 3
3645                   will be
3646                   silently raised.
3647                 </p></dd>
3648 </dl></div>
3649 </div>
3650 <div class="sect3" lang="en">
3651 <div class="titlepage"><div><div><h4 class="title">
3652 <a name="id2582682"></a>Periodic Task Intervals</h4></div></div></div>
3653 <div class="variablelist"><dl>
3654 <dt><span class="term"><span><strong class="command">cleaning-interval</strong></span></span></dt>
3655 <dd><p>
3656                   The server will remove expired resource records
3657                   from the cache every <span><strong class="command">cleaning-interval</strong></span> minutes.
3658                   The default is 60 minutes.  The maximum value is 28 days
3659                   (40320 minutes).
3660                   If set to 0, no periodic cleaning will occur.
3661                 </p></dd>
3662 <dt><span class="term"><span><strong class="command">heartbeat-interval</strong></span></span></dt>
3663 <dd><p>
3664                   The server will perform zone maintenance tasks
3665                   for all zones marked as <span><strong class="command">dialup</strong></span> whenever this
3666                   interval expires. The default is 60 minutes. Reasonable
3667                   values are up
3668                   to 1 day (1440 minutes).  The maximum value is 28 days
3669                   (40320 minutes).
3670                   If set to 0, no zone maintenance for these zones will occur.
3671                 </p></dd>
3672 <dt><span class="term"><span><strong class="command">interface-interval</strong></span></span></dt>
3673 <dd><p>
3674                   The server will scan the network interface list
3675                   every <span><strong class="command">interface-interval</strong></span>
3676                   minutes. The default
3677                   is 60 minutes. The maximum value is 28 days (40320 minutes).
3678                   If set to 0, interface scanning will only occur when
3679                   the configuration file is  loaded. After the scan, the
3680                   server will
3681                   begin listening for queries on any newly discovered
3682                   interfaces (provided they are allowed by the
3683                   <span><strong class="command">listen-on</strong></span> configuration), and
3684                   will
3685                   stop listening on interfaces that have gone away.
3686                 </p></dd>
3687 <dt><span class="term"><span><strong class="command">statistics-interval</strong></span></span></dt>
3688 <dd>
3689 <p>
3690                   Name server statistics will be logged
3691                   every <span><strong class="command">statistics-interval</strong></span>
3692                   minutes. The default is
3693                   60. The maximum value is 28 days (40320 minutes).
3694                   If set to 0, no statistics will be logged.
3695                   </p>
3696 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3697 <h3 class="title">Note</h3>
3698 <p>
3699                     Not yet implemented in
3700                     <acronym class="acronym">BIND</acronym> 9.
3701                   </p>
3702 </div>
3703 </dd>
3704 </dl></div>
3705 </div>
3706 <div class="sect3" lang="en">
3707 <div class="titlepage"><div><div><h4 class="title">
3708 <a name="topology"></a>Topology</h4></div></div></div>
3709 <p>
3710             All other things being equal, when the server chooses a name
3711             server
3712             to query from a list of name servers, it prefers the one that is
3713             topologically closest to itself. The <span><strong class="command">topology</strong></span> statement
3714             takes an <span><strong class="command">address_match_list</strong></span> and
3715             interprets it
3716             in a special way. Each top-level list element is assigned a
3717             distance.
3718             Non-negated elements get a distance based on their position in the
3719             list, where the closer the match is to the start of the list, the
3720             shorter the distance is between it and the server. A negated match
3721             will be assigned the maximum distance from the server. If there
3722             is no match, the address will get a distance which is further than
3723             any non-negated list element, and closer than any negated element.
3724             For example,
3725           </p>
3726 <pre class="programlisting">topology {
3727     10/8;
3728     !1.2.3/24;
3729     { 1.2/16; 3/8; };
3730 };</pre>
3731 <p>
3732             will prefer servers on network 10 the most, followed by hosts
3733             on network 1.2.0.0 (netmask 255.255.0.0) and network 3, with the
3734             exception of hosts on network 1.2.3 (netmask 255.255.255.0), which
3735             is preferred least of all.
3736           </p>
3737 <p>
3738             The default topology is
3739           </p>
3740 <pre class="programlisting">    topology { localhost; localnets; };
3741 </pre>
3742 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3743 <h3 class="title">Note</h3>
3744 <p>
3745               The <span><strong class="command">topology</strong></span> option
3746               is not implemented in <acronym class="acronym">BIND</acronym> 9.
3747             </p>
3748 </div>
3749 </div>
3750 <div class="sect3" lang="en">
3751 <div class="titlepage"><div><div><h4 class="title">
3752 <a name="the_sortlist_statement"></a>The <span><strong class="command">sortlist</strong></span> Statement</h4></div></div></div>
3753 <p>
3754             The response to a DNS query may consist of multiple resource
3755             records (RRs) forming a resource records set (RRset).
3756             The name server will normally return the
3757             RRs within the RRset in an indeterminate order
3758             (but see the <span><strong class="command">rrset-order</strong></span>
3759             statement in <a href="Bv9ARM.ch06.html#rrset_ordering" title="RRset Ordering">the section called &#8220;RRset Ordering&#8221;</a>).
3760             The client resolver code should rearrange the RRs as appropriate,
3761             that is, using any addresses on the local net in preference to
3762             other addresses.
3763             However, not all resolvers can do this or are correctly
3764             configured.
3765             When a client is using a local server, the sorting can be performed
3766             in the server, based on the client's address. This only requires
3767             configuring the name servers, not all the clients.
3768           </p>
3769 <p>
3770             The <span><strong class="command">sortlist</strong></span> statement (see below)
3771             takes
3772             an <span><strong class="command">address_match_list</strong></span> and
3773             interprets it even
3774             more specifically than the <span><strong class="command">topology</strong></span>
3775             statement
3776             does (<a href="Bv9ARM.ch06.html#topology" title="Topology">the section called &#8220;Topology&#8221;</a>).
3777             Each top level statement in the <span><strong class="command">sortlist</strong></span> must
3778             itself be an explicit <span><strong class="command">address_match_list</strong></span> with
3779             one or two elements. The first element (which may be an IP
3780             address,
3781             an IP prefix, an ACL name or a nested <span><strong class="command">address_match_list</strong></span>)
3782             of each top level list is checked against the source address of
3783             the query until a match is found.
3784           </p>
3785 <p>
3786             Once the source address of the query has been matched, if
3787             the top level statement contains only one element, the actual
3788             primitive
3789             element that matched the source address is used to select the
3790             address
3791             in the response to move to the beginning of the response. If the
3792             statement is a list of two elements, then the second element is
3793             treated the same as the <span><strong class="command">address_match_list</strong></span> in
3794             a <span><strong class="command">topology</strong></span> statement. Each top
3795             level element
3796             is assigned a distance and the address in the response with the
3797             minimum
3798             distance is moved to the beginning of the response.
3799           </p>
3800 <p>
3801             In the following example, any queries received from any of
3802             the addresses of the host itself will get responses preferring
3803             addresses
3804             on any of the locally connected networks. Next most preferred are
3805             addresses
3806             on the 192.168.1/24 network, and after that either the
3807             192.168.2/24
3808             or
3809             192.168.3/24 network with no preference shown between these two
3810             networks. Queries received from a host on the 192.168.1/24 network
3811             will prefer other addresses on that network to the 192.168.2/24
3812             and
3813             192.168.3/24 networks. Queries received from a host on the
3814             192.168.4/24
3815             or the 192.168.5/24 network will only prefer other addresses on
3816             their directly connected networks.
3817           </p>
3818 <pre class="programlisting">sortlist {
3819     { localhost;                                   // IF   the local host
3820         { localnets;                               // THEN first fit on the
3821             192.168.1/24;                          //   following nets
3822             { 192.168.2/24; 192.168.3/24; }; }; };
3823     { 192.168.1/24;                                // IF   on class C 192.168.1
3824         { 192.168.1/24;                            // THEN use .1, or .2 or .3
3825             { 192.168.2/24; 192.168.3/24; }; }; };
3826     { 192.168.2/24;                                // IF   on class C 192.168.2
3827         { 192.168.2/24;                            // THEN use .2, or .1 or .3
3828             { 192.168.1/24; 192.168.3/24; }; }; };
3829     { 192.168.3/24;                                // IF   on class C 192.168.3
3830         { 192.168.3/24;                            // THEN use .3, or .1 or .2
3831             { 192.168.1/24; 192.168.2/24; }; }; };
3832     { { 192.168.4/24; 192.168.5/24; };             // if .4 or .5, prefer that net
3833     };
3834 };</pre>
3835 <p>
3836             The following example will give reasonable behavior for the
3837             local host and hosts on directly connected networks. It is similar
3838             to the behavior of the address sort in <acronym class="acronym">BIND</acronym> 4.9.x. Responses sent
3839             to queries from the local host will favor any of the directly
3840             connected
3841             networks. Responses sent to queries from any other hosts on a
3842             directly
3843             connected network will prefer addresses on that same network.
3844             Responses
3845             to other queries will not be sorted.
3846           </p>
3847 <pre class="programlisting">sortlist {
3848            { localhost; localnets; };
3849            { localnets; };
3850 };
3851 </pre>
3852 </div>
3853 <div class="sect3" lang="en">
3854 <div class="titlepage"><div><div><h4 class="title">
3855 <a name="rrset_ordering"></a>RRset Ordering</h4></div></div></div>
3856 <p>
3857             When multiple records are returned in an answer it may be
3858             useful to configure the order of the records placed into the
3859             response.
3860             The <span><strong class="command">rrset-order</strong></span> statement permits
3861             configuration
3862             of the ordering of the records in a multiple record response.
3863             See also the <span><strong class="command">sortlist</strong></span> statement,
3864             <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>.
3865           </p>
3866 <p>
3867             An <span><strong class="command">order_spec</strong></span> is defined as
3868             follows:
3869           </p>
3870 <p>
3871             [<span class="optional">class <em class="replaceable"><code>class_name</code></em></span>]
3872             [<span class="optional">type <em class="replaceable"><code>type_name</code></em></span>]
3873             [<span class="optional">name <em class="replaceable"><code>"domain_name"</code></em></span>]
3874             order <em class="replaceable"><code>ordering</code></em>
3875           </p>
3876 <p>
3877             If no class is specified, the default is <span><strong class="command">ANY</strong></span>.
3878             If no type is specified, the default is <span><strong class="command">ANY</strong></span>.
3879             If no name is specified, the default is "<span><strong class="command">*</strong></span>" (asterisk).
3880           </p>
3881 <p>
3882             The legal values for <span><strong class="command">ordering</strong></span> are:
3883           </p>
3884 <div class="informaltable"><table border="1">
3885 <colgroup>
3886 <col>
3887 <col>
3888 </colgroup>
3889 <tbody>
3890 <tr>
3891 <td>
3892                     <p><span><strong class="command">fixed</strong></span></p>
3893                   </td>
3894 <td>
3895                     <p>
3896                       Records are returned in the order they
3897                       are defined in the zone file.
3898                     </p>
3899                   </td>
3900 </tr>
3901 <tr>
3902 <td>
3903                     <p><span><strong class="command">random</strong></span></p>
3904                   </td>
3905 <td>
3906                     <p>
3907                       Records are returned in some random order.
3908                     </p>
3909                   </td>
3910 </tr>
3911 <tr>
3912 <td>
3913                     <p><span><strong class="command">cyclic</strong></span></p>
3914                   </td>
3915 <td>
3916                     <p>
3917                       Records are returned in a round-robin
3918                       order.
3919                     </p>
3920                   </td>
3921 </tr>
3922 </tbody>
3923 </table></div>
3924 <p>
3925             For example:
3926           </p>
3927 <pre class="programlisting">rrset-order {
3928    class IN type A name "host.example.com" order random;
3929    order cyclic;
3930 };
3931 </pre>
3932 <p>
3933             will cause any responses for type A records in class IN that
3934             have "<code class="literal">host.example.com</code>" as a
3935             suffix, to always be returned
3936             in random order. All other records are returned in cyclic order.
3937           </p>
3938 <p>
3939             If multiple <span><strong class="command">rrset-order</strong></span> statements
3940             appear,
3941             they are not combined &#8212; the last one applies.
3942           </p>
3943 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3944 <h3 class="title">Note</h3>
3945 <p>
3946               The <span><strong class="command">rrset-order</strong></span> statement
3947               is not yet fully implemented in <acronym class="acronym">BIND</acronym> 9.
3948               BIND 9 currently does not fully support "fixed" ordering.
3949             </p>
3950 </div>
3951 </div>
3952 <div class="sect3" lang="en">
3953 <div class="titlepage"><div><div><h4 class="title">
3954 <a name="tuning"></a>Tuning</h4></div></div></div>
3955 <div class="variablelist"><dl>
3956 <dt><span class="term"><span><strong class="command">lame-ttl</strong></span></span></dt>
3957 <dd><p>
3958                   Sets the number of seconds to cache a
3959                   lame server indication. 0 disables caching. (This is
3960                   <span class="bold"><strong>NOT</strong></span> recommended.)
3961                   The default is <code class="literal">600</code> (10 minutes) and the
3962                   maximum value is
3963                   <code class="literal">1800</code> (30 minutes).
3964                 </p></dd>
3965 <dt><span class="term"><span><strong class="command">max-ncache-ttl</strong></span></span></dt>
3966 <dd><p>
3967                   To reduce network traffic and increase performance,
3968                   the server stores negative answers. <span><strong class="command">max-ncache-ttl</strong></span> is
3969                   used to set a maximum retention time for these answers in
3970                   the server
3971                   in seconds. The default
3972                   <span><strong class="command">max-ncache-ttl</strong></span> is <code class="literal">10800</code> seconds (3 hours).
3973                   <span><strong class="command">max-ncache-ttl</strong></span> cannot exceed
3974                   7 days and will
3975                   be silently truncated to 7 days if set to a greater value.
3976                 </p></dd>
3977 <dt><span class="term"><span><strong class="command">max-cache-ttl</strong></span></span></dt>
3978 <dd><p>
3979                   Sets the maximum time for which the server will
3980                   cache ordinary (positive) answers. The default is
3981                   one week (7 days).
3982                   A value of zero may cause all queries to return
3983                   SERVFAIL, because of lost caches of intermediate
3984                   RRsets (such as NS and glue AAAA/A records) in the
3985                   resolution process.
3986                 </p></dd>
3987 <dt><span class="term"><span><strong class="command">min-roots</strong></span></span></dt>
3988 <dd>
3989 <p>
3990                   The minimum number of root servers that
3991                   is required for a request for the root servers to be
3992                   accepted. The default
3993                   is <strong class="userinput"><code>2</code></strong>.
3994                 </p>
3995 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3996 <h3 class="title">Note</h3>
3997 <p>
3998                     Not implemented in <acronym class="acronym">BIND</acronym> 9.
3999                   </p>
4000 </div>
4001 </dd>
4002 <dt><span class="term"><span><strong class="command">sig-validity-interval</strong></span></span></dt>
4003 <dd><p>
4004                   Specifies the number of days into the
4005                   future when DNSSEC signatures automatically generated as a
4006                   result
4007                   of dynamic updates (<a href="Bv9ARM.ch04.html#dynamic_update" title="Dynamic Update">the section called &#8220;Dynamic Update&#8221;</a>)
4008                   will expire. The default is <code class="literal">30</code> days.
4009                   The maximum value is 10 years (3660 days). The signature
4010                   inception time is unconditionally set to one hour before the
4011                   current time
4012                   to allow for a limited amount of clock skew.
4013                 </p></dd>
4014 <dt>
4015 <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>
4016 </dt>
4017 <dd>
4018 <p>
4019                   These options control the server's behavior on refreshing a
4020                   zone
4021                   (querying for SOA changes) or retrying failed transfers.
4022                   Usually the SOA values for the zone are used, but these
4023                   values
4024                   are set by the master, giving slave server administrators
4025                   little
4026                   control over their contents.
4027                 </p>
4028 <p>
4029                   These options allow the administrator to set a minimum and
4030                   maximum
4031                   refresh and retry time either per-zone, per-view, or
4032                   globally.
4033                   These options are valid for slave and stub zones,
4034                   and clamp the SOA refresh and retry times to the specified
4035                   values.
4036                 </p>
4037 </dd>
4038 <dt><span class="term"><span><strong class="command">edns-udp-size</strong></span></span></dt>
4039 <dd><p>
4040                   Sets the advertised EDNS UDP buffer size in bytes.  Valid
4041                   values are 512 to 4096 (values outside this range
4042                   will be silently adjusted).  The default value is
4043                   4096.  The usual reason for setting edns-udp-size to
4044                   a non-default value is to get UDP answers to pass
4045                   through broken firewalls that block fragmented
4046                   packets and/or block UDP packets that are greater
4047                   than 512 bytes.
4048                 </p></dd>
4049 <dt><span class="term"><span><strong class="command">max-udp-size</strong></span></span></dt>
4050 <dd><p>
4051                   Sets the maximum EDNS UDP message size named will
4052                   send in bytes.  Valid values are 512 to 4096 (values outside
4053                   this range will be silently adjusted).  The default
4054                   value is 4096.  The usual reason for setting
4055                   max-udp-size to a non-default value is to get UDP
4056                   answers to pass through broken firewalls that
4057                   block fragmented packets and/or block UDP packets
4058                   that are greater than 512 bytes.
4059                   This is independent of the advertised receive
4060                   buffer (<span><strong class="command">edns-udp-size</strong></span>).
4061                 </p></dd>
4062 <dt><span class="term"><span><strong class="command">masterfile-format</strong></span></span></dt>
4063 <dd><p>Specifies
4064                   the file format of zone files (see
4065                   <a href="Bv9ARM.ch06.html#zonefile_format" title="Additional File Formats">the section called &#8220;Additional File Formats&#8221;</a>).
4066                   The default value is <code class="constant">text</code>, which is the
4067                   standard textual representation.  Files in other formats
4068                   than <code class="constant">text</code> are typically expected
4069                   to be generated by the <span><strong class="command">named-compilezone</strong></span> tool.
4070                   Note that when a zone file in a different format than
4071                   <code class="constant">text</code> is loaded, <span><strong class="command">named</strong></span>
4072                   may omit some of the checks which would be performed for a
4073                   file in the <code class="constant">text</code> format.  In particular,
4074                   <span><strong class="command">check-names</strong></span> checks do not apply
4075                   for the <code class="constant">raw</code> format.  This means
4076                   a zone file in the <code class="constant">raw</code> format
4077                   must be generated with the same check level as that
4078                   specified in the <span><strong class="command">named</strong></span> configuration
4079                   file.  This statement sets the
4080                   <span><strong class="command">masterfile-format</strong></span> for all zones,
4081                   but can be overridden on a per-zone or per-view basis
4082                   by including a <span><strong class="command">masterfile-format</strong></span>
4083                   statement within the <span><strong class="command">zone</strong></span> or
4084                   <span><strong class="command">view</strong></span> block in the configuration
4085                   file.
4086                 </p></dd>
4087 <dt>
4088 <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>
4089 </dt>
4090 <dd>
4091 <p>These set the
4092                   initial value (minimum) and maximum number of recursive
4093                   simultanious clients for any given query
4094                   (&lt;qname,qtype,qclass&gt;) that the server will accept
4095                   before dropping additional clients.  named will attempt to
4096                   self tune this value and changes will be logged.  The
4097                   default values are 10 and 100.
4098                 </p>
4099 <p>
4100                   This value should reflect how many queries come in for
4101                   a given name in the time it takes to resolve that name.
4102                   If the number of queries exceed this value, named will
4103                   assume that it is dealing with a non-responsive zone
4104                   and will drop additional queries.  If it gets a response
4105                   after dropping queries, it will raise the estimate.  The
4106                   estimate will then be lowered in 20 minutes if it has
4107                   remained unchanged.
4108                 </p>
4109 <p>
4110                   If <span><strong class="command">clients-per-query</strong></span> is set to zero,
4111                   then there is no limit on the number of clients per query
4112                   and no queries will be dropped.
4113                 </p>
4114 <p>
4115                   If <span><strong class="command">max-clients-per-query</strong></span> is set to zero,
4116                   then there is no upper bound other than imposed by
4117                   <span><strong class="command">recursive-clients</strong></span>.
4118                 </p>
4119 </dd>
4120 <dt><span class="term"><span><strong class="command">notify-delay</strong></span></span></dt>
4121 <dd><p>
4122                   The delay, in seconds, between sending sets of notify
4123                   messages for a zone.  The default is zero.
4124                 </p></dd>
4125 </dl></div>
4126 </div>
4127 <div class="sect3" lang="en">
4128 <div class="titlepage"><div><div><h4 class="title">
4129 <a name="builtin"></a>Built-in server information zones</h4></div></div></div>
4130 <p>
4131             The server provides some helpful diagnostic information
4132             through a number of built-in zones under the
4133             pseudo-top-level-domain <code class="literal">bind</code> in the
4134             <span><strong class="command">CHAOS</strong></span> class.  These zones are part
4135             of a
4136             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
4137             class
4138             <span><strong class="command">CHAOS</strong></span> which is separate from the
4139             default view of
4140             class <span><strong class="command">IN</strong></span>; therefore, any global
4141             server options
4142             such as <span><strong class="command">allow-query</strong></span> do not apply
4143             the these zones.
4144             If you feel the need to disable these zones, use the options
4145             below, or hide the built-in <span><strong class="command">CHAOS</strong></span>
4146             view by
4147             defining an explicit view of class <span><strong class="command">CHAOS</strong></span>
4148             that matches all clients.
4149           </p>
4150 <div class="variablelist"><dl>
4151 <dt><span class="term"><span><strong class="command">version</strong></span></span></dt>
4152 <dd><p>
4153                   The version the server should report
4154                   via a query of the name <code class="literal">version.bind</code>
4155                   with type <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
4156                   The default is the real version number of this server.
4157                   Specifying <span><strong class="command">version none</strong></span>
4158                   disables processing of the queries.
4159                 </p></dd>
4160 <dt><span class="term"><span><strong class="command">hostname</strong></span></span></dt>
4161 <dd><p>
4162                   The hostname the server should report via a query of
4163                   the name <code class="filename">hostname.bind</code>
4164                   with type <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
4165                   This defaults to the hostname of the machine hosting the
4166                   name server as
4167                   found by the gethostname() function.  The primary purpose of such queries
4168                   is to
4169                   identify which of a group of anycast servers is actually
4170                   answering your queries.  Specifying <span><strong class="command">hostname none;</strong></span>
4171                   disables processing of the queries.
4172                 </p></dd>
4173 <dt><span class="term"><span><strong class="command">server-id</strong></span></span></dt>
4174 <dd><p>
4175                   The ID of the server should report via a query of
4176                   the name <code class="filename">ID.SERVER</code>
4177                   with type <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
4178                   The primary purpose of such queries is to
4179                   identify which of a group of anycast servers is actually
4180                   answering your queries.  Specifying <span><strong class="command">server-id none;</strong></span>
4181                   disables processing of the queries.
4182                   Specifying <span><strong class="command">server-id hostname;</strong></span> will cause named to
4183                   use the hostname as found by the gethostname() function.
4184                   The default <span><strong class="command">server-id</strong></span> is <span><strong class="command">none</strong></span>.
4185                 </p></dd>
4186 </dl></div>
4187 </div>
4188 <div class="sect3" lang="en">
4189 <div class="titlepage"><div><div><h4 class="title">
4190 <a name="empty"></a>Built-in Empty Zones</h4></div></div></div>
4191 <p>
4192             Named has some built-in empty zones (SOA and NS records only).
4193             These are for zones that should normally be answered locally
4194             and which queries should not be sent to the Internet's root
4195             servers.  The official servers which cover these namespaces
4196             return NXDOMAIN responses to these queries.  In particular,
4197             these cover the reverse namespace for addresses from RFC 1918 and
4198             RFC 3330.  They also include the reverse namespace for IPv6 local
4199             address (locally assigned), IPv6 link local addresses, the IPv6
4200             loopback address and the IPv6 unknown addresss.
4201           </p>
4202 <p>
4203             Named will attempt to determine if a built in zone already exists
4204             or is active (covered by a forward-only forwarding declaration)
4205             and will not not create a empty zone in that case.
4206           </p>
4207 <p>
4208             The current list of empty zones is:
4209             </p>
4210 <div class="itemizedlist"><ul type="disc">
4211 <li>0.IN-ADDR.ARPA</li>
4212 <li>127.IN-ADDR.ARPA</li>
4213 <li>254.169.IN-ADDR.ARPA</li>
4214 <li>2.0.192.IN-ADDR.ARPA</li>
4215 <li>255.255.255.255.IN-ADDR.ARPA</li>
4216 <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>
4217 <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>
4218 <li>D.F.IP6.ARPA</li>
4219 <li>8.E.F.IP6.ARPA</li>
4220 <li>9.E.F.IP6.ARPA</li>
4221 <li>A.E.F.IP6.ARPA</li>
4222 <li>B.E.F.IP6.ARPA</li>
4223 </ul></div>
4224 <p>
4225           </p>
4226 <p>
4227             Empty zones are settable at the view level and only apply to
4228             views of class IN.  Disabled empty zones are only inherited
4229             from options if there are no disabled empty zones specified
4230             at the view level.  To override the options list of disabled
4231             zones, you can disable the root zone at the view level, for example:
4232 </p>
4233 <pre class="programlisting">
4234             disable-empty-zone ".";
4235 </pre>
4236 <p>
4237           </p>
4238 <p>
4239             If you are using the address ranges covered here, you should
4240             already have reverse zones covering the addresses you use.
4241             In practice this appears to not be the case with many queries
4242             being made to the infrastructure servers for names in these
4243             spaces.  So many in fact that sacrificial servers were needed
4244             to be deployed to channel the query load away from the
4245             infrastructure servers.
4246           </p>
4247 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4248 <h3 class="title">Note</h3>
4249             The real parent servers for these zones should disable all
4250             empty zone under the parent zone they serve.  For the real
4251             root servers, this is all built in empty zones.  This will
4252             enable them to return referrals to deeper in the tree.
4253           </div>
4254 <div class="variablelist"><dl>
4255 <dt><span class="term"><span><strong class="command">empty-server</strong></span></span></dt>
4256 <dd><p>
4257                   Specify what server name will appear in the returned
4258                   SOA record for empty zones.  If none is specified, then
4259                   the zone's name will be used.
4260                 </p></dd>
4261 <dt><span class="term"><span><strong class="command">empty-contact</strong></span></span></dt>
4262 <dd><p>
4263                   Specify what contact name will appear in the returned
4264                   SOA record for empty zones.  If none is specified, then
4265                   "." will be used.
4266                 </p></dd>
4267 <dt><span class="term"><span><strong class="command">empty-zones-enable</strong></span></span></dt>
4268 <dd><p>
4269                   Enable or disable all empty zones.  By default they
4270                   are enabled.
4271                 </p></dd>
4272 <dt><span class="term"><span><strong class="command">disable-empty-zone</strong></span></span></dt>
4273 <dd><p>
4274                   Disable individual empty zones.  By default none are
4275                   disabled.  This option can be specified multiple times.
4276                 </p></dd>
4277 </dl></div>
4278 </div>
4279 <div class="sect3" lang="en">
4280 <div class="titlepage"><div><div><h4 class="title">
4281 <a name="statsfile"></a>The Statistics File</h4></div></div></div>
4282 <p>
4283             The statistics file generated by <acronym class="acronym">BIND</acronym> 9
4284             is similar, but not identical, to that
4285             generated by <acronym class="acronym">BIND</acronym> 8.
4286           </p>
4287 <p>
4288             The statistics dump begins with a line, like:
4289           </p>
4290 <p>
4291             <span><strong class="command">+++ Statistics Dump +++ (973798949)</strong></span>
4292           </p>
4293 <p>
4294             The number in parentheses is a standard
4295             Unix-style timestamp, measured as seconds since January 1, 1970.
4296             Following
4297             that line are a series of lines containing a counter type, the
4298             value of the
4299             counter, optionally a zone name, and optionally a view name.
4300             The lines without view and zone listed are global statistics for
4301             the entire server.
4302             Lines with a zone and view name for the given view and zone (the
4303             view name is
4304             omitted for the default view).
4305           </p>
4306 <p>
4307             The statistics dump ends with the line where the
4308             number is identical to the number in the beginning line; for example:
4309           </p>
4310 <p>
4311             <span><strong class="command">--- Statistics Dump --- (973798949)</strong></span>
4312           </p>
4313 <p>
4314             The following statistics counters are maintained:
4315           </p>
4316 <div class="informaltable"><table border="1">
4317 <colgroup>
4318 <col>
4319 <col>
4320 </colgroup>
4321 <tbody>
4322 <tr>
4323 <td>
4324                     <p><span><strong class="command">success</strong></span></p>
4325                   </td>
4326 <td>
4327                     <p>
4328                       The number of
4329                       successful queries made to the server or zone.  A
4330                       successful query
4331                       is defined as query which returns a NOERROR response
4332                       with at least
4333                       one answer RR.
4334                     </p>
4335                   </td>
4336 </tr>
4337 <tr>
4338 <td>
4339                     <p><span><strong class="command">referral</strong></span></p>
4340                   </td>
4341 <td>
4342                     <p>
4343                       The number of queries which resulted
4344                       in referral responses.
4345                     </p>
4346                   </td>
4347 </tr>
4348 <tr>
4349 <td>
4350                     <p><span><strong class="command">nxrrset</strong></span></p>
4351                   </td>
4352 <td>
4353                     <p>
4354                       The number of queries which resulted in
4355                       NOERROR responses with no data.
4356                     </p>
4357                   </td>
4358 </tr>
4359 <tr>
4360 <td>
4361                     <p><span><strong class="command">nxdomain</strong></span></p>
4362                   </td>
4363 <td>
4364                     <p>
4365                       The number
4366                       of queries which resulted in NXDOMAIN responses.
4367                     </p>
4368                   </td>
4369 </tr>
4370 <tr>
4371 <td>
4372                     <p><span><strong class="command">failure</strong></span></p>
4373                   </td>
4374 <td>
4375                     <p>
4376                       The number of queries which resulted in a
4377                       failure response other than those above.
4378                     </p>
4379                   </td>
4380 </tr>
4381 <tr>
4382 <td>
4383                     <p><span><strong class="command">recursion</strong></span></p>
4384                   </td>
4385 <td>
4386                     <p>
4387                       The number of queries which caused the server
4388                       to perform recursion in order to find the final answer.
4389                     </p>
4390                   </td>
4391 </tr>
4392 <tr>
4393 <td>
4394                     <p><span><strong class="command">duplicate</strong></span></p>
4395                   </td>
4396 <td>
4397                     <p>
4398                       The number of queries which the server attempted to
4399                       recurse but discover a existing query with the same
4400                       IP address, port, query id, name, type and class
4401                       already being processed.
4402                     </p>
4403                   </td>
4404 </tr>
4405 <tr>
4406 <td>
4407                     <p><span><strong class="command">dropped</strong></span></p>
4408                   </td>
4409 <td>
4410                     <p>
4411                       The number of queries for which the server
4412                       discovered a excessive number of existing
4413                       recursive queries for the same name, type and
4414                       class and were subsequently dropped.
4415                     </p>
4416                   </td>
4417 </tr>
4418 </tbody>
4419 </table></div>
4420 <p>
4421             Each query received by the server will cause exactly one of
4422             <span><strong class="command">success</strong></span>,
4423             <span><strong class="command">referral</strong></span>,
4424             <span><strong class="command">nxrrset</strong></span>,
4425             <span><strong class="command">nxdomain</strong></span>,
4426             <span><strong class="command">failure</strong></span>,
4427             <span><strong class="command">duplicate</strong></span>, or
4428             <span><strong class="command">dropped</strong></span>
4429             to be incremented, and may additionally cause the
4430             <span><strong class="command">recursion</strong></span> counter to be
4431             incremented.
4432           </p>
4433 </div>
4434 <div class="sect3" lang="en">
4435 <div class="titlepage"><div><div><h4 class="title">
4436 <a name="acache"></a>Additional Section Caching</h4></div></div></div>
4437 <p>
4438             The additional section cache, also called <span><strong class="command">acache</strong></span>,
4439             is an internal cache to improve the response performance of BIND 9.
4440             When additional section caching is enabled, BIND 9 will
4441             cache an internal short-cut to the additional section content for
4442             each answer RR.
4443             Note that <span><strong class="command">acache</strong></span> is an internal caching
4444             mechanism of BIND 9, and is not related to the DNS caching
4445             server function.
4446           </p>
4447 <p>
4448             Additional section caching does not change the
4449             response content (except the RRsets ordering of the additional
4450             section, see below), but can improve the response performance
4451             significantly.
4452             It is particularly effective when BIND 9 acts as an authoritative
4453             server for a zone that has many delegations with many glue RRs.
4454           </p>
4455 <p>
4456             In order to obtain the maximum performance improvement
4457             from additional section caching, setting
4458             <span><strong class="command">additional-from-cache</strong></span>
4459             to <span><strong class="command">no</strong></span> is recommended, since the current
4460             implementation of <span><strong class="command">acache</strong></span>
4461             does not short-cut of additional section information from the
4462             DNS cache data.
4463           </p>
4464 <p>
4465             One obvious disadvantage of <span><strong class="command">acache</strong></span> is
4466             that it requires much more
4467             memory for the internal cached data.
4468             Thus, if the response performance does not matter and memory
4469             consumption is much more critical, the
4470             <span><strong class="command">acache</strong></span> mechanism can be
4471             disabled by setting <span><strong class="command">acache-enable</strong></span> to
4472             <span><strong class="command">no</strong></span>.
4473             It is also possible to specify the upper limit of memory
4474             consumption
4475             for acache by using <span><strong class="command">max-acache-size</strong></span>.
4476           </p>
4477 <p>
4478             Additional section caching also has a minor effect on the
4479             RRset ordering in the additional section.
4480             Without <span><strong class="command">acache</strong></span>,
4481             <span><strong class="command">cyclic</strong></span> order is effective for the additional
4482             section as well as the answer and authority sections.
4483             However, additional section caching fixes the ordering when it
4484             first caches an RRset for the additional section, and the same
4485             ordering will be kept in succeeding responses, regardless of the
4486             setting of <span><strong class="command">rrset-order</strong></span>.
4487             The effect of this should be minor, however, since an
4488             RRset in the additional section
4489             typically only contains a small number of RRs (and in many cases
4490             it only contains a single RR), in which case the
4491             ordering does not matter much.
4492           </p>
4493 <p>
4494             The following is a summary of options related to
4495             <span><strong class="command">acache</strong></span>.
4496           </p>
4497 <div class="variablelist"><dl>
4498 <dt><span class="term"><span><strong class="command">acache-enable</strong></span></span></dt>
4499 <dd><p>
4500                   If <span><strong class="command">yes</strong></span>, additional section caching is
4501                   enabled.  The default value is <span><strong class="command">no</strong></span>.
4502                 </p></dd>
4503 <dt><span class="term"><span><strong class="command">acache-cleaning-interval</strong></span></span></dt>
4504 <dd><p>
4505                   The server will remove stale cache entries, based on an LRU
4506                   based
4507                   algorithm, every <span><strong class="command">acache-cleaning-interval</strong></span> minutes.
4508                   The default is 60 minutes.
4509                   If set to 0, no periodic cleaning will occur.
4510                 </p></dd>
4511 <dt><span class="term"><span><strong class="command">max-acache-size</strong></span></span></dt>
4512 <dd><p>
4513                   The maximum amount of memory in bytes to use for the server's acache.
4514                   When the amount of data in the acache reaches this limit,
4515                   the server
4516                   will clean more aggressively so that the limit is not
4517                   exceeded.
4518                   In a server with multiple views, the limit applies
4519                   separately to the
4520                   acache of each view.
4521                   The default is <code class="literal">unlimited</code>,
4522                   meaning that
4523                   entries are purged from the acache only at the
4524                   periodic cleaning time.
4525                 </p></dd>
4526 </dl></div>
4527 </div>
4528 </div>
4529 <div class="sect2" lang="en">
4530 <div class="titlepage"><div><div><h3 class="title">
4531 <a name="server_statement_grammar"></a><span><strong class="command">server</strong></span> Statement Grammar</h3></div></div></div>
4532 <pre class="programlisting"><span><strong class="command">server</strong></span> <em class="replaceable"><code>ip_addr[/prefixlen]</code></em> {
4533     [<span class="optional"> bogus <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4534     [<span class="optional"> provide-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4535     [<span class="optional"> request-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4536     [<span class="optional"> edns <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4537     [<span class="optional"> edns-udp-size <em class="replaceable"><code>number</code></em> ; </span>]
4538     [<span class="optional"> max-udp-size <em class="replaceable"><code>number</code></em> ; </span>]
4539     [<span class="optional"> transfers <em class="replaceable"><code>number</code></em> ; </span>]
4540     [<span class="optional"> transfer-format <em class="replaceable"><code>( one-answer | many-answers )</code></em> ; ]</span>]
4541     [<span class="optional"> keys <em class="replaceable"><code>{ string ; [<span class="optional"> string ; [<span class="optional">...</span>]</span>] }</code></em> ; </span>]
4542     [<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>]
4543     [<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>]
4544     [<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>]
4545     [<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>]
4546     [<span class="optional"> query-source [<span class="optional"> address ( <em class="replaceable"><code>ip_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]; </span>]
4547     [<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>] [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]; </span>]
4548 };
4549 </pre>
4550 </div>
4551 <div class="sect2" lang="en">
4552 <div class="titlepage"><div><div><h3 class="title">
4553 <a name="server_statement_definition_and_usage"></a><span><strong class="command">server</strong></span> Statement Definition and
4554             Usage</h3></div></div></div>
4555 <p>
4556             The <span><strong class="command">server</strong></span> statement defines
4557             characteristics
4558             to be associated with a remote name server.  If a prefix length is
4559             specified, then a range of servers is covered.  Only the most
4560             specific
4561             server clause applies regardless of the order in
4562             <code class="filename">named.conf</code>.
4563           </p>
4564 <p>
4565             The <span><strong class="command">server</strong></span> statement can occur at
4566             the top level of the
4567             configuration file or inside a <span><strong class="command">view</strong></span>
4568             statement.
4569             If a <span><strong class="command">view</strong></span> statement contains
4570             one or more <span><strong class="command">server</strong></span> statements, only
4571             those
4572             apply to the view and any top-level ones are ignored.
4573             If a view contains no <span><strong class="command">server</strong></span>
4574             statements,
4575             any top-level <span><strong class="command">server</strong></span> statements are
4576             used as
4577             defaults.
4578           </p>
4579 <p>
4580             If you discover that a remote server is giving out bad data,
4581             marking it as bogus will prevent further queries to it. The
4582             default
4583             value of <span><strong class="command">bogus</strong></span> is <span><strong class="command">no</strong></span>.
4584           </p>
4585 <p>
4586             The <span><strong class="command">provide-ixfr</strong></span> clause determines
4587             whether
4588             the local server, acting as master, will respond with an
4589             incremental
4590             zone transfer when the given remote server, a slave, requests it.
4591             If set to <span><strong class="command">yes</strong></span>, incremental transfer
4592             will be provided
4593             whenever possible. If set to <span><strong class="command">no</strong></span>,
4594             all transfers
4595             to the remote server will be non-incremental. If not set, the
4596             value
4597             of the <span><strong class="command">provide-ixfr</strong></span> option in the
4598             view or
4599             global options block is used as a default.
4600           </p>
4601 <p>
4602             The <span><strong class="command">request-ixfr</strong></span> clause determines
4603             whether
4604             the local server, acting as a slave, will request incremental zone
4605             transfers from the given remote server, a master. If not set, the
4606             value of the <span><strong class="command">request-ixfr</strong></span> option in
4607             the view or
4608             global options block is used as a default.
4609           </p>
4610 <p>
4611             IXFR requests to servers that do not support IXFR will
4612             automatically
4613             fall back to AXFR.  Therefore, there is no need to manually list
4614             which servers support IXFR and which ones do not; the global
4615             default
4616             of <span><strong class="command">yes</strong></span> should always work.
4617             The purpose of the <span><strong class="command">provide-ixfr</strong></span> and
4618             <span><strong class="command">request-ixfr</strong></span> clauses is
4619             to make it possible to disable the use of IXFR even when both
4620             master
4621             and slave claim to support it, for example if one of the servers
4622             is buggy and crashes or corrupts data when IXFR is used.
4623           </p>
4624 <p>
4625             The <span><strong class="command">edns</strong></span> clause determines whether
4626             the local server will attempt to use EDNS when communicating
4627             with the remote server.  The default is <span><strong class="command">yes</strong></span>.
4628           </p>
4629 <p>
4630             The <span><strong class="command">edns-udp-size</strong></span> option sets the EDNS UDP size
4631             that is advertised by named when querying the remote server.
4632             Valid values are 512 to 4096 bytes (values outside this range will be
4633             silently adjusted).  This option is useful when you wish to
4634             advertises a different value to this server than the value you
4635             advertise globally, for example, when there is a firewall at the
4636             remote site that is blocking large replies.
4637           </p>
4638 <p>
4639             The <span><strong class="command">max-udp-size</strong></span> option sets the
4640             maximum EDNS UDP message size named will send.  Valid
4641             values are 512 to 4096 bytes (values outside this range will
4642             be silently adjusted).  This option is useful when you
4643             know that there is a firewall that is blocking large
4644             replies from named.
4645           </p>
4646 <p>
4647             The server supports two zone transfer methods. The first, <span><strong class="command">one-answer</strong></span>,
4648             uses one DNS message per resource record transferred. <span><strong class="command">many-answers</strong></span> packs
4649             as many resource records as possible into a message. <span><strong class="command">many-answers</strong></span> is
4650             more efficient, but is only known to be understood by <acronym class="acronym">BIND</acronym> 9, <acronym class="acronym">BIND</acronym>
4651             8.x, and patched versions of <acronym class="acronym">BIND</acronym>
4652             4.9.5. You can specify which method
4653             to use for a server with the <span><strong class="command">transfer-format</strong></span> option.
4654             If <span><strong class="command">transfer-format</strong></span> is not
4655             specified, the <span><strong class="command">transfer-format</strong></span>
4656             specified
4657             by the <span><strong class="command">options</strong></span> statement will be
4658             used.
4659           </p>
4660 <p><span><strong class="command">transfers</strong></span>
4661             is used to limit the number of concurrent inbound zone
4662             transfers from the specified server. If no
4663             <span><strong class="command">transfers</strong></span> clause is specified, the
4664             limit is set according to the
4665             <span><strong class="command">transfers-per-ns</strong></span> option.
4666           </p>
4667 <p>
4668             The <span><strong class="command">keys</strong></span> clause identifies a
4669             <span><strong class="command">key_id</strong></span> defined by the <span><strong class="command">key</strong></span> statement,
4670             to be used for transaction security (TSIG, <a href="Bv9ARM.ch04.html#tsig" title="TSIG">the section called &#8220;TSIG&#8221;</a>)
4671             when talking to the remote server.
4672             When a request is sent to the remote server, a request signature
4673             will be generated using the key specified here and appended to the
4674             message. A request originating from the remote server is not
4675             required
4676             to be signed by this key.
4677           </p>
4678 <p>
4679             Although the grammar of the <span><strong class="command">keys</strong></span>
4680             clause
4681             allows for multiple keys, only a single key per server is
4682             currently
4683             supported.
4684           </p>
4685 <p>
4686             The <span><strong class="command">transfer-source</strong></span> and
4687             <span><strong class="command">transfer-source-v6</strong></span> clauses specify
4688             the IPv4 and IPv6 source
4689             address to be used for zone transfer with the remote server,
4690             respectively.
4691             For an IPv4 remote server, only <span><strong class="command">transfer-source</strong></span> can
4692             be specified.
4693             Similarly, for an IPv6 remote server, only
4694             <span><strong class="command">transfer-source-v6</strong></span> can be
4695             specified.
4696             For more details, see the description of
4697             <span><strong class="command">transfer-source</strong></span> and
4698             <span><strong class="command">transfer-source-v6</strong></span> in
4699             <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called &#8220;Zone Transfers&#8221;</a>.
4700           </p>
4701 <p>
4702             The <span><strong class="command">notify-source</strong></span> and
4703             <span><strong class="command">notify-source-v6</strong></span> clauses specify the
4704             IPv4 and IPv6 source address to be used for notify
4705             messages sent to remote servers, respectively.  For an
4706             IPv4 remote server, only <span><strong class="command">notify-source</strong></span>
4707             can be specified.  Similarly, for an IPv6 remote server,
4708             only <span><strong class="command">notify-source-v6</strong></span> can be specified.
4709           </p>
4710 <p>
4711             The <span><strong class="command">query-source</strong></span> and
4712             <span><strong class="command">query-source-v6</strong></span> clauses specify the
4713             IPv4 and IPv6 source address to be used for queries
4714             sent to remote servers, respectively.  For an IPv4
4715             remote server, only <span><strong class="command">query-source</strong></span> can
4716             be specified.  Similarly, for an IPv6 remote server,
4717             only <span><strong class="command">query-source-v6</strong></span> can be specified.
4718           </p>
4719 </div>
4720 <div class="sect2" lang="en">
4721 <div class="titlepage"><div><div><h3 class="title">
4722 <a name="id2585614"></a><span><strong class="command">trusted-keys</strong></span> Statement Grammar</h3></div></div></div>
4723 <pre class="programlisting"><span><strong class="command">trusted-keys</strong></span> {
4724     <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> ;
4725     [<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>]
4726 };
4727 </pre>
4728 </div>
4729 <div class="sect2" lang="en">
4730 <div class="titlepage"><div><div><h3 class="title">
4731 <a name="id2585666"></a><span><strong class="command">trusted-keys</strong></span> Statement Definition
4732             and Usage</h3></div></div></div>
4733 <p>
4734             The <span><strong class="command">trusted-keys</strong></span> statement defines
4735             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
4736             public key for a non-authoritative zone is known, but
4737             cannot be securely obtained through DNS, either because
4738             it is the DNS root zone or because its parent zone is
4739             unsigned.  Once a key has been configured as a trusted
4740             key, it is treated as if it had been validated and
4741             proven secure. The resolver attempts DNSSEC validation
4742             on all DNS data in subdomains of a security root.
4743           </p>
4744 <p>
4745             All keys (and corresponding zones) listed in
4746             <span><strong class="command">trusted-keys</strong></span> are deemed to exist regardless
4747             of what parent zones say.  Similarly for all keys listed in
4748             <span><strong class="command">trusted-keys</strong></span> only those keys are
4749             used to validate the DNSKEY RRset.  The parent's DS RRset
4750             will not be used.
4751           </p>
4752 <p>
4753             The <span><strong class="command">trusted-keys</strong></span> statement can contain
4754             multiple key entries, each consisting of the key's
4755             domain name, flags, protocol, algorithm, and the Base-64
4756             representation of the key data.
4757           </p>
4758 </div>
4759 <div class="sect2" lang="en">
4760 <div class="titlepage"><div><div><h3 class="title">
4761 <a name="view_statement_grammar"></a><span><strong class="command">view</strong></span> Statement Grammar</h3></div></div></div>
4762 <pre class="programlisting"><span><strong class="command">view</strong></span> <em class="replaceable"><code>view_name</code></em>
4763       [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
4764       match-clients { <em class="replaceable"><code>address_match_list</code></em> };
4765       match-destinations { <em class="replaceable"><code>address_match_list</code></em> };
4766       match-recursive-only <em class="replaceable"><code>yes_or_no</code></em> ;
4767       [<span class="optional"> <em class="replaceable"><code>view_option</code></em>; ...</span>]
4768       [<span class="optional"> <em class="replaceable"><code>zone_statement</code></em>; ...</span>]
4769 };
4770 </pre>
4771 </div>
4772 <div class="sect2" lang="en">
4773 <div class="titlepage"><div><div><h3 class="title">
4774 <a name="id2585748"></a><span><strong class="command">view</strong></span> Statement Definition and Usage</h3></div></div></div>
4775 <p>
4776             The <span><strong class="command">view</strong></span> statement is a powerful
4777             feature
4778             of <acronym class="acronym">BIND</acronym> 9 that lets a name server
4779             answer a DNS query differently
4780             depending on who is asking. It is particularly useful for
4781             implementing
4782             split DNS setups without having to run multiple servers.
4783           </p>
4784 <p>
4785             Each <span><strong class="command">view</strong></span> statement defines a view
4786             of the
4787             DNS namespace that will be seen by a subset of clients.  A client
4788             matches
4789             a view if its source IP address matches the
4790             <code class="varname">address_match_list</code> of the view's
4791             <span><strong class="command">match-clients</strong></span> clause and its
4792             destination IP address matches
4793             the <code class="varname">address_match_list</code> of the
4794             view's
4795             <span><strong class="command">match-destinations</strong></span> clause.  If not
4796             specified, both
4797             <span><strong class="command">match-clients</strong></span> and <span><strong class="command">match-destinations</strong></span>
4798             default to matching all addresses.  In addition to checking IP
4799             addresses
4800             <span><strong class="command">match-clients</strong></span> and <span><strong class="command">match-destinations</strong></span>
4801             can also take <span><strong class="command">keys</strong></span> which provide an
4802             mechanism for the
4803             client to select the view.  A view can also be specified
4804             as <span><strong class="command">match-recursive-only</strong></span>, which
4805             means that only recursive
4806             requests from matching clients will match that view.
4807             The order of the <span><strong class="command">view</strong></span> statements is
4808             significant &#8212;
4809             a client request will be resolved in the context of the first
4810             <span><strong class="command">view</strong></span> that it matches.
4811           </p>
4812 <p>
4813             Zones defined within a <span><strong class="command">view</strong></span>
4814             statement will
4815             only be accessible to clients that match the <span><strong class="command">view</strong></span>.
4816             By defining a zone of the same name in multiple views, different
4817             zone data can be given to different clients, for example,
4818             "internal"
4819             and "external" clients in a split DNS setup.
4820           </p>
4821 <p>
4822             Many of the options given in the <span><strong class="command">options</strong></span> statement
4823             can also be used within a <span><strong class="command">view</strong></span>
4824             statement, and then
4825             apply only when resolving queries with that view.  When no
4826             view-specific
4827             value is given, the value in the <span><strong class="command">options</strong></span> statement
4828             is used as a default.  Also, zone options can have default values
4829             specified
4830             in the <span><strong class="command">view</strong></span> statement; these
4831             view-specific defaults
4832             take precedence over those in the <span><strong class="command">options</strong></span> statement.
4833           </p>
4834 <p>
4835             Views are class specific.  If no class is given, class IN
4836             is assumed.  Note that all non-IN views must contain a hint zone,
4837             since only the IN class has compiled-in default hints.
4838           </p>
4839 <p>
4840             If there are no <span><strong class="command">view</strong></span> statements in
4841             the config
4842             file, a default view that matches any client is automatically
4843             created
4844             in class IN. Any <span><strong class="command">zone</strong></span> statements
4845             specified on
4846             the top level of the configuration file are considered to be part
4847             of
4848             this default view, and the <span><strong class="command">options</strong></span>
4849             statement will
4850             apply to the default view. If any explicit <span><strong class="command">view</strong></span>
4851             statements are present, all <span><strong class="command">zone</strong></span>
4852             statements must
4853             occur inside <span><strong class="command">view</strong></span> statements.
4854           </p>
4855 <p>
4856             Here is an example of a typical split DNS setup implemented
4857             using <span><strong class="command">view</strong></span> statements:
4858           </p>
4859 <pre class="programlisting">view "internal" {
4860       // This should match our internal networks.
4861       match-clients { 10.0.0.0/8; };
4862
4863       // Provide recursive service to internal clients only.
4864       recursion yes;
4865
4866       // Provide a complete view of the example.com zone
4867       // including addresses of internal hosts.
4868       zone "example.com" {
4869             type master;
4870             file "example-internal.db";
4871       };
4872 };
4873
4874 view "external" {
4875       // Match all clients not matched by the previous view.
4876       match-clients { any; };
4877
4878       // Refuse recursive service to external clients.
4879       recursion no;
4880
4881       // Provide a restricted view of the example.com zone
4882       // containing only publicly accessible hosts.
4883       zone "example.com" {
4884            type master;
4885            file "example-external.db";
4886       };
4887 };
4888 </pre>
4889 </div>
4890 <div class="sect2" lang="en">
4891 <div class="titlepage"><div><div><h3 class="title">
4892 <a name="zone_statement_grammar"></a><span><strong class="command">zone</strong></span>
4893             Statement Grammar</h3></div></div></div>
4894 <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>] {
4895     type master;
4896     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
4897     [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
4898     [<span class="optional"> allow-update { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
4899     [<span class="optional"> update-policy { <em class="replaceable"><code>update_policy_rule</code></em> [<span class="optional">...</span>] }; </span>]
4900     [<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>] ; [<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>]
4901     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
4902     [<span class="optional"> check-mx (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
4903     [<span class="optional"> check-wildcard <em class="replaceable"><code>yes_or_no</code></em>; </span>]
4904     [<span class="optional"> check-integrity <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4905     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
4906     [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
4907     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
4908     [<span class="optional"> journal <em class="replaceable"><code>string</code></em> ; </span>]
4909     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
4910     [<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>]
4911     [<span class="optional"> ixfr-base <em class="replaceable"><code>string</code></em> ; </span>]
4912     [<span class="optional"> ixfr-tmp-file <em class="replaceable"><code>string</code></em> ; </span>]
4913     [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4914     [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em> ; </span>]
4915     [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em> ; </span>]
4916     [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em> ; </span>]
4917     [<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>]
4918     [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
4919     [<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>]
4920     [<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>]
4921     [<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>]
4922     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4923     [<span class="optional"> sig-validity-interval <em class="replaceable"><code>number</code></em> ; </span>]
4924     [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
4925     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
4926     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
4927     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
4928     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
4929     [<span class="optional"> key-directory <em class="replaceable"><code>path_name</code></em>; </span>]
4930     [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4931 };
4932
4933 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
4934     type slave;
4935     [<span class="optional"> allow-notify { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
4936     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
4937     [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
4938     [<span class="optional"> allow-update-forwarding { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
4939     [<span class="optional"> update-check-ksk <em class="replaceable"><code>yes_or_no</code></em>; </span>]
4940     [<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>] ; [<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>]
4941     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
4942     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
4943     [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
4944     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
4945     [<span class="optional"> journal <em class="replaceable"><code>string</code></em> ; </span>]
4946     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
4947     [<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>]
4948     [<span class="optional"> ixfr-base <em class="replaceable"><code>string</code></em> ; </span>]
4949     [<span class="optional"> ixfr-tmp-file <em class="replaceable"><code>string</code></em> ; </span>]
4950     [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4951     [<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> [<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>] }; </span>]
4952     [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em> ; </span>]
4953     [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em> ; </span>]
4954     [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em> ; </span>]
4955     [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em> ; </span>]
4956     [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em> ; </span>]
4957     [<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>]
4958     [<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>]
4959     [<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>]
4960     [<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>]
4961     [<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>]
4962     [<span class="optional"> alt-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>]
4963     [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
4964     [<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>]
4965     [<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>]
4966     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4967     [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
4968     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
4969     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
4970     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
4971     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
4972     [<span class="optional"> multi-master <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4973     [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4974 };
4975
4976 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
4977     type hint;
4978     file <em class="replaceable"><code>string</code></em> ;
4979     [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4980     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; // Not Implemented. </span>]
4981 };
4982
4983 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
4984     type stub;
4985     [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
4986     [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
4987     [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
4988     [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
4989     [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
4990     [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
4991     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
4992     [<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>]
4993     [<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> [<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>] }; </span>]
4994     [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em> ; </span>]
4995     [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em> ; </span>]
4996     [<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>]
4997     [<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>]
4998     [<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>]
4999     [<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>]
5000     [<span class="optional"> alt-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>]
5001     [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
5002     [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5003     [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
5004     [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
5005     [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
5006     [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
5007     [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
5008     [<span class="optional"> multi-master <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5009 };
5010
5011 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
5012     type forward;
5013     [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
5014     [<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>]
5015     [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5016 };
5017
5018 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
5019     type delegation-only;
5020 };
5021
5022 </pre>
5023 </div>
5024 <div class="sect2" lang="en">
5025 <div class="titlepage"><div><div><h3 class="title">
5026 <a name="id2587332"></a><span><strong class="command">zone</strong></span> Statement Definition and Usage</h3></div></div></div>
5027 <div class="sect3" lang="en">
5028 <div class="titlepage"><div><div><h4 class="title">
5029 <a name="id2587339"></a>Zone Types</h4></div></div></div>
5030 <div class="informaltable"><table border="1">
5031 <colgroup>
5032 <col>
5033 <col>
5034 </colgroup>
5035 <tbody>
5036 <tr>
5037 <td>
5038                       <p>
5039                         <code class="varname">master</code>
5040                       </p>
5041                     </td>
5042 <td>
5043                       <p>
5044                         The server has a master copy of the data
5045                         for the zone and will be able to provide authoritative
5046                         answers for
5047                         it.
5048                       </p>
5049                     </td>
5050 </tr>
5051 <tr>
5052 <td>
5053                       <p>
5054                         <code class="varname">slave</code>
5055                       </p>
5056                     </td>
5057 <td>
5058                       <p>
5059                         A slave zone is a replica of a master
5060                         zone. The <span><strong class="command">masters</strong></span> list
5061                         specifies one or more IP addresses
5062                         of master servers that the slave contacts to update
5063                         its copy of the zone.
5064                         Masters list elements can also be names of other
5065                         masters lists.
5066                         By default, transfers are made from port 53 on the
5067                         servers; this can
5068                         be changed for all servers by specifying a port number
5069                         before the
5070                         list of IP addresses, or on a per-server basis after
5071                         the IP address.
5072                         Authentication to the master can also be done with
5073                         per-server TSIG keys.
5074                         If a file is specified, then the
5075                         replica will be written to this file whenever the zone
5076                         is changed,
5077                         and reloaded from this file on a server restart. Use
5078                         of a file is
5079                         recommended, since it often speeds server startup and
5080                         eliminates
5081                         a needless waste of bandwidth. Note that for large
5082                         numbers (in the
5083                         tens or hundreds of thousands) of zones per server, it
5084                         is best to
5085                         use a two-level naming scheme for zone filenames. For
5086                         example,
5087                         a slave server for the zone <code class="literal">example.com</code> might place
5088                         the zone contents into a file called
5089                         <code class="filename">ex/example.com</code> where <code class="filename">ex/</code> is
5090                         just the first two letters of the zone name. (Most
5091                         operating systems
5092                         behave very slowly if you put 100 000 files into
5093                         a single directory.)
5094                       </p>
5095                     </td>
5096 </tr>
5097 <tr>
5098 <td>
5099                       <p>
5100                         <code class="varname">stub</code>
5101                       </p>
5102                     </td>
5103 <td>
5104                       <p>
5105                         A stub zone is similar to a slave zone,
5106                         except that it replicates only the NS records of a
5107                         master zone instead
5108                         of the entire zone. Stub zones are not a standard part
5109                         of the DNS;
5110                         they are a feature specific to the <acronym class="acronym">BIND</acronym> implementation.
5111                       </p>
5112
5113                       <p>
5114                         Stub zones can be used to eliminate the need for glue
5115                         NS record
5116                         in a parent zone at the expense of maintaining a stub
5117                         zone entry and
5118                         a set of name server addresses in <code class="filename">named.conf</code>.
5119                         This usage is not recommended for new configurations,
5120                         and BIND 9
5121                         supports it only in a limited way.
5122                         In <acronym class="acronym">BIND</acronym> 4/8, zone
5123                         transfers of a parent zone
5124                         included the NS records from stub children of that
5125                         zone. This meant
5126                         that, in some cases, users could get away with
5127                         configuring child stubs
5128                         only in the master server for the parent zone. <acronym class="acronym">BIND</acronym>
5129                         9 never mixes together zone data from different zones
5130                         in this
5131                         way. Therefore, if a <acronym class="acronym">BIND</acronym> 9 master serving a parent
5132                         zone has child stub zones configured, all the slave
5133                         servers for the
5134                         parent zone also need to have the same child stub
5135                         zones
5136                         configured.
5137                       </p>
5138
5139                       <p>
5140                         Stub zones can also be used as a way of forcing the
5141                         resolution
5142                         of a given domain to use a particular set of
5143                         authoritative servers.
5144                         For example, the caching name servers on a private
5145                         network using
5146                         RFC1918 addressing may be configured with stub zones
5147                         for
5148                         <code class="literal">10.in-addr.arpa</code>
5149                         to use a set of internal name servers as the
5150                         authoritative
5151                         servers for that domain.
5152                       </p>
5153                     </td>
5154 </tr>
5155 <tr>
5156 <td>
5157                       <p>
5158                         <code class="varname">forward</code>
5159                       </p>
5160                     </td>
5161 <td>
5162                       <p>
5163                         A "forward zone" is a way to configure
5164                         forwarding on a per-domain basis.  A <span><strong class="command">zone</strong></span> statement
5165                         of type <span><strong class="command">forward</strong></span> can
5166                         contain a <span><strong class="command">forward</strong></span>
5167                         and/or <span><strong class="command">forwarders</strong></span>
5168                         statement,
5169                         which will apply to queries within the domain given by
5170                         the zone
5171                         name. If no <span><strong class="command">forwarders</strong></span>
5172                         statement is present or
5173                         an empty list for <span><strong class="command">forwarders</strong></span> is given, then no
5174                         forwarding will be done for the domain, canceling the
5175                         effects of
5176                         any forwarders in the <span><strong class="command">options</strong></span> statement. Thus
5177                         if you want to use this type of zone to change the
5178                         behavior of the
5179                         global <span><strong class="command">forward</strong></span> option
5180                         (that is, "forward first"
5181                         to, then "forward only", or vice versa, but want to
5182                         use the same
5183                         servers as set globally) you need to re-specify the
5184                         global forwarders.
5185                       </p>
5186                     </td>
5187 </tr>
5188 <tr>
5189 <td>
5190                       <p>
5191                         <code class="varname">hint</code>
5192                       </p>
5193                     </td>
5194 <td>
5195                       <p>
5196                         The initial set of root name servers is
5197                         specified using a "hint zone". When the server starts
5198                         up, it uses
5199                         the root hints to find a root name server and get the
5200                         most recent
5201                         list of root name servers. If no hint zone is
5202                         specified for class
5203                         IN, the server uses a compiled-in default set of root
5204                         servers hints.
5205                         Classes other than IN have no built-in defaults hints.
5206                       </p>
5207                     </td>
5208 </tr>
5209 <tr>
5210 <td>
5211                       <p>
5212                         <code class="varname">delegation-only</code>
5213                       </p>
5214                     </td>
5215 <td>
5216                       <p>
5217                         This is used to enforce the delegation-only
5218                         status of infrastructure zones (e.g. COM, NET, ORG).
5219                         Any answer that
5220                         is received without an explicit or implicit delegation
5221                         in the authority
5222                         section will be treated as NXDOMAIN.  This does not
5223                         apply to the zone
5224                         apex.  This should not be applied to leaf zones.
5225                       </p>
5226                       <p>
5227                         <code class="varname">delegation-only</code> has no
5228                         effect on answers received
5229                         from forwarders.
5230                       </p>
5231                     </td>
5232 </tr>
5233 </tbody>
5234 </table></div>
5235 </div>
5236 <div class="sect3" lang="en">
5237 <div class="titlepage"><div><div><h4 class="title">
5238 <a name="id2587690"></a>Class</h4></div></div></div>
5239 <p>
5240               The zone's name may optionally be followed by a class. If
5241               a class is not specified, class <code class="literal">IN</code> (for <code class="varname">Internet</code>),
5242               is assumed. This is correct for the vast majority of cases.
5243             </p>
5244 <p>
5245               The <code class="literal">hesiod</code> class is
5246               named for an information service from MIT's Project Athena. It
5247               is
5248               used to share information about various systems databases, such
5249               as users, groups, printers and so on. The keyword
5250               <code class="literal">HS</code> is
5251               a synonym for hesiod.
5252             </p>
5253 <p>
5254               Another MIT development is Chaosnet, a LAN protocol created
5255               in the mid-1970s. Zone data for it can be specified with the <code class="literal">CHAOS</code> class.
5256             </p>
5257 </div>
5258 <div class="sect3" lang="en">
5259 <div class="titlepage"><div><div><h4 class="title">
5260 <a name="id2587723"></a>Zone Options</h4></div></div></div>
5261 <div class="variablelist"><dl>
5262 <dt><span class="term"><span><strong class="command">allow-notify</strong></span></span></dt>
5263 <dd><p>
5264                     See the description of
5265                     <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>.
5266                   </p></dd>
5267 <dt><span class="term"><span><strong class="command">allow-query</strong></span></span></dt>
5268 <dd><p>
5269                     See the description of
5270                     <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>.
5271                   </p></dd>
5272 <dt><span class="term"><span><strong class="command">allow-transfer</strong></span></span></dt>
5273 <dd><p>
5274                     See the description of <span><strong class="command">allow-transfer</strong></span>
5275                     in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
5276                   </p></dd>
5277 <dt><span class="term"><span><strong class="command">allow-update</strong></span></span></dt>
5278 <dd><p>
5279                     See the description of <span><strong class="command">allow-update</strong></span>
5280                     in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
5281                   </p></dd>
5282 <dt><span class="term"><span><strong class="command">update-policy</strong></span></span></dt>
5283 <dd><p>
5284                     Specifies a "Simple Secure Update" policy. See
5285                     <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called &#8220;Dynamic Update Policies&#8221;</a>.
5286                   </p></dd>
5287 <dt><span class="term"><span><strong class="command">allow-update-forwarding</strong></span></span></dt>
5288 <dd><p>
5289                     See the description of <span><strong class="command">allow-update-forwarding</strong></span>
5290                     in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called &#8220;Access Control&#8221;</a>.
5291                   </p></dd>
5292 <dt><span class="term"><span><strong class="command">also-notify</strong></span></span></dt>
5293 <dd><p>
5294                     Only meaningful if <span><strong class="command">notify</strong></span>
5295                     is
5296                     active for this zone. The set of machines that will
5297                     receive a
5298                     <code class="literal">DNS NOTIFY</code> message
5299                     for this zone is made up of all the listed name servers
5300                     (other than
5301                     the primary master) for the zone plus any IP addresses
5302                     specified
5303                     with <span><strong class="command">also-notify</strong></span>. A port
5304                     may be specified
5305                     with each <span><strong class="command">also-notify</strong></span>
5306                     address to send the notify
5307                     messages to a port other than the default of 53.
5308                     <span><strong class="command">also-notify</strong></span> is not
5309                     meaningful for stub zones.
5310                     The default is the empty list.
5311                   </p></dd>
5312 <dt><span class="term"><span><strong class="command">check-names</strong></span></span></dt>
5313 <dd><p>
5314                     This option is used to restrict the character set and
5315                     syntax of
5316                     certain domain names in master files and/or DNS responses
5317                     received from the
5318                     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>
5319                     zones the default is <span><strong class="command">warn</strong></span>.
5320                   </p></dd>
5321 <dt><span class="term"><span><strong class="command">check-mx</strong></span></span></dt>
5322 <dd><p>
5323                     See the description of
5324                     <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>.
5325                   </p></dd>
5326 <dt><span class="term"><span><strong class="command">check-wildcard</strong></span></span></dt>
5327 <dd><p>
5328                     See the description of
5329                     <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>.
5330                   </p></dd>
5331 <dt><span class="term"><span><strong class="command">check-integrity</strong></span></span></dt>
5332 <dd><p>
5333                     See the description of
5334                     <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>.
5335                   </p></dd>
5336 <dt><span class="term"><span><strong class="command">check-sibling</strong></span></span></dt>
5337 <dd><p>
5338                     See the description of
5339                     <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>.
5340                   </p></dd>
5341 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl</strong></span></span></dt>
5342 <dd><p>
5343                     See the description of
5344                     <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>.
5345                   </p></dd>
5346 <dt><span class="term"><span><strong class="command">update-check-ksk</strong></span></span></dt>
5347 <dd><p>
5348                     See the description of
5349                     <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>.
5350                   </p></dd>
5351 <dt><span class="term"><span><strong class="command">database</strong></span></span></dt>
5352 <dd>
5353 <p>
5354                     Specify the type of database to be used for storing the
5355                     zone data.  The string following the <span><strong class="command">database</strong></span> keyword
5356                     is interpreted as a list of whitespace-delimited words.
5357                     The first word
5358                     identifies the database type, and any subsequent words are
5359                     passed
5360                     as arguments to the database to be interpreted in a way
5361                     specific
5362                     to the database type.
5363                   </p>
5364 <p>
5365                     The default is <strong class="userinput"><code>"rbt"</code></strong>, BIND 9's
5366                     native in-memory
5367                     red-black-tree database.  This database does not take
5368                     arguments.
5369                   </p>
5370 <p>
5371                     Other values are possible if additional database drivers
5372                     have been linked into the server.  Some sample drivers are
5373                     included
5374                     with the distribution but none are linked in by default.
5375                   </p>
5376 </dd>
5377 <dt><span class="term"><span><strong class="command">dialup</strong></span></span></dt>
5378 <dd><p>
5379                     See the description of
5380                     <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>.
5381                   </p></dd>
5382 <dt><span class="term"><span><strong class="command">delegation-only</strong></span></span></dt>
5383 <dd><p>
5384                     The flag only applies to hint and stub zones.  If set
5385                     to <strong class="userinput"><code>yes</code></strong>, then the zone will also be
5386                     treated as if it
5387                     is also a delegation-only type zone.
5388                   </p></dd>
5389 <dt><span class="term"><span><strong class="command">forward</strong></span></span></dt>
5390 <dd><p>
5391                     Only meaningful if the zone has a forwarders
5392                     list. The <span><strong class="command">only</strong></span> value causes
5393                     the lookup to fail
5394                     after trying the forwarders and getting no answer, while <span><strong class="command">first</strong></span> would
5395                     allow a normal lookup to be tried.
5396                   </p></dd>
5397 <dt><span class="term"><span><strong class="command">forwarders</strong></span></span></dt>
5398 <dd><p>
5399                     Used to override the list of global forwarders.
5400                     If it is not specified in a zone of type <span><strong class="command">forward</strong></span>,
5401                     no forwarding is done for the zone and the global options are
5402                     not used.
5403                   </p></dd>
5404 <dt><span class="term"><span><strong class="command">ixfr-base</strong></span></span></dt>
5405 <dd><p>
5406                     Was used in <acronym class="acronym">BIND</acronym> 8 to
5407                     specify the name
5408                     of the transaction log (journal) file for dynamic update
5409                     and IXFR.
5410                     <acronym class="acronym">BIND</acronym> 9 ignores the option
5411                     and constructs the name of the journal
5412                     file by appending "<code class="filename">.jnl</code>"
5413                     to the name of the
5414                     zone file.
5415                   </p></dd>
5416 <dt><span class="term"><span><strong class="command">ixfr-tmp-file</strong></span></span></dt>
5417 <dd><p>
5418                     Was an undocumented option in <acronym class="acronym">BIND</acronym> 8.
5419                     Ignored in <acronym class="acronym">BIND</acronym> 9.
5420                   </p></dd>
5421 <dt><span class="term"><span><strong class="command">journal</strong></span></span></dt>
5422 <dd><p>
5423                     Allow the default journal's filename to be overridden.
5424                     The default is the zone's filename with "<code class="filename">.jnl</code>" appended.
5425                     This is applicable to <span><strong class="command">master</strong></span> and <span><strong class="command">slave</strong></span> zones.
5426                   </p></dd>
5427 <dt><span class="term"><span><strong class="command">max-transfer-time-in</strong></span></span></dt>
5428 <dd><p>
5429                     See the description of
5430                     <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>.
5431                   </p></dd>
5432 <dt><span class="term"><span><strong class="command">max-transfer-idle-in</strong></span></span></dt>
5433 <dd><p>
5434                     See the description of
5435                     <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>.
5436                   </p></dd>
5437 <dt><span class="term"><span><strong class="command">max-transfer-time-out</strong></span></span></dt>
5438 <dd><p>
5439                     See the description of
5440                     <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>.
5441                   </p></dd>
5442 <dt><span class="term"><span><strong class="command">max-transfer-idle-out</strong></span></span></dt>
5443 <dd><p>
5444                     See the description of
5445                     <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>.
5446                   </p></dd>
5447 <dt><span class="term"><span><strong class="command">notify</strong></span></span></dt>
5448 <dd><p>
5449                     See the description of
5450                     <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>.
5451                   </p></dd>
5452 <dt><span class="term"><span><strong class="command">notify-delay</strong></span></span></dt>
5453 <dd><p>
5454                     See the description of
5455                     <span><strong class="command">notify-delay</strong></span> in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
5456                   </p></dd>
5457 <dt><span class="term"><span><strong class="command">pubkey</strong></span></span></dt>
5458 <dd><p>
5459                     In <acronym class="acronym">BIND</acronym> 8, this option was
5460                     intended for specifying
5461                     a public zone key for verification of signatures in DNSSEC
5462                     signed
5463                     zones when they are loaded from disk. <acronym class="acronym">BIND</acronym> 9 does not verify signatures
5464                     on load and ignores the option.
5465                   </p></dd>
5466 <dt><span class="term"><span><strong class="command">zone-statistics</strong></span></span></dt>
5467 <dd><p>
5468                     If <strong class="userinput"><code>yes</code></strong>, the server will keep
5469                     statistical
5470                     information for this zone, which can be dumped to the
5471                     <span><strong class="command">statistics-file</strong></span> defined in
5472                     the server options.
5473                   </p></dd>
5474 <dt><span class="term"><span><strong class="command">sig-validity-interval</strong></span></span></dt>
5475 <dd><p>
5476                     See the description of
5477                     <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>.
5478                   </p></dd>
5479 <dt><span class="term"><span><strong class="command">transfer-source</strong></span></span></dt>
5480 <dd><p>
5481                     See the description of
5482                     <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>.
5483                   </p></dd>
5484 <dt><span class="term"><span><strong class="command">transfer-source-v6</strong></span></span></dt>
5485 <dd><p>
5486                     See the description of
5487                     <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>.
5488                   </p></dd>
5489 <dt><span class="term"><span><strong class="command">alt-transfer-source</strong></span></span></dt>
5490 <dd><p>
5491                     See the description of
5492                     <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>.
5493                   </p></dd>
5494 <dt><span class="term"><span><strong class="command">alt-transfer-source-v6</strong></span></span></dt>
5495 <dd><p>
5496                     See the description of
5497                     <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>.
5498                   </p></dd>
5499 <dt><span class="term"><span><strong class="command">use-alt-transfer-source</strong></span></span></dt>
5500 <dd><p>
5501                     See the description of
5502                     <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>.
5503                   </p></dd>
5504 <dt><span class="term"><span><strong class="command">notify-source</strong></span></span></dt>
5505 <dd><p>
5506                     See the description of
5507                     <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>.
5508                   </p></dd>
5509 <dt><span class="term"><span><strong class="command">notify-source-v6</strong></span></span></dt>
5510 <dd><p>
5511                     See the description of
5512                     <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>.
5513                   </p></dd>
5514 <dt>
5515 <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>
5516 </dt>
5517 <dd><p>
5518                     See the description in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
5519                   </p></dd>
5520 <dt><span class="term"><span><strong class="command">ixfr-from-differences</strong></span></span></dt>
5521 <dd><p>
5522                     See the description of
5523                     <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>.
5524                   </p></dd>
5525 <dt><span class="term"><span><strong class="command">key-directory</strong></span></span></dt>
5526 <dd><p>
5527                     See the description of
5528                     <span><strong class="command">key-directory</strong></span> in <a href="Bv9ARM.ch06.html#options" title="options Statement Definition and
5529           Usage">the section called &#8220;<span><strong class="command">options</strong></span> Statement Definition and
5530           Usage&#8221;</a>.
5531                   </p></dd>
5532 <dt><span class="term"><span><strong class="command">multi-master</strong></span></span></dt>
5533 <dd><p>
5534                     See the description of <span><strong class="command">multi-master</strong></span> in
5535                     <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called &#8220;Boolean Options&#8221;</a>.
5536                   </p></dd>
5537 <dt><span class="term"><span><strong class="command">masterfile-format</strong></span></span></dt>
5538 <dd><p>
5539                     See the description of <span><strong class="command">masterfile-format</strong></span>
5540                     in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called &#8220;Tuning&#8221;</a>.
5541                   </p></dd>
5542 </dl></div>
5543 </div>
5544 <div class="sect3" lang="en">
5545 <div class="titlepage"><div><div><h4 class="title">
5546 <a name="dynamic_update_policies"></a>Dynamic Update Policies</h4></div></div></div>
5547 <p>
5548               <acronym class="acronym">BIND</acronym> 9 supports two alternative
5549               methods of granting clients
5550               the right to perform dynamic updates to a zone,
5551               configured by the <span><strong class="command">allow-update</strong></span>
5552               and
5553               <span><strong class="command">update-policy</strong></span> option,
5554               respectively.
5555             </p>
5556 <p>
5557               The <span><strong class="command">allow-update</strong></span> clause works the
5558               same
5559               way as in previous versions of <acronym class="acronym">BIND</acronym>. It grants given clients the
5560               permission to update any record of any name in the zone.
5561             </p>
5562 <p>
5563               The <span><strong class="command">update-policy</strong></span> clause is new
5564               in <acronym class="acronym">BIND</acronym>
5565               9 and allows more fine-grained control over what updates are
5566               allowed.
5567               A set of rules is specified, where each rule either grants or
5568               denies
5569               permissions for one or more names to be updated by one or more
5570               identities.
5571               If the dynamic update request message is signed (that is, it
5572               includes
5573               either a TSIG or SIG(0) record), the identity of the signer can
5574               be determined.
5575             </p>
5576 <p>
5577               Rules are specified in the <span><strong class="command">update-policy</strong></span> zone
5578               option, and are only meaningful for master zones.  When the <span><strong class="command">update-policy</strong></span> statement
5579               is present, it is a configuration error for the <span><strong class="command">allow-update</strong></span> statement
5580               to be present.  The <span><strong class="command">update-policy</strong></span>
5581               statement only
5582               examines the signer of a message; the source address is not
5583               relevant.
5584             </p>
5585 <p>
5586               This is how a rule definition looks:
5587             </p>
5588 <pre class="programlisting">
5589 ( <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> <em class="replaceable"><code>name</code></em> [<span class="optional"> <em class="replaceable"><code>types</code></em> </span>]
5590 </pre>
5591 <p>
5592               Each rule grants or denies privileges.  Once a message has
5593               successfully matched a rule, the operation is immediately
5594               granted
5595               or denied and no further rules are examined.  A rule is matched
5596               when the signer matches the identity field, the name matches the
5597               name field in accordance with the nametype field, and the type
5598               matches
5599               the types specified in the type field.
5600             </p>
5601 <p>
5602               The identity field specifies a name or a wildcard name.
5603               Normally, this
5604               is the name of the TSIG or SIG(0) key used to sign the update
5605               request.  When a
5606               TKEY exchange has been used to create a shared secret, the
5607               identity of the
5608               shared secret is the same as the identity of the key used to
5609               authenticate the
5610               TKEY exchange.  When the <em class="replaceable"><code>identity</code></em> field specifies a
5611               wildcard name, it is subject to DNS wildcard expansion, so the
5612               rule will apply
5613               to multiple identities.  The <em class="replaceable"><code>identity</code></em> field must
5614               contain a fully-qualified domain name.
5615             </p>
5616 <p>
5617               The <em class="replaceable"><code>nametype</code></em> field has 6
5618               values:
5619               <code class="varname">name</code>, <code class="varname">subdomain</code>,
5620               <code class="varname">wildcard</code>, <code class="varname">self</code>,
5621                <code class="varname">selfsub</code>, and <code class="varname">selfwild</code>.
5622             </p>
5623 <div class="informaltable"><table border="1">
5624 <colgroup>
5625 <col>
5626 <col>
5627 </colgroup>
5628 <tbody>
5629 <tr>
5630 <td>
5631                       <p>
5632                         <code class="varname">name</code>
5633                       </p>
5634                     </td>
5635 <td>
5636                       <p>
5637                         Exact-match semantics.  This rule matches
5638                         when the name being updated is identical
5639                         to the contents of the
5640                         <em class="replaceable"><code>name</code></em> field.
5641                       </p>
5642                     </td>
5643 </tr>
5644 <tr>
5645 <td>
5646                       <p>
5647                         <code class="varname">subdomain</code>
5648                       </p>
5649                     </td>
5650 <td>
5651                       <p>
5652                         This rule matches when the name being updated
5653                         is a subdomain of, or identical to, the
5654                         contents of the <em class="replaceable"><code>name</code></em>
5655                         field.
5656                       </p>
5657                     </td>
5658 </tr>
5659 <tr>
5660 <td>
5661                       <p>
5662                         <code class="varname">wildcard</code>
5663                       </p>
5664                     </td>
5665 <td>
5666                       <p>
5667                         The <em class="replaceable"><code>name</code></em> field
5668                         is subject to DNS wildcard expansion, and
5669                         this rule matches when the name being updated
5670                         name is a valid expansion of the wildcard.
5671                       </p>
5672                     </td>
5673 </tr>
5674 <tr>
5675 <td>
5676                       <p>
5677                         <code class="varname">self</code>
5678                       </p>
5679                     </td>
5680 <td>
5681                       <p>
5682                         This rule matches when the name being updated
5683                         matches the contents of the
5684                         <em class="replaceable"><code>identity</code></em> field.
5685                         The <em class="replaceable"><code>name</code></em> field
5686                         is ignored, but should be the same as the
5687                         <em class="replaceable"><code>identity</code></em> field.
5688                         The <code class="varname">self</code> nametype is
5689                         most useful when allowing using one key per
5690                         name to update, where the key has the same
5691                         name as the name to be updated.  The
5692                         <em class="replaceable"><code>identity</code></em> would
5693                         be specified as <code class="constant">*</code> (an asterisk) in
5694                         this case.
5695                       </p>
5696                     </td>
5697 </tr>
5698 <tr>
5699 <td>
5700                       <p>
5701                         <code class="varname">selfsub</code>
5702                       </p>
5703                     </td>
5704 <td>
5705                       <p>
5706                         This rule is similar to <code class="varname">self</code>
5707                         except that subdomains of <code class="varname">self</code>
5708                         can also be updated.
5709                       </p>
5710                     </td>
5711 </tr>
5712 <tr>
5713 <td>
5714                       <p>
5715                         <code class="varname">selfwild</code>
5716                       </p>
5717                     </td>
5718 <td>
5719                       <p>
5720                         This rule is similar to <code class="varname">self</code>
5721                         except that only subdomains of
5722                         <code class="varname">self</code> can be updated.
5723                       </p>
5724                     </td>
5725 </tr>
5726 </tbody>
5727 </table></div>
5728 <p>
5729               In all cases, the <em class="replaceable"><code>name</code></em>
5730               field must
5731               specify a fully-qualified domain name.
5732             </p>
5733 <p>
5734               If no types are explicitly specified, this rule matches all
5735               types except
5736               RRSIG, NS, SOA, and NSEC. Types may be specified by name, including
5737               "ANY" (ANY matches all types except NSEC, which can never be
5738               updated).
5739               Note that when an attempt is made to delete all records
5740               associated with a
5741               name, the rules are checked for each existing record type.
5742             </p>
5743 </div>
5744 </div>
5745 </div>
5746 <div class="sect1" lang="en">
5747 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
5748 <a name="id2589477"></a>Zone File</h2></div></div></div>
5749 <div class="sect2" lang="en">
5750 <div class="titlepage"><div><div><h3 class="title">
5751 <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>
5752 <p>
5753             This section, largely borrowed from RFC 1034, describes the
5754             concept of a Resource Record (RR) and explains when each is used.
5755             Since the publication of RFC 1034, several new RRs have been
5756             identified
5757             and implemented in the DNS. These are also included.
5758           </p>
5759 <div class="sect3" lang="en">
5760 <div class="titlepage"><div><div><h4 class="title">
5761 <a name="id2589495"></a>Resource Records</h4></div></div></div>
5762 <p>
5763               A domain name identifies a node.  Each node has a set of
5764               resource information, which may be empty.  The set of resource
5765               information associated with a particular name is composed of
5766               separate RRs. The order of RRs in a set is not significant and
5767               need not be preserved by name servers, resolvers, or other
5768               parts of the DNS. However, sorting of multiple RRs is
5769               permitted for optimization purposes, for example, to specify
5770               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>.
5771             </p>
5772 <p>
5773               The components of a Resource Record are:
5774             </p>
5775 <div class="informaltable"><table border="1">
5776 <colgroup>
5777 <col>
5778 <col>
5779 </colgroup>
5780 <tbody>
5781 <tr>
5782 <td>
5783                       <p>
5784                         owner name
5785                       </p>
5786                     </td>
5787 <td>
5788                       <p>
5789                         The domain name where the RR is found.
5790                       </p>
5791                     </td>
5792 </tr>
5793 <tr>
5794 <td>
5795                       <p>
5796                         type
5797                       </p>
5798                     </td>
5799 <td>
5800                       <p>
5801                         An encoded 16-bit value that specifies
5802                         the type of the resource record.
5803                       </p>
5804                     </td>
5805 </tr>
5806 <tr>
5807 <td>
5808                       <p>
5809                         TTL
5810                       </p>
5811                     </td>
5812 <td>
5813                       <p>
5814                         The time-to-live of the RR. This field
5815                         is a 32-bit integer in units of seconds, and is
5816                         primarily used by
5817                         resolvers when they cache RRs. The TTL describes how
5818                         long a RR can
5819                         be cached before it should be discarded.
5820                       </p>
5821                     </td>
5822 </tr>
5823 <tr>
5824 <td>
5825                       <p>
5826                         class
5827                       </p>
5828                     </td>
5829 <td>
5830                       <p>
5831                         An encoded 16-bit value that identifies
5832                         a protocol family or instance of a protocol.
5833                       </p>
5834                     </td>
5835 </tr>
5836 <tr>
5837 <td>
5838                       <p>
5839                         RDATA
5840                       </p>
5841                     </td>
5842 <td>
5843                       <p>
5844                         The resource data.  The format of the
5845                         data is type (and sometimes class) specific.
5846                       </p>
5847                     </td>
5848 </tr>
5849 </tbody>
5850 </table></div>
5851 <p>
5852               The following are <span class="emphasis"><em>types</em></span> of valid RRs:
5853             </p>
5854 <div class="informaltable"><table border="1">
5855 <colgroup>
5856 <col>
5857 <col>
5858 </colgroup>
5859 <tbody>
5860 <tr>
5861 <td>
5862                       <p>
5863                         A
5864                       </p>
5865                     </td>
5866 <td>
5867                       <p>
5868                         A host address.  In the IN class, this is a
5869                         32-bit IP address.  Described in RFC 1035.
5870                       </p>
5871                     </td>
5872 </tr>
5873 <tr>
5874 <td>
5875                       <p>
5876                         AAAA
5877                       </p>
5878                     </td>
5879 <td>
5880                       <p>
5881                         IPv6 address.  Described in RFC 1886.
5882                       </p>
5883                     </td>
5884 </tr>
5885 <tr>
5886 <td>
5887                       <p>
5888                         A6
5889                       </p>
5890                     </td>
5891 <td>
5892                       <p>
5893                         IPv6 address.  This can be a partial
5894                         address (a suffix) and an indirection to the name
5895                         where the rest of the
5896                         address (the prefix) can be found.  Experimental.
5897                         Described in RFC 2874.
5898                       </p>
5899                     </td>
5900 </tr>
5901 <tr>
5902 <td>
5903                       <p>
5904                         AFSDB
5905                       </p>
5906                     </td>
5907 <td>
5908                       <p>
5909                         Location of AFS database servers.
5910                         Experimental.  Described in RFC 1183.
5911                       </p>
5912                     </td>
5913 </tr>
5914 <tr>
5915 <td>
5916                       <p>
5917                         APL
5918                       </p>
5919                     </td>
5920 <td>
5921                       <p>
5922                         Address prefix list.  Experimental.
5923                         Described in RFC 3123.
5924                       </p>
5925                     </td>
5926 </tr>
5927 <tr>
5928 <td>
5929                       <p>
5930                         CERT
5931                       </p>
5932                     </td>
5933 <td>
5934                       <p>
5935                         Holds a digital certificate.
5936                         Described in RFC 2538.
5937                       </p>
5938                     </td>
5939 </tr>
5940 <tr>
5941 <td>
5942                       <p>
5943                         CNAME
5944                       </p>
5945                     </td>
5946 <td>
5947                       <p>
5948                         Identifies the canonical name of an alias.
5949                         Described in RFC 1035.
5950                       </p>
5951                     </td>
5952 </tr>
5953 <tr>
5954 <td>
5955                       <p>
5956                         DNAME
5957                       </p>
5958                     </td>
5959 <td>
5960                       <p>
5961                         Replaces the domain name specified with
5962                         another name to be looked up, effectively aliasing an
5963                         entire
5964                         subtree of the domain name space rather than a single
5965                         record
5966                         as in the case of the CNAME RR.
5967                         Described in RFC 2672.
5968                       </p>
5969                     </td>
5970 </tr>
5971 <tr>
5972 <td>
5973                       <p>
5974                         DNSKEY
5975                       </p>
5976                     </td>
5977 <td>
5978                       <p>
5979                         Stores a public key associated with a signed
5980                         DNS zone.  Described in RFC 4034.
5981                       </p>
5982                     </td>
5983 </tr>
5984 <tr>
5985 <td>
5986                       <p>
5987                         DS
5988                       </p>
5989                     </td>
5990 <td>
5991                       <p>
5992                         Stores the hash of a public key associated with a
5993                         signed DNS zone.  Described in RFC 4034.
5994                       </p>
5995                     </td>
5996 </tr>
5997 <tr>
5998 <td>
5999                       <p>
6000                         GPOS
6001                       </p>
6002                     </td>
6003 <td>
6004                       <p>
6005                         Specifies the global position.  Superseded by LOC.
6006                       </p>
6007                     </td>
6008 </tr>
6009 <tr>
6010 <td>
6011                       <p>
6012                         HINFO
6013                       </p>
6014                     </td>
6015 <td>
6016                       <p>
6017                         Identifies the CPU and OS used by a host.
6018                         Described in RFC 1035.
6019                       </p>
6020                     </td>
6021 </tr>
6022 <tr>
6023 <td>
6024                       <p>
6025                         IPSECKEY
6026                       </p>
6027                     </td>
6028 <td>
6029                       <p>
6030                         Provides a method for storing IPsec keying material in
6031                         DNS.  Described in RFC 4025.
6032                       </p>
6033                     </td>
6034 </tr>
6035 <tr>
6036 <td>
6037                       <p>
6038                         ISDN
6039                       </p>
6040                     </td>
6041 <td>
6042                       <p>
6043                         Representation of ISDN addresses.
6044                         Experimental.  Described in RFC 1183.
6045                       </p>
6046                     </td>
6047 </tr>
6048 <tr>
6049 <td>
6050                       <p>
6051                         KEY
6052                       </p>
6053                     </td>
6054 <td>
6055                       <p>
6056                         Stores a public key associated with a
6057                         DNS name.  Used in original DNSSEC; replaced
6058                         by DNSKEY in DNSSECbis, but still used with
6059                         SIG(0).  Described in RFCs 2535 and 2931.
6060                       </p>
6061                     </td>
6062 </tr>
6063 <tr>
6064 <td>
6065                       <p>
6066                         KX
6067                       </p>
6068                     </td>
6069 <td>
6070                       <p>
6071                         Identifies a key exchanger for this
6072                         DNS name.  Described in RFC 2230.
6073                       </p>
6074                     </td>
6075 </tr>
6076 <tr>
6077 <td>
6078                       <p>
6079                         LOC
6080                       </p>
6081                     </td>
6082 <td>
6083                       <p>
6084                         For storing GPS info.  Described in RFC 1876.
6085                         Experimental.
6086                       </p>
6087                     </td>
6088 </tr>
6089 <tr>
6090 <td>
6091                       <p>
6092                         MX
6093                       </p>
6094                     </td>
6095 <td>
6096                       <p>
6097                         Identifies a mail exchange for the domain with
6098                         a 16-bit preference value (lower is better)
6099                         followed by the host name of the mail exchange.
6100                         Described in RFC 974, RFC 1035.
6101                       </p>
6102                     </td>
6103 </tr>
6104 <tr>
6105 <td>
6106                       <p>
6107                         NAPTR
6108                       </p>
6109                     </td>
6110 <td>
6111                       <p>
6112                         Name authority pointer.  Described in RFC 2915.
6113                       </p>
6114                     </td>
6115 </tr>
6116 <tr>
6117 <td>
6118                       <p>
6119                         NSAP
6120                       </p>
6121                     </td>
6122 <td>
6123                       <p>
6124                         A network service access point.
6125                         Described in RFC 1706.
6126                       </p>
6127                     </td>
6128 </tr>
6129 <tr>
6130 <td>
6131                       <p>
6132                         NS
6133                       </p>
6134                     </td>
6135 <td>
6136                       <p>
6137                         The authoritative name server for the
6138                         domain.  Described in RFC 1035.
6139                       </p>
6140                     </td>
6141 </tr>
6142 <tr>
6143 <td>
6144                       <p>
6145                         NSEC
6146                       </p>
6147                     </td>
6148 <td>
6149                       <p>
6150                         Used in DNSSECbis to securely indicate that
6151                         RRs with an owner name in a certain name interval do
6152                         not exist in
6153                         a zone and indicate what RR types are present for an
6154                         existing name.
6155                         Described in RFC 4034.
6156                       </p>
6157                     </td>
6158 </tr>
6159 <tr>
6160 <td>
6161                       <p>
6162                         NXT
6163                       </p>
6164                     </td>
6165 <td>
6166                       <p>
6167                         Used in DNSSEC to securely indicate that
6168                         RRs with an owner name in a certain name interval do
6169                         not exist in
6170                         a zone and indicate what RR types are present for an
6171                         existing name.
6172                         Used in original DNSSEC; replaced by NSEC in
6173                         DNSSECbis.
6174                         Described in RFC 2535.
6175                       </p>
6176                     </td>
6177 </tr>
6178 <tr>
6179 <td>
6180                       <p>
6181                         PTR
6182                       </p>
6183                     </td>
6184 <td>
6185                       <p>
6186                         A pointer to another part of the domain
6187                         name space.  Described in RFC 1035.
6188                       </p>
6189                     </td>
6190 </tr>
6191 <tr>
6192 <td>
6193                       <p>
6194                         PX
6195                       </p>
6196                     </td>
6197 <td>
6198                       <p>
6199                         Provides mappings between RFC 822 and X.400
6200                         addresses.  Described in RFC 2163.
6201                       </p>
6202                     </td>
6203 </tr>
6204 <tr>
6205 <td>
6206                       <p>
6207                         RP
6208                       </p>
6209                     </td>
6210 <td>
6211                       <p>
6212                         Information on persons responsible
6213                         for the domain.  Experimental.  Described in RFC 1183.
6214                       </p>
6215                     </td>
6216 </tr>
6217 <tr>
6218 <td>
6219                       <p>
6220                         RRSIG
6221                       </p>
6222                     </td>
6223 <td>
6224                       <p>
6225                         Contains DNSSECbis signature data.  Described
6226                         in RFC 4034.
6227                       </p>
6228                     </td>
6229 </tr>
6230 <tr>
6231 <td>
6232                       <p>
6233                         RT
6234                       </p>
6235                     </td>
6236 <td>
6237                       <p>
6238                         Route-through binding for hosts that
6239                         do not have their own direct wide area network
6240                         addresses.
6241                         Experimental.  Described in RFC 1183.
6242                       </p>
6243                     </td>
6244 </tr>
6245 <tr>
6246 <td>
6247                       <p>
6248                         SIG
6249                       </p>
6250                     </td>
6251 <td>
6252                       <p>
6253                         Contains DNSSEC signature data.  Used in
6254                         original DNSSEC; replaced by RRSIG in
6255                         DNSSECbis, but still used for SIG(0).
6256                         Described in RFCs 2535 and 2931.
6257                       </p>
6258                     </td>
6259 </tr>
6260 <tr>
6261 <td>
6262                       <p>
6263                         SOA
6264                       </p>
6265                     </td>
6266 <td>
6267                       <p>
6268                         Identifies the start of a zone of authority.
6269                         Described in RFC 1035.
6270                       </p>
6271                     </td>
6272 </tr>
6273 <tr>
6274 <td>
6275                       <p>
6276                         SPF
6277                       </p>
6278                     </td>
6279 <td>
6280                       <p>
6281                         Contains the Sender Policy Framework information
6282                         for a given email domain.  Described in RFC 4408.
6283                       </p>
6284                     </td>
6285 </tr>
6286 <tr>
6287 <td>
6288                       <p>
6289                         SRV
6290                       </p>
6291                     </td>
6292 <td>
6293                       <p>
6294                         Information about well known network
6295                         services (replaces WKS).  Described in RFC 2782.
6296                       </p>
6297                     </td>
6298 </tr>
6299 <tr>
6300 <td>
6301                       <p>
6302                         SSHFP
6303                       </p>
6304                     </td>
6305 <td>
6306                       <p>
6307                         Provides a way to securly publish a secure shell key's
6308                         fingerprint.  Described in RFC 4255.
6309                       </p>
6310                     </td>
6311 </tr>
6312 <tr>
6313 <td>
6314                       <p>
6315                         TXT
6316                       </p>
6317                     </td>
6318 <td>
6319                       <p>
6320                         Text records.  Described in RFC 1035.
6321                       </p>
6322                     </td>
6323 </tr>
6324 <tr>
6325 <td>
6326                       <p>
6327                         WKS
6328                       </p>
6329                     </td>
6330 <td>
6331                       <p>
6332                         Information about which well known
6333                         network services, such as SMTP, that a domain
6334                         supports. Historical.
6335                       </p>
6336                     </td>
6337 </tr>
6338 <tr>
6339 <td>
6340                       <p>
6341                         X25
6342                       </p>
6343                     </td>
6344 <td>
6345                       <p>
6346                         Representation of X.25 network addresses.
6347                         Experimental.  Described in RFC 1183.
6348                       </p>
6349                     </td>
6350 </tr>
6351 </tbody>
6352 </table></div>
6353 <p>
6354               The following <span class="emphasis"><em>classes</em></span> of resource records
6355               are currently valid in the DNS:
6356             </p>
6357 <div class="informaltable"><table border="1">
6358 <colgroup>
6359 <col>
6360 <col>
6361 </colgroup>
6362 <tbody>
6363 <tr>
6364 <td>
6365                       <p>
6366                         IN
6367                       </p>
6368                     </td>
6369 <td>
6370                       <p>
6371                         The Internet.
6372                       </p>
6373                     </td>
6374 </tr>
6375 <tr>
6376 <td>
6377                       <p>
6378                         CH
6379                       </p>
6380                     </td>
6381 <td>
6382                       <p>
6383                         Chaosnet, a LAN protocol created at MIT in the
6384                         mid-1970s.
6385                         Rarely used for its historical purpose, but reused for
6386                         BIND's
6387                         built-in server information zones, e.g.,
6388                         <code class="literal">version.bind</code>.
6389                       </p>
6390                     </td>
6391 </tr>
6392 <tr>
6393 <td>
6394                       <p>
6395                         HS
6396                       </p>
6397                     </td>
6398 <td>
6399                       <p>
6400                         Hesiod, an information service
6401                         developed by MIT's Project Athena. It is used to share
6402                         information
6403                         about various systems databases, such as users,
6404                         groups, printers
6405                         and so on.
6406                       </p>
6407                     </td>
6408 </tr>
6409 </tbody>
6410 </table></div>
6411 <p>
6412               The owner name is often implicit, rather than forming an
6413               integral
6414               part of the RR.  For example, many name servers internally form
6415               tree
6416               or hash structures for the name space, and chain RRs off nodes.
6417               The remaining RR parts are the fixed header (type, class, TTL)
6418               which is consistent for all RRs, and a variable part (RDATA)
6419               that
6420               fits the needs of the resource being described.
6421             </p>
6422 <p>
6423               The meaning of the TTL field is a time limit on how long an
6424               RR can be kept in a cache.  This limit does not apply to
6425               authoritative
6426               data in zones; it is also timed out, but by the refreshing
6427               policies
6428               for the zone.  The TTL is assigned by the administrator for the
6429               zone where the data originates.  While short TTLs can be used to
6430               minimize caching, and a zero TTL prohibits caching, the
6431               realities
6432               of Internet performance suggest that these times should be on
6433               the
6434               order of days for the typical host.  If a change can be
6435               anticipated,
6436               the TTL can be reduced prior to the change to minimize
6437               inconsistency
6438               during the change, and then increased back to its former value
6439               following
6440               the change.
6441             </p>
6442 <p>
6443               The data in the RDATA section of RRs is carried as a combination
6444               of binary strings and domain names.  The domain names are
6445               frequently
6446               used as "pointers" to other data in the DNS.
6447             </p>
6448 </div>
6449 <div class="sect3" lang="en">
6450 <div class="titlepage"><div><div><h4 class="title">
6451 <a name="id2590912"></a>Textual expression of RRs</h4></div></div></div>
6452 <p>
6453               RRs are represented in binary form in the packets of the DNS
6454               protocol, and are usually represented in highly encoded form
6455               when
6456               stored in a name server or resolver.  In the examples provided
6457               in
6458               RFC 1034, a style similar to that used in master files was
6459               employed
6460               in order to show the contents of RRs.  In this format, most RRs
6461               are shown on a single line, although continuation lines are
6462               possible
6463               using parentheses.
6464             </p>
6465 <p>
6466               The start of the line gives the owner of the RR.  If a line
6467               begins with a blank, then the owner is assumed to be the same as
6468               that of the previous RR.  Blank lines are often included for
6469               readability.
6470             </p>
6471 <p>
6472               Following the owner, we list the TTL, type, and class of the
6473               RR.  Class and type use the mnemonics defined above, and TTL is
6474               an integer before the type field.  In order to avoid ambiguity
6475               in
6476               parsing, type and class mnemonics are disjoint, TTLs are
6477               integers,
6478               and the type mnemonic is always last. The IN class and TTL
6479               values
6480               are often omitted from examples in the interests of clarity.
6481             </p>
6482 <p>
6483               The resource data or RDATA section of the RR are given using
6484               knowledge of the typical representation for the data.
6485             </p>
6486 <p>
6487               For example, we might show the RRs carried in a message as:
6488             </p>
6489 <div class="informaltable"><table border="1">
6490 <colgroup>
6491 <col>
6492 <col>
6493 <col>
6494 </colgroup>
6495 <tbody>
6496 <tr>
6497 <td>
6498                       <p>
6499                         <code class="literal">ISI.EDU.</code>
6500                       </p>
6501                     </td>
6502 <td>
6503                       <p>
6504                         <code class="literal">MX</code>
6505                       </p>
6506                     </td>
6507 <td>
6508                       <p>
6509                         <code class="literal">10 VENERA.ISI.EDU.</code>
6510                       </p>
6511                     </td>
6512 </tr>
6513 <tr>
6514 <td>
6515                       <p></p>
6516                     </td>
6517 <td>
6518                       <p>
6519                         <code class="literal">MX</code>
6520                       </p>
6521                     </td>
6522 <td>
6523                       <p>
6524                         <code class="literal">10 VAXA.ISI.EDU</code>
6525                       </p>
6526                     </td>
6527 </tr>
6528 <tr>
6529 <td>
6530                       <p>
6531                         <code class="literal">VENERA.ISI.EDU</code>
6532                       </p>
6533                     </td>
6534 <td>
6535                       <p>
6536                         <code class="literal">A</code>
6537                       </p>
6538                     </td>
6539 <td>
6540                       <p>
6541                         <code class="literal">128.9.0.32</code>
6542                       </p>
6543                     </td>
6544 </tr>
6545 <tr>
6546 <td>
6547                       <p></p>
6548                     </td>
6549 <td>
6550                       <p>
6551                         <code class="literal">A</code>
6552                       </p>
6553                     </td>
6554 <td>
6555                       <p>
6556                         <code class="literal">10.1.0.52</code>
6557                       </p>
6558                     </td>
6559 </tr>
6560 <tr>
6561 <td>
6562                       <p>
6563                         <code class="literal">VAXA.ISI.EDU</code>
6564                       </p>
6565                     </td>
6566 <td>
6567                       <p>
6568                         <code class="literal">A</code>
6569                       </p>
6570                     </td>
6571 <td>
6572                       <p>
6573                         <code class="literal">10.2.0.27</code>
6574                       </p>
6575                     </td>
6576 </tr>
6577 <tr>
6578 <td>
6579                       <p></p>
6580                     </td>
6581 <td>
6582                       <p>
6583                         <code class="literal">A</code>
6584                       </p>
6585                     </td>
6586 <td>
6587                       <p>
6588                         <code class="literal">128.9.0.33</code>
6589                       </p>
6590                     </td>
6591 </tr>
6592 </tbody>
6593 </table></div>
6594 <p>
6595               The MX RRs have an RDATA section which consists of a 16-bit
6596               number followed by a domain name.  The address RRs use a
6597               standard
6598               IP address format to contain a 32-bit internet address.
6599             </p>
6600 <p>
6601               The above example shows six RRs, with two RRs at each of three
6602               domain names.
6603             </p>
6604 <p>
6605               Similarly we might see:
6606             </p>
6607 <div class="informaltable"><table border="1">
6608 <colgroup>
6609 <col>
6610 <col>
6611 <col>
6612 </colgroup>
6613 <tbody>
6614 <tr>
6615 <td>
6616                       <p>
6617                         <code class="literal">XX.LCS.MIT.EDU.</code>
6618                       </p>
6619                     </td>
6620 <td>
6621                       <p>
6622                         <code class="literal">IN A</code>
6623                       </p>
6624                     </td>
6625 <td>
6626                       <p>
6627                         <code class="literal">10.0.0.44</code>
6628                       </p>
6629                     </td>
6630 </tr>
6631 <tr>
6632 <td> </td>
6633 <td>
6634                       <p>
6635                         <code class="literal">CH A</code>
6636                       </p>
6637                     </td>
6638 <td>
6639                       <p>
6640                         <code class="literal">MIT.EDU. 2420</code>
6641                       </p>
6642                     </td>
6643 </tr>
6644 </tbody>
6645 </table></div>
6646 <p>
6647               This example shows two addresses for
6648               <code class="literal">XX.LCS.MIT.EDU</code>, each of a different class.
6649             </p>
6650 </div>
6651 </div>
6652 <div class="sect2" lang="en">
6653 <div class="titlepage"><div><div><h3 class="title">
6654 <a name="id2591500"></a>Discussion of MX Records</h3></div></div></div>
6655 <p>
6656             As described above, domain servers store information as a
6657             series of resource records, each of which contains a particular
6658             piece of information about a given domain name (which is usually,
6659             but not always, a host). The simplest way to think of a RR is as
6660             a typed pair of data, a domain name matched with a relevant datum,
6661             and stored with some additional type information to help systems
6662             determine when the RR is relevant.
6663           </p>
6664 <p>
6665             MX records are used to control delivery of email. The data
6666             specified in the record is a priority and a domain name. The
6667             priority
6668             controls the order in which email delivery is attempted, with the
6669             lowest number first. If two priorities are the same, a server is
6670             chosen randomly. If no servers at a given priority are responding,
6671             the mail transport agent will fall back to the next largest
6672             priority.
6673             Priority numbers do not have any absolute meaning &#8212; they are
6674             relevant
6675             only respective to other MX records for that domain name. The
6676             domain
6677             name given is the machine to which the mail will be delivered.
6678             It <span class="emphasis"><em>must</em></span> have an associated address record
6679             (A or AAAA) &#8212; CNAME is not sufficient.
6680           </p>
6681 <p>
6682             For a given domain, if there is both a CNAME record and an
6683             MX record, the MX record is in error, and will be ignored.
6684             Instead,
6685             the mail will be delivered to the server specified in the MX
6686             record
6687             pointed to by the CNAME.
6688           </p>
6689 <p>
6690             For example:
6691           </p>
6692 <div class="informaltable"><table border="1">
6693 <colgroup>
6694 <col>
6695 <col>
6696 <col>
6697 <col>
6698 <col>
6699 </colgroup>
6700 <tbody>
6701 <tr>
6702 <td>
6703                     <p>
6704                       <code class="literal">example.com.</code>
6705                     </p>
6706                   </td>
6707 <td>
6708                     <p>
6709                       <code class="literal">IN</code>
6710                     </p>
6711                   </td>
6712 <td>
6713                     <p>
6714                       <code class="literal">MX</code>
6715                     </p>
6716                   </td>
6717 <td>
6718                     <p>
6719                       <code class="literal">10</code>
6720                     </p>
6721                   </td>
6722 <td>
6723                     <p>
6724                       <code class="literal">mail.example.com.</code>
6725                     </p>
6726                   </td>
6727 </tr>
6728 <tr>
6729 <td>
6730                     <p></p>
6731                   </td>
6732 <td>
6733                     <p>
6734                       <code class="literal">IN</code>
6735                     </p>
6736                   </td>
6737 <td>
6738                     <p>
6739                       <code class="literal">MX</code>
6740                     </p>
6741                   </td>
6742 <td>
6743                     <p>
6744                       <code class="literal">10</code>
6745                     </p>
6746                   </td>
6747 <td>
6748                     <p>
6749                       <code class="literal">mail2.example.com.</code>
6750                     </p>
6751                   </td>
6752 </tr>
6753 <tr>
6754 <td>
6755                     <p></p>
6756                   </td>
6757 <td>
6758                     <p>
6759                       <code class="literal">IN</code>
6760                     </p>
6761                   </td>
6762 <td>
6763                     <p>
6764                       <code class="literal">MX</code>
6765                     </p>
6766                   </td>
6767 <td>
6768                     <p>
6769                       <code class="literal">20</code>
6770                     </p>
6771                   </td>
6772 <td>
6773                     <p>
6774                       <code class="literal">mail.backup.org.</code>
6775                     </p>
6776                   </td>
6777 </tr>
6778 <tr>
6779 <td>
6780                     <p>
6781                       <code class="literal">mail.example.com.</code>
6782                     </p>
6783                   </td>
6784 <td>
6785                     <p>
6786                       <code class="literal">IN</code>
6787                     </p>
6788                   </td>
6789 <td>
6790                     <p>
6791                       <code class="literal">A</code>
6792                     </p>
6793                   </td>
6794 <td>
6795                     <p>
6796                       <code class="literal">10.0.0.1</code>
6797                     </p>
6798                   </td>
6799 <td>
6800                     <p></p>
6801                   </td>
6802 </tr>
6803 <tr>
6804 <td>
6805                     <p>
6806                       <code class="literal">mail2.example.com.</code>
6807                     </p>
6808                   </td>
6809 <td>
6810                     <p>
6811                       <code class="literal">IN</code>
6812                     </p>
6813                   </td>
6814 <td>
6815                     <p>
6816                       <code class="literal">A</code>
6817                     </p>
6818                   </td>
6819 <td>
6820                     <p>
6821                       <code class="literal">10.0.0.2</code>
6822                     </p>
6823                   </td>
6824 <td>
6825                     <p></p>
6826                   </td>
6827 </tr>
6828 </tbody>
6829 </table></div>
6830 <p>
6831             Mail delivery will be attempted to <code class="literal">mail.example.com</code> and
6832             <code class="literal">mail2.example.com</code> (in
6833             any order), and if neither of those succeed, delivery to <code class="literal">mail.backup.org</code> will
6834             be attempted.
6835           </p>
6836 </div>
6837 <div class="sect2" lang="en">
6838 <div class="titlepage"><div><div><h3 class="title">
6839 <a name="Setting_TTLs"></a>Setting TTLs</h3></div></div></div>
6840 <p>
6841             The time-to-live of the RR field is a 32-bit integer represented
6842             in units of seconds, and is primarily used by resolvers when they
6843             cache RRs. The TTL describes how long a RR can be cached before it
6844             should be discarded. The following three types of TTL are
6845             currently
6846             used in a zone file.
6847           </p>
6848 <div class="informaltable"><table border="1">
6849 <colgroup>
6850 <col>
6851 <col>
6852 </colgroup>
6853 <tbody>
6854 <tr>
6855 <td>
6856                     <p>
6857                       SOA
6858                     </p>
6859                   </td>
6860 <td>
6861                     <p>
6862                       The last field in the SOA is the negative
6863                       caching TTL. This controls how long other servers will
6864                       cache no-such-domain
6865                       (NXDOMAIN) responses from you.
6866                     </p>
6867                     <p>
6868                       The maximum time for
6869                       negative caching is 3 hours (3h).
6870                     </p>
6871                   </td>
6872 </tr>
6873 <tr>
6874 <td>
6875                     <p>
6876                       $TTL
6877                     </p>
6878                   </td>
6879 <td>
6880                     <p>
6881                       The $TTL directive at the top of the
6882                       zone file (before the SOA) gives a default TTL for every
6883                       RR without
6884                       a specific TTL set.
6885                     </p>
6886                   </td>
6887 </tr>
6888 <tr>
6889 <td>
6890                     <p>
6891                       RR TTLs
6892                     </p>
6893                   </td>
6894 <td>
6895                     <p>
6896                       Each RR can have a TTL as the second
6897                       field in the RR, which will control how long other
6898                       servers can cache
6899                       the it.
6900                     </p>
6901                   </td>
6902 </tr>
6903 </tbody>
6904 </table></div>
6905 <p>
6906             All of these TTLs default to units of seconds, though units
6907             can be explicitly specified, for example, <code class="literal">1h30m</code>.
6908           </p>
6909 </div>
6910 <div class="sect2" lang="en">
6911 <div class="titlepage"><div><div><h3 class="title">
6912 <a name="id2592188"></a>Inverse Mapping in IPv4</h3></div></div></div>
6913 <p>
6914             Reverse name resolution (that is, translation from IP address
6915             to name) is achieved by means of the <span class="emphasis"><em>in-addr.arpa</em></span> domain
6916             and PTR records. Entries in the in-addr.arpa domain are made in
6917             least-to-most significant order, read left to right. This is the
6918             opposite order to the way IP addresses are usually written. Thus,
6919             a machine with an IP address of 10.1.2.3 would have a
6920             corresponding
6921             in-addr.arpa name of
6922             3.2.1.10.in-addr.arpa. This name should have a PTR resource record
6923             whose data field is the name of the machine or, optionally,
6924             multiple
6925             PTR records if the machine has more than one name. For example,
6926             in the [<span class="optional">example.com</span>] domain:
6927           </p>
6928 <div class="informaltable"><table border="1">
6929 <colgroup>
6930 <col>
6931 <col>
6932 </colgroup>
6933 <tbody>
6934 <tr>
6935 <td>
6936                     <p>
6937                       <code class="literal">$ORIGIN</code>
6938                     </p>
6939                   </td>
6940 <td>
6941                     <p>
6942                       <code class="literal">2.1.10.in-addr.arpa</code>
6943                     </p>
6944                   </td>
6945 </tr>
6946 <tr>
6947 <td>
6948                     <p>
6949                       <code class="literal">3</code>
6950                     </p>
6951                   </td>
6952 <td>
6953                     <p>
6954                       <code class="literal">IN PTR foo.example.com.</code>
6955                     </p>
6956                   </td>
6957 </tr>
6958 </tbody>
6959 </table></div>
6960 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
6961 <h3 class="title">Note</h3>
6962 <p>
6963               The <span><strong class="command">$ORIGIN</strong></span> lines in the examples
6964               are for providing context to the examples only &#8212; they do not
6965               necessarily
6966               appear in the actual usage. They are only used here to indicate
6967               that the example is relative to the listed origin.
6968             </p>
6969 </div>
6970 </div>
6971 <div class="sect2" lang="en">
6972 <div class="titlepage"><div><div><h3 class="title">
6973 <a name="id2592384"></a>Other Zone File Directives</h3></div></div></div>
6974 <p>
6975             The Master File Format was initially defined in RFC 1035 and
6976             has subsequently been extended. While the Master File Format
6977             itself
6978             is class independent all records in a Master File must be of the
6979             same
6980             class.
6981           </p>
6982 <p>
6983             Master File Directives include <span><strong class="command">$ORIGIN</strong></span>, <span><strong class="command">$INCLUDE</strong></span>,
6984             and <span><strong class="command">$TTL.</strong></span>
6985           </p>
6986 <div class="sect3" lang="en">
6987 <div class="titlepage"><div><div><h4 class="title">
6988 <a name="id2592406"></a>The <span><strong class="command">$ORIGIN</strong></span> Directive</h4></div></div></div>
6989 <p>
6990               Syntax: <span><strong class="command">$ORIGIN</strong></span>
6991               <em class="replaceable"><code>domain-name</code></em>
6992               [<span class="optional"><em class="replaceable"><code>comment</code></em></span>]
6993             </p>
6994 <p><span><strong class="command">$ORIGIN</strong></span>
6995               sets the domain name that will be appended to any
6996               unqualified records. When a zone is first read in there
6997               is an implicit <span><strong class="command">$ORIGIN</strong></span>
6998               &lt;<code class="varname">zone-name</code>&gt;<span><strong class="command">.</strong></span>
6999               The current <span><strong class="command">$ORIGIN</strong></span> is appended to
7000               the domain specified in the <span><strong class="command">$ORIGIN</strong></span>
7001               argument if it is not absolute.
7002             </p>
7003 <pre class="programlisting">
7004 $ORIGIN example.com.
7005 WWW     CNAME   MAIN-SERVER
7006 </pre>
7007 <p>
7008               is equivalent to
7009             </p>
7010 <pre class="programlisting">
7011 WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
7012 </pre>
7013 </div>
7014 <div class="sect3" lang="en">
7015 <div class="titlepage"><div><div><h4 class="title">
7016 <a name="id2592467"></a>The <span><strong class="command">$INCLUDE</strong></span> Directive</h4></div></div></div>
7017 <p>
7018               Syntax: <span><strong class="command">$INCLUDE</strong></span>
7019               <em class="replaceable"><code>filename</code></em>
7020               [<span class="optional">
7021 <em class="replaceable"><code>origin</code></em> </span>]
7022               [<span class="optional"> <em class="replaceable"><code>comment</code></em> </span>]
7023             </p>
7024 <p>
7025               Read and process the file <code class="filename">filename</code> as
7026               if it were included into the file at this point.  If <span><strong class="command">origin</strong></span> is
7027               specified the file is processed with <span><strong class="command">$ORIGIN</strong></span> set
7028               to that value, otherwise the current <span><strong class="command">$ORIGIN</strong></span> is
7029               used.
7030             </p>
7031 <p>
7032               The origin and the current domain name
7033               revert to the values they had prior to the <span><strong class="command">$INCLUDE</strong></span> once
7034               the file has been read.
7035             </p>
7036 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
7037 <h3 class="title">Note</h3>
7038 <p>
7039                 RFC 1035 specifies that the current origin should be restored
7040                 after
7041                 an <span><strong class="command">$INCLUDE</strong></span>, but it is silent
7042                 on whether the current
7043                 domain name should also be restored.  BIND 9 restores both of
7044                 them.
7045                 This could be construed as a deviation from RFC 1035, a
7046                 feature, or both.
7047               </p>
7048 </div>
7049 </div>
7050 <div class="sect3" lang="en">
7051 <div class="titlepage"><div><div><h4 class="title">
7052 <a name="id2592536"></a>The <span><strong class="command">$TTL</strong></span> Directive</h4></div></div></div>
7053 <p>
7054               Syntax: <span><strong class="command">$TTL</strong></span>
7055               <em class="replaceable"><code>default-ttl</code></em>
7056               [<span class="optional">
7057 <em class="replaceable"><code>comment</code></em> </span>]
7058             </p>
7059 <p>
7060               Set the default Time To Live (TTL) for subsequent records
7061               with undefined TTLs. Valid TTLs are of the range 0-2147483647
7062               seconds.
7063             </p>
7064 <p><span><strong class="command">$TTL</strong></span>
7065                is defined in RFC 2308.
7066             </p>
7067 </div>
7068 </div>
7069 <div class="sect2" lang="en">
7070 <div class="titlepage"><div><div><h3 class="title">
7071 <a name="id2592572"></a><acronym class="acronym">BIND</acronym> Master File Extension: the  <span><strong class="command">$GENERATE</strong></span> Directive</h3></div></div></div>
7072 <p>
7073             Syntax: <span><strong class="command">$GENERATE</strong></span>
7074             <em class="replaceable"><code>range</code></em>
7075             <em class="replaceable"><code>lhs</code></em>
7076             [<span class="optional"><em class="replaceable"><code>ttl</code></em></span>]
7077             [<span class="optional"><em class="replaceable"><code>class</code></em></span>]
7078             <em class="replaceable"><code>type</code></em>
7079             <em class="replaceable"><code>rhs</code></em>
7080             [<span class="optional"><em class="replaceable"><code>comment</code></em></span>]
7081           </p>
7082 <p><span><strong class="command">$GENERATE</strong></span>
7083             is used to create a series of resource records that only
7084             differ from each other by an
7085             iterator. <span><strong class="command">$GENERATE</strong></span> can be used to
7086             easily generate the sets of records required to support
7087             sub /24 reverse delegations described in RFC 2317:
7088             Classless IN-ADDR.ARPA delegation.
7089           </p>
7090 <pre class="programlisting">$ORIGIN 0.0.192.IN-ADDR.ARPA.
7091 $GENERATE 1-2 0 NS SERVER$.EXAMPLE.
7092 $GENERATE 1-127 $ CNAME $.0</pre>
7093 <p>
7094             is equivalent to
7095           </p>
7096 <pre class="programlisting">0.0.0.192.IN-ADDR.ARPA. NS SERVER1.EXAMPLE.
7097 0.0.0.192.IN-ADDR.ARPA. NS SERVER2.EXAMPLE.
7098 1.0.0.192.IN-ADDR.ARPA. CNAME 1.0.0.0.192.IN-ADDR.ARPA.
7099 2.0.0.192.IN-ADDR.ARPA. CNAME 2.0.0.0.192.IN-ADDR.ARPA.
7100 ...
7101 127.0.0.192.IN-ADDR.ARPA. CNAME 127.0.0.0.192.IN-ADDR.ARPA.
7102 </pre>
7103 <div class="informaltable"><table border="1">
7104 <colgroup>
7105 <col>
7106 <col>
7107 </colgroup>
7108 <tbody>
7109 <tr>
7110 <td>
7111                     <p><span><strong class="command">range</strong></span></p>
7112                   </td>
7113 <td>
7114                     <p>
7115                       This can be one of two forms: start-stop
7116                       or start-stop/step. If the first form is used, then step
7117                       is set to
7118                       1. All of start, stop and step must be positive.
7119                     </p>
7120                   </td>
7121 </tr>
7122 <tr>
7123 <td>
7124                     <p><span><strong class="command">lhs</strong></span></p>
7125                   </td>
7126 <td>
7127                     <p>This
7128                       describes the owner name of the resource records
7129                       to be created.  Any single <span><strong class="command">$</strong></span>
7130                       (dollar sign)
7131                       symbols within the <span><strong class="command">lhs</strong></span> side
7132                       are replaced by the iterator value.
7133
7134                       To get a $ in the output, you need to escape the
7135                       <span><strong class="command">$</strong></span> using a backslash
7136                       <span><strong class="command">\</strong></span>,
7137                       e.g. <span><strong class="command">\$</strong></span>. The
7138                       <span><strong class="command">$</strong></span> may optionally be followed
7139                       by modifiers which change the offset from the
7140                       iterator, field width and base.
7141
7142                       Modifiers are introduced by a
7143                       <span><strong class="command">{</strong></span> (left brace) immediately following the
7144                       <span><strong class="command">$</strong></span> as
7145                       <span><strong class="command">${offset[,width[,base]]}</strong></span>.
7146                       For example, <span><strong class="command">${-20,3,d}</strong></span>
7147                       subtracts 20 from the current value, prints the
7148                       result as a decimal in a zero-padded field of
7149                       width 3.
7150
7151                       Available output forms are decimal
7152                       (<span><strong class="command">d</strong></span>), octal
7153                       (<span><strong class="command">o</strong></span>) and hexadecimal
7154                       (<span><strong class="command">x</strong></span> or <span><strong class="command">X</strong></span>
7155                       for uppercase).  The default modifier is
7156                       <span><strong class="command">${0,0,d}</strong></span>.  If the
7157                       <span><strong class="command">lhs</strong></span> is not absolute, the
7158                       current <span><strong class="command">$ORIGIN</strong></span> is appended
7159                       to the name.
7160                     </p>
7161                     <p>
7162                       For compatibility with earlier versions, <span><strong class="command">$$</strong></span> is still
7163                       recognized as indicating a literal $ in the output.
7164                     </p>
7165                   </td>
7166 </tr>
7167 <tr>
7168 <td>
7169                     <p><span><strong class="command">ttl</strong></span></p>
7170                   </td>
7171 <td>
7172                     <p>
7173                       Specifies the time-to-live of the generated records. If
7174                       not specified this will be inherited using the
7175                       normal ttl inheritance rules.
7176                     </p>
7177                     <p><span><strong class="command">class</strong></span>
7178                       and <span><strong class="command">ttl</strong></span> can be
7179                       entered in either order.
7180                     </p>
7181                   </td>
7182 </tr>
7183 <tr>
7184 <td>
7185                     <p><span><strong class="command">class</strong></span></p>
7186                   </td>
7187 <td>
7188                     <p>
7189                       Specifies the class of the generated records.
7190                       This must match the zone class if it is
7191                       specified.
7192                     </p>
7193                     <p><span><strong class="command">class</strong></span>
7194                       and <span><strong class="command">ttl</strong></span> can be
7195                       entered in either order.
7196                     </p>
7197                   </td>
7198 </tr>
7199 <tr>
7200 <td>
7201                     <p><span><strong class="command">type</strong></span></p>
7202                   </td>
7203 <td>
7204                     <p>
7205                       At present the only supported types are
7206                       PTR, CNAME, DNAME, A, AAAA and NS.
7207                     </p>
7208                   </td>
7209 </tr>
7210 <tr>
7211 <td>
7212                     <p><span><strong class="command">rhs</strong></span></p>
7213                   </td>
7214 <td>
7215                     <p>
7216                       <span><strong class="command">rhs</strong></span> is a domain name. It is processed
7217                       similarly to lhs.
7218                     </p>
7219                   </td>
7220 </tr>
7221 </tbody>
7222 </table></div>
7223 <p>
7224             The <span><strong class="command">$GENERATE</strong></span> directive is a <acronym class="acronym">BIND</acronym> extension
7225             and not part of the standard zone file format.
7226           </p>
7227 <p>
7228             BIND 8 does not support the optional TTL and CLASS fields.
7229           </p>
7230 </div>
7231 <div class="sect2" lang="en">
7232 <div class="titlepage"><div><div><h3 class="title">
7233 <a name="zonefile_format"></a>Additional File Formats</h3></div></div></div>
7234 <p>
7235             In addition to the standard textual format, BIND 9
7236             supports the ability to read or dump to zone files in
7237             other formats.  The <code class="constant">raw</code> format is
7238             currently available as an additional format.  It is a
7239             binary format representing BIND 9's internal data
7240             structure directly, thereby remarkably improving the
7241             loading time.
7242           </p>
7243 <p>
7244             For a primary server, a zone file in the
7245             <code class="constant">raw</code> format is expected to be
7246             generated from a textual zone file by the
7247             <span><strong class="command">named-compilezone</strong></span> command.  For a
7248             secondary server or for a dynamic zone, it is automatically
7249             generated (if this format is specified by the
7250             <span><strong class="command">masterfile-format</strong></span> option) when
7251             <span><strong class="command">named</strong></span> dumps the zone contents after
7252             zone transfer or when applying prior updates.
7253           </p>
7254 <p>
7255             If a zone file in a binary format needs manual modification,
7256             it first must be converted to a textual form by the
7257             <span><strong class="command">named-compilezone</strong></span> command.  All
7258             necessary modification should go to the text file, which
7259             should then be converted to the binary form by the
7260             <span><strong class="command">named-compilezone</strong></span> command again.
7261           </p>
7262 <p>
7263              Although the <code class="constant">raw</code> format uses the
7264              network byte order and avoids architecture-dependent
7265              data alignment so that it is as much portable as
7266              possible, it is primarily expected to be used inside
7267              the same single system.  In order to export a zone
7268              file in the <code class="constant">raw</code> format or make a
7269              portable backup of the file, it is recommended to
7270              convert the file to the standard textual representation.
7271           </p>
7272 </div>
7273 </div>
7274 </div>
7275 <div class="navfooter">
7276 <hr>
7277 <table width="100%" summary="Navigation footer">
7278 <tr>
7279 <td width="40%" align="left">
7280 <a accesskey="p" href="Bv9ARM.ch05.html">Prev</a> </td>
7281 <td width="20%" align="center"> </td>
7282 <td width="40%" align="right"> <a accesskey="n" href="Bv9ARM.ch07.html">Next</a>
7283 </td>
7284 </tr>
7285 <tr>
7286 <td width="40%" align="left" valign="top">Chapter 5. The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver </td>
7287 <td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
7288 <td width="40%" align="right" valign="top"> Chapter 7. <acronym class="acronym">BIND</acronym> 9 Security Considerations</td>
7289 </tr>
7290 </table>
7291 </div>
7292 </body>
7293 </html>