]> CyberLeo.Net >> Repos - FreeBSD/releng/9.0.git/blob - contrib/bind9/doc/arm/Bv9ARM-book.xml
Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
[FreeBSD/releng/9.0.git] / contrib / bind9 / doc / arm / Bv9ARM-book.xml
1 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2               "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3                [<!ENTITY mdash "&#8212;">]>
4 <!--
5  - Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
6  - Copyright (C) 2000-2003  Internet Software Consortium.
7  -
8  - Permission to use, copy, modify, and/or distribute this software for any
9  - purpose with or without fee is hereby granted, provided that the above
10  - copyright notice and this permission notice appear in all copies.
11  -
12  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
13  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14  - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
16  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
17  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18  - PERFORMANCE OF THIS SOFTWARE.
19 -->
20
21 <!-- File: $Id: Bv9ARM-book.xml,v 1.478.8.11 2011-08-02 04:58:46 each Exp $ -->
22 <book xmlns:xi="http://www.w3.org/2001/XInclude">
23   <title>BIND 9 Administrator Reference Manual</title>
24
25   <bookinfo>
26     <copyright>
27       <year>2004</year>
28       <year>2005</year>
29       <year>2006</year>
30       <year>2007</year>
31       <year>2008</year>
32       <year>2009</year>
33       <year>2010</year>
34       <year>2011</year>
35       <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
36     </copyright>
37     <copyright>
38       <year>2000</year>
39       <year>2001</year>
40       <year>2002</year>
41       <year>2003</year>
42       <holder>Internet Software Consortium.</holder>
43     </copyright>
44   </bookinfo>
45
46   <chapter id="Bv9ARM.ch01">
47     <title>Introduction</title>
48     <para>
49       The Internet Domain Name System (<acronym>DNS</acronym>)
50       consists of the syntax
51       to specify the names of entities in the Internet in a hierarchical
52       manner, the rules used for delegating authority over names, and the
53       system implementation that actually maps names to Internet
54       addresses.  <acronym>DNS</acronym> data is maintained in a
55       group of distributed
56       hierarchical databases.
57     </para>
58
59     <sect1>
60       <title>Scope of Document</title>
61
62       <para>
63         The Berkeley Internet Name Domain
64         (<acronym>BIND</acronym>) implements a
65         domain name server for a number of operating systems. This
66         document provides basic information about the installation and
67         care of the Internet Systems Consortium (<acronym>ISC</acronym>)
68         <acronym>BIND</acronym> version 9 software package for
69         system administrators.
70       </para>
71
72       <para>
73         This version of the manual corresponds to BIND version 9.8.
74       </para>
75
76     </sect1>
77     <sect1>
78       <title>Organization of This Document</title>
79       <para>
80         In this document, <emphasis>Chapter 1</emphasis> introduces
81         the basic <acronym>DNS</acronym> and <acronym>BIND</acronym> concepts. <emphasis>Chapter 2</emphasis>
82         describes resource requirements for running <acronym>BIND</acronym> in various
83         environments. Information in <emphasis>Chapter 3</emphasis> is
84         <emphasis>task-oriented</emphasis> in its presentation and is
85         organized functionally, to aid in the process of installing the
86         <acronym>BIND</acronym> 9 software. The task-oriented
87         section is followed by
88         <emphasis>Chapter 4</emphasis>, which contains more advanced
89         concepts that the system administrator may need for implementing
90         certain options. <emphasis>Chapter 5</emphasis>
91         describes the <acronym>BIND</acronym> 9 lightweight
92         resolver.  The contents of <emphasis>Chapter 6</emphasis> are
93         organized as in a reference manual to aid in the ongoing
94         maintenance of the software. <emphasis>Chapter 7</emphasis> addresses
95         security considerations, and
96         <emphasis>Chapter 8</emphasis> contains troubleshooting help. The
97         main body of the document is followed by several
98         <emphasis>appendices</emphasis> which contain useful reference
99         information, such as a <emphasis>bibliography</emphasis> and
100         historic information related to <acronym>BIND</acronym>
101         and the Domain Name
102         System.
103       </para>
104     </sect1>
105     <sect1>
106       <title>Conventions Used in This Document</title>
107
108       <para>
109         In this document, we use the following general typographic
110         conventions:
111       </para>
112
113       <informaltable>
114         <tgroup cols="2">
115           <colspec colname="1" colnum="1" colwidth="3.000in"/>
116           <colspec colname="2" colnum="2" colwidth="2.625in"/>
117           <tbody>
118             <row>
119               <entry colname="1">
120                 <para>
121                   <emphasis>To describe:</emphasis>
122                 </para>
123               </entry>
124               <entry colname="2">
125                 <para>
126                   <emphasis>We use the style:</emphasis>
127                 </para>
128               </entry>
129             </row>
130             <row>
131               <entry colname="1">
132                 <para>
133                   a pathname, filename, URL, hostname,
134                   mailing list name, or new term or concept
135                 </para>
136               </entry>
137               <entry colname="2">
138                 <para>
139                   <filename>Fixed width</filename>
140                 </para>
141               </entry>
142             </row>
143             <row>
144               <entry colname="1">
145                 <para>
146                   literal user
147                   input
148                 </para>
149               </entry>
150               <entry colname="2">
151                 <para>
152                   <userinput>Fixed Width Bold</userinput>
153                 </para>
154               </entry>
155             </row>
156             <row>
157               <entry colname="1">
158                 <para>
159                   program output
160                 </para>
161               </entry>
162               <entry colname="2">
163                 <para>
164                   <computeroutput>Fixed Width</computeroutput>
165                 </para>
166               </entry>
167             </row>
168           </tbody>
169         </tgroup>
170       </informaltable>
171
172       <para>
173         The following conventions are used in descriptions of the
174         <acronym>BIND</acronym> configuration file:<informaltable colsep="0" frame="all" rowsep="0">
175                   <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
176                       <colspec colname="1" colnum="1" colsep="0" colwidth="3.000in"/>
177             <colspec colname="2" colnum="2" colsep="0" colwidth="2.625in"/>
178             <tbody>
179               <row rowsep="0">
180                 <entry colname="1" colsep="1" rowsep="1">
181                   <para>
182                     <emphasis>To describe:</emphasis>
183                   </para>
184                 </entry>
185                 <entry colname="2" rowsep="1">
186                   <para>
187                     <emphasis>We use the style:</emphasis>
188                   </para>
189                 </entry>
190               </row>
191               <row rowsep="0">
192                 <entry colname="1" colsep="1" rowsep="1">
193                   <para>
194                     keywords
195                   </para>
196                 </entry>
197                 <entry colname="2" rowsep="1">
198                   <para>
199                     <literal>Fixed Width</literal>
200                   </para>
201                 </entry>
202               </row>
203               <row rowsep="0">
204                 <entry colname="1" colsep="1" rowsep="1">
205                   <para>
206                     variables
207                   </para>
208                 </entry>
209                 <entry colname="2" rowsep="1">
210                   <para>
211                     <varname>Fixed Width</varname>
212                   </para>
213                 </entry>
214               </row>
215               <row rowsep="0">
216                 <entry colname="1" colsep="1">
217                   <para>
218                     Optional input
219                   </para>
220                 </entry>
221                 <entry colname="2">
222                   <para>
223                     <optional>Text is enclosed in square brackets</optional>
224                   </para>
225                 </entry>
226               </row>
227             </tbody>
228           </tgroup>
229         </informaltable>
230       </para>
231     </sect1>
232     <sect1>
233       <title>The Domain Name System (<acronym>DNS</acronym>)</title>
234       <para>
235         The purpose of this document is to explain the installation
236         and upkeep of the <acronym>BIND</acronym> (Berkeley Internet
237         Name Domain) software package, and we
238         begin by reviewing the fundamentals of the Domain Name System
239         (<acronym>DNS</acronym>) as they relate to <acronym>BIND</acronym>.
240       </para>
241
242       <sect2>
243         <title>DNS Fundamentals</title>
244
245         <para>
246           The Domain Name System (DNS) is a hierarchical, distributed
247           database.  It stores information for mapping Internet host names to
248           IP
249           addresses and vice versa, mail routing information, and other data
250           used by Internet applications.
251         </para>
252
253         <para>
254           Clients look up information in the DNS by calling a
255           <emphasis>resolver</emphasis> library, which sends queries to one or
256           more <emphasis>name servers</emphasis> and interprets the responses.
257           The <acronym>BIND</acronym> 9 software distribution
258           contains a
259           name server, <command>named</command>, and a resolver
260           library, <command>liblwres</command>.  The older
261           <command>libbind</command> resolver library is also available
262           from ISC as a separate download.
263         </para>
264
265         </sect2><sect2>
266         <title>Domains and Domain Names</title>
267
268         <para>
269           The data stored in the DNS is identified by <emphasis>domain names</emphasis> that are organized as a tree according to
270           organizational or administrative boundaries. Each node of the tree,
271           called a <emphasis>domain</emphasis>, is given a label. The domain
272           name of the
273           node is the concatenation of all the labels on the path from the
274           node to the <emphasis>root</emphasis> node.  This is represented
275           in written form as a string of labels listed from right to left and
276           separated by dots. A label need only be unique within its parent
277           domain.
278         </para>
279
280         <para>
281           For example, a domain name for a host at the
282           company <emphasis>Example, Inc.</emphasis> could be
283           <literal>ourhost.example.com</literal>,
284           where <literal>com</literal> is the
285           top level domain to which
286           <literal>ourhost.example.com</literal> belongs,
287           <literal>example</literal> is
288           a subdomain of <literal>com</literal>, and
289           <literal>ourhost</literal> is the
290           name of the host.
291         </para>
292
293         <para>
294           For administrative purposes, the name space is partitioned into
295           areas called <emphasis>zones</emphasis>, each starting at a node and
296           extending down to the leaf nodes or to nodes where other zones
297           start.
298           The data for each zone is stored in a <emphasis>name server</emphasis>, which answers queries about the zone using the
299           <emphasis>DNS protocol</emphasis>.
300         </para>
301
302         <para>
303           The data associated with each domain name is stored in the
304           form of <emphasis>resource records</emphasis> (<acronym>RR</acronym>s).
305           Some of the supported resource record types are described in
306           <xref linkend="types_of_resource_records_and_when_to_use_them"/>.
307         </para>
308
309         <para>
310           For more detailed information about the design of the DNS and
311           the DNS protocol, please refer to the standards documents listed in
312           <xref linkend="rfcs"/>.
313         </para>
314       </sect2>
315
316       <sect2>
317         <title>Zones</title>
318         <para>
319           To properly operate a name server, it is important to understand
320           the difference between a <emphasis>zone</emphasis>
321           and a <emphasis>domain</emphasis>.
322         </para>
323
324         <para>
325           As stated previously, a zone is a point of delegation in
326           the <acronym>DNS</acronym> tree. A zone consists of
327           those contiguous parts of the domain
328           tree for which a name server has complete information and over which
329           it has authority. It contains all domain names from a certain point
330           downward in the domain tree except those which are delegated to
331           other zones. A delegation point is marked by one or more
332           <emphasis>NS records</emphasis> in the
333           parent zone, which should be matched by equivalent NS records at
334           the root of the delegated zone.
335         </para>
336
337         <para>
338           For instance, consider the <literal>example.com</literal>
339           domain which includes names
340           such as <literal>host.aaa.example.com</literal> and
341           <literal>host.bbb.example.com</literal> even though
342           the <literal>example.com</literal> zone includes
343           only delegations for the <literal>aaa.example.com</literal> and
344           <literal>bbb.example.com</literal> zones.  A zone can
345           map
346           exactly to a single domain, but could also include only part of a
347           domain, the rest of which could be delegated to other
348           name servers. Every name in the <acronym>DNS</acronym>
349           tree is a
350           <emphasis>domain</emphasis>, even if it is
351           <emphasis>terminal</emphasis>, that is, has no
352           <emphasis>subdomains</emphasis>.  Every subdomain is a domain and
353           every domain except the root is also a subdomain. The terminology is
354           not intuitive and we suggest that you read RFCs 1033, 1034 and 1035
355           to
356           gain a complete understanding of this difficult and subtle
357           topic.
358         </para>
359
360         <para>
361           Though <acronym>BIND</acronym> is called a "domain name
362           server",
363           it deals primarily in terms of zones. The master and slave
364           declarations in the <filename>named.conf</filename> file
365           specify
366           zones, not domains. When you ask some other site if it is willing to
367           be a slave server for your <emphasis>domain</emphasis>, you are
368           actually asking for slave service for some collection of zones.
369         </para>
370       </sect2>
371
372       <sect2>
373         <title>Authoritative Name Servers</title>
374
375         <para>
376           Each zone is served by at least
377           one <emphasis>authoritative name server</emphasis>,
378           which contains the complete data for the zone.
379           To make the DNS tolerant of server and network failures,
380           most zones have two or more authoritative servers, on
381           different networks.
382         </para>
383
384         <para>
385           Responses from authoritative servers have the "authoritative
386           answer" (AA) bit set in the response packets.  This makes them
387           easy to identify when debugging DNS configurations using tools like
388           <command>dig</command> (<xref linkend="diagnostic_tools"/>).
389         </para>
390
391         <sect3>
392           <title>The Primary Master</title>
393
394           <para>
395             The authoritative server where the master copy of the zone
396             data is maintained is called the
397             <emphasis>primary master</emphasis> server, or simply the
398             <emphasis>primary</emphasis>.  Typically it loads the zone
399             contents from some local file edited by humans or perhaps
400             generated mechanically from some other local file which is
401             edited by humans.  This file is called the
402             <emphasis>zone file</emphasis> or
403             <emphasis>master file</emphasis>.
404           </para>
405
406           <para>
407             In some cases, however, the master file may not be edited
408             by humans at all, but may instead be the result of
409             <emphasis>dynamic update</emphasis> operations.
410           </para>
411         </sect3>
412
413         <sect3>
414           <title>Slave Servers</title>
415           <para>
416             The other authoritative servers, the <emphasis>slave</emphasis>
417             servers (also known as <emphasis>secondary</emphasis> servers)
418             load
419             the zone contents from another server using a replication process
420             known as a <emphasis>zone transfer</emphasis>.  Typically the data
421             are
422             transferred directly from the primary master, but it is also
423             possible
424             to transfer it from another slave.  In other words, a slave server
425             may itself act as a master to a subordinate slave server.
426           </para>
427         </sect3>
428
429         <sect3>
430           <title>Stealth Servers</title>
431
432           <para>
433             Usually all of the zone's authoritative servers are listed in
434             NS records in the parent zone.  These NS records constitute
435             a <emphasis>delegation</emphasis> of the zone from the parent.
436             The authoritative servers are also listed in the zone file itself,
437             at the <emphasis>top level</emphasis> or <emphasis>apex</emphasis>
438             of the zone.  You can list servers in the zone's top-level NS
439             records that are not in the parent's NS delegation, but you cannot
440             list servers in the parent's delegation that are not present at
441             the zone's top level.
442           </para>
443
444           <para>
445             A <emphasis>stealth server</emphasis> is a server that is
446             authoritative for a zone but is not listed in that zone's NS
447             records.  Stealth servers can be used for keeping a local copy of
448             a
449             zone to speed up access to the zone's records or to make sure that
450             the
451             zone is available even if all the "official" servers for the zone
452             are
453             inaccessible.
454           </para>
455
456           <para>
457             A configuration where the primary master server itself is a
458             stealth server is often referred to as a "hidden primary"
459             configuration.  One use for this configuration is when the primary
460             master
461             is behind a firewall and therefore unable to communicate directly
462             with the outside world.
463           </para>
464
465         </sect3>
466
467       </sect2>
468       <sect2>
469
470         <title>Caching Name Servers</title>
471
472         <!--
473           - Terminology here is inconsistent.  Probably ought to
474           - convert to using "recursive name server" everywhere
475           - with just a note about "caching" terminology.
476           -->
477
478         <para>
479           The resolver libraries provided by most operating systems are
480           <emphasis>stub resolvers</emphasis>, meaning that they are not
481           capable of
482           performing the full DNS resolution process by themselves by talking
483           directly to the authoritative servers.  Instead, they rely on a
484           local
485           name server to perform the resolution on their behalf.  Such a
486           server
487           is called a <emphasis>recursive</emphasis> name server; it performs
488           <emphasis>recursive lookups</emphasis> for local clients.
489         </para>
490
491         <para>
492           To improve performance, recursive servers cache the results of
493           the lookups they perform.  Since the processes of recursion and
494           caching are intimately connected, the terms
495           <emphasis>recursive server</emphasis> and
496           <emphasis>caching server</emphasis> are often used synonymously.
497         </para>
498
499         <para>
500           The length of time for which a record may be retained in
501           the cache of a caching name server is controlled by the
502           Time To Live (TTL) field associated with each resource record.
503         </para>
504
505         <sect3>
506           <title>Forwarding</title>
507
508           <para>
509             Even a caching name server does not necessarily perform
510             the complete recursive lookup itself.  Instead, it can
511             <emphasis>forward</emphasis> some or all of the queries
512             that it cannot satisfy from its cache to another caching name
513             server,
514             commonly referred to as a <emphasis>forwarder</emphasis>.
515           </para>
516
517           <para>
518             There may be one or more forwarders,
519             and they are queried in turn until the list is exhausted or an
520             answer
521             is found. Forwarders are typically used when you do not
522             wish all the servers at a given site to interact directly with the
523             rest of
524             the Internet servers. A typical scenario would involve a number
525             of internal <acronym>DNS</acronym> servers and an
526             Internet firewall. Servers unable
527             to pass packets through the firewall would forward to the server
528             that can do it, and that server would query the Internet <acronym>DNS</acronym> servers
529             on the internal server's behalf.
530           </para>
531         </sect3>
532
533       </sect2>
534
535       <sect2>
536         <title>Name Servers in Multiple Roles</title>
537
538         <para>
539           The <acronym>BIND</acronym> name server can
540           simultaneously act as
541           a master for some zones, a slave for other zones, and as a caching
542           (recursive) server for a set of local clients.
543         </para>
544
545         <para>
546           However, since the functions of authoritative name service
547           and caching/recursive name service are logically separate, it is
548           often advantageous to run them on separate server machines.
549
550           A server that only provides authoritative name service
551           (an <emphasis>authoritative-only</emphasis> server) can run with
552           recursion disabled, improving reliability and security.
553
554           A server that is not authoritative for any zones and only provides
555           recursive service to local
556           clients (a <emphasis>caching-only</emphasis> server)
557           does not need to be reachable from the Internet at large and can
558           be placed inside a firewall.
559         </para>
560
561       </sect2>
562     </sect1>
563
564   </chapter>
565
566   <chapter id="Bv9ARM.ch02">
567     <title><acronym>BIND</acronym> Resource Requirements</title>
568
569     <sect1>
570       <title>Hardware requirements</title>
571
572       <para>
573         <acronym>DNS</acronym> hardware requirements have
574         traditionally been quite modest.
575         For many installations, servers that have been pensioned off from
576         active duty have performed admirably as <acronym>DNS</acronym> servers.
577       </para>
578       <para>
579         The DNSSEC features of <acronym>BIND</acronym> 9
580         may prove to be quite
581         CPU intensive however, so organizations that make heavy use of these
582         features may wish to consider larger systems for these applications.
583         <acronym>BIND</acronym> 9 is fully multithreaded, allowing
584         full utilization of
585         multiprocessor systems for installations that need it.
586       </para>
587     </sect1>
588     <sect1>
589       <title>CPU Requirements</title>
590       <para>
591         CPU requirements for <acronym>BIND</acronym> 9 range from
592         i486-class machines
593         for serving of static zones without caching, to enterprise-class
594         machines if you intend to process many dynamic updates and DNSSEC
595         signed zones, serving many thousands of queries per second.
596       </para>
597     </sect1>
598
599     <sect1>
600       <title>Memory Requirements</title>
601       <para>
602         The memory of the server has to be large enough to fit the
603         cache and zones loaded off disk.  The <command>max-cache-size</command>
604         option can be used to limit the amount of memory used by the cache,
605         at the expense of reducing cache hit rates and causing more <acronym>DNS</acronym>
606         traffic.
607         Additionally, if additional section caching
608         (<xref linkend="acache"/>) is enabled,
609         the <command>max-acache-size</command> option can be used to
610         limit the amount
611         of memory used by the mechanism.
612         It is still good practice to have enough memory to load
613         all zone and cache data into memory &mdash; unfortunately, the best
614         way
615         to determine this for a given installation is to watch the name server
616         in operation. After a few weeks the server process should reach
617         a relatively stable size where entries are expiring from the cache as
618         fast as they are being inserted.
619       </para>
620       <!--
621         - Add something here about leaving overhead for attacks?
622         - How much overhead?  Percentage?
623         -->
624     </sect1>
625
626     <sect1>
627       <title>Name Server Intensive Environment Issues</title>
628       <para>
629         For name server intensive environments, there are two alternative
630         configurations that may be used. The first is where clients and
631         any second-level internal name servers query a main name server, which
632         has enough memory to build a large cache. This approach minimizes
633         the bandwidth used by external name lookups. The second alternative
634         is to set up second-level internal name servers to make queries
635         independently.
636         In this configuration, none of the individual machines needs to
637         have as much memory or CPU power as in the first alternative, but
638         this has the disadvantage of making many more external queries,
639         as none of the name servers share their cached data.
640       </para>
641     </sect1>
642
643     <sect1>
644       <title>Supported Operating Systems</title>
645       <para>
646         ISC <acronym>BIND</acronym> 9 compiles and runs on a large
647         number
648         of Unix-like operating systems and on 
649         Microsoft Windows Server 2003 and 2008, and Windows XP and Vista.
650         For an up-to-date
651         list of supported systems, see the README file in the top level
652         directory
653         of the BIND 9 source distribution.
654       </para>
655     </sect1>
656   </chapter>
657
658   <chapter id="Bv9ARM.ch03">
659     <title>Name Server Configuration</title>
660     <para>
661       In this chapter we provide some suggested configurations along
662       with guidelines for their use.  We suggest reasonable values for
663       certain option settings.
664     </para>
665
666     <sect1 id="sample_configuration">
667       <title>Sample Configurations</title>
668       <sect2>
669         <title>A Caching-only Name Server</title>
670         <para>
671           The following sample configuration is appropriate for a caching-only
672           name server for use by clients internal to a corporation.  All
673           queries
674           from outside clients are refused using the <command>allow-query</command>
675           option.  Alternatively, the same effect could be achieved using
676           suitable
677           firewall rules.
678         </para>
679
680 <programlisting>
681 // Two corporate subnets we wish to allow queries from.
682 acl corpnets { 192.168.4.0/24; 192.168.7.0/24; };
683 options {
684      // Working directory
685      directory "/etc/namedb";
686
687      allow-query { corpnets; };
688 };
689 // Provide a reverse mapping for the loopback
690 // address 127.0.0.1
691 zone "0.0.127.in-addr.arpa" {
692      type master;
693      file "localhost.rev";
694      notify no;
695 };
696 </programlisting>
697
698       </sect2>
699
700       <sect2>
701         <title>An Authoritative-only Name Server</title>
702         <para>
703           This sample configuration is for an authoritative-only server
704           that is the master server for "<filename>example.com</filename>"
705           and a slave for the subdomain "<filename>eng.example.com</filename>".
706         </para>
707
708 <programlisting>
709 options {
710      // Working directory
711      directory "/etc/namedb";
712      // Do not allow access to cache
713      allow-query-cache { none; };
714      // This is the default
715      allow-query { any; };
716      // Do not provide recursive service
717      recursion no;
718 };
719
720 // Provide a reverse mapping for the loopback
721 // address 127.0.0.1
722 zone "0.0.127.in-addr.arpa" {
723      type master;
724      file "localhost.rev";
725      notify no;
726 };
727 // We are the master server for example.com
728 zone "example.com" {
729      type master;
730      file "example.com.db";
731      // IP addresses of slave servers allowed to
732      // transfer example.com
733      allow-transfer {
734           192.168.4.14;
735           192.168.5.53;
736      };
737 };
738 // We are a slave server for eng.example.com
739 zone "eng.example.com" {
740      type slave;
741      file "eng.example.com.bk";
742      // IP address of eng.example.com master server
743      masters { 192.168.4.12; };
744 };
745 </programlisting>
746
747       </sect2>
748     </sect1>
749
750     <sect1>
751       <title>Load Balancing</title>
752       <!--
753         - Add explanation of why load balancing is fragile at best
754         - and completely pointless in the general case.
755         -->
756
757       <para>
758         A primitive form of load balancing can be achieved in
759         the <acronym>DNS</acronym> by using multiple records
760         (such as multiple A records) for one name.
761       </para>
762
763       <para>
764         For example, if you have three WWW servers with network addresses
765         of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
766         following means that clients will connect to each machine one third
767         of the time:
768       </para>
769
770       <informaltable colsep="0" rowsep="0">
771         <tgroup cols="5" colsep="0" rowsep="0" tgroupstyle="2Level-table">
772           <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
773           <colspec colname="2" colnum="2" colsep="0" colwidth="0.500in"/>
774           <colspec colname="3" colnum="3" colsep="0" colwidth="0.750in"/>
775           <colspec colname="4" colnum="4" colsep="0" colwidth="0.750in"/>
776           <colspec colname="5" colnum="5" colsep="0" colwidth="2.028in"/>
777           <tbody>
778             <row rowsep="0">
779               <entry colname="1">
780                 <para>
781                   Name
782                 </para>
783               </entry>
784               <entry colname="2">
785                 <para>
786                   TTL
787                 </para>
788               </entry>
789               <entry colname="3">
790                 <para>
791                   CLASS
792                 </para>
793               </entry>
794               <entry colname="4">
795                 <para>
796                   TYPE
797                 </para>
798               </entry>
799               <entry colname="5">
800                 <para>
801                   Resource Record (RR) Data
802                 </para>
803               </entry>
804             </row>
805             <row rowsep="0">
806               <entry colname="1">
807                 <para>
808                   <literal>www</literal>
809                 </para>
810               </entry>
811               <entry colname="2">
812                 <para>
813                   <literal>600</literal>
814                 </para>
815               </entry>
816               <entry colname="3">
817                 <para>
818                   <literal>IN</literal>
819                 </para>
820               </entry>
821               <entry colname="4">
822                 <para>
823                   <literal>A</literal>
824                 </para>
825               </entry>
826               <entry colname="5">
827                 <para>
828                   <literal>10.0.0.1</literal>
829                 </para>
830               </entry>
831             </row>
832             <row rowsep="0">
833               <entry colname="1">
834                 <para/>
835               </entry>
836               <entry colname="2">
837                 <para>
838                   <literal>600</literal>
839                 </para>
840               </entry>
841               <entry colname="3">
842                 <para>
843                   <literal>IN</literal>
844                 </para>
845               </entry>
846               <entry colname="4">
847                 <para>
848                   <literal>A</literal>
849                 </para>
850               </entry>
851               <entry colname="5">
852                 <para>
853                   <literal>10.0.0.2</literal>
854                 </para>
855               </entry>
856             </row>
857             <row rowsep="0">
858               <entry colname="1">
859                 <para/>
860               </entry>
861               <entry colname="2">
862                 <para>
863                   <literal>600</literal>
864                 </para>
865               </entry>
866               <entry colname="3">
867                 <para>
868                   <literal>IN</literal>
869                 </para>
870               </entry>
871               <entry colname="4">
872                 <para>
873                   <literal>A</literal>
874                 </para>
875               </entry>
876               <entry colname="5">
877                 <para>
878                   <literal>10.0.0.3</literal>
879                 </para>
880               </entry>
881             </row>
882           </tbody>
883         </tgroup>
884       </informaltable>
885       <para>
886         When a resolver queries for these records, <acronym>BIND</acronym> will rotate
887         them and respond to the query with the records in a different
888         order.  In the example above, clients will randomly receive
889         records in the order 1, 2, 3; 2, 3, 1; and 3, 1, 2. Most clients
890         will use the first record returned and discard the rest.
891       </para>
892       <para>
893         For more detail on ordering responses, check the
894         <command>rrset-order</command> sub-statement in the
895         <command>options</command> statement, see
896         <xref endterm="rrset_ordering_title" linkend="rrset_ordering"/>.
897       </para>
898
899     </sect1>
900
901     <sect1>
902       <title>Name Server Operations</title>
903
904       <sect2>
905         <title>Tools for Use With the Name Server Daemon</title>
906         <para>
907           This section describes several indispensable diagnostic,
908           administrative and monitoring tools available to the system
909           administrator for controlling and debugging the name server
910           daemon.
911         </para>
912         <sect3 id="diagnostic_tools">
913           <title>Diagnostic Tools</title>
914           <para>
915             The <command>dig</command>, <command>host</command>, and
916             <command>nslookup</command> programs are all command
917             line tools
918             for manually querying name servers.  They differ in style and
919             output format.
920           </para>
921
922           <variablelist>
923             <varlistentry>
924               <term id="dig"><command>dig</command></term>
925               <listitem>
926                 <para>
927                   The domain information groper (<command>dig</command>)
928                   is the most versatile and complete of these lookup tools.
929                   It has two modes: simple interactive
930                   mode for a single query, and batch mode which executes a
931                   query for
932                   each in a list of several query lines. All query options are
933                   accessible
934                   from the command line.
935                 </para>
936                 <cmdsynopsis label="Usage">
937                   <command>dig</command>
938                   <arg>@<replaceable>server</replaceable></arg>
939                   <arg choice="plain"><replaceable>domain</replaceable></arg>
940                   <arg><replaceable>query-type</replaceable></arg>
941                   <arg><replaceable>query-class</replaceable></arg>
942                   <arg>+<replaceable>query-option</replaceable></arg>
943                   <arg>-<replaceable>dig-option</replaceable></arg>
944                   <arg>%<replaceable>comment</replaceable></arg>
945                 </cmdsynopsis>
946                 <para>
947                   The usual simple use of <command>dig</command> will take the form
948                 </para>
949                 <simpara>
950                   <command>dig @server domain query-type query-class</command>
951                 </simpara>
952                 <para>
953                   For more information and a list of available commands and
954                   options, see the <command>dig</command> man
955                   page.
956                 </para>
957               </listitem>
958             </varlistentry>
959
960             <varlistentry>
961               <term><command>host</command></term>
962               <listitem>
963                 <para>
964                   The <command>host</command> utility emphasizes
965                   simplicity
966                   and ease of use.  By default, it converts
967                   between host names and Internet addresses, but its
968                   functionality
969                   can be extended with the use of options.
970                 </para>
971                 <cmdsynopsis label="Usage">
972                   <command>host</command>
973                   <arg>-aCdlnrsTwv</arg>
974                   <arg>-c <replaceable>class</replaceable></arg>
975                   <arg>-N <replaceable>ndots</replaceable></arg>
976                   <arg>-t <replaceable>type</replaceable></arg>
977                   <arg>-W <replaceable>timeout</replaceable></arg>
978                   <arg>-R <replaceable>retries</replaceable></arg>
979                   <arg>-m <replaceable>flag</replaceable></arg>
980                   <arg>-4</arg>
981                   <arg>-6</arg>
982                   <arg choice="plain"><replaceable>hostname</replaceable></arg>
983                   <arg><replaceable>server</replaceable></arg>
984                 </cmdsynopsis>
985                 <para>
986                   For more information and a list of available commands and
987                   options, see the <command>host</command> man
988                   page.
989                 </para>
990               </listitem>
991             </varlistentry>
992
993             <varlistentry>
994               <term><command>nslookup</command></term>
995               <listitem>
996                 <para><command>nslookup</command>
997                   has two modes: interactive and
998                   non-interactive. Interactive mode allows the user to
999                   query name servers for information about various
1000                   hosts and domains or to print a list of hosts in a
1001                   domain. Non-interactive mode is used to print just
1002                   the name and requested information for a host or
1003                   domain.
1004                 </para>
1005                 <cmdsynopsis label="Usage">
1006                   <command>nslookup</command>
1007                   <arg rep="repeat">-option</arg>
1008                   <group>
1009                     <arg><replaceable>host-to-find</replaceable></arg>
1010                     <arg>- <arg>server</arg></arg>
1011                   </group>
1012                 </cmdsynopsis>
1013                 <para>
1014                   Interactive mode is entered when no arguments are given (the
1015                   default name server will be used) or when the first argument
1016                   is a
1017                   hyphen (`-') and the second argument is the host name or
1018                   Internet address
1019                   of a name server.
1020                 </para>
1021                 <para>
1022                   Non-interactive mode is used when the name or Internet
1023                   address
1024                   of the host to be looked up is given as the first argument.
1025                   The
1026                   optional second argument specifies the host name or address
1027                   of a name server.
1028                 </para>
1029                 <para>
1030                   Due to its arcane user interface and frequently inconsistent
1031                   behavior, we do not recommend the use of <command>nslookup</command>.
1032                   Use <command>dig</command> instead.
1033                 </para>
1034               </listitem>
1035
1036             </varlistentry>
1037           </variablelist>
1038         </sect3>
1039
1040         <sect3 id="admin_tools">
1041           <title>Administrative Tools</title>
1042           <para>
1043             Administrative tools play an integral part in the management
1044             of a server.
1045           </para>
1046           <variablelist>
1047             <varlistentry id="named-checkconf" xreflabel="Named Configuration Checking application">
1048
1049               <term><command>named-checkconf</command></term>
1050               <listitem>
1051                 <para>
1052                   The <command>named-checkconf</command> program
1053                   checks the syntax of a <filename>named.conf</filename> file.
1054                 </para>
1055                 <cmdsynopsis label="Usage">
1056                   <command>named-checkconf</command>
1057                   <arg>-jvz</arg>
1058                   <arg>-t <replaceable>directory</replaceable></arg>
1059                   <arg><replaceable>filename</replaceable></arg>
1060                 </cmdsynopsis>
1061               </listitem>
1062             </varlistentry>
1063             <varlistentry id="named-checkzone" xreflabel="Zone Checking application">
1064
1065               <term><command>named-checkzone</command></term>
1066               <listitem>
1067                 <para>
1068                   The <command>named-checkzone</command> program
1069                   checks a master file for
1070                   syntax and consistency.
1071                 </para>
1072                 <cmdsynopsis label="Usage">
1073                   <command>named-checkzone</command>
1074                   <arg>-djqvD</arg>
1075                   <arg>-c <replaceable>class</replaceable></arg>
1076                   <arg>-o <replaceable>output</replaceable></arg>
1077                   <arg>-t <replaceable>directory</replaceable></arg>
1078                   <arg>-w <replaceable>directory</replaceable></arg>
1079                   <arg>-k <replaceable>(ignore|warn|fail)</replaceable></arg>
1080                   <arg>-n <replaceable>(ignore|warn|fail)</replaceable></arg>
1081                   <arg>-W <replaceable>(ignore|warn)</replaceable></arg>
1082                   <arg choice="plain"><replaceable>zone</replaceable></arg>
1083                   <arg><replaceable>filename</replaceable></arg>
1084                 </cmdsynopsis>
1085               </listitem>
1086             </varlistentry>
1087             <varlistentry id="named-compilezone" xreflabel="Zone Compilation application">
1088               <term><command>named-compilezone</command></term>
1089               <listitem>
1090                 <para>
1091                   Similar to <command>named-checkzone,</command> but
1092                   it always dumps the zone content to a specified file
1093                   (typically in a different format).
1094                 </para>
1095               </listitem>
1096             </varlistentry>
1097             <varlistentry id="rndc" xreflabel="Remote Name Daemon Control application">
1098
1099               <term><command>rndc</command></term>
1100               <listitem>
1101                 <para>
1102                   The remote name daemon control
1103                   (<command>rndc</command>) program allows the
1104                   system
1105                   administrator to control the operation of a name server.
1106                   Since <acronym>BIND</acronym> 9.2, <command>rndc</command>
1107                   supports all the commands of the BIND 8 <command>ndc</command>
1108                   utility except <command>ndc start</command> and
1109                   <command>ndc restart</command>, which were also
1110                   not supported in <command>ndc</command>'s
1111                   channel mode.
1112                   If you run <command>rndc</command> without any
1113                   options
1114                   it will display a usage message as follows:
1115                 </para>
1116                 <cmdsynopsis label="Usage">
1117                   <command>rndc</command>
1118                   <arg>-c <replaceable>config</replaceable></arg>
1119                   <arg>-s <replaceable>server</replaceable></arg>
1120                   <arg>-p <replaceable>port</replaceable></arg>
1121                   <arg>-y <replaceable>key</replaceable></arg>
1122                   <arg choice="plain"><replaceable>command</replaceable></arg>
1123                   <arg rep="repeat"><replaceable>command</replaceable></arg>
1124                 </cmdsynopsis>
1125                 <para>The <command>command</command>
1126                   is one of the following:
1127                 </para>
1128
1129                 <variablelist>
1130
1131                   <varlistentry>
1132                     <term><userinput>reload</userinput></term>
1133                     <listitem>
1134                       <para>
1135                         Reload configuration file and zones.
1136                       </para>
1137                     </listitem>
1138                   </varlistentry>
1139
1140                   <varlistentry>
1141                     <term><userinput>reload <replaceable>zone</replaceable>
1142                         <optional><replaceable>class</replaceable>
1143            <optional><replaceable>view</replaceable></optional></optional></userinput></term>
1144                     <listitem>
1145                       <para>
1146                         Reload the given zone.
1147                       </para>
1148                     </listitem>
1149                   </varlistentry>
1150
1151                   <varlistentry>
1152                     <term><userinput>refresh <replaceable>zone</replaceable>
1153                         <optional><replaceable>class</replaceable>
1154            <optional><replaceable>view</replaceable></optional></optional></userinput></term>
1155                     <listitem>
1156                       <para>
1157                         Schedule zone maintenance for the given zone.
1158                       </para>
1159                     </listitem>
1160                   </varlistentry>
1161
1162                   <varlistentry>
1163                     <term><userinput>retransfer <replaceable>zone</replaceable>
1164
1165                         <optional><replaceable>class</replaceable>
1166            <optional><replaceable>view</replaceable></optional></optional></userinput></term>
1167                     <listitem>
1168                       <para>
1169                         Retransfer the given zone from the master.
1170                       </para>
1171                     </listitem>
1172                   </varlistentry>
1173
1174                   <varlistentry>
1175                     <term><userinput>sign <replaceable>zone</replaceable>
1176                         <optional><replaceable>class</replaceable>
1177            <optional><replaceable>view</replaceable></optional></optional></userinput></term>
1178                     <listitem>
1179                       <para>
1180                         Fetch all DNSSEC keys for the given zone
1181                         from the key directory (see
1182                         <command>key-directory</command> in
1183                         <xref linkend="options"/>).  If they are within
1184                         their publication period, merge them into the
1185                         zone's DNSKEY RRset.  If the DNSKEY RRset
1186                         is changed, then the zone is automatically
1187                         re-signed with the new key set.
1188                       </para>
1189                       <para>
1190                         This command requires that the
1191                         <command>auto-dnssec</command> zone option be set
1192                         to <literal>allow</literal> or
1193                         <literal>maintain</literal>,
1194                         and also requires the zone to be configured to
1195                         allow dynamic DNS.
1196                         See <xref linkend="dynamic_update_policies"/> for
1197                         more details.
1198                       </para>
1199                     </listitem>
1200                   </varlistentry>
1201
1202                   <varlistentry>
1203                     <term><userinput>loadkeys <replaceable>zone</replaceable>
1204                         <optional><replaceable>class</replaceable>
1205            <optional><replaceable>view</replaceable></optional></optional></userinput></term>
1206                     <listitem>
1207                       <para>
1208                         Fetch all DNSSEC keys for the given zone
1209                         from the key directory (see
1210                         <command>key-directory</command> in
1211                         <xref linkend="options"/>).  If they are within
1212                         their publication period, merge them into the
1213                         zone's DNSKEY RRset.  Unlike <command>rndc
1214                         sign</command>, however, the zone is not
1215                         immediately re-signed by the new keys, but is
1216                         allowed to incrementally re-sign over time.
1217                       </para>
1218                       <para>
1219                         This command requires that the
1220                         <command>auto-dnssec</command> zone option
1221                         be set to <literal>maintain</literal>,
1222                         and also requires the zone to be configured to
1223                         allow dynamic DNS.
1224                         See <xref linkend="dynamic_update_policies"/> for
1225                         more details.
1226                       </para>
1227                     </listitem>
1228                   </varlistentry>
1229
1230                   <varlistentry>
1231                     <term><userinput>freeze
1232                         <optional><replaceable>zone</replaceable>
1233        <optional><replaceable>class</replaceable>
1234            <optional><replaceable>view</replaceable></optional></optional></optional></userinput></term>
1235                     <listitem>
1236                       <para>
1237                         Suspend updates to a dynamic zone.  If no zone is
1238                         specified,
1239                         then all zones are suspended.  This allows manual
1240                         edits to be made to a zone normally updated by dynamic
1241                         update.  It
1242                         also causes changes in the journal file to be synced
1243                         into the master
1244                         and the journal file to be removed.  All dynamic
1245                         update attempts will
1246                         be refused while the zone is frozen.
1247                       </para>
1248                     </listitem>
1249                   </varlistentry>
1250
1251                   <varlistentry>
1252                     <term><userinput>thaw
1253                         <optional><replaceable>zone</replaceable>
1254        <optional><replaceable>class</replaceable>
1255            <optional><replaceable>view</replaceable></optional></optional></optional></userinput></term>
1256                     <listitem>
1257                       <para>
1258                         Enable updates to a frozen dynamic zone.  If no zone
1259                         is
1260                         specified, then all frozen zones are enabled.  This
1261                         causes
1262                         the server to reload the zone from disk, and
1263                         re-enables dynamic updates
1264                         after the load has completed.  After a zone is thawed,
1265                         dynamic updates
1266                         will no longer be refused.
1267                       </para>
1268                     </listitem>
1269                   </varlistentry>
1270
1271                   <varlistentry>
1272                     <term><userinput>notify <replaceable>zone</replaceable>
1273                         <optional><replaceable>class</replaceable>
1274            <optional><replaceable>view</replaceable></optional></optional></userinput></term>
1275                     <listitem>
1276                       <para>
1277                         Resend NOTIFY messages for the zone.
1278                       </para>
1279                     </listitem>
1280                   </varlistentry>
1281
1282                   <varlistentry>
1283                     <term><userinput>reconfig</userinput></term>
1284                     <listitem>
1285                       <para>
1286                         Reload the configuration file and load new zones,
1287                         but do not reload existing zone files even if they
1288                         have changed.
1289                         This is faster than a full <command>reload</command> when there
1290                         is a large number of zones because it avoids the need
1291                         to examine the
1292                         modification times of the zones files.
1293                       </para>
1294                     </listitem>
1295                   </varlistentry>
1296
1297                   <varlistentry>
1298                     <term><userinput>stats</userinput></term>
1299                     <listitem>
1300                       <para>
1301                         Write server statistics to the statistics file.
1302                       </para>
1303                     </listitem>
1304                   </varlistentry>
1305
1306                   <varlistentry>
1307                     <term><userinput>querylog</userinput></term>
1308                     <listitem>
1309                       <para>
1310                         Toggle query logging. Query logging can also be enabled
1311                         by explicitly directing the <command>queries</command>
1312                         <command>category</command> to a
1313                         <command>channel</command> in the
1314                         <command>logging</command> section of
1315                         <filename>named.conf</filename> or by specifying
1316                         <command>querylog yes;</command> in the
1317                         <command>options</command> section of
1318                         <filename>named.conf</filename>.
1319                       </para>
1320                     </listitem>
1321                   </varlistentry>
1322
1323                   <varlistentry>
1324                     <term><userinput>dumpdb
1325                         <optional>-all|-cache|-zone</optional>
1326                         <optional><replaceable>view ...</replaceable></optional></userinput></term>
1327                     <listitem>
1328                       <para>
1329                         Dump the server's caches (default) and/or zones to
1330                         the
1331                         dump file for the specified views.  If no view is
1332                         specified, all
1333                         views are dumped.
1334                       </para>
1335                     </listitem>
1336                   </varlistentry>
1337
1338                   <varlistentry>
1339                     <term><userinput>secroots
1340                         <optional><replaceable>view ...</replaceable></optional></userinput></term>
1341                     <listitem>
1342                       <para>
1343                         Dump the server's security roots to the secroots
1344                         file for the specified views.  If no view is
1345                         specified, security roots for all
1346                         views are dumped.
1347                       </para>
1348                     </listitem>
1349                   </varlistentry>
1350
1351                   <varlistentry>
1352                     <term><userinput>stop <optional>-p</optional></userinput></term>
1353                     <listitem>
1354                       <para>
1355                         Stop the server, making sure any recent changes
1356                         made through dynamic update or IXFR are first saved to
1357                         the master files of the updated zones.
1358                         If <option>-p</option> is specified <command>named</command>'s process id is returned.
1359                         This allows an external process to determine when <command>named</command>
1360                         had completed stopping.
1361                       </para>
1362                     </listitem>
1363                   </varlistentry>
1364
1365                   <varlistentry>
1366                     <term><userinput>halt <optional>-p</optional></userinput></term>
1367                     <listitem>
1368                       <para>
1369                         Stop the server immediately.  Recent changes
1370                         made through dynamic update or IXFR are not saved to
1371                         the master files, but will be rolled forward from the
1372                         journal files when the server is restarted.
1373                         If <option>-p</option> is specified <command>named</command>'s process id is returned.
1374                         This allows an external process to determine when <command>named</command>
1375                         had completed halting.
1376                       </para>
1377                     </listitem>
1378                   </varlistentry>
1379
1380                   <varlistentry>
1381                     <term><userinput>trace</userinput></term>
1382                     <listitem>
1383                       <para>
1384                         Increment the servers debugging level by one.
1385                       </para>
1386                     </listitem>
1387                   </varlistentry>
1388
1389                   <varlistentry>
1390                     <term><userinput>trace <replaceable>level</replaceable></userinput></term>
1391                     <listitem>
1392                       <para>
1393                         Sets the server's debugging level to an explicit
1394                         value.
1395                       </para>
1396                     </listitem>
1397                   </varlistentry>
1398
1399                   <varlistentry>
1400                     <term><userinput>notrace</userinput></term>
1401                     <listitem>
1402                       <para>
1403                         Sets the server's debugging level to 0.
1404                       </para>
1405                     </listitem>
1406                   </varlistentry>
1407
1408                   <varlistentry>
1409                     <term><userinput>flush</userinput></term>
1410                     <listitem>
1411                       <para>
1412                         Flushes the server's cache.
1413                       </para>
1414                     </listitem>
1415                   </varlistentry>
1416
1417                   <varlistentry>
1418                     <term><userinput>flushname</userinput> <replaceable>name</replaceable></term>
1419                     <listitem>
1420                       <para>
1421                         Flushes the given name from the server's cache.
1422                       </para>
1423                     </listitem>
1424                   </varlistentry>
1425
1426                   <varlistentry>
1427                     <term><userinput>status</userinput></term>
1428                     <listitem>
1429                       <para>
1430                         Display status of the server.
1431                         Note that the number of zones includes the internal <command>bind/CH</command> zone
1432                         and the default <command>./IN</command>
1433                         hint zone if there is not an
1434                         explicit root zone configured.
1435                       </para>
1436                     </listitem>
1437                   </varlistentry>
1438
1439                   <varlistentry>
1440                     <term><userinput>recursing</userinput></term>
1441                     <listitem>
1442                       <para>
1443                         Dump the list of queries <command>named</command> is currently recursing
1444                         on.
1445                       </para>
1446                     </listitem>
1447                   </varlistentry>
1448
1449                   <varlistentry>
1450                     <term><userinput>validation
1451                         <optional>on|off</optional>
1452                         <optional><replaceable>view ...</replaceable></optional>
1453                     </userinput></term>
1454                     <listitem>
1455                       <para>
1456                         Enable or disable DNSSEC validation.
1457                         Note <command>dnssec-enable</command> also needs to be
1458                         set to <userinput>yes</userinput> to be effective.
1459                         It defaults to enabled.
1460                       </para>
1461                     </listitem>
1462                   </varlistentry>
1463
1464                   <varlistentry>
1465                     <term><userinput>addzone
1466                         <replaceable>zone</replaceable>
1467                         <optional><replaceable>class</replaceable>
1468                         <optional><replaceable>view</replaceable></optional></optional>
1469                         <replaceable>configuration</replaceable>
1470                     </userinput></term>
1471                     <listitem>
1472                       <para>
1473                         Add a zone while the server is running.  This
1474                         command requires the
1475                         <command>allow-new-zones</command> option to be set
1476                         to <userinput>yes</userinput>.  The
1477                         <replaceable>configuration</replaceable> string
1478                         specified on the command line is the zone
1479                         configuration text that would ordinarily be
1480                         placed in <filename>named.conf</filename>.
1481                       </para>
1482                       <para>
1483                         The configuration is saved in a file called
1484                        <filename><replaceable>hash</replaceable>.nzf</filename>,
1485                         where <replaceable>hash</replaceable> is a
1486                         cryptographic hash generated from the name of
1487                         the view.  When <command>named</command> is
1488                         restarted, the file will be loaded into the view
1489                         configuration, so that zones that were added
1490                         can persist after a restart.
1491                       </para>
1492                       <para>
1493                         This sample <command>addzone</command> command
1494                         would add the zone <literal>example.com</literal>
1495                         to the default view:
1496                       </para>
1497                       <para>
1498 <prompt>$ </prompt><userinput>rndc addzone example.com '{ type master; file "example.com.db"; };'</userinput>
1499                       </para>
1500                       <para>
1501                         (Note the brackets and semi-colon around the zone
1502                         configuration text.)
1503                       </para>
1504                     </listitem>
1505                   </varlistentry>
1506
1507                   <varlistentry>
1508                     <term><userinput>delzone
1509                         <replaceable>zone</replaceable>
1510                         <optional><replaceable>class</replaceable>
1511                         <optional><replaceable>view</replaceable></optional></optional>
1512                     </userinput></term>
1513                     <listitem>
1514                       <para>
1515                         Delete a zone while the server is running.
1516                         Only zones that were originally added via
1517                         <command>rndc addzone</command> can be deleted
1518                         in this matter.
1519                       </para>
1520                     </listitem>
1521                   </varlistentry>
1522
1523                 </variablelist>
1524
1525                 <para>
1526                   A configuration file is required, since all
1527                   communication with the server is authenticated with
1528                   digital signatures that rely on a shared secret, and
1529                   there is no way to provide that secret other than with a
1530                   configuration file.  The default location for the
1531                   <command>rndc</command> configuration file is
1532                   <filename>/etc/rndc.conf</filename>, but an
1533                   alternate
1534                   location can be specified with the <option>-c</option>
1535                   option.  If the configuration file is not found,
1536                   <command>rndc</command> will also look in
1537                   <filename>/etc/rndc.key</filename> (or whatever
1538                   <varname>sysconfdir</varname> was defined when
1539                   the <acronym>BIND</acronym> build was
1540                   configured).
1541                   The <filename>rndc.key</filename> file is
1542                   generated by
1543                   running <command>rndc-confgen -a</command> as
1544                   described in
1545                   <xref linkend="controls_statement_definition_and_usage"/>.
1546                 </para>
1547
1548                 <para>
1549                   The format of the configuration file is similar to
1550                   that of <filename>named.conf</filename>, but
1551                   limited to
1552                   only four statements, the <command>options</command>,
1553                   <command>key</command>, <command>server</command> and
1554                   <command>include</command>
1555                   statements.  These statements are what associate the
1556                   secret keys to the servers with which they are meant to
1557                   be shared.  The order of statements is not
1558                   significant.
1559                 </para>
1560
1561                 <para>
1562                   The <command>options</command> statement has
1563                   three clauses:
1564                   <command>default-server</command>, <command>default-key</command>,
1565                   and <command>default-port</command>.
1566                   <command>default-server</command> takes a
1567                   host name or address argument  and represents the server
1568                   that will
1569                   be contacted if no <option>-s</option>
1570                   option is provided on the command line.
1571                   <command>default-key</command> takes
1572                   the name of a key as its argument, as defined by a <command>key</command> statement.
1573                   <command>default-port</command> specifies the
1574                   port to which
1575                   <command>rndc</command> should connect if no
1576                   port is given on the command line or in a
1577                   <command>server</command> statement.
1578                 </para>
1579
1580                 <para>
1581                   The <command>key</command> statement defines a
1582                   key to be used
1583                   by <command>rndc</command> when authenticating
1584                   with
1585                   <command>named</command>.  Its syntax is
1586                   identical to the
1587                   <command>key</command> statement in <filename>named.conf</filename>.
1588                   The keyword <userinput>key</userinput> is
1589                   followed by a key name, which must be a valid
1590                   domain name, though it need not actually be hierarchical;
1591                   thus,
1592                   a string like "<userinput>rndc_key</userinput>" is a valid
1593                   name.
1594                   The <command>key</command> statement has two
1595                   clauses:
1596                   <command>algorithm</command> and <command>secret</command>.
1597                   While the configuration parser will accept any string as the
1598                   argument
1599                   to algorithm, currently only the string "<userinput>hmac-md5</userinput>"
1600                   has any meaning.  The secret is a base-64 encoded string
1601                   as specified in RFC 3548.
1602                 </para>
1603
1604                 <para>
1605                   The <command>server</command> statement
1606                   associates a key
1607                   defined using the <command>key</command>
1608                   statement with a server.
1609                   The keyword <userinput>server</userinput> is followed by a
1610                   host name or address.  The <command>server</command> statement
1611                   has two clauses: <command>key</command> and <command>port</command>.
1612                   The <command>key</command> clause specifies the
1613                   name of the key
1614                   to be used when communicating with this server, and the
1615                   <command>port</command> clause can be used to
1616                   specify the port <command>rndc</command> should
1617                   connect
1618                   to on the server.
1619                 </para>
1620
1621                 <para>
1622                   A sample minimal configuration file is as follows:
1623                 </para>
1624
1625 <programlisting>
1626 key rndc_key {
1627      algorithm "hmac-md5";
1628      secret
1629        "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
1630 };
1631 options {
1632      default-server 127.0.0.1;
1633      default-key    rndc_key;
1634 };
1635 </programlisting>
1636
1637                 <para>
1638                   This file, if installed as <filename>/etc/rndc.conf</filename>,
1639                   would allow the command:
1640                 </para>
1641
1642                 <para>
1643                   <prompt>$ </prompt><userinput>rndc reload</userinput>
1644                 </para>
1645
1646                 <para>
1647                   to connect to 127.0.0.1 port 953 and cause the name server
1648                   to reload, if a name server on the local machine were
1649                   running with
1650                   following controls statements:
1651                 </para>
1652
1653 <programlisting>
1654 controls {
1655         inet 127.0.0.1
1656             allow { localhost; } keys { rndc_key; };
1657 };
1658 </programlisting>
1659
1660                 <para>
1661                   and it had an identical key statement for
1662                   <literal>rndc_key</literal>.
1663                 </para>
1664
1665                 <para>
1666                   Running the <command>rndc-confgen</command>
1667                   program will
1668                   conveniently create a <filename>rndc.conf</filename>
1669                   file for you, and also display the
1670                   corresponding <command>controls</command>
1671                   statement that you need to
1672                   add to <filename>named.conf</filename>.
1673                   Alternatively,
1674                   you can run <command>rndc-confgen -a</command>
1675                   to set up
1676                   a <filename>rndc.key</filename> file and not
1677                   modify
1678                   <filename>named.conf</filename> at all.
1679                 </para>
1680
1681               </listitem>
1682             </varlistentry>
1683           </variablelist>
1684
1685         </sect3>
1686       </sect2>
1687       <sect2>
1688
1689         <title>Signals</title>
1690         <para>
1691           Certain UNIX signals cause the name server to take specific
1692           actions, as described in the following table.  These signals can
1693           be sent using the <command>kill</command> command.
1694         </para>
1695         <informaltable frame="all">
1696           <tgroup cols="2">
1697             <colspec colname="1" colnum="1" colsep="0" colwidth="1.125in"/>
1698             <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
1699             <tbody>
1700               <row rowsep="0">
1701                 <entry colname="1">
1702                   <para><command>SIGHUP</command></para>
1703                 </entry>
1704                 <entry colname="2">
1705                   <para>
1706                     Causes the server to read <filename>named.conf</filename> and
1707                     reload the database.
1708                   </para>
1709                 </entry>
1710               </row>
1711               <row rowsep="0">
1712                 <entry colname="1">
1713                   <para><command>SIGTERM</command></para>
1714                 </entry>
1715                 <entry colname="2">
1716                   <para>
1717                     Causes the server to clean up and exit.
1718                   </para>
1719                 </entry>
1720               </row>
1721               <row rowsep="0">
1722                 <entry colname="1">
1723                   <para><command>SIGINT</command></para>
1724                 </entry>
1725                 <entry colname="2">
1726                   <para>
1727                     Causes the server to clean up and exit.
1728                   </para>
1729                 </entry>
1730               </row>
1731             </tbody>
1732           </tgroup>
1733         </informaltable>
1734       </sect2>
1735     </sect1>
1736   </chapter>
1737
1738   <chapter id="Bv9ARM.ch04">
1739     <title>Advanced DNS Features</title>
1740
1741     <sect1 id="notify">
1742
1743       <title>Notify</title>
1744       <para>
1745         <acronym>DNS</acronym> NOTIFY is a mechanism that allows master
1746         servers to notify their slave servers of changes to a zone's data. In
1747         response to a <command>NOTIFY</command> from a master server, the
1748         slave will check to see that its version of the zone is the
1749         current version and, if not, initiate a zone transfer.
1750       </para>
1751
1752       <para>
1753         For more information about <acronym>DNS</acronym>
1754         <command>NOTIFY</command>, see the description of the
1755         <command>notify</command> option in <xref linkend="boolean_options"/> and
1756         the description of the zone option <command>also-notify</command> in
1757         <xref linkend="zone_transfers"/>.  The <command>NOTIFY</command>
1758         protocol is specified in RFC 1996.
1759       </para>
1760
1761       <note>
1762         As a slave zone can also be a master to other slaves, <command>named</command>,
1763         by default, sends <command>NOTIFY</command> messages for every zone
1764         it loads.  Specifying <command>notify master-only;</command> will
1765         cause <command>named</command> to only send <command>NOTIFY</command> for master
1766         zones that it loads.
1767       </note>
1768
1769     </sect1>
1770
1771     <sect1 id="dynamic_update">
1772       <title>Dynamic Update</title>
1773
1774       <para>
1775         Dynamic Update is a method for adding, replacing or deleting
1776         records in a master server by sending it a special form of DNS
1777         messages.  The format and meaning of these messages is specified
1778         in RFC 2136.
1779       </para>
1780
1781       <para>
1782         Dynamic update is enabled by including an
1783         <command>allow-update</command> or an <command>update-policy</command>
1784         clause in the <command>zone</command> statement.
1785       </para>
1786       
1787       <para>
1788         If the zone's <command>update-policy</command> is set to
1789         <userinput>local</userinput>, updates to the zone
1790         will be permitted for the key <varname>local-ddns</varname>,
1791         which will be generated by <command>named</command> at startup.
1792         See <xref linkend="dynamic_update_policies"/> for more details.
1793       </para>
1794
1795       <para>
1796         Dynamic updates using Kerberos signed requests can be made
1797         using the TKEY/GSS protocol by setting either the
1798         <command>tkey-gssapi-keytab</command> option, or alternatively
1799         by setting both the <command>tkey-gssapi-credential</command>
1800         and <command>tkey-domain</command> options. Once enabled,
1801         Kerberos signed requests will be matched against the update
1802         policies for the zone, using the Kerberos principal as the
1803         signer for the request.
1804       </para>
1805
1806       <para>
1807         Updating of secure zones (zones using DNSSEC) follows RFC
1808         3007: RRSIG, NSEC and NSEC3 records affected by updates are
1809         automatically regenerated by the server using an online
1810         zone key.  Update authorization is based on transaction
1811         signatures and an explicit server policy.
1812       </para>
1813
1814       <sect2 id="journal">
1815         <title>The journal file</title>
1816
1817         <para>
1818           All changes made to a zone using dynamic update are stored
1819           in the zone's journal file.  This file is automatically created
1820           by the server when the first dynamic update takes place.
1821           The name of the journal file is formed by appending the extension
1822           <filename>.jnl</filename> to the name of the
1823           corresponding zone
1824           file unless specifically overridden.  The journal file is in a
1825           binary format and should not be edited manually.
1826         </para>
1827
1828         <para>
1829           The server will also occasionally write ("dump")
1830           the complete contents of the updated zone to its zone file.
1831           This is not done immediately after
1832           each dynamic update, because that would be too slow when a large
1833           zone is updated frequently.  Instead, the dump is delayed by
1834           up to 15 minutes, allowing additional updates to take place.
1835           During the dump process, transient files will be created
1836           with the extensions <filename>.jnw</filename> and
1837           <filename>.jbk</filename>; under ordinary circumstances, these
1838           will be removed when the dump is complete, and can be safely
1839           ignored.
1840         </para>
1841
1842         <para>
1843           When a server is restarted after a shutdown or crash, it will replay
1844               the journal file to incorporate into the zone any updates that
1845           took
1846           place after the last zone dump.
1847         </para>
1848
1849         <para>
1850           Changes that result from incoming incremental zone transfers are
1851           also
1852           journalled in a similar way.
1853         </para>
1854
1855         <para>
1856           The zone files of dynamic zones cannot normally be edited by
1857           hand because they are not guaranteed to contain the most recent
1858           dynamic changes &mdash; those are only in the journal file.
1859           The only way to ensure that the zone file of a dynamic zone
1860           is up to date is to run <command>rndc stop</command>.
1861         </para>
1862
1863         <para>
1864           If you have to make changes to a dynamic zone
1865           manually, the following procedure will work: Disable dynamic updates
1866               to the zone using
1867           <command>rndc freeze <replaceable>zone</replaceable></command>.
1868           This will also remove the zone's <filename>.jnl</filename> file
1869           and update the master file.  Edit the zone file.  Run
1870           <command>rndc thaw <replaceable>zone</replaceable></command>
1871           to reload the changed zone and re-enable dynamic updates.
1872         </para>
1873
1874       </sect2>
1875
1876     </sect1>
1877
1878     <sect1 id="incremental_zone_transfers">
1879       <title>Incremental Zone Transfers (IXFR)</title>
1880
1881       <para>
1882         The incremental zone transfer (IXFR) protocol is a way for
1883         slave servers to transfer only changed data, instead of having to
1884         transfer the entire zone. The IXFR protocol is specified in RFC
1885         1995. See <xref linkend="proposed_standards"/>.
1886       </para>
1887
1888       <para>
1889         When acting as a master, <acronym>BIND</acronym> 9
1890         supports IXFR for those zones
1891         where the necessary change history information is available. These
1892         include master zones maintained by dynamic update and slave zones
1893         whose data was obtained by IXFR.  For manually maintained master
1894         zones, and for slave zones obtained by performing a full zone
1895         transfer (AXFR), IXFR is supported only if the option
1896         <command>ixfr-from-differences</command> is set
1897         to <userinput>yes</userinput>.
1898       </para>
1899
1900       <para>
1901         When acting as a slave, <acronym>BIND</acronym> 9 will
1902         attempt to use IXFR unless
1903         it is explicitly disabled. For more information about disabling
1904         IXFR, see the description of the <command>request-ixfr</command> clause
1905         of the <command>server</command> statement.
1906       </para>
1907     </sect1>
1908
1909     <sect1>
1910       <title>Split DNS</title>
1911       <para>
1912         Setting up different views, or visibility, of the DNS space to
1913         internal and external resolvers is usually referred to as a
1914         <emphasis>Split DNS</emphasis> setup. There are several
1915         reasons an organization would want to set up its DNS this way.
1916       </para>
1917       <para>
1918         One common reason for setting up a DNS system this way is
1919         to hide "internal" DNS information from "external" clients on the
1920         Internet. There is some debate as to whether or not this is actually
1921         useful.
1922         Internal DNS information leaks out in many ways (via email headers,
1923         for example) and most savvy "attackers" can find the information
1924         they need using other means.
1925         However, since listing addresses of internal servers that
1926         external clients cannot possibly reach can result in
1927         connection delays and other annoyances, an organization may
1928         choose to use a Split DNS to present a consistent view of itself
1929         to the outside world.
1930       </para>
1931       <para>
1932         Another common reason for setting up a Split DNS system is
1933         to allow internal networks that are behind filters or in RFC 1918
1934         space (reserved IP space, as documented in RFC 1918) to resolve DNS
1935         on the Internet. Split DNS can also be used to allow mail from outside
1936         back in to the internal network.
1937       </para>
1938      <sect2>
1939       <title>Example split DNS setup</title>
1940       <para>
1941         Let's say a company named <emphasis>Example, Inc.</emphasis>
1942         (<literal>example.com</literal>)
1943         has several corporate sites that have an internal network with
1944         reserved
1945         Internet Protocol (IP) space and an external demilitarized zone (DMZ),
1946         or "outside" section of a network, that is available to the public.
1947       </para>
1948       <para>
1949         <emphasis>Example, Inc.</emphasis> wants its internal clients
1950         to be able to resolve external hostnames and to exchange mail with
1951         people on the outside. The company also wants its internal resolvers
1952         to have access to certain internal-only zones that are not available
1953         at all outside of the internal network.
1954       </para>
1955       <para>
1956         In order to accomplish this, the company will set up two sets
1957         of name servers. One set will be on the inside network (in the
1958         reserved
1959         IP space) and the other set will be on bastion hosts, which are
1960         "proxy"
1961         hosts that can talk to both sides of its network, in the DMZ.
1962       </para>
1963       <para>
1964         The internal servers will be configured to forward all queries,
1965         except queries for <filename>site1.internal</filename>, <filename>site2.internal</filename>, <filename>site1.example.com</filename>,
1966         and <filename>site2.example.com</filename>, to the servers
1967         in the
1968         DMZ. These internal servers will have complete sets of information
1969         for <filename>site1.example.com</filename>, <filename>site2.example.com</filename>, <filename>site1.internal</filename>,
1970         and <filename>site2.internal</filename>.
1971       </para>
1972       <para>
1973         To protect the <filename>site1.internal</filename> and <filename>site2.internal</filename> domains,
1974         the internal name servers must be configured to disallow all queries
1975         to these domains from any external hosts, including the bastion
1976         hosts.
1977       </para>
1978       <para>
1979         The external servers, which are on the bastion hosts, will
1980         be configured to serve the "public" version of the <filename>site1</filename> and <filename>site2.example.com</filename> zones.
1981         This could include things such as the host records for public servers
1982         (<filename>www.example.com</filename> and <filename>ftp.example.com</filename>),
1983         and mail exchange (MX)  records (<filename>a.mx.example.com</filename> and <filename>b.mx.example.com</filename>).
1984       </para>
1985       <para>
1986         In addition, the public <filename>site1</filename> and <filename>site2.example.com</filename> zones
1987         should have special MX records that contain wildcard (`*') records
1988         pointing to the bastion hosts. This is needed because external mail
1989         servers do not have any other way of looking up how to deliver mail
1990         to those internal hosts. With the wildcard records, the mail will
1991         be delivered to the bastion host, which can then forward it on to
1992         internal hosts.
1993       </para>
1994       <para>
1995         Here's an example of a wildcard MX record:
1996       </para>
1997       <programlisting>*   IN MX 10 external1.example.com.</programlisting>
1998       <para>
1999         Now that they accept mail on behalf of anything in the internal
2000         network, the bastion hosts will need to know how to deliver mail
2001         to internal hosts. In order for this to work properly, the resolvers
2002         on
2003         the bastion hosts will need to be configured to point to the internal
2004         name servers for DNS resolution.
2005       </para>
2006       <para>
2007         Queries for internal hostnames will be answered by the internal
2008         servers, and queries for external hostnames will be forwarded back
2009         out to the DNS servers on the bastion hosts.
2010       </para>
2011       <para>
2012         In order for all this to work properly, internal clients will
2013         need to be configured to query <emphasis>only</emphasis> the internal
2014         name servers for DNS queries. This could also be enforced via
2015         selective
2016         filtering on the network.
2017       </para>
2018       <para>
2019         If everything has been set properly, <emphasis>Example, Inc.</emphasis>'s
2020         internal clients will now be able to:
2021       </para>
2022       <itemizedlist>
2023         <listitem>
2024           <simpara>
2025             Look up any hostnames in the <literal>site1</literal>
2026             and
2027             <literal>site2.example.com</literal> zones.
2028           </simpara>
2029         </listitem>
2030         <listitem>
2031           <simpara>
2032             Look up any hostnames in the <literal>site1.internal</literal> and
2033             <literal>site2.internal</literal> domains.
2034           </simpara>
2035         </listitem>
2036         <listitem>
2037           <simpara>Look up any hostnames on the Internet.</simpara>
2038         </listitem>
2039         <listitem>
2040           <simpara>Exchange mail with both internal and external people.</simpara>
2041         </listitem>
2042       </itemizedlist>
2043       <para>
2044         Hosts on the Internet will be able to:
2045       </para>
2046       <itemizedlist>
2047         <listitem>
2048           <simpara>
2049             Look up any hostnames in the <literal>site1</literal>
2050             and
2051             <literal>site2.example.com</literal> zones.
2052           </simpara>
2053         </listitem>
2054         <listitem>
2055           <simpara>
2056             Exchange mail with anyone in the <literal>site1</literal> and
2057             <literal>site2.example.com</literal> zones.
2058           </simpara>
2059         </listitem>
2060       </itemizedlist>
2061
2062       <para>
2063         Here is an example configuration for the setup we just
2064         described above. Note that this is only configuration information;
2065         for information on how to configure your zone files, see <xref linkend="sample_configuration"/>.
2066       </para>
2067
2068       <para>
2069         Internal DNS server config:
2070       </para>
2071
2072 <programlisting>
2073
2074 acl internals { 172.16.72.0/24; 192.168.1.0/24; };
2075
2076 acl externals { <varname>bastion-ips-go-here</varname>; };
2077
2078 options {
2079     ...
2080     ...
2081     forward only;
2082     // forward to external servers
2083     forwarders {
2084         <varname>bastion-ips-go-here</varname>;
2085     };
2086     // sample allow-transfer (no one)
2087     allow-transfer { none; };
2088     // restrict query access
2089     allow-query { internals; externals; };
2090     // restrict recursion
2091     allow-recursion { internals; };
2092     ...
2093     ...
2094 };
2095
2096 // sample master zone
2097 zone "site1.example.com" {
2098   type master;
2099   file "m/site1.example.com";
2100   // do normal iterative resolution (do not forward)
2101   forwarders { };
2102   allow-query { internals; externals; };
2103   allow-transfer { internals; };
2104 };
2105
2106 // sample slave zone
2107 zone "site2.example.com" {
2108   type slave;
2109   file "s/site2.example.com";
2110   masters { 172.16.72.3; };
2111   forwarders { };
2112   allow-query { internals; externals; };
2113   allow-transfer { internals; };
2114 };
2115
2116 zone "site1.internal" {
2117   type master;
2118   file "m/site1.internal";
2119   forwarders { };
2120   allow-query { internals; };
2121   allow-transfer { internals; }
2122 };
2123
2124 zone "site2.internal" {
2125   type slave;
2126   file "s/site2.internal";
2127   masters { 172.16.72.3; };
2128   forwarders { };
2129   allow-query { internals };
2130   allow-transfer { internals; }
2131 };
2132 </programlisting>
2133
2134       <para>
2135         External (bastion host) DNS server config:
2136       </para>
2137
2138 <programlisting>
2139 acl internals { 172.16.72.0/24; 192.168.1.0/24; };
2140
2141 acl externals { bastion-ips-go-here; };
2142
2143 options {
2144   ...
2145   ...
2146   // sample allow-transfer (no one)
2147   allow-transfer { none; };
2148   // default query access
2149   allow-query { any; };
2150   // restrict cache access
2151   allow-query-cache { internals; externals; };
2152   // restrict recursion
2153   allow-recursion { internals; externals; };
2154   ...
2155   ...
2156 };
2157
2158 // sample slave zone
2159 zone "site1.example.com" {
2160   type master;
2161   file "m/site1.foo.com";
2162   allow-transfer { internals; externals; };
2163 };
2164
2165 zone "site2.example.com" {
2166   type slave;
2167   file "s/site2.foo.com";
2168   masters { another_bastion_host_maybe; };
2169   allow-transfer { internals; externals; }
2170 };
2171 </programlisting>
2172
2173       <para>
2174         In the <filename>resolv.conf</filename> (or equivalent) on
2175         the bastion host(s):
2176       </para>
2177
2178 <programlisting>
2179 search ...
2180 nameserver 172.16.72.2
2181 nameserver 172.16.72.3
2182 nameserver 172.16.72.4
2183 </programlisting>
2184
2185      </sect2>
2186     </sect1>
2187     <sect1 id="tsig">
2188       <title>TSIG</title>
2189       <para>
2190         This is a short guide to setting up Transaction SIGnatures
2191         (TSIG) based transaction security in <acronym>BIND</acronym>. It describes changes
2192         to the configuration file as well as what changes are required for
2193         different features, including the process of creating transaction
2194         keys and using transaction signatures with <acronym>BIND</acronym>.
2195       </para>
2196       <para>
2197         <acronym>BIND</acronym> primarily supports TSIG for server
2198         to server communication.
2199         This includes zone transfer, notify, and recursive query messages.
2200         Resolvers based on newer versions of <acronym>BIND</acronym> 8 have limited support
2201         for TSIG.
2202       </para>
2203
2204       <para>
2205         TSIG can also be useful for dynamic update. A primary
2206         server for a dynamic zone should control access to the dynamic
2207         update service, but IP-based access control is insufficient.
2208         The cryptographic access control provided by TSIG
2209         is far superior. The <command>nsupdate</command>
2210         program supports TSIG via the <option>-k</option> and
2211         <option>-y</option> command line options or inline by use
2212         of the <command>key</command>.
2213       </para>
2214
2215       <sect2>
2216         <title>Generate Shared Keys for Each Pair of Hosts</title>
2217         <para>
2218           A shared secret is generated to be shared between <emphasis>host1</emphasis> and <emphasis>host2</emphasis>.
2219           An arbitrary key name is chosen: "host1-host2.". The key name must
2220           be the same on both hosts.
2221         </para>
2222         <sect3>
2223           <title>Automatic Generation</title>
2224           <para>
2225             The following command will generate a 128-bit (16 byte) HMAC-SHA256
2226             key as described above. Longer keys are better, but shorter keys
2227             are easier to read. Note that the maximum key length is the digest
2228             length, here 256 bits.
2229           </para>
2230           <para>
2231             <userinput>dnssec-keygen -a hmac-sha256 -b 128 -n HOST host1-host2.</userinput>
2232           </para>
2233           <para>
2234             The key is in the file <filename>Khost1-host2.+163+00000.private</filename>.
2235             Nothing directly uses this file, but the base-64 encoded string
2236             following "<literal>Key:</literal>"
2237             can be extracted from the file and used as a shared secret:
2238           </para>
2239           <programlisting>Key: La/E5CjG9O+os1jq0a2jdA==</programlisting>
2240           <para>
2241             The string "<literal>La/E5CjG9O+os1jq0a2jdA==</literal>" can
2242             be used as the shared secret.
2243           </para>
2244         </sect3>
2245         <sect3>
2246           <title>Manual Generation</title>
2247           <para>
2248             The shared secret is simply a random sequence of bits, encoded
2249             in base-64. Most ASCII strings are valid base-64 strings (assuming
2250             the length is a multiple of 4 and only valid characters are used),
2251             so the shared secret can be manually generated.
2252           </para>
2253           <para>
2254             Also, a known string can be run through <command>mmencode</command> or
2255             a similar program to generate base-64 encoded data.
2256           </para>
2257         </sect3>
2258       </sect2>
2259       <sect2>
2260         <title>Copying the Shared Secret to Both Machines</title>
2261         <para>
2262           This is beyond the scope of DNS. A secure transport mechanism
2263           should be used. This could be secure FTP, ssh, telephone, etc.
2264         </para>
2265       </sect2>
2266       <sect2>
2267         <title>Informing the Servers of the Key's Existence</title>
2268         <para>
2269           Imagine <emphasis>host1</emphasis> and <emphasis>host 2</emphasis>
2270           are
2271           both servers. The following is added to each server's <filename>named.conf</filename> file:
2272         </para>
2273
2274 <programlisting>
2275 key host1-host2. {
2276   algorithm hmac-sha256;
2277   secret "La/E5CjG9O+os1jq0a2jdA==";
2278 };
2279 </programlisting>
2280
2281         <para>
2282           The secret is the one generated above. Since this is a secret, it
2283           is recommended that either <filename>named.conf</filename> be
2284           non-world readable, or the key directive be added to a non-world
2285           readable file that is included by <filename>named.conf</filename>.
2286         </para>
2287         <para>
2288           At this point, the key is recognized. This means that if the
2289           server receives a message signed by this key, it can verify the
2290           signature. If the signature is successfully verified, the
2291           response is signed by the same key.
2292         </para>
2293       </sect2>
2294
2295       <sect2>
2296         <title>Instructing the Server to Use the Key</title>
2297         <para>
2298           Since keys are shared between two hosts only, the server must
2299           be told when keys are to be used. The following is added to the <filename>named.conf</filename> file
2300           for <emphasis>host1</emphasis>, if the IP address of <emphasis>host2</emphasis> is
2301           10.1.2.3:
2302         </para>
2303
2304 <programlisting>
2305 server 10.1.2.3 {
2306   keys { host1-host2. ;};
2307 };
2308 </programlisting>
2309
2310         <para>
2311           Multiple keys may be present, but only the first is used.
2312           This directive does not contain any secrets, so it may be in a
2313           world-readable
2314           file.
2315         </para>
2316         <para>
2317           If <emphasis>host1</emphasis> sends a message that is a request
2318           to that address, the message will be signed with the specified key. <emphasis>host1</emphasis> will
2319           expect any responses to signed messages to be signed with the same
2320           key.
2321         </para>
2322         <para>
2323           A similar statement must be present in <emphasis>host2</emphasis>'s
2324           configuration file (with <emphasis>host1</emphasis>'s address) for <emphasis>host2</emphasis> to
2325           sign request messages to <emphasis>host1</emphasis>.
2326         </para>
2327       </sect2>
2328       <sect2>
2329         <title>TSIG Key Based Access Control</title>
2330         <para>
2331           <acronym>BIND</acronym> allows IP addresses and ranges
2332           to be specified in ACL
2333           definitions and
2334           <command>allow-{ query | transfer | update }</command>
2335           directives.
2336           This has been extended to allow TSIG keys also. The above key would
2337           be denoted <command>key host1-host2.</command>
2338         </para>
2339         <para>
2340           An example of an <command>allow-update</command> directive would be:
2341         </para>
2342
2343 <programlisting>
2344 allow-update { key host1-host2. ;};
2345 </programlisting>
2346
2347         <para>
2348           This allows dynamic updates to succeed only if the request
2349           was signed by a key named "<command>host1-host2.</command>".
2350         </para>
2351
2352         <para>
2353           See <xref linkend="dynamic_update_policies"/> for a discussion of
2354           the more flexible <command>update-policy</command> statement.
2355         </para>
2356
2357       </sect2>
2358       <sect2>
2359         <title>Errors</title>
2360
2361         <para>
2362           The processing of TSIG signed messages can result in
2363           several errors. If a signed message is sent to a non-TSIG aware
2364           server, a FORMERR (format error) will be returned, since the server will not
2365           understand the record. This is a result of misconfiguration,
2366           since the server must be explicitly configured to send a TSIG
2367           signed message to a specific server.
2368         </para>
2369
2370         <para>
2371           If a TSIG aware server receives a message signed by an
2372           unknown key, the response will be unsigned with the TSIG
2373           extended error code set to BADKEY. If a TSIG aware server
2374           receives a message with a signature that does not validate, the
2375           response will be unsigned with the TSIG extended error code set
2376           to BADSIG. If a TSIG aware server receives a message with a time
2377           outside of the allowed range, the response will be signed with
2378           the TSIG extended error code set to BADTIME, and the time values
2379           will be adjusted so that the response can be successfully
2380           verified. In any of these cases, the message's rcode (response code) is set to
2381           NOTAUTH (not authenticated).
2382         </para>
2383
2384       </sect2>
2385     </sect1>
2386     <sect1>
2387       <title>TKEY</title>
2388
2389       <para><command>TKEY</command>
2390         is a mechanism for automatically generating a shared secret
2391         between two hosts.  There are several "modes" of
2392         <command>TKEY</command> that specify how the key is generated
2393         or assigned.  <acronym>BIND</acronym> 9 implements only one of
2394         these modes, the Diffie-Hellman key exchange.  Both hosts are
2395         required to have a Diffie-Hellman KEY record (although this
2396         record is not required to be present in a zone).  The
2397         <command>TKEY</command> process must use signed messages,
2398         signed either by TSIG or SIG(0).  The result of
2399         <command>TKEY</command> is a shared secret that can be used to
2400         sign messages with TSIG.  <command>TKEY</command> can also be
2401         used to delete shared secrets that it had previously
2402         generated.
2403       </para>
2404
2405       <para>
2406         The <command>TKEY</command> process is initiated by a
2407         client
2408         or server by sending a signed <command>TKEY</command>
2409         query
2410         (including any appropriate KEYs) to a TKEY-aware server.  The
2411         server response, if it indicates success, will contain a
2412         <command>TKEY</command> record and any appropriate keys.
2413         After
2414         this exchange, both participants have enough information to
2415         determine the shared secret; the exact process depends on the
2416         <command>TKEY</command> mode.  When using the
2417         Diffie-Hellman
2418         <command>TKEY</command> mode, Diffie-Hellman keys are
2419         exchanged,
2420         and the shared secret is derived by both participants.
2421       </para>
2422
2423     </sect1>
2424     <sect1>
2425       <title>SIG(0)</title>
2426
2427       <para>
2428         <acronym>BIND</acronym> 9 partially supports DNSSEC SIG(0)
2429             transaction signatures as specified in RFC 2535 and RFC 2931.
2430         SIG(0)
2431         uses public/private keys to authenticate messages.  Access control
2432         is performed in the same manner as TSIG keys; privileges can be
2433         granted or denied based on the key name.
2434       </para>
2435
2436       <para>
2437         When a SIG(0) signed message is received, it will only be
2438         verified if the key is known and trusted by the server; the server
2439         will not attempt to locate and/or validate the key.
2440       </para>
2441
2442       <para>
2443         SIG(0) signing of multiple-message TCP streams is not
2444         supported.
2445       </para>
2446
2447       <para>
2448         The only tool shipped with <acronym>BIND</acronym> 9 that
2449         generates SIG(0) signed messages is <command>nsupdate</command>.
2450       </para>
2451
2452     </sect1>
2453     <sect1 id="DNSSEC">
2454       <title>DNSSEC</title>
2455
2456       <para>
2457         Cryptographic authentication of DNS information is possible
2458         through the DNS Security (<emphasis>DNSSEC-bis</emphasis>) extensions,
2459         defined in RFC 4033, RFC 4034, and RFC 4035.
2460         This section describes the creation and use of DNSSEC signed zones.
2461       </para>
2462
2463       <para>
2464         In order to set up a DNSSEC secure zone, there are a series
2465         of steps which must be followed.  <acronym>BIND</acronym>
2466         9 ships
2467         with several tools
2468         that are used in this process, which are explained in more detail
2469         below.  In all cases, the <option>-h</option> option prints a
2470         full list of parameters.  Note that the DNSSEC tools require the
2471         keyset files to be in the working directory or the
2472         directory specified by the <option>-d</option> option, and
2473         that the tools shipped with BIND 9.2.x and earlier are not compatible
2474         with the current ones.
2475       </para>
2476
2477       <para>
2478         There must also be communication with the administrators of
2479         the parent and/or child zone to transmit keys.  A zone's security
2480         status must be indicated by the parent zone for a DNSSEC capable
2481         resolver to trust its data.  This is done through the presence
2482         or absence of a <literal>DS</literal> record at the
2483         delegation
2484         point.
2485       </para>
2486
2487       <para>
2488         For other servers to trust data in this zone, they must
2489         either be statically configured with this zone's zone key or the
2490         zone key of another zone above this one in the DNS tree.
2491       </para>
2492
2493       <sect2>
2494         <title>Generating Keys</title>
2495
2496         <para>
2497           The <command>dnssec-keygen</command> program is used to
2498           generate keys.
2499         </para>
2500
2501         <para>
2502           A secure zone must contain one or more zone keys.  The
2503           zone keys will sign all other records in the zone, as well as
2504           the zone keys of any secure delegated zones.  Zone keys must
2505           have the same name as the zone, a name type of
2506           <command>ZONE</command>, and must be usable for
2507           authentication.
2508           It is recommended that zone keys use a cryptographic algorithm
2509           designated as "mandatory to implement" by the IETF; currently
2510           the only one is RSASHA1.
2511         </para>
2512
2513         <para>
2514           The following command will generate a 768-bit RSASHA1 key for
2515           the <filename>child.example</filename> zone:
2516         </para>
2517
2518         <para>
2519           <userinput>dnssec-keygen -a RSASHA1 -b 768 -n ZONE child.example.</userinput>
2520         </para>
2521
2522         <para>
2523           Two output files will be produced:
2524           <filename>Kchild.example.+005+12345.key</filename> and
2525           <filename>Kchild.example.+005+12345.private</filename>
2526           (where
2527           12345 is an example of a key tag).  The key filenames contain
2528           the key name (<filename>child.example.</filename>),
2529           algorithm (3
2530           is DSA, 1 is RSAMD5, 5 is RSASHA1, etc.), and the key tag (12345 in
2531           this case).
2532           The private key (in the <filename>.private</filename>
2533           file) is
2534           used to generate signatures, and the public key (in the
2535           <filename>.key</filename> file) is used for signature
2536           verification.
2537         </para>
2538
2539         <para>
2540           To generate another key with the same properties (but with
2541           a different key tag), repeat the above command.
2542         </para>
2543
2544         <para>
2545           The <command>dnssec-keyfromlabel</command> program is used
2546           to get a key pair from a crypto hardware and build the key
2547           files. Its usage is similar to <command>dnssec-keygen</command>.
2548         </para>
2549
2550         <para>
2551           The public keys should be inserted into the zone file by
2552           including the <filename>.key</filename> files using
2553           <command>$INCLUDE</command> statements.
2554         </para>
2555
2556       </sect2>
2557       <sect2>
2558         <title>Signing the Zone</title>
2559
2560         <para>
2561           The <command>dnssec-signzone</command> program is used
2562           to sign a zone.
2563         </para>
2564
2565         <para>
2566           Any <filename>keyset</filename> files corresponding to
2567           secure subzones should be present.  The zone signer will
2568           generate <literal>NSEC</literal>, <literal>NSEC3</literal>
2569           and <literal>RRSIG</literal> records for the zone, as
2570           well as <literal>DS</literal> for the child zones if
2571           <literal>'-g'</literal> is specified.  If <literal>'-g'</literal>
2572           is not specified, then DS RRsets for the secure child
2573           zones need to be added manually.
2574         </para>
2575
2576         <para>
2577           The following command signs the zone, assuming it is in a
2578           file called <filename>zone.child.example</filename>.  By
2579                 default, all zone keys which have an available private key are
2580                 used to generate signatures.
2581         </para>
2582
2583         <para>
2584           <userinput>dnssec-signzone -o child.example zone.child.example</userinput>
2585         </para>
2586
2587         <para>
2588           One output file is produced:
2589           <filename>zone.child.example.signed</filename>.  This
2590           file
2591           should be referenced by <filename>named.conf</filename>
2592           as the
2593           input file for the zone.
2594         </para>
2595
2596         <para><command>dnssec-signzone</command>
2597           will also produce a keyset and dsset files and optionally a
2598           dlvset file.  These are used to provide the parent zone
2599           administrators with the <literal>DNSKEYs</literal> (or their
2600           corresponding <literal>DS</literal> records) that are the
2601           secure entry point to the zone.
2602         </para>
2603
2604       </sect2>
2605
2606       <sect2>
2607         <title>Configuring Servers</title>
2608
2609         <para>
2610           To enable <command>named</command> to respond appropriately
2611           to DNS requests from DNSSEC aware clients,
2612           <command>dnssec-enable</command> must be set to yes.
2613           (This is the default setting.)
2614         </para>
2615
2616         <para>
2617           To enable <command>named</command> to validate answers from
2618           other servers, the <command>dnssec-enable</command> option
2619           must be set to <userinput>yes</userinput>, and the
2620           <command>dnssec-validation</command> options must be set to 
2621           <userinput>yes</userinput> or <userinput>auto</userinput>.
2622         </para>
2623           
2624         <para>
2625           If <command>dnssec-validation</command> is set to
2626           <userinput>auto</userinput>, then a default
2627           trust anchor for the DNS root zone will be used.
2628           If it is set to <userinput>yes</userinput>, however,
2629           then at least one trust anchor must be configured
2630           with a <command>trusted-keys</command> or
2631           <command>managed-keys</command> statement in
2632           <filename>named.conf</filename>, or DNSSEC validation
2633           will not occur.  The default setting is
2634           <userinput>yes</userinput>.
2635         </para>
2636           
2637         <para>
2638           <command>trusted-keys</command> are copies of DNSKEY RRs
2639           for zones that are used to form the first link in the
2640           cryptographic chain of trust.  All keys listed in
2641           <command>trusted-keys</command> (and corresponding zones)
2642           are deemed to exist and only the listed keys will be used
2643           to validated the DNSKEY RRset that they are from.
2644         </para>
2645
2646         <para>
2647           <command>managed-keys</command> are trusted keys which are
2648           automatically kept up to date via RFC 5011 trust anchor
2649           maintenance.
2650         </para>
2651
2652         <para>
2653           <command>trusted-keys</command> and
2654           <command>managed-keys</command> are described in more detail
2655           later in this document.
2656         </para>
2657
2658         <para>
2659           Unlike <acronym>BIND</acronym> 8, <acronym>BIND</acronym>
2660           9 does not verify signatures on load, so zone keys for
2661           authoritative zones do not need to be specified in the
2662           configuration file.
2663         </para>
2664
2665         <para>
2666           After DNSSEC gets established, a typical DNSSEC configuration
2667           will look something like the following.  It has one or
2668           more public keys for the root.  This allows answers from
2669           outside the organization to be validated.  It will also
2670           have several keys for parts of the namespace the organization
2671           controls.  These are here to ensure that <command>named</command>
2672           is immune to compromises in the DNSSEC components of the security
2673           of parent zones.
2674         </para>
2675
2676 <programlisting>
2677 managed-keys {
2678         /* Root Key */
2679         "." initial-key 257 3 3 "BNY4wrWM1nCfJ+CXd0rVXyYmobt7sEEfK3clRbGaTwS
2680                                  JxrGkxJWoZu6I7PzJu/E9gx4UC1zGAHlXKdE4zYIpRh
2681                                  aBKnvcC2U9mZhkdUpd1Vso/HAdjNe8LmMlnzY3zy2Xy
2682                                  4klWOADTPzSv9eamj8V18PHGjBLaVtYvk/ln5ZApjYg
2683                                  hf+6fElrmLkdaz MQ2OCnACR817DF4BBa7UR/beDHyp
2684                                  5iWTXWSi6XmoJLbG9Scqc7l70KDqlvXR3M/lUUVRbke
2685                                  g1IPJSidmK3ZyCllh4XSKbje/45SKucHgnwU5jefMtq
2686                                  66gKodQj+MiA21AfUVe7u99WzTLzY3qlxDhxYQQ20FQ
2687                                  97S+LKUTpQcq27R7AT3/V5hRQxScINqwcz4jYqZD2fQ
2688                                  dgxbcDTClU0CRBdiieyLMNzXG3";
2689 };
2690
2691 trusted-keys {
2692         /* Key for our organization's forward zone */
2693         example.com. 257 3 5 "AwEAAaxPMcR2x0HbQV4WeZB6oEDX+r0QM6
2694                               5KbhTjrW1ZaARmPhEZZe3Y9ifgEuq7vZ/z
2695                               GZUdEGNWy+JZzus0lUptwgjGwhUS1558Hb
2696                               4JKUbbOTcM8pwXlj0EiX3oDFVmjHO444gL
2697                               kBOUKUf/mC7HvfwYH/Be22GnClrinKJp1O
2698                               g4ywzO9WglMk7jbfW33gUKvirTHr25GL7S
2699                               TQUzBb5Usxt8lgnyTUHs1t3JwCY5hKZ6Cq
2700                               FxmAVZP20igTixin/1LcrgX/KMEGd/biuv
2701                               F4qJCyduieHukuY3H4XMAcR+xia2nIUPvm
2702                               /oyWR8BW/hWdzOvnSCThlHf3xiYleDbt/o
2703                               1OTQ09A0=";
2704
2705         /* Key for our reverse zone. */
2706         2.0.192.IN-ADDRPA.NET. 257 3 5 "AQOnS4xn/IgOUpBPJ3bogzwc
2707                                        xOdNax071L18QqZnQQQAVVr+i
2708                                        LhGTnNGp3HoWQLUIzKrJVZ3zg
2709                                        gy3WwNT6kZo6c0tszYqbtvchm
2710                                        gQC8CzKojM/W16i6MG/eafGU3
2711                                        siaOdS0yOI6BgPsw+YZdzlYMa
2712                                        IJGf4M4dyoKIhzdZyQ2bYQrjy
2713                                        Q4LB0lC7aOnsMyYKHHYeRvPxj
2714                                        IQXmdqgOJGq+vsevG06zW+1xg
2715                                        YJh9rCIfnm1GX/KMgxLPG2vXT
2716                                        D/RnLX+D3T3UL7HJYHJhAZD5L
2717                                        59VvjSPsZJHeDCUyWYrvPZesZ
2718                                        DIRvhDD52SKvbheeTJUm6Ehkz
2719                                        ytNN2SN96QRk8j/iI8ib";
2720 };
2721
2722 options {
2723         ...
2724         dnssec-enable yes;
2725         dnssec-validation yes;
2726 };
2727 </programlisting>
2728
2729         <note>
2730           None of the keys listed in this example are valid.  In particular,
2731           the root key is not valid.
2732         </note>
2733
2734         <para>
2735           When DNSSEC validation is enabled and properly configured,
2736           the resolver will reject any answers from signed, secure zones
2737           which fail to validate, and will return SERVFAIL to the client.
2738         </para>
2739
2740         <para>
2741           Responses may fail to validate for any of several reasons,
2742           including missing, expired, or invalid signatures, a key which
2743           does not match the DS RRset in the parent zone, or an insecure
2744           response from a zone which, according to its parent, should have
2745           been secure.  
2746         </para>
2747
2748         <note>
2749           <para>
2750             When the validator receives a response from an unsigned zone
2751             that has a signed parent, it must confirm with the parent
2752             that the zone was intentionally left unsigned.  It does
2753             this by verifying, via signed and validated NSEC/NSEC3 records,
2754             that the parent zone contains no DS records for the child.
2755           </para>
2756           <para>
2757             If the validator <emphasis>can</emphasis> prove that the zone
2758             is insecure, then the response is accepted.  However, if it
2759             cannot, then it must assume an insecure response to be a
2760             forgery; it rejects the response and logs an error.
2761           </para>
2762           <para>
2763             The logged error reads "insecurity proof failed" and
2764             "got insecure response; parent indicates it should be secure".
2765             (Prior to BIND 9.7, the logged error was "not insecure".
2766             This referred to the zone, not the response.)
2767           </para>
2768         </note>
2769       </sect2>
2770
2771     </sect1>
2772
2773     <xi:include href="dnssec.xml"/>
2774
2775     <xi:include href="managed-keys.xml"/>
2776
2777     <xi:include href="pkcs11.xml"/>
2778
2779     <sect1>
2780       <title>IPv6 Support in <acronym>BIND</acronym> 9</title>
2781
2782       <para>
2783         <acronym>BIND</acronym> 9 fully supports all currently
2784         defined forms of IPv6 name to address and address to name
2785         lookups.  It will also use IPv6 addresses to make queries when
2786         running on an IPv6 capable system.
2787       </para>
2788
2789       <para>
2790         For forward lookups, <acronym>BIND</acronym> 9 supports
2791         only AAAA records.  RFC 3363 deprecated the use of A6 records,
2792         and client-side support for A6 records was accordingly removed
2793         from <acronym>BIND</acronym> 9.
2794         However, authoritative <acronym>BIND</acronym> 9 name servers still
2795         load zone files containing A6 records correctly, answer queries
2796         for A6 records, and accept zone transfer for a zone containing A6
2797         records.
2798       </para>
2799
2800       <para>
2801         For IPv6 reverse lookups, <acronym>BIND</acronym> 9 supports
2802         the traditional "nibble" format used in the
2803         <emphasis>ip6.arpa</emphasis> domain, as well as the older, deprecated
2804         <emphasis>ip6.int</emphasis> domain.
2805         Older versions of <acronym>BIND</acronym> 9 
2806         supported the "binary label" (also known as "bitstring") format,
2807         but support of binary labels has been completely removed per
2808         RFC 3363.
2809         Many applications in <acronym>BIND</acronym> 9 do not understand
2810         the binary label format at all any more, and will return an
2811         error if given.
2812         In particular, an authoritative <acronym>BIND</acronym> 9
2813         name server will not load a zone file containing binary labels.
2814       </para>
2815
2816       <para>
2817         For an overview of the format and structure of IPv6 addresses,
2818         see <xref linkend="ipv6addresses"/>.
2819       </para>
2820
2821       <sect2>
2822         <title>Address Lookups Using AAAA Records</title>
2823
2824         <para>
2825           The IPv6 AAAA record is a parallel to the IPv4 A record,
2826           and, unlike the deprecated A6 record, specifies the entire
2827           IPv6 address in a single record.  For example,
2828         </para>
2829
2830 <programlisting>
2831 $ORIGIN example.com.
2832 host            3600    IN      AAAA    2001:db8::1
2833 </programlisting>
2834
2835         <para>
2836           Use of IPv4-in-IPv6 mapped addresses is not recommended.
2837           If a host has an IPv4 address, use an A record, not
2838           a AAAA, with <literal>::ffff:192.168.42.1</literal> as
2839           the address.
2840         </para>
2841       </sect2>
2842       <sect2>
2843         <title>Address to Name Lookups Using Nibble Format</title>
2844
2845         <para>
2846           When looking up an address in nibble format, the address
2847           components are simply reversed, just as in IPv4, and
2848           <literal>ip6.arpa.</literal> is appended to the
2849           resulting name.
2850           For example, the following would provide reverse name lookup for
2851           a host with address
2852           <literal>2001:db8::1</literal>.
2853         </para>
2854
2855 <programlisting>
2856 $ORIGIN 0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.
2857 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0  14400   IN    PTR    (
2858                                     host.example.com. )
2859 </programlisting>
2860
2861       </sect2>
2862     </sect1>
2863   </chapter>
2864
2865   <chapter id="Bv9ARM.ch05">
2866     <title>The <acronym>BIND</acronym> 9 Lightweight Resolver</title>
2867     <sect1>
2868       <title>The Lightweight Resolver Library</title>
2869       <para>
2870         Traditionally applications have been linked with a stub resolver
2871         library that sends recursive DNS queries to a local caching name
2872         server.
2873       </para>
2874       <para>
2875         IPv6 once introduced new complexity into the resolution process,
2876         such as following A6 chains and DNAME records, and simultaneous
2877         lookup of IPv4 and IPv6 addresses.  Though most of the complexity was
2878         then removed, these are hard or impossible
2879         to implement in a traditional stub resolver.
2880       </para>
2881       <para>
2882         <acronym>BIND</acronym> 9 therefore can also provide resolution
2883         services to local clients
2884         using a combination of a lightweight resolver library and a resolver
2885         daemon process running on the local host.  These communicate using
2886         a simple UDP-based protocol, the "lightweight resolver protocol"
2887         that is distinct from and simpler than the full DNS protocol.
2888       </para>
2889     </sect1>
2890     <sect1 id="lwresd">
2891       <title>Running a Resolver Daemon</title>
2892
2893       <para>
2894         To use the lightweight resolver interface, the system must
2895         run the resolver daemon <command>lwresd</command> or a
2896         local
2897         name server configured with a <command>lwres</command>
2898         statement.
2899       </para>
2900
2901       <para>
2902         By default, applications using the lightweight resolver library will
2903         make
2904         UDP requests to the IPv4 loopback address (127.0.0.1) on port 921.
2905         The
2906         address can be overridden by <command>lwserver</command>
2907         lines in
2908         <filename>/etc/resolv.conf</filename>.
2909       </para>
2910
2911       <para>
2912         The daemon currently only looks in the DNS, but in the future
2913         it may use other sources such as <filename>/etc/hosts</filename>,
2914         NIS, etc.
2915       </para>
2916
2917       <para>
2918         The <command>lwresd</command> daemon is essentially a
2919         caching-only name server that responds to requests using the
2920         lightweight
2921         resolver protocol rather than the DNS protocol.  Because it needs
2922         to run on each host, it is designed to require no or minimal
2923         configuration.
2924         Unless configured otherwise, it uses the name servers listed on
2925         <command>nameserver</command> lines in <filename>/etc/resolv.conf</filename>
2926         as forwarders, but is also capable of doing the resolution
2927         autonomously if
2928         none are specified.
2929       </para>
2930       <para>
2931         The <command>lwresd</command> daemon may also be
2932         configured with a
2933         <filename>named.conf</filename> style configuration file,
2934         in
2935         <filename>/etc/lwresd.conf</filename> by default.  A name
2936         server may also
2937         be configured to act as a lightweight resolver daemon using the
2938         <command>lwres</command> statement in <filename>named.conf</filename>.
2939       </para>
2940
2941     </sect1>
2942   </chapter>
2943
2944   <chapter id="Bv9ARM.ch06">
2945     <title><acronym>BIND</acronym> 9 Configuration Reference</title>
2946
2947     <para>
2948       <acronym>BIND</acronym> 9 configuration is broadly similar
2949       to <acronym>BIND</acronym> 8; however, there are a few new
2950       areas
2951       of configuration, such as views. <acronym>BIND</acronym>
2952       8 configuration files should work with few alterations in <acronym>BIND</acronym>
2953       9, although more complex configurations should be reviewed to check
2954       if they can be more efficiently implemented using the new features
2955       found in <acronym>BIND</acronym> 9.
2956     </para>
2957
2958     <para>
2959       <acronym>BIND</acronym> 4 configuration files can be
2960       converted to the new format
2961       using the shell script
2962       <filename>contrib/named-bootconf/named-bootconf.sh</filename>.
2963     </para>
2964     <sect1 id="configuration_file_elements">
2965       <title>Configuration File Elements</title>
2966       <para>
2967         Following is a list of elements used throughout the <acronym>BIND</acronym> configuration
2968         file documentation:
2969       </para>
2970       <informaltable colsep="0" rowsep="0">
2971         <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
2972           <colspec colname="1" colnum="1" colsep="0" colwidth="1.855in"/>
2973           <colspec colname="2" colnum="2" colsep="0" colwidth="3.770in"/>
2974           <tbody>
2975             <row rowsep="0">
2976               <entry colname="1">
2977                 <para>
2978                   <varname>acl_name</varname>
2979                 </para>
2980               </entry>
2981               <entry colname="2">
2982                 <para>
2983                   The name of an <varname>address_match_list</varname> as
2984                   defined by the <command>acl</command> statement.
2985                 </para>
2986               </entry>
2987             </row>
2988             <row rowsep="0">
2989               <entry colname="1">
2990                 <para>
2991                   <varname>address_match_list</varname>
2992                 </para>
2993               </entry>
2994               <entry colname="2">
2995                 <para>
2996                   A list of one or more
2997                   <varname>ip_addr</varname>,
2998                   <varname>ip_prefix</varname>, <varname>key_id</varname>,
2999                   or <varname>acl_name</varname> elements, see
3000                   <xref linkend="address_match_lists"/>.
3001                 </para>
3002               </entry>
3003             </row>
3004             <row rowsep="0">
3005               <entry colname="1">
3006                 <para>
3007                   <varname>masters_list</varname>
3008                 </para>
3009               </entry>
3010               <entry colname="2">
3011                 <para>
3012                   A named list of one or more <varname>ip_addr</varname>
3013                   with optional <varname>key_id</varname> and/or
3014                   <varname>ip_port</varname>.
3015                   A <varname>masters_list</varname> may include other
3016                   <varname>masters_lists</varname>.
3017                 </para>
3018               </entry>
3019             </row>
3020             <row rowsep="0">
3021               <entry colname="1">
3022                 <para>
3023                   <varname>domain_name</varname>
3024                 </para>
3025               </entry>
3026               <entry colname="2">
3027                 <para>
3028                   A quoted string which will be used as
3029                   a DNS name, for example "<literal>my.test.domain</literal>".
3030                 </para>
3031               </entry>
3032             </row>
3033             <row rowsep="0">
3034               <entry colname="1">
3035                 <para>
3036                   <varname>namelist</varname>
3037                 </para>
3038               </entry>
3039               <entry colname="2">
3040                 <para>
3041                   A list of one or more <varname>domain_name</varname>
3042                   elements.
3043                 </para>
3044               </entry>
3045             </row>
3046             <row rowsep="0">
3047               <entry colname="1">
3048                 <para>
3049                   <varname>dotted_decimal</varname>
3050                 </para>
3051               </entry>
3052               <entry colname="2">
3053                 <para>
3054                   One to four integers valued 0 through
3055                   255 separated by dots (`.'), such as <command>123</command>,
3056                   <command>45.67</command> or <command>89.123.45.67</command>.
3057                 </para>
3058               </entry>
3059             </row>
3060             <row rowsep="0">
3061               <entry colname="1">
3062                 <para>
3063                   <varname>ip4_addr</varname>
3064                 </para>
3065               </entry>
3066               <entry colname="2">
3067                 <para>
3068                   An IPv4 address with exactly four elements
3069                   in <varname>dotted_decimal</varname> notation.
3070                 </para>
3071               </entry>
3072             </row>
3073             <row rowsep="0">
3074               <entry colname="1">
3075                 <para>
3076                   <varname>ip6_addr</varname>
3077                 </para>
3078               </entry>
3079               <entry colname="2">
3080                 <para>
3081                   An IPv6 address, such as <command>2001:db8::1234</command>.
3082                   IPv6 scoped addresses that have ambiguity on their
3083                   scope zones must be disambiguated by an appropriate
3084                   zone ID with the percent character (`%') as
3085                   delimiter.  It is strongly recommended to use
3086                   string zone names rather than numeric identifiers,
3087                   in order to be robust against system configuration
3088                   changes.  However, since there is no standard
3089                   mapping for such names and identifier values,
3090                   currently only interface names as link identifiers
3091                   are supported, assuming one-to-one mapping between
3092                   interfaces and links.  For example, a link-local
3093                   address <command>fe80::1</command> on the link
3094                   attached to the interface <command>ne0</command>
3095                   can be specified as <command>fe80::1%ne0</command>.
3096                   Note that on most systems link-local addresses
3097                   always have the ambiguity, and need to be
3098                   disambiguated.
3099                 </para>
3100               </entry>
3101             </row>
3102             <row rowsep="0">
3103               <entry colname="1">
3104                 <para>
3105                   <varname>ip_addr</varname>
3106                 </para>
3107               </entry>
3108               <entry colname="2">
3109                 <para>
3110                   An <varname>ip4_addr</varname> or <varname>ip6_addr</varname>.
3111                 </para>
3112               </entry>
3113             </row>
3114             <row rowsep="0">
3115               <entry colname="1">
3116                 <para>
3117                   <varname>ip_port</varname>
3118                 </para>
3119               </entry>
3120               <entry colname="2">
3121                 <para>
3122                   An IP port <varname>number</varname>.
3123                   The <varname>number</varname> is limited to 0
3124                   through 65535, with values
3125                   below 1024 typically restricted to use by processes running
3126                   as root.
3127                   In some cases, an asterisk (`*') character can be used as a
3128                   placeholder to
3129                   select a random high-numbered port.
3130                 </para>
3131               </entry>
3132             </row>
3133             <row rowsep="0">
3134               <entry colname="1">
3135                 <para>
3136                   <varname>ip_prefix</varname>
3137                 </para>
3138               </entry>
3139               <entry colname="2">
3140                 <para>
3141                   An IP network specified as an <varname>ip_addr</varname>,
3142                   followed by a slash (`/') and then the number of bits in the
3143                   netmask.
3144                   Trailing zeros in a <varname>ip_addr</varname>
3145                   may omitted.
3146                   For example, <command>127/8</command> is the
3147                   network <command>127.0.0.0</command> with
3148                   netmask <command>255.0.0.0</command> and <command>1.2.3.0/28</command> is
3149                   network <command>1.2.3.0</command> with netmask <command>255.255.255.240</command>.
3150                 </para>
3151                 <para>
3152                   When specifying a prefix involving a IPv6 scoped address
3153                   the scope may be omitted.  In that case the prefix will
3154                   match packets from any scope.
3155                 </para>
3156               </entry>
3157             </row>
3158             <row rowsep="0">
3159               <entry colname="1">
3160                 <para>
3161                   <varname>key_id</varname>
3162                 </para>
3163               </entry>
3164               <entry colname="2">
3165                 <para>
3166                   A <varname>domain_name</varname> representing
3167                   the name of a shared key, to be used for transaction
3168                   security.
3169                 </para>
3170               </entry>
3171             </row>
3172             <row rowsep="0">
3173               <entry colname="1">
3174                 <para>
3175                   <varname>key_list</varname>
3176                 </para>
3177               </entry>
3178               <entry colname="2">
3179                 <para>
3180                   A list of one or more
3181                   <varname>key_id</varname>s,
3182                   separated by semicolons and ending with a semicolon.
3183                 </para>
3184               </entry>
3185             </row>
3186             <row rowsep="0">
3187               <entry colname="1">
3188                 <para>
3189                   <varname>number</varname>
3190                 </para>
3191               </entry>
3192               <entry colname="2">
3193                 <para>
3194                   A non-negative 32-bit integer
3195                   (i.e., a number between 0 and 4294967295, inclusive).
3196                   Its acceptable value might further
3197                   be limited by the context in which it is used.
3198                 </para>
3199               </entry>
3200             </row>
3201             <row rowsep="0">
3202               <entry colname="1">
3203                 <para>
3204                   <varname>path_name</varname>
3205                 </para>
3206               </entry>
3207               <entry colname="2">
3208                 <para>
3209                   A quoted string which will be used as
3210                   a pathname, such as <filename>zones/master/my.test.domain</filename>.
3211                 </para>
3212               </entry>
3213             </row>
3214             <row rowsep="0">
3215               <entry colname="1">
3216                 <para>
3217                   <varname>port_list</varname>
3218                 </para>
3219               </entry>
3220               <entry colname="2">
3221                 <para>
3222                   A list of an <varname>ip_port</varname> or a port
3223                   range.
3224                   A port range is specified in the form of
3225                   <userinput>range</userinput> followed by
3226                   two <varname>ip_port</varname>s,
3227                   <varname>port_low</varname> and
3228                   <varname>port_high</varname>, which represents
3229                   port numbers from <varname>port_low</varname> through
3230                   <varname>port_high</varname>, inclusive.
3231                   <varname>port_low</varname> must not be larger than
3232                   <varname>port_high</varname>.
3233                   For example,
3234                   <userinput>range 1024 65535</userinput> represents
3235                   ports from 1024 through 65535.
3236                   In either case an asterisk (`*') character is not
3237                   allowed as a valid <varname>ip_port</varname>.
3238                 </para>
3239               </entry>
3240             </row>
3241             <row rowsep="0">
3242               <entry colname="1">
3243                 <para>
3244                   <varname>size_spec</varname>
3245                 </para>
3246               </entry>
3247               <entry colname="2">
3248                 <para>
3249                   A number, the word <userinput>unlimited</userinput>,
3250                   or the word <userinput>default</userinput>.
3251                 </para>
3252                 <para>
3253                   An <varname>unlimited</varname> <varname>size_spec</varname> requests unlimited
3254                   use, or the maximum available amount. A <varname>default size_spec</varname> uses
3255                   the limit that was in force when the server was started.
3256                 </para>
3257                 <para>
3258                   A <varname>number</varname> can optionally be
3259                   followed by a scaling factor:
3260                   <userinput>K</userinput> or <userinput>k</userinput>
3261                   for kilobytes,
3262                   <userinput>M</userinput> or <userinput>m</userinput>
3263                   for megabytes, and
3264                   <userinput>G</userinput> or <userinput>g</userinput> for gigabytes,
3265                   which scale by 1024, 1024*1024, and 1024*1024*1024
3266                   respectively.
3267                 </para>
3268                 <para>
3269                   The value must be representable as a 64-bit unsigned integer
3270                   (0 to 18446744073709551615, inclusive).
3271                   Using <varname>unlimited</varname> is the best
3272                   way
3273                   to safely set a really large number.
3274                 </para>
3275               </entry>
3276             </row>
3277             <row rowsep="0">
3278               <entry colname="1">
3279                 <para>
3280                   <varname>yes_or_no</varname>
3281                 </para>
3282               </entry>
3283               <entry colname="2">
3284                 <para>
3285                   Either <userinput>yes</userinput> or <userinput>no</userinput>.
3286                   The words <userinput>true</userinput> and <userinput>false</userinput> are
3287                   also accepted, as are the numbers <userinput>1</userinput>
3288                   and <userinput>0</userinput>.
3289                 </para>
3290               </entry>
3291             </row>
3292             <row rowsep="0">
3293               <entry colname="1">
3294                 <para>
3295                   <varname>dialup_option</varname>
3296                 </para>
3297               </entry>
3298               <entry colname="2">
3299                 <para>
3300                   One of <userinput>yes</userinput>,
3301                   <userinput>no</userinput>, <userinput>notify</userinput>,
3302                   <userinput>notify-passive</userinput>, <userinput>refresh</userinput> or
3303                   <userinput>passive</userinput>.
3304                   When used in a zone, <userinput>notify-passive</userinput>,
3305                   <userinput>refresh</userinput>, and <userinput>passive</userinput>
3306                   are restricted to slave and stub zones.
3307                 </para>
3308               </entry>
3309             </row>
3310           </tbody>
3311         </tgroup>
3312       </informaltable>
3313       <sect2 id="address_match_lists">
3314         <title>Address Match Lists</title>
3315         <sect3>
3316           <title>Syntax</title>
3317
3318 <programlisting><varname>address_match_list</varname> = address_match_list_element ;
3319   <optional> address_match_list_element; ... </optional>
3320 <varname>address_match_list_element</varname> = <optional> ! </optional> (ip_address <optional>/length</optional> |
3321    key key_id | acl_name | { address_match_list } )
3322 </programlisting>
3323
3324         </sect3>
3325         <sect3>
3326           <title>Definition and Usage</title>
3327           <para>
3328             Address match lists are primarily used to determine access
3329             control for various server operations. They are also used in
3330             the <command>listen-on</command> and <command>sortlist</command>
3331             statements. The elements which constitute an address match
3332             list can be any of the following:
3333           </para>
3334           <itemizedlist>
3335             <listitem>
3336               <simpara>an IP address (IPv4 or IPv6)</simpara>
3337             </listitem>
3338             <listitem>
3339               <simpara>an IP prefix (in `/' notation)</simpara>
3340             </listitem>
3341             <listitem>
3342               <simpara>
3343                 a key ID, as defined by the <command>key</command>
3344                 statement
3345               </simpara>
3346             </listitem>
3347             <listitem>
3348               <simpara>the name of an address match list defined with
3349                 the <command>acl</command> statement
3350               </simpara>
3351             </listitem>
3352             <listitem>
3353               <simpara>a nested address match list enclosed in braces</simpara>
3354             </listitem>
3355           </itemizedlist>
3356
3357           <para>
3358             Elements can be negated with a leading exclamation mark (`!'),
3359             and the match list names "any", "none", "localhost", and
3360             "localnets" are predefined. More information on those names
3361             can be found in the description of the acl statement.
3362           </para>
3363
3364           <para>
3365             The addition of the key clause made the name of this syntactic
3366             element something of a misnomer, since security keys can be used
3367             to validate access without regard to a host or network address.
3368             Nonetheless, the term "address match list" is still used
3369             throughout the documentation.
3370           </para>
3371
3372           <para>
3373             When a given IP address or prefix is compared to an address
3374             match list, the comparison takes place in approximately O(1)
3375             time.  However, key comparisons require that the list of keys
3376             be traversed until a matching key is found, and therefore may
3377             be somewhat slower.
3378           </para>
3379
3380           <para>
3381             The interpretation of a match depends on whether the list is being
3382             used for access control, defining <command>listen-on</command> ports, or in a
3383             <command>sortlist</command>, and whether the element was negated.
3384           </para>
3385
3386           <para>
3387             When used as an access control list, a non-negated match
3388             allows access and a negated match denies access. If
3389             there is no match, access is denied. The clauses
3390             <command>allow-notify</command>,
3391             <command>allow-recursion</command>,
3392             <command>allow-recursion-on</command>,
3393             <command>allow-query</command>,
3394             <command>allow-query-on</command>,
3395             <command>allow-query-cache</command>,
3396             <command>allow-query-cache-on</command>,
3397             <command>allow-transfer</command>,
3398             <command>allow-update</command>,
3399             <command>allow-update-forwarding</command>, and
3400             <command>blackhole</command> all use address match
3401             lists.  Similarly, the <command>listen-on</command> option will cause the
3402             server to refuse queries on any of the machine's
3403             addresses which do not match the list.
3404           </para>
3405
3406           <para>
3407             Order of insertion is significant.  If more than one element
3408             in an ACL is found to match a given IP address or prefix,
3409             preference will be given to the one that came
3410             <emphasis>first</emphasis> in the ACL definition.
3411             Because of this first-match behavior, an element that
3412             defines a subset of another element in the list should
3413             come before the broader element, regardless of whether
3414             either is negated. For example, in
3415             <command>1.2.3/24; ! 1.2.3.13;</command>
3416             the 1.2.3.13 element is completely useless because the
3417             algorithm will match any lookup for 1.2.3.13 to the 1.2.3/24
3418             element.  Using <command>! 1.2.3.13; 1.2.3/24</command> fixes
3419             that problem by having 1.2.3.13 blocked by the negation, but
3420             all other 1.2.3.* hosts fall through.
3421           </para>
3422         </sect3>
3423       </sect2>
3424
3425       <sect2>
3426         <title>Comment Syntax</title>
3427
3428         <para>
3429           The <acronym>BIND</acronym> 9 comment syntax allows for
3430           comments to appear
3431           anywhere that whitespace may appear in a <acronym>BIND</acronym> configuration
3432           file. To appeal to programmers of all kinds, they can be written
3433           in the C, C++, or shell/perl style.
3434         </para>
3435
3436         <sect3>
3437           <title>Syntax</title>
3438
3439           <para>
3440             <programlisting>/* This is a <acronym>BIND</acronym> comment as in C */</programlisting>
3441             <programlisting>// This is a <acronym>BIND</acronym> comment as in C++</programlisting>
3442             <programlisting># This is a <acronym>BIND</acronym> comment as in common UNIX shells
3443 # and perl</programlisting>
3444           </para>
3445         </sect3>
3446         <sect3>
3447           <title>Definition and Usage</title>
3448           <para>
3449             Comments may appear anywhere that whitespace may appear in
3450             a <acronym>BIND</acronym> configuration file.
3451           </para>
3452           <para>
3453             C-style comments start with the two characters /* (slash,
3454             star) and end with */ (star, slash). Because they are completely
3455             delimited with these characters, they can be used to comment only
3456             a portion of a line or to span multiple lines.
3457           </para>
3458           <para>
3459             C-style comments cannot be nested. For example, the following
3460             is not valid because the entire comment ends with the first */:
3461           </para>
3462           <para>
3463
3464 <programlisting>/* This is the start of a comment.
3465    This is still part of the comment.
3466 /* This is an incorrect attempt at nesting a comment. */
3467    This is no longer in any comment. */
3468 </programlisting>
3469
3470           </para>
3471
3472           <para>
3473             C++-style comments start with the two characters // (slash,
3474             slash) and continue to the end of the physical line. They cannot
3475             be continued across multiple physical lines; to have one logical
3476             comment span multiple lines, each line must use the // pair.
3477             For example:
3478           </para>
3479           <para>
3480
3481 <programlisting>// This is the start of a comment.  The next line
3482 // is a new comment, even though it is logically
3483 // part of the previous comment.
3484 </programlisting>
3485
3486           </para>
3487           <para>
3488             Shell-style (or perl-style, if you prefer) comments start
3489             with the character <literal>#</literal> (number sign)
3490             and continue to the end of the
3491             physical line, as in C++ comments.
3492             For example:
3493           </para>
3494
3495           <para>
3496
3497 <programlisting># This is the start of a comment.  The next line
3498 # is a new comment, even though it is logically
3499 # part of the previous comment.
3500 </programlisting>
3501
3502           </para>
3503
3504           <warning>
3505             <para>
3506               You cannot use the semicolon (`;') character
3507               to start a comment such as you would in a zone file. The
3508               semicolon indicates the end of a configuration
3509               statement.
3510             </para>
3511           </warning>
3512         </sect3>
3513       </sect2>
3514     </sect1>
3515
3516     <sect1 id="Configuration_File_Grammar">
3517       <title>Configuration File Grammar</title>
3518
3519       <para>
3520         A <acronym>BIND</acronym> 9 configuration consists of
3521         statements and comments.
3522         Statements end with a semicolon. Statements and comments are the
3523         only elements that can appear without enclosing braces. Many
3524         statements contain a block of sub-statements, which are also
3525         terminated with a semicolon.
3526       </para>
3527
3528       <para>
3529         The following statements are supported:
3530       </para>
3531
3532       <informaltable colsep="0" rowsep="0">
3533         <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
3534           <colspec colname="1" colnum="1" colsep="0" colwidth="1.336in"/>
3535           <colspec colname="2" colnum="2" colsep="0" colwidth="3.778in"/>
3536           <tbody>
3537             <row rowsep="0">
3538               <entry colname="1">
3539                 <para><command>acl</command></para>
3540               </entry>
3541               <entry colname="2">
3542                 <para>
3543                   defines a named IP address
3544                   matching list, for access control and other uses.
3545                 </para>
3546               </entry>
3547             </row>
3548             <row rowsep="0">
3549               <entry colname="1">
3550                 <para><command>controls</command></para>
3551               </entry>
3552               <entry colname="2">
3553                 <para>
3554                   declares control channels to be used
3555                   by the <command>rndc</command> utility.
3556                 </para>
3557               </entry>
3558             </row>
3559             <row rowsep="0">
3560               <entry colname="1">
3561                 <para><command>include</command></para>
3562               </entry>
3563               <entry colname="2">
3564                 <para>
3565                   includes a file.
3566                 </para>
3567               </entry>
3568             </row>
3569             <row rowsep="0">
3570               <entry colname="1">
3571                 <para><command>key</command></para>
3572               </entry>
3573               <entry colname="2">
3574                 <para>
3575                   specifies key information for use in
3576                   authentication and authorization using TSIG.
3577                 </para>
3578               </entry>
3579             </row>
3580             <row rowsep="0">
3581               <entry colname="1">
3582                 <para><command>logging</command></para>
3583               </entry>
3584               <entry colname="2">
3585                 <para>
3586                   specifies what the server logs, and where
3587                   the log messages are sent.
3588                 </para>
3589               </entry>
3590             </row>
3591             <row rowsep="0">
3592               <entry colname="1">
3593                 <para><command>lwres</command></para>
3594               </entry>
3595               <entry colname="2">
3596                 <para>
3597                   configures <command>named</command> to
3598                   also act as a light-weight resolver daemon (<command>lwresd</command>).
3599                 </para>
3600               </entry>
3601             </row>
3602             <row rowsep="0">
3603               <entry colname="1">
3604                 <para><command>masters</command></para>
3605               </entry>
3606               <entry colname="2">
3607                 <para>
3608                   defines a named masters list for
3609                   inclusion in stub and slave zone masters clauses.
3610                 </para>
3611               </entry>
3612             </row>
3613             <row rowsep="0">
3614               <entry colname="1">
3615                 <para><command>options</command></para>
3616               </entry>
3617               <entry colname="2">
3618                 <para>
3619                   controls global server configuration
3620                   options and sets defaults for other statements.
3621                 </para>
3622               </entry>
3623             </row>
3624             <row rowsep="0">
3625               <entry colname="1">
3626                 <para><command>server</command></para>
3627               </entry>
3628               <entry colname="2">
3629                 <para>
3630                   sets certain configuration options on
3631                   a per-server basis.
3632                 </para>
3633               </entry>
3634             </row>
3635             <row rowsep="0">
3636               <entry colname="1">
3637                 <para><command>statistics-channels</command></para>
3638               </entry>
3639               <entry colname="2">
3640                 <para>
3641                   declares communication channels to get access to
3642                   <command>named</command> statistics.
3643                 </para>
3644               </entry>
3645             </row>
3646             <row rowsep="0">
3647               <entry colname="1">
3648                 <para><command>trusted-keys</command></para>
3649               </entry>
3650               <entry colname="2">
3651                 <para>
3652                   defines trusted DNSSEC keys.
3653                 </para>
3654               </entry>
3655             </row>
3656             <row rowsep="0">
3657               <entry colname="1">
3658                 <para><command>managed-keys</command></para>
3659               </entry>
3660               <entry colname="2">
3661                 <para>
3662                   lists DNSSEC keys to be kept up to date
3663                   using RFC 5011 trust anchor maintenance.
3664                 </para>
3665               </entry>
3666             </row>
3667             <row rowsep="0">
3668               <entry colname="1">
3669                 <para><command>view</command></para>
3670               </entry>
3671               <entry colname="2">
3672                 <para>
3673                   defines a view.
3674                 </para>
3675               </entry>
3676             </row>
3677             <row rowsep="0">
3678               <entry colname="1">
3679                 <para><command>zone</command></para>
3680               </entry>
3681               <entry colname="2">
3682                 <para>
3683                   defines a zone.
3684                 </para>
3685               </entry>
3686             </row>
3687           </tbody>
3688         </tgroup>
3689       </informaltable>
3690
3691       <para>
3692         The <command>logging</command> and
3693         <command>options</command> statements may only occur once
3694         per
3695         configuration.
3696       </para>
3697
3698       <sect2>
3699         <title><command>acl</command> Statement Grammar</title>
3700
3701 <programlisting><command>acl</command> acl-name {
3702     address_match_list
3703 };
3704 </programlisting>
3705
3706       </sect2>
3707       <sect2 id="acl">
3708         <title><command>acl</command> Statement Definition and
3709           Usage</title>
3710
3711         <para>
3712           The <command>acl</command> statement assigns a symbolic
3713           name to an address match list. It gets its name from a primary
3714           use of address match lists: Access Control Lists (ACLs).
3715         </para>
3716
3717         <para>
3718           Note that an address match list's name must be defined
3719           with <command>acl</command> before it can be used
3720           elsewhere; no forward references are allowed.
3721         </para>
3722
3723         <para>
3724           The following ACLs are built-in:
3725         </para>
3726
3727         <informaltable colsep="0" rowsep="0">
3728           <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
3729             <colspec colname="1" colnum="1" colsep="0" colwidth="1.130in"/>
3730             <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
3731             <tbody>
3732               <row rowsep="0">
3733                 <entry colname="1">
3734                   <para><command>any</command></para>
3735                 </entry>
3736                 <entry colname="2">
3737                   <para>
3738                     Matches all hosts.
3739                   </para>
3740                 </entry>
3741               </row>
3742               <row rowsep="0">
3743                 <entry colname="1">
3744                   <para><command>none</command></para>
3745                 </entry>
3746                 <entry colname="2">
3747                   <para>
3748                     Matches no hosts.
3749                   </para>
3750                 </entry>
3751               </row>
3752               <row rowsep="0">
3753                 <entry colname="1">
3754                   <para><command>localhost</command></para>
3755                 </entry>
3756                 <entry colname="2">
3757                   <para>
3758                     Matches the IPv4 and IPv6 addresses of all network
3759                     interfaces on the system.
3760                   </para>
3761                 </entry>
3762               </row>
3763               <row rowsep="0">
3764                 <entry colname="1">
3765                   <para><command>localnets</command></para>
3766                 </entry>
3767                 <entry colname="2">
3768                   <para>
3769                     Matches any host on an IPv4 or IPv6 network
3770                     for which the system has an interface.
3771                     Some systems do not provide a way to determine the prefix
3772                     lengths of
3773                     local IPv6 addresses.
3774                     In such a case, <command>localnets</command>
3775                     only matches the local
3776                     IPv6 addresses, just like <command>localhost</command>.
3777                   </para>
3778                 </entry>
3779               </row>
3780             </tbody>
3781           </tgroup>
3782         </informaltable>
3783
3784       </sect2>
3785       <sect2>
3786         <title><command>controls</command> Statement Grammar</title>
3787
3788 <programlisting><command>controls</command> {
3789    [ inet ( ip_addr | * ) [ port ip_port ]
3790                 allow { <replaceable> address_match_list </replaceable> }
3791                 keys { <replaceable>key_list</replaceable> }; ]
3792    [ inet ...; ]
3793    [ unix <replaceable>path</replaceable> perm <replaceable>number</replaceable> owner <replaceable>number</replaceable> group <replaceable>number</replaceable>
3794      keys { <replaceable>key_list</replaceable> }; ]
3795    [ unix ...; ]
3796 };
3797 </programlisting>
3798
3799       </sect2>
3800
3801       <sect2 id="controls_statement_definition_and_usage">
3802         <title><command>controls</command> Statement Definition and
3803           Usage</title>
3804
3805         <para>
3806           The <command>controls</command> statement declares control
3807           channels to be used by system administrators to control the
3808           operation of the name server. These control channels are
3809           used by the <command>rndc</command> utility to send
3810           commands to and retrieve non-DNS results from a name server.
3811         </para>
3812
3813         <para>
3814           An <command>inet</command> control channel is a TCP socket
3815           listening at the specified <command>ip_port</command> on the
3816           specified <command>ip_addr</command>, which can be an IPv4 or IPv6
3817           address.  An <command>ip_addr</command> of <literal>*</literal> (asterisk) is
3818           interpreted as the IPv4 wildcard address; connections will be
3819           accepted on any of the system's IPv4 addresses.
3820           To listen on the IPv6 wildcard address,
3821           use an <command>ip_addr</command> of <literal>::</literal>.
3822           If you will only use <command>rndc</command> on the local host,
3823           using the loopback address (<literal>127.0.0.1</literal>
3824           or <literal>::1</literal>) is recommended for maximum security.
3825         </para>
3826
3827         <para>
3828           If no port is specified, port 953 is used. The asterisk
3829           "<literal>*</literal>" cannot be used for <command>ip_port</command>.
3830         </para>
3831
3832         <para>
3833           The ability to issue commands over the control channel is
3834           restricted by the <command>allow</command> and
3835           <command>keys</command> clauses.
3836           Connections to the control channel are permitted based on the
3837           <command>address_match_list</command>.  This is for simple
3838           IP address based filtering only; any <command>key_id</command>
3839           elements of the <command>address_match_list</command>
3840           are ignored.
3841         </para>
3842
3843         <para>
3844           A <command>unix</command> control channel is a UNIX domain
3845           socket listening at the specified path in the file system.
3846           Access to the socket is specified by the <command>perm</command>,
3847           <command>owner</command> and <command>group</command> clauses.
3848           Note on some platforms (SunOS and Solaris) the permissions
3849           (<command>perm</command>) are applied to the parent directory
3850           as the permissions on the socket itself are ignored.
3851         </para>
3852
3853         <para>
3854           The primary authorization mechanism of the command
3855           channel is the <command>key_list</command>, which
3856           contains a list of <command>key_id</command>s.
3857           Each <command>key_id</command> in the <command>key_list</command>
3858           is authorized to execute commands over the control channel.
3859           See <xref linkend="rndc"/> in <xref linkend="admin_tools"/>)
3860           for information about configuring keys in <command>rndc</command>.
3861         </para>
3862
3863         <para>
3864           If no <command>controls</command> statement is present,
3865           <command>named</command> will set up a default
3866           control channel listening on the loopback address 127.0.0.1
3867           and its IPv6 counterpart ::1.
3868           In this case, and also when the <command>controls</command> statement
3869           is present but does not have a <command>keys</command> clause,
3870           <command>named</command> will attempt to load the command channel key
3871           from the file <filename>rndc.key</filename> in
3872           <filename>/etc</filename> (or whatever <varname>sysconfdir</varname>
3873           was specified as when <acronym>BIND</acronym> was built).
3874           To create a <filename>rndc.key</filename> file, run
3875           <userinput>rndc-confgen -a</userinput>.
3876         </para>
3877
3878         <para>
3879           The <filename>rndc.key</filename> feature was created to
3880           ease the transition of systems from <acronym>BIND</acronym> 8,
3881           which did not have digital signatures on its command channel
3882           messages and thus did not have a <command>keys</command> clause.
3883
3884           It makes it possible to use an existing <acronym>BIND</acronym> 8
3885           configuration file in <acronym>BIND</acronym> 9 unchanged,
3886           and still have <command>rndc</command> work the same way
3887           <command>ndc</command> worked in BIND 8, simply by executing the
3888           command <userinput>rndc-confgen -a</userinput> after BIND 9 is
3889           installed.
3890         </para>
3891
3892         <para>
3893           Since the <filename>rndc.key</filename> feature
3894           is only intended to allow the backward-compatible usage of
3895           <acronym>BIND</acronym> 8 configuration files, this
3896           feature does not
3897           have a high degree of configurability.  You cannot easily change
3898           the key name or the size of the secret, so you should make a
3899           <filename>rndc.conf</filename> with your own key if you
3900           wish to change
3901           those things.  The <filename>rndc.key</filename> file
3902           also has its
3903           permissions set such that only the owner of the file (the user that
3904           <command>named</command> is running as) can access it.
3905           If you
3906           desire greater flexibility in allowing other users to access
3907           <command>rndc</command> commands, then you need to create
3908           a
3909           <filename>rndc.conf</filename> file and make it group
3910           readable by a group
3911           that contains the users who should have access.
3912         </para>
3913
3914         <para>
3915           To disable the command channel, use an empty
3916           <command>controls</command> statement:
3917           <command>controls { };</command>.
3918         </para>
3919
3920       </sect2>
3921       <sect2>
3922         <title><command>include</command> Statement Grammar</title>
3923         <programlisting><command>include</command> <replaceable>filename</replaceable>;</programlisting>
3924       </sect2>
3925       <sect2>
3926         <title><command>include</command> Statement Definition and
3927           Usage</title>
3928
3929         <para>
3930           The <command>include</command> statement inserts the
3931           specified file at the point where the <command>include</command>
3932           statement is encountered. The <command>include</command>
3933                 statement facilitates the administration of configuration
3934           files
3935           by permitting the reading or writing of some things but not
3936           others. For example, the statement could include private keys
3937           that are readable only by the name server.
3938         </para>
3939
3940       </sect2>
3941       <sect2>
3942         <title><command>key</command> Statement Grammar</title>
3943
3944 <programlisting><command>key</command> <replaceable>key_id</replaceable> {
3945     algorithm <replaceable>string</replaceable>;
3946     secret <replaceable>string</replaceable>;
3947 };
3948 </programlisting>
3949
3950       </sect2>
3951
3952       <sect2>
3953         <title><command>key</command> Statement Definition and Usage</title>
3954
3955         <para>
3956           The <command>key</command> statement defines a shared
3957           secret key for use with TSIG (see <xref linkend="tsig"/>)
3958           or the command channel
3959           (see <xref linkend="controls_statement_definition_and_usage"/>).
3960         </para>
3961
3962         <para>
3963           The <command>key</command> statement can occur at the
3964           top level
3965           of the configuration file or inside a <command>view</command>
3966           statement.  Keys defined in top-level <command>key</command>
3967           statements can be used in all views.  Keys intended for use in
3968           a <command>controls</command> statement
3969           (see <xref linkend="controls_statement_definition_and_usage"/>)
3970           must be defined at the top level.
3971         </para>
3972
3973         <para>
3974           The <replaceable>key_id</replaceable>, also known as the
3975           key name, is a domain name uniquely identifying the key. It can
3976           be used in a <command>server</command>
3977           statement to cause requests sent to that
3978           server to be signed with this key, or in address match lists to
3979           verify that incoming requests have been signed with a key
3980           matching this name, algorithm, and secret.
3981         </para>
3982
3983         <para>
3984           The <replaceable>algorithm_id</replaceable> is a string
3985           that specifies a security/authentication algorithm.  Named
3986           supports <literal>hmac-md5</literal>,
3987           <literal>hmac-sha1</literal>, <literal>hmac-sha224</literal>,
3988           <literal>hmac-sha256</literal>, <literal>hmac-sha384</literal>
3989           and <literal>hmac-sha512</literal> TSIG authentication.
3990           Truncated hashes are supported by appending the minimum
3991           number of required bits preceded by a dash, e.g.
3992           <literal>hmac-sha1-80</literal>.  The
3993           <replaceable>secret_string</replaceable> is the secret
3994           to be used by the algorithm, and is treated as a base-64
3995           encoded string.
3996         </para>
3997
3998       </sect2>
3999       <sect2>
4000         <title><command>logging</command> Statement Grammar</title>
4001
4002 <programlisting><command>logging</command> {
4003    [ <command>channel</command> <replaceable>channel_name</replaceable> {
4004      ( <command>file</command> <replaceable>path_name</replaceable>
4005          [ <command>versions</command> ( <replaceable>number</replaceable> | <command>unlimited</command> ) ]
4006          [ <command>size</command> <replaceable>size spec</replaceable> ]
4007        | <command>syslog</command> <replaceable>syslog_facility</replaceable>
4008        | <command>stderr</command>
4009        | <command>null</command> );
4010      [ <command>severity</command> (<option>critical</option> | <option>error</option> | <option>warning</option> | <option>notice</option> |
4011                  <option>info</option> | <option>debug</option> [ <replaceable>level</replaceable> ] | <option>dynamic</option> ); ]
4012      [ <command>print-category</command> <option>yes</option> or <option>no</option>; ]
4013      [ <command>print-severity</command> <option>yes</option> or <option>no</option>; ]
4014      [ <command>print-time</command> <option>yes</option> or <option>no</option>; ]
4015    }; ]
4016    [ <command>category</command> <replaceable>category_name</replaceable> {
4017      <replaceable>channel_name</replaceable> ; [ <replaceable>channel_name</replaceable> ; ... ]
4018    }; ]
4019    ...
4020 };
4021 </programlisting>
4022
4023       </sect2>
4024
4025       <sect2>
4026         <title><command>logging</command> Statement Definition and
4027           Usage</title>
4028
4029         <para>
4030           The <command>logging</command> statement configures a
4031           wide
4032           variety of logging options for the name server. Its <command>channel</command> phrase
4033           associates output methods, format options and severity levels with
4034           a name that can then be used with the <command>category</command> phrase
4035           to select how various classes of messages are logged.
4036         </para>
4037         <para>
4038           Only one <command>logging</command> statement is used to
4039           define
4040           as many channels and categories as are wanted. If there is no <command>logging</command> statement,
4041           the logging configuration will be:
4042         </para>
4043
4044 <programlisting>logging {
4045      category default { default_syslog; default_debug; };
4046      category unmatched { null; };
4047 };
4048 </programlisting>
4049
4050         <para>
4051           In <acronym>BIND</acronym> 9, the logging configuration
4052           is only established when
4053           the entire configuration file has been parsed.  In <acronym>BIND</acronym> 8, it was
4054           established as soon as the <command>logging</command>
4055           statement
4056           was parsed. When the server is starting up, all logging messages
4057           regarding syntax errors in the configuration file go to the default
4058           channels, or to standard error if the "<option>-g</option>" option
4059           was specified.
4060         </para>
4061
4062         <sect3>
4063           <title>The <command>channel</command> Phrase</title>
4064
4065           <para>
4066             All log output goes to one or more <emphasis>channels</emphasis>;
4067             you can make as many of them as you want.
4068           </para>
4069
4070           <para>
4071             Every channel definition must include a destination clause that
4072             says whether messages selected for the channel go to a file, to a
4073             particular syslog facility, to the standard error stream, or are
4074             discarded. It can optionally also limit the message severity level
4075             that will be accepted by the channel (the default is
4076             <command>info</command>), and whether to include a
4077             <command>named</command>-generated time stamp, the
4078             category name
4079             and/or severity level (the default is not to include any).
4080           </para>
4081
4082           <para>
4083             The <command>null</command> destination clause
4084             causes all messages sent to the channel to be discarded;
4085             in that case, other options for the channel are meaningless.
4086           </para>
4087
4088           <para>
4089             The <command>file</command> destination clause directs
4090             the channel
4091             to a disk file.  It can include limitations
4092             both on how large the file is allowed to become, and how many
4093             versions
4094             of the file will be saved each time the file is opened.
4095           </para>
4096
4097           <para>
4098             If you use the <command>versions</command> log file
4099             option, then
4100             <command>named</command> will retain that many backup
4101             versions of the file by
4102             renaming them when opening.  For example, if you choose to keep
4103             three old versions
4104             of the file <filename>lamers.log</filename>, then just
4105             before it is opened
4106             <filename>lamers.log.1</filename> is renamed to
4107             <filename>lamers.log.2</filename>, <filename>lamers.log.0</filename> is renamed
4108             to <filename>lamers.log.1</filename>, and <filename>lamers.log</filename> is
4109             renamed to <filename>lamers.log.0</filename>.
4110             You can say <command>versions unlimited</command> to
4111             not limit
4112             the number of versions.
4113             If a <command>size</command> option is associated with
4114             the log file,
4115             then renaming is only done when the file being opened exceeds the
4116             indicated size.  No backup versions are kept by default; any
4117             existing
4118             log file is simply appended.
4119           </para>
4120
4121           <para>
4122             The <command>size</command> option for files is used
4123             to limit log
4124             growth. If the file ever exceeds the size, then <command>named</command> will
4125             stop writing to the file unless it has a <command>versions</command> option
4126             associated with it.  If backup versions are kept, the files are
4127             rolled as
4128             described above and a new one begun.  If there is no
4129             <command>versions</command> option, no more data will
4130             be written to the log
4131             until some out-of-band mechanism removes or truncates the log to
4132             less than the
4133             maximum size.  The default behavior is not to limit the size of
4134             the
4135             file.
4136           </para>
4137
4138           <para>
4139             Example usage of the <command>size</command> and
4140             <command>versions</command> options:
4141           </para>
4142
4143 <programlisting>channel an_example_channel {
4144     file "example.log" versions 3 size 20m;
4145     print-time yes;
4146     print-category yes;
4147 };
4148 </programlisting>
4149
4150           <para>
4151             The <command>syslog</command> destination clause
4152             directs the
4153             channel to the system log.  Its argument is a
4154             syslog facility as described in the <command>syslog</command> man
4155             page. Known facilities are <command>kern</command>, <command>user</command>,
4156             <command>mail</command>, <command>daemon</command>, <command>auth</command>,
4157             <command>syslog</command>, <command>lpr</command>, <command>news</command>,
4158             <command>uucp</command>, <command>cron</command>, <command>authpriv</command>,
4159             <command>ftp</command>, <command>local0</command>, <command>local1</command>,
4160             <command>local2</command>, <command>local3</command>, <command>local4</command>,
4161             <command>local5</command>, <command>local6</command> and
4162             <command>local7</command>, however not all facilities
4163             are supported on
4164             all operating systems.
4165             How <command>syslog</command> will handle messages
4166             sent to
4167             this facility is described in the <command>syslog.conf</command> man
4168             page. If you have a system which uses a very old version of <command>syslog</command> that
4169             only uses two arguments to the <command>openlog()</command> function,
4170             then this clause is silently ignored.
4171           </para>
4172           <para>
4173             The <command>severity</command> clause works like <command>syslog</command>'s
4174             "priorities", except that they can also be used if you are writing
4175             straight to a file rather than using <command>syslog</command>.
4176             Messages which are not at least of the severity level given will
4177             not be selected for the channel; messages of higher severity
4178             levels
4179             will be accepted.
4180           </para>
4181           <para>
4182             If you are using <command>syslog</command>, then the <command>syslog.conf</command> priorities
4183             will also determine what eventually passes through. For example,
4184             defining a channel facility and severity as <command>daemon</command> and <command>debug</command> but
4185             only logging <command>daemon.warning</command> via <command>syslog.conf</command> will
4186             cause messages of severity <command>info</command> and
4187             <command>notice</command> to
4188             be dropped. If the situation were reversed, with <command>named</command> writing
4189             messages of only <command>warning</command> or higher,
4190             then <command>syslogd</command> would
4191             print all messages it received from the channel.
4192           </para>
4193
4194           <para>
4195             The <command>stderr</command> destination clause
4196             directs the
4197             channel to the server's standard error stream.  This is intended
4198             for
4199             use when the server is running as a foreground process, for
4200             example
4201             when debugging a configuration.
4202           </para>
4203
4204           <para>
4205             The server can supply extensive debugging information when
4206             it is in debugging mode. If the server's global debug level is
4207             greater
4208             than zero, then debugging mode will be active. The global debug
4209             level is set either by starting the <command>named</command> server
4210             with the <option>-d</option> flag followed by a positive integer,
4211             or by running <command>rndc trace</command>.
4212             The global debug level
4213             can be set to zero, and debugging mode turned off, by running <command>rndc
4214 notrace</command>. All debugging messages in the server have a debug
4215             level, and higher debug levels give more detailed output. Channels
4216             that specify a specific debug severity, for example:
4217           </para>
4218
4219 <programlisting>channel specific_debug_level {
4220     file "foo";
4221     severity debug 3;
4222 };
4223 </programlisting>
4224
4225           <para>
4226             will get debugging output of level 3 or less any time the
4227             server is in debugging mode, regardless of the global debugging
4228             level. Channels with <command>dynamic</command>
4229             severity use the
4230             server's global debug level to determine what messages to print.
4231           </para>
4232           <para>
4233             If <command>print-time</command> has been turned on,
4234             then
4235             the date and time will be logged. <command>print-time</command> may
4236             be specified for a <command>syslog</command> channel,
4237             but is usually
4238             pointless since <command>syslog</command> also logs
4239             the date and
4240             time. If <command>print-category</command> is
4241             requested, then the
4242             category of the message will be logged as well. Finally, if <command>print-severity</command> is
4243             on, then the severity level of the message will be logged. The <command>print-</command> options may
4244             be used in any combination, and will always be printed in the
4245             following
4246             order: time, category, severity. Here is an example where all
4247             three <command>print-</command> options
4248             are on:
4249           </para>
4250
4251           <para>
4252             <computeroutput>28-Feb-2000 15:05:32.863 general: notice: running</computeroutput>
4253           </para>
4254
4255           <para>
4256             There are four predefined channels that are used for
4257             <command>named</command>'s default logging as follows.
4258             How they are
4259             used is described in <xref linkend="the_category_phrase"/>.
4260           </para>
4261
4262 <programlisting>channel default_syslog {
4263     // send to syslog's daemon facility
4264     syslog daemon;
4265     // only send priority info and higher
4266     severity info;
4267
4268 channel default_debug {
4269     // write to named.run in the working directory
4270     // Note: stderr is used instead of "named.run" if
4271     // the server is started with the '-f' option.
4272     file "named.run";
4273     // log at the server's current debug level
4274     severity dynamic;
4275 };
4276
4277 channel default_stderr {
4278     // writes to stderr
4279     stderr;
4280     // only send priority info and higher
4281     severity info;
4282 };
4283
4284 channel null {
4285    // toss anything sent to this channel
4286    null;
4287 };
4288 </programlisting>
4289
4290           <para>
4291             The <command>default_debug</command> channel has the
4292             special
4293             property that it only produces output when the server's debug
4294             level is
4295             nonzero.  It normally writes to a file called <filename>named.run</filename>
4296             in the server's working directory.
4297           </para>
4298
4299           <para>
4300             For security reasons, when the "<option>-u</option>"
4301             command line option is used, the <filename>named.run</filename> file
4302             is created only after <command>named</command> has
4303             changed to the
4304             new UID, and any debug output generated while <command>named</command> is
4305             starting up and still running as root is discarded.  If you need
4306             to capture this output, you must run the server with the "<option>-g</option>"
4307             option and redirect standard error to a file.
4308           </para>
4309
4310           <para>
4311             Once a channel is defined, it cannot be redefined. Thus you
4312             cannot alter the built-in channels directly, but you can modify
4313             the default logging by pointing categories at channels you have
4314             defined.
4315           </para>
4316         </sect3>
4317
4318         <sect3 id="the_category_phrase">
4319           <title>The <command>category</command> Phrase</title>
4320
4321           <para>
4322             There are many categories, so you can send the logs you want
4323             to see wherever you want, without seeing logs you don't want. If
4324             you don't specify a list of channels for a category, then log
4325             messages
4326             in that category will be sent to the <command>default</command> category
4327             instead. If you don't specify a default category, the following
4328             "default default" is used:
4329           </para>
4330
4331 <programlisting>category default { default_syslog; default_debug; };
4332 </programlisting>
4333
4334           <para>
4335             As an example, let's say you want to log security events to
4336             a file, but you also want keep the default logging behavior. You'd
4337             specify the following:
4338           </para>
4339
4340 <programlisting>channel my_security_channel {
4341     file "my_security_file";
4342     severity info;
4343 };
4344 category security {
4345     my_security_channel;
4346     default_syslog;
4347     default_debug;
4348 };</programlisting>
4349
4350           <para>
4351             To discard all messages in a category, specify the <command>null</command> channel:
4352           </para>
4353
4354 <programlisting>category xfer-out { null; };
4355 category notify { null; };
4356 </programlisting>
4357
4358           <para>
4359             Following are the available categories and brief descriptions
4360             of the types of log information they contain. More
4361             categories may be added in future <acronym>BIND</acronym> releases.
4362           </para>
4363           <informaltable colsep="0" rowsep="0">
4364             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
4365               <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
4366               <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
4367               <tbody>
4368                 <row rowsep="0">
4369                   <entry colname="1">
4370                     <para><command>default</command></para>
4371                   </entry>
4372                   <entry colname="2">
4373                     <para>
4374                       The default category defines the logging
4375                       options for those categories where no specific
4376                       configuration has been
4377                       defined.
4378                     </para>
4379                   </entry>
4380                 </row>
4381                 <row rowsep="0">
4382                   <entry colname="1">
4383                     <para><command>general</command></para>
4384                   </entry>
4385                   <entry colname="2">
4386                     <para>
4387                       The catch-all. Many things still aren't
4388                       classified into categories, and they all end up here.
4389                     </para>
4390                   </entry>
4391                 </row>
4392                 <row rowsep="0">
4393                   <entry colname="1">
4394                     <para><command>database</command></para>
4395                   </entry>
4396                   <entry colname="2">
4397                     <para>
4398                       Messages relating to the databases used
4399                       internally by the name server to store zone and cache
4400                       data.
4401                     </para>
4402                   </entry>
4403                 </row>
4404                 <row rowsep="0">
4405                   <entry colname="1">
4406                     <para><command>security</command></para>
4407                   </entry>
4408                   <entry colname="2">
4409                     <para>
4410                       Approval and denial of requests.
4411                     </para>
4412                   </entry>
4413                 </row>
4414                 <row rowsep="0">
4415                   <entry colname="1">
4416                     <para><command>config</command></para>
4417                   </entry>
4418                   <entry colname="2">
4419                     <para>
4420                       Configuration file parsing and processing.
4421                     </para>
4422                   </entry>
4423                 </row>
4424                 <row rowsep="0">
4425                   <entry colname="1">
4426                     <para><command>resolver</command></para>
4427                   </entry>
4428                   <entry colname="2">
4429                     <para>
4430                       DNS resolution, such as the recursive
4431                       lookups performed on behalf of clients by a caching name
4432                       server.
4433                     </para>
4434                   </entry>
4435                 </row>
4436                 <row rowsep="0">
4437                   <entry colname="1">
4438                     <para><command>xfer-in</command></para>
4439                   </entry>
4440                   <entry colname="2">
4441                     <para>
4442                       Zone transfers the server is receiving.
4443                     </para>
4444                   </entry>
4445                 </row>
4446                 <row rowsep="0">
4447                   <entry colname="1">
4448                     <para><command>xfer-out</command></para>
4449                   </entry>
4450                   <entry colname="2">
4451                     <para>
4452                       Zone transfers the server is sending.
4453                     </para>
4454                   </entry>
4455                 </row>
4456                 <row rowsep="0">
4457                   <entry colname="1">
4458                     <para><command>notify</command></para>
4459                   </entry>
4460                   <entry colname="2">
4461                     <para>
4462                       The NOTIFY protocol.
4463                     </para>
4464                   </entry>
4465                 </row>
4466                 <row rowsep="0">
4467                   <entry colname="1">
4468                     <para><command>client</command></para>
4469                   </entry>
4470                   <entry colname="2">
4471                     <para>
4472                       Processing of client requests.
4473                     </para>
4474                   </entry>
4475                 </row>
4476                 <row rowsep="0">
4477                   <entry colname="1">
4478                     <para><command>unmatched</command></para>
4479                   </entry>
4480                   <entry colname="2">
4481                     <para>
4482                       Messages that <command>named</command> was unable to determine the
4483                       class of or for which there was no matching <command>view</command>.
4484                       A one line summary is also logged to the <command>client</command> category.
4485                       This category is best sent to a file or stderr, by
4486                       default it is sent to
4487                       the <command>null</command> channel.
4488                     </para>
4489                   </entry>
4490                 </row>
4491                 <row rowsep="0">
4492                   <entry colname="1">
4493                     <para><command>network</command></para>
4494                   </entry>
4495                   <entry colname="2">
4496                     <para>
4497                       Network operations.
4498                     </para>
4499                   </entry>
4500                 </row>
4501                 <row rowsep="0">
4502                   <entry colname="1">
4503                     <para><command>update</command></para>
4504                   </entry>
4505                   <entry colname="2">
4506                     <para>
4507                       Dynamic updates.
4508                     </para>
4509                   </entry>
4510                 </row>
4511                 <row rowsep="0">
4512                   <entry colname="1">
4513                     <para><command>update-security</command></para>
4514                   </entry>
4515                   <entry colname="2">
4516                     <para>
4517                       Approval and denial of update requests.
4518                     </para>
4519                   </entry>
4520                 </row>
4521                 <row rowsep="0">
4522                   <entry colname="1">
4523                     <para><command>queries</command></para>
4524                   </entry>
4525                   <entry colname="2">
4526                     <para>
4527                       Specify where queries should be logged to.
4528                     </para>
4529                     <para>
4530                       At startup, specifying the category <command>queries</command> will also
4531                       enable query logging unless <command>querylog</command> option has been
4532                       specified.
4533                     </para>
4534
4535                     <para>
4536                       The query log entry reports the client's IP
4537                       address and port number, and the query name,
4538                       class and type.  Next it reports whether the
4539                       Recursion Desired flag was set (+ if set, -
4540                       if not set), if the query was signed (S),
4541                       EDNS was in use (E), if TCP was used (T), if
4542                       DO (DNSSEC Ok) was set (D), or if CD (Checking
4543                       Disabled) was set (C).  After this the
4544                       destination address the query was sent to is
4545                       reported.
4546                     </para>
4547
4548                     <para>
4549                       <computeroutput>client 127.0.0.1#62536: query: www.example.com IN AAAA +SE</computeroutput>
4550                     </para>
4551                     <para>
4552                       <computeroutput>client ::1#62537: query: www.example.net IN AAAA -SE</computeroutput>
4553                     </para>
4554                   </entry>
4555                 </row>
4556                 <row rowsep="0">
4557                   <entry colname="1">
4558                     <para><command>query-errors</command></para>
4559                   </entry>
4560                   <entry colname="2">
4561                     <para>
4562                       Information about queries that resulted in some
4563                       failure.
4564                     </para>
4565                   </entry>
4566                 </row>
4567                 <row rowsep="0">
4568                   <entry colname="1">
4569                     <para><command>dispatch</command></para>
4570                   </entry>
4571                   <entry colname="2">
4572                     <para>
4573                       Dispatching of incoming packets to the
4574                       server modules where they are to be processed.
4575                     </para>
4576                   </entry>
4577                 </row>
4578                 <row rowsep="0">
4579                   <entry colname="1">
4580                     <para><command>dnssec</command></para>
4581                   </entry>
4582                   <entry colname="2">
4583                     <para>
4584                       DNSSEC and TSIG protocol processing.
4585                     </para>
4586                   </entry>
4587                 </row>
4588                 <row rowsep="0">
4589                   <entry colname="1">
4590                     <para><command>lame-servers</command></para>
4591                   </entry>
4592                   <entry colname="2">
4593                     <para>
4594                       Lame servers.  These are misconfigurations
4595                       in remote servers, discovered by BIND 9 when trying to
4596                       query those servers during resolution.
4597                     </para>
4598                   </entry>
4599                 </row>
4600                 <row rowsep="0">
4601                   <entry colname="1">
4602                     <para><command>delegation-only</command></para>
4603                   </entry>
4604                   <entry colname="2">
4605                     <para>
4606                       Delegation only.  Logs queries that have been
4607                       forced to NXDOMAIN as the result of a
4608                       delegation-only zone or a
4609                       <command>delegation-only</command> in a hint
4610                       or stub zone declaration.
4611                     </para>
4612                   </entry>
4613                 </row>
4614                 <row rowsep="0">
4615                   <entry colname="1">
4616                     <para><command>edns-disabled</command></para>
4617                   </entry>
4618                   <entry colname="2">
4619                     <para>
4620                       Log queries that have been forced to use plain
4621                       DNS due to timeouts.  This is often due to
4622                       the remote servers not being RFC 1034 compliant
4623                       (not always returning FORMERR or similar to
4624                       EDNS queries and other extensions to the DNS
4625                       when they are not understood).  In other words, this is
4626                       targeted at servers that fail to respond to
4627                       DNS queries that they don't understand.
4628                     </para>
4629                     <para>
4630                       Note: the log message can also be due to
4631                       packet loss.  Before reporting servers for
4632                       non-RFC 1034 compliance they should be re-tested
4633                       to determine the nature of the non-compliance.
4634                       This testing should prevent or reduce the
4635                       number of false-positive reports.
4636                     </para>
4637                     <para>
4638                       Note: eventually <command>named</command> will have to stop
4639                       treating such timeouts as due to RFC 1034 non
4640                       compliance and start treating it as plain
4641                       packet loss.  Falsely classifying packet
4642                       loss as due to RFC 1034 non compliance impacts
4643                       on DNSSEC validation which requires EDNS for
4644                       the DNSSEC records to be returned.
4645                     </para>
4646                   </entry>
4647                 </row>
4648               </tbody>
4649             </tgroup>
4650           </informaltable>
4651         </sect3>
4652         <sect3>
4653           <title>The <command>query-errors</command> Category</title>
4654           <para>
4655             The <command>query-errors</command> category is
4656             specifically intended for debugging purposes: To identify
4657             why and how specific queries result in responses which
4658             indicate an error.
4659             Messages of this category are therefore only logged
4660             with <command>debug</command> levels.
4661           </para>
4662
4663           <para>
4664             At the debug levels of 1 or higher, each response with the
4665             rcode of SERVFAIL is logged as follows:
4666           </para>
4667           <para>
4668             <computeroutput>client 127.0.0.1#61502: query failed (SERVFAIL) for www.example.com/IN/AAAA at query.c:3880</computeroutput>
4669           </para>
4670           <para>
4671             This means an error resulting in SERVFAIL was
4672             detected at line 3880 of source file
4673             <filename>query.c</filename>.
4674             Log messages of this level will particularly
4675             help identify the cause of SERVFAIL for an
4676             authoritative server.
4677           </para>
4678           <para>
4679             At the debug levels of 2 or higher, detailed context
4680             information of recursive resolutions that resulted in
4681             SERVFAIL is logged.
4682             The log message will look like as follows:
4683           </para>
4684           <para>
4685 <!-- NOTE: newlines and some spaces added so this would fit on page -->
4686             <programlisting>
4687 fetch completed at resolver.c:2970 for www.example.com/A
4688 in 30.000183: timed out/success [domain:example.com,
4689 referral:2,restart:7,qrysent:8,timeout:5,lame:0,neterr:0,
4690 badresp:1,adberr:0,findfail:0,valfail:0]
4691             </programlisting>
4692           </para>
4693           <para>
4694             The first part before the colon shows that a recursive
4695             resolution for AAAA records of www.example.com completed
4696             in 30.000183 seconds and the final result that led to the
4697             SERVFAIL was determined at line 2970 of source file
4698             <filename>resolver.c</filename>.
4699           </para>
4700           <para>
4701             The following part shows the detected final result and the
4702             latest result of DNSSEC validation.
4703             The latter is always success when no validation attempt
4704             is made.
4705             In this example, this query resulted in SERVFAIL probably
4706             because all name servers are down or unreachable, leading
4707             to a timeout in 30 seconds.
4708             DNSSEC validation was probably not attempted.
4709           </para>
4710           <para>
4711             The last part enclosed in square brackets shows statistics
4712             information collected for this particular resolution
4713             attempt.
4714             The <varname>domain</varname> field shows the deepest zone
4715             that the resolver reached;
4716             it is the zone where the error was finally detected.
4717             The meaning of the other fields is summarized in the
4718             following table.
4719           </para>
4720
4721           <informaltable colsep="0" rowsep="0">
4722             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
4723               <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
4724               <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
4725               <tbody>
4726                 <row rowsep="0">
4727                   <entry colname="1">
4728                     <para><varname>referral</varname></para>
4729                   </entry>
4730                   <entry colname="2">
4731                     <para>
4732                       The number of referrals the resolver received
4733                       throughout the resolution process.
4734                       In the above example this is 2, which are most
4735                       likely com and example.com.
4736                     </para>
4737                   </entry>
4738                 </row>
4739                 <row rowsep="0">
4740                   <entry colname="1">
4741                     <para><varname>restart</varname></para>
4742                   </entry>
4743                   <entry colname="2">
4744                     <para>
4745                       The number of cycles that the resolver tried
4746                       remote servers at the <varname>domain</varname>
4747                       zone.
4748                       In each cycle the resolver sends one query
4749                       (possibly resending it, depending on the response)
4750                       to each known name server of
4751                       the <varname>domain</varname> zone.
4752                     </para>
4753                   </entry>
4754                 </row>
4755                 <row rowsep="0">
4756                   <entry colname="1">
4757                     <para><varname>qrysent</varname></para>
4758                   </entry>
4759                   <entry colname="2">
4760                     <para>
4761                       The number of queries the resolver sent at the
4762                       <varname>domain</varname> zone.
4763                     </para>
4764                   </entry>
4765                 </row>
4766                 <row rowsep="0">
4767                   <entry colname="1">
4768                     <para><varname>timeout</varname></para>
4769                   </entry>
4770                   <entry colname="2">
4771                     <para>
4772                       The number of timeouts since the resolver
4773                       received the last response.
4774                     </para>
4775                   </entry>
4776                 </row>
4777                 <row rowsep="0">
4778                   <entry colname="1">
4779                     <para><varname>lame</varname></para>
4780                   </entry>
4781                   <entry colname="2">
4782                     <para>
4783                       The number of lame servers the resolver detected
4784                       at the <varname>domain</varname> zone.
4785                       A server is detected to be lame either by an
4786                       invalid response or as a result of lookup in
4787                       BIND9's address database (ADB), where lame
4788                       servers are cached.
4789                     </para>
4790                   </entry>
4791                 </row>
4792                 <row rowsep="0">
4793                   <entry colname="1">
4794                     <para><varname>neterr</varname></para>
4795                   </entry>
4796                   <entry colname="2">
4797                     <para>
4798                       The number of erroneous results that the
4799                       resolver encountered in sending queries
4800                       at the <varname>domain</varname> zone.
4801                       One common case is the remote server is
4802                       unreachable and the resolver receives an ICMP
4803                       unreachable error message.
4804                     </para>
4805                   </entry>
4806                 </row>
4807                 <row rowsep="0">
4808                   <entry colname="1">
4809                     <para><varname>badresp</varname></para>
4810                   </entry>
4811                   <entry colname="2">
4812                     <para>
4813                       The number of unexpected responses (other than
4814                       <varname>lame</varname>) to queries sent by the
4815                       resolver at the <varname>domain</varname> zone.
4816                     </para>
4817                   </entry>
4818                 </row>
4819                 <row rowsep="0">
4820                   <entry colname="1">
4821                     <para><varname>adberr</varname></para>
4822                   </entry>
4823                   <entry colname="2">
4824                     <para>
4825                       Failures in finding remote server addresses
4826                       of the <varname>domain</varname> zone in the ADB.
4827                       One common case of this is that the remote
4828                       server's name does not have any address records.
4829                     </para>
4830                   </entry>
4831                 </row>
4832                 <row rowsep="0">
4833                   <entry colname="1">
4834                     <para><varname>findfail</varname></para>
4835                   </entry>
4836                   <entry colname="2">
4837                     <para>
4838                       Failures of resolving remote server addresses.
4839                       This is a total number of failures throughout
4840                       the resolution process.
4841                     </para>
4842                   </entry>
4843                 </row>
4844                 <row rowsep="0">
4845                   <entry colname="1">
4846                     <para><varname>valfail</varname></para>
4847                   </entry>
4848                   <entry colname="2">
4849                     <para>
4850                       Failures of DNSSEC validation.
4851                       Validation failures are counted throughout
4852                       the resolution process (not limited to
4853                       the <varname>domain</varname> zone), but should
4854                       only happen in <varname>domain</varname>.
4855                     </para>
4856                   </entry>
4857                 </row>
4858               </tbody>
4859             </tgroup>
4860           </informaltable>
4861           <para>
4862             At the debug levels of 3 or higher, the same messages
4863             as those at the debug 1 level are logged for other errors
4864             than SERVFAIL.
4865             Note that negative responses such as NXDOMAIN are not
4866             regarded as errors here.
4867           </para>
4868           <para>
4869             At the debug levels of 4 or higher, the same messages
4870             as those at the debug 2 level are logged for other errors
4871             than SERVFAIL.
4872             Unlike the above case of level 3, messages are logged for
4873             negative responses.
4874             This is because any unexpected results can be difficult to
4875             debug in the recursion case.
4876           </para>
4877         </sect3>
4878       </sect2>
4879
4880       <sect2>
4881         <title><command>lwres</command> Statement Grammar</title>
4882
4883         <para>
4884            This is the grammar of the <command>lwres</command>
4885           statement in the <filename>named.conf</filename> file:
4886         </para>
4887
4888 <programlisting><command>lwres</command> {
4889     <optional> listen-on { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
4890                 <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
4891     <optional> view <replaceable>view_name</replaceable>; </optional>
4892     <optional> search { <replaceable>domain_name</replaceable> ; <optional> <replaceable>domain_name</replaceable> ; ... </optional> }; </optional>
4893     <optional> ndots <replaceable>number</replaceable>; </optional>
4894 };
4895 </programlisting>
4896
4897       </sect2>
4898       <sect2>
4899         <title><command>lwres</command> Statement Definition and Usage</title>
4900
4901         <para>
4902           The <command>lwres</command> statement configures the
4903           name
4904           server to also act as a lightweight resolver server. (See
4905           <xref linkend="lwresd"/>.)  There may be multiple
4906           <command>lwres</command> statements configuring
4907           lightweight resolver servers with different properties.
4908         </para>
4909
4910         <para>
4911           The <command>listen-on</command> statement specifies a
4912           list of
4913           addresses (and ports) that this instance of a lightweight resolver
4914           daemon
4915           should accept requests on.  If no port is specified, port 921 is
4916           used.
4917           If this statement is omitted, requests will be accepted on
4918           127.0.0.1,
4919           port 921.
4920         </para>
4921
4922         <para>
4923           The <command>view</command> statement binds this
4924           instance of a
4925           lightweight resolver daemon to a view in the DNS namespace, so that
4926           the
4927           response will be constructed in the same manner as a normal DNS
4928           query
4929           matching this view.  If this statement is omitted, the default view
4930           is
4931           used, and if there is no default view, an error is triggered.
4932         </para>
4933
4934         <para>
4935           The <command>search</command> statement is equivalent to
4936           the
4937           <command>search</command> statement in
4938           <filename>/etc/resolv.conf</filename>.  It provides a
4939           list of domains
4940           which are appended to relative names in queries.
4941         </para>
4942
4943         <para>
4944           The <command>ndots</command> statement is equivalent to
4945           the
4946           <command>ndots</command> statement in
4947           <filename>/etc/resolv.conf</filename>.  It indicates the
4948           minimum
4949           number of dots in a relative domain name that should result in an
4950           exact match lookup before search path elements are appended.
4951         </para>
4952       </sect2>
4953       <sect2>
4954         <title><command>masters</command> Statement Grammar</title>
4955
4956 <programlisting>
4957 <command>masters</command> <replaceable>name</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> { ( <replaceable>masters_list</replaceable> | 
4958       <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> };
4959 </programlisting>
4960
4961       </sect2>
4962
4963       <sect2>
4964         <title><command>masters</command> Statement Definition and
4965           Usage</title>
4966         <para><command>masters</command>
4967           lists allow for a common set of masters to be easily used by
4968           multiple stub and slave zones.
4969         </para>
4970       </sect2>
4971
4972       <sect2>
4973         <title><command>options</command> Statement Grammar</title>
4974
4975         <para>
4976           This is the grammar of the <command>options</command>
4977           statement in the <filename>named.conf</filename> file:
4978         </para>
4979
4980 <programlisting><command>options</command> {
4981     <optional> attach-cache <replaceable>cache_name</replaceable>; </optional>
4982     <optional> version <replaceable>version_string</replaceable>; </optional>
4983     <optional> hostname <replaceable>hostname_string</replaceable>; </optional>
4984     <optional> server-id <replaceable>server_id_string</replaceable>; </optional>
4985     <optional> directory <replaceable>path_name</replaceable>; </optional>
4986     <optional> key-directory <replaceable>path_name</replaceable>; </optional>
4987     <optional> managed-keys-directory <replaceable>path_name</replaceable>; </optional>
4988     <optional> named-xfer <replaceable>path_name</replaceable>; </optional>
4989     <optional> tkey-gssapi-keytab <replaceable>path_name</replaceable>; </optional>
4990     <optional> tkey-gssapi-credential <replaceable>principal</replaceable>; </optional>
4991     <optional> tkey-domain <replaceable>domainname</replaceable>; </optional>
4992     <optional> tkey-dhkey <replaceable>key_name</replaceable> <replaceable>key_tag</replaceable>; </optional>
4993     <optional> cache-file <replaceable>path_name</replaceable>; </optional>
4994     <optional> dump-file <replaceable>path_name</replaceable>; </optional>
4995     <optional> bindkeys-file <replaceable>path_name</replaceable>; </optional>
4996     <optional> memstatistics <replaceable>yes_or_no</replaceable>; </optional>
4997     <optional> memstatistics-file <replaceable>path_name</replaceable>; </optional>
4998     <optional> pid-file <replaceable>path_name</replaceable>; </optional>
4999     <optional> recursing-file <replaceable>path_name</replaceable>; </optional>
5000     <optional> statistics-file <replaceable>path_name</replaceable>; </optional>
5001     <optional> zone-statistics <replaceable>yes_or_no</replaceable>; </optional>
5002     <optional> auth-nxdomain <replaceable>yes_or_no</replaceable>; </optional>
5003     <optional> deallocate-on-exit <replaceable>yes_or_no</replaceable>; </optional>
5004     <optional> dialup <replaceable>dialup_option</replaceable>; </optional>
5005     <optional> fake-iquery <replaceable>yes_or_no</replaceable>; </optional>
5006     <optional> fetch-glue <replaceable>yes_or_no</replaceable>; </optional>
5007     <optional> flush-zones-on-shutdown <replaceable>yes_or_no</replaceable>; </optional>
5008     <optional> has-old-clients <replaceable>yes_or_no</replaceable>; </optional>
5009     <optional> host-statistics <replaceable>yes_or_no</replaceable>; </optional>
5010     <optional> host-statistics-max <replaceable>number</replaceable>; </optional>
5011     <optional> minimal-responses <replaceable>yes_or_no</replaceable>; </optional>
5012     <optional> multiple-cnames <replaceable>yes_or_no</replaceable>; </optional>
5013     <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable>; </optional>
5014     <optional> recursion <replaceable>yes_or_no</replaceable>; </optional>
5015     <optional> rfc2308-type1 <replaceable>yes_or_no</replaceable>; </optional>
5016     <optional> use-id-pool <replaceable>yes_or_no</replaceable>; </optional>
5017     <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable>; </optional>
5018     <optional> ixfr-from-differences (<replaceable>yes_or_no</replaceable> | <constant>master</constant> | <constant>slave</constant>); </optional>
5019     <optional> dnssec-enable <replaceable>yes_or_no</replaceable>; </optional>
5020     <optional> dnssec-validation (<replaceable>yes_or_no</replaceable> | <constant>auto</constant>); </optional>
5021     <optional> dnssec-lookaside ( <replaceable>auto</replaceable> | 
5022                         <replaceable>domain</replaceable> trust-anchor <replaceable>domain</replaceable> ); </optional>
5023     <optional> dnssec-must-be-secure <replaceable>domain yes_or_no</replaceable>; </optional>
5024     <optional> dnssec-accept-expired <replaceable>yes_or_no</replaceable>; </optional>
5025     <optional> forward ( <replaceable>only</replaceable> | <replaceable>first</replaceable> ); </optional>
5026     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
5027     <optional> dual-stack-servers <optional>port <replaceable>ip_port</replaceable></optional> {
5028         ( <replaceable>domain_name</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> |
5029           <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ) ; 
5030         ... }; </optional>
5031     <optional> check-names ( <replaceable>master</replaceable> | <replaceable>slave</replaceable> | <replaceable>response</replaceable> )
5032         ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
5033     <optional> check-dup-records ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
5034     <optional> check-mx ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
5035     <optional> check-wildcard <replaceable>yes_or_no</replaceable>; </optional>
5036     <optional> check-integrity <replaceable>yes_or_no</replaceable>; </optional>
5037     <optional> check-mx-cname ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
5038     <optional> check-srv-cname ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
5039     <optional> check-sibling <replaceable>yes_or_no</replaceable>; </optional>
5040     <optional> allow-new-zones { <replaceable>yes_or_no</replaceable> }; </optional>
5041     <optional> allow-notify { <replaceable>address_match_list</replaceable> }; </optional>
5042     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
5043     <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
5044     <optional> allow-query-cache { <replaceable>address_match_list</replaceable> }; </optional>
5045     <optional> allow-query-cache-on { <replaceable>address_match_list</replaceable> }; </optional>
5046     <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
5047     <optional> allow-recursion { <replaceable>address_match_list</replaceable> }; </optional>
5048     <optional> allow-recursion-on { <replaceable>address_match_list</replaceable> }; </optional>
5049     <optional> allow-update { <replaceable>address_match_list</replaceable> }; </optional>
5050     <optional> allow-update-forwarding { <replaceable>address_match_list</replaceable> }; </optional>
5051     <optional> update-check-ksk <replaceable>yes_or_no</replaceable>; </optional>
5052     <optional> dnssec-dnskey-kskonly <replaceable>yes_or_no</replaceable>; </optional>
5053     <optional> dnssec-secure-to-insecure <replaceable>yes_or_no</replaceable> ;</optional>
5054     <optional> try-tcp-refresh <replaceable>yes_or_no</replaceable>; </optional>
5055     <optional> allow-v6-synthesis { <replaceable>address_match_list</replaceable> }; </optional>
5056     <optional> blackhole { <replaceable>address_match_list</replaceable> }; </optional>
5057     <optional> use-v4-udp-ports { <replaceable>port_list</replaceable> }; </optional>
5058     <optional> avoid-v4-udp-ports { <replaceable>port_list</replaceable> }; </optional>
5059     <optional> use-v6-udp-ports { <replaceable>port_list</replaceable> }; </optional>
5060     <optional> avoid-v6-udp-ports { <replaceable>port_list</replaceable> }; </optional>
5061     <optional> listen-on <optional> port <replaceable>ip_port</replaceable> </optional> { <replaceable>address_match_list</replaceable> }; </optional>
5062     <optional> listen-on-v6 <optional> port <replaceable>ip_port</replaceable> </optional> { <replaceable>address_match_list</replaceable> }; </optional>
5063     <optional> query-source ( ( <replaceable>ip4_addr</replaceable> | <replaceable>*</replaceable> )
5064         <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> |
5065         <optional> address ( <replaceable>ip4_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
5066         <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> ) ; </optional>
5067     <optional> query-source-v6 ( ( <replaceable>ip6_addr</replaceable> | <replaceable>*</replaceable> )
5068         <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> | 
5069         <optional> address ( <replaceable>ip6_addr</replaceable> | <replaceable>*</replaceable> ) </optional> 
5070         <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> ) ; </optional>
5071     <optional> use-queryport-pool <replaceable>yes_or_no</replaceable>; </optional>
5072     <optional> queryport-pool-ports <replaceable>number</replaceable>; </optional>
5073     <optional> queryport-pool-updateinterval <replaceable>number</replaceable>; </optional>
5074     <optional> max-transfer-time-in <replaceable>number</replaceable>; </optional>
5075     <optional> max-transfer-time-out <replaceable>number</replaceable>; </optional>
5076     <optional> max-transfer-idle-in <replaceable>number</replaceable>; </optional>
5077     <optional> max-transfer-idle-out <replaceable>number</replaceable>; </optional>
5078     <optional> tcp-clients <replaceable>number</replaceable>; </optional>
5079     <optional> reserved-sockets <replaceable>number</replaceable>; </optional>
5080     <optional> recursive-clients <replaceable>number</replaceable>; </optional>
5081     <optional> serial-query-rate <replaceable>number</replaceable>; </optional>
5082     <optional> serial-queries <replaceable>number</replaceable>; </optional>
5083     <optional> tcp-listen-queue <replaceable>number</replaceable>; </optional>
5084     <optional> transfer-format <replaceable>( one-answer | many-answers )</replaceable>; </optional>
5085     <optional> transfers-in  <replaceable>number</replaceable>; </optional>
5086     <optional> transfers-out <replaceable>number</replaceable>; </optional>
5087     <optional> transfers-per-ns <replaceable>number</replaceable>; </optional>
5088     <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
5089     <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
5090     <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
5091     <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
5092                              <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
5093     <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
5094     <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
5095     <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
5096     <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
5097     <optional> notify-to-soa <replaceable>yes_or_no</replaceable> ; </optional>
5098     <optional> also-notify { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
5099                   <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
5100     <optional> max-ixfr-log-size <replaceable>number</replaceable>; </optional>
5101     <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
5102     <optional> coresize <replaceable>size_spec</replaceable> ; </optional>
5103     <optional> datasize <replaceable>size_spec</replaceable> ; </optional>
5104     <optional> files <replaceable>size_spec</replaceable> ; </optional>
5105     <optional> stacksize <replaceable>size_spec</replaceable> ; </optional>
5106     <optional> cleaning-interval <replaceable>number</replaceable>; </optional>
5107     <optional> heartbeat-interval <replaceable>number</replaceable>; </optional>
5108     <optional> interface-interval <replaceable>number</replaceable>; </optional>
5109     <optional> statistics-interval <replaceable>number</replaceable>; </optional>
5110     <optional> topology { <replaceable>address_match_list</replaceable> }</optional>;
5111     <optional> sortlist { <replaceable>address_match_list</replaceable> }</optional>;
5112     <optional> rrset-order { <replaceable>order_spec</replaceable> ; <optional> <replaceable>order_spec</replaceable> ; ... </optional> </optional> };
5113     <optional> lame-ttl <replaceable>number</replaceable>; </optional>
5114     <optional> max-ncache-ttl <replaceable>number</replaceable>; </optional>
5115     <optional> max-cache-ttl <replaceable>number</replaceable>; </optional>
5116     <optional> sig-validity-interval <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
5117     <optional> sig-signing-nodes <replaceable>number</replaceable> ; </optional>
5118     <optional> sig-signing-signatures <replaceable>number</replaceable> ; </optional>
5119     <optional> sig-signing-type <replaceable>number</replaceable> ; </optional>
5120     <optional> min-roots <replaceable>number</replaceable>; </optional>
5121     <optional> use-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
5122     <optional> provide-ixfr <replaceable>yes_or_no</replaceable>; </optional>
5123     <optional> request-ixfr <replaceable>yes_or_no</replaceable>; </optional>
5124     <optional> treat-cr-as-space <replaceable>yes_or_no</replaceable> ; </optional>
5125     <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
5126     <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
5127     <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
5128     <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
5129     <optional> port <replaceable>ip_port</replaceable>; </optional>
5130     <optional> additional-from-auth <replaceable>yes_or_no</replaceable> ; </optional>
5131     <optional> additional-from-cache <replaceable>yes_or_no</replaceable> ; </optional>
5132     <optional> random-device <replaceable>path_name</replaceable> ; </optional>
5133     <optional> max-cache-size <replaceable>size_spec</replaceable> ; </optional>
5134     <optional> match-mapped-addresses <replaceable>yes_or_no</replaceable>; </optional>
5135     <optional> filter-aaaa-on-v4 ( <replaceable>yes_or_no</replaceable> | <replaceable>break-dnssec</replaceable> ); </optional>
5136     <optional> filter-aaaa { <replaceable>address_match_list</replaceable> }; </optional>
5137     <optional> dns64 <replaceable>IPv6-prefix</replaceable> {
5138         <optional> clients { <replaceable>address_match_list</replaceable> }; </optional>
5139         <optional> mapped { <replaceable>address_match_list</replaceable> }; </optional>
5140         <optional> exclude { <replaceable>address_match_list</replaceable> }; </optional>
5141         <optional> suffix IPv6-address; </optional>
5142         <optional> recursive-only <replaceable>yes_or_no</replaceable>; </optional>
5143         <optional> break-dnssec <replaceable>yes_or_no</replaceable>; </optional>
5144     }; </optional>;
5145     <optional> dns64-server <replaceable>name</replaceable> </optional>
5146     <optional> dns64-contact <replaceable>name</replaceable> </optional>
5147     <optional> preferred-glue ( <replaceable>A</replaceable> | <replaceable>AAAA</replaceable> | <replaceable>NONE</replaceable> ); </optional>
5148     <optional> edns-udp-size <replaceable>number</replaceable>; </optional>
5149     <optional> max-udp-size <replaceable>number</replaceable>; </optional>
5150     <optional> root-delegation-only <optional> exclude { <replaceable>namelist</replaceable> } </optional> ; </optional>
5151     <optional> querylog <replaceable>yes_or_no</replaceable> ; </optional>
5152     <optional> disable-algorithms <replaceable>domain</replaceable> { <replaceable>algorithm</replaceable>;
5153                                 <optional> <replaceable>algorithm</replaceable>; </optional> }; </optional>
5154     <optional> acache-enable <replaceable>yes_or_no</replaceable> ; </optional>
5155     <optional> acache-cleaning-interval <replaceable>number</replaceable>; </optional>
5156     <optional> max-acache-size <replaceable>size_spec</replaceable> ; </optional>
5157     <optional> clients-per-query <replaceable>number</replaceable> ; </optional>
5158     <optional> max-clients-per-query <replaceable>number</replaceable> ; </optional>
5159     <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
5160     <optional> empty-server <replaceable>name</replaceable> ; </optional>
5161     <optional> empty-contact <replaceable>name</replaceable> ; </optional>
5162     <optional> empty-zones-enable <replaceable>yes_or_no</replaceable> ; </optional>
5163     <optional> disable-empty-zone <replaceable>zone_name</replaceable> ; </optional>
5164     <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
5165     <optional> zero-no-soa-ttl-cache <replaceable>yes_or_no</replaceable> ; </optional>
5166     <optional> resolver-query-timeout <replaceable>number</replaceable> ; </optional>
5167     <optional> deny-answer-addresses { <replaceable>address_match_list</replaceable> } <optional> except-from { <replaceable>namelist</replaceable> } </optional>;</optional>
5168     <optional> deny-answer-aliases { <replaceable>namelist</replaceable> } <optional> except-from { <replaceable>namelist</replaceable> } </optional>;</optional>
5169     <optional> response-policy { <replaceable>zone_name</replaceable> <optional> policy <replaceable>given</replaceable> | <replaceable>no-op</replaceable> | <replaceable>nxdomain</replaceable> | <replaceable>nodata</replaceable> | <replaceable>cname domain</replaceable> </optional> ; } ; </optional>
5170 };
5171 </programlisting>
5172
5173       </sect2>
5174
5175       <sect2 id="options">
5176         <title><command>options</command> Statement Definition and
5177           Usage</title>
5178
5179         <para>
5180           The <command>options</command> statement sets up global
5181           options
5182           to be used by <acronym>BIND</acronym>. This statement
5183           may appear only
5184           once in a configuration file. If there is no <command>options</command>
5185           statement, an options block with each option set to its default will
5186           be used.
5187         </para>
5188
5189         <variablelist>
5190
5191             <varlistentry>
5192               <term><command>attach-cache</command></term>
5193               <listitem>
5194                 <para>
5195                   Allows multiple views to share a single cache
5196                   database.
5197                   Each view has its own cache database by default, but
5198                   if multiple views have the same operational policy
5199                   for name resolution and caching, those views can
5200                   share a single cache to save memory and possibly
5201                   improve resolution efficiency by using this option.
5202                 </para>
5203
5204                 <para>
5205                   The <command>attach-cache</command> option
5206                   may also be specified in <command>view</command>
5207                   statements, in which case it overrides the
5208                   global <command>attach-cache</command> option.
5209                 </para>
5210
5211                 <para>
5212                   The <replaceable>cache_name</replaceable> specifies
5213                   the cache to be shared.
5214                   When the <command>named</command> server configures
5215                   views which are supposed to share a cache, it
5216                   creates a cache with the specified name for the
5217                   first view of these sharing views.
5218                   The rest of the views will simply refer to the
5219                   already created cache.
5220                 </para>
5221
5222                 <para>
5223                   One common configuration to share a cache would be to
5224                   allow all views to share a single cache.
5225                   This can be done by specifying
5226                   the <command>attach-cache</command> as a global
5227                   option with an arbitrary name.
5228                 </para>
5229
5230                 <para>
5231                   Another possible operation is to allow a subset of
5232                   all views to share a cache while the others to
5233                   retain their own caches.
5234                   For example, if there are three views A, B, and C,
5235                   and only A and B should share a cache, specify the
5236                   <command>attach-cache</command> option as a view A (or
5237                   B)'s option, referring to the other view name:
5238                 </para>
5239
5240 <programlisting>
5241   view "A" {
5242     // this view has its own cache
5243     ...
5244   };
5245   view "B" {
5246     // this view refers to A's cache
5247     attach-cache "A";
5248   };
5249   view "C" {
5250     // this view has its own cache
5251     ...
5252   };
5253 </programlisting>
5254
5255                 <para>
5256                   Views that share a cache must have the same policy
5257                   on configurable parameters that may affect caching.
5258                   The current implementation requires the following
5259                   configurable options be consistent among these
5260                   views:
5261                   <command>check-names</command>,
5262                   <command>cleaning-interval</command>,
5263                   <command>dnssec-accept-expired</command>,
5264                   <command>dnssec-validation</command>,
5265                   <command>max-cache-ttl</command>,
5266                   <command>max-ncache-ttl</command>,
5267                   <command>max-cache-size</command>, and
5268                   <command>zero-no-soa-ttl</command>.
5269                 </para>
5270
5271                 <para>
5272                   Note that there may be other parameters that may
5273                   cause confusion if they are inconsistent for
5274                   different views that share a single cache.
5275                   For example, if these views define different sets of
5276                   forwarders that can return different answers for the
5277                   same question, sharing the answer does not make
5278                   sense or could even be harmful.
5279                   It is administrator's responsibility to ensure
5280                   configuration differences in different views do
5281                   not cause disruption with a shared cache.
5282                 </para>
5283               </listitem>
5284
5285             </varlistentry>
5286
5287           <varlistentry>
5288             <term><command>directory</command></term>
5289             <listitem>
5290               <para>
5291                 The working directory of the server.
5292                 Any non-absolute pathnames in the configuration file will be
5293                 taken
5294                 as relative to this directory. The default location for most
5295                 server
5296                 output files (e.g. <filename>named.run</filename>)
5297                 is this directory.
5298                 If a directory is not specified, the working directory
5299                 defaults to `<filename>.</filename>', the directory from
5300                 which the server
5301                 was started. The directory specified should be an absolute
5302                 path.
5303               </para>
5304             </listitem>
5305           </varlistentry>
5306
5307           <varlistentry>
5308             <term><command>key-directory</command></term>
5309             <listitem>
5310               <para>
5311                 When performing dynamic update of secure zones, the
5312                 directory where the public and private DNSSEC key files
5313                 should be found, if different than the current working
5314                 directory.  (Note that this option has no effect on the
5315                 paths for files containing non-DNSSEC keys such as
5316                 <filename>bind.keys</filename>,
5317                 <filename>rndc.key</filename> or
5318                 <filename>session.key</filename>.)
5319               </para>
5320             </listitem>
5321           </varlistentry>
5322
5323           <varlistentry>
5324             <term><command>managed-keys-directory</command></term>
5325             <listitem>
5326               <para>
5327                 The directory used to hold the files used to track managed keys.
5328                 By default it is the working directory.  It there are no
5329                 views then the file <filename>managed-keys.bind</filename>
5330                 otherwise a SHA256 hash of the view name is used with
5331                 <filename>.mkeys</filename> extension added.
5332               </para>
5333             </listitem>
5334           </varlistentry>
5335
5336           <varlistentry>
5337             <term><command>named-xfer</command></term>
5338             <listitem>
5339               <para>
5340                 <emphasis>This option is obsolete.</emphasis> It
5341                 was used in <acronym>BIND</acronym> 8 to specify
5342                 the pathname to the <command>named-xfer</command>
5343                 program.  In <acronym>BIND</acronym> 9, no separate
5344                 <command>named-xfer</command> program is needed;
5345                 its functionality is built into the name server.
5346               </para>
5347             </listitem>
5348           </varlistentry>
5349
5350           <varlistentry>
5351             <term><command>tkey-gssapi-keytab</command></term>
5352             <listitem>
5353               <para>
5354                 The KRB5 keytab file to use for GSS-TSIG updates. If
5355                 this option is set and tkey-gssapi-credential is not
5356                 set, then updates will be allowed with any key
5357                 matching a principal in the specified keytab.
5358               </para>
5359             </listitem>
5360           </varlistentry>
5361
5362           <varlistentry>
5363             <term><command>tkey-gssapi-credential</command></term>
5364             <listitem>
5365               <para>
5366                 The security credential with which the server should
5367                 authenticate keys requested by the GSS-TSIG protocol.
5368                 Currently only Kerberos 5 authentication is available
5369                 and the credential is a Kerberos principal which the
5370                 server can acquire through the default system key
5371                 file, normally <filename>/etc/krb5.keytab</filename>.
5372                 The location keytab file can be overridden using the
5373                 tkey-gssapi-keytab option. Normally this principal is
5374                 of the form "<userinput>DNS/</userinput><varname>server.domain</varname>".
5375                 To use GSS-TSIG, <command>tkey-domain</command> must
5376                 also be set if a specific keytab is not set with
5377                 tkey-gssapi-keytab.
5378               </para>
5379             </listitem>
5380           </varlistentry>
5381
5382           <varlistentry>
5383             <term><command>tkey-domain</command></term>
5384             <listitem>
5385               <para>
5386                 The domain appended to the names of all shared keys
5387                 generated with <command>TKEY</command>.  When a
5388                 client requests a <command>TKEY</command> exchange,
5389                 it may or may not specify the desired name for the
5390                 key. If present, the name of the shared key will
5391                 be <varname>client specified part</varname> +
5392                 <varname>tkey-domain</varname>.  Otherwise, the
5393                 name of the shared key will be <varname>random hex
5394                 digits</varname> + <varname>tkey-domain</varname>.
5395                 In most cases, the <command>domainname</command>
5396                 should be the server's domain name, or an otherwise
5397                 non-existent subdomain like
5398                 "_tkey.<varname>domainname</varname>".  If you are
5399                 using GSS-TSIG, this variable must be defined, unless
5400                 you specify a specific keytab using tkey-gssapi-keytab.
5401               </para>
5402             </listitem>
5403           </varlistentry>
5404
5405           <varlistentry>
5406             <term><command>tkey-dhkey</command></term>
5407             <listitem>
5408               <para>
5409                 The Diffie-Hellman key used by the server
5410                 to generate shared keys with clients using the Diffie-Hellman
5411                 mode
5412                 of <command>TKEY</command>. The server must be
5413                 able to load the
5414                 public and private keys from files in the working directory.
5415                 In
5416                 most cases, the keyname should be the server's host name.
5417               </para>
5418             </listitem>
5419           </varlistentry>
5420
5421           <varlistentry>
5422             <term><command>cache-file</command></term>
5423             <listitem>
5424               <para>
5425                 This is for testing only.  Do not use.
5426               </para>
5427             </listitem>
5428           </varlistentry>
5429
5430           <varlistentry>
5431             <term><command>dump-file</command></term>
5432             <listitem>
5433               <para>
5434                 The pathname of the file the server dumps
5435                 the database to when instructed to do so with
5436                 <command>rndc dumpdb</command>.
5437                 If not specified, the default is <filename>named_dump.db</filename>.
5438               </para>
5439             </listitem>
5440           </varlistentry>
5441
5442           <varlistentry>
5443             <term><command>memstatistics-file</command></term>
5444             <listitem>
5445               <para>
5446                 The pathname of the file the server writes memory
5447                 usage statistics to on exit. If not specified,
5448                 the default is <filename>named.memstats</filename>.
5449               </para>
5450             </listitem>
5451           </varlistentry>
5452
5453           <varlistentry>
5454             <term><command>pid-file</command></term>
5455             <listitem>
5456               <para>
5457                 The pathname of the file the server writes its process ID
5458                 in. If not specified, the default is
5459                 <filename>/var/run/named/named.pid</filename>.
5460                 The PID file is used by programs that want to send signals to
5461                 the running
5462                 name server. Specifying <command>pid-file none</command> disables the
5463                 use of a PID file &mdash; no file will be written and any
5464                 existing one will be removed.  Note that <command>none</command>
5465                 is a keyword, not a filename, and therefore is not enclosed
5466                 in
5467                 double quotes.
5468               </para>
5469             </listitem>
5470           </varlistentry>
5471
5472           <varlistentry>
5473             <term><command>recursing-file</command></term>
5474             <listitem>
5475               <para>
5476                 The pathname of the file the server dumps
5477                 the queries that are currently recursing when instructed
5478                 to do so with <command>rndc recursing</command>.
5479                 If not specified, the default is <filename>named.recursing</filename>.
5480               </para>
5481             </listitem>
5482           </varlistentry>
5483
5484           <varlistentry>
5485             <term><command>statistics-file</command></term>
5486             <listitem>
5487               <para>
5488                 The pathname of the file the server appends statistics
5489                 to when instructed to do so using <command>rndc stats</command>.
5490                 If not specified, the default is <filename>named.stats</filename> in the
5491                 server's current directory.  The format of the file is
5492                 described
5493                 in <xref linkend="statsfile"/>.
5494               </para>
5495             </listitem>
5496           </varlistentry>
5497
5498           <varlistentry>
5499             <term><command>bindkeys-file</command></term>
5500             <listitem>
5501               <para>
5502                 The pathname of a file to override the built-in trusted
5503                 keys provided by <command>named</command>.
5504                 See the discussion of <command>dnssec-lookaside</command>
5505                 and <command>dnssec-validation</command> for details. 
5506                 If not specified, the default is
5507                 <filename>/etc/bind.keys</filename>.
5508               </para>
5509             </listitem>
5510           </varlistentry>
5511
5512           <varlistentry>
5513             <term><command>secroots-file</command></term>
5514             <listitem>
5515               <para>
5516                 The pathname of the file the server dumps
5517                 security roots to when instructed to do so with
5518                 <command>rndc secroots</command>.
5519                 If not specified, the default is <filename>named.secroots</filename>.
5520               </para>
5521             </listitem>
5522           </varlistentry>
5523
5524           <varlistentry>
5525             <term><command>session-keyfile</command></term>
5526             <listitem>
5527               <para>
5528                 The pathname of the file into which to write a TSIG
5529                 session key generated by <command>named</command> for use by
5530                 <command>nsupdate -l</command>.  If not specified, the
5531                 default is <filename>/var/run/named/session.key</filename>.
5532                 (See <xref linkend="dynamic_update_policies"/>, and in
5533                 particular the discussion of the
5534                 <command>update-policy</command> statement's
5535                 <userinput>local</userinput> option for more
5536                 information about this feature.)
5537               </para>
5538             </listitem>
5539           </varlistentry>
5540
5541           <varlistentry>
5542             <term><command>session-keyname</command></term>
5543             <listitem>
5544               <para>
5545                 The key name to use for the TSIG session key.
5546                 If not specified, the default is "local-ddns".
5547               </para>
5548             </listitem>
5549           </varlistentry>
5550
5551           <varlistentry>
5552             <term><command>session-keyalg</command></term>
5553             <listitem>
5554               <para>
5555                 The algorithm to use for the TSIG session key.
5556                 Valid values are hmac-sha1, hmac-sha224, hmac-sha256,
5557                 hmac-sha384, hmac-sha512 and hmac-md5.  If not
5558                 specified, the default is hmac-sha256.
5559               </para>
5560             </listitem>
5561           </varlistentry>
5562
5563           <varlistentry>
5564             <term><command>session-keyfile</command></term>
5565             <listitem>
5566               <para>
5567                 The pathname of the file into which to write a session TSIG
5568                 key for use by <command>nsupdate -l</command>.  (See the
5569                 discussion of the <command>update-policy</command>
5570                 statement's <userinput>local</userinput> option for more
5571                 details on this feature.)
5572               </para>
5573             </listitem>
5574           </varlistentry>
5575
5576           <varlistentry>
5577             <term><command>port</command></term>
5578             <listitem>
5579               <para>
5580                 The UDP/TCP port number the server uses for
5581                 receiving and sending DNS protocol traffic.
5582                 The default is 53.  This option is mainly intended for server
5583                 testing;
5584                 a server using a port other than 53 will not be able to
5585                 communicate with
5586                 the global DNS.
5587               </para>
5588             </listitem>
5589           </varlistentry>
5590
5591           <varlistentry>
5592             <term><command>random-device</command></term>
5593             <listitem>
5594               <para>
5595                 The source of entropy to be used by the server.  Entropy is
5596                 primarily needed
5597                 for DNSSEC operations, such as TKEY transactions and dynamic
5598                 update of signed
5599                 zones.  This options specifies the device (or file) from which
5600                 to read
5601                 entropy.  If this is a file, operations requiring entropy will
5602                 fail when the
5603                 file has been exhausted.  If not specified, the default value
5604                 is
5605                 <filename>/dev/random</filename>
5606                 (or equivalent) when present, and none otherwise.  The
5607                 <command>random-device</command> option takes
5608                 effect during
5609                 the initial configuration load at server startup time and
5610                 is ignored on subsequent reloads.
5611               </para>
5612             </listitem>
5613           </varlistentry>
5614
5615           <varlistentry>
5616             <term><command>preferred-glue</command></term>
5617             <listitem>
5618               <para>
5619                 If specified, the listed type (A or AAAA) will be emitted
5620                 before other glue
5621                 in the additional section of a query response.
5622                 The default is not to prefer any type (NONE).
5623               </para>
5624             </listitem>
5625           </varlistentry>
5626
5627           <varlistentry id="root_delegation_only">
5628             <term><command>root-delegation-only</command></term>
5629             <listitem>
5630               <para>
5631                 Turn on enforcement of delegation-only in TLDs
5632                 (top level domains) and root zones with an optional
5633                 exclude list.
5634               </para>
5635               <para>
5636                 DS queries are expected to be made to and be answered by
5637                 delegation only zones.  Such queries and responses are
5638                 treated as an exception to delegation-only processing
5639                 and are not converted to NXDOMAIN responses provided
5640                 a CNAME is not discovered at the query name.
5641               </para>
5642               <para>
5643                 If a delegation only zone server also serves a child
5644                 zone it is not always possible to determine whether
5645                 an answer comes from the delegation only zone or the
5646                 child zone.  SOA NS and DNSKEY records are apex
5647                 only records and a matching response that contains
5648                 these records or DS is treated as coming from a
5649                 child zone.  RRSIG records are also examined to see
5650                 if they are signed by a child zone or not.  The
5651                 authority section is also examined to see if there
5652                 is evidence that the answer is from the child zone.
5653                 Answers that are determined to be from a child zone
5654                 are not converted to NXDOMAIN responses.  Despite
5655                 all these checks there is still a possibility of
5656                 false negatives when a child zone is being served.
5657               </para>
5658               <para>
5659                 Similarly false positives can arise from empty nodes
5660                 (no records at the name) in the delegation only zone
5661                 when the query type is not ANY.
5662               </para>
5663               <para>
5664                 Note some TLDs are not delegation only (e.g. "DE", "LV",
5665                 "US" and "MUSEUM").  This list is not exhaustive.
5666               </para>
5667
5668 <programlisting>
5669 options {
5670         root-delegation-only exclude { "de"; "lv"; "us"; "museum"; };
5671 };
5672 </programlisting>
5673
5674             </listitem>
5675           </varlistentry>
5676
5677           <varlistentry>
5678             <term><command>disable-algorithms</command></term>
5679             <listitem>
5680               <para>
5681                 Disable the specified DNSSEC algorithms at and below the
5682                 specified name.
5683                 Multiple <command>disable-algorithms</command>
5684                 statements are allowed.
5685                 Only the most specific will be applied.
5686               </para>
5687             </listitem>
5688           </varlistentry>
5689
5690           <varlistentry>
5691             <term><command>dnssec-lookaside</command></term>
5692             <listitem>
5693               <para>
5694                 When set, <command>dnssec-lookaside</command> provides the
5695                 validator with an alternate method to validate DNSKEY
5696                 records at the top of a zone.  When a DNSKEY is at or
5697                 below a domain specified by the deepest
5698                 <command>dnssec-lookaside</command>, and the normal DNSSEC
5699                 validation has left the key untrusted, the trust-anchor
5700                 will be appended to the key name and a DLV record will be
5701                 looked up to see if it can validate the key.  If the DLV
5702                 record validates a DNSKEY (similarly to the way a DS
5703                 record does) the DNSKEY RRset is deemed to be trusted.
5704               </para>
5705               <para>
5706                 If <command>dnssec-lookaside</command> is set to
5707                 <userinput>auto</userinput>, then built-in default
5708                 values for the DLV domain and trust anchor will be
5709                 used, along with a built-in key for validation.
5710               </para>
5711               <para>
5712                 The default DLV key is stored in the file
5713                 <filename>bind.keys</filename>;
5714                 <command>named</command> will load that key at
5715                 startup if <command>dnssec-lookaside</command> is set to
5716                 <constant>auto</constant>.  A copy of the file is
5717                 installed along with <acronym>BIND</acronym> 9, and is
5718                 current as of the release date.  If the DLV key expires, a
5719                 new copy of <filename>bind.keys</filename> can be downloaded
5720                 from <ulink>https://www.isc.org/solutions/dlv</ulink>.
5721               </para>
5722               <para>
5723                 (To prevent problems if <filename>bind.keys</filename> is
5724                 not found, the current key is also compiled in to
5725                 <command>named</command>.  Relying on this is not
5726                 recommended, however, as it requires <command>named</command>
5727                 to be recompiled with a new key when the DLV key expires.)
5728               </para>
5729               <para>
5730                 NOTE: <command>named</command> only loads certain specific
5731                 keys from <filename>bind.keys</filename>:  those for the
5732                 DLV zone and for the DNS root zone.  The file cannot be
5733                 used to store keys for other zones.
5734               </para>
5735             </listitem>
5736           </varlistentry>
5737
5738           <varlistentry>
5739             <term><command>dnssec-must-be-secure</command></term>
5740             <listitem>
5741               <para>
5742                 Specify hierarchies which must be or may not be secure
5743                 (signed and validated).  If <userinput>yes</userinput>,
5744                 then <command>named</command> will only accept answers if
5745                 they are secure.  If <userinput>no</userinput>, then normal
5746                 DNSSEC validation applies allowing for insecure answers to
5747                 be accepted.  The specified domain must be under a
5748                 <command>trusted-keys</command> or
5749                 <command>managed-keys</command> statement, or
5750                 <command>dnssec-lookaside</command> must be active.
5751               </para>
5752             </listitem>
5753           </varlistentry>
5754
5755           <varlistentry>
5756             <term><command>dns64</command></term>
5757             <listitem>
5758               <para>
5759                 This directive instructs <command>named</command> to
5760                 return mapped IPv4 addresses to AAAA queries when
5761                 there are no AAAA records.  It is intended to be
5762                 used in conjunction with a NAT64.  Each
5763                 <command>dns64</command> defines one DNS64 prefix.
5764                 Multiple DNS64 prefixes can be defined.
5765               </para>
5766               <para>
5767                 Compatible IPv6 prefixes have lengths of 32, 40, 48, 56,
5768                 64 and 96 as per RFC 6052.
5769               </para>
5770               <para>
5771                 Additionally a reverse IP6.ARPA zone will be created for
5772                 the prefix to provide a mapping from the IP6.ARPA names
5773                 to the corresponding IN-ADDR.ARPA names using synthesized
5774                 CNAMEs.  <command>dns64-server</command> and
5775                 <command>dns64-contact</command> can be used to specify
5776                 the name of the server and contact for the zones. These
5777                 are settable at the view / options level.  These are
5778                 not settable on a per-prefix basis.
5779               </para>
5780               <para>
5781                 Each <command>dns64</command> supports an optional
5782                 <command>clients</command> ACL that determines which
5783                 clients are affected by this directive.  If not defined,
5784                 it defaults to <userinput>any;</userinput>.
5785               </para>
5786               <para>
5787                 Each <command>dns64</command> supports an optional
5788                 <command>mapped</command> ACL that selects which
5789                 IPv4 addresses are to be mapped in the corresponding    
5790                 A RRset.  If not defined it defaults to
5791                 <userinput>any;</userinput>.
5792               </para>
5793               <para>
5794                 Normally, DNS64 won't apply to a domain name that
5795                 owns one or more AAAA records; these records will
5796                 simply be returned.  The optional
5797                 <command>exclude</command> ACL allows specification
5798                 of a list of IPv6 addresses that will be ignored
5799                 if they appear in a domain name's AAAA records, and
5800                 DNS64 will be applied to any A records the domain
5801                 name owns.  If not defined, <command>exclude</command>
5802                 defaults to none.
5803               </para>
5804               <para>
5805                 A optional <command>suffix</command> can also
5806                 be defined to set the bits trailing the mapped
5807                 IPv4 address bits.  By default these bits are
5808                 set to <userinput>::</userinput>.  The bits
5809                 matching the prefix and mapped IPv4 address
5810                 must be zero.
5811               </para>
5812               <para>
5813                 If <command>recursive-only</command> is set to
5814                 <command>yes</command> the DNS64 synthesis will
5815                 only happen for recursive queries.  The default
5816                 is <command>no</command>.
5817               </para>
5818               <para>
5819                 If <command>break-dnssec</command> is set to
5820                 <command>yes</command> the DNS64 synthesis will
5821                 happen even if the result, if validated, would
5822                 cause a DNSSEC validation failure.  If this option
5823                 is set to <command>no</command> (the default), the DO
5824                 is set on the incoming query, and there are RRSIGs on
5825                 the applicable records, then synthesis will not happen.
5826               </para>
5827 <programlisting>
5828         acl rfc1918 { 10/8; 192.168/16; 172.16/12; };
5829
5830         dns64 64:FF9B::/96 {
5831                 clients { any; };
5832                 mapped { !rfc1918; any; };
5833                 exclude { 64:FF9B::/96; ::ffff:0000:0000/96; };
5834                 suffix ::;
5835         };
5836 </programlisting>
5837             </listitem>
5838           </varlistentry>
5839
5840         </variablelist>
5841
5842         <sect3 id="boolean_options">
5843           <title>Boolean Options</title>
5844
5845           <variablelist>
5846
5847             <varlistentry>
5848               <term><command>allow-new-zones</command></term>
5849               <listitem>
5850                 <para>
5851                   If <userinput>yes</userinput>, then zones can be
5852                   added at runtime via <command>rndc addzone</command>
5853                   or deleted via <command>rndc delzone</command>.
5854                   The default is <userinput>no</userinput>.
5855                 </para>
5856               </listitem>
5857             </varlistentry>
5858
5859             <varlistentry>
5860               <term><command>auth-nxdomain</command></term>
5861               <listitem>
5862                 <para>
5863                   If <userinput>yes</userinput>, then the <command>AA</command> bit
5864                   is always set on NXDOMAIN responses, even if the server is
5865                   not actually
5866                   authoritative. The default is <userinput>no</userinput>;
5867                   this is
5868                   a change from <acronym>BIND</acronym> 8. If you
5869                   are using very old DNS software, you
5870                   may need to set it to <userinput>yes</userinput>.
5871                 </para>
5872               </listitem>
5873             </varlistentry>
5874
5875             <varlistentry>
5876               <term><command>deallocate-on-exit</command></term>
5877               <listitem>
5878                 <para>
5879                   This option was used in <acronym>BIND</acronym>
5880                   8 to enable checking
5881                   for memory leaks on exit. <acronym>BIND</acronym> 9 ignores the option and always performs
5882                   the checks.
5883                 </para>
5884               </listitem>
5885             </varlistentry>
5886
5887             <varlistentry>
5888               <term><command>memstatistics</command></term>
5889               <listitem>
5890                 <para>
5891                   Write memory statistics to the file specified by
5892                   <command>memstatistics-file</command> at exit.
5893                   The default is <userinput>no</userinput> unless
5894                   '-m record' is specified on the command line in
5895                   which case it is <userinput>yes</userinput>.
5896                 </para>
5897               </listitem>
5898             </varlistentry>
5899
5900             <varlistentry>
5901               <term><command>dialup</command></term>
5902               <listitem>
5903                 <para>
5904                   If <userinput>yes</userinput>, then the
5905                   server treats all zones as if they are doing zone transfers
5906                   across
5907                   a dial-on-demand dialup link, which can be brought up by
5908                   traffic
5909                   originating from this server. This has different effects
5910                   according
5911                   to zone type and concentrates the zone maintenance so that
5912                   it all
5913                   happens in a short interval, once every <command>heartbeat-interval</command> and
5914                   hopefully during the one call. It also suppresses some of
5915                   the normal
5916                   zone maintenance traffic. The default is <userinput>no</userinput>.
5917                 </para>
5918                 <para>
5919                   The <command>dialup</command> option
5920                   may also be specified in the <command>view</command> and
5921                   <command>zone</command> statements,
5922                   in which case it overrides the global <command>dialup</command>
5923                   option.
5924                 </para>
5925                 <para>
5926                   If the zone is a master zone, then the server will send out a
5927                   NOTIFY
5928                   request to all the slaves (default). This should trigger the
5929                   zone serial
5930                   number check in the slave (providing it supports NOTIFY)
5931                   allowing the slave
5932                   to verify the zone while the connection is active.
5933                   The set of servers to which NOTIFY is sent can be controlled
5934                   by
5935                   <command>notify</command> and <command>also-notify</command>.
5936                 </para>
5937                 <para>
5938                   If the
5939                   zone is a slave or stub zone, then the server will suppress
5940                   the regular
5941                   "zone up to date" (refresh) queries and only perform them
5942                   when the
5943                   <command>heartbeat-interval</command> expires in
5944                   addition to sending
5945                   NOTIFY requests.
5946                 </para>
5947                 <para>
5948                   Finer control can be achieved by using
5949                   <userinput>notify</userinput> which only sends NOTIFY
5950                   messages,
5951                   <userinput>notify-passive</userinput> which sends NOTIFY
5952                   messages and
5953                   suppresses the normal refresh queries, <userinput>refresh</userinput>
5954                   which suppresses normal refresh processing and sends refresh
5955                   queries
5956                   when the <command>heartbeat-interval</command>
5957                   expires, and
5958                   <userinput>passive</userinput> which just disables normal
5959                   refresh
5960                   processing.
5961                 </para>
5962
5963                 <informaltable colsep="0" rowsep="0">
5964                   <tgroup cols="4" colsep="0" rowsep="0" tgroupstyle="4Level-table">
5965                     <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
5966                     <colspec colname="2" colnum="2" colsep="0" colwidth="1.150in"/>
5967                     <colspec colname="3" colnum="3" colsep="0" colwidth="1.150in"/>
5968                     <colspec colname="4" colnum="4" colsep="0" colwidth="1.150in"/>
5969                     <tbody>
5970                       <row rowsep="0">
5971                         <entry colname="1">
5972                           <para>
5973                             dialup mode
5974                           </para>
5975                         </entry>
5976                         <entry colname="2">
5977                           <para>
5978                             normal refresh
5979                           </para>
5980                         </entry>
5981                         <entry colname="3">
5982                           <para>
5983                             heart-beat refresh
5984                           </para>
5985                         </entry>
5986                         <entry colname="4">
5987                           <para>
5988                             heart-beat notify
5989                           </para>
5990                         </entry>
5991                       </row>
5992                       <row rowsep="0">
5993                         <entry colname="1">
5994                           <para><command>no</command> (default)</para>
5995                         </entry>
5996                         <entry colname="2">
5997                           <para>
5998                             yes
5999                           </para>
6000                         </entry>
6001                         <entry colname="3">
6002                           <para>
6003                             no
6004                           </para>
6005                         </entry>
6006                         <entry colname="4">
6007                           <para>
6008                             no
6009                           </para>
6010                         </entry>
6011                       </row>
6012                       <row rowsep="0">
6013                         <entry colname="1">
6014                           <para><command>yes</command></para>
6015                         </entry>
6016                         <entry colname="2">
6017                           <para>
6018                             no
6019                           </para>
6020                         </entry>
6021                         <entry colname="3">
6022                           <para>
6023                             yes
6024                           </para>
6025                         </entry>
6026                         <entry colname="4">
6027                           <para>
6028                             yes
6029                           </para>
6030                         </entry>
6031                       </row>
6032                       <row rowsep="0">
6033                         <entry colname="1">
6034                           <para><command>notify</command></para>
6035                         </entry>
6036                         <entry colname="2">
6037                           <para>
6038                             yes
6039                           </para>
6040                         </entry>
6041                         <entry colname="3">
6042                           <para>
6043                             no
6044                           </para>
6045                         </entry>
6046                         <entry colname="4">
6047                           <para>
6048                             yes
6049                           </para>
6050                         </entry>
6051                       </row>
6052                       <row rowsep="0">
6053                         <entry colname="1">
6054                           <para><command>refresh</command></para>
6055                         </entry>
6056                         <entry colname="2">
6057                           <para>
6058                             no
6059                           </para>
6060                         </entry>
6061                         <entry colname="3">
6062                           <para>
6063                             yes
6064                           </para>
6065                         </entry>
6066                         <entry colname="4">
6067                           <para>
6068                             no
6069                           </para>
6070                         </entry>
6071                       </row>
6072                       <row rowsep="0">
6073                         <entry colname="1">
6074                           <para><command>passive</command></para>
6075                         </entry>
6076                         <entry colname="2">
6077                           <para>
6078                             no
6079                           </para>
6080                         </entry>
6081                         <entry colname="3">
6082                           <para>
6083                             no
6084                           </para>
6085                         </entry>
6086                         <entry colname="4">
6087                           <para>
6088                             no
6089                           </para>
6090                         </entry>
6091                       </row>
6092                       <row rowsep="0">
6093                         <entry colname="1">
6094                           <para><command>notify-passive</command></para>
6095                         </entry>
6096                         <entry colname="2">
6097                           <para>
6098                             no
6099                           </para>
6100                         </entry>
6101                         <entry colname="3">
6102                           <para>
6103                             no
6104                           </para>
6105                         </entry>
6106                         <entry colname="4">
6107                           <para>
6108                             yes
6109                           </para>
6110                         </entry>
6111                       </row>
6112                     </tbody>
6113                   </tgroup>
6114                 </informaltable>
6115
6116                 <para>
6117                   Note that normal NOTIFY processing is not affected by
6118                   <command>dialup</command>.
6119                 </para>
6120
6121               </listitem>
6122             </varlistentry>
6123
6124             <varlistentry>
6125               <term><command>fake-iquery</command></term>
6126               <listitem>
6127                 <para>
6128                   In <acronym>BIND</acronym> 8, this option
6129                   enabled simulating the obsolete DNS query type
6130                   IQUERY. <acronym>BIND</acronym> 9 never does
6131                   IQUERY simulation.
6132                 </para>
6133               </listitem>
6134             </varlistentry>
6135
6136             <varlistentry>
6137               <term><command>fetch-glue</command></term>
6138               <listitem>
6139                 <para>
6140                   This option is obsolete.
6141                   In BIND 8, <userinput>fetch-glue yes</userinput>
6142                   caused the server to attempt to fetch glue resource records
6143                   it
6144                   didn't have when constructing the additional
6145                   data section of a response.  This is now considered a bad
6146                   idea
6147                   and BIND 9 never does it.
6148                 </para>
6149               </listitem>
6150             </varlistentry>
6151
6152             <varlistentry>
6153               <term><command>flush-zones-on-shutdown</command></term>
6154               <listitem>
6155                 <para>
6156                   When the nameserver exits due receiving SIGTERM,
6157                   flush or do not flush any pending zone writes.  The default
6158                   is
6159                   <command>flush-zones-on-shutdown</command> <userinput>no</userinput>.
6160                 </para>
6161               </listitem>
6162             </varlistentry>
6163
6164             <varlistentry>
6165               <term><command>has-old-clients</command></term>
6166               <listitem>
6167                 <para>
6168                   This option was incorrectly implemented
6169                   in <acronym>BIND</acronym> 8, and is ignored by <acronym>BIND</acronym> 9.
6170                   To achieve the intended effect
6171                   of
6172                   <command>has-old-clients</command> <userinput>yes</userinput>, specify
6173                   the two separate options <command>auth-nxdomain</command> <userinput>yes</userinput>
6174                   and <command>rfc2308-type1</command> <userinput>no</userinput> instead.
6175                 </para>
6176               </listitem>
6177             </varlistentry>
6178
6179             <varlistentry>
6180               <term><command>host-statistics</command></term>
6181               <listitem>
6182                 <para>
6183                   In BIND 8, this enables keeping of
6184                   statistics for every host that the name server interacts
6185                   with.
6186                   Not implemented in BIND 9.
6187                 </para>
6188               </listitem>
6189             </varlistentry>
6190
6191             <varlistentry>
6192               <term><command>maintain-ixfr-base</command></term>
6193               <listitem>
6194                 <para>
6195                   <emphasis>This option is obsolete</emphasis>.
6196                   It was used in <acronym>BIND</acronym> 8 to
6197                   determine whether a transaction log was
6198                   kept for Incremental Zone Transfer. <acronym>BIND</acronym> 9 maintains a transaction
6199                   log whenever possible.  If you need to disable outgoing
6200                   incremental zone
6201                   transfers, use <command>provide-ixfr</command> <userinput>no</userinput>.
6202                 </para>
6203               </listitem>
6204             </varlistentry>
6205
6206             <varlistentry>
6207               <term><command>minimal-responses</command></term>
6208               <listitem>
6209                 <para>
6210                   If <userinput>yes</userinput>, then when generating
6211                   responses the server will only add records to the authority
6212                   and additional data sections when they are required (e.g.
6213                   delegations, negative responses).  This may improve the
6214                   performance of the server.
6215                   The default is <userinput>no</userinput>.
6216                 </para>
6217               </listitem>
6218             </varlistentry>
6219
6220             <varlistentry>
6221               <term><command>multiple-cnames</command></term>
6222               <listitem>
6223                 <para>
6224                   This option was used in <acronym>BIND</acronym> 8 to allow
6225                   a domain name to have multiple CNAME records in violation of
6226                   the DNS standards.  <acronym>BIND</acronym> 9.2 onwards
6227                   always strictly enforces the CNAME rules both in master
6228                   files and dynamic updates.
6229                 </para>
6230               </listitem>
6231             </varlistentry>
6232
6233             <varlistentry>
6234               <term><command>notify</command></term>
6235               <listitem>
6236                 <para>
6237                   If <userinput>yes</userinput> (the default),
6238                   DNS NOTIFY messages are sent when a zone the server is
6239                   authoritative for
6240                   changes, see <xref linkend="notify"/>.  The messages are
6241                   sent to the
6242                   servers listed in the zone's NS records (except the master
6243                   server identified
6244                   in the SOA MNAME field), and to any servers listed in the
6245                   <command>also-notify</command> option.
6246                 </para>
6247                 <para>
6248                   If <userinput>master-only</userinput>, notifies are only
6249                   sent
6250                   for master zones.
6251                   If <userinput>explicit</userinput>, notifies are sent only
6252                   to
6253                   servers explicitly listed using <command>also-notify</command>.
6254                   If <userinput>no</userinput>, no notifies are sent.
6255                 </para>
6256                 <para>
6257                   The <command>notify</command> option may also be
6258                   specified in the <command>zone</command>
6259                   statement,
6260                   in which case it overrides the <command>options notify</command> statement.
6261                   It would only be necessary to turn off this option if it
6262                   caused slaves
6263                   to crash.
6264                 </para>
6265               </listitem>
6266             </varlistentry>
6267
6268             <varlistentry>
6269               <term><command>notify-to-soa</command></term>
6270               <listitem>
6271                 <para>
6272                   If <userinput>yes</userinput> do not check the nameservers
6273                   in the NS RRset against the SOA MNAME.  Normally a NOTIFY
6274                   message is not sent to the SOA MNAME (SOA ORIGIN) as it is
6275                   supposed to contain the name of the ultimate master.
6276                   Sometimes, however, a slave is listed as the SOA MNAME in
6277                   hidden master configurations and in that case you would
6278                   want the ultimate master to still send NOTIFY messages to
6279                   all the nameservers listed in the NS RRset.
6280                 </para>
6281               </listitem>
6282             </varlistentry>
6283
6284             <varlistentry>
6285               <term><command>recursion</command></term>
6286               <listitem>
6287                 <para>
6288                   If <userinput>yes</userinput>, and a
6289                   DNS query requests recursion, then the server will attempt
6290                   to do
6291                   all the work required to answer the query. If recursion is
6292                   off
6293                   and the server does not already know the answer, it will
6294                   return a
6295                   referral response. The default is
6296                   <userinput>yes</userinput>.
6297                   Note that setting <command>recursion no</command> does not prevent
6298                   clients from getting data from the server's cache; it only
6299                   prevents new data from being cached as an effect of client
6300                   queries.
6301                   Caching may still occur as an effect the server's internal
6302                   operation, such as NOTIFY address lookups.
6303                   See also <command>fetch-glue</command> above.
6304                 </para>
6305               </listitem>
6306             </varlistentry>
6307
6308             <varlistentry>
6309               <term><command>rfc2308-type1</command></term>
6310               <listitem>
6311                 <para>
6312                   Setting this to <userinput>yes</userinput> will
6313                   cause the server to send NS records along with the SOA
6314                   record for negative
6315                   answers. The default is <userinput>no</userinput>.
6316                 </para>
6317                 <note>
6318                   <simpara>
6319                     Not yet implemented in <acronym>BIND</acronym>
6320                     9.
6321                   </simpara>
6322                 </note>
6323               </listitem>
6324             </varlistentry>
6325
6326             <varlistentry>
6327               <term><command>use-id-pool</command></term>
6328               <listitem>
6329                 <para>
6330                   <emphasis>This option is obsolete</emphasis>.
6331                   <acronym>BIND</acronym> 9 always allocates query
6332                   IDs from a pool.
6333                 </para>
6334               </listitem>
6335             </varlistentry>
6336
6337             <varlistentry>
6338               <term><command>zone-statistics</command></term>
6339               <listitem>
6340                 <para>
6341                   If <userinput>yes</userinput>, the server will collect
6342                   statistical data on all zones (unless specifically turned
6343                   off
6344                   on a per-zone basis by specifying <command>zone-statistics no</command>
6345                   in the <command>zone</command> statement).
6346                   The default is <userinput>no</userinput>.
6347                   These statistics may be accessed
6348                   using <command>rndc stats</command>, which will
6349                   dump them to the file listed
6350                   in the <command>statistics-file</command>.  See
6351                   also <xref linkend="statsfile"/>.
6352                 </para>
6353               </listitem>
6354             </varlistentry>
6355
6356             <varlistentry>
6357               <term><command>use-ixfr</command></term>
6358               <listitem>
6359                 <para>
6360                   <emphasis>This option is obsolete</emphasis>.
6361                   If you need to disable IXFR to a particular server or
6362                   servers, see
6363                   the information on the <command>provide-ixfr</command> option
6364                   in <xref linkend="server_statement_definition_and_usage"/>.
6365                   See also
6366                   <xref linkend="incremental_zone_transfers"/>.
6367                 </para>
6368               </listitem>
6369             </varlistentry>
6370
6371             <varlistentry>
6372               <term><command>provide-ixfr</command></term>
6373               <listitem>
6374                 <para>
6375                   See the description of
6376                   <command>provide-ixfr</command> in
6377                   <xref linkend="server_statement_definition_and_usage"/>.
6378                 </para>
6379               </listitem>
6380             </varlistentry>
6381
6382             <varlistentry>
6383               <term><command>request-ixfr</command></term>
6384               <listitem>
6385                 <para>
6386                   See the description of
6387                   <command>request-ixfr</command> in
6388                   <xref linkend="server_statement_definition_and_usage"/>.
6389                 </para>
6390               </listitem>
6391             </varlistentry>
6392
6393             <varlistentry>
6394               <term><command>treat-cr-as-space</command></term>
6395               <listitem>
6396                 <para>
6397                   This option was used in <acronym>BIND</acronym>
6398                   8 to make
6399                   the server treat carriage return ("<command>\r</command>") characters the same way
6400                   as a space or tab character,
6401                   to facilitate loading of zone files on a UNIX system that
6402                   were generated
6403                   on an NT or DOS machine. In <acronym>BIND</acronym> 9, both UNIX "<command>\n</command>"
6404                   and NT/DOS "<command>\r\n</command>" newlines
6405                   are always accepted,
6406                   and the option is ignored.
6407                 </para>
6408               </listitem>
6409             </varlistentry>
6410
6411             <varlistentry>
6412               <term><command>additional-from-auth</command></term>
6413               <term><command>additional-from-cache</command></term>
6414               <listitem>
6415
6416                 <para>
6417                   These options control the behavior of an authoritative
6418                   server when
6419                   answering queries which have additional data, or when
6420                   following CNAME
6421                   and DNAME chains.
6422                 </para>
6423
6424                 <para>
6425                   When both of these options are set to <userinput>yes</userinput>
6426                   (the default) and a
6427                   query is being answered from authoritative data (a zone
6428                   configured into the server), the additional data section of
6429                   the
6430                   reply will be filled in using data from other authoritative
6431                   zones
6432                   and from the cache.  In some situations this is undesirable,
6433                   such
6434                   as when there is concern over the correctness of the cache,
6435                   or
6436                   in servers where slave zones may be added and modified by
6437                   untrusted third parties.  Also, avoiding
6438                   the search for this additional data will speed up server
6439                   operations
6440                   at the possible expense of additional queries to resolve
6441                   what would
6442                   otherwise be provided in the additional section.
6443                 </para>
6444
6445                 <para>
6446                   For example, if a query asks for an MX record for host <literal>foo.example.com</literal>,
6447                   and the record found is "<literal>MX 10 mail.example.net</literal>", normally the address
6448                   records (A and AAAA) for <literal>mail.example.net</literal> will be provided as well,
6449                   if known, even though they are not in the example.com zone.
6450                   Setting these options to <command>no</command>
6451                   disables this behavior and makes
6452                   the server only search for additional data in the zone it
6453                   answers from.
6454                 </para>
6455
6456                 <para>
6457                   These options are intended for use in authoritative-only
6458                   servers, or in authoritative-only views.  Attempts to set
6459                   them to <command>no</command> without also
6460                   specifying
6461                   <command>recursion no</command> will cause the
6462                   server to
6463                   ignore the options and log a warning message.
6464                 </para>
6465
6466                 <para>
6467                   Specifying <command>additional-from-cache no</command> actually
6468                   disables the use of the cache not only for additional data
6469                   lookups
6470                   but also when looking up the answer.  This is usually the
6471                   desired
6472                   behavior in an authoritative-only server where the
6473                   correctness of
6474                   the cached data is an issue.
6475                 </para>
6476
6477                 <para>
6478                   When a name server is non-recursively queried for a name
6479                   that is not
6480                   below the apex of any served zone, it normally answers with
6481                   an
6482                   "upwards referral" to the root servers or the servers of
6483                   some other
6484                   known parent of the query name.  Since the data in an
6485                   upwards referral
6486                   comes from the cache, the server will not be able to provide
6487                   upwards
6488                   referrals when <command>additional-from-cache no</command>
6489                   has been specified.  Instead, it will respond to such
6490                   queries
6491                   with REFUSED.  This should not cause any problems since
6492                   upwards referrals are not required for the resolution
6493                   process.
6494                 </para>
6495
6496               </listitem>
6497             </varlistentry>
6498
6499             <varlistentry>
6500               <term><command>match-mapped-addresses</command></term>
6501               <listitem>
6502                 <para>
6503                   If <userinput>yes</userinput>, then an
6504                   IPv4-mapped IPv6 address will match any address match
6505                   list entries that match the corresponding IPv4 address.
6506                 </para>
6507                 <para>
6508                   This option was introduced to work around a kernel quirk
6509                   in some operating systems that causes IPv4 TCP
6510                   connections, such as zone transfers, to be accepted on an
6511                   IPv6 socket using mapped addresses.  This caused address
6512                   match lists designed for IPv4 to fail to match.  However,
6513                   <command>named</command> now solves this problem
6514                   internally.  The use of this option is discouraged.
6515                 </para>
6516               </listitem>
6517             </varlistentry>
6518
6519             <varlistentry>
6520               <term><command>filter-aaaa-on-v4</command></term>
6521               <listitem>
6522                 <para>
6523                   This option is only available when
6524                   <acronym>BIND</acronym> 9 is compiled with the
6525                   <userinput>--enable-filter-aaaa</userinput> option on the
6526                   "configure" command line.  It is intended to help the
6527                   transition from IPv4 to IPv6 by not giving IPv6 addresses
6528                   to DNS clients unless they have connections to the IPv6
6529                   Internet.  This is not recommended unless absolutely
6530                   necessary.  The default is <userinput>no</userinput>.
6531                   The <command>filter-aaaa-on-v4</command> option
6532                   may also be specified in <command>view</command> statements
6533                   to override the global <command>filter-aaaa-on-v4</command>
6534                   option.
6535                 </para>
6536                 <para>
6537                   If <userinput>yes</userinput>,
6538                   the DNS client is at an IPv4 address, in <command>filter-aaaa</command>,
6539                   and if the response does not include DNSSEC signatures, 
6540                   then all AAAA records are deleted from the response.
6541                   This filtering applies to all responses and not only
6542                   authoritative responses.
6543                 </para>
6544                 <para>
6545                   If <userinput>break-dnssec</userinput>,
6546                   then AAAA records are deleted even when dnssec is enabled.
6547                   As suggested by the name, this makes the response not verify,
6548                   because the DNSSEC protocol is designed detect deletions.
6549                 </para>
6550                 <para>
6551                   This mechanism can erroneously cause other servers to 
6552                   not give AAAA records to their clients.  
6553                   A recursing server with both IPv6 and IPv4 network connections
6554                   that queries an authoritative server using this mechanism
6555                   via IPv4 will be denied AAAA records even if its client is
6556                   using IPv6.
6557                 </para>
6558                 <para>
6559                   This mechanism is applied to authoritative as well as
6560                   non-authoritative records.
6561                   A client using IPv4 that is not allowed recursion can
6562                   erroneously be given AAAA records because the server is not
6563                   allowed to check for A records.
6564                 </para>
6565                 <para>
6566                   Some AAAA records are given to IPv4 clients in glue records.
6567                   IPv4 clients that are servers can then erroneously
6568                   answer requests for AAAA records received via IPv4.
6569                 </para>
6570               </listitem>
6571             </varlistentry>
6572
6573             <varlistentry>
6574               <term><command>ixfr-from-differences</command></term>
6575               <listitem>
6576                 <para>
6577                   When <userinput>yes</userinput> and the server loads a new version of a master
6578                   zone from its zone file or receives a new version of a slave
6579                   file by a non-incremental zone transfer, it will compare
6580                   the new version to the previous one and calculate a set
6581                   of differences.  The differences are then logged in the
6582                   zone's journal file such that the changes can be transmitted
6583                   to downstream slaves as an incremental zone transfer.
6584                 </para>
6585                 <para>
6586                   By allowing incremental zone transfers to be used for
6587                   non-dynamic zones, this option saves bandwidth at the
6588                   expense of increased CPU and memory consumption at the
6589                   master.
6590                   In particular, if the new version of a zone is completely
6591                   different from the previous one, the set of differences
6592                   will be of a size comparable to the combined size of the
6593                   old and new zone version, and the server will need to
6594                   temporarily allocate memory to hold this complete
6595                   difference set.
6596                 </para>
6597                 <para><command>ixfr-from-differences</command>
6598                   also accepts <command>master</command> and
6599                   <command>slave</command> at the view and options
6600                   levels which causes
6601                   <command>ixfr-from-differences</command> to be enabled for
6602                   all <command>master</command> or
6603                   <command>slave</command> zones respectively.
6604                   It is off by default.
6605                 </para>
6606               </listitem>
6607             </varlistentry>
6608
6609             <varlistentry>
6610               <term><command>multi-master</command></term>
6611               <listitem>
6612                 <para>
6613                   This should be set when you have multiple masters for a zone
6614                   and the
6615                   addresses refer to different machines.  If <userinput>yes</userinput>, <command>named</command> will
6616                   not log
6617                   when the serial number on the master is less than what <command>named</command>
6618                   currently
6619                   has.  The default is <userinput>no</userinput>.
6620                 </para>
6621               </listitem>
6622             </varlistentry>
6623
6624             <varlistentry>
6625               <term><command>dnssec-enable</command></term>
6626               <listitem>
6627                 <para>
6628                   Enable DNSSEC support in <command>named</command>.  Unless set to <userinput>yes</userinput>,
6629                   <command>named</command> behaves as if it does not support DNSSEC.
6630                   The default is <userinput>yes</userinput>.
6631                 </para>
6632               </listitem>
6633             </varlistentry>
6634
6635             <varlistentry>
6636               <term><command>dnssec-validation</command></term>
6637               <listitem>
6638                 <para>
6639                   Enable DNSSEC validation in <command>named</command>.
6640                   Note <command>dnssec-enable</command> also needs to be
6641                   set to <userinput>yes</userinput> to be effective.
6642                   If set to <userinput>no</userinput>, DNSSEC validation
6643                   is disabled.  If set to <userinput>auto</userinput>,
6644                   DNSSEC validation is enabled, and a default
6645                   trust-anchor for the DNS root zone is used.  If set to
6646                   <userinput>yes</userinput>, DNSSEC validation is enabled,
6647                   but a trust anchor must be manually configured using
6648                   a <command>trusted-keys</command> or
6649                   <command>managed-keys</command> statement.  The default
6650                   is <userinput>yes</userinput>.
6651                 </para>
6652               </listitem>
6653             </varlistentry>
6654
6655             <varlistentry>
6656               <term><command>dnssec-accept-expired</command></term>
6657               <listitem>
6658                 <para>
6659                   Accept expired signatures when verifying DNSSEC signatures.
6660                   The default is <userinput>no</userinput>.
6661                   Setting this option to <userinput>yes</userinput>
6662                   leaves <command>named</command> vulnerable to
6663                   replay attacks.
6664                 </para>
6665               </listitem>
6666             </varlistentry>
6667
6668             <varlistentry>
6669               <term><command>querylog</command></term>
6670               <listitem>
6671                 <para>
6672                   Specify whether query logging should be started when <command>named</command>
6673                   starts.
6674                   If <command>querylog</command> is not specified,
6675                   then the query logging
6676                   is determined by the presence of the logging category <command>queries</command>.
6677                 </para>
6678               </listitem>
6679             </varlistentry>
6680
6681             <varlistentry>
6682               <term><command>check-names</command></term>
6683               <listitem>
6684                 <para>
6685                   This option is used to restrict the character set and syntax
6686                   of
6687                   certain domain names in master files and/or DNS responses
6688                   received
6689                   from the network.  The default varies according to usage
6690                   area.  For
6691                   <command>master</command> zones the default is <command>fail</command>.
6692                   For <command>slave</command> zones the default
6693                   is <command>warn</command>.
6694                   For answers received from the network (<command>response</command>)
6695                   the default is <command>ignore</command>.
6696                 </para>
6697                 <para>
6698                   The rules for legal hostnames and mail domains are derived
6699                   from RFC 952 and RFC 821 as modified by RFC 1123.
6700                 </para>
6701                 <para><command>check-names</command>
6702                   applies to the owner names of A, AAAA and MX records.
6703                   It also applies to the domain names in the RDATA of NS, SOA,
6704                   MX, and SRV records.
6705                   It also applies to the RDATA of PTR records where the owner
6706                   name indicated that it is a reverse lookup of a hostname
6707                   (the owner name ends in IN-ADDR.ARPA, IP6.ARPA, or IP6.INT).
6708                 </para>
6709               </listitem>
6710             </varlistentry>
6711
6712             <varlistentry>
6713               <term><command>check-dup-records</command></term>
6714               <listitem>
6715                 <para>
6716                   Check master zones for records that are treated as different
6717                   by DNSSEC but are semantically equal in plain DNS.  The
6718                   default is to <command>warn</command>.  Other possible
6719                   values are <command>fail</command> and
6720                   <command>ignore</command>.
6721                 </para>
6722               </listitem>
6723             </varlistentry>
6724
6725             <varlistentry>
6726               <term><command>check-mx</command></term>
6727               <listitem>
6728                 <para>
6729                   Check whether the MX record appears to refer to a IP address.
6730                   The default is to <command>warn</command>.  Other possible
6731                   values are <command>fail</command> and
6732                   <command>ignore</command>.
6733                 </para>
6734               </listitem>
6735             </varlistentry>
6736
6737             <varlistentry>
6738               <term><command>check-wildcard</command></term>
6739               <listitem>
6740                 <para>
6741                   This option is used to check for non-terminal wildcards.
6742                   The use of non-terminal wildcards is almost always as a
6743                   result of a failure
6744                   to understand the wildcard matching algorithm (RFC 1034).
6745                   This option
6746                   affects master zones.  The default (<command>yes</command>) is to check
6747                   for non-terminal wildcards and issue a warning.
6748                 </para>
6749               </listitem>
6750             </varlistentry>
6751
6752             <varlistentry>
6753               <term><command>check-integrity</command></term>
6754               <listitem>
6755                 <para>
6756                   Perform post load zone integrity checks on master
6757                   zones.  This checks that MX and SRV records refer
6758                   to address (A or AAAA) records and that glue
6759                   address records exist for delegated zones.  For
6760                   MX and SRV records only in-zone hostnames are
6761                   checked (for out-of-zone hostnames use
6762                   <command>named-checkzone</command>).
6763                   For NS records only names below top of zone are
6764                   checked (for out-of-zone names and glue consistency
6765                   checks use <command>named-checkzone</command>).
6766                   The default is <command>yes</command>.
6767                 </para>
6768               </listitem>
6769             </varlistentry>
6770
6771             <varlistentry>
6772               <term><command>check-mx-cname</command></term>
6773               <listitem>
6774                 <para>
6775                   If <command>check-integrity</command> is set then
6776                   fail, warn or ignore MX records that refer
6777                   to CNAMES.  The default is to <command>warn</command>.
6778                 </para>
6779               </listitem>
6780             </varlistentry>
6781
6782             <varlistentry>
6783               <term><command>check-srv-cname</command></term>
6784               <listitem>
6785                 <para>
6786                   If <command>check-integrity</command> is set then
6787                   fail, warn or ignore SRV records that refer
6788                   to CNAMES.  The default is to <command>warn</command>.
6789                 </para>
6790               </listitem>
6791             </varlistentry>
6792
6793             <varlistentry>
6794               <term><command>check-sibling</command></term>
6795               <listitem>
6796                 <para>
6797                   When performing integrity checks, also check that
6798                   sibling glue exists.  The default is <command>yes</command>.
6799                 </para>
6800               </listitem>
6801             </varlistentry>
6802
6803             <varlistentry>
6804               <term><command>zero-no-soa-ttl</command></term>
6805               <listitem>
6806                 <para>
6807                   When returning authoritative negative responses to
6808                   SOA queries set the TTL of the SOA record returned in
6809                   the authority section to zero.
6810                   The default is <command>yes</command>.
6811                 </para>
6812               </listitem>
6813             </varlistentry>
6814
6815             <varlistentry>
6816               <term><command>zero-no-soa-ttl-cache</command></term>
6817               <listitem>
6818                 <para>
6819                   When caching a negative response to a SOA query
6820                   set the TTL to zero.
6821                   The default is <command>no</command>.
6822                 </para>
6823               </listitem>
6824             </varlistentry>
6825
6826             <varlistentry>
6827               <term><command>update-check-ksk</command></term>
6828               <listitem>
6829                 <para>
6830                   When set to the default value of <literal>yes</literal>,
6831                   check the KSK bit in each key to determine how the key
6832                   should be used when generating RRSIGs for a secure zone.
6833                 </para>
6834                 <para>
6835                   Ordinarily, zone-signing keys (that is, keys without the
6836                   KSK bit set) are used to sign the entire zone, while
6837                   key-signing keys (keys with the KSK bit set) are only
6838                   used to sign the DNSKEY RRset at the zone apex.
6839                   However, if this option is set to <literal>no</literal>,
6840                   then the KSK bit is ignored; KSKs are treated as if they
6841                   were ZSKs and are used to sign the entire zone.  This is
6842                   similar to the <command>dnssec-signzone -z</command>
6843                   command line option.
6844                 </para>
6845                 <para>
6846                   When this option is set to <literal>yes</literal>, there
6847                   must be at least two active keys for every algorithm
6848                   represented in the DNSKEY RRset: at least one KSK and one
6849                   ZSK per algorithm.  If there is any algorithm for which
6850                   this requirement is not met, this option will be ignored
6851                   for that algorithm.
6852                 </para>
6853               </listitem>
6854             </varlistentry>
6855
6856             <varlistentry>
6857               <term><command>dnssec-dnskey-kskonly</command></term>
6858               <listitem>
6859                 <para>
6860                   When this option and <command>update-check-ksk</command>
6861                   are both set to <literal>yes</literal>, only key-signing
6862                   keys (that is, keys with the KSK bit set) will be used
6863                   to sign the DNSKEY RRset at the zone apex.  Zone-signing
6864                   keys (keys without the KSK bit set) will be used to sign
6865                   the remainder of the zone, but not the DNSKEY RRset.
6866                   This is similar to the
6867                   <command>dnssec-signzone -x</command> command line option.
6868                 </para>
6869                 <para>
6870                   The default is <command>no</command>.  If
6871                   <command>update-check-ksk</command> is set to
6872                   <literal>no</literal>, this option is ignored.
6873                 </para>
6874               </listitem>
6875             </varlistentry>
6876
6877             <varlistentry>
6878               <term><command>try-tcp-refresh</command></term>
6879               <listitem>
6880                 <para>
6881                   Try to refresh the zone using TCP if UDP queries fail.
6882                   For BIND 8 compatibility, the default is
6883                   <command>yes</command>.
6884                 </para>
6885               </listitem>
6886             </varlistentry>
6887
6888             <varlistentry>
6889               <term><command>dnssec-secure-to-insecure</command></term>
6890               <listitem>
6891                 <para>
6892                   Allow a dynamic zone to transition from secure to
6893                   insecure (i.e., signed to unsigned) by deleting all
6894                   of the DNSKEY records.  The default is <command>no</command>.
6895                   If set to <command>yes</command>, and if the DNSKEY RRset
6896                   at the zone apex is deleted, all RRSIG and NSEC records
6897                   will be removed from the zone as well.
6898                 </para>
6899                 <para>
6900                   If the zone uses NSEC3, then it is also necessary to
6901                   delete the NSEC3PARAM RRset from the zone apex; this will
6902                   cause the removal of all corresponding NSEC3 records.
6903                   (It is expected that this requirement will be eliminated
6904                   in a future release.)
6905                 </para>
6906                 <para>
6907                   Note that if a zone has been configured with
6908                   <command>auto-dnssec maintain</command> and the
6909                   private keys remain accessible in the key repository,
6910                   then the zone will be automatically signed again the
6911                   next time <command>named</command> is started.
6912                 </para>
6913               </listitem>
6914             </varlistentry>
6915
6916           </variablelist>
6917
6918         </sect3>
6919
6920         <sect3>
6921           <title>Forwarding</title>
6922           <para>
6923             The forwarding facility can be used to create a large site-wide
6924             cache on a few servers, reducing traffic over links to external
6925             name servers. It can also be used to allow queries by servers that
6926             do not have direct access to the Internet, but wish to look up
6927             exterior
6928             names anyway. Forwarding occurs only on those queries for which
6929             the server is not authoritative and does not have the answer in
6930             its cache.
6931           </para>
6932
6933           <variablelist>
6934             <varlistentry>
6935               <term><command>forward</command></term>
6936               <listitem>
6937                 <para>
6938                   This option is only meaningful if the
6939                   forwarders list is not empty. A value of <varname>first</varname>,
6940                   the default, causes the server to query the forwarders
6941                   first &mdash; and
6942                   if that doesn't answer the question, the server will then
6943                   look for
6944                   the answer itself. If <varname>only</varname> is
6945                   specified, the
6946                   server will only query the forwarders.
6947                 </para>
6948               </listitem>
6949             </varlistentry>
6950
6951             <varlistentry>
6952               <term><command>forwarders</command></term>
6953               <listitem>
6954                 <para>
6955                   Specifies the IP addresses to be used
6956                   for forwarding. The default is the empty list (no
6957                   forwarding).
6958                 </para>
6959               </listitem>
6960             </varlistentry>
6961
6962           </variablelist>
6963
6964           <para>
6965             Forwarding can also be configured on a per-domain basis, allowing
6966             for the global forwarding options to be overridden in a variety
6967             of ways. You can set particular domains to use different
6968             forwarders,
6969             or have a different <command>forward only/first</command> behavior,
6970             or not forward at all, see <xref linkend="zone_statement_grammar"/>.
6971           </para>
6972         </sect3>
6973
6974         <sect3>
6975           <title>Dual-stack Servers</title>
6976           <para>
6977             Dual-stack servers are used as servers of last resort to work
6978             around
6979             problems in reachability due the lack of support for either IPv4
6980             or IPv6
6981             on the host machine.
6982           </para>
6983
6984           <variablelist>
6985             <varlistentry>
6986               <term><command>dual-stack-servers</command></term>
6987               <listitem>
6988                 <para>
6989                   Specifies host names or addresses of machines with access to
6990                   both IPv4 and IPv6 transports. If a hostname is used, the
6991                   server must be able
6992                   to resolve the name using only the transport it has.  If the
6993                   machine is dual
6994                   stacked, then the <command>dual-stack-servers</command> have no effect unless
6995                   access to a transport has been disabled on the command line
6996                   (e.g. <command>named -4</command>).
6997                 </para>
6998               </listitem>
6999             </varlistentry>
7000           </variablelist>
7001         </sect3>
7002
7003         <sect3 id="access_control">
7004           <title>Access Control</title>
7005
7006           <para>
7007             Access to the server can be restricted based on the IP address
7008             of the requesting system. See <xref linkend="address_match_lists"/> for
7009             details on how to specify IP address lists.
7010           </para>
7011
7012           <variablelist>
7013
7014             <varlistentry>
7015               <term><command>allow-notify</command></term>
7016               <listitem>
7017                 <para>
7018                   Specifies which hosts are allowed to
7019                   notify this server, a slave, of zone changes in addition
7020                   to the zone masters.
7021                   <command>allow-notify</command> may also be
7022                   specified in the
7023                   <command>zone</command> statement, in which case
7024                   it overrides the
7025                   <command>options allow-notify</command>
7026                   statement.  It is only meaningful
7027                   for a slave zone.  If not specified, the default is to
7028                   process notify messages
7029                   only from a zone's master.
7030                 </para>
7031               </listitem>
7032             </varlistentry>
7033
7034             <varlistentry>
7035               <term><command>allow-query</command></term>
7036               <listitem>
7037                 <para>
7038                   Specifies which hosts are allowed to ask ordinary
7039                   DNS questions. <command>allow-query</command> may
7040                   also be specified in the <command>zone</command>
7041                   statement, in which case it overrides the
7042                   <command>options allow-query</command> statement.
7043                   If not specified, the default is to allow queries
7044                   from all hosts.
7045                 </para>
7046                 <note>
7047                   <para>
7048                     <command>allow-query-cache</command> is now
7049                     used to specify access to the cache.
7050                   </para>
7051                 </note>
7052               </listitem>
7053             </varlistentry>
7054
7055             <varlistentry>
7056               <term><command>allow-query-on</command></term>
7057               <listitem>
7058                 <para>
7059                   Specifies which local addresses can accept ordinary
7060                   DNS questions. This makes it possible, for instance,
7061                   to allow queries on internal-facing interfaces but
7062                   disallow them on external-facing ones, without
7063                   necessarily knowing the internal network's addresses.
7064                 </para>
7065                 <para>
7066                   <command>allow-query-on</command> may
7067                   also be specified in the <command>zone</command>
7068                   statement, in which case it overrides the
7069                   <command>options allow-query-on</command> statement.
7070                 </para>
7071                 <para>
7072                   If not specified, the default is to allow queries
7073                   on all addresses.
7074                 </para>
7075                 <note>
7076                   <para>
7077                     <command>allow-query-cache</command> is
7078                     used to specify access to the cache.
7079                   </para>
7080                 </note>
7081               </listitem>
7082             </varlistentry>
7083
7084             <varlistentry>
7085               <term><command>allow-query-cache</command></term>
7086               <listitem>
7087                 <para>
7088                   Specifies which hosts are allowed to get answers
7089                   from the cache.  If <command>allow-query-cache</command>
7090                   is not set then <command>allow-recursion</command>
7091                   is used if set, otherwise <command>allow-query</command>
7092                   is used if set unless <command>recursion no;</command> is
7093                   set in which case <command>none;</command> is used,
7094                   otherwise the default (<command>localnets;</command>
7095                   <command>localhost;</command>) is used.
7096                 </para>
7097               </listitem>
7098             </varlistentry>
7099
7100             <varlistentry>
7101               <term><command>allow-query-cache-on</command></term>
7102               <listitem>
7103                 <para>
7104                   Specifies which local addresses can give answers
7105                   from the cache.  If not specified, the default is
7106                   to allow cache queries on any address,
7107                   <command>localnets</command> and
7108                   <command>localhost</command>.
7109                 </para>
7110               </listitem>
7111             </varlistentry>
7112
7113             <varlistentry>
7114               <term><command>allow-recursion</command></term>
7115               <listitem>
7116                 <para>
7117                   Specifies which hosts are allowed to make recursive
7118                   queries through this server. If
7119                   <command>allow-recursion</command> is not set
7120                   then <command>allow-query-cache</command> is
7121                   used if set, otherwise <command>allow-query</command>
7122                   is used if set, otherwise the default
7123                   (<command>localnets;</command>
7124                   <command>localhost;</command>) is used.
7125                 </para>
7126               </listitem>
7127             </varlistentry>
7128
7129             <varlistentry>
7130               <term><command>allow-recursion-on</command></term>
7131               <listitem>
7132                 <para>
7133                   Specifies which local addresses can accept recursive
7134                   queries.  If not specified, the default is to allow
7135                   recursive queries on all addresses.
7136                 </para>
7137               </listitem>
7138             </varlistentry>
7139
7140             <varlistentry>
7141               <term><command>allow-update</command></term>
7142               <listitem>
7143                 <para>
7144                   Specifies which hosts are allowed to
7145                   submit Dynamic DNS updates for master zones. The default is
7146                   to deny
7147                   updates from all hosts.  Note that allowing updates based
7148                   on the requestor's IP address is insecure; see
7149                   <xref linkend="dynamic_update_security"/> for details.
7150                 </para>
7151               </listitem>
7152             </varlistentry>
7153
7154             <varlistentry>
7155               <term><command>allow-update-forwarding</command></term>
7156               <listitem>
7157                 <para>
7158                   Specifies which hosts are allowed to
7159                   submit Dynamic DNS updates to slave zones to be forwarded to
7160                   the
7161                   master.  The default is <userinput>{ none; }</userinput>,
7162                   which
7163                   means that no update forwarding will be performed.  To
7164                   enable
7165                   update forwarding, specify
7166                   <userinput>allow-update-forwarding { any; };</userinput>.
7167                   Specifying values other than <userinput>{ none; }</userinput> or
7168                   <userinput>{ any; }</userinput> is usually
7169                   counterproductive, since
7170                   the responsibility for update access control should rest
7171                   with the
7172                   master server, not the slaves.
7173                 </para>
7174                 <para>
7175                   Note that enabling the update forwarding feature on a slave
7176                   server
7177                   may expose master servers relying on insecure IP address
7178                   based
7179                   access control to attacks; see <xref linkend="dynamic_update_security"/>
7180                   for more details.
7181                 </para>
7182               </listitem>
7183             </varlistentry>
7184
7185             <varlistentry>
7186               <term><command>allow-v6-synthesis</command></term>
7187               <listitem>
7188                 <para>
7189                   This option was introduced for the smooth transition from
7190                   AAAA
7191                   to A6 and from "nibble labels" to binary labels.
7192                   However, since both A6 and binary labels were then
7193                   deprecated,
7194                   this option was also deprecated.
7195                   It is now ignored with some warning messages.
7196                 </para>
7197               </listitem>
7198             </varlistentry>
7199
7200             <varlistentry>
7201               <term><command>allow-transfer</command></term>
7202               <listitem>
7203                 <para>
7204                   Specifies which hosts are allowed to
7205                   receive zone transfers from the server. <command>allow-transfer</command> may
7206                   also be specified in the <command>zone</command>
7207                   statement, in which
7208                   case it overrides the <command>options allow-transfer</command> statement.
7209                   If not specified, the default is to allow transfers to all
7210                   hosts.
7211                 </para>
7212               </listitem>
7213             </varlistentry>
7214
7215             <varlistentry>
7216               <term><command>blackhole</command></term>
7217               <listitem>
7218                 <para>
7219                   Specifies a list of addresses that the
7220                   server will not accept queries from or use to resolve a
7221                   query. Queries
7222                   from these addresses will not be responded to. The default
7223                   is <userinput>none</userinput>.
7224                 </para>
7225               </listitem>
7226             </varlistentry>
7227
7228             <varlistentry>
7229               <term><command>filter-aaaa</command></term>
7230               <listitem>
7231                 <para>
7232                   Specifies a list of addresses to which
7233                   <command>filter-aaaa-on-v4</command>
7234                   is applies.  The default is <userinput>any</userinput>.
7235                 </para>
7236               </listitem>
7237             </varlistentry>
7238
7239             <varlistentry>
7240               <term><command>resolver-query-timeout</command></term>
7241               <listitem>
7242                 <para>
7243                   The amount of time the resolver will spend attempting
7244                   to resolve a recursive query before failing.  The
7245                   default is <literal>10</literal> and the maximum is
7246                   <literal>30</literal>.  Setting it to <literal>0</literal>
7247                   will result in the default being used.
7248                 </para>
7249               </listitem>
7250             </varlistentry>
7251           </variablelist>
7252
7253         </sect3>
7254
7255         <sect3>
7256           <title>Interfaces</title>
7257           <para>
7258             The interfaces and ports that the server will answer queries
7259             from may be specified using the <command>listen-on</command> option. <command>listen-on</command> takes
7260             an optional port and an <varname>address_match_list</varname>.
7261             The server will listen on all interfaces allowed by the address
7262             match list. If a port is not specified, port 53 will be used.
7263           </para>
7264           <para>
7265             Multiple <command>listen-on</command> statements are
7266             allowed.
7267             For example,
7268           </para>
7269
7270 <programlisting>listen-on { 5.6.7.8; };
7271 listen-on port 1234 { !1.2.3.4; 1.2/16; };
7272 </programlisting>
7273
7274           <para>
7275             will enable the name server on port 53 for the IP address
7276             5.6.7.8, and on port 1234 of an address on the machine in net
7277             1.2 that is not 1.2.3.4.
7278           </para>
7279
7280           <para>
7281             If no <command>listen-on</command> is specified, the
7282             server will listen on port 53 on all IPv4 interfaces.
7283           </para>
7284
7285           <para>
7286             The <command>listen-on-v6</command> option is used to
7287             specify the interfaces and the ports on which the server will
7288             listen
7289             for incoming queries sent using IPv6.
7290           </para>
7291
7292           <para>
7293             When <programlisting>{ any; }</programlisting> is
7294             specified
7295             as the <varname>address_match_list</varname> for the
7296             <command>listen-on-v6</command> option,
7297             the server does not bind a separate socket to each IPv6 interface
7298             address as it does for IPv4 if the operating system has enough API
7299             support for IPv6 (specifically if it conforms to RFC 3493 and RFC
7300             3542).
7301             Instead, it listens on the IPv6 wildcard address.
7302             If the system only has incomplete API support for IPv6, however,
7303             the behavior is the same as that for IPv4.
7304           </para>
7305
7306           <para>
7307             A list of particular IPv6 addresses can also be specified, in
7308             which case
7309             the server listens on a separate socket for each specified
7310             address,
7311             regardless of whether the desired API is supported by the system.
7312           </para>
7313
7314           <para>
7315             Multiple <command>listen-on-v6</command> options can
7316             be used.
7317             For example,
7318           </para>
7319
7320 <programlisting>listen-on-v6 { any; };
7321 listen-on-v6 port 1234 { !2001:db8::/32; any; };
7322 </programlisting>
7323
7324           <para>
7325             will enable the name server on port 53 for any IPv6 addresses
7326             (with a single wildcard socket),
7327             and on port 1234 of IPv6 addresses that is not in the prefix
7328             2001:db8::/32 (with separate sockets for each matched address.)
7329           </para>
7330
7331           <para>
7332             To make the server not listen on any IPv6 address, use
7333           </para>
7334
7335 <programlisting>listen-on-v6 { none; };
7336 </programlisting>
7337
7338           <para>
7339             If no <command>listen-on-v6</command> option is
7340             specified, the server will not listen on any IPv6 address
7341             unless <command>-6</command> is specified when <command>named</command> is
7342             invoked.  If <command>-6</command> is specified then
7343             <command>named</command> will listen on port 53 on all IPv6 interfaces by default.
7344           </para>
7345         </sect3>
7346
7347         <sect3 id="query_address">
7348           <title>Query Address</title>
7349           <para>
7350             If the server doesn't know the answer to a question, it will
7351             query other name servers. <command>query-source</command> specifies
7352             the address and port used for such queries. For queries sent over
7353             IPv6, there is a separate <command>query-source-v6</command> option.
7354             If <command>address</command> is <command>*</command> (asterisk) or is omitted,
7355             a wildcard IP address (<command>INADDR_ANY</command>)
7356             will be used.
7357           </para>
7358
7359           <para>
7360             If <command>port</command> is <command>*</command> or is omitted,
7361             a random port number from a pre-configured
7362             range is picked up and will be used for each query.
7363             The port range(s) is that specified in
7364             the <command>use-v4-udp-ports</command> (for IPv4)
7365             and <command>use-v6-udp-ports</command> (for IPv6)
7366             options, excluding the ranges specified in
7367             the <command>avoid-v4-udp-ports</command>
7368             and <command>avoid-v6-udp-ports</command> options, respectively.
7369           </para>
7370
7371           <para>
7372             The defaults of the <command>query-source</command> and
7373             <command>query-source-v6</command> options
7374             are:
7375           </para>
7376
7377 <programlisting>query-source address * port *;
7378 query-source-v6 address * port *;
7379 </programlisting>
7380
7381           <para>
7382             If <command>use-v4-udp-ports</command> or
7383             <command>use-v6-udp-ports</command> is unspecified,
7384             <command>named</command> will check if the operating
7385             system provides a programming interface to retrieve the
7386             system's default range for ephemeral ports.
7387             If such an interface is available,
7388             <command>named</command> will use the corresponding system
7389             default range; otherwise, it will use its own defaults:
7390          </para>
7391
7392 <programlisting>use-v4-udp-ports { range 1024 65535; };
7393 use-v6-udp-ports { range 1024 65535; };
7394 </programlisting>
7395
7396           <para>
7397             Note: make sure the ranges be sufficiently large for
7398             security.  A desirable size depends on various parameters,
7399             but we generally recommend it contain at least 16384 ports
7400             (14 bits of entropy).
7401             Note also that the system's default range when used may be
7402             too small for this purpose, and that the range may even be
7403             changed while <command>named</command> is running; the new
7404             range will automatically be applied when <command>named</command>
7405             is reloaded.
7406             It is encouraged to
7407             configure <command>use-v4-udp-ports</command> and
7408             <command>use-v6-udp-ports</command> explicitly so that the
7409             ranges are sufficiently large and are reasonably
7410             independent from the ranges used by other applications.
7411           </para>
7412
7413           <para>
7414             Note: the operational configuration
7415             where <command>named</command> runs may prohibit the use
7416             of some ports.  For example, UNIX systems will not allow
7417             <command>named</command> running without a root privilege
7418             to use ports less than 1024.
7419             If such ports are included in the specified (or detected)
7420             set of query ports, the corresponding query attempts will
7421             fail, resulting in resolution failures or delay.
7422             It is therefore important to configure the set of ports
7423             that can be safely used in the expected operational environment.
7424           </para>
7425
7426           <para>
7427             The defaults of the <command>avoid-v4-udp-ports</command> and
7428             <command>avoid-v6-udp-ports</command> options
7429             are:
7430           </para>
7431
7432 <programlisting>avoid-v4-udp-ports {};
7433 avoid-v6-udp-ports {};
7434 </programlisting>
7435
7436           <para>
7437             Note: BIND 9.5.0 introduced
7438             the <command>use-queryport-pool</command> 
7439             option to support a pool of such random ports, but this
7440             option is now obsolete because reusing the same ports in
7441             the pool may not be sufficiently secure.
7442             For the same reason, it is generally strongly discouraged to
7443             specify a particular port for the
7444             <command>query-source</command> or
7445             <command>query-source-v6</command> options;
7446             it implicitly disables the use of randomized port numbers.
7447           </para>
7448
7449           <variablelist>
7450             <varlistentry>
7451               <term><command>use-queryport-pool</command></term>
7452               <listitem>
7453                 <para>
7454                   This option is obsolete.
7455                 </para>
7456               </listitem>
7457             </varlistentry>
7458
7459             <varlistentry>
7460               <term><command>queryport-pool-ports</command></term>
7461               <listitem>
7462                 <para>
7463                   This option is obsolete.
7464                 </para>
7465               </listitem>
7466             </varlistentry>
7467
7468             <varlistentry>
7469               <term><command>queryport-pool-updateinterval</command></term>
7470               <listitem>
7471                 <para>
7472                   This option is obsolete.
7473                 </para>
7474               </listitem>
7475             </varlistentry>
7476             
7477           </variablelist>
7478           <note>
7479             <para>
7480               The address specified in the <command>query-source</command> option
7481               is used for both UDP and TCP queries, but the port applies only
7482               to UDP queries.  TCP queries always use a random
7483               unprivileged port.
7484             </para>
7485           </note>
7486           <note>
7487             <para>
7488               Solaris 2.5.1 and earlier does not support setting the source
7489               address for TCP sockets.
7490             </para>
7491           </note>
7492           <note>
7493             <para>
7494               See also <command>transfer-source</command> and
7495               <command>notify-source</command>.
7496             </para>
7497           </note>
7498         </sect3>
7499
7500         <sect3 id="zone_transfers">
7501           <title>Zone Transfers</title>
7502           <para>
7503             <acronym>BIND</acronym> has mechanisms in place to
7504             facilitate zone transfers
7505             and set limits on the amount of load that transfers place on the
7506             system. The following options apply to zone transfers.
7507           </para>
7508
7509           <variablelist>
7510
7511             <varlistentry>
7512               <term><command>also-notify</command></term>
7513               <listitem>
7514                 <para>
7515                   Defines a global list of IP addresses of name servers
7516                   that are also sent NOTIFY messages whenever a fresh copy of
7517                   the
7518                   zone is loaded, in addition to the servers listed in the
7519                   zone's NS records.
7520                   This helps to ensure that copies of the zones will
7521                   quickly converge on stealth servers.
7522                   Optionally, a port may be specified with each
7523                   <command>also-notify</command> address to send
7524                   the notify messages to a port other than the
7525                   default of 53.
7526                   If an <command>also-notify</command> list
7527                   is given in a <command>zone</command> statement,
7528                   it will override
7529                   the <command>options also-notify</command>
7530                   statement. When a <command>zone notify</command>
7531                   statement
7532                   is set to <command>no</command>, the IP
7533                   addresses in the global <command>also-notify</command> list will
7534                   not be sent NOTIFY messages for that zone. The default is
7535                   the empty
7536                   list (no global notification list).
7537                 </para>
7538               </listitem>
7539             </varlistentry>
7540
7541             <varlistentry>
7542               <term><command>max-transfer-time-in</command></term>
7543               <listitem>
7544                 <para>
7545                   Inbound zone transfers running longer than
7546                   this many minutes will be terminated. The default is 120
7547                   minutes
7548                   (2 hours).  The maximum value is 28 days (40320 minutes).
7549                 </para>
7550               </listitem>
7551             </varlistentry>
7552
7553             <varlistentry>
7554               <term><command>max-transfer-idle-in</command></term>
7555               <listitem>
7556                 <para>
7557                   Inbound zone transfers making no progress
7558                   in this many minutes will be terminated. The default is 60
7559                   minutes
7560                   (1 hour).  The maximum value is 28 days (40320 minutes).
7561                 </para>
7562               </listitem>
7563             </varlistentry>
7564
7565             <varlistentry>
7566               <term><command>max-transfer-time-out</command></term>
7567               <listitem>
7568                 <para>
7569                   Outbound zone transfers running longer than
7570                   this many minutes will be terminated. The default is 120
7571                   minutes
7572                   (2 hours).  The maximum value is 28 days (40320 minutes).
7573                 </para>
7574               </listitem>
7575             </varlistentry>
7576
7577             <varlistentry>
7578               <term><command>max-transfer-idle-out</command></term>
7579               <listitem>
7580                 <para>
7581                   Outbound zone transfers making no progress
7582                   in this many minutes will be terminated.  The default is 60
7583                   minutes (1
7584                   hour).  The maximum value is 28 days (40320 minutes).
7585                 </para>
7586               </listitem>
7587             </varlistentry>
7588
7589             <varlistentry>
7590               <term><command>serial-query-rate</command></term>
7591               <listitem>
7592                 <para>
7593                   Slave servers will periodically query master
7594                   servers to find out if zone serial numbers have
7595                   changed. Each such query uses a minute amount of
7596                   the slave server's network bandwidth.  To limit
7597                   the amount of bandwidth used, BIND 9 limits the
7598                   rate at which queries are sent.  The value of the
7599                   <command>serial-query-rate</command> option, an
7600                   integer, is the maximum number of queries sent
7601                   per second.  The default is 20.
7602                 </para>
7603                 <para>
7604                   In addition to controlling the rate SOA refresh
7605                   queries are issued at
7606                   <command>serial-query-rate</command> also controls
7607                   the rate at which NOTIFY messages are sent from
7608                   both master and slave zones.
7609                 </para>
7610               </listitem>
7611             </varlistentry>
7612
7613             <varlistentry>
7614               <term><command>serial-queries</command></term>
7615               <listitem>
7616                 <para>
7617                   In BIND 8, the <command>serial-queries</command>
7618                   option
7619                   set the maximum number of concurrent serial number queries
7620                   allowed to be outstanding at any given time.
7621                   BIND 9 does not limit the number of outstanding
7622                   serial queries and ignores the <command>serial-queries</command> option.
7623                   Instead, it limits the rate at which the queries are sent
7624                   as defined using the <command>serial-query-rate</command> option.
7625                 </para>
7626               </listitem>
7627             </varlistentry>
7628
7629             <varlistentry>
7630               <term><command>transfer-format</command></term>
7631               <listitem>
7632
7633                 <para>
7634                   Zone transfers can be sent using two different formats,
7635                   <command>one-answer</command> and
7636                   <command>many-answers</command>.
7637                   The <command>transfer-format</command> option is used
7638                   on the master server to determine which format it sends.
7639                   <command>one-answer</command> uses one DNS message per
7640                   resource record transferred.
7641                   <command>many-answers</command> packs as many resource
7642                   records as possible into a message.
7643                   <command>many-answers</command> is more efficient, but is
7644                   only supported by relatively new slave servers,
7645                   such as <acronym>BIND</acronym> 9, <acronym>BIND</acronym>
7646                   8.x and <acronym>BIND</acronym> 4.9.5 onwards.
7647                   The <command>many-answers</command> format is also supported by
7648                   recent Microsoft Windows nameservers.
7649                   The default is <command>many-answers</command>.
7650                   <command>transfer-format</command> may be overridden on a
7651                   per-server basis by using the <command>server</command>
7652                   statement.
7653                 </para>
7654
7655               </listitem>
7656             </varlistentry>
7657
7658             <varlistentry>
7659               <term><command>transfers-in</command></term>
7660               <listitem>
7661                 <para>
7662                   The maximum number of inbound zone transfers
7663                   that can be running concurrently. The default value is <literal>10</literal>.
7664                   Increasing <command>transfers-in</command> may
7665                   speed up the convergence
7666                   of slave zones, but it also may increase the load on the
7667                   local system.
7668                 </para>
7669               </listitem>
7670             </varlistentry>
7671
7672             <varlistentry>
7673               <term><command>transfers-out</command></term>
7674               <listitem>
7675                 <para>
7676                   The maximum number of outbound zone transfers
7677                   that can be running concurrently. Zone transfer requests in
7678                   excess
7679                   of the limit will be refused. The default value is <literal>10</literal>.
7680                 </para>
7681               </listitem>
7682             </varlistentry>
7683
7684             <varlistentry>
7685               <term><command>transfers-per-ns</command></term>
7686               <listitem>
7687                 <para>
7688                   The maximum number of inbound zone transfers
7689                   that can be concurrently transferring from a given remote
7690                   name server.
7691                   The default value is <literal>2</literal>.
7692                   Increasing <command>transfers-per-ns</command>
7693                   may
7694                   speed up the convergence of slave zones, but it also may
7695                   increase
7696                   the load on the remote name server. <command>transfers-per-ns</command> may
7697                   be overridden on a per-server basis by using the <command>transfers</command> phrase
7698                   of the <command>server</command> statement.
7699                 </para>
7700               </listitem>
7701             </varlistentry>
7702
7703             <varlistentry>
7704               <term><command>transfer-source</command></term>
7705               <listitem>
7706                 <para><command>transfer-source</command>
7707                   determines which local address will be bound to IPv4
7708                   TCP connections used to fetch zones transferred
7709                   inbound by the server.  It also determines the
7710                   source IPv4 address, and optionally the UDP port,
7711                   used for the refresh queries and forwarded dynamic
7712                   updates.  If not set, it defaults to a system
7713                   controlled value which will usually be the address
7714                   of the interface "closest to" the remote end. This
7715                   address must appear in the remote end's
7716                   <command>allow-transfer</command> option for the
7717                   zone being transferred, if one is specified. This
7718                   statement sets the
7719                   <command>transfer-source</command> for all zones,
7720                   but can be overridden on a per-view or per-zone
7721                   basis by including a
7722                   <command>transfer-source</command> statement within
7723                   the <command>view</command> or
7724                   <command>zone</command> block in the configuration
7725                   file.
7726                 </para>
7727                 <note>
7728                   <para>
7729                     Solaris 2.5.1 and earlier does not support setting the
7730                     source address for TCP sockets.
7731                   </para>
7732                 </note>
7733               </listitem>
7734             </varlistentry>
7735
7736             <varlistentry>
7737               <term><command>transfer-source-v6</command></term>
7738               <listitem>
7739                 <para>
7740                   The same as <command>transfer-source</command>,
7741                   except zone transfers are performed using IPv6.
7742                 </para>
7743               </listitem>
7744             </varlistentry>
7745
7746             <varlistentry>
7747               <term><command>alt-transfer-source</command></term>
7748               <listitem>
7749                 <para>
7750                   An alternate transfer source if the one listed in
7751                   <command>transfer-source</command> fails and
7752                   <command>use-alt-transfer-source</command> is
7753                   set.
7754                 </para>
7755                 <note>
7756                   If you do not wish the alternate transfer source
7757                   to be used, you should set
7758                   <command>use-alt-transfer-source</command>
7759                   appropriately and you should not depend upon
7760                   getting an answer back to the first refresh
7761                   query.
7762                 </note>
7763               </listitem>
7764             </varlistentry>
7765
7766             <varlistentry>
7767               <term><command>alt-transfer-source-v6</command></term>
7768               <listitem>
7769                 <para>
7770                   An alternate transfer source if the one listed in
7771                   <command>transfer-source-v6</command> fails and
7772                   <command>use-alt-transfer-source</command> is
7773                   set.
7774                 </para>
7775               </listitem>
7776             </varlistentry>
7777
7778             <varlistentry>
7779               <term><command>use-alt-transfer-source</command></term>
7780               <listitem>
7781                 <para>
7782                   Use the alternate transfer sources or not.  If views are
7783                   specified this defaults to <command>no</command>
7784                   otherwise it defaults to
7785                   <command>yes</command> (for BIND 8
7786                   compatibility).
7787                 </para>
7788               </listitem>
7789             </varlistentry>
7790
7791             <varlistentry>
7792               <term><command>notify-source</command></term>
7793               <listitem>
7794                 <para><command>notify-source</command>
7795                   determines which local source address, and
7796                   optionally UDP port, will be used to send NOTIFY
7797                   messages.  This address must appear in the slave
7798                   server's <command>masters</command> zone clause or
7799                   in an <command>allow-notify</command> clause.  This
7800                   statement sets the <command>notify-source</command>
7801                   for all zones, but can be overridden on a per-zone or
7802                   per-view basis by including a
7803                   <command>notify-source</command> statement within
7804                   the <command>zone</command> or
7805                   <command>view</command> block in the configuration
7806                   file.
7807                 </para>
7808                 <note>
7809                   <para>
7810                     Solaris 2.5.1 and earlier does not support setting the
7811                     source address for TCP sockets.
7812                   </para>
7813                 </note>
7814               </listitem>
7815             </varlistentry>
7816
7817             <varlistentry>
7818               <term><command>notify-source-v6</command></term>
7819               <listitem>
7820                 <para>
7821                   Like <command>notify-source</command>,
7822                   but applies to notify messages sent to IPv6 addresses.
7823                 </para>
7824               </listitem>
7825             </varlistentry>
7826
7827           </variablelist>
7828
7829         </sect3>
7830
7831         <sect3>
7832           <title>UDP Port Lists</title>
7833           <para>
7834             <command>use-v4-udp-ports</command>,
7835             <command>avoid-v4-udp-ports</command>,
7836             <command>use-v6-udp-ports</command>, and
7837             <command>avoid-v6-udp-ports</command>
7838             specify a list of IPv4 and IPv6 UDP ports that will be
7839             used or not used as source ports for UDP messages.
7840             See <xref linkend="query_address"/> about how the
7841             available ports are determined.
7842             For example, with the following configuration
7843           </para>
7844
7845 <programlisting>
7846 use-v6-udp-ports { range 32768 65535; };
7847 avoid-v6-udp-ports { 40000; range 50000 60000; };
7848 </programlisting>
7849
7850            <para>
7851              UDP ports of IPv6 messages sent
7852              from <command>named</command> will be in one
7853              of the following ranges: 32768 to 39999, 40001 to 49999,
7854              and 60001 to 65535.
7855            </para>
7856
7857            <para>
7858              <command>avoid-v4-udp-ports</command> and
7859              <command>avoid-v6-udp-ports</command> can be used
7860              to prevent <command>named</command> from choosing as its random source port a
7861              port that is blocked by your firewall or a port that is
7862              used by other applications;
7863              if a query went out with a source port blocked by a
7864              firewall, the
7865              answer would not get by the firewall and the name server would
7866              have to query again.
7867              Note: the desired range can also be represented only with
7868              <command>use-v4-udp-ports</command> and
7869              <command>use-v6-udp-ports</command>, and the
7870              <command>avoid-</command> options are redundant in that
7871              sense; they are provided for backward compatibility and
7872              to possibly simplify the port specification.
7873            </para>
7874         </sect3>
7875
7876         <sect3>
7877           <title>Operating System Resource Limits</title>
7878
7879           <para>
7880             The server's usage of many system resources can be limited.
7881             Scaled values are allowed when specifying resource limits.  For
7882             example, <command>1G</command> can be used instead of
7883             <command>1073741824</command> to specify a limit of
7884             one
7885             gigabyte. <command>unlimited</command> requests
7886             unlimited use, or the
7887             maximum available amount. <command>default</command>
7888             uses the limit
7889             that was in force when the server was started. See the description
7890             of <command>size_spec</command> in <xref linkend="configuration_file_elements"/>.
7891           </para>
7892
7893           <para>
7894             The following options set operating system resource limits for
7895             the name server process.  Some operating systems don't support
7896             some or
7897             any of the limits. On such systems, a warning will be issued if
7898             the
7899             unsupported limit is used.
7900           </para>
7901
7902           <variablelist>
7903
7904             <varlistentry>
7905               <term><command>coresize</command></term>
7906               <listitem>
7907                 <para>
7908                   The maximum size of a core dump. The default
7909                   is <literal>default</literal>.
7910                 </para>
7911               </listitem>
7912             </varlistentry>
7913
7914             <varlistentry>
7915               <term><command>datasize</command></term>
7916               <listitem>
7917                 <para>
7918                   The maximum amount of data memory the server
7919                   may use. The default is <literal>default</literal>.
7920                   This is a hard limit on server memory usage.
7921                   If the server attempts to allocate memory in excess of this
7922                   limit, the allocation will fail, which may in turn leave
7923                   the server unable to perform DNS service.  Therefore,
7924                   this option is rarely useful as a way of limiting the
7925                   amount of memory used by the server, but it can be used
7926                   to raise an operating system data size limit that is
7927                   too small by default.  If you wish to limit the amount
7928                   of memory used by the server, use the
7929                   <command>max-cache-size</command> and
7930                   <command>recursive-clients</command>
7931                   options instead.
7932                 </para>
7933               </listitem>
7934             </varlistentry>
7935
7936             <varlistentry>
7937               <term><command>files</command></term>
7938               <listitem>
7939                 <para>
7940                   The maximum number of files the server
7941                   may have open concurrently. The default is <literal>unlimited</literal>.
7942                 </para>
7943               </listitem>
7944             </varlistentry>
7945
7946             <varlistentry>
7947               <term><command>stacksize</command></term>
7948               <listitem>
7949                 <para>
7950                   The maximum amount of stack memory the server
7951                   may use. The default is <literal>default</literal>.
7952                 </para>
7953               </listitem>
7954             </varlistentry>
7955
7956           </variablelist>
7957
7958         </sect3>
7959
7960         <sect3 id="server_resource_limits">
7961           <title>Server  Resource Limits</title>
7962
7963           <para>
7964             The following options set limits on the server's
7965             resource consumption that are enforced internally by the
7966             server rather than the operating system.
7967           </para>
7968
7969           <variablelist>
7970
7971             <varlistentry>
7972               <term><command>max-ixfr-log-size</command></term>
7973               <listitem>
7974                 <para>
7975                   This option is obsolete; it is accepted
7976                   and ignored for BIND 8 compatibility.  The option
7977                   <command>max-journal-size</command> performs a
7978                   similar function in BIND 9.
7979                 </para>
7980               </listitem>
7981             </varlistentry>
7982
7983             <varlistentry>
7984               <term><command>max-journal-size</command></term>
7985               <listitem>
7986                 <para>
7987                   Sets a maximum size for each journal file
7988                   (see <xref linkend="journal"/>).  When the journal file
7989                   approaches
7990                   the specified size, some of the oldest transactions in the
7991                   journal
7992                   will be automatically removed.  The default is
7993                   <literal>unlimited</literal>.
7994                   This may also be set on a per-zone basis.
7995                 </para>
7996               </listitem>
7997             </varlistentry>
7998
7999             <varlistentry>
8000               <term><command>host-statistics-max</command></term>
8001               <listitem>
8002                 <para>
8003                   In BIND 8, specifies the maximum number of host statistics
8004                   entries to be kept.
8005                   Not implemented in BIND 9.
8006                 </para>
8007               </listitem>
8008             </varlistentry>
8009
8010             <varlistentry>
8011               <term><command>recursive-clients</command></term>
8012               <listitem>
8013                 <para>
8014                   The maximum number of simultaneous recursive lookups
8015                   the server will perform on behalf of clients.  The default
8016                   is
8017                   <literal>1000</literal>.  Because each recursing
8018                   client uses a fair
8019                   bit of memory, on the order of 20 kilobytes, the value of
8020                   the
8021                   <command>recursive-clients</command> option may
8022                   have to be decreased
8023                   on hosts with limited memory.
8024                 </para>
8025               </listitem>
8026             </varlistentry>
8027
8028             <varlistentry>
8029               <term><command>tcp-clients</command></term>
8030               <listitem>
8031                 <para>
8032                   The maximum number of simultaneous client TCP
8033                   connections that the server will accept.
8034                   The default is <literal>100</literal>.
8035                 </para>
8036               </listitem>
8037             </varlistentry>
8038
8039             <varlistentry>
8040               <term><command>reserved-sockets</command></term>
8041               <listitem>
8042                 <para>
8043                   The number of file descriptors reserved for TCP, stdio,
8044                   etc.  This needs to be big enough to cover the number of
8045                   interfaces <command>named</command> listens on, <command>tcp-clients</command> as well as
8046                   to provide room for outgoing TCP queries and incoming zone
8047                   transfers.  The default is <literal>512</literal>.
8048                   The minimum value is <literal>128</literal> and the
8049                   maximum value is <literal>128</literal> less than
8050                   maxsockets (-S).  This option may be removed in the future.
8051                 </para>
8052                 <para>
8053                   This option has little effect on Windows.
8054                 </para>
8055               </listitem>
8056             </varlistentry>
8057
8058             <varlistentry>
8059               <term><command>max-cache-size</command></term>
8060               <listitem>
8061                 <para>
8062                   The maximum amount of memory to use for the
8063                   server's cache, in bytes.
8064                   When the amount of data in the cache
8065                   reaches this limit, the server will cause records to expire
8066                   prematurely based on an LRU based strategy so that
8067                   the limit is not exceeded.
8068                   A value of 0 is special, meaning that
8069                   records are purged from the cache only when their
8070                   TTLs expire.
8071                   Another special keyword <userinput>unlimited</userinput>
8072                   means the maximum value of 32-bit unsigned integers
8073                   (0xffffffff), which may not have the same effect as
8074                   0 on machines that support more than 32 bits of
8075                   memory space.
8076                   Any positive values less than 2MB will be ignored reset
8077                   to 2MB.
8078                   In a server with multiple views, the limit applies
8079                   separately to the cache of each view.
8080                   The default is 0.
8081                 </para>
8082               </listitem>
8083             </varlistentry>
8084
8085             <varlistentry>
8086               <term><command>tcp-listen-queue</command></term>
8087               <listitem>
8088                 <para>
8089                   The listen queue depth.  The default and minimum is 3.
8090                   If the kernel supports the accept filter "dataready" this
8091                   also controls how
8092                   many TCP connections that will be queued in kernel space
8093                   waiting for
8094                   some data before being passed to accept.  Values less than 3
8095                   will be
8096                   silently raised.
8097                 </para>
8098               </listitem>
8099             </varlistentry>
8100
8101           </variablelist>
8102
8103         </sect3>
8104
8105         <sect3>
8106           <title>Periodic Task Intervals</title>
8107
8108           <variablelist>
8109
8110             <varlistentry>
8111               <term><command>cleaning-interval</command></term>
8112               <listitem>
8113                 <para>
8114                   This interval is effectively obsolete.  Previously,
8115                   the server would remove expired resource records
8116                   from the cache every <command>cleaning-interval</command> minutes.
8117                   <acronym>BIND</acronym> 9 now manages cache
8118                   memory in a more sophisticated manner and does not
8119                   rely on the periodic cleaning any more.
8120                   Specifying this option therefore has no effect on
8121                   the server's behavior.
8122                 </para>
8123               </listitem>
8124             </varlistentry>
8125
8126             <varlistentry>
8127               <term><command>heartbeat-interval</command></term>
8128               <listitem>
8129                 <para>
8130                   The server will perform zone maintenance tasks
8131                   for all zones marked as <command>dialup</command> whenever this
8132                   interval expires. The default is 60 minutes. Reasonable
8133                   values are up
8134                   to 1 day (1440 minutes).  The maximum value is 28 days
8135                   (40320 minutes).
8136                   If set to 0, no zone maintenance for these zones will occur.
8137                 </para>
8138               </listitem>
8139             </varlistentry>
8140
8141             <varlistentry>
8142               <term><command>interface-interval</command></term>
8143               <listitem>
8144                 <para>
8145                   The server will scan the network interface list
8146                   every <command>interface-interval</command>
8147                   minutes. The default
8148                   is 60 minutes. The maximum value is 28 days (40320 minutes).
8149                   If set to 0, interface scanning will only occur when
8150                   the configuration file is  loaded. After the scan, the
8151                   server will
8152                   begin listening for queries on any newly discovered
8153                   interfaces (provided they are allowed by the
8154                   <command>listen-on</command> configuration), and
8155                   will
8156                   stop listening on interfaces that have gone away.
8157                 </para>
8158               </listitem>
8159             </varlistentry>
8160
8161             <varlistentry>
8162               <term><command>statistics-interval</command></term>
8163               <listitem>
8164                 <para>
8165                   Name server statistics will be logged
8166                   every <command>statistics-interval</command>
8167                   minutes. The default is
8168                   60. The maximum value is 28 days (40320 minutes).
8169                   If set to 0, no statistics will be logged.
8170                   </para><note>
8171                   <simpara>
8172                     Not yet implemented in
8173                     <acronym>BIND</acronym> 9.
8174                   </simpara>
8175                 </note>
8176               </listitem>
8177             </varlistentry>
8178
8179           </variablelist>
8180
8181         </sect3>
8182
8183         <sect3 id="topology">
8184           <title>Topology</title>
8185
8186           <para>
8187             All other things being equal, when the server chooses a name
8188             server
8189             to query from a list of name servers, it prefers the one that is
8190             topologically closest to itself. The <command>topology</command> statement
8191             takes an <command>address_match_list</command> and
8192             interprets it
8193             in a special way. Each top-level list element is assigned a
8194             distance.
8195             Non-negated elements get a distance based on their position in the
8196             list, where the closer the match is to the start of the list, the
8197             shorter the distance is between it and the server. A negated match
8198             will be assigned the maximum distance from the server. If there
8199             is no match, the address will get a distance which is further than
8200             any non-negated list element, and closer than any negated element.
8201             For example,
8202           </para>
8203
8204 <programlisting>topology {
8205     10/8;
8206     !1.2.3/24;
8207     { 1.2/16; 3/8; };
8208 };</programlisting>
8209
8210           <para>
8211             will prefer servers on network 10 the most, followed by hosts
8212             on network 1.2.0.0 (netmask 255.255.0.0) and network 3, with the
8213             exception of hosts on network 1.2.3 (netmask 255.255.255.0), which
8214             is preferred least of all.
8215           </para>
8216           <para>
8217             The default topology is
8218           </para>
8219
8220 <programlisting>    topology { localhost; localnets; };
8221 </programlisting>
8222
8223           <note>
8224             <simpara>
8225               The <command>topology</command> option
8226               is not implemented in <acronym>BIND</acronym> 9.
8227             </simpara>
8228           </note>
8229         </sect3>
8230
8231         <sect3 id="the_sortlist_statement">
8232
8233           <title>The <command>sortlist</command> Statement</title>
8234
8235           <para>
8236             The response to a DNS query may consist of multiple resource
8237             records (RRs) forming a resource records set (RRset).
8238             The name server will normally return the
8239             RRs within the RRset in an indeterminate order
8240             (but see the <command>rrset-order</command>
8241             statement in <xref linkend="rrset_ordering"/>).
8242             The client resolver code should rearrange the RRs as appropriate,
8243             that is, using any addresses on the local net in preference to
8244             other addresses.
8245             However, not all resolvers can do this or are correctly
8246             configured.
8247             When a client is using a local server, the sorting can be performed
8248             in the server, based on the client's address. This only requires
8249             configuring the name servers, not all the clients.
8250           </para>
8251
8252           <para>
8253             The <command>sortlist</command> statement (see below)
8254             takes
8255             an <command>address_match_list</command> and
8256             interprets it even
8257             more specifically than the <command>topology</command>
8258             statement
8259             does (<xref linkend="topology"/>).
8260             Each top level statement in the <command>sortlist</command> must
8261             itself be an explicit <command>address_match_list</command> with
8262             one or two elements. The first element (which may be an IP
8263             address,
8264             an IP prefix, an ACL name or a nested <command>address_match_list</command>)
8265             of each top level list is checked against the source address of
8266             the query until a match is found.
8267           </para>
8268           <para>
8269             Once the source address of the query has been matched, if
8270             the top level statement contains only one element, the actual
8271             primitive
8272             element that matched the source address is used to select the
8273             address
8274             in the response to move to the beginning of the response. If the
8275             statement is a list of two elements, then the second element is
8276             treated the same as the <command>address_match_list</command> in
8277             a <command>topology</command> statement. Each top
8278             level element
8279             is assigned a distance and the address in the response with the
8280             minimum
8281             distance is moved to the beginning of the response.
8282           </para>
8283           <para>
8284             In the following example, any queries received from any of
8285             the addresses of the host itself will get responses preferring
8286             addresses
8287             on any of the locally connected networks. Next most preferred are
8288             addresses
8289             on the 192.168.1/24 network, and after that either the
8290             192.168.2/24
8291             or
8292             192.168.3/24 network with no preference shown between these two
8293             networks. Queries received from a host on the 192.168.1/24 network
8294             will prefer other addresses on that network to the 192.168.2/24
8295             and
8296             192.168.3/24 networks. Queries received from a host on the
8297             192.168.4/24
8298             or the 192.168.5/24 network will only prefer other addresses on
8299             their directly connected networks.
8300           </para>
8301
8302 <programlisting>sortlist {
8303     // IF the local host
8304     // THEN first fit on the following nets
8305     { localhost;
8306         { localnets;
8307             192.168.1/24;
8308             { 192.168.2/24; 192.168.3/24; }; }; };
8309     // IF on class C 192.168.1 THEN use .1, or .2 or .3
8310     { 192.168.1/24;
8311         { 192.168.1/24;
8312             { 192.168.2/24; 192.168.3/24; }; }; };
8313     // IF on class C 192.168.2 THEN use .2, or .1 or .3
8314     { 192.168.2/24;
8315         { 192.168.2/24;
8316             { 192.168.1/24; 192.168.3/24; }; }; };
8317     // IF on class C 192.168.3 THEN use .3, or .1 or .2
8318     { 192.168.3/24;
8319         { 192.168.3/24;
8320             { 192.168.1/24; 192.168.2/24; }; }; };
8321     // IF .4 or .5 THEN prefer that net
8322     { { 192.168.4/24; 192.168.5/24; };
8323     };
8324 };</programlisting>
8325
8326           <para>
8327             The following example will give reasonable behavior for the
8328             local host and hosts on directly connected networks. It is similar
8329             to the behavior of the address sort in <acronym>BIND</acronym> 4.9.x. Responses sent
8330             to queries from the local host will favor any of the directly
8331             connected
8332             networks. Responses sent to queries from any other hosts on a
8333             directly
8334             connected network will prefer addresses on that same network.
8335             Responses
8336             to other queries will not be sorted.
8337           </para>
8338
8339 <programlisting>sortlist {
8340            { localhost; localnets; };
8341            { localnets; };
8342 };
8343 </programlisting>
8344
8345         </sect3>
8346         <sect3 id="rrset_ordering">
8347           <title id="rrset_ordering_title">RRset Ordering</title>
8348           <para>
8349             When multiple records are returned in an answer it may be
8350             useful to configure the order of the records placed into the
8351             response.
8352             The <command>rrset-order</command> statement permits
8353             configuration
8354             of the ordering of the records in a multiple record response.
8355             See also the <command>sortlist</command> statement,
8356             <xref linkend="the_sortlist_statement"/>.
8357           </para>
8358
8359           <para>
8360             An <command>order_spec</command> is defined as
8361             follows:
8362           </para>
8363           <para>
8364             <optional>class <replaceable>class_name</replaceable></optional>
8365             <optional>type <replaceable>type_name</replaceable></optional>
8366             <optional>name <replaceable>"domain_name"</replaceable></optional>
8367             order <replaceable>ordering</replaceable>
8368           </para>
8369           <para>
8370             If no class is specified, the default is <command>ANY</command>.
8371             If no type is specified, the default is <command>ANY</command>.
8372             If no name is specified, the default is "<command>*</command>" (asterisk).
8373           </para>
8374           <para>
8375             The legal values for <command>ordering</command> are:
8376           </para>
8377           <informaltable colsep="0" rowsep="0">
8378             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
8379               <colspec colname="1" colnum="1" colsep="0" colwidth="0.750in"/>
8380               <colspec colname="2" colnum="2" colsep="0" colwidth="3.750in"/>
8381               <tbody>
8382                 <row rowsep="0">
8383                   <entry colname="1">
8384                     <para><command>fixed</command></para>
8385                   </entry>
8386                   <entry colname="2">
8387                     <para>
8388                       Records are returned in the order they
8389                       are defined in the zone file.
8390                     </para>
8391                   </entry>
8392                 </row>
8393                 <row rowsep="0">
8394                   <entry colname="1">
8395                     <para><command>random</command></para>
8396                   </entry>
8397                   <entry colname="2">
8398                     <para>
8399                       Records are returned in some random order.
8400                     </para>
8401                   </entry>
8402                 </row>
8403                 <row rowsep="0">
8404                   <entry colname="1">
8405                     <para><command>cyclic</command></para>
8406                   </entry>
8407                   <entry colname="2">
8408                     <para>
8409                       Records are returned in a cyclic round-robin order.
8410                     </para>
8411                     <para>
8412                       If <acronym>BIND</acronym> is configured with the
8413                       "--enable-fixed-rrset" option at compile time, then
8414                       the initial ordering of the RRset will match the
8415                       one specified in the zone file.
8416                     </para>
8417                   </entry>
8418                 </row>
8419               </tbody>
8420             </tgroup>
8421           </informaltable>
8422           <para>
8423             For example:
8424           </para>
8425
8426 <programlisting>rrset-order {
8427    class IN type A name "host.example.com" order random;
8428    order cyclic;
8429 };
8430 </programlisting>
8431
8432           <para>
8433             will cause any responses for type A records in class IN that
8434             have "<literal>host.example.com</literal>" as a
8435             suffix, to always be returned
8436             in random order. All other records are returned in cyclic order.
8437           </para>
8438           <para>
8439             If multiple <command>rrset-order</command> statements
8440             appear,
8441             they are not combined &mdash; the last one applies.
8442           </para>
8443
8444           <note>
8445             <simpara>
8446               In this release of <acronym>BIND</acronym> 9, the
8447               <command>rrset-order</command> statement does not support
8448               "fixed" ordering by default.  Fixed ordering can be enabled
8449               at compile time by specifying "--enable-fixed-rrset" on
8450               the "configure" command line.
8451             </simpara>
8452           </note>
8453         </sect3>
8454
8455         <sect3 id="tuning">
8456           <title>Tuning</title>
8457
8458           <variablelist>
8459
8460             <varlistentry>
8461               <term><command>lame-ttl</command></term>
8462               <listitem>
8463                 <para>
8464                   Sets the number of seconds to cache a
8465                   lame server indication. 0 disables caching. (This is
8466                   <emphasis role="bold">NOT</emphasis> recommended.)
8467                   The default is <literal>600</literal> (10 minutes) and the
8468                   maximum value is
8469                   <literal>1800</literal> (30 minutes).
8470                 </para>
8471
8472                 <para>
8473                   Lame-ttl also controls the amount of time DNSSEC
8474                   validation failures are cached.  There is a minimum
8475                   of 30 seconds applied to bad cache entries if the
8476                   lame-ttl is set to less than 30 seconds.
8477                 </para>
8478
8479               </listitem>
8480             </varlistentry>
8481
8482             <varlistentry>
8483               <term><command>max-ncache-ttl</command></term>
8484               <listitem>
8485                 <para>
8486                   To reduce network traffic and increase performance,
8487                   the server stores negative answers. <command>max-ncache-ttl</command> is
8488                   used to set a maximum retention time for these answers in
8489                   the server
8490                   in seconds. The default
8491                   <command>max-ncache-ttl</command> is <literal>10800</literal> seconds (3 hours).
8492                   <command>max-ncache-ttl</command> cannot exceed
8493                   7 days and will
8494                   be silently truncated to 7 days if set to a greater value.
8495                 </para>
8496               </listitem>
8497             </varlistentry>
8498
8499             <varlistentry>
8500               <term><command>max-cache-ttl</command></term>
8501               <listitem>
8502                 <para>
8503                   Sets the maximum time for which the server will
8504                   cache ordinary (positive) answers. The default is
8505                   one week (7 days).
8506                   A value of zero may cause all queries to return
8507                   SERVFAIL, because of lost caches of intermediate
8508                   RRsets (such as NS and glue AAAA/A records) in the
8509                   resolution process.
8510                 </para>
8511               </listitem>
8512             </varlistentry>
8513
8514             <varlistentry>
8515               <term><command>min-roots</command></term>
8516               <listitem>
8517                 <para>
8518                   The minimum number of root servers that
8519                   is required for a request for the root servers to be
8520                   accepted. The default
8521                   is <userinput>2</userinput>.
8522                 </para>
8523                 <note>
8524                   <simpara>
8525                     Not implemented in <acronym>BIND</acronym> 9.
8526                   </simpara>
8527                 </note>
8528               </listitem>
8529             </varlistentry>
8530
8531             <varlistentry>
8532               <term><command>sig-validity-interval</command></term>
8533               <listitem>
8534                 <para>
8535                   Specifies the number of days into the future when
8536                   DNSSEC signatures automatically generated as a
8537                   result of dynamic updates (<xref
8538                   linkend="dynamic_update"/>) will expire.  There
8539                   is an optional second field which specifies how
8540                   long before expiry that the signatures will be
8541                   regenerated.  If not specified, the signatures will
8542                   be regenerated at 1/4 of base interval.  The second
8543                   field is specified in days if the base interval is
8544                   greater than 7 days otherwise it is specified in hours.
8545                   The default base interval is <literal>30</literal> days
8546                   giving a re-signing interval of 7 1/2 days.  The maximum
8547                   values are 10 years (3660 days).
8548                 </para>
8549                 <para>
8550                   The signature inception time is unconditionally
8551                   set to one hour before the current time to allow
8552                   for a limited amount of clock skew.
8553                 </para>
8554                 <para>
8555                   The <command>sig-validity-interval</command>
8556                   should be, at least, several multiples of the SOA
8557                   expire interval to allow for reasonable interaction
8558                   between the various timer and expiry dates.
8559                 </para>
8560               </listitem>
8561             </varlistentry>
8562
8563             <varlistentry>
8564               <term><command>sig-signing-nodes</command></term>
8565               <listitem>
8566                 <para>
8567                   Specify the maximum number of nodes to be
8568                   examined in each quantum when signing a zone with
8569                   a new DNSKEY. The default is
8570                   <literal>100</literal>.
8571                 </para>
8572               </listitem>
8573             </varlistentry>
8574
8575             <varlistentry>
8576               <term><command>sig-signing-signatures</command></term>
8577               <listitem>
8578                 <para>
8579                   Specify a threshold number of signatures that
8580                   will terminate processing a quantum when signing
8581                   a zone with a new DNSKEY.  The default is
8582                   <literal>10</literal>.
8583                 </para>
8584               </listitem>
8585             </varlistentry>
8586
8587             <varlistentry>
8588               <term><command>sig-signing-type</command></term>
8589               <listitem>
8590                 <para>
8591                   Specify a private RDATA type to be used when generating
8592                   key signing records.  The default is
8593                   <literal>65535</literal>.
8594                 </para>
8595                 <para>
8596                   It is expected that this parameter may be removed
8597                   in a future version once there is a standard type.
8598                 </para>
8599               </listitem>
8600             </varlistentry>
8601
8602             <varlistentry>
8603               <term><command>min-refresh-time</command></term>
8604               <term><command>max-refresh-time</command></term>
8605               <term><command>min-retry-time</command></term>
8606               <term><command>max-retry-time</command></term>
8607               <listitem>
8608                 <para>
8609                   These options control the server's behavior on refreshing a
8610                   zone
8611                   (querying for SOA changes) or retrying failed transfers.
8612                   Usually the SOA values for the zone are used, but these
8613                   values
8614                   are set by the master, giving slave server administrators
8615                   little
8616                   control over their contents.
8617                 </para>
8618                 <para>
8619                   These options allow the administrator to set a minimum and
8620                   maximum
8621                   refresh and retry time either per-zone, per-view, or
8622                   globally.
8623                   These options are valid for slave and stub zones,
8624                   and clamp the SOA refresh and retry times to the specified
8625                   values.
8626                 </para>
8627                 <para>
8628                   The following defaults apply.
8629                   <command>min-refresh-time</command> 300 seconds,
8630                   <command>max-refresh-time</command> 2419200 seconds
8631                   (4 weeks), <command>min-retry-time</command> 500 seconds,
8632                   and <command>max-retry-time</command> 1209600 seconds
8633                   (2 weeks).
8634                 </para>
8635               </listitem>
8636             </varlistentry>
8637
8638             <varlistentry>
8639               <term><command>edns-udp-size</command></term>
8640               <listitem>
8641                 <para>
8642                   Sets the advertised EDNS UDP buffer size in bytes
8643                   to control the size of packets received.
8644                   Valid values are 512 to 4096 (values outside this range
8645                   will be silently adjusted).  The default value
8646                   is 4096.  The usual reason for setting
8647                   <command>edns-udp-size</command> to a non-default
8648                   value is to get UDP answers to pass through broken
8649                   firewalls that block fragmented packets and/or
8650                   block UDP packets that are greater than 512 bytes.
8651                 </para>
8652                 <para>
8653                   <command>named</command> will fallback to using 512 bytes
8654                   if it get a series of timeout at the initial value.  512
8655                   bytes is not being offered to encourage sites to fix their
8656                   firewalls.  Small EDNS UDP sizes will result in the
8657                   excessive use of TCP.
8658                 </para>
8659               </listitem>
8660             </varlistentry>
8661
8662             <varlistentry>
8663               <term><command>max-udp-size</command></term>
8664               <listitem>
8665                 <para>
8666                   Sets the maximum EDNS UDP message size
8667                   <command>named</command> will send in bytes.
8668                   Valid values are 512 to 4096 (values outside this
8669                   range will be silently adjusted).  The default
8670                   value is 4096.  The usual reason for setting
8671                   <command>max-udp-size</command> to a non-default
8672                   value is to get UDP answers to pass through broken
8673                   firewalls that block fragmented packets and/or
8674                   block UDP packets that are greater than 512 bytes.
8675                   This is independent of the advertised receive
8676                   buffer (<command>edns-udp-size</command>).
8677                 </para>
8678                 <para>
8679                   Setting this to a low value will encourage additional
8680                   TCP traffic to the nameserver.
8681                 </para>
8682               </listitem>
8683             </varlistentry>
8684
8685             <varlistentry>
8686               <term><command>masterfile-format</command></term>
8687               <listitem>
8688                 <para>Specifies
8689                   the file format of zone files (see
8690                   <xref linkend="zonefile_format"/>).
8691                   The default value is <constant>text</constant>, which is the
8692                   standard textual representation.  Files in other formats
8693                   than <constant>text</constant> are typically expected
8694                   to be generated by the <command>named-compilezone</command> tool.
8695                   Note that when a zone file in a different format than
8696                   <constant>text</constant> is loaded, <command>named</command>
8697                   may omit some of the checks which would be performed for a
8698                   file in the <constant>text</constant> format.  In particular,
8699                   <command>check-names</command> checks do not apply
8700                   for the <constant>raw</constant> format.  This means
8701                   a zone file in the <constant>raw</constant> format
8702                   must be generated with the same check level as that
8703                   specified in the <command>named</command> configuration
8704                   file.  This statement sets the
8705                   <command>masterfile-format</command> for all zones,
8706                   but can be overridden on a per-zone or per-view basis
8707                   by including a <command>masterfile-format</command>
8708                   statement within the <command>zone</command> or
8709                   <command>view</command> block in the configuration
8710                   file.
8711                 </para>
8712               </listitem>
8713             </varlistentry>
8714
8715             <varlistentry id="clients-per-query">
8716               <term><command>clients-per-query</command></term>
8717               <term><command>max-clients-per-query</command></term>
8718               <listitem>
8719                 <para>These set the
8720                   initial value (minimum) and maximum number of recursive
8721                   simultaneous clients for any given query
8722                   (&lt;qname,qtype,qclass&gt;) that the server will accept
8723                   before dropping additional clients.  <command>named</command> will attempt to
8724                   self tune this value and changes will be logged.  The
8725                   default values are 10 and 100.
8726                 </para>
8727                 <para>
8728                   This value should reflect how many queries come in for
8729                   a given name in the time it takes to resolve that name.
8730                   If the number of queries exceed this value, <command>named</command> will
8731                   assume that it is dealing with a non-responsive zone
8732                   and will drop additional queries.  If it gets a response
8733                   after dropping queries, it will raise the estimate.  The
8734                   estimate will then be lowered in 20 minutes if it has
8735                   remained unchanged.
8736                 </para>
8737                 <para>
8738                   If <command>clients-per-query</command> is set to zero,
8739                   then there is no limit on the number of clients per query
8740                   and no queries will be dropped.
8741                 </para>
8742                 <para>
8743                   If <command>max-clients-per-query</command> is set to zero,
8744                   then there is no upper bound other than imposed by
8745                   <command>recursive-clients</command>.
8746                 </para>
8747               </listitem>
8748             </varlistentry>
8749
8750             <varlistentry>
8751               <term><command>notify-delay</command></term>
8752               <listitem>
8753                 <para>
8754                   The delay, in seconds, between sending sets of notify
8755                   messages for a zone.  The default is five (5) seconds.
8756                 </para>
8757                 <para>
8758                   The overall rate that NOTIFY messages are sent for all
8759                   zones is controlled by <command>serial-query-rate</command>.
8760                 </para>
8761               </listitem>
8762             </varlistentry>
8763           </variablelist>
8764
8765         </sect3>
8766
8767         <sect3 id="builtin">
8768           <title>Built-in server information zones</title>
8769
8770           <para>
8771             The server provides some helpful diagnostic information
8772             through a number of built-in zones under the
8773             pseudo-top-level-domain <literal>bind</literal> in the
8774             <command>CHAOS</command> class.  These zones are part
8775             of a
8776             built-in view (see <xref linkend="view_statement_grammar"/>) of
8777             class
8778             <command>CHAOS</command> which is separate from the
8779             default view of
8780             class <command>IN</command>; therefore, any global
8781             server options
8782             such as <command>allow-query</command> do not apply
8783             the these zones.
8784             If you feel the need to disable these zones, use the options
8785             below, or hide the built-in <command>CHAOS</command>
8786             view by
8787             defining an explicit view of class <command>CHAOS</command>
8788             that matches all clients.
8789           </para>
8790
8791           <variablelist>
8792
8793             <varlistentry>
8794               <term><command>version</command></term>
8795               <listitem>
8796                 <para>
8797                   The version the server should report
8798                   via a query of the name <literal>version.bind</literal>
8799                   with type <command>TXT</command>, class <command>CHAOS</command>.
8800                   The default is the real version number of this server.
8801                   Specifying <command>version none</command>
8802                   disables processing of the queries.
8803                 </para>
8804               </listitem>
8805             </varlistentry>
8806
8807             <varlistentry>
8808               <term><command>hostname</command></term>
8809               <listitem>
8810                 <para>
8811                   The hostname the server should report via a query of
8812                   the name <filename>hostname.bind</filename>
8813                   with type <command>TXT</command>, class <command>CHAOS</command>.
8814                   This defaults to the hostname of the machine hosting the
8815                   name server as
8816                   found by the gethostname() function.  The primary purpose of such queries
8817                   is to
8818                   identify which of a group of anycast servers is actually
8819                   answering your queries.  Specifying <command>hostname none;</command>
8820                   disables processing of the queries.
8821                 </para>
8822               </listitem>
8823             </varlistentry>
8824
8825             <varlistentry>
8826               <term><command>server-id</command></term>
8827               <listitem>
8828                 <para>
8829                   The ID the server should report when receiving a Name
8830                   Server Identifier (NSID) query, or a query of the name
8831                   <filename>ID.SERVER</filename> with type
8832                   <command>TXT</command>, class <command>CHAOS</command>.
8833                   The primary purpose of such queries is to
8834                   identify which of a group of anycast servers is actually
8835                   answering your queries.  Specifying <command>server-id none;</command>
8836                   disables processing of the queries.
8837                   Specifying <command>server-id hostname;</command> will cause <command>named</command> to
8838                   use the hostname as found by the gethostname() function.
8839                   The default <command>server-id</command> is <command>none</command>.
8840                 </para>
8841               </listitem>
8842             </varlistentry>
8843
8844           </variablelist>
8845
8846         </sect3>
8847
8848         <sect3 id="empty">
8849           <title>Built-in Empty Zones</title>
8850           <para>
8851             Named has some built-in empty zones (SOA and NS records only).
8852             These are for zones that should normally be answered locally
8853             and which queries should not be sent to the Internet's root
8854             servers.  The official servers which cover these namespaces
8855             return NXDOMAIN responses to these queries.  In particular,
8856             these cover the reverse namespace for addresses from RFC 1918 and
8857             RFC 3330.  They also include the reverse namespace for IPv6 local
8858             address (locally assigned), IPv6 link local addresses, the IPv6
8859             loopback address and the IPv6 unknown address.
8860           </para>
8861           <para>
8862             Named will attempt to determine if a built-in zone already exists
8863             or is active (covered by a forward-only forwarding declaration)
8864             and will not create an empty zone in that case.
8865           </para>
8866           <para>
8867             The current list of empty zones is:
8868             <itemizedlist>
8869               <listitem>10.IN-ADDR.ARPA</listitem>
8870               <listitem>16.172.IN-ADDR.ARPA</listitem>
8871               <listitem>17.172.IN-ADDR.ARPA</listitem>
8872               <listitem>18.172.IN-ADDR.ARPA</listitem>
8873               <listitem>19.172.IN-ADDR.ARPA</listitem>
8874               <listitem>20.172.IN-ADDR.ARPA</listitem>
8875               <listitem>21.172.IN-ADDR.ARPA</listitem>
8876               <listitem>22.172.IN-ADDR.ARPA</listitem>
8877               <listitem>23.172.IN-ADDR.ARPA</listitem>
8878               <listitem>24.172.IN-ADDR.ARPA</listitem>
8879               <listitem>25.172.IN-ADDR.ARPA</listitem>
8880               <listitem>26.172.IN-ADDR.ARPA</listitem>
8881               <listitem>27.172.IN-ADDR.ARPA</listitem>
8882               <listitem>28.172.IN-ADDR.ARPA</listitem>
8883               <listitem>29.172.IN-ADDR.ARPA</listitem>
8884               <listitem>30.172.IN-ADDR.ARPA</listitem>
8885               <listitem>31.172.IN-ADDR.ARPA</listitem>
8886               <listitem>168.192.IN-ADDR.ARPA</listitem>
8887               <listitem>0.IN-ADDR.ARPA</listitem>
8888               <listitem>127.IN-ADDR.ARPA</listitem>
8889               <listitem>254.169.IN-ADDR.ARPA</listitem>
8890               <listitem>2.0.192.IN-ADDR.ARPA</listitem>
8891               <listitem>100.51.198.IN-ADDR.ARPA</listitem>
8892               <listitem>113.0.203.IN-ADDR.ARPA</listitem>
8893               <listitem>255.255.255.255.IN-ADDR.ARPA</listitem>
8894               <listitem>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</listitem>
8895               <listitem>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</listitem>
8896               <listitem>8.B.D.0.1.0.0.2.IP6.ARPA</listitem>
8897               <listitem>D.F.IP6.ARPA</listitem>
8898               <listitem>8.E.F.IP6.ARPA</listitem>
8899               <listitem>9.E.F.IP6.ARPA</listitem>
8900               <listitem>A.E.F.IP6.ARPA</listitem>
8901               <listitem>B.E.F.IP6.ARPA</listitem>
8902             </itemizedlist>
8903           </para>
8904           <para>
8905             Empty zones are settable at the view level and only apply to
8906             views of class IN.  Disabled empty zones are only inherited
8907             from options if there are no disabled empty zones specified
8908             at the view level.  To override the options list of disabled
8909             zones, you can disable the root zone at the view level, for example:
8910 <programlisting>
8911             disable-empty-zone ".";
8912 </programlisting>
8913           </para>
8914           <para>
8915             If you are using the address ranges covered here, you should
8916             already have reverse zones covering the addresses you use.
8917             In practice this appears to not be the case with many queries
8918             being made to the infrastructure servers for names in these
8919             spaces.  So many in fact that sacrificial servers were needed
8920             to be deployed to channel the query load away from the
8921             infrastructure servers.
8922           </para>
8923           <note>
8924             The real parent servers for these zones should disable all
8925             empty zone under the parent zone they serve.  For the real
8926             root servers, this is all built-in empty zones.  This will
8927             enable them to return referrals to deeper in the tree.
8928           </note>
8929           <variablelist>
8930             <varlistentry>
8931               <term><command>empty-server</command></term>
8932               <listitem>
8933                 <para>
8934                   Specify what server name will appear in the returned
8935                   SOA record for empty zones.  If none is specified, then
8936                   the zone's name will be used.
8937                 </para>
8938                </listitem>
8939             </varlistentry>
8940               
8941             <varlistentry>
8942               <term><command>empty-contact</command></term>
8943               <listitem>
8944                 <para>
8945                   Specify what contact name will appear in the returned
8946                   SOA record for empty zones.  If none is specified, then
8947                   "." will be used.
8948                 </para>
8949               </listitem>
8950             </varlistentry>
8951   
8952             <varlistentry>
8953               <term><command>empty-zones-enable</command></term>
8954               <listitem>
8955                 <para>
8956                   Enable or disable all empty zones.  By default, they
8957                   are enabled.
8958                 </para>
8959               </listitem>
8960             </varlistentry>
8961   
8962             <varlistentry>
8963             <term><command>disable-empty-zone</command></term>
8964               <listitem>
8965                 <para>
8966                   Disable individual empty zones.  By default, none are
8967                   disabled.  This option can be specified multiple times.
8968                 </para>
8969               </listitem>
8970             </varlistentry>
8971           </variablelist>
8972         </sect3>
8973
8974         <sect3 id="acache">
8975           <title>Additional Section Caching</title>
8976
8977           <para>
8978             The additional section cache, also called <command>acache</command>,
8979             is an internal cache to improve the response performance of BIND 9.
8980             When additional section caching is enabled, BIND 9 will
8981             cache an internal short-cut to the additional section content for
8982             each answer RR.
8983             Note that <command>acache</command> is an internal caching
8984             mechanism of BIND 9, and is not related to the DNS caching
8985             server function.
8986           </para>
8987
8988           <para>
8989             Additional section caching does not change the
8990             response content (except the RRsets ordering of the additional
8991             section, see below), but can improve the response performance
8992             significantly.
8993             It is particularly effective when BIND 9 acts as an authoritative
8994             server for a zone that has many delegations with many glue RRs.
8995           </para>
8996
8997           <para>
8998             In order to obtain the maximum performance improvement
8999             from additional section caching, setting
9000             <command>additional-from-cache</command>
9001             to <command>no</command> is recommended, since the current
9002             implementation of <command>acache</command>
9003             does not short-cut of additional section information from the
9004             DNS cache data.
9005           </para>
9006
9007           <para>
9008             One obvious disadvantage of <command>acache</command> is
9009             that it requires much more
9010             memory for the internal cached data.
9011             Thus, if the response performance does not matter and memory
9012             consumption is much more critical, the
9013             <command>acache</command> mechanism can be
9014             disabled by setting <command>acache-enable</command> to
9015             <command>no</command>.
9016             It is also possible to specify the upper limit of memory
9017             consumption
9018             for acache by using <command>max-acache-size</command>.
9019           </para>
9020
9021           <para>
9022             Additional section caching also has a minor effect on the
9023             RRset ordering in the additional section.
9024             Without <command>acache</command>,
9025             <command>cyclic</command> order is effective for the additional
9026             section as well as the answer and authority sections.
9027             However, additional section caching fixes the ordering when it
9028             first caches an RRset for the additional section, and the same
9029             ordering will be kept in succeeding responses, regardless of the
9030             setting of <command>rrset-order</command>.
9031             The effect of this should be minor, however, since an
9032             RRset in the additional section
9033             typically only contains a small number of RRs (and in many cases
9034             it only contains a single RR), in which case the
9035             ordering does not matter much.
9036           </para>
9037
9038           <para>
9039             The following is a summary of options related to
9040             <command>acache</command>.
9041           </para>
9042
9043           <variablelist>
9044
9045             <varlistentry>
9046               <term><command>acache-enable</command></term>
9047               <listitem>
9048                 <para>
9049                   If <command>yes</command>, additional section caching is
9050                   enabled.  The default value is <command>no</command>.
9051                 </para>
9052               </listitem>
9053             </varlistentry>
9054
9055             <varlistentry>
9056               <term><command>acache-cleaning-interval</command></term>
9057               <listitem>
9058                 <para>
9059                   The server will remove stale cache entries, based on an LRU
9060                   based
9061                   algorithm, every <command>acache-cleaning-interval</command> minutes.
9062                   The default is 60 minutes.
9063                   If set to 0, no periodic cleaning will occur.
9064                 </para>
9065               </listitem>
9066             </varlistentry>
9067
9068             <varlistentry>
9069               <term><command>max-acache-size</command></term>
9070               <listitem>
9071                 <para>
9072                   The maximum amount of memory in bytes to use for the server's acache.
9073                   When the amount of data in the acache reaches this limit,
9074                   the server
9075                   will clean more aggressively so that the limit is not
9076                   exceeded.
9077                   In a server with multiple views, the limit applies
9078                   separately to the
9079                   acache of each view.
9080                   The default is <literal>16M</literal>.
9081                 </para>
9082               </listitem>
9083             </varlistentry>
9084
9085           </variablelist>
9086
9087         </sect3>
9088
9089         <sect3>
9090           <title>Content Filtering</title>
9091           <para>
9092             <acronym>BIND</acronym> 9 provides the ability to filter
9093             out DNS responses from external DNS servers containing
9094             certain types of data in the answer section.
9095             Specifically, it can reject address (A or AAAA) records if
9096             the corresponding IPv4 or IPv6 addresses match the given
9097             <varname>address_match_list</varname> of the
9098             <command>deny-answer-addresses</command> option.
9099             It can also reject CNAME or DNAME records if the "alias"
9100             name (i.e., the CNAME alias or the substituted query name
9101             due to DNAME) matches the
9102             given <varname>namelist</varname> of the
9103             <command>deny-answer-aliases</command> option, where
9104             "match" means the alias name is a subdomain of one of
9105             the <varname>name_list</varname> elements.
9106             If the optional <varname>namelist</varname> is specified
9107             with <command>except-from</command>, records whose query name
9108             matches the list will be accepted regardless of the filter
9109             setting.
9110             Likewise, if the alias name is a subdomain of the
9111             corresponding zone, the <command>deny-answer-aliases</command>
9112             filter will not apply;
9113             for example, even if "example.com" is specified for
9114             <command>deny-answer-aliases</command>,
9115           </para>
9116 <programlisting>www.example.com. CNAME xxx.example.com.</programlisting>
9117
9118           <para>
9119             returned by an "example.com" server will be accepted.
9120           </para>
9121
9122           <para>
9123             In the <varname>address_match_list</varname> of the
9124             <command>deny-answer-addresses</command> option, only
9125             <varname>ip_addr</varname>
9126             and <varname>ip_prefix</varname>
9127             are meaningful;
9128             any <varname>key_id</varname> will be silently ignored.
9129           </para>
9130
9131           <para>
9132             If a response message is rejected due to the filtering,
9133             the entire message is discarded without being cached, and
9134             a SERVFAIL error will be returned to the client.
9135           </para>
9136
9137           <para>
9138             This filtering is intended to prevent "DNS rebinding attacks," in
9139             which an attacker, in response to a query for a domain name the
9140             attacker controls, returns an IP address within your own network or
9141             an alias name within your own domain.
9142             A naive web browser or script could then serve as an
9143             unintended proxy, allowing the attacker
9144             to get access to an internal node of your local network
9145             that couldn't be externally accessed otherwise.
9146             See the paper available at
9147             <ulink>
9148             http://portal.acm.org/citation.cfm?id=1315245.1315298
9149             </ulink>
9150             for more details about the attacks.
9151           </para>
9152
9153           <para>
9154             For example, if you own a domain named "example.net" and
9155             your internal network uses an IPv4 prefix 192.0.2.0/24,
9156             you might specify the following rules:
9157           </para>
9158
9159 <programlisting>deny-answer-addresses { 192.0.2.0/24; } except-from { "example.net"; };
9160 deny-answer-aliases { "example.net"; };
9161 </programlisting>
9162
9163           <para>
9164             If an external attacker lets a web browser in your local
9165             network look up an IPv4 address of "attacker.example.com",
9166             the attacker's DNS server would return a response like this:
9167           </para>
9168
9169 <programlisting>attacker.example.com. A 192.0.2.1</programlisting>
9170
9171           <para>
9172             in the answer section.
9173             Since the rdata of this record (the IPv4 address) matches
9174             the specified prefix 192.0.2.0/24, this response will be
9175             ignored.
9176           </para>
9177
9178           <para>
9179             On the other hand, if the browser looks up a legitimate
9180             internal web server "www.example.net" and the
9181             following response is returned to
9182             the <acronym>BIND</acronym> 9 server
9183           </para>
9184
9185 <programlisting>www.example.net. A 192.0.2.2</programlisting>
9186
9187           <para>
9188             it will be accepted since the owner name "www.example.net"
9189             matches the <command>except-from</command> element,
9190             "example.net".
9191           </para>
9192
9193           <para>
9194             Note that this is not really an attack on the DNS per se.
9195             In fact, there is nothing wrong for an "external" name to
9196             be mapped to your "internal" IP address or domain name
9197             from the DNS point of view.
9198             It might actually be provided for a legitimate purpose,
9199             such as for debugging.
9200             As long as the mapping is provided by the correct owner,
9201             it is not possible or does not make sense to detect
9202             whether the intent of the mapping is legitimate or not
9203             within the DNS.
9204             The "rebinding" attack must primarily be protected at the
9205             application that uses the DNS.
9206             For a large site, however, it may be difficult to protect
9207             all possible applications at once.
9208             This filtering feature is provided only to help such an
9209             operational environment;
9210             it is generally discouraged to turn it on unless you are
9211             very sure you have no other choice and the attack is a
9212             real threat for your applications.
9213           </para>
9214
9215           <para>
9216             Care should be particularly taken if you want to use this
9217             option for addresses within 127.0.0.0/8.
9218             These addresses are obviously "internal", but many
9219             applications conventionally rely on a DNS mapping from
9220             some name to such an address.
9221             Filtering out DNS records containing this address
9222             spuriously can break such applications.
9223           </para>
9224         </sect3>
9225
9226         <sect3>
9227           <title>Response Policy Zone (RPZ) Rewriting</title>
9228           <para>
9229             <acronym>BIND</acronym> 9 includes an intentionally limited
9230             mechanism to modify DNS responses for recursive requests
9231             similar to email anti-spam DNS blacklists.
9232             All response policy zones are named in the
9233             <command>response-policy</command> option for the view or among the
9234             global options if there is no response-policy option for the view.
9235           </para>
9236
9237           <para>
9238             The rules encoded in a response policy zone (RPZ) are applied
9239             only to responses to queries that ask for recursion (RD=1).
9240             RPZs are normal DNS zones containing RRsets
9241             that can be queried normally if allowed.
9242             It is usually best to restrict those queries with something like
9243             <command>allow-query {none; };</command> or
9244             <command>allow-query { 127.0.0.1; };</command>.
9245           </para>
9246
9247           <para>
9248             There are four kinds of RPZ rewrite rules.  QNAME rules are
9249             applied to query names in requests and to targets of CNAME
9250             records resolved in the process of generating the response.
9251             The owner name of a QNAME rule is the query name relativized
9252             to the RPZ.
9253             The records in a rewrite rule are usually A, AAAA, or special
9254             CNAMEs, but can be any type except DNAME.
9255           </para>
9256
9257           <para>
9258             IP rules are triggered by addresses in A and AAAA records.
9259             All IP addresses in A or AAAA RRsets are tested and the rule
9260             longest prefix is applied.  Ties between rules with equal prefixes
9261             are broken in favor of the first RPZ mentioned in the
9262             response-policy option.
9263             The rule matching the smallest IP address is chosen among equal
9264             prefix rules from a single RPZ.
9265             IP rules are expressed in RRsets with owner names that are
9266             subdomains of rpz-ip and encoding an IP address block, reversed
9267             as in IN-ARPA.
9268             prefix.B.B.B.B with prefix between 1 and 32 and B between 1 and 255
9269             encodes an IPv4 address.
9270             IPv6 addresses are encoded by with prefix.W.W.W.W.W.W.W.W or
9271             prefix.WORDS.zz.WORDS.  The words in the standard IPv6 text
9272             representation are reversed, "::" is replaced with ".zz.",
9273             and ":" becomes ".".
9274           </para>
9275
9276           <para>
9277             NSDNAME rules match names in NS RRsets for the response or a
9278             parent.  They are encoded as subdomains of rpz-nsdomain relativized
9279             to the RPZ origin name.
9280           </para>
9281
9282           <para>
9283             NSIP rules match IP addresses in A and AAAA RRsets for names of
9284             responsible servers or the names that can be matched by NSDNAME
9285             rules.  The are encoded like IP rules except as subdomains of
9286             rpz-nsip.
9287           </para>
9288
9289           <para>
9290             Authority verification issues and variations in authority data in
9291             the current version of <acronym>BIND</acronym> 9 can cause
9292             inconsistent results from NSIP and NSDNAME.  So they are available
9293             only when <acronym>BIND</acronym> is built with the
9294             <userinput>--enable-rpz-nsip</userinput> or
9295             <userinput>--enable-rpz-nsdname</userinput> options
9296             on the "configure" command line.
9297           </para>
9298
9299           <para>
9300             Four policies can be expressed.
9301             The <command>NXDOMAIN</command> policy causes a NXDOMAIN response
9302             and is expressed with an RRset consisting of a single CNAME
9303             whose target is the root domain (.).
9304             <command>NODATA</command> generates NODATA or ANCOUNT=1 regardless
9305             of query type.
9306             It is expressed with a CNAME whose target is the wildcard
9307             top-level domain (*.).
9308             The <command>NO-OP</command> policy does not change the response
9309             and is used to "poke holes" in policies for larger CIDR blocks or in
9310             zones named later in the <command>response-policy</command> option.
9311             The NO-OP policy is expressed by a CNAME with a target consisting
9312             of the variable part of the owner name, such as "example.com." for
9313             a QNAME rule or "128.1.0.0.127." for an IP rule.
9314             The <command>CNAME</command> policy is used to replace the RRsets
9315             of response.
9316             A and AAAA RRsets are most common and useful to capture
9317             an evil domain in a walled garden, but any valid set of RRsets
9318             is possible.
9319           </para>
9320
9321           <para>
9322             All of the policies in an RPZ can be overridden with a
9323             <command>policy</command> clause.
9324             <command>given</command> says "do not override."
9325             <command>no-op</command> says "do nothing" regardless of the policy
9326             in RPZ records.
9327             <command>nxdomain</command> causes all RPZ rules to generate
9328             NXDOMAIN results.
9329             <command>nodata</command> gives nodata.
9330             <command>cname domain</command> causes all RPZ rules to act as if
9331             the consisted of a "cname domain" record.
9332           </para>
9333
9334           <para>
9335             For example, you might use this option statement
9336           </para>
9337 <programlisting>response-policy { zone "bl"; };</programlisting>
9338           <para>
9339             and this zone statement
9340           </para>
9341 <programlisting>zone "bl" {type master; file "example/bl"; allow-query {none;}; };</programlisting>
9342           <para>
9343             with this zone file
9344           </para>
9345 <programlisting>$TTL 1H
9346 @                   SOA LOCALHOST. named-mgr.example.com (1 1h 15m 30d 2h)
9347
9348 ; QNAME rules
9349 nxdomain.domain.com         CNAME   .
9350 nodata.domain.com           CNAME   *.
9351 bad.domain.com              A       10.0.0.1
9352                             AAAA    2001:2::1
9353 ok.domain.com               CNAME   ok.domain.com.
9354 *.badzone.domain.com        CNAME   garden.example.com.
9355
9356 ; IP rules rewriting all answers for 127/8 except 127.0.0.1
9357 8.0.0.0.127.ip              CNAME   .
9358 32.1.0.0.127.ip             CNAME   32.1.0.0.127.
9359
9360 ; NSDNAME and NSIP rules
9361 ns.domain.com.rpz-nsdname   CNAME   .
9362 48.zz.2.2001.rpz-nsip       CNAME   .
9363 </programlisting>
9364         </sect3>
9365       </sect2>
9366
9367       <sect2 id="server_statement_grammar">
9368         <title><command>server</command> Statement Grammar</title>
9369
9370 <programlisting><command>server</command> <replaceable>ip_addr[/prefixlen]</replaceable> {
9371     <optional> bogus <replaceable>yes_or_no</replaceable> ; </optional>
9372     <optional> provide-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
9373     <optional> request-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
9374     <optional> edns <replaceable>yes_or_no</replaceable> ; </optional>
9375     <optional> edns-udp-size <replaceable>number</replaceable> ; </optional>
9376     <optional> max-udp-size <replaceable>number</replaceable> ; </optional>
9377     <optional> transfers <replaceable>number</replaceable> ; </optional>
9378     <optional> transfer-format <replaceable>( one-answer | many-answers )</replaceable> ; ]</optional>
9379     <optional> keys <replaceable>{ string ; <optional> string ; <optional>...</optional></optional> }</replaceable> ; </optional>
9380     <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9381     <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9382     <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9383     <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9384     <optional> query-source <optional> address ( <replaceable>ip_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
9385                   <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional>; </optional>
9386     <optional> query-source-v6 <optional> address ( <replaceable>ip_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
9387                      <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional>; </optional>
9388     <optional> use-queryport-pool <replaceable>yes_or_no</replaceable>; </optional>
9389     <optional> queryport-pool-ports <replaceable>number</replaceable>; </optional>
9390     <optional> queryport-pool-updateinterval <replaceable>number</replaceable>; </optional>
9391 };
9392 </programlisting>
9393
9394         </sect2>
9395
9396         <sect2 id="server_statement_definition_and_usage">
9397           <title><command>server</command> Statement Definition and
9398             Usage</title>
9399
9400           <para>
9401             The <command>server</command> statement defines
9402             characteristics
9403             to be associated with a remote name server.  If a prefix length is
9404             specified, then a range of servers is covered.  Only the most
9405             specific
9406             server clause applies regardless of the order in
9407             <filename>named.conf</filename>.
9408           </para>
9409
9410           <para>
9411             The <command>server</command> statement can occur at
9412             the top level of the
9413             configuration file or inside a <command>view</command>
9414             statement.
9415             If a <command>view</command> statement contains
9416             one or more <command>server</command> statements, only
9417             those
9418             apply to the view and any top-level ones are ignored.
9419             If a view contains no <command>server</command>
9420             statements,
9421             any top-level <command>server</command> statements are
9422             used as
9423             defaults.
9424           </para>
9425
9426           <para>
9427             If you discover that a remote server is giving out bad data,
9428             marking it as bogus will prevent further queries to it. The
9429             default
9430             value of <command>bogus</command> is <command>no</command>.
9431           </para>
9432           <para>
9433             The <command>provide-ixfr</command> clause determines
9434             whether
9435             the local server, acting as master, will respond with an
9436             incremental
9437             zone transfer when the given remote server, a slave, requests it.
9438             If set to <command>yes</command>, incremental transfer
9439             will be provided
9440             whenever possible. If set to <command>no</command>,
9441             all transfers
9442             to the remote server will be non-incremental. If not set, the
9443             value
9444             of the <command>provide-ixfr</command> option in the
9445             view or
9446             global options block is used as a default.
9447           </para>
9448
9449           <para>
9450             The <command>request-ixfr</command> clause determines
9451             whether
9452             the local server, acting as a slave, will request incremental zone
9453             transfers from the given remote server, a master. If not set, the
9454             value of the <command>request-ixfr</command> option in
9455             the view or
9456             global options block is used as a default.
9457           </para>
9458
9459           <para>
9460             IXFR requests to servers that do not support IXFR will
9461             automatically
9462             fall back to AXFR.  Therefore, there is no need to manually list
9463             which servers support IXFR and which ones do not; the global
9464             default
9465             of <command>yes</command> should always work.
9466             The purpose of the <command>provide-ixfr</command> and
9467             <command>request-ixfr</command> clauses is
9468             to make it possible to disable the use of IXFR even when both
9469             master
9470             and slave claim to support it, for example if one of the servers
9471             is buggy and crashes or corrupts data when IXFR is used.
9472           </para>
9473
9474           <para>
9475             The <command>edns</command> clause determines whether
9476             the local server will attempt to use EDNS when communicating
9477             with the remote server.  The default is <command>yes</command>.
9478           </para>
9479
9480           <para>
9481             The <command>edns-udp-size</command> option sets the EDNS UDP size
9482             that is advertised by <command>named</command> when querying the remote server.
9483             Valid values are 512 to 4096 bytes (values outside this range will be
9484             silently adjusted).  This option is useful when you wish to
9485             advertises a different value to this server than the value you
9486             advertise globally, for example, when there is a firewall at the
9487             remote site that is blocking large replies.
9488           </para>
9489
9490           <para>
9491             The <command>max-udp-size</command> option sets the
9492             maximum EDNS UDP message size <command>named</command> will send.  Valid
9493             values are 512 to 4096 bytes (values outside this range will
9494             be silently adjusted).  This option is useful when you
9495             know that there is a firewall that is blocking large
9496             replies from <command>named</command>.
9497           </para>
9498
9499           <para>
9500             The server supports two zone transfer methods. The first, <command>one-answer</command>,
9501             uses one DNS message per resource record transferred. <command>many-answers</command> packs
9502             as many resource records as possible into a message. <command>many-answers</command> is
9503             more efficient, but is only known to be understood by <acronym>BIND</acronym> 9, <acronym>BIND</acronym>
9504             8.x, and patched versions of <acronym>BIND</acronym>
9505             4.9.5. You can specify which method
9506             to use for a server with the <command>transfer-format</command> option.
9507             If <command>transfer-format</command> is not
9508             specified, the <command>transfer-format</command>
9509             specified
9510             by the <command>options</command> statement will be
9511             used.
9512           </para>
9513
9514           <para><command>transfers</command>
9515             is used to limit the number of concurrent inbound zone
9516             transfers from the specified server. If no
9517             <command>transfers</command> clause is specified, the
9518             limit is set according to the
9519             <command>transfers-per-ns</command> option.
9520           </para>
9521
9522           <para>
9523             The <command>keys</command> clause identifies a
9524             <command>key_id</command> defined by the <command>key</command> statement,
9525             to be used for transaction security (TSIG, <xref linkend="tsig"/>)
9526             when talking to the remote server.
9527             When a request is sent to the remote server, a request signature
9528             will be generated using the key specified here and appended to the
9529             message. A request originating from the remote server is not
9530             required
9531             to be signed by this key.
9532           </para>
9533
9534           <para>
9535             Although the grammar of the <command>keys</command>
9536             clause
9537             allows for multiple keys, only a single key per server is
9538             currently
9539             supported.
9540           </para>
9541
9542           <para>
9543             The <command>transfer-source</command> and
9544             <command>transfer-source-v6</command> clauses specify
9545             the IPv4 and IPv6 source
9546             address to be used for zone transfer with the remote server,
9547             respectively.
9548             For an IPv4 remote server, only <command>transfer-source</command> can
9549             be specified.
9550             Similarly, for an IPv6 remote server, only
9551             <command>transfer-source-v6</command> can be
9552             specified.
9553             For more details, see the description of
9554             <command>transfer-source</command> and
9555             <command>transfer-source-v6</command> in
9556             <xref linkend="zone_transfers"/>.
9557           </para>
9558
9559           <para>
9560             The <command>notify-source</command> and
9561             <command>notify-source-v6</command> clauses specify the
9562             IPv4 and IPv6 source address to be used for notify
9563             messages sent to remote servers, respectively.  For an
9564             IPv4 remote server, only <command>notify-source</command>
9565             can be specified.  Similarly, for an IPv6 remote server,
9566             only <command>notify-source-v6</command> can be specified.
9567           </para>
9568
9569           <para>
9570             The <command>query-source</command> and
9571             <command>query-source-v6</command> clauses specify the
9572             IPv4 and IPv6 source address to be used for queries
9573             sent to remote servers, respectively.  For an IPv4
9574             remote server, only <command>query-source</command> can
9575             be specified.  Similarly, for an IPv6 remote server,
9576             only <command>query-source-v6</command> can be specified.
9577           </para>
9578
9579         </sect2>
9580
9581       <sect2 id="statschannels">
9582         <title><command>statistics-channels</command> Statement Grammar</title>
9583
9584 <programlisting><command>statistics-channels</command> {
9585    [ inet ( ip_addr | * ) [ port ip_port ]
9586    [ allow { <replaceable> address_match_list </replaceable> } ]; ]
9587    [ inet ...; ]
9588 };
9589 </programlisting>
9590       </sect2>
9591
9592       <sect2>
9593           <title><command>statistics-channels</command> Statement Definition and
9594             Usage</title>
9595
9596         <para>
9597           The <command>statistics-channels</command> statement
9598           declares communication channels to be used by system
9599           administrators to get access to statistics information of
9600           the name server.
9601         </para>
9602
9603         <para>
9604           This statement intends to be flexible to support multiple
9605           communication protocols in the future, but currently only
9606           HTTP access is supported.
9607           It requires that BIND 9 be compiled with libxml2;
9608           the <command>statistics-channels</command> statement is
9609           still accepted even if it is built without the library,
9610           but any HTTP access will fail with an error.
9611         </para>
9612
9613         <para>
9614           An <command>inet</command> control channel is a TCP socket
9615           listening at the specified <command>ip_port</command> on the
9616           specified <command>ip_addr</command>, which can be an IPv4 or IPv6
9617           address.  An <command>ip_addr</command> of <literal>*</literal> (asterisk) is
9618           interpreted as the IPv4 wildcard address; connections will be
9619           accepted on any of the system's IPv4 addresses.
9620           To listen on the IPv6 wildcard address,
9621           use an <command>ip_addr</command> of <literal>::</literal>.
9622         </para>
9623
9624         <para>
9625           If no port is specified, port 80 is used for HTTP channels.
9626           The asterisk "<literal>*</literal>" cannot be used for
9627           <command>ip_port</command>.
9628         </para>
9629
9630         <para>
9631           The attempt of opening a statistics channel is
9632           restricted by the optional <command>allow</command> clause.
9633           Connections to the statistics channel are permitted based on the
9634           <command>address_match_list</command>.
9635           If no <command>allow</command> clause is present,
9636           <command>named</command> accepts connection
9637           attempts from any address; since the statistics may
9638           contain sensitive internal information, it is highly
9639           recommended to restrict the source of connection requests
9640           appropriately.
9641         </para>
9642
9643         <para>
9644           If no <command>statistics-channels</command> statement is present,
9645           <command>named</command> will not open any communication channels.
9646         </para>
9647
9648       </sect2>
9649
9650         <sect2 id="trusted-keys">
9651           <title><command>trusted-keys</command> Statement Grammar</title>
9652
9653 <programlisting><command>trusted-keys</command> {
9654     <replaceable>string</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ;
9655     <optional> <replaceable>string</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; <optional>...</optional></optional>
9656 };
9657 </programlisting>
9658
9659         </sect2>
9660         <sect2>
9661           <title><command>trusted-keys</command> Statement Definition
9662             and Usage</title>
9663           <para>
9664             The <command>trusted-keys</command> statement defines
9665             DNSSEC security roots. DNSSEC is described in <xref
9666             linkend="DNSSEC"/>. A security root is defined when the
9667             public key for a non-authoritative zone is known, but
9668             cannot be securely obtained through DNS, either because
9669             it is the DNS root zone or because its parent zone is
9670             unsigned.  Once a key has been configured as a trusted
9671             key, it is treated as if it had been validated and
9672             proven secure. The resolver attempts DNSSEC validation
9673             on all DNS data in subdomains of a security root.
9674           </para>
9675           <para>
9676             All keys (and corresponding zones) listed in
9677             <command>trusted-keys</command> are deemed to exist regardless
9678             of what parent zones say.  Similarly for all keys listed in
9679             <command>trusted-keys</command> only those keys are
9680             used to validate the DNSKEY RRset.  The parent's DS RRset
9681             will not be used.
9682           </para>
9683           <para>
9684             The <command>trusted-keys</command> statement can contain
9685             multiple key entries, each consisting of the key's
9686             domain name, flags, protocol, algorithm, and the Base-64
9687             representation of the key data.
9688             Spaces, tabs, newlines and carriage returns are ignored
9689             in the key data, so the configuration may be split up into
9690             multiple lines.
9691           </para>
9692           <para>
9693             <command>trusted-keys</command> may be set at the top level
9694             of <filename>named.conf</filename> or within a view.  If it is
9695             set in both places, they are additive: keys defined at the top
9696             level are inherited by all views, but keys defined in a view
9697             are only used within that view.
9698           </para>
9699         </sect2>
9700
9701         <sect2>
9702           <title><command>managed-keys</command> Statement Grammar</title>
9703
9704 <programlisting><command>managed-keys</command> {
9705     <replaceable>string</replaceable> initial-key <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ;
9706     <optional> <replaceable>string</replaceable> initial-key <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; <optional>...</optional></optional>
9707 };
9708 </programlisting>
9709
9710         </sect2>
9711         <sect2 id="managed-keys">
9712           <title><command>managed-keys</command> Statement Definition
9713             and Usage</title>
9714           <para>
9715             The <command>managed-keys</command> statement, like 
9716             <command>trusted-keys</command>, defines DNSSEC
9717             security roots.  The difference is that
9718             <command>managed-keys</command> can be kept up to date
9719             automatically, without intervention from the resolver
9720             operator.
9721           </para>
9722           <para>
9723             Suppose, for example, that a zone's key-signing
9724             key was compromised, and the zone owner had to revoke and
9725             replace the key.  A resolver which had the old key in a
9726             <command>trusted-keys</command> statement would be
9727             unable to validate this zone any longer; it would
9728             reply with a SERVFAIL response code.  This would
9729             continue until the resolver operator had updated the
9730             <command>trusted-keys</command> statement with the new key.
9731           </para>
9732           <para>
9733             If, however, the zone were listed in a
9734             <command>managed-keys</command> statement instead, then the
9735             zone owner could add a "stand-by" key to the zone in advance.
9736             <command>named</command> would store the stand-by key, and
9737             when the original key was revoked, <command>named</command>
9738             would be able to transition smoothly to the new key.  It would
9739             also recognize that the old key had been revoked, and cease
9740             using that key to validate answers, minimizing the damage that
9741             the compromised key could do.
9742           </para>
9743           <para>
9744             A <command>managed-keys</command> statement contains a list of
9745             the keys to be managed, along with information about how the
9746             keys are to be initialized for the first time.  The only
9747             initialization method currently supported (as of
9748             <acronym>BIND</acronym> 9.7.0) is <literal>initial-key</literal>.
9749             This means the <command>managed-keys</command> statement must
9750             contain a copy of the initializing key.  (Future releases may
9751             allow keys to be initialized by other methods, eliminating this
9752             requirement.)
9753           </para>
9754           <para>
9755             Consequently, a <command>managed-keys</command> statement
9756             appears similar to a <command>trusted-keys</command>, differing
9757             in the presence of the second field, containing the keyword
9758             <literal>initial-key</literal>.  The difference is, whereas the
9759             keys listed in a <command>trusted-keys</command> continue to be
9760             trusted until they are removed from
9761             <filename>named.conf</filename>, an initializing key listed 
9762             in a <command>managed-keys</command> statement is only trusted
9763             <emphasis>once</emphasis>: for as long as it takes to load the
9764             managed key database and start the RFC 5011 key maintenance
9765             process.
9766           </para>
9767           <para>
9768             The first time <command>named</command> runs with a managed key
9769             configured in <filename>named.conf</filename>, it fetches the
9770             DNSKEY RRset directly from the zone apex, and validates it
9771             using the key specified in the <command>managed-keys</command>
9772             statement.  If the DNSKEY RRset is validly signed, then it is
9773             used as the basis for a new managed keys database.
9774           </para>
9775           <para>
9776             From that point on, whenever <command>named</command> runs, it
9777             sees the <command>managed-keys</command> statement, checks to
9778             make sure RFC 5011 key maintenance has already been initialized
9779             for the specified domain, and if so, it simply moves on.  The
9780             key specified in the <command>managed-keys</command> is not
9781             used to validate answers; it has been superseded by the key or
9782             keys stored in the managed keys database.
9783           </para>
9784           <para>
9785             The next time <command>named</command> runs after a name
9786             has been <emphasis>removed</emphasis> from the
9787             <command>managed-keys</command> statement, the corresponding
9788             zone will be removed from the managed keys database,
9789             and RFC 5011 key maintenance will no longer be used for that
9790             domain.
9791           </para>
9792           <para>
9793             <command>named</command> only maintains a single managed keys
9794             database; consequently, unlike <command>trusted-keys</command>,
9795             <command>managed-keys</command> may only be set at the top
9796             level of <filename>named.conf</filename>, not within a view.
9797           </para>
9798           <para>
9799             In the current implementation, the managed keys database is
9800             stored as a master-format zone file called
9801             <filename>managed-keys.bind</filename>.  When the key database
9802             is changed, the zone is updated.  As with any other dynamic
9803             zone, changes will be written into a journal file,
9804             <filename>managed-keys.bind.jnl</filename>.  They are committed
9805             to the master file as soon as possible afterward; in the case
9806             of the managed key database, this will usually occur within 30
9807             seconds.  So, whenever <command>named</command> is using
9808             automatic key maintenance, those two files can be expected to
9809             exist in the working directory.  (For this reason among others,
9810             the working directory should be always be writable by
9811             <command>named</command>.)
9812           </para>
9813           <para>
9814             If the <command>dnssec-lookaside</command> option is
9815             set to <userinput>auto</userinput>, <command>named</command>
9816             will automatically initialize a managed key for the
9817             zone <literal>dlv.isc.org</literal>.  The key that is
9818             used to initialize the key maintenance process is built
9819             into <command>named</command>, and can be overridden
9820             from <command>bindkeys-file</command>.
9821           </para>
9822         </sect2>
9823
9824         <sect2 id="view_statement_grammar">
9825           <title><command>view</command> Statement Grammar</title>
9826
9827 <programlisting><command>view</command> <replaceable>view_name</replaceable>
9828       <optional><replaceable>class</replaceable></optional> {
9829       match-clients { <replaceable>address_match_list</replaceable> };
9830       match-destinations { <replaceable>address_match_list</replaceable> };
9831       match-recursive-only <replaceable>yes_or_no</replaceable> ;
9832       <optional> <replaceable>view_option</replaceable>; ...</optional>
9833       <optional> <replaceable>zone_statement</replaceable>; ...</optional>
9834 };
9835 </programlisting>
9836
9837         </sect2>
9838         <sect2>
9839           <title><command>view</command> Statement Definition and Usage</title>
9840
9841           <para>
9842             The <command>view</command> statement is a powerful
9843             feature
9844             of <acronym>BIND</acronym> 9 that lets a name server
9845             answer a DNS query differently
9846             depending on who is asking. It is particularly useful for
9847             implementing
9848             split DNS setups without having to run multiple servers.
9849           </para>
9850
9851           <para>
9852             Each <command>view</command> statement defines a view
9853             of the
9854             DNS namespace that will be seen by a subset of clients.  A client
9855             matches
9856             a view if its source IP address matches the
9857             <varname>address_match_list</varname> of the view's
9858             <command>match-clients</command> clause and its
9859             destination IP address matches
9860             the <varname>address_match_list</varname> of the
9861             view's
9862             <command>match-destinations</command> clause.  If not
9863             specified, both
9864             <command>match-clients</command> and <command>match-destinations</command>
9865             default to matching all addresses.  In addition to checking IP
9866             addresses
9867             <command>match-clients</command> and <command>match-destinations</command>
9868             can also take <command>keys</command> which provide an
9869             mechanism for the
9870             client to select the view.  A view can also be specified
9871             as <command>match-recursive-only</command>, which
9872             means that only recursive
9873             requests from matching clients will match that view.
9874             The order of the <command>view</command> statements is
9875             significant &mdash;
9876             a client request will be resolved in the context of the first
9877             <command>view</command> that it matches.
9878           </para>
9879
9880           <para>
9881             Zones defined within a <command>view</command>
9882             statement will
9883             only be accessible to clients that match the <command>view</command>.
9884             By defining a zone of the same name in multiple views, different
9885             zone data can be given to different clients, for example,
9886             "internal"
9887             and "external" clients in a split DNS setup.
9888           </para>
9889
9890           <para>
9891             Many of the options given in the <command>options</command> statement
9892             can also be used within a <command>view</command>
9893             statement, and then
9894             apply only when resolving queries with that view.  When no
9895             view-specific
9896             value is given, the value in the <command>options</command> statement
9897             is used as a default.  Also, zone options can have default values
9898             specified
9899             in the <command>view</command> statement; these
9900             view-specific defaults
9901             take precedence over those in the <command>options</command> statement.
9902           </para>
9903
9904           <para>
9905             Views are class specific.  If no class is given, class IN
9906             is assumed.  Note that all non-IN views must contain a hint zone,
9907             since only the IN class has compiled-in default hints.
9908           </para>
9909
9910           <para>
9911             If there are no <command>view</command> statements in
9912             the config
9913             file, a default view that matches any client is automatically
9914             created
9915             in class IN. Any <command>zone</command> statements
9916             specified on
9917             the top level of the configuration file are considered to be part
9918             of
9919             this default view, and the <command>options</command>
9920             statement will
9921             apply to the default view. If any explicit <command>view</command>
9922             statements are present, all <command>zone</command>
9923             statements must
9924             occur inside <command>view</command> statements.
9925           </para>
9926
9927           <para>
9928             Here is an example of a typical split DNS setup implemented
9929             using <command>view</command> statements:
9930           </para>
9931
9932 <programlisting>view "internal" {
9933       // This should match our internal networks.
9934       match-clients { 10.0.0.0/8; };
9935
9936       // Provide recursive service to internal
9937       // clients only.
9938       recursion yes;
9939
9940       // Provide a complete view of the example.com
9941       // zone including addresses of internal hosts.
9942       zone "example.com" {
9943             type master;
9944             file "example-internal.db";
9945       };
9946 };
9947
9948 view "external" {
9949       // Match all clients not matched by the
9950       // previous view.
9951       match-clients { any; };
9952
9953       // Refuse recursive service to external clients.
9954       recursion no;
9955
9956       // Provide a restricted view of the example.com
9957       // zone containing only publicly accessible hosts.
9958       zone "example.com" {
9959            type master;
9960            file "example-external.db";
9961       };
9962 };
9963 </programlisting>
9964
9965         </sect2>
9966         <sect2 id="zone_statement_grammar">
9967           <title><command>zone</command>
9968             Statement Grammar</title>
9969
9970 <programlisting><command>zone</command> <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
9971     type master;
9972     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
9973     <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
9974     <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
9975     <optional> allow-update { <replaceable>address_match_list</replaceable> }; </optional>
9976     <optional> update-policy <replaceable>local</replaceable> | { <replaceable>update_policy_rule</replaceable> <optional>...</optional> }; </optional>
9977     <optional> also-notify { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
9978                   <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
9979     <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
9980     <optional> check-mx (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
9981     <optional> check-wildcard <replaceable>yes_or_no</replaceable>; </optional>
9982     <optional> check-integrity <replaceable>yes_or_no</replaceable> ; </optional>
9983     <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
9984     <optional> file <replaceable>string</replaceable> ; </optional>
9985     <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
9986     <optional> journal <replaceable>string</replaceable> ; </optional>
9987     <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
9988     <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
9989     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
9990     <optional> ixfr-base <replaceable>string</replaceable> ; </optional>
9991     <optional> ixfr-from-differences <replaceable>yes_or_no</replaceable>; </optional>
9992     <optional> ixfr-tmp-file <replaceable>string</replaceable> ; </optional>
9993     <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable> ; </optional>
9994     <optional> max-ixfr-log-size <replaceable>number</replaceable> ; </optional>
9995     <optional> max-transfer-idle-out <replaceable>number</replaceable> ; </optional>
9996     <optional> max-transfer-time-out <replaceable>number</replaceable> ; </optional>
9997     <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable> ; </optional>
9998     <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
9999     <optional> notify-to-soa <replaceable>yes_or_no</replaceable>; </optional>
10000     <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
10001     <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10002     <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10003     <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
10004     <optional> sig-validity-interval <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
10005     <optional> sig-signing-nodes <replaceable>number</replaceable> ; </optional>
10006     <optional> sig-signing-signatures <replaceable>number</replaceable> ; </optional>
10007     <optional> sig-signing-type <replaceable>number</replaceable> ; </optional>
10008     <optional> database <replaceable>string</replaceable> ; </optional>
10009     <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
10010     <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
10011     <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
10012     <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
10013     <optional> key-directory <replaceable>path_name</replaceable>; </optional>
10014     <optional> auto-dnssec <constant>allow</constant>|<constant>maintain</constant>|<constant>off</constant>; </optional>
10015     <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
10016 };
10017
10018 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10019     type slave;
10020     <optional> allow-notify { <replaceable>address_match_list</replaceable> }; </optional>
10021     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
10022     <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
10023     <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
10024     <optional> allow-update-forwarding { <replaceable>address_match_list</replaceable> }; </optional>
10025     <optional> update-check-ksk <replaceable>yes_or_no</replaceable>; </optional>
10026     <optional> dnssec-update-mode ( <replaceable>maintain</replaceable> | <replaceable>no-resign</replaceable> ); </optional>
10027     <optional> dnssec-dnskey-kskonly <replaceable>yes_or_no</replaceable>; </optional>
10028     <optional> dnssec-secure-to-insecure <replaceable>yes_or_no</replaceable> ; </optional>
10029     <optional> try-tcp-refresh <replaceable>yes_or_no</replaceable>; </optional>
10030     <optional> also-notify { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
10031                   <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
10032     <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
10033     <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
10034     <optional> file <replaceable>string</replaceable> ; </optional>
10035     <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
10036     <optional> journal <replaceable>string</replaceable> ; </optional>
10037     <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
10038     <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
10039     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
10040     <optional> ixfr-base <replaceable>string</replaceable> ; </optional>
10041     <optional> ixfr-from-differences <replaceable>yes_or_no</replaceable>; </optional>
10042     <optional> ixfr-tmp-file <replaceable>string</replaceable> ; </optional>
10043     <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable> ; </optional>
10044     <optional> masters <optional>port <replaceable>ip_port</replaceable></optional> { ( <replaceable>masters_list</replaceable> | <replaceable>ip_addr</replaceable>
10045                               <optional>port <replaceable>ip_port</replaceable></optional>
10046                               <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> }; </optional>
10047     <optional> max-ixfr-log-size <replaceable>number</replaceable> ; </optional>
10048     <optional> max-transfer-idle-in <replaceable>number</replaceable> ; </optional>
10049     <optional> max-transfer-idle-out <replaceable>number</replaceable> ; </optional>
10050     <optional> max-transfer-time-in <replaceable>number</replaceable> ; </optional>
10051     <optional> max-transfer-time-out <replaceable>number</replaceable> ; </optional>
10052     <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable> ; </optional>
10053     <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
10054     <optional> notify-to-soa <replaceable>yes_or_no</replaceable>; </optional>
10055     <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
10056     <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10057     <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10058     <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10059     <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
10060                              <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10061     <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
10062     <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10063     <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10064     <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
10065     <optional> database <replaceable>string</replaceable> ; </optional>
10066     <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
10067     <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
10068     <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
10069     <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
10070     <optional> multi-master <replaceable>yes_or_no</replaceable> ; </optional>
10071     <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
10072 };
10073
10074 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10075     type hint;
10076     file <replaceable>string</replaceable> ;
10077     <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
10078     <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional> // Not Implemented.
10079 };
10080
10081 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10082     type stub;
10083     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
10084     <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
10085     <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
10086     <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
10087     <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
10088     <optional> file <replaceable>string</replaceable> ; </optional>
10089     <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
10090     <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
10091     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
10092     <optional> masters <optional>port <replaceable>ip_port</replaceable></optional> { ( <replaceable>masters_list</replaceable> | <replaceable>ip_addr</replaceable>
10093                               <optional>port <replaceable>ip_port</replaceable></optional>
10094                               <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> }; </optional>
10095     <optional> max-transfer-idle-in <replaceable>number</replaceable> ; </optional>
10096     <optional> max-transfer-time-in <replaceable>number</replaceable> ; </optional>
10097     <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
10098     <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10099     <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
10100                          <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10101     <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10102     <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
10103                             <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10104     <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
10105     <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
10106     <optional> database <replaceable>string</replaceable> ; </optional>
10107     <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
10108     <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
10109     <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
10110     <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
10111     <optional> multi-master <replaceable>yes_or_no</replaceable> ; </optional>
10112 };
10113
10114 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10115     type static-stub;
10116     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
10117     <optional> server-addresses { <optional> <replaceable>ip_addr</replaceable> ; ... </optional> }; </optional>
10118     <optional> server-names { <optional> <replaceable>namelist</replaceable> </optional> }; </optional>  
10119     <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
10120 };
10121
10122 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10123     type forward;
10124     <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
10125     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
10126     <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
10127 };
10128
10129 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10130     type delegation-only;
10131 };
10132
10133 </programlisting>
10134
10135         </sect2>
10136         <sect2>
10137           <title><command>zone</command> Statement Definition and Usage</title>
10138           <sect3>
10139             <title>Zone Types</title>
10140             <informaltable colsep="0" rowsep="0">
10141               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
10142                 <!--colspec colname="1" colnum="1" colsep="0" colwidth="1.108in"/-->
10143                 <!--colspec colname="2" colnum="2" colsep="0" colwidth="4.017in"/-->
10144                 <colspec colname="1" colnum="1" colsep="0"/>
10145                 <colspec colname="2" colnum="2" colsep="0" colwidth="4.017in"/>
10146                 <tbody>
10147                   <row rowsep="0">
10148                     <entry colname="1">
10149                       <para>
10150                         <varname>master</varname>
10151                       </para>
10152                     </entry>
10153                     <entry colname="2">
10154                       <para>
10155                         The server has a master copy of the data
10156                         for the zone and will be able to provide authoritative
10157                         answers for
10158                         it.
10159                       </para>
10160                     </entry>
10161                   </row>
10162                   <row rowsep="0">
10163                     <entry colname="1">
10164                       <para>
10165                         <varname>slave</varname>
10166                       </para>
10167                     </entry>
10168                     <entry colname="2">
10169                       <para>
10170                         A slave zone is a replica of a master
10171                         zone. The <command>masters</command> list
10172                         specifies one or more IP addresses
10173                         of master servers that the slave contacts to update
10174                         its copy of the zone.
10175                         Masters list elements can also be names of other
10176                         masters lists.
10177                         By default, transfers are made from port 53 on the
10178                         servers; this can
10179                         be changed for all servers by specifying a port number
10180                         before the
10181                         list of IP addresses, or on a per-server basis after
10182                         the IP address.
10183                         Authentication to the master can also be done with
10184                         per-server TSIG keys.
10185                         If a file is specified, then the
10186                         replica will be written to this file whenever the zone
10187                         is changed,
10188                         and reloaded from this file on a server restart. Use
10189                         of a file is
10190                         recommended, since it often speeds server startup and
10191                         eliminates
10192                         a needless waste of bandwidth. Note that for large
10193                         numbers (in the
10194                         tens or hundreds of thousands) of zones per server, it
10195                         is best to
10196                         use a two-level naming scheme for zone filenames. For
10197                         example,
10198                         a slave server for the zone <literal>example.com</literal> might place
10199                         the zone contents into a file called
10200                         <filename>ex/example.com</filename> where <filename>ex/</filename> is
10201                         just the first two letters of the zone name. (Most
10202                         operating systems
10203                         behave very slowly if you put 100000 files into
10204                         a single directory.)
10205                       </para>
10206                     </entry>
10207                   </row>
10208                   <row rowsep="0">
10209                     <entry colname="1">
10210                       <para>
10211                         <varname>stub</varname>
10212                       </para>
10213                     </entry>
10214                     <entry colname="2">
10215                       <para>
10216                         A stub zone is similar to a slave zone,
10217                         except that it replicates only the NS records of a
10218                         master zone instead
10219                         of the entire zone. Stub zones are not a standard part
10220                         of the DNS;
10221                         they are a feature specific to the <acronym>BIND</acronym> implementation.
10222                       </para>
10223
10224                       <para>
10225                         Stub zones can be used to eliminate the need for glue
10226                         NS record
10227                         in a parent zone at the expense of maintaining a stub
10228                         zone entry and
10229                         a set of name server addresses in <filename>named.conf</filename>.
10230                         This usage is not recommended for new configurations,
10231                         and BIND 9
10232                         supports it only in a limited way.
10233                         In <acronym>BIND</acronym> 4/8, zone
10234                         transfers of a parent zone
10235                         included the NS records from stub children of that
10236                         zone. This meant
10237                         that, in some cases, users could get away with
10238                         configuring child stubs
10239                         only in the master server for the parent zone. <acronym>BIND</acronym>
10240                         9 never mixes together zone data from different zones
10241                         in this
10242                         way. Therefore, if a <acronym>BIND</acronym> 9 master serving a parent
10243                         zone has child stub zones configured, all the slave
10244                         servers for the
10245                         parent zone also need to have the same child stub
10246                         zones
10247                         configured.
10248                       </para>
10249
10250                       <para>
10251                         Stub zones can also be used as a way of forcing the
10252                         resolution
10253                         of a given domain to use a particular set of
10254                         authoritative servers.
10255                         For example, the caching name servers on a private
10256                         network using
10257                         RFC1918 addressing may be configured with stub zones
10258                         for
10259                         <literal>10.in-addr.arpa</literal>
10260                         to use a set of internal name servers as the
10261                         authoritative
10262                         servers for that domain.
10263                       </para>
10264                     </entry>
10265                   </row>
10266                   <row rowsep="0">
10267                     <entry colname="1">
10268                       <para>
10269                         <varname>static-stub</varname>
10270                       </para>
10271                     </entry>
10272                     <entry colname="2">
10273                       <para>
10274                         A static-stub zone is similar to a stub zone
10275                         with the following exceptions:
10276                         the zone data is statically configured, rather
10277                         than transferred from a master server;
10278                         when recursion is necessary for a query that
10279                         matches a static-stub zone, the locally
10280                         configured data (nameserver names and glue addresses)
10281                         is always used even if different authoritative
10282                         information is cached.
10283                       </para>
10284                       <para>
10285                         Zone data is configured via the
10286                         <command>server-addresses</command> and
10287                         <command>server-names</command> zone options.
10288                       </para>
10289                       <para>
10290                         The zone data is maintained in the form of NS
10291                         and (if necessary) glue A or AAAA RRs
10292                         internally, which can be seen by dumping zone
10293                         databases by <command>rndc dumpdb -all</command>.
10294                         The configured RRs are considered local configuration
10295                         parameters rather than public data.
10296                         Non recursive queries (i.e., those with the RD
10297                         bit off) to a static-stub zone are therefore
10298                         prohibited and will be responded with REFUSED.
10299                       </para>
10300                       <para>
10301                         Since the data is statically configured, no
10302                         zone maintenance action takes place for a static-stub
10303                         zone.
10304                         For example, there is no periodic refresh
10305                         attempt, and an incoming notify message
10306                         will be rejected with an rcode of NOTAUTH.
10307                       </para>
10308                       <para>
10309                         Each static-stub zone is configured with
10310                         internally generated NS and (if necessary)
10311                         glue A or AAAA RRs 
10312                       </para>
10313                     </entry>
10314                   </row>
10315                   <row rowsep="0">
10316                     <entry colname="1">
10317                       <para>
10318                         <varname>forward</varname>
10319                       </para>
10320                     </entry>
10321                     <entry colname="2">
10322                       <para>
10323                         A "forward zone" is a way to configure
10324                         forwarding on a per-domain basis.  A <command>zone</command> statement
10325                         of type <command>forward</command> can
10326                         contain a <command>forward</command>
10327                         and/or <command>forwarders</command>
10328                         statement,
10329                         which will apply to queries within the domain given by
10330                         the zone
10331                         name. If no <command>forwarders</command>
10332                         statement is present or
10333                         an empty list for <command>forwarders</command> is given, then no
10334                         forwarding will be done for the domain, canceling the
10335                         effects of
10336                         any forwarders in the <command>options</command> statement. Thus
10337                         if you want to use this type of zone to change the
10338                         behavior of the
10339                         global <command>forward</command> option
10340                         (that is, "forward first"
10341                         to, then "forward only", or vice versa, but want to
10342                         use the same
10343                         servers as set globally) you need to re-specify the
10344                         global forwarders.
10345                       </para>
10346                     </entry>
10347                   </row>
10348                   <row rowsep="0">
10349                     <entry colname="1">
10350                       <para>
10351                         <varname>hint</varname>
10352                       </para>
10353                     </entry>
10354                     <entry colname="2">
10355                       <para>
10356                         The initial set of root name servers is
10357                         specified using a "hint zone". When the server starts
10358                         up, it uses
10359                         the root hints to find a root name server and get the
10360                         most recent
10361                         list of root name servers. If no hint zone is
10362                         specified for class
10363                         IN, the server uses a compiled-in default set of root
10364                         servers hints.
10365                         Classes other than IN have no built-in defaults hints.
10366                       </para>
10367                     </entry>
10368                   </row>
10369                   <row rowsep="0">
10370                     <entry colname="1">
10371                       <para>
10372                         <varname>delegation-only</varname>
10373                       </para>
10374                     </entry>
10375                     <entry colname="2">
10376                       <para>
10377                         This is used to enforce the delegation-only
10378                         status of infrastructure zones (e.g. COM,
10379                         NET, ORG).  Any answer that is received
10380                         without an explicit or implicit delegation
10381                         in the authority section will be treated
10382                         as NXDOMAIN.  This does not apply to the
10383                         zone apex.  This should not be applied to
10384                         leaf zones.
10385                       </para>
10386                       <para>
10387                         <varname>delegation-only</varname> has no
10388                         effect on answers received from forwarders.
10389                       </para>
10390                       <para>
10391                         See caveats in <xref linkend="root_delegation_only"/>.
10392                       </para>
10393                     </entry>
10394                   </row>
10395                 </tbody>
10396               </tgroup>
10397             </informaltable>
10398           </sect3>
10399
10400           <sect3>
10401             <title>Class</title>
10402             <para>
10403               The zone's name may optionally be followed by a class. If
10404               a class is not specified, class <literal>IN</literal> (for <varname>Internet</varname>),
10405               is assumed. This is correct for the vast majority of cases.
10406             </para>
10407             <para>
10408               The <literal>hesiod</literal> class is
10409               named for an information service from MIT's Project Athena. It
10410               is
10411               used to share information about various systems databases, such
10412               as users, groups, printers and so on. The keyword
10413               <literal>HS</literal> is
10414               a synonym for hesiod.
10415             </para>
10416             <para>
10417               Another MIT development is Chaosnet, a LAN protocol created
10418               in the mid-1970s. Zone data for it can be specified with the <literal>CHAOS</literal> class.
10419             </para>
10420           </sect3>
10421           <sect3>
10422
10423             <title>Zone Options</title>
10424
10425             <variablelist>
10426
10427               <varlistentry>
10428                 <term><command>allow-notify</command></term>
10429                 <listitem>
10430                   <para>
10431                     See the description of
10432                     <command>allow-notify</command> in <xref linkend="access_control"/>.
10433                   </para>
10434                 </listitem>
10435               </varlistentry>
10436
10437               <varlistentry>
10438                 <term><command>allow-query</command></term>
10439                 <listitem>
10440                   <para>
10441                     See the description of
10442                     <command>allow-query</command> in <xref linkend="access_control"/>.
10443                   </para>
10444                 </listitem>
10445               </varlistentry>
10446
10447               <varlistentry>
10448                 <term><command>allow-query-on</command></term>
10449                 <listitem>
10450                   <para>
10451                     See the description of
10452                     <command>allow-query-on</command> in <xref linkend="access_control"/>.
10453                   </para>
10454                 </listitem>
10455               </varlistentry>
10456
10457               <varlistentry>
10458                 <term><command>allow-transfer</command></term>
10459                 <listitem>
10460                   <para>
10461                     See the description of <command>allow-transfer</command>
10462                     in <xref linkend="access_control"/>.
10463                   </para>
10464                 </listitem>
10465               </varlistentry>
10466
10467               <varlistentry>
10468                 <term><command>allow-update</command></term>
10469                 <listitem>
10470                   <para>
10471                     See the description of <command>allow-update</command>
10472                     in <xref linkend="access_control"/>.
10473                   </para>
10474                 </listitem>
10475               </varlistentry>
10476
10477               <varlistentry>
10478                 <term><command>update-policy</command></term>
10479                 <listitem>
10480                   <para>
10481                     Specifies a "Simple Secure Update" policy. See
10482                     <xref linkend="dynamic_update_policies"/>.
10483                   </para>
10484                 </listitem>
10485               </varlistentry>
10486
10487               <varlistentry>
10488                 <term><command>allow-update-forwarding</command></term>
10489                 <listitem>
10490                   <para>
10491                     See the description of <command>allow-update-forwarding</command>
10492                     in <xref linkend="access_control"/>.
10493                   </para>
10494                 </listitem>
10495               </varlistentry>
10496
10497               <varlistentry>
10498                 <term><command>also-notify</command></term>
10499                 <listitem>
10500                   <para>
10501                     Only meaningful if <command>notify</command>
10502                     is
10503                     active for this zone. The set of machines that will
10504                     receive a
10505                     <literal>DNS NOTIFY</literal> message
10506                     for this zone is made up of all the listed name servers
10507                     (other than
10508                     the primary master) for the zone plus any IP addresses
10509                     specified
10510                     with <command>also-notify</command>. A port
10511                     may be specified
10512                     with each <command>also-notify</command>
10513                     address to send the notify
10514                     messages to a port other than the default of 53.
10515                     <command>also-notify</command> is not
10516                     meaningful for stub zones.
10517                     The default is the empty list.
10518                   </para>
10519                 </listitem>
10520               </varlistentry>
10521
10522               <varlistentry>
10523                 <term><command>check-names</command></term>
10524                 <listitem>
10525                   <para>
10526                     This option is used to restrict the character set and
10527                     syntax of
10528                     certain domain names in master files and/or DNS responses
10529                     received from the
10530                     network.  The default varies according to zone type.  For <command>master</command> zones the default is <command>fail</command>.  For <command>slave</command>
10531                     zones the default is <command>warn</command>.
10532                     It is not implemented for <command>hint</command> zones.
10533                   </para>
10534                 </listitem>
10535               </varlistentry>
10536
10537               <varlistentry>
10538                 <term><command>check-mx</command></term>
10539                 <listitem>
10540                   <para>
10541                     See the description of
10542                     <command>check-mx</command> in <xref linkend="boolean_options"/>.
10543                   </para>
10544                 </listitem>
10545               </varlistentry>
10546
10547               <varlistentry>
10548                 <term><command>check-wildcard</command></term>
10549                 <listitem>
10550                   <para>
10551                     See the description of
10552                     <command>check-wildcard</command> in <xref linkend="boolean_options"/>.
10553                   </para>
10554                 </listitem>
10555               </varlistentry>
10556
10557               <varlistentry>
10558                 <term><command>check-integrity</command></term>
10559                 <listitem>
10560                   <para>
10561                     See the description of
10562                     <command>check-integrity</command> in <xref linkend="boolean_options"/>.
10563                   </para>
10564                 </listitem>
10565               </varlistentry>
10566
10567               <varlistentry>
10568                 <term><command>check-sibling</command></term>
10569                 <listitem>
10570                   <para>
10571                     See the description of
10572                     <command>check-sibling</command> in <xref linkend="boolean_options"/>.
10573                   </para>
10574                 </listitem>
10575               </varlistentry>
10576
10577               <varlistentry>
10578                 <term><command>zero-no-soa-ttl</command></term>
10579                 <listitem>
10580                   <para>
10581                     See the description of
10582                     <command>zero-no-soa-ttl</command> in <xref linkend="boolean_options"/>.
10583                   </para>
10584                 </listitem>
10585               </varlistentry>
10586
10587               <varlistentry>
10588                 <term><command>update-check-ksk</command></term>
10589                 <listitem>
10590                   <para>
10591                     See the description of
10592                     <command>update-check-ksk</command> in <xref linkend="boolean_options"/>.
10593                   </para>
10594                 </listitem>
10595               </varlistentry>
10596
10597               <varlistentry>
10598                 <term><command>dnssec-dnskey-kskonly</command></term>
10599                 <listitem>
10600                   <para>
10601                     See the description of
10602                     <command>dnssec-dnskey-kskonly</command> in <xref linkend="boolean_options"/>.
10603                   </para>
10604                 </listitem>
10605               </varlistentry>
10606
10607               <varlistentry>
10608                 <term><command>try-tcp-refresh</command></term>
10609                 <listitem>
10610                   <para>
10611                     See the description of
10612                     <command>try-tcp-refresh</command> in <xref linkend="boolean_options"/>.
10613                   </para>
10614                 </listitem>
10615               </varlistentry>
10616
10617               <varlistentry>
10618                 <term><command>database</command></term>
10619                 <listitem>
10620                   <para>
10621                     Specify the type of database to be used for storing the
10622                     zone data.  The string following the <command>database</command> keyword
10623                     is interpreted as a list of whitespace-delimited words.
10624                     The first word
10625                     identifies the database type, and any subsequent words are
10626                     passed
10627                     as arguments to the database to be interpreted in a way
10628                     specific
10629                     to the database type.
10630                   </para>
10631                   <para>
10632                     The default is <userinput>"rbt"</userinput>, BIND 9's
10633                     native in-memory
10634                     red-black-tree database.  This database does not take
10635                     arguments.
10636                   </para>
10637                   <para>
10638                     Other values are possible if additional database drivers
10639                     have been linked into the server.  Some sample drivers are
10640                     included
10641                     with the distribution but none are linked in by default.
10642                   </para>
10643                 </listitem>
10644               </varlistentry>
10645
10646               <varlistentry>
10647                 <term><command>dialup</command></term>
10648                 <listitem>
10649                   <para>
10650                     See the description of
10651                     <command>dialup</command> in <xref linkend="boolean_options"/>.
10652                   </para>
10653                 </listitem>
10654               </varlistentry>
10655
10656               <varlistentry>
10657                 <term><command>delegation-only</command></term>
10658                 <listitem>
10659                   <para>
10660                     The flag only applies to hint and stub zones.  If set
10661                     to <userinput>yes</userinput>, then the zone will also be
10662                     treated as if it is also a delegation-only type zone.
10663                   </para>
10664                   <para>
10665                     See caveats in <xref linkend="root_delegation_only"/>.
10666                   </para>
10667                 </listitem>
10668               </varlistentry>
10669
10670               <varlistentry>
10671                 <term><command>forward</command></term>
10672                 <listitem>
10673                   <para>
10674                     Only meaningful if the zone has a forwarders
10675                     list. The <command>only</command> value causes
10676                     the lookup to fail
10677                     after trying the forwarders and getting no answer, while <command>first</command> would
10678                     allow a normal lookup to be tried.
10679                   </para>
10680                 </listitem>
10681               </varlistentry>
10682
10683               <varlistentry>
10684                 <term><command>forwarders</command></term>
10685                 <listitem>
10686                   <para>
10687                     Used to override the list of global forwarders.
10688                     If it is not specified in a zone of type <command>forward</command>,
10689                     no forwarding is done for the zone and the global options are
10690                     not used.
10691                   </para>
10692                 </listitem>
10693               </varlistentry>
10694
10695               <varlistentry>
10696                 <term><command>ixfr-base</command></term>
10697                 <listitem>
10698                   <para>
10699                     Was used in <acronym>BIND</acronym> 8 to
10700                     specify the name
10701                     of the transaction log (journal) file for dynamic update
10702                     and IXFR.
10703                     <acronym>BIND</acronym> 9 ignores the option
10704                     and constructs the name of the journal
10705                     file by appending "<filename>.jnl</filename>"
10706                     to the name of the
10707                     zone file.
10708                   </para>
10709                 </listitem>
10710               </varlistentry>
10711
10712               <varlistentry>
10713                 <term><command>ixfr-tmp-file</command></term>
10714                 <listitem>
10715                   <para>
10716                     Was an undocumented option in <acronym>BIND</acronym> 8.
10717                     Ignored in <acronym>BIND</acronym> 9.
10718                   </para>
10719                 </listitem>
10720               </varlistentry>
10721
10722               <varlistentry>
10723                 <term><command>journal</command></term>
10724                 <listitem>
10725                   <para>
10726                     Allow the default journal's filename to be overridden.
10727                     The default is the zone's filename with "<filename>.jnl</filename>" appended.
10728                     This is applicable to <command>master</command> and <command>slave</command> zones.
10729                   </para>
10730                 </listitem>
10731               </varlistentry>
10732
10733               <varlistentry>
10734                 <term><command>max-journal-size</command></term>
10735                 <listitem>
10736                   <para>
10737                     See the description of
10738                     <command>max-journal-size</command> in <xref linkend="server_resource_limits"/>.
10739                   </para>
10740                 </listitem>
10741               </varlistentry>
10742
10743               <varlistentry>
10744                 <term><command>max-transfer-time-in</command></term>
10745                 <listitem>
10746                   <para>
10747                     See the description of
10748                     <command>max-transfer-time-in</command> in <xref linkend="zone_transfers"/>.
10749                   </para>
10750                 </listitem>
10751               </varlistentry>
10752
10753               <varlistentry>
10754                 <term><command>max-transfer-idle-in</command></term>
10755                 <listitem>
10756                   <para>
10757                     See the description of
10758                     <command>max-transfer-idle-in</command> in <xref linkend="zone_transfers"/>.
10759                   </para>
10760                 </listitem>
10761               </varlistentry>
10762
10763               <varlistentry>
10764                 <term><command>max-transfer-time-out</command></term>
10765                 <listitem>
10766                   <para>
10767                     See the description of
10768                     <command>max-transfer-time-out</command> in <xref linkend="zone_transfers"/>.
10769                   </para>
10770                 </listitem>
10771               </varlistentry>
10772
10773               <varlistentry>
10774                 <term><command>max-transfer-idle-out</command></term>
10775                 <listitem>
10776                   <para>
10777                     See the description of
10778                     <command>max-transfer-idle-out</command> in <xref linkend="zone_transfers"/>.
10779                   </para>
10780                 </listitem>
10781               </varlistentry>
10782
10783               <varlistentry>
10784                 <term><command>notify</command></term>
10785                 <listitem>
10786                   <para>
10787                     See the description of
10788                     <command>notify</command> in <xref linkend="boolean_options"/>.
10789                   </para>
10790                 </listitem>
10791               </varlistentry>
10792
10793               <varlistentry>
10794                 <term><command>notify-delay</command></term>
10795                 <listitem>
10796                   <para>
10797                     See the description of
10798                     <command>notify-delay</command> in <xref linkend="tuning"/>.
10799                   </para>
10800                 </listitem>
10801               </varlistentry>
10802
10803               <varlistentry>
10804                 <term><command>notify-to-soa</command></term>
10805                 <listitem>
10806                   <para>
10807                     See the description of
10808                     <command>notify-to-soa</command> in
10809                     <xref linkend="boolean_options"/>.
10810                   </para>
10811                 </listitem>
10812               </varlistentry>
10813
10814               <varlistentry>
10815                 <term><command>pubkey</command></term>
10816                 <listitem>
10817                   <para>
10818                     In <acronym>BIND</acronym> 8, this option was
10819                     intended for specifying
10820                     a public zone key for verification of signatures in DNSSEC
10821                     signed
10822                     zones when they are loaded from disk. <acronym>BIND</acronym> 9 does not verify signatures
10823                     on load and ignores the option.
10824                   </para>
10825                 </listitem>
10826               </varlistentry>
10827
10828               <varlistentry>
10829                 <term><command>zone-statistics</command></term>
10830                 <listitem>
10831                   <para>
10832                     If <userinput>yes</userinput>, the server will keep
10833                     statistical
10834                     information for this zone, which can be dumped to the
10835                     <command>statistics-file</command> defined in
10836                     the server options.
10837                   </para>
10838                 </listitem>
10839               </varlistentry>
10840
10841               <varlistentry>
10842                 <term><command>server-addresses</command></term>
10843                 <listitem>
10844                   <para>
10845                     Only meaningful for static-stub zones.
10846                     This is a list of IP addresses to which queries
10847                     should be sent in recursive resolution for the
10848                     zone.
10849                     A non empty list for this option will internally
10850                     configure the apex NS RR with associated glue A or
10851                     AAAA RRs.
10852                   </para>
10853                   <para>
10854                     For example, if "example.com" is configured as a
10855                     static-stub zone with 192.0.2.1 and 2001:db8::1234
10856                     in a <command>server-addresses</command> option,
10857                     the following RRs will be internally configured.
10858                   </para>
10859 <programlisting>example.com. NS example.com.
10860 example.com. A 192.0.2.1
10861 example.com. AAAA 2001:db8::1234</programlisting>
10862                   <para>
10863                     These records are internally used to resolve
10864                     names under the static-stub zone.
10865                     For instance, if the server receives a query for
10866                     "www.example.com" with the RD bit on, the server
10867                     will initiate recursive resolution and send
10868                     queries to 192.0.2.1 and/or 2001:db8::1234.
10869                   </para>
10870                 </listitem>
10871               </varlistentry>
10872
10873               <varlistentry>
10874                 <term><command>server-names</command></term>
10875                 <listitem>
10876                   <para>
10877                     Only meaningful for static-stub zones.
10878                     This is a list of domain names of nameservers that
10879                     act as authoritative servers of the static-stub
10880                     zone.
10881                     These names will be resolved to IP addresses when
10882                     <command>named</command> needs to send queries to
10883                     these servers.
10884                     To make this supplemental resolution successful,
10885                     these names must not be a subdomain of the origin
10886                     name of static-stub zone.
10887                     That is, when "example.net" is the origin of a
10888                     static-stub zone, "ns.example" and
10889                     "master.example.com" can be specified in the
10890                     <command>server-names</command> option, but
10891                     "ns.example.net" cannot, and will be rejected by
10892                     the configuration parser.
10893                   </para>
10894                   <para>
10895                     A non empty list for this option will internally
10896                     configure the apex NS RR with the specified names.
10897                     For example, if "example.com" is configured as a
10898                     static-stub zone with "ns1.example.net" and
10899                     "ns2.example.net"
10900                     in a <command>server-names</command> option,
10901                     the following RRs will be internally configured.
10902                   </para>
10903 <programlisting>example.com. NS ns1.example.net.
10904 example.com. NS ns2.example.net.
10905 </programlisting>
10906                   <para>
10907                     These records are internally used to resolve
10908                     names under the static-stub zone.
10909                     For instance, if the server receives a query for
10910                     "www.example.com" with the RD bit on, the server
10911                     initiate recursive resolution,
10912                     resolve "ns1.example.net" and/or
10913                     "ns2.example.net" to IP addresses, and then send
10914                     queries to (one or more of) these addresses.
10915                   </para>
10916                 </listitem>
10917               </varlistentry>
10918
10919               <varlistentry>
10920                 <term><command>sig-validity-interval</command></term>
10921                 <listitem>
10922                   <para>
10923                     See the description of
10924                     <command>sig-validity-interval</command> in <xref linkend="tuning"/>.
10925                   </para>
10926                 </listitem>
10927               </varlistentry>
10928
10929               <varlistentry>
10930                 <term><command>sig-signing-nodes</command></term>
10931                 <listitem>
10932                   <para>
10933                     See the description of
10934                     <command>sig-signing-nodes</command> in <xref linkend="tuning"/>.
10935                   </para>
10936                 </listitem>
10937               </varlistentry>
10938
10939               <varlistentry>
10940                 <term><command>sig-signing-signatures</command></term>
10941                 <listitem>
10942                   <para>
10943                     See the description of
10944                     <command>sig-signing-signatures</command> in <xref linkend="tuning"/>.
10945                   </para>
10946                 </listitem>
10947               </varlistentry>
10948
10949               <varlistentry>
10950                 <term><command>sig-signing-type</command></term>
10951                 <listitem>
10952                   <para>
10953                     See the description of
10954                     <command>sig-signing-type</command> in <xref linkend="tuning"/>.
10955                   </para>
10956                 </listitem>
10957               </varlistentry>
10958
10959               <varlistentry>
10960                 <term><command>transfer-source</command></term>
10961                 <listitem>
10962                   <para>
10963                     See the description of
10964                     <command>transfer-source</command> in <xref linkend="zone_transfers"/>.
10965                   </para>
10966                 </listitem>
10967               </varlistentry>
10968
10969               <varlistentry>
10970                 <term><command>transfer-source-v6</command></term>
10971                 <listitem>
10972                   <para>
10973                     See the description of
10974                     <command>transfer-source-v6</command> in <xref linkend="zone_transfers"/>.
10975                   </para>
10976                 </listitem>
10977               </varlistentry>
10978
10979               <varlistentry>
10980                 <term><command>alt-transfer-source</command></term>
10981                 <listitem>
10982                   <para>
10983                     See the description of
10984                     <command>alt-transfer-source</command> in <xref linkend="zone_transfers"/>.
10985                   </para>
10986                 </listitem>
10987               </varlistentry>
10988
10989               <varlistentry>
10990                 <term><command>alt-transfer-source-v6</command></term>
10991                 <listitem>
10992                   <para>
10993                     See the description of
10994                     <command>alt-transfer-source-v6</command> in <xref linkend="zone_transfers"/>.
10995                   </para>
10996                 </listitem>
10997               </varlistentry>
10998
10999               <varlistentry>
11000                 <term><command>use-alt-transfer-source</command></term>
11001                 <listitem>
11002                   <para>
11003                     See the description of
11004                     <command>use-alt-transfer-source</command> in <xref linkend="zone_transfers"/>.
11005                   </para>
11006                 </listitem>
11007               </varlistentry>
11008
11009
11010               <varlistentry>
11011                 <term><command>notify-source</command></term>
11012                 <listitem>
11013                   <para>
11014                     See the description of
11015                     <command>notify-source</command> in <xref linkend="zone_transfers"/>.
11016                   </para>
11017                 </listitem>
11018               </varlistentry>
11019
11020               <varlistentry>
11021                 <term><command>notify-source-v6</command></term>
11022                 <listitem>
11023                   <para>
11024                     See the description of
11025                     <command>notify-source-v6</command> in <xref linkend="zone_transfers"/>.
11026                   </para>
11027                 </listitem>
11028               </varlistentry>
11029
11030               <varlistentry>
11031                 <term><command>min-refresh-time</command></term>
11032                 <term><command>max-refresh-time</command></term>
11033                 <term><command>min-retry-time</command></term>
11034                 <term><command>max-retry-time</command></term>
11035                 <listitem>
11036                   <para>
11037                     See the description in <xref linkend="tuning"/>.
11038                   </para>
11039                 </listitem>
11040               </varlistentry>
11041
11042               <varlistentry>
11043                 <term><command>ixfr-from-differences</command></term>
11044                 <listitem>
11045                   <para>
11046                     See the description of
11047                     <command>ixfr-from-differences</command> in <xref linkend="boolean_options"/>.
11048                     (Note that the <command>ixfr-from-differences</command>
11049                     <userinput>master</userinput> and
11050                     <userinput>slave</userinput> choices are not
11051                     available at the zone level.)
11052                   </para>
11053                 </listitem>
11054               </varlistentry>
11055
11056               <varlistentry>
11057                 <term><command>key-directory</command></term>
11058                 <listitem>
11059                   <para>
11060                     See the description of
11061                     <command>key-directory</command> in <xref linkend="options"/>.
11062                   </para>
11063                 </listitem>
11064               </varlistentry>
11065
11066               <varlistentry>
11067                 <term><command>auto-dnssec</command></term>
11068                 <listitem>
11069                   <para>
11070                     Zones configured for dynamic DNS may also use this
11071                     option to allow varying levels of automatic DNSSEC key
11072                     management. There are three possible settings:
11073                   </para>
11074                   <para>
11075                     <command>auto-dnssec allow;</command> permits
11076                     keys to be updated and the zone fully re-signed
11077                     whenever the user issues the command <command>rndc sign
11078                     <replaceable>zonename</replaceable></command>.
11079                   </para>
11080                   <para>
11081                     <command>auto-dnssec maintain;</command> includes the
11082                     above, but also automatically adjusts the zone's DNSSEC
11083                     keys on schedule, according to the keys' timing metadata
11084                     (see <xref linkend="man.dnssec-keygen"/> and
11085                     <xref linkend="man.dnssec-settime"/>).  The command
11086                     <command>rndc sign
11087                     <replaceable>zonename</replaceable></command> causes
11088                     <command>named</command> to load keys from the key
11089                     repository and sign the zone with all keys that are
11090                     active. 
11091                     <command>rndc loadkeys
11092                     <replaceable>zonename</replaceable></command> causes
11093                     <command>named</command> to load keys from the key
11094                     repository and schedule key maintenance events to occur
11095                     in the future, but it does not sign the full zone
11096                     immediately.  Note: once keys have been loaded for a
11097                     zone the first time, the repository will be searched
11098                     for changes periodically, regardless of whether
11099                     <command>rndc loadkeys</command> is used.  The recheck
11100                     interval is hard-coded to
11101                     one hour.
11102                   </para>
11103                   <para>
11104                     <command>auto-dnssec create;</command> includes the
11105                     above, but also allows <command>named</command>
11106                     to create new keys in the key repository when needed.
11107                     (NOTE: This option is not yet implemented; the syntax is
11108                     being reserved for future use.)
11109                   </para>
11110                   <para>
11111                     The default setting is <command>auto-dnssec off</command>.
11112                   </para>
11113                 </listitem>
11114               </varlistentry>
11115
11116               <varlistentry>
11117                 <term><command>multi-master</command></term>
11118                 <listitem>
11119                   <para>
11120                     See the description of <command>multi-master</command> in
11121                     <xref linkend="boolean_options"/>.
11122                   </para>
11123                 </listitem>
11124               </varlistentry>
11125         
11126               <varlistentry>
11127                 <term><command>masterfile-format</command></term>
11128                 <listitem>
11129                   <para>
11130                     See the description of <command>masterfile-format</command>
11131                     in <xref linkend="tuning"/>.
11132                   </para>
11133                 </listitem>
11134               </varlistentry>
11135
11136               <varlistentry>
11137                 <term><command>dnssec-secure-to-insecure</command></term>
11138                 <listitem>
11139                   <para>
11140                     See the description of
11141                     <command>dnssec-secure-to-insecure</command> in <xref linkend="boolean_options"/>.
11142                   </para>
11143                 </listitem>
11144               </varlistentry>
11145
11146             </variablelist>
11147
11148           </sect3>
11149           <sect3 id="dynamic_update_policies">
11150             <title>Dynamic Update Policies</title>
11151             <para><acronym>BIND</acronym> 9 supports two alternative
11152               methods of granting clients the right to perform
11153               dynamic updates to a zone, configured by the
11154               <command>allow-update</command> and
11155               <command>update-policy</command> option, respectively.
11156             </para>
11157             <para>
11158               The <command>allow-update</command> clause works the
11159               same way as in previous versions of <acronym>BIND</acronym>.
11160               It grants given clients the permission to update any
11161               record of any name in the zone.
11162             </para>
11163             <para>
11164               The <command>update-policy</command> clause
11165               allows more fine-grained control over what updates are
11166               allowed.  A set of rules is specified, where each rule
11167               either grants or denies permissions for one or more
11168               names to be updated by one or more identities.  If
11169               the dynamic update request message is signed (that is,
11170               it includes either a TSIG or SIG(0) record), the
11171               identity of the signer can be determined.
11172             </para>
11173             <para>
11174               Rules are specified in the <command>update-policy</command>
11175               zone option, and are only meaningful for master zones.
11176               When the <command>update-policy</command> statement
11177               is present, it is a configuration error for the
11178               <command>allow-update</command> statement to be
11179               present.  The <command>update-policy</command> statement
11180               only examines the signer of a message; the source
11181               address is not relevant.
11182             </para>
11183             <para>
11184               There is a pre-defined <command>update-policy</command>
11185               rule which can be switched on with the command
11186               <command>update-policy local;</command>.
11187               Switching on this rule in a zone causes
11188               <command>named</command> to generate a TSIG session
11189               key and place it in a file, and to allow that key
11190               to update the zone.  (By default, the file is
11191               <filename>/var/run/named/session.key</filename>, the key
11192               name is "local-ddns" and the key algorithm is HMAC-SHA256,
11193               but these values are configurable with the
11194               <command>session-keyfile</command>,
11195               <command>session-keyname</command> and
11196               <command>session-keyalg</command> options, respectively).
11197             </para>
11198             <para>
11199               A client running on the local system, and with appropriate
11200               permissions, may read that file and use the key to sign update
11201               requests.  The zone's update policy will be set to allow that
11202               key to change any record within the zone.  Assuming the
11203               key name is "local-ddns", this policy is equivalent to:
11204             </para>
11205
11206             <programlisting>update-policy { grant local-ddns zonesub any; };
11207             </programlisting>
11208
11209             <para>
11210               The command <command>nsupdate -l</command> sends update
11211               requests to localhost, and signs them using the session key.
11212             </para>
11213
11214             <para>
11215               Other rule definitions look like this:
11216             </para>
11217
11218 <programlisting>
11219 ( <command>grant</command> | <command>deny</command> ) <replaceable>identity</replaceable> <replaceable>nametype</replaceable> <optional> <replaceable>name</replaceable> </optional> <optional> <replaceable>types</replaceable> </optional>
11220 </programlisting>
11221
11222             <para>
11223               Each rule grants or denies privileges.  Once a message has
11224               successfully matched a rule, the operation is immediately
11225               granted or denied and no further rules are examined.  A rule
11226               is matched when the signer matches the identity field, the
11227               name matches the name field in accordance with the nametype
11228               field, and the type matches the types specified in the type
11229               field.
11230             </para>
11231             <para>
11232               No signer is required for <replaceable>tcp-self</replaceable>
11233               or <replaceable>6to4-self</replaceable> however the standard
11234               reverse mapping / prefix conversion must match the identity
11235               field.
11236             </para>
11237             <para>
11238               The identity field specifies a name or a wildcard
11239               name.  Normally, this is the name of the TSIG or
11240               SIG(0) key used to sign the update request.  When a
11241               TKEY exchange has been used to create a shared secret,
11242               the identity of the shared secret is the same as the
11243               identity of the key used to authenticate the TKEY
11244               exchange.  TKEY is also the negotiation method used
11245               by GSS-TSIG, which establishes an identity that is
11246               the Kerberos principal of the client, such as
11247               <userinput>"user@host.domain"</userinput>.  When the
11248               <replaceable>identity</replaceable> field specifies
11249               a wildcard name, it is subject to DNS wildcard
11250               expansion, so the rule will apply to multiple identities.
11251               The <replaceable>identity</replaceable> field must
11252               contain a fully-qualified domain name.
11253             </para>
11254             <para>
11255               For nametypes <varname>krb5-self</varname>,
11256               <varname>ms-self</varname>, <varname>krb5-subdomain</varname>,
11257               and <varname>ms-subdomain</varname> the
11258               <replaceable>identity</replaceable> field specifies
11259               the Windows or Kerberos realm of the machine belongs to.
11260             </para>
11261             <para>
11262               The <replaceable>nametype</replaceable> field has 13
11263               values:
11264               <varname>name</varname>, <varname>subdomain</varname>,
11265               <varname>wildcard</varname>, <varname>self</varname>,
11266               <varname>selfsub</varname>, <varname>selfwild</varname>,
11267               <varname>krb5-self</varname>, <varname>ms-self</varname>,
11268               <varname>krb5-subdomain</varname>,
11269               <varname>ms-subdomain</varname>,
11270               <varname>tcp-self</varname>, <varname>6to4-self</varname>,
11271               <varname>zonesub</varname>, and <varname>external</varname>.
11272             </para>
11273             <informaltable>
11274               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
11275                 <colspec colname="1" colnum="1" colsep="0" colwidth="0.819in"/>
11276                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.681in"/>
11277                 <tbody>
11278                   <row rowsep="0">
11279                     <entry colname="1">
11280                       <para>
11281                         <varname>name</varname>
11282                       </para>
11283                     </entry> <entry colname="2">
11284                       <para>
11285                         Exact-match semantics.  This rule matches
11286                         when the name being updated is identical
11287                         to the contents of the
11288                         <replaceable>name</replaceable> field.
11289                       </para>
11290                     </entry>
11291                   </row>
11292                   <row rowsep="0">
11293                     <entry colname="1">
11294                       <para>
11295                         <varname>subdomain</varname>
11296                       </para>
11297                     </entry> <entry colname="2">
11298                       <para>
11299                         This rule matches when the name being updated
11300                         is a subdomain of, or identical to, the
11301                         contents of the <replaceable>name</replaceable>
11302                         field.
11303                       </para>
11304                     </entry>
11305                   </row>
11306                   <row rowsep="0">
11307                     <entry colname="1">
11308                       <para>
11309                         <varname>zonesub</varname>
11310                       </para>
11311                     </entry> <entry colname="2">
11312                       <para>
11313                         This rule is similar to subdomain, except that
11314                         it matches when the name being updated is a
11315                         subdomain of the zone in which the
11316                         <command>update-policy</command> statement
11317                         appears.  This obviates the need to type the zone
11318                         name twice, and enables the use of a standard
11319                         <command>update-policy</command> statement in
11320                         multiple zones without modification.
11321                       </para>
11322                       <para>
11323                         When this rule is used, the
11324                         <replaceable>name</replaceable> field is omitted.
11325                       </para>
11326                     </entry>
11327                   </row>
11328                   <row rowsep="0">
11329                     <entry colname="1">
11330                       <para>
11331                         <varname>wildcard</varname>
11332                       </para>
11333                     </entry> <entry colname="2">
11334                       <para>
11335                         The <replaceable>name</replaceable> field
11336                         is subject to DNS wildcard expansion, and
11337                         this rule matches when the name being updated
11338                         name is a valid expansion of the wildcard.
11339                       </para>
11340                     </entry>
11341                   </row>
11342                   <row rowsep="0">
11343                     <entry colname="1">
11344                       <para>
11345                         <varname>self</varname>
11346                       </para>
11347                     </entry>
11348                     <entry colname="2">
11349                       <para>
11350                         This rule matches when the name being updated
11351                         matches the contents of the
11352                         <replaceable>identity</replaceable> field.
11353                         The <replaceable>name</replaceable> field
11354                         is ignored, but should be the same as the
11355                         <replaceable>identity</replaceable> field.
11356                         The <varname>self</varname> nametype is
11357                         most useful when allowing using one key per
11358                         name to update, where the key has the same
11359                         name as the name to be updated.  The
11360                         <replaceable>identity</replaceable> would
11361                         be specified as <constant>*</constant> (an asterisk) in
11362                         this case.
11363                       </para>
11364                     </entry>
11365                   </row>
11366                   <row rowsep="0">
11367                     <entry colname="1">
11368                       <para>
11369                         <varname>selfsub</varname>
11370                       </para>
11371                     </entry> <entry colname="2">
11372                       <para>
11373                         This rule is similar to <varname>self</varname>
11374                         except that subdomains of <varname>self</varname>
11375                         can also be updated.
11376                       </para>
11377                     </entry>
11378                   </row>
11379                   <row rowsep="0">
11380                     <entry colname="1">
11381                       <para>
11382                         <varname>selfwild</varname>
11383                       </para>
11384                     </entry> <entry colname="2">
11385                       <para>
11386                         This rule is similar to <varname>self</varname>
11387                         except that only subdomains of
11388                         <varname>self</varname> can be updated.
11389                       </para>
11390                     </entry>
11391                   </row>
11392                   <row rowsep="0">
11393                     <entry colname="1">
11394                       <para>
11395                         <varname>ms-self</varname>
11396                       </para>
11397                     </entry> <entry colname="2">
11398                       <para>
11399                         This rule takes a Windows machine principal
11400                         (machine$@REALM) for machine in REALM and
11401                         and converts it machine.realm allowing the machine 
11402                         to update machine.realm.  The REALM to be matched
11403                         is specified in the <replacable>identity</replacable>
11404                         field.
11405                       </para>
11406                     </entry>
11407                   </row>
11408                   <row rowsep="0">
11409                     <entry colname="1">
11410                       <para>
11411                         <varname>ms-subdomain</varname>
11412                       </para>
11413                     </entry> <entry colname="2">
11414                       <para>
11415                         This rule takes a Windows machine principal 
11416                         (machine$@REALM) for machine in REALM and
11417                         converts it to machine.realm allowing the machine
11418                         to update subdomains of machine.realm.  The REALM
11419                         to be matched is specified in the
11420                         <replacable>identity</replacable> field.
11421                       </para>
11422                     </entry>
11423                   </row>
11424                   <row rowsep="0">
11425                     <entry colname="1">
11426                       <para>
11427                         <varname>krb5-self</varname>
11428                       </para>
11429                     </entry> <entry colname="2">
11430                       <para>
11431                         This rule takes a Kerberos machine principal
11432                         (host/machine@REALM) for machine in REALM and
11433                         and converts it machine.realm allowing the machine 
11434                         to update machine.realm.  The REALM to be matched
11435                         is specified in the <replacable>identity</replacable>
11436                         field.
11437                       </para>
11438                     </entry>
11439                   </row>
11440                   <row rowsep="0">
11441                     <entry colname="1">
11442                       <para>
11443                         <varname>krb5-subdomain</varname>
11444                       </para>
11445                     </entry> <entry colname="2">
11446                       <para>
11447                         This rule takes a Kerberos machine principal 
11448                         (host/machine@REALM) for machine in REALM and
11449                         converts it to machine.realm allowing the machine
11450                         to update subdomains of machine.realm.  The REALM
11451                         to be matched is specified in the
11452                         <replacable>identity</replacable> field.
11453                       </para>
11454                     </entry>
11455                   </row>
11456                   <row rowsep="0">
11457                     <entry colname="1">
11458                       <para>
11459                         <varname>tcp-self</varname>
11460                       </para>
11461                     </entry> <entry colname="2">
11462                       <para>
11463                         Allow updates that have been sent via TCP and
11464                         for which the standard mapping from the initiating
11465                         IP address into the IN-ADDR.ARPA and IP6.ARPA
11466                         namespaces match the name to be updated.
11467                       </para>
11468                       <note>
11469                         It is theoretically possible to spoof these TCP
11470                         sessions.
11471                       </note>
11472                     </entry>
11473                   </row>
11474                   <row rowsep="0">
11475                     <entry colname="1">
11476                       <para>
11477                         <varname>6to4-self</varname>
11478                       </para>
11479                     </entry> <entry colname="2">
11480                       <para>
11481                         Allow the 6to4 prefix to be update by any TCP
11482                         connection from the 6to4 network or from the
11483                         corresponding IPv4 address.  This is intended
11484                         to allow NS or DNAME RRsets to be added to the
11485                         reverse tree.
11486                       </para>
11487                       <note>
11488                         It is theoretically possible to spoof these TCP
11489                         sessions.
11490                       </note>
11491                     </entry>
11492                   </row>
11493                   <row rowsep="0">
11494                     <entry colname="1">
11495                       <para>
11496                         <varname>external</varname>
11497                       </para>
11498                     </entry> <entry colname="2">
11499                       <para>
11500                         This rule allows <command>named</command>
11501                         to defer the decision of whether to allow a
11502                         given update to an external daemon.
11503                       </para>
11504                       <para>
11505                         The method of communicating with the daemon is
11506                         specified in the <replaceable>identity</replaceable>
11507                         field, the format of which is
11508                         "<constant>local:</constant><replaceable>path</replaceable>",
11509                         where <replaceable>path</replaceable> is the location
11510                         of a UNIX-domain socket.  (Currently, "local" is the
11511                         only supported mechanism.)
11512                       </para>
11513                       <para>
11514                         Requests to the external daemon are sent over the
11515                         UNIX-domain socket as datagrams with the following
11516                         format:
11517                       </para>
11518                       <programlisting>
11519    Protocol version number (4 bytes, network byte order, currently 1)
11520    Request length (4 bytes, network byte order)
11521    Signer (null-terminated string)
11522    Name (null-terminated string)
11523    TCP source address (null-terminated string)
11524    Rdata type (null-terminated string)
11525    Key (null-terminated string)
11526    TKEY token length (4 bytes, network byte order)
11527    TKEY token (remainder of packet)</programlisting>
11528                       <para>
11529                         The daemon replies with a four-byte value in
11530                         network byte order, containing either 0 or 1; 0
11531                         indicates that the specified update is not
11532                         permitted, and 1 indicates that it is.
11533                       </para>
11534                     </entry>
11535                   </row>
11536                 </tbody>
11537               </tgroup>
11538             </informaltable>
11539
11540             <para>
11541               In all cases, the <replaceable>name</replaceable>
11542               field must specify a fully-qualified domain name.
11543             </para>
11544
11545             <para>
11546               If no types are explicitly specified, this rule matches
11547               all types except RRSIG, NS, SOA, NSEC and NSEC3. Types
11548               may be specified by name, including "ANY" (ANY matches
11549               all types except NSEC and NSEC3, which can never be
11550               updated).  Note that when an attempt is made to delete
11551               all records associated with a name, the rules are
11552               checked for each existing record type.
11553             </para>
11554           </sect3>
11555         </sect2>
11556       </sect1>
11557       <sect1>
11558         <title>Zone File</title>
11559         <sect2 id="types_of_resource_records_and_when_to_use_them">
11560           <title>Types of Resource Records and When to Use Them</title>
11561           <para>
11562             This section, largely borrowed from RFC 1034, describes the
11563             concept of a Resource Record (RR) and explains when each is used.
11564             Since the publication of RFC 1034, several new RRs have been
11565             identified
11566             and implemented in the DNS. These are also included.
11567           </para>
11568           <sect3>
11569             <title>Resource Records</title>
11570
11571             <para>
11572               A domain name identifies a node.  Each node has a set of
11573               resource information, which may be empty.  The set of resource
11574               information associated with a particular name is composed of
11575               separate RRs. The order of RRs in a set is not significant and
11576               need not be preserved by name servers, resolvers, or other
11577               parts of the DNS. However, sorting of multiple RRs is
11578               permitted for optimization purposes, for example, to specify
11579               that a particular nearby server be tried first. See <xref linkend="the_sortlist_statement"/> and <xref linkend="rrset_ordering"/>.
11580             </para>
11581
11582             <para>
11583               The components of a Resource Record are:
11584             </para>
11585             <informaltable colsep="0" rowsep="0">
11586               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
11587                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.000in"/>
11588                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.500in"/>
11589                 <tbody>
11590                   <row rowsep="0">
11591                     <entry colname="1">
11592                       <para>
11593                         owner name
11594                       </para>
11595                     </entry>
11596                     <entry colname="2">
11597                       <para>
11598                         The domain name where the RR is found.
11599                       </para>
11600                     </entry>
11601                   </row>
11602                   <row rowsep="0">
11603                     <entry colname="1">
11604                       <para>
11605                         type
11606                       </para>
11607                     </entry>
11608                     <entry colname="2">
11609                       <para>
11610                         An encoded 16-bit value that specifies
11611                         the type of the resource record.
11612                       </para>
11613                     </entry>
11614                   </row>
11615                   <row rowsep="0">
11616                     <entry colname="1">
11617                       <para>
11618                         TTL
11619                       </para>
11620                     </entry>
11621                     <entry colname="2">
11622                       <para>
11623                         The time-to-live of the RR. This field
11624                         is a 32-bit integer in units of seconds, and is
11625                         primarily used by
11626                         resolvers when they cache RRs. The TTL describes how
11627                         long a RR can
11628                         be cached before it should be discarded.
11629                       </para>
11630                     </entry>
11631                   </row>
11632                   <row rowsep="0">
11633                     <entry colname="1">
11634                       <para>
11635                         class
11636                       </para>
11637                     </entry>
11638                     <entry colname="2">
11639                       <para>
11640                         An encoded 16-bit value that identifies
11641                         a protocol family or instance of a protocol.
11642                       </para>
11643                     </entry>
11644                   </row>
11645                   <row rowsep="0">
11646                     <entry colname="1">
11647                       <para>
11648                         RDATA
11649                       </para>
11650                     </entry>
11651                     <entry colname="2">
11652                       <para>
11653                         The resource data.  The format of the
11654                         data is type (and sometimes class) specific.
11655                       </para>
11656                     </entry>
11657                   </row>
11658                 </tbody>
11659               </tgroup>
11660             </informaltable>
11661             <para>
11662               The following are <emphasis>types</emphasis> of valid RRs:
11663             </para>
11664             <informaltable colsep="0" rowsep="0">
11665               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
11666                 <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
11667                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.625in"/>
11668                 <tbody>
11669                   <row rowsep="0">
11670                     <entry colname="1">
11671                       <para>
11672                         A
11673                       </para>
11674                     </entry>
11675                     <entry colname="2">
11676                       <para>
11677                         A host address.  In the IN class, this is a
11678                         32-bit IP address.  Described in RFC 1035.
11679                       </para>
11680                     </entry>
11681                   </row>
11682                   <row rowsep="0">
11683                     <entry colname="1">
11684                       <para>
11685                         AAAA
11686                       </para>
11687                     </entry>
11688                     <entry colname="2">
11689                       <para>
11690                         IPv6 address.  Described in RFC 1886.
11691                       </para>
11692                     </entry>
11693                   </row>
11694                   <row rowsep="0">
11695                     <entry colname="1">
11696                       <para>
11697                         A6
11698                       </para>
11699                     </entry>
11700                     <entry colname="2">
11701                       <para>
11702                         IPv6 address.  This can be a partial
11703                         address (a suffix) and an indirection to the name
11704                         where the rest of the
11705                         address (the prefix) can be found.  Experimental.
11706                         Described in RFC 2874.
11707                       </para>
11708                     </entry>
11709                   </row>
11710                   <row rowsep="0">
11711                     <entry colname="1">
11712                       <para>
11713                         AFSDB
11714                       </para>
11715                     </entry>
11716                     <entry colname="2">
11717                       <para>
11718                         Location of AFS database servers.
11719                         Experimental.  Described in RFC 1183.
11720                       </para>
11721                     </entry>
11722                   </row>
11723                   <row rowsep="0">
11724                     <entry colname="1">
11725                       <para>
11726                         APL
11727                       </para>
11728                     </entry>
11729                     <entry colname="2">
11730                       <para>
11731                         Address prefix list.  Experimental.
11732                         Described in RFC 3123.
11733                       </para>
11734                     </entry>
11735                   </row>
11736                   <row rowsep="0">
11737                     <entry colname="1">
11738                       <para>
11739                         CERT
11740                       </para>
11741                     </entry>
11742                     <entry colname="2">
11743                       <para>
11744                         Holds a digital certificate.
11745                         Described in RFC 2538.
11746                       </para>
11747                     </entry>
11748                   </row>
11749                   <row rowsep="0">
11750                     <entry colname="1">
11751                       <para>
11752                         CNAME
11753                       </para>
11754                     </entry>
11755                     <entry colname="2">
11756                       <para>
11757                         Identifies the canonical name of an alias.
11758                         Described in RFC 1035.
11759                       </para>
11760                     </entry>
11761                   </row>
11762                   <row rowsep="0">
11763                     <entry colname="1">
11764                       <para>
11765                         DHCID
11766                       </para>
11767                     </entry>
11768                     <entry colname="2">
11769                       <para>
11770                         Is used for identifying which DHCP client is
11771                         associated with this name.  Described in RFC 4701.
11772                       </para>
11773                     </entry>
11774                   </row>
11775                   <row rowsep="0">
11776                     <entry colname="1">
11777                       <para>
11778                         DNAME
11779                       </para>
11780                     </entry>
11781                     <entry colname="2">
11782                       <para>
11783                         Replaces the domain name specified with
11784                         another name to be looked up, effectively aliasing an
11785                         entire
11786                         subtree of the domain name space rather than a single
11787                         record
11788                         as in the case of the CNAME RR.
11789                         Described in RFC 2672.
11790                       </para>
11791                     </entry>
11792                   </row>
11793                   <row rowsep="0">
11794                     <entry colname="1">
11795                       <para>
11796                         DNSKEY
11797                       </para>
11798                     </entry>
11799                     <entry colname="2">
11800                       <para>
11801                         Stores a public key associated with a signed
11802                         DNS zone.  Described in RFC 4034.
11803                       </para>
11804                     </entry>
11805                   </row>
11806                   <row rowsep="0">
11807                     <entry colname="1">
11808                       <para>
11809                         DS
11810                       </para>
11811                     </entry>
11812                     <entry colname="2">
11813                       <para>
11814                         Stores the hash of a public key associated with a
11815                         signed DNS zone.  Described in RFC 4034.
11816                       </para>
11817                     </entry>
11818                   </row>
11819                   <row rowsep="0">
11820                     <entry colname="1">
11821                       <para>
11822                         GPOS
11823                       </para>
11824                     </entry>
11825                     <entry colname="2">
11826                       <para>
11827                         Specifies the global position.  Superseded by LOC.
11828                       </para>
11829                     </entry>
11830                   </row>
11831                   <row rowsep="0">
11832                     <entry colname="1">
11833                       <para>
11834                         HINFO
11835                       </para>
11836                     </entry>
11837                     <entry colname="2">
11838                       <para>
11839                         Identifies the CPU and OS used by a host.
11840                         Described in RFC 1035.
11841                       </para>
11842                     </entry>
11843                   </row>
11844                   <row rowsep="0">
11845                     <entry colname="1">
11846                       <para>
11847                         IPSECKEY
11848                       </para>
11849                     </entry>
11850                     <entry colname="2">
11851                       <para>
11852                         Provides a method for storing IPsec keying material in
11853                         DNS.  Described in RFC 4025.
11854                       </para>
11855                     </entry>
11856                   </row>
11857                   <row rowsep="0">
11858                     <entry colname="1">
11859                       <para>
11860                         ISDN
11861                       </para>
11862                     </entry>
11863                     <entry colname="2">
11864                       <para>
11865                         Representation of ISDN addresses.
11866                         Experimental.  Described in RFC 1183.
11867                       </para>
11868                     </entry>
11869                   </row>
11870                   <row rowsep="0">
11871                     <entry colname="1">
11872                       <para>
11873                         KEY
11874                       </para>
11875                     </entry>
11876                     <entry colname="2">
11877                       <para>
11878                         Stores a public key associated with a
11879                         DNS name.  Used in original DNSSEC; replaced
11880                         by DNSKEY in DNSSECbis, but still used with
11881                         SIG(0).  Described in RFCs 2535 and 2931.
11882                       </para>
11883                     </entry>
11884                   </row>
11885                   <row rowsep="0">
11886                     <entry colname="1">
11887                       <para>
11888                         KX
11889                       </para>
11890                     </entry>
11891                     <entry colname="2">
11892                       <para>
11893                         Identifies a key exchanger for this
11894                         DNS name.  Described in RFC 2230.
11895                       </para>
11896                     </entry>
11897                   </row>
11898                   <row rowsep="0">
11899                     <entry colname="1">
11900                       <para>
11901                         LOC
11902                       </para>
11903                     </entry>
11904                     <entry colname="2">
11905                       <para>
11906                         For storing GPS info.  Described in RFC 1876.
11907                         Experimental.
11908                       </para>
11909                     </entry>
11910                   </row>
11911                   <row rowsep="0">
11912                     <entry colname="1">
11913                       <para>
11914                         MX
11915                       </para>
11916                     </entry>
11917                     <entry colname="2">
11918                       <para>
11919                         Identifies a mail exchange for the domain with
11920                         a 16-bit preference value (lower is better)
11921                         followed by the host name of the mail exchange.
11922                         Described in RFC 974, RFC 1035.
11923                       </para>
11924                     </entry>
11925                   </row>
11926                   <row rowsep="0">
11927                     <entry colname="1">
11928                       <para>
11929                         NAPTR
11930                       </para>
11931                     </entry>
11932                     <entry colname="2">
11933                       <para>
11934                         Name authority pointer.  Described in RFC 2915.
11935                       </para>
11936                     </entry>
11937                   </row>
11938                   <row rowsep="0">
11939                     <entry colname="1">
11940                       <para>
11941                         NSAP
11942                       </para>
11943                     </entry>
11944                     <entry colname="2">
11945                       <para>
11946                         A network service access point.
11947                         Described in RFC 1706.
11948                       </para>
11949                     </entry>
11950                   </row>
11951                   <row rowsep="0">
11952                     <entry colname="1">
11953                       <para>
11954                         NS
11955                       </para>
11956                     </entry>
11957                     <entry colname="2">
11958                       <para>
11959                         The authoritative name server for the
11960                         domain.  Described in RFC 1035.
11961                       </para>
11962                     </entry>
11963                   </row>
11964                   <row rowsep="0">
11965                     <entry colname="1">
11966                       <para>
11967                         NSEC
11968                       </para>
11969                     </entry>
11970                     <entry colname="2">
11971                       <para>
11972                         Used in DNSSECbis to securely indicate that
11973                         RRs with an owner name in a certain name interval do
11974                         not exist in
11975                         a zone and indicate what RR types are present for an
11976                         existing name.
11977                         Described in RFC 4034.
11978                       </para>
11979                     </entry>
11980                   </row>
11981                   <row rowsep="0">
11982                     <entry colname="1">
11983                       <para>
11984                         NSEC3
11985                       </para>
11986                     </entry>
11987                     <entry colname="2">
11988                       <para>
11989                         Used in DNSSECbis to securely indicate that
11990                         RRs with an owner name in a certain name
11991                         interval do not exist in a zone and indicate
11992                         what RR types are present for an existing
11993                         name.  NSEC3 differs from NSEC in that it
11994                         prevents zone enumeration but is more
11995                         computationally expensive on both the server
11996                         and the client than NSEC.  Described in RFC
11997                         5155.
11998                       </para>
11999                     </entry>
12000                   </row>
12001                   <row rowsep="0">
12002                     <entry colname="1">
12003                       <para>
12004                         NSEC3PARAM
12005                       </para>
12006                     </entry>
12007                     <entry colname="2">
12008                       <para>
12009                         Used in DNSSECbis to tell the authoritative
12010                         server which NSEC3 chains are available to use.
12011                         Described in RFC 5155.
12012                       </para>
12013                     </entry>
12014                   </row>
12015                   <row rowsep="0">
12016                     <entry colname="1">
12017                       <para>
12018                         NXT
12019                       </para>
12020                     </entry>
12021                     <entry colname="2">
12022                       <para>
12023                         Used in DNSSEC to securely indicate that
12024                         RRs with an owner name in a certain name interval do
12025                         not exist in
12026                         a zone and indicate what RR types are present for an
12027                         existing name.
12028                         Used in original DNSSEC; replaced by NSEC in
12029                         DNSSECbis.
12030                         Described in RFC 2535.
12031                       </para>
12032                     </entry>
12033                   </row>
12034                   <row rowsep="0">
12035                     <entry colname="1">
12036                       <para>
12037                         PTR
12038                       </para>
12039                     </entry>
12040                     <entry colname="2">
12041                       <para>
12042                         A pointer to another part of the domain
12043                         name space.  Described in RFC 1035.
12044                       </para>
12045                     </entry>
12046                   </row>
12047                   <row rowsep="0">
12048                     <entry colname="1">
12049                       <para>
12050                         PX
12051                       </para>
12052                     </entry>
12053                     <entry colname="2">
12054                       <para>
12055                         Provides mappings between RFC 822 and X.400
12056                         addresses.  Described in RFC 2163.
12057                       </para>
12058                     </entry>
12059                   </row>
12060                   <row rowsep="0">
12061                     <entry colname="1">
12062                       <para>
12063                         RP
12064                       </para>
12065                     </entry>
12066                     <entry colname="2">
12067                       <para>
12068                         Information on persons responsible
12069                         for the domain.  Experimental.  Described in RFC 1183.
12070                       </para>
12071                     </entry>
12072                   </row>
12073                   <row rowsep="0">
12074                     <entry colname="1">
12075                       <para>
12076                         RRSIG
12077                       </para>
12078                     </entry>
12079                     <entry colname="2">
12080                       <para>
12081                         Contains DNSSECbis signature data.  Described
12082                         in RFC 4034.
12083                       </para>
12084                     </entry>
12085                   </row>
12086                   <row rowsep="0">
12087                     <entry colname="1">
12088                       <para>
12089                         RT
12090                       </para>
12091                     </entry>
12092                     <entry colname="2">
12093                       <para>
12094                         Route-through binding for hosts that
12095                         do not have their own direct wide area network
12096                         addresses.
12097                         Experimental.  Described in RFC 1183.
12098                       </para>
12099                     </entry>
12100                   </row>
12101                   <row rowsep="0">
12102                     <entry colname="1">
12103                       <para>
12104                         SIG
12105                       </para>
12106                     </entry>
12107                     <entry colname="2">
12108                       <para>
12109                         Contains DNSSEC signature data.  Used in
12110                         original DNSSEC; replaced by RRSIG in
12111                         DNSSECbis, but still used for SIG(0).
12112                         Described in RFCs 2535 and 2931.
12113                       </para>
12114                     </entry>
12115                   </row>
12116                   <row rowsep="0">
12117                     <entry colname="1">
12118                       <para>
12119                         SOA
12120                       </para>
12121                     </entry>
12122                     <entry colname="2">
12123                       <para>
12124                         Identifies the start of a zone of authority.
12125                         Described in RFC 1035.
12126                       </para>
12127                     </entry>
12128                   </row>
12129                   <row rowsep="0">
12130                     <entry colname="1">
12131                       <para>
12132                         SPF
12133                       </para>
12134                     </entry>
12135                     <entry colname="2">
12136                       <para>
12137                         Contains the Sender Policy Framework information
12138                         for a given email domain.  Described in RFC 4408.
12139                       </para>
12140                     </entry>
12141                   </row>
12142                   <row rowsep="0">
12143                     <entry colname="1">
12144                       <para>
12145                         SRV
12146                       </para>
12147                     </entry>
12148                     <entry colname="2">
12149                       <para>
12150                         Information about well known network
12151                         services (replaces WKS).  Described in RFC 2782.
12152                       </para>
12153                     </entry>
12154                   </row>
12155                   <row rowsep="0">
12156                     <entry colname="1">
12157                       <para>
12158                         SSHFP
12159                       </para>
12160                     </entry>
12161                     <entry colname="2">
12162                       <para>
12163                         Provides a way to securely publish a secure shell key's
12164                         fingerprint.  Described in RFC 4255.
12165                       </para>
12166                     </entry>
12167                   </row>
12168                   <row rowsep="0">
12169                     <entry colname="1">
12170                       <para>
12171                         TXT
12172                       </para>
12173                     </entry>
12174                     <entry colname="2">
12175                       <para>
12176                         Text records.  Described in RFC 1035.
12177                       </para>
12178                     </entry>
12179                   </row>
12180                   <row rowsep="0">
12181                     <entry colname="1">
12182                       <para>
12183                         WKS
12184                       </para>
12185                     </entry>
12186                     <entry colname="2">
12187                       <para>
12188                         Information about which well known
12189                         network services, such as SMTP, that a domain
12190                         supports. Historical.
12191                       </para>
12192                     </entry>
12193                   </row>
12194                   <row rowsep="0">
12195                     <entry colname="1">
12196                       <para>
12197                         X25
12198                       </para>
12199                     </entry>
12200                     <entry colname="2">
12201                       <para>
12202                         Representation of X.25 network addresses.
12203                         Experimental.  Described in RFC 1183.
12204                       </para>
12205                     </entry>
12206                   </row>
12207                 </tbody>
12208               </tgroup>
12209             </informaltable>
12210             <para>
12211               The following <emphasis>classes</emphasis> of resource records
12212               are currently valid in the DNS:
12213             </para>
12214             <informaltable colsep="0" rowsep="0"><tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
12215                 <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
12216                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.625in"/>
12217                 <tbody>
12218
12219                   <row rowsep="0">
12220                     <entry colname="1">
12221                       <para>
12222                         IN
12223                       </para>
12224                     </entry>
12225                     <entry colname="2">
12226                       <para>
12227                         The Internet.
12228                       </para>
12229                     </entry>
12230                   </row>
12231
12232                   <row rowsep="0">
12233                     <entry colname="1">
12234                       <para>
12235                         CH
12236                       </para>
12237                     </entry>
12238                     <entry colname="2">
12239                       <para>
12240                         Chaosnet, a LAN protocol created at MIT in the
12241                         mid-1970s.
12242                         Rarely used for its historical purpose, but reused for
12243                         BIND's
12244                         built-in server information zones, e.g.,
12245                         <literal>version.bind</literal>.
12246                       </para>
12247                     </entry>
12248                   </row>
12249
12250                   <row rowsep="0">
12251                     <entry colname="1">
12252                       <para>
12253                         HS
12254                       </para>
12255                     </entry>
12256                     <entry colname="2">
12257                       <para>
12258                         Hesiod, an information service
12259                         developed by MIT's Project Athena. It is used to share
12260                         information
12261                         about various systems databases, such as users,
12262                         groups, printers
12263                         and so on.
12264                       </para>
12265                     </entry>
12266                   </row>
12267
12268                 </tbody>
12269               </tgroup>
12270             </informaltable>
12271
12272             <para>
12273               The owner name is often implicit, rather than forming an
12274               integral
12275               part of the RR.  For example, many name servers internally form
12276               tree
12277               or hash structures for the name space, and chain RRs off nodes.
12278               The remaining RR parts are the fixed header (type, class, TTL)
12279               which is consistent for all RRs, and a variable part (RDATA)
12280               that
12281               fits the needs of the resource being described.
12282             </para>
12283             <para>
12284               The meaning of the TTL field is a time limit on how long an
12285               RR can be kept in a cache.  This limit does not apply to
12286               authoritative
12287               data in zones; it is also timed out, but by the refreshing
12288               policies
12289               for the zone.  The TTL is assigned by the administrator for the
12290               zone where the data originates.  While short TTLs can be used to
12291               minimize caching, and a zero TTL prohibits caching, the
12292               realities
12293               of Internet performance suggest that these times should be on
12294               the
12295               order of days for the typical host.  If a change can be
12296               anticipated,
12297               the TTL can be reduced prior to the change to minimize
12298               inconsistency
12299               during the change, and then increased back to its former value
12300               following
12301               the change.
12302             </para>
12303             <para>
12304               The data in the RDATA section of RRs is carried as a combination
12305               of binary strings and domain names.  The domain names are
12306               frequently
12307               used as "pointers" to other data in the DNS.
12308             </para>
12309           </sect3>
12310           <sect3>
12311             <title>Textual expression of RRs</title>
12312             <para>
12313               RRs are represented in binary form in the packets of the DNS
12314               protocol, and are usually represented in highly encoded form
12315               when
12316               stored in a name server or resolver.  In the examples provided
12317               in
12318               RFC 1034, a style similar to that used in master files was
12319               employed
12320               in order to show the contents of RRs.  In this format, most RRs
12321               are shown on a single line, although continuation lines are
12322               possible
12323               using parentheses.
12324             </para>
12325             <para>
12326               The start of the line gives the owner of the RR.  If a line
12327               begins with a blank, then the owner is assumed to be the same as
12328               that of the previous RR.  Blank lines are often included for
12329               readability.
12330             </para>
12331             <para>
12332               Following the owner, we list the TTL, type, and class of the
12333               RR.  Class and type use the mnemonics defined above, and TTL is
12334               an integer before the type field.  In order to avoid ambiguity
12335               in
12336               parsing, type and class mnemonics are disjoint, TTLs are
12337               integers,
12338               and the type mnemonic is always last. The IN class and TTL
12339               values
12340               are often omitted from examples in the interests of clarity.
12341             </para>
12342             <para>
12343               The resource data or RDATA section of the RR are given using
12344               knowledge of the typical representation for the data.
12345             </para>
12346             <para>
12347               For example, we might show the RRs carried in a message as:
12348             </para>
12349             <informaltable colsep="0" rowsep="0"><tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
12350                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.381in"/>
12351                 <colspec colname="2" colnum="2" colsep="0" colwidth="1.020in"/>
12352                 <colspec colname="3" colnum="3" colsep="0" colwidth="2.099in"/>
12353                 <tbody>
12354                   <row rowsep="0">
12355                     <entry colname="1">
12356                       <para>
12357                         <literal>ISI.EDU.</literal>
12358                       </para>
12359                     </entry>
12360                     <entry colname="2">
12361                       <para>
12362                         <literal>MX</literal>
12363                       </para>
12364                     </entry>
12365                     <entry colname="3">
12366                       <para>
12367                         <literal>10 VENERA.ISI.EDU.</literal>
12368                       </para>
12369                     </entry>
12370                   </row>
12371                   <row rowsep="0">
12372                     <entry colname="1">
12373                       <para/>
12374                     </entry>
12375                     <entry colname="2">
12376                       <para>
12377                         <literal>MX</literal>
12378                       </para>
12379                     </entry>
12380                     <entry colname="3">
12381                       <para>
12382                         <literal>10 VAXA.ISI.EDU</literal>
12383                       </para>
12384                     </entry>
12385                   </row>
12386                   <row rowsep="0">
12387                     <entry colname="1">
12388                       <para>
12389                         <literal>VENERA.ISI.EDU</literal>
12390                       </para>
12391                     </entry>
12392                     <entry colname="2">
12393                       <para>
12394                         <literal>A</literal>
12395                       </para>
12396                     </entry>
12397                     <entry colname="3">
12398                       <para>
12399                         <literal>128.9.0.32</literal>
12400                       </para>
12401                     </entry>
12402                   </row>
12403                   <row rowsep="0">
12404                     <entry colname="1">
12405                       <para/>
12406                     </entry>
12407                     <entry colname="2">
12408                       <para>
12409                         <literal>A</literal>
12410                       </para>
12411                     </entry>
12412                     <entry colname="3">
12413                       <para>
12414                         <literal>10.1.0.52</literal>
12415                       </para>
12416                     </entry>
12417                   </row>
12418                   <row rowsep="0">
12419                     <entry colname="1">
12420                       <para>
12421                         <literal>VAXA.ISI.EDU</literal>
12422                       </para>
12423                     </entry>
12424                     <entry colname="2">
12425                       <para>
12426                         <literal>A</literal>
12427                       </para>
12428                     </entry>
12429                     <entry colname="3">
12430                       <para>
12431                         <literal>10.2.0.27</literal>
12432                       </para>
12433                     </entry>
12434                   </row>
12435                   <row rowsep="0">
12436                     <entry colname="1">
12437                       <para/>
12438                     </entry>
12439                     <entry colname="2">
12440                       <para>
12441                         <literal>A</literal>
12442                       </para>
12443                     </entry>
12444                     <entry colname="3">
12445                       <para>
12446                         <literal>128.9.0.33</literal>
12447                       </para>
12448                     </entry>
12449                   </row>
12450                 </tbody>
12451               </tgroup>
12452             </informaltable>
12453             <para>
12454               The MX RRs have an RDATA section which consists of a 16-bit
12455               number followed by a domain name.  The address RRs use a
12456               standard
12457               IP address format to contain a 32-bit internet address.
12458             </para>
12459             <para>
12460               The above example shows six RRs, with two RRs at each of three
12461               domain names.
12462             </para>
12463             <para>
12464               Similarly we might see:
12465             </para>
12466             <informaltable colsep="0" rowsep="0"><tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
12467                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.491in"/>
12468                 <colspec colname="2" colnum="2" colsep="0" colwidth="1.067in"/>
12469                 <colspec colname="3" colnum="3" colsep="0" colwidth="2.067in"/>
12470                 <tbody>
12471                   <row rowsep="0">
12472                     <entry colname="1">
12473                       <para>
12474                         <literal>XX.LCS.MIT.EDU.</literal>
12475                       </para>
12476                     </entry>
12477                     <entry colname="2">
12478                       <para>
12479                         <literal>IN A</literal>
12480                       </para>
12481                     </entry>
12482                     <entry colname="3">
12483                       <para>
12484                         <literal>10.0.0.44</literal>
12485                       </para>
12486                     </entry>
12487                   </row>
12488                   <row rowsep="0">
12489                     <entry colname="1"/>
12490                     <entry colname="2">
12491                       <para>
12492                         <literal>CH A</literal>
12493                       </para>
12494                     </entry>
12495                     <entry colname="3">
12496                       <para>
12497                         <literal>MIT.EDU. 2420</literal>
12498                       </para>
12499                     </entry>
12500                   </row>
12501                 </tbody>
12502               </tgroup>
12503             </informaltable>
12504             <para>
12505               This example shows two addresses for
12506               <literal>XX.LCS.MIT.EDU</literal>, each of a different class.
12507             </para>
12508           </sect3>
12509         </sect2>
12510
12511         <sect2>
12512           <title>Discussion of MX Records</title>
12513
12514           <para>
12515             As described above, domain servers store information as a
12516             series of resource records, each of which contains a particular
12517             piece of information about a given domain name (which is usually,
12518             but not always, a host). The simplest way to think of a RR is as
12519             a typed pair of data, a domain name matched with a relevant datum,
12520             and stored with some additional type information to help systems
12521             determine when the RR is relevant.
12522           </para>
12523
12524           <para>
12525             MX records are used to control delivery of email. The data
12526             specified in the record is a priority and a domain name. The
12527             priority
12528             controls the order in which email delivery is attempted, with the
12529             lowest number first. If two priorities are the same, a server is
12530             chosen randomly. If no servers at a given priority are responding,
12531             the mail transport agent will fall back to the next largest
12532             priority.
12533             Priority numbers do not have any absolute meaning &mdash; they are
12534             relevant
12535             only respective to other MX records for that domain name. The
12536             domain
12537             name given is the machine to which the mail will be delivered.
12538             It <emphasis>must</emphasis> have an associated address record
12539             (A or AAAA) &mdash; CNAME is not sufficient.
12540           </para>
12541           <para>
12542             For a given domain, if there is both a CNAME record and an
12543             MX record, the MX record is in error, and will be ignored.
12544             Instead,
12545             the mail will be delivered to the server specified in the MX
12546             record
12547             pointed to by the CNAME.
12548             For example:
12549           </para>
12550           <informaltable colsep="0" rowsep="0">
12551             <tgroup cols="5" colsep="0" rowsep="0" tgroupstyle="3Level-table">
12552               <colspec colname="1" colnum="1" colsep="0" colwidth="1.708in"/>
12553               <colspec colname="2" colnum="2" colsep="0" colwidth="0.444in"/>
12554               <colspec colname="3" colnum="3" colsep="0" colwidth="0.444in"/>
12555               <colspec colname="4" colnum="4" colsep="0" colwidth="0.976in"/>
12556               <colspec colname="5" colnum="5" colsep="0" colwidth="1.553in"/>
12557               <tbody>
12558                 <row rowsep="0">
12559                   <entry colname="1">
12560                     <para>
12561                       <literal>example.com.</literal>
12562                     </para>
12563                   </entry>
12564                   <entry colname="2">
12565                     <para>
12566                       <literal>IN</literal>
12567                     </para>
12568                   </entry>
12569                   <entry colname="3">
12570                     <para>
12571                       <literal>MX</literal>
12572                     </para>
12573                   </entry>
12574                   <entry colname="4">
12575                     <para>
12576                       <literal>10</literal>
12577                     </para>
12578                   </entry>
12579                   <entry colname="5">
12580                     <para>
12581                       <literal>mail.example.com.</literal>
12582                     </para>
12583                   </entry>
12584                 </row>
12585                 <row rowsep="0">
12586                   <entry colname="1">
12587                     <para/>
12588                   </entry>
12589                   <entry colname="2">
12590                     <para>
12591                       <literal>IN</literal>
12592                     </para>
12593                   </entry>
12594                   <entry colname="3">
12595                     <para>
12596                       <literal>MX</literal>
12597                     </para>
12598                   </entry>
12599                   <entry colname="4">
12600                     <para>
12601                       <literal>10</literal>
12602                     </para>
12603                   </entry>
12604                   <entry colname="5">
12605                     <para>
12606                       <literal>mail2.example.com.</literal>
12607                     </para>
12608                   </entry>
12609                 </row>
12610                 <row rowsep="0">
12611                   <entry colname="1">
12612                     <para/>
12613                   </entry>
12614                   <entry colname="2">
12615                     <para>
12616                       <literal>IN</literal>
12617                     </para>
12618                   </entry>
12619                   <entry colname="3">
12620                     <para>
12621                       <literal>MX</literal>
12622                     </para>
12623                   </entry>
12624                   <entry colname="4">
12625                     <para>
12626                       <literal>20</literal>
12627                     </para>
12628                   </entry>
12629                   <entry colname="5">
12630                     <para>
12631                       <literal>mail.backup.org.</literal>
12632                     </para>
12633                   </entry>
12634                 </row>
12635                 <row rowsep="0">
12636                   <entry colname="1">
12637                     <para>
12638                       <literal>mail.example.com.</literal>
12639                     </para>
12640                   </entry>
12641                   <entry colname="2">
12642                     <para>
12643                       <literal>IN</literal>
12644                     </para>
12645                   </entry>
12646                   <entry colname="3">
12647                     <para>
12648                       <literal>A</literal>
12649                     </para>
12650                   </entry>
12651                   <entry colname="4">
12652                     <para>
12653                       <literal>10.0.0.1</literal>
12654                     </para>
12655                   </entry>
12656                   <entry colname="5">
12657                     <para/>
12658                   </entry>
12659                 </row>
12660                 <row rowsep="0">
12661                   <entry colname="1">
12662                     <para>
12663                       <literal>mail2.example.com.</literal>
12664                     </para>
12665                   </entry>
12666                   <entry colname="2">
12667                     <para>
12668                       <literal>IN</literal>
12669                     </para>
12670                   </entry>
12671                   <entry colname="3">
12672                     <para>
12673                       <literal>A</literal>
12674                     </para>
12675                   </entry>
12676                   <entry colname="4">
12677                     <para>
12678                       <literal>10.0.0.2</literal>
12679                     </para>
12680                   </entry>
12681                   <entry colname="5">
12682                     <para/>
12683                   </entry>
12684                 </row>
12685               </tbody>
12686             </tgroup>
12687             </informaltable><para>
12688             Mail delivery will be attempted to <literal>mail.example.com</literal> and
12689             <literal>mail2.example.com</literal> (in
12690             any order), and if neither of those succeed, delivery to <literal>mail.backup.org</literal> will
12691             be attempted.
12692           </para>
12693         </sect2>
12694         <sect2 id="Setting_TTLs">
12695           <title>Setting TTLs</title>
12696           <para>
12697             The time-to-live of the RR field is a 32-bit integer represented
12698             in units of seconds, and is primarily used by resolvers when they
12699             cache RRs. The TTL describes how long a RR can be cached before it
12700             should be discarded. The following three types of TTL are
12701             currently
12702             used in a zone file.
12703           </para>
12704           <informaltable colsep="0" rowsep="0">
12705             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
12706               <colspec colname="1" colnum="1" colsep="0" colwidth="0.750in"/>
12707               <colspec colname="2" colnum="2" colsep="0" colwidth="4.375in"/>
12708               <tbody>
12709                 <row rowsep="0">
12710                   <entry colname="1">
12711                     <para>
12712                       SOA
12713                     </para>
12714                   </entry>
12715                   <entry colname="2">
12716                     <para>
12717                       The last field in the SOA is the negative
12718                       caching TTL. This controls how long other servers will
12719                       cache no-such-domain
12720                       (NXDOMAIN) responses from you.
12721                     </para>
12722                     <para>
12723                       The maximum time for
12724                       negative caching is 3 hours (3h).
12725                     </para>
12726                   </entry>
12727                 </row>
12728                 <row rowsep="0">
12729                   <entry colname="1">
12730                     <para>
12731                       $TTL
12732                     </para>
12733                   </entry>
12734                   <entry colname="2">
12735                     <para>
12736                       The $TTL directive at the top of the
12737                       zone file (before the SOA) gives a default TTL for every
12738                       RR without
12739                       a specific TTL set.
12740                     </para>
12741                   </entry>
12742                 </row>
12743                 <row rowsep="0">
12744                   <entry colname="1">
12745                     <para>
12746                       RR TTLs
12747                     </para>
12748                   </entry>
12749                   <entry colname="2">
12750                     <para>
12751                       Each RR can have a TTL as the second
12752                       field in the RR, which will control how long other
12753                       servers can cache
12754                       the it.
12755                     </para>
12756                   </entry>
12757                 </row>
12758               </tbody>
12759             </tgroup>
12760           </informaltable>
12761           <para>
12762             All of these TTLs default to units of seconds, though units
12763             can be explicitly specified, for example, <literal>1h30m</literal>.
12764           </para>
12765         </sect2>
12766         <sect2>
12767           <title>Inverse Mapping in IPv4</title>
12768           <para>
12769             Reverse name resolution (that is, translation from IP address
12770             to name) is achieved by means of the <emphasis>in-addr.arpa</emphasis> domain
12771             and PTR records. Entries in the in-addr.arpa domain are made in
12772             least-to-most significant order, read left to right. This is the
12773             opposite order to the way IP addresses are usually written. Thus,
12774             a machine with an IP address of 10.1.2.3 would have a
12775             corresponding
12776             in-addr.arpa name of
12777             3.2.1.10.in-addr.arpa. This name should have a PTR resource record
12778             whose data field is the name of the machine or, optionally,
12779             multiple
12780             PTR records if the machine has more than one name. For example,
12781             in the <optional>example.com</optional> domain:
12782           </para>
12783           <informaltable colsep="0" rowsep="0">
12784             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
12785               <colspec colname="1" colnum="1" colsep="0" colwidth="1.125in"/>
12786               <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
12787               <tbody>
12788                 <row rowsep="0">
12789                   <entry colname="1">
12790                     <para>
12791                       <literal>$ORIGIN</literal>
12792                     </para>
12793                   </entry>
12794                   <entry colname="2">
12795                     <para>
12796                       <literal>2.1.10.in-addr.arpa</literal>
12797                     </para>
12798                   </entry>
12799                 </row>
12800                 <row rowsep="0">
12801                   <entry colname="1">
12802                     <para>
12803                       <literal>3</literal>
12804                     </para>
12805                   </entry>
12806                   <entry colname="2">
12807                     <para>
12808                       <literal>IN PTR foo.example.com.</literal>
12809                     </para>
12810                   </entry>
12811                 </row>
12812               </tbody>
12813             </tgroup>
12814           </informaltable>
12815           <note>
12816             <para>
12817               The <command>$ORIGIN</command> lines in the examples
12818               are for providing context to the examples only &mdash; they do not
12819               necessarily
12820               appear in the actual usage. They are only used here to indicate
12821               that the example is relative to the listed origin.
12822             </para>
12823           </note>
12824         </sect2>
12825         <sect2>
12826           <title>Other Zone File Directives</title>
12827           <para>
12828             The Master File Format was initially defined in RFC 1035 and
12829             has subsequently been extended. While the Master File Format
12830             itself
12831             is class independent all records in a Master File must be of the
12832             same
12833             class.
12834           </para>
12835           <para>
12836             Master File Directives include <command>$ORIGIN</command>, <command>$INCLUDE</command>,
12837             and <command>$TTL.</command>
12838           </para>
12839           <sect3>
12840             <title>The <command>@</command> (at-sign)</title>
12841             <para>
12842               When used in the label (or name) field, the asperand or
12843               at-sign (@) symbol represents the current origin.
12844               At the start of the zone file, it is the 
12845               &lt;<varname>zone_name</varname>&gt; (followed by
12846               trailing dot).
12847             </para>
12848           </sect3>
12849           <sect3>
12850             <title>The <command>$ORIGIN</command> Directive</title>
12851             <para>
12852               Syntax: <command>$ORIGIN</command>
12853               <replaceable>domain-name</replaceable>
12854               <optional><replaceable>comment</replaceable></optional>
12855             </para>
12856             <para><command>$ORIGIN</command>
12857               sets the domain name that will be appended to any
12858               unqualified records. When a zone is first read in there
12859               is an implicit <command>$ORIGIN</command>
12860               &lt;<varname>zone_name</varname>&gt;<command>.</command>
12861               (followed by trailing dot).
12862               The current <command>$ORIGIN</command> is appended to
12863               the domain specified in the <command>$ORIGIN</command>
12864               argument if it is not absolute.
12865             </para>
12866
12867 <programlisting>
12868 $ORIGIN example.com.
12869 WWW     CNAME   MAIN-SERVER
12870 </programlisting>
12871
12872             <para>
12873               is equivalent to
12874             </para>
12875
12876 <programlisting>
12877 WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
12878 </programlisting>
12879
12880           </sect3>
12881           <sect3>
12882             <title>The <command>$INCLUDE</command> Directive</title>
12883             <para>
12884               Syntax: <command>$INCLUDE</command>
12885               <replaceable>filename</replaceable>
12886               <optional>
12887 <replaceable>origin</replaceable> </optional>
12888               <optional> <replaceable>comment</replaceable> </optional>
12889             </para>
12890             <para>
12891               Read and process the file <filename>filename</filename> as
12892               if it were included into the file at this point.  If <command>origin</command> is
12893               specified the file is processed with <command>$ORIGIN</command> set
12894               to that value, otherwise the current <command>$ORIGIN</command> is
12895               used.
12896             </para>
12897             <para>
12898               The origin and the current domain name
12899               revert to the values they had prior to the <command>$INCLUDE</command> once
12900               the file has been read.
12901             </para>
12902             <note>
12903               <para>
12904                 RFC 1035 specifies that the current origin should be restored
12905                 after
12906                 an <command>$INCLUDE</command>, but it is silent
12907                 on whether the current
12908                 domain name should also be restored.  BIND 9 restores both of
12909                 them.
12910                 This could be construed as a deviation from RFC 1035, a
12911                 feature, or both.
12912               </para>
12913             </note>
12914           </sect3>
12915           <sect3>
12916             <title>The <command>$TTL</command> Directive</title>
12917             <para>
12918               Syntax: <command>$TTL</command>
12919               <replaceable>default-ttl</replaceable>
12920               <optional>
12921 <replaceable>comment</replaceable> </optional>
12922             </para>
12923             <para>
12924               Set the default Time To Live (TTL) for subsequent records
12925               with undefined TTLs. Valid TTLs are of the range 0-2147483647
12926               seconds.
12927             </para>
12928             <para><command>$TTL</command>
12929                is defined in RFC 2308.
12930             </para>
12931           </sect3>
12932         </sect2>
12933         <sect2>
12934           <title><acronym>BIND</acronym> Master File Extension: the  <command>$GENERATE</command> Directive</title>
12935           <para>
12936             Syntax: <command>$GENERATE</command>
12937             <replaceable>range</replaceable>
12938             <replaceable>lhs</replaceable>
12939             <optional><replaceable>ttl</replaceable></optional>
12940             <optional><replaceable>class</replaceable></optional>
12941             <replaceable>type</replaceable>
12942             <replaceable>rhs</replaceable>
12943             <optional><replaceable>comment</replaceable></optional>
12944           </para>
12945           <para><command>$GENERATE</command>
12946             is used to create a series of resource records that only
12947             differ from each other by an
12948             iterator. <command>$GENERATE</command> can be used to
12949             easily generate the sets of records required to support
12950             sub /24 reverse delegations described in RFC 2317:
12951             Classless IN-ADDR.ARPA delegation.
12952           </para>
12953
12954 <programlisting>$ORIGIN 0.0.192.IN-ADDR.ARPA.
12955 $GENERATE 1-2 @ NS SERVER$.EXAMPLE.
12956 $GENERATE 1-127 $ CNAME $.0</programlisting>
12957
12958           <para>
12959             is equivalent to
12960           </para>
12961
12962 <programlisting>0.0.0.192.IN-ADDR.ARPA. NS SERVER1.EXAMPLE.
12963 0.0.0.192.IN-ADDR.ARPA. NS SERVER2.EXAMPLE.
12964 1.0.0.192.IN-ADDR.ARPA. CNAME 1.0.0.0.192.IN-ADDR.ARPA.
12965 2.0.0.192.IN-ADDR.ARPA. CNAME 2.0.0.0.192.IN-ADDR.ARPA.
12966 ...
12967 127.0.0.192.IN-ADDR.ARPA. CNAME 127.0.0.0.192.IN-ADDR.ARPA.
12968 </programlisting>
12969
12970            <para>
12971             Generate a set of A and MX records.  Note the MX's right hand
12972             side is a quoted string.  The quotes will be stripped when the
12973             right hand side is processed.
12974            </para>
12975
12976 <programlisting>
12977 $ORIGIN EXAMPLE.
12978 $GENERATE 1-127 HOST-$ A 1.2.3.$
12979 $GENERATE 1-127 HOST-$ MX "0 ."</programlisting>
12980
12981           <para>
12982             is equivalent to
12983           </para>
12984
12985 <programlisting>HOST-1.EXAMPLE.   A  1.2.3.1
12986 HOST-1.EXAMPLE.   MX 0 .
12987 HOST-2.EXAMPLE.   A  1.2.3.2
12988 HOST-2.EXAMPLE.   MX 0 .
12989 HOST-3.EXAMPLE.   A  1.2.3.3
12990 HOST-3.EXAMPLE.   MX 0 .
12991 ...
12992 HOST-127.EXAMPLE. A  1.2.3.127
12993 HOST-127.EXAMPLE. MX 0 .
12994 </programlisting>
12995
12996           <informaltable colsep="0" rowsep="0">
12997             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
12998                         <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
12999               <colspec colname="2" colnum="2" colsep="0" colwidth="4.250in"/>
13000               <tbody>
13001                 <row rowsep="0">
13002                   <entry colname="1">
13003                     <para><command>range</command></para>
13004                   </entry>
13005                   <entry colname="2">
13006                     <para>
13007                       This can be one of two forms: start-stop
13008                       or start-stop/step. If the first form is used, then step
13009                       is set to
13010                       1. All of start, stop and step must be positive.
13011                     </para>
13012                   </entry>
13013                 </row>
13014                 <row rowsep="0">
13015                   <entry colname="1">
13016                     <para><command>lhs</command></para>
13017                   </entry>
13018                   <entry colname="2">
13019                     <para>This
13020                       describes the owner name of the resource records
13021                       to be created.  Any single <command>$</command>
13022                       (dollar sign)
13023                       symbols within the <command>lhs</command> string
13024                       are replaced by the iterator value.
13025
13026                       To get a $ in the output, you need to escape the
13027                       <command>$</command> using a backslash
13028                       <command>\</command>,
13029                       e.g. <command>\$</command>. The
13030                       <command>$</command> may optionally be followed
13031                       by modifiers which change the offset from the
13032                       iterator, field width and base.
13033
13034                       Modifiers are introduced by a
13035                       <command>{</command> (left brace) immediately following the
13036                       <command>$</command> as
13037                       <command>${offset[,width[,base]]}</command>.
13038                       For example, <command>${-20,3,d}</command>
13039                       subtracts 20 from the current value, prints the
13040                       result as a decimal in a zero-padded field of
13041                       width 3.
13042
13043                       Available output forms are decimal
13044                       (<command>d</command>), octal
13045                       (<command>o</command>), hexadecimal
13046                       (<command>x</command> or <command>X</command>
13047                       for uppercase) and nibble
13048                       (<command>n</command> or <command>N</command>\
13049                       for uppercase).  The default modifier is
13050                       <command>${0,0,d}</command>.  If the
13051                       <command>lhs</command> is not absolute, the
13052                       current <command>$ORIGIN</command> is appended
13053                       to the name.
13054                     </para>
13055                     <para>
13056                       In nibble mode the value will be treated as
13057                       if it was a reversed hexadecimal string
13058                       with each hexadecimal digit as a separate
13059                       label.  The width field includes the label
13060                       separator.
13061                     </para>
13062                     <para>
13063                       For compatibility with earlier versions,
13064                       <command>$$</command> is still recognized as
13065                       indicating a literal $ in the output.
13066                     </para>
13067                   </entry>
13068                 </row>
13069                 <row rowsep="0">
13070                   <entry colname="1">
13071                     <para><command>ttl</command></para>
13072                   </entry>
13073                   <entry colname="2">
13074                     <para>
13075                       Specifies the time-to-live of the generated records. If
13076                       not specified this will be inherited using the
13077                       normal TTL inheritance rules.
13078                     </para>
13079                     <para><command>class</command>
13080                       and <command>ttl</command> can be
13081                       entered in either order.
13082                     </para>
13083                   </entry>
13084                 </row>
13085                 <row rowsep="0">
13086                   <entry colname="1">
13087                     <para><command>class</command></para>
13088                   </entry>
13089                   <entry colname="2">
13090                     <para>
13091                       Specifies the class of the generated records.
13092                       This must match the zone class if it is
13093                       specified.
13094                     </para>
13095                     <para><command>class</command>
13096                       and <command>ttl</command> can be
13097                       entered in either order.
13098                     </para>
13099                   </entry>
13100                 </row>
13101                 <row rowsep="0">
13102                   <entry colname="1">
13103                     <para><command>type</command></para>
13104                   </entry>
13105                   <entry colname="2">
13106                     <para>
13107                       Any valid type.
13108                     </para>
13109                   </entry>
13110                 </row>
13111                 <row rowsep="0">
13112                   <entry colname="1">
13113                     <para><command>rhs</command></para>
13114                   </entry>
13115                   <entry colname="2">
13116                     <para>
13117                       <command>rhs</command>, optionally, quoted string.
13118                     </para>
13119                   </entry>
13120                 </row>
13121               </tbody>
13122             </tgroup>
13123           </informaltable>
13124           <para>
13125             The <command>$GENERATE</command> directive is a <acronym>BIND</acronym> extension
13126             and not part of the standard zone file format.
13127           </para>
13128           <para>
13129             BIND 8 does not support the optional TTL and CLASS fields.
13130           </para>
13131         </sect2>
13132
13133         <sect2 id="zonefile_format">
13134           <title>Additional File Formats</title>
13135           <para>
13136             In addition to the standard textual format, BIND 9
13137             supports the ability to read or dump to zone files in
13138             other formats.  The <constant>raw</constant> format is
13139             currently available as an additional format.  It is a
13140             binary format representing BIND 9's internal data
13141             structure directly, thereby remarkably improving the
13142             loading time.
13143           </para>
13144           <para>
13145             For a primary server, a zone file in the
13146             <constant>raw</constant> format is expected to be
13147             generated from a textual zone file by the
13148             <command>named-compilezone</command> command.  For a
13149             secondary server or for a dynamic zone, it is automatically
13150             generated (if this format is specified by the
13151             <command>masterfile-format</command> option) when
13152             <command>named</command> dumps the zone contents after
13153             zone transfer or when applying prior updates.
13154           </para>
13155           <para>
13156             If a zone file in a binary format needs manual modification,
13157             it first must be converted to a textual form by the
13158             <command>named-compilezone</command> command.  All
13159             necessary modification should go to the text file, which
13160             should then be converted to the binary form by the
13161             <command>named-compilezone</command> command again.
13162           </para>
13163           <para>
13164              Although the <constant>raw</constant> format uses the
13165              network byte order and avoids architecture-dependent
13166              data alignment so that it is as much portable as
13167              possible, it is primarily expected to be used inside
13168              the same single system.  In order to export a zone
13169              file in the <constant>raw</constant> format or make a
13170              portable backup of the file, it is recommended to
13171              convert the file to the standard textual representation.
13172           </para>
13173         </sect2>
13174       </sect1>
13175
13176       <sect1 id="statistics">
13177         <title>BIND9 Statistics</title>
13178         <para>
13179           <acronym>BIND</acronym> 9 maintains lots of statistics
13180           information and provides several interfaces for users to
13181           get access to the statistics.
13182           The available statistics include all statistics counters
13183           that were available in <acronym>BIND</acronym> 8 and
13184           are meaningful in <acronym>BIND</acronym> 9,
13185           and other information that is considered useful.
13186         </para>
13187
13188         <para>
13189           The statistics information is categorized into the following
13190           sections.
13191         </para>
13192
13193         <informaltable frame="all">
13194           <tgroup cols="2">
13195             <colspec colname="1" colnum="1" colsep="0" colwidth="3.300in"/>
13196             <colspec colname="2" colnum="2" colsep="0" colwidth="2.625in"/>
13197             <tbody>
13198
13199               <row rowsep="0">
13200                 <entry colname="1">
13201                   <para>Incoming Requests</para>
13202                 </entry>
13203                 <entry colname="2">
13204                   <para>
13205                     The number of incoming DNS requests for each OPCODE.
13206                   </para>
13207                 </entry>
13208               </row>
13209
13210               <row rowsep="0">
13211                 <entry colname="1">
13212                   <para>Incoming Queries</para>
13213                 </entry>
13214                 <entry colname="2">
13215                   <para>
13216                     The number of incoming queries for each RR type.
13217                   </para>
13218                 </entry>
13219               </row>
13220
13221               <row rowsep="0">
13222                 <entry colname="1">
13223                   <para>Outgoing Queries</para>
13224                 </entry>
13225                 <entry colname="2">
13226                   <para>
13227                     The number of outgoing queries for each RR
13228                     type sent from the internal resolver.
13229                     Maintained per view.
13230                   </para>
13231                 </entry>
13232               </row>
13233
13234               <row rowsep="0">
13235                 <entry colname="1">
13236                   <para>Name Server Statistics</para>
13237                 </entry>
13238                 <entry colname="2">
13239                   <para>
13240                     Statistics counters about incoming request processing.
13241                   </para>
13242                 </entry>
13243               </row>
13244
13245               <row rowsep="0">
13246                 <entry colname="1">
13247                   <para>Zone Maintenance Statistics</para>
13248                 </entry>
13249                 <entry colname="2">
13250                   <para>
13251                     Statistics counters regarding zone maintenance
13252                     operations such as zone transfers.
13253                   </para>
13254                 </entry>
13255               </row>
13256
13257               <row rowsep="0">
13258                 <entry colname="1">
13259                   <para>Resolver Statistics</para>
13260                 </entry>
13261                 <entry colname="2">
13262                   <para>
13263                     Statistics counters about name resolution
13264                     performed in the internal resolver.
13265                     Maintained per view.
13266                   </para>
13267                 </entry>
13268               </row>
13269
13270               <row rowsep="0">
13271                 <entry colname="1">
13272                   <para>Cache DB RRsets</para>
13273                 </entry>
13274                 <entry colname="2">
13275                   <para>
13276                     The number of RRsets per RR type and nonexistent
13277                     names stored in the cache database.
13278                     If the exclamation mark (!) is printed for a RR
13279                     type, it means that particular type of RRset is
13280                     known to be nonexistent (this is also known as
13281                     "NXRRSET").
13282                     Maintained per view.
13283                   </para>
13284                 </entry>
13285               </row>
13286
13287               <row rowsep="0">
13288                 <entry colname="1">
13289                   <para>Socket I/O Statistics</para>
13290                 </entry>
13291                 <entry colname="2">
13292                   <para>
13293                     Statistics counters about network related events.
13294                   </para>
13295                 </entry>
13296               </row>
13297
13298             </tbody>
13299           </tgroup>
13300         </informaltable>
13301
13302         <para>
13303           A subset of Name Server Statistics is collected and shown
13304           per zone for which the server has the authority when
13305           <command>zone-statistics</command> is set to
13306           <userinput>yes</userinput>.
13307           These statistics counters are shown with their zone and view
13308           names.
13309           In some cases the view names are omitted for the default view.
13310         </para>
13311
13312         <para>
13313           There are currently two user interfaces to get access to the
13314           statistics.
13315           One is in the plain text format dumped to the file specified
13316           by the <command>statistics-file</command> configuration option.
13317           The other is remotely accessible via a statistics channel
13318           when the <command>statistics-channels</command> statement
13319           is specified in the configuration file
13320           (see <xref linkend="statschannels"/>.)
13321         </para>
13322
13323         <sect3 id="statsfile">
13324           <title>The Statistics File</title>
13325           <para>
13326             The text format statistics dump begins with a line, like:
13327           </para>
13328           <para>
13329             <command>+++ Statistics Dump +++ (973798949)</command>
13330           </para>
13331           <para>
13332             The number in parentheses is a standard
13333             Unix-style timestamp, measured as seconds since January 1, 1970.
13334
13335             Following
13336             that line is a set of statistics information, which is categorized
13337             as described above.
13338             Each section begins with a line, like:
13339           </para>
13340
13341           <para>
13342             <command>++ Name Server Statistics ++</command>
13343           </para>
13344
13345           <para>
13346             Each section consists of lines, each containing the statistics
13347             counter value followed by its textual description.
13348             See below for available counters.
13349             For brevity, counters that have a value of 0 are not shown
13350             in the statistics file.
13351           </para>
13352
13353           <para>
13354             The statistics dump ends with the line where the
13355             number is identical to the number in the beginning line; for example:
13356           </para>
13357           <para>
13358             <command>--- Statistics Dump --- (973798949)</command>
13359           </para>
13360         </sect3>
13361
13362         <sect2 id="statistics_counters">
13363           <title>Statistics Counters</title>
13364           <para>
13365             The following tables summarize statistics counters that
13366             <acronym>BIND</acronym> 9 provides.
13367             For each row of the tables, the leftmost column is the
13368             abbreviated symbol name of that counter.
13369             These symbols are shown in the statistics information
13370             accessed via an HTTP statistics channel.
13371             The rightmost column gives the description of the counter,
13372             which is also shown in the statistics file
13373             (but, in this document, possibly with slight modification
13374             for better readability).
13375             Additional notes may also be provided in this column.
13376             When a middle column exists between these two columns,
13377             it gives the corresponding counter name of the
13378             <acronym>BIND</acronym> 8 statistics, if applicable.
13379           </para>
13380
13381           <sect3>
13382             <title>Name Server Statistics Counters</title>
13383
13384             <informaltable colsep="0" rowsep="0">
13385               <tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
13386                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
13387                 <colspec colname="2" colnum="2" colsep="0" colwidth="1.150in"/>
13388                 <colspec colname="3" colnum="3" colsep="0" colwidth="3.350in"/>
13389                 <tbody>
13390                   <row>
13391                     <entry colname="1">
13392                       <para>
13393                         <emphasis>Symbol</emphasis>
13394                       </para>
13395                     </entry>
13396                     <entry colname="2">
13397                       <para>
13398                         <emphasis>BIND8 Symbol</emphasis>
13399                       </para>
13400                     </entry>
13401                     <entry colname="3">
13402                       <para>
13403                         <emphasis>Description</emphasis>
13404                       </para>
13405                     </entry>
13406                   </row>
13407
13408                   <row rowsep="0">
13409                     <entry colname="1">
13410                       <para><command>Requestv4</command></para>
13411                     </entry>
13412                     <entry colname="2">
13413                       <para><command>RQ</command></para>
13414                     </entry>
13415                     <entry colname="3">
13416                       <para>
13417                         IPv4 requests received.
13418                         Note: this also counts non query requests.
13419                       </para>
13420                     </entry>
13421                   </row>
13422                   <row rowsep="0">
13423                     <entry colname="1">
13424                       <para><command>Requestv6</command></para>
13425                     </entry>
13426                     <entry colname="2">
13427                       <para><command>RQ</command></para>
13428                     </entry>
13429                     <entry colname="3">
13430                       <para>
13431                         IPv6 requests received.
13432                         Note: this also counts non query requests.
13433                       </para>
13434                     </entry>
13435                   </row>
13436                   <row rowsep="0">
13437                     <entry colname="1">
13438                       <para><command>ReqEdns0</command></para>
13439                     </entry>
13440                     <entry colname="2">
13441                       <para><command></command></para>
13442                     </entry>
13443                     <entry colname="3">
13444                       <para>
13445                         Requests with EDNS(0) received.
13446                       </para>
13447                     </entry>
13448                   </row>
13449                   <row rowsep="0">
13450                     <entry colname="1">
13451                       <para><command>ReqBadEDNSVer</command></para>
13452                     </entry>
13453                     <entry colname="2">
13454                       <para><command></command></para>
13455                     </entry>
13456                     <entry colname="3">
13457                       <para>
13458                         Requests with unsupported EDNS version received.
13459                       </para>
13460                     </entry>
13461                   </row>
13462                   <row rowsep="0">
13463                     <entry colname="1">
13464                       <para><command>ReqTSIG</command></para>
13465                     </entry>
13466                     <entry colname="2">
13467                       <para><command></command></para>
13468                     </entry>
13469                     <entry colname="3">
13470                       <para>
13471                         Requests with TSIG received.
13472                       </para>
13473                     </entry>
13474                   </row>
13475                   <row rowsep="0">
13476                     <entry colname="1">
13477                       <para><command>ReqSIG0</command></para>
13478                     </entry>
13479                     <entry colname="2">
13480                       <para><command></command></para>
13481                     </entry>
13482                     <entry colname="3">
13483                       <para>
13484                         Requests with SIG(0) received.
13485                       </para>
13486                     </entry>
13487                   </row>
13488                   <row rowsep="0">
13489                     <entry colname="1">
13490                       <para><command>ReqBadSIG</command></para>
13491                     </entry>
13492                     <entry colname="2">
13493                       <para><command></command></para>
13494                     </entry>
13495                     <entry colname="3">
13496                       <para>
13497                         Requests with invalid (TSIG or SIG(0)) signature.
13498                       </para>
13499                     </entry>
13500                   </row>
13501                   <row rowsep="0">
13502                     <entry colname="1">
13503                       <para><command>ReqTCP</command></para>
13504                     </entry>
13505                     <entry colname="2">
13506                       <para><command>RTCP</command></para>
13507                     </entry>
13508                     <entry colname="3">
13509                       <para>
13510                         TCP requests received.
13511                       </para>
13512                     </entry>
13513                   </row>
13514                   <row rowsep="0">
13515                     <entry colname="1">
13516                       <para><command>AuthQryRej</command></para>
13517                     </entry>
13518                     <entry colname="2">
13519                       <para><command>RUQ</command></para>
13520                     </entry>
13521                     <entry colname="3">
13522                       <para>
13523                         Authoritative (non recursive) queries rejected.
13524                       </para>
13525                     </entry>
13526                   </row>
13527                   <row rowsep="0">
13528                     <entry colname="1">
13529                       <para><command>RecQryRej</command></para>
13530                     </entry>
13531                     <entry colname="2">
13532                       <para><command>RURQ</command></para>
13533                     </entry>
13534                     <entry colname="3">
13535                       <para>
13536                         Recursive queries rejected.
13537                       </para>
13538                     </entry>
13539                   </row>
13540                   <row rowsep="0">
13541                     <entry colname="1">
13542                       <para><command>XfrRej</command></para>
13543                     </entry>
13544                     <entry colname="2">
13545                       <para><command>RUXFR</command></para>
13546                     </entry>
13547                     <entry colname="3">
13548                       <para>
13549                         Zone transfer requests rejected.
13550                       </para>
13551                     </entry>
13552                   </row>
13553                   <row rowsep="0">
13554                     <entry colname="1">
13555                       <para><command>UpdateRej</command></para>
13556                     </entry>
13557                     <entry colname="2">
13558                       <para><command>RUUpd</command></para>
13559                     </entry>
13560                     <entry colname="3">
13561                       <para>
13562                         Dynamic update requests rejected.
13563                       </para>
13564                     </entry>
13565                   </row>
13566                   <row rowsep="0">
13567                     <entry colname="1">
13568                       <para><command>Response</command></para>
13569                     </entry>
13570                     <entry colname="2">
13571                       <para><command>SAns</command></para>
13572                     </entry>
13573                     <entry colname="3">
13574                       <para>
13575                         Responses sent.
13576                       </para>
13577                     </entry>
13578                   </row>
13579                   <row rowsep="0">
13580                     <entry colname="1">
13581                       <para><command>RespTruncated</command></para>
13582                     </entry>
13583                     <entry colname="2">
13584                       <para><command></command></para>
13585                     </entry>
13586                     <entry colname="3">
13587                       <para>
13588                         Truncated responses sent.
13589                       </para>
13590                     </entry>
13591                   </row>
13592                   <row rowsep="0">
13593                     <entry colname="1">
13594                       <para><command>RespEDNS0</command></para>
13595                     </entry>
13596                     <entry colname="2">
13597                       <para><command></command></para>
13598                     </entry>
13599                     <entry colname="3">
13600                       <para>
13601                         Responses with EDNS(0) sent.
13602                       </para>
13603                     </entry>
13604                   </row>
13605                   <row rowsep="0">
13606                     <entry colname="1">
13607                       <para><command>RespTSIG</command></para>
13608                     </entry>
13609                     <entry colname="2">
13610                       <para><command></command></para>
13611                     </entry>
13612                     <entry colname="3">
13613                       <para>
13614                         Responses with TSIG sent.
13615                       </para>
13616                     </entry>
13617                   </row>
13618                   <row rowsep="0">
13619                     <entry colname="1">
13620                       <para><command>RespSIG0</command></para>
13621                     </entry>
13622                     <entry colname="2">
13623                       <para><command></command></para>
13624                     </entry>
13625                     <entry colname="3">
13626                       <para>
13627                         Responses with SIG(0) sent.
13628                       </para>
13629                     </entry>
13630                   </row>
13631                   <row rowsep="0">
13632                     <entry colname="1">
13633                       <para><command>QrySuccess</command></para>
13634                     </entry>
13635                     <entry colname="2">
13636                       <para><command></command></para>
13637                     </entry>
13638                     <entry colname="3">
13639                       <para>
13640                         Queries resulted in a successful answer.
13641                         This means the query which returns a NOERROR response
13642                         with at least one answer RR.
13643                         This corresponds to the
13644                         <command>success</command> counter
13645                         of previous versions of
13646                         <acronym>BIND</acronym> 9.
13647                       </para>
13648                     </entry>
13649                   </row>
13650                   <row rowsep="0">
13651                     <entry colname="1">
13652                       <para><command>QryAuthAns</command></para>
13653                     </entry>
13654                     <entry colname="2">
13655                       <para><command></command></para>
13656                     </entry>
13657                     <entry colname="3">
13658                       <para>
13659                         Queries resulted in authoritative answer.
13660                       </para>
13661                     </entry>
13662                   </row>
13663                   <row rowsep="0">
13664                     <entry colname="1">
13665                       <para><command>QryNoauthAns</command></para>
13666                     </entry>
13667                     <entry colname="2">
13668                       <para><command>SNaAns</command></para>
13669                     </entry>
13670                     <entry colname="3">
13671                       <para>
13672                         Queries resulted in non authoritative answer.
13673                       </para>
13674                     </entry>
13675                   </row>
13676                   <row rowsep="0">
13677                     <entry colname="1">
13678                       <para><command>QryReferral</command></para>
13679                     </entry>
13680                     <entry colname="2">
13681                       <para><command></command></para>
13682                     </entry>
13683                     <entry colname="3">
13684                       <para>
13685                         Queries resulted in referral answer.
13686                         This corresponds to the
13687                         <command>referral</command> counter
13688                         of previous versions of
13689                         <acronym>BIND</acronym> 9.
13690                       </para>
13691                     </entry>
13692                   </row>
13693                   <row rowsep="0">
13694                     <entry colname="1">
13695                       <para><command>QryNxrrset</command></para>
13696                     </entry>
13697                     <entry colname="2">
13698                       <para><command></command></para>
13699                     </entry>
13700                     <entry colname="3">
13701                       <para>
13702                         Queries resulted in NOERROR responses with no data.
13703                         This corresponds to the
13704                         <command>nxrrset</command> counter
13705                         of previous versions of
13706                         <acronym>BIND</acronym> 9.
13707                       </para>
13708                     </entry>
13709                   </row>
13710                   <row rowsep="0">
13711                     <entry colname="1">
13712                       <para><command>QrySERVFAIL</command></para>
13713                     </entry>
13714                     <entry colname="2">
13715                       <para><command>SFail</command></para>
13716                     </entry>
13717                     <entry colname="3">
13718                       <para>
13719                         Queries resulted in SERVFAIL.
13720                       </para>
13721                     </entry>
13722                   </row>
13723                   <row rowsep="0">
13724                     <entry colname="1">
13725                       <para><command>QryFORMERR</command></para>
13726                     </entry>
13727                     <entry colname="2">
13728                       <para><command>SFErr</command></para>
13729                     </entry>
13730                     <entry colname="3">
13731                       <para>
13732                         Queries resulted in FORMERR.
13733                       </para>
13734                     </entry>
13735                   </row>
13736                   <row rowsep="0">
13737                     <entry colname="1">
13738                       <para><command>QryNXDOMAIN</command></para>
13739                     </entry>
13740                     <entry colname="2">
13741                       <para><command>SNXD</command></para>
13742                     </entry>
13743                     <entry colname="3">
13744                       <para>
13745                         Queries resulted in NXDOMAIN.
13746                         This corresponds to the
13747                         <command>nxdomain</command> counter
13748                         of previous versions of
13749                         <acronym>BIND</acronym> 9.
13750                       </para>
13751                     </entry>
13752                   </row>
13753                   <row rowsep="0">
13754                     <entry colname="1">
13755                       <para><command>QryRecursion</command></para>
13756                     </entry>
13757                     <entry colname="2">
13758                       <para><command>RFwdQ</command></para>
13759                     </entry>
13760                     <entry colname="3">
13761                       <para>
13762                         Queries which caused the server
13763                         to perform recursion in order to find the final answer.
13764                         This corresponds to the
13765                         <command>recursion</command> counter
13766                         of previous versions of
13767                         <acronym>BIND</acronym> 9.
13768                       </para>
13769                     </entry>
13770                   </row>
13771                   <row rowsep="0">
13772                     <entry colname="1">
13773                       <para><command>QryDuplicate</command></para>
13774                     </entry>
13775                     <entry colname="2">
13776                       <para><command>RDupQ</command></para>
13777                     </entry>
13778                     <entry colname="3">
13779                       <para>
13780                         Queries which the server attempted to
13781                         recurse but discovered an existing query with the same
13782                         IP address, port, query ID, name, type and class
13783                         already being processed.
13784                         This corresponds to the
13785                         <command>duplicate</command> counter
13786                         of previous versions of
13787                         <acronym>BIND</acronym> 9.
13788                       </para>
13789                     </entry>
13790                   </row>
13791                   <row rowsep="0">
13792                     <entry colname="1">
13793                       <para><command>QryDropped</command></para>
13794                     </entry>
13795                     <entry colname="2">
13796                       <para><command></command></para>
13797                     </entry>
13798                     <entry colname="3">
13799                       <para>
13800                         Recursive queries for which the server
13801                         discovered an excessive number of existing
13802                         recursive queries for the same name, type and
13803                         class and were subsequently dropped.
13804                         This is the number of dropped queries due to
13805                         the reason explained with the
13806                         <command>clients-per-query</command>
13807                         and
13808                         <command>max-clients-per-query</command>
13809                         options
13810                         (see the description about
13811                         <xref linkend="clients-per-query"/>.)
13812                         This corresponds to the
13813                         <command>dropped</command> counter
13814                         of previous versions of
13815                         <acronym>BIND</acronym> 9.
13816                       </para>
13817                     </entry>
13818                   </row>
13819                   <row rowsep="0">
13820                     <entry colname="1">
13821                       <para><command>QryFailure</command></para>
13822                     </entry>
13823                     <entry colname="2">
13824                       <para><command></command></para>
13825                     </entry>
13826                     <entry colname="3">
13827                       <para>
13828                         Other query failures.
13829                         This corresponds to the
13830                         <command>failure</command> counter
13831                         of previous versions of
13832                         <acronym>BIND</acronym> 9.
13833                         Note: this counter is provided mainly for
13834                         backward compatibility with the previous versions.
13835                         Normally a more fine-grained counters such as
13836                         <command>AuthQryRej</command> and
13837                         <command>RecQryRej</command>
13838                         that would also fall into this counter are provided,
13839                         and so this counter would not be of much
13840                         interest in practice.
13841                       </para>
13842                     </entry>
13843                   </row>
13844                   <row rowsep="0">
13845                     <entry colname="1">
13846                       <para><command>XfrReqDone</command></para>
13847                     </entry>
13848                     <entry colname="2">
13849                       <para><command></command></para>
13850                     </entry>
13851                     <entry colname="3">
13852                       <para>
13853                         Requested zone transfers completed.
13854                       </para>
13855                     </entry>
13856                   </row>
13857                   <row rowsep="0">
13858                     <entry colname="1">
13859                       <para><command>UpdateReqFwd</command></para>
13860                     </entry>
13861                     <entry colname="2">
13862                       <para><command></command></para>
13863                     </entry>
13864                     <entry colname="3">
13865                       <para>
13866                         Update requests forwarded.
13867                       </para>
13868                     </entry>
13869                   </row>
13870                   <row rowsep="0">
13871                     <entry colname="1">
13872                       <para><command>UpdateRespFwd</command></para>
13873                     </entry>
13874                     <entry colname="2">
13875                       <para><command></command></para>
13876                     </entry>
13877                     <entry colname="3">
13878                       <para>
13879                         Update responses forwarded.
13880                       </para>
13881                     </entry>
13882                   </row>
13883                   <row rowsep="0">
13884                     <entry colname="1">
13885                       <para><command>UpdateFwdFail</command></para>
13886                     </entry>
13887                     <entry colname="2">
13888                       <para><command></command></para>
13889                     </entry>
13890                     <entry colname="3">
13891                       <para>
13892                         Dynamic update forward failed.
13893                       </para>
13894                     </entry>
13895                   </row>
13896                   <row rowsep="0">
13897                     <entry colname="1">
13898                       <para><command>UpdateDone</command></para>
13899                     </entry>
13900                     <entry colname="2">
13901                       <para><command></command></para>
13902                     </entry>
13903                     <entry colname="3">
13904                       <para>
13905                         Dynamic updates completed.
13906                       </para>
13907                     </entry>
13908                   </row>
13909                   <row rowsep="0">
13910                     <entry colname="1">
13911                       <para><command>UpdateFail</command></para>
13912                     </entry>
13913                     <entry colname="2">
13914                       <para><command></command></para>
13915                     </entry>
13916                     <entry colname="3">
13917                       <para>
13918                         Dynamic updates failed.
13919                       </para>
13920                     </entry>
13921                   </row>
13922                   <row rowsep="0">
13923                     <entry colname="1">
13924                       <para><command>UpdateBadPrereq</command></para>
13925                     </entry>
13926                     <entry colname="2">
13927                       <para><command></command></para>
13928                     </entry>
13929                     <entry colname="3">
13930                       <para>
13931                         Dynamic updates rejected due to prerequisite failure.
13932                       </para>
13933                     </entry>
13934                   </row>
13935                 </tbody>
13936               </tgroup>
13937             </informaltable>
13938           </sect3>
13939
13940           <sect3>
13941             <title>Zone Maintenance Statistics Counters</title>
13942
13943             <informaltable colsep="0" rowsep="0">
13944               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
13945                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
13946                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
13947                 <tbody>
13948                   <row>
13949                     <entry colname="1">
13950                       <para>
13951                         <emphasis>Symbol</emphasis>
13952                       </para>
13953                     </entry>
13954                     <entry colname="2">
13955                       <para>
13956                         <emphasis>Description</emphasis>
13957                       </para>
13958                     </entry>
13959                   </row>
13960
13961                   <row rowsep="0">
13962                     <entry colname="1">
13963                       <para><command>NotifyOutv4</command></para>
13964                     </entry>
13965                     <entry colname="2">
13966                       <para>
13967                         IPv4 notifies sent.
13968                       </para>
13969                     </entry>
13970                   </row>
13971                   <row rowsep="0">
13972                     <entry colname="1">
13973                       <para><command>NotifyOutv6</command></para>
13974                     </entry>
13975                     <entry colname="2">
13976                       <para>
13977                         IPv6 notifies sent.
13978                       </para>
13979                     </entry>
13980                   </row>
13981                   <row rowsep="0">
13982                     <entry colname="1">
13983                       <para><command>NotifyInv4</command></para>
13984                     </entry>
13985                     <entry colname="2">
13986                       <para>
13987                         IPv4 notifies received.
13988                       </para>
13989                     </entry>
13990                   </row>
13991                   <row rowsep="0">
13992                     <entry colname="1">
13993                       <para><command>NotifyInv6</command></para>
13994                     </entry>
13995                     <entry colname="2">
13996                       <para>
13997                         IPv6 notifies received.
13998                       </para>
13999                     </entry>
14000                   </row>
14001                   <row rowsep="0">
14002                     <entry colname="1">
14003                       <para><command>NotifyRej</command></para>
14004                     </entry>
14005                     <entry colname="2">
14006                       <para>
14007                         Incoming notifies rejected.
14008                       </para>
14009                     </entry>
14010                   </row>
14011                   <row rowsep="0">
14012                     <entry colname="1">
14013                       <para><command>SOAOutv4</command></para>
14014                     </entry>
14015                     <entry colname="2">
14016                       <para>
14017                         IPv4 SOA queries sent.
14018                       </para>
14019                     </entry>
14020                   </row>
14021                   <row rowsep="0">
14022                     <entry colname="1">
14023                       <para><command>SOAOutv6</command></para>
14024                     </entry>
14025                     <entry colname="2">
14026                       <para>
14027                         IPv6 SOA queries sent.
14028                       </para>
14029                     </entry>
14030                   </row>
14031                   <row rowsep="0">
14032                     <entry colname="1">
14033                       <para><command>AXFRReqv4</command></para>
14034                     </entry>
14035                     <entry colname="2">
14036                       <para>
14037                         IPv4 AXFR requested.
14038                       </para>
14039                     </entry>
14040                   </row>
14041                   <row rowsep="0">
14042                     <entry colname="1">
14043                       <para><command>AXFRReqv6</command></para>
14044                     </entry>
14045                     <entry colname="2">
14046                       <para>
14047                         IPv6 AXFR requested.
14048                       </para>
14049                     </entry>
14050                   </row>
14051                   <row rowsep="0">
14052                     <entry colname="1">
14053                       <para><command>IXFRReqv4</command></para>
14054                     </entry>
14055                     <entry colname="2">
14056                       <para>
14057                         IPv4 IXFR requested.
14058                       </para>
14059                     </entry>
14060                   </row>
14061                   <row rowsep="0">
14062                     <entry colname="1">
14063                       <para><command>IXFRReqv6</command></para>
14064                     </entry>
14065                     <entry colname="2">
14066                       <para>
14067                         IPv6 IXFR requested.
14068                       </para>
14069                     </entry>
14070                   </row>
14071                   <row rowsep="0">
14072                     <entry colname="1">
14073                       <para><command>XfrSuccess</command></para>
14074                     </entry>
14075                     <entry colname="2">
14076                       <para>
14077                         Zone transfer requests succeeded.
14078                       </para>
14079                     </entry>
14080                   </row>
14081                   <row rowsep="0">
14082                     <entry colname="1">
14083                       <para><command>XfrFail</command></para>
14084                     </entry>
14085                     <entry colname="2">
14086                       <para>
14087                         Zone transfer requests failed.
14088                       </para>
14089                     </entry>
14090                   </row>
14091                 </tbody>
14092               </tgroup>
14093             </informaltable>
14094           </sect3>
14095
14096           <sect3>
14097             <title>Resolver Statistics Counters</title>
14098
14099             <informaltable colsep="0" rowsep="0">
14100               <tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
14101                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
14102                 <colspec colname="2" colnum="2" colsep="0" colwidth="1.150in"/>
14103                 <colspec colname="3" colnum="3" colsep="0" colwidth="3.350in"/>
14104                 <tbody>
14105                   <row>
14106                     <entry colname="1">
14107                       <para>
14108                         <emphasis>Symbol</emphasis>
14109                       </para>
14110                     </entry>
14111                     <entry colname="2">
14112                       <para>
14113                         <emphasis>BIND8 Symbol</emphasis>
14114                       </para>
14115                     </entry>
14116                     <entry colname="3">
14117                       <para>
14118                         <emphasis>Description</emphasis>
14119                       </para>
14120                     </entry>
14121                   </row>
14122
14123                   <row rowsep="0">
14124                     <entry colname="1">
14125                       <para><command>Queryv4</command></para>
14126                     </entry>
14127                     <entry colname="2">
14128                       <para><command>SFwdQ</command></para>
14129                     </entry>
14130                     <entry colname="3">
14131                       <para>
14132                         IPv4 queries sent.
14133                       </para>
14134                     </entry>
14135                   </row>
14136                   <row rowsep="0">
14137                     <entry colname="1">
14138                       <para><command>Queryv6</command></para>
14139                     </entry>
14140                     <entry colname="2">
14141                       <para><command>SFwdQ</command></para>
14142                     </entry>
14143                     <entry colname="3">
14144                       <para>
14145                         IPv6 queries sent.
14146                       </para>
14147                     </entry>
14148                   </row>
14149                   <row rowsep="0">
14150                     <entry colname="1">
14151                       <para><command>Responsev4</command></para>
14152                     </entry>
14153                     <entry colname="2">
14154                       <para><command>RR</command></para>
14155                     </entry>
14156                     <entry colname="3">
14157                       <para>
14158                         IPv4 responses received.
14159                       </para>
14160                     </entry>
14161                   </row>
14162                   <row rowsep="0">
14163                     <entry colname="1">
14164                       <para><command>Responsev6</command></para>
14165                     </entry>
14166                     <entry colname="2">
14167                       <para><command>RR</command></para>
14168                     </entry>
14169                     <entry colname="3">
14170                       <para>
14171                         IPv6 responses received.
14172                       </para>
14173                     </entry>
14174                   </row>
14175                   <row rowsep="0">
14176                     <entry colname="1">
14177                       <para><command>NXDOMAIN</command></para>
14178                     </entry>
14179                     <entry colname="2">
14180                       <para><command>RNXD</command></para>
14181                     </entry>
14182                     <entry colname="3">
14183                       <para>
14184                         NXDOMAIN received.
14185                       </para>
14186                     </entry>
14187                   </row>
14188                   <row rowsep="0">
14189                     <entry colname="1">
14190                       <para><command>SERVFAIL</command></para>
14191                     </entry>
14192                     <entry colname="2">
14193                       <para><command>RFail</command></para>
14194                     </entry>
14195                     <entry colname="3">
14196                       <para>
14197                         SERVFAIL received.
14198                       </para>
14199                     </entry>
14200                   </row>
14201                   <row rowsep="0">
14202                     <entry colname="1">
14203                       <para><command>FORMERR</command></para>
14204                     </entry>
14205                     <entry colname="2">
14206                       <para><command>RFErr</command></para>
14207                     </entry>
14208                     <entry colname="3">
14209                       <para>
14210                         FORMERR received.
14211                       </para>
14212                     </entry>
14213                   </row>
14214                   <row rowsep="0">
14215                     <entry colname="1">
14216                       <para><command>OtherError</command></para>
14217                     </entry>
14218                     <entry colname="2">
14219                       <para><command>RErr</command></para>
14220                     </entry>
14221                     <entry colname="3">
14222                       <para>
14223                         Other errors received.
14224                       </para>
14225                     </entry>
14226                   </row>
14227                   <row rowsep="0">
14228                     <entry colname="1">
14229                       <para><command>EDNS0Fail</command></para>
14230                                                  </entry>
14231                     <entry colname="2">
14232                       <para><command></command></para>
14233                     </entry>
14234                     <entry colname="3">
14235                       <para>
14236                         EDNS(0) query failures.
14237                       </para>
14238                     </entry>
14239                   </row>
14240                   <row rowsep="0">
14241                     <entry colname="1">
14242                       <para><command>Mismatch</command></para>
14243                     </entry>
14244                     <entry colname="2">
14245                       <para><command>RDupR</command></para>
14246                     </entry>
14247                     <entry colname="3">
14248                       <para>
14249                         Mismatch responses received.
14250                         The DNS ID, response's source address,
14251                         and/or the response's source port does not
14252                         match what was expected.
14253                         (The port must be 53 or as defined by
14254                         the <command>port</command> option.)
14255                         This may be an indication of a cache
14256                         poisoning attempt.
14257                       </para>
14258                     </entry>
14259                   </row>
14260                   <row rowsep="0">
14261                     <entry colname="1">
14262                       <para><command>Truncated</command></para>
14263                     </entry>
14264                     <entry colname="2">
14265                       <para><command></command></para>
14266                     </entry>
14267                     <entry colname="3">
14268                       <para>
14269                         Truncated responses received.
14270                       </para>
14271                     </entry>
14272                   </row>
14273                   <row rowsep="0">
14274                     <entry colname="1">
14275                       <para><command>Lame</command></para>
14276                     </entry>
14277                     <entry colname="2">
14278                       <para><command>RLame</command></para>
14279                     </entry>
14280                     <entry colname="3">
14281                       <para>
14282                         Lame delegations received.
14283                       </para>
14284                     </entry>
14285                   </row>
14286                   <row rowsep="0">
14287                     <entry colname="1">
14288                       <para><command>Retry</command></para>
14289                     </entry>
14290                     <entry colname="2">
14291                       <para><command>SDupQ</command></para>
14292                     </entry>
14293                     <entry colname="3">
14294                       <para>
14295                         Query retries performed.
14296                       </para>
14297                     </entry>
14298                   </row>
14299                   <row rowsep="0">
14300                     <entry colname="1">
14301                       <para><command>QueryAbort</command></para>
14302                     </entry>
14303                     <entry colname="2">
14304                       <para><command></command></para>
14305                     </entry>
14306                     <entry colname="3">
14307                       <para>
14308                         Queries aborted due to quota control.
14309                       </para>
14310                     </entry>
14311                   </row>
14312                   <row rowsep="0">
14313                     <entry colname="1">
14314                       <para><command>QuerySockFail</command></para>
14315                     </entry>
14316                     <entry colname="2">
14317                       <para><command></command></para>
14318                     </entry>
14319                     <entry colname="3">
14320                       <para>
14321                         Failures in opening query sockets.
14322                         One common reason for such failures is a
14323                         failure of opening a new socket due to a
14324                         limitation on file descriptors.
14325                       </para>
14326                     </entry>
14327                   </row>
14328                   <row rowsep="0">
14329                     <entry colname="1">
14330                       <para><command>QueryTimeout</command></para>
14331                     </entry>
14332                     <entry colname="2">
14333                       <para><command></command></para>
14334                     </entry>
14335                     <entry colname="3">
14336                       <para>
14337                         Query timeouts.
14338                       </para>
14339                     </entry>
14340                   </row>
14341                   <row rowsep="0">
14342                     <entry colname="1">
14343                       <para><command>GlueFetchv4</command></para>
14344                     </entry>
14345                     <entry colname="2">
14346                       <para><command>SSysQ</command></para>
14347                     </entry>
14348                     <entry colname="3">
14349                       <para>
14350                         IPv4 NS address fetches invoked.
14351                       </para>
14352                     </entry>
14353                   </row>
14354                   <row rowsep="0">
14355                     <entry colname="1">
14356                       <para><command>GlueFetchv6</command></para>
14357                     </entry>
14358                     <entry colname="2">
14359                       <para><command>SSysQ</command></para>
14360                     </entry>
14361                     <entry colname="3">
14362                       <para>
14363                         IPv6 NS address fetches invoked.
14364                       </para>
14365                     </entry>
14366                   </row>
14367                   <row rowsep="0">
14368                     <entry colname="1">
14369                       <para><command>GlueFetchv4Fail</command></para>
14370                     </entry>
14371                     <entry colname="2">
14372                       <para><command></command></para>
14373                     </entry>
14374                     <entry colname="3">
14375                       <para>
14376                         IPv4 NS address fetch failed.
14377                       </para>
14378                     </entry>
14379                   </row>
14380                   <row rowsep="0">
14381                     <entry colname="1">
14382                       <para><command>GlueFetchv6Fail</command></para>
14383                     </entry>
14384                     <entry colname="2">
14385                       <para><command></command></para>
14386                     </entry>
14387                     <entry colname="3">
14388                       <para>
14389                         IPv6 NS address fetch failed.
14390                       </para>
14391                     </entry>
14392                   </row>
14393                   <row rowsep="0">
14394                     <entry colname="1">
14395                       <para><command>ValAttempt</command></para>
14396                     </entry>
14397                     <entry colname="2">
14398                       <para><command></command></para>
14399                     </entry>
14400                     <entry colname="3">
14401                       <para>
14402                         DNSSEC validation attempted.
14403                       </para>
14404                     </entry>
14405                   </row>
14406                   <row rowsep="0">
14407                     <entry colname="1">
14408                       <para><command>ValOk</command></para>
14409                     </entry>
14410                     <entry colname="2">
14411                       <para><command></command></para>
14412                     </entry>
14413                     <entry colname="3">
14414                       <para>
14415                         DNSSEC validation succeeded.
14416                       </para>
14417                     </entry>
14418                   </row>
14419                   <row rowsep="0">
14420                     <entry colname="1">
14421                       <para><command>ValNegOk</command></para>
14422                     </entry>
14423                     <entry colname="2">
14424                       <para><command></command></para>
14425                     </entry>
14426                     <entry colname="3">
14427                       <para>
14428                         DNSSEC validation on negative information succeeded.
14429                       </para>
14430                     </entry>
14431                   </row>
14432                   <row rowsep="0">
14433                     <entry colname="1">
14434                       <para><command>ValFail</command></para>
14435                     </entry>
14436                     <entry colname="2">
14437                       <para><command></command></para>
14438                     </entry>
14439                     <entry colname="3">
14440                       <para>
14441                         DNSSEC validation failed.
14442                       </para>
14443                     </entry>
14444                   </row>
14445                   <row rowsep="0">
14446                     <entry colname="1">
14447                       <para><command>QryRTTnn</command></para>
14448                     </entry>
14449                     <entry colname="2">
14450                       <para><command></command></para>
14451                     </entry>
14452                     <entry colname="3">
14453                       <para>
14454                         Frequency table on round trip times (RTTs) of
14455                         queries.
14456                         Each <command>nn</command> specifies the corresponding
14457                         frequency.
14458                         In the sequence of
14459                         <command>nn_1</command>,
14460                         <command>nn_2</command>,
14461                         ...,
14462                         <command>nn_m</command>,
14463                         the value of <command>nn_i</command> is the
14464                         number of queries whose RTTs are between
14465                         <command>nn_(i-1)</command> (inclusive) and
14466                         <command>nn_i</command> (exclusive) milliseconds.
14467                         For the sake of convenience we define
14468                         <command>nn_0</command> to be 0.
14469                         The last entry should be represented as
14470                         <command>nn_m+</command>, which means the
14471                         number of queries whose RTTs are equal to or over
14472                         <command>nn_m</command> milliseconds.
14473                       </para>
14474                     </entry>
14475                   </row>
14476                 </tbody>
14477               </tgroup>
14478             </informaltable>
14479
14480           </sect3>
14481
14482           <sect3>
14483             <title>Socket I/O Statistics Counters</title>
14484
14485             <para>
14486               Socket I/O statistics counters are defined per socket
14487               types, which are
14488               <command>UDP4</command> (UDP/IPv4),
14489               <command>UDP6</command> (UDP/IPv6),
14490               <command>TCP4</command> (TCP/IPv4),
14491               <command>TCP6</command> (TCP/IPv6),
14492               <command>Unix</command> (Unix Domain), and
14493               <command>FDwatch</command> (sockets opened outside the
14494               socket module).
14495               In the following table <command>&lt;TYPE&gt;</command>
14496               represents a socket type.
14497               Not all counters are available for all socket types;
14498               exceptions are noted in the description field.
14499             </para>
14500
14501             <informaltable colsep="0" rowsep="0">
14502               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
14503                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
14504                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
14505                 <tbody>
14506                   <row>
14507                     <entry colname="1">
14508                       <para>
14509                         <emphasis>Symbol</emphasis>
14510                       </para>
14511                     </entry>
14512                     <entry colname="2">
14513                       <para>
14514                         <emphasis>Description</emphasis>
14515                       </para>
14516                     </entry>
14517                   </row>
14518
14519                   <row rowsep="0">
14520                     <entry colname="1">
14521                       <para><command>&lt;TYPE&gt;Open</command></para>
14522                     </entry>
14523                     <entry colname="2">
14524                       <para>
14525                         Sockets opened successfully.
14526                         This counter is not applicable to the
14527                         <command>FDwatch</command> type.
14528                       </para>
14529                     </entry>
14530                   </row>
14531                   <row rowsep="0">
14532                     <entry colname="1">
14533                       <para><command>&lt;TYPE&gt;OpenFail</command></para>
14534                     </entry>
14535                     <entry colname="2">
14536                       <para>
14537                         Failures of opening sockets.
14538                         This counter is not applicable to the
14539                         <command>FDwatch</command> type.
14540                       </para>
14541                     </entry>
14542                   </row>
14543                   <row rowsep="0">
14544                     <entry colname="1">
14545                       <para><command>&lt;TYPE&gt;Close</command></para>
14546                     </entry>
14547                     <entry colname="2">
14548                       <para>
14549                         Sockets closed.
14550                       </para>
14551                     </entry>
14552                   </row>
14553                   <row rowsep="0">
14554                     <entry colname="1">
14555                       <para><command>&lt;TYPE&gt;BindFail</command></para>
14556                     </entry>
14557                     <entry colname="2">
14558                       <para>
14559                         Failures of binding sockets.
14560                       </para>
14561                     </entry>
14562                   </row>
14563                   <row rowsep="0">
14564                     <entry colname="1">
14565                       <para><command>&lt;TYPE&gt;ConnFail</command></para>
14566                     </entry>
14567                     <entry colname="2">
14568                       <para>
14569                         Failures of connecting sockets.
14570                       </para>
14571                     </entry>
14572                   </row>
14573                   <row rowsep="0">
14574                     <entry colname="1">
14575                       <para><command>&lt;TYPE&gt;Conn</command></para>
14576                     </entry>
14577                     <entry colname="2">
14578                       <para>
14579                         Connections established successfully.
14580                       </para>
14581                     </entry>
14582                   </row>
14583                   <row rowsep="0">
14584                     <entry colname="1">
14585                       <para><command>&lt;TYPE&gt;AcceptFail</command></para>
14586                     </entry>
14587                     <entry colname="2">
14588                       <para>
14589                         Failures of accepting incoming connection requests.
14590                         This counter is not applicable to the
14591                         <command>UDP</command> and
14592                         <command>FDwatch</command> types.
14593                       </para>
14594                     </entry>
14595                   </row>
14596                   <row rowsep="0">
14597                     <entry colname="1">
14598                       <para><command>&lt;TYPE&gt;Accept</command></para>
14599                     </entry>
14600                     <entry colname="2">
14601                       <para>
14602                         Incoming connections successfully accepted.
14603                         This counter is not applicable to the
14604                         <command>UDP</command> and
14605                         <command>FDwatch</command> types.
14606                       </para>
14607                     </entry>
14608                   </row>
14609                   <row rowsep="0">
14610                     <entry colname="1">
14611                       <para><command>&lt;TYPE&gt;SendErr</command></para>
14612                     </entry>
14613                     <entry colname="2">
14614                       <para>
14615                         Errors in socket send operations.
14616                         This counter corresponds
14617                         to <command>SErr</command> counter of
14618                         <command>BIND</command> 8.
14619                       </para>
14620                     </entry>
14621                   </row>
14622                   <row rowsep="0">
14623                     <entry colname="1">
14624                       <para><command>&lt;TYPE&gt;RecvErr</command></para>
14625                     </entry>
14626                     <entry colname="2">
14627                       <para>
14628                         Errors in socket receive operations.
14629                         This includes errors of send operations on a
14630                         connected UDP socket notified by an ICMP error
14631                         message.
14632                       </para>
14633                     </entry>
14634                   </row>
14635                 </tbody>
14636               </tgroup>
14637             </informaltable>
14638           </sect3>
14639           <sect3>
14640             <title>Compatibility with <emphasis>BIND</emphasis> 8 Counters</title>
14641             <para>
14642               Most statistics counters that were available
14643               in <command>BIND</command> 8 are also supported in
14644               <command>BIND</command> 9 as shown in the above tables.
14645               Here are notes about other counters that do not appear
14646               in these tables.
14647             </para>
14648
14649             <variablelist>
14650               <varlistentry>
14651                 <term><command>RFwdR,SFwdR</command></term>
14652                 <listitem>
14653                   <para>
14654                     These counters are not supported
14655                     because <command>BIND</command> 9 does not adopt
14656                     the notion of <emphasis>forwarding</emphasis>
14657                     as <command>BIND</command> 8 did.
14658                   </para>
14659                 </listitem>
14660               </varlistentry>
14661
14662               <varlistentry>
14663                 <term><command>RAXFR</command></term>
14664                 <listitem>
14665                   <para>
14666                     This counter is accessible in the Incoming Queries section.
14667                   </para>
14668                 </listitem>
14669               </varlistentry>
14670
14671               <varlistentry>
14672                 <term><command>RIQ</command></term>
14673                 <listitem>
14674                   <para>
14675                     This counter is accessible in the Incoming Requests section.
14676                   </para>
14677                 </listitem>
14678               </varlistentry>
14679
14680               <varlistentry>
14681                 <term><command>ROpts</command></term>
14682                 <listitem>
14683                   <para>
14684                     This counter is not supported
14685                     because <command>BIND</command> 9 does not care
14686                     about IP options in the first place.
14687                   </para>
14688                 </listitem>
14689               </varlistentry>
14690             </variablelist>
14691           </sect3>
14692         </sect2>
14693       </sect1>
14694
14695     </chapter>
14696     <chapter id="Bv9ARM.ch07">
14697       <title><acronym>BIND</acronym> 9 Security Considerations</title>
14698       <sect1 id="Access_Control_Lists">
14699         <title>Access Control Lists</title>
14700         <para>
14701           Access Control Lists (ACLs) are address match lists that
14702           you can set up and nickname for future use in <command>allow-notify</command>,
14703           <command>allow-query</command>, <command>allow-query-on</command>,
14704           <command>allow-recursion</command>, <command>allow-recursion-on</command>,
14705           <command>blackhole</command>, <command>allow-transfer</command>,
14706           etc.
14707         </para>
14708         <para>
14709           Using ACLs allows you to have finer control over who can access
14710           your name server, without cluttering up your config files with huge
14711           lists of IP addresses.
14712         </para>
14713         <para>
14714           It is a <emphasis>good idea</emphasis> to use ACLs, and to
14715           control access to your server. Limiting access to your server by
14716           outside parties can help prevent spoofing and denial of service (DoS) attacks against
14717           your server.
14718         </para>
14719         <para>
14720           Here is an example of how to properly apply ACLs:
14721         </para>
14722
14723 <programlisting>
14724 // Set up an ACL named "bogusnets" that will block
14725 // RFC1918 space and some reserved space, which is
14726 // commonly used in spoofing attacks.
14727 acl bogusnets {
14728         0.0.0.0/8; 1.0.0.0/8; 2.0.0.0/8; 192.0.2.0/24;
14729         224.0.0.0/3; 10.0.0.0/8; 172.16.0.0/12;
14730         192.168.0.0/16;
14731 };
14732
14733 // Set up an ACL called our-nets. Replace this with the
14734 // real IP numbers.
14735 acl our-nets { x.x.x.x/24; x.x.x.x/21; };
14736 options {
14737   ...
14738   ...
14739   allow-query { our-nets; };
14740   allow-recursion { our-nets; };
14741   ...
14742   blackhole { bogusnets; };
14743   ...
14744 };
14745
14746 zone "example.com" {
14747   type master;
14748   file "m/example.com";
14749   allow-query { any; };
14750 };
14751 </programlisting>
14752
14753         <para>
14754           This allows recursive queries of the server from the outside
14755           unless recursion has been previously disabled.
14756         </para>
14757         <para>
14758           For more information on how to use ACLs to protect your server,
14759           see the <emphasis>AUSCERT</emphasis> advisory at:
14760         </para>
14761         <para>
14762           <ulink url="ftp://ftp.auscert.org.au/pub/auscert/advisory/AL-1999.004.dns_dos"
14763                      >ftp://ftp.auscert.org.au/pub/auscert/advisory/AL-1999.004.dns_dos</ulink>
14764         </para>
14765       </sect1>
14766       <sect1>
14767         <title><command>Chroot</command> and <command>Setuid</command></title>
14768         <para>
14769           On UNIX servers, it is possible to run <acronym>BIND</acronym>
14770           in a <emphasis>chrooted</emphasis> environment (using
14771           the <command>chroot()</command> function) by specifying
14772           the "<option>-t</option>" option for <command>named</command>.
14773           This can help improve system security by placing
14774           <acronym>BIND</acronym> in a "sandbox", which will limit
14775           the damage done if a server is compromised.
14776         </para>
14777         <para>
14778           Another useful feature in the UNIX version of <acronym>BIND</acronym> is the
14779           ability to run the daemon as an unprivileged user ( <option>-u</option> <replaceable>user</replaceable> ).
14780           We suggest running as an unprivileged user when using the <command>chroot</command> feature.
14781         </para>
14782         <para>
14783           Here is an example command line to load <acronym>BIND</acronym> in a <command>chroot</command> sandbox,
14784           <command>/var/named</command>, and to run <command>named</command> <command>setuid</command> to
14785           user 202:
14786         </para>
14787         <para>
14788           <userinput>/usr/local/sbin/named -u 202 -t /var/named</userinput>
14789         </para>
14790
14791         <sect2>
14792           <title>The <command>chroot</command> Environment</title>
14793
14794           <para>
14795             In order for a <command>chroot</command> environment
14796             to
14797             work properly in a particular directory
14798             (for example, <filename>/var/named</filename>),
14799             you will need to set up an environment that includes everything
14800             <acronym>BIND</acronym> needs to run.
14801             From <acronym>BIND</acronym>'s point of view, <filename>/var/named</filename> is
14802             the root of the filesystem.  You will need to adjust the values of
14803             options like
14804             like <command>directory</command> and <command>pid-file</command> to account
14805             for this.
14806           </para>
14807           <para>
14808             Unlike with earlier versions of BIND, you typically will
14809             <emphasis>not</emphasis> need to compile <command>named</command>
14810             statically nor install shared libraries under the new root.
14811             However, depending on your operating system, you may need
14812             to set up things like
14813             <filename>/dev/zero</filename>,
14814             <filename>/dev/random</filename>,
14815             <filename>/dev/log</filename>, and
14816             <filename>/etc/localtime</filename>.
14817           </para>
14818         </sect2>
14819
14820         <sect2>
14821           <title>Using the <command>setuid</command> Function</title>
14822
14823           <para>
14824             Prior to running the <command>named</command> daemon,
14825             use
14826             the <command>touch</command> utility (to change file
14827             access and
14828             modification times) or the <command>chown</command>
14829             utility (to
14830             set the user id and/or group id) on files
14831             to which you want <acronym>BIND</acronym>
14832             to write.
14833           </para>
14834           <note>
14835             Note that if the <command>named</command> daemon is running as an
14836             unprivileged user, it will not be able to bind to new restricted
14837             ports if the server is reloaded.
14838           </note>
14839         </sect2>
14840       </sect1>
14841
14842       <sect1 id="dynamic_update_security">
14843         <title>Dynamic Update Security</title>
14844
14845         <para>
14846           Access to the dynamic
14847           update facility should be strictly limited.  In earlier versions of
14848           <acronym>BIND</acronym>, the only way to do this was
14849           based on the IP
14850           address of the host requesting the update, by listing an IP address
14851           or
14852           network prefix in the <command>allow-update</command>
14853           zone option.
14854           This method is insecure since the source address of the update UDP
14855           packet
14856           is easily forged.  Also note that if the IP addresses allowed by the
14857           <command>allow-update</command> option include the
14858           address of a slave
14859           server which performs forwarding of dynamic updates, the master can
14860           be
14861           trivially attacked by sending the update to the slave, which will
14862           forward it to the master with its own source IP address causing the
14863           master to approve it without question.
14864         </para>
14865
14866         <para>
14867           For these reasons, we strongly recommend that updates be
14868           cryptographically authenticated by means of transaction signatures
14869           (TSIG).  That is, the <command>allow-update</command>
14870           option should
14871           list only TSIG key names, not IP addresses or network
14872           prefixes. Alternatively, the new <command>update-policy</command>
14873           option can be used.
14874         </para>
14875
14876         <para>
14877           Some sites choose to keep all dynamically-updated DNS data
14878           in a subdomain and delegate that subdomain to a separate zone. This
14879           way, the top-level zone containing critical data such as the IP
14880           addresses
14881           of public web and mail servers need not allow dynamic update at
14882           all.
14883         </para>
14884
14885       </sect1>
14886     </chapter>
14887
14888     <chapter id="Bv9ARM.ch08">
14889       <title>Troubleshooting</title>
14890       <sect1>
14891         <title>Common Problems</title>
14892         <sect2>
14893           <title>It's not working; how can I figure out what's wrong?</title>
14894
14895           <para>
14896             The best solution to solving installation and
14897             configuration issues is to take preventative measures by setting
14898             up logging files beforehand. The log files provide a
14899             source of hints and information that can be used to figure out
14900             what went wrong and how to fix the problem.
14901           </para>
14902
14903         </sect2>
14904       </sect1>
14905       <sect1>
14906         <title>Incrementing and Changing the Serial Number</title>
14907
14908         <para>
14909           Zone serial numbers are just numbers &mdash; they aren't
14910           date related.  A lot of people set them to a number that
14911           represents a date, usually of the form YYYYMMDDRR.
14912           Occasionally they will make a mistake and set them to a
14913           "date in the future" then try to correct them by setting
14914           them to the "current date".  This causes problems because
14915           serial numbers are used to indicate that a zone has been
14916           updated.  If the serial number on the slave server is
14917           lower than the serial number on the master, the slave
14918           server will attempt to update its copy of the zone.
14919         </para>
14920
14921         <para>
14922           Setting the serial number to a lower number on the master
14923           server than the slave server means that the slave will not perform
14924           updates to its copy of the zone.
14925         </para>
14926
14927         <para>
14928           The solution to this is to add 2147483647 (2^31-1) to the
14929           number, reload the zone and make sure all slaves have updated to
14930           the new zone serial number, then reset the number to what you want
14931           it to be, and reload the zone again.
14932         </para>
14933
14934       </sect1>
14935       <sect1>
14936         <title>Where Can I Get Help?</title>
14937
14938         <para>
14939           The Internet Systems Consortium
14940           (<acronym>ISC</acronym>) offers a wide range
14941           of support and service agreements for <acronym>BIND</acronym> and <acronym>DHCP</acronym> servers. Four
14942           levels of premium support are available and each level includes
14943           support for all <acronym>ISC</acronym> programs,
14944           significant discounts on products
14945           and training, and a recognized priority on bug fixes and
14946           non-funded feature requests. In addition, <acronym>ISC</acronym> offers a standard
14947           support agreement package which includes services ranging from bug
14948           fix announcements to remote support. It also includes training in
14949           <acronym>BIND</acronym> and <acronym>DHCP</acronym>.
14950         </para>
14951
14952         <para>
14953           To discuss arrangements for support, contact
14954           <ulink url="mailto:info@isc.org">info@isc.org</ulink> or visit the
14955           <acronym>ISC</acronym> web page at
14956           <ulink url="http://www.isc.org/services/support/"
14957                      >http://www.isc.org/services/support/</ulink>
14958           to read more.
14959         </para>
14960       </sect1>
14961     </chapter>
14962     <appendix id="Bv9ARM.ch09">
14963       <title>Appendices</title>
14964       <sect1>
14965         <title>Acknowledgments</title>
14966         <sect2 id="historical_dns_information">
14967           <title>A Brief History of the <acronym>DNS</acronym> and <acronym>BIND</acronym></title>
14968
14969           <para>
14970             Although the "official" beginning of the Domain Name
14971             System occurred in 1984 with the publication of RFC 920, the
14972             core of the new system was described in 1983 in RFCs 882 and
14973             883. From 1984 to 1987, the ARPAnet (the precursor to today's
14974             Internet) became a testbed of experimentation for developing the
14975             new naming/addressing scheme in a rapidly expanding,
14976             operational network environment.  New RFCs were written and
14977             published in 1987 that modified the original documents to
14978             incorporate improvements based on the working model. RFC 1034,
14979             "Domain Names-Concepts and Facilities", and RFC 1035, "Domain
14980             Names-Implementation and Specification" were published and
14981             became the standards upon which all <acronym>DNS</acronym> implementations are
14982             built.
14983           </para>
14984
14985           <para>
14986             The first working domain name server, called "Jeeves", was
14987             written in 1983-84 by Paul Mockapetris for operation on DEC
14988             Tops-20
14989             machines located at the University of Southern California's
14990             Information
14991             Sciences Institute (USC-ISI) and SRI International's Network
14992             Information
14993             Center (SRI-NIC). A <acronym>DNS</acronym> server for
14994             Unix machines, the Berkeley Internet
14995             Name Domain (<acronym>BIND</acronym>) package, was
14996             written soon after by a group of
14997             graduate students at the University of California at Berkeley
14998             under
14999             a grant from the US Defense Advanced Research Projects
15000             Administration
15001             (DARPA).
15002           </para>
15003           <para>
15004             Versions of <acronym>BIND</acronym> through
15005             4.8.3 were maintained by the Computer
15006             Systems Research Group (CSRG) at UC Berkeley. Douglas Terry, Mark
15007             Painter, David Riggle and Songnian Zhou made up the initial <acronym>BIND</acronym>
15008             project team. After that, additional work on the software package
15009             was done by Ralph Campbell. Kevin Dunlap, a Digital Equipment
15010             Corporation
15011             employee on loan to the CSRG, worked on <acronym>BIND</acronym> for 2 years, from 1985
15012             to 1987. Many other people also contributed to <acronym>BIND</acronym> development
15013             during that time: Doug Kingston, Craig Partridge, Smoot
15014             Carl-Mitchell,
15015             Mike Muuss, Jim Bloom and Mike Schwartz. <acronym>BIND</acronym> maintenance was subsequently
15016             handled by Mike Karels and &#216;ivind Kure.
15017           </para>
15018           <para>
15019             <acronym>BIND</acronym> versions 4.9 and 4.9.1 were
15020             released by Digital Equipment
15021             Corporation (now Compaq Computer Corporation). Paul Vixie, then
15022             a DEC employee, became <acronym>BIND</acronym>'s
15023             primary caretaker. He was assisted
15024             by Phil Almquist, Robert Elz, Alan Barrett, Paul Albitz, Bryan
15025             Beecher, Andrew
15026             Partan, Andy Cherenson, Tom Limoncelli, Berthold Paffrath, Fuat
15027             Baran, Anant Kumar, Art Harkin, Win Treese, Don Lewis, Christophe
15028             Wolfhugel, and others.
15029           </para>
15030           <para>
15031             In 1994, <acronym>BIND</acronym> version 4.9.2 was sponsored by
15032             Vixie Enterprises. Paul
15033             Vixie became <acronym>BIND</acronym>'s principal
15034             architect/programmer.
15035           </para>
15036           <para>
15037             <acronym>BIND</acronym> versions from 4.9.3 onward
15038             have been developed and maintained
15039             by the Internet Systems Consortium and its predecessor,
15040             the Internet Software Consortium,  with support being provided
15041             by ISC's sponsors.
15042           </para>
15043           <para>
15044             As co-architects/programmers, Bob Halley and
15045             Paul Vixie released the first production-ready version of
15046             <acronym>BIND</acronym> version 8 in May 1997.
15047           </para>
15048           <para>
15049             BIND version 9 was released in September 2000 and is a
15050             major rewrite of nearly all aspects of the underlying
15051             BIND architecture.
15052           </para>
15053           <para>
15054             BIND versions 4 and 8 are officially deprecated.
15055             No additional development is done
15056             on BIND version 4 or BIND version 8.
15057           </para>
15058           <para>
15059             <acronym>BIND</acronym> development work is made
15060             possible today by the sponsorship
15061             of several corporations, and by the tireless work efforts of
15062             numerous individuals.
15063           </para>
15064         </sect2>
15065       </sect1>
15066       <sect1>
15067         <title>General <acronym>DNS</acronym> Reference Information</title>
15068         <sect2 id="ipv6addresses">
15069           <title>IPv6 addresses (AAAA)</title>
15070           <para>
15071             IPv6 addresses are 128-bit identifiers for interfaces and
15072             sets of interfaces which were introduced in the <acronym>DNS</acronym> to facilitate
15073             scalable Internet routing. There are three types of addresses: <emphasis>Unicast</emphasis>,
15074             an identifier for a single interface;
15075             <emphasis>Anycast</emphasis>,
15076             an identifier for a set of interfaces; and <emphasis>Multicast</emphasis>,
15077             an identifier for a set of interfaces. Here we describe the global
15078             Unicast address scheme. For more information, see RFC 3587,
15079             "Global Unicast Address Format."
15080           </para>
15081           <para>
15082             IPv6 unicast addresses consist of a
15083             <emphasis>global routing prefix</emphasis>, a
15084             <emphasis>subnet identifier</emphasis>, and an
15085             <emphasis>interface identifier</emphasis>.
15086           </para>
15087           <para>
15088             The global routing prefix is provided by the
15089             upstream provider or ISP, and (roughly) corresponds to the
15090             IPv4 <emphasis>network</emphasis> section
15091             of the address range.
15092
15093             The subnet identifier is for local subnetting, much the
15094             same as subnetting an
15095             IPv4 /16 network into /24 subnets.
15096
15097             The interface identifier is the address of an individual
15098             interface on a given network; in IPv6, addresses belong to
15099             interfaces rather than to machines.
15100           </para>
15101           <para>
15102             The subnetting capability of IPv6 is much more flexible than
15103             that of IPv4: subnetting can be carried out on bit boundaries,
15104             in much the same way as Classless InterDomain Routing
15105             (CIDR), and the DNS PTR representation ("nibble" format)
15106             makes setting up reverse zones easier.
15107           </para>
15108           <para>
15109             The Interface Identifier must be unique on the local link,
15110             and is usually generated automatically by the IPv6
15111             implementation, although it is usually possible to
15112             override the default setting if necessary.  A typical IPv6
15113             address might look like:
15114             <command>2001:db8:201:9:a00:20ff:fe81:2b32</command>
15115           </para>
15116           <para>
15117             IPv6 address specifications often contain long strings
15118             of zeros, so the architects have included a shorthand for
15119             specifying
15120             them. The double colon (`::') indicates the longest possible
15121             string
15122             of zeros that can fit, and can be used only once in an address.
15123           </para>
15124         </sect2>
15125       </sect1>
15126       <sect1 id="bibliography">
15127         <title>Bibliography (and Suggested Reading)</title>
15128         <sect2 id="rfcs">
15129           <title>Request for Comments (RFCs)</title>
15130           <para>
15131             Specification documents for the Internet protocol suite, including
15132             the <acronym>DNS</acronym>, are published as part of
15133             the Request for Comments (RFCs)
15134             series of technical notes. The standards themselves are defined
15135             by the Internet Engineering Task Force (IETF) and the Internet
15136             Engineering Steering Group (IESG). RFCs can be obtained online via FTP at:
15137           </para>
15138           <para>
15139             <ulink url="ftp://www.isi.edu/in-notes/">
15140               ftp://www.isi.edu/in-notes/RFC<replaceable>xxxx</replaceable>.txt
15141             </ulink>
15142           </para>
15143           <para>
15144             (where <replaceable>xxxx</replaceable> is
15145             the number of the RFC). RFCs are also available via the Web at:
15146           </para>
15147           <para>
15148             <ulink url="http://www.ietf.org/rfc/"
15149                        >http://www.ietf.org/rfc/</ulink>.
15150           </para>
15151           <bibliography>
15152             <bibliodiv>
15153               <!-- one of (BIBLIOENTRY BIBLIOMIXED) -->
15154               <title>Standards</title>
15155               <biblioentry>
15156                 <abbrev>RFC974</abbrev>
15157                 <author>
15158                   <surname>Partridge</surname>
15159                   <firstname>C.</firstname>
15160                 </author>
15161                 <title>Mail Routing and the Domain System</title>
15162                 <pubdate>January 1986</pubdate>
15163               </biblioentry>
15164               <biblioentry>
15165                 <abbrev>RFC1034</abbrev>
15166                 <author>
15167                   <surname>Mockapetris</surname>
15168                   <firstname>P.V.</firstname>
15169                 </author>
15170                 <title>Domain Names &mdash; Concepts and Facilities</title>
15171                 <pubdate>November 1987</pubdate>
15172               </biblioentry>
15173               <biblioentry>
15174                 <abbrev>RFC1035</abbrev>
15175                 <author>
15176                   <surname>Mockapetris</surname>
15177                   <firstname>P. V.</firstname>
15178                   </author> <title>Domain Names &mdash; Implementation and
15179                   Specification</title>
15180                 <pubdate>November 1987</pubdate>
15181               </biblioentry>
15182             </bibliodiv>
15183             <bibliodiv id="proposed_standards" xreflabel="Proposed Standards">
15184
15185               <title>Proposed Standards</title>
15186               <!-- one of (BIBLIOENTRY BIBLIOMIXED) -->
15187               <biblioentry>
15188                 <abbrev>RFC2181</abbrev>
15189                 <author>
15190                   <surname>Elz</surname>
15191                   <firstname>R., R. Bush</firstname>
15192                 </author>
15193                 <title>Clarifications to the <acronym>DNS</acronym>
15194                   Specification</title>
15195                 <pubdate>July 1997</pubdate>
15196               </biblioentry>
15197               <biblioentry>
15198                 <abbrev>RFC2308</abbrev>
15199                 <author>
15200                   <surname>Andrews</surname>
15201                   <firstname>M.</firstname>
15202                 </author>
15203                 <title>Negative Caching of <acronym>DNS</acronym>
15204                   Queries</title>
15205                 <pubdate>March 1998</pubdate>
15206               </biblioentry>
15207               <biblioentry>
15208                 <abbrev>RFC1995</abbrev>
15209                 <author>
15210                   <surname>Ohta</surname>
15211                   <firstname>M.</firstname>
15212                 </author>
15213                 <title>Incremental Zone Transfer in <acronym>DNS</acronym></title>
15214                 <pubdate>August 1996</pubdate>
15215               </biblioentry>
15216               <biblioentry>
15217                 <abbrev>RFC1996</abbrev>
15218                 <author>
15219                   <surname>Vixie</surname>
15220                   <firstname>P.</firstname>
15221                 </author>
15222                 <title>A Mechanism for Prompt Notification of Zone Changes</title>
15223                 <pubdate>August 1996</pubdate>
15224               </biblioentry>
15225               <biblioentry>
15226                 <abbrev>RFC2136</abbrev>
15227                 <authorgroup>
15228                   <author>
15229                     <surname>Vixie</surname>
15230                     <firstname>P.</firstname>
15231                   </author>
15232                   <author>
15233                     <firstname>S.</firstname>
15234                     <surname>Thomson</surname>
15235                   </author>
15236                   <author>
15237                     <firstname>Y.</firstname>
15238                     <surname>Rekhter</surname>
15239                   </author>
15240                   <author>
15241                     <firstname>J.</firstname>
15242                     <surname>Bound</surname>
15243                   </author>
15244                 </authorgroup>
15245                 <title>Dynamic Updates in the Domain Name System</title>
15246                 <pubdate>April 1997</pubdate>
15247               </biblioentry>
15248               <biblioentry>
15249                 <abbrev>RFC2671</abbrev>
15250                 <authorgroup>
15251                   <author>
15252                     <firstname>P.</firstname>
15253                     <surname>Vixie</surname>
15254                   </author>
15255                 </authorgroup>
15256                 <title>Extension Mechanisms for DNS (EDNS0)</title>
15257                 <pubdate>August 1997</pubdate>
15258               </biblioentry>
15259               <biblioentry>
15260                 <abbrev>RFC2672</abbrev>
15261                 <authorgroup>
15262                   <author>
15263                     <firstname>M.</firstname>
15264                     <surname>Crawford</surname>
15265                   </author>
15266                 </authorgroup>
15267                 <title>Non-Terminal DNS Name Redirection</title>
15268                 <pubdate>August 1999</pubdate>
15269               </biblioentry>
15270               <biblioentry>
15271                 <abbrev>RFC2845</abbrev>
15272                 <authorgroup>
15273                   <author>
15274                     <surname>Vixie</surname>
15275                     <firstname>P.</firstname>
15276                   </author>
15277                   <author>
15278                     <firstname>O.</firstname>
15279                     <surname>Gudmundsson</surname>
15280                   </author>
15281                   <author>
15282                     <firstname>D.</firstname>
15283                     <surname>Eastlake</surname>
15284                     <lineage>3rd</lineage>
15285                   </author>
15286                   <author>
15287                     <firstname>B.</firstname>
15288                     <surname>Wellington</surname>
15289                   </author>
15290                 </authorgroup>
15291                 <title>Secret Key Transaction Authentication for <acronym>DNS</acronym> (TSIG)</title>
15292                 <pubdate>May 2000</pubdate>
15293               </biblioentry>
15294               <biblioentry>
15295                 <abbrev>RFC2930</abbrev>
15296                 <authorgroup>
15297                   <author>
15298                     <firstname>D.</firstname>
15299                     <surname>Eastlake</surname>
15300                     <lineage>3rd</lineage>
15301                   </author>
15302                 </authorgroup>
15303                 <title>Secret Key Establishment for DNS (TKEY RR)</title>
15304                 <pubdate>September 2000</pubdate>
15305               </biblioentry>
15306               <biblioentry>
15307                 <abbrev>RFC2931</abbrev>
15308                 <authorgroup>
15309                   <author>
15310                     <firstname>D.</firstname>
15311                     <surname>Eastlake</surname>
15312                     <lineage>3rd</lineage>
15313                   </author>
15314                 </authorgroup>
15315                 <title>DNS Request and Transaction Signatures (SIG(0)s)</title>
15316                 <pubdate>September 2000</pubdate>
15317               </biblioentry>
15318               <biblioentry>
15319                 <abbrev>RFC3007</abbrev>
15320                 <authorgroup>
15321                   <author>
15322                     <firstname>B.</firstname>
15323                     <surname>Wellington</surname>
15324                   </author>
15325                 </authorgroup>
15326                 <title>Secure Domain Name System (DNS) Dynamic Update</title>
15327                 <pubdate>November 2000</pubdate>
15328               </biblioentry>
15329               <biblioentry>
15330                 <abbrev>RFC3645</abbrev>
15331                 <authorgroup>
15332                   <author>
15333                     <firstname>S.</firstname>
15334                     <surname>Kwan</surname>
15335                   </author>
15336                   <author>
15337                     <firstname>P.</firstname>
15338                     <surname>Garg</surname>
15339                   </author>
15340                   <author>
15341                     <firstname>J.</firstname>
15342                     <surname>Gilroy</surname>
15343                   </author>
15344                   <author>
15345                     <firstname>L.</firstname>
15346                     <surname>Esibov</surname>
15347                   </author>
15348                   <author>
15349                     <firstname>J.</firstname>
15350                     <surname>Westhead</surname>
15351                   </author>
15352                   <author>
15353                     <firstname>R.</firstname>
15354                     <surname>Hall</surname>
15355                   </author>
15356                 </authorgroup>
15357                 <title>Generic Security Service Algorithm for Secret
15358                        Key Transaction Authentication for DNS
15359                        (GSS-TSIG)</title>
15360                 <pubdate>October 2003</pubdate>
15361               </biblioentry>
15362             </bibliodiv>
15363             <bibliodiv>
15364               <title><acronym>DNS</acronym> Security Proposed Standards</title>
15365               <biblioentry>
15366                 <abbrev>RFC3225</abbrev>
15367                 <authorgroup>
15368                   <author>
15369                     <firstname>D.</firstname>
15370                     <surname>Conrad</surname>
15371                   </author>
15372                 </authorgroup>
15373                 <title>Indicating Resolver Support of DNSSEC</title>
15374                 <pubdate>December 2001</pubdate>
15375               </biblioentry>
15376               <biblioentry>
15377                 <abbrev>RFC3833</abbrev>
15378                 <authorgroup>
15379                   <author>
15380                     <firstname>D.</firstname>
15381                     <surname>Atkins</surname>
15382                   </author>
15383                   <author>
15384                     <firstname>R.</firstname>
15385                     <surname>Austein</surname>
15386                   </author>
15387                 </authorgroup>
15388                 <title>Threat Analysis of the Domain Name System (DNS)</title>
15389                 <pubdate>August 2004</pubdate>
15390               </biblioentry>
15391               <biblioentry>
15392                 <abbrev>RFC4033</abbrev>
15393                 <authorgroup>
15394                   <author>
15395                     <firstname>R.</firstname>
15396                     <surname>Arends</surname>
15397                   </author>
15398                   <author>
15399                     <firstname>R.</firstname>
15400                     <surname>Austein</surname>
15401                   </author>
15402                   <author>
15403                     <firstname>M.</firstname>
15404                     <surname>Larson</surname>
15405                   </author>
15406                   <author>
15407                     <firstname>D.</firstname>
15408                     <surname>Massey</surname>
15409                   </author>
15410                   <author>
15411                     <firstname>S.</firstname>
15412                     <surname>Rose</surname>
15413                   </author>
15414                 </authorgroup>
15415                 <title>DNS Security Introduction and Requirements</title>
15416                 <pubdate>March 2005</pubdate>
15417               </biblioentry>
15418               <biblioentry>
15419                 <abbrev>RFC4034</abbrev>
15420                 <authorgroup>
15421                   <author>
15422                     <firstname>R.</firstname>
15423                     <surname>Arends</surname>
15424                   </author>
15425                   <author>
15426                     <firstname>R.</firstname>
15427                     <surname>Austein</surname>
15428                   </author>
15429                   <author>
15430                     <firstname>M.</firstname>
15431                     <surname>Larson</surname>
15432                   </author>
15433                   <author>
15434                     <firstname>D.</firstname>
15435                     <surname>Massey</surname>
15436                   </author>
15437                   <author>
15438                     <firstname>S.</firstname>
15439                     <surname>Rose</surname>
15440                   </author>
15441                 </authorgroup>
15442                 <title>Resource Records for the DNS Security Extensions</title>
15443                 <pubdate>March 2005</pubdate>
15444               </biblioentry>
15445               <biblioentry>
15446                 <abbrev>RFC4035</abbrev>
15447                 <authorgroup>
15448                   <author>
15449                     <firstname>R.</firstname>
15450                     <surname>Arends</surname>
15451                   </author>
15452                   <author>
15453                     <firstname>R.</firstname>
15454                     <surname>Austein</surname>
15455                   </author>
15456                   <author>
15457                     <firstname>M.</firstname>
15458                     <surname>Larson</surname>
15459                   </author>
15460                   <author>
15461                     <firstname>D.</firstname>
15462                     <surname>Massey</surname>
15463                   </author>
15464                   <author>
15465                     <firstname>S.</firstname>
15466                     <surname>Rose</surname>
15467                   </author>
15468                 </authorgroup>
15469                 <title>Protocol Modifications for the DNS
15470                        Security Extensions</title>
15471                 <pubdate>March 2005</pubdate>
15472               </biblioentry>
15473             </bibliodiv>
15474             <bibliodiv>
15475               <title>Other Important RFCs About <acronym>DNS</acronym>
15476                 Implementation</title>
15477               <biblioentry>
15478                 <abbrev>RFC1535</abbrev>
15479                 <author>
15480                   <surname>Gavron</surname>
15481                   <firstname>E.</firstname>
15482                 </author>
15483                 <title>A Security Problem and Proposed Correction With Widely
15484                   Deployed <acronym>DNS</acronym> Software.</title>
15485                 <pubdate>October 1993</pubdate>
15486               </biblioentry>
15487               <biblioentry>
15488                 <abbrev>RFC1536</abbrev>
15489                 <authorgroup>
15490                   <author>
15491                     <surname>Kumar</surname>
15492                     <firstname>A.</firstname>
15493                   </author>
15494                   <author>
15495                     <firstname>J.</firstname>
15496                     <surname>Postel</surname>
15497                   </author>
15498                   <author>
15499                     <firstname>C.</firstname>
15500                     <surname>Neuman</surname>
15501                   </author>
15502                   <author>
15503                     <firstname>P.</firstname>
15504                     <surname>Danzig</surname>
15505                   </author>
15506                   <author>
15507                     <firstname>S.</firstname>
15508                     <surname>Miller</surname>
15509                   </author>
15510                 </authorgroup>
15511                 <title>Common <acronym>DNS</acronym> Implementation
15512                   Errors and Suggested Fixes</title>
15513                 <pubdate>October 1993</pubdate>
15514               </biblioentry>
15515               <biblioentry>
15516                 <abbrev>RFC1982</abbrev>
15517                 <authorgroup>
15518                   <author>
15519                     <surname>Elz</surname>
15520                     <firstname>R.</firstname>
15521                   </author>
15522                   <author>
15523                     <firstname>R.</firstname>
15524                     <surname>Bush</surname>
15525                   </author>
15526                 </authorgroup>
15527                 <title>Serial Number Arithmetic</title>
15528                 <pubdate>August 1996</pubdate>
15529               </biblioentry>
15530               <biblioentry>
15531                 <abbrev>RFC4074</abbrev>
15532                 <authorgroup>
15533                   <author>
15534                     <surname>Morishita</surname>
15535                     <firstname>Y.</firstname>
15536                   </author>
15537                   <author>
15538                     <firstname>T.</firstname>
15539                     <surname>Jinmei</surname>
15540                   </author>
15541                 </authorgroup>
15542                 <title>Common Misbehaviour Against <acronym>DNS</acronym>
15543                 Queries for IPv6 Addresses</title>
15544                 <pubdate>May 2005</pubdate>
15545               </biblioentry>
15546             </bibliodiv>
15547             <bibliodiv>
15548               <title>Resource Record Types</title>
15549               <biblioentry>
15550                 <abbrev>RFC1183</abbrev>
15551                 <authorgroup>
15552                   <author>
15553                     <surname>Everhart</surname>
15554                     <firstname>C.F.</firstname>
15555                   </author>
15556                   <author>
15557                     <firstname>L. A.</firstname>
15558                     <surname>Mamakos</surname>
15559                   </author>
15560                   <author>
15561                     <firstname>R.</firstname>
15562                     <surname>Ullmann</surname>
15563                   </author>
15564                   <author>
15565                     <firstname>P.</firstname>
15566                     <surname>Mockapetris</surname>
15567                   </author>
15568                 </authorgroup>
15569                 <title>New <acronym>DNS</acronym> RR Definitions</title>
15570                 <pubdate>October 1990</pubdate>
15571               </biblioentry>
15572               <biblioentry>
15573                 <abbrev>RFC1706</abbrev>
15574                 <authorgroup>
15575                   <author>
15576                     <surname>Manning</surname>
15577                     <firstname>B.</firstname>
15578                   </author>
15579                   <author>
15580                     <firstname>R.</firstname>
15581                     <surname>Colella</surname>
15582                   </author>
15583                 </authorgroup>
15584                 <title><acronym>DNS</acronym> NSAP Resource Records</title>
15585                 <pubdate>October 1994</pubdate>
15586               </biblioentry>
15587               <biblioentry>
15588                 <abbrev>RFC2168</abbrev>
15589                 <authorgroup>
15590                   <author>
15591                     <surname>Daniel</surname>
15592                     <firstname>R.</firstname>
15593                   </author>
15594                   <author>
15595                     <firstname>M.</firstname>
15596                     <surname>Mealling</surname>
15597                   </author>
15598                 </authorgroup>
15599                 <title>Resolution of Uniform Resource Identifiers using
15600                   the Domain Name System</title>
15601                 <pubdate>June 1997</pubdate>
15602               </biblioentry>
15603               <biblioentry>
15604                 <abbrev>RFC1876</abbrev>
15605                 <authorgroup>
15606                   <author>
15607                     <surname>Davis</surname>
15608                     <firstname>C.</firstname>
15609                   </author>
15610                   <author>
15611                     <firstname>P.</firstname>
15612                     <surname>Vixie</surname>
15613                   </author>
15614                   <author>
15615                     <firstname>T.</firstname>
15616                     <firstname>Goodwin</firstname>
15617                   </author>
15618                   <author>
15619                     <firstname>I.</firstname>
15620                     <surname>Dickinson</surname>
15621                   </author>
15622                 </authorgroup>
15623                 <title>A Means for Expressing Location Information in the
15624                   Domain
15625                   Name System</title>
15626                 <pubdate>January 1996</pubdate>
15627               </biblioentry>
15628               <biblioentry>
15629                 <abbrev>RFC2052</abbrev>
15630                 <authorgroup>
15631                   <author>
15632                     <surname>Gulbrandsen</surname>
15633                     <firstname>A.</firstname>
15634                   </author>
15635                   <author>
15636                     <firstname>P.</firstname>
15637                     <surname>Vixie</surname>
15638                   </author>
15639                 </authorgroup>
15640                 <title>A <acronym>DNS</acronym> RR for Specifying the
15641                   Location of
15642                   Services.</title>
15643                 <pubdate>October 1996</pubdate>
15644               </biblioentry>
15645               <biblioentry>
15646                 <abbrev>RFC2163</abbrev>
15647                 <author>
15648                   <surname>Allocchio</surname>
15649                   <firstname>A.</firstname>
15650                 </author>
15651                 <title>Using the Internet <acronym>DNS</acronym> to
15652                   Distribute MIXER
15653                   Conformant Global Address Mapping</title>
15654                 <pubdate>January 1998</pubdate>
15655               </biblioentry>
15656               <biblioentry>
15657                 <abbrev>RFC2230</abbrev>
15658                 <author>
15659                   <surname>Atkinson</surname>
15660                   <firstname>R.</firstname>
15661                 </author>
15662                 <title>Key Exchange Delegation Record for the <acronym>DNS</acronym></title>
15663                 <pubdate>October 1997</pubdate>
15664               </biblioentry>
15665               <biblioentry>
15666                 <abbrev>RFC2536</abbrev>
15667                 <author>
15668                   <surname>Eastlake</surname>
15669                   <firstname>D.</firstname>
15670                   <lineage>3rd</lineage>
15671                 </author>
15672                 <title>DSA KEYs and SIGs in the Domain Name System (DNS)</title>
15673                 <pubdate>March 1999</pubdate>
15674               </biblioentry>
15675               <biblioentry>
15676                 <abbrev>RFC2537</abbrev>
15677                 <author>
15678                   <surname>Eastlake</surname>
15679                   <firstname>D.</firstname>
15680                   <lineage>3rd</lineage>
15681                 </author>
15682                 <title>RSA/MD5 KEYs and SIGs in the Domain Name System (DNS)</title>
15683                 <pubdate>March 1999</pubdate>
15684               </biblioentry>
15685               <biblioentry>
15686                 <abbrev>RFC2538</abbrev>
15687                 <authorgroup>
15688                   <author>
15689                     <surname>Eastlake</surname>
15690                     <firstname>D.</firstname>
15691                     <lineage>3rd</lineage>
15692                   </author>
15693                   <author>
15694                     <surname>Gudmundsson</surname>
15695                     <firstname>O.</firstname>
15696                   </author>
15697                 </authorgroup>
15698                 <title>Storing Certificates in the Domain Name System (DNS)</title>
15699                 <pubdate>March 1999</pubdate>
15700               </biblioentry>
15701               <biblioentry>
15702                 <abbrev>RFC2539</abbrev>
15703                 <authorgroup>
15704                   <author>
15705                     <surname>Eastlake</surname>
15706                     <firstname>D.</firstname>
15707                     <lineage>3rd</lineage>
15708                   </author>
15709                 </authorgroup>
15710                 <title>Storage of Diffie-Hellman Keys in the Domain Name System (DNS)</title>
15711                 <pubdate>March 1999</pubdate>
15712               </biblioentry>
15713               <biblioentry>
15714                 <abbrev>RFC2540</abbrev>
15715                 <authorgroup>
15716                   <author>
15717                     <surname>Eastlake</surname>
15718                     <firstname>D.</firstname>
15719                     <lineage>3rd</lineage>
15720                   </author>
15721                 </authorgroup>
15722                 <title>Detached Domain Name System (DNS) Information</title>
15723                 <pubdate>March 1999</pubdate>
15724               </biblioentry>
15725               <biblioentry>
15726                 <abbrev>RFC2782</abbrev>
15727                 <author>
15728                   <surname>Gulbrandsen</surname>
15729                   <firstname>A.</firstname>
15730                 </author>
15731                 <author>
15732                   <surname>Vixie</surname>
15733                   <firstname>P.</firstname>
15734                 </author>
15735                 <author>
15736                   <surname>Esibov</surname>
15737                   <firstname>L.</firstname>
15738                 </author>
15739                 <title>A DNS RR for specifying the location of services (DNS SRV)</title>
15740                 <pubdate>February 2000</pubdate>
15741               </biblioentry>
15742               <biblioentry>
15743                 <abbrev>RFC2915</abbrev>
15744                 <author>
15745                   <surname>Mealling</surname>
15746                   <firstname>M.</firstname>
15747                 </author>
15748                 <author>
15749                   <surname>Daniel</surname>
15750                   <firstname>R.</firstname>
15751                 </author>
15752                 <title>The Naming Authority Pointer (NAPTR) DNS Resource Record</title>
15753                 <pubdate>September 2000</pubdate>
15754               </biblioentry>
15755               <biblioentry>
15756                 <abbrev>RFC3110</abbrev>
15757                 <author>
15758                     <surname>Eastlake</surname>
15759                     <firstname>D.</firstname>
15760                     <lineage>3rd</lineage>
15761                 </author>
15762                 <title>RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS)</title>
15763                 <pubdate>May 2001</pubdate>
15764               </biblioentry>
15765               <biblioentry>
15766                 <abbrev>RFC3123</abbrev>
15767                 <author>
15768                   <surname>Koch</surname>
15769                   <firstname>P.</firstname>
15770                 </author>
15771                 <title>A DNS RR Type for Lists of Address Prefixes (APL RR)</title>
15772                 <pubdate>June 2001</pubdate>
15773               </biblioentry>
15774               <biblioentry>
15775                 <abbrev>RFC3596</abbrev>
15776                 <authorgroup>
15777                   <author>
15778                     <surname>Thomson</surname>
15779                     <firstname>S.</firstname>
15780                   </author>
15781                   <author>
15782                     <firstname>C.</firstname>
15783                     <surname>Huitema</surname>
15784                   </author>
15785                   <author>
15786                     <firstname>V.</firstname>
15787                     <surname>Ksinant</surname>
15788                   </author>
15789                   <author>
15790                     <firstname>M.</firstname>
15791                     <surname>Souissi</surname>
15792                   </author>
15793                 </authorgroup>
15794                 <title><acronym>DNS</acronym> Extensions to support IP
15795                   version 6</title>
15796                 <pubdate>October 2003</pubdate>
15797               </biblioentry>
15798               <biblioentry>
15799                 <abbrev>RFC3597</abbrev>
15800                 <author>
15801                   <surname>Gustafsson</surname>
15802                   <firstname>A.</firstname>
15803                 </author>
15804                 <title>Handling of Unknown DNS Resource Record (RR) Types</title>
15805                 <pubdate>September 2003</pubdate>
15806               </biblioentry>
15807             </bibliodiv>
15808             <bibliodiv>
15809               <title><acronym>DNS</acronym> and the Internet</title>
15810               <biblioentry>
15811                 <abbrev>RFC1101</abbrev>
15812                 <author>
15813                   <surname>Mockapetris</surname>
15814                   <firstname>P. V.</firstname>
15815                 </author>
15816                 <title><acronym>DNS</acronym> Encoding of Network Names
15817                   and Other Types</title>
15818                 <pubdate>April 1989</pubdate>
15819               </biblioentry>
15820               <biblioentry>
15821                 <abbrev>RFC1123</abbrev>
15822                 <author>
15823                   <surname>Braden</surname>
15824                   <surname>R.</surname>
15825                 </author>
15826                 <title>Requirements for Internet Hosts - Application and
15827                   Support</title>
15828                 <pubdate>October 1989</pubdate>
15829               </biblioentry>
15830               <biblioentry>
15831                 <abbrev>RFC1591</abbrev>
15832                 <author>
15833                   <surname>Postel</surname>
15834                   <firstname>J.</firstname>
15835                 </author>
15836                 <title>Domain Name System Structure and Delegation</title>
15837                 <pubdate>March 1994</pubdate>
15838               </biblioentry>
15839               <biblioentry>
15840                 <abbrev>RFC2317</abbrev>
15841                 <authorgroup>
15842                   <author>
15843                     <surname>Eidnes</surname>
15844                     <firstname>H.</firstname>
15845                   </author>
15846                   <author>
15847                     <firstname>G.</firstname>
15848                     <surname>de Groot</surname>
15849                   </author>
15850                   <author>
15851                     <firstname>P.</firstname>
15852                     <surname>Vixie</surname>
15853                   </author>
15854                 </authorgroup>
15855                 <title>Classless IN-ADDR.ARPA Delegation</title>
15856                 <pubdate>March 1998</pubdate>
15857               </biblioentry>
15858               <biblioentry>
15859                 <abbrev>RFC2826</abbrev>
15860                 <authorgroup>
15861                   <author>
15862                     <surname>Internet Architecture Board</surname>
15863                   </author>
15864                 </authorgroup>
15865                 <title>IAB Technical Comment on the Unique DNS Root</title>
15866                 <pubdate>May 2000</pubdate>
15867               </biblioentry>
15868               <biblioentry>
15869                 <abbrev>RFC2929</abbrev>
15870                 <authorgroup>
15871                   <author>
15872                     <surname>Eastlake</surname>
15873                     <firstname>D.</firstname>
15874                     <lineage>3rd</lineage>
15875                   </author>
15876                   <author>
15877                     <surname>Brunner-Williams</surname>
15878                     <firstname>E.</firstname>
15879                   </author>
15880                   <author>
15881                     <surname>Manning</surname>
15882                     <firstname>B.</firstname>
15883                   </author>
15884                 </authorgroup>
15885                 <title>Domain Name System (DNS) IANA Considerations</title>
15886                 <pubdate>September 2000</pubdate>
15887               </biblioentry>
15888             </bibliodiv>
15889             <bibliodiv>
15890               <title><acronym>DNS</acronym> Operations</title>
15891               <biblioentry>
15892                 <abbrev>RFC1033</abbrev>
15893                 <author>
15894                   <surname>Lottor</surname>
15895                   <firstname>M.</firstname>
15896                 </author>
15897                 <title>Domain administrators operations guide.</title>
15898                 <pubdate>November 1987</pubdate>
15899               </biblioentry>
15900               <biblioentry>
15901                 <abbrev>RFC1537</abbrev>
15902                 <author>
15903                   <surname>Beertema</surname>
15904                   <firstname>P.</firstname>
15905                 </author>
15906                 <title>Common <acronym>DNS</acronym> Data File
15907                   Configuration Errors</title>
15908                 <pubdate>October 1993</pubdate>
15909               </biblioentry>
15910               <biblioentry>
15911                 <abbrev>RFC1912</abbrev>
15912                 <author>
15913                   <surname>Barr</surname>
15914                   <firstname>D.</firstname>
15915                 </author>
15916                 <title>Common <acronym>DNS</acronym> Operational and
15917                   Configuration Errors</title>
15918                 <pubdate>February 1996</pubdate>
15919               </biblioentry>
15920               <biblioentry>
15921                 <abbrev>RFC2010</abbrev>
15922                 <authorgroup>
15923                   <author>
15924                     <surname>Manning</surname>
15925                     <firstname>B.</firstname>
15926                   </author>
15927                   <author>
15928                     <firstname>P.</firstname>
15929                     <surname>Vixie</surname>
15930                   </author>
15931                 </authorgroup>
15932                 <title>Operational Criteria for Root Name Servers.</title>
15933                 <pubdate>October 1996</pubdate>
15934               </biblioentry>
15935               <biblioentry>
15936                 <abbrev>RFC2219</abbrev>
15937                 <authorgroup>
15938                   <author>
15939                     <surname>Hamilton</surname>
15940                     <firstname>M.</firstname>
15941                   </author>
15942                   <author>
15943                     <firstname>R.</firstname>
15944                     <surname>Wright</surname>
15945                   </author>
15946                 </authorgroup>
15947                 <title>Use of <acronym>DNS</acronym> Aliases for
15948                   Network Services.</title>
15949                 <pubdate>October 1997</pubdate>
15950               </biblioentry>
15951             </bibliodiv>
15952             <bibliodiv>
15953               <title>Internationalized Domain Names</title>
15954               <biblioentry>
15955                 <abbrev>RFC2825</abbrev>
15956                 <authorgroup>
15957                   <author>
15958                     <surname>IAB</surname>
15959                   </author>
15960                   <author>
15961                     <surname>Daigle</surname>
15962                     <firstname>R.</firstname>
15963                   </author>
15964                 </authorgroup>
15965                 <title>A Tangled Web: Issues of I18N, Domain Names,
15966                        and the Other Internet protocols</title>
15967                 <pubdate>May 2000</pubdate>
15968               </biblioentry>
15969               <biblioentry>
15970                 <abbrev>RFC3490</abbrev>
15971                 <authorgroup>
15972                   <author>
15973                     <surname>Faltstrom</surname>
15974                     <firstname>P.</firstname>
15975                   </author>
15976                   <author>
15977                     <surname>Hoffman</surname>
15978                     <firstname>P.</firstname>
15979                   </author>
15980                   <author>
15981                     <surname>Costello</surname>
15982                     <firstname>A.</firstname>
15983                   </author>
15984                 </authorgroup>
15985                 <title>Internationalizing Domain Names in Applications (IDNA)</title>
15986                 <pubdate>March 2003</pubdate>
15987               </biblioentry>
15988               <biblioentry>
15989                 <abbrev>RFC3491</abbrev>
15990                 <authorgroup>
15991                   <author>
15992                     <surname>Hoffman</surname>
15993                     <firstname>P.</firstname>
15994                   </author>
15995                   <author>
15996                     <surname>Blanchet</surname>
15997                     <firstname>M.</firstname>
15998                   </author>
15999                 </authorgroup>
16000                 <title>Nameprep: A Stringprep Profile for Internationalized Domain Names</title>
16001                 <pubdate>March 2003</pubdate>
16002               </biblioentry>
16003               <biblioentry>
16004                 <abbrev>RFC3492</abbrev>
16005                 <authorgroup>
16006                   <author>
16007                     <surname>Costello</surname>
16008                     <firstname>A.</firstname>
16009                   </author>
16010                 </authorgroup>
16011                 <title>Punycode: A Bootstring encoding of Unicode
16012                        for Internationalized Domain Names in
16013                        Applications (IDNA)</title>
16014                 <pubdate>March 2003</pubdate>
16015               </biblioentry>
16016             </bibliodiv>
16017             <bibliodiv>
16018               <title>Other <acronym>DNS</acronym>-related RFCs</title>
16019               <note>
16020                 <para>
16021                   Note: the following list of RFCs, although
16022                   <acronym>DNS</acronym>-related, are not
16023                   concerned with implementing software.
16024                 </para>
16025               </note>
16026               <biblioentry>
16027                 <abbrev>RFC1464</abbrev>
16028                 <author>
16029                   <surname>Rosenbaum</surname>
16030                   <firstname>R.</firstname>
16031                 </author>
16032                 <title>Using the Domain Name System To Store Arbitrary String
16033                   Attributes</title>
16034                 <pubdate>May 1993</pubdate>
16035               </biblioentry>
16036               <biblioentry>
16037                 <abbrev>RFC1713</abbrev>
16038                 <author>
16039                   <surname>Romao</surname>
16040                   <firstname>A.</firstname>
16041                 </author>
16042                 <title>Tools for <acronym>DNS</acronym> Debugging</title>
16043                 <pubdate>November 1994</pubdate>
16044               </biblioentry>
16045               <biblioentry>
16046                 <abbrev>RFC1794</abbrev>
16047                 <author>
16048                   <surname>Brisco</surname>
16049                   <firstname>T.</firstname>
16050                 </author>
16051                 <title><acronym>DNS</acronym> Support for Load
16052                   Balancing</title>
16053                 <pubdate>April 1995</pubdate>
16054               </biblioentry>
16055               <biblioentry>
16056                 <abbrev>RFC2240</abbrev>
16057                 <author>
16058                   <surname>Vaughan</surname>
16059                   <firstname>O.</firstname>
16060                 </author>
16061                 <title>A Legal Basis for Domain Name Allocation</title>
16062                 <pubdate>November 1997</pubdate>
16063               </biblioentry>
16064               <biblioentry>
16065                 <abbrev>RFC2345</abbrev>
16066                 <authorgroup>
16067                   <author>
16068                     <surname>Klensin</surname>
16069                     <firstname>J.</firstname>
16070                   </author>
16071                   <author>
16072                     <firstname>T.</firstname>
16073                     <surname>Wolf</surname>
16074                   </author>
16075                   <author>
16076                     <firstname>G.</firstname>
16077                     <surname>Oglesby</surname>
16078                   </author>
16079                 </authorgroup>
16080                 <title>Domain Names and Company Name Retrieval</title>
16081                 <pubdate>May 1998</pubdate>
16082               </biblioentry>
16083               <biblioentry>
16084                 <abbrev>RFC2352</abbrev>
16085                 <author>
16086                   <surname>Vaughan</surname>
16087                   <firstname>O.</firstname>
16088                 </author>
16089                 <title>A Convention For Using Legal Names as Domain Names</title>
16090                 <pubdate>May 1998</pubdate>
16091               </biblioentry>
16092               <biblioentry>
16093                 <abbrev>RFC3071</abbrev>
16094                 <authorgroup>
16095                   <author>
16096                     <surname>Klensin</surname>
16097                     <firstname>J.</firstname>
16098                   </author>
16099                 </authorgroup>
16100                 <title>Reflections on the DNS, RFC 1591, and Categories of Domains</title>
16101                 <pubdate>February 2001</pubdate>
16102               </biblioentry>
16103               <biblioentry>
16104                 <abbrev>RFC3258</abbrev>
16105                 <authorgroup>
16106                   <author>
16107                     <surname>Hardie</surname>
16108                     <firstname>T.</firstname>
16109                   </author>
16110                 </authorgroup>
16111                 <title>Distributing Authoritative Name Servers via
16112                        Shared Unicast Addresses</title>
16113                 <pubdate>April 2002</pubdate>
16114               </biblioentry>
16115               <biblioentry>
16116                 <abbrev>RFC3901</abbrev>
16117                 <authorgroup>
16118                   <author>
16119                     <surname>Durand</surname>
16120                     <firstname>A.</firstname>
16121                   </author>
16122                   <author>
16123                     <firstname>J.</firstname>
16124                     <surname>Ihren</surname>
16125                   </author>
16126                 </authorgroup>
16127                 <title>DNS IPv6 Transport Operational Guidelines</title>
16128                 <pubdate>September 2004</pubdate>
16129               </biblioentry>
16130             </bibliodiv>
16131             <bibliodiv>
16132               <title>Obsolete and Unimplemented Experimental RFC</title>
16133               <biblioentry>
16134                 <abbrev>RFC1712</abbrev>
16135                 <authorgroup>
16136                   <author>
16137                     <surname>Farrell</surname>
16138                     <firstname>C.</firstname>
16139                   </author>
16140                   <author>
16141                     <firstname>M.</firstname>
16142                     <surname>Schulze</surname>
16143                   </author>
16144                   <author>
16145                     <firstname>S.</firstname>
16146                     <surname>Pleitner</surname>
16147                   </author>
16148                   <author>
16149                     <firstname>D.</firstname>
16150                     <surname>Baldoni</surname>
16151                   </author>
16152                 </authorgroup>
16153                 <title><acronym>DNS</acronym> Encoding of Geographical
16154                   Location</title>
16155                 <pubdate>November 1994</pubdate>
16156               </biblioentry>
16157               <biblioentry>
16158                 <abbrev>RFC2673</abbrev>
16159                 <authorgroup>
16160                   <author>
16161                     <surname>Crawford</surname>
16162                     <firstname>M.</firstname>
16163                   </author>
16164                 </authorgroup>
16165                 <title>Binary Labels in the Domain Name System</title>
16166                 <pubdate>August 1999</pubdate>
16167               </biblioentry>
16168               <biblioentry>
16169                 <abbrev>RFC2874</abbrev>
16170                 <authorgroup>
16171                   <author>
16172                     <surname>Crawford</surname>
16173                     <firstname>M.</firstname>
16174                   </author>
16175                   <author>
16176                     <surname>Huitema</surname>
16177                     <firstname>C.</firstname>
16178                   </author>
16179                 </authorgroup>
16180                 <title>DNS Extensions to Support IPv6 Address Aggregation
16181                        and Renumbering</title>
16182                 <pubdate>July 2000</pubdate>
16183               </biblioentry>
16184             </bibliodiv>
16185             <bibliodiv>
16186               <title>Obsoleted DNS Security RFCs</title>
16187               <note>
16188                 <para>
16189                   Most of these have been consolidated into RFC4033,
16190                   RFC4034 and RFC4035 which collectively describe DNSSECbis.
16191                 </para>
16192               </note>
16193               <biblioentry>
16194                 <abbrev>RFC2065</abbrev>
16195                 <authorgroup>
16196                   <author>
16197                     <surname>Eastlake</surname>
16198                     <lineage>3rd</lineage>
16199                     <firstname>D.</firstname>
16200                   </author>
16201                   <author>
16202                     <firstname>C.</firstname>
16203                     <surname>Kaufman</surname>
16204                   </author>
16205                 </authorgroup>
16206                 <title>Domain Name System Security Extensions</title>
16207                 <pubdate>January 1997</pubdate>
16208               </biblioentry>
16209               <biblioentry>
16210                 <abbrev>RFC2137</abbrev>
16211                 <author>
16212                   <surname>Eastlake</surname>
16213                   <lineage>3rd</lineage>
16214                   <firstname>D.</firstname>
16215                 </author>
16216                 <title>Secure Domain Name System Dynamic Update</title>
16217                 <pubdate>April 1997</pubdate>
16218               </biblioentry>
16219               <biblioentry>
16220                 <abbrev>RFC2535</abbrev>
16221                 <authorgroup>
16222                   <author>
16223                     <surname>Eastlake</surname>
16224                     <lineage>3rd</lineage>
16225                     <firstname>D.</firstname>
16226                   </author>
16227                 </authorgroup>
16228                 <title>Domain Name System Security Extensions</title>
16229                 <pubdate>March 1999</pubdate>
16230               </biblioentry>
16231               <biblioentry>
16232                 <abbrev>RFC3008</abbrev>
16233                 <authorgroup>
16234                   <author>
16235                     <surname>Wellington</surname>
16236                     <firstname>B.</firstname>
16237                   </author>
16238                 </authorgroup>
16239                 <title>Domain Name System Security (DNSSEC)
16240                        Signing Authority</title>
16241                 <pubdate>November 2000</pubdate>
16242               </biblioentry>
16243               <biblioentry>
16244                 <abbrev>RFC3090</abbrev>
16245                 <authorgroup>
16246                   <author>
16247                     <surname>Lewis</surname>
16248                     <firstname>E.</firstname>
16249                   </author>
16250                 </authorgroup>
16251                 <title>DNS Security Extension Clarification on Zone Status</title>
16252                 <pubdate>March 2001</pubdate>
16253               </biblioentry>
16254               <biblioentry>
16255                 <abbrev>RFC3445</abbrev>
16256                 <authorgroup>
16257                   <author>
16258                     <surname>Massey</surname>
16259                     <firstname>D.</firstname>
16260                   </author>
16261                   <author>
16262                     <surname>Rose</surname>
16263                     <firstname>S.</firstname>
16264                   </author>
16265                 </authorgroup>
16266                 <title>Limiting the Scope of the KEY Resource Record (RR)</title>
16267                 <pubdate>December 2002</pubdate>
16268               </biblioentry>
16269               <biblioentry>
16270                 <abbrev>RFC3655</abbrev>
16271                 <authorgroup>
16272                   <author>
16273                     <surname>Wellington</surname>
16274                     <firstname>B.</firstname>
16275                   </author>
16276                   <author>
16277                     <surname>Gudmundsson</surname>
16278                     <firstname>O.</firstname>
16279                   </author>
16280                 </authorgroup>
16281                 <title>Redefinition of DNS Authenticated Data (AD) bit</title>
16282                 <pubdate>November 2003</pubdate>
16283               </biblioentry>
16284               <biblioentry>
16285                 <abbrev>RFC3658</abbrev>
16286                 <authorgroup>
16287                   <author>
16288                     <surname>Gudmundsson</surname>
16289                     <firstname>O.</firstname>
16290                   </author>
16291                 </authorgroup>
16292                 <title>Delegation Signer (DS) Resource Record (RR)</title>
16293                 <pubdate>December 2003</pubdate>
16294               </biblioentry>
16295               <biblioentry>
16296                 <abbrev>RFC3755</abbrev>
16297                 <authorgroup>
16298                   <author>
16299                     <surname>Weiler</surname>
16300                     <firstname>S.</firstname>
16301                   </author>
16302                 </authorgroup>
16303                 <title>Legacy Resolver Compatibility for Delegation Signer (DS)</title>
16304                 <pubdate>May 2004</pubdate>
16305               </biblioentry>
16306               <biblioentry>
16307                 <abbrev>RFC3757</abbrev>
16308                 <authorgroup>
16309                   <author>
16310                     <surname>Kolkman</surname>
16311                     <firstname>O.</firstname>
16312                   </author>
16313                   <author>
16314                     <surname>Schlyter</surname>
16315                     <firstname>J.</firstname>
16316                   </author>
16317                   <author>
16318                     <surname>Lewis</surname>
16319                     <firstname>E.</firstname>
16320                   </author>
16321                 </authorgroup>
16322                 <title>Domain Name System KEY (DNSKEY) Resource Record
16323                       (RR) Secure Entry Point (SEP) Flag</title>
16324                 <pubdate>April 2004</pubdate>
16325               </biblioentry>
16326               <biblioentry>
16327                 <abbrev>RFC3845</abbrev>
16328                 <authorgroup>
16329                   <author>
16330                     <surname>Schlyter</surname>
16331                     <firstname>J.</firstname>
16332                   </author>
16333                 </authorgroup>
16334                 <title>DNS Security (DNSSEC) NextSECure (NSEC) RDATA Format</title>
16335                 <pubdate>August 2004</pubdate>
16336               </biblioentry>
16337             </bibliodiv>
16338           </bibliography>
16339         </sect2>
16340         <sect2 id="internet_drafts">
16341           <title>Internet Drafts</title>
16342           <para>
16343             Internet Drafts (IDs) are rough-draft working documents of
16344             the Internet Engineering Task Force. They are, in essence, RFCs
16345             in the preliminary stages of development. Implementors are
16346             cautioned not
16347             to regard IDs as archival, and they should not be quoted or cited
16348             in any formal documents unless accompanied by the disclaimer that
16349             they are "works in progress." IDs have a lifespan of six months
16350             after which they are deleted unless updated by their authors.
16351           </para>
16352         </sect2>
16353         <sect2>
16354           <title>Other Documents About <acronym>BIND</acronym></title>
16355           <para/>
16356           <bibliography>
16357             <biblioentry>
16358               <authorgroup>
16359                 <author>
16360                   <surname>Albitz</surname>
16361                   <firstname>Paul</firstname>
16362                 </author>
16363                 <author>
16364                   <firstname>Cricket</firstname>
16365                   <surname>Liu</surname>
16366                 </author>
16367               </authorgroup>
16368               <title><acronym>DNS</acronym> and <acronym>BIND</acronym></title>
16369               <copyright>
16370                 <year>1998</year>
16371                 <holder>Sebastopol, CA: O'Reilly and Associates</holder>
16372               </copyright>
16373             </biblioentry>
16374           </bibliography>
16375         </sect2>
16376       </sect1>
16377
16378       <xi:include href="libdns.xml"/>
16379
16380     </appendix>
16381
16382
16383     <reference id="Bv9ARM.ch10">
16384       <title>Manual pages</title>
16385       <xi:include href="../../bin/dig/dig.docbook"/>
16386       <xi:include href="../../bin/dig/host.docbook"/>
16387       <xi:include href="../../bin/dnssec/dnssec-dsfromkey.docbook"/>
16388       <xi:include href="../../bin/dnssec/dnssec-keyfromlabel.docbook"/>
16389       <xi:include href="../../bin/dnssec/dnssec-keygen.docbook"/>
16390       <xi:include href="../../bin/dnssec/dnssec-revoke.docbook"/>
16391       <xi:include href="../../bin/dnssec/dnssec-settime.docbook"/>
16392       <xi:include href="../../bin/dnssec/dnssec-signzone.docbook"/>
16393       <xi:include href="../../bin/check/named-checkconf.docbook"/>
16394       <xi:include href="../../bin/check/named-checkzone.docbook"/>
16395       <xi:include href="../../bin/named/named.docbook"/>
16396       <xi:include href="../../bin/tools/named-journalprint.docbook"/>
16397       <!-- named.conf.docbook and others? -->
16398       <xi:include href="../../bin/nsupdate/nsupdate.docbook"/>
16399       <xi:include href="../../bin/rndc/rndc.docbook"/>
16400       <xi:include href="../../bin/rndc/rndc.conf.docbook"/>
16401       <xi:include href="../../bin/confgen/rndc-confgen.docbook"/>
16402       <xi:include href="../../bin/confgen/ddns-confgen.docbook"/>
16403       <xi:include href="../../bin/tools/arpaname.docbook"/>
16404       <xi:include href="../../bin/tools/genrandom.docbook"/>
16405       <xi:include href="../../bin/tools/isc-hmac-fixup.docbook"/>
16406       <xi:include href="../../bin/tools/nsec3hash.docbook"/>
16407     </reference>
16408
16409   </book>
16410
16411 <!--
16412   - Local variables:
16413   - mode: sgml
16414   - End:
16415  -->