2 - Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000-2003 Internet Software Consortium.
5 - Permission to use, copy, modify, and/or distribute this software for any
6 - purpose with or without fee is hereby granted, provided that the above
7 - copyright notice and this permission notice appear in all copies.
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.
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#id2573342">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#id2573996"><span><strong class="command">acl</strong></span> Statement Grammar</a></span></dt>
56 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#acl"><span><strong class="command">acl</strong></span> Statement Definition and
58 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574186"><span><strong class="command">controls</strong></span> Statement Grammar</a></span></dt>
59 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage"><span><strong class="command">controls</strong></span> Statement Definition and
61 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574614"><span><strong class="command">include</strong></span> Statement Grammar</a></span></dt>
62 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574631"><span><strong class="command">include</strong></span> Statement Definition and
64 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574654"><span><strong class="command">key</strong></span> Statement Grammar</a></span></dt>
65 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574678"><span><strong class="command">key</strong></span> Statement Definition and Usage</a></span></dt>
66 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574769"><span><strong class="command">logging</strong></span> Statement Grammar</a></span></dt>
67 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2574963"><span><strong class="command">logging</strong></span> Statement Definition and
69 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2577060"><span><strong class="command">lwres</strong></span> Statement Grammar</a></span></dt>
70 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2577133"><span><strong class="command">lwres</strong></span> Statement Definition and Usage</a></span></dt>
71 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2577197"><span><strong class="command">masters</strong></span> Statement Grammar</a></span></dt>
72 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2577241"><span><strong class="command">masters</strong></span> Statement Definition and
74 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2577256"><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#statschannels"><span><strong class="command">statistics-channels</strong></span> Statement Grammar</a></span></dt>
81 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589011"><span><strong class="command">statistics-channels</strong></span> Statement Definition and
83 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#trusted-keys"><span><strong class="command">trusted-keys</strong></span> Statement Grammar</a></span></dt>
84 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589219"><span><strong class="command">trusted-keys</strong></span> Statement Definition
85 and Usage</a></span></dt>
86 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589266"><span><strong class="command">managed-keys</strong></span> Statement Grammar</a></span></dt>
87 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#managed-keys"><span><strong class="command">managed-keys</strong></span> Statement Definition
88 and Usage</a></span></dt>
89 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#view_statement_grammar"><span><strong class="command">view</strong></span> Statement Grammar</a></span></dt>
90 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589844"><span><strong class="command">view</strong></span> Statement Definition and Usage</a></span></dt>
91 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#zone_statement_grammar"><span><strong class="command">zone</strong></span>
92 Statement Grammar</a></span></dt>
93 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2591339"><span><strong class="command">zone</strong></span> Statement Definition and Usage</a></span></dt>
95 <dt><span class="sect1"><a href="Bv9ARM.ch06.html#id2594764">Zone File</a></span></dt>
97 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#types_of_resource_records_and_when_to_use_them">Types of Resource Records and When to Use Them</a></span></dt>
98 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2596926">Discussion of MX Records</a></span></dt>
99 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#Setting_TTLs">Setting TTLs</a></span></dt>
100 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2597542">Inverse Mapping in IPv4</a></span></dt>
101 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2597669">Other Zone File Directives</a></span></dt>
102 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2597942"><acronym class="acronym">BIND</acronym> Master File Extension: the <span><strong class="command">$GENERATE</strong></span> Directive</a></span></dt>
103 <dt><span class="sect2"><a href="Bv9ARM.ch06.html#zonefile_format">Additional File Formats</a></span></dt>
105 <dt><span class="sect1"><a href="Bv9ARM.ch06.html#statistics">BIND9 Statistics</a></span></dt>
106 <dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch06.html#statistics_counters">Statistics Counters</a></span></dt></dl></dd>
110 <acronym class="acronym">BIND</acronym> 9 configuration is broadly similar
111 to <acronym class="acronym">BIND</acronym> 8; however, there are a few new
113 of configuration, such as views. <acronym class="acronym">BIND</acronym>
114 8 configuration files should work with few alterations in <acronym class="acronym">BIND</acronym>
115 9, although more complex configurations should be reviewed to check
116 if they can be more efficiently implemented using the new features
117 found in <acronym class="acronym">BIND</acronym> 9.
120 <acronym class="acronym">BIND</acronym> 4 configuration files can be
121 converted to the new format
122 using the shell script
123 <code class="filename">contrib/named-bootconf/named-bootconf.sh</code>.
125 <div class="sect1" lang="en">
126 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
127 <a name="configuration_file_elements"></a>Configuration File Elements</h2></div></div></div>
129 Following is a list of elements used throughout the <acronym class="acronym">BIND</acronym> configuration
132 <div class="informaltable"><table border="1">
141 <code class="varname">acl_name</code>
146 The name of an <code class="varname">address_match_list</code> as
147 defined by the <span><strong class="command">acl</strong></span> statement.
154 <code class="varname">address_match_list</code>
159 A list of one or more
160 <code class="varname">ip_addr</code>,
161 <code class="varname">ip_prefix</code>, <code class="varname">key_id</code>,
162 or <code class="varname">acl_name</code> elements, see
163 <a href="Bv9ARM.ch06.html#address_match_lists" title="Address Match Lists">the section called “Address Match Lists”</a>.
170 <code class="varname">masters_list</code>
175 A named list of one or more <code class="varname">ip_addr</code>
176 with optional <code class="varname">key_id</code> and/or
177 <code class="varname">ip_port</code>.
178 A <code class="varname">masters_list</code> may include other
179 <code class="varname">masters_lists</code>.
186 <code class="varname">domain_name</code>
191 A quoted string which will be used as
192 a DNS name, for example "<code class="literal">my.test.domain</code>".
199 <code class="varname">namelist</code>
204 A list of one or more <code class="varname">domain_name</code>
212 <code class="varname">dotted_decimal</code>
217 One to four integers valued 0 through
218 255 separated by dots (`.'), such as <span><strong class="command">123</strong></span>,
219 <span><strong class="command">45.67</strong></span> or <span><strong class="command">89.123.45.67</strong></span>.
226 <code class="varname">ip4_addr</code>
231 An IPv4 address with exactly four elements
232 in <code class="varname">dotted_decimal</code> notation.
239 <code class="varname">ip6_addr</code>
244 An IPv6 address, such as <span><strong class="command">2001:db8::1234</strong></span>.
245 IPv6 scoped addresses that have ambiguity on their
246 scope zones must be disambiguated by an appropriate
247 zone ID with the percent character (`%') as
248 delimiter. It is strongly recommended to use
249 string zone names rather than numeric identifiers,
250 in order to be robust against system configuration
251 changes. However, since there is no standard
252 mapping for such names and identifier values,
253 currently only interface names as link identifiers
254 are supported, assuming one-to-one mapping between
255 interfaces and links. For example, a link-local
256 address <span><strong class="command">fe80::1</strong></span> on the link
257 attached to the interface <span><strong class="command">ne0</strong></span>
258 can be specified as <span><strong class="command">fe80::1%ne0</strong></span>.
259 Note that on most systems link-local addresses
260 always have the ambiguity, and need to be
268 <code class="varname">ip_addr</code>
273 An <code class="varname">ip4_addr</code> or <code class="varname">ip6_addr</code>.
280 <code class="varname">ip_port</code>
285 An IP port <code class="varname">number</code>.
286 The <code class="varname">number</code> is limited to 0
287 through 65535, with values
288 below 1024 typically restricted to use by processes running
290 In some cases, an asterisk (`*') character can be used as a
292 select a random high-numbered port.
299 <code class="varname">ip_prefix</code>
304 An IP network specified as an <code class="varname">ip_addr</code>,
305 followed by a slash (`/') and then the number of bits in the
307 Trailing zeros in a <code class="varname">ip_addr</code>
309 For example, <span><strong class="command">127/8</strong></span> is the
310 network <span><strong class="command">127.0.0.0</strong></span> with
311 netmask <span><strong class="command">255.0.0.0</strong></span> and <span><strong class="command">1.2.3.0/28</strong></span> is
312 network <span><strong class="command">1.2.3.0</strong></span> with netmask <span><strong class="command">255.255.255.240</strong></span>.
315 When specifying a prefix involving a IPv6 scoped address
316 the scope may be omitted. In that case the prefix will
317 match packets from any scope.
324 <code class="varname">key_id</code>
329 A <code class="varname">domain_name</code> representing
330 the name of a shared key, to be used for transaction
338 <code class="varname">key_list</code>
343 A list of one or more
344 <code class="varname">key_id</code>s,
345 separated by semicolons and ending with a semicolon.
352 <code class="varname">number</code>
357 A non-negative 32-bit integer
358 (i.e., a number between 0 and 4294967295, inclusive).
359 Its acceptable value might further
360 be limited by the context in which it is used.
367 <code class="varname">path_name</code>
372 A quoted string which will be used as
373 a pathname, such as <code class="filename">zones/master/my.test.domain</code>.
380 <code class="varname">port_list</code>
385 A list of an <code class="varname">ip_port</code> or a port
387 A port range is specified in the form of
388 <strong class="userinput"><code>range</code></strong> followed by
389 two <code class="varname">ip_port</code>s,
390 <code class="varname">port_low</code> and
391 <code class="varname">port_high</code>, which represents
392 port numbers from <code class="varname">port_low</code> through
393 <code class="varname">port_high</code>, inclusive.
394 <code class="varname">port_low</code> must not be larger than
395 <code class="varname">port_high</code>.
397 <strong class="userinput"><code>range 1024 65535</code></strong> represents
398 ports from 1024 through 65535.
399 In either case an asterisk (`*') character is not
400 allowed as a valid <code class="varname">ip_port</code>.
407 <code class="varname">size_spec</code>
412 A 64-bit unsigned integer, or the keywords
413 <strong class="userinput"><code>unlimited</code></strong> or
414 <strong class="userinput"><code>default</code></strong>.
417 Integers may take values
418 0 <= value <= 18446744073709551615, though
419 certain parameters may use a more limited range
420 within these extremes. In most cases, setting a
421 value to 0 does not literally mean zero; it means
422 "undefined" or "as big as psosible", depending on
423 the context. See the expalantions of particular
424 parameters that use <code class="varname">size_spec</code>
425 for details on how they interpret its use.
428 Numeric values can optionally be followed by a
430 <strong class="userinput"><code>K</code></strong> or <strong class="userinput"><code>k</code></strong>
432 <strong class="userinput"><code>M</code></strong> or <strong class="userinput"><code>m</code></strong>
434 <strong class="userinput"><code>G</code></strong> or <strong class="userinput"><code>g</code></strong>
435 for gigabytes, which scale by 1024, 1024*1024, and
436 1024*1024*1024 respectively.
439 <code class="varname">unlimited</code> generally means
440 "as big as possible", though in certain contexts,
441 (including <code class="option">max-cache-size</code>), it may
442 mean the largest possible 32-bit unsigned integer
443 (0xffffffff); this distinction can be important when
444 dealing with larger quantities.
445 <code class="varname">unlimited</code> is usually the best way
446 to safely set a very large number.
449 <code class="varname">default</code>
450 uses the limit that was in force when the server was started.
457 <code class="varname">yes_or_no</code>
462 Either <strong class="userinput"><code>yes</code></strong> or <strong class="userinput"><code>no</code></strong>.
463 The words <strong class="userinput"><code>true</code></strong> and <strong class="userinput"><code>false</code></strong> are
464 also accepted, as are the numbers <strong class="userinput"><code>1</code></strong>
465 and <strong class="userinput"><code>0</code></strong>.
472 <code class="varname">dialup_option</code>
477 One of <strong class="userinput"><code>yes</code></strong>,
478 <strong class="userinput"><code>no</code></strong>, <strong class="userinput"><code>notify</code></strong>,
479 <strong class="userinput"><code>notify-passive</code></strong>, <strong class="userinput"><code>refresh</code></strong> or
480 <strong class="userinput"><code>passive</code></strong>.
481 When used in a zone, <strong class="userinput"><code>notify-passive</code></strong>,
482 <strong class="userinput"><code>refresh</code></strong>, and <strong class="userinput"><code>passive</code></strong>
483 are restricted to slave and stub zones.
489 <div class="sect2" lang="en">
490 <div class="titlepage"><div><div><h3 class="title">
491 <a name="address_match_lists"></a>Address Match Lists</h3></div></div></div>
492 <div class="sect3" lang="en">
493 <div class="titlepage"><div><div><h4 class="title">
494 <a name="id2573109"></a>Syntax</h4></div></div></div>
495 <pre class="programlisting"><code class="varname">address_match_list</code> = address_match_list_element ;
496 [<span class="optional"> address_match_list_element; ... </span>]
497 <code class="varname">address_match_list_element</code> = [<span class="optional"> ! </span>] (ip_address [<span class="optional">/length</span>] |
498 key key_id | acl_name | { address_match_list } )
501 <div class="sect3" lang="en">
502 <div class="titlepage"><div><div><h4 class="title">
503 <a name="id2573137"></a>Definition and Usage</h4></div></div></div>
505 Address match lists are primarily used to determine access
506 control for various server operations. They are also used in
507 the <span><strong class="command">listen-on</strong></span> and <span><strong class="command">sortlist</strong></span>
508 statements. The elements which constitute an address match
509 list can be any of the following:
511 <div class="itemizedlist"><ul type="disc">
512 <li>an IP address (IPv4 or IPv6)</li>
513 <li>an IP prefix (in `/' notation)</li>
515 a key ID, as defined by the <span><strong class="command">key</strong></span>
518 <li>the name of an address match list defined with
519 the <span><strong class="command">acl</strong></span> statement
521 <li>a nested address match list enclosed in braces</li>
524 Elements can be negated with a leading exclamation mark (`!'),
525 and the match list names "any", "none", "localhost", and
526 "localnets" are predefined. More information on those names
527 can be found in the description of the acl statement.
530 The addition of the key clause made the name of this syntactic
531 element something of a misnomer, since security keys can be used
532 to validate access without regard to a host or network address.
533 Nonetheless, the term "address match list" is still used
534 throughout the documentation.
537 When a given IP address or prefix is compared to an address
538 match list, the comparison takes place in approximately O(1)
539 time. However, key comparisons require that the list of keys
540 be traversed until a matching key is found, and therefore may
544 The interpretation of a match depends on whether the list is being
545 used for access control, defining <span><strong class="command">listen-on</strong></span> ports, or in a
546 <span><strong class="command">sortlist</strong></span>, and whether the element was negated.
549 When used as an access control list, a non-negated match
550 allows access and a negated match denies access. If
551 there is no match, access is denied. The clauses
552 <span><strong class="command">allow-notify</strong></span>,
553 <span><strong class="command">allow-recursion</strong></span>,
554 <span><strong class="command">allow-recursion-on</strong></span>,
555 <span><strong class="command">allow-query</strong></span>,
556 <span><strong class="command">allow-query-on</strong></span>,
557 <span><strong class="command">allow-query-cache</strong></span>,
558 <span><strong class="command">allow-query-cache-on</strong></span>,
559 <span><strong class="command">allow-transfer</strong></span>,
560 <span><strong class="command">allow-update</strong></span>,
561 <span><strong class="command">allow-update-forwarding</strong></span>, and
562 <span><strong class="command">blackhole</strong></span> all use address match
563 lists. Similarly, the <span><strong class="command">listen-on</strong></span> option will cause the
564 server to refuse queries on any of the machine's
565 addresses which do not match the list.
568 Order of insertion is significant. If more than one element
569 in an ACL is found to match a given IP address or prefix,
570 preference will be given to the one that came
571 <span class="emphasis"><em>first</em></span> in the ACL definition.
572 Because of this first-match behavior, an element that
573 defines a subset of another element in the list should
574 come before the broader element, regardless of whether
575 either is negated. For example, in
576 <span><strong class="command">1.2.3/24; ! 1.2.3.13;</strong></span>
577 the 1.2.3.13 element is completely useless because the
578 algorithm will match any lookup for 1.2.3.13 to the 1.2.3/24
579 element. Using <span><strong class="command">! 1.2.3.13; 1.2.3/24</strong></span> fixes
580 that problem by having 1.2.3.13 blocked by the negation, but
581 all other 1.2.3.* hosts fall through.
585 <div class="sect2" lang="en">
586 <div class="titlepage"><div><div><h3 class="title">
587 <a name="id2573342"></a>Comment Syntax</h3></div></div></div>
589 The <acronym class="acronym">BIND</acronym> 9 comment syntax allows for
591 anywhere that whitespace may appear in a <acronym class="acronym">BIND</acronym> configuration
592 file. To appeal to programmers of all kinds, they can be written
593 in the C, C++, or shell/perl style.
595 <div class="sect3" lang="en">
596 <div class="titlepage"><div><div><h4 class="title">
597 <a name="id2573357"></a>Syntax</h4></div></div></div>
600 <pre class="programlisting">/* This is a <acronym class="acronym">BIND</acronym> comment as in C */</pre>
603 <pre class="programlisting">// This is a <acronym class="acronym">BIND</acronym> comment as in C++</pre>
606 <pre class="programlisting"># This is a <acronym class="acronym">BIND</acronym> comment as in common UNIX shells
611 <div class="sect3" lang="en">
612 <div class="titlepage"><div><div><h4 class="title">
613 <a name="id2573387"></a>Definition and Usage</h4></div></div></div>
615 Comments may appear anywhere that whitespace may appear in
616 a <acronym class="acronym">BIND</acronym> configuration file.
619 C-style comments start with the two characters /* (slash,
620 star) and end with */ (star, slash). Because they are completely
621 delimited with these characters, they can be used to comment only
622 a portion of a line or to span multiple lines.
625 C-style comments cannot be nested. For example, the following
626 is not valid because the entire comment ends with the first */:
631 <pre class="programlisting">/* This is the start of a comment.
632 This is still part of the comment.
633 /* This is an incorrect attempt at nesting a comment. */
634 This is no longer in any comment. */
640 C++-style comments start with the two characters // (slash,
641 slash) and continue to the end of the physical line. They cannot
642 be continued across multiple physical lines; to have one logical
643 comment span multiple lines, each line must use the // pair.
649 <pre class="programlisting">// This is the start of a comment. The next line
650 // is a new comment, even though it is logically
651 // part of the previous comment.
657 Shell-style (or perl-style, if you prefer) comments start
658 with the character <code class="literal">#</code> (number sign)
659 and continue to the end of the
660 physical line, as in C++ comments.
666 <pre class="programlisting"># This is the start of a comment. The next line
667 # is a new comment, even though it is logically
668 # part of the previous comment.
673 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
674 <h3 class="title">Warning</h3>
676 You cannot use the semicolon (`;') character
677 to start a comment such as you would in a zone file. The
678 semicolon indicates the end of a configuration
685 <div class="sect1" lang="en">
686 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
687 <a name="Configuration_File_Grammar"></a>Configuration File Grammar</h2></div></div></div>
689 A <acronym class="acronym">BIND</acronym> 9 configuration consists of
690 statements and comments.
691 Statements end with a semicolon. Statements and comments are the
692 only elements that can appear without enclosing braces. Many
693 statements contain a block of sub-statements, which are also
694 terminated with a semicolon.
697 The following statements are supported:
699 <div class="informaltable"><table border="1">
707 <p><span><strong class="command">acl</strong></span></p>
711 defines a named IP address
712 matching list, for access control and other uses.
718 <p><span><strong class="command">controls</strong></span></p>
722 declares control channels to be used
723 by the <span><strong class="command">rndc</strong></span> utility.
729 <p><span><strong class="command">include</strong></span></p>
739 <p><span><strong class="command">key</strong></span></p>
743 specifies key information for use in
744 authentication and authorization using TSIG.
750 <p><span><strong class="command">logging</strong></span></p>
754 specifies what the server logs, and where
755 the log messages are sent.
761 <p><span><strong class="command">lwres</strong></span></p>
765 configures <span><strong class="command">named</strong></span> to
766 also act as a light-weight resolver daemon (<span><strong class="command">lwresd</strong></span>).
772 <p><span><strong class="command">masters</strong></span></p>
776 defines a named masters list for
777 inclusion in stub and slave zone masters clauses.
783 <p><span><strong class="command">options</strong></span></p>
787 controls global server configuration
788 options and sets defaults for other statements.
794 <p><span><strong class="command">server</strong></span></p>
798 sets certain configuration options on
805 <p><span><strong class="command">statistics-channels</strong></span></p>
809 declares communication channels to get access to
810 <span><strong class="command">named</strong></span> statistics.
816 <p><span><strong class="command">trusted-keys</strong></span></p>
820 defines trusted DNSSEC keys.
826 <p><span><strong class="command">managed-keys</strong></span></p>
830 lists DNSSEC keys to be kept up to date
831 using RFC 5011 trust anchor maintenance.
837 <p><span><strong class="command">view</strong></span></p>
847 <p><span><strong class="command">zone</strong></span></p>
858 The <span><strong class="command">logging</strong></span> and
859 <span><strong class="command">options</strong></span> statements may only occur once
863 <div class="sect2" lang="en">
864 <div class="titlepage"><div><div><h3 class="title">
865 <a name="id2573996"></a><span><strong class="command">acl</strong></span> Statement Grammar</h3></div></div></div>
866 <pre class="programlisting"><span><strong class="command">acl</strong></span> acl-name {
871 <div class="sect2" lang="en">
872 <div class="titlepage"><div><div><h3 class="title">
873 <a name="acl"></a><span><strong class="command">acl</strong></span> Statement Definition and
874 Usage</h3></div></div></div>
876 The <span><strong class="command">acl</strong></span> statement assigns a symbolic
877 name to an address match list. It gets its name from a primary
878 use of address match lists: Access Control Lists (ACLs).
881 Note that an address match list's name must be defined
882 with <span><strong class="command">acl</strong></span> before it can be used
883 elsewhere; no forward references are allowed.
886 The following ACLs are built-in:
888 <div class="informaltable"><table border="1">
896 <p><span><strong class="command">any</strong></span></p>
906 <p><span><strong class="command">none</strong></span></p>
916 <p><span><strong class="command">localhost</strong></span></p>
920 Matches the IPv4 and IPv6 addresses of all network
921 interfaces on the system.
927 <p><span><strong class="command">localnets</strong></span></p>
931 Matches any host on an IPv4 or IPv6 network
932 for which the system has an interface.
933 Some systems do not provide a way to determine the prefix
935 local IPv6 addresses.
936 In such a case, <span><strong class="command">localnets</strong></span>
937 only matches the local
938 IPv6 addresses, just like <span><strong class="command">localhost</strong></span>.
945 <div class="sect2" lang="en">
946 <div class="titlepage"><div><div><h3 class="title">
947 <a name="id2574186"></a><span><strong class="command">controls</strong></span> Statement Grammar</h3></div></div></div>
948 <pre class="programlisting"><span><strong class="command">controls</strong></span> {
949 [ inet ( ip_addr | * ) [ port ip_port ]
950 allow { <em class="replaceable"><code> address_match_list </code></em> }
951 keys { <em class="replaceable"><code>key_list</code></em> }; ]
953 [ 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>
954 keys { <em class="replaceable"><code>key_list</code></em> }; ]
959 <div class="sect2" lang="en">
960 <div class="titlepage"><div><div><h3 class="title">
961 <a name="controls_statement_definition_and_usage"></a><span><strong class="command">controls</strong></span> Statement Definition and
962 Usage</h3></div></div></div>
964 The <span><strong class="command">controls</strong></span> statement declares control
965 channels to be used by system administrators to control the
966 operation of the name server. These control channels are
967 used by the <span><strong class="command">rndc</strong></span> utility to send
968 commands to and retrieve non-DNS results from a name server.
971 An <span><strong class="command">inet</strong></span> control channel is a TCP socket
972 listening at the specified <span><strong class="command">ip_port</strong></span> on the
973 specified <span><strong class="command">ip_addr</strong></span>, which can be an IPv4 or IPv6
974 address. An <span><strong class="command">ip_addr</strong></span> of <code class="literal">*</code> (asterisk) is
975 interpreted as the IPv4 wildcard address; connections will be
976 accepted on any of the system's IPv4 addresses.
977 To listen on the IPv6 wildcard address,
978 use an <span><strong class="command">ip_addr</strong></span> of <code class="literal">::</code>.
979 If you will only use <span><strong class="command">rndc</strong></span> on the local host,
980 using the loopback address (<code class="literal">127.0.0.1</code>
981 or <code class="literal">::1</code>) is recommended for maximum security.
984 If no port is specified, port 953 is used. The asterisk
985 "<code class="literal">*</code>" cannot be used for <span><strong class="command">ip_port</strong></span>.
988 The ability to issue commands over the control channel is
989 restricted by the <span><strong class="command">allow</strong></span> and
990 <span><strong class="command">keys</strong></span> clauses.
991 Connections to the control channel are permitted based on the
992 <span><strong class="command">address_match_list</strong></span>. This is for simple
993 IP address based filtering only; any <span><strong class="command">key_id</strong></span>
994 elements of the <span><strong class="command">address_match_list</strong></span>
998 A <span><strong class="command">unix</strong></span> control channel is a UNIX domain
999 socket listening at the specified path in the file system.
1000 Access to the socket is specified by the <span><strong class="command">perm</strong></span>,
1001 <span><strong class="command">owner</strong></span> and <span><strong class="command">group</strong></span> clauses.
1002 Note on some platforms (SunOS and Solaris) the permissions
1003 (<span><strong class="command">perm</strong></span>) are applied to the parent directory
1004 as the permissions on the socket itself are ignored.
1007 The primary authorization mechanism of the command
1008 channel is the <span><strong class="command">key_list</strong></span>, which
1009 contains a list of <span><strong class="command">key_id</strong></span>s.
1010 Each <span><strong class="command">key_id</strong></span> in the <span><strong class="command">key_list</strong></span>
1011 is authorized to execute commands over the control channel.
1012 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>)
1013 for information about configuring keys in <span><strong class="command">rndc</strong></span>.
1016 If no <span><strong class="command">controls</strong></span> statement is present,
1017 <span><strong class="command">named</strong></span> will set up a default
1018 control channel listening on the loopback address 127.0.0.1
1019 and its IPv6 counterpart ::1.
1020 In this case, and also when the <span><strong class="command">controls</strong></span> statement
1021 is present but does not have a <span><strong class="command">keys</strong></span> clause,
1022 <span><strong class="command">named</strong></span> will attempt to load the command channel key
1023 from the file <code class="filename">rndc.key</code> in
1024 <code class="filename">/etc</code> (or whatever <code class="varname">sysconfdir</code>
1025 was specified as when <acronym class="acronym">BIND</acronym> was built).
1026 To create a <code class="filename">rndc.key</code> file, run
1027 <strong class="userinput"><code>rndc-confgen -a</code></strong>.
1030 The <code class="filename">rndc.key</code> feature was created to
1031 ease the transition of systems from <acronym class="acronym">BIND</acronym> 8,
1032 which did not have digital signatures on its command channel
1033 messages and thus did not have a <span><strong class="command">keys</strong></span> clause.
1035 It makes it possible to use an existing <acronym class="acronym">BIND</acronym> 8
1036 configuration file in <acronym class="acronym">BIND</acronym> 9 unchanged,
1037 and still have <span><strong class="command">rndc</strong></span> work the same way
1038 <span><strong class="command">ndc</strong></span> worked in BIND 8, simply by executing the
1039 command <strong class="userinput"><code>rndc-confgen -a</code></strong> after BIND 9 is
1043 Since the <code class="filename">rndc.key</code> feature
1044 is only intended to allow the backward-compatible usage of
1045 <acronym class="acronym">BIND</acronym> 8 configuration files, this
1047 have a high degree of configurability. You cannot easily change
1048 the key name or the size of the secret, so you should make a
1049 <code class="filename">rndc.conf</code> with your own key if you
1051 those things. The <code class="filename">rndc.key</code> file
1053 permissions set such that only the owner of the file (the user that
1054 <span><strong class="command">named</strong></span> is running as) can access it.
1056 desire greater flexibility in allowing other users to access
1057 <span><strong class="command">rndc</strong></span> commands, then you need to create
1059 <code class="filename">rndc.conf</code> file and make it group
1061 that contains the users who should have access.
1064 To disable the command channel, use an empty
1065 <span><strong class="command">controls</strong></span> statement:
1066 <span><strong class="command">controls { };</strong></span>.
1069 <div class="sect2" lang="en">
1070 <div class="titlepage"><div><div><h3 class="title">
1071 <a name="id2574614"></a><span><strong class="command">include</strong></span> Statement Grammar</h3></div></div></div>
1072 <pre class="programlisting"><span><strong class="command">include</strong></span> <em class="replaceable"><code>filename</code></em>;</pre>
1074 <div class="sect2" lang="en">
1075 <div class="titlepage"><div><div><h3 class="title">
1076 <a name="id2574631"></a><span><strong class="command">include</strong></span> Statement Definition and
1077 Usage</h3></div></div></div>
1079 The <span><strong class="command">include</strong></span> statement inserts the
1080 specified file at the point where the <span><strong class="command">include</strong></span>
1081 statement is encountered. The <span><strong class="command">include</strong></span>
1082 statement facilitates the administration of configuration
1084 by permitting the reading or writing of some things but not
1085 others. For example, the statement could include private keys
1086 that are readable only by the name server.
1089 <div class="sect2" lang="en">
1090 <div class="titlepage"><div><div><h3 class="title">
1091 <a name="id2574654"></a><span><strong class="command">key</strong></span> Statement Grammar</h3></div></div></div>
1092 <pre class="programlisting"><span><strong class="command">key</strong></span> <em class="replaceable"><code>key_id</code></em> {
1093 algorithm <em class="replaceable"><code>string</code></em>;
1094 secret <em class="replaceable"><code>string</code></em>;
1098 <div class="sect2" lang="en">
1099 <div class="titlepage"><div><div><h3 class="title">
1100 <a name="id2574678"></a><span><strong class="command">key</strong></span> Statement Definition and Usage</h3></div></div></div>
1102 The <span><strong class="command">key</strong></span> statement defines a shared
1103 secret key for use with TSIG (see <a href="Bv9ARM.ch04.html#tsig" title="TSIG">the section called “TSIG”</a>)
1104 or the command channel
1105 (see <a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage" title="controls Statement Definition and
1106 Usage">the section called “<span><strong class="command">controls</strong></span> Statement Definition and
1110 The <span><strong class="command">key</strong></span> statement can occur at the
1112 of the configuration file or inside a <span><strong class="command">view</strong></span>
1113 statement. Keys defined in top-level <span><strong class="command">key</strong></span>
1114 statements can be used in all views. Keys intended for use in
1115 a <span><strong class="command">controls</strong></span> statement
1116 (see <a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage" title="controls Statement Definition and
1117 Usage">the section called “<span><strong class="command">controls</strong></span> Statement Definition and
1119 must be defined at the top level.
1122 The <em class="replaceable"><code>key_id</code></em>, also known as the
1123 key name, is a domain name uniquely identifying the key. It can
1124 be used in a <span><strong class="command">server</strong></span>
1125 statement to cause requests sent to that
1126 server to be signed with this key, or in address match lists to
1127 verify that incoming requests have been signed with a key
1128 matching this name, algorithm, and secret.
1131 The <em class="replaceable"><code>algorithm_id</code></em> is a string
1132 that specifies a security/authentication algorithm. Named
1133 supports <code class="literal">hmac-md5</code>,
1134 <code class="literal">hmac-sha1</code>, <code class="literal">hmac-sha224</code>,
1135 <code class="literal">hmac-sha256</code>, <code class="literal">hmac-sha384</code>
1136 and <code class="literal">hmac-sha512</code> TSIG authentication.
1137 Truncated hashes are supported by appending the minimum
1138 number of required bits preceded by a dash, e.g.
1139 <code class="literal">hmac-sha1-80</code>. The
1140 <em class="replaceable"><code>secret_string</code></em> is the secret
1141 to be used by the algorithm, and is treated as a base-64
1145 <div class="sect2" lang="en">
1146 <div class="titlepage"><div><div><h3 class="title">
1147 <a name="id2574769"></a><span><strong class="command">logging</strong></span> Statement Grammar</h3></div></div></div>
1148 <pre class="programlisting"><span><strong class="command">logging</strong></span> {
1149 [ <span><strong class="command">channel</strong></span> <em class="replaceable"><code>channel_name</code></em> {
1150 ( <span><strong class="command">file</strong></span> <em class="replaceable"><code>path_name</code></em>
1151 [ <span><strong class="command">versions</strong></span> ( <em class="replaceable"><code>number</code></em> | <span><strong class="command">unlimited</strong></span> ) ]
1152 [ <span><strong class="command">size</strong></span> <em class="replaceable"><code>size_spec</code></em> ]
1153 | <span><strong class="command">syslog</strong></span> <em class="replaceable"><code>syslog_facility</code></em>
1154 | <span><strong class="command">stderr</strong></span>
1155 | <span><strong class="command">null</strong></span> );
1156 [ <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> |
1157 <code class="option">info</code> | <code class="option">debug</code> [ <em class="replaceable"><code>level</code></em> ] | <code class="option">dynamic</code> ); ]
1158 [ <span><strong class="command">print-category</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1159 [ <span><strong class="command">print-severity</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1160 [ <span><strong class="command">print-time</strong></span> <code class="option">yes</code> or <code class="option">no</code>; ]
1162 [ <span><strong class="command">category</strong></span> <em class="replaceable"><code>category_name</code></em> {
1163 <em class="replaceable"><code>channel_name</code></em> ; [ <em class="replaceable"><code>channel_name</code></em> ; ... ]
1169 <div class="sect2" lang="en">
1170 <div class="titlepage"><div><div><h3 class="title">
1171 <a name="id2574963"></a><span><strong class="command">logging</strong></span> Statement Definition and
1172 Usage</h3></div></div></div>
1174 The <span><strong class="command">logging</strong></span> statement configures a
1176 variety of logging options for the name server. Its <span><strong class="command">channel</strong></span> phrase
1177 associates output methods, format options and severity levels with
1178 a name that can then be used with the <span><strong class="command">category</strong></span> phrase
1179 to select how various classes of messages are logged.
1182 Only one <span><strong class="command">logging</strong></span> statement is used to
1184 as many channels and categories as are wanted. If there is no <span><strong class="command">logging</strong></span> statement,
1185 the logging configuration will be:
1187 <pre class="programlisting">logging {
1188 category default { default_syslog; default_debug; };
1189 category unmatched { null; };
1193 In <acronym class="acronym">BIND</acronym> 9, the logging configuration
1194 is only established when
1195 the entire configuration file has been parsed. In <acronym class="acronym">BIND</acronym> 8, it was
1196 established as soon as the <span><strong class="command">logging</strong></span>
1198 was parsed. When the server is starting up, all logging messages
1199 regarding syntax errors in the configuration file go to the default
1200 channels, or to standard error if the "<code class="option">-g</code>" option
1203 <div class="sect3" lang="en">
1204 <div class="titlepage"><div><div><h4 class="title">
1205 <a name="id2575015"></a>The <span><strong class="command">channel</strong></span> Phrase</h4></div></div></div>
1207 All log output goes to one or more <span class="emphasis"><em>channels</em></span>;
1208 you can make as many of them as you want.
1211 Every channel definition must include a destination clause that
1212 says whether messages selected for the channel go to a file, to a
1213 particular syslog facility, to the standard error stream, or are
1214 discarded. It can optionally also limit the message severity level
1215 that will be accepted by the channel (the default is
1216 <span><strong class="command">info</strong></span>), and whether to include a
1217 <span><strong class="command">named</strong></span>-generated time stamp, the
1219 and/or severity level (the default is not to include any).
1222 The <span><strong class="command">null</strong></span> destination clause
1223 causes all messages sent to the channel to be discarded;
1224 in that case, other options for the channel are meaningless.
1227 The <span><strong class="command">file</strong></span> destination clause directs
1229 to a disk file. It can include limitations
1230 both on how large the file is allowed to become, and how many
1232 of the file will be saved each time the file is opened.
1235 If you use the <span><strong class="command">versions</strong></span> log file
1237 <span><strong class="command">named</strong></span> will retain that many backup
1238 versions of the file by
1239 renaming them when opening. For example, if you choose to keep
1241 of the file <code class="filename">lamers.log</code>, then just
1243 <code class="filename">lamers.log.1</code> is renamed to
1244 <code class="filename">lamers.log.2</code>, <code class="filename">lamers.log.0</code> is renamed
1245 to <code class="filename">lamers.log.1</code>, and <code class="filename">lamers.log</code> is
1246 renamed to <code class="filename">lamers.log.0</code>.
1247 You can say <span><strong class="command">versions unlimited</strong></span> to
1249 the number of versions.
1250 If a <span><strong class="command">size</strong></span> option is associated with
1252 then renaming is only done when the file being opened exceeds the
1253 indicated size. No backup versions are kept by default; any
1255 log file is simply appended.
1258 The <span><strong class="command">size</strong></span> option for files is used
1260 growth. If the file ever exceeds the size, then <span><strong class="command">named</strong></span> will
1261 stop writing to the file unless it has a <span><strong class="command">versions</strong></span> option
1262 associated with it. If backup versions are kept, the files are
1264 described above and a new one begun. If there is no
1265 <span><strong class="command">versions</strong></span> option, no more data will
1266 be written to the log
1267 until some out-of-band mechanism removes or truncates the log to
1269 maximum size. The default behavior is not to limit the size of
1274 Example usage of the <span><strong class="command">size</strong></span> and
1275 <span><strong class="command">versions</strong></span> options:
1277 <pre class="programlisting">channel an_example_channel {
1278 file "example.log" versions 3 size 20m;
1284 The <span><strong class="command">syslog</strong></span> destination clause
1286 channel to the system log. Its argument is a
1287 syslog facility as described in the <span><strong class="command">syslog</strong></span> man
1288 page. Known facilities are <span><strong class="command">kern</strong></span>, <span><strong class="command">user</strong></span>,
1289 <span><strong class="command">mail</strong></span>, <span><strong class="command">daemon</strong></span>, <span><strong class="command">auth</strong></span>,
1290 <span><strong class="command">syslog</strong></span>, <span><strong class="command">lpr</strong></span>, <span><strong class="command">news</strong></span>,
1291 <span><strong class="command">uucp</strong></span>, <span><strong class="command">cron</strong></span>, <span><strong class="command">authpriv</strong></span>,
1292 <span><strong class="command">ftp</strong></span>, <span><strong class="command">local0</strong></span>, <span><strong class="command">local1</strong></span>,
1293 <span><strong class="command">local2</strong></span>, <span><strong class="command">local3</strong></span>, <span><strong class="command">local4</strong></span>,
1294 <span><strong class="command">local5</strong></span>, <span><strong class="command">local6</strong></span> and
1295 <span><strong class="command">local7</strong></span>, however not all facilities
1297 all operating systems.
1298 How <span><strong class="command">syslog</strong></span> will handle messages
1300 this facility is described in the <span><strong class="command">syslog.conf</strong></span> man
1301 page. If you have a system which uses a very old version of <span><strong class="command">syslog</strong></span> that
1302 only uses two arguments to the <span><strong class="command">openlog()</strong></span> function,
1303 then this clause is silently ignored.
1306 On Windows machines syslog messages are directed to the EventViewer.
1309 The <span><strong class="command">severity</strong></span> clause works like <span><strong class="command">syslog</strong></span>'s
1310 "priorities", except that they can also be used if you are writing
1311 straight to a file rather than using <span><strong class="command">syslog</strong></span>.
1312 Messages which are not at least of the severity level given will
1313 not be selected for the channel; messages of higher severity
1318 If you are using <span><strong class="command">syslog</strong></span>, then the <span><strong class="command">syslog.conf</strong></span> priorities
1319 will also determine what eventually passes through. For example,
1320 defining a channel facility and severity as <span><strong class="command">daemon</strong></span> and <span><strong class="command">debug</strong></span> but
1321 only logging <span><strong class="command">daemon.warning</strong></span> via <span><strong class="command">syslog.conf</strong></span> will
1322 cause messages of severity <span><strong class="command">info</strong></span> and
1323 <span><strong class="command">notice</strong></span> to
1324 be dropped. If the situation were reversed, with <span><strong class="command">named</strong></span> writing
1325 messages of only <span><strong class="command">warning</strong></span> or higher,
1326 then <span><strong class="command">syslogd</strong></span> would
1327 print all messages it received from the channel.
1330 The <span><strong class="command">stderr</strong></span> destination clause
1332 channel to the server's standard error stream. This is intended
1334 use when the server is running as a foreground process, for
1336 when debugging a configuration.
1339 The server can supply extensive debugging information when
1340 it is in debugging mode. If the server's global debug level is
1342 than zero, then debugging mode will be active. The global debug
1343 level is set either by starting the <span><strong class="command">named</strong></span> server
1344 with the <code class="option">-d</code> flag followed by a positive integer,
1345 or by running <span><strong class="command">rndc trace</strong></span>.
1346 The global debug level
1347 can be set to zero, and debugging mode turned off, by running <span><strong class="command">rndc
1348 notrace</strong></span>. All debugging messages in the server have a debug
1349 level, and higher debug levels give more detailed output. Channels
1350 that specify a specific debug severity, for example:
1352 <pre class="programlisting">channel specific_debug_level {
1358 will get debugging output of level 3 or less any time the
1359 server is in debugging mode, regardless of the global debugging
1360 level. Channels with <span><strong class="command">dynamic</strong></span>
1362 server's global debug level to determine what messages to print.
1365 If <span><strong class="command">print-time</strong></span> has been turned on,
1367 the date and time will be logged. <span><strong class="command">print-time</strong></span> may
1368 be specified for a <span><strong class="command">syslog</strong></span> channel,
1370 pointless since <span><strong class="command">syslog</strong></span> also logs
1372 time. If <span><strong class="command">print-category</strong></span> is
1374 category of the message will be logged as well. Finally, if <span><strong class="command">print-severity</strong></span> is
1375 on, then the severity level of the message will be logged. The <span><strong class="command">print-</strong></span> options may
1376 be used in any combination, and will always be printed in the
1378 order: time, category, severity. Here is an example where all
1379 three <span><strong class="command">print-</strong></span> options
1383 <code class="computeroutput">28-Feb-2000 15:05:32.863 general: notice: running</code>
1386 There are four predefined channels that are used for
1387 <span><strong class="command">named</strong></span>'s default logging as follows.
1389 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>.
1391 <pre class="programlisting">channel default_syslog {
1392 // send to syslog's daemon facility
1394 // only send priority info and higher
1397 channel default_debug {
1398 // write to named.run in the working directory
1399 // Note: stderr is used instead of "named.run" if
1400 // the server is started with the '-f' option.
1402 // log at the server's current debug level
1406 channel default_stderr {
1409 // only send priority info and higher
1414 // toss anything sent to this channel
1419 The <span><strong class="command">default_debug</strong></span> channel has the
1421 property that it only produces output when the server's debug
1423 nonzero. It normally writes to a file called <code class="filename">named.run</code>
1424 in the server's working directory.
1427 For security reasons, when the "<code class="option">-u</code>"
1428 command line option is used, the <code class="filename">named.run</code> file
1429 is created only after <span><strong class="command">named</strong></span> has
1431 new UID, and any debug output generated while <span><strong class="command">named</strong></span> is
1432 starting up and still running as root is discarded. If you need
1433 to capture this output, you must run the server with the "<code class="option">-g</code>"
1434 option and redirect standard error to a file.
1437 Once a channel is defined, it cannot be redefined. Thus you
1438 cannot alter the built-in channels directly, but you can modify
1439 the default logging by pointing categories at channels you have
1443 <div class="sect3" lang="en">
1444 <div class="titlepage"><div><div><h4 class="title">
1445 <a name="the_category_phrase"></a>The <span><strong class="command">category</strong></span> Phrase</h4></div></div></div>
1447 There are many categories, so you can send the logs you want
1448 to see wherever you want, without seeing logs you don't want. If
1449 you don't specify a list of channels for a category, then log
1451 in that category will be sent to the <span><strong class="command">default</strong></span> category
1452 instead. If you don't specify a default category, the following
1453 "default default" is used:
1455 <pre class="programlisting">category default { default_syslog; default_debug; };
1458 As an example, let's say you want to log security events to
1459 a file, but you also want keep the default logging behavior. You'd
1460 specify the following:
1462 <pre class="programlisting">channel my_security_channel {
1463 file "my_security_file";
1467 my_security_channel;
1472 To discard all messages in a category, specify the <span><strong class="command">null</strong></span> channel:
1474 <pre class="programlisting">category xfer-out { null; };
1475 category notify { null; };
1478 Following are the available categories and brief descriptions
1479 of the types of log information they contain. More
1480 categories may be added in future <acronym class="acronym">BIND</acronym> releases.
1482 <div class="informaltable"><table border="1">
1490 <p><span><strong class="command">default</strong></span></p>
1494 The default category defines the logging
1495 options for those categories where no specific
1496 configuration has been
1503 <p><span><strong class="command">general</strong></span></p>
1507 The catch-all. Many things still aren't
1508 classified into categories, and they all end up here.
1514 <p><span><strong class="command">database</strong></span></p>
1518 Messages relating to the databases used
1519 internally by the name server to store zone and cache
1526 <p><span><strong class="command">security</strong></span></p>
1530 Approval and denial of requests.
1536 <p><span><strong class="command">config</strong></span></p>
1540 Configuration file parsing and processing.
1546 <p><span><strong class="command">resolver</strong></span></p>
1550 DNS resolution, such as the recursive
1551 lookups performed on behalf of clients by a caching name
1558 <p><span><strong class="command">xfer-in</strong></span></p>
1562 Zone transfers the server is receiving.
1568 <p><span><strong class="command">xfer-out</strong></span></p>
1572 Zone transfers the server is sending.
1578 <p><span><strong class="command">notify</strong></span></p>
1582 The NOTIFY protocol.
1588 <p><span><strong class="command">client</strong></span></p>
1592 Processing of client requests.
1598 <p><span><strong class="command">unmatched</strong></span></p>
1602 Messages that <span><strong class="command">named</strong></span> was unable to determine the
1603 class of or for which there was no matching <span><strong class="command">view</strong></span>.
1604 A one line summary is also logged to the <span><strong class="command">client</strong></span> category.
1605 This category is best sent to a file or stderr, by
1606 default it is sent to
1607 the <span><strong class="command">null</strong></span> channel.
1613 <p><span><strong class="command">network</strong></span></p>
1623 <p><span><strong class="command">update</strong></span></p>
1633 <p><span><strong class="command">update-security</strong></span></p>
1637 Approval and denial of update requests.
1643 <p><span><strong class="command">queries</strong></span></p>
1647 Specify where queries should be logged to.
1650 At startup, specifying the category <span><strong class="command">queries</strong></span> will also
1651 enable query logging unless <span><strong class="command">querylog</strong></span> option has been
1656 The query log entry reports the client's IP
1657 address and port number, and the query name,
1658 class and type. Next it reports whether the
1659 Recursion Desired flag was set (+ if set, -
1660 if not set), if the query was signed (S),
1661 EDNS was in use (E), if TCP was used (T), if
1662 DO (DNSSEC Ok) was set (D), or if CD (Checking
1663 Disabled) was set (C). After this the
1664 destination address the query was sent to is
1669 <code class="computeroutput">client 127.0.0.1#62536: query: www.example.com IN AAAA +SE</code>
1672 <code class="computeroutput">client ::1#62537: query: www.example.net IN AAAA -SE</code>
1678 <p><span><strong class="command">query-errors</strong></span></p>
1682 Information about queries that resulted in some
1689 <p><span><strong class="command">dispatch</strong></span></p>
1693 Dispatching of incoming packets to the
1694 server modules where they are to be processed.
1700 <p><span><strong class="command">dnssec</strong></span></p>
1704 DNSSEC and TSIG protocol processing.
1710 <p><span><strong class="command">lame-servers</strong></span></p>
1714 Lame servers. These are misconfigurations
1715 in remote servers, discovered by BIND 9 when trying to
1716 query those servers during resolution.
1722 <p><span><strong class="command">delegation-only</strong></span></p>
1726 Delegation only. Logs queries that have been
1727 forced to NXDOMAIN as the result of a
1728 delegation-only zone or a
1729 <span><strong class="command">delegation-only</strong></span> in a hint
1730 or stub zone declaration.
1736 <p><span><strong class="command">edns-disabled</strong></span></p>
1740 Log queries that have been forced to use plain
1741 DNS due to timeouts. This is often due to
1742 the remote servers not being RFC 1034 compliant
1743 (not always returning FORMERR or similar to
1744 EDNS queries and other extensions to the DNS
1745 when they are not understood). In other words, this is
1746 targeted at servers that fail to respond to
1747 DNS queries that they don't understand.
1750 Note: the log message can also be due to
1751 packet loss. Before reporting servers for
1752 non-RFC 1034 compliance they should be re-tested
1753 to determine the nature of the non-compliance.
1754 This testing should prevent or reduce the
1755 number of false-positive reports.
1758 Note: eventually <span><strong class="command">named</strong></span> will have to stop
1759 treating such timeouts as due to RFC 1034 non
1760 compliance and start treating it as plain
1761 packet loss. Falsely classifying packet
1762 loss as due to RFC 1034 non compliance impacts
1763 on DNSSEC validation which requires EDNS for
1764 the DNSSEC records to be returned.
1770 <p><span><strong class="command">RPZ</strong></span></p>
1774 Information about errors in response policy zone files,
1775 rewritten responses, and at the highest
1776 <span><strong class="command">debug</strong></span> levels, mere rewriting
1784 <div class="sect3" lang="en">
1785 <div class="titlepage"><div><div><h4 class="title">
1786 <a name="id2576472"></a>The <span><strong class="command">query-errors</strong></span> Category</h4></div></div></div>
1788 The <span><strong class="command">query-errors</strong></span> category is
1789 specifically intended for debugging purposes: To identify
1790 why and how specific queries result in responses which
1792 Messages of this category are therefore only logged
1793 with <span><strong class="command">debug</strong></span> levels.
1796 At the debug levels of 1 or higher, each response with the
1797 rcode of SERVFAIL is logged as follows:
1800 <code class="computeroutput">client 127.0.0.1#61502: query failed (SERVFAIL) for www.example.com/IN/AAAA at query.c:3880</code>
1803 This means an error resulting in SERVFAIL was
1804 detected at line 3880 of source file
1805 <code class="filename">query.c</code>.
1806 Log messages of this level will particularly
1807 help identify the cause of SERVFAIL for an
1808 authoritative server.
1811 At the debug levels of 2 or higher, detailed context
1812 information of recursive resolutions that resulted in
1814 The log message will look like as follows:
1819 <pre class="programlisting">
1820 fetch completed at resolver.c:2970 for www.example.com/A
1821 in 30.000183: timed out/success [domain:example.com,
1822 referral:2,restart:7,qrysent:8,timeout:5,lame:0,neterr:0,
1823 badresp:1,adberr:0,findfail:0,valfail:0]
1828 The first part before the colon shows that a recursive
1829 resolution for AAAA records of www.example.com completed
1830 in 30.000183 seconds and the final result that led to the
1831 SERVFAIL was determined at line 2970 of source file
1832 <code class="filename">resolver.c</code>.
1835 The following part shows the detected final result and the
1836 latest result of DNSSEC validation.
1837 The latter is always success when no validation attempt
1839 In this example, this query resulted in SERVFAIL probably
1840 because all name servers are down or unreachable, leading
1841 to a timeout in 30 seconds.
1842 DNSSEC validation was probably not attempted.
1845 The last part enclosed in square brackets shows statistics
1846 information collected for this particular resolution
1848 The <code class="varname">domain</code> field shows the deepest zone
1849 that the resolver reached;
1850 it is the zone where the error was finally detected.
1851 The meaning of the other fields is summarized in the
1854 <div class="informaltable"><table border="1">
1862 <p><code class="varname">referral</code></p>
1866 The number of referrals the resolver received
1867 throughout the resolution process.
1868 In the above example this is 2, which are most
1869 likely com and example.com.
1875 <p><code class="varname">restart</code></p>
1879 The number of cycles that the resolver tried
1880 remote servers at the <code class="varname">domain</code>
1882 In each cycle the resolver sends one query
1883 (possibly resending it, depending on the response)
1884 to each known name server of
1885 the <code class="varname">domain</code> zone.
1891 <p><code class="varname">qrysent</code></p>
1895 The number of queries the resolver sent at the
1896 <code class="varname">domain</code> zone.
1902 <p><code class="varname">timeout</code></p>
1906 The number of timeouts since the resolver
1907 received the last response.
1913 <p><code class="varname">lame</code></p>
1917 The number of lame servers the resolver detected
1918 at the <code class="varname">domain</code> zone.
1919 A server is detected to be lame either by an
1920 invalid response or as a result of lookup in
1921 BIND9's address database (ADB), where lame
1928 <p><code class="varname">neterr</code></p>
1932 The number of erroneous results that the
1933 resolver encountered in sending queries
1934 at the <code class="varname">domain</code> zone.
1935 One common case is the remote server is
1936 unreachable and the resolver receives an ICMP
1937 unreachable error message.
1943 <p><code class="varname">badresp</code></p>
1947 The number of unexpected responses (other than
1948 <code class="varname">lame</code>) to queries sent by the
1949 resolver at the <code class="varname">domain</code> zone.
1955 <p><code class="varname">adberr</code></p>
1959 Failures in finding remote server addresses
1960 of the <code class="varname">domain</code> zone in the ADB.
1961 One common case of this is that the remote
1962 server's name does not have any address records.
1968 <p><code class="varname">findfail</code></p>
1972 Failures of resolving remote server addresses.
1973 This is a total number of failures throughout
1974 the resolution process.
1980 <p><code class="varname">valfail</code></p>
1984 Failures of DNSSEC validation.
1985 Validation failures are counted throughout
1986 the resolution process (not limited to
1987 the <code class="varname">domain</code> zone), but should
1988 only happen in <code class="varname">domain</code>.
1995 At the debug levels of 3 or higher, the same messages
1996 as those at the debug 1 level are logged for other errors
1998 Note that negative responses such as NXDOMAIN are not
1999 regarded as errors here.
2002 At the debug levels of 4 or higher, the same messages
2003 as those at the debug 2 level are logged for other errors
2005 Unlike the above case of level 3, messages are logged for
2007 This is because any unexpected results can be difficult to
2008 debug in the recursion case.
2012 <div class="sect2" lang="en">
2013 <div class="titlepage"><div><div><h3 class="title">
2014 <a name="id2577060"></a><span><strong class="command">lwres</strong></span> Statement Grammar</h3></div></div></div>
2016 This is the grammar of the <span><strong class="command">lwres</strong></span>
2017 statement in the <code class="filename">named.conf</code> file:
2019 <pre class="programlisting"><span><strong class="command">lwres</strong></span> {
2020 [<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>] ;
2021 [<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>]
2022 [<span class="optional"> view <em class="replaceable"><code>view_name</code></em>; </span>]
2023 [<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>]
2024 [<span class="optional"> ndots <em class="replaceable"><code>number</code></em>; </span>]
2028 <div class="sect2" lang="en">
2029 <div class="titlepage"><div><div><h3 class="title">
2030 <a name="id2577133"></a><span><strong class="command">lwres</strong></span> Statement Definition and Usage</h3></div></div></div>
2032 The <span><strong class="command">lwres</strong></span> statement configures the
2034 server to also act as a lightweight resolver server. (See
2035 <a href="Bv9ARM.ch05.html#lwresd" title="Running a Resolver Daemon">the section called “Running a Resolver Daemon”</a>.) There may be multiple
2036 <span><strong class="command">lwres</strong></span> statements configuring
2037 lightweight resolver servers with different properties.
2040 The <span><strong class="command">listen-on</strong></span> statement specifies a
2042 addresses (and ports) that this instance of a lightweight resolver
2044 should accept requests on. If no port is specified, port 921 is
2046 If this statement is omitted, requests will be accepted on
2051 The <span><strong class="command">view</strong></span> statement binds this
2053 lightweight resolver daemon to a view in the DNS namespace, so that
2055 response will be constructed in the same manner as a normal DNS
2057 matching this view. If this statement is omitted, the default view
2059 used, and if there is no default view, an error is triggered.
2062 The <span><strong class="command">search</strong></span> statement is equivalent to
2064 <span><strong class="command">search</strong></span> statement in
2065 <code class="filename">/etc/resolv.conf</code>. It provides a
2067 which are appended to relative names in queries.
2070 The <span><strong class="command">ndots</strong></span> statement is equivalent to
2072 <span><strong class="command">ndots</strong></span> statement in
2073 <code class="filename">/etc/resolv.conf</code>. It indicates the
2075 number of dots in a relative domain name that should result in an
2076 exact match lookup before search path elements are appended.
2079 <div class="sect2" lang="en">
2080 <div class="titlepage"><div><div><h3 class="title">
2081 <a name="id2577197"></a><span><strong class="command">masters</strong></span> Statement Grammar</h3></div></div></div>
2082 <pre class="programlisting">
2083 <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> |
2084 <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>] };
2087 <div class="sect2" lang="en">
2088 <div class="titlepage"><div><div><h3 class="title">
2089 <a name="id2577241"></a><span><strong class="command">masters</strong></span> Statement Definition and
2090 Usage</h3></div></div></div>
2091 <p><span><strong class="command">masters</strong></span>
2092 lists allow for a common set of masters to be easily used by
2093 multiple stub and slave zones.
2096 <div class="sect2" lang="en">
2097 <div class="titlepage"><div><div><h3 class="title">
2098 <a name="id2577256"></a><span><strong class="command">options</strong></span> Statement Grammar</h3></div></div></div>
2100 This is the grammar of the <span><strong class="command">options</strong></span>
2101 statement in the <code class="filename">named.conf</code> file:
2103 <pre class="programlisting"><span><strong class="command">options</strong></span> {
2104 [<span class="optional"> attach-cache <em class="replaceable"><code>cache_name</code></em>; </span>]
2105 [<span class="optional"> version <em class="replaceable"><code>version_string</code></em>; </span>]
2106 [<span class="optional"> hostname <em class="replaceable"><code>hostname_string</code></em>; </span>]
2107 [<span class="optional"> server-id <em class="replaceable"><code>server_id_string</code></em>; </span>]
2108 [<span class="optional"> directory <em class="replaceable"><code>path_name</code></em>; </span>]
2109 [<span class="optional"> key-directory <em class="replaceable"><code>path_name</code></em>; </span>]
2110 [<span class="optional"> managed-keys-directory <em class="replaceable"><code>path_name</code></em>; </span>]
2111 [<span class="optional"> named-xfer <em class="replaceable"><code>path_name</code></em>; </span>]
2112 [<span class="optional"> tkey-gssapi-keytab <em class="replaceable"><code>path_name</code></em>; </span>]
2113 [<span class="optional"> tkey-gssapi-credential <em class="replaceable"><code>principal</code></em>; </span>]
2114 [<span class="optional"> tkey-domain <em class="replaceable"><code>domainname</code></em>; </span>]
2115 [<span class="optional"> tkey-dhkey <em class="replaceable"><code>key_name</code></em> <em class="replaceable"><code>key_tag</code></em>; </span>]
2116 [<span class="optional"> cache-file <em class="replaceable"><code>path_name</code></em>; </span>]
2117 [<span class="optional"> dump-file <em class="replaceable"><code>path_name</code></em>; </span>]
2118 [<span class="optional"> bindkeys-file <em class="replaceable"><code>path_name</code></em>; </span>]
2119 [<span class="optional"> secroots-file <em class="replaceable"><code>path_name</code></em>; </span>]
2120 [<span class="optional"> session-keyfile <em class="replaceable"><code>path_name</code></em>; </span>]
2121 [<span class="optional"> session-keyname <em class="replaceable"><code>key_name</code></em>; </span>]
2122 [<span class="optional"> session-keyalg <em class="replaceable"><code>algorithm_id</code></em>; </span>]
2123 [<span class="optional"> memstatistics <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2124 [<span class="optional"> memstatistics-file <em class="replaceable"><code>path_name</code></em>; </span>]
2125 [<span class="optional"> pid-file <em class="replaceable"><code>path_name</code></em>; </span>]
2126 [<span class="optional"> recursing-file <em class="replaceable"><code>path_name</code></em>; </span>]
2127 [<span class="optional"> statistics-file <em class="replaceable"><code>path_name</code></em>; </span>]
2128 [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2129 [<span class="optional"> auth-nxdomain <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2130 [<span class="optional"> deallocate-on-exit <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2131 [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em>; </span>]
2132 [<span class="optional"> fake-iquery <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2133 [<span class="optional"> fetch-glue <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2134 [<span class="optional"> flush-zones-on-shutdown <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2135 [<span class="optional"> has-old-clients <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2136 [<span class="optional"> host-statistics <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2137 [<span class="optional"> host-statistics-max <em class="replaceable"><code>number</code></em>; </span>]
2138 [<span class="optional"> minimal-responses <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2139 [<span class="optional"> multiple-cnames <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2140 [<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>]
2141 [<span class="optional"> recursion <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2142 [<span class="optional"> request-nsid <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2143 [<span class="optional"> rfc2308-type1 <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2144 [<span class="optional"> use-id-pool <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2145 [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2146 [<span class="optional"> ixfr-from-differences (<em class="replaceable"><code>yes_or_no</code></em> | <code class="constant">master</code> | <code class="constant">slave</code>); </span>]
2147 [<span class="optional"> dnssec-enable <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2148 [<span class="optional"> dnssec-validation (<em class="replaceable"><code>yes_or_no</code></em> | <code class="constant">auto</code>); </span>]
2149 [<span class="optional"> dnssec-lookaside ( <em class="replaceable"><code>auto</code></em> |
2150 <em class="replaceable"><code>no</code></em> |
2151 <em class="replaceable"><code>domain</code></em> trust-anchor <em class="replaceable"><code>domain</code></em> ); </span>]
2152 [<span class="optional"> dnssec-must-be-secure <em class="replaceable"><code>domain yes_or_no</code></em>; </span>]
2153 [<span class="optional"> dnssec-accept-expired <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2154 [<span class="optional"> forward ( <em class="replaceable"><code>only</code></em> | <em class="replaceable"><code>first</code></em> ); </span>]
2155 [<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>]
2156 [<span class="optional"> dual-stack-servers [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] {
2157 ( <em class="replaceable"><code>domain_name</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] |
2158 <em class="replaceable"><code>ip_addr</code></em> [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ) ;
2160 [<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> )
2161 ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
2162 [<span class="optional"> check-dup-records ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
2163 [<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>]
2164 [<span class="optional"> check-wildcard <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2165 [<span class="optional"> check-integrity <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2166 [<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>]
2167 [<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>]
2168 [<span class="optional"> check-sibling <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2169 [<span class="optional"> check-spf ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
2170 [<span class="optional"> allow-new-zones { <em class="replaceable"><code>yes_or_no</code></em> }; </span>]
2171 [<span class="optional"> allow-notify { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2172 [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2173 [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2174 [<span class="optional"> allow-query-cache { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2175 [<span class="optional"> allow-query-cache-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2176 [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2177 [<span class="optional"> allow-recursion { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2178 [<span class="optional"> allow-recursion-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2179 [<span class="optional"> allow-update { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2180 [<span class="optional"> allow-update-forwarding { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2181 [<span class="optional"> update-check-ksk <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2182 [<span class="optional"> dnssec-dnskey-kskonly <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2183 [<span class="optional"> dnssec-secure-to-insecure <em class="replaceable"><code>yes_or_no</code></em> ;</span>]
2184 [<span class="optional"> try-tcp-refresh <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2185 [<span class="optional"> allow-v6-synthesis { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2186 [<span class="optional"> blackhole { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2187 [<span class="optional"> use-v4-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2188 [<span class="optional"> avoid-v4-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2189 [<span class="optional"> use-v6-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2190 [<span class="optional"> avoid-v6-udp-ports { <em class="replaceable"><code>port_list</code></em> }; </span>]
2191 [<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>]
2192 [<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>]
2193 [<span class="optional"> query-source ( ( <em class="replaceable"><code>ip4_addr</code></em> | <em class="replaceable"><code>*</code></em> )
2194 [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] |
2195 [<span class="optional"> address ( <em class="replaceable"><code>ip4_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]
2196 [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] ) ; </span>]
2197 [<span class="optional"> query-source-v6 ( ( <em class="replaceable"><code>ip6_addr</code></em> | <em class="replaceable"><code>*</code></em> )
2198 [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] |
2199 [<span class="optional"> address ( <em class="replaceable"><code>ip6_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]
2200 [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>] ) ; </span>]
2201 [<span class="optional"> use-queryport-pool <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2202 [<span class="optional"> queryport-pool-ports <em class="replaceable"><code>number</code></em>; </span>]
2203 [<span class="optional"> queryport-pool-updateinterval <em class="replaceable"><code>number</code></em>; </span>]
2204 [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em>; </span>]
2205 [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em>; </span>]
2206 [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em>; </span>]
2207 [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em>; </span>]
2208 [<span class="optional"> tcp-clients <em class="replaceable"><code>number</code></em>; </span>]
2209 [<span class="optional"> reserved-sockets <em class="replaceable"><code>number</code></em>; </span>]
2210 [<span class="optional"> recursive-clients <em class="replaceable"><code>number</code></em>; </span>]
2211 [<span class="optional"> serial-query-rate <em class="replaceable"><code>number</code></em>; </span>]
2212 [<span class="optional"> serial-queries <em class="replaceable"><code>number</code></em>; </span>]
2213 [<span class="optional"> tcp-listen-queue <em class="replaceable"><code>number</code></em>; </span>]
2214 [<span class="optional"> transfer-format <em class="replaceable"><code>( one-answer | many-answers )</code></em>; </span>]
2215 [<span class="optional"> transfers-in <em class="replaceable"><code>number</code></em>; </span>]
2216 [<span class="optional"> transfers-out <em class="replaceable"><code>number</code></em>; </span>]
2217 [<span class="optional"> transfers-per-ns <em class="replaceable"><code>number</code></em>; </span>]
2218 [<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>]
2219 [<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>]
2220 [<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>]
2221 [<span class="optional"> alt-transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
2222 [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
2223 [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2224 [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
2225 [<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>]
2226 [<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>]
2227 [<span class="optional"> notify-to-soa <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2228 [<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>] ;
2229 [<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>]
2230 [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em>; </span>]
2231 [<span class="optional"> max-journal-size <em class="replaceable"><code>size_spec</code></em>; </span>]
2232 [<span class="optional"> coresize <em class="replaceable"><code>size_spec</code></em> ; </span>]
2233 [<span class="optional"> datasize <em class="replaceable"><code>size_spec</code></em> ; </span>]
2234 [<span class="optional"> files <em class="replaceable"><code>size_spec</code></em> ; </span>]
2235 [<span class="optional"> stacksize <em class="replaceable"><code>size_spec</code></em> ; </span>]
2236 [<span class="optional"> cleaning-interval <em class="replaceable"><code>number</code></em>; </span>]
2237 [<span class="optional"> heartbeat-interval <em class="replaceable"><code>number</code></em>; </span>]
2238 [<span class="optional"> interface-interval <em class="replaceable"><code>number</code></em>; </span>]
2239 [<span class="optional"> statistics-interval <em class="replaceable"><code>number</code></em>; </span>]
2240 [<span class="optional"> topology { <em class="replaceable"><code>address_match_list</code></em> }</span>];
2241 [<span class="optional"> sortlist { <em class="replaceable"><code>address_match_list</code></em> }</span>];
2242 [<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>] };
2243 [<span class="optional"> lame-ttl <em class="replaceable"><code>number</code></em>; </span>]
2244 [<span class="optional"> max-ncache-ttl <em class="replaceable"><code>number</code></em>; </span>]
2245 [<span class="optional"> max-cache-ttl <em class="replaceable"><code>number</code></em>; </span>]
2246 [<span class="optional"> sig-validity-interval <em class="replaceable"><code>number</code></em> [<span class="optional"><em class="replaceable"><code>number</code></em></span>] ; </span>]
2247 [<span class="optional"> sig-signing-nodes <em class="replaceable"><code>number</code></em> ; </span>]
2248 [<span class="optional"> sig-signing-signatures <em class="replaceable"><code>number</code></em> ; </span>]
2249 [<span class="optional"> sig-signing-type <em class="replaceable"><code>number</code></em> ; </span>]
2250 [<span class="optional"> min-roots <em class="replaceable"><code>number</code></em>; </span>]
2251 [<span class="optional"> use-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2252 [<span class="optional"> provide-ixfr <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2253 [<span class="optional"> request-ixfr <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2254 [<span class="optional"> treat-cr-as-space <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2255 [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
2256 [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
2257 [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
2258 [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
2259 [<span class="optional"> port <em class="replaceable"><code>ip_port</code></em>; </span>]
2260 [<span class="optional"> additional-from-auth <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2261 [<span class="optional"> additional-from-cache <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2262 [<span class="optional"> random-device <em class="replaceable"><code>path_name</code></em> ; </span>]
2263 [<span class="optional"> max-cache-size <em class="replaceable"><code>size_spec</code></em> ; </span>]
2264 [<span class="optional"> match-mapped-addresses <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2265 [<span class="optional"> filter-aaaa-on-v4 ( <em class="replaceable"><code>yes_or_no</code></em> | <em class="replaceable"><code>break-dnssec</code></em> ); </span>]
2266 [<span class="optional"> filter-aaaa { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2267 [<span class="optional"> dns64 <em class="replaceable"><code>IPv6-prefix</code></em> {
2268 [<span class="optional"> clients { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2269 [<span class="optional"> mapped { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2270 [<span class="optional"> exclude { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
2271 [<span class="optional"> suffix IPv6-address; </span>]
2272 [<span class="optional"> recursive-only <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2273 [<span class="optional"> break-dnssec <em class="replaceable"><code>yes_or_no</code></em>; </span>]
2275 [<span class="optional"> dns64-server <em class="replaceable"><code>name</code></em> </span>]
2276 [<span class="optional"> dns64-contact <em class="replaceable"><code>name</code></em> </span>]
2277 [<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>]
2278 [<span class="optional"> edns-udp-size <em class="replaceable"><code>number</code></em>; </span>]
2279 [<span class="optional"> max-udp-size <em class="replaceable"><code>number</code></em>; </span>]
2280 [<span class="optional"> root-delegation-only [<span class="optional"> exclude { <em class="replaceable"><code>namelist</code></em> } </span>] ; </span>]
2281 [<span class="optional"> querylog <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2282 [<span class="optional"> disable-algorithms <em class="replaceable"><code>domain</code></em> { <em class="replaceable"><code>algorithm</code></em>;
2283 [<span class="optional"> <em class="replaceable"><code>algorithm</code></em>; </span>] }; </span>]
2284 [<span class="optional"> acache-enable <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2285 [<span class="optional"> acache-cleaning-interval <em class="replaceable"><code>number</code></em>; </span>]
2286 [<span class="optional"> max-acache-size <em class="replaceable"><code>size_spec</code></em> ; </span>]
2287 [<span class="optional"> clients-per-query <em class="replaceable"><code>number</code></em> ; </span>]
2288 [<span class="optional"> max-clients-per-query <em class="replaceable"><code>number</code></em> ; </span>]
2289 [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
2290 [<span class="optional"> empty-server <em class="replaceable"><code>name</code></em> ; </span>]
2291 [<span class="optional"> empty-contact <em class="replaceable"><code>name</code></em> ; </span>]
2292 [<span class="optional"> empty-zones-enable <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2293 [<span class="optional"> disable-empty-zone <em class="replaceable"><code>zone_name</code></em> ; </span>]
2294 [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2295 [<span class="optional"> zero-no-soa-ttl-cache <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
2296 [<span class="optional"> resolver-query-timeout <em class="replaceable"><code>number</code></em> ; </span>]
2297 [<span class="optional"> deny-answer-addresses { <em class="replaceable"><code>address_match_list</code></em> } [<span class="optional"> except-from { <em class="replaceable"><code>namelist</code></em> } </span>];</span>]
2298 [<span class="optional"> deny-answer-aliases { <em class="replaceable"><code>namelist</code></em> } [<span class="optional"> except-from { <em class="replaceable"><code>namelist</code></em> } </span>];</span>]
2299 [<span class="optional"> response-policy { <em class="replaceable"><code>zone_name</code></em>
2300 [<span class="optional"> policy given | disabled | passthru | nxdomain | nodata | cname <em class="replaceable"><code>domain</code></em> </span>]
2301 [<span class="optional"> recursive-only <em class="replaceable"><code>yes_or_no</code></em> </span>] [<span class="optional"> max-policy-ttl <em class="replaceable"><code>number</code></em> </span>] ;
2302 } [<span class="optional"> recursive-only <em class="replaceable"><code>yes_or_no</code></em> </span>] [<span class="optional"> max-policy-ttl <em class="replaceable"><code>number</code></em> </span>]
2303 [<span class="optional"> break-dnssec <em class="replaceable"><code>yes_or_no</code></em> </span>] [<span class="optional"> min-ns-dots <em class="replaceable"><code>number</code></em> </span>] ; </span>]
2307 <div class="sect2" lang="en">
2308 <div class="titlepage"><div><div><h3 class="title">
2309 <a name="options"></a><span><strong class="command">options</strong></span> Statement Definition and
2310 Usage</h3></div></div></div>
2312 The <span><strong class="command">options</strong></span> statement sets up global
2314 to be used by <acronym class="acronym">BIND</acronym>. This statement
2316 once in a configuration file. If there is no <span><strong class="command">options</strong></span>
2317 statement, an options block with each option set to its default will
2320 <div class="variablelist"><dl>
2321 <dt><span class="term"><span><strong class="command">attach-cache</strong></span></span></dt>
2324 Allows multiple views to share a single cache
2326 Each view has its own cache database by default, but
2327 if multiple views have the same operational policy
2328 for name resolution and caching, those views can
2329 share a single cache to save memory and possibly
2330 improve resolution efficiency by using this option.
2333 The <span><strong class="command">attach-cache</strong></span> option
2334 may also be specified in <span><strong class="command">view</strong></span>
2335 statements, in which case it overrides the
2336 global <span><strong class="command">attach-cache</strong></span> option.
2339 The <em class="replaceable"><code>cache_name</code></em> specifies
2340 the cache to be shared.
2341 When the <span><strong class="command">named</strong></span> server configures
2342 views which are supposed to share a cache, it
2343 creates a cache with the specified name for the
2344 first view of these sharing views.
2345 The rest of the views will simply refer to the
2346 already created cache.
2349 One common configuration to share a cache would be to
2350 allow all views to share a single cache.
2351 This can be done by specifying
2352 the <span><strong class="command">attach-cache</strong></span> as a global
2353 option with an arbitrary name.
2356 Another possible operation is to allow a subset of
2357 all views to share a cache while the others to
2358 retain their own caches.
2359 For example, if there are three views A, B, and C,
2360 and only A and B should share a cache, specify the
2361 <span><strong class="command">attach-cache</strong></span> option as a view A (or
2362 B)'s option, referring to the other view name:
2364 <pre class="programlisting">
2366 // this view has its own cache
2370 // this view refers to A's cache
2374 // this view has its own cache
2379 Views that share a cache must have the same policy
2380 on configurable parameters that may affect caching.
2381 The current implementation requires the following
2382 configurable options be consistent among these
2384 <span><strong class="command">check-names</strong></span>,
2385 <span><strong class="command">cleaning-interval</strong></span>,
2386 <span><strong class="command">dnssec-accept-expired</strong></span>,
2387 <span><strong class="command">dnssec-validation</strong></span>,
2388 <span><strong class="command">max-cache-ttl</strong></span>,
2389 <span><strong class="command">max-ncache-ttl</strong></span>,
2390 <span><strong class="command">max-cache-size</strong></span>, and
2391 <span><strong class="command">zero-no-soa-ttl</strong></span>.
2394 Note that there may be other parameters that may
2395 cause confusion if they are inconsistent for
2396 different views that share a single cache.
2397 For example, if these views define different sets of
2398 forwarders that can return different answers for the
2399 same question, sharing the answer does not make
2400 sense or could even be harmful.
2401 It is administrator's responsibility to ensure
2402 configuration differences in different views do
2403 not cause disruption with a shared cache.
2406 <dt><span class="term"><span><strong class="command">directory</strong></span></span></dt>
2408 The working directory of the server.
2409 Any non-absolute pathnames in the configuration file will be
2411 as relative to this directory. The default location for most
2413 output files (e.g. <code class="filename">named.run</code>)
2415 If a directory is not specified, the working directory
2416 defaults to `<code class="filename">.</code>', the directory from
2418 was started. The directory specified should be an absolute
2421 <dt><span class="term"><span><strong class="command">key-directory</strong></span></span></dt>
2423 When performing dynamic update of secure zones, the
2424 directory where the public and private DNSSEC key files
2425 should be found, if different than the current working
2426 directory. (Note that this option has no effect on the
2427 paths for files containing non-DNSSEC keys such as
2428 <code class="filename">bind.keys</code>,
2429 <code class="filename">rndc.key</code> or
2430 <code class="filename">session.key</code>.)
2432 <dt><span class="term"><span><strong class="command">managed-keys-directory</strong></span></span></dt>
2435 Specifies the directory in which to store the files that
2436 track managed DNSSEC keys. By default, this is the working
2440 If <span><strong class="command">named</strong></span> is not configured to use views,
2441 then managed keys for the server will be tracked in a single
2442 file called <code class="filename">managed-keys.bind</code>.
2443 Otherwise, managed keys will be tracked in separate files,
2444 one file per view; each file name will be the SHA256 hash
2445 of the view name, followed by the extension
2446 <code class="filename">.mkeys</code>.
2449 <dt><span class="term"><span><strong class="command">named-xfer</strong></span></span></dt>
2451 <span class="emphasis"><em>This option is obsolete.</em></span> It
2452 was used in <acronym class="acronym">BIND</acronym> 8 to specify
2453 the pathname to the <span><strong class="command">named-xfer</strong></span>
2454 program. In <acronym class="acronym">BIND</acronym> 9, no separate
2455 <span><strong class="command">named-xfer</strong></span> program is needed;
2456 its functionality is built into the name server.
2458 <dt><span class="term"><span><strong class="command">tkey-gssapi-keytab</strong></span></span></dt>
2460 The KRB5 keytab file to use for GSS-TSIG updates. If
2461 this option is set and tkey-gssapi-credential is not
2462 set, then updates will be allowed with any key
2463 matching a principal in the specified keytab.
2465 <dt><span class="term"><span><strong class="command">tkey-gssapi-credential</strong></span></span></dt>
2467 The security credential with which the server should
2468 authenticate keys requested by the GSS-TSIG protocol.
2469 Currently only Kerberos 5 authentication is available
2470 and the credential is a Kerberos principal which the
2471 server can acquire through the default system key
2472 file, normally <code class="filename">/etc/krb5.keytab</code>.
2473 The location keytab file can be overridden using the
2474 tkey-gssapi-keytab option. Normally this principal is
2475 of the form "<strong class="userinput"><code>DNS/</code></strong><code class="varname">server.domain</code>".
2476 To use GSS-TSIG, <span><strong class="command">tkey-domain</strong></span> must
2477 also be set if a specific keytab is not set with
2480 <dt><span class="term"><span><strong class="command">tkey-domain</strong></span></span></dt>
2482 The domain appended to the names of all shared keys
2483 generated with <span><strong class="command">TKEY</strong></span>. When a
2484 client requests a <span><strong class="command">TKEY</strong></span> exchange,
2485 it may or may not specify the desired name for the
2486 key. If present, the name of the shared key will
2487 be <code class="varname">client specified part</code> +
2488 <code class="varname">tkey-domain</code>. Otherwise, the
2489 name of the shared key will be <code class="varname">random hex
2490 digits</code> + <code class="varname">tkey-domain</code>.
2491 In most cases, the <span><strong class="command">domainname</strong></span>
2492 should be the server's domain name, or an otherwise
2493 non-existent subdomain like
2494 "_tkey.<code class="varname">domainname</code>". If you are
2495 using GSS-TSIG, this variable must be defined, unless
2496 you specify a specific keytab using tkey-gssapi-keytab.
2498 <dt><span class="term"><span><strong class="command">tkey-dhkey</strong></span></span></dt>
2500 The Diffie-Hellman key used by the server
2501 to generate shared keys with clients using the Diffie-Hellman
2503 of <span><strong class="command">TKEY</strong></span>. The server must be
2505 public and private keys from files in the working directory.
2507 most cases, the keyname should be the server's host name.
2509 <dt><span class="term"><span><strong class="command">cache-file</strong></span></span></dt>
2511 This is for testing only. Do not use.
2513 <dt><span class="term"><span><strong class="command">dump-file</strong></span></span></dt>
2515 The pathname of the file the server dumps
2516 the database to when instructed to do so with
2517 <span><strong class="command">rndc dumpdb</strong></span>.
2518 If not specified, the default is <code class="filename">named_dump.db</code>.
2520 <dt><span class="term"><span><strong class="command">memstatistics-file</strong></span></span></dt>
2522 The pathname of the file the server writes memory
2523 usage statistics to on exit. If not specified,
2524 the default is <code class="filename">named.memstats</code>.
2526 <dt><span class="term"><span><strong class="command">pid-file</strong></span></span></dt>
2528 The pathname of the file the server writes its process ID
2529 in. If not specified, the default is
2530 <code class="filename">/var/run/named/named.pid</code>.
2531 The PID file is used by programs that want to send signals to
2533 name server. Specifying <span><strong class="command">pid-file none</strong></span> disables the
2534 use of a PID file — no file will be written and any
2535 existing one will be removed. Note that <span><strong class="command">none</strong></span>
2536 is a keyword, not a filename, and therefore is not enclosed
2540 <dt><span class="term"><span><strong class="command">recursing-file</strong></span></span></dt>
2542 The pathname of the file the server dumps
2543 the queries that are currently recursing when instructed
2544 to do so with <span><strong class="command">rndc recursing</strong></span>.
2545 If not specified, the default is <code class="filename">named.recursing</code>.
2547 <dt><span class="term"><span><strong class="command">statistics-file</strong></span></span></dt>
2549 The pathname of the file the server appends statistics
2550 to when instructed to do so using <span><strong class="command">rndc stats</strong></span>.
2551 If not specified, the default is <code class="filename">named.stats</code> in the
2552 server's current directory. The format of the file is
2554 in <a href="Bv9ARM.ch06.html#statsfile" title="The Statistics File">the section called “The Statistics File”</a>.
2556 <dt><span class="term"><span><strong class="command">bindkeys-file</strong></span></span></dt>
2558 The pathname of a file to override the built-in trusted
2559 keys provided by <span><strong class="command">named</strong></span>.
2560 See the discussion of <span><strong class="command">dnssec-lookaside</strong></span>
2561 and <span><strong class="command">dnssec-validation</strong></span> for details.
2562 If not specified, the default is
2563 <code class="filename">/etc/bind.keys</code>.
2565 <dt><span class="term"><span><strong class="command">secroots-file</strong></span></span></dt>
2567 The pathname of the file the server dumps
2568 security roots to when instructed to do so with
2569 <span><strong class="command">rndc secroots</strong></span>.
2570 If not specified, the default is
2571 <code class="filename">named.secroots</code>.
2573 <dt><span class="term"><span><strong class="command">session-keyfile</strong></span></span></dt>
2575 The pathname of the file into which to write a TSIG
2576 session key generated by <span><strong class="command">named</strong></span> for use by
2577 <span><strong class="command">nsupdate -l</strong></span>. If not specified, the
2578 default is <code class="filename">/var/run/named/session.key</code>.
2579 (See <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called “Dynamic Update Policies”</a>, and in
2580 particular the discussion of the
2581 <span><strong class="command">update-policy</strong></span> statement's
2582 <strong class="userinput"><code>local</code></strong> option for more
2583 information about this feature.)
2585 <dt><span class="term"><span><strong class="command">session-keyname</strong></span></span></dt>
2587 The key name to use for the TSIG session key.
2588 If not specified, the default is "local-ddns".
2590 <dt><span class="term"><span><strong class="command">session-keyalg</strong></span></span></dt>
2592 The algorithm to use for the TSIG session key.
2593 Valid values are hmac-sha1, hmac-sha224, hmac-sha256,
2594 hmac-sha384, hmac-sha512 and hmac-md5. If not
2595 specified, the default is hmac-sha256.
2597 <dt><span class="term"><span><strong class="command">port</strong></span></span></dt>
2599 The UDP/TCP port number the server uses for
2600 receiving and sending DNS protocol traffic.
2601 The default is 53. This option is mainly intended for server
2603 a server using a port other than 53 will not be able to
2607 <dt><span class="term"><span><strong class="command">random-device</strong></span></span></dt>
2609 The source of entropy to be used by the server. Entropy is
2611 for DNSSEC operations, such as TKEY transactions and dynamic
2613 zones. This options specifies the device (or file) from which
2615 entropy. If this is a file, operations requiring entropy will
2617 file has been exhausted. If not specified, the default value
2619 <code class="filename">/dev/random</code>
2620 (or equivalent) when present, and none otherwise. The
2621 <span><strong class="command">random-device</strong></span> option takes
2623 the initial configuration load at server startup time and
2624 is ignored on subsequent reloads.
2626 <dt><span class="term"><span><strong class="command">preferred-glue</strong></span></span></dt>
2628 If specified, the listed type (A or AAAA) will be emitted
2630 in the additional section of a query response.
2631 The default is not to prefer any type (NONE).
2634 <a name="root_delegation_only"></a><span class="term"><span><strong class="command">root-delegation-only</strong></span></span>
2638 Turn on enforcement of delegation-only in TLDs
2639 (top level domains) and root zones with an optional
2643 DS queries are expected to be made to and be answered by
2644 delegation only zones. Such queries and responses are
2645 treated as an exception to delegation-only processing
2646 and are not converted to NXDOMAIN responses provided
2647 a CNAME is not discovered at the query name.
2650 If a delegation only zone server also serves a child
2651 zone it is not always possible to determine whether
2652 an answer comes from the delegation only zone or the
2653 child zone. SOA NS and DNSKEY records are apex
2654 only records and a matching response that contains
2655 these records or DS is treated as coming from a
2656 child zone. RRSIG records are also examined to see
2657 if they are signed by a child zone or not. The
2658 authority section is also examined to see if there
2659 is evidence that the answer is from the child zone.
2660 Answers that are determined to be from a child zone
2661 are not converted to NXDOMAIN responses. Despite
2662 all these checks there is still a possibility of
2663 false negatives when a child zone is being served.
2666 Similarly false positives can arise from empty nodes
2667 (no records at the name) in the delegation only zone
2668 when the query type is not ANY.
2671 Note some TLDs are not delegation only (e.g. "DE", "LV",
2672 "US" and "MUSEUM"). This list is not exhaustive.
2674 <pre class="programlisting">
2676 root-delegation-only exclude { "de"; "lv"; "us"; "museum"; };
2680 <dt><span class="term"><span><strong class="command">disable-algorithms</strong></span></span></dt>
2682 Disable the specified DNSSEC algorithms at and below the
2684 Multiple <span><strong class="command">disable-algorithms</strong></span>
2685 statements are allowed.
2686 Only the most specific will be applied.
2688 <dt><span class="term"><span><strong class="command">dnssec-lookaside</strong></span></span></dt>
2691 When set, <span><strong class="command">dnssec-lookaside</strong></span> provides the
2692 validator with an alternate method to validate DNSKEY
2693 records at the top of a zone. When a DNSKEY is at or
2694 below a domain specified by the deepest
2695 <span><strong class="command">dnssec-lookaside</strong></span>, and the normal DNSSEC
2696 validation has left the key untrusted, the trust-anchor
2697 will be appended to the key name and a DLV record will be
2698 looked up to see if it can validate the key. If the DLV
2699 record validates a DNSKEY (similarly to the way a DS
2700 record does) the DNSKEY RRset is deemed to be trusted.
2703 If <span><strong class="command">dnssec-lookaside</strong></span> is set to
2704 <strong class="userinput"><code>auto</code></strong>, then built-in default
2705 values for the DLV domain and trust anchor will be
2706 used, along with a built-in key for validation.
2709 If <span><strong class="command">dnssec-lookaside</strong></span> is set to
2710 <strong class="userinput"><code>no</code></strong>, then dnssec-lookaside
2714 The default DLV key is stored in the file
2715 <code class="filename">bind.keys</code>;
2716 <span><strong class="command">named</strong></span> will load that key at
2717 startup if <span><strong class="command">dnssec-lookaside</strong></span> is set to
2718 <code class="constant">auto</code>. A copy of the file is
2719 installed along with <acronym class="acronym">BIND</acronym> 9, and is
2720 current as of the release date. If the DLV key expires, a
2721 new copy of <code class="filename">bind.keys</code> can be downloaded
2722 from <a href="https://www.isc.org/solutions/dlv/" target="_top">https://www.isc.org/solutions/dlv/</a>.
2725 (To prevent problems if <code class="filename">bind.keys</code> is
2726 not found, the current key is also compiled in to
2727 <span><strong class="command">named</strong></span>. Relying on this is not
2728 recommended, however, as it requires <span><strong class="command">named</strong></span>
2729 to be recompiled with a new key when the DLV key expires.)
2732 NOTE: <span><strong class="command">named</strong></span> only loads certain specific
2733 keys from <code class="filename">bind.keys</code>: those for the
2734 DLV zone and for the DNS root zone. The file cannot be
2735 used to store keys for other zones.
2738 <dt><span class="term"><span><strong class="command">dnssec-must-be-secure</strong></span></span></dt>
2740 Specify hierarchies which must be or may not be secure
2741 (signed and validated). If <strong class="userinput"><code>yes</code></strong>,
2742 then <span><strong class="command">named</strong></span> will only accept answers if
2743 they are secure. If <strong class="userinput"><code>no</code></strong>, then normal
2744 DNSSEC validation applies allowing for insecure answers to
2745 be accepted. The specified domain must be under a
2746 <span><strong class="command">trusted-keys</strong></span> or
2747 <span><strong class="command">managed-keys</strong></span> statement, or
2748 <span><strong class="command">dnssec-lookaside</strong></span> must be active.
2750 <dt><span class="term"><span><strong class="command">dns64</strong></span></span></dt>
2753 This directive instructs <span><strong class="command">named</strong></span> to
2754 return mapped IPv4 addresses to AAAA queries when
2755 there are no AAAA records. It is intended to be
2756 used in conjunction with a NAT64. Each
2757 <span><strong class="command">dns64</strong></span> defines one DNS64 prefix.
2758 Multiple DNS64 prefixes can be defined.
2761 Compatible IPv6 prefixes have lengths of 32, 40, 48, 56,
2762 64 and 96 as per RFC 6052.
2765 Additionally a reverse IP6.ARPA zone will be created for
2766 the prefix to provide a mapping from the IP6.ARPA names
2767 to the corresponding IN-ADDR.ARPA names using synthesized
2768 CNAMEs. <span><strong class="command">dns64-server</strong></span> and
2769 <span><strong class="command">dns64-contact</strong></span> can be used to specify
2770 the name of the server and contact for the zones. These
2771 are settable at the view / options level. These are
2772 not settable on a per-prefix basis.
2775 Each <span><strong class="command">dns64</strong></span> supports an optional
2776 <span><strong class="command">clients</strong></span> ACL that determines which
2777 clients are affected by this directive. If not defined,
2778 it defaults to <strong class="userinput"><code>any;</code></strong>.
2781 Each <span><strong class="command">dns64</strong></span> supports an optional
2782 <span><strong class="command">mapped</strong></span> ACL that selects which
2783 IPv4 addresses are to be mapped in the corresponding
2784 A RRset. If not defined it defaults to
2785 <strong class="userinput"><code>any;</code></strong>.
2788 Normally, DNS64 won't apply to a domain name that
2789 owns one or more AAAA records; these records will
2790 simply be returned. The optional
2791 <span><strong class="command">exclude</strong></span> ACL allows specification
2792 of a list of IPv6 addresses that will be ignored
2793 if they appear in a domain name's AAAA records, and
2794 DNS64 will be applied to any A records the domain
2795 name owns. If not defined, <span><strong class="command">exclude</strong></span>
2799 A optional <span><strong class="command">suffix</strong></span> can also
2800 be defined to set the bits trailing the mapped
2801 IPv4 address bits. By default these bits are
2802 set to <strong class="userinput"><code>::</code></strong>. The bits
2803 matching the prefix and mapped IPv4 address
2807 If <span><strong class="command">recursive-only</strong></span> is set to
2808 <span><strong class="command">yes</strong></span> the DNS64 synthesis will
2809 only happen for recursive queries. The default
2810 is <span><strong class="command">no</strong></span>.
2813 If <span><strong class="command">break-dnssec</strong></span> is set to
2814 <span><strong class="command">yes</strong></span> the DNS64 synthesis will
2815 happen even if the result, if validated, would
2816 cause a DNSSEC validation failure. If this option
2817 is set to <span><strong class="command">no</strong></span> (the default), the DO
2818 is set on the incoming query, and there are RRSIGs on
2819 the applicable records, then synthesis will not happen.
2821 <pre class="programlisting">
2822 acl rfc1918 { 10/8; 192.168/16; 172.16/12; };
2824 dns64 64:FF9B::/96 {
2826 mapped { !rfc1918; any; };
2827 exclude { 64:FF9B::/96; ::ffff:0000:0000/96; };
2833 <div class="sect3" lang="en">
2834 <div class="titlepage"><div><div><h4 class="title">
2835 <a name="boolean_options"></a>Boolean Options</h4></div></div></div>
2836 <div class="variablelist"><dl>
2837 <dt><span class="term"><span><strong class="command">allow-new-zones</strong></span></span></dt>
2839 If <strong class="userinput"><code>yes</code></strong>, then zones can be
2840 added at runtime via <span><strong class="command">rndc addzone</strong></span>
2841 or deleted via <span><strong class="command">rndc delzone</strong></span>.
2842 The default is <strong class="userinput"><code>no</code></strong>.
2844 <dt><span class="term"><span><strong class="command">auth-nxdomain</strong></span></span></dt>
2846 If <strong class="userinput"><code>yes</code></strong>, then the <span><strong class="command">AA</strong></span> bit
2847 is always set on NXDOMAIN responses, even if the server is
2849 authoritative. The default is <strong class="userinput"><code>no</code></strong>;
2851 a change from <acronym class="acronym">BIND</acronym> 8. If you
2852 are using very old DNS software, you
2853 may need to set it to <strong class="userinput"><code>yes</code></strong>.
2855 <dt><span class="term"><span><strong class="command">deallocate-on-exit</strong></span></span></dt>
2857 This option was used in <acronym class="acronym">BIND</acronym>
2858 8 to enable checking
2859 for memory leaks on exit. <acronym class="acronym">BIND</acronym> 9 ignores the option and always performs
2862 <dt><span class="term"><span><strong class="command">memstatistics</strong></span></span></dt>
2864 Write memory statistics to the file specified by
2865 <span><strong class="command">memstatistics-file</strong></span> at exit.
2866 The default is <strong class="userinput"><code>no</code></strong> unless
2867 '-m record' is specified on the command line in
2868 which case it is <strong class="userinput"><code>yes</code></strong>.
2870 <dt><span class="term"><span><strong class="command">dialup</strong></span></span></dt>
2873 If <strong class="userinput"><code>yes</code></strong>, then the
2874 server treats all zones as if they are doing zone transfers
2876 a dial-on-demand dialup link, which can be brought up by
2878 originating from this server. This has different effects
2880 to zone type and concentrates the zone maintenance so that
2882 happens in a short interval, once every <span><strong class="command">heartbeat-interval</strong></span> and
2883 hopefully during the one call. It also suppresses some of
2885 zone maintenance traffic. The default is <strong class="userinput"><code>no</code></strong>.
2888 The <span><strong class="command">dialup</strong></span> option
2889 may also be specified in the <span><strong class="command">view</strong></span> and
2890 <span><strong class="command">zone</strong></span> statements,
2891 in which case it overrides the global <span><strong class="command">dialup</strong></span>
2895 If the zone is a master zone, then the server will send out a
2897 request to all the slaves (default). This should trigger the
2899 number check in the slave (providing it supports NOTIFY)
2901 to verify the zone while the connection is active.
2902 The set of servers to which NOTIFY is sent can be controlled
2904 <span><strong class="command">notify</strong></span> and <span><strong class="command">also-notify</strong></span>.
2908 zone is a slave or stub zone, then the server will suppress
2910 "zone up to date" (refresh) queries and only perform them
2912 <span><strong class="command">heartbeat-interval</strong></span> expires in
2917 Finer control can be achieved by using
2918 <strong class="userinput"><code>notify</code></strong> which only sends NOTIFY
2920 <strong class="userinput"><code>notify-passive</code></strong> which sends NOTIFY
2922 suppresses the normal refresh queries, <strong class="userinput"><code>refresh</code></strong>
2923 which suppresses normal refresh processing and sends refresh
2925 when the <span><strong class="command">heartbeat-interval</strong></span>
2927 <strong class="userinput"><code>passive</code></strong> which just disables normal
2931 <div class="informaltable"><table border="1">
2963 <p><span><strong class="command">no</strong></span> (default)</p>
2983 <p><span><strong class="command">yes</strong></span></p>
3003 <p><span><strong class="command">notify</strong></span></p>
3023 <p><span><strong class="command">refresh</strong></span></p>
3043 <p><span><strong class="command">passive</strong></span></p>
3063 <p><span><strong class="command">notify-passive</strong></span></p>
3084 Note that normal NOTIFY processing is not affected by
3085 <span><strong class="command">dialup</strong></span>.
3088 <dt><span class="term"><span><strong class="command">fake-iquery</strong></span></span></dt>
3090 In <acronym class="acronym">BIND</acronym> 8, this option
3091 enabled simulating the obsolete DNS query type
3092 IQUERY. <acronym class="acronym">BIND</acronym> 9 never does
3095 <dt><span class="term"><span><strong class="command">fetch-glue</strong></span></span></dt>
3097 This option is obsolete.
3098 In BIND 8, <strong class="userinput"><code>fetch-glue yes</code></strong>
3099 caused the server to attempt to fetch glue resource records
3101 didn't have when constructing the additional
3102 data section of a response. This is now considered a bad
3104 and BIND 9 never does it.
3106 <dt><span class="term"><span><strong class="command">flush-zones-on-shutdown</strong></span></span></dt>
3108 When the nameserver exits due receiving SIGTERM,
3109 flush or do not flush any pending zone writes. The default
3111 <span><strong class="command">flush-zones-on-shutdown</strong></span> <strong class="userinput"><code>no</code></strong>.
3113 <dt><span class="term"><span><strong class="command">has-old-clients</strong></span></span></dt>
3115 This option was incorrectly implemented
3116 in <acronym class="acronym">BIND</acronym> 8, and is ignored by <acronym class="acronym">BIND</acronym> 9.
3117 To achieve the intended effect
3119 <span><strong class="command">has-old-clients</strong></span> <strong class="userinput"><code>yes</code></strong>, specify
3120 the two separate options <span><strong class="command">auth-nxdomain</strong></span> <strong class="userinput"><code>yes</code></strong>
3121 and <span><strong class="command">rfc2308-type1</strong></span> <strong class="userinput"><code>no</code></strong> instead.
3123 <dt><span class="term"><span><strong class="command">host-statistics</strong></span></span></dt>
3125 In BIND 8, this enables keeping of
3126 statistics for every host that the name server interacts
3128 Not implemented in BIND 9.
3130 <dt><span class="term"><span><strong class="command">maintain-ixfr-base</strong></span></span></dt>
3132 <span class="emphasis"><em>This option is obsolete</em></span>.
3133 It was used in <acronym class="acronym">BIND</acronym> 8 to
3134 determine whether a transaction log was
3135 kept for Incremental Zone Transfer. <acronym class="acronym">BIND</acronym> 9 maintains a transaction
3136 log whenever possible. If you need to disable outgoing
3138 transfers, use <span><strong class="command">provide-ixfr</strong></span> <strong class="userinput"><code>no</code></strong>.
3140 <dt><span class="term"><span><strong class="command">minimal-responses</strong></span></span></dt>
3142 If <strong class="userinput"><code>yes</code></strong>, then when generating
3143 responses the server will only add records to the authority
3144 and additional data sections when they are required (e.g.
3145 delegations, negative responses). This may improve the
3146 performance of the server.
3147 The default is <strong class="userinput"><code>no</code></strong>.
3149 <dt><span class="term"><span><strong class="command">multiple-cnames</strong></span></span></dt>
3151 This option was used in <acronym class="acronym">BIND</acronym> 8 to allow
3152 a domain name to have multiple CNAME records in violation of
3153 the DNS standards. <acronym class="acronym">BIND</acronym> 9.2 onwards
3154 always strictly enforces the CNAME rules both in master
3155 files and dynamic updates.
3157 <dt><span class="term"><span><strong class="command">notify</strong></span></span></dt>
3160 If <strong class="userinput"><code>yes</code></strong> (the default),
3161 DNS NOTIFY messages are sent when a zone the server is
3163 changes, see <a href="Bv9ARM.ch04.html#notify" title="Notify">the section called “Notify”</a>. The messages are
3165 servers listed in the zone's NS records (except the master
3167 in the SOA MNAME field), and to any servers listed in the
3168 <span><strong class="command">also-notify</strong></span> option.
3171 If <strong class="userinput"><code>master-only</code></strong>, notifies are only
3174 If <strong class="userinput"><code>explicit</code></strong>, notifies are sent only
3176 servers explicitly listed using <span><strong class="command">also-notify</strong></span>.
3177 If <strong class="userinput"><code>no</code></strong>, no notifies are sent.
3180 The <span><strong class="command">notify</strong></span> option may also be
3181 specified in the <span><strong class="command">zone</strong></span>
3183 in which case it overrides the <span><strong class="command">options notify</strong></span> statement.
3184 It would only be necessary to turn off this option if it
3189 <dt><span class="term"><span><strong class="command">notify-to-soa</strong></span></span></dt>
3191 If <strong class="userinput"><code>yes</code></strong> do not check the nameservers
3192 in the NS RRset against the SOA MNAME. Normally a NOTIFY
3193 message is not sent to the SOA MNAME (SOA ORIGIN) as it is
3194 supposed to contain the name of the ultimate master.
3195 Sometimes, however, a slave is listed as the SOA MNAME in
3196 hidden master configurations and in that case you would
3197 want the ultimate master to still send NOTIFY messages to
3198 all the nameservers listed in the NS RRset.
3200 <dt><span class="term"><span><strong class="command">recursion</strong></span></span></dt>
3202 If <strong class="userinput"><code>yes</code></strong>, and a
3203 DNS query requests recursion, then the server will attempt
3205 all the work required to answer the query. If recursion is
3207 and the server does not already know the answer, it will
3209 referral response. The default is
3210 <strong class="userinput"><code>yes</code></strong>.
3211 Note that setting <span><strong class="command">recursion no</strong></span> does not prevent
3212 clients from getting data from the server's cache; it only
3213 prevents new data from being cached as an effect of client
3215 Caching may still occur as an effect the server's internal
3216 operation, such as NOTIFY address lookups.
3217 See also <span><strong class="command">fetch-glue</strong></span> above.
3219 <dt><span class="term"><span><strong class="command">request-nsid</strong></span></span></dt>
3221 If <strong class="userinput"><code>yes</code></strong>, then an empty EDNS(0)
3222 NSID (Name Server Identifier) option is sent with all
3223 queries to authoritative name servers during iterative
3224 resolution. If the authoritative server returns an NSID
3225 option in its response, then its contents are logged in
3226 the <span><strong class="command">resolver</strong></span> category at level
3227 <span><strong class="command">info</strong></span>.
3228 The default is <strong class="userinput"><code>no</code></strong>.
3230 <dt><span class="term"><span><strong class="command">rfc2308-type1</strong></span></span></dt>
3233 Setting this to <strong class="userinput"><code>yes</code></strong> will
3234 cause the server to send NS records along with the SOA
3236 answers. The default is <strong class="userinput"><code>no</code></strong>.
3238 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3239 <h3 class="title">Note</h3>
3241 Not yet implemented in <acronym class="acronym">BIND</acronym>
3246 <dt><span class="term"><span><strong class="command">use-id-pool</strong></span></span></dt>
3248 <span class="emphasis"><em>This option is obsolete</em></span>.
3249 <acronym class="acronym">BIND</acronym> 9 always allocates query
3252 <dt><span class="term"><span><strong class="command">zone-statistics</strong></span></span></dt>
3254 If <strong class="userinput"><code>yes</code></strong>, the server will collect
3255 statistical data on all zones (unless specifically turned
3257 on a per-zone basis by specifying <span><strong class="command">zone-statistics no</strong></span>
3258 in the <span><strong class="command">zone</strong></span> statement).
3259 The default is <strong class="userinput"><code>no</code></strong>.
3260 These statistics may be accessed
3261 using <span><strong class="command">rndc stats</strong></span>, which will
3262 dump them to the file listed
3263 in the <span><strong class="command">statistics-file</strong></span>. See
3264 also <a href="Bv9ARM.ch06.html#statsfile" title="The Statistics File">the section called “The Statistics File”</a>.
3266 <dt><span class="term"><span><strong class="command">use-ixfr</strong></span></span></dt>
3268 <span class="emphasis"><em>This option is obsolete</em></span>.
3269 If you need to disable IXFR to a particular server or
3271 the information on the <span><strong class="command">provide-ixfr</strong></span> option
3272 in <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
3273 Usage">the section called “<span><strong class="command">server</strong></span> Statement Definition and
3276 <a href="Bv9ARM.ch04.html#incremental_zone_transfers" title="Incremental Zone Transfers (IXFR)">the section called “Incremental Zone Transfers (IXFR)”</a>.
3278 <dt><span class="term"><span><strong class="command">provide-ixfr</strong></span></span></dt>
3280 See the description of
3281 <span><strong class="command">provide-ixfr</strong></span> in
3282 <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
3283 Usage">the section called “<span><strong class="command">server</strong></span> Statement Definition and
3286 <dt><span class="term"><span><strong class="command">request-ixfr</strong></span></span></dt>
3288 See the description of
3289 <span><strong class="command">request-ixfr</strong></span> in
3290 <a href="Bv9ARM.ch06.html#server_statement_definition_and_usage" title="server Statement Definition and
3291 Usage">the section called “<span><strong class="command">server</strong></span> Statement Definition and
3294 <dt><span class="term"><span><strong class="command">treat-cr-as-space</strong></span></span></dt>
3296 This option was used in <acronym class="acronym">BIND</acronym>
3298 the server treat carriage return ("<span><strong class="command">\r</strong></span>") characters the same way
3299 as a space or tab character,
3300 to facilitate loading of zone files on a UNIX system that
3302 on an NT or DOS machine. In <acronym class="acronym">BIND</acronym> 9, both UNIX "<span><strong class="command">\n</strong></span>"
3303 and NT/DOS "<span><strong class="command">\r\n</strong></span>" newlines
3304 are always accepted,
3305 and the option is ignored.
3308 <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>
3312 These options control the behavior of an authoritative
3314 answering queries which have additional data, or when
3319 When both of these options are set to <strong class="userinput"><code>yes</code></strong>
3321 query is being answered from authoritative data (a zone
3322 configured into the server), the additional data section of
3324 reply will be filled in using data from other authoritative
3326 and from the cache. In some situations this is undesirable,
3328 as when there is concern over the correctness of the cache,
3330 in servers where slave zones may be added and modified by
3331 untrusted third parties. Also, avoiding
3332 the search for this additional data will speed up server
3334 at the possible expense of additional queries to resolve
3336 otherwise be provided in the additional section.
3339 For example, if a query asks for an MX record for host <code class="literal">foo.example.com</code>,
3340 and the record found is "<code class="literal">MX 10 mail.example.net</code>", normally the address
3341 records (A and AAAA) for <code class="literal">mail.example.net</code> will be provided as well,
3342 if known, even though they are not in the example.com zone.
3343 Setting these options to <span><strong class="command">no</strong></span>
3344 disables this behavior and makes
3345 the server only search for additional data in the zone it
3349 These options are intended for use in authoritative-only
3350 servers, or in authoritative-only views. Attempts to set
3351 them to <span><strong class="command">no</strong></span> without also
3353 <span><strong class="command">recursion no</strong></span> will cause the
3355 ignore the options and log a warning message.
3358 Specifying <span><strong class="command">additional-from-cache no</strong></span> actually
3359 disables the use of the cache not only for additional data
3361 but also when looking up the answer. This is usually the
3363 behavior in an authoritative-only server where the
3365 the cached data is an issue.
3368 When a name server is non-recursively queried for a name
3370 below the apex of any served zone, it normally answers with
3372 "upwards referral" to the root servers or the servers of
3374 known parent of the query name. Since the data in an
3376 comes from the cache, the server will not be able to provide
3378 referrals when <span><strong class="command">additional-from-cache no</strong></span>
3379 has been specified. Instead, it will respond to such
3381 with REFUSED. This should not cause any problems since
3382 upwards referrals are not required for the resolution
3386 <dt><span class="term"><span><strong class="command">match-mapped-addresses</strong></span></span></dt>
3389 If <strong class="userinput"><code>yes</code></strong>, then an
3390 IPv4-mapped IPv6 address will match any address match
3391 list entries that match the corresponding IPv4 address.
3394 This option was introduced to work around a kernel quirk
3395 in some operating systems that causes IPv4 TCP
3396 connections, such as zone transfers, to be accepted on an
3397 IPv6 socket using mapped addresses. This caused address
3398 match lists designed for IPv4 to fail to match. However,
3399 <span><strong class="command">named</strong></span> now solves this problem
3400 internally. The use of this option is discouraged.
3403 <dt><span class="term"><span><strong class="command">filter-aaaa-on-v4</strong></span></span></dt>
3406 This option is only available when
3407 <acronym class="acronym">BIND</acronym> 9 is compiled with the
3408 <strong class="userinput"><code>--enable-filter-aaaa</code></strong> option on the
3409 "configure" command line. It is intended to help the
3410 transition from IPv4 to IPv6 by not giving IPv6 addresses
3411 to DNS clients unless they have connections to the IPv6
3412 Internet. This is not recommended unless absolutely
3413 necessary. The default is <strong class="userinput"><code>no</code></strong>.
3414 The <span><strong class="command">filter-aaaa-on-v4</strong></span> option
3415 may also be specified in <span><strong class="command">view</strong></span> statements
3416 to override the global <span><strong class="command">filter-aaaa-on-v4</strong></span>
3420 If <strong class="userinput"><code>yes</code></strong>,
3421 the DNS client is at an IPv4 address, in <span><strong class="command">filter-aaaa</strong></span>,
3422 and if the response does not include DNSSEC signatures,
3423 then all AAAA records are deleted from the response.
3424 This filtering applies to all responses and not only
3425 authoritative responses.
3428 If <strong class="userinput"><code>break-dnssec</code></strong>,
3429 then AAAA records are deleted even when dnssec is enabled.
3430 As suggested by the name, this makes the response not verify,
3431 because the DNSSEC protocol is designed detect deletions.
3434 This mechanism can erroneously cause other servers to
3435 not give AAAA records to their clients.
3436 A recursing server with both IPv6 and IPv4 network connections
3437 that queries an authoritative server using this mechanism
3438 via IPv4 will be denied AAAA records even if its client is
3442 This mechanism is applied to authoritative as well as
3443 non-authoritative records.
3444 A client using IPv4 that is not allowed recursion can
3445 erroneously be given AAAA records because the server is not
3446 allowed to check for A records.
3449 Some AAAA records are given to IPv4 clients in glue records.
3450 IPv4 clients that are servers can then erroneously
3451 answer requests for AAAA records received via IPv4.
3454 <dt><span class="term"><span><strong class="command">ixfr-from-differences</strong></span></span></dt>
3457 When <strong class="userinput"><code>yes</code></strong> and the server loads a new version of a master
3458 zone from its zone file or receives a new version of a slave
3459 file by a non-incremental zone transfer, it will compare
3460 the new version to the previous one and calculate a set
3461 of differences. The differences are then logged in the
3462 zone's journal file such that the changes can be transmitted
3463 to downstream slaves as an incremental zone transfer.
3466 By allowing incremental zone transfers to be used for
3467 non-dynamic zones, this option saves bandwidth at the
3468 expense of increased CPU and memory consumption at the
3470 In particular, if the new version of a zone is completely
3471 different from the previous one, the set of differences
3472 will be of a size comparable to the combined size of the
3473 old and new zone version, and the server will need to
3474 temporarily allocate memory to hold this complete
3477 <p><span><strong class="command">ixfr-from-differences</strong></span>
3478 also accepts <span><strong class="command">master</strong></span> and
3479 <span><strong class="command">slave</strong></span> at the view and options
3481 <span><strong class="command">ixfr-from-differences</strong></span> to be enabled for
3482 all <span><strong class="command">master</strong></span> or
3483 <span><strong class="command">slave</strong></span> zones respectively.
3484 It is off by default.
3487 <dt><span class="term"><span><strong class="command">multi-master</strong></span></span></dt>
3489 This should be set when you have multiple masters for a zone
3491 addresses refer to different machines. If <strong class="userinput"><code>yes</code></strong>, <span><strong class="command">named</strong></span> will
3493 when the serial number on the master is less than what <span><strong class="command">named</strong></span>
3495 has. The default is <strong class="userinput"><code>no</code></strong>.
3497 <dt><span class="term"><span><strong class="command">dnssec-enable</strong></span></span></dt>
3499 Enable DNSSEC support in <span><strong class="command">named</strong></span>. Unless set to <strong class="userinput"><code>yes</code></strong>,
3500 <span><strong class="command">named</strong></span> behaves as if it does not support DNSSEC.
3501 The default is <strong class="userinput"><code>yes</code></strong>.
3503 <dt><span class="term"><span><strong class="command">dnssec-validation</strong></span></span></dt>
3505 Enable DNSSEC validation in <span><strong class="command">named</strong></span>.
3506 Note <span><strong class="command">dnssec-enable</strong></span> also needs to be
3507 set to <strong class="userinput"><code>yes</code></strong> to be effective.
3508 If set to <strong class="userinput"><code>no</code></strong>, DNSSEC validation
3509 is disabled. If set to <strong class="userinput"><code>auto</code></strong>,
3510 DNSSEC validation is enabled, and a default
3511 trust-anchor for the DNS root zone is used. If set to
3512 <strong class="userinput"><code>yes</code></strong>, DNSSEC validation is enabled,
3513 but a trust anchor must be manually configured using
3514 a <span><strong class="command">trusted-keys</strong></span> or
3515 <span><strong class="command">managed-keys</strong></span> statement. The default
3516 is <strong class="userinput"><code>yes</code></strong>.
3518 <dt><span class="term"><span><strong class="command">dnssec-accept-expired</strong></span></span></dt>
3520 Accept expired signatures when verifying DNSSEC signatures.
3521 The default is <strong class="userinput"><code>no</code></strong>.
3522 Setting this option to <strong class="userinput"><code>yes</code></strong>
3523 leaves <span><strong class="command">named</strong></span> vulnerable to
3526 <dt><span class="term"><span><strong class="command">querylog</strong></span></span></dt>
3528 Specify whether query logging should be started when <span><strong class="command">named</strong></span>
3530 If <span><strong class="command">querylog</strong></span> is not specified,
3531 then the query logging
3532 is determined by the presence of the logging category <span><strong class="command">queries</strong></span>.
3534 <dt><span class="term"><span><strong class="command">check-names</strong></span></span></dt>
3537 This option is used to restrict the character set and syntax
3539 certain domain names in master files and/or DNS responses
3541 from the network. The default varies according to usage
3543 <span><strong class="command">master</strong></span> zones the default is <span><strong class="command">fail</strong></span>.
3544 For <span><strong class="command">slave</strong></span> zones the default
3545 is <span><strong class="command">warn</strong></span>.
3546 For answers received from the network (<span><strong class="command">response</strong></span>)
3547 the default is <span><strong class="command">ignore</strong></span>.
3550 The rules for legal hostnames and mail domains are derived
3551 from RFC 952 and RFC 821 as modified by RFC 1123.
3553 <p><span><strong class="command">check-names</strong></span>
3554 applies to the owner names of A, AAAA and MX records.
3555 It also applies to the domain names in the RDATA of NS, SOA,
3556 MX, and SRV records.
3557 It also applies to the RDATA of PTR records where the owner
3558 name indicated that it is a reverse lookup of a hostname
3559 (the owner name ends in IN-ADDR.ARPA, IP6.ARPA, or IP6.INT).
3562 <dt><span class="term"><span><strong class="command">check-dup-records</strong></span></span></dt>
3564 Check master zones for records that are treated as different
3565 by DNSSEC but are semantically equal in plain DNS. The
3566 default is to <span><strong class="command">warn</strong></span>. Other possible
3567 values are <span><strong class="command">fail</strong></span> and
3568 <span><strong class="command">ignore</strong></span>.
3570 <dt><span class="term"><span><strong class="command">check-mx</strong></span></span></dt>
3572 Check whether the MX record appears to refer to a IP address.
3573 The default is to <span><strong class="command">warn</strong></span>. Other possible
3574 values are <span><strong class="command">fail</strong></span> and
3575 <span><strong class="command">ignore</strong></span>.
3577 <dt><span class="term"><span><strong class="command">check-wildcard</strong></span></span></dt>
3579 This option is used to check for non-terminal wildcards.
3580 The use of non-terminal wildcards is almost always as a
3582 to understand the wildcard matching algorithm (RFC 1034).
3584 affects master zones. The default (<span><strong class="command">yes</strong></span>) is to check
3585 for non-terminal wildcards and issue a warning.
3587 <dt><span class="term"><span><strong class="command">check-integrity</strong></span></span></dt>
3590 Perform post load zone integrity checks on master
3591 zones. This checks that MX and SRV records refer
3592 to address (A or AAAA) records and that glue
3593 address records exist for delegated zones. For
3594 MX and SRV records only in-zone hostnames are
3595 checked (for out-of-zone hostnames use
3596 <span><strong class="command">named-checkzone</strong></span>).
3597 For NS records only names below top of zone are
3598 checked (for out-of-zone names and glue consistency
3599 checks use <span><strong class="command">named-checkzone</strong></span>).
3600 The default is <span><strong class="command">yes</strong></span>.
3603 Check that the two forms of Sender Policy Framework
3604 records (TXT records starting with "v=spf1" and SPF) either
3605 both exist or both don't exist. Warnings are
3606 emitted it they don't and be suppressed with
3607 <span><strong class="command">check-spf</strong></span>.
3610 <dt><span class="term"><span><strong class="command">check-mx-cname</strong></span></span></dt>
3612 If <span><strong class="command">check-integrity</strong></span> is set then
3613 fail, warn or ignore MX records that refer
3614 to CNAMES. The default is to <span><strong class="command">warn</strong></span>.
3616 <dt><span class="term"><span><strong class="command">check-srv-cname</strong></span></span></dt>
3618 If <span><strong class="command">check-integrity</strong></span> is set then
3619 fail, warn or ignore SRV records that refer
3620 to CNAMES. The default is to <span><strong class="command">warn</strong></span>.
3622 <dt><span class="term"><span><strong class="command">check-sibling</strong></span></span></dt>
3624 When performing integrity checks, also check that
3625 sibling glue exists. The default is <span><strong class="command">yes</strong></span>.
3627 <dt><span class="term"><span><strong class="command">check-spf</strong></span></span></dt>
3629 When performing integrity checks, check that the
3630 two forms of Sender Policy Framwork records (TXT
3631 records starting with "v=spf1" and SPF) both exist
3632 or both don't exist and issue a warning if not
3633 met. The default is <span><strong class="command">warn</strong></span>.
3635 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl</strong></span></span></dt>
3637 When returning authoritative negative responses to
3638 SOA queries set the TTL of the SOA record returned in
3639 the authority section to zero.
3640 The default is <span><strong class="command">yes</strong></span>.
3642 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl-cache</strong></span></span></dt>
3644 When caching a negative response to a SOA query
3645 set the TTL to zero.
3646 The default is <span><strong class="command">no</strong></span>.
3648 <dt><span class="term"><span><strong class="command">update-check-ksk</strong></span></span></dt>
3651 When set to the default value of <code class="literal">yes</code>,
3652 check the KSK bit in each key to determine how the key
3653 should be used when generating RRSIGs for a secure zone.
3656 Ordinarily, zone-signing keys (that is, keys without the
3657 KSK bit set) are used to sign the entire zone, while
3658 key-signing keys (keys with the KSK bit set) are only
3659 used to sign the DNSKEY RRset at the zone apex.
3660 However, if this option is set to <code class="literal">no</code>,
3661 then the KSK bit is ignored; KSKs are treated as if they
3662 were ZSKs and are used to sign the entire zone. This is
3663 similar to the <span><strong class="command">dnssec-signzone -z</strong></span>
3664 command line option.
3667 When this option is set to <code class="literal">yes</code>, there
3668 must be at least two active keys for every algorithm
3669 represented in the DNSKEY RRset: at least one KSK and one
3670 ZSK per algorithm. If there is any algorithm for which
3671 this requirement is not met, this option will be ignored
3675 <dt><span class="term"><span><strong class="command">dnssec-dnskey-kskonly</strong></span></span></dt>
3678 When this option and <span><strong class="command">update-check-ksk</strong></span>
3679 are both set to <code class="literal">yes</code>, only key-signing
3680 keys (that is, keys with the KSK bit set) will be used
3681 to sign the DNSKEY RRset at the zone apex. Zone-signing
3682 keys (keys without the KSK bit set) will be used to sign
3683 the remainder of the zone, but not the DNSKEY RRset.
3684 This is similar to the
3685 <span><strong class="command">dnssec-signzone -x</strong></span> command line option.
3688 The default is <span><strong class="command">no</strong></span>. If
3689 <span><strong class="command">update-check-ksk</strong></span> is set to
3690 <code class="literal">no</code>, this option is ignored.
3693 <dt><span class="term"><span><strong class="command">try-tcp-refresh</strong></span></span></dt>
3695 Try to refresh the zone using TCP if UDP queries fail.
3696 For BIND 8 compatibility, the default is
3697 <span><strong class="command">yes</strong></span>.
3699 <dt><span class="term"><span><strong class="command">dnssec-secure-to-insecure</strong></span></span></dt>
3702 Allow a dynamic zone to transition from secure to
3703 insecure (i.e., signed to unsigned) by deleting all
3704 of the DNSKEY records. The default is <span><strong class="command">no</strong></span>.
3705 If set to <span><strong class="command">yes</strong></span>, and if the DNSKEY RRset
3706 at the zone apex is deleted, all RRSIG and NSEC records
3707 will be removed from the zone as well.
3710 If the zone uses NSEC3, then it is also necessary to
3711 delete the NSEC3PARAM RRset from the zone apex; this will
3712 cause the removal of all corresponding NSEC3 records.
3713 (It is expected that this requirement will be eliminated
3714 in a future release.)
3717 Note that if a zone has been configured with
3718 <span><strong class="command">auto-dnssec maintain</strong></span> and the
3719 private keys remain accessible in the key repository,
3720 then the zone will be automatically signed again the
3721 next time <span><strong class="command">named</strong></span> is started.
3726 <div class="sect3" lang="en">
3727 <div class="titlepage"><div><div><h4 class="title">
3728 <a name="id2582843"></a>Forwarding</h4></div></div></div>
3730 The forwarding facility can be used to create a large site-wide
3731 cache on a few servers, reducing traffic over links to external
3732 name servers. It can also be used to allow queries by servers that
3733 do not have direct access to the Internet, but wish to look up
3735 names anyway. Forwarding occurs only on those queries for which
3736 the server is not authoritative and does not have the answer in
3739 <div class="variablelist"><dl>
3740 <dt><span class="term"><span><strong class="command">forward</strong></span></span></dt>
3742 This option is only meaningful if the
3743 forwarders list is not empty. A value of <code class="varname">first</code>,
3744 the default, causes the server to query the forwarders
3746 if that doesn't answer the question, the server will then
3748 the answer itself. If <code class="varname">only</code> is
3750 server will only query the forwarders.
3752 <dt><span class="term"><span><strong class="command">forwarders</strong></span></span></dt>
3754 Specifies the IP addresses to be used
3755 for forwarding. The default is the empty list (no
3760 Forwarding can also be configured on a per-domain basis, allowing
3761 for the global forwarding options to be overridden in a variety
3762 of ways. You can set particular domains to use different
3764 or have a different <span><strong class="command">forward only/first</strong></span> behavior,
3765 or not forward at all, see <a href="Bv9ARM.ch06.html#zone_statement_grammar" title="zone
3766 Statement Grammar">the section called “<span><strong class="command">zone</strong></span>
3767 Statement Grammar”</a>.
3770 <div class="sect3" lang="en">
3771 <div class="titlepage"><div><div><h4 class="title">
3772 <a name="id2582970"></a>Dual-stack Servers</h4></div></div></div>
3774 Dual-stack servers are used as servers of last resort to work
3776 problems in reachability due the lack of support for either IPv4
3778 on the host machine.
3780 <div class="variablelist"><dl>
3781 <dt><span class="term"><span><strong class="command">dual-stack-servers</strong></span></span></dt>
3783 Specifies host names or addresses of machines with access to
3784 both IPv4 and IPv6 transports. If a hostname is used, the
3786 to resolve the name using only the transport it has. If the
3788 stacked, then the <span><strong class="command">dual-stack-servers</strong></span> have no effect unless
3789 access to a transport has been disabled on the command line
3790 (e.g. <span><strong class="command">named -4</strong></span>).
3794 <div class="sect3" lang="en">
3795 <div class="titlepage"><div><div><h4 class="title">
3796 <a name="access_control"></a>Access Control</h4></div></div></div>
3798 Access to the server can be restricted based on the IP address
3799 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
3800 details on how to specify IP address lists.
3802 <div class="variablelist"><dl>
3803 <dt><span class="term"><span><strong class="command">allow-notify</strong></span></span></dt>
3805 Specifies which hosts are allowed to
3806 notify this server, a slave, of zone changes in addition
3807 to the zone masters.
3808 <span><strong class="command">allow-notify</strong></span> may also be
3810 <span><strong class="command">zone</strong></span> statement, in which case
3812 <span><strong class="command">options allow-notify</strong></span>
3813 statement. It is only meaningful
3814 for a slave zone. If not specified, the default is to
3815 process notify messages
3816 only from a zone's master.
3818 <dt><span class="term"><span><strong class="command">allow-query</strong></span></span></dt>
3821 Specifies which hosts are allowed to ask ordinary
3822 DNS questions. <span><strong class="command">allow-query</strong></span> may
3823 also be specified in the <span><strong class="command">zone</strong></span>
3824 statement, in which case it overrides the
3825 <span><strong class="command">options allow-query</strong></span> statement.
3826 If not specified, the default is to allow queries
3829 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3830 <h3 class="title">Note</h3>
3832 <span><strong class="command">allow-query-cache</strong></span> is now
3833 used to specify access to the cache.
3837 <dt><span class="term"><span><strong class="command">allow-query-on</strong></span></span></dt>
3840 Specifies which local addresses can accept ordinary
3841 DNS questions. This makes it possible, for instance,
3842 to allow queries on internal-facing interfaces but
3843 disallow them on external-facing ones, without
3844 necessarily knowing the internal network's addresses.
3847 Note that <span><strong class="command">allow-query-on</strong></span> is only
3848 checked for queries that are permitted by
3849 <span><strong class="command">allow-query</strong></span>. A query must be
3850 allowed by both ACLs, or it will be refused.
3853 <span><strong class="command">allow-query-on</strong></span> may
3854 also be specified in the <span><strong class="command">zone</strong></span>
3855 statement, in which case it overrides the
3856 <span><strong class="command">options allow-query-on</strong></span> statement.
3859 If not specified, the default is to allow queries
3862 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3863 <h3 class="title">Note</h3>
3865 <span><strong class="command">allow-query-cache</strong></span> is
3866 used to specify access to the cache.
3870 <dt><span class="term"><span><strong class="command">allow-query-cache</strong></span></span></dt>
3872 Specifies which hosts are allowed to get answers
3873 from the cache. If <span><strong class="command">allow-query-cache</strong></span>
3874 is not set then <span><strong class="command">allow-recursion</strong></span>
3875 is used if set, otherwise <span><strong class="command">allow-query</strong></span>
3876 is used if set unless <span><strong class="command">recursion no;</strong></span> is
3877 set in which case <span><strong class="command">none;</strong></span> is used,
3878 otherwise the default (<span><strong class="command">localnets;</strong></span>
3879 <span><strong class="command">localhost;</strong></span>) is used.
3881 <dt><span class="term"><span><strong class="command">allow-query-cache-on</strong></span></span></dt>
3883 Specifies which local addresses can give answers
3884 from the cache. If not specified, the default is
3885 to allow cache queries on any address,
3886 <span><strong class="command">localnets</strong></span> and
3887 <span><strong class="command">localhost</strong></span>.
3889 <dt><span class="term"><span><strong class="command">allow-recursion</strong></span></span></dt>
3891 Specifies which hosts are allowed to make recursive
3892 queries through this server. If
3893 <span><strong class="command">allow-recursion</strong></span> is not set
3894 then <span><strong class="command">allow-query-cache</strong></span> is
3895 used if set, otherwise <span><strong class="command">allow-query</strong></span>
3896 is used if set, otherwise the default
3897 (<span><strong class="command">localnets;</strong></span>
3898 <span><strong class="command">localhost;</strong></span>) is used.
3900 <dt><span class="term"><span><strong class="command">allow-recursion-on</strong></span></span></dt>
3902 Specifies which local addresses can accept recursive
3903 queries. If not specified, the default is to allow
3904 recursive queries on all addresses.
3906 <dt><span class="term"><span><strong class="command">allow-update</strong></span></span></dt>
3908 Specifies which hosts are allowed to
3909 submit Dynamic DNS updates for master zones. The default is
3911 updates from all hosts. Note that allowing updates based
3912 on the requestor's IP address is insecure; see
3913 <a href="Bv9ARM.ch07.html#dynamic_update_security" title="Dynamic Update Security">the section called “Dynamic Update Security”</a> for details.
3915 <dt><span class="term"><span><strong class="command">allow-update-forwarding</strong></span></span></dt>
3918 Specifies which hosts are allowed to
3919 submit Dynamic DNS updates to slave zones to be forwarded to
3921 master. The default is <strong class="userinput"><code>{ none; }</code></strong>,
3923 means that no update forwarding will be performed. To
3925 update forwarding, specify
3926 <strong class="userinput"><code>allow-update-forwarding { any; };</code></strong>.
3927 Specifying values other than <strong class="userinput"><code>{ none; }</code></strong> or
3928 <strong class="userinput"><code>{ any; }</code></strong> is usually
3929 counterproductive, since
3930 the responsibility for update access control should rest
3932 master server, not the slaves.
3935 Note that enabling the update forwarding feature on a slave
3937 may expose master servers relying on insecure IP address
3939 access control to attacks; see <a href="Bv9ARM.ch07.html#dynamic_update_security" title="Dynamic Update Security">the section called “Dynamic Update Security”</a>
3943 <dt><span class="term"><span><strong class="command">allow-v6-synthesis</strong></span></span></dt>
3945 This option was introduced for the smooth transition from
3947 to A6 and from "nibble labels" to binary labels.
3948 However, since both A6 and binary labels were then
3950 this option was also deprecated.
3951 It is now ignored with some warning messages.
3953 <dt><span class="term"><span><strong class="command">allow-transfer</strong></span></span></dt>
3955 Specifies which hosts are allowed to
3956 receive zone transfers from the server. <span><strong class="command">allow-transfer</strong></span> may
3957 also be specified in the <span><strong class="command">zone</strong></span>
3959 case it overrides the <span><strong class="command">options allow-transfer</strong></span> statement.
3960 If not specified, the default is to allow transfers to all
3963 <dt><span class="term"><span><strong class="command">blackhole</strong></span></span></dt>
3965 Specifies a list of addresses that the
3966 server will not accept queries from or use to resolve a
3968 from these addresses will not be responded to. The default
3969 is <strong class="userinput"><code>none</code></strong>.
3971 <dt><span class="term"><span><strong class="command">filter-aaaa</strong></span></span></dt>
3973 Specifies a list of addresses to which
3974 <span><strong class="command">filter-aaaa-on-v4</strong></span>
3975 is applies. The default is <strong class="userinput"><code>any</code></strong>.
3977 <dt><span class="term"><span><strong class="command">resolver-query-timeout</strong></span></span></dt>
3979 The amount of time the resolver will spend attempting
3980 to resolve a recursive query before failing. The default
3981 and minimum is <code class="literal">10</code> and the maximum is
3982 <code class="literal">30</code>. Setting it to <code class="literal">0</code>
3983 will result in the default being used.
3987 <div class="sect3" lang="en">
3988 <div class="titlepage"><div><div><h4 class="title">
3989 <a name="id2583600"></a>Interfaces</h4></div></div></div>
3991 The interfaces and ports that the server will answer queries
3992 from may be specified using the <span><strong class="command">listen-on</strong></span> option. <span><strong class="command">listen-on</strong></span> takes
3993 an optional port and an <code class="varname">address_match_list</code>.
3994 The server will listen on all interfaces allowed by the address
3995 match list. If a port is not specified, port 53 will be used.
3998 Multiple <span><strong class="command">listen-on</strong></span> statements are
4002 <pre class="programlisting">listen-on { 5.6.7.8; };
4003 listen-on port 1234 { !1.2.3.4; 1.2/16; };
4006 will enable the name server on port 53 for the IP address
4007 5.6.7.8, and on port 1234 of an address on the machine in net
4008 1.2 that is not 1.2.3.4.
4011 If no <span><strong class="command">listen-on</strong></span> is specified, the
4012 server will listen on port 53 on all IPv4 interfaces.
4015 The <span><strong class="command">listen-on-v6</strong></span> option is used to
4016 specify the interfaces and the ports on which the server will
4018 for incoming queries sent using IPv6.
4022 <pre class="programlisting">{ any; }</pre>
4025 as the <code class="varname">address_match_list</code> for the
4026 <span><strong class="command">listen-on-v6</strong></span> option,
4027 the server does not bind a separate socket to each IPv6 interface
4028 address as it does for IPv4 if the operating system has enough API
4029 support for IPv6 (specifically if it conforms to RFC 3493 and RFC
4031 Instead, it listens on the IPv6 wildcard address.
4032 If the system only has incomplete API support for IPv6, however,
4033 the behavior is the same as that for IPv4.
4036 A list of particular IPv6 addresses can also be specified, in
4038 the server listens on a separate socket for each specified
4040 regardless of whether the desired API is supported by the system.
4043 Multiple <span><strong class="command">listen-on-v6</strong></span> options can
4047 <pre class="programlisting">listen-on-v6 { any; };
4048 listen-on-v6 port 1234 { !2001:db8::/32; any; };
4051 will enable the name server on port 53 for any IPv6 addresses
4052 (with a single wildcard socket),
4053 and on port 1234 of IPv6 addresses that is not in the prefix
4054 2001:db8::/32 (with separate sockets for each matched address.)
4057 To make the server not listen on any IPv6 address, use
4059 <pre class="programlisting">listen-on-v6 { none; };
4062 If no <span><strong class="command">listen-on-v6</strong></span> option is
4063 specified, the server will not listen on any IPv6 address
4064 unless <span><strong class="command">-6</strong></span> is specified when <span><strong class="command">named</strong></span> is
4065 invoked. If <span><strong class="command">-6</strong></span> is specified then
4066 <span><strong class="command">named</strong></span> will listen on port 53 on all IPv6 interfaces by default.
4069 <div class="sect3" lang="en">
4070 <div class="titlepage"><div><div><h4 class="title">
4071 <a name="query_address"></a>Query Address</h4></div></div></div>
4073 If the server doesn't know the answer to a question, it will
4074 query other name servers. <span><strong class="command">query-source</strong></span> specifies
4075 the address and port used for such queries. For queries sent over
4076 IPv6, there is a separate <span><strong class="command">query-source-v6</strong></span> option.
4077 If <span><strong class="command">address</strong></span> is <span><strong class="command">*</strong></span> (asterisk) or is omitted,
4078 a wildcard IP address (<span><strong class="command">INADDR_ANY</strong></span>)
4082 If <span><strong class="command">port</strong></span> is <span><strong class="command">*</strong></span> or is omitted,
4083 a random port number from a pre-configured
4084 range is picked up and will be used for each query.
4085 The port range(s) is that specified in
4086 the <span><strong class="command">use-v4-udp-ports</strong></span> (for IPv4)
4087 and <span><strong class="command">use-v6-udp-ports</strong></span> (for IPv6)
4088 options, excluding the ranges specified in
4089 the <span><strong class="command">avoid-v4-udp-ports</strong></span>
4090 and <span><strong class="command">avoid-v6-udp-ports</strong></span> options, respectively.
4093 The defaults of the <span><strong class="command">query-source</strong></span> and
4094 <span><strong class="command">query-source-v6</strong></span> options
4097 <pre class="programlisting">query-source address * port *;
4098 query-source-v6 address * port *;
4101 If <span><strong class="command">use-v4-udp-ports</strong></span> or
4102 <span><strong class="command">use-v6-udp-ports</strong></span> is unspecified,
4103 <span><strong class="command">named</strong></span> will check if the operating
4104 system provides a programming interface to retrieve the
4105 system's default range for ephemeral ports.
4106 If such an interface is available,
4107 <span><strong class="command">named</strong></span> will use the corresponding system
4108 default range; otherwise, it will use its own defaults:
4110 <pre class="programlisting">use-v4-udp-ports { range 1024 65535; };
4111 use-v6-udp-ports { range 1024 65535; };
4114 Note: make sure the ranges be sufficiently large for
4115 security. A desirable size depends on various parameters,
4116 but we generally recommend it contain at least 16384 ports
4117 (14 bits of entropy).
4118 Note also that the system's default range when used may be
4119 too small for this purpose, and that the range may even be
4120 changed while <span><strong class="command">named</strong></span> is running; the new
4121 range will automatically be applied when <span><strong class="command">named</strong></span>
4124 configure <span><strong class="command">use-v4-udp-ports</strong></span> and
4125 <span><strong class="command">use-v6-udp-ports</strong></span> explicitly so that the
4126 ranges are sufficiently large and are reasonably
4127 independent from the ranges used by other applications.
4130 Note: the operational configuration
4131 where <span><strong class="command">named</strong></span> runs may prohibit the use
4132 of some ports. For example, UNIX systems will not allow
4133 <span><strong class="command">named</strong></span> running without a root privilege
4134 to use ports less than 1024.
4135 If such ports are included in the specified (or detected)
4136 set of query ports, the corresponding query attempts will
4137 fail, resulting in resolution failures or delay.
4138 It is therefore important to configure the set of ports
4139 that can be safely used in the expected operational environment.
4142 The defaults of the <span><strong class="command">avoid-v4-udp-ports</strong></span> and
4143 <span><strong class="command">avoid-v6-udp-ports</strong></span> options
4146 <pre class="programlisting">avoid-v4-udp-ports {};
4147 avoid-v6-udp-ports {};
4150 Note: BIND 9.5.0 introduced
4151 the <span><strong class="command">use-queryport-pool</strong></span>
4152 option to support a pool of such random ports, but this
4153 option is now obsolete because reusing the same ports in
4154 the pool may not be sufficiently secure.
4155 For the same reason, it is generally strongly discouraged to
4156 specify a particular port for the
4157 <span><strong class="command">query-source</strong></span> or
4158 <span><strong class="command">query-source-v6</strong></span> options;
4159 it implicitly disables the use of randomized port numbers.
4161 <div class="variablelist"><dl>
4162 <dt><span class="term"><span><strong class="command">use-queryport-pool</strong></span></span></dt>
4164 This option is obsolete.
4166 <dt><span class="term"><span><strong class="command">queryport-pool-ports</strong></span></span></dt>
4168 This option is obsolete.
4170 <dt><span class="term"><span><strong class="command">queryport-pool-updateinterval</strong></span></span></dt>
4172 This option is obsolete.
4175 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4176 <h3 class="title">Note</h3>
4178 The address specified in the <span><strong class="command">query-source</strong></span> option
4179 is used for both UDP and TCP queries, but the port applies only
4180 to UDP queries. TCP queries always use a random
4184 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4185 <h3 class="title">Note</h3>
4187 Solaris 2.5.1 and earlier does not support setting the source
4188 address for TCP sockets.
4191 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4192 <h3 class="title">Note</h3>
4194 See also <span><strong class="command">transfer-source</strong></span> and
4195 <span><strong class="command">notify-source</strong></span>.
4199 <div class="sect3" lang="en">
4200 <div class="titlepage"><div><div><h4 class="title">
4201 <a name="zone_transfers"></a>Zone Transfers</h4></div></div></div>
4203 <acronym class="acronym">BIND</acronym> has mechanisms in place to
4204 facilitate zone transfers
4205 and set limits on the amount of load that transfers place on the
4206 system. The following options apply to zone transfers.
4208 <div class="variablelist"><dl>
4209 <dt><span class="term"><span><strong class="command">also-notify</strong></span></span></dt>
4211 Defines a global list of IP addresses of name servers
4212 that are also sent NOTIFY messages whenever a fresh copy of
4214 zone is loaded, in addition to the servers listed in the
4216 This helps to ensure that copies of the zones will
4217 quickly converge on stealth servers.
4218 Optionally, a port may be specified with each
4219 <span><strong class="command">also-notify</strong></span> address to send
4220 the notify messages to a port other than the
4222 If an <span><strong class="command">also-notify</strong></span> list
4223 is given in a <span><strong class="command">zone</strong></span> statement,
4225 the <span><strong class="command">options also-notify</strong></span>
4226 statement. When a <span><strong class="command">zone notify</strong></span>
4228 is set to <span><strong class="command">no</strong></span>, the IP
4229 addresses in the global <span><strong class="command">also-notify</strong></span> list will
4230 not be sent NOTIFY messages for that zone. The default is
4232 list (no global notification list).
4234 <dt><span class="term"><span><strong class="command">max-transfer-time-in</strong></span></span></dt>
4236 Inbound zone transfers running longer than
4237 this many minutes will be terminated. The default is 120
4239 (2 hours). The maximum value is 28 days (40320 minutes).
4241 <dt><span class="term"><span><strong class="command">max-transfer-idle-in</strong></span></span></dt>
4243 Inbound zone transfers making no progress
4244 in this many minutes will be terminated. The default is 60
4246 (1 hour). The maximum value is 28 days (40320 minutes).
4248 <dt><span class="term"><span><strong class="command">max-transfer-time-out</strong></span></span></dt>
4250 Outbound zone transfers running longer than
4251 this many minutes will be terminated. The default is 120
4253 (2 hours). The maximum value is 28 days (40320 minutes).
4255 <dt><span class="term"><span><strong class="command">max-transfer-idle-out</strong></span></span></dt>
4257 Outbound zone transfers making no progress
4258 in this many minutes will be terminated. The default is 60
4260 hour). The maximum value is 28 days (40320 minutes).
4262 <dt><span class="term"><span><strong class="command">serial-query-rate</strong></span></span></dt>
4265 Slave servers will periodically query master
4266 servers to find out if zone serial numbers have
4267 changed. Each such query uses a minute amount of
4268 the slave server's network bandwidth. To limit
4269 the amount of bandwidth used, BIND 9 limits the
4270 rate at which queries are sent. The value of the
4271 <span><strong class="command">serial-query-rate</strong></span> option, an
4272 integer, is the maximum number of queries sent
4273 per second. The default is 20.
4276 In addition to controlling the rate SOA refresh
4277 queries are issued at
4278 <span><strong class="command">serial-query-rate</strong></span> also controls
4279 the rate at which NOTIFY messages are sent from
4280 both master and slave zones.
4283 <dt><span class="term"><span><strong class="command">serial-queries</strong></span></span></dt>
4285 In BIND 8, the <span><strong class="command">serial-queries</strong></span>
4287 set the maximum number of concurrent serial number queries
4288 allowed to be outstanding at any given time.
4289 BIND 9 does not limit the number of outstanding
4290 serial queries and ignores the <span><strong class="command">serial-queries</strong></span> option.
4291 Instead, it limits the rate at which the queries are sent
4292 as defined using the <span><strong class="command">serial-query-rate</strong></span> option.
4294 <dt><span class="term"><span><strong class="command">transfer-format</strong></span></span></dt>
4296 Zone transfers can be sent using two different formats,
4297 <span><strong class="command">one-answer</strong></span> and
4298 <span><strong class="command">many-answers</strong></span>.
4299 The <span><strong class="command">transfer-format</strong></span> option is used
4300 on the master server to determine which format it sends.
4301 <span><strong class="command">one-answer</strong></span> uses one DNS message per
4302 resource record transferred.
4303 <span><strong class="command">many-answers</strong></span> packs as many resource
4304 records as possible into a message.
4305 <span><strong class="command">many-answers</strong></span> is more efficient, but is
4306 only supported by relatively new slave servers,
4307 such as <acronym class="acronym">BIND</acronym> 9, <acronym class="acronym">BIND</acronym>
4308 8.x and <acronym class="acronym">BIND</acronym> 4.9.5 onwards.
4309 The <span><strong class="command">many-answers</strong></span> format is also supported by
4310 recent Microsoft Windows nameservers.
4311 The default is <span><strong class="command">many-answers</strong></span>.
4312 <span><strong class="command">transfer-format</strong></span> may be overridden on a
4313 per-server basis by using the <span><strong class="command">server</strong></span>
4316 <dt><span class="term"><span><strong class="command">transfers-in</strong></span></span></dt>
4318 The maximum number of inbound zone transfers
4319 that can be running concurrently. The default value is <code class="literal">10</code>.
4320 Increasing <span><strong class="command">transfers-in</strong></span> may
4321 speed up the convergence
4322 of slave zones, but it also may increase the load on the
4325 <dt><span class="term"><span><strong class="command">transfers-out</strong></span></span></dt>
4327 The maximum number of outbound zone transfers
4328 that can be running concurrently. Zone transfer requests in
4330 of the limit will be refused. The default value is <code class="literal">10</code>.
4332 <dt><span class="term"><span><strong class="command">transfers-per-ns</strong></span></span></dt>
4334 The maximum number of inbound zone transfers
4335 that can be concurrently transferring from a given remote
4337 The default value is <code class="literal">2</code>.
4338 Increasing <span><strong class="command">transfers-per-ns</strong></span>
4340 speed up the convergence of slave zones, but it also may
4342 the load on the remote name server. <span><strong class="command">transfers-per-ns</strong></span> may
4343 be overridden on a per-server basis by using the <span><strong class="command">transfers</strong></span> phrase
4344 of the <span><strong class="command">server</strong></span> statement.
4346 <dt><span class="term"><span><strong class="command">transfer-source</strong></span></span></dt>
4348 <p><span><strong class="command">transfer-source</strong></span>
4349 determines which local address will be bound to IPv4
4350 TCP connections used to fetch zones transferred
4351 inbound by the server. It also determines the
4352 source IPv4 address, and optionally the UDP port,
4353 used for the refresh queries and forwarded dynamic
4354 updates. If not set, it defaults to a system
4355 controlled value which will usually be the address
4356 of the interface "closest to" the remote end. This
4357 address must appear in the remote end's
4358 <span><strong class="command">allow-transfer</strong></span> option for the
4359 zone being transferred, if one is specified. This
4361 <span><strong class="command">transfer-source</strong></span> for all zones,
4362 but can be overridden on a per-view or per-zone
4363 basis by including a
4364 <span><strong class="command">transfer-source</strong></span> statement within
4365 the <span><strong class="command">view</strong></span> or
4366 <span><strong class="command">zone</strong></span> block in the configuration
4369 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4370 <h3 class="title">Note</h3>
4372 Solaris 2.5.1 and earlier does not support setting the
4373 source address for TCP sockets.
4377 <dt><span class="term"><span><strong class="command">transfer-source-v6</strong></span></span></dt>
4379 The same as <span><strong class="command">transfer-source</strong></span>,
4380 except zone transfers are performed using IPv6.
4382 <dt><span class="term"><span><strong class="command">alt-transfer-source</strong></span></span></dt>
4385 An alternate transfer source if the one listed in
4386 <span><strong class="command">transfer-source</strong></span> fails and
4387 <span><strong class="command">use-alt-transfer-source</strong></span> is
4390 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4391 <h3 class="title">Note</h3>
4392 If you do not wish the alternate transfer source
4393 to be used, you should set
4394 <span><strong class="command">use-alt-transfer-source</strong></span>
4395 appropriately and you should not depend upon
4396 getting an answer back to the first refresh
4400 <dt><span class="term"><span><strong class="command">alt-transfer-source-v6</strong></span></span></dt>
4402 An alternate transfer source if the one listed in
4403 <span><strong class="command">transfer-source-v6</strong></span> fails and
4404 <span><strong class="command">use-alt-transfer-source</strong></span> is
4407 <dt><span class="term"><span><strong class="command">use-alt-transfer-source</strong></span></span></dt>
4409 Use the alternate transfer sources or not. If views are
4410 specified this defaults to <span><strong class="command">no</strong></span>
4411 otherwise it defaults to
4412 <span><strong class="command">yes</strong></span> (for BIND 8
4415 <dt><span class="term"><span><strong class="command">notify-source</strong></span></span></dt>
4417 <p><span><strong class="command">notify-source</strong></span>
4418 determines which local source address, and
4419 optionally UDP port, will be used to send NOTIFY
4420 messages. This address must appear in the slave
4421 server's <span><strong class="command">masters</strong></span> zone clause or
4422 in an <span><strong class="command">allow-notify</strong></span> clause. This
4423 statement sets the <span><strong class="command">notify-source</strong></span>
4424 for all zones, but can be overridden on a per-zone or
4425 per-view basis by including a
4426 <span><strong class="command">notify-source</strong></span> statement within
4427 the <span><strong class="command">zone</strong></span> or
4428 <span><strong class="command">view</strong></span> block in the configuration
4431 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4432 <h3 class="title">Note</h3>
4434 Solaris 2.5.1 and earlier does not support setting the
4435 source address for TCP sockets.
4439 <dt><span class="term"><span><strong class="command">notify-source-v6</strong></span></span></dt>
4441 Like <span><strong class="command">notify-source</strong></span>,
4442 but applies to notify messages sent to IPv6 addresses.
4446 <div class="sect3" lang="en">
4447 <div class="titlepage"><div><div><h4 class="title">
4448 <a name="id2584741"></a>UDP Port Lists</h4></div></div></div>
4450 <span><strong class="command">use-v4-udp-ports</strong></span>,
4451 <span><strong class="command">avoid-v4-udp-ports</strong></span>,
4452 <span><strong class="command">use-v6-udp-ports</strong></span>, and
4453 <span><strong class="command">avoid-v6-udp-ports</strong></span>
4454 specify a list of IPv4 and IPv6 UDP ports that will be
4455 used or not used as source ports for UDP messages.
4456 See <a href="Bv9ARM.ch06.html#query_address" title="Query Address">the section called “Query Address”</a> about how the
4457 available ports are determined.
4458 For example, with the following configuration
4460 <pre class="programlisting">
4461 use-v6-udp-ports { range 32768 65535; };
4462 avoid-v6-udp-ports { 40000; range 50000 60000; };
4465 UDP ports of IPv6 messages sent
4466 from <span><strong class="command">named</strong></span> will be in one
4467 of the following ranges: 32768 to 39999, 40001 to 49999,
4471 <span><strong class="command">avoid-v4-udp-ports</strong></span> and
4472 <span><strong class="command">avoid-v6-udp-ports</strong></span> can be used
4473 to prevent <span><strong class="command">named</strong></span> from choosing as its random source port a
4474 port that is blocked by your firewall or a port that is
4475 used by other applications;
4476 if a query went out with a source port blocked by a
4478 answer would not get by the firewall and the name server would
4479 have to query again.
4480 Note: the desired range can also be represented only with
4481 <span><strong class="command">use-v4-udp-ports</strong></span> and
4482 <span><strong class="command">use-v6-udp-ports</strong></span>, and the
4483 <span><strong class="command">avoid-</strong></span> options are redundant in that
4484 sense; they are provided for backward compatibility and
4485 to possibly simplify the port specification.
4488 <div class="sect3" lang="en">
4489 <div class="titlepage"><div><div><h4 class="title">
4490 <a name="id2584801"></a>Operating System Resource Limits</h4></div></div></div>
4492 The server's usage of many system resources can be limited.
4493 Scaled values are allowed when specifying resource limits. For
4494 example, <span><strong class="command">1G</strong></span> can be used instead of
4495 <span><strong class="command">1073741824</strong></span> to specify a limit of
4497 gigabyte. <span><strong class="command">unlimited</strong></span> requests
4498 unlimited use, or the
4499 maximum available amount. <span><strong class="command">default</strong></span>
4501 that was in force when the server was started. See the description
4502 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>.
4505 The following options set operating system resource limits for
4506 the name server process. Some operating systems don't support
4508 any of the limits. On such systems, a warning will be issued if
4510 unsupported limit is used.
4512 <div class="variablelist"><dl>
4513 <dt><span class="term"><span><strong class="command">coresize</strong></span></span></dt>
4515 The maximum size of a core dump. The default
4516 is <code class="literal">default</code>.
4518 <dt><span class="term"><span><strong class="command">datasize</strong></span></span></dt>
4520 The maximum amount of data memory the server
4521 may use. The default is <code class="literal">default</code>.
4522 This is a hard limit on server memory usage.
4523 If the server attempts to allocate memory in excess of this
4524 limit, the allocation will fail, which may in turn leave
4525 the server unable to perform DNS service. Therefore,
4526 this option is rarely useful as a way of limiting the
4527 amount of memory used by the server, but it can be used
4528 to raise an operating system data size limit that is
4529 too small by default. If you wish to limit the amount
4530 of memory used by the server, use the
4531 <span><strong class="command">max-cache-size</strong></span> and
4532 <span><strong class="command">recursive-clients</strong></span>
4535 <dt><span class="term"><span><strong class="command">files</strong></span></span></dt>
4537 The maximum number of files the server
4538 may have open concurrently. The default is <code class="literal">unlimited</code>.
4540 <dt><span class="term"><span><strong class="command">stacksize</strong></span></span></dt>
4542 The maximum amount of stack memory the server
4543 may use. The default is <code class="literal">default</code>.
4547 <div class="sect3" lang="en">
4548 <div class="titlepage"><div><div><h4 class="title">
4549 <a name="server_resource_limits"></a>Server Resource Limits</h4></div></div></div>
4551 The following options set limits on the server's
4552 resource consumption that are enforced internally by the
4553 server rather than the operating system.
4555 <div class="variablelist"><dl>
4556 <dt><span class="term"><span><strong class="command">max-ixfr-log-size</strong></span></span></dt>
4558 This option is obsolete; it is accepted
4559 and ignored for BIND 8 compatibility. The option
4560 <span><strong class="command">max-journal-size</strong></span> performs a
4561 similar function in BIND 9.
4563 <dt><span class="term"><span><strong class="command">max-journal-size</strong></span></span></dt>
4565 Sets a maximum size for each journal file
4566 (see <a href="Bv9ARM.ch04.html#journal" title="The journal file">the section called “The journal file”</a>). When the journal file
4568 the specified size, some of the oldest transactions in the
4570 will be automatically removed. The default is
4571 <code class="literal">unlimited</code>.
4572 This may also be set on a per-zone basis.
4574 <dt><span class="term"><span><strong class="command">host-statistics-max</strong></span></span></dt>
4576 In BIND 8, specifies the maximum number of host statistics
4578 Not implemented in BIND 9.
4580 <dt><span class="term"><span><strong class="command">recursive-clients</strong></span></span></dt>
4582 The maximum number of simultaneous recursive lookups
4583 the server will perform on behalf of clients. The default
4585 <code class="literal">1000</code>. Because each recursing
4587 bit of memory, on the order of 20 kilobytes, the value of
4589 <span><strong class="command">recursive-clients</strong></span> option may
4590 have to be decreased
4591 on hosts with limited memory.
4593 <dt><span class="term"><span><strong class="command">tcp-clients</strong></span></span></dt>
4595 The maximum number of simultaneous client TCP
4596 connections that the server will accept.
4597 The default is <code class="literal">100</code>.
4599 <dt><span class="term"><span><strong class="command">reserved-sockets</strong></span></span></dt>
4602 The number of file descriptors reserved for TCP, stdio,
4603 etc. This needs to be big enough to cover the number of
4604 interfaces <span><strong class="command">named</strong></span> listens on, <span><strong class="command">tcp-clients</strong></span> as well as
4605 to provide room for outgoing TCP queries and incoming zone
4606 transfers. The default is <code class="literal">512</code>.
4607 The minimum value is <code class="literal">128</code> and the
4608 maximum value is <code class="literal">128</code> less than
4609 maxsockets (-S). This option may be removed in the future.
4612 This option has little effect on Windows.
4615 <dt><span class="term"><span><strong class="command">max-cache-size</strong></span></span></dt>
4617 The maximum amount of memory to use for the
4618 server's cache, in bytes.
4619 When the amount of data in the cache
4620 reaches this limit, the server will cause records to expire
4621 prematurely based on an LRU based strategy so that
4622 the limit is not exceeded.
4623 A value of 0 is special, meaning that
4624 records are purged from the cache only when their
4626 Another special keyword <strong class="userinput"><code>unlimited</code></strong>
4627 means the maximum value of 32-bit unsigned integers
4628 (0xffffffff), which may not have the same effect as
4629 0 on machines that support more than 32 bits of
4631 Any positive values less than 2MB will be ignored reset
4633 In a server with multiple views, the limit applies
4634 separately to the cache of each view.
4637 <dt><span class="term"><span><strong class="command">tcp-listen-queue</strong></span></span></dt>
4639 The listen queue depth. The default and minimum is 10.
4640 If the kernel supports the accept filter "dataready" this
4642 many TCP connections that will be queued in kernel space
4644 some data before being passed to accept. Nonzero values
4645 less than 10 will be silently raised. A value of 0 may also
4646 be used; on most platforms this sets the listen queue
4647 length to a system-defined default value.
4651 <div class="sect3" lang="en">
4652 <div class="titlepage"><div><div><h4 class="title">
4653 <a name="id2585155"></a>Periodic Task Intervals</h4></div></div></div>
4654 <div class="variablelist"><dl>
4655 <dt><span class="term"><span><strong class="command">cleaning-interval</strong></span></span></dt>
4657 This interval is effectively obsolete. Previously,
4658 the server would remove expired resource records
4659 from the cache every <span><strong class="command">cleaning-interval</strong></span> minutes.
4660 <acronym class="acronym">BIND</acronym> 9 now manages cache
4661 memory in a more sophisticated manner and does not
4662 rely on the periodic cleaning any more.
4663 Specifying this option therefore has no effect on
4664 the server's behavior.
4666 <dt><span class="term"><span><strong class="command">heartbeat-interval</strong></span></span></dt>
4668 The server will perform zone maintenance tasks
4669 for all zones marked as <span><strong class="command">dialup</strong></span> whenever this
4670 interval expires. The default is 60 minutes. Reasonable
4672 to 1 day (1440 minutes). The maximum value is 28 days
4674 If set to 0, no zone maintenance for these zones will occur.
4676 <dt><span class="term"><span><strong class="command">interface-interval</strong></span></span></dt>
4678 The server will scan the network interface list
4679 every <span><strong class="command">interface-interval</strong></span>
4680 minutes. The default
4681 is 60 minutes. The maximum value is 28 days (40320 minutes).
4682 If set to 0, interface scanning will only occur when
4683 the configuration file is loaded. After the scan, the
4685 begin listening for queries on any newly discovered
4686 interfaces (provided they are allowed by the
4687 <span><strong class="command">listen-on</strong></span> configuration), and
4689 stop listening on interfaces that have gone away.
4691 <dt><span class="term"><span><strong class="command">statistics-interval</strong></span></span></dt>
4694 Name server statistics will be logged
4695 every <span><strong class="command">statistics-interval</strong></span>
4696 minutes. The default is
4697 60. The maximum value is 28 days (40320 minutes).
4698 If set to 0, no statistics will be logged.
4700 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4701 <h3 class="title">Note</h3>
4703 Not yet implemented in
4704 <acronym class="acronym">BIND</acronym> 9.
4710 <div class="sect3" lang="en">
4711 <div class="titlepage"><div><div><h4 class="title">
4712 <a name="topology"></a>Topology</h4></div></div></div>
4714 All other things being equal, when the server chooses a name
4716 to query from a list of name servers, it prefers the one that is
4717 topologically closest to itself. The <span><strong class="command">topology</strong></span> statement
4718 takes an <span><strong class="command">address_match_list</strong></span> and
4720 in a special way. Each top-level list element is assigned a
4722 Non-negated elements get a distance based on their position in the
4723 list, where the closer the match is to the start of the list, the
4724 shorter the distance is between it and the server. A negated match
4725 will be assigned the maximum distance from the server. If there
4726 is no match, the address will get a distance which is further than
4727 any non-negated list element, and closer than any negated element.
4730 <pre class="programlisting">topology {
4736 will prefer servers on network 10 the most, followed by hosts
4737 on network 1.2.0.0 (netmask 255.255.0.0) and network 3, with the
4738 exception of hosts on network 1.2.3 (netmask 255.255.255.0), which
4739 is preferred least of all.
4742 The default topology is
4744 <pre class="programlisting"> topology { localhost; localnets; };
4746 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4747 <h3 class="title">Note</h3>
4749 The <span><strong class="command">topology</strong></span> option
4750 is not implemented in <acronym class="acronym">BIND</acronym> 9.
4754 <div class="sect3" lang="en">
4755 <div class="titlepage"><div><div><h4 class="title">
4756 <a name="the_sortlist_statement"></a>The <span><strong class="command">sortlist</strong></span> Statement</h4></div></div></div>
4758 The response to a DNS query may consist of multiple resource
4759 records (RRs) forming a resource records set (RRset).
4760 The name server will normally return the
4761 RRs within the RRset in an indeterminate order
4762 (but see the <span><strong class="command">rrset-order</strong></span>
4763 statement in <a href="Bv9ARM.ch06.html#rrset_ordering" title="RRset Ordering">the section called “RRset Ordering”</a>).
4764 The client resolver code should rearrange the RRs as appropriate,
4765 that is, using any addresses on the local net in preference to
4767 However, not all resolvers can do this or are correctly
4769 When a client is using a local server, the sorting can be performed
4770 in the server, based on the client's address. This only requires
4771 configuring the name servers, not all the clients.
4774 The <span><strong class="command">sortlist</strong></span> statement (see below)
4776 an <span><strong class="command">address_match_list</strong></span> and
4778 more specifically than the <span><strong class="command">topology</strong></span>
4780 does (<a href="Bv9ARM.ch06.html#topology" title="Topology">the section called “Topology”</a>).
4781 Each top level statement in the <span><strong class="command">sortlist</strong></span> must
4782 itself be an explicit <span><strong class="command">address_match_list</strong></span> with
4783 one or two elements. The first element (which may be an IP
4785 an IP prefix, an ACL name or a nested <span><strong class="command">address_match_list</strong></span>)
4786 of each top level list is checked against the source address of
4787 the query until a match is found.
4790 Once the source address of the query has been matched, if
4791 the top level statement contains only one element, the actual
4793 element that matched the source address is used to select the
4795 in the response to move to the beginning of the response. If the
4796 statement is a list of two elements, then the second element is
4797 treated the same as the <span><strong class="command">address_match_list</strong></span> in
4798 a <span><strong class="command">topology</strong></span> statement. Each top
4800 is assigned a distance and the address in the response with the
4802 distance is moved to the beginning of the response.
4805 In the following example, any queries received from any of
4806 the addresses of the host itself will get responses preferring
4808 on any of the locally connected networks. Next most preferred are
4810 on the 192.168.1/24 network, and after that either the
4813 192.168.3/24 network with no preference shown between these two
4814 networks. Queries received from a host on the 192.168.1/24 network
4815 will prefer other addresses on that network to the 192.168.2/24
4817 192.168.3/24 networks. Queries received from a host on the
4819 or the 192.168.5/24 network will only prefer other addresses on
4820 their directly connected networks.
4822 <pre class="programlisting">sortlist {
4823 // IF the local host
4824 // THEN first fit on the following nets
4828 { 192.168.2/24; 192.168.3/24; }; }; };
4829 // IF on class C 192.168.1 THEN use .1, or .2 or .3
4832 { 192.168.2/24; 192.168.3/24; }; }; };
4833 // IF on class C 192.168.2 THEN use .2, or .1 or .3
4836 { 192.168.1/24; 192.168.3/24; }; }; };
4837 // IF on class C 192.168.3 THEN use .3, or .1 or .2
4840 { 192.168.1/24; 192.168.2/24; }; }; };
4841 // IF .4 or .5 THEN prefer that net
4842 { { 192.168.4/24; 192.168.5/24; };
4846 The following example will give reasonable behavior for the
4847 local host and hosts on directly connected networks. It is similar
4848 to the behavior of the address sort in <acronym class="acronym">BIND</acronym> 4.9.x. Responses sent
4849 to queries from the local host will favor any of the directly
4851 networks. Responses sent to queries from any other hosts on a
4853 connected network will prefer addresses on that same network.
4855 to other queries will not be sorted.
4857 <pre class="programlisting">sortlist {
4858 { localhost; localnets; };
4863 <div class="sect3" lang="en">
4864 <div class="titlepage"><div><div><h4 class="title">
4865 <a name="rrset_ordering"></a>RRset Ordering</h4></div></div></div>
4867 When multiple records are returned in an answer it may be
4868 useful to configure the order of the records placed into the
4870 The <span><strong class="command">rrset-order</strong></span> statement permits
4872 of the ordering of the records in a multiple record response.
4873 See also the <span><strong class="command">sortlist</strong></span> statement,
4874 <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>.
4877 An <span><strong class="command">order_spec</strong></span> is defined as
4881 [<span class="optional">class <em class="replaceable"><code>class_name</code></em></span>]
4882 [<span class="optional">type <em class="replaceable"><code>type_name</code></em></span>]
4883 [<span class="optional">name <em class="replaceable"><code>"domain_name"</code></em></span>]
4884 order <em class="replaceable"><code>ordering</code></em>
4887 If no class is specified, the default is <span><strong class="command">ANY</strong></span>.
4888 If no type is specified, the default is <span><strong class="command">ANY</strong></span>.
4889 If no name is specified, the default is "<span><strong class="command">*</strong></span>" (asterisk).
4892 The legal values for <span><strong class="command">ordering</strong></span> are:
4894 <div class="informaltable"><table border="1">
4902 <p><span><strong class="command">fixed</strong></span></p>
4906 Records are returned in the order they
4907 are defined in the zone file.
4913 <p><span><strong class="command">random</strong></span></p>
4917 Records are returned in some random order.
4923 <p><span><strong class="command">cyclic</strong></span></p>
4927 Records are returned in a cyclic round-robin order.
4930 If <acronym class="acronym">BIND</acronym> is configured with the
4931 "--enable-fixed-rrset" option at compile time, then
4932 the initial ordering of the RRset will match the
4933 one specified in the zone file.
4942 <pre class="programlisting">rrset-order {
4943 class IN type A name "host.example.com" order random;
4948 will cause any responses for type A records in class IN that
4949 have "<code class="literal">host.example.com</code>" as a
4950 suffix, to always be returned
4951 in random order. All other records are returned in cyclic order.
4954 If multiple <span><strong class="command">rrset-order</strong></span> statements
4956 they are not combined — the last one applies.
4958 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
4959 <h3 class="title">Note</h3>
4961 In this release of <acronym class="acronym">BIND</acronym> 9, the
4962 <span><strong class="command">rrset-order</strong></span> statement does not support
4963 "fixed" ordering by default. Fixed ordering can be enabled
4964 at compile time by specifying "--enable-fixed-rrset" on
4965 the "configure" command line.
4969 <div class="sect3" lang="en">
4970 <div class="titlepage"><div><div><h4 class="title">
4971 <a name="tuning"></a>Tuning</h4></div></div></div>
4972 <div class="variablelist"><dl>
4973 <dt><span class="term"><span><strong class="command">lame-ttl</strong></span></span></dt>
4976 Sets the number of seconds to cache a
4977 lame server indication. 0 disables caching. (This is
4978 <span class="bold"><strong>NOT</strong></span> recommended.)
4979 The default is <code class="literal">600</code> (10 minutes) and the
4981 <code class="literal">1800</code> (30 minutes).
4984 Lame-ttl also controls the amount of time DNSSEC
4985 validation failures are cached. There is a minimum
4986 of 30 seconds applied to bad cache entries if the
4987 lame-ttl is set to less than 30 seconds.
4990 <dt><span class="term"><span><strong class="command">max-ncache-ttl</strong></span></span></dt>
4992 To reduce network traffic and increase performance,
4993 the server stores negative answers. <span><strong class="command">max-ncache-ttl</strong></span> is
4994 used to set a maximum retention time for these answers in
4996 in seconds. The default
4997 <span><strong class="command">max-ncache-ttl</strong></span> is <code class="literal">10800</code> seconds (3 hours).
4998 <span><strong class="command">max-ncache-ttl</strong></span> cannot exceed
5000 be silently truncated to 7 days if set to a greater value.
5002 <dt><span class="term"><span><strong class="command">max-cache-ttl</strong></span></span></dt>
5004 Sets the maximum time for which the server will
5005 cache ordinary (positive) answers. The default is
5007 A value of zero may cause all queries to return
5008 SERVFAIL, because of lost caches of intermediate
5009 RRsets (such as NS and glue AAAA/A records) in the
5012 <dt><span class="term"><span><strong class="command">min-roots</strong></span></span></dt>
5015 The minimum number of root servers that
5016 is required for a request for the root servers to be
5017 accepted. The default
5018 is <strong class="userinput"><code>2</code></strong>.
5020 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
5021 <h3 class="title">Note</h3>
5023 Not implemented in <acronym class="acronym">BIND</acronym> 9.
5027 <dt><span class="term"><span><strong class="command">sig-validity-interval</strong></span></span></dt>
5030 Specifies the number of days into the future when
5031 DNSSEC signatures automatically generated as a
5032 result of dynamic updates (<a href="Bv9ARM.ch04.html#dynamic_update" title="Dynamic Update">the section called “Dynamic Update”</a>) will expire. There
5033 is an optional second field which specifies how
5034 long before expiry that the signatures will be
5035 regenerated. If not specified, the signatures will
5036 be regenerated at 1/4 of base interval. The second
5037 field is specified in days if the base interval is
5038 greater than 7 days otherwise it is specified in hours.
5039 The default base interval is <code class="literal">30</code> days
5040 giving a re-signing interval of 7 1/2 days. The maximum
5041 values are 10 years (3660 days).
5044 The signature inception time is unconditionally
5045 set to one hour before the current time to allow
5046 for a limited amount of clock skew.
5049 The <span><strong class="command">sig-validity-interval</strong></span>
5050 should be, at least, several multiples of the SOA
5051 expire interval to allow for reasonable interaction
5052 between the various timer and expiry dates.
5055 <dt><span class="term"><span><strong class="command">sig-signing-nodes</strong></span></span></dt>
5057 Specify the maximum number of nodes to be
5058 examined in each quantum when signing a zone with
5059 a new DNSKEY. The default is
5060 <code class="literal">100</code>.
5062 <dt><span class="term"><span><strong class="command">sig-signing-signatures</strong></span></span></dt>
5064 Specify a threshold number of signatures that
5065 will terminate processing a quantum when signing
5066 a zone with a new DNSKEY. The default is
5067 <code class="literal">10</code>.
5069 <dt><span class="term"><span><strong class="command">sig-signing-type</strong></span></span></dt>
5072 Specify a private RDATA type to be used when generating
5073 key signing records. The default is
5074 <code class="literal">65534</code>.
5077 It is expected that this parameter may be removed
5078 in a future version once there is a standard type.
5082 <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>
5086 These options control the server's behavior on refreshing a
5088 (querying for SOA changes) or retrying failed transfers.
5089 Usually the SOA values for the zone are used, but these
5091 are set by the master, giving slave server administrators
5093 control over their contents.
5096 These options allow the administrator to set a minimum and
5098 refresh and retry time either per-zone, per-view, or
5100 These options are valid for slave and stub zones,
5101 and clamp the SOA refresh and retry times to the specified
5105 The following defaults apply.
5106 <span><strong class="command">min-refresh-time</strong></span> 300 seconds,
5107 <span><strong class="command">max-refresh-time</strong></span> 2419200 seconds
5108 (4 weeks), <span><strong class="command">min-retry-time</strong></span> 500 seconds,
5109 and <span><strong class="command">max-retry-time</strong></span> 1209600 seconds
5113 <dt><span class="term"><span><strong class="command">edns-udp-size</strong></span></span></dt>
5116 Sets the advertised EDNS UDP buffer size in bytes
5117 to control the size of packets received.
5118 Valid values are 512 to 4096 (values outside this range
5119 will be silently adjusted). The default value
5120 is 4096. The usual reason for setting
5121 <span><strong class="command">edns-udp-size</strong></span> to a non-default
5122 value is to get UDP answers to pass through broken
5123 firewalls that block fragmented packets and/or
5124 block UDP packets that are greater than 512 bytes.
5127 <span><strong class="command">named</strong></span> will fallback to using 512 bytes
5128 if it get a series of timeout at the initial value. 512
5129 bytes is not being offered to encourage sites to fix their
5130 firewalls. Small EDNS UDP sizes will result in the
5131 excessive use of TCP.
5134 <dt><span class="term"><span><strong class="command">max-udp-size</strong></span></span></dt>
5137 Sets the maximum EDNS UDP message size
5138 <span><strong class="command">named</strong></span> will send in bytes.
5139 Valid values are 512 to 4096 (values outside this
5140 range will be silently adjusted). The default
5141 value is 4096. The usual reason for setting
5142 <span><strong class="command">max-udp-size</strong></span> to a non-default
5143 value is to get UDP answers to pass through broken
5144 firewalls that block fragmented packets and/or
5145 block UDP packets that are greater than 512 bytes.
5146 This is independent of the advertised receive
5147 buffer (<span><strong class="command">edns-udp-size</strong></span>).
5150 Setting this to a low value will encourage additional
5151 TCP traffic to the nameserver.
5154 <dt><span class="term"><span><strong class="command">masterfile-format</strong></span></span></dt>
5156 the file format of zone files (see
5157 <a href="Bv9ARM.ch06.html#zonefile_format" title="Additional File Formats">the section called “Additional File Formats”</a>).
5158 The default value is <code class="constant">text</code>, which is the
5159 standard textual representation. Files in other formats
5160 than <code class="constant">text</code> are typically expected
5161 to be generated by the <span><strong class="command">named-compilezone</strong></span> tool.
5162 Note that when a zone file in a different format than
5163 <code class="constant">text</code> is loaded, <span><strong class="command">named</strong></span>
5164 may omit some of the checks which would be performed for a
5165 file in the <code class="constant">text</code> format. In particular,
5166 <span><strong class="command">check-names</strong></span> checks do not apply
5167 for the <code class="constant">raw</code> format. This means
5168 a zone file in the <code class="constant">raw</code> format
5169 must be generated with the same check level as that
5170 specified in the <span><strong class="command">named</strong></span> configuration
5171 file. This statement sets the
5172 <span><strong class="command">masterfile-format</strong></span> for all zones,
5173 but can be overridden on a per-zone or per-view basis
5174 by including a <span><strong class="command">masterfile-format</strong></span>
5175 statement within the <span><strong class="command">zone</strong></span> or
5176 <span><strong class="command">view</strong></span> block in the configuration
5180 <a name="clients-per-query"></a><span class="term"><span><strong class="command">clients-per-query</strong></span>, </span><span class="term"><span><strong class="command">max-clients-per-query</strong></span></span>
5184 initial value (minimum) and maximum number of recursive
5185 simultaneous clients for any given query
5186 (<qname,qtype,qclass>) that the server will accept
5187 before dropping additional clients. <span><strong class="command">named</strong></span> will attempt to
5188 self tune this value and changes will be logged. The
5189 default values are 10 and 100.
5192 This value should reflect how many queries come in for
5193 a given name in the time it takes to resolve that name.
5194 If the number of queries exceed this value, <span><strong class="command">named</strong></span> will
5195 assume that it is dealing with a non-responsive zone
5196 and will drop additional queries. If it gets a response
5197 after dropping queries, it will raise the estimate. The
5198 estimate will then be lowered in 20 minutes if it has
5202 If <span><strong class="command">clients-per-query</strong></span> is set to zero,
5203 then there is no limit on the number of clients per query
5204 and no queries will be dropped.
5207 If <span><strong class="command">max-clients-per-query</strong></span> is set to zero,
5208 then there is no upper bound other than imposed by
5209 <span><strong class="command">recursive-clients</strong></span>.
5212 <dt><span class="term"><span><strong class="command">notify-delay</strong></span></span></dt>
5215 The delay, in seconds, between sending sets of notify
5216 messages for a zone. The default is five (5) seconds.
5219 The overall rate that NOTIFY messages are sent for all
5220 zones is controlled by <span><strong class="command">serial-query-rate</strong></span>.
5225 <div class="sect3" lang="en">
5226 <div class="titlepage"><div><div><h4 class="title">
5227 <a name="builtin"></a>Built-in server information zones</h4></div></div></div>
5229 The server provides some helpful diagnostic information
5230 through a number of built-in zones under the
5231 pseudo-top-level-domain <code class="literal">bind</code> in the
5232 <span><strong class="command">CHAOS</strong></span> class. These zones are part
5234 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
5236 <span><strong class="command">CHAOS</strong></span> which is separate from the
5237 default view of class <span><strong class="command">IN</strong></span>. Most global
5238 configuration options (<span><strong class="command">allow-query</strong></span>,
5239 etc) will apply to this view, but some are locally
5240 overridden: <span><strong class="command">notify</strong></span>,
5241 <span><strong class="command">recursion</strong></span> and
5242 <span><strong class="command">allow-new-zones</strong></span> are
5243 always set to <strong class="userinput"><code>no</code></strong>.
5246 If you need to disable these zones, use the options
5247 below, or hide the built-in <span><strong class="command">CHAOS</strong></span>
5249 defining an explicit view of class <span><strong class="command">CHAOS</strong></span>
5250 that matches all clients.
5252 <div class="variablelist"><dl>
5253 <dt><span class="term"><span><strong class="command">version</strong></span></span></dt>
5255 The version the server should report
5256 via a query of the name <code class="literal">version.bind</code>
5257 with type <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
5258 The default is the real version number of this server.
5259 Specifying <span><strong class="command">version none</strong></span>
5260 disables processing of the queries.
5262 <dt><span class="term"><span><strong class="command">hostname</strong></span></span></dt>
5264 The hostname the server should report via a query of
5265 the name <code class="filename">hostname.bind</code>
5266 with type <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
5267 This defaults to the hostname of the machine hosting the
5269 found by the gethostname() function. The primary purpose of such queries
5271 identify which of a group of anycast servers is actually
5272 answering your queries. Specifying <span><strong class="command">hostname none;</strong></span>
5273 disables processing of the queries.
5275 <dt><span class="term"><span><strong class="command">server-id</strong></span></span></dt>
5277 The ID the server should report when receiving a Name
5278 Server Identifier (NSID) query, or a query of the name
5279 <code class="filename">ID.SERVER</code> with type
5280 <span><strong class="command">TXT</strong></span>, class <span><strong class="command">CHAOS</strong></span>.
5281 The primary purpose of such queries is to
5282 identify which of a group of anycast servers is actually
5283 answering your queries. Specifying <span><strong class="command">server-id none;</strong></span>
5284 disables processing of the queries.
5285 Specifying <span><strong class="command">server-id hostname;</strong></span> will cause <span><strong class="command">named</strong></span> to
5286 use the hostname as found by the gethostname() function.
5287 The default <span><strong class="command">server-id</strong></span> is <span><strong class="command">none</strong></span>.
5291 <div class="sect3" lang="en">
5292 <div class="titlepage"><div><div><h4 class="title">
5293 <a name="empty"></a>Built-in Empty Zones</h4></div></div></div>
5295 Named has some built-in empty zones (SOA and NS records only).
5296 These are for zones that should normally be answered locally
5297 and which queries should not be sent to the Internet's root
5298 servers. The official servers which cover these namespaces
5299 return NXDOMAIN responses to these queries. In particular,
5300 these cover the reverse namespaces for addresses from
5301 RFC 1918, RFC 4193, RFC 5737 and RFC 6598. They also include the
5302 reverse namespace for IPv6 local address (locally assigned),
5303 IPv6 link local addresses, the IPv6 loopback address and the
5304 IPv6 unknown address.
5307 Named will attempt to determine if a built-in zone already exists
5308 or is active (covered by a forward-only forwarding declaration)
5309 and will not create an empty zone in that case.
5312 The current list of empty zones is:
5314 <div class="itemizedlist"><ul type="disc">
5315 <li>10.IN-ADDR.ARPA</li>
5316 <li>16.172.IN-ADDR.ARPA</li>
5317 <li>17.172.IN-ADDR.ARPA</li>
5318 <li>18.172.IN-ADDR.ARPA</li>
5319 <li>19.172.IN-ADDR.ARPA</li>
5320 <li>20.172.IN-ADDR.ARPA</li>
5321 <li>21.172.IN-ADDR.ARPA</li>
5322 <li>22.172.IN-ADDR.ARPA</li>
5323 <li>23.172.IN-ADDR.ARPA</li>
5324 <li>24.172.IN-ADDR.ARPA</li>
5325 <li>25.172.IN-ADDR.ARPA</li>
5326 <li>26.172.IN-ADDR.ARPA</li>
5327 <li>27.172.IN-ADDR.ARPA</li>
5328 <li>28.172.IN-ADDR.ARPA</li>
5329 <li>29.172.IN-ADDR.ARPA</li>
5330 <li>30.172.IN-ADDR.ARPA</li>
5331 <li>31.172.IN-ADDR.ARPA</li>
5332 <li>168.192.IN-ADDR.ARPA</li>
5333 <li>64.100.IN-ADDR.ARPA</li>
5334 <li>65.100.IN-ADDR.ARPA</li>
5335 <li>66.100.IN-ADDR.ARPA</li>
5336 <li>67.100.IN-ADDR.ARPA</li>
5337 <li>68.100.IN-ADDR.ARPA</li>
5338 <li>69.100.IN-ADDR.ARPA</li>
5339 <li>70.100.IN-ADDR.ARPA</li>
5340 <li>71.100.IN-ADDR.ARPA</li>
5341 <li>72.100.IN-ADDR.ARPA</li>
5342 <li>73.100.IN-ADDR.ARPA</li>
5343 <li>74.100.IN-ADDR.ARPA</li>
5344 <li>75.100.IN-ADDR.ARPA</li>
5345 <li>76.100.IN-ADDR.ARPA</li>
5346 <li>77.100.IN-ADDR.ARPA</li>
5347 <li>78.100.IN-ADDR.ARPA</li>
5348 <li>79.100.IN-ADDR.ARPA</li>
5349 <li>80.100.IN-ADDR.ARPA</li>
5350 <li>81.100.IN-ADDR.ARPA</li>
5351 <li>82.100.IN-ADDR.ARPA</li>
5352 <li>83.100.IN-ADDR.ARPA</li>
5353 <li>84.100.IN-ADDR.ARPA</li>
5354 <li>85.100.IN-ADDR.ARPA</li>
5355 <li>86.100.IN-ADDR.ARPA</li>
5356 <li>87.100.IN-ADDR.ARPA</li>
5357 <li>88.100.IN-ADDR.ARPA</li>
5358 <li>89.100.IN-ADDR.ARPA</li>
5359 <li>90.100.IN-ADDR.ARPA</li>
5360 <li>91.100.IN-ADDR.ARPA</li>
5361 <li>92.100.IN-ADDR.ARPA</li>
5362 <li>93.100.IN-ADDR.ARPA</li>
5363 <li>94.100.IN-ADDR.ARPA</li>
5364 <li>95.100.IN-ADDR.ARPA</li>
5365 <li>96.100.IN-ADDR.ARPA</li>
5366 <li>97.100.IN-ADDR.ARPA</li>
5367 <li>98.100.IN-ADDR.ARPA</li>
5368 <li>99.100.IN-ADDR.ARPA</li>
5369 <li>100.100.IN-ADDR.ARPA</li>
5370 <li>101.100.IN-ADDR.ARPA</li>
5371 <li>102.100.IN-ADDR.ARPA</li>
5372 <li>103.100.IN-ADDR.ARPA</li>
5373 <li>104.100.IN-ADDR.ARPA</li>
5374 <li>105.100.IN-ADDR.ARPA</li>
5375 <li>106.100.IN-ADDR.ARPA</li>
5376 <li>107.100.IN-ADDR.ARPA</li>
5377 <li>108.100.IN-ADDR.ARPA</li>
5378 <li>109.100.IN-ADDR.ARPA</li>
5379 <li>110.100.IN-ADDR.ARPA</li>
5380 <li>111.100.IN-ADDR.ARPA</li>
5381 <li>112.100.IN-ADDR.ARPA</li>
5382 <li>113.100.IN-ADDR.ARPA</li>
5383 <li>114.100.IN-ADDR.ARPA</li>
5384 <li>115.100.IN-ADDR.ARPA</li>
5385 <li>116.100.IN-ADDR.ARPA</li>
5386 <li>117.100.IN-ADDR.ARPA</li>
5387 <li>118.100.IN-ADDR.ARPA</li>
5388 <li>119.100.IN-ADDR.ARPA</li>
5389 <li>120.100.IN-ADDR.ARPA</li>
5390 <li>121.100.IN-ADDR.ARPA</li>
5391 <li>122.100.IN-ADDR.ARPA</li>
5392 <li>123.100.IN-ADDR.ARPA</li>
5393 <li>124.100.IN-ADDR.ARPA</li>
5394 <li>125.100.IN-ADDR.ARPA</li>
5395 <li>126.100.IN-ADDR.ARPA</li>
5396 <li>127.100.IN-ADDR.ARPA</li>
5397 <li>0.IN-ADDR.ARPA</li>
5398 <li>127.IN-ADDR.ARPA</li>
5399 <li>254.169.IN-ADDR.ARPA</li>
5400 <li>2.0.192.IN-ADDR.ARPA</li>
5401 <li>100.51.198.IN-ADDR.ARPA</li>
5402 <li>113.0.203.IN-ADDR.ARPA</li>
5403 <li>255.255.255.255.IN-ADDR.ARPA</li>
5404 <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>
5405 <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>
5406 <li>8.B.D.0.1.0.0.2.IP6.ARPA</li>
5407 <li>D.F.IP6.ARPA</li>
5408 <li>8.E.F.IP6.ARPA</li>
5409 <li>9.E.F.IP6.ARPA</li>
5410 <li>A.E.F.IP6.ARPA</li>
5411 <li>B.E.F.IP6.ARPA</li>
5416 Empty zones are settable at the view level and only apply to
5417 views of class IN. Disabled empty zones are only inherited
5418 from options if there are no disabled empty zones specified
5419 at the view level. To override the options list of disabled
5420 zones, you can disable the root zone at the view level, for example:
5422 <pre class="programlisting">
5423 disable-empty-zone ".";
5428 If you are using the address ranges covered here, you should
5429 already have reverse zones covering the addresses you use.
5430 In practice this appears to not be the case with many queries
5431 being made to the infrastructure servers for names in these
5432 spaces. So many in fact that sacrificial servers were needed
5433 to be deployed to channel the query load away from the
5434 infrastructure servers.
5436 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
5437 <h3 class="title">Note</h3>
5438 The real parent servers for these zones should disable all
5439 empty zone under the parent zone they serve. For the real
5440 root servers, this is all built-in empty zones. This will
5441 enable them to return referrals to deeper in the tree.
5443 <div class="variablelist"><dl>
5444 <dt><span class="term"><span><strong class="command">empty-server</strong></span></span></dt>
5446 Specify what server name will appear in the returned
5447 SOA record for empty zones. If none is specified, then
5448 the zone's name will be used.
5450 <dt><span class="term"><span><strong class="command">empty-contact</strong></span></span></dt>
5452 Specify what contact name will appear in the returned
5453 SOA record for empty zones. If none is specified, then
5456 <dt><span class="term"><span><strong class="command">empty-zones-enable</strong></span></span></dt>
5458 Enable or disable all empty zones. By default, they
5461 <dt><span class="term"><span><strong class="command">disable-empty-zone</strong></span></span></dt>
5463 Disable individual empty zones. By default, none are
5464 disabled. This option can be specified multiple times.
5468 <div class="sect3" lang="en">
5469 <div class="titlepage"><div><div><h4 class="title">
5470 <a name="acache"></a>Additional Section Caching</h4></div></div></div>
5472 The additional section cache, also called <span><strong class="command">acache</strong></span>,
5473 is an internal cache to improve the response performance of BIND 9.
5474 When additional section caching is enabled, BIND 9 will
5475 cache an internal short-cut to the additional section content for
5477 Note that <span><strong class="command">acache</strong></span> is an internal caching
5478 mechanism of BIND 9, and is not related to the DNS caching
5482 Additional section caching does not change the
5483 response content (except the RRsets ordering of the additional
5484 section, see below), but can improve the response performance
5486 It is particularly effective when BIND 9 acts as an authoritative
5487 server for a zone that has many delegations with many glue RRs.
5490 In order to obtain the maximum performance improvement
5491 from additional section caching, setting
5492 <span><strong class="command">additional-from-cache</strong></span>
5493 to <span><strong class="command">no</strong></span> is recommended, since the current
5494 implementation of <span><strong class="command">acache</strong></span>
5495 does not short-cut of additional section information from the
5499 One obvious disadvantage of <span><strong class="command">acache</strong></span> is
5500 that it requires much more
5501 memory for the internal cached data.
5502 Thus, if the response performance does not matter and memory
5503 consumption is much more critical, the
5504 <span><strong class="command">acache</strong></span> mechanism can be
5505 disabled by setting <span><strong class="command">acache-enable</strong></span> to
5506 <span><strong class="command">no</strong></span>.
5507 It is also possible to specify the upper limit of memory
5509 for acache by using <span><strong class="command">max-acache-size</strong></span>.
5512 Additional section caching also has a minor effect on the
5513 RRset ordering in the additional section.
5514 Without <span><strong class="command">acache</strong></span>,
5515 <span><strong class="command">cyclic</strong></span> order is effective for the additional
5516 section as well as the answer and authority sections.
5517 However, additional section caching fixes the ordering when it
5518 first caches an RRset for the additional section, and the same
5519 ordering will be kept in succeeding responses, regardless of the
5520 setting of <span><strong class="command">rrset-order</strong></span>.
5521 The effect of this should be minor, however, since an
5522 RRset in the additional section
5523 typically only contains a small number of RRs (and in many cases
5524 it only contains a single RR), in which case the
5525 ordering does not matter much.
5528 The following is a summary of options related to
5529 <span><strong class="command">acache</strong></span>.
5531 <div class="variablelist"><dl>
5532 <dt><span class="term"><span><strong class="command">acache-enable</strong></span></span></dt>
5534 If <span><strong class="command">yes</strong></span>, additional section caching is
5535 enabled. The default value is <span><strong class="command">no</strong></span>.
5537 <dt><span class="term"><span><strong class="command">acache-cleaning-interval</strong></span></span></dt>
5539 The server will remove stale cache entries, based on an LRU
5541 algorithm, every <span><strong class="command">acache-cleaning-interval</strong></span> minutes.
5542 The default is 60 minutes.
5543 If set to 0, no periodic cleaning will occur.
5545 <dt><span class="term"><span><strong class="command">max-acache-size</strong></span></span></dt>
5547 The maximum amount of memory in bytes to use for the server's acache.
5548 When the amount of data in the acache reaches this limit,
5550 will clean more aggressively so that the limit is not
5552 In a server with multiple views, the limit applies
5554 acache of each view.
5555 The default is <code class="literal">16M</code>.
5559 <div class="sect3" lang="en">
5560 <div class="titlepage"><div><div><h4 class="title">
5561 <a name="id2587621"></a>Content Filtering</h4></div></div></div>
5563 <acronym class="acronym">BIND</acronym> 9 provides the ability to filter
5564 out DNS responses from external DNS servers containing
5565 certain types of data in the answer section.
5566 Specifically, it can reject address (A or AAAA) records if
5567 the corresponding IPv4 or IPv6 addresses match the given
5568 <code class="varname">address_match_list</code> of the
5569 <span><strong class="command">deny-answer-addresses</strong></span> option.
5570 It can also reject CNAME or DNAME records if the "alias"
5571 name (i.e., the CNAME alias or the substituted query name
5572 due to DNAME) matches the
5573 given <code class="varname">namelist</code> of the
5574 <span><strong class="command">deny-answer-aliases</strong></span> option, where
5575 "match" means the alias name is a subdomain of one of
5576 the <code class="varname">name_list</code> elements.
5577 If the optional <code class="varname">namelist</code> is specified
5578 with <span><strong class="command">except-from</strong></span>, records whose query name
5579 matches the list will be accepted regardless of the filter
5581 Likewise, if the alias name is a subdomain of the
5582 corresponding zone, the <span><strong class="command">deny-answer-aliases</strong></span>
5583 filter will not apply;
5584 for example, even if "example.com" is specified for
5585 <span><strong class="command">deny-answer-aliases</strong></span>,
5587 <pre class="programlisting">www.example.com. CNAME xxx.example.com.</pre>
5589 returned by an "example.com" server will be accepted.
5592 In the <code class="varname">address_match_list</code> of the
5593 <span><strong class="command">deny-answer-addresses</strong></span> option, only
5594 <code class="varname">ip_addr</code>
5595 and <code class="varname">ip_prefix</code>
5597 any <code class="varname">key_id</code> will be silently ignored.
5600 If a response message is rejected due to the filtering,
5601 the entire message is discarded without being cached, and
5602 a SERVFAIL error will be returned to the client.
5605 This filtering is intended to prevent "DNS rebinding attacks," in
5606 which an attacker, in response to a query for a domain name the
5607 attacker controls, returns an IP address within your own network or
5608 an alias name within your own domain.
5609 A naive web browser or script could then serve as an
5610 unintended proxy, allowing the attacker
5611 to get access to an internal node of your local network
5612 that couldn't be externally accessed otherwise.
5613 See the paper available at
5614 <a href="http://portal.acm.org/citation.cfm?id=1315245.1315298" target="_top">
5615 http://portal.acm.org/citation.cfm?id=1315245.1315298
5617 for more details about the attacks.
5620 For example, if you own a domain named "example.net" and
5621 your internal network uses an IPv4 prefix 192.0.2.0/24,
5622 you might specify the following rules:
5624 <pre class="programlisting">deny-answer-addresses { 192.0.2.0/24; } except-from { "example.net"; };
5625 deny-answer-aliases { "example.net"; };
5628 If an external attacker lets a web browser in your local
5629 network look up an IPv4 address of "attacker.example.com",
5630 the attacker's DNS server would return a response like this:
5632 <pre class="programlisting">attacker.example.com. A 192.0.2.1</pre>
5634 in the answer section.
5635 Since the rdata of this record (the IPv4 address) matches
5636 the specified prefix 192.0.2.0/24, this response will be
5640 On the other hand, if the browser looks up a legitimate
5641 internal web server "www.example.net" and the
5642 following response is returned to
5643 the <acronym class="acronym">BIND</acronym> 9 server
5645 <pre class="programlisting">www.example.net. A 192.0.2.2</pre>
5647 it will be accepted since the owner name "www.example.net"
5648 matches the <span><strong class="command">except-from</strong></span> element,
5652 Note that this is not really an attack on the DNS per se.
5653 In fact, there is nothing wrong for an "external" name to
5654 be mapped to your "internal" IP address or domain name
5655 from the DNS point of view.
5656 It might actually be provided for a legitimate purpose,
5657 such as for debugging.
5658 As long as the mapping is provided by the correct owner,
5659 it is not possible or does not make sense to detect
5660 whether the intent of the mapping is legitimate or not
5662 The "rebinding" attack must primarily be protected at the
5663 application that uses the DNS.
5664 For a large site, however, it may be difficult to protect
5665 all possible applications at once.
5666 This filtering feature is provided only to help such an
5667 operational environment;
5668 it is generally discouraged to turn it on unless you are
5669 very sure you have no other choice and the attack is a
5670 real threat for your applications.
5673 Care should be particularly taken if you want to use this
5674 option for addresses within 127.0.0.0/8.
5675 These addresses are obviously "internal", but many
5676 applications conventionally rely on a DNS mapping from
5677 some name to such an address.
5678 Filtering out DNS records containing this address
5679 spuriously can break such applications.
5682 <div class="sect3" lang="en">
5683 <div class="titlepage"><div><div><h4 class="title">
5684 <a name="id2587883"></a>Response Policy Zone (RPZ) Rewriting</h4></div></div></div>
5686 <acronym class="acronym">BIND</acronym> 9 includes a limited
5687 mechanism to modify DNS responses for requests
5688 analogous to email anti-spam DNS blacklists.
5689 Responses can be changed to deny the existence of domains(NXDOMAIN),
5690 deny the existence of IP addresses for domains (NODATA),
5691 or contain other IP addresses or data.
5694 Response policy zones are named in the
5695 <span><strong class="command">response-policy</strong></span> option for the view or among the
5696 global options if there is no response-policy option for the view.
5697 RPZs are ordinary DNS zones containing RRsets
5698 that can be queried normally if allowed.
5699 It is usually best to restrict those queries with something like
5700 <span><strong class="command">allow-query { localhost; };</strong></span>.
5703 Four policy triggers are encoded in RPZ records, QNAME, IP, NSIP,
5705 QNAME RPZ records triggered by query names of requests and targets
5706 of CNAME records resolved to generate the response.
5707 The owner name of a QNAME RPZ record is the query name relativized
5711 The second kind of RPZ trigger is an IP address in an A and AAAA
5712 record in the ANSWER section of a response.
5713 IP address triggers are encoded in records that have owner names
5714 that are subdomains of <strong class="userinput"><code>rpz-ip</code></strong> relativized
5715 to the RPZ origin name and encode an IP address or address block.
5716 IPv4 trigger addresses are represented as
5717 <strong class="userinput"><code>prefixlength.B4.B3.B2.B1.rpz-ip</code></strong>.
5718 The prefix length must be between 1 and 32.
5719 All four bytes, B4, B3, B2, and B1, must be present.
5720 B4 is the decimal value of the least significant byte of the
5721 IPv4 address as in IN-ADDR.ARPA.
5722 IPv6 addresses are encoded in a format similar to the standard
5723 IPv6 text representation,
5724 <strong class="userinput"><code>prefixlength.W8.W7.W6.W5.W4.W3.W2.W1.rpz-ip</code></strong>.
5725 Each of W8,...,W1 is a one to four digit hexadecimal number
5726 representing 16 bits of the IPv6 address as in the standard text
5727 representation of IPv6 addresses, but reversed as in IN-ADDR.ARPA.
5728 All 8 words must be present except when consecutive
5729 zero words are replaced with <strong class="userinput"><code>.zz.</code></strong>
5730 analogous to double colons (::) in standard IPv6 text encodings.
5731 The prefix length must be between 1 and 128.
5734 NSDNAME triggers match names of authoritative servers
5735 for the query name, a parent of the query name, a CNAME for
5736 query name, or a parent of a CNAME.
5737 They are encoded as subdomains of
5738 <strong class="userinput"><code>rpz-nsdomain</code></strong> relativized
5739 to the RPZ origin name.
5740 NSIP triggers match IP addresses in A and
5741 AAAA RRsets for domains that can be checked against NSDNAME
5743 NSIP triggers are encoded like IP triggers except as subdomains of
5744 <strong class="userinput"><code>rpz-nsip</code></strong>.
5745 NSDNAME and NSIP triggers are checked only for names with at
5746 least <span><strong class="command">min-ns-dots</strong></span> dots.
5747 The default value of <span><strong class="command">min-ns-dots</strong></span> is 1 to
5748 exclude top level domains.
5751 The query response is checked against all RPZs, so
5752 two or more policy records can be triggered by a response.
5753 Because DNS responses can be rewritten according to at most one
5754 policy record, a single record encoding an action (other than
5755 <span><strong class="command">DISABLED</strong></span> actions) must be chosen.
5756 Triggers or the records that encode them are chosen in
5757 the following order:
5759 <div class="itemizedlist"><ul type="disc">
5760 <li>Choose the triggered record in the zone that appears
5761 first in the response-policy option.
5763 <li>Prefer QNAME to IP to NSDNAME to NSIP triggers
5766 <li>Among NSDNAME triggers, prefer the
5767 trigger that matches the smallest name under the DNSSEC ordering.
5769 <li>Among IP or NSIP triggers, prefer the trigger
5770 with the longest prefix.
5772 <li>Among triggers with the same prefex length,
5773 prefer the IP or NSIP trigger that matches
5774 the smallest IP address.
5780 When the processing of a response is restarted to resolve
5781 DNAME or CNAME records and a policy record set has
5783 all RPZs are again consulted for the DNAME or CNAME names
5787 RPZ record sets are sets of any types of DNS record except
5788 DNAME or DNSSEC that encode actions or responses to queries.
5790 <div class="itemizedlist"><ul type="disc">
5791 <li>The <span><strong class="command">NXDOMAIN</strong></span> response is encoded
5792 by a CNAME whose target is the root domain (.)
5794 <li>A CNAME whose target is the wildcard top-level
5795 domain (*.) specifies the <span><strong class="command">NODATA</strong></span> action,
5796 which rewrites the response to NODATA or ANCOUNT=1.
5798 <li>The <span><strong class="command">Local Data</strong></span> action is
5799 represented by a set ordinary DNS records that are used
5800 to answer queries. Queries for record types not the
5801 set are answered with NODATA.
5803 A special form of local data is a CNAME whose target is a
5804 wildcard such as *.example.com.
5805 It is used as if were an ordinary CNAME after the astrisk (*)
5806 has been replaced with the query name.
5807 The purpose for this special form is query logging in the
5808 walled garden's authority DNS server.
5810 <li>The <span><strong class="command">PASSTHRU</strong></span> policy is specified
5811 by a CNAME whose target is <span><strong class="command">rpz-passthru.</strong></span>
5812 It causes the response to not be rewritten
5813 and is most often used to "poke holes" in policies for
5815 (A CNAME whose target is the variable part of its owner name
5816 is an obsolete specification of the PASSTHRU policy.)
5822 The actions specified in an RPZ can be overridden with a
5823 <span><strong class="command">policy</strong></span> clause in the
5824 <span><strong class="command">response-policy</strong></span> option.
5825 An organization using an RPZ provided by another organization might
5826 use this mechanism to redirect domains to its own walled garden.
5828 <div class="itemizedlist"><ul type="disc">
5830 <span><strong class="command">GIVEN</strong></span> says "do not override but
5831 perform the action specified in the zone."
5834 <span><strong class="command">DISABLED</strong></span> causes policy records to do
5835 nothing but log what they might have done.
5836 The response to the DNS query will be written according to
5837 any triggered policy records that are not disabled.
5838 Disabled policy zones should appear first,
5839 because they will often not be logged
5840 if a higher precedence trigger is found first.
5843 <span><strong class="command">PASSTHRU</strong></span> causes all policy records
5844 to act as if they were CNAME records with targets the variable
5845 part of their owner name. They protect the response from
5849 <span><strong class="command">NXDOMAIN</strong></span> causes all RPZ records
5850 to specify NXDOMAIN policies.
5853 <span><strong class="command">NODATA</strong></span> overrides with the
5857 <span><strong class="command">CNAME domain</strong></span> causes all RPZ
5858 policy records to act as if they were "cname domain" records.
5864 By default, the actions encoded in an RPZ are applied
5865 only to queries that ask for recursion (RD=1).
5866 That default can be changed for a single RPZ or all RPZs in a view
5867 with a <span><strong class="command">recursive-only no</strong></span> clause.
5868 This feature is useful for serving the same zone files
5869 both inside and outside an RFC 1918 cloud and using RPZ to
5870 delete answers that would otherwise contain RFC 1918 values
5871 on the externally visible name server or view.
5874 Also by default, RPZ actions are applied only to DNS requests that
5875 either do not request DNSSEC metadata (DO=0) or when no DNSSEC
5876 records are available for request name in the original zone (not
5877 the response policy zone).
5878 This default can be changed for all RPZs in a view with a
5879 <span><strong class="command">break-dnssec yes</strong></span> clause.
5880 In that case, RPZ actions are applied regardless of DNSSEC.
5881 The name of the clause option reflects the fact that results
5882 rewritten by RPZ actions cannot verify.
5885 The TTL of a record modified by RPZ policies is set from the
5886 TTL of the relevant record in policy zone. It is then limited
5888 The <span><strong class="command">max-policy-ttl</strong></span> clause changes that
5889 maximum from its default of 5.
5892 For example, you might use this option statement
5894 <pre class="programlisting"> response-policy { zone "badlist"; };</pre>
5896 and this zone statement
5898 <pre class="programlisting"> zone "badlist" {type master; file "master/badlist"; allow-query {none;}; };</pre>
5902 <pre class="programlisting">$TTL 1H
5903 @ SOA LOCALHOST. named-mgr.example.com (1 1h 15m 30d 2h)
5906 ; QNAME policy records. There are no periods (.) after the owner names.
5907 nxdomain.domain.com CNAME . ; NXDOMAIN policy
5908 nodata.domain.com CNAME *. ; NODATA policy
5909 bad.domain.com A 10.0.0.1 ; redirect to a walled garden
5912 ; do not rewrite (PASSTHRU) OK.DOMAIN.COM
5913 ok.domain.com CNAME rpz-passthru.
5915 bzone.domain.com CNAME garden.example.com.
5917 ; redirect x.bzone.domain.com to x.bzone.domain.com.garden.example.com
5918 *.bzone.domain.com CNAME *.garden.example.com.
5921 ; IP policy records that rewrite all answers for 127/8 except 127.0.0.1
5922 8.0.0.0.127.rpz-ip CNAME .
5923 32.1.0.0.127.rpz-ip CNAME rpz-passthru.
5925 ; NSDNAME and NSIP policy records
5926 ns.domain.com.rpz-nsdname CNAME .
5927 48.zz.2.2001.rpz-nsip CNAME .
5930 RPZ can affect server performance.
5931 Each configured response policy zone requires the server to
5932 perform one to four additional database lookups before a
5933 query can be answered.
5934 For example, a DNS server with four policy zones, each with all
5935 four kinds of response triggers, QNAME, IP, NSIP, and
5936 NSDNAME, requires a total of 17 times as many database
5937 lookups as a similar DNS server with no response policy zones.
5938 A <acronym class="acronym">BIND9</acronym> server with adequate memory and one
5939 response policy zone with QNAME and IP triggers might achieve a
5940 maximum queries-per-second rate about 20% lower.
5941 A server with four response policy zones with QNAME and IP
5942 triggers might have a maximum QPS rate about 50% lower.
5945 Responses rewritten by RPZ are counted in the
5946 <span><strong class="command">RPZRewrites</strong></span> statistics.
5950 <div class="sect2" lang="en">
5951 <div class="titlepage"><div><div><h3 class="title">
5952 <a name="server_statement_grammar"></a><span><strong class="command">server</strong></span> Statement Grammar</h3></div></div></div>
5953 <pre class="programlisting"><span><strong class="command">server</strong></span> <em class="replaceable"><code>ip_addr[/prefixlen]</code></em> {
5954 [<span class="optional"> bogus <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5955 [<span class="optional"> provide-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5956 [<span class="optional"> request-ixfr <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5957 [<span class="optional"> edns <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
5958 [<span class="optional"> edns-udp-size <em class="replaceable"><code>number</code></em> ; </span>]
5959 [<span class="optional"> max-udp-size <em class="replaceable"><code>number</code></em> ; </span>]
5960 [<span class="optional"> transfers <em class="replaceable"><code>number</code></em> ; </span>]
5961 [<span class="optional"> transfer-format <em class="replaceable"><code>( one-answer | many-answers )</code></em> ; ]</span>]
5962 [<span class="optional"> keys <em class="replaceable"><code>{ string ; [<span class="optional"> string ; [<span class="optional">...</span>]</span>] }</code></em> ; </span>]
5963 [<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>]
5964 [<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>]
5965 [<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>]
5966 [<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>]
5967 [<span class="optional"> query-source [<span class="optional"> address ( <em class="replaceable"><code>ip_addr</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]
5968 [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]; </span>]
5969 [<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>]
5970 [<span class="optional"> port ( <em class="replaceable"><code>ip_port</code></em> | <em class="replaceable"><code>*</code></em> ) </span>]; </span>]
5971 [<span class="optional"> use-queryport-pool <em class="replaceable"><code>yes_or_no</code></em>; </span>]
5972 [<span class="optional"> queryport-pool-ports <em class="replaceable"><code>number</code></em>; </span>]
5973 [<span class="optional"> queryport-pool-updateinterval <em class="replaceable"><code>number</code></em>; </span>]
5977 <div class="sect2" lang="en">
5978 <div class="titlepage"><div><div><h3 class="title">
5979 <a name="server_statement_definition_and_usage"></a><span><strong class="command">server</strong></span> Statement Definition and
5980 Usage</h3></div></div></div>
5982 The <span><strong class="command">server</strong></span> statement defines
5984 to be associated with a remote name server. If a prefix length is
5985 specified, then a range of servers is covered. Only the most
5987 server clause applies regardless of the order in
5988 <code class="filename">named.conf</code>.
5991 The <span><strong class="command">server</strong></span> statement can occur at
5992 the top level of the
5993 configuration file or inside a <span><strong class="command">view</strong></span>
5995 If a <span><strong class="command">view</strong></span> statement contains
5996 one or more <span><strong class="command">server</strong></span> statements, only
5998 apply to the view and any top-level ones are ignored.
5999 If a view contains no <span><strong class="command">server</strong></span>
6001 any top-level <span><strong class="command">server</strong></span> statements are
6006 If you discover that a remote server is giving out bad data,
6007 marking it as bogus will prevent further queries to it. The
6009 value of <span><strong class="command">bogus</strong></span> is <span><strong class="command">no</strong></span>.
6012 The <span><strong class="command">provide-ixfr</strong></span> clause determines
6014 the local server, acting as master, will respond with an
6016 zone transfer when the given remote server, a slave, requests it.
6017 If set to <span><strong class="command">yes</strong></span>, incremental transfer
6019 whenever possible. If set to <span><strong class="command">no</strong></span>,
6021 to the remote server will be non-incremental. If not set, the
6023 of the <span><strong class="command">provide-ixfr</strong></span> option in the
6025 global options block is used as a default.
6028 The <span><strong class="command">request-ixfr</strong></span> clause determines
6030 the local server, acting as a slave, will request incremental zone
6031 transfers from the given remote server, a master. If not set, the
6032 value of the <span><strong class="command">request-ixfr</strong></span> option in
6034 global options block is used as a default.
6037 IXFR requests to servers that do not support IXFR will
6039 fall back to AXFR. Therefore, there is no need to manually list
6040 which servers support IXFR and which ones do not; the global
6042 of <span><strong class="command">yes</strong></span> should always work.
6043 The purpose of the <span><strong class="command">provide-ixfr</strong></span> and
6044 <span><strong class="command">request-ixfr</strong></span> clauses is
6045 to make it possible to disable the use of IXFR even when both
6047 and slave claim to support it, for example if one of the servers
6048 is buggy and crashes or corrupts data when IXFR is used.
6051 The <span><strong class="command">edns</strong></span> clause determines whether
6052 the local server will attempt to use EDNS when communicating
6053 with the remote server. The default is <span><strong class="command">yes</strong></span>.
6056 The <span><strong class="command">edns-udp-size</strong></span> option sets the EDNS UDP size
6057 that is advertised by <span><strong class="command">named</strong></span> when querying the remote server.
6058 Valid values are 512 to 4096 bytes (values outside this range will be
6059 silently adjusted). This option is useful when you wish to
6060 advertises a different value to this server than the value you
6061 advertise globally, for example, when there is a firewall at the
6062 remote site that is blocking large replies.
6065 The <span><strong class="command">max-udp-size</strong></span> option sets the
6066 maximum EDNS UDP message size <span><strong class="command">named</strong></span> will send. Valid
6067 values are 512 to 4096 bytes (values outside this range will
6068 be silently adjusted). This option is useful when you
6069 know that there is a firewall that is blocking large
6070 replies from <span><strong class="command">named</strong></span>.
6073 The server supports two zone transfer methods. The first, <span><strong class="command">one-answer</strong></span>,
6074 uses one DNS message per resource record transferred. <span><strong class="command">many-answers</strong></span> packs
6075 as many resource records as possible into a message. <span><strong class="command">many-answers</strong></span> is
6076 more efficient, but is only known to be understood by <acronym class="acronym">BIND</acronym> 9, <acronym class="acronym">BIND</acronym>
6077 8.x, and patched versions of <acronym class="acronym">BIND</acronym>
6078 4.9.5. You can specify which method
6079 to use for a server with the <span><strong class="command">transfer-format</strong></span> option.
6080 If <span><strong class="command">transfer-format</strong></span> is not
6081 specified, the <span><strong class="command">transfer-format</strong></span>
6083 by the <span><strong class="command">options</strong></span> statement will be
6086 <p><span><strong class="command">transfers</strong></span>
6087 is used to limit the number of concurrent inbound zone
6088 transfers from the specified server. If no
6089 <span><strong class="command">transfers</strong></span> clause is specified, the
6090 limit is set according to the
6091 <span><strong class="command">transfers-per-ns</strong></span> option.
6094 The <span><strong class="command">keys</strong></span> clause identifies a
6095 <span><strong class="command">key_id</strong></span> defined by the <span><strong class="command">key</strong></span> statement,
6096 to be used for transaction security (TSIG, <a href="Bv9ARM.ch04.html#tsig" title="TSIG">the section called “TSIG”</a>)
6097 when talking to the remote server.
6098 When a request is sent to the remote server, a request signature
6099 will be generated using the key specified here and appended to the
6100 message. A request originating from the remote server is not
6102 to be signed by this key.
6105 Although the grammar of the <span><strong class="command">keys</strong></span>
6107 allows for multiple keys, only a single key per server is
6112 The <span><strong class="command">transfer-source</strong></span> and
6113 <span><strong class="command">transfer-source-v6</strong></span> clauses specify
6114 the IPv4 and IPv6 source
6115 address to be used for zone transfer with the remote server,
6117 For an IPv4 remote server, only <span><strong class="command">transfer-source</strong></span> can
6119 Similarly, for an IPv6 remote server, only
6120 <span><strong class="command">transfer-source-v6</strong></span> can be
6122 For more details, see the description of
6123 <span><strong class="command">transfer-source</strong></span> and
6124 <span><strong class="command">transfer-source-v6</strong></span> in
6125 <a href="Bv9ARM.ch06.html#zone_transfers" title="Zone Transfers">the section called “Zone Transfers”</a>.
6128 The <span><strong class="command">notify-source</strong></span> and
6129 <span><strong class="command">notify-source-v6</strong></span> clauses specify the
6130 IPv4 and IPv6 source address to be used for notify
6131 messages sent to remote servers, respectively. For an
6132 IPv4 remote server, only <span><strong class="command">notify-source</strong></span>
6133 can be specified. Similarly, for an IPv6 remote server,
6134 only <span><strong class="command">notify-source-v6</strong></span> can be specified.
6137 The <span><strong class="command">query-source</strong></span> and
6138 <span><strong class="command">query-source-v6</strong></span> clauses specify the
6139 IPv4 and IPv6 source address to be used for queries
6140 sent to remote servers, respectively. For an IPv4
6141 remote server, only <span><strong class="command">query-source</strong></span> can
6142 be specified. Similarly, for an IPv6 remote server,
6143 only <span><strong class="command">query-source-v6</strong></span> can be specified.
6146 <div class="sect2" lang="en">
6147 <div class="titlepage"><div><div><h3 class="title">
6148 <a name="statschannels"></a><span><strong class="command">statistics-channels</strong></span> Statement Grammar</h3></div></div></div>
6149 <pre class="programlisting"><span><strong class="command">statistics-channels</strong></span> {
6150 [ inet ( ip_addr | * ) [ port ip_port ]
6151 [ allow { <em class="replaceable"><code> address_match_list </code></em> } ]; ]
6156 <div class="sect2" lang="en">
6157 <div class="titlepage"><div><div><h3 class="title">
6158 <a name="id2589011"></a><span><strong class="command">statistics-channels</strong></span> Statement Definition and
6159 Usage</h3></div></div></div>
6161 The <span><strong class="command">statistics-channels</strong></span> statement
6162 declares communication channels to be used by system
6163 administrators to get access to statistics information of
6167 This statement intends to be flexible to support multiple
6168 communication protocols in the future, but currently only
6169 HTTP access is supported.
6170 It requires that BIND 9 be compiled with libxml2;
6171 the <span><strong class="command">statistics-channels</strong></span> statement is
6172 still accepted even if it is built without the library,
6173 but any HTTP access will fail with an error.
6176 An <span><strong class="command">inet</strong></span> control channel is a TCP socket
6177 listening at the specified <span><strong class="command">ip_port</strong></span> on the
6178 specified <span><strong class="command">ip_addr</strong></span>, which can be an IPv4 or IPv6
6179 address. An <span><strong class="command">ip_addr</strong></span> of <code class="literal">*</code> (asterisk) is
6180 interpreted as the IPv4 wildcard address; connections will be
6181 accepted on any of the system's IPv4 addresses.
6182 To listen on the IPv6 wildcard address,
6183 use an <span><strong class="command">ip_addr</strong></span> of <code class="literal">::</code>.
6186 If no port is specified, port 80 is used for HTTP channels.
6187 The asterisk "<code class="literal">*</code>" cannot be used for
6188 <span><strong class="command">ip_port</strong></span>.
6191 The attempt of opening a statistics channel is
6192 restricted by the optional <span><strong class="command">allow</strong></span> clause.
6193 Connections to the statistics channel are permitted based on the
6194 <span><strong class="command">address_match_list</strong></span>.
6195 If no <span><strong class="command">allow</strong></span> clause is present,
6196 <span><strong class="command">named</strong></span> accepts connection
6197 attempts from any address; since the statistics may
6198 contain sensitive internal information, it is highly
6199 recommended to restrict the source of connection requests
6203 If no <span><strong class="command">statistics-channels</strong></span> statement is present,
6204 <span><strong class="command">named</strong></span> will not open any communication channels.
6207 <div class="sect2" lang="en">
6208 <div class="titlepage"><div><div><h3 class="title">
6209 <a name="trusted-keys"></a><span><strong class="command">trusted-keys</strong></span> Statement Grammar</h3></div></div></div>
6210 <pre class="programlisting"><span><strong class="command">trusted-keys</strong></span> {
6211 <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> ;
6212 [<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>]
6216 <div class="sect2" lang="en">
6217 <div class="titlepage"><div><div><h3 class="title">
6218 <a name="id2589219"></a><span><strong class="command">trusted-keys</strong></span> Statement Definition
6219 and Usage</h3></div></div></div>
6221 The <span><strong class="command">trusted-keys</strong></span> statement defines
6222 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
6223 public key for a non-authoritative zone is known, but
6224 cannot be securely obtained through DNS, either because
6225 it is the DNS root zone or because its parent zone is
6226 unsigned. Once a key has been configured as a trusted
6227 key, it is treated as if it had been validated and
6228 proven secure. The resolver attempts DNSSEC validation
6229 on all DNS data in subdomains of a security root.
6232 All keys (and corresponding zones) listed in
6233 <span><strong class="command">trusted-keys</strong></span> are deemed to exist regardless
6234 of what parent zones say. Similarly for all keys listed in
6235 <span><strong class="command">trusted-keys</strong></span> only those keys are
6236 used to validate the DNSKEY RRset. The parent's DS RRset
6240 The <span><strong class="command">trusted-keys</strong></span> statement can contain
6241 multiple key entries, each consisting of the key's
6242 domain name, flags, protocol, algorithm, and the Base-64
6243 representation of the key data.
6244 Spaces, tabs, newlines and carriage returns are ignored
6245 in the key data, so the configuration may be split up into
6249 <span><strong class="command">trusted-keys</strong></span> may be set at the top level
6250 of <code class="filename">named.conf</code> or within a view. If it is
6251 set in both places, they are additive: keys defined at the top
6252 level are inherited by all views, but keys defined in a view
6253 are only used within that view.
6256 <div class="sect2" lang="en">
6257 <div class="titlepage"><div><div><h3 class="title">
6258 <a name="id2589266"></a><span><strong class="command">managed-keys</strong></span> Statement Grammar</h3></div></div></div>
6259 <pre class="programlisting"><span><strong class="command">managed-keys</strong></span> {
6260 <em class="replaceable"><code>name</code></em> <code class="literal">initial-key</code> <em class="replaceable"><code>flags</code></em> <em class="replaceable"><code>protocol</code></em> <em class="replaceable"><code>algorithm</code></em> <em class="replaceable"><code>key-data</code></em> ;
6261 [<span class="optional"> <em class="replaceable"><code>name</code></em> <code class="literal">initial-key</code> <em class="replaceable"><code>flags</code></em> <em class="replaceable"><code>protocol</code></em> <em class="replaceable"><code>algorithm</code></em> <em class="replaceable"><code>key-data</code></em> ; [<span class="optional">...</span>]</span>]
6265 <div class="sect2" lang="en">
6266 <div class="titlepage"><div><div><h3 class="title">
6267 <a name="managed-keys"></a><span><strong class="command">managed-keys</strong></span> Statement Definition
6268 and Usage</h3></div></div></div>
6270 The <span><strong class="command">managed-keys</strong></span> statement, like
6271 <span><strong class="command">trusted-keys</strong></span>, defines DNSSEC
6272 security roots. The difference is that
6273 <span><strong class="command">managed-keys</strong></span> can be kept up to date
6274 automatically, without intervention from the resolver
6278 Suppose, for example, that a zone's key-signing
6279 key was compromised, and the zone owner had to revoke and
6280 replace the key. A resolver which had the old key in a
6281 <span><strong class="command">trusted-keys</strong></span> statement would be
6282 unable to validate this zone any longer; it would
6283 reply with a SERVFAIL response code. This would
6284 continue until the resolver operator had updated the
6285 <span><strong class="command">trusted-keys</strong></span> statement with the new key.
6288 If, however, the zone were listed in a
6289 <span><strong class="command">managed-keys</strong></span> statement instead, then the
6290 zone owner could add a "stand-by" key to the zone in advance.
6291 <span><strong class="command">named</strong></span> would store the stand-by key, and
6292 when the original key was revoked, <span><strong class="command">named</strong></span>
6293 would be able to transition smoothly to the new key. It would
6294 also recognize that the old key had been revoked, and cease
6295 using that key to validate answers, minimizing the damage that
6296 the compromised key could do.
6299 A <span><strong class="command">managed-keys</strong></span> statement contains a list of
6300 the keys to be managed, along with information about how the
6301 keys are to be initialized for the first time. The only
6302 initialization method currently supported (as of
6303 <acronym class="acronym">BIND</acronym> 9.7.0) is <code class="literal">initial-key</code>.
6304 This means the <span><strong class="command">managed-keys</strong></span> statement must
6305 contain a copy of the initializing key. (Future releases may
6306 allow keys to be initialized by other methods, eliminating this
6310 Consequently, a <span><strong class="command">managed-keys</strong></span> statement
6311 appears similar to a <span><strong class="command">trusted-keys</strong></span>, differing
6312 in the presence of the second field, containing the keyword
6313 <code class="literal">initial-key</code>. The difference is, whereas the
6314 keys listed in a <span><strong class="command">trusted-keys</strong></span> continue to be
6315 trusted until they are removed from
6316 <code class="filename">named.conf</code>, an initializing key listed
6317 in a <span><strong class="command">managed-keys</strong></span> statement is only trusted
6318 <span class="emphasis"><em>once</em></span>: for as long as it takes to load the
6319 managed key database and start the RFC 5011 key maintenance
6323 The first time <span><strong class="command">named</strong></span> runs with a managed key
6324 configured in <code class="filename">named.conf</code>, it fetches the
6325 DNSKEY RRset directly from the zone apex, and validates it
6326 using the key specified in the <span><strong class="command">managed-keys</strong></span>
6327 statement. If the DNSKEY RRset is validly signed, then it is
6328 used as the basis for a new managed keys database.
6331 From that point on, whenever <span><strong class="command">named</strong></span> runs, it
6332 sees the <span><strong class="command">managed-keys</strong></span> statement, checks to
6333 make sure RFC 5011 key maintenance has already been initialized
6334 for the specified domain, and if so, it simply moves on. The
6335 key specified in the <span><strong class="command">managed-keys</strong></span> is not
6336 used to validate answers; it has been superseded by the key or
6337 keys stored in the managed keys database.
6340 The next time <span><strong class="command">named</strong></span> runs after a name
6341 has been <span class="emphasis"><em>removed</em></span> from the
6342 <span><strong class="command">managed-keys</strong></span> statement, the corresponding
6343 zone will be removed from the managed keys database,
6344 and RFC 5011 key maintenance will no longer be used for that
6348 <span><strong class="command">named</strong></span> only maintains a single managed keys
6349 database; consequently, unlike <span><strong class="command">trusted-keys</strong></span>,
6350 <span><strong class="command">managed-keys</strong></span> may only be set at the top
6351 level of <code class="filename">named.conf</code>, not within a view.
6354 In the current implementation, the managed keys database is
6355 stored as a master-format zone file called
6356 <code class="filename">managed-keys.bind</code>. When the key database
6357 is changed, the zone is updated. As with any other dynamic
6358 zone, changes will be written into a journal file,
6359 <code class="filename">managed-keys.bind.jnl</code>. They are committed
6360 to the master file as soon as possible afterward; in the case
6361 of the managed key database, this will usually occur within 30
6362 seconds. So, whenever <span><strong class="command">named</strong></span> is using
6363 automatic key maintenance, those two files can be expected to
6364 exist in the working directory. (For this reason among others,
6365 the working directory should be always be writable by
6366 <span><strong class="command">named</strong></span>.)
6369 If the <span><strong class="command">dnssec-validation</strong></span> option is
6370 set to <strong class="userinput"><code>auto</code></strong>, <span><strong class="command">named</strong></span>
6371 will automatically initialize a managed key for the
6372 root zone. Similarly, if the <span><strong class="command">dnssec-lookaside</strong></span>
6373 option is set to <strong class="userinput"><code>auto</code></strong>,
6374 <span><strong class="command">named</strong></span> will automatically initialize
6375 a managed key for the zone <code class="literal">dlv.isc.org</code>.
6376 In both cases, the key that is used to initialize the key
6377 maintenance process is built into <span><strong class="command">named</strong></span>,
6378 and can be overridden from <span><strong class="command">bindkeys-file</strong></span>.
6381 <div class="sect2" lang="en">
6382 <div class="titlepage"><div><div><h3 class="title">
6383 <a name="view_statement_grammar"></a><span><strong class="command">view</strong></span> Statement Grammar</h3></div></div></div>
6384 <pre class="programlisting"><span><strong class="command">view</strong></span> <em class="replaceable"><code>view_name</code></em>
6385 [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6386 match-clients { <em class="replaceable"><code>address_match_list</code></em> };
6387 match-destinations { <em class="replaceable"><code>address_match_list</code></em> };
6388 match-recursive-only <em class="replaceable"><code>yes_or_no</code></em> ;
6389 [<span class="optional"> <em class="replaceable"><code>view_option</code></em>; ...</span>]
6390 [<span class="optional"> <em class="replaceable"><code>zone_statement</code></em>; ...</span>]
6394 <div class="sect2" lang="en">
6395 <div class="titlepage"><div><div><h3 class="title">
6396 <a name="id2589844"></a><span><strong class="command">view</strong></span> Statement Definition and Usage</h3></div></div></div>
6398 The <span><strong class="command">view</strong></span> statement is a powerful
6400 of <acronym class="acronym">BIND</acronym> 9 that lets a name server
6401 answer a DNS query differently
6402 depending on who is asking. It is particularly useful for
6404 split DNS setups without having to run multiple servers.
6407 Each <span><strong class="command">view</strong></span> statement defines a view
6409 DNS namespace that will be seen by a subset of clients. A client
6411 a view if its source IP address matches the
6412 <code class="varname">address_match_list</code> of the view's
6413 <span><strong class="command">match-clients</strong></span> clause and its
6414 destination IP address matches
6415 the <code class="varname">address_match_list</code> of the
6417 <span><strong class="command">match-destinations</strong></span> clause. If not
6419 <span><strong class="command">match-clients</strong></span> and <span><strong class="command">match-destinations</strong></span>
6420 default to matching all addresses. In addition to checking IP
6422 <span><strong class="command">match-clients</strong></span> and <span><strong class="command">match-destinations</strong></span>
6423 can also take <span><strong class="command">keys</strong></span> which provide an
6425 client to select the view. A view can also be specified
6426 as <span><strong class="command">match-recursive-only</strong></span>, which
6427 means that only recursive
6428 requests from matching clients will match that view.
6429 The order of the <span><strong class="command">view</strong></span> statements is
6431 a client request will be resolved in the context of the first
6432 <span><strong class="command">view</strong></span> that it matches.
6435 Zones defined within a <span><strong class="command">view</strong></span>
6437 only be accessible to clients that match the <span><strong class="command">view</strong></span>.
6438 By defining a zone of the same name in multiple views, different
6439 zone data can be given to different clients, for example,
6441 and "external" clients in a split DNS setup.
6444 Many of the options given in the <span><strong class="command">options</strong></span> statement
6445 can also be used within a <span><strong class="command">view</strong></span>
6447 apply only when resolving queries with that view. When no
6449 value is given, the value in the <span><strong class="command">options</strong></span> statement
6450 is used as a default. Also, zone options can have default values
6452 in the <span><strong class="command">view</strong></span> statement; these
6453 view-specific defaults
6454 take precedence over those in the <span><strong class="command">options</strong></span> statement.
6457 Views are class specific. If no class is given, class IN
6458 is assumed. Note that all non-IN views must contain a hint zone,
6459 since only the IN class has compiled-in default hints.
6462 If there are no <span><strong class="command">view</strong></span> statements in
6464 file, a default view that matches any client is automatically
6466 in class IN. Any <span><strong class="command">zone</strong></span> statements
6468 the top level of the configuration file are considered to be part
6470 this default view, and the <span><strong class="command">options</strong></span>
6472 apply to the default view. If any explicit <span><strong class="command">view</strong></span>
6473 statements are present, all <span><strong class="command">zone</strong></span>
6475 occur inside <span><strong class="command">view</strong></span> statements.
6478 Here is an example of a typical split DNS setup implemented
6479 using <span><strong class="command">view</strong></span> statements:
6481 <pre class="programlisting">view "internal" {
6482 // This should match our internal networks.
6483 match-clients { 10.0.0.0/8; };
6485 // Provide recursive service to internal
6489 // Provide a complete view of the example.com
6490 // zone including addresses of internal hosts.
6491 zone "example.com" {
6493 file "example-internal.db";
6498 // Match all clients not matched by the
6500 match-clients { any; };
6502 // Refuse recursive service to external clients.
6505 // Provide a restricted view of the example.com
6506 // zone containing only publicly accessible hosts.
6507 zone "example.com" {
6509 file "example-external.db";
6514 <div class="sect2" lang="en">
6515 <div class="titlepage"><div><div><h3 class="title">
6516 <a name="zone_statement_grammar"></a><span><strong class="command">zone</strong></span>
6517 Statement Grammar</h3></div></div></div>
6518 <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>] {
6520 [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6521 [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6522 [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6523 [<span class="optional"> allow-update { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6524 [<span class="optional"> update-policy <em class="replaceable"><code>local</code></em> | { <em class="replaceable"><code>update_policy_rule</code></em> [<span class="optional">...</span>] }; </span>]
6525 [<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>] ;
6526 [<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>]
6527 [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6528 [<span class="optional"> check-mx (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6529 [<span class="optional"> check-wildcard <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6530 [<span class="optional"> check-spf ( <em class="replaceable"><code>warn</code></em> | <em class="replaceable"><code>fail</code></em> | <em class="replaceable"><code>ignore</code></em> ); </span>]
6531 [<span class="optional"> check-integrity <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6532 [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
6533 [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
6534 [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
6535 [<span class="optional"> journal <em class="replaceable"><code>string</code></em> ; </span>]
6536 [<span class="optional"> max-journal-size <em class="replaceable"><code>size_spec</code></em>; </span>]
6537 [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
6538 [<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>]
6539 [<span class="optional"> ixfr-base <em class="replaceable"><code>string</code></em> ; </span>]
6540 [<span class="optional"> ixfr-from-differences <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6541 [<span class="optional"> ixfr-tmp-file <em class="replaceable"><code>string</code></em> ; </span>]
6542 [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6543 [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em> ; </span>]
6544 [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em> ; </span>]
6545 [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em> ; </span>]
6546 [<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>]
6547 [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
6548 [<span class="optional"> notify-to-soa <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6549 [<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>]
6550 [<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>]
6551 [<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>]
6552 [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6553 [<span class="optional"> sig-validity-interval <em class="replaceable"><code>number</code></em> [<span class="optional"><em class="replaceable"><code>number</code></em></span>] ; </span>]
6554 [<span class="optional"> sig-signing-nodes <em class="replaceable"><code>number</code></em> ; </span>]
6555 [<span class="optional"> sig-signing-signatures <em class="replaceable"><code>number</code></em> ; </span>]
6556 [<span class="optional"> sig-signing-type <em class="replaceable"><code>number</code></em> ; </span>]
6557 [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
6558 [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6559 [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6560 [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6561 [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6562 [<span class="optional"> key-directory <em class="replaceable"><code>path_name</code></em>; </span>]
6563 [<span class="optional"> auto-dnssec <code class="constant">allow</code>|<code class="constant">maintain</code>|<code class="constant">off</code>; </span>]
6564 [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6567 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6569 [<span class="optional"> allow-notify { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6570 [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6571 [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6572 [<span class="optional"> allow-transfer { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6573 [<span class="optional"> allow-update-forwarding { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6574 [<span class="optional"> update-check-ksk <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6575 [<span class="optional"> dnssec-update-mode ( <em class="replaceable"><code>maintain</code></em> | <em class="replaceable"><code>no-resign</code></em> ); </span>]
6576 [<span class="optional"> dnssec-dnskey-kskonly <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6577 [<span class="optional"> dnssec-secure-to-insecure <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6578 [<span class="optional"> try-tcp-refresh <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6579 [<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>] ;
6580 [<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>]
6581 [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6582 [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
6583 [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
6584 [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
6585 [<span class="optional"> journal <em class="replaceable"><code>string</code></em> ; </span>]
6586 [<span class="optional"> max-journal-size <em class="replaceable"><code>size_spec</code></em>; </span>]
6587 [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
6588 [<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>]
6589 [<span class="optional"> ixfr-base <em class="replaceable"><code>string</code></em> ; </span>]
6590 [<span class="optional"> ixfr-from-differences <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6591 [<span class="optional"> ixfr-tmp-file <em class="replaceable"><code>string</code></em> ; </span>]
6592 [<span class="optional"> maintain-ixfr-base <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6593 [<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>
6594 [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>]
6595 [<span class="optional">key <em class="replaceable"><code>key</code></em></span>] ) ; [<span class="optional">...</span>] }; </span>]
6596 [<span class="optional"> max-ixfr-log-size <em class="replaceable"><code>number</code></em> ; </span>]
6597 [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em> ; </span>]
6598 [<span class="optional"> max-transfer-idle-out <em class="replaceable"><code>number</code></em> ; </span>]
6599 [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em> ; </span>]
6600 [<span class="optional"> max-transfer-time-out <em class="replaceable"><code>number</code></em> ; </span>]
6601 [<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>]
6602 [<span class="optional"> notify-delay <em class="replaceable"><code>seconds</code></em> ; </span>]
6603 [<span class="optional"> notify-to-soa <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6604 [<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>]
6605 [<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>]
6606 [<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>]
6607 [<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>]
6608 [<span class="optional"> alt-transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
6609 [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6610 [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6611 [<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>]
6612 [<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>]
6613 [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6614 [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
6615 [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6616 [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6617 [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6618 [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6619 [<span class="optional"> multi-master <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6620 [<span class="optional"> zero-no-soa-ttl <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6623 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6625 file <em class="replaceable"><code>string</code></em> ;
6626 [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6627 [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>] // Not Implemented.
6630 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6632 [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6633 [<span class="optional"> allow-query-on { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6634 [<span class="optional"> check-names (<code class="constant">warn</code>|<code class="constant">fail</code>|<code class="constant">ignore</code>) ; </span>]
6635 [<span class="optional"> dialup <em class="replaceable"><code>dialup_option</code></em> ; </span>]
6636 [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6637 [<span class="optional"> file <em class="replaceable"><code>string</code></em> ; </span>]
6638 [<span class="optional"> masterfile-format (<code class="constant">text</code>|<code class="constant">raw</code>) ; </span>]
6639 [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
6640 [<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>]
6641 [<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>
6642 [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>]
6643 [<span class="optional">key <em class="replaceable"><code>key</code></em></span>] ) ; [<span class="optional">...</span>] }; </span>]
6644 [<span class="optional"> max-transfer-idle-in <em class="replaceable"><code>number</code></em> ; </span>]
6645 [<span class="optional"> max-transfer-time-in <em class="replaceable"><code>number</code></em> ; </span>]
6646 [<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>]
6647 [<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>]
6648 [<span class="optional"> transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
6649 [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6650 [<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>]
6651 [<span class="optional"> alt-transfer-source-v6 (<em class="replaceable"><code>ip6_addr</code></em> | <code class="constant">*</code>)
6652 [<span class="optional">port <em class="replaceable"><code>ip_port</code></em></span>] ; </span>]
6653 [<span class="optional"> use-alt-transfer-source <em class="replaceable"><code>yes_or_no</code></em>; </span>]
6654 [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6655 [<span class="optional"> database <em class="replaceable"><code>string</code></em> ; </span>]
6656 [<span class="optional"> min-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6657 [<span class="optional"> max-refresh-time <em class="replaceable"><code>number</code></em> ; </span>]
6658 [<span class="optional"> min-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6659 [<span class="optional"> max-retry-time <em class="replaceable"><code>number</code></em> ; </span>]
6660 [<span class="optional"> multi-master <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6663 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6665 [<span class="optional"> allow-query { <em class="replaceable"><code>address_match_list</code></em> }; </span>]
6666 [<span class="optional"> server-addresses { [<span class="optional"> <em class="replaceable"><code>ip_addr</code></em> ; ... </span>] }; </span>]
6667 [<span class="optional"> server-names { [<span class="optional"> <em class="replaceable"><code>namelist</code></em> </span>] }; </span>]
6668 [<span class="optional"> zone-statistics <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6671 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6673 [<span class="optional"> forward (<code class="constant">only</code>|<code class="constant">first</code>) ; </span>]
6674 [<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>]
6675 [<span class="optional"> delegation-only <em class="replaceable"><code>yes_or_no</code></em> ; </span>]
6678 zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em></span>] {
6679 type delegation-only;
6684 <div class="sect2" lang="en">
6685 <div class="titlepage"><div><div><h3 class="title">
6686 <a name="id2591339"></a><span><strong class="command">zone</strong></span> Statement Definition and Usage</h3></div></div></div>
6687 <div class="sect3" lang="en">
6688 <div class="titlepage"><div><div><h4 class="title">
6689 <a name="id2591347"></a>Zone Types</h4></div></div></div>
6690 <div class="informaltable"><table border="1">
6699 <code class="varname">master</code>
6704 The server has a master copy of the data
6705 for the zone and will be able to provide authoritative
6714 <code class="varname">slave</code>
6719 A slave zone is a replica of a master
6720 zone. The <span><strong class="command">masters</strong></span> list
6721 specifies one or more IP addresses
6722 of master servers that the slave contacts to update
6723 its copy of the zone.
6724 Masters list elements can also be names of other
6726 By default, transfers are made from port 53 on the
6728 be changed for all servers by specifying a port number
6730 list of IP addresses, or on a per-server basis after
6732 Authentication to the master can also be done with
6733 per-server TSIG keys.
6734 If a file is specified, then the
6735 replica will be written to this file whenever the zone
6737 and reloaded from this file on a server restart. Use
6739 recommended, since it often speeds server startup and
6741 a needless waste of bandwidth. Note that for large
6743 tens or hundreds of thousands) of zones per server, it
6745 use a two-level naming scheme for zone filenames. For
6747 a slave server for the zone <code class="literal">example.com</code> might place
6748 the zone contents into a file called
6749 <code class="filename">ex/example.com</code> where <code class="filename">ex/</code> is
6750 just the first two letters of the zone name. (Most
6752 behave very slowly if you put 100000 files into
6753 a single directory.)
6760 <code class="varname">stub</code>
6765 A stub zone is similar to a slave zone,
6766 except that it replicates only the NS records of a
6768 of the entire zone. Stub zones are not a standard part
6770 they are a feature specific to the <acronym class="acronym">BIND</acronym> implementation.
6774 Stub zones can be used to eliminate the need for glue
6776 in a parent zone at the expense of maintaining a stub
6778 a set of name server addresses in <code class="filename">named.conf</code>.
6779 This usage is not recommended for new configurations,
6781 supports it only in a limited way.
6782 In <acronym class="acronym">BIND</acronym> 4/8, zone
6783 transfers of a parent zone
6784 included the NS records from stub children of that
6786 that, in some cases, users could get away with
6787 configuring child stubs
6788 only in the master server for the parent zone. <acronym class="acronym">BIND</acronym>
6789 9 never mixes together zone data from different zones
6791 way. Therefore, if a <acronym class="acronym">BIND</acronym> 9 master serving a parent
6792 zone has child stub zones configured, all the slave
6794 parent zone also need to have the same child stub
6800 Stub zones can also be used as a way of forcing the
6802 of a given domain to use a particular set of
6803 authoritative servers.
6804 For example, the caching name servers on a private
6806 RFC1918 addressing may be configured with stub zones
6808 <code class="literal">10.in-addr.arpa</code>
6809 to use a set of internal name servers as the
6811 servers for that domain.
6818 <code class="varname">static-stub</code>
6823 A static-stub zone is similar to a stub zone
6824 with the following exceptions:
6825 the zone data is statically configured, rather
6826 than transferred from a master server;
6827 when recursion is necessary for a query that
6828 matches a static-stub zone, the locally
6829 configured data (nameserver names and glue addresses)
6830 is always used even if different authoritative
6831 information is cached.
6834 Zone data is configured via the
6835 <span><strong class="command">server-addresses</strong></span> and
6836 <span><strong class="command">server-names</strong></span> zone options.
6839 The zone data is maintained in the form of NS
6840 and (if necessary) glue A or AAAA RRs
6841 internally, which can be seen by dumping zone
6842 databases by <span><strong class="command">rndc dumpdb -all</strong></span>.
6843 The configured RRs are considered local configuration
6844 parameters rather than public data.
6845 Non recursive queries (i.e., those with the RD
6846 bit off) to a static-stub zone are therefore
6847 prohibited and will be responded with REFUSED.
6850 Since the data is statically configured, no
6851 zone maintenance action takes place for a static-stub
6853 For example, there is no periodic refresh
6854 attempt, and an incoming notify message
6855 will be rejected with an rcode of NOTAUTH.
6858 Each static-stub zone is configured with
6859 internally generated NS and (if necessary)
6867 <code class="varname">forward</code>
6872 A "forward zone" is a way to configure
6873 forwarding on a per-domain basis. A <span><strong class="command">zone</strong></span> statement
6874 of type <span><strong class="command">forward</strong></span> can
6875 contain a <span><strong class="command">forward</strong></span>
6876 and/or <span><strong class="command">forwarders</strong></span>
6878 which will apply to queries within the domain given by
6880 name. If no <span><strong class="command">forwarders</strong></span>
6881 statement is present or
6882 an empty list for <span><strong class="command">forwarders</strong></span> is given, then no
6883 forwarding will be done for the domain, canceling the
6885 any forwarders in the <span><strong class="command">options</strong></span> statement. Thus
6886 if you want to use this type of zone to change the
6888 global <span><strong class="command">forward</strong></span> option
6889 (that is, "forward first"
6890 to, then "forward only", or vice versa, but want to
6892 servers as set globally) you need to re-specify the
6900 <code class="varname">hint</code>
6905 The initial set of root name servers is
6906 specified using a "hint zone". When the server starts
6908 the root hints to find a root name server and get the
6910 list of root name servers. If no hint zone is
6912 IN, the server uses a compiled-in default set of root
6914 Classes other than IN have no built-in defaults hints.
6921 <code class="varname">delegation-only</code>
6926 This is used to enforce the delegation-only
6927 status of infrastructure zones (e.g. COM,
6928 NET, ORG). Any answer that is received
6929 without an explicit or implicit delegation
6930 in the authority section will be treated
6931 as NXDOMAIN. This does not apply to the
6932 zone apex. This should not be applied to
6936 <code class="varname">delegation-only</code> has no
6937 effect on answers received from forwarders.
6940 See caveats in <a href="Bv9ARM.ch06.html#root_delegation_only"><span><strong class="command">root-delegation-only</strong></span></a>.
6947 <div class="sect3" lang="en">
6948 <div class="titlepage"><div><div><h4 class="title">
6949 <a name="id2591892"></a>Class</h4></div></div></div>
6951 The zone's name may optionally be followed by a class. If
6952 a class is not specified, class <code class="literal">IN</code> (for <code class="varname">Internet</code>),
6953 is assumed. This is correct for the vast majority of cases.
6956 The <code class="literal">hesiod</code> class is
6957 named for an information service from MIT's Project Athena. It
6959 used to share information about various systems databases, such
6960 as users, groups, printers and so on. The keyword
6961 <code class="literal">HS</code> is
6962 a synonym for hesiod.
6965 Another MIT development is Chaosnet, a LAN protocol created
6966 in the mid-1970s. Zone data for it can be specified with the <code class="literal">CHAOS</code> class.
6969 <div class="sect3" lang="en">
6970 <div class="titlepage"><div><div><h4 class="title">
6971 <a name="id2591925"></a>Zone Options</h4></div></div></div>
6972 <div class="variablelist"><dl>
6973 <dt><span class="term"><span><strong class="command">allow-notify</strong></span></span></dt>
6975 See the description of
6976 <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>.
6978 <dt><span class="term"><span><strong class="command">allow-query</strong></span></span></dt>
6980 See the description of
6981 <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>.
6983 <dt><span class="term"><span><strong class="command">allow-query-on</strong></span></span></dt>
6985 See the description of
6986 <span><strong class="command">allow-query-on</strong></span> in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called “Access Control”</a>.
6988 <dt><span class="term"><span><strong class="command">allow-transfer</strong></span></span></dt>
6990 See the description of <span><strong class="command">allow-transfer</strong></span>
6991 in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called “Access Control”</a>.
6993 <dt><span class="term"><span><strong class="command">allow-update</strong></span></span></dt>
6995 See the description of <span><strong class="command">allow-update</strong></span>
6996 in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called “Access Control”</a>.
6998 <dt><span class="term"><span><strong class="command">update-policy</strong></span></span></dt>
7000 Specifies a "Simple Secure Update" policy. See
7001 <a href="Bv9ARM.ch06.html#dynamic_update_policies" title="Dynamic Update Policies">the section called “Dynamic Update Policies”</a>.
7003 <dt><span class="term"><span><strong class="command">allow-update-forwarding</strong></span></span></dt>
7005 See the description of <span><strong class="command">allow-update-forwarding</strong></span>
7006 in <a href="Bv9ARM.ch06.html#access_control" title="Access Control">the section called “Access Control”</a>.
7008 <dt><span class="term"><span><strong class="command">also-notify</strong></span></span></dt>
7010 Only meaningful if <span><strong class="command">notify</strong></span>
7012 active for this zone. The set of machines that will
7014 <code class="literal">DNS NOTIFY</code> message
7015 for this zone is made up of all the listed name servers
7017 the primary master) for the zone plus any IP addresses
7019 with <span><strong class="command">also-notify</strong></span>. A port
7021 with each <span><strong class="command">also-notify</strong></span>
7022 address to send the notify
7023 messages to a port other than the default of 53.
7024 <span><strong class="command">also-notify</strong></span> is not
7025 meaningful for stub zones.
7026 The default is the empty list.
7028 <dt><span class="term"><span><strong class="command">check-names</strong></span></span></dt>
7030 This option is used to restrict the character set and
7032 certain domain names in master files and/or DNS responses
7034 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>
7035 zones the default is <span><strong class="command">warn</strong></span>.
7036 It is not implemented for <span><strong class="command">hint</strong></span> zones.
7038 <dt><span class="term"><span><strong class="command">check-mx</strong></span></span></dt>
7040 See the description of
7041 <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>.
7043 <dt><span class="term"><span><strong class="command">check-spf</strong></span></span></dt>
7045 See the description of
7046 <span><strong class="command">check-spf</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called “Boolean Options”</a>.
7048 <dt><span class="term"><span><strong class="command">check-wildcard</strong></span></span></dt>
7050 See the description of
7051 <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>.
7053 <dt><span class="term"><span><strong class="command">check-integrity</strong></span></span></dt>
7055 See the description of
7056 <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>.
7058 <dt><span class="term"><span><strong class="command">check-sibling</strong></span></span></dt>
7060 See the description of
7061 <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>.
7063 <dt><span class="term"><span><strong class="command">zero-no-soa-ttl</strong></span></span></dt>
7065 See the description of
7066 <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>.
7068 <dt><span class="term"><span><strong class="command">update-check-ksk</strong></span></span></dt>
7070 See the description of
7071 <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>.
7073 <dt><span class="term"><span><strong class="command">dnssec-dnskey-kskonly</strong></span></span></dt>
7075 See the description of
7076 <span><strong class="command">dnssec-dnskey-kskonly</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called “Boolean Options”</a>.
7078 <dt><span class="term"><span><strong class="command">try-tcp-refresh</strong></span></span></dt>
7080 See the description of
7081 <span><strong class="command">try-tcp-refresh</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called “Boolean Options”</a>.
7083 <dt><span class="term"><span><strong class="command">database</strong></span></span></dt>
7086 Specify the type of database to be used for storing the
7087 zone data. The string following the <span><strong class="command">database</strong></span> keyword
7088 is interpreted as a list of whitespace-delimited words.
7090 identifies the database type, and any subsequent words are
7092 as arguments to the database to be interpreted in a way
7094 to the database type.
7097 The default is <strong class="userinput"><code>"rbt"</code></strong>, BIND 9's
7099 red-black-tree database. This database does not take
7103 Other values are possible if additional database drivers
7104 have been linked into the server. Some sample drivers are
7106 with the distribution but none are linked in by default.
7109 <dt><span class="term"><span><strong class="command">dialup</strong></span></span></dt>
7111 See the description of
7112 <span><strong class="command">dialup</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called “Boolean Options”</a>.
7114 <dt><span class="term"><span><strong class="command">delegation-only</strong></span></span></dt>
7117 The flag only applies to hint and stub zones. If set
7118 to <strong class="userinput"><code>yes</code></strong>, then the zone will also be
7119 treated as if it is also a delegation-only type zone.
7122 See caveats in <a href="Bv9ARM.ch06.html#root_delegation_only"><span><strong class="command">root-delegation-only</strong></span></a>.
7125 <dt><span class="term"><span><strong class="command">forward</strong></span></span></dt>
7127 Only meaningful if the zone has a forwarders
7128 list. The <span><strong class="command">only</strong></span> value causes
7130 after trying the forwarders and getting no answer, while <span><strong class="command">first</strong></span> would
7131 allow a normal lookup to be tried.
7133 <dt><span class="term"><span><strong class="command">forwarders</strong></span></span></dt>
7135 Used to override the list of global forwarders.
7136 If it is not specified in a zone of type <span><strong class="command">forward</strong></span>,
7137 no forwarding is done for the zone and the global options are
7140 <dt><span class="term"><span><strong class="command">ixfr-base</strong></span></span></dt>
7142 Was used in <acronym class="acronym">BIND</acronym> 8 to
7144 of the transaction log (journal) file for dynamic update
7146 <acronym class="acronym">BIND</acronym> 9 ignores the option
7147 and constructs the name of the journal
7148 file by appending "<code class="filename">.jnl</code>"
7152 <dt><span class="term"><span><strong class="command">ixfr-tmp-file</strong></span></span></dt>
7154 Was an undocumented option in <acronym class="acronym">BIND</acronym> 8.
7155 Ignored in <acronym class="acronym">BIND</acronym> 9.
7157 <dt><span class="term"><span><strong class="command">journal</strong></span></span></dt>
7159 Allow the default journal's filename to be overridden.
7160 The default is the zone's filename with "<code class="filename">.jnl</code>" appended.
7161 This is applicable to <span><strong class="command">master</strong></span> and <span><strong class="command">slave</strong></span> zones.
7163 <dt><span class="term"><span><strong class="command">max-journal-size</strong></span></span></dt>
7165 See the description of
7166 <span><strong class="command">max-journal-size</strong></span> in <a href="Bv9ARM.ch06.html#server_resource_limits" title="Server Resource Limits">the section called “Server Resource Limits”</a>.
7168 <dt><span class="term"><span><strong class="command">max-transfer-time-in</strong></span></span></dt>
7170 See the description of
7171 <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>.
7173 <dt><span class="term"><span><strong class="command">max-transfer-idle-in</strong></span></span></dt>
7175 See the description of
7176 <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>.
7178 <dt><span class="term"><span><strong class="command">max-transfer-time-out</strong></span></span></dt>
7180 See the description of
7181 <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>.
7183 <dt><span class="term"><span><strong class="command">max-transfer-idle-out</strong></span></span></dt>
7185 See the description of
7186 <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>.
7188 <dt><span class="term"><span><strong class="command">notify</strong></span></span></dt>
7190 See the description of
7191 <span><strong class="command">notify</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called “Boolean Options”</a>.
7193 <dt><span class="term"><span><strong class="command">notify-delay</strong></span></span></dt>
7195 See the description of
7196 <span><strong class="command">notify-delay</strong></span> in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called “Tuning”</a>.
7198 <dt><span class="term"><span><strong class="command">notify-to-soa</strong></span></span></dt>
7200 See the description of
7201 <span><strong class="command">notify-to-soa</strong></span> in
7202 <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called “Boolean Options”</a>.
7204 <dt><span class="term"><span><strong class="command">pubkey</strong></span></span></dt>
7206 In <acronym class="acronym">BIND</acronym> 8, this option was
7207 intended for specifying
7208 a public zone key for verification of signatures in DNSSEC
7210 zones when they are loaded from disk. <acronym class="acronym">BIND</acronym> 9 does not verify signatures
7211 on load and ignores the option.
7213 <dt><span class="term"><span><strong class="command">zone-statistics</strong></span></span></dt>
7215 If <strong class="userinput"><code>yes</code></strong>, the server will keep
7217 information for this zone, which can be dumped to the
7218 <span><strong class="command">statistics-file</strong></span> defined in
7221 <dt><span class="term"><span><strong class="command">server-addresses</strong></span></span></dt>
7224 Only meaningful for static-stub zones.
7225 This is a list of IP addresses to which queries
7226 should be sent in recursive resolution for the
7228 A non empty list for this option will internally
7229 configure the apex NS RR with associated glue A or
7233 For example, if "example.com" is configured as a
7234 static-stub zone with 192.0.2.1 and 2001:db8::1234
7235 in a <span><strong class="command">server-addresses</strong></span> option,
7236 the following RRs will be internally configured.
7238 <pre class="programlisting">example.com. NS example.com.
7239 example.com. A 192.0.2.1
7240 example.com. AAAA 2001:db8::1234</pre>
7242 These records are internally used to resolve
7243 names under the static-stub zone.
7244 For instance, if the server receives a query for
7245 "www.example.com" with the RD bit on, the server
7246 will initiate recursive resolution and send
7247 queries to 192.0.2.1 and/or 2001:db8::1234.
7250 <dt><span class="term"><span><strong class="command">server-names</strong></span></span></dt>
7253 Only meaningful for static-stub zones.
7254 This is a list of domain names of nameservers that
7255 act as authoritative servers of the static-stub
7257 These names will be resolved to IP addresses when
7258 <span><strong class="command">named</strong></span> needs to send queries to
7260 To make this supplemental resolution successful,
7261 these names must not be a subdomain of the origin
7262 name of static-stub zone.
7263 That is, when "example.net" is the origin of a
7264 static-stub zone, "ns.example" and
7265 "master.example.com" can be specified in the
7266 <span><strong class="command">server-names</strong></span> option, but
7267 "ns.example.net" cannot, and will be rejected by
7268 the configuration parser.
7271 A non empty list for this option will internally
7272 configure the apex NS RR with the specified names.
7273 For example, if "example.com" is configured as a
7274 static-stub zone with "ns1.example.net" and
7276 in a <span><strong class="command">server-names</strong></span> option,
7277 the following RRs will be internally configured.
7279 <pre class="programlisting">example.com. NS ns1.example.net.
7280 example.com. NS ns2.example.net.
7283 These records are internally used to resolve
7284 names under the static-stub zone.
7285 For instance, if the server receives a query for
7286 "www.example.com" with the RD bit on, the server
7287 initiate recursive resolution,
7288 resolve "ns1.example.net" and/or
7289 "ns2.example.net" to IP addresses, and then send
7290 queries to (one or more of) these addresses.
7293 <dt><span class="term"><span><strong class="command">sig-validity-interval</strong></span></span></dt>
7295 See the description of
7296 <span><strong class="command">sig-validity-interval</strong></span> in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called “Tuning”</a>.
7298 <dt><span class="term"><span><strong class="command">sig-signing-nodes</strong></span></span></dt>
7300 See the description of
7301 <span><strong class="command">sig-signing-nodes</strong></span> in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called “Tuning”</a>.
7303 <dt><span class="term"><span><strong class="command">sig-signing-signatures</strong></span></span></dt>
7305 See the description of
7306 <span><strong class="command">sig-signing-signatures</strong></span> in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called “Tuning”</a>.
7308 <dt><span class="term"><span><strong class="command">sig-signing-type</strong></span></span></dt>
7310 See the description of
7311 <span><strong class="command">sig-signing-type</strong></span> in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called “Tuning”</a>.
7313 <dt><span class="term"><span><strong class="command">transfer-source</strong></span></span></dt>
7315 See the description of
7316 <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>.
7318 <dt><span class="term"><span><strong class="command">transfer-source-v6</strong></span></span></dt>
7320 See the description of
7321 <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>.
7323 <dt><span class="term"><span><strong class="command">alt-transfer-source</strong></span></span></dt>
7325 See the description of
7326 <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>.
7328 <dt><span class="term"><span><strong class="command">alt-transfer-source-v6</strong></span></span></dt>
7330 See the description of
7331 <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>.
7333 <dt><span class="term"><span><strong class="command">use-alt-transfer-source</strong></span></span></dt>
7335 See the description of
7336 <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>.
7338 <dt><span class="term"><span><strong class="command">notify-source</strong></span></span></dt>
7340 See the description of
7341 <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>.
7343 <dt><span class="term"><span><strong class="command">notify-source-v6</strong></span></span></dt>
7345 See the description of
7346 <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>.
7349 <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>
7352 See the description in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called “Tuning”</a>.
7354 <dt><span class="term"><span><strong class="command">ixfr-from-differences</strong></span></span></dt>
7356 See the description of
7357 <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>.
7358 (Note that the <span><strong class="command">ixfr-from-differences</strong></span>
7359 <strong class="userinput"><code>master</code></strong> and
7360 <strong class="userinput"><code>slave</code></strong> choices are not
7361 available at the zone level.)
7363 <dt><span class="term"><span><strong class="command">key-directory</strong></span></span></dt>
7365 See the description of
7366 <span><strong class="command">key-directory</strong></span> in <a href="Bv9ARM.ch06.html#options" title="options Statement Definition and
7367 Usage">the section called “<span><strong class="command">options</strong></span> Statement Definition and
7370 <dt><span class="term"><span><strong class="command">auto-dnssec</strong></span></span></dt>
7373 Zones configured for dynamic DNS may also use this
7374 option to allow varying levels of automatic DNSSEC key
7375 management. There are three possible settings:
7378 <span><strong class="command">auto-dnssec allow;</strong></span> permits
7379 keys to be updated and the zone fully re-signed
7380 whenever the user issues the command <span><strong class="command">rndc sign
7381 <em class="replaceable"><code>zonename</code></em></strong></span>.
7384 <span><strong class="command">auto-dnssec maintain;</strong></span> includes the
7385 above, but also automatically adjusts the zone's DNSSEC
7386 keys on schedule, according to the keys' timing metadata
7387 (see <a href="man.dnssec-keygen.html" title="dnssec-keygen"><span class="refentrytitle"><span class="application">dnssec-keygen</span></span>(8)</a> and
7388 <a href="man.dnssec-settime.html" title="dnssec-settime"><span class="refentrytitle"><span class="application">dnssec-settime</span></span>(8)</a>). The command
7389 <span><strong class="command">rndc sign
7390 <em class="replaceable"><code>zonename</code></em></strong></span> causes
7391 <span><strong class="command">named</strong></span> to load keys from the key
7392 repository and sign the zone with all keys that are
7394 <span><strong class="command">rndc loadkeys
7395 <em class="replaceable"><code>zonename</code></em></strong></span> causes
7396 <span><strong class="command">named</strong></span> to load keys from the key
7397 repository and schedule key maintenance events to occur
7398 in the future, but it does not sign the full zone
7399 immediately. Note: once keys have been loaded for a
7400 zone the first time, the repository will be searched
7401 for changes periodically, regardless of whether
7402 <span><strong class="command">rndc loadkeys</strong></span> is used. The recheck
7403 interval is hard-coded to
7407 <span><strong class="command">auto-dnssec create;</strong></span> includes the
7408 above, but also allows <span><strong class="command">named</strong></span>
7409 to create new keys in the key repository when needed.
7410 (NOTE: This option is not yet implemented; the syntax is
7411 being reserved for future use.)
7414 The default setting is <span><strong class="command">auto-dnssec off</strong></span>.
7417 <dt><span class="term"><span><strong class="command">multi-master</strong></span></span></dt>
7419 See the description of <span><strong class="command">multi-master</strong></span> in
7420 <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called “Boolean Options”</a>.
7422 <dt><span class="term"><span><strong class="command">masterfile-format</strong></span></span></dt>
7424 See the description of <span><strong class="command">masterfile-format</strong></span>
7425 in <a href="Bv9ARM.ch06.html#tuning" title="Tuning">the section called “Tuning”</a>.
7427 <dt><span class="term"><span><strong class="command">dnssec-secure-to-insecure</strong></span></span></dt>
7429 See the description of
7430 <span><strong class="command">dnssec-secure-to-insecure</strong></span> in <a href="Bv9ARM.ch06.html#boolean_options" title="Boolean Options">the section called “Boolean Options”</a>.
7434 <div class="sect3" lang="en">
7435 <div class="titlepage"><div><div><h4 class="title">
7436 <a name="dynamic_update_policies"></a>Dynamic Update Policies</h4></div></div></div>
7437 <p><acronym class="acronym">BIND</acronym> 9 supports two alternative
7438 methods of granting clients the right to perform
7439 dynamic updates to a zone, configured by the
7440 <span><strong class="command">allow-update</strong></span> and
7441 <span><strong class="command">update-policy</strong></span> option, respectively.
7444 The <span><strong class="command">allow-update</strong></span> clause works the
7445 same way as in previous versions of <acronym class="acronym">BIND</acronym>.
7446 It grants given clients the permission to update any
7447 record of any name in the zone.
7450 The <span><strong class="command">update-policy</strong></span> clause
7451 allows more fine-grained control over what updates are
7452 allowed. A set of rules is specified, where each rule
7453 either grants or denies permissions for one or more
7454 names to be updated by one or more identities. If
7455 the dynamic update request message is signed (that is,
7456 it includes either a TSIG or SIG(0) record), the
7457 identity of the signer can be determined.
7460 Rules are specified in the <span><strong class="command">update-policy</strong></span>
7461 zone option, and are only meaningful for master zones.
7462 When the <span><strong class="command">update-policy</strong></span> statement
7463 is present, it is a configuration error for the
7464 <span><strong class="command">allow-update</strong></span> statement to be
7465 present. The <span><strong class="command">update-policy</strong></span> statement
7466 only examines the signer of a message; the source
7467 address is not relevant.
7470 There is a pre-defined <span><strong class="command">update-policy</strong></span>
7471 rule which can be switched on with the command
7472 <span><strong class="command">update-policy local;</strong></span>.
7473 Switching on this rule in a zone causes
7474 <span><strong class="command">named</strong></span> to generate a TSIG session
7475 key and place it in a file, and to allow that key
7476 to update the zone. (By default, the file is
7477 <code class="filename">/var/run/named/session.key</code>, the key
7478 name is "local-ddns" and the key algorithm is HMAC-SHA256,
7479 but these values are configurable with the
7480 <span><strong class="command">session-keyfile</strong></span>,
7481 <span><strong class="command">session-keyname</strong></span> and
7482 <span><strong class="command">session-keyalg</strong></span> options, respectively).
7485 A client running on the local system, and with appropriate
7486 permissions, may read that file and use the key to sign update
7487 requests. The zone's update policy will be set to allow that
7488 key to change any record within the zone. Assuming the
7489 key name is "local-ddns", this policy is equivalent to:
7491 <pre class="programlisting">update-policy { grant local-ddns zonesub any; };
7494 The command <span><strong class="command">nsupdate -l</strong></span> sends update
7495 requests to localhost, and signs them using the session key.
7498 Other rule definitions look like this:
7500 <pre class="programlisting">
7501 ( <span><strong class="command">grant</strong></span> | <span><strong class="command">deny</strong></span> ) <em class="replaceable"><code>identity</code></em> <em class="replaceable"><code>nametype</code></em> [<span class="optional"> <em class="replaceable"><code>name</code></em> </span>] [<span class="optional"> <em class="replaceable"><code>types</code></em> </span>]
7504 Each rule grants or denies privileges. Once a message has
7505 successfully matched a rule, the operation is immediately
7506 granted or denied and no further rules are examined. A rule
7507 is matched when the signer matches the identity field, the
7508 name matches the name field in accordance with the nametype
7509 field, and the type matches the types specified in the type
7513 No signer is required for <em class="replaceable"><code>tcp-self</code></em>
7514 or <em class="replaceable"><code>6to4-self</code></em> however the standard
7515 reverse mapping / prefix conversion must match the identity
7519 The identity field specifies a name or a wildcard
7520 name. Normally, this is the name of the TSIG or
7521 SIG(0) key used to sign the update request. When a
7522 TKEY exchange has been used to create a shared secret,
7523 the identity of the shared secret is the same as the
7524 identity of the key used to authenticate the TKEY
7525 exchange. TKEY is also the negotiation method used
7526 by GSS-TSIG, which establishes an identity that is
7527 the Kerberos principal of the client, such as
7528 <strong class="userinput"><code>"user@host.domain"</code></strong>. When the
7529 <em class="replaceable"><code>identity</code></em> field specifies
7530 a wildcard name, it is subject to DNS wildcard
7531 expansion, so the rule will apply to multiple identities.
7532 The <em class="replaceable"><code>identity</code></em> field must
7533 contain a fully-qualified domain name.
7536 For nametypes <code class="varname">krb5-self</code>,
7537 <code class="varname">ms-self</code>, <code class="varname">krb5-subdomain</code>,
7538 and <code class="varname">ms-subdomain</code> the
7539 <em class="replaceable"><code>identity</code></em> field specifies
7540 the Windows or Kerberos realm of the machine belongs to.
7543 The <em class="replaceable"><code>nametype</code></em> field has 13
7545 <code class="varname">name</code>, <code class="varname">subdomain</code>,
7546 <code class="varname">wildcard</code>, <code class="varname">self</code>,
7547 <code class="varname">selfsub</code>, <code class="varname">selfwild</code>,
7548 <code class="varname">krb5-self</code>, <code class="varname">ms-self</code>,
7549 <code class="varname">krb5-subdomain</code>,
7550 <code class="varname">ms-subdomain</code>,
7551 <code class="varname">tcp-self</code>, <code class="varname">6to4-self</code>,
7552 <code class="varname">zonesub</code>, and <code class="varname">external</code>.
7554 <div class="informaltable"><table border="1">
7563 <code class="varname">name</code>
7568 Exact-match semantics. This rule matches
7569 when the name being updated is identical
7570 to the contents of the
7571 <em class="replaceable"><code>name</code></em> field.
7578 <code class="varname">subdomain</code>
7583 This rule matches when the name being updated
7584 is a subdomain of, or identical to, the
7585 contents of the <em class="replaceable"><code>name</code></em>
7593 <code class="varname">zonesub</code>
7598 This rule is similar to subdomain, except that
7599 it matches when the name being updated is a
7600 subdomain of the zone in which the
7601 <span><strong class="command">update-policy</strong></span> statement
7602 appears. This obviates the need to type the zone
7603 name twice, and enables the use of a standard
7604 <span><strong class="command">update-policy</strong></span> statement in
7605 multiple zones without modification.
7608 When this rule is used, the
7609 <em class="replaceable"><code>name</code></em> field is omitted.
7616 <code class="varname">wildcard</code>
7621 The <em class="replaceable"><code>name</code></em> field
7622 is subject to DNS wildcard expansion, and
7623 this rule matches when the name being updated
7624 name is a valid expansion of the wildcard.
7631 <code class="varname">self</code>
7636 This rule matches when the name being updated
7637 matches the contents of the
7638 <em class="replaceable"><code>identity</code></em> field.
7639 The <em class="replaceable"><code>name</code></em> field
7640 is ignored, but should be the same as the
7641 <em class="replaceable"><code>identity</code></em> field.
7642 The <code class="varname">self</code> nametype is
7643 most useful when allowing using one key per
7644 name to update, where the key has the same
7645 name as the name to be updated. The
7646 <em class="replaceable"><code>identity</code></em> would
7647 be specified as <code class="constant">*</code> (an asterisk) in
7655 <code class="varname">selfsub</code>
7660 This rule is similar to <code class="varname">self</code>
7661 except that subdomains of <code class="varname">self</code>
7662 can also be updated.
7669 <code class="varname">selfwild</code>
7674 This rule is similar to <code class="varname">self</code>
7675 except that only subdomains of
7676 <code class="varname">self</code> can be updated.
7683 <code class="varname">ms-self</code>
7688 This rule takes a Windows machine principal
7689 (machine$@REALM) for machine in REALM and
7690 and converts it machine.realm allowing the machine
7691 to update machine.realm. The REALM to be matched
7692 is specified in the <em class="replaceable"><code>identity</code></em>
7700 <code class="varname">ms-subdomain</code>
7705 This rule takes a Windows machine principal
7706 (machine$@REALM) for machine in REALM and
7707 converts it to machine.realm allowing the machine
7708 to update subdomains of machine.realm. The REALM
7709 to be matched is specified in the
7710 <em class="replaceable"><code>identity</code></em> field.
7717 <code class="varname">krb5-self</code>
7722 This rule takes a Kerberos machine principal
7723 (host/machine@REALM) for machine in REALM and
7724 and converts it machine.realm allowing the machine
7725 to update machine.realm. The REALM to be matched
7726 is specified in the <em class="replaceable"><code>identity</code></em>
7734 <code class="varname">krb5-subdomain</code>
7739 This rule takes a Kerberos machine principal
7740 (host/machine@REALM) for machine in REALM and
7741 converts it to machine.realm allowing the machine
7742 to update subdomains of machine.realm. The REALM
7743 to be matched is specified in the
7744 <em class="replaceable"><code>identity</code></em> field.
7751 <code class="varname">tcp-self</code>
7756 Allow updates that have been sent via TCP and
7757 for which the standard mapping from the initiating
7758 IP address into the IN-ADDR.ARPA and IP6.ARPA
7759 namespaces match the name to be updated.
7761 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
7762 <h3 class="title">Note</h3>
7763 It is theoretically possible to spoof these TCP
7771 <code class="varname">6to4-self</code>
7776 Allow the 6to4 prefix to be update by any TCP
7777 connection from the 6to4 network or from the
7778 corresponding IPv4 address. This is intended
7779 to allow NS or DNAME RRsets to be added to the
7782 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
7783 <h3 class="title">Note</h3>
7784 It is theoretically possible to spoof these TCP
7792 <code class="varname">external</code>
7797 This rule allows <span><strong class="command">named</strong></span>
7798 to defer the decision of whether to allow a
7799 given update to an external daemon.
7802 The method of communicating with the daemon is
7803 specified in the <em class="replaceable"><code>identity</code></em>
7804 field, the format of which is
7805 "<code class="constant">local:</code><em class="replaceable"><code>path</code></em>",
7806 where <em class="replaceable"><code>path</code></em> is the location
7807 of a UNIX-domain socket. (Currently, "local" is the
7808 only supported mechanism.)
7811 Requests to the external daemon are sent over the
7812 UNIX-domain socket as datagrams with the following
7815 <pre class="programlisting">
7816 Protocol version number (4 bytes, network byte order, currently 1)
7817 Request length (4 bytes, network byte order)
7818 Signer (null-terminated string)
7819 Name (null-terminated string)
7820 TCP source address (null-terminated string)
7821 Rdata type (null-terminated string)
7822 Key (null-terminated string)
7823 TKEY token length (4 bytes, network byte order)
7824 TKEY token (remainder of packet)</pre>
7826 The daemon replies with a four-byte value in
7827 network byte order, containing either 0 or 1; 0
7828 indicates that the specified update is not
7829 permitted, and 1 indicates that it is.
7836 In all cases, the <em class="replaceable"><code>name</code></em>
7837 field must specify a fully-qualified domain name.
7840 If no types are explicitly specified, this rule matches
7841 all types except RRSIG, NS, SOA, NSEC and NSEC3. Types
7842 may be specified by name, including "ANY" (ANY matches
7843 all types except NSEC and NSEC3, which can never be
7844 updated). Note that when an attempt is made to delete
7845 all records associated with a name, the rules are
7846 checked for each existing record type.
7851 <div class="sect1" lang="en">
7852 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
7853 <a name="id2594764"></a>Zone File</h2></div></div></div>
7854 <div class="sect2" lang="en">
7855 <div class="titlepage"><div><div><h3 class="title">
7856 <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>
7858 This section, largely borrowed from RFC 1034, describes the
7859 concept of a Resource Record (RR) and explains when each is used.
7860 Since the publication of RFC 1034, several new RRs have been
7862 and implemented in the DNS. These are also included.
7864 <div class="sect3" lang="en">
7865 <div class="titlepage"><div><div><h4 class="title">
7866 <a name="id2594782"></a>Resource Records</h4></div></div></div>
7868 A domain name identifies a node. Each node has a set of
7869 resource information, which may be empty. The set of resource
7870 information associated with a particular name is composed of
7871 separate RRs. The order of RRs in a set is not significant and
7872 need not be preserved by name servers, resolvers, or other
7873 parts of the DNS. However, sorting of multiple RRs is
7874 permitted for optimization purposes, for example, to specify
7875 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>.
7878 The components of a Resource Record are:
7880 <div class="informaltable"><table border="1">
7894 The domain name where the RR is found.
7906 An encoded 16-bit value that specifies
7907 the type of the resource record.
7919 The time-to-live of the RR. This field
7920 is a 32-bit integer in units of seconds, and is
7922 resolvers when they cache RRs. The TTL describes how
7924 be cached before it should be discarded.
7936 An encoded 16-bit value that identifies
7937 a protocol family or instance of a protocol.
7949 The resource data. The format of the
7950 data is type (and sometimes class) specific.
7957 The following are <span class="emphasis"><em>types</em></span> of valid RRs:
7959 <div class="informaltable"><table border="1">
7973 A host address. In the IN class, this is a
7974 32-bit IP address. Described in RFC 1035.
7986 IPv6 address. Described in RFC 1886.
7998 IPv6 address. This can be a partial
7999 address (a suffix) and an indirection to the name
8000 where the rest of the
8001 address (the prefix) can be found. Experimental.
8002 Described in RFC 2874.
8014 Location of AFS database servers.
8015 Experimental. Described in RFC 1183.
8027 Address prefix list. Experimental.
8028 Described in RFC 3123.
8040 Holds a digital certificate.
8041 Described in RFC 2538.
8053 Identifies the canonical name of an alias.
8054 Described in RFC 1035.
8066 Is used for identifying which DHCP client is
8067 associated with this name. Described in RFC 4701.
8079 Replaces the domain name specified with
8080 another name to be looked up, effectively aliasing an
8082 subtree of the domain name space rather than a single
8084 as in the case of the CNAME RR.
8085 Described in RFC 2672.
8097 Stores a public key associated with a signed
8098 DNS zone. Described in RFC 4034.
8110 Stores the hash of a public key associated with a
8111 signed DNS zone. Described in RFC 4034.
8123 Specifies the global position. Superseded by LOC.
8135 Identifies the CPU and OS used by a host.
8136 Described in RFC 1035.
8148 Provides a method for storing IPsec keying material in
8149 DNS. Described in RFC 4025.
8161 Representation of ISDN addresses.
8162 Experimental. Described in RFC 1183.
8174 Stores a public key associated with a
8175 DNS name. Used in original DNSSEC; replaced
8176 by DNSKEY in DNSSECbis, but still used with
8177 SIG(0). Described in RFCs 2535 and 2931.
8189 Identifies a key exchanger for this
8190 DNS name. Described in RFC 2230.
8202 For storing GPS info. Described in RFC 1876.
8215 Identifies a mail exchange for the domain with
8216 a 16-bit preference value (lower is better)
8217 followed by the host name of the mail exchange.
8218 Described in RFC 974, RFC 1035.
8230 Name authority pointer. Described in RFC 2915.
8242 A network service access point.
8243 Described in RFC 1706.
8255 The authoritative name server for the
8256 domain. Described in RFC 1035.
8268 Used in DNSSECbis to securely indicate that
8269 RRs with an owner name in a certain name interval do
8271 a zone and indicate what RR types are present for an
8273 Described in RFC 4034.
8285 Used in DNSSECbis to securely indicate that
8286 RRs with an owner name in a certain name
8287 interval do not exist in a zone and indicate
8288 what RR types are present for an existing
8289 name. NSEC3 differs from NSEC in that it
8290 prevents zone enumeration but is more
8291 computationally expensive on both the server
8292 and the client than NSEC. Described in RFC
8305 Used in DNSSECbis to tell the authoritative
8306 server which NSEC3 chains are available to use.
8307 Described in RFC 5155.
8319 Used in DNSSEC to securely indicate that
8320 RRs with an owner name in a certain name interval do
8322 a zone and indicate what RR types are present for an
8324 Used in original DNSSEC; replaced by NSEC in
8326 Described in RFC 2535.
8338 A pointer to another part of the domain
8339 name space. Described in RFC 1035.
8351 Provides mappings between RFC 822 and X.400
8352 addresses. Described in RFC 2163.
8364 Information on persons responsible
8365 for the domain. Experimental. Described in RFC 1183.
8377 Contains DNSSECbis signature data. Described
8390 Route-through binding for hosts that
8391 do not have their own direct wide area network
8393 Experimental. Described in RFC 1183.
8405 Contains DNSSEC signature data. Used in
8406 original DNSSEC; replaced by RRSIG in
8407 DNSSECbis, but still used for SIG(0).
8408 Described in RFCs 2535 and 2931.
8420 Identifies the start of a zone of authority.
8421 Described in RFC 1035.
8433 Contains the Sender Policy Framework information
8434 for a given email domain. Described in RFC 4408.
8446 Information about well known network
8447 services (replaces WKS). Described in RFC 2782.
8459 Provides a way to securely publish a secure shell key's
8460 fingerprint. Described in RFC 4255.
8472 Text records. Described in RFC 1035.
8484 Information about which well known
8485 network services, such as SMTP, that a domain
8486 supports. Historical.
8498 Representation of X.25 network addresses.
8499 Experimental. Described in RFC 1183.
8506 The following <span class="emphasis"><em>classes</em></span> of resource records
8507 are currently valid in the DNS:
8509 <div class="informaltable"><table border="1">
8535 Chaosnet, a LAN protocol created at MIT in the
8537 Rarely used for its historical purpose, but reused for
8539 built-in server information zones, e.g.,
8540 <code class="literal">version.bind</code>.
8552 Hesiod, an information service
8553 developed by MIT's Project Athena. It is used to share
8555 about various systems databases, such as users,
8564 The owner name is often implicit, rather than forming an
8566 part of the RR. For example, many name servers internally form
8568 or hash structures for the name space, and chain RRs off nodes.
8569 The remaining RR parts are the fixed header (type, class, TTL)
8570 which is consistent for all RRs, and a variable part (RDATA)
8572 fits the needs of the resource being described.
8575 The meaning of the TTL field is a time limit on how long an
8576 RR can be kept in a cache. This limit does not apply to
8578 data in zones; it is also timed out, but by the refreshing
8580 for the zone. The TTL is assigned by the administrator for the
8581 zone where the data originates. While short TTLs can be used to
8582 minimize caching, and a zero TTL prohibits caching, the
8584 of Internet performance suggest that these times should be on
8586 order of days for the typical host. If a change can be
8588 the TTL can be reduced prior to the change to minimize
8590 during the change, and then increased back to its former value
8595 The data in the RDATA section of RRs is carried as a combination
8596 of binary strings and domain names. The domain names are
8598 used as "pointers" to other data in the DNS.
8601 <div class="sect3" lang="en">
8602 <div class="titlepage"><div><div><h4 class="title">
8603 <a name="id2596406"></a>Textual expression of RRs</h4></div></div></div>
8605 RRs are represented in binary form in the packets of the DNS
8606 protocol, and are usually represented in highly encoded form
8608 stored in a name server or resolver. In the examples provided
8610 RFC 1034, a style similar to that used in master files was
8612 in order to show the contents of RRs. In this format, most RRs
8613 are shown on a single line, although continuation lines are
8618 The start of the line gives the owner of the RR. If a line
8619 begins with a blank, then the owner is assumed to be the same as
8620 that of the previous RR. Blank lines are often included for
8624 Following the owner, we list the TTL, type, and class of the
8625 RR. Class and type use the mnemonics defined above, and TTL is
8626 an integer before the type field. In order to avoid ambiguity
8628 parsing, type and class mnemonics are disjoint, TTLs are
8630 and the type mnemonic is always last. The IN class and TTL
8632 are often omitted from examples in the interests of clarity.
8635 The resource data or RDATA section of the RR are given using
8636 knowledge of the typical representation for the data.
8639 For example, we might show the RRs carried in a message as:
8641 <div class="informaltable"><table border="1">
8651 <code class="literal">ISI.EDU.</code>
8656 <code class="literal">MX</code>
8661 <code class="literal">10 VENERA.ISI.EDU.</code>
8671 <code class="literal">MX</code>
8676 <code class="literal">10 VAXA.ISI.EDU</code>
8683 <code class="literal">VENERA.ISI.EDU</code>
8688 <code class="literal">A</code>
8693 <code class="literal">128.9.0.32</code>
8703 <code class="literal">A</code>
8708 <code class="literal">10.1.0.52</code>
8715 <code class="literal">VAXA.ISI.EDU</code>
8720 <code class="literal">A</code>
8725 <code class="literal">10.2.0.27</code>
8735 <code class="literal">A</code>
8740 <code class="literal">128.9.0.33</code>
8747 The MX RRs have an RDATA section which consists of a 16-bit
8748 number followed by a domain name. The address RRs use a
8750 IP address format to contain a 32-bit internet address.
8753 The above example shows six RRs, with two RRs at each of three
8757 Similarly we might see:
8759 <div class="informaltable"><table border="1">
8769 <code class="literal">XX.LCS.MIT.EDU.</code>
8774 <code class="literal">IN A</code>
8779 <code class="literal">10.0.0.44</code>
8787 <code class="literal">CH A</code>
8792 <code class="literal">MIT.EDU. 2420</code>
8799 This example shows two addresses for
8800 <code class="literal">XX.LCS.MIT.EDU</code>, each of a different class.
8804 <div class="sect2" lang="en">
8805 <div class="titlepage"><div><div><h3 class="title">
8806 <a name="id2596926"></a>Discussion of MX Records</h3></div></div></div>
8808 As described above, domain servers store information as a
8809 series of resource records, each of which contains a particular
8810 piece of information about a given domain name (which is usually,
8811 but not always, a host). The simplest way to think of a RR is as
8812 a typed pair of data, a domain name matched with a relevant datum,
8813 and stored with some additional type information to help systems
8814 determine when the RR is relevant.
8817 MX records are used to control delivery of email. The data
8818 specified in the record is a priority and a domain name. The
8820 controls the order in which email delivery is attempted, with the
8821 lowest number first. If two priorities are the same, a server is
8822 chosen randomly. If no servers at a given priority are responding,
8823 the mail transport agent will fall back to the next largest
8825 Priority numbers do not have any absolute meaning — they are
8827 only respective to other MX records for that domain name. The
8829 name given is the machine to which the mail will be delivered.
8830 It <span class="emphasis"><em>must</em></span> have an associated address record
8831 (A or AAAA) — CNAME is not sufficient.
8834 For a given domain, if there is both a CNAME record and an
8835 MX record, the MX record is in error, and will be ignored.
8837 the mail will be delivered to the server specified in the MX
8839 pointed to by the CNAME.
8842 <div class="informaltable"><table border="1">
8854 <code class="literal">example.com.</code>
8859 <code class="literal">IN</code>
8864 <code class="literal">MX</code>
8869 <code class="literal">10</code>
8874 <code class="literal">mail.example.com.</code>
8884 <code class="literal">IN</code>
8889 <code class="literal">MX</code>
8894 <code class="literal">10</code>
8899 <code class="literal">mail2.example.com.</code>
8909 <code class="literal">IN</code>
8914 <code class="literal">MX</code>
8919 <code class="literal">20</code>
8924 <code class="literal">mail.backup.org.</code>
8931 <code class="literal">mail.example.com.</code>
8936 <code class="literal">IN</code>
8941 <code class="literal">A</code>
8946 <code class="literal">10.0.0.1</code>
8956 <code class="literal">mail2.example.com.</code>
8961 <code class="literal">IN</code>
8966 <code class="literal">A</code>
8971 <code class="literal">10.0.0.2</code>
8981 Mail delivery will be attempted to <code class="literal">mail.example.com</code> and
8982 <code class="literal">mail2.example.com</code> (in
8983 any order), and if neither of those succeed, delivery to <code class="literal">mail.backup.org</code> will
8987 <div class="sect2" lang="en">
8988 <div class="titlepage"><div><div><h3 class="title">
8989 <a name="Setting_TTLs"></a>Setting TTLs</h3></div></div></div>
8991 The time-to-live of the RR field is a 32-bit integer represented
8992 in units of seconds, and is primarily used by resolvers when they
8993 cache RRs. The TTL describes how long a RR can be cached before it
8994 should be discarded. The following three types of TTL are
8996 used in a zone file.
8998 <div class="informaltable"><table border="1">
9012 The last field in the SOA is the negative
9013 caching TTL. This controls how long other servers will
9014 cache no-such-domain
9015 (NXDOMAIN) responses from you.
9018 The maximum time for
9019 negative caching is 3 hours (3h).
9031 The $TTL directive at the top of the
9032 zone file (before the SOA) gives a default TTL for every
9046 Each RR can have a TTL as the second
9047 field in the RR, which will control how long other
9056 All of these TTLs default to units of seconds, though units
9057 can be explicitly specified, for example, <code class="literal">1h30m</code>.
9060 <div class="sect2" lang="en">
9061 <div class="titlepage"><div><div><h3 class="title">
9062 <a name="id2597542"></a>Inverse Mapping in IPv4</h3></div></div></div>
9064 Reverse name resolution (that is, translation from IP address
9065 to name) is achieved by means of the <span class="emphasis"><em>in-addr.arpa</em></span> domain
9066 and PTR records. Entries in the in-addr.arpa domain are made in
9067 least-to-most significant order, read left to right. This is the
9068 opposite order to the way IP addresses are usually written. Thus,
9069 a machine with an IP address of 10.1.2.3 would have a
9071 in-addr.arpa name of
9072 3.2.1.10.in-addr.arpa. This name should have a PTR resource record
9073 whose data field is the name of the machine or, optionally,
9075 PTR records if the machine has more than one name. For example,
9076 in the [<span class="optional">example.com</span>] domain:
9078 <div class="informaltable"><table border="1">
9087 <code class="literal">$ORIGIN</code>
9092 <code class="literal">2.1.10.in-addr.arpa</code>
9099 <code class="literal">3</code>
9104 <code class="literal">IN PTR foo.example.com.</code>
9110 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
9111 <h3 class="title">Note</h3>
9113 The <span><strong class="command">$ORIGIN</strong></span> lines in the examples
9114 are for providing context to the examples only — they do not
9116 appear in the actual usage. They are only used here to indicate
9117 that the example is relative to the listed origin.
9121 <div class="sect2" lang="en">
9122 <div class="titlepage"><div><div><h3 class="title">
9123 <a name="id2597669"></a>Other Zone File Directives</h3></div></div></div>
9125 The Master File Format was initially defined in RFC 1035 and
9126 has subsequently been extended. While the Master File Format
9128 is class independent all records in a Master File must be of the
9133 Master File Directives include <span><strong class="command">$ORIGIN</strong></span>, <span><strong class="command">$INCLUDE</strong></span>,
9134 and <span><strong class="command">$TTL.</strong></span>
9136 <div class="sect3" lang="en">
9137 <div class="titlepage"><div><div><h4 class="title">
9138 <a name="id2597760"></a>The <span><strong class="command">@</strong></span> (at-sign)</h4></div></div></div>
9140 When used in the label (or name) field, the asperand or
9141 at-sign (@) symbol represents the current origin.
9142 At the start of the zone file, it is the
9143 <<code class="varname">zone_name</code>> (followed by
9147 <div class="sect3" lang="en">
9148 <div class="titlepage"><div><div><h4 class="title">
9149 <a name="id2597776"></a>The <span><strong class="command">$ORIGIN</strong></span> Directive</h4></div></div></div>
9151 Syntax: <span><strong class="command">$ORIGIN</strong></span>
9152 <em class="replaceable"><code>domain-name</code></em>
9153 [<span class="optional"><em class="replaceable"><code>comment</code></em></span>]
9155 <p><span><strong class="command">$ORIGIN</strong></span>
9156 sets the domain name that will be appended to any
9157 unqualified records. When a zone is first read in there
9158 is an implicit <span><strong class="command">$ORIGIN</strong></span>
9159 <<code class="varname">zone_name</code>><span><strong class="command">.</strong></span>
9160 (followed by trailing dot).
9161 The current <span><strong class="command">$ORIGIN</strong></span> is appended to
9162 the domain specified in the <span><strong class="command">$ORIGIN</strong></span>
9163 argument if it is not absolute.
9165 <pre class="programlisting">
9166 $ORIGIN example.com.
9167 WWW CNAME MAIN-SERVER
9172 <pre class="programlisting">
9173 WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
9176 <div class="sect3" lang="en">
9177 <div class="titlepage"><div><div><h4 class="title">
9178 <a name="id2597836"></a>The <span><strong class="command">$INCLUDE</strong></span> Directive</h4></div></div></div>
9180 Syntax: <span><strong class="command">$INCLUDE</strong></span>
9181 <em class="replaceable"><code>filename</code></em>
9182 [<span class="optional">
9183 <em class="replaceable"><code>origin</code></em> </span>]
9184 [<span class="optional"> <em class="replaceable"><code>comment</code></em> </span>]
9187 Read and process the file <code class="filename">filename</code> as
9188 if it were included into the file at this point. If <span><strong class="command">origin</strong></span> is
9189 specified the file is processed with <span><strong class="command">$ORIGIN</strong></span> set
9190 to that value, otherwise the current <span><strong class="command">$ORIGIN</strong></span> is
9194 The origin and the current domain name
9195 revert to the values they had prior to the <span><strong class="command">$INCLUDE</strong></span> once
9196 the file has been read.
9198 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
9199 <h3 class="title">Note</h3>
9201 RFC 1035 specifies that the current origin should be restored
9203 an <span><strong class="command">$INCLUDE</strong></span>, but it is silent
9204 on whether the current
9205 domain name should also be restored. BIND 9 restores both of
9207 This could be construed as a deviation from RFC 1035, a
9212 <div class="sect3" lang="en">
9213 <div class="titlepage"><div><div><h4 class="title">
9214 <a name="id2597906"></a>The <span><strong class="command">$TTL</strong></span> Directive</h4></div></div></div>
9216 Syntax: <span><strong class="command">$TTL</strong></span>
9217 <em class="replaceable"><code>default-ttl</code></em>
9218 [<span class="optional">
9219 <em class="replaceable"><code>comment</code></em> </span>]
9222 Set the default Time To Live (TTL) for subsequent records
9223 with undefined TTLs. Valid TTLs are of the range 0-2147483647
9226 <p><span><strong class="command">$TTL</strong></span>
9227 is defined in RFC 2308.
9231 <div class="sect2" lang="en">
9232 <div class="titlepage"><div><div><h3 class="title">
9233 <a name="id2597942"></a><acronym class="acronym">BIND</acronym> Master File Extension: the <span><strong class="command">$GENERATE</strong></span> Directive</h3></div></div></div>
9235 Syntax: <span><strong class="command">$GENERATE</strong></span>
9236 <em class="replaceable"><code>range</code></em>
9237 <em class="replaceable"><code>lhs</code></em>
9238 [<span class="optional"><em class="replaceable"><code>ttl</code></em></span>]
9239 [<span class="optional"><em class="replaceable"><code>class</code></em></span>]
9240 <em class="replaceable"><code>type</code></em>
9241 <em class="replaceable"><code>rhs</code></em>
9242 [<span class="optional"><em class="replaceable"><code>comment</code></em></span>]
9244 <p><span><strong class="command">$GENERATE</strong></span>
9245 is used to create a series of resource records that only
9246 differ from each other by an
9247 iterator. <span><strong class="command">$GENERATE</strong></span> can be used to
9248 easily generate the sets of records required to support
9249 sub /24 reverse delegations described in RFC 2317:
9250 Classless IN-ADDR.ARPA delegation.
9252 <pre class="programlisting">$ORIGIN 0.0.192.IN-ADDR.ARPA.
9253 $GENERATE 1-2 @ NS SERVER$.EXAMPLE.
9254 $GENERATE 1-127 $ CNAME $.0</pre>
9258 <pre class="programlisting">0.0.0.192.IN-ADDR.ARPA. NS SERVER1.EXAMPLE.
9259 0.0.0.192.IN-ADDR.ARPA. NS SERVER2.EXAMPLE.
9260 1.0.0.192.IN-ADDR.ARPA. CNAME 1.0.0.0.192.IN-ADDR.ARPA.
9261 2.0.0.192.IN-ADDR.ARPA. CNAME 2.0.0.0.192.IN-ADDR.ARPA.
9263 127.0.0.192.IN-ADDR.ARPA. CNAME 127.0.0.0.192.IN-ADDR.ARPA.
9266 Generate a set of A and MX records. Note the MX's right hand
9267 side is a quoted string. The quotes will be stripped when the
9268 right hand side is processed.
9270 <pre class="programlisting">
9272 $GENERATE 1-127 HOST-$ A 1.2.3.$
9273 $GENERATE 1-127 HOST-$ MX "0 ."</pre>
9277 <pre class="programlisting">HOST-1.EXAMPLE. A 1.2.3.1
9278 HOST-1.EXAMPLE. MX 0 .
9279 HOST-2.EXAMPLE. A 1.2.3.2
9280 HOST-2.EXAMPLE. MX 0 .
9281 HOST-3.EXAMPLE. A 1.2.3.3
9282 HOST-3.EXAMPLE. MX 0 .
9284 HOST-127.EXAMPLE. A 1.2.3.127
9285 HOST-127.EXAMPLE. MX 0 .
9287 <div class="informaltable"><table border="1">
9295 <p><span><strong class="command">range</strong></span></p>
9299 This can be one of two forms: start-stop
9300 or start-stop/step. If the first form is used, then step
9302 1. All of start, stop and step must be positive.
9308 <p><span><strong class="command">lhs</strong></span></p>
9312 describes the owner name of the resource records
9313 to be created. Any single <span><strong class="command">$</strong></span>
9315 symbols within the <span><strong class="command">lhs</strong></span> string
9316 are replaced by the iterator value.
9318 To get a $ in the output, you need to escape the
9319 <span><strong class="command">$</strong></span> using a backslash
9320 <span><strong class="command">\</strong></span>,
9321 e.g. <span><strong class="command">\$</strong></span>. The
9322 <span><strong class="command">$</strong></span> may optionally be followed
9323 by modifiers which change the offset from the
9324 iterator, field width and base.
9326 Modifiers are introduced by a
9327 <span><strong class="command">{</strong></span> (left brace) immediately following the
9328 <span><strong class="command">$</strong></span> as
9329 <span><strong class="command">${offset[,width[,base]]}</strong></span>.
9330 For example, <span><strong class="command">${-20,3,d}</strong></span>
9331 subtracts 20 from the current value, prints the
9332 result as a decimal in a zero-padded field of
9335 Available output forms are decimal
9336 (<span><strong class="command">d</strong></span>), octal
9337 (<span><strong class="command">o</strong></span>), hexadecimal
9338 (<span><strong class="command">x</strong></span> or <span><strong class="command">X</strong></span>
9339 for uppercase) and nibble
9340 (<span><strong class="command">n</strong></span> or <span><strong class="command">N</strong></span>\
9341 for uppercase). The default modifier is
9342 <span><strong class="command">${0,0,d}</strong></span>. If the
9343 <span><strong class="command">lhs</strong></span> is not absolute, the
9344 current <span><strong class="command">$ORIGIN</strong></span> is appended
9348 In nibble mode the value will be treated as
9349 if it was a reversed hexadecimal string
9350 with each hexadecimal digit as a separate
9351 label. The width field includes the label
9355 For compatibility with earlier versions,
9356 <span><strong class="command">$$</strong></span> is still recognized as
9357 indicating a literal $ in the output.
9363 <p><span><strong class="command">ttl</strong></span></p>
9367 Specifies the time-to-live of the generated records. If
9368 not specified this will be inherited using the
9369 normal TTL inheritance rules.
9371 <p><span><strong class="command">class</strong></span>
9372 and <span><strong class="command">ttl</strong></span> can be
9373 entered in either order.
9379 <p><span><strong class="command">class</strong></span></p>
9383 Specifies the class of the generated records.
9384 This must match the zone class if it is
9387 <p><span><strong class="command">class</strong></span>
9388 and <span><strong class="command">ttl</strong></span> can be
9389 entered in either order.
9395 <p><span><strong class="command">type</strong></span></p>
9405 <p><span><strong class="command">rhs</strong></span></p>
9409 <span><strong class="command">rhs</strong></span>, optionally, quoted string.
9416 The <span><strong class="command">$GENERATE</strong></span> directive is a <acronym class="acronym">BIND</acronym> extension
9417 and not part of the standard zone file format.
9420 BIND 8 does not support the optional TTL and CLASS fields.
9423 <div class="sect2" lang="en">
9424 <div class="titlepage"><div><div><h3 class="title">
9425 <a name="zonefile_format"></a>Additional File Formats</h3></div></div></div>
9427 In addition to the standard textual format, BIND 9
9428 supports the ability to read or dump to zone files in
9429 other formats. The <code class="constant">raw</code> format is
9430 currently available as an additional format. It is a
9431 binary format representing BIND 9's internal data
9432 structure directly, thereby remarkably improving the
9436 For a primary server, a zone file in the
9437 <code class="constant">raw</code> format is expected to be
9438 generated from a textual zone file by the
9439 <span><strong class="command">named-compilezone</strong></span> command. For a
9440 secondary server or for a dynamic zone, it is automatically
9441 generated (if this format is specified by the
9442 <span><strong class="command">masterfile-format</strong></span> option) when
9443 <span><strong class="command">named</strong></span> dumps the zone contents after
9444 zone transfer or when applying prior updates.
9447 If a zone file in a binary format needs manual modification,
9448 it first must be converted to a textual form by the
9449 <span><strong class="command">named-compilezone</strong></span> command. All
9450 necessary modification should go to the text file, which
9451 should then be converted to the binary form by the
9452 <span><strong class="command">named-compilezone</strong></span> command again.
9455 Although the <code class="constant">raw</code> format uses the
9456 network byte order and avoids architecture-dependent
9457 data alignment so that it is as much portable as
9458 possible, it is primarily expected to be used inside
9459 the same single system. In order to export a zone
9460 file in the <code class="constant">raw</code> format or make a
9461 portable backup of the file, it is recommended to
9462 convert the file to the standard textual representation.
9466 <div class="sect1" lang="en">
9467 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
9468 <a name="statistics"></a>BIND9 Statistics</h2></div></div></div>
9470 <acronym class="acronym">BIND</acronym> 9 maintains lots of statistics
9471 information and provides several interfaces for users to
9472 get access to the statistics.
9473 The available statistics include all statistics counters
9474 that were available in <acronym class="acronym">BIND</acronym> 8 and
9475 are meaningful in <acronym class="acronym">BIND</acronym> 9,
9476 and other information that is considered useful.
9479 The statistics information is categorized into the following
9482 <div class="informaltable"><table border="1">
9490 <p>Incoming Requests</p>
9494 The number of incoming DNS requests for each OPCODE.
9500 <p>Incoming Queries</p>
9504 The number of incoming queries for each RR type.
9510 <p>Outgoing Queries</p>
9514 The number of outgoing queries for each RR
9515 type sent from the internal resolver.
9516 Maintained per view.
9522 <p>Name Server Statistics</p>
9526 Statistics counters about incoming request processing.
9532 <p>Zone Maintenance Statistics</p>
9536 Statistics counters regarding zone maintenance
9537 operations such as zone transfers.
9543 <p>Resolver Statistics</p>
9547 Statistics counters about name resolution
9548 performed in the internal resolver.
9549 Maintained per view.
9555 <p>Cache DB RRsets</p>
9559 The number of RRsets per RR type and nonexistent
9560 names stored in the cache database.
9561 If the exclamation mark (!) is printed for a RR
9562 type, it means that particular type of RRset is
9563 known to be nonexistent (this is also known as
9565 Maintained per view.
9571 <p>Socket I/O Statistics</p>
9575 Statistics counters about network related events.
9582 A subset of Name Server Statistics is collected and shown
9583 per zone for which the server has the authority when
9584 <span><strong class="command">zone-statistics</strong></span> is set to
9585 <strong class="userinput"><code>yes</code></strong>.
9586 These statistics counters are shown with their zone and view
9588 In some cases the view names are omitted for the default view.
9591 There are currently two user interfaces to get access to the
9593 One is in the plain text format dumped to the file specified
9594 by the <span><strong class="command">statistics-file</strong></span> configuration option.
9595 The other is remotely accessible via a statistics channel
9596 when the <span><strong class="command">statistics-channels</strong></span> statement
9597 is specified in the configuration file
9598 (see <a href="Bv9ARM.ch06.html#statschannels" title="statistics-channels Statement Grammar">the section called “<span><strong class="command">statistics-channels</strong></span> Statement Grammar”</a>.)
9600 <div class="sect3" lang="en">
9601 <div class="titlepage"><div><div><h4 class="title">
9602 <a name="statsfile"></a>The Statistics File</h4></div></div></div>
9604 The text format statistics dump begins with a line, like:
9607 <span><strong class="command">+++ Statistics Dump +++ (973798949)</strong></span>
9610 The number in parentheses is a standard
9611 Unix-style timestamp, measured as seconds since January 1, 1970.
9614 that line is a set of statistics information, which is categorized
9616 Each section begins with a line, like:
9619 <span><strong class="command">++ Name Server Statistics ++</strong></span>
9622 Each section consists of lines, each containing the statistics
9623 counter value followed by its textual description.
9624 See below for available counters.
9625 For brevity, counters that have a value of 0 are not shown
9626 in the statistics file.
9629 The statistics dump ends with the line where the
9630 number is identical to the number in the beginning line; for example:
9633 <span><strong class="command">--- Statistics Dump --- (973798949)</strong></span>
9636 <div class="sect2" lang="en">
9637 <div class="titlepage"><div><div><h3 class="title">
9638 <a name="statistics_counters"></a>Statistics Counters</h3></div></div></div>
9640 The following tables summarize statistics counters that
9641 <acronym class="acronym">BIND</acronym> 9 provides.
9642 For each row of the tables, the leftmost column is the
9643 abbreviated symbol name of that counter.
9644 These symbols are shown in the statistics information
9645 accessed via an HTTP statistics channel.
9646 The rightmost column gives the description of the counter,
9647 which is also shown in the statistics file
9648 (but, in this document, possibly with slight modification
9649 for better readability).
9650 Additional notes may also be provided in this column.
9651 When a middle column exists between these two columns,
9652 it gives the corresponding counter name of the
9653 <acronym class="acronym">BIND</acronym> 8 statistics, if applicable.
9655 <div class="sect3" lang="en">
9656 <div class="titlepage"><div><div><h4 class="title">
9657 <a name="id2598964"></a>Name Server Statistics Counters</h4></div></div></div>
9658 <div class="informaltable"><table border="1">
9668 <span class="emphasis"><em>Symbol</em></span>
9673 <span class="emphasis"><em>BIND8 Symbol</em></span>
9678 <span class="emphasis"><em>Description</em></span>
9684 <p><span><strong class="command">Requestv4</strong></span></p>
9687 <p><span><strong class="command">RQ</strong></span></p>
9691 IPv4 requests received.
9692 Note: this also counts non query requests.
9698 <p><span><strong class="command">Requestv6</strong></span></p>
9701 <p><span><strong class="command">RQ</strong></span></p>
9705 IPv6 requests received.
9706 Note: this also counts non query requests.
9712 <p><span><strong class="command">ReqEdns0</strong></span></p>
9715 <p><span><strong class="command"></strong></span></p>
9719 Requests with EDNS(0) received.
9725 <p><span><strong class="command">ReqBadEDNSVer</strong></span></p>
9728 <p><span><strong class="command"></strong></span></p>
9732 Requests with unsupported EDNS version received.
9738 <p><span><strong class="command">ReqTSIG</strong></span></p>
9741 <p><span><strong class="command"></strong></span></p>
9745 Requests with TSIG received.
9751 <p><span><strong class="command">ReqSIG0</strong></span></p>
9754 <p><span><strong class="command"></strong></span></p>
9758 Requests with SIG(0) received.
9764 <p><span><strong class="command">ReqBadSIG</strong></span></p>
9767 <p><span><strong class="command"></strong></span></p>
9771 Requests with invalid (TSIG or SIG(0)) signature.
9777 <p><span><strong class="command">ReqTCP</strong></span></p>
9780 <p><span><strong class="command">RTCP</strong></span></p>
9784 TCP requests received.
9790 <p><span><strong class="command">AuthQryRej</strong></span></p>
9793 <p><span><strong class="command">RUQ</strong></span></p>
9797 Authoritative (non recursive) queries rejected.
9803 <p><span><strong class="command">RecQryRej</strong></span></p>
9806 <p><span><strong class="command">RURQ</strong></span></p>
9810 Recursive queries rejected.
9816 <p><span><strong class="command">XfrRej</strong></span></p>
9819 <p><span><strong class="command">RUXFR</strong></span></p>
9823 Zone transfer requests rejected.
9829 <p><span><strong class="command">UpdateRej</strong></span></p>
9832 <p><span><strong class="command">RUUpd</strong></span></p>
9836 Dynamic update requests rejected.
9842 <p><span><strong class="command">Response</strong></span></p>
9845 <p><span><strong class="command">SAns</strong></span></p>
9855 <p><span><strong class="command">RespTruncated</strong></span></p>
9858 <p><span><strong class="command"></strong></span></p>
9862 Truncated responses sent.
9868 <p><span><strong class="command">RespEDNS0</strong></span></p>
9871 <p><span><strong class="command"></strong></span></p>
9875 Responses with EDNS(0) sent.
9881 <p><span><strong class="command">RespTSIG</strong></span></p>
9884 <p><span><strong class="command"></strong></span></p>
9888 Responses with TSIG sent.
9894 <p><span><strong class="command">RespSIG0</strong></span></p>
9897 <p><span><strong class="command"></strong></span></p>
9901 Responses with SIG(0) sent.
9907 <p><span><strong class="command">QrySuccess</strong></span></p>
9910 <p><span><strong class="command"></strong></span></p>
9914 Queries resulted in a successful answer.
9915 This means the query which returns a NOERROR response
9916 with at least one answer RR.
9917 This corresponds to the
9918 <span><strong class="command">success</strong></span> counter
9919 of previous versions of
9920 <acronym class="acronym">BIND</acronym> 9.
9926 <p><span><strong class="command">QryAuthAns</strong></span></p>
9929 <p><span><strong class="command"></strong></span></p>
9933 Queries resulted in authoritative answer.
9939 <p><span><strong class="command">QryNoauthAns</strong></span></p>
9942 <p><span><strong class="command">SNaAns</strong></span></p>
9946 Queries resulted in non authoritative answer.
9952 <p><span><strong class="command">QryReferral</strong></span></p>
9955 <p><span><strong class="command"></strong></span></p>
9959 Queries resulted in referral answer.
9960 This corresponds to the
9961 <span><strong class="command">referral</strong></span> counter
9962 of previous versions of
9963 <acronym class="acronym">BIND</acronym> 9.
9969 <p><span><strong class="command">QryNxrrset</strong></span></p>
9972 <p><span><strong class="command"></strong></span></p>
9976 Queries resulted in NOERROR responses with no data.
9977 This corresponds to the
9978 <span><strong class="command">nxrrset</strong></span> counter
9979 of previous versions of
9980 <acronym class="acronym">BIND</acronym> 9.
9986 <p><span><strong class="command">QrySERVFAIL</strong></span></p>
9989 <p><span><strong class="command">SFail</strong></span></p>
9993 Queries resulted in SERVFAIL.
9999 <p><span><strong class="command">QryFORMERR</strong></span></p>
10002 <p><span><strong class="command">SFErr</strong></span></p>
10006 Queries resulted in FORMERR.
10012 <p><span><strong class="command">QryNXDOMAIN</strong></span></p>
10015 <p><span><strong class="command">SNXD</strong></span></p>
10019 Queries resulted in NXDOMAIN.
10020 This corresponds to the
10021 <span><strong class="command">nxdomain</strong></span> counter
10022 of previous versions of
10023 <acronym class="acronym">BIND</acronym> 9.
10029 <p><span><strong class="command">QryRecursion</strong></span></p>
10032 <p><span><strong class="command">RFwdQ</strong></span></p>
10036 Queries which caused the server
10037 to perform recursion in order to find the final answer.
10038 This corresponds to the
10039 <span><strong class="command">recursion</strong></span> counter
10040 of previous versions of
10041 <acronym class="acronym">BIND</acronym> 9.
10047 <p><span><strong class="command">QryDuplicate</strong></span></p>
10050 <p><span><strong class="command">RDupQ</strong></span></p>
10054 Queries which the server attempted to
10055 recurse but discovered an existing query with the same
10056 IP address, port, query ID, name, type and class
10057 already being processed.
10058 This corresponds to the
10059 <span><strong class="command">duplicate</strong></span> counter
10060 of previous versions of
10061 <acronym class="acronym">BIND</acronym> 9.
10067 <p><span><strong class="command">QryDropped</strong></span></p>
10070 <p><span><strong class="command"></strong></span></p>
10074 Recursive queries for which the server
10075 discovered an excessive number of existing
10076 recursive queries for the same name, type and
10077 class and were subsequently dropped.
10078 This is the number of dropped queries due to
10079 the reason explained with the
10080 <span><strong class="command">clients-per-query</strong></span>
10082 <span><strong class="command">max-clients-per-query</strong></span>
10084 (see the description about
10085 <a href="Bv9ARM.ch06.html#clients-per-query"><span><strong class="command">clients-per-query</strong></span></a>.)
10086 This corresponds to the
10087 <span><strong class="command">dropped</strong></span> counter
10088 of previous versions of
10089 <acronym class="acronym">BIND</acronym> 9.
10095 <p><span><strong class="command">QryFailure</strong></span></p>
10098 <p><span><strong class="command"></strong></span></p>
10102 Other query failures.
10103 This corresponds to the
10104 <span><strong class="command">failure</strong></span> counter
10105 of previous versions of
10106 <acronym class="acronym">BIND</acronym> 9.
10107 Note: this counter is provided mainly for
10108 backward compatibility with the previous versions.
10109 Normally a more fine-grained counters such as
10110 <span><strong class="command">AuthQryRej</strong></span> and
10111 <span><strong class="command">RecQryRej</strong></span>
10112 that would also fall into this counter are provided,
10113 and so this counter would not be of much
10114 interest in practice.
10120 <p><span><strong class="command">XfrReqDone</strong></span></p>
10123 <p><span><strong class="command"></strong></span></p>
10127 Requested zone transfers completed.
10133 <p><span><strong class="command">UpdateReqFwd</strong></span></p>
10136 <p><span><strong class="command"></strong></span></p>
10140 Update requests forwarded.
10146 <p><span><strong class="command">UpdateRespFwd</strong></span></p>
10149 <p><span><strong class="command"></strong></span></p>
10153 Update responses forwarded.
10159 <p><span><strong class="command">UpdateFwdFail</strong></span></p>
10162 <p><span><strong class="command"></strong></span></p>
10166 Dynamic update forward failed.
10172 <p><span><strong class="command">UpdateDone</strong></span></p>
10175 <p><span><strong class="command"></strong></span></p>
10179 Dynamic updates completed.
10185 <p><span><strong class="command">UpdateFail</strong></span></p>
10188 <p><span><strong class="command"></strong></span></p>
10192 Dynamic updates failed.
10198 <p><span><strong class="command">UpdateBadPrereq</strong></span></p>
10201 <p><span><strong class="command"></strong></span></p>
10205 Dynamic updates rejected due to prerequisite failure.
10211 <p><span><strong class="command">RPZRewrites</strong></span></p>
10214 <p><span><strong class="command"></strong></span></p>
10218 Response policy zone rewrites.
10225 <div class="sect3" lang="en">
10226 <div class="titlepage"><div><div><h4 class="title">
10227 <a name="id2600537"></a>Zone Maintenance Statistics Counters</h4></div></div></div>
10228 <div class="informaltable"><table border="1">
10237 <span class="emphasis"><em>Symbol</em></span>
10242 <span class="emphasis"><em>Description</em></span>
10248 <p><span><strong class="command">NotifyOutv4</strong></span></p>
10252 IPv4 notifies sent.
10258 <p><span><strong class="command">NotifyOutv6</strong></span></p>
10262 IPv6 notifies sent.
10268 <p><span><strong class="command">NotifyInv4</strong></span></p>
10272 IPv4 notifies received.
10278 <p><span><strong class="command">NotifyInv6</strong></span></p>
10282 IPv6 notifies received.
10288 <p><span><strong class="command">NotifyRej</strong></span></p>
10292 Incoming notifies rejected.
10298 <p><span><strong class="command">SOAOutv4</strong></span></p>
10302 IPv4 SOA queries sent.
10308 <p><span><strong class="command">SOAOutv6</strong></span></p>
10312 IPv6 SOA queries sent.
10318 <p><span><strong class="command">AXFRReqv4</strong></span></p>
10322 IPv4 AXFR requested.
10328 <p><span><strong class="command">AXFRReqv6</strong></span></p>
10332 IPv6 AXFR requested.
10338 <p><span><strong class="command">IXFRReqv4</strong></span></p>
10342 IPv4 IXFR requested.
10348 <p><span><strong class="command">IXFRReqv6</strong></span></p>
10352 IPv6 IXFR requested.
10358 <p><span><strong class="command">XfrSuccess</strong></span></p>
10362 Zone transfer requests succeeded.
10368 <p><span><strong class="command">XfrFail</strong></span></p>
10372 Zone transfer requests failed.
10379 <div class="sect3" lang="en">
10380 <div class="titlepage"><div><div><h4 class="title">
10381 <a name="id2600988"></a>Resolver Statistics Counters</h4></div></div></div>
10382 <div class="informaltable"><table border="1">
10392 <span class="emphasis"><em>Symbol</em></span>
10397 <span class="emphasis"><em>BIND8 Symbol</em></span>
10402 <span class="emphasis"><em>Description</em></span>
10408 <p><span><strong class="command">Queryv4</strong></span></p>
10411 <p><span><strong class="command">SFwdQ</strong></span></p>
10421 <p><span><strong class="command">Queryv6</strong></span></p>
10424 <p><span><strong class="command">SFwdQ</strong></span></p>
10434 <p><span><strong class="command">Responsev4</strong></span></p>
10437 <p><span><strong class="command">RR</strong></span></p>
10441 IPv4 responses received.
10447 <p><span><strong class="command">Responsev6</strong></span></p>
10450 <p><span><strong class="command">RR</strong></span></p>
10454 IPv6 responses received.
10460 <p><span><strong class="command">NXDOMAIN</strong></span></p>
10463 <p><span><strong class="command">RNXD</strong></span></p>
10473 <p><span><strong class="command">SERVFAIL</strong></span></p>
10476 <p><span><strong class="command">RFail</strong></span></p>
10486 <p><span><strong class="command">FORMERR</strong></span></p>
10489 <p><span><strong class="command">RFErr</strong></span></p>
10499 <p><span><strong class="command">OtherError</strong></span></p>
10502 <p><span><strong class="command">RErr</strong></span></p>
10506 Other errors received.
10512 <p><span><strong class="command">EDNS0Fail</strong></span></p>
10515 <p><span><strong class="command"></strong></span></p>
10519 EDNS(0) query failures.
10525 <p><span><strong class="command">Mismatch</strong></span></p>
10528 <p><span><strong class="command">RDupR</strong></span></p>
10532 Mismatch responses received.
10533 The DNS ID, response's source address,
10534 and/or the response's source port does not
10535 match what was expected.
10536 (The port must be 53 or as defined by
10537 the <span><strong class="command">port</strong></span> option.)
10538 This may be an indication of a cache
10545 <p><span><strong class="command">Truncated</strong></span></p>
10548 <p><span><strong class="command"></strong></span></p>
10552 Truncated responses received.
10558 <p><span><strong class="command">Lame</strong></span></p>
10561 <p><span><strong class="command">RLame</strong></span></p>
10565 Lame delegations received.
10571 <p><span><strong class="command">Retry</strong></span></p>
10574 <p><span><strong class="command">SDupQ</strong></span></p>
10578 Query retries performed.
10584 <p><span><strong class="command">QueryAbort</strong></span></p>
10587 <p><span><strong class="command"></strong></span></p>
10591 Queries aborted due to quota control.
10597 <p><span><strong class="command">QuerySockFail</strong></span></p>
10600 <p><span><strong class="command"></strong></span></p>
10604 Failures in opening query sockets.
10605 One common reason for such failures is a
10606 failure of opening a new socket due to a
10607 limitation on file descriptors.
10613 <p><span><strong class="command">QueryTimeout</strong></span></p>
10616 <p><span><strong class="command"></strong></span></p>
10626 <p><span><strong class="command">GlueFetchv4</strong></span></p>
10629 <p><span><strong class="command">SSysQ</strong></span></p>
10633 IPv4 NS address fetches invoked.
10639 <p><span><strong class="command">GlueFetchv6</strong></span></p>
10642 <p><span><strong class="command">SSysQ</strong></span></p>
10646 IPv6 NS address fetches invoked.
10652 <p><span><strong class="command">GlueFetchv4Fail</strong></span></p>
10655 <p><span><strong class="command"></strong></span></p>
10659 IPv4 NS address fetch failed.
10665 <p><span><strong class="command">GlueFetchv6Fail</strong></span></p>
10668 <p><span><strong class="command"></strong></span></p>
10672 IPv6 NS address fetch failed.
10678 <p><span><strong class="command">ValAttempt</strong></span></p>
10681 <p><span><strong class="command"></strong></span></p>
10685 DNSSEC validation attempted.
10691 <p><span><strong class="command">ValOk</strong></span></p>
10694 <p><span><strong class="command"></strong></span></p>
10698 DNSSEC validation succeeded.
10704 <p><span><strong class="command">ValNegOk</strong></span></p>
10707 <p><span><strong class="command"></strong></span></p>
10711 DNSSEC validation on negative information succeeded.
10717 <p><span><strong class="command">ValFail</strong></span></p>
10720 <p><span><strong class="command"></strong></span></p>
10724 DNSSEC validation failed.
10730 <p><span><strong class="command">QryRTTnn</strong></span></p>
10733 <p><span><strong class="command"></strong></span></p>
10737 Frequency table on round trip times (RTTs) of
10739 Each <span><strong class="command">nn</strong></span> specifies the corresponding
10742 <span><strong class="command">nn_1</strong></span>,
10743 <span><strong class="command">nn_2</strong></span>,
10745 <span><strong class="command">nn_m</strong></span>,
10746 the value of <span><strong class="command">nn_i</strong></span> is the
10747 number of queries whose RTTs are between
10748 <span><strong class="command">nn_(i-1)</strong></span> (inclusive) and
10749 <span><strong class="command">nn_i</strong></span> (exclusive) milliseconds.
10750 For the sake of convenience we define
10751 <span><strong class="command">nn_0</strong></span> to be 0.
10752 The last entry should be represented as
10753 <span><strong class="command">nn_m+</strong></span>, which means the
10754 number of queries whose RTTs are equal to or over
10755 <span><strong class="command">nn_m</strong></span> milliseconds.
10762 <div class="sect3" lang="en">
10763 <div class="titlepage"><div><div><h4 class="title">
10764 <a name="id2601942"></a>Socket I/O Statistics Counters</h4></div></div></div>
10766 Socket I/O statistics counters are defined per socket
10768 <span><strong class="command">UDP4</strong></span> (UDP/IPv4),
10769 <span><strong class="command">UDP6</strong></span> (UDP/IPv6),
10770 <span><strong class="command">TCP4</strong></span> (TCP/IPv4),
10771 <span><strong class="command">TCP6</strong></span> (TCP/IPv6),
10772 <span><strong class="command">Unix</strong></span> (Unix Domain), and
10773 <span><strong class="command">FDwatch</strong></span> (sockets opened outside the
10775 In the following table <span><strong class="command"><TYPE></strong></span>
10776 represents a socket type.
10777 Not all counters are available for all socket types;
10778 exceptions are noted in the description field.
10780 <div class="informaltable"><table border="1">
10789 <span class="emphasis"><em>Symbol</em></span>
10794 <span class="emphasis"><em>Description</em></span>
10800 <p><span><strong class="command"><TYPE>Open</strong></span></p>
10804 Sockets opened successfully.
10805 This counter is not applicable to the
10806 <span><strong class="command">FDwatch</strong></span> type.
10812 <p><span><strong class="command"><TYPE>OpenFail</strong></span></p>
10816 Failures of opening sockets.
10817 This counter is not applicable to the
10818 <span><strong class="command">FDwatch</strong></span> type.
10824 <p><span><strong class="command"><TYPE>Close</strong></span></p>
10834 <p><span><strong class="command"><TYPE>BindFail</strong></span></p>
10838 Failures of binding sockets.
10844 <p><span><strong class="command"><TYPE>ConnFail</strong></span></p>
10848 Failures of connecting sockets.
10854 <p><span><strong class="command"><TYPE>Conn</strong></span></p>
10858 Connections established successfully.
10864 <p><span><strong class="command"><TYPE>AcceptFail</strong></span></p>
10868 Failures of accepting incoming connection requests.
10869 This counter is not applicable to the
10870 <span><strong class="command">UDP</strong></span> and
10871 <span><strong class="command">FDwatch</strong></span> types.
10877 <p><span><strong class="command"><TYPE>Accept</strong></span></p>
10881 Incoming connections successfully accepted.
10882 This counter is not applicable to the
10883 <span><strong class="command">UDP</strong></span> and
10884 <span><strong class="command">FDwatch</strong></span> types.
10890 <p><span><strong class="command"><TYPE>SendErr</strong></span></p>
10894 Errors in socket send operations.
10895 This counter corresponds
10896 to <span><strong class="command">SErr</strong></span> counter of
10897 <span><strong class="command">BIND</strong></span> 8.
10903 <p><span><strong class="command"><TYPE>RecvErr</strong></span></p>
10907 Errors in socket receive operations.
10908 This includes errors of send operations on a
10909 connected UDP socket notified by an ICMP error
10917 <div class="sect3" lang="en">
10918 <div class="titlepage"><div><div><h4 class="title">
10919 <a name="id2602520"></a>Compatibility with <span class="emphasis"><em>BIND</em></span> 8 Counters</h4></div></div></div>
10921 Most statistics counters that were available
10922 in <span><strong class="command">BIND</strong></span> 8 are also supported in
10923 <span><strong class="command">BIND</strong></span> 9 as shown in the above tables.
10924 Here are notes about other counters that do not appear
10927 <div class="variablelist"><dl>
10928 <dt><span class="term"><span><strong class="command">RFwdR,SFwdR</strong></span></span></dt>
10930 These counters are not supported
10931 because <span><strong class="command">BIND</strong></span> 9 does not adopt
10932 the notion of <span class="emphasis"><em>forwarding</em></span>
10933 as <span><strong class="command">BIND</strong></span> 8 did.
10935 <dt><span class="term"><span><strong class="command">RAXFR</strong></span></span></dt>
10937 This counter is accessible in the Incoming Queries section.
10939 <dt><span class="term"><span><strong class="command">RIQ</strong></span></span></dt>
10941 This counter is accessible in the Incoming Requests section.
10943 <dt><span class="term"><span><strong class="command">ROpts</strong></span></span></dt>
10945 This counter is not supported
10946 because <span><strong class="command">BIND</strong></span> 9 does not care
10947 about IP options in the first place.
10954 <div class="navfooter">
10956 <table width="100%" summary="Navigation footer">
10958 <td width="40%" align="left">
10959 <a accesskey="p" href="Bv9ARM.ch05.html">Prev</a> </td>
10960 <td width="20%" align="center"> </td>
10961 <td width="40%" align="right"> <a accesskey="n" href="Bv9ARM.ch07.html">Next</a>
10965 <td width="40%" align="left" valign="top">Chapter 5. The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver </td>
10966 <td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
10967 <td width="40%" align="right" valign="top"> Chapter 7. <acronym class="acronym">BIND</acronym> 9 Security Considerations</td>