2 - Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000-2003 Internet Software Consortium.
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.
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.
17 <!-- $Id: Bv9ARM.ch06.html,v 1.82.18.88 2008/10/18 01:29:58 tbox Exp $ -->
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">
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>
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>
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>
46 <p><b>Table of Contents</b></p>
48 <dt><span class="sect1"><a href="Bv9ARM.ch06.html#configuration_file_elements">Configuration File Elements</a></span></dt>
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>
53 <dt><span class="sect1"><a href="Bv9ARM.ch06.html#Configuration_File_Grammar">Configuration File Grammar</a></span></dt>
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
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
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
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
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
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
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
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>
89 <dt><span class="sect1"><a href="Bv9ARM.ch06.html#id2589477">Zone File</a></span></dt>
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>
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
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.
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>.
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>
121 Following is a list of elements used throughout the <acronym class="acronym">BIND</acronym> configuration
124 <div class="informaltable"><table border="1">
133 <code class="varname">acl_name</code>
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.
146 <code class="varname">address_match_list</code>
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 “Address Match Lists”</a>.
162 <code class="varname">masters_list</code>
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>.
178 <code class="varname">domain_name</code>
183 A quoted string which will be used as
184 a DNS name, for example "<code class="literal">my.test.domain</code>".
191 <code class="varname">dotted_decimal</code>
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>.
205 <code class="varname">ip4_addr</code>
210 An IPv4 address with exactly four elements
211 in <code class="varname">dotted_decimal</code> notation.
218 <code class="varname">ip6_addr</code>
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
226 disambiguated by an appropriate zone ID with the percent
229 It is strongly recommended to use string zone names rather
231 numeric identifiers, in order to be robust against system
232 configuration changes.
233 However, since there is no standard mapping for such names
235 identifier values, currently only interface names as link
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
244 ambiguity, and need to be disambiguated.
251 <code class="varname">ip_addr</code>
256 An <code class="varname">ip4_addr</code> or <code class="varname">ip6_addr</code>.
263 <code class="varname">ip_port</code>
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
273 In some cases, an asterisk (`*') character can be used as a
275 select a random high-numbered port.
282 <code class="varname">ip_prefix</code>
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
290 Trailing zeros in a <code class="varname">ip_addr</code>
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>.
302 <code class="varname">key_id</code>
307 A <code class="varname">domain_name</code> representing
308 the name of a shared key, to be used for transaction
316 <code class="varname">key_list</code>
321 A list of one or more
322 <code class="varname">key_id</code>s,
323 separated by semicolons and ending with a semicolon.
330 <code class="varname">number</code>
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.
345 <code class="varname">path_name</code>
350 A quoted string which will be used as
351 a pathname, such as <code class="filename">zones/master/my.test.domain</code>.
358 <code class="varname">port_list</code>
363 A list of an <code class="varname">ip_port</code> or a port
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>.
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>.
385 <code class="varname">size_spec</code>
390 A number, the word <strong class="userinput"><code>unlimited</code></strong>,
391 or the word <strong class="userinput"><code>default</code></strong>.
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.
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>
403 <strong class="userinput"><code>M</code></strong> or <strong class="userinput"><code>m</code></strong>
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
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
414 to safely set a really large number.
421 <code class="varname">yes_or_no</code>
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>.
436 <code class="varname">dialup_option</code>
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.
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 } )
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>
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
476 <div class="itemizedlist"><ul type="disc">
477 <li>an IP address (IPv4 or IPv6)</li>
478 <li>an IP prefix (in `/' notation)</li>
480 a key ID, as defined by the <span><strong class="command">key</strong></span>
483 <li>the name of an address match list defined with
484 the <span><strong class="command">acl</strong></span> statement
486 <li>a nested address match list enclosed in braces</li>
489 Elements can be negated with a leading exclamation mark (`!'),
490 and the match list names "any", "none", "localhost", and
492 are predefined. More information on those names can be found in
493 the description of the acl statement.
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.
500 the term "address match list" is still used throughout the
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
507 The interpretation of a match depends on whether the list is being
509 for access control, defining listen-on ports, or in a sortlist,
510 and whether the element was negated.
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.
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
533 <span><strong class="command">1.2.3/24; ! 1.2.3.13;</strong></span> the 1.2.3.13
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.
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>
547 The <acronym class="acronym">BIND</acronym> 9 comment syntax allows for
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.
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>
558 <pre class="programlisting">/* This is a <acronym class="acronym">BIND</acronym> comment as in C */</pre>
561 <pre class="programlisting">// This is a <acronym class="acronym">BIND</acronym> comment as in C++</pre>
564 <pre class="programlisting"># This is a <acronym class="acronym">BIND</acronym> comment as in common UNIX shells and perl</pre>
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>
572 Comments may appear anywhere that whitespace may appear in
573 a <acronym class="acronym">BIND</acronym> configuration file.
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.
582 C-style comments cannot be nested. For example, the following
583 is not valid because the entire comment ends with the first */:
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. */
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.
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.
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.
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.
634 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
635 <h3 class="title">Warning</h3>
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
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>
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.
658 The following statements are supported:
660 <div class="informaltable"><table border="1">
668 <p><span><strong class="command">acl</strong></span></p>
672 defines a named IP address
673 matching list, for access control and other uses.
679 <p><span><strong class="command">controls</strong></span></p>
683 declares control channels to be used
684 by the <span><strong class="command">rndc</strong></span> utility.
690 <p><span><strong class="command">include</strong></span></p>
700 <p><span><strong class="command">key</strong></span></p>
704 specifies key information for use in
705 authentication and authorization using TSIG.
711 <p><span><strong class="command">logging</strong></span></p>
715 specifies what the server logs, and where
716 the log messages are sent.
722 <p><span><strong class="command">lwres</strong></span></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>).
733 <p><span><strong class="command">masters</strong></span></p>
737 defines a named masters list for
738 inclusion in stub and slave zone masters clauses.
744 <p><span><strong class="command">options</strong></span></p>
748 controls global server configuration
749 options and sets defaults for other statements.
755 <p><span><strong class="command">server</strong></span></p>
759 sets certain configuration options on
766 <p><span><strong class="command">trusted-keys</strong></span></p>
770 defines trusted DNSSEC keys.
776 <p><span><strong class="command">view</strong></span></p>
786 <p><span><strong class="command">zone</strong></span></p>
797 The <span><strong class="command">logging</strong></span> and
798 <span><strong class="command">options</strong></span> statements may only occur once
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 {
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>
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).
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
823 forward references are allowed.
826 The following ACLs are built-in:
828 <div class="informaltable"><table border="1">
836 <p><span><strong class="command">any</strong></span></p>
846 <p><span><strong class="command">none</strong></span></p>
856 <p><span><strong class="command">localhost</strong></span></p>
860 Matches the IPv4 and IPv6 addresses of all network
861 interfaces on the system.
867 <p><span><strong class="command">localnets</strong></span></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
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>.
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> }; ]
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> }; ]
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>
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.
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.
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>.
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>
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.
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 “Administrative Tools”</a>)
951 for information about configuring keys in <span><strong class="command">rndc</strong></span>.
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>.
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.
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
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
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
989 those things. The <code class="filename">rndc.key</code> file
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.
994 desire greater flexibility in allowing other users to access
995 <span><strong class="command">rndc</strong></span> commands, then you need to create
997 <code class="filename">rndc.conf</code> file and make it group
999 that contains the users who should have access.
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>.
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>
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>
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
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.
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>;
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>
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 “TSIG”</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 “<span><strong class="command">controls</strong></span> Statement Definition and
1048 The <span><strong class="command">key</strong></span> statement can occur at the
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 “<span><strong class="command">controls</strong></span> Statement Definition and
1057 must be defined at the top level.
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.
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
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>; ]
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> ; ... ]
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>
1112 The <span><strong class="command">logging</strong></span> statement configures a
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.
1120 Only one <span><strong class="command">logging</strong></span> statement is used to
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:
1125 <pre class="programlisting">logging {
1126 category default { default_syslog; default_debug; };
1127 category unmatched { null; };
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>
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
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>
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.
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
1157 and/or severity level (the default is not to include any).
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.
1165 The <span><strong class="command">file</strong></span> destination clause directs
1167 to a disk file. It can include limitations
1168 both on how large the file is allowed to become, and how many
1170 of the file will be saved each time the file is opened.
1173 If you use the <span><strong class="command">versions</strong></span> log file
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
1179 of the file <code class="filename">lamers.log</code>, then just
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
1187 the number of versions.
1188 If a <span><strong class="command">size</strong></span> option is associated with
1190 then renaming is only done when the file being opened exceeds the
1191 indicated size. No backup versions are kept by default; any
1193 log file is simply appended.
1196 The <span><strong class="command">size</strong></span> option for files is used
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
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
1207 maximum size. The default behavior is not to limit the size of
1212 Example usage of the <span><strong class="command">size</strong></span> and
1213 <span><strong class="command">versions</strong></span> options:
1215 <pre class="programlisting">channel an_example_channel {
1216 file "example.log" versions 3 size 20m;
1222 The <span><strong class="command">syslog</strong></span> destination clause
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
1235 all operating systems.
1236 How <span><strong class="command">syslog</strong></span> will handle messages
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.
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
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.
1265 The <span><strong class="command">stderr</strong></span> destination clause
1267 channel to the server's standard error stream. This is intended
1269 use when the server is running as a foreground process, for
1271 when debugging a configuration.
1274 The server can supply extensive debugging information when
1275 it is in debugging mode. If the server's global debug level is
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:
1287 <pre class="programlisting">channel specific_debug_level {
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>
1297 server's global debug level to determine what messages to print.
1300 If <span><strong class="command">print-time</strong></span> has been turned on,
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,
1305 pointless since <span><strong class="command">syslog</strong></span> also prints
1307 time. If <span><strong class="command">print-category</strong></span> is
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
1313 order: time, category, severity. Here is an example where all
1314 three <span><strong class="command">print-</strong></span> options
1318 <code class="computeroutput">28-Feb-2000 15:05:32.863 general: notice: running</code>
1321 There are four predefined channels that are used for
1322 <span><strong class="command">named</strong></span>'s default logging as follows.
1324 used is described in <a href="Bv9ARM.ch06.html#the_category_phrase" title="The category Phrase">the section called “The <span><strong class="command">category</strong></span> Phrase”</a>.
1326 <pre class="programlisting">channel default_syslog {
1327 syslog daemon; // send to syslog's daemon
1329 severity info; // only send priority info
1333 channel default_debug {
1334 file "named.run"; // write to named.run in
1335 // the working directory
1336 // Note: stderr is used instead
1338 // if the server is started
1339 // with the '-f' option.
1340 severity dynamic; // log at the server's
1341 // current debug level
1344 channel default_stderr {
1345 stderr; // writes to stderr
1346 severity info; // only send priority info
1351 null; // toss anything sent to
1356 The <span><strong class="command">default_debug</strong></span> channel has the
1358 property that it only produces output when the server's debug
1360 nonzero. It normally writes to a file called <code class="filename">named.run</code>
1361 in the server's working directory.
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
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.
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
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>
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
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:
1392 <pre class="programlisting">category default { default_syslog; default_debug; };
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:
1399 <pre class="programlisting">channel my_security_channel {
1400 file "my_security_file";
1404 my_security_channel;
1409 To discard all messages in a category, specify the <span><strong class="command">null</strong></span> channel:
1411 <pre class="programlisting">category xfer-out { null; };
1412 category notify { null; };
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.
1419 <div class="informaltable"><table border="1">
1427 <p><span><strong class="command">default</strong></span></p>
1431 The default category defines the logging
1432 options for those categories where no specific
1433 configuration has been
1440 <p><span><strong class="command">general</strong></span></p>
1444 The catch-all. Many things still aren't
1445 classified into categories, and they all end up here.
1451 <p><span><strong class="command">database</strong></span></p>
1455 Messages relating to the databases used
1456 internally by the name server to store zone and cache
1463 <p><span><strong class="command">security</strong></span></p>
1467 Approval and denial of requests.
1473 <p><span><strong class="command">config</strong></span></p>
1477 Configuration file parsing and processing.
1483 <p><span><strong class="command">resolver</strong></span></p>
1487 DNS resolution, such as the recursive
1488 lookups performed on behalf of clients by a caching name
1495 <p><span><strong class="command">xfer-in</strong></span></p>
1499 Zone transfers the server is receiving.
1505 <p><span><strong class="command">xfer-out</strong></span></p>
1509 Zone transfers the server is sending.
1515 <p><span><strong class="command">notify</strong></span></p>
1519 The NOTIFY protocol.
1525 <p><span><strong class="command">client</strong></span></p>
1529 Processing of client requests.
1535 <p><span><strong class="command">unmatched</strong></span></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.
1550 <p><span><strong class="command">network</strong></span></p>
1560 <p><span><strong class="command">update</strong></span></p>
1570 <p><span><strong class="command">update-security</strong></span></p>
1574 Approval and denial of update requests.
1580 <p><span><strong class="command">queries</strong></span></p>
1584 Specify where queries should be logged to.
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
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
1596 flag was set (+ if set, - if not set), EDNS was in use
1598 query was signed (S).
1601 <code class="computeroutput">client 127.0.0.1#62536: query: www.example.com IN AAAA +SE</code>
1604 <code class="computeroutput">client ::1#62537: query: www.example.net IN AAAA -SE</code>
1610 <p><span><strong class="command">dispatch</strong></span></p>
1614 Dispatching of incoming packets to the
1615 server modules where they are to be processed.
1621 <p><span><strong class="command">dnssec</strong></span></p>
1625 DNSSEC and TSIG protocol processing.
1631 <p><span><strong class="command">lame-servers</strong></span></p>
1635 Lame servers. These are misconfigurations
1636 in remote servers, discovered by BIND 9 when trying to
1638 those servers during resolution.
1644 <p><span><strong class="command">delegation-only</strong></span></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.
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>
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:
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>]
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>
1679 The <span><strong class="command">lwres</strong></span> statement configures the
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 “Running a Resolver Daemon”</a>.) There may be multiple
1683 <span><strong class="command">lwres</strong></span> statements configuring
1684 lightweight resolver servers with different properties.
1687 The <span><strong class="command">listen-on</strong></span> statement specifies a
1689 addresses (and ports) that this instance of a lightweight resolver
1691 should accept requests on. If no port is specified, port 921 is
1693 If this statement is omitted, requests will be accepted on
1698 The <span><strong class="command">view</strong></span> statement binds this
1700 lightweight resolver daemon to a view in the DNS namespace, so that
1702 response will be constructed in the same manner as a normal DNS
1704 matching this view. If this statement is omitted, the default view
1706 used, and if there is no default view, an error is triggered.
1709 The <span><strong class="command">search</strong></span> statement is equivalent to
1711 <span><strong class="command">search</strong></span> statement in
1712 <code class="filename">/etc/resolv.conf</code>. It provides a
1714 which are appended to relative names in queries.
1717 The <span><strong class="command">ndots</strong></span> statement is equivalent to
1719 <span><strong class="command">ndots</strong></span> statement in
1720 <code class="filename">/etc/resolv.conf</code>. It indicates the
1722 number of dots in a relative domain name that should result in an
1723 exact match lookup before search path elements are appended.
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>] };
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.
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>
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:
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>] ) ;
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>]
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>
1905 The <span><strong class="command">options</strong></span> statement sets up global
1907 to be used by <acronym class="acronym">BIND</acronym>. This statement
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
1913 <div class="variablelist"><dl>
1914 <dt><span class="term"><span><strong class="command">directory</strong></span></span></dt>
1916 The working directory of the server.
1917 Any non-absolute pathnames in the configuration file will be
1919 as relative to this directory. The default location for most
1921 output files (e.g. <code class="filename">named.run</code>)
1923 If a directory is not specified, the working directory
1924 defaults to `<code class="filename">.</code>', the directory from
1926 was started. The directory specified should be an absolute
1929 <dt><span class="term"><span><strong class="command">key-directory</strong></span></span></dt>
1931 When performing dynamic update of secure zones, the
1932 directory where the public and private key files should be
1934 if different than the current working directory. The
1936 must be an absolute path.
1938 <dt><span class="term"><span><strong class="command">named-xfer</strong></span></span></dt>
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.
1946 <dt><span class="term"><span><strong class="command">tkey-domain</strong></span></span></dt>
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
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
1963 <dt><span class="term"><span><strong class="command">tkey-dhkey</strong></span></span></dt>
1965 The Diffie-Hellman key used by the server
1966 to generate shared keys with clients using the Diffie-Hellman
1968 of <span><strong class="command">TKEY</strong></span>. The server must be
1970 public and private keys from files in the working directory.
1972 most cases, the keyname should be the server's host name.
1974 <dt><span class="term"><span><strong class="command">cache-file</strong></span></span></dt>
1976 This is for testing only. Do not use.
1978 <dt><span class="term"><span><strong class="command">dump-file</strong></span></span></dt>
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>.
1985 <dt><span class="term"><span><strong class="command">memstatistics-file</strong></span></span></dt>
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.
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
2000 <dt><span class="term"><span><strong class="command">pid-file</strong></span></span></dt>
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
2006 name server. Specifying <span><strong class="command">pid-file none</strong></span> disables the
2007 use of a PID file — 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
2013 <dt><span class="term"><span><strong class="command">recursing-file</strong></span></span></dt>
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>.
2020 <dt><span class="term"><span><strong class="command">statistics-file</strong></span></span></dt>
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
2027 in <a href="Bv9ARM.ch06.html#statsfile" title="The Statistics File">the section called “The Statistics File”</a>.
2029 <dt><span class="term"><span><strong class="command">port</strong></span></span></dt>
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
2035 a server using a port other than 53 will not be able to
2039 <dt><span class="term"><span><strong class="command">random-device</strong></span></span></dt>
2041 The source of entropy to be used by the server. Entropy is
2043 for DNSSEC operations, such as TKEY transactions and dynamic
2045 zones. This options specifies the device (or file) from which
2047 entropy. If this is a file, operations requiring entropy will
2049 file has been exhausted. If not specified, the default value
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
2055 the initial configuration load at server startup time and
2056 is ignored on subsequent reloads.
2058 <dt><span class="term"><span><strong class="command">preferred-glue</strong></span></span></dt>
2060 If specified, the listed type (A or AAAA) will be emitted
2062 in the additional section of a query response.
2063 The default is not to prefer any type (NONE).
2065 <dt><span class="term"><span><strong class="command">root-delegation-only</strong></span></span></dt>
2068 Turn on enforcement of delegation-only in TLDs (top level domains) and root zones
2073 Note some TLDs are not delegation only (e.g. "DE", "LV", "US"
2076 <pre class="programlisting">
2078 root-delegation-only exclude { "de"; "lv"; "us"; "museum"; };
2082 <dt><span class="term"><span><strong class="command">disable-algorithms</strong></span></span></dt>
2084 Disable the specified DNSSEC algorithms at and below the
2086 Multiple <span><strong class="command">disable-algorithms</strong></span>
2087 statements are allowed.
2088 Only the most specific will be applied.
2090 <dt><span class="term"><span><strong class="command">dnssec-lookaside</strong></span></span></dt>
2092 When set, <span><strong class="command">dnssec-lookaside</strong></span>
2094 validator with an alternate method to validate DNSKEY records
2096 top of a zone. When a DNSKEY is at or below a domain
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
2102 name and a DLV record will be looked up to see if it can
2104 key. If the DLV record validates a DNSKEY (similarly to the
2106 record does) the DNSKEY RRset is deemed to be trusted.
2108 <dt><span class="term"><span><strong class="command">dnssec-must-be-secure</strong></span></span></dt>
2110 Specify hierarchies which must be or may not be secure (signed and
2112 If <strong class="userinput"><code>yes</code></strong>, then named will only accept
2115 If <strong class="userinput"><code>no</code></strong>, then normal dnssec validation
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
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>
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
2132 authoritative. The default is <strong class="userinput"><code>no</code></strong>;
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>.
2138 <dt><span class="term"><span><strong class="command">deallocate-on-exit</strong></span></span></dt>
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
2145 <dt><span class="term"><span><strong class="command">dialup</strong></span></span></dt>
2148 If <strong class="userinput"><code>yes</code></strong>, then the
2149 server treats all zones as if they are doing zone transfers
2151 a dial-on-demand dialup link, which can be brought up by
2153 originating from this server. This has different effects
2155 to zone type and concentrates the zone maintenance so that
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
2160 zone maintenance traffic. The default is <strong class="userinput"><code>no</code></strong>.
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>
2170 If the zone is a master zone, then the server will send out a
2172 request to all the slaves (default). This should trigger the
2174 number check in the slave (providing it supports NOTIFY)
2176 to verify the zone while the connection is active.
2177 The set of servers to which NOTIFY is sent can be controlled
2179 <span><strong class="command">notify</strong></span> and <span><strong class="command">also-notify</strong></span>.
2183 zone is a slave or stub zone, then the server will suppress
2185 "zone up to date" (refresh) queries and only perform them
2187 <span><strong class="command">heartbeat-interval</strong></span> expires in
2192 Finer control can be achieved by using
2193 <strong class="userinput"><code>notify</code></strong> which only sends NOTIFY
2195 <strong class="userinput"><code>notify-passive</code></strong> which sends NOTIFY
2197 suppresses the normal refresh queries, <strong class="userinput"><code>refresh</code></strong>
2198 which suppresses normal refresh processing and sends refresh
2200 when the <span><strong class="command">heartbeat-interval</strong></span>
2202 <strong class="userinput"><code>passive</code></strong> which just disables normal
2206 <div class="informaltable"><table border="1">
2238 <p><span><strong class="command">no</strong></span> (default)</p>
2258 <p><span><strong class="command">yes</strong></span></p>
2278 <p><span><strong class="command">notify</strong></span></p>
2298 <p><span><strong class="command">refresh</strong></span></p>
2318 <p><span><strong class="command">passive</strong></span></p>
2338 <p><span><strong class="command">notify-passive</strong></span></p>
2359 Note that normal NOTIFY processing is not affected by
2360 <span><strong class="command">dialup</strong></span>.
2363 <dt><span class="term"><span><strong class="command">fake-iquery</strong></span></span></dt>
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
2370 <dt><span class="term"><span><strong class="command">fetch-glue</strong></span></span></dt>
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
2376 didn't have when constructing the additional
2377 data section of a response. This is now considered a bad
2379 and BIND 9 never does it.
2381 <dt><span class="term"><span><strong class="command">flush-zones-on-shutdown</strong></span></span></dt>
2383 When the nameserver exits due receiving SIGTERM,
2384 flush or do not flush any pending zone writes. The default
2386 <span><strong class="command">flush-zones-on-shutdown</strong></span> <strong class="userinput"><code>no</code></strong>.
2388 <dt><span class="term"><span><strong class="command">has-old-clients</strong></span></span></dt>
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
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.
2398 <dt><span class="term"><span><strong class="command">host-statistics</strong></span></span></dt>
2400 In BIND 8, this enables keeping of
2401 statistics for every host that the name server interacts
2403 Not implemented in BIND 9.
2405 <dt><span class="term"><span><strong class="command">maintain-ixfr-base</strong></span></span></dt>
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
2413 transfers, use <span><strong class="command">provide-ixfr</strong></span> <strong class="userinput"><code>no</code></strong>.
2415 <dt><span class="term"><span><strong class="command">minimal-responses</strong></span></span></dt>
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>.
2424 <dt><span class="term"><span><strong class="command">multiple-cnames</strong></span></span></dt>
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.
2432 <dt><span class="term"><span><strong class="command">notify</strong></span></span></dt>
2435 If <strong class="userinput"><code>yes</code></strong> (the default),
2436 DNS NOTIFY messages are sent when a zone the server is
2438 changes, see <a href="Bv9ARM.ch04.html#notify" title="Notify">the section called “Notify”</a>. The messages are
2440 servers listed in the zone's NS records (except the master
2442 in the SOA MNAME field), and to any servers listed in the
2443 <span><strong class="command">also-notify</strong></span> option.
2446 If <strong class="userinput"><code>master-only</code></strong>, notifies are only
2449 If <strong class="userinput"><code>explicit</code></strong>, notifies are sent only
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.
2455 The <span><strong class="command">notify</strong></span> option may also be
2456 specified in the <span><strong class="command">zone</strong></span>
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
2464 <dt><span class="term"><span><strong class="command">recursion</strong></span></span></dt>
2466 If <strong class="userinput"><code>yes</code></strong>, and a
2467 DNS query requests recursion, then the server will attempt
2469 all the work required to answer the query. If recursion is
2471 and the server does not already know the answer, it will
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
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.
2483 <dt><span class="term"><span><strong class="command">rfc2308-type1</strong></span></span></dt>
2486 Setting this to <strong class="userinput"><code>yes</code></strong> will
2487 cause the server to send NS records along with the SOA
2489 answers. The default is <strong class="userinput"><code>no</code></strong>.
2491 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
2492 <h3 class="title">Note</h3>
2494 Not yet implemented in <acronym class="acronym">BIND</acronym>
2499 <dt><span class="term"><span><strong class="command">use-id-pool</strong></span></span></dt>
2501 <span class="emphasis"><em>This option is obsolete</em></span>.
2502 <acronym class="acronym">BIND</acronym> 9 always allocates query
2505 <dt><span class="term"><span><strong class="command">zone-statistics</strong></span></span></dt>
2507 If <strong class="userinput"><code>yes</code></strong>, the server will collect
2508 statistical data on all zones (unless specifically turned
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 “The Statistics File”</a>.
2518 <dt><span class="term"><span><strong class="command">use-ixfr</strong></span></span></dt>
2520 <span class="emphasis"><em>This option is obsolete</em></span>.
2521 If you need to disable IXFR to a particular server or
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 “<span><strong class="command">server</strong></span> Statement Definition and
2528 <a href="Bv9ARM.ch04.html#incremental_zone_transfers" title="Incremental Zone Transfers (IXFR)">the section called “Incremental Zone Transfers (IXFR)”</a>.
2530 <dt><span class="term"><span><strong class="command">provide-ixfr</strong></span></span></dt>
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 “<span><strong class="command">server</strong></span> Statement Definition and
2538 <dt><span class="term"><span><strong class="command">request-ixfr</strong></span></span></dt>
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 “<span><strong class="command">server</strong></span> Statement Definition and
2546 <dt><span class="term"><span><strong class="command">treat-cr-as-space</strong></span></span></dt>
2548 This option was used in <acronym class="acronym">BIND</acronym>
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
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.
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>
2564 These options control the behavior of an authoritative
2566 answering queries which have additional data, or when
2571 When both of these options are set to <strong class="userinput"><code>yes</code></strong>
2573 query is being answered from authoritative data (a zone
2574 configured into the server), the additional data section of
2576 reply will be filled in using data from other authoritative
2578 and from the cache. In some situations this is undesirable,
2580 as when there is concern over the correctness of the cache,
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
2586 at the possible expense of additional queries to resolve
2588 otherwise be provided in the additional section.
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
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
2605 <span><strong class="command">recursion no</strong></span> will cause the
2607 ignore the options and log a warning message.
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
2613 but also when looking up the answer. This is usually the
2615 behavior in an authoritative-only server where the
2617 the cached data is an issue.
2620 When a name server is non-recursively queried for a name
2622 below the apex of any served zone, it normally answers with
2624 "upwards referral" to the root servers or the servers of
2626 known parent of the query name. Since the data in an
2628 comes from the cache, the server will not be able to provide
2630 referrals when <span><strong class="command">additional-from-cache no</strong></span>
2631 has been specified. Instead, it will respond to such
2633 with REFUSED. This should not cause any problems since
2634 upwards referrals are not required for the resolution
2638 <dt><span class="term"><span><strong class="command">match-mapped-addresses</strong></span></span></dt>
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
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.
2651 <dt><span class="term"><span><strong class="command">ixfr-from-differences</strong></span></span></dt>
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.
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
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
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
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.
2683 <dt><span class="term"><span><strong class="command">multi-master</strong></span></span></dt>
2685 This should be set when you have multiple masters for a zone
2687 addresses refer to different machines. If <strong class="userinput"><code>yes</code></strong>, named will
2689 when the serial number on the master is less than what named
2691 has. The default is <strong class="userinput"><code>no</code></strong>.
2693 <dt><span class="term"><span><strong class="command">dnssec-enable</strong></span></span></dt>
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>.
2699 <dt><span class="term"><span><strong class="command">dnssec-validation</strong></span></span></dt>
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>.
2706 <dt><span class="term"><span><strong class="command">dnssec-accept-expired</strong></span></span></dt>
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.
2712 <dt><span class="term"><span><strong class="command">querylog</strong></span></span></dt>
2714 Specify whether query logging should be started when named
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>.
2720 <dt><span class="term"><span><strong class="command">check-names</strong></span></span></dt>
2723 This option is used to restrict the character set and syntax
2725 certain domain names in master files and/or DNS responses
2727 from the network. The default varies according to usage
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>.
2736 The rules for legal hostnames and mail domains are derived
2737 from RFC 952 and RFC 821 as modified by RFC 1123.
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
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).
2748 <dt><span class="term"><span><strong class="command">check-mx</strong></span></span></dt>
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>.
2755 <dt><span class="term"><span><strong class="command">check-wildcard</strong></span></span></dt>
2757 This option is used to check for non-terminal wildcards.
2758 The use of non-terminal wildcards is almost always as a
2760 to understand the wildcard matching algorithm (RFC 1034).
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.
2765 <dt><span class="term"><span><strong class="command">check-integrity</strong></span></span></dt>
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>.
2779 <dt><span class="term"><span><strong class="command">check-mx-cname</strong></span></span></dt>
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>.
2785 <dt><span class="term"><span><strong class="command">check-srv-cname</strong></span></span></dt>
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>.
2791 <dt><span class="term"><span><strong class="command">check-sibling</strong></span></span></dt>
2793 When performing integrity checks, also check that
2794 sibling glue exists. The default is <span><strong class="command">yes</strong></span>.
2796 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl</strong></span></span></dt>
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>.
2803 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl-cache</strong></span></span></dt>
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>.
2809 <dt><span class="term"><span><strong class="command">update-check-ksk</strong></span></span></dt>
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
2817 The default is <span><strong class="command">yes</strong></span>.
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>
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
2830 names anyway. Forwarding occurs only on those queries for which
2831 the server is not authoritative and does not have the answer in
2834 <div class="variablelist"><dl>
2835 <dt><span class="term"><span><strong class="command">forward</strong></span></span></dt>
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
2841 if that doesn't answer the question, the server will then
2843 the answer itself. If <code class="varname">only</code> is
2845 server will only query the forwarders.
2847 <dt><span class="term"><span><strong class="command">forwarders</strong></span></span></dt>
2849 Specifies the IP addresses to be used
2850 for forwarding. The default is the empty list (no
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
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 “<span><strong class="command">zone</strong></span>
2862 Statement Grammar”</a>.
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>
2869 Dual-stack servers are used as servers of last resort to work
2871 problems in reachability due the lack of support for either IPv4
2873 on the host machine.
2875 <div class="variablelist"><dl>
2876 <dt><span class="term"><span><strong class="command">dual-stack-servers</strong></span></span></dt>
2878 Specifies host names or addresses of machines with access to
2879 both IPv4 and IPv6 transports. If a hostname is used, the
2881 to resolve the name using only the transport it has. If the
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>).
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>
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 “Address Match Lists”</a> for
2895 details on how to specify IP address lists.
2897 <div class="variablelist"><dl>
2898 <dt><span class="term"><span><strong class="command">allow-notify</strong></span></span></dt>
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
2905 <span><strong class="command">zone</strong></span> statement, in which case
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.
2913 <dt><span class="term"><span><strong class="command">allow-query</strong></span></span></dt>
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
2924 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
2925 <h3 class="title">Note</h3>
2927 <span><strong class="command">allow-query-cache</strong></span> is now
2928 used to specify access to the cache.
2932 <dt><span class="term"><span><strong class="command">allow-query-cache</strong></span></span></dt>
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.
2942 <dt><span class="term"><span><strong class="command">allow-recursion</strong></span></span></dt>
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.
2953 <dt><span class="term"><span><strong class="command">allow-update</strong></span></span></dt>
2955 Specifies which hosts are allowed to
2956 submit Dynamic DNS updates for master zones. The default is
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 “Dynamic Update Security”</a> for details.
2962 <dt><span class="term"><span><strong class="command">allow-update-forwarding</strong></span></span></dt>
2965 Specifies which hosts are allowed to
2966 submit Dynamic DNS updates to slave zones to be forwarded to
2968 master. The default is <strong class="userinput"><code>{ none; }</code></strong>,
2970 means that no update forwarding will be performed. To
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
2979 master server, not the slaves.
2982 Note that enabling the update forwarding feature on a slave
2984 may expose master servers relying on insecure IP address
2986 access control to attacks; see <a href="Bv9ARM.ch07.html#dynamic_update_security" title="Dynamic Update Security">the section called “Dynamic Update Security”</a>
2990 <dt><span class="term"><span><strong class="command">allow-v6-synthesis</strong></span></span></dt>
2992 This option was introduced for the smooth transition from
2994 to A6 and from "nibble labels" to binary labels.
2995 However, since both A6 and binary labels were then
2997 this option was also deprecated.
2998 It is now ignored with some warning messages.
3000 <dt><span class="term"><span><strong class="command">allow-transfer</strong></span></span></dt>
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>
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
3010 <dt><span class="term"><span><strong class="command">blackhole</strong></span></span></dt>
3012 Specifies a list of addresses that the
3013 server will not accept queries from or use to resolve a
3015 from these addresses will not be responded to. The default
3016 is <strong class="userinput"><code>none</code></strong>.
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>
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.
3031 Multiple <span><strong class="command">listen-on</strong></span> statements are
3035 <pre class="programlisting">listen-on { 5.6.7.8; };
3036 listen-on port 1234 { !1.2.3.4; 1.2/16; };
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.
3044 If no <span><strong class="command">listen-on</strong></span> is specified, the
3045 server will listen on port 53 on all interfaces.
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
3051 for incoming queries sent using IPv6.
3055 <pre class="programlisting">{ any; }</pre>
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
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.
3069 A list of particular IPv6 addresses can also be specified, in
3071 the server listens on a separate socket for each specified
3073 regardless of whether the desired API is supported by the system.
3076 Multiple <span><strong class="command">listen-on-v6</strong></span> options can
3080 <pre class="programlisting">listen-on-v6 { any; };
3081 listen-on-v6 port 1234 { !2001:db8::/32; any; };
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.)
3090 To make the server not listen on any IPv6 address, use
3092 <pre class="programlisting">listen-on-v6 { none; };
3095 If no <span><strong class="command">listen-on-v6</strong></span> option is
3097 the server will not listen on any IPv6 address.
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>
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>)
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.
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
3128 <pre class="programlisting">query-source address * port *;
3129 query-source-v6 address * port *;
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:
3141 <pre class="programlisting">use-v4-udp-ports { range 1024 65535; };
3142 use-v6-udp-ports { range 1024 65535; };
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>
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.
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.
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
3177 <pre class="programlisting">avoid-v4-udp-ports {};
3178 avoid-v6-udp-ports {};
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.
3188 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3189 <h3 class="title">Note</h3>
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
3194 UDP queries. TCP queries always use a random
3198 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3199 <h3 class="title">Note</h3>
3201 Solaris 2.5.1 and earlier does not support setting the source
3202 address for TCP sockets.
3205 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3206 <h3 class="title">Note</h3>
3208 See also <span><strong class="command">transfer-source</strong></span> and
3209 <span><strong class="command">notify-source</strong></span>.
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>
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.
3222 <div class="variablelist"><dl>
3223 <dt><span class="term"><span><strong class="command">also-notify</strong></span></span></dt>
3225 Defines a global list of IP addresses of name servers
3226 that are also sent NOTIFY messages whenever a fresh copy of
3228 zone is loaded, in addition to the servers listed in the
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,
3234 the <span><strong class="command">options also-notify</strong></span>
3235 statement. When a <span><strong class="command">zone notify</strong></span>
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
3241 list (no global notification list).
3243 <dt><span class="term"><span><strong class="command">max-transfer-time-in</strong></span></span></dt>
3245 Inbound zone transfers running longer than
3246 this many minutes will be terminated. The default is 120
3248 (2 hours). The maximum value is 28 days (40320 minutes).
3250 <dt><span class="term"><span><strong class="command">max-transfer-idle-in</strong></span></span></dt>
3252 Inbound zone transfers making no progress
3253 in this many minutes will be terminated. The default is 60
3255 (1 hour). The maximum value is 28 days (40320 minutes).
3257 <dt><span class="term"><span><strong class="command">max-transfer-time-out</strong></span></span></dt>
3259 Outbound zone transfers running longer than
3260 this many minutes will be terminated. The default is 120
3262 (2 hours). The maximum value is 28 days (40320 minutes).
3264 <dt><span class="term"><span><strong class="command">max-transfer-idle-out</strong></span></span></dt>
3266 Outbound zone transfers making no progress
3267 in this many minutes will be terminated. The default is 60
3269 hour). The maximum value is 28 days (40320 minutes).
3271 <dt><span class="term"><span><strong class="command">serial-query-rate</strong></span></span></dt>
3273 Slave servers will periodically query master servers
3274 to find out if zone serial numbers have changed. Each such
3276 a minute amount of the slave server's network bandwidth. To
3278 amount of bandwidth used, BIND 9 limits the rate at which
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
3285 <dt><span class="term"><span><strong class="command">serial-queries</strong></span></span></dt>
3287 In BIND 8, the <span><strong class="command">serial-queries</strong></span>
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.
3296 <dt><span class="term"><span><strong class="command">transfer-format</strong></span></span></dt>
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>
3318 <dt><span class="term"><span><strong class="command">transfers-in</strong></span></span></dt>
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
3327 <dt><span class="term"><span><strong class="command">transfers-out</strong></span></span></dt>
3329 The maximum number of outbound zone transfers
3330 that can be running concurrently. Zone transfer requests in
3332 of the limit will be refused. The default value is <code class="literal">10</code>.
3334 <dt><span class="term"><span><strong class="command">transfers-per-ns</strong></span></span></dt>
3336 The maximum number of inbound zone transfers
3337 that can be concurrently transferring from a given remote
3339 The default value is <code class="literal">2</code>.
3340 Increasing <span><strong class="command">transfers-per-ns</strong></span>
3342 speed up the convergence of slave zones, but it also may
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.
3348 <dt><span class="term"><span><strong class="command">transfer-source</strong></span></span></dt>
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
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
3371 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3372 <h3 class="title">Note</h3>
3374 Solaris 2.5.1 and earlier does not support setting the
3375 source address for TCP sockets.
3379 <dt><span class="term"><span><strong class="command">transfer-source-v6</strong></span></span></dt>
3381 The same as <span><strong class="command">transfer-source</strong></span>,
3382 except zone transfers are performed using IPv6.
3384 <dt><span class="term"><span><strong class="command">alt-transfer-source</strong></span></span></dt>
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
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
3402 <dt><span class="term"><span><strong class="command">alt-transfer-source-v6</strong></span></span></dt>
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
3409 <dt><span class="term"><span><strong class="command">use-alt-transfer-source</strong></span></span></dt>
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
3417 <dt><span class="term"><span><strong class="command">notify-source</strong></span></span></dt>
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
3433 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3434 <h3 class="title">Note</h3>
3436 Solaris 2.5.1 and earlier does not support setting the
3437 source address for TCP sockets.
3441 <dt><span class="term"><span><strong class="command">notify-source-v6</strong></span></span></dt>
3443 Like <span><strong class="command">notify-source</strong></span>,
3444 but applies to notify messages sent to IPv6 addresses.
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>
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 “Query Address”</a> about how the
3459 available ports are determined.
3460 For example, with the following configuration
3462 <pre class="programlisting">
3463 use-v6-udp-ports { range 32768 65535; };
3464 avoid-v6-udp-ports { 40000; range 50000 60000; };
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,
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
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.
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>
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
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>
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 “Configuration File Elements”</a>.
3507 The following options set operating system resource limits for
3508 the name server process. Some operating systems don't support
3510 any of the limits. On such systems, a warning will be issued if
3512 unsupported limit is used.
3514 <div class="variablelist"><dl>
3515 <dt><span class="term"><span><strong class="command">coresize</strong></span></span></dt>
3517 The maximum size of a core dump. The default
3518 is <code class="literal">default</code>.
3520 <dt><span class="term"><span><strong class="command">datasize</strong></span></span></dt>
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>
3537 <dt><span class="term"><span><strong class="command">files</strong></span></span></dt>
3539 The maximum number of files the server
3540 may have open concurrently. The default is <code class="literal">unlimited</code>.
3542 <dt><span class="term"><span><strong class="command">stacksize</strong></span></span></dt>
3544 The maximum amount of stack memory the server
3545 may use. The default is <code class="literal">default</code>.
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>
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.
3557 <div class="variablelist"><dl>
3558 <dt><span class="term"><span><strong class="command">max-ixfr-log-size</strong></span></span></dt>
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.
3565 <dt><span class="term"><span><strong class="command">max-journal-size</strong></span></span></dt>
3567 Sets a maximum size for each journal file
3568 (see <a href="Bv9ARM.ch04.html#journal" title="The journal file">the section called “The journal file”</a>). When the journal file
3570 the specified size, some of the oldest transactions in the
3572 will be automatically removed. The default is
3573 <code class="literal">unlimited</code>.
3575 <dt><span class="term"><span><strong class="command">host-statistics-max</strong></span></span></dt>
3577 In BIND 8, specifies the maximum number of host statistics
3579 Not implemented in BIND 9.
3581 <dt><span class="term"><span><strong class="command">recursive-clients</strong></span></span></dt>
3583 The maximum number of simultaneous recursive lookups
3584 the server will perform on behalf of clients. The default
3586 <code class="literal">1000</code>. Because each recursing
3588 bit of memory, on the order of 20 kilobytes, the value of
3590 <span><strong class="command">recursive-clients</strong></span> option may
3591 have to be decreased
3592 on hosts with limited memory.
3594 <dt><span class="term"><span><strong class="command">tcp-clients</strong></span></span></dt>
3596 The maximum number of simultaneous client TCP
3597 connections that the server will accept.
3598 The default is <code class="literal">100</code>.
3600 <dt><span class="term"><span><strong class="command">reserved-sockets</strong></span></span></dt>
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.
3613 This option has little effect on Windows.
3616 <dt><span class="term"><span><strong class="command">max-cache-size</strong></span></span></dt>
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
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
3631 Any positive values less than 2MB will be ignored reset
3633 In a server with multiple views, the limit applies
3634 separately to the cache of each view.
3637 <dt><span class="term"><span><strong class="command">tcp-listen-queue</strong></span></span></dt>
3639 The listen queue depth. The default and minimum is 3.
3640 If the kernel supports the accept filter "dataready" this
3642 many TCP connections that will be queued in kernel space
3644 some data before being passed to accept. Values less than 3
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>
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
3660 If set to 0, no periodic cleaning will occur.
3662 <dt><span class="term"><span><strong class="command">heartbeat-interval</strong></span></span></dt>
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
3668 to 1 day (1440 minutes). The maximum value is 28 days
3670 If set to 0, no zone maintenance for these zones will occur.
3672 <dt><span class="term"><span><strong class="command">interface-interval</strong></span></span></dt>
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
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
3685 stop listening on interfaces that have gone away.
3687 <dt><span class="term"><span><strong class="command">statistics-interval</strong></span></span></dt>
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.
3696 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3697 <h3 class="title">Note</h3>
3699 Not yet implemented in
3700 <acronym class="acronym">BIND</acronym> 9.
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>
3710 All other things being equal, when the server chooses a name
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
3716 in a special way. Each top-level list element is assigned a
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.
3726 <pre class="programlisting">topology {
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.
3738 The default topology is
3740 <pre class="programlisting"> topology { localhost; localnets; };
3742 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3743 <h3 class="title">Note</h3>
3745 The <span><strong class="command">topology</strong></span> option
3746 is not implemented in <acronym class="acronym">BIND</acronym> 9.
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>
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 “RRset Ordering”</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
3763 However, not all resolvers can do this or are correctly
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.
3770 The <span><strong class="command">sortlist</strong></span> statement (see below)
3772 an <span><strong class="command">address_match_list</strong></span> and
3774 more specifically than the <span><strong class="command">topology</strong></span>
3776 does (<a href="Bv9ARM.ch06.html#topology" title="Topology">the section called “Topology”</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
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.
3786 Once the source address of the query has been matched, if
3787 the top level statement contains only one element, the actual
3789 element that matched the source address is used to select the
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
3796 is assigned a distance and the address in the response with the
3798 distance is moved to the beginning of the response.
3801 In the following example, any queries received from any of
3802 the addresses of the host itself will get responses preferring
3804 on any of the locally connected networks. Next most preferred are
3806 on the 192.168.1/24 network, and after that either the
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
3813 192.168.3/24 networks. Queries received from a host on the
3815 or the 192.168.5/24 network will only prefer other addresses on
3816 their directly connected networks.
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
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
3841 networks. Responses sent to queries from any other hosts on a
3843 connected network will prefer addresses on that same network.
3845 to other queries will not be sorted.
3847 <pre class="programlisting">sortlist {
3848 { localhost; localnets; };
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>
3857 When multiple records are returned in an answer it may be
3858 useful to configure the order of the records placed into the
3860 The <span><strong class="command">rrset-order</strong></span> statement permits
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 “The <span><strong class="command">sortlist</strong></span> Statement”</a>.
3867 An <span><strong class="command">order_spec</strong></span> is defined as
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>
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).
3882 The legal values for <span><strong class="command">ordering</strong></span> are:
3884 <div class="informaltable"><table border="1">
3892 <p><span><strong class="command">fixed</strong></span></p>
3896 Records are returned in the order they
3897 are defined in the zone file.
3903 <p><span><strong class="command">random</strong></span></p>
3907 Records are returned in some random order.
3913 <p><span><strong class="command">cyclic</strong></span></p>
3917 Records are returned in a round-robin
3927 <pre class="programlisting">rrset-order {
3928 class IN type A name "host.example.com" order random;
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.
3939 If multiple <span><strong class="command">rrset-order</strong></span> statements
3941 they are not combined — the last one applies.
3943 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3944 <h3 class="title">Note</h3>
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.
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>
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
3963 <code class="literal">1800</code> (30 minutes).
3965 <dt><span class="term"><span><strong class="command">max-ncache-ttl</strong></span></span></dt>
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
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
3975 be silently truncated to 7 days if set to a greater value.
3977 <dt><span class="term"><span><strong class="command">max-cache-ttl</strong></span></span></dt>
3979 Sets the maximum time for which the server will
3980 cache ordinary (positive) answers. The default is
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
3987 <dt><span class="term"><span><strong class="command">min-roots</strong></span></span></dt>
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>.
3995 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3996 <h3 class="title">Note</h3>
3998 Not implemented in <acronym class="acronym">BIND</acronym> 9.
4002 <dt><span class="term"><span><strong class="command">sig-validity-interval</strong></span></span></dt>
4004 Specifies the number of days into the
4005 future when DNSSEC signatures automatically generated as a
4007 of dynamic updates (<a href="Bv9ARM.ch04.html#dynamic_update" title="Dynamic Update">the section called “Dynamic Update”</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
4012 to allow for a limited amount of clock skew.
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>
4019 These options control the server's behavior on refreshing a
4021 (querying for SOA changes) or retrying failed transfers.
4022 Usually the SOA values for the zone are used, but these
4024 are set by the master, giving slave server administrators
4026 control over their contents.
4029 These options allow the administrator to set a minimum and
4031 refresh and retry time either per-zone, per-view, or
4033 These options are valid for slave and stub zones,
4034 and clamp the SOA refresh and retry times to the specified
4038 <dt><span class="term"><span><strong class="command">edns-udp-size</strong></span></span></dt>
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
4049 <dt><span class="term"><span><strong class="command">max-udp-size</strong></span></span></dt>
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>).
4062 <dt><span class="term"><span><strong class="command">masterfile-format</strong></span></span></dt>
4064 the file format of zone files (see
4065 <a href="Bv9ARM.ch06.html#zonefile_format" title="Additional File Formats">the section called “Additional File Formats”</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
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>
4092 initial value (minimum) and maximum number of recursive
4093 simultanious clients for any given query
4094 (<qname,qtype,qclass>) 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.
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
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.
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>.
4120 <dt><span class="term"><span><strong class="command">notify-delay</strong></span></span></dt>
4122 The delay, in seconds, between sending sets of notify
4123 messages for a zone. The default is zero.
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>
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
4136 built-in view (see <a href="Bv9ARM.ch06.html#view_statement_grammar" title="view Statement Grammar">the section called “<span><strong class="command">view</strong></span> Statement Grammar”</a>) of
4138 <span><strong class="command">CHAOS</strong></span> which is separate from the
4140 class <span><strong class="command">IN</strong></span>; therefore, any global
4142 such as <span><strong class="command">allow-query</strong></span> do not apply
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>
4147 defining an explicit view of class <span><strong class="command">CHAOS</strong></span>
4148 that matches all clients.
4150 <div class="variablelist"><dl>
4151 <dt><span class="term"><span><strong class="command">version</strong></span></span></dt>
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.
4160 <dt><span class="term"><span><strong class="command">hostname</strong></span></span></dt>
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
4167 found by the gethostname() function. The primary purpose of such queries
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.
4173 <dt><span class="term"><span><strong class="command">server-id</strong></span></span></dt>
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>.
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>
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.
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.
4208 The current list of empty zones is:
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>
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:
4233 <pre class="programlisting">
4234 disable-empty-zone ".";
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.
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.
4254 <div class="variablelist"><dl>
4255 <dt><span class="term"><span><strong class="command">empty-server</strong></span></span></dt>
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.
4261 <dt><span class="term"><span><strong class="command">empty-contact</strong></span></span></dt>
4263 Specify what contact name will appear in the returned
4264 SOA record for empty zones. If none is specified, then
4267 <dt><span class="term"><span><strong class="command">empty-zones-enable</strong></span></span></dt>
4269 Enable or disable all empty zones. By default they
4272 <dt><span class="term"><span><strong class="command">disable-empty-zone</strong></span></span></dt>
4274 Disable individual empty zones. By default none are
4275 disabled. This option can be specified multiple times.
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>
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.
4288 The statistics dump begins with a line, like:
4291 <span><strong class="command">+++ Statistics Dump +++ (973798949)</strong></span>
4294 The number in parentheses is a standard
4295 Unix-style timestamp, measured as seconds since January 1, 1970.
4297 that line are a series of lines containing a counter type, the
4299 counter, optionally a zone name, and optionally a view name.
4300 The lines without view and zone listed are global statistics for
4302 Lines with a zone and view name for the given view and zone (the
4304 omitted for the default view).
4307 The statistics dump ends with the line where the
4308 number is identical to the number in the beginning line; for example:
4311 <span><strong class="command">--- Statistics Dump --- (973798949)</strong></span>
4314 The following statistics counters are maintained:
4316 <div class="informaltable"><table border="1">
4324 <p><span><strong class="command">success</strong></span></p>
4329 successful queries made to the server or zone. A
4331 is defined as query which returns a NOERROR response
4339 <p><span><strong class="command">referral</strong></span></p>
4343 The number of queries which resulted
4344 in referral responses.
4350 <p><span><strong class="command">nxrrset</strong></span></p>
4354 The number of queries which resulted in
4355 NOERROR responses with no data.
4361 <p><span><strong class="command">nxdomain</strong></span></p>
4366 of queries which resulted in NXDOMAIN responses.
4372 <p><span><strong class="command">failure</strong></span></p>
4376 The number of queries which resulted in a
4377 failure response other than those above.
4383 <p><span><strong class="command">recursion</strong></span></p>
4387 The number of queries which caused the server
4388 to perform recursion in order to find the final answer.
4394 <p><span><strong class="command">duplicate</strong></span></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.
4407 <p><span><strong class="command">dropped</strong></span></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.
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
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>
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
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
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
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.
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
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
4475 for acache by using <span><strong class="command">max-acache-size</strong></span>.
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.
4494 The following is a summary of options related to
4495 <span><strong class="command">acache</strong></span>.
4497 <div class="variablelist"><dl>
4498 <dt><span class="term"><span><strong class="command">acache-enable</strong></span></span></dt>
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>.
4503 <dt><span class="term"><span><strong class="command">acache-cleaning-interval</strong></span></span></dt>
4505 The server will remove stale cache entries, based on an LRU
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.
4511 <dt><span class="term"><span><strong class="command">max-acache-size</strong></span></span></dt>
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,
4516 will clean more aggressively so that the limit is not
4518 In a server with multiple views, the limit applies
4520 acache of each view.
4521 The default is <code class="literal">unlimited</code>,
4523 entries are purged from the acache only at the
4524 periodic cleaning time.
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>]
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>
4556 The <span><strong class="command">server</strong></span> statement defines
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
4561 server clause applies regardless of the order in
4562 <code class="filename">named.conf</code>.
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>
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
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>
4575 any top-level <span><strong class="command">server</strong></span> statements are
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
4583 value of <span><strong class="command">bogus</strong></span> is <span><strong class="command">no</strong></span>.
4586 The <span><strong class="command">provide-ixfr</strong></span> clause determines
4588 the local server, acting as master, will respond with an
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
4593 whenever possible. If set to <span><strong class="command">no</strong></span>,
4595 to the remote server will be non-incremental. If not set, the
4597 of the <span><strong class="command">provide-ixfr</strong></span> option in the
4599 global options block is used as a default.
4602 The <span><strong class="command">request-ixfr</strong></span> clause determines
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
4608 global options block is used as a default.
4611 IXFR requests to servers that do not support IXFR will
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
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
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.
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>.
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.
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
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>
4657 by the <span><strong class="command">options</strong></span> statement will be
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.
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 “TSIG”</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
4676 to be signed by this key.
4679 Although the grammar of the <span><strong class="command">keys</strong></span>
4681 allows for multiple keys, only a single key per server is
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,
4691 For an IPv4 remote server, only <span><strong class="command">transfer-source</strong></span> can
4693 Similarly, for an IPv6 remote server, only
4694 <span><strong class="command">transfer-source-v6</strong></span> can be
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 “Zone Transfers”</a>.
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.
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.
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>]
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>
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 “DNSSEC”</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.
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
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.
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>]
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>
4776 The <span><strong class="command">view</strong></span> statement is a powerful
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
4782 split DNS setups without having to run multiple servers.
4785 Each <span><strong class="command">view</strong></span> statement defines a view
4787 DNS namespace that will be seen by a subset of clients. A client
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
4795 <span><strong class="command">match-destinations</strong></span> clause. If not
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
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
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
4809 a client request will be resolved in the context of the first
4810 <span><strong class="command">view</strong></span> that it matches.
4813 Zones defined within a <span><strong class="command">view</strong></span>
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,
4819 and "external" clients in a split DNS setup.
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>
4825 apply only when resolving queries with that view. When no
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
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.
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.
4840 If there are no <span><strong class="command">view</strong></span> statements in
4842 file, a default view that matches any client is automatically
4844 in class IN. Any <span><strong class="command">zone</strong></span> statements
4846 the top level of the configuration file are considered to be part
4848 this default view, and the <span><strong class="command">options</strong></span>
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>
4853 occur inside <span><strong class="command">view</strong></span> statements.
4856 Here is an example of a typical split DNS setup implemented
4857 using <span><strong class="command">view</strong></span> statements:
4859 <pre class="programlisting">view "internal" {
4860 // This should match our internal networks.
4861 match-clients { 10.0.0.0/8; };
4863 // Provide recursive service to internal clients only.
4866 // Provide a complete view of the example.com zone
4867 // including addresses of internal hosts.
4868 zone "example.com" {
4870 file "example-internal.db";
4875 // Match all clients not matched by the previous view.
4876 match-clients { any; };
4878 // Refuse recursive service to external clients.
4881 // Provide a restricted view of the example.com zone
4882 // containing only publicly accessible hosts.
4883 zone "example.com" {
4885 file "example-external.db";
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>] {
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>]
4933 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
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>]
4976 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
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>]
4983 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
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>]
5011 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
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>]
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;
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">
5039 <code class="varname">master</code>
5044 The server has a master copy of the data
5045 for the zone and will be able to provide authoritative
5054 <code class="varname">slave</code>
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
5066 By default, transfers are made from port 53 on the
5068 be changed for all servers by specifying a port number
5070 list of IP addresses, or on a per-server basis after
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
5077 and reloaded from this file on a server restart. Use
5079 recommended, since it often speeds server startup and
5081 a needless waste of bandwidth. Note that for large
5083 tens or hundreds of thousands) of zones per server, it
5085 use a two-level naming scheme for zone filenames. For
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
5092 behave very slowly if you put 100 000 files into
5093 a single directory.)
5100 <code class="varname">stub</code>
5105 A stub zone is similar to a slave zone,
5106 except that it replicates only the NS records of a
5108 of the entire zone. Stub zones are not a standard part
5110 they are a feature specific to the <acronym class="acronym">BIND</acronym> implementation.
5114 Stub zones can be used to eliminate the need for glue
5116 in a parent zone at the expense of maintaining a stub
5118 a set of name server addresses in <code class="filename">named.conf</code>.
5119 This usage is not recommended for new configurations,
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
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
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
5134 parent zone also need to have the same child stub
5140 Stub zones can also be used as a way of forcing the
5142 of a given domain to use a particular set of
5143 authoritative servers.
5144 For example, the caching name servers on a private
5146 RFC1918 addressing may be configured with stub zones
5148 <code class="literal">10.in-addr.arpa</code>
5149 to use a set of internal name servers as the
5151 servers for that domain.
5158 <code class="varname">forward</code>
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>
5169 which will apply to queries within the domain given by
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
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
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
5183 servers as set globally) you need to re-specify the
5191 <code class="varname">hint</code>
5196 The initial set of root name servers is
5197 specified using a "hint zone". When the server starts
5199 the root hints to find a root name server and get the
5201 list of root name servers. If no hint zone is
5203 IN, the server uses a compiled-in default set of root
5205 Classes other than IN have no built-in defaults hints.
5212 <code class="varname">delegation-only</code>
5217 This is used to enforce the delegation-only
5218 status of infrastructure zones (e.g. COM, NET, ORG).
5220 is received without an explicit or implicit delegation
5222 section will be treated as NXDOMAIN. This does not
5224 apex. This should not be applied to leaf zones.
5227 <code class="varname">delegation-only</code> has no
5228 effect on answers received
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>
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.
5245 The <code class="literal">hesiod</code> class is
5246 named for an information service from MIT's Project Athena. It
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.
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.
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>
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 “Access Control”</a>.
5267 <dt><span class="term"><span><strong class="command">allow-query</strong></span></span></dt>
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 “Access Control”</a>.
5272 <dt><span class="term"><span><strong class="command">allow-transfer</strong></span></span></dt>
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 “Access Control”</a>.
5277 <dt><span class="term"><span><strong class="command">allow-update</strong></span></span></dt>
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 “Access Control”</a>.
5282 <dt><span class="term"><span><strong class="command">update-policy</strong></span></span></dt>
5284 Specifies a "Simple Secure Update" policy. See
5285 <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called “Dynamic Update Policies”</a>.
5287 <dt><span class="term"><span><strong class="command">allow-update-forwarding</strong></span></span></dt>
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 “Access Control”</a>.
5292 <dt><span class="term"><span><strong class="command">also-notify</strong></span></span></dt>
5294 Only meaningful if <span><strong class="command">notify</strong></span>
5296 active for this zone. The set of machines that will
5298 <code class="literal">DNS NOTIFY</code> message
5299 for this zone is made up of all the listed name servers
5301 the primary master) for the zone plus any IP addresses
5303 with <span><strong class="command">also-notify</strong></span>. A port
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.
5312 <dt><span class="term"><span><strong class="command">check-names</strong></span></span></dt>
5314 This option is used to restrict the character set and
5316 certain domain names in master files and/or DNS responses
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>.
5321 <dt><span class="term"><span><strong class="command">check-mx</strong></span></span></dt>
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 “Boolean Options”</a>.
5326 <dt><span class="term"><span><strong class="command">check-wildcard</strong></span></span></dt>
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 “Boolean Options”</a>.
5331 <dt><span class="term"><span><strong class="command">check-integrity</strong></span></span></dt>
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 “Boolean Options”</a>.
5336 <dt><span class="term"><span><strong class="command">check-sibling</strong></span></span></dt>
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 “Boolean Options”</a>.
5341 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl</strong></span></span></dt>
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 “Boolean Options”</a>.
5346 <dt><span class="term"><span><strong class="command">update-check-ksk</strong></span></span></dt>
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 “Boolean Options”</a>.
5351 <dt><span class="term"><span><strong class="command">database</strong></span></span></dt>
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.
5358 identifies the database type, and any subsequent words are
5360 as arguments to the database to be interpreted in a way
5362 to the database type.
5365 The default is <strong class="userinput"><code>"rbt"</code></strong>, BIND 9's
5367 red-black-tree database. This database does not take
5371 Other values are possible if additional database drivers
5372 have been linked into the server. Some sample drivers are
5374 with the distribution but none are linked in by default.
5377 <dt><span class="term"><span><strong class="command">dialup</strong></span></span></dt>
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 “Boolean Options”</a>.
5382 <dt><span class="term"><span><strong class="command">delegation-only</strong></span></span></dt>
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
5387 is also a delegation-only type zone.
5389 <dt><span class="term"><span><strong class="command">forward</strong></span></span></dt>
5391 Only meaningful if the zone has a forwarders
5392 list. The <span><strong class="command">only</strong></span> value causes
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.
5397 <dt><span class="term"><span><strong class="command">forwarders</strong></span></span></dt>
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
5404 <dt><span class="term"><span><strong class="command">ixfr-base</strong></span></span></dt>
5406 Was used in <acronym class="acronym">BIND</acronym> 8 to
5408 of the transaction log (journal) file for dynamic update
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>"
5416 <dt><span class="term"><span><strong class="command">ixfr-tmp-file</strong></span></span></dt>
5418 Was an undocumented option in <acronym class="acronym">BIND</acronym> 8.
5419 Ignored in <acronym class="acronym">BIND</acronym> 9.
5421 <dt><span class="term"><span><strong class="command">journal</strong></span></span></dt>
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.
5427 <dt><span class="term"><span><strong class="command">max-transfer-time-in</strong></span></span></dt>
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 “Zone Transfers”</a>.
5432 <dt><span class="term"><span><strong class="command">max-transfer-idle-in</strong></span></span></dt>
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 “Zone Transfers”</a>.
5437 <dt><span class="term"><span><strong class="command">max-transfer-time-out</strong></span></span></dt>
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 “Zone Transfers”</a>.
5442 <dt><span class="term"><span><strong class="command">max-transfer-idle-out</strong></span></span></dt>
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 “Zone Transfers”</a>.
5447 <dt><span class="term"><span><strong class="command">notify</strong></span></span></dt>
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 “Boolean Options”</a>.
5452 <dt><span class="term"><span><strong class="command">notify-delay</strong></span></span></dt>
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 “Tuning”</a>.
5457 <dt><span class="term"><span><strong class="command">pubkey</strong></span></span></dt>
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
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.
5466 <dt><span class="term"><span><strong class="command">zone-statistics</strong></span></span></dt>
5468 If <strong class="userinput"><code>yes</code></strong>, the server will keep
5470 information for this zone, which can be dumped to the
5471 <span><strong class="command">statistics-file</strong></span> defined in
5474 <dt><span class="term"><span><strong class="command">sig-validity-interval</strong></span></span></dt>
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 “Tuning”</a>.
5479 <dt><span class="term"><span><strong class="command">transfer-source</strong></span></span></dt>
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 “Zone Transfers”</a>.
5484 <dt><span class="term"><span><strong class="command">transfer-source-v6</strong></span></span></dt>
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 “Zone Transfers”</a>.
5489 <dt><span class="term"><span><strong class="command">alt-transfer-source</strong></span></span></dt>
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 “Zone Transfers”</a>.
5494 <dt><span class="term"><span><strong class="command">alt-transfer-source-v6</strong></span></span></dt>
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 “Zone Transfers”</a>.
5499 <dt><span class="term"><span><strong class="command">use-alt-transfer-source</strong></span></span></dt>
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 “Zone Transfers”</a>.
5504 <dt><span class="term"><span><strong class="command">notify-source</strong></span></span></dt>
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 “Zone Transfers”</a>.
5509 <dt><span class="term"><span><strong class="command">notify-source-v6</strong></span></span></dt>
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 “Zone Transfers”</a>.
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>
5518 See the description in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called “Tuning”</a>.
5520 <dt><span class="term"><span><strong class="command">ixfr-from-differences</strong></span></span></dt>
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 “Boolean Options”</a>.
5525 <dt><span class="term"><span><strong class="command">key-directory</strong></span></span></dt>
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 “<span><strong class="command">options</strong></span> Statement Definition and
5532 <dt><span class="term"><span><strong class="command">multi-master</strong></span></span></dt>
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 “Boolean Options”</a>.
5537 <dt><span class="term"><span><strong class="command">masterfile-format</strong></span></span></dt>
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 “Tuning”</a>.
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>
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>
5553 <span><strong class="command">update-policy</strong></span> option,
5557 The <span><strong class="command">allow-update</strong></span> clause works the
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.
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
5567 A set of rules is specified, where each rule either grants or
5569 permissions for one or more names to be updated by one or more
5571 If the dynamic update request message is signed (that is, it
5573 either a TSIG or SIG(0) record), the identity of the signer can
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>
5582 examines the signer of a message; the source address is not
5586 This is how a rule definition looks:
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>]
5592 Each rule grants or denies privileges. Once a message has
5593 successfully matched a rule, the operation is immediately
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
5599 the types specified in the type field.
5602 The identity field specifies a name or a wildcard name.
5604 is the name of the TSIG or SIG(0) key used to sign the update
5606 TKEY exchange has been used to create a shared secret, the
5608 shared secret is the same as the identity of the key used to
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
5613 to multiple identities. The <em class="replaceable"><code>identity</code></em> field must
5614 contain a fully-qualified domain name.
5617 The <em class="replaceable"><code>nametype</code></em> field has 6
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>.
5623 <div class="informaltable"><table border="1">
5632 <code class="varname">name</code>
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.
5647 <code class="varname">subdomain</code>
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>
5662 <code class="varname">wildcard</code>
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.
5677 <code class="varname">self</code>
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
5701 <code class="varname">selfsub</code>
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.
5715 <code class="varname">selfwild</code>
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.
5729 In all cases, the <em class="replaceable"><code>name</code></em>
5731 specify a fully-qualified domain name.
5734 If no types are explicitly specified, this rule matches all
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
5739 Note that when an attempt is made to delete all records
5741 name, the rules are checked for each existing record type.
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>
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
5757 and implemented in the DNS. These are also included.
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>
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 “The <span><strong class="command">sortlist</strong></span> Statement”</a> and <a href="Bv9ARM.ch06.html#rrset_ordering" title="RRset Ordering">the section called “RRset Ordering”</a>.
5773 The components of a Resource Record are:
5775 <div class="informaltable"><table border="1">
5789 The domain name where the RR is found.
5801 An encoded 16-bit value that specifies
5802 the type of the resource record.
5814 The time-to-live of the RR. This field
5815 is a 32-bit integer in units of seconds, and is
5817 resolvers when they cache RRs. The TTL describes how
5819 be cached before it should be discarded.
5831 An encoded 16-bit value that identifies
5832 a protocol family or instance of a protocol.
5844 The resource data. The format of the
5845 data is type (and sometimes class) specific.
5852 The following are <span class="emphasis"><em>types</em></span> of valid RRs:
5854 <div class="informaltable"><table border="1">
5868 A host address. In the IN class, this is a
5869 32-bit IP address. Described in RFC 1035.
5881 IPv6 address. Described in RFC 1886.
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.
5909 Location of AFS database servers.
5910 Experimental. Described in RFC 1183.
5922 Address prefix list. Experimental.
5923 Described in RFC 3123.
5935 Holds a digital certificate.
5936 Described in RFC 2538.
5948 Identifies the canonical name of an alias.
5949 Described in RFC 1035.
5961 Replaces the domain name specified with
5962 another name to be looked up, effectively aliasing an
5964 subtree of the domain name space rather than a single
5966 as in the case of the CNAME RR.
5967 Described in RFC 2672.
5979 Stores a public key associated with a signed
5980 DNS zone. Described in RFC 4034.
5992 Stores the hash of a public key associated with a
5993 signed DNS zone. Described in RFC 4034.
6005 Specifies the global position. Superseded by LOC.
6017 Identifies the CPU and OS used by a host.
6018 Described in RFC 1035.
6030 Provides a method for storing IPsec keying material in
6031 DNS. Described in RFC 4025.
6043 Representation of ISDN addresses.
6044 Experimental. Described in RFC 1183.
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.
6071 Identifies a key exchanger for this
6072 DNS name. Described in RFC 2230.
6084 For storing GPS info. Described in RFC 1876.
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.
6112 Name authority pointer. Described in RFC 2915.
6124 A network service access point.
6125 Described in RFC 1706.
6137 The authoritative name server for the
6138 domain. Described in RFC 1035.
6150 Used in DNSSECbis to securely indicate that
6151 RRs with an owner name in a certain name interval do
6153 a zone and indicate what RR types are present for an
6155 Described in RFC 4034.
6167 Used in DNSSEC to securely indicate that
6168 RRs with an owner name in a certain name interval do
6170 a zone and indicate what RR types are present for an
6172 Used in original DNSSEC; replaced by NSEC in
6174 Described in RFC 2535.
6186 A pointer to another part of the domain
6187 name space. Described in RFC 1035.
6199 Provides mappings between RFC 822 and X.400
6200 addresses. Described in RFC 2163.
6212 Information on persons responsible
6213 for the domain. Experimental. Described in RFC 1183.
6225 Contains DNSSECbis signature data. Described
6238 Route-through binding for hosts that
6239 do not have their own direct wide area network
6241 Experimental. Described in RFC 1183.
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.
6268 Identifies the start of a zone of authority.
6269 Described in RFC 1035.
6281 Contains the Sender Policy Framework information
6282 for a given email domain. Described in RFC 4408.
6294 Information about well known network
6295 services (replaces WKS). Described in RFC 2782.
6307 Provides a way to securly publish a secure shell key's
6308 fingerprint. Described in RFC 4255.
6320 Text records. Described in RFC 1035.
6332 Information about which well known
6333 network services, such as SMTP, that a domain
6334 supports. Historical.
6346 Representation of X.25 network addresses.
6347 Experimental. Described in RFC 1183.
6354 The following <span class="emphasis"><em>classes</em></span> of resource records
6355 are currently valid in the DNS:
6357 <div class="informaltable"><table border="1">
6383 Chaosnet, a LAN protocol created at MIT in the
6385 Rarely used for its historical purpose, but reused for
6387 built-in server information zones, e.g.,
6388 <code class="literal">version.bind</code>.
6400 Hesiod, an information service
6401 developed by MIT's Project Athena. It is used to share
6403 about various systems databases, such as users,
6412 The owner name is often implicit, rather than forming an
6414 part of the RR. For example, many name servers internally form
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)
6420 fits the needs of the resource being described.
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
6426 data in zones; it is also timed out, but by the refreshing
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
6432 of Internet performance suggest that these times should be on
6434 order of days for the typical host. If a change can be
6436 the TTL can be reduced prior to the change to minimize
6438 during the change, and then increased back to its former value
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
6446 used as "pointers" to other data in the DNS.
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>
6453 RRs are represented in binary form in the packets of the DNS
6454 protocol, and are usually represented in highly encoded form
6456 stored in a name server or resolver. In the examples provided
6458 RFC 1034, a style similar to that used in master files was
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
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
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
6476 parsing, type and class mnemonics are disjoint, TTLs are
6478 and the type mnemonic is always last. The IN class and TTL
6480 are often omitted from examples in the interests of clarity.
6483 The resource data or RDATA section of the RR are given using
6484 knowledge of the typical representation for the data.
6487 For example, we might show the RRs carried in a message as:
6489 <div class="informaltable"><table border="1">
6499 <code class="literal">ISI.EDU.</code>
6504 <code class="literal">MX</code>
6509 <code class="literal">10 VENERA.ISI.EDU.</code>
6519 <code class="literal">MX</code>
6524 <code class="literal">10 VAXA.ISI.EDU</code>
6531 <code class="literal">VENERA.ISI.EDU</code>
6536 <code class="literal">A</code>
6541 <code class="literal">128.9.0.32</code>
6551 <code class="literal">A</code>
6556 <code class="literal">10.1.0.52</code>
6563 <code class="literal">VAXA.ISI.EDU</code>
6568 <code class="literal">A</code>
6573 <code class="literal">10.2.0.27</code>
6583 <code class="literal">A</code>
6588 <code class="literal">128.9.0.33</code>
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
6598 IP address format to contain a 32-bit internet address.
6601 The above example shows six RRs, with two RRs at each of three
6605 Similarly we might see:
6607 <div class="informaltable"><table border="1">
6617 <code class="literal">XX.LCS.MIT.EDU.</code>
6622 <code class="literal">IN A</code>
6627 <code class="literal">10.0.0.44</code>
6635 <code class="literal">CH A</code>
6640 <code class="literal">MIT.EDU. 2420</code>
6647 This example shows two addresses for
6648 <code class="literal">XX.LCS.MIT.EDU</code>, each of a different class.
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>
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.
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
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
6673 Priority numbers do not have any absolute meaning — they are
6675 only respective to other MX records for that domain name. The
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) — CNAME is not sufficient.
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.
6685 the mail will be delivered to the server specified in the MX
6687 pointed to by the CNAME.
6692 <div class="informaltable"><table border="1">
6704 <code class="literal">example.com.</code>
6709 <code class="literal">IN</code>
6714 <code class="literal">MX</code>
6719 <code class="literal">10</code>
6724 <code class="literal">mail.example.com.</code>
6734 <code class="literal">IN</code>
6739 <code class="literal">MX</code>
6744 <code class="literal">10</code>
6749 <code class="literal">mail2.example.com.</code>
6759 <code class="literal">IN</code>
6764 <code class="literal">MX</code>
6769 <code class="literal">20</code>
6774 <code class="literal">mail.backup.org.</code>
6781 <code class="literal">mail.example.com.</code>
6786 <code class="literal">IN</code>
6791 <code class="literal">A</code>
6796 <code class="literal">10.0.0.1</code>
6806 <code class="literal">mail2.example.com.</code>
6811 <code class="literal">IN</code>
6816 <code class="literal">A</code>
6821 <code class="literal">10.0.0.2</code>
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
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>
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
6846 used in a zone file.
6848 <div class="informaltable"><table border="1">
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.
6868 The maximum time for
6869 negative caching is 3 hours (3h).
6881 The $TTL directive at the top of the
6882 zone file (before the SOA) gives a default TTL for every
6896 Each RR can have a TTL as the second
6897 field in the RR, which will control how long other
6906 All of these TTLs default to units of seconds, though units
6907 can be explicitly specified, for example, <code class="literal">1h30m</code>.
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>
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
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,
6925 PTR records if the machine has more than one name. For example,
6926 in the [<span class="optional">example.com</span>] domain:
6928 <div class="informaltable"><table border="1">
6937 <code class="literal">$ORIGIN</code>
6942 <code class="literal">2.1.10.in-addr.arpa</code>
6949 <code class="literal">3</code>
6954 <code class="literal">IN PTR foo.example.com.</code>
6960 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
6961 <h3 class="title">Note</h3>
6963 The <span><strong class="command">$ORIGIN</strong></span> lines in the examples
6964 are for providing context to the examples only — they do not
6966 appear in the actual usage. They are only used here to indicate
6967 that the example is relative to the listed origin.
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>
6975 The Master File Format was initially defined in RFC 1035 and
6976 has subsequently been extended. While the Master File Format
6978 is class independent all records in a Master File must be of the
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>
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>
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>]
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 <<code class="varname">zone-name</code>><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.
7003 <pre class="programlisting">
7004 $ORIGIN example.com.
7005 WWW CNAME MAIN-SERVER
7010 <pre class="programlisting">
7011 WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
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>
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>]
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
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.
7036 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
7037 <h3 class="title">Note</h3>
7039 RFC 1035 specifies that the current origin should be restored
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
7045 This could be construed as a deviation from RFC 1035, a
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>
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>]
7060 Set the default Time To Live (TTL) for subsequent records
7061 with undefined TTLs. Valid TTLs are of the range 0-2147483647
7064 <p><span><strong class="command">$TTL</strong></span>
7065 is defined in RFC 2308.
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>
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>]
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.
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>
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.
7101 127.0.0.192.IN-ADDR.ARPA. CNAME 127.0.0.0.192.IN-ADDR.ARPA.
7103 <div class="informaltable"><table border="1">
7111 <p><span><strong class="command">range</strong></span></p>
7115 This can be one of two forms: start-stop
7116 or start-stop/step. If the first form is used, then step
7118 1. All of start, stop and step must be positive.
7124 <p><span><strong class="command">lhs</strong></span></p>
7128 describes the owner name of the resource records
7129 to be created. Any single <span><strong class="command">$</strong></span>
7131 symbols within the <span><strong class="command">lhs</strong></span> side
7132 are replaced by the iterator value.
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.
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
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
7162 For compatibility with earlier versions, <span><strong class="command">$$</strong></span> is still
7163 recognized as indicating a literal $ in the output.
7169 <p><span><strong class="command">ttl</strong></span></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.
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.
7185 <p><span><strong class="command">class</strong></span></p>
7189 Specifies the class of the generated records.
7190 This must match the zone class if it is
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.
7201 <p><span><strong class="command">type</strong></span></p>
7205 At present the only supported types are
7206 PTR, CNAME, DNAME, A, AAAA and NS.
7212 <p><span><strong class="command">rhs</strong></span></p>
7216 <span><strong class="command">rhs</strong></span> is a domain name. It is processed
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.
7228 BIND 8 does not support the optional TTL and CLASS fields.
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>
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
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.
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.
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.
7275 <div class="navfooter">
7277 <table width="100%" summary="Navigation footer">
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>
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>