]> CyberLeo.Net >> Repos - FreeBSD/releng/9.3.git/blob - contrib/bind9/doc/arm/Bv9ARM-book.xml
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
[FreeBSD/releng/9.3.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-2013  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$ -->
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       <year>2012</year>
36       <year>2013</year>
37       <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
38     </copyright>
39     <copyright>
40       <year>2000</year>
41       <year>2001</year>
42       <year>2002</year>
43       <year>2003</year>
44       <holder>Internet Software Consortium.</holder>
45     </copyright>
46   </bookinfo>
47
48   <chapter id="Bv9ARM.ch01">
49     <title>Introduction</title>
50     <para>
51       The Internet Domain Name System (<acronym>DNS</acronym>)
52       consists of the syntax
53       to specify the names of entities in the Internet in a hierarchical
54       manner, the rules used for delegating authority over names, and the
55       system implementation that actually maps names to Internet
56       addresses.  <acronym>DNS</acronym> data is maintained in a
57       group of distributed
58       hierarchical databases.
59     </para>
60
61     <sect1>
62       <title>Scope of Document</title>
63
64       <para>
65         The Berkeley Internet Name Domain
66         (<acronym>BIND</acronym>) implements a
67         domain name server for a number of operating systems. This
68         document provides basic information about the installation and
69         care of the Internet Systems Consortium (<acronym>ISC</acronym>)
70         <acronym>BIND</acronym> version 9 software package for
71         system administrators.
72       </para>
73
74       <para>
75         This version of the manual corresponds to BIND version 9.9.
76       </para>
77
78     </sect1>
79     <sect1>
80       <title>Organization of This Document</title>
81       <para>
82         In this document, <emphasis>Chapter 1</emphasis> introduces
83         the basic <acronym>DNS</acronym> and <acronym>BIND</acronym> concepts. <emphasis>Chapter 2</emphasis>
84         describes resource requirements for running <acronym>BIND</acronym> in various
85         environments. Information in <emphasis>Chapter 3</emphasis> is
86         <emphasis>task-oriented</emphasis> in its presentation and is
87         organized functionally, to aid in the process of installing the
88         <acronym>BIND</acronym> 9 software. The task-oriented
89         section is followed by
90         <emphasis>Chapter 4</emphasis>, which contains more advanced
91         concepts that the system administrator may need for implementing
92         certain options. <emphasis>Chapter 5</emphasis>
93         describes the <acronym>BIND</acronym> 9 lightweight
94         resolver.  The contents of <emphasis>Chapter 6</emphasis> are
95         organized as in a reference manual to aid in the ongoing
96         maintenance of the software. <emphasis>Chapter 7</emphasis> addresses
97         security considerations, and
98         <emphasis>Chapter 8</emphasis> contains troubleshooting help. The
99         main body of the document is followed by several
100         <emphasis>appendices</emphasis> which contain useful reference
101         information, such as a <emphasis>bibliography</emphasis> and
102         historic information related to <acronym>BIND</acronym>
103         and the Domain Name
104         System.
105       </para>
106     </sect1>
107     <sect1>
108       <title>Conventions Used in This Document</title>
109
110       <para>
111         In this document, we use the following general typographic
112         conventions:
113       </para>
114
115       <informaltable>
116         <tgroup cols="2">
117           <colspec colname="1" colnum="1" colwidth="3.000in"/>
118           <colspec colname="2" colnum="2" colwidth="2.625in"/>
119           <tbody>
120             <row>
121               <entry colname="1">
122                 <para>
123                   <emphasis>To describe:</emphasis>
124                 </para>
125               </entry>
126               <entry colname="2">
127                 <para>
128                   <emphasis>We use the style:</emphasis>
129                 </para>
130               </entry>
131             </row>
132             <row>
133               <entry colname="1">
134                 <para>
135                   a pathname, filename, URL, hostname,
136                   mailing list name, or new term or concept
137                 </para>
138               </entry>
139               <entry colname="2">
140                 <para>
141                   <filename>Fixed width</filename>
142                 </para>
143               </entry>
144             </row>
145             <row>
146               <entry colname="1">
147                 <para>
148                   literal user
149                   input
150                 </para>
151               </entry>
152               <entry colname="2">
153                 <para>
154                   <userinput>Fixed Width Bold</userinput>
155                 </para>
156               </entry>
157             </row>
158             <row>
159               <entry colname="1">
160                 <para>
161                   program output
162                 </para>
163               </entry>
164               <entry colname="2">
165                 <para>
166                   <computeroutput>Fixed Width</computeroutput>
167                 </para>
168               </entry>
169             </row>
170           </tbody>
171         </tgroup>
172       </informaltable>
173
174       <para>
175         The following conventions are used in descriptions of the
176         <acronym>BIND</acronym> configuration file:<informaltable colsep="0" frame="all" rowsep="0">
177                   <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
178                       <colspec colname="1" colnum="1" colsep="0" colwidth="3.000in"/>
179             <colspec colname="2" colnum="2" colsep="0" colwidth="2.625in"/>
180             <tbody>
181               <row rowsep="0">
182                 <entry colname="1" colsep="1" rowsep="1">
183                   <para>
184                     <emphasis>To describe:</emphasis>
185                   </para>
186                 </entry>
187                 <entry colname="2" rowsep="1">
188                   <para>
189                     <emphasis>We use the style:</emphasis>
190                   </para>
191                 </entry>
192               </row>
193               <row rowsep="0">
194                 <entry colname="1" colsep="1" rowsep="1">
195                   <para>
196                     keywords
197                   </para>
198                 </entry>
199                 <entry colname="2" rowsep="1">
200                   <para>
201                     <literal>Fixed Width</literal>
202                   </para>
203                 </entry>
204               </row>
205               <row rowsep="0">
206                 <entry colname="1" colsep="1" rowsep="1">
207                   <para>
208                     variables
209                   </para>
210                 </entry>
211                 <entry colname="2" rowsep="1">
212                   <para>
213                     <varname>Fixed Width</varname>
214                   </para>
215                 </entry>
216               </row>
217               <row rowsep="0">
218                 <entry colname="1" colsep="1">
219                   <para>
220                     Optional input
221                   </para>
222                 </entry>
223                 <entry colname="2">
224                   <para>
225                     <optional>Text is enclosed in square brackets</optional>
226                   </para>
227                 </entry>
228               </row>
229             </tbody>
230           </tgroup>
231         </informaltable>
232       </para>
233     </sect1>
234     <sect1>
235       <title>The Domain Name System (<acronym>DNS</acronym>)</title>
236       <para>
237         The purpose of this document is to explain the installation
238         and upkeep of the <acronym>BIND</acronym> (Berkeley Internet
239         Name Domain) software package, and we
240         begin by reviewing the fundamentals of the Domain Name System
241         (<acronym>DNS</acronym>) as they relate to <acronym>BIND</acronym>.
242       </para>
243
244       <sect2>
245         <title>DNS Fundamentals</title>
246
247         <para>
248           The Domain Name System (DNS) is a hierarchical, distributed
249           database.  It stores information for mapping Internet host names to
250           IP
251           addresses and vice versa, mail routing information, and other data
252           used by Internet applications.
253         </para>
254
255         <para>
256           Clients look up information in the DNS by calling a
257           <emphasis>resolver</emphasis> library, which sends queries to one or
258           more <emphasis>name servers</emphasis> and interprets the responses.
259           The <acronym>BIND</acronym> 9 software distribution
260           contains a
261           name server, <command>named</command>, and a resolver
262           library, <command>liblwres</command>.  The older
263           <command>libbind</command> resolver library is also available
264           from ISC as a separate download.
265         </para>
266
267         </sect2><sect2>
268         <title>Domains and Domain Names</title>
269
270         <para>
271           The data stored in the DNS is identified by <emphasis>domain names</emphasis> that are organized as a tree according to
272           organizational or administrative boundaries. Each node of the tree,
273           called a <emphasis>domain</emphasis>, is given a label. The domain
274           name of the
275           node is the concatenation of all the labels on the path from the
276           node to the <emphasis>root</emphasis> node.  This is represented
277           in written form as a string of labels listed from right to left and
278           separated by dots. A label need only be unique within its parent
279           domain.
280         </para>
281
282         <para>
283           For example, a domain name for a host at the
284           company <emphasis>Example, Inc.</emphasis> could be
285           <literal>ourhost.example.com</literal>,
286           where <literal>com</literal> is the
287           top level domain to which
288           <literal>ourhost.example.com</literal> belongs,
289           <literal>example</literal> is
290           a subdomain of <literal>com</literal>, and
291           <literal>ourhost</literal> is the
292           name of the host.
293         </para>
294
295         <para>
296           For administrative purposes, the name space is partitioned into
297           areas called <emphasis>zones</emphasis>, each starting at a node and
298           extending down to the leaf nodes or to nodes where other zones
299           start.
300           The data for each zone is stored in a <emphasis>name server</emphasis>, which answers queries about the zone using the
301           <emphasis>DNS protocol</emphasis>.
302         </para>
303
304         <para>
305           The data associated with each domain name is stored in the
306           form of <emphasis>resource records</emphasis> (<acronym>RR</acronym>s).
307           Some of the supported resource record types are described in
308           <xref linkend="types_of_resource_records_and_when_to_use_them"/>.
309         </para>
310
311         <para>
312           For more detailed information about the design of the DNS and
313           the DNS protocol, please refer to the standards documents listed in
314           <xref linkend="rfcs"/>.
315         </para>
316       </sect2>
317
318       <sect2>
319         <title>Zones</title>
320         <para>
321           To properly operate a name server, it is important to understand
322           the difference between a <emphasis>zone</emphasis>
323           and a <emphasis>domain</emphasis>.
324         </para>
325
326         <para>
327           As stated previously, a zone is a point of delegation in
328           the <acronym>DNS</acronym> tree. A zone consists of
329           those contiguous parts of the domain
330           tree for which a name server has complete information and over which
331           it has authority. It contains all domain names from a certain point
332           downward in the domain tree except those which are delegated to
333           other zones. A delegation point is marked by one or more
334           <emphasis>NS records</emphasis> in the
335           parent zone, which should be matched by equivalent NS records at
336           the root of the delegated zone.
337         </para>
338
339         <para>
340           For instance, consider the <literal>example.com</literal>
341           domain which includes names
342           such as <literal>host.aaa.example.com</literal> and
343           <literal>host.bbb.example.com</literal> even though
344           the <literal>example.com</literal> zone includes
345           only delegations for the <literal>aaa.example.com</literal> and
346           <literal>bbb.example.com</literal> zones.  A zone can
347           map
348           exactly to a single domain, but could also include only part of a
349           domain, the rest of which could be delegated to other
350           name servers. Every name in the <acronym>DNS</acronym>
351           tree is a
352           <emphasis>domain</emphasis>, even if it is
353           <emphasis>terminal</emphasis>, that is, has no
354           <emphasis>subdomains</emphasis>.  Every subdomain is a domain and
355           every domain except the root is also a subdomain. The terminology is
356           not intuitive and we suggest that you read RFCs 1033, 1034 and 1035
357           to
358           gain a complete understanding of this difficult and subtle
359           topic.
360         </para>
361
362         <para>
363           Though <acronym>BIND</acronym> is called a "domain name
364           server",
365           it deals primarily in terms of zones. The master and slave
366           declarations in the <filename>named.conf</filename> file
367           specify
368           zones, not domains. When you ask some other site if it is willing to
369           be a slave server for your <emphasis>domain</emphasis>, you are
370           actually asking for slave service for some collection of zones.
371         </para>
372       </sect2>
373
374       <sect2>
375         <title>Authoritative Name Servers</title>
376
377         <para>
378           Each zone is served by at least
379           one <emphasis>authoritative name server</emphasis>,
380           which contains the complete data for the zone.
381           To make the DNS tolerant of server and network failures,
382           most zones have two or more authoritative servers, on
383           different networks.
384         </para>
385
386         <para>
387           Responses from authoritative servers have the "authoritative
388           answer" (AA) bit set in the response packets.  This makes them
389           easy to identify when debugging DNS configurations using tools like
390           <command>dig</command> (<xref linkend="diagnostic_tools"/>).
391         </para>
392
393         <sect3>
394           <title>The Primary Master</title>
395
396           <para>
397             The authoritative server where the master copy of the zone
398             data is maintained is called the
399             <emphasis>primary master</emphasis> server, or simply the
400             <emphasis>primary</emphasis>.  Typically it loads the zone
401             contents from some local file edited by humans or perhaps
402             generated mechanically from some other local file which is
403             edited by humans.  This file is called the
404             <emphasis>zone file</emphasis> or
405             <emphasis>master file</emphasis>.
406           </para>
407
408           <para>
409             In some cases, however, the master file may not be edited
410             by humans at all, but may instead be the result of
411             <emphasis>dynamic update</emphasis> operations.
412           </para>
413         </sect3>
414
415         <sect3>
416           <title>Slave Servers</title>
417           <para>
418             The other authoritative servers, the <emphasis>slave</emphasis>
419             servers (also known as <emphasis>secondary</emphasis> servers)
420             load
421             the zone contents from another server using a replication process
422             known as a <emphasis>zone transfer</emphasis>.  Typically the data
423             are
424             transferred directly from the primary master, but it is also
425             possible
426             to transfer it from another slave.  In other words, a slave server
427             may itself act as a master to a subordinate slave server.
428           </para>
429         </sect3>
430
431         <sect3>
432           <title>Stealth Servers</title>
433
434           <para>
435             Usually all of the zone's authoritative servers are listed in
436             NS records in the parent zone.  These NS records constitute
437             a <emphasis>delegation</emphasis> of the zone from the parent.
438             The authoritative servers are also listed in the zone file itself,
439             at the <emphasis>top level</emphasis> or <emphasis>apex</emphasis>
440             of the zone.  You can list servers in the zone's top-level NS
441             records that are not in the parent's NS delegation, but you cannot
442             list servers in the parent's delegation that are not present at
443             the zone's top level.
444           </para>
445
446           <para>
447             A <emphasis>stealth server</emphasis> is a server that is
448             authoritative for a zone but is not listed in that zone's NS
449             records.  Stealth servers can be used for keeping a local copy of
450             a
451             zone to speed up access to the zone's records or to make sure that
452             the
453             zone is available even if all the "official" servers for the zone
454             are
455             inaccessible.
456           </para>
457
458           <para>
459             A configuration where the primary master server itself is a
460             stealth server is often referred to as a "hidden primary"
461             configuration.  One use for this configuration is when the primary
462             master
463             is behind a firewall and therefore unable to communicate directly
464             with the outside world.
465           </para>
466
467         </sect3>
468
469       </sect2>
470       <sect2>
471
472         <title>Caching Name Servers</title>
473
474         <!--
475           - Terminology here is inconsistent.  Probably ought to
476           - convert to using "recursive name server" everywhere
477           - with just a note about "caching" terminology.
478           -->
479
480         <para>
481           The resolver libraries provided by most operating systems are
482           <emphasis>stub resolvers</emphasis>, meaning that they are not
483           capable of
484           performing the full DNS resolution process by themselves by talking
485           directly to the authoritative servers.  Instead, they rely on a
486           local
487           name server to perform the resolution on their behalf.  Such a
488           server
489           is called a <emphasis>recursive</emphasis> name server; it performs
490           <emphasis>recursive lookups</emphasis> for local clients.
491         </para>
492
493         <para>
494           To improve performance, recursive servers cache the results of
495           the lookups they perform.  Since the processes of recursion and
496           caching are intimately connected, the terms
497           <emphasis>recursive server</emphasis> and
498           <emphasis>caching server</emphasis> are often used synonymously.
499         </para>
500
501         <para>
502           The length of time for which a record may be retained in
503           the cache of a caching name server is controlled by the
504           Time To Live (TTL) field associated with each resource record.
505         </para>
506
507         <sect3>
508           <title>Forwarding</title>
509
510           <para>
511             Even a caching name server does not necessarily perform
512             the complete recursive lookup itself.  Instead, it can
513             <emphasis>forward</emphasis> some or all of the queries
514             that it cannot satisfy from its cache to another caching name
515             server,
516             commonly referred to as a <emphasis>forwarder</emphasis>.
517           </para>
518
519           <para>
520             There may be one or more forwarders,
521             and they are queried in turn until the list is exhausted or an
522             answer
523             is found. Forwarders are typically used when you do not
524             wish all the servers at a given site to interact directly with the
525             rest of
526             the Internet servers. A typical scenario would involve a number
527             of internal <acronym>DNS</acronym> servers and an
528             Internet firewall. Servers unable
529             to pass packets through the firewall would forward to the server
530             that can do it, and that server would query the Internet <acronym>DNS</acronym> servers
531             on the internal server's behalf.
532           </para>
533         </sect3>
534
535       </sect2>
536
537       <sect2>
538         <title>Name Servers in Multiple Roles</title>
539
540         <para>
541           The <acronym>BIND</acronym> name server can
542           simultaneously act as
543           a master for some zones, a slave for other zones, and as a caching
544           (recursive) server for a set of local clients.
545         </para>
546
547         <para>
548           However, since the functions of authoritative name service
549           and caching/recursive name service are logically separate, it is
550           often advantageous to run them on separate server machines.
551
552           A server that only provides authoritative name service
553           (an <emphasis>authoritative-only</emphasis> server) can run with
554           recursion disabled, improving reliability and security.
555
556           A server that is not authoritative for any zones and only provides
557           recursive service to local
558           clients (a <emphasis>caching-only</emphasis> server)
559           does not need to be reachable from the Internet at large and can
560           be placed inside a firewall.
561         </para>
562
563       </sect2>
564     </sect1>
565
566   </chapter>
567
568   <chapter id="Bv9ARM.ch02">
569     <title><acronym>BIND</acronym> Resource Requirements</title>
570
571     <sect1>
572       <title>Hardware requirements</title>
573
574       <para>
575         <acronym>DNS</acronym> hardware requirements have
576         traditionally been quite modest.
577         For many installations, servers that have been pensioned off from
578         active duty have performed admirably as <acronym>DNS</acronym> servers.
579       </para>
580       <para>
581         The DNSSEC features of <acronym>BIND</acronym> 9
582         may prove to be quite
583         CPU intensive however, so organizations that make heavy use of these
584         features may wish to consider larger systems for these applications.
585         <acronym>BIND</acronym> 9 is fully multithreaded, allowing
586         full utilization of
587         multiprocessor systems for installations that need it.
588       </para>
589     </sect1>
590     <sect1>
591       <title>CPU Requirements</title>
592       <para>
593         CPU requirements for <acronym>BIND</acronym> 9 range from
594         i486-class machines
595         for serving of static zones without caching, to enterprise-class
596         machines if you intend to process many dynamic updates and DNSSEC
597         signed zones, serving many thousands of queries per second.
598       </para>
599     </sect1>
600
601     <sect1>
602       <title>Memory Requirements</title>
603       <para>
604         The memory of the server has to be large enough to fit the
605         cache and zones loaded off disk.  The <command>max-cache-size</command>
606         option can be used to limit the amount of memory used by the cache,
607         at the expense of reducing cache hit rates and causing more <acronym>DNS</acronym>
608         traffic.
609         Additionally, if additional section caching
610         (<xref linkend="acache"/>) is enabled,
611         the <command>max-acache-size</command> option can be used to
612         limit the amount
613         of memory used by the mechanism.
614         It is still good practice to have enough memory to load
615         all zone and cache data into memory &mdash; unfortunately, the best
616         way
617         to determine this for a given installation is to watch the name server
618         in operation. After a few weeks the server process should reach
619         a relatively stable size where entries are expiring from the cache as
620         fast as they are being inserted.
621       </para>
622       <!--
623         - Add something here about leaving overhead for attacks?
624         - How much overhead?  Percentage?
625         -->
626     </sect1>
627
628     <sect1>
629       <title>Name Server Intensive Environment Issues</title>
630       <para>
631         For name server intensive environments, there are two alternative
632         configurations that may be used. The first is where clients and
633         any second-level internal name servers query a main name server, which
634         has enough memory to build a large cache. This approach minimizes
635         the bandwidth used by external name lookups. The second alternative
636         is to set up second-level internal name servers to make queries
637         independently.
638         In this configuration, none of the individual machines needs to
639         have as much memory or CPU power as in the first alternative, but
640         this has the disadvantage of making many more external queries,
641         as none of the name servers share their cached data.
642       </para>
643     </sect1>
644
645     <sect1>
646       <title>Supported Operating Systems</title>
647       <para>
648         ISC <acronym>BIND</acronym> 9 compiles and runs on a large
649         number
650         of Unix-like operating systems and on 
651         Microsoft Windows Server 2003 and 2008, and Windows XP and Vista.
652         For an up-to-date
653         list of supported systems, see the README file in the top level
654         directory
655         of the BIND 9 source distribution.
656       </para>
657     </sect1>
658   </chapter>
659
660   <chapter id="Bv9ARM.ch03">
661     <title>Name Server Configuration</title>
662     <para>
663       In this chapter we provide some suggested configurations along
664       with guidelines for their use.  We suggest reasonable values for
665       certain option settings.
666     </para>
667
668     <sect1 id="sample_configuration">
669       <title>Sample Configurations</title>
670       <sect2>
671         <title>A Caching-only Name Server</title>
672         <para>
673           The following sample configuration is appropriate for a caching-only
674           name server for use by clients internal to a corporation.  All
675           queries
676           from outside clients are refused using the <command>allow-query</command>
677           option.  Alternatively, the same effect could be achieved using
678           suitable
679           firewall rules.
680         </para>
681
682 <programlisting>
683 // Two corporate subnets we wish to allow queries from.
684 acl corpnets { 192.168.4.0/24; 192.168.7.0/24; };
685 options {
686      // Working directory
687      directory "/etc/namedb";
688
689      allow-query { corpnets; };
690 };
691 // Provide a reverse mapping for the loopback
692 // address 127.0.0.1
693 zone "0.0.127.in-addr.arpa" {
694      type master;
695      file "localhost.rev";
696      notify no;
697 };
698 </programlisting>
699
700       </sect2>
701
702       <sect2>
703         <title>An Authoritative-only Name Server</title>
704         <para>
705           This sample configuration is for an authoritative-only server
706           that is the master server for "<filename>example.com</filename>"
707           and a slave for the subdomain "<filename>eng.example.com</filename>".
708         </para>
709
710 <programlisting>
711 options {
712      // Working directory
713      directory "/etc/namedb";
714      // Do not allow access to cache
715      allow-query-cache { none; };
716      // This is the default
717      allow-query { any; };
718      // Do not provide recursive service
719      recursion no;
720 };
721
722 // Provide a reverse mapping for the loopback
723 // address 127.0.0.1
724 zone "0.0.127.in-addr.arpa" {
725      type master;
726      file "localhost.rev";
727      notify no;
728 };
729 // We are the master server for example.com
730 zone "example.com" {
731      type master;
732      file "example.com.db";
733      // IP addresses of slave servers allowed to
734      // transfer example.com
735      allow-transfer {
736           192.168.4.14;
737           192.168.5.53;
738      };
739 };
740 // We are a slave server for eng.example.com
741 zone "eng.example.com" {
742      type slave;
743      file "eng.example.com.bk";
744      // IP address of eng.example.com master server
745      masters { 192.168.4.12; };
746 };
747 </programlisting>
748
749       </sect2>
750     </sect1>
751
752     <sect1>
753       <title>Load Balancing</title>
754       <!--
755         - Add explanation of why load balancing is fragile at best
756         - and completely pointless in the general case.
757         -->
758
759       <para>
760         A primitive form of load balancing can be achieved in
761         the <acronym>DNS</acronym> by using multiple records
762         (such as multiple A records) for one name.
763       </para>
764
765       <para>
766         For example, if you have three WWW servers with network addresses
767         of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
768         following means that clients will connect to each machine one third
769         of the time:
770       </para>
771
772       <informaltable colsep="0" rowsep="0">
773         <tgroup cols="5" colsep="0" rowsep="0" tgroupstyle="2Level-table">
774           <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
775           <colspec colname="2" colnum="2" colsep="0" colwidth="0.500in"/>
776           <colspec colname="3" colnum="3" colsep="0" colwidth="0.750in"/>
777           <colspec colname="4" colnum="4" colsep="0" colwidth="0.750in"/>
778           <colspec colname="5" colnum="5" colsep="0" colwidth="2.028in"/>
779           <tbody>
780             <row rowsep="0">
781               <entry colname="1">
782                 <para>
783                   Name
784                 </para>
785               </entry>
786               <entry colname="2">
787                 <para>
788                   TTL
789                 </para>
790               </entry>
791               <entry colname="3">
792                 <para>
793                   CLASS
794                 </para>
795               </entry>
796               <entry colname="4">
797                 <para>
798                   TYPE
799                 </para>
800               </entry>
801               <entry colname="5">
802                 <para>
803                   Resource Record (RR) Data
804                 </para>
805               </entry>
806             </row>
807             <row rowsep="0">
808               <entry colname="1">
809                 <para>
810                   <literal>www</literal>
811                 </para>
812               </entry>
813               <entry colname="2">
814                 <para>
815                   <literal>600</literal>
816                 </para>
817               </entry>
818               <entry colname="3">
819                 <para>
820                   <literal>IN</literal>
821                 </para>
822               </entry>
823               <entry colname="4">
824                 <para>
825                   <literal>A</literal>
826                 </para>
827               </entry>
828               <entry colname="5">
829                 <para>
830                   <literal>10.0.0.1</literal>
831                 </para>
832               </entry>
833             </row>
834             <row rowsep="0">
835               <entry colname="1">
836                 <para/>
837               </entry>
838               <entry colname="2">
839                 <para>
840                   <literal>600</literal>
841                 </para>
842               </entry>
843               <entry colname="3">
844                 <para>
845                   <literal>IN</literal>
846                 </para>
847               </entry>
848               <entry colname="4">
849                 <para>
850                   <literal>A</literal>
851                 </para>
852               </entry>
853               <entry colname="5">
854                 <para>
855                   <literal>10.0.0.2</literal>
856                 </para>
857               </entry>
858             </row>
859             <row rowsep="0">
860               <entry colname="1">
861                 <para/>
862               </entry>
863               <entry colname="2">
864                 <para>
865                   <literal>600</literal>
866                 </para>
867               </entry>
868               <entry colname="3">
869                 <para>
870                   <literal>IN</literal>
871                 </para>
872               </entry>
873               <entry colname="4">
874                 <para>
875                   <literal>A</literal>
876                 </para>
877               </entry>
878               <entry colname="5">
879                 <para>
880                   <literal>10.0.0.3</literal>
881                 </para>
882               </entry>
883             </row>
884           </tbody>
885         </tgroup>
886       </informaltable>
887       <para>
888         When a resolver queries for these records, <acronym>BIND</acronym> will rotate
889         them and respond to the query with the records in a different
890         order.  In the example above, clients will randomly receive
891         records in the order 1, 2, 3; 2, 3, 1; and 3, 1, 2. Most clients
892         will use the first record returned and discard the rest.
893       </para>
894       <para>
895         For more detail on ordering responses, check the
896         <command>rrset-order</command> sub-statement in the
897         <command>options</command> statement, see
898         <xref endterm="rrset_ordering_title" linkend="rrset_ordering"/>.
899       </para>
900
901     </sect1>
902
903     <sect1>
904       <title>Name Server Operations</title>
905
906       <sect2>
907         <title>Tools for Use With the Name Server Daemon</title>
908         <para>
909           This section describes several indispensable diagnostic,
910           administrative and monitoring tools available to the system
911           administrator for controlling and debugging the name server
912           daemon.
913         </para>
914         <sect3 id="diagnostic_tools">
915           <title>Diagnostic Tools</title>
916           <para>
917             The <command>dig</command>, <command>host</command>, and
918             <command>nslookup</command> programs are all command
919             line tools
920             for manually querying name servers.  They differ in style and
921             output format.
922           </para>
923
924           <variablelist>
925             <varlistentry>
926               <term id="dig"><command>dig</command></term>
927               <listitem>
928                 <para>
929                   The domain information groper (<command>dig</command>)
930                   is the most versatile and complete of these lookup tools.
931                   It has two modes: simple interactive
932                   mode for a single query, and batch mode which executes a
933                   query for
934                   each in a list of several query lines. All query options are
935                   accessible
936                   from the command line.
937                 </para>
938                 <cmdsynopsis label="Usage">
939                   <command>dig</command>
940                   <arg>@<replaceable>server</replaceable></arg>
941                   <arg choice="plain"><replaceable>domain</replaceable></arg>
942                   <arg><replaceable>query-type</replaceable></arg>
943                   <arg><replaceable>query-class</replaceable></arg>
944                   <arg>+<replaceable>query-option</replaceable></arg>
945                   <arg>-<replaceable>dig-option</replaceable></arg>
946                   <arg>%<replaceable>comment</replaceable></arg>
947                 </cmdsynopsis>
948                 <para>
949                   The usual simple use of <command>dig</command> will take the form
950                 </para>
951                 <simpara>
952                   <command>dig @server domain query-type query-class</command>
953                 </simpara>
954                 <para>
955                   For more information and a list of available commands and
956                   options, see the <command>dig</command> man
957                   page.
958                 </para>
959               </listitem>
960             </varlistentry>
961
962             <varlistentry>
963               <term><command>host</command></term>
964               <listitem>
965                 <para>
966                   The <command>host</command> utility emphasizes
967                   simplicity
968                   and ease of use.  By default, it converts
969                   between host names and Internet addresses, but its
970                   functionality
971                   can be extended with the use of options.
972                 </para>
973                 <cmdsynopsis label="Usage">
974                   <command>host</command>
975                   <arg>-aCdlnrsTwv</arg>
976                   <arg>-c <replaceable>class</replaceable></arg>
977                   <arg>-N <replaceable>ndots</replaceable></arg>
978                   <arg>-t <replaceable>type</replaceable></arg>
979                   <arg>-W <replaceable>timeout</replaceable></arg>
980                   <arg>-R <replaceable>retries</replaceable></arg>
981                   <arg>-m <replaceable>flag</replaceable></arg>
982                   <arg>-4</arg>
983                   <arg>-6</arg>
984                   <arg choice="plain"><replaceable>hostname</replaceable></arg>
985                   <arg><replaceable>server</replaceable></arg>
986                 </cmdsynopsis>
987                 <para>
988                   For more information and a list of available commands and
989                   options, see the <command>host</command> man
990                   page.
991                 </para>
992               </listitem>
993             </varlistentry>
994
995             <varlistentry>
996               <term><command>nslookup</command></term>
997               <listitem>
998                 <para><command>nslookup</command>
999                   has two modes: interactive and
1000                   non-interactive. Interactive mode allows the user to
1001                   query name servers for information about various
1002                   hosts and domains or to print a list of hosts in a
1003                   domain. Non-interactive mode is used to print just
1004                   the name and requested information for a host or
1005                   domain.
1006                 </para>
1007                 <cmdsynopsis label="Usage">
1008                   <command>nslookup</command>
1009                   <arg rep="repeat">-option</arg>
1010                   <group>
1011                     <arg><replaceable>host-to-find</replaceable></arg>
1012                     <arg>- <arg>server</arg></arg>
1013                   </group>
1014                 </cmdsynopsis>
1015                 <para>
1016                   Interactive mode is entered when no arguments are given (the
1017                   default name server will be used) or when the first argument
1018                   is a
1019                   hyphen (`-') and the second argument is the host name or
1020                   Internet address
1021                   of a name server.
1022                 </para>
1023                 <para>
1024                   Non-interactive mode is used when the name or Internet
1025                   address
1026                   of the host to be looked up is given as the first argument.
1027                   The
1028                   optional second argument specifies the host name or address
1029                   of a name server.
1030                 </para>
1031                 <para>
1032                   Due to its arcane user interface and frequently inconsistent
1033                   behavior, we do not recommend the use of <command>nslookup</command>.
1034                   Use <command>dig</command> instead.
1035                 </para>
1036               </listitem>
1037
1038             </varlistentry>
1039           </variablelist>
1040         </sect3>
1041
1042         <sect3 id="admin_tools">
1043           <title>Administrative Tools</title>
1044           <para>
1045             Administrative tools play an integral part in the management
1046             of a server.
1047           </para>
1048           <variablelist>
1049             <varlistentry id="named-checkconf" xreflabel="Named Configuration Checking application">
1050
1051               <term><command>named-checkconf</command></term>
1052               <listitem>
1053                 <para>
1054                   The <command>named-checkconf</command> program
1055                   checks the syntax of a <filename>named.conf</filename> file.
1056                 </para>
1057                 <cmdsynopsis label="Usage">
1058                   <command>named-checkconf</command>
1059                   <arg>-jvz</arg>
1060                   <arg>-t <replaceable>directory</replaceable></arg>
1061                   <arg><replaceable>filename</replaceable></arg>
1062                 </cmdsynopsis>
1063               </listitem>
1064             </varlistentry>
1065             <varlistentry id="named-checkzone" xreflabel="Zone Checking application">
1066
1067               <term><command>named-checkzone</command></term>
1068               <listitem>
1069                 <para>
1070                   The <command>named-checkzone</command> program
1071                   checks a master file for
1072                   syntax and consistency.
1073                 </para>
1074                 <cmdsynopsis label="Usage">
1075                   <command>named-checkzone</command>
1076                   <arg>-djqvD</arg>
1077                   <arg>-c <replaceable>class</replaceable></arg>
1078                   <arg>-o <replaceable>output</replaceable></arg>
1079                   <arg>-t <replaceable>directory</replaceable></arg>
1080                   <arg>-w <replaceable>directory</replaceable></arg>
1081                   <arg>-k <replaceable>(ignore|warn|fail)</replaceable></arg>
1082                   <arg>-n <replaceable>(ignore|warn|fail)</replaceable></arg>
1083                   <arg>-W <replaceable>(ignore|warn)</replaceable></arg>
1084                   <arg choice="plain"><replaceable>zone</replaceable></arg>
1085                   <arg><replaceable>filename</replaceable></arg>
1086                 </cmdsynopsis>
1087               </listitem>
1088             </varlistentry>
1089             <varlistentry id="named-compilezone" xreflabel="Zone Compilation application">
1090               <term><command>named-compilezone</command></term>
1091               <listitem>
1092                 <para>
1093                   Similar to <command>named-checkzone,</command> but
1094                   it always dumps the zone content to a specified file
1095                   (typically in a different format).
1096                 </para>
1097               </listitem>
1098             </varlistentry>
1099             <varlistentry id="rndc" xreflabel="Remote Name Daemon Control application">
1100
1101               <term><command>rndc</command></term>
1102               <listitem>
1103                 <para>
1104                   The remote name daemon control
1105                   (<command>rndc</command>) program allows the
1106                   system
1107                   administrator to control the operation of a name server.
1108                   Since <acronym>BIND</acronym> 9.2, <command>rndc</command>
1109                   supports all the commands of the BIND 8 <command>ndc</command>
1110                   utility except <command>ndc start</command> and
1111                   <command>ndc restart</command>, which were also
1112                   not supported in <command>ndc</command>'s
1113                   channel mode.
1114                   If you run <command>rndc</command> without any
1115                   options
1116                   it will display a usage message as follows:
1117                 </para>
1118                 <cmdsynopsis label="Usage">
1119                   <command>rndc</command>
1120                   <arg>-c <replaceable>config</replaceable></arg>
1121                   <arg>-s <replaceable>server</replaceable></arg>
1122                   <arg>-p <replaceable>port</replaceable></arg>
1123                   <arg>-y <replaceable>key</replaceable></arg>
1124                   <arg choice="plain"><replaceable>command</replaceable></arg>
1125                   <arg rep="repeat"><replaceable>command</replaceable></arg>
1126                 </cmdsynopsis>
1127
1128                 <para>See <xref linkend="man.rndc"/> for details of
1129                   the available <command>rndc</command> commands.
1130                 </para>
1131
1132                 <para>
1133                   <command>rndc</command> requires a configuration file,
1134                   since all
1135                   communication with the server is authenticated with
1136                   digital signatures that rely on a shared secret, and
1137                   there is no way to provide that secret other than with a
1138                   configuration file.  The default location for the
1139                   <command>rndc</command> configuration file is
1140                   <filename>/etc/rndc.conf</filename>, but an
1141                   alternate
1142                   location can be specified with the <option>-c</option>
1143                   option.  If the configuration file is not found,
1144                   <command>rndc</command> will also look in
1145                   <filename>/etc/rndc.key</filename> (or whatever
1146                   <varname>sysconfdir</varname> was defined when
1147                   the <acronym>BIND</acronym> build was
1148                   configured).
1149                   The <filename>rndc.key</filename> file is
1150                   generated by
1151                   running <command>rndc-confgen -a</command> as
1152                   described in
1153                   <xref linkend="controls_statement_definition_and_usage"/>.
1154                 </para>
1155
1156                 <para>
1157                   The format of the configuration file is similar to
1158                   that of <filename>named.conf</filename>, but
1159                   limited to
1160                   only four statements, the <command>options</command>,
1161                   <command>key</command>, <command>server</command> and
1162                   <command>include</command>
1163                   statements.  These statements are what associate the
1164                   secret keys to the servers with which they are meant to
1165                   be shared.  The order of statements is not
1166                   significant.
1167                 </para>
1168
1169                 <para>
1170                   The <command>options</command> statement has
1171                   three clauses:
1172                   <command>default-server</command>, <command>default-key</command>,
1173                   and <command>default-port</command>.
1174                   <command>default-server</command> takes a
1175                   host name or address argument  and represents the server
1176                   that will
1177                   be contacted if no <option>-s</option>
1178                   option is provided on the command line.
1179                   <command>default-key</command> takes
1180                   the name of a key as its argument, as defined by a <command>key</command> statement.
1181                   <command>default-port</command> specifies the
1182                   port to which
1183                   <command>rndc</command> should connect if no
1184                   port is given on the command line or in a
1185                   <command>server</command> statement.
1186                 </para>
1187
1188                 <para>
1189                   The <command>key</command> statement defines a
1190                   key to be used
1191                   by <command>rndc</command> when authenticating
1192                   with
1193                   <command>named</command>.  Its syntax is
1194                   identical to the
1195                   <command>key</command> statement in <filename>named.conf</filename>.
1196                   The keyword <userinput>key</userinput> is
1197                   followed by a key name, which must be a valid
1198                   domain name, though it need not actually be hierarchical;
1199                   thus,
1200                   a string like "<userinput>rndc_key</userinput>" is a valid
1201                   name.
1202                   The <command>key</command> statement has two
1203                   clauses:
1204                   <command>algorithm</command> and <command>secret</command>.
1205                   While the configuration parser will accept any string as the
1206                   argument
1207                   to algorithm, currently only the string "<userinput>hmac-md5</userinput>"
1208                   has any meaning.  The secret is a base-64 encoded string
1209                   as specified in RFC 3548.
1210                 </para>
1211
1212                 <para>
1213                   The <command>server</command> statement
1214                   associates a key
1215                   defined using the <command>key</command>
1216                   statement with a server.
1217                   The keyword <userinput>server</userinput> is followed by a
1218                   host name or address.  The <command>server</command> statement
1219                   has two clauses: <command>key</command> and <command>port</command>.
1220                   The <command>key</command> clause specifies the
1221                   name of the key
1222                   to be used when communicating with this server, and the
1223                   <command>port</command> clause can be used to
1224                   specify the port <command>rndc</command> should
1225                   connect
1226                   to on the server.
1227                 </para>
1228
1229                 <para>
1230                   A sample minimal configuration file is as follows:
1231                 </para>
1232
1233 <programlisting>
1234 key rndc_key {
1235      algorithm "hmac-md5";
1236      secret
1237        "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
1238 };
1239 options {
1240      default-server 127.0.0.1;
1241      default-key    rndc_key;
1242 };
1243 </programlisting>
1244
1245                 <para>
1246                   This file, if installed as <filename>/etc/rndc.conf</filename>,
1247                   would allow the command:
1248                 </para>
1249
1250                 <para>
1251                   <prompt>$ </prompt><userinput>rndc reload</userinput>
1252                 </para>
1253
1254                 <para>
1255                   to connect to 127.0.0.1 port 953 and cause the name server
1256                   to reload, if a name server on the local machine were
1257                   running with
1258                   following controls statements:
1259                 </para>
1260
1261 <programlisting>
1262 controls {
1263         inet 127.0.0.1
1264             allow { localhost; } keys { rndc_key; };
1265 };
1266 </programlisting>
1267
1268                 <para>
1269                   and it had an identical key statement for
1270                   <literal>rndc_key</literal>.
1271                 </para>
1272
1273                 <para>
1274                   Running the <command>rndc-confgen</command>
1275                   program will
1276                   conveniently create a <filename>rndc.conf</filename>
1277                   file for you, and also display the
1278                   corresponding <command>controls</command>
1279                   statement that you need to
1280                   add to <filename>named.conf</filename>.
1281                   Alternatively,
1282                   you can run <command>rndc-confgen -a</command>
1283                   to set up
1284                   a <filename>rndc.key</filename> file and not
1285                   modify
1286                   <filename>named.conf</filename> at all.
1287                 </para>
1288
1289               </listitem>
1290             </varlistentry>
1291           </variablelist>
1292
1293         </sect3>
1294       </sect2>
1295       <sect2>
1296
1297         <title>Signals</title>
1298         <para>
1299           Certain UNIX signals cause the name server to take specific
1300           actions, as described in the following table.  These signals can
1301           be sent using the <command>kill</command> command.
1302         </para>
1303         <informaltable frame="all">
1304           <tgroup cols="2">
1305             <colspec colname="1" colnum="1" colsep="0" colwidth="1.125in"/>
1306             <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
1307             <tbody>
1308               <row rowsep="0">
1309                 <entry colname="1">
1310                   <para><command>SIGHUP</command></para>
1311                 </entry>
1312                 <entry colname="2">
1313                   <para>
1314                     Causes the server to read <filename>named.conf</filename> and
1315                     reload the database.
1316                   </para>
1317                 </entry>
1318               </row>
1319               <row rowsep="0">
1320                 <entry colname="1">
1321                   <para><command>SIGTERM</command></para>
1322                 </entry>
1323                 <entry colname="2">
1324                   <para>
1325                     Causes the server to clean up and exit.
1326                   </para>
1327                 </entry>
1328               </row>
1329               <row rowsep="0">
1330                 <entry colname="1">
1331                   <para><command>SIGINT</command></para>
1332                 </entry>
1333                 <entry colname="2">
1334                   <para>
1335                     Causes the server to clean up and exit.
1336                   </para>
1337                 </entry>
1338               </row>
1339             </tbody>
1340           </tgroup>
1341         </informaltable>
1342       </sect2>
1343     </sect1>
1344   </chapter>
1345
1346   <chapter id="Bv9ARM.ch04">
1347     <title>Advanced DNS Features</title>
1348
1349     <sect1 id="notify">
1350
1351       <title>Notify</title>
1352       <para>
1353         <acronym>DNS</acronym> NOTIFY is a mechanism that allows master
1354         servers to notify their slave servers of changes to a zone's data. In
1355         response to a <command>NOTIFY</command> from a master server, the
1356         slave will check to see that its version of the zone is the
1357         current version and, if not, initiate a zone transfer.
1358       </para>
1359
1360       <para>
1361         For more information about <acronym>DNS</acronym>
1362         <command>NOTIFY</command>, see the description of the
1363         <command>notify</command> option in <xref linkend="boolean_options"/> and
1364         the description of the zone option <command>also-notify</command> in
1365         <xref linkend="zone_transfers"/>.  The <command>NOTIFY</command>
1366         protocol is specified in RFC 1996.
1367       </para>
1368
1369       <note>
1370         As a slave zone can also be a master to other slaves, <command>named</command>,
1371         by default, sends <command>NOTIFY</command> messages for every zone
1372         it loads.  Specifying <command>notify master-only;</command> will
1373         cause <command>named</command> to only send <command>NOTIFY</command> for master
1374         zones that it loads.
1375       </note>
1376
1377     </sect1>
1378
1379     <sect1 id="dynamic_update">
1380       <title>Dynamic Update</title>
1381
1382       <para>
1383         Dynamic Update is a method for adding, replacing or deleting
1384         records in a master server by sending it a special form of DNS
1385         messages.  The format and meaning of these messages is specified
1386         in RFC 2136.
1387       </para>
1388
1389       <para>
1390         Dynamic update is enabled by including an
1391         <command>allow-update</command> or an <command>update-policy</command>
1392         clause in the <command>zone</command> statement.
1393       </para>
1394       
1395       <para>
1396         If the zone's <command>update-policy</command> is set to
1397         <userinput>local</userinput>, updates to the zone
1398         will be permitted for the key <varname>local-ddns</varname>,
1399         which will be generated by <command>named</command> at startup.
1400         See <xref linkend="dynamic_update_policies"/> for more details.
1401       </para>
1402
1403       <para>
1404         Dynamic updates using Kerberos signed requests can be made
1405         using the TKEY/GSS protocol by setting either the
1406         <command>tkey-gssapi-keytab</command> option, or alternatively
1407         by setting both the <command>tkey-gssapi-credential</command>
1408         and <command>tkey-domain</command> options. Once enabled,
1409         Kerberos signed requests will be matched against the update
1410         policies for the zone, using the Kerberos principal as the
1411         signer for the request.
1412       </para>
1413
1414       <para>
1415         Updating of secure zones (zones using DNSSEC) follows RFC
1416         3007: RRSIG, NSEC and NSEC3 records affected by updates are
1417         automatically regenerated by the server using an online
1418         zone key.  Update authorization is based on transaction
1419         signatures and an explicit server policy.
1420       </para>
1421
1422       <sect2 id="journal">
1423         <title>The journal file</title>
1424
1425         <para>
1426           All changes made to a zone using dynamic update are stored
1427           in the zone's journal file.  This file is automatically created
1428           by the server when the first dynamic update takes place.
1429           The name of the journal file is formed by appending the extension
1430           <filename>.jnl</filename> to the name of the
1431           corresponding zone
1432           file unless specifically overridden.  The journal file is in a
1433           binary format and should not be edited manually.
1434         </para>
1435
1436         <para>
1437           The server will also occasionally write ("dump")
1438           the complete contents of the updated zone to its zone file.
1439           This is not done immediately after
1440           each dynamic update, because that would be too slow when a large
1441           zone is updated frequently.  Instead, the dump is delayed by
1442           up to 15 minutes, allowing additional updates to take place.
1443           During the dump process, transient files will be created
1444           with the extensions <filename>.jnw</filename> and
1445           <filename>.jbk</filename>; under ordinary circumstances, these
1446           will be removed when the dump is complete, and can be safely
1447           ignored.
1448         </para>
1449
1450         <para>
1451           When a server is restarted after a shutdown or crash, it will replay
1452               the journal file to incorporate into the zone any updates that
1453           took
1454           place after the last zone dump.
1455         </para>
1456
1457         <para>
1458           Changes that result from incoming incremental zone transfers are
1459           also
1460           journalled in a similar way.
1461         </para>
1462
1463         <para>
1464           The zone files of dynamic zones cannot normally be edited by
1465           hand because they are not guaranteed to contain the most recent
1466           dynamic changes &mdash; those are only in the journal file.
1467           The only way to ensure that the zone file of a dynamic zone
1468           is up to date is to run <command>rndc stop</command>.
1469         </para>
1470
1471         <para>
1472           If you have to make changes to a dynamic zone
1473           manually, the following procedure will work: Disable dynamic updates
1474               to the zone using
1475           <command>rndc freeze <replaceable>zone</replaceable></command>.
1476           This will also remove the zone's <filename>.jnl</filename> file
1477           and update the master file.  Edit the zone file.  Run
1478           <command>rndc thaw <replaceable>zone</replaceable></command>
1479           to reload the changed zone and re-enable dynamic updates.
1480         </para>
1481
1482       </sect2>
1483
1484     </sect1>
1485
1486     <sect1 id="incremental_zone_transfers">
1487       <title>Incremental Zone Transfers (IXFR)</title>
1488
1489       <para>
1490         The incremental zone transfer (IXFR) protocol is a way for
1491         slave servers to transfer only changed data, instead of having to
1492         transfer the entire zone. The IXFR protocol is specified in RFC
1493         1995. See <xref linkend="proposed_standards"/>.
1494       </para>
1495
1496       <para>
1497         When acting as a master, <acronym>BIND</acronym> 9
1498         supports IXFR for those zones
1499         where the necessary change history information is available. These
1500         include master zones maintained by dynamic update and slave zones
1501         whose data was obtained by IXFR.  For manually maintained master
1502         zones, and for slave zones obtained by performing a full zone
1503         transfer (AXFR), IXFR is supported only if the option
1504         <command>ixfr-from-differences</command> is set
1505         to <userinput>yes</userinput>.
1506       </para>
1507
1508       <para>
1509         When acting as a slave, <acronym>BIND</acronym> 9 will
1510         attempt to use IXFR unless
1511         it is explicitly disabled. For more information about disabling
1512         IXFR, see the description of the <command>request-ixfr</command> clause
1513         of the <command>server</command> statement.
1514       </para>
1515     </sect1>
1516
1517     <sect1>
1518       <title>Split DNS</title>
1519       <para>
1520         Setting up different views, or visibility, of the DNS space to
1521         internal and external resolvers is usually referred to as a
1522         <emphasis>Split DNS</emphasis> setup. There are several
1523         reasons an organization would want to set up its DNS this way.
1524       </para>
1525       <para>
1526         One common reason for setting up a DNS system this way is
1527         to hide "internal" DNS information from "external" clients on the
1528         Internet. There is some debate as to whether or not this is actually
1529         useful.
1530         Internal DNS information leaks out in many ways (via email headers,
1531         for example) and most savvy "attackers" can find the information
1532         they need using other means.
1533         However, since listing addresses of internal servers that
1534         external clients cannot possibly reach can result in
1535         connection delays and other annoyances, an organization may
1536         choose to use a Split DNS to present a consistent view of itself
1537         to the outside world.
1538       </para>
1539       <para>
1540         Another common reason for setting up a Split DNS system is
1541         to allow internal networks that are behind filters or in RFC 1918
1542         space (reserved IP space, as documented in RFC 1918) to resolve DNS
1543         on the Internet. Split DNS can also be used to allow mail from outside
1544         back in to the internal network.
1545       </para>
1546      <sect2>
1547       <title>Example split DNS setup</title>
1548       <para>
1549         Let's say a company named <emphasis>Example, Inc.</emphasis>
1550         (<literal>example.com</literal>)
1551         has several corporate sites that have an internal network with
1552         reserved
1553         Internet Protocol (IP) space and an external demilitarized zone (DMZ),
1554         or "outside" section of a network, that is available to the public.
1555       </para>
1556       <para>
1557         <emphasis>Example, Inc.</emphasis> wants its internal clients
1558         to be able to resolve external hostnames and to exchange mail with
1559         people on the outside. The company also wants its internal resolvers
1560         to have access to certain internal-only zones that are not available
1561         at all outside of the internal network.
1562       </para>
1563       <para>
1564         In order to accomplish this, the company will set up two sets
1565         of name servers. One set will be on the inside network (in the
1566         reserved
1567         IP space) and the other set will be on bastion hosts, which are
1568         "proxy"
1569         hosts that can talk to both sides of its network, in the DMZ.
1570       </para>
1571       <para>
1572         The internal servers will be configured to forward all queries,
1573         except queries for <filename>site1.internal</filename>, <filename>site2.internal</filename>, <filename>site1.example.com</filename>,
1574         and <filename>site2.example.com</filename>, to the servers
1575         in the
1576         DMZ. These internal servers will have complete sets of information
1577         for <filename>site1.example.com</filename>, <filename>site2.example.com</filename>, <filename>site1.internal</filename>,
1578         and <filename>site2.internal</filename>.
1579       </para>
1580       <para>
1581         To protect the <filename>site1.internal</filename> and <filename>site2.internal</filename> domains,
1582         the internal name servers must be configured to disallow all queries
1583         to these domains from any external hosts, including the bastion
1584         hosts.
1585       </para>
1586       <para>
1587         The external servers, which are on the bastion hosts, will
1588         be configured to serve the "public" version of the <filename>site1</filename> and <filename>site2.example.com</filename> zones.
1589         This could include things such as the host records for public servers
1590         (<filename>www.example.com</filename> and <filename>ftp.example.com</filename>),
1591         and mail exchange (MX)  records (<filename>a.mx.example.com</filename> and <filename>b.mx.example.com</filename>).
1592       </para>
1593       <para>
1594         In addition, the public <filename>site1</filename> and <filename>site2.example.com</filename> zones
1595         should have special MX records that contain wildcard (`*') records
1596         pointing to the bastion hosts. This is needed because external mail
1597         servers do not have any other way of looking up how to deliver mail
1598         to those internal hosts. With the wildcard records, the mail will
1599         be delivered to the bastion host, which can then forward it on to
1600         internal hosts.
1601       </para>
1602       <para>
1603         Here's an example of a wildcard MX record:
1604       </para>
1605       <programlisting>*   IN MX 10 external1.example.com.</programlisting>
1606       <para>
1607         Now that they accept mail on behalf of anything in the internal
1608         network, the bastion hosts will need to know how to deliver mail
1609         to internal hosts. In order for this to work properly, the resolvers
1610         on
1611         the bastion hosts will need to be configured to point to the internal
1612         name servers for DNS resolution.
1613       </para>
1614       <para>
1615         Queries for internal hostnames will be answered by the internal
1616         servers, and queries for external hostnames will be forwarded back
1617         out to the DNS servers on the bastion hosts.
1618       </para>
1619       <para>
1620         In order for all this to work properly, internal clients will
1621         need to be configured to query <emphasis>only</emphasis> the internal
1622         name servers for DNS queries. This could also be enforced via
1623         selective
1624         filtering on the network.
1625       </para>
1626       <para>
1627         If everything has been set properly, <emphasis>Example, Inc.</emphasis>'s
1628         internal clients will now be able to:
1629       </para>
1630       <itemizedlist>
1631         <listitem>
1632           <simpara>
1633             Look up any hostnames in the <literal>site1</literal>
1634             and
1635             <literal>site2.example.com</literal> zones.
1636           </simpara>
1637         </listitem>
1638         <listitem>
1639           <simpara>
1640             Look up any hostnames in the <literal>site1.internal</literal> and
1641             <literal>site2.internal</literal> domains.
1642           </simpara>
1643         </listitem>
1644         <listitem>
1645           <simpara>Look up any hostnames on the Internet.</simpara>
1646         </listitem>
1647         <listitem>
1648           <simpara>Exchange mail with both internal and external people.</simpara>
1649         </listitem>
1650       </itemizedlist>
1651       <para>
1652         Hosts on the Internet will be able to:
1653       </para>
1654       <itemizedlist>
1655         <listitem>
1656           <simpara>
1657             Look up any hostnames in the <literal>site1</literal>
1658             and
1659             <literal>site2.example.com</literal> zones.
1660           </simpara>
1661         </listitem>
1662         <listitem>
1663           <simpara>
1664             Exchange mail with anyone in the <literal>site1</literal> and
1665             <literal>site2.example.com</literal> zones.
1666           </simpara>
1667         </listitem>
1668       </itemizedlist>
1669
1670       <para>
1671         Here is an example configuration for the setup we just
1672         described above. Note that this is only configuration information;
1673         for information on how to configure your zone files, see <xref linkend="sample_configuration"/>.
1674       </para>
1675
1676       <para>
1677         Internal DNS server config:
1678       </para>
1679
1680 <programlisting>
1681
1682 acl internals { 172.16.72.0/24; 192.168.1.0/24; };
1683
1684 acl externals { <varname>bastion-ips-go-here</varname>; };
1685
1686 options {
1687     ...
1688     ...
1689     forward only;
1690     // forward to external servers
1691     forwarders {
1692         <varname>bastion-ips-go-here</varname>;
1693     };
1694     // sample allow-transfer (no one)
1695     allow-transfer { none; };
1696     // restrict query access
1697     allow-query { internals; externals; };
1698     // restrict recursion
1699     allow-recursion { internals; };
1700     ...
1701     ...
1702 };
1703
1704 // sample master zone
1705 zone "site1.example.com" {
1706   type master;
1707   file "m/site1.example.com";
1708   // do normal iterative resolution (do not forward)
1709   forwarders { };
1710   allow-query { internals; externals; };
1711   allow-transfer { internals; };
1712 };
1713
1714 // sample slave zone
1715 zone "site2.example.com" {
1716   type slave;
1717   file "s/site2.example.com";
1718   masters { 172.16.72.3; };
1719   forwarders { };
1720   allow-query { internals; externals; };
1721   allow-transfer { internals; };
1722 };
1723
1724 zone "site1.internal" {
1725   type master;
1726   file "m/site1.internal";
1727   forwarders { };
1728   allow-query { internals; };
1729   allow-transfer { internals; }
1730 };
1731
1732 zone "site2.internal" {
1733   type slave;
1734   file "s/site2.internal";
1735   masters { 172.16.72.3; };
1736   forwarders { };
1737   allow-query { internals };
1738   allow-transfer { internals; }
1739 };
1740 </programlisting>
1741
1742       <para>
1743         External (bastion host) DNS server config:
1744       </para>
1745
1746 <programlisting>
1747 acl internals { 172.16.72.0/24; 192.168.1.0/24; };
1748
1749 acl externals { bastion-ips-go-here; };
1750
1751 options {
1752   ...
1753   ...
1754   // sample allow-transfer (no one)
1755   allow-transfer { none; };
1756   // default query access
1757   allow-query { any; };
1758   // restrict cache access
1759   allow-query-cache { internals; externals; };
1760   // restrict recursion
1761   allow-recursion { internals; externals; };
1762   ...
1763   ...
1764 };
1765
1766 // sample slave zone
1767 zone "site1.example.com" {
1768   type master;
1769   file "m/site1.foo.com";
1770   allow-transfer { internals; externals; };
1771 };
1772
1773 zone "site2.example.com" {
1774   type slave;
1775   file "s/site2.foo.com";
1776   masters { another_bastion_host_maybe; };
1777   allow-transfer { internals; externals; }
1778 };
1779 </programlisting>
1780
1781       <para>
1782         In the <filename>resolv.conf</filename> (or equivalent) on
1783         the bastion host(s):
1784       </para>
1785
1786 <programlisting>
1787 search ...
1788 nameserver 172.16.72.2
1789 nameserver 172.16.72.3
1790 nameserver 172.16.72.4
1791 </programlisting>
1792
1793      </sect2>
1794     </sect1>
1795     <sect1 id="tsig">
1796       <title>TSIG</title>
1797       <para>
1798         This is a short guide to setting up Transaction SIGnatures
1799         (TSIG) based transaction security in <acronym>BIND</acronym>. It describes changes
1800         to the configuration file as well as what changes are required for
1801         different features, including the process of creating transaction
1802         keys and using transaction signatures with <acronym>BIND</acronym>.
1803       </para>
1804       <para>
1805         <acronym>BIND</acronym> primarily supports TSIG for server
1806         to server communication.
1807         This includes zone transfer, notify, and recursive query messages.
1808         Resolvers based on newer versions of <acronym>BIND</acronym> 8 have limited support
1809         for TSIG.
1810       </para>
1811
1812       <para>
1813         TSIG can also be useful for dynamic update. A primary
1814         server for a dynamic zone should control access to the dynamic
1815         update service, but IP-based access control is insufficient.
1816         The cryptographic access control provided by TSIG
1817         is far superior. The <command>nsupdate</command>
1818         program supports TSIG via the <option>-k</option> and
1819         <option>-y</option> command line options or inline by use
1820         of the <command>key</command>.
1821       </para>
1822
1823       <sect2>
1824         <title>Generate Shared Keys for Each Pair of Hosts</title>
1825         <para>
1826           A shared secret is generated to be shared between <emphasis>host1</emphasis> and <emphasis>host2</emphasis>.
1827           An arbitrary key name is chosen: "host1-host2.". The key name must
1828           be the same on both hosts.
1829         </para>
1830         <sect3>
1831           <title>Automatic Generation</title>
1832           <para>
1833             The following command will generate a 128-bit (16 byte) HMAC-SHA256
1834             key as described above. Longer keys are better, but shorter keys
1835             are easier to read. Note that the maximum key length is the digest
1836             length, here 256 bits.
1837           </para>
1838           <para>
1839             <userinput>dnssec-keygen -a hmac-sha256 -b 128 -n HOST host1-host2.</userinput>
1840           </para>
1841           <para>
1842             The key is in the file <filename>Khost1-host2.+163+00000.private</filename>.
1843             Nothing directly uses this file, but the base-64 encoded string
1844             following "<literal>Key:</literal>"
1845             can be extracted from the file and used as a shared secret:
1846           </para>
1847           <programlisting>Key: La/E5CjG9O+os1jq0a2jdA==</programlisting>
1848           <para>
1849             The string "<literal>La/E5CjG9O+os1jq0a2jdA==</literal>" can
1850             be used as the shared secret.
1851           </para>
1852         </sect3>
1853         <sect3>
1854           <title>Manual Generation</title>
1855           <para>
1856             The shared secret is simply a random sequence of bits, encoded
1857             in base-64. Most ASCII strings are valid base-64 strings (assuming
1858             the length is a multiple of 4 and only valid characters are used),
1859             so the shared secret can be manually generated.
1860           </para>
1861           <para>
1862             Also, a known string can be run through <command>mmencode</command> or
1863             a similar program to generate base-64 encoded data.
1864           </para>
1865         </sect3>
1866       </sect2>
1867       <sect2>
1868         <title>Copying the Shared Secret to Both Machines</title>
1869         <para>
1870           This is beyond the scope of DNS. A secure transport mechanism
1871           should be used. This could be secure FTP, ssh, telephone, etc.
1872         </para>
1873       </sect2>
1874       <sect2>
1875         <title>Informing the Servers of the Key's Existence</title>
1876         <para>
1877           Imagine <emphasis>host1</emphasis> and <emphasis>host 2</emphasis>
1878           are
1879           both servers. The following is added to each server's <filename>named.conf</filename> file:
1880         </para>
1881
1882 <programlisting>
1883 key host1-host2. {
1884   algorithm hmac-sha256;
1885   secret "La/E5CjG9O+os1jq0a2jdA==";
1886 };
1887 </programlisting>
1888
1889         <para>
1890           The secret is the one generated above. Since this is a secret, it
1891           is recommended that either <filename>named.conf</filename> be
1892           non-world readable, or the key directive be added to a non-world
1893           readable file that is included by <filename>named.conf</filename>.
1894         </para>
1895         <para>
1896           At this point, the key is recognized. This means that if the
1897           server receives a message signed by this key, it can verify the
1898           signature. If the signature is successfully verified, the
1899           response is signed by the same key.
1900         </para>
1901       </sect2>
1902
1903       <sect2>
1904         <title>Instructing the Server to Use the Key</title>
1905         <para>
1906           Since keys are shared between two hosts only, the server must
1907           be told when keys are to be used. The following is added to the <filename>named.conf</filename> file
1908           for <emphasis>host1</emphasis>, if the IP address of <emphasis>host2</emphasis> is
1909           10.1.2.3:
1910         </para>
1911
1912 <programlisting>
1913 server 10.1.2.3 {
1914   keys { host1-host2. ;};
1915 };
1916 </programlisting>
1917
1918         <para>
1919           Multiple keys may be present, but only the first is used.
1920           This directive does not contain any secrets, so it may be in a
1921           world-readable
1922           file.
1923         </para>
1924         <para>
1925           If <emphasis>host1</emphasis> sends a message that is a request
1926           to that address, the message will be signed with the specified key. <emphasis>host1</emphasis> will
1927           expect any responses to signed messages to be signed with the same
1928           key.
1929         </para>
1930         <para>
1931           A similar statement must be present in <emphasis>host2</emphasis>'s
1932           configuration file (with <emphasis>host1</emphasis>'s address) for <emphasis>host2</emphasis> to
1933           sign request messages to <emphasis>host1</emphasis>.
1934         </para>
1935       </sect2>
1936       <sect2>
1937         <title>TSIG Key Based Access Control</title>
1938         <para>
1939           <acronym>BIND</acronym> allows IP addresses and ranges
1940           to be specified in ACL
1941           definitions and
1942           <command>allow-{ query | transfer | update }</command>
1943           directives.
1944           This has been extended to allow TSIG keys also. The above key would
1945           be denoted <command>key host1-host2.</command>
1946         </para>
1947         <para>
1948           An example of an <command>allow-update</command> directive would be:
1949         </para>
1950
1951 <programlisting>
1952 allow-update { key host1-host2. ;};
1953 </programlisting>
1954
1955         <para>
1956           This allows dynamic updates to succeed only if the request
1957           was signed by a key named "<command>host1-host2.</command>".
1958         </para>
1959
1960         <para>
1961           See <xref linkend="dynamic_update_policies"/> for a discussion of
1962           the more flexible <command>update-policy</command> statement.
1963         </para>
1964
1965       </sect2>
1966       <sect2>
1967         <title>Errors</title>
1968
1969         <para>
1970           The processing of TSIG signed messages can result in
1971           several errors. If a signed message is sent to a non-TSIG aware
1972           server, a FORMERR (format error) will be returned, since the server will not
1973           understand the record. This is a result of misconfiguration,
1974           since the server must be explicitly configured to send a TSIG
1975           signed message to a specific server.
1976         </para>
1977
1978         <para>
1979           If a TSIG aware server receives a message signed by an
1980           unknown key, the response will be unsigned with the TSIG
1981           extended error code set to BADKEY. If a TSIG aware server
1982           receives a message with a signature that does not validate, the
1983           response will be unsigned with the TSIG extended error code set
1984           to BADSIG. If a TSIG aware server receives a message with a time
1985           outside of the allowed range, the response will be signed with
1986           the TSIG extended error code set to BADTIME, and the time values
1987           will be adjusted so that the response can be successfully
1988           verified. In any of these cases, the message's rcode (response code) is set to
1989           NOTAUTH (not authenticated).
1990         </para>
1991
1992       </sect2>
1993     </sect1>
1994     <sect1>
1995       <title>TKEY</title>
1996
1997       <para><command>TKEY</command>
1998         is a mechanism for automatically generating a shared secret
1999         between two hosts.  There are several "modes" of
2000         <command>TKEY</command> that specify how the key is generated
2001         or assigned.  <acronym>BIND</acronym> 9 implements only one of
2002         these modes, the Diffie-Hellman key exchange.  Both hosts are
2003         required to have a Diffie-Hellman KEY record (although this
2004         record is not required to be present in a zone).  The
2005         <command>TKEY</command> process must use signed messages,
2006         signed either by TSIG or SIG(0).  The result of
2007         <command>TKEY</command> is a shared secret that can be used to
2008         sign messages with TSIG.  <command>TKEY</command> can also be
2009         used to delete shared secrets that it had previously
2010         generated.
2011       </para>
2012
2013       <para>
2014         The <command>TKEY</command> process is initiated by a
2015         client
2016         or server by sending a signed <command>TKEY</command>
2017         query
2018         (including any appropriate KEYs) to a TKEY-aware server.  The
2019         server response, if it indicates success, will contain a
2020         <command>TKEY</command> record and any appropriate keys.
2021         After
2022         this exchange, both participants have enough information to
2023         determine the shared secret; the exact process depends on the
2024         <command>TKEY</command> mode.  When using the
2025         Diffie-Hellman
2026         <command>TKEY</command> mode, Diffie-Hellman keys are
2027         exchanged,
2028         and the shared secret is derived by both participants.
2029       </para>
2030
2031     </sect1>
2032     <sect1>
2033       <title>SIG(0)</title>
2034
2035       <para>
2036         <acronym>BIND</acronym> 9 partially supports DNSSEC SIG(0)
2037             transaction signatures as specified in RFC 2535 and RFC 2931.
2038         SIG(0)
2039         uses public/private keys to authenticate messages.  Access control
2040         is performed in the same manner as TSIG keys; privileges can be
2041         granted or denied based on the key name.
2042       </para>
2043
2044       <para>
2045         When a SIG(0) signed message is received, it will only be
2046         verified if the key is known and trusted by the server; the server
2047         will not attempt to locate and/or validate the key.
2048       </para>
2049
2050       <para>
2051         SIG(0) signing of multiple-message TCP streams is not
2052         supported.
2053       </para>
2054
2055       <para>
2056         The only tool shipped with <acronym>BIND</acronym> 9 that
2057         generates SIG(0) signed messages is <command>nsupdate</command>.
2058       </para>
2059
2060     </sect1>
2061     <sect1 id="DNSSEC">
2062       <title>DNSSEC</title>
2063
2064       <para>
2065         Cryptographic authentication of DNS information is possible
2066         through the DNS Security (<emphasis>DNSSEC-bis</emphasis>) extensions,
2067         defined in RFC 4033, RFC 4034, and RFC 4035.
2068         This section describes the creation and use of DNSSEC signed zones.
2069       </para>
2070
2071       <para>
2072         In order to set up a DNSSEC secure zone, there are a series
2073         of steps which must be followed.  <acronym>BIND</acronym>
2074         9 ships
2075         with several tools
2076         that are used in this process, which are explained in more detail
2077         below.  In all cases, the <option>-h</option> option prints a
2078         full list of parameters.  Note that the DNSSEC tools require the
2079         keyset files to be in the working directory or the
2080         directory specified by the <option>-d</option> option, and
2081         that the tools shipped with BIND 9.2.x and earlier are not compatible
2082         with the current ones.
2083       </para>
2084
2085       <para>
2086         There must also be communication with the administrators of
2087         the parent and/or child zone to transmit keys.  A zone's security
2088         status must be indicated by the parent zone for a DNSSEC capable
2089         resolver to trust its data.  This is done through the presence
2090         or absence of a <literal>DS</literal> record at the
2091         delegation
2092         point.
2093       </para>
2094
2095       <para>
2096         For other servers to trust data in this zone, they must
2097         either be statically configured with this zone's zone key or the
2098         zone key of another zone above this one in the DNS tree.
2099       </para>
2100
2101       <sect2>
2102         <title>Generating Keys</title>
2103
2104         <para>
2105           The <command>dnssec-keygen</command> program is used to
2106           generate keys.
2107         </para>
2108
2109         <para>
2110           A secure zone must contain one or more zone keys.  The
2111           zone keys will sign all other records in the zone, as well as
2112           the zone keys of any secure delegated zones.  Zone keys must
2113           have the same name as the zone, a name type of
2114           <command>ZONE</command>, and must be usable for
2115           authentication.
2116           It is recommended that zone keys use a cryptographic algorithm
2117           designated as "mandatory to implement" by the IETF; currently
2118           the only one is RSASHA1.
2119         </para>
2120
2121         <para>
2122           The following command will generate a 768-bit RSASHA1 key for
2123           the <filename>child.example</filename> zone:
2124         </para>
2125
2126         <para>
2127           <userinput>dnssec-keygen -a RSASHA1 -b 768 -n ZONE child.example.</userinput>
2128         </para>
2129
2130         <para>
2131           Two output files will be produced:
2132           <filename>Kchild.example.+005+12345.key</filename> and
2133           <filename>Kchild.example.+005+12345.private</filename>
2134           (where
2135           12345 is an example of a key tag).  The key filenames contain
2136           the key name (<filename>child.example.</filename>),
2137           algorithm (3
2138           is DSA, 1 is RSAMD5, 5 is RSASHA1, etc.), and the key tag (12345 in
2139           this case).
2140           The private key (in the <filename>.private</filename>
2141           file) is
2142           used to generate signatures, and the public key (in the
2143           <filename>.key</filename> file) is used for signature
2144           verification.
2145         </para>
2146
2147         <para>
2148           To generate another key with the same properties (but with
2149           a different key tag), repeat the above command.
2150         </para>
2151
2152         <para>
2153           The <command>dnssec-keyfromlabel</command> program is used
2154           to get a key pair from a crypto hardware and build the key
2155           files. Its usage is similar to <command>dnssec-keygen</command>.
2156         </para>
2157
2158         <para>
2159           The public keys should be inserted into the zone file by
2160           including the <filename>.key</filename> files using
2161           <command>$INCLUDE</command> statements.
2162         </para>
2163
2164       </sect2>
2165       <sect2>
2166         <title>Signing the Zone</title>
2167
2168         <para>
2169           The <command>dnssec-signzone</command> program is used
2170           to sign a zone.
2171         </para>
2172
2173         <para>
2174           Any <filename>keyset</filename> files corresponding to
2175           secure subzones should be present.  The zone signer will
2176           generate <literal>NSEC</literal>, <literal>NSEC3</literal>
2177           and <literal>RRSIG</literal> records for the zone, as
2178           well as <literal>DS</literal> for the child zones if
2179           <literal>'-g'</literal> is specified.  If <literal>'-g'</literal>
2180           is not specified, then DS RRsets for the secure child
2181           zones need to be added manually.
2182         </para>
2183
2184         <para>
2185           The following command signs the zone, assuming it is in a
2186           file called <filename>zone.child.example</filename>.  By
2187                 default, all zone keys which have an available private key are
2188                 used to generate signatures.
2189         </para>
2190
2191         <para>
2192           <userinput>dnssec-signzone -o child.example zone.child.example</userinput>
2193         </para>
2194
2195         <para>
2196           One output file is produced:
2197           <filename>zone.child.example.signed</filename>.  This
2198           file
2199           should be referenced by <filename>named.conf</filename>
2200           as the
2201           input file for the zone.
2202         </para>
2203
2204         <para><command>dnssec-signzone</command>
2205           will also produce a keyset and dsset files and optionally a
2206           dlvset file.  These are used to provide the parent zone
2207           administrators with the <literal>DNSKEYs</literal> (or their
2208           corresponding <literal>DS</literal> records) that are the
2209           secure entry point to the zone.
2210         </para>
2211
2212       </sect2>
2213
2214       <sect2>
2215         <title>Configuring Servers</title>
2216
2217         <para>
2218           To enable <command>named</command> to respond appropriately
2219           to DNS requests from DNSSEC aware clients,
2220           <command>dnssec-enable</command> must be set to yes.
2221           (This is the default setting.)
2222         </para>
2223
2224         <para>
2225           To enable <command>named</command> to validate answers from
2226           other servers, the <command>dnssec-enable</command> option
2227           must be set to <userinput>yes</userinput>, and the
2228           <command>dnssec-validation</command> options must be set to 
2229           <userinput>yes</userinput> or <userinput>auto</userinput>.
2230         </para>
2231           
2232         <para>
2233           If <command>dnssec-validation</command> is set to
2234           <userinput>auto</userinput>, then a default
2235           trust anchor for the DNS root zone will be used.
2236           If it is set to <userinput>yes</userinput>, however,
2237           then at least one trust anchor must be configured
2238           with a <command>trusted-keys</command> or
2239           <command>managed-keys</command> statement in
2240           <filename>named.conf</filename>, or DNSSEC validation
2241           will not occur.  The default setting is
2242           <userinput>yes</userinput>.
2243         </para>
2244           
2245         <para>
2246           <command>trusted-keys</command> are copies of DNSKEY RRs
2247           for zones that are used to form the first link in the
2248           cryptographic chain of trust.  All keys listed in
2249           <command>trusted-keys</command> (and corresponding zones)
2250           are deemed to exist and only the listed keys will be used
2251           to validated the DNSKEY RRset that they are from.
2252         </para>
2253
2254         <para>
2255           <command>managed-keys</command> are trusted keys which are
2256           automatically kept up to date via RFC 5011 trust anchor
2257           maintenance.
2258         </para>
2259
2260         <para>
2261           <command>trusted-keys</command> and
2262           <command>managed-keys</command> are described in more detail
2263           later in this document.
2264         </para>
2265
2266         <para>
2267           Unlike <acronym>BIND</acronym> 8, <acronym>BIND</acronym>
2268           9 does not verify signatures on load, so zone keys for
2269           authoritative zones do not need to be specified in the
2270           configuration file.
2271         </para>
2272
2273         <para>
2274           After DNSSEC gets established, a typical DNSSEC configuration
2275           will look something like the following.  It has one or
2276           more public keys for the root.  This allows answers from
2277           outside the organization to be validated.  It will also
2278           have several keys for parts of the namespace the organization
2279           controls.  These are here to ensure that <command>named</command>
2280           is immune to compromises in the DNSSEC components of the security
2281           of parent zones.
2282         </para>
2283
2284 <programlisting>
2285 managed-keys {
2286         /* Root Key */
2287         "." initial-key 257 3 3 "BNY4wrWM1nCfJ+CXd0rVXyYmobt7sEEfK3clRbGaTwS
2288                                  JxrGkxJWoZu6I7PzJu/E9gx4UC1zGAHlXKdE4zYIpRh
2289                                  aBKnvcC2U9mZhkdUpd1Vso/HAdjNe8LmMlnzY3zy2Xy
2290                                  4klWOADTPzSv9eamj8V18PHGjBLaVtYvk/ln5ZApjYg
2291                                  hf+6fElrmLkdaz MQ2OCnACR817DF4BBa7UR/beDHyp
2292                                  5iWTXWSi6XmoJLbG9Scqc7l70KDqlvXR3M/lUUVRbke
2293                                  g1IPJSidmK3ZyCllh4XSKbje/45SKucHgnwU5jefMtq
2294                                  66gKodQj+MiA21AfUVe7u99WzTLzY3qlxDhxYQQ20FQ
2295                                  97S+LKUTpQcq27R7AT3/V5hRQxScINqwcz4jYqZD2fQ
2296                                  dgxbcDTClU0CRBdiieyLMNzXG3";
2297 };
2298
2299 trusted-keys {
2300         /* Key for our organization's forward zone */
2301         example.com. 257 3 5 "AwEAAaxPMcR2x0HbQV4WeZB6oEDX+r0QM6
2302                               5KbhTjrW1ZaARmPhEZZe3Y9ifgEuq7vZ/z
2303                               GZUdEGNWy+JZzus0lUptwgjGwhUS1558Hb
2304                               4JKUbbOTcM8pwXlj0EiX3oDFVmjHO444gL
2305                               kBOUKUf/mC7HvfwYH/Be22GnClrinKJp1O
2306                               g4ywzO9WglMk7jbfW33gUKvirTHr25GL7S
2307                               TQUzBb5Usxt8lgnyTUHs1t3JwCY5hKZ6Cq
2308                               FxmAVZP20igTixin/1LcrgX/KMEGd/biuv
2309                               F4qJCyduieHukuY3H4XMAcR+xia2nIUPvm
2310                               /oyWR8BW/hWdzOvnSCThlHf3xiYleDbt/o
2311                               1OTQ09A0=";
2312
2313         /* Key for our reverse zone. */
2314         2.0.192.IN-ADDRPA.NET. 257 3 5 "AQOnS4xn/IgOUpBPJ3bogzwc
2315                                        xOdNax071L18QqZnQQQAVVr+i
2316                                        LhGTnNGp3HoWQLUIzKrJVZ3zg
2317                                        gy3WwNT6kZo6c0tszYqbtvchm
2318                                        gQC8CzKojM/W16i6MG/eafGU3
2319                                        siaOdS0yOI6BgPsw+YZdzlYMa
2320                                        IJGf4M4dyoKIhzdZyQ2bYQrjy
2321                                        Q4LB0lC7aOnsMyYKHHYeRvPxj
2322                                        IQXmdqgOJGq+vsevG06zW+1xg
2323                                        YJh9rCIfnm1GX/KMgxLPG2vXT
2324                                        D/RnLX+D3T3UL7HJYHJhAZD5L
2325                                        59VvjSPsZJHeDCUyWYrvPZesZ
2326                                        DIRvhDD52SKvbheeTJUm6Ehkz
2327                                        ytNN2SN96QRk8j/iI8ib";
2328 };
2329
2330 options {
2331         ...
2332         dnssec-enable yes;
2333         dnssec-validation yes;
2334 };
2335 </programlisting>
2336
2337         <note>
2338           None of the keys listed in this example are valid.  In particular,
2339           the root key is not valid.
2340         </note>
2341
2342         <para>
2343           When DNSSEC validation is enabled and properly configured,
2344           the resolver will reject any answers from signed, secure zones
2345           which fail to validate, and will return SERVFAIL to the client.
2346         </para>
2347
2348         <para>
2349           Responses may fail to validate for any of several reasons,
2350           including missing, expired, or invalid signatures, a key which
2351           does not match the DS RRset in the parent zone, or an insecure
2352           response from a zone which, according to its parent, should have
2353           been secure.  
2354         </para>
2355
2356         <note>
2357           <para>
2358             When the validator receives a response from an unsigned zone
2359             that has a signed parent, it must confirm with the parent
2360             that the zone was intentionally left unsigned.  It does
2361             this by verifying, via signed and validated NSEC/NSEC3 records,
2362             that the parent zone contains no DS records for the child.
2363           </para>
2364           <para>
2365             If the validator <emphasis>can</emphasis> prove that the zone
2366             is insecure, then the response is accepted.  However, if it
2367             cannot, then it must assume an insecure response to be a
2368             forgery; it rejects the response and logs an error.
2369           </para>
2370           <para>
2371             The logged error reads "insecurity proof failed" and
2372             "got insecure response; parent indicates it should be secure".
2373             (Prior to BIND 9.7, the logged error was "not insecure".
2374             This referred to the zone, not the response.)
2375           </para>
2376         </note>
2377       </sect2>
2378
2379     </sect1>
2380
2381     <xi:include href="dnssec.xml"/>
2382
2383     <xi:include href="managed-keys.xml"/>
2384
2385     <xi:include href="pkcs11.xml"/>
2386
2387     <sect1>
2388       <title>IPv6 Support in <acronym>BIND</acronym> 9</title>
2389
2390       <para>
2391         <acronym>BIND</acronym> 9 fully supports all currently
2392         defined forms of IPv6 name to address and address to name
2393         lookups.  It will also use IPv6 addresses to make queries when
2394         running on an IPv6 capable system.
2395       </para>
2396
2397       <para>
2398         For forward lookups, <acronym>BIND</acronym> 9 supports
2399         only AAAA records.  RFC 3363 deprecated the use of A6 records,
2400         and client-side support for A6 records was accordingly removed
2401         from <acronym>BIND</acronym> 9.
2402         However, authoritative <acronym>BIND</acronym> 9 name servers still
2403         load zone files containing A6 records correctly, answer queries
2404         for A6 records, and accept zone transfer for a zone containing A6
2405         records.
2406       </para>
2407
2408       <para>
2409         For IPv6 reverse lookups, <acronym>BIND</acronym> 9 supports
2410         the traditional "nibble" format used in the
2411         <emphasis>ip6.arpa</emphasis> domain, as well as the older, deprecated
2412         <emphasis>ip6.int</emphasis> domain.
2413         Older versions of <acronym>BIND</acronym> 9 
2414         supported the "binary label" (also known as "bitstring") format,
2415         but support of binary labels has been completely removed per
2416         RFC 3363.
2417         Many applications in <acronym>BIND</acronym> 9 do not understand
2418         the binary label format at all any more, and will return an
2419         error if given.
2420         In particular, an authoritative <acronym>BIND</acronym> 9
2421         name server will not load a zone file containing binary labels.
2422       </para>
2423
2424       <para>
2425         For an overview of the format and structure of IPv6 addresses,
2426         see <xref linkend="ipv6addresses"/>.
2427       </para>
2428
2429       <sect2>
2430         <title>Address Lookups Using AAAA Records</title>
2431
2432         <para>
2433           The IPv6 AAAA record is a parallel to the IPv4 A record,
2434           and, unlike the deprecated A6 record, specifies the entire
2435           IPv6 address in a single record.  For example,
2436         </para>
2437
2438 <programlisting>
2439 $ORIGIN example.com.
2440 host            3600    IN      AAAA    2001:db8::1
2441 </programlisting>
2442
2443         <para>
2444           Use of IPv4-in-IPv6 mapped addresses is not recommended.
2445           If a host has an IPv4 address, use an A record, not
2446           a AAAA, with <literal>::ffff:192.168.42.1</literal> as
2447           the address.
2448         </para>
2449       </sect2>
2450       <sect2>
2451         <title>Address to Name Lookups Using Nibble Format</title>
2452
2453         <para>
2454           When looking up an address in nibble format, the address
2455           components are simply reversed, just as in IPv4, and
2456           <literal>ip6.arpa.</literal> is appended to the
2457           resulting name.
2458           For example, the following would provide reverse name lookup for
2459           a host with address
2460           <literal>2001:db8::1</literal>.
2461         </para>
2462
2463 <programlisting>
2464 $ORIGIN 0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.
2465 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0  14400   IN    PTR    (
2466                                     host.example.com. )
2467 </programlisting>
2468
2469       </sect2>
2470     </sect1>
2471   </chapter>
2472
2473   <chapter id="Bv9ARM.ch05">
2474     <title>The <acronym>BIND</acronym> 9 Lightweight Resolver</title>
2475     <sect1>
2476       <title>The Lightweight Resolver Library</title>
2477       <para>
2478         Traditionally applications have been linked with a stub resolver
2479         library that sends recursive DNS queries to a local caching name
2480         server.
2481       </para>
2482       <para>
2483         IPv6 once introduced new complexity into the resolution process,
2484         such as following A6 chains and DNAME records, and simultaneous
2485         lookup of IPv4 and IPv6 addresses.  Though most of the complexity was
2486         then removed, these are hard or impossible
2487         to implement in a traditional stub resolver.
2488       </para>
2489       <para>
2490         <acronym>BIND</acronym> 9 therefore can also provide resolution
2491         services to local clients
2492         using a combination of a lightweight resolver library and a resolver
2493         daemon process running on the local host.  These communicate using
2494         a simple UDP-based protocol, the "lightweight resolver protocol"
2495         that is distinct from and simpler than the full DNS protocol.
2496       </para>
2497     </sect1>
2498     <sect1 id="lwresd">
2499       <title>Running a Resolver Daemon</title>
2500
2501       <para>
2502         To use the lightweight resolver interface, the system must
2503         run the resolver daemon <command>lwresd</command> or a
2504         local
2505         name server configured with a <command>lwres</command>
2506         statement.
2507       </para>
2508
2509       <para>
2510         By default, applications using the lightweight resolver library will
2511         make
2512         UDP requests to the IPv4 loopback address (127.0.0.1) on port 921.
2513         The
2514         address can be overridden by <command>lwserver</command>
2515         lines in
2516         <filename>/etc/resolv.conf</filename>.
2517       </para>
2518
2519       <para>
2520         The daemon currently only looks in the DNS, but in the future
2521         it may use other sources such as <filename>/etc/hosts</filename>,
2522         NIS, etc.
2523       </para>
2524
2525       <para>
2526         The <command>lwresd</command> daemon is essentially a
2527         caching-only name server that responds to requests using the
2528         lightweight
2529         resolver protocol rather than the DNS protocol.  Because it needs
2530         to run on each host, it is designed to require no or minimal
2531         configuration.
2532         Unless configured otherwise, it uses the name servers listed on
2533         <command>nameserver</command> lines in <filename>/etc/resolv.conf</filename>
2534         as forwarders, but is also capable of doing the resolution
2535         autonomously if
2536         none are specified.
2537       </para>
2538       <para>
2539         The <command>lwresd</command> daemon may also be
2540         configured with a
2541         <filename>named.conf</filename> style configuration file,
2542         in
2543         <filename>/etc/lwresd.conf</filename> by default.  A name
2544         server may also
2545         be configured to act as a lightweight resolver daemon using the
2546         <command>lwres</command> statement in <filename>named.conf</filename>.
2547       </para>
2548
2549     </sect1>
2550   </chapter>
2551
2552   <chapter id="Bv9ARM.ch06">
2553     <title><acronym>BIND</acronym> 9 Configuration Reference</title>
2554
2555     <para>
2556       <acronym>BIND</acronym> 9 configuration is broadly similar
2557       to <acronym>BIND</acronym> 8; however, there are a few new
2558       areas
2559       of configuration, such as views. <acronym>BIND</acronym>
2560       8 configuration files should work with few alterations in <acronym>BIND</acronym>
2561       9, although more complex configurations should be reviewed to check
2562       if they can be more efficiently implemented using the new features
2563       found in <acronym>BIND</acronym> 9.
2564     </para>
2565
2566     <para>
2567       <acronym>BIND</acronym> 4 configuration files can be
2568       converted to the new format
2569       using the shell script
2570       <filename>contrib/named-bootconf/named-bootconf.sh</filename>.
2571     </para>
2572     <sect1 id="configuration_file_elements">
2573       <title>Configuration File Elements</title>
2574       <para>
2575         Following is a list of elements used throughout the <acronym>BIND</acronym> configuration
2576         file documentation:
2577       </para>
2578       <informaltable colsep="0" rowsep="0">
2579         <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
2580           <colspec colname="1" colnum="1" colsep="0" colwidth="1.855in"/>
2581           <colspec colname="2" colnum="2" colsep="0" colwidth="3.770in"/>
2582           <tbody>
2583             <row rowsep="0">
2584               <entry colname="1">
2585                 <para>
2586                   <varname>acl_name</varname>
2587                 </para>
2588               </entry>
2589               <entry colname="2">
2590                 <para>
2591                   The name of an <varname>address_match_list</varname> as
2592                   defined by the <command>acl</command> statement.
2593                 </para>
2594               </entry>
2595             </row>
2596             <row rowsep="0">
2597               <entry colname="1">
2598                 <para>
2599                   <varname>address_match_list</varname>
2600                 </para>
2601               </entry>
2602               <entry colname="2">
2603                 <para>
2604                   A list of one or more
2605                   <varname>ip_addr</varname>,
2606                   <varname>ip_prefix</varname>, <varname>key_id</varname>,
2607                   or <varname>acl_name</varname> elements, see
2608                   <xref linkend="address_match_lists"/>.
2609                 </para>
2610               </entry>
2611             </row>
2612             <row rowsep="0">
2613               <entry colname="1">
2614                 <para>
2615                   <varname>masters_list</varname>
2616                 </para>
2617               </entry>
2618               <entry colname="2">
2619                 <para>
2620                   A named list of one or more <varname>ip_addr</varname>
2621                   with optional <varname>key_id</varname> and/or
2622                   <varname>ip_port</varname>.
2623                   A <varname>masters_list</varname> may include other
2624                   <varname>masters_lists</varname>.
2625                 </para>
2626               </entry>
2627             </row>
2628             <row rowsep="0">
2629               <entry colname="1">
2630                 <para>
2631                   <varname>domain_name</varname>
2632                 </para>
2633               </entry>
2634               <entry colname="2">
2635                 <para>
2636                   A quoted string which will be used as
2637                   a DNS name, for example "<literal>my.test.domain</literal>".
2638                 </para>
2639               </entry>
2640             </row>
2641             <row rowsep="0">
2642               <entry colname="1">
2643                 <para>
2644                   <varname>namelist</varname>
2645                 </para>
2646               </entry>
2647               <entry colname="2">
2648                 <para>
2649                   A list of one or more <varname>domain_name</varname>
2650                   elements.
2651                 </para>
2652               </entry>
2653             </row>
2654             <row rowsep="0">
2655               <entry colname="1">
2656                 <para>
2657                   <varname>dotted_decimal</varname>
2658                 </para>
2659               </entry>
2660               <entry colname="2">
2661                 <para>
2662                   One to four integers valued 0 through
2663                   255 separated by dots (`.'), such as <command>123</command>,
2664                   <command>45.67</command> or <command>89.123.45.67</command>.
2665                 </para>
2666               </entry>
2667             </row>
2668             <row rowsep="0">
2669               <entry colname="1">
2670                 <para>
2671                   <varname>ip4_addr</varname>
2672                 </para>
2673               </entry>
2674               <entry colname="2">
2675                 <para>
2676                   An IPv4 address with exactly four elements
2677                   in <varname>dotted_decimal</varname> notation.
2678                 </para>
2679               </entry>
2680             </row>
2681             <row rowsep="0">
2682               <entry colname="1">
2683                 <para>
2684                   <varname>ip6_addr</varname>
2685                 </para>
2686               </entry>
2687               <entry colname="2">
2688                 <para>
2689                   An IPv6 address, such as <command>2001:db8::1234</command>.
2690                   IPv6 scoped addresses that have ambiguity on their
2691                   scope zones must be disambiguated by an appropriate
2692                   zone ID with the percent character (`%') as
2693                   delimiter.  It is strongly recommended to use
2694                   string zone names rather than numeric identifiers,
2695                   in order to be robust against system configuration
2696                   changes.  However, since there is no standard
2697                   mapping for such names and identifier values,
2698                   currently only interface names as link identifiers
2699                   are supported, assuming one-to-one mapping between
2700                   interfaces and links.  For example, a link-local
2701                   address <command>fe80::1</command> on the link
2702                   attached to the interface <command>ne0</command>
2703                   can be specified as <command>fe80::1%ne0</command>.
2704                   Note that on most systems link-local addresses
2705                   always have the ambiguity, and need to be
2706                   disambiguated.
2707                 </para>
2708               </entry>
2709             </row>
2710             <row rowsep="0">
2711               <entry colname="1">
2712                 <para>
2713                   <varname>ip_addr</varname>
2714                 </para>
2715               </entry>
2716               <entry colname="2">
2717                 <para>
2718                   An <varname>ip4_addr</varname> or <varname>ip6_addr</varname>.
2719                 </para>
2720               </entry>
2721             </row>
2722             <row rowsep="0">
2723               <entry colname="1">
2724                 <para>
2725                   <varname>ip_port</varname>
2726                 </para>
2727               </entry>
2728               <entry colname="2">
2729                 <para>
2730                   An IP port <varname>number</varname>.
2731                   The <varname>number</varname> is limited to 0
2732                   through 65535, with values
2733                   below 1024 typically restricted to use by processes running
2734                   as root.
2735                   In some cases, an asterisk (`*') character can be used as a
2736                   placeholder to
2737                   select a random high-numbered port.
2738                 </para>
2739               </entry>
2740             </row>
2741             <row rowsep="0">
2742               <entry colname="1">
2743                 <para>
2744                   <varname>ip_prefix</varname>
2745                 </para>
2746               </entry>
2747               <entry colname="2">
2748                 <para>
2749                   An IP network specified as an <varname>ip_addr</varname>,
2750                   followed by a slash (`/') and then the number of bits in the
2751                   netmask.
2752                   Trailing zeros in a <varname>ip_addr</varname>
2753                   may omitted.
2754                   For example, <command>127/8</command> is the
2755                   network <command>127.0.0.0</command> with
2756                   netmask <command>255.0.0.0</command> and <command>1.2.3.0/28</command> is
2757                   network <command>1.2.3.0</command> with netmask <command>255.255.255.240</command>.
2758                 </para>
2759                 <para>
2760                   When specifying a prefix involving a IPv6 scoped address
2761                   the scope may be omitted.  In that case the prefix will
2762                   match packets from any scope.
2763                 </para>
2764               </entry>
2765             </row>
2766             <row rowsep="0">
2767               <entry colname="1">
2768                 <para>
2769                   <varname>key_id</varname>
2770                 </para>
2771               </entry>
2772               <entry colname="2">
2773                 <para>
2774                   A <varname>domain_name</varname> representing
2775                   the name of a shared key, to be used for transaction
2776                   security.
2777                 </para>
2778               </entry>
2779             </row>
2780             <row rowsep="0">
2781               <entry colname="1">
2782                 <para>
2783                   <varname>key_list</varname>
2784                 </para>
2785               </entry>
2786               <entry colname="2">
2787                 <para>
2788                   A list of one or more
2789                   <varname>key_id</varname>s,
2790                   separated by semicolons and ending with a semicolon.
2791                 </para>
2792               </entry>
2793             </row>
2794             <row rowsep="0">
2795               <entry colname="1">
2796                 <para>
2797                   <varname>number</varname>
2798                 </para>
2799               </entry>
2800               <entry colname="2">
2801                 <para>
2802                   A non-negative 32-bit integer
2803                   (i.e., a number between 0 and 4294967295, inclusive).
2804                   Its acceptable value might further
2805                   be limited by the context in which it is used.
2806                 </para>
2807               </entry>
2808             </row>
2809             <row rowsep="0">
2810               <entry colname="1">
2811                 <para>
2812                   <varname>path_name</varname>
2813                 </para>
2814               </entry>
2815               <entry colname="2">
2816                 <para>
2817                   A quoted string which will be used as
2818                   a pathname, such as <filename>zones/master/my.test.domain</filename>.
2819                 </para>
2820               </entry>
2821             </row>
2822             <row rowsep="0">
2823               <entry colname="1">
2824                 <para>
2825                   <varname>port_list</varname>
2826                 </para>
2827               </entry>
2828               <entry colname="2">
2829                 <para>
2830                   A list of an <varname>ip_port</varname> or a port
2831                   range.
2832                   A port range is specified in the form of
2833                   <userinput>range</userinput> followed by
2834                   two <varname>ip_port</varname>s,
2835                   <varname>port_low</varname> and
2836                   <varname>port_high</varname>, which represents
2837                   port numbers from <varname>port_low</varname> through
2838                   <varname>port_high</varname>, inclusive.
2839                   <varname>port_low</varname> must not be larger than
2840                   <varname>port_high</varname>.
2841                   For example,
2842                   <userinput>range 1024 65535</userinput> represents
2843                   ports from 1024 through 65535.
2844                   In either case an asterisk (`*') character is not
2845                   allowed as a valid <varname>ip_port</varname>.
2846                 </para>
2847               </entry>
2848             </row>
2849             <row rowsep="0">
2850               <entry colname="1">
2851                 <para>
2852                   <varname>size_spec</varname>
2853                 </para>
2854               </entry>
2855               <entry colname="2">
2856                 <para>
2857                   A 64-bit unsigned integer, or the keywords
2858                   <userinput>unlimited</userinput> or
2859                   <userinput>default</userinput>.
2860                 </para>
2861                 <para>
2862                   Integers may take values
2863                   0 &lt;= value &lt;= 18446744073709551615, though
2864                   certain parameters may use a more limited range
2865                   within these extremes.  In most cases, setting a
2866                   value to 0 does not literally mean zero; it means
2867                   "undefined" or "as big as psosible", depending on
2868                   the context. See the expalantions of particular
2869                   parameters that use <varname>size_spec</varname>
2870                   for details on how they interpret its use. 
2871                 </para>
2872                 <para>
2873                   Numeric values can optionally be followed by a
2874                   scaling factor:
2875                   <userinput>K</userinput> or <userinput>k</userinput>
2876                   for kilobytes,
2877                   <userinput>M</userinput> or <userinput>m</userinput>
2878                   for megabytes, and
2879                   <userinput>G</userinput> or <userinput>g</userinput>
2880                   for gigabytes, which scale by 1024, 1024*1024, and
2881                   1024*1024*1024 respectively.
2882                 </para>
2883                 <para>
2884                   <varname>unlimited</varname> generally means
2885                   "as big as possible", though in certain contexts,
2886                   (including <option>max-cache-size</option>), it may
2887                   mean the largest possible 32-bit unsigned integer
2888                   (0xffffffff); this distinction can be important when
2889                   dealing with larger quantities. 
2890                   <varname>unlimited</varname> is usually the best way
2891                   to safely set a very large number.
2892                 </para>
2893                 <para>
2894                   <varname>default</varname> 
2895                   uses the limit that was in force when the server was started.
2896                 </para>
2897               </entry>
2898             </row>
2899             <row rowsep="0">
2900               <entry colname="1">
2901                 <para>
2902                   <varname>yes_or_no</varname>
2903                 </para>
2904               </entry>
2905               <entry colname="2">
2906                 <para>
2907                   Either <userinput>yes</userinput> or <userinput>no</userinput>.
2908                   The words <userinput>true</userinput> and <userinput>false</userinput> are
2909                   also accepted, as are the numbers <userinput>1</userinput>
2910                   and <userinput>0</userinput>.
2911                 </para>
2912               </entry>
2913             </row>
2914             <row rowsep="0">
2915               <entry colname="1">
2916                 <para>
2917                   <varname>dialup_option</varname>
2918                 </para>
2919               </entry>
2920               <entry colname="2">
2921                 <para>
2922                   One of <userinput>yes</userinput>,
2923                   <userinput>no</userinput>, <userinput>notify</userinput>,
2924                   <userinput>notify-passive</userinput>, <userinput>refresh</userinput> or
2925                   <userinput>passive</userinput>.
2926                   When used in a zone, <userinput>notify-passive</userinput>,
2927                   <userinput>refresh</userinput>, and <userinput>passive</userinput>
2928                   are restricted to slave and stub zones.
2929                 </para>
2930               </entry>
2931             </row>
2932           </tbody>
2933         </tgroup>
2934       </informaltable>
2935       <sect2 id="address_match_lists">
2936         <title>Address Match Lists</title>
2937         <sect3>
2938           <title>Syntax</title>
2939
2940 <programlisting><varname>address_match_list</varname> = address_match_list_element ;
2941   <optional> address_match_list_element; ... </optional>
2942 <varname>address_match_list_element</varname> = <optional> ! </optional> (ip_address <optional>/length</optional> |
2943    key key_id | acl_name | { address_match_list } )
2944 </programlisting>
2945
2946         </sect3>
2947         <sect3>
2948           <title>Definition and Usage</title>
2949           <para>
2950             Address match lists are primarily used to determine access
2951             control for various server operations. They are also used in
2952             the <command>listen-on</command> and <command>sortlist</command>
2953             statements. The elements which constitute an address match
2954             list can be any of the following:
2955           </para>
2956           <itemizedlist>
2957             <listitem>
2958               <simpara>an IP address (IPv4 or IPv6)</simpara>
2959             </listitem>
2960             <listitem>
2961               <simpara>an IP prefix (in `/' notation)</simpara>
2962             </listitem>
2963             <listitem>
2964               <simpara>
2965                 a key ID, as defined by the <command>key</command>
2966                 statement
2967               </simpara>
2968             </listitem>
2969             <listitem>
2970               <simpara>the name of an address match list defined with
2971                 the <command>acl</command> statement
2972               </simpara>
2973             </listitem>
2974             <listitem>
2975               <simpara>a nested address match list enclosed in braces</simpara>
2976             </listitem>
2977           </itemizedlist>
2978
2979           <para>
2980             Elements can be negated with a leading exclamation mark (`!'),
2981             and the match list names "any", "none", "localhost", and
2982             "localnets" are predefined. More information on those names
2983             can be found in the description of the acl statement.
2984           </para>
2985
2986           <para>
2987             The addition of the key clause made the name of this syntactic
2988             element something of a misnomer, since security keys can be used
2989             to validate access without regard to a host or network address.
2990             Nonetheless, the term "address match list" is still used
2991             throughout the documentation.
2992           </para>
2993
2994           <para>
2995             When a given IP address or prefix is compared to an address
2996             match list, the comparison takes place in approximately O(1)
2997             time.  However, key comparisons require that the list of keys
2998             be traversed until a matching key is found, and therefore may
2999             be somewhat slower.
3000           </para>
3001
3002           <para>
3003             The interpretation of a match depends on whether the list is being
3004             used for access control, defining <command>listen-on</command> ports, or in a
3005             <command>sortlist</command>, and whether the element was negated.
3006           </para>
3007
3008           <para>
3009             When used as an access control list, a non-negated match
3010             allows access and a negated match denies access. If
3011             there is no match, access is denied. The clauses
3012             <command>allow-notify</command>,
3013             <command>allow-recursion</command>,
3014             <command>allow-recursion-on</command>,
3015             <command>allow-query</command>,
3016             <command>allow-query-on</command>,
3017             <command>allow-query-cache</command>,
3018             <command>allow-query-cache-on</command>,
3019             <command>allow-transfer</command>,
3020             <command>allow-update</command>,
3021             <command>allow-update-forwarding</command>, and
3022             <command>blackhole</command> all use address match
3023             lists.  Similarly, the <command>listen-on</command> option will cause the
3024             server to refuse queries on any of the machine's
3025             addresses which do not match the list.
3026           </para>
3027
3028           <para>
3029             Order of insertion is significant.  If more than one element
3030             in an ACL is found to match a given IP address or prefix,
3031             preference will be given to the one that came
3032             <emphasis>first</emphasis> in the ACL definition.
3033             Because of this first-match behavior, an element that
3034             defines a subset of another element in the list should
3035             come before the broader element, regardless of whether
3036             either is negated. For example, in
3037             <command>1.2.3/24; ! 1.2.3.13;</command>
3038             the 1.2.3.13 element is completely useless because the
3039             algorithm will match any lookup for 1.2.3.13 to the 1.2.3/24
3040             element.  Using <command>! 1.2.3.13; 1.2.3/24</command> fixes
3041             that problem by having 1.2.3.13 blocked by the negation, but
3042             all other 1.2.3.* hosts fall through.
3043           </para>
3044         </sect3>
3045       </sect2>
3046
3047       <sect2>
3048         <title>Comment Syntax</title>
3049
3050         <para>
3051           The <acronym>BIND</acronym> 9 comment syntax allows for
3052           comments to appear
3053           anywhere that whitespace may appear in a <acronym>BIND</acronym> configuration
3054           file. To appeal to programmers of all kinds, they can be written
3055           in the C, C++, or shell/perl style.
3056         </para>
3057
3058         <sect3>
3059           <title>Syntax</title>
3060
3061           <para>
3062             <programlisting>/* This is a <acronym>BIND</acronym> comment as in C */</programlisting>
3063             <programlisting>// This is a <acronym>BIND</acronym> comment as in C++</programlisting>
3064             <programlisting># This is a <acronym>BIND</acronym> comment as in common UNIX shells
3065 # and perl</programlisting>
3066           </para>
3067         </sect3>
3068         <sect3>
3069           <title>Definition and Usage</title>
3070           <para>
3071             Comments may appear anywhere that whitespace may appear in
3072             a <acronym>BIND</acronym> configuration file.
3073           </para>
3074           <para>
3075             C-style comments start with the two characters /* (slash,
3076             star) and end with */ (star, slash). Because they are completely
3077             delimited with these characters, they can be used to comment only
3078             a portion of a line or to span multiple lines.
3079           </para>
3080           <para>
3081             C-style comments cannot be nested. For example, the following
3082             is not valid because the entire comment ends with the first */:
3083           </para>
3084           <para>
3085
3086 <programlisting>/* This is the start of a comment.
3087    This is still part of the comment.
3088 /* This is an incorrect attempt at nesting a comment. */
3089    This is no longer in any comment. */
3090 </programlisting>
3091
3092           </para>
3093
3094           <para>
3095             C++-style comments start with the two characters // (slash,
3096             slash) and continue to the end of the physical line. They cannot
3097             be continued across multiple physical lines; to have one logical
3098             comment span multiple lines, each line must use the // pair.
3099             For example:
3100           </para>
3101           <para>
3102
3103 <programlisting>// This is the start of a comment.  The next line
3104 // is a new comment, even though it is logically
3105 // part of the previous comment.
3106 </programlisting>
3107
3108           </para>
3109           <para>
3110             Shell-style (or perl-style, if you prefer) comments start
3111             with the character <literal>#</literal> (number sign)
3112             and continue to the end of the
3113             physical line, as in C++ comments.
3114             For example:
3115           </para>
3116
3117           <para>
3118
3119 <programlisting># This is the start of a comment.  The next line
3120 # is a new comment, even though it is logically
3121 # part of the previous comment.
3122 </programlisting>
3123
3124           </para>
3125
3126           <warning>
3127             <para>
3128               You cannot use the semicolon (`;') character
3129               to start a comment such as you would in a zone file. The
3130               semicolon indicates the end of a configuration
3131               statement.
3132             </para>
3133           </warning>
3134         </sect3>
3135       </sect2>
3136     </sect1>
3137
3138     <sect1 id="Configuration_File_Grammar">
3139       <title>Configuration File Grammar</title>
3140
3141       <para>
3142         A <acronym>BIND</acronym> 9 configuration consists of
3143         statements and comments.
3144         Statements end with a semicolon. Statements and comments are the
3145         only elements that can appear without enclosing braces. Many
3146         statements contain a block of sub-statements, which are also
3147         terminated with a semicolon.
3148       </para>
3149
3150       <para>
3151         The following statements are supported:
3152       </para>
3153
3154       <informaltable colsep="0" rowsep="0">
3155         <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
3156           <colspec colname="1" colnum="1" colsep="0" colwidth="1.336in"/>
3157           <colspec colname="2" colnum="2" colsep="0" colwidth="3.778in"/>
3158           <tbody>
3159             <row rowsep="0">
3160               <entry colname="1">
3161                 <para><command>acl</command></para>
3162               </entry>
3163               <entry colname="2">
3164                 <para>
3165                   defines a named IP address
3166                   matching list, for access control and other uses.
3167                 </para>
3168               </entry>
3169             </row>
3170             <row rowsep="0">
3171               <entry colname="1">
3172                 <para><command>controls</command></para>
3173               </entry>
3174               <entry colname="2">
3175                 <para>
3176                   declares control channels to be used
3177                   by the <command>rndc</command> utility.
3178                 </para>
3179               </entry>
3180             </row>
3181             <row rowsep="0">
3182               <entry colname="1">
3183                 <para><command>include</command></para>
3184               </entry>
3185               <entry colname="2">
3186                 <para>
3187                   includes a file.
3188                 </para>
3189               </entry>
3190             </row>
3191             <row rowsep="0">
3192               <entry colname="1">
3193                 <para><command>key</command></para>
3194               </entry>
3195               <entry colname="2">
3196                 <para>
3197                   specifies key information for use in
3198                   authentication and authorization using TSIG.
3199                 </para>
3200               </entry>
3201             </row>
3202             <row rowsep="0">
3203               <entry colname="1">
3204                 <para><command>logging</command></para>
3205               </entry>
3206               <entry colname="2">
3207                 <para>
3208                   specifies what the server logs, and where
3209                   the log messages are sent.
3210                 </para>
3211               </entry>
3212             </row>
3213             <row rowsep="0">
3214               <entry colname="1">
3215                 <para><command>lwres</command></para>
3216               </entry>
3217               <entry colname="2">
3218                 <para>
3219                   configures <command>named</command> to
3220                   also act as a light-weight resolver daemon (<command>lwresd</command>).
3221                 </para>
3222               </entry>
3223             </row>
3224             <row rowsep="0">
3225               <entry colname="1">
3226                 <para><command>masters</command></para>
3227               </entry>
3228               <entry colname="2">
3229                 <para>
3230                   defines a named masters list for
3231                   inclusion in stub and slave zones'
3232                   <command>masters</command> or 
3233                   <command>also-notify</command> lists.
3234                 </para>
3235               </entry>
3236             </row>
3237             <row rowsep="0">
3238               <entry colname="1">
3239                 <para><command>options</command></para>
3240               </entry>
3241               <entry colname="2">
3242                 <para>
3243                   controls global server configuration
3244                   options and sets defaults for other statements.
3245                 </para>
3246               </entry>
3247             </row>
3248             <row rowsep="0">
3249               <entry colname="1">
3250                 <para><command>server</command></para>
3251               </entry>
3252               <entry colname="2">
3253                 <para>
3254                   sets certain configuration options on
3255                   a per-server basis.
3256                 </para>
3257               </entry>
3258             </row>
3259             <row rowsep="0">
3260               <entry colname="1">
3261                 <para><command>statistics-channels</command></para>
3262               </entry>
3263               <entry colname="2">
3264                 <para>
3265                   declares communication channels to get access to
3266                   <command>named</command> statistics.
3267                 </para>
3268               </entry>
3269             </row>
3270             <row rowsep="0">
3271               <entry colname="1">
3272                 <para><command>trusted-keys</command></para>
3273               </entry>
3274               <entry colname="2">
3275                 <para>
3276                   defines trusted DNSSEC keys.
3277                 </para>
3278               </entry>
3279             </row>
3280             <row rowsep="0">
3281               <entry colname="1">
3282                 <para><command>managed-keys</command></para>
3283               </entry>
3284               <entry colname="2">
3285                 <para>
3286                   lists DNSSEC keys to be kept up to date
3287                   using RFC 5011 trust anchor maintenance.
3288                 </para>
3289               </entry>
3290             </row>
3291             <row rowsep="0">
3292               <entry colname="1">
3293                 <para><command>view</command></para>
3294               </entry>
3295               <entry colname="2">
3296                 <para>
3297                   defines a view.
3298                 </para>
3299               </entry>
3300             </row>
3301             <row rowsep="0">
3302               <entry colname="1">
3303                 <para><command>zone</command></para>
3304               </entry>
3305               <entry colname="2">
3306                 <para>
3307                   defines a zone.
3308                 </para>
3309               </entry>
3310             </row>
3311           </tbody>
3312         </tgroup>
3313       </informaltable>
3314
3315       <para>
3316         The <command>logging</command> and
3317         <command>options</command> statements may only occur once
3318         per
3319         configuration.
3320       </para>
3321
3322       <sect2>
3323         <title><command>acl</command> Statement Grammar</title>
3324
3325 <programlisting><command>acl</command> acl-name {
3326     address_match_list
3327 };
3328 </programlisting>
3329
3330       </sect2>
3331       <sect2 id="acl">
3332         <title><command>acl</command> Statement Definition and
3333           Usage</title>
3334
3335         <para>
3336           The <command>acl</command> statement assigns a symbolic
3337           name to an address match list. It gets its name from a primary
3338           use of address match lists: Access Control Lists (ACLs).
3339         </para>
3340
3341         <para>
3342           Note that an address match list's name must be defined
3343           with <command>acl</command> before it can be used
3344           elsewhere; no forward references are allowed.
3345         </para>
3346
3347         <para>
3348           The following ACLs are built-in:
3349         </para>
3350
3351         <informaltable colsep="0" rowsep="0">
3352           <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
3353             <colspec colname="1" colnum="1" colsep="0" colwidth="1.130in"/>
3354             <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
3355             <tbody>
3356               <row rowsep="0">
3357                 <entry colname="1">
3358                   <para><command>any</command></para>
3359                 </entry>
3360                 <entry colname="2">
3361                   <para>
3362                     Matches all hosts.
3363                   </para>
3364                 </entry>
3365               </row>
3366               <row rowsep="0">
3367                 <entry colname="1">
3368                   <para><command>none</command></para>
3369                 </entry>
3370                 <entry colname="2">
3371                   <para>
3372                     Matches no hosts.
3373                   </para>
3374                 </entry>
3375               </row>
3376               <row rowsep="0">
3377                 <entry colname="1">
3378                   <para><command>localhost</command></para>
3379                 </entry>
3380                 <entry colname="2">
3381                   <para>
3382                     Matches the IPv4 and IPv6 addresses of all network
3383                     interfaces on the system.
3384                   </para>
3385                 </entry>
3386               </row>
3387               <row rowsep="0">
3388                 <entry colname="1">
3389                   <para><command>localnets</command></para>
3390                 </entry>
3391                 <entry colname="2">
3392                   <para>
3393                     Matches any host on an IPv4 or IPv6 network
3394                     for which the system has an interface.
3395                     Some systems do not provide a way to determine the prefix
3396                     lengths of
3397                     local IPv6 addresses.
3398                     In such a case, <command>localnets</command>
3399                     only matches the local
3400                     IPv6 addresses, just like <command>localhost</command>.
3401                   </para>
3402                 </entry>
3403               </row>
3404             </tbody>
3405           </tgroup>
3406         </informaltable>
3407
3408       </sect2>
3409       <sect2>
3410         <title><command>controls</command> Statement Grammar</title>
3411
3412 <programlisting><command>controls</command> {
3413    [ inet ( ip_addr | * ) [ port ip_port ]
3414                 allow { <replaceable> address_match_list </replaceable> }
3415                 keys { <replaceable>key_list</replaceable> }; ]
3416    [ inet ...; ]
3417    [ unix <replaceable>path</replaceable> perm <replaceable>number</replaceable> owner <replaceable>number</replaceable> group <replaceable>number</replaceable>
3418      keys { <replaceable>key_list</replaceable> }; ]
3419    [ unix ...; ]
3420 };
3421 </programlisting>
3422
3423       </sect2>
3424
3425       <sect2 id="controls_statement_definition_and_usage">
3426         <title><command>controls</command> Statement Definition and
3427           Usage</title>
3428
3429         <para>
3430           The <command>controls</command> statement declares control
3431           channels to be used by system administrators to control the
3432           operation of the name server. These control channels are
3433           used by the <command>rndc</command> utility to send
3434           commands to and retrieve non-DNS results from a name server.
3435         </para>
3436
3437         <para>
3438           An <command>inet</command> control channel is a TCP socket
3439           listening at the specified <command>ip_port</command> on the
3440           specified <command>ip_addr</command>, which can be an IPv4 or IPv6
3441           address.  An <command>ip_addr</command> of <literal>*</literal> (asterisk) is
3442           interpreted as the IPv4 wildcard address; connections will be
3443           accepted on any of the system's IPv4 addresses.
3444           To listen on the IPv6 wildcard address,
3445           use an <command>ip_addr</command> of <literal>::</literal>.
3446           If you will only use <command>rndc</command> on the local host,
3447           using the loopback address (<literal>127.0.0.1</literal>
3448           or <literal>::1</literal>) is recommended for maximum security.
3449         </para>
3450
3451         <para>
3452           If no port is specified, port 953 is used. The asterisk
3453           "<literal>*</literal>" cannot be used for <command>ip_port</command>.
3454         </para>
3455
3456         <para>
3457           The ability to issue commands over the control channel is
3458           restricted by the <command>allow</command> and
3459           <command>keys</command> clauses.
3460           Connections to the control channel are permitted based on the
3461           <command>address_match_list</command>.  This is for simple
3462           IP address based filtering only; any <command>key_id</command>
3463           elements of the <command>address_match_list</command>
3464           are ignored.
3465         </para>
3466
3467         <para>
3468           A <command>unix</command> control channel is a UNIX domain
3469           socket listening at the specified path in the file system.
3470           Access to the socket is specified by the <command>perm</command>,
3471           <command>owner</command> and <command>group</command> clauses.
3472           Note on some platforms (SunOS and Solaris) the permissions
3473           (<command>perm</command>) are applied to the parent directory
3474           as the permissions on the socket itself are ignored.
3475         </para>
3476
3477         <para>
3478           The primary authorization mechanism of the command
3479           channel is the <command>key_list</command>, which
3480           contains a list of <command>key_id</command>s.
3481           Each <command>key_id</command> in the <command>key_list</command>
3482           is authorized to execute commands over the control channel.
3483           See <xref linkend="rndc"/> in <xref linkend="admin_tools"/>)
3484           for information about configuring keys in <command>rndc</command>.
3485         </para>
3486
3487         <para>
3488           If no <command>controls</command> statement is present,
3489           <command>named</command> will set up a default
3490           control channel listening on the loopback address 127.0.0.1
3491           and its IPv6 counterpart ::1.
3492           In this case, and also when the <command>controls</command> statement
3493           is present but does not have a <command>keys</command> clause,
3494           <command>named</command> will attempt to load the command channel key
3495           from the file <filename>rndc.key</filename> in
3496           <filename>/etc</filename> (or whatever <varname>sysconfdir</varname>
3497           was specified as when <acronym>BIND</acronym> was built).
3498           To create a <filename>rndc.key</filename> file, run
3499           <userinput>rndc-confgen -a</userinput>.
3500         </para>
3501
3502         <para>
3503           The <filename>rndc.key</filename> feature was created to
3504           ease the transition of systems from <acronym>BIND</acronym> 8,
3505           which did not have digital signatures on its command channel
3506           messages and thus did not have a <command>keys</command> clause.
3507
3508           It makes it possible to use an existing <acronym>BIND</acronym> 8
3509           configuration file in <acronym>BIND</acronym> 9 unchanged,
3510           and still have <command>rndc</command> work the same way
3511           <command>ndc</command> worked in BIND 8, simply by executing the
3512           command <userinput>rndc-confgen -a</userinput> after BIND 9 is
3513           installed.
3514         </para>
3515
3516         <para>
3517           Since the <filename>rndc.key</filename> feature
3518           is only intended to allow the backward-compatible usage of
3519           <acronym>BIND</acronym> 8 configuration files, this
3520           feature does not
3521           have a high degree of configurability.  You cannot easily change
3522           the key name or the size of the secret, so you should make a
3523           <filename>rndc.conf</filename> with your own key if you
3524           wish to change
3525           those things.  The <filename>rndc.key</filename> file
3526           also has its
3527           permissions set such that only the owner of the file (the user that
3528           <command>named</command> is running as) can access it.
3529           If you
3530           desire greater flexibility in allowing other users to access
3531           <command>rndc</command> commands, then you need to create
3532           a
3533           <filename>rndc.conf</filename> file and make it group
3534           readable by a group
3535           that contains the users who should have access.
3536         </para>
3537
3538         <para>
3539           To disable the command channel, use an empty
3540           <command>controls</command> statement:
3541           <command>controls { };</command>.
3542         </para>
3543
3544       </sect2>
3545       <sect2>
3546         <title><command>include</command> Statement Grammar</title>
3547         <programlisting><command>include</command> <replaceable>filename</replaceable>;</programlisting>
3548       </sect2>
3549       <sect2>
3550         <title><command>include</command> Statement Definition and
3551           Usage</title>
3552
3553         <para>
3554           The <command>include</command> statement inserts the
3555           specified file at the point where the <command>include</command>
3556           statement is encountered. The <command>include</command>
3557                 statement facilitates the administration of configuration
3558           files
3559           by permitting the reading or writing of some things but not
3560           others. For example, the statement could include private keys
3561           that are readable only by the name server.
3562         </para>
3563
3564       </sect2>
3565       <sect2>
3566         <title><command>key</command> Statement Grammar</title>
3567
3568 <programlisting><command>key</command> <replaceable>key_id</replaceable> {
3569     algorithm <replaceable>string</replaceable>;
3570     secret <replaceable>string</replaceable>;
3571 };
3572 </programlisting>
3573
3574       </sect2>
3575
3576       <sect2>
3577         <title><command>key</command> Statement Definition and Usage</title>
3578
3579         <para>
3580           The <command>key</command> statement defines a shared
3581           secret key for use with TSIG (see <xref linkend="tsig"/>)
3582           or the command channel
3583           (see <xref linkend="controls_statement_definition_and_usage"/>).
3584         </para>
3585
3586         <para>
3587           The <command>key</command> statement can occur at the
3588           top level
3589           of the configuration file or inside a <command>view</command>
3590           statement.  Keys defined in top-level <command>key</command>
3591           statements can be used in all views.  Keys intended for use in
3592           a <command>controls</command> statement
3593           (see <xref linkend="controls_statement_definition_and_usage"/>)
3594           must be defined at the top level.
3595         </para>
3596
3597         <para>
3598           The <replaceable>key_id</replaceable>, also known as the
3599           key name, is a domain name uniquely identifying the key. It can
3600           be used in a <command>server</command>
3601           statement to cause requests sent to that
3602           server to be signed with this key, or in address match lists to
3603           verify that incoming requests have been signed with a key
3604           matching this name, algorithm, and secret.
3605         </para>
3606
3607         <para>
3608           The <replaceable>algorithm_id</replaceable> is a string
3609           that specifies a security/authentication algorithm.  Named
3610           supports <literal>hmac-md5</literal>,
3611           <literal>hmac-sha1</literal>, <literal>hmac-sha224</literal>,
3612           <literal>hmac-sha256</literal>, <literal>hmac-sha384</literal>
3613           and <literal>hmac-sha512</literal> TSIG authentication.
3614           Truncated hashes are supported by appending the minimum
3615           number of required bits preceded by a dash, e.g.
3616           <literal>hmac-sha1-80</literal>.  The
3617           <replaceable>secret_string</replaceable> is the secret
3618           to be used by the algorithm, and is treated as a base-64
3619           encoded string.
3620         </para>
3621
3622       </sect2>
3623       <sect2>
3624         <title><command>logging</command> Statement Grammar</title>
3625
3626 <programlisting><command>logging</command> {
3627    [ <command>channel</command> <replaceable>channel_name</replaceable> {
3628      ( <command>file</command> <replaceable>path_name</replaceable>
3629          [ <command>versions</command> ( <replaceable>number</replaceable> | <command>unlimited</command> ) ]
3630          [ <command>size</command> <replaceable>size_spec</replaceable> ]
3631        | <command>syslog</command> <replaceable>syslog_facility</replaceable>
3632        | <command>stderr</command>
3633        | <command>null</command> );
3634      [ <command>severity</command> (<option>critical</option> | <option>error</option> | <option>warning</option> | <option>notice</option> |
3635                  <option>info</option> | <option>debug</option> [ <replaceable>level</replaceable> ] | <option>dynamic</option> ); ]
3636      [ <command>print-category</command> <option>yes</option> or <option>no</option>; ]
3637      [ <command>print-severity</command> <option>yes</option> or <option>no</option>; ]
3638      [ <command>print-time</command> <option>yes</option> or <option>no</option>; ]
3639    }; ]
3640    [ <command>category</command> <replaceable>category_name</replaceable> {
3641      <replaceable>channel_name</replaceable> ; [ <replaceable>channel_name</replaceable> ; ... ]
3642    }; ]
3643    ...
3644 };
3645 </programlisting>
3646
3647       </sect2>
3648
3649       <sect2>
3650         <title><command>logging</command> Statement Definition and
3651           Usage</title>
3652
3653         <para>
3654           The <command>logging</command> statement configures a
3655           wide
3656           variety of logging options for the name server. Its <command>channel</command> phrase
3657           associates output methods, format options and severity levels with
3658           a name that can then be used with the <command>category</command> phrase
3659           to select how various classes of messages are logged.
3660         </para>
3661         <para>
3662           Only one <command>logging</command> statement is used to
3663           define
3664           as many channels and categories as are wanted. If there is no <command>logging</command> statement,
3665           the logging configuration will be:
3666         </para>
3667
3668 <programlisting>logging {
3669      category default { default_syslog; default_debug; };
3670      category unmatched { null; };
3671 };
3672 </programlisting>
3673
3674         <para>
3675           In <acronym>BIND</acronym> 9, the logging configuration
3676           is only established when
3677           the entire configuration file has been parsed.  In <acronym>BIND</acronym> 8, it was
3678           established as soon as the <command>logging</command>
3679           statement
3680           was parsed. When the server is starting up, all logging messages
3681           regarding syntax errors in the configuration file go to the default
3682           channels, or to standard error if the "<option>-g</option>" option
3683           was specified.
3684         </para>
3685
3686         <sect3>
3687           <title>The <command>channel</command> Phrase</title>
3688
3689           <para>
3690             All log output goes to one or more <emphasis>channels</emphasis>;
3691             you can make as many of them as you want.
3692           </para>
3693
3694           <para>
3695             Every channel definition must include a destination clause that
3696             says whether messages selected for the channel go to a file, to a
3697             particular syslog facility, to the standard error stream, or are
3698             discarded. It can optionally also limit the message severity level
3699             that will be accepted by the channel (the default is
3700             <command>info</command>), and whether to include a
3701             <command>named</command>-generated time stamp, the
3702             category name
3703             and/or severity level (the default is not to include any).
3704           </para>
3705
3706           <para>
3707             The <command>null</command> destination clause
3708             causes all messages sent to the channel to be discarded;
3709             in that case, other options for the channel are meaningless.
3710           </para>
3711
3712           <para>
3713             The <command>file</command> destination clause directs
3714             the channel
3715             to a disk file.  It can include limitations
3716             both on how large the file is allowed to become, and how many
3717             versions
3718             of the file will be saved each time the file is opened.
3719           </para>
3720
3721           <para>
3722             If you use the <command>versions</command> log file
3723             option, then
3724             <command>named</command> will retain that many backup
3725             versions of the file by
3726             renaming them when opening.  For example, if you choose to keep
3727             three old versions
3728             of the file <filename>lamers.log</filename>, then just
3729             before it is opened
3730             <filename>lamers.log.1</filename> is renamed to
3731             <filename>lamers.log.2</filename>, <filename>lamers.log.0</filename> is renamed
3732             to <filename>lamers.log.1</filename>, and <filename>lamers.log</filename> is
3733             renamed to <filename>lamers.log.0</filename>.
3734             You can say <command>versions unlimited</command> to
3735             not limit
3736             the number of versions.
3737             If a <command>size</command> option is associated with
3738             the log file,
3739             then renaming is only done when the file being opened exceeds the
3740             indicated size.  No backup versions are kept by default; any
3741             existing
3742             log file is simply appended.
3743           </para>
3744
3745           <para>
3746             The <command>size</command> option for files is used
3747             to limit log
3748             growth. If the file ever exceeds the size, then <command>named</command> will
3749             stop writing to the file unless it has a <command>versions</command> option
3750             associated with it.  If backup versions are kept, the files are
3751             rolled as
3752             described above and a new one begun.  If there is no
3753             <command>versions</command> option, no more data will
3754             be written to the log
3755             until some out-of-band mechanism removes or truncates the log to
3756             less than the
3757             maximum size.  The default behavior is not to limit the size of
3758             the
3759             file.
3760           </para>
3761
3762           <para>
3763             Example usage of the <command>size</command> and
3764             <command>versions</command> options:
3765           </para>
3766
3767 <programlisting>channel an_example_channel {
3768     file "example.log" versions 3 size 20m;
3769     print-time yes;
3770     print-category yes;
3771 };
3772 </programlisting>
3773
3774           <para>
3775             The <command>syslog</command> destination clause
3776             directs the
3777             channel to the system log.  Its argument is a
3778             syslog facility as described in the <command>syslog</command> man
3779             page. Known facilities are <command>kern</command>, <command>user</command>,
3780             <command>mail</command>, <command>daemon</command>, <command>auth</command>,
3781             <command>syslog</command>, <command>lpr</command>, <command>news</command>,
3782             <command>uucp</command>, <command>cron</command>, <command>authpriv</command>,
3783             <command>ftp</command>, <command>local0</command>, <command>local1</command>,
3784             <command>local2</command>, <command>local3</command>, <command>local4</command>,
3785             <command>local5</command>, <command>local6</command> and
3786             <command>local7</command>, however not all facilities
3787             are supported on
3788             all operating systems.
3789             How <command>syslog</command> will handle messages
3790             sent to
3791             this facility is described in the <command>syslog.conf</command> man
3792             page. If you have a system which uses a very old version of <command>syslog</command> that
3793             only uses two arguments to the <command>openlog()</command> function,
3794             then this clause is silently ignored.
3795           </para>
3796           <para>
3797             On Windows machines syslog messages are directed to the EventViewer.
3798           </para>
3799           <para>
3800             The <command>severity</command> clause works like <command>syslog</command>'s
3801             "priorities", except that they can also be used if you are writing
3802             straight to a file rather than using <command>syslog</command>.
3803             Messages which are not at least of the severity level given will
3804             not be selected for the channel; messages of higher severity
3805             levels
3806             will be accepted.
3807           </para>
3808           <para>
3809             If you are using <command>syslog</command>, then the <command>syslog.conf</command> priorities
3810             will also determine what eventually passes through. For example,
3811             defining a channel facility and severity as <command>daemon</command> and <command>debug</command> but
3812             only logging <command>daemon.warning</command> via <command>syslog.conf</command> will
3813             cause messages of severity <command>info</command> and
3814             <command>notice</command> to
3815             be dropped. If the situation were reversed, with <command>named</command> writing
3816             messages of only <command>warning</command> or higher,
3817             then <command>syslogd</command> would
3818             print all messages it received from the channel.
3819           </para>
3820
3821           <para>
3822             The <command>stderr</command> destination clause
3823             directs the
3824             channel to the server's standard error stream.  This is intended
3825             for
3826             use when the server is running as a foreground process, for
3827             example
3828             when debugging a configuration.
3829           </para>
3830
3831           <para>
3832             The server can supply extensive debugging information when
3833             it is in debugging mode. If the server's global debug level is
3834             greater
3835             than zero, then debugging mode will be active. The global debug
3836             level is set either by starting the <command>named</command> server
3837             with the <option>-d</option> flag followed by a positive integer,
3838             or by running <command>rndc trace</command>.
3839             The global debug level
3840             can be set to zero, and debugging mode turned off, by running <command>rndc
3841 notrace</command>. All debugging messages in the server have a debug
3842             level, and higher debug levels give more detailed output. Channels
3843             that specify a specific debug severity, for example:
3844           </para>
3845
3846 <programlisting>channel specific_debug_level {
3847     file "foo";
3848     severity debug 3;
3849 };
3850 </programlisting>
3851
3852           <para>
3853             will get debugging output of level 3 or less any time the
3854             server is in debugging mode, regardless of the global debugging
3855             level. Channels with <command>dynamic</command>
3856             severity use the
3857             server's global debug level to determine what messages to print.
3858           </para>
3859           <para>
3860             If <command>print-time</command> has been turned on,
3861             then
3862             the date and time will be logged. <command>print-time</command> may
3863             be specified for a <command>syslog</command> channel,
3864             but is usually
3865             pointless since <command>syslog</command> also logs
3866             the date and
3867             time. If <command>print-category</command> is
3868             requested, then the
3869             category of the message will be logged as well. Finally, if <command>print-severity</command> is
3870             on, then the severity level of the message will be logged. The <command>print-</command> options may
3871             be used in any combination, and will always be printed in the
3872             following
3873             order: time, category, severity. Here is an example where all
3874             three <command>print-</command> options
3875             are on:
3876           </para>
3877
3878           <para>
3879             <computeroutput>28-Feb-2000 15:05:32.863 general: notice: running</computeroutput>
3880           </para>
3881
3882           <para>
3883             There are four predefined channels that are used for
3884             <command>named</command>'s default logging as follows.
3885             How they are
3886             used is described in <xref linkend="the_category_phrase"/>.
3887           </para>
3888
3889 <programlisting>channel default_syslog {
3890     // send to syslog's daemon facility
3891     syslog daemon;
3892     // only send priority info and higher
3893     severity info;
3894
3895 channel default_debug {
3896     // write to named.run in the working directory
3897     // Note: stderr is used instead of "named.run" if
3898     // the server is started with the '-f' option.
3899     file "named.run";
3900     // log at the server's current debug level
3901     severity dynamic;
3902 };
3903
3904 channel default_stderr {
3905     // writes to stderr
3906     stderr;
3907     // only send priority info and higher
3908     severity info;
3909 };
3910
3911 channel null {
3912    // toss anything sent to this channel
3913    null;
3914 };
3915 </programlisting>
3916
3917           <para>
3918             The <command>default_debug</command> channel has the
3919             special
3920             property that it only produces output when the server's debug
3921             level is
3922             nonzero.  It normally writes to a file called <filename>named.run</filename>
3923             in the server's working directory.
3924           </para>
3925
3926           <para>
3927             For security reasons, when the "<option>-u</option>"
3928             command line option is used, the <filename>named.run</filename> file
3929             is created only after <command>named</command> has
3930             changed to the
3931             new UID, and any debug output generated while <command>named</command> is
3932             starting up and still running as root is discarded.  If you need
3933             to capture this output, you must run the server with the "<option>-g</option>"
3934             option and redirect standard error to a file.
3935           </para>
3936
3937           <para>
3938             Once a channel is defined, it cannot be redefined. Thus you
3939             cannot alter the built-in channels directly, but you can modify
3940             the default logging by pointing categories at channels you have
3941             defined.
3942           </para>
3943         </sect3>
3944
3945         <sect3 id="the_category_phrase">
3946           <title>The <command>category</command> Phrase</title>
3947
3948           <para>
3949             There are many categories, so you can send the logs you want
3950             to see wherever you want, without seeing logs you don't want. If
3951             you don't specify a list of channels for a category, then log
3952             messages
3953             in that category will be sent to the <command>default</command> category
3954             instead. If you don't specify a default category, the following
3955             "default default" is used:
3956           </para>
3957
3958 <programlisting>category default { default_syslog; default_debug; };
3959 </programlisting>
3960
3961           <para>
3962             As an example, let's say you want to log security events to
3963             a file, but you also want keep the default logging behavior. You'd
3964             specify the following:
3965           </para>
3966
3967 <programlisting>channel my_security_channel {
3968     file "my_security_file";
3969     severity info;
3970 };
3971 category security {
3972     my_security_channel;
3973     default_syslog;
3974     default_debug;
3975 };</programlisting>
3976
3977           <para>
3978             To discard all messages in a category, specify the <command>null</command> channel:
3979           </para>
3980
3981 <programlisting>category xfer-out { null; };
3982 category notify { null; };
3983 </programlisting>
3984
3985           <para>
3986             Following are the available categories and brief descriptions
3987             of the types of log information they contain. More
3988             categories may be added in future <acronym>BIND</acronym> releases.
3989           </para>
3990           <informaltable colsep="0" rowsep="0">
3991             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
3992               <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
3993               <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
3994               <tbody>
3995                 <row rowsep="0">
3996                   <entry colname="1">
3997                     <para><command>default</command></para>
3998                   </entry>
3999                   <entry colname="2">
4000                     <para>
4001                       The default category defines the logging
4002                       options for those categories where no specific
4003                       configuration has been
4004                       defined.
4005                     </para>
4006                   </entry>
4007                 </row>
4008                 <row rowsep="0">
4009                   <entry colname="1">
4010                     <para><command>general</command></para>
4011                   </entry>
4012                   <entry colname="2">
4013                     <para>
4014                       The catch-all. Many things still aren't
4015                       classified into categories, and they all end up here.
4016                     </para>
4017                   </entry>
4018                 </row>
4019                 <row rowsep="0">
4020                   <entry colname="1">
4021                     <para><command>database</command></para>
4022                   </entry>
4023                   <entry colname="2">
4024                     <para>
4025                       Messages relating to the databases used
4026                       internally by the name server to store zone and cache
4027                       data.
4028                     </para>
4029                   </entry>
4030                 </row>
4031                 <row rowsep="0">
4032                   <entry colname="1">
4033                     <para><command>security</command></para>
4034                   </entry>
4035                   <entry colname="2">
4036                     <para>
4037                       Approval and denial of requests.
4038                     </para>
4039                   </entry>
4040                 </row>
4041                 <row rowsep="0">
4042                   <entry colname="1">
4043                     <para><command>config</command></para>
4044                   </entry>
4045                   <entry colname="2">
4046                     <para>
4047                       Configuration file parsing and processing.
4048                     </para>
4049                   </entry>
4050                 </row>
4051                 <row rowsep="0">
4052                   <entry colname="1">
4053                     <para><command>resolver</command></para>
4054                   </entry>
4055                   <entry colname="2">
4056                     <para>
4057                       DNS resolution, such as the recursive
4058                       lookups performed on behalf of clients by a caching name
4059                       server.
4060                     </para>
4061                   </entry>
4062                 </row>
4063                 <row rowsep="0">
4064                   <entry colname="1">
4065                     <para><command>xfer-in</command></para>
4066                   </entry>
4067                   <entry colname="2">
4068                     <para>
4069                       Zone transfers the server is receiving.
4070                     </para>
4071                   </entry>
4072                 </row>
4073                 <row rowsep="0">
4074                   <entry colname="1">
4075                     <para><command>xfer-out</command></para>
4076                   </entry>
4077                   <entry colname="2">
4078                     <para>
4079                       Zone transfers the server is sending.
4080                     </para>
4081                   </entry>
4082                 </row>
4083                 <row rowsep="0">
4084                   <entry colname="1">
4085                     <para><command>notify</command></para>
4086                   </entry>
4087                   <entry colname="2">
4088                     <para>
4089                       The NOTIFY protocol.
4090                     </para>
4091                   </entry>
4092                 </row>
4093                 <row rowsep="0">
4094                   <entry colname="1">
4095                     <para><command>client</command></para>
4096                   </entry>
4097                   <entry colname="2">
4098                     <para>
4099                       Processing of client requests.
4100                     </para>
4101                   </entry>
4102                 </row>
4103                 <row rowsep="0">
4104                   <entry colname="1">
4105                     <para><command>unmatched</command></para>
4106                   </entry>
4107                   <entry colname="2">
4108                     <para>
4109                       Messages that <command>named</command> was unable to determine the
4110                       class of or for which there was no matching <command>view</command>.
4111                       A one line summary is also logged to the <command>client</command> category.
4112                       This category is best sent to a file or stderr, by
4113                       default it is sent to
4114                       the <command>null</command> channel.
4115                     </para>
4116                   </entry>
4117                 </row>
4118                 <row rowsep="0">
4119                   <entry colname="1">
4120                     <para><command>network</command></para>
4121                   </entry>
4122                   <entry colname="2">
4123                     <para>
4124                       Network operations.
4125                     </para>
4126                   </entry>
4127                 </row>
4128                 <row rowsep="0">
4129                   <entry colname="1">
4130                     <para><command>update</command></para>
4131                   </entry>
4132                   <entry colname="2">
4133                     <para>
4134                       Dynamic updates.
4135                     </para>
4136                   </entry>
4137                 </row>
4138                 <row rowsep="0">
4139                   <entry colname="1">
4140                     <para><command>update-security</command></para>
4141                   </entry>
4142                   <entry colname="2">
4143                     <para>
4144                       Approval and denial of update requests.
4145                     </para>
4146                   </entry>
4147                 </row>
4148                 <row rowsep="0">
4149                   <entry colname="1">
4150                     <para><command>queries</command></para>
4151                   </entry>
4152                   <entry colname="2">
4153                     <para>
4154                       Specify where queries should be logged to.
4155                     </para>
4156                     <para>
4157                       At startup, specifying the category <command>queries</command> will also
4158                       enable query logging unless <command>querylog</command> option has been
4159                       specified.
4160                     </para>
4161
4162                     <para>
4163                       The query log entry reports the client's IP
4164                       address and port number, and the query name,
4165                       class and type.  Next it reports whether the
4166                       Recursion Desired flag was set (+ if set, -
4167                       if not set), if the query was signed (S),
4168                       EDNS was in use (E), if TCP was used (T), if
4169                       DO (DNSSEC Ok) was set (D), or if CD (Checking
4170                       Disabled) was set (C).  After this the
4171                       destination address the query was sent to is
4172                       reported.
4173                     </para>
4174
4175                     <para>
4176                       <computeroutput>client 127.0.0.1#62536 (www.example.com): query: www.example.com IN AAAA +SE</computeroutput>
4177                     </para>
4178                     <para>
4179                       <computeroutput>client ::1#62537 (www.example.net): query: www.example.net IN AAAA -SE</computeroutput>
4180                     </para>
4181                     <para>
4182                       (The first part of this log message, showing the
4183                       client address/port number and query name, is
4184                       repeated in all subsequent log messages related
4185                       to the same query.)
4186                     </para>
4187                   </entry>
4188                 </row>
4189                 <row rowsep="0">
4190                   <entry colname="1">
4191                     <para><command>query-errors</command></para>
4192                   </entry>
4193                   <entry colname="2">
4194                     <para>
4195                       Information about queries that resulted in some
4196                       failure.
4197                     </para>
4198                   </entry>
4199                 </row>
4200                 <row rowsep="0">
4201                   <entry colname="1">
4202                     <para><command>dispatch</command></para>
4203                   </entry>
4204                   <entry colname="2">
4205                     <para>
4206                       Dispatching of incoming packets to the
4207                       server modules where they are to be processed.
4208                     </para>
4209                   </entry>
4210                 </row>
4211                 <row rowsep="0">
4212                   <entry colname="1">
4213                     <para><command>dnssec</command></para>
4214                   </entry>
4215                   <entry colname="2">
4216                     <para>
4217                       DNSSEC and TSIG protocol processing.
4218                     </para>
4219                   </entry>
4220                 </row>
4221                 <row rowsep="0">
4222                   <entry colname="1">
4223                     <para><command>lame-servers</command></para>
4224                   </entry>
4225                   <entry colname="2">
4226                     <para>
4227                       Lame servers.  These are misconfigurations
4228                       in remote servers, discovered by BIND 9 when trying to
4229                       query those servers during resolution.
4230                     </para>
4231                   </entry>
4232                 </row>
4233                 <row rowsep="0">
4234                   <entry colname="1">
4235                     <para><command>delegation-only</command></para>
4236                   </entry>
4237                   <entry colname="2">
4238                     <para>
4239                       Delegation only.  Logs queries that have been
4240                       forced to NXDOMAIN as the result of a
4241                       delegation-only zone or a
4242                       <command>delegation-only</command> in a hint
4243                       or stub zone declaration.
4244                     </para>
4245                   </entry>
4246                 </row>
4247                 <row rowsep="0">
4248                   <entry colname="1">
4249                     <para><command>edns-disabled</command></para>
4250                   </entry>
4251                   <entry colname="2">
4252                     <para>
4253                       Log queries that have been forced to use plain
4254                       DNS due to timeouts.  This is often due to
4255                       the remote servers not being RFC 1034 compliant
4256                       (not always returning FORMERR or similar to
4257                       EDNS queries and other extensions to the DNS
4258                       when they are not understood).  In other words, this is
4259                       targeted at servers that fail to respond to
4260                       DNS queries that they don't understand.
4261                     </para>
4262                     <para>
4263                       Note: the log message can also be due to
4264                       packet loss.  Before reporting servers for
4265                       non-RFC 1034 compliance they should be re-tested
4266                       to determine the nature of the non-compliance.
4267                       This testing should prevent or reduce the
4268                       number of false-positive reports.
4269                     </para>
4270                     <para>
4271                       Note: eventually <command>named</command> will have to stop
4272                       treating such timeouts as due to RFC 1034 non
4273                       compliance and start treating it as plain
4274                       packet loss.  Falsely classifying packet
4275                       loss as due to RFC 1034 non compliance impacts
4276                       on DNSSEC validation which requires EDNS for
4277                       the DNSSEC records to be returned.
4278                     </para>
4279                   </entry>
4280                 </row>
4281                 <row rowsep="0">
4282                   <entry colname="1">
4283                     <para><command>RPZ</command></para>
4284                   </entry>
4285                   <entry colname="2">
4286                     <para>
4287                       Information about errors in response policy zone files,
4288                       rewritten responses, and at the highest
4289                       <command>debug</command> levels, mere rewriting
4290                       attempts.
4291                     </para>
4292                   </entry>
4293                 </row>
4294                 <row rowsep="0">
4295                   <entry colname="1">
4296                     <para><command>rate-limit</command></para>
4297                   </entry>
4298                   <entry colname="2">
4299                     <para>
4300                       (Only available when <acronym>BIND</acronym> 9 is
4301                       configured with the <userinput>--enable-rrl</userinput>
4302                       option at compile time.)
4303                     </para>
4304                     <para>
4305                       The start, periodic, and final notices of the
4306                       rate limiting of a stream of responses are logged at
4307                       <command>info</command> severity in this category.
4308                       These messages include a hash value of the domain name
4309                       of the response and the name itself,
4310                       except when there is insufficient memory to record
4311                       the name for the final notice
4312                       The final notice is normally delayed until about one
4313                       minute after rate limit stops.
4314                       A lack of memory can hurry the final notice,
4315                       in which case it starts with an asterisk (*).
4316                       Various internal events are logged at debug 1 level
4317                       and higher.
4318                     </para>
4319                     <para>
4320                       Rate limiting of individual requests
4321                       is logged in the <command>query-errors</command> category.
4322                     </para>
4323                   </entry>
4324                 </row>
4325               </tbody>
4326             </tgroup>
4327           </informaltable>
4328         </sect3>
4329         <sect3>
4330           <title>The <command>query-errors</command> Category</title>
4331           <para>
4332             The <command>query-errors</command> category is
4333             specifically intended for debugging purposes: To identify
4334             why and how specific queries result in responses which
4335             indicate an error.
4336             Messages of this category are therefore only logged
4337             with <command>debug</command> levels.
4338           </para>
4339
4340           <para>
4341             At the debug levels of 1 or higher, each response with the
4342             rcode of SERVFAIL is logged as follows:
4343           </para>
4344           <para>
4345             <computeroutput>client 127.0.0.1#61502: query failed (SERVFAIL) for www.example.com/IN/AAAA at query.c:3880</computeroutput>
4346           </para>
4347           <para>
4348             This means an error resulting in SERVFAIL was
4349             detected at line 3880 of source file
4350             <filename>query.c</filename>.
4351             Log messages of this level will particularly
4352             help identify the cause of SERVFAIL for an
4353             authoritative server.
4354           </para>
4355           <para>
4356             At the debug levels of 2 or higher, detailed context
4357             information of recursive resolutions that resulted in
4358             SERVFAIL is logged.
4359             The log message will look like as follows:
4360           </para>
4361           <para>
4362 <!-- NOTE: newlines and some spaces added so this would fit on page -->
4363             <programlisting>
4364 fetch completed at resolver.c:2970 for www.example.com/A
4365 in 30.000183: timed out/success [domain:example.com,
4366 referral:2,restart:7,qrysent:8,timeout:5,lame:0,neterr:0,
4367 badresp:1,adberr:0,findfail:0,valfail:0]
4368             </programlisting>
4369           </para>
4370           <para>
4371             The first part before the colon shows that a recursive
4372             resolution for AAAA records of www.example.com completed
4373             in 30.000183 seconds and the final result that led to the
4374             SERVFAIL was determined at line 2970 of source file
4375             <filename>resolver.c</filename>.
4376           </para>
4377           <para>
4378             The following part shows the detected final result and the
4379             latest result of DNSSEC validation.
4380             The latter is always success when no validation attempt
4381             is made.
4382             In this example, this query resulted in SERVFAIL probably
4383             because all name servers are down or unreachable, leading
4384             to a timeout in 30 seconds.
4385             DNSSEC validation was probably not attempted.
4386           </para>
4387           <para>
4388             The last part enclosed in square brackets shows statistics
4389             information collected for this particular resolution
4390             attempt.
4391             The <varname>domain</varname> field shows the deepest zone
4392             that the resolver reached;
4393             it is the zone where the error was finally detected.
4394             The meaning of the other fields is summarized in the
4395             following table.
4396           </para>
4397
4398           <informaltable colsep="0" rowsep="0">
4399             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
4400               <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
4401               <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
4402               <tbody>
4403                 <row rowsep="0">
4404                   <entry colname="1">
4405                     <para><varname>referral</varname></para>
4406                   </entry>
4407                   <entry colname="2">
4408                     <para>
4409                       The number of referrals the resolver received
4410                       throughout the resolution process.
4411                       In the above example this is 2, which are most
4412                       likely com and example.com.
4413                     </para>
4414                   </entry>
4415                 </row>
4416                 <row rowsep="0">
4417                   <entry colname="1">
4418                     <para><varname>restart</varname></para>
4419                   </entry>
4420                   <entry colname="2">
4421                     <para>
4422                       The number of cycles that the resolver tried
4423                       remote servers at the <varname>domain</varname>
4424                       zone.
4425                       In each cycle the resolver sends one query
4426                       (possibly resending it, depending on the response)
4427                       to each known name server of
4428                       the <varname>domain</varname> zone.
4429                     </para>
4430                   </entry>
4431                 </row>
4432                 <row rowsep="0">
4433                   <entry colname="1">
4434                     <para><varname>qrysent</varname></para>
4435                   </entry>
4436                   <entry colname="2">
4437                     <para>
4438                       The number of queries the resolver sent at the
4439                       <varname>domain</varname> zone.
4440                     </para>
4441                   </entry>
4442                 </row>
4443                 <row rowsep="0">
4444                   <entry colname="1">
4445                     <para><varname>timeout</varname></para>
4446                   </entry>
4447                   <entry colname="2">
4448                     <para>
4449                       The number of timeouts since the resolver
4450                       received the last response.
4451                     </para>
4452                   </entry>
4453                 </row>
4454                 <row rowsep="0">
4455                   <entry colname="1">
4456                     <para><varname>lame</varname></para>
4457                   </entry>
4458                   <entry colname="2">
4459                     <para>
4460                       The number of lame servers the resolver detected
4461                       at the <varname>domain</varname> zone.
4462                       A server is detected to be lame either by an
4463                       invalid response or as a result of lookup in
4464                       BIND9's address database (ADB), where lame
4465                       servers are cached.
4466                     </para>
4467                   </entry>
4468                 </row>
4469                 <row rowsep="0">
4470                   <entry colname="1">
4471                     <para><varname>neterr</varname></para>
4472                   </entry>
4473                   <entry colname="2">
4474                     <para>
4475                       The number of erroneous results that the
4476                       resolver encountered in sending queries
4477                       at the <varname>domain</varname> zone.
4478                       One common case is the remote server is
4479                       unreachable and the resolver receives an ICMP
4480                       unreachable error message.
4481                     </para>
4482                   </entry>
4483                 </row>
4484                 <row rowsep="0">
4485                   <entry colname="1">
4486                     <para><varname>badresp</varname></para>
4487                   </entry>
4488                   <entry colname="2">
4489                     <para>
4490                       The number of unexpected responses (other than
4491                       <varname>lame</varname>) to queries sent by the
4492                       resolver at the <varname>domain</varname> zone.
4493                     </para>
4494                   </entry>
4495                 </row>
4496                 <row rowsep="0">
4497                   <entry colname="1">
4498                     <para><varname>adberr</varname></para>
4499                   </entry>
4500                   <entry colname="2">
4501                     <para>
4502                       Failures in finding remote server addresses
4503                       of the <varname>domain</varname> zone in the ADB.
4504                       One common case of this is that the remote
4505                       server's name does not have any address records.
4506                     </para>
4507                   </entry>
4508                 </row>
4509                 <row rowsep="0">
4510                   <entry colname="1">
4511                     <para><varname>findfail</varname></para>
4512                   </entry>
4513                   <entry colname="2">
4514                     <para>
4515                       Failures of resolving remote server addresses.
4516                       This is a total number of failures throughout
4517                       the resolution process.
4518                     </para>
4519                   </entry>
4520                 </row>
4521                 <row rowsep="0">
4522                   <entry colname="1">
4523                     <para><varname>valfail</varname></para>
4524                   </entry>
4525                   <entry colname="2">
4526                     <para>
4527                       Failures of DNSSEC validation.
4528                       Validation failures are counted throughout
4529                       the resolution process (not limited to
4530                       the <varname>domain</varname> zone), but should
4531                       only happen in <varname>domain</varname>.
4532                     </para>
4533                   </entry>
4534                 </row>
4535               </tbody>
4536             </tgroup>
4537           </informaltable>
4538           <para>
4539             At the debug levels of 3 or higher, the same messages
4540             as those at the debug 1 level are logged for other errors
4541             than SERVFAIL.
4542             Note that negative responses such as NXDOMAIN are not
4543             regarded as errors here.
4544           </para>
4545           <para>
4546             At the debug levels of 4 or higher, the same messages
4547             as those at the debug 2 level are logged for other errors
4548             than SERVFAIL.
4549             Unlike the above case of level 3, messages are logged for
4550             negative responses.
4551             This is because any unexpected results can be difficult to
4552             debug in the recursion case.
4553           </para>
4554         </sect3>
4555       </sect2>
4556
4557       <sect2>
4558         <title><command>lwres</command> Statement Grammar</title>
4559
4560         <para>
4561            This is the grammar of the <command>lwres</command>
4562           statement in the <filename>named.conf</filename> file:
4563         </para>
4564
4565 <programlisting><command>lwres</command> {
4566     <optional> listen-on { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
4567                 <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
4568     <optional> view <replaceable>view_name</replaceable>; </optional>
4569     <optional> search { <replaceable>domain_name</replaceable> ; <optional> <replaceable>domain_name</replaceable> ; ... </optional> }; </optional>
4570     <optional> ndots <replaceable>number</replaceable>; </optional>
4571 };
4572 </programlisting>
4573
4574       </sect2>
4575       <sect2>
4576         <title><command>lwres</command> Statement Definition and Usage</title>
4577
4578         <para>
4579           The <command>lwres</command> statement configures the
4580           name
4581           server to also act as a lightweight resolver server. (See
4582           <xref linkend="lwresd"/>.)  There may be multiple
4583           <command>lwres</command> statements configuring
4584           lightweight resolver servers with different properties.
4585         </para>
4586
4587         <para>
4588           The <command>listen-on</command> statement specifies a
4589           list of
4590           addresses (and ports) that this instance of a lightweight resolver
4591           daemon
4592           should accept requests on.  If no port is specified, port 921 is
4593           used.
4594           If this statement is omitted, requests will be accepted on
4595           127.0.0.1,
4596           port 921.
4597         </para>
4598
4599         <para>
4600           The <command>view</command> statement binds this
4601           instance of a
4602           lightweight resolver daemon to a view in the DNS namespace, so that
4603           the
4604           response will be constructed in the same manner as a normal DNS
4605           query
4606           matching this view.  If this statement is omitted, the default view
4607           is
4608           used, and if there is no default view, an error is triggered.
4609         </para>
4610
4611         <para>
4612           The <command>search</command> statement is equivalent to
4613           the
4614           <command>search</command> statement in
4615           <filename>/etc/resolv.conf</filename>.  It provides a
4616           list of domains
4617           which are appended to relative names in queries.
4618         </para>
4619
4620         <para>
4621           The <command>ndots</command> statement is equivalent to
4622           the
4623           <command>ndots</command> statement in
4624           <filename>/etc/resolv.conf</filename>.  It indicates the
4625           minimum
4626           number of dots in a relative domain name that should result in an
4627           exact match lookup before search path elements are appended.
4628         </para>
4629       </sect2>
4630       <sect2>
4631         <title><command>masters</command> Statement Grammar</title>
4632
4633 <programlisting>
4634 <command>masters</command> <replaceable>name</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> { ( <replaceable>masters_list</replaceable> | 
4635       <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> };
4636 </programlisting>
4637
4638       </sect2>
4639
4640       <sect2>
4641         <title><command>masters</command> Statement Definition and
4642           Usage</title>
4643         <para><command>masters</command>
4644           lists allow for a common set of masters to be easily used by
4645           multiple stub and slave zones in their <command>masters</command>
4646           or <command>also-notify</command> lists.
4647         </para>
4648       </sect2>
4649
4650       <sect2>
4651         <title><command>options</command> Statement Grammar</title>
4652
4653         <para>
4654           This is the grammar of the <command>options</command>
4655           statement in the <filename>named.conf</filename> file:
4656         </para>
4657
4658 <programlisting><command>options</command> {
4659     <optional> attach-cache <replaceable>cache_name</replaceable>; </optional>
4660     <optional> version <replaceable>version_string</replaceable>; </optional>
4661     <optional> hostname <replaceable>hostname_string</replaceable>; </optional>
4662     <optional> server-id <replaceable>server_id_string</replaceable>; </optional>
4663     <optional> directory <replaceable>path_name</replaceable>; </optional>
4664     <optional> key-directory <replaceable>path_name</replaceable>; </optional>
4665     <optional> managed-keys-directory <replaceable>path_name</replaceable>; </optional>
4666     <optional> named-xfer <replaceable>path_name</replaceable>; </optional>
4667     <optional> tkey-gssapi-keytab <replaceable>path_name</replaceable>; </optional>
4668     <optional> tkey-gssapi-credential <replaceable>principal</replaceable>; </optional>
4669     <optional> tkey-domain <replaceable>domainname</replaceable>; </optional>
4670     <optional> tkey-dhkey <replaceable>key_name</replaceable> <replaceable>key_tag</replaceable>; </optional>
4671     <optional> cache-file <replaceable>path_name</replaceable>; </optional>
4672     <optional> dump-file <replaceable>path_name</replaceable>; </optional>
4673     <optional> bindkeys-file <replaceable>path_name</replaceable>; </optional>
4674     <optional> secroots-file <replaceable>path_name</replaceable>; </optional>
4675     <optional> session-keyfile <replaceable>path_name</replaceable>; </optional>
4676     <optional> session-keyname <replaceable>key_name</replaceable>; </optional>
4677     <optional> session-keyalg <replaceable>algorithm_id</replaceable>; </optional>
4678     <optional> memstatistics <replaceable>yes_or_no</replaceable>; </optional>
4679     <optional> memstatistics-file <replaceable>path_name</replaceable>; </optional>
4680     <optional> pid-file <replaceable>path_name</replaceable>; </optional>
4681     <optional> recursing-file <replaceable>path_name</replaceable>; </optional>
4682     <optional> statistics-file <replaceable>path_name</replaceable>; </optional>
4683     <optional> zone-statistics <replaceable>full</replaceable> | <replaceable>terse</replaceable> | <replaceable>none</replaceable>; </optional>
4684     <optional> auth-nxdomain <replaceable>yes_or_no</replaceable>; </optional>
4685     <optional> deallocate-on-exit <replaceable>yes_or_no</replaceable>; </optional>
4686     <optional> dialup <replaceable>dialup_option</replaceable>; </optional>
4687     <optional> fake-iquery <replaceable>yes_or_no</replaceable>; </optional>
4688     <optional> fetch-glue <replaceable>yes_or_no</replaceable>; </optional>
4689     <optional> flush-zones-on-shutdown <replaceable>yes_or_no</replaceable>; </optional>
4690     <optional> has-old-clients <replaceable>yes_or_no</replaceable>; </optional>
4691     <optional> host-statistics <replaceable>yes_or_no</replaceable>; </optional>
4692     <optional> host-statistics-max <replaceable>number</replaceable>; </optional>
4693     <optional> minimal-responses <replaceable>yes_or_no</replaceable>; </optional>
4694     <optional> multiple-cnames <replaceable>yes_or_no</replaceable>; </optional>
4695     <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable>; </optional>
4696     <optional> recursion <replaceable>yes_or_no</replaceable>; </optional>
4697     <optional> request-nsid <replaceable>yes_or_no</replaceable>; </optional>
4698     <optional> rfc2308-type1 <replaceable>yes_or_no</replaceable>; </optional>
4699     <optional> use-id-pool <replaceable>yes_or_no</replaceable>; </optional>
4700     <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable>; </optional>
4701     <optional> ixfr-from-differences (<replaceable>yes_or_no</replaceable> | <constant>master</constant> | <constant>slave</constant>); </optional>
4702     <optional> dnssec-enable <replaceable>yes_or_no</replaceable>; </optional>
4703     <optional> dnssec-validation (<replaceable>yes_or_no</replaceable> | <constant>auto</constant>); </optional>
4704     <optional> dnssec-lookaside ( <replaceable>auto</replaceable> |
4705                         <replaceable>no</replaceable> |
4706                         <replaceable>domain</replaceable> trust-anchor <replaceable>domain</replaceable> ); </optional>
4707     <optional> dnssec-must-be-secure <replaceable>domain yes_or_no</replaceable>; </optional>
4708     <optional> dnssec-accept-expired <replaceable>yes_or_no</replaceable>; </optional>
4709     <optional> forward ( <replaceable>only</replaceable> | <replaceable>first</replaceable> ); </optional>
4710     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
4711     <optional> dual-stack-servers <optional>port <replaceable>ip_port</replaceable></optional> {
4712         ( <replaceable>domain_name</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> |
4713           <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ) ; 
4714         ... }; </optional>
4715     <optional> check-names ( <replaceable>master</replaceable> | <replaceable>slave</replaceable> | <replaceable>response</replaceable> )
4716         ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
4717     <optional> check-dup-records ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
4718     <optional> check-mx ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
4719     <optional> check-wildcard <replaceable>yes_or_no</replaceable>; </optional>
4720     <optional> check-integrity <replaceable>yes_or_no</replaceable>; </optional>
4721     <optional> check-mx-cname ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
4722     <optional> check-srv-cname ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
4723     <optional> check-sibling <replaceable>yes_or_no</replaceable>; </optional>
4724     <optional> check-spf ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
4725     <optional> allow-new-zones { <replaceable>yes_or_no</replaceable> }; </optional>
4726     <optional> allow-notify { <replaceable>address_match_list</replaceable> }; </optional>
4727     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
4728     <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
4729     <optional> allow-query-cache { <replaceable>address_match_list</replaceable> }; </optional>
4730     <optional> allow-query-cache-on { <replaceable>address_match_list</replaceable> }; </optional>
4731     <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
4732     <optional> allow-recursion { <replaceable>address_match_list</replaceable> }; </optional>
4733     <optional> allow-recursion-on { <replaceable>address_match_list</replaceable> }; </optional>
4734     <optional> allow-update { <replaceable>address_match_list</replaceable> }; </optional>
4735     <optional> allow-update-forwarding { <replaceable>address_match_list</replaceable> }; </optional>
4736     <optional> update-check-ksk <replaceable>yes_or_no</replaceable>; </optional>
4737     <optional> dnssec-update-mode ( <replaceable>maintain</replaceable> | <replaceable>no-resign</replaceable> ); </optional>
4738     <optional> dnssec-dnskey-kskonly <replaceable>yes_or_no</replaceable>; </optional>
4739     <optional> dnssec-loadkeys-interval <replaceable>number</replaceable>; </optional>
4740     <optional> dnssec-secure-to-insecure <replaceable>yes_or_no</replaceable> ;</optional>
4741     <optional> try-tcp-refresh <replaceable>yes_or_no</replaceable>; </optional>
4742     <optional> allow-v6-synthesis { <replaceable>address_match_list</replaceable> }; </optional>
4743     <optional> blackhole { <replaceable>address_match_list</replaceable> }; </optional>
4744     <optional> use-v4-udp-ports { <replaceable>port_list</replaceable> }; </optional>
4745     <optional> avoid-v4-udp-ports { <replaceable>port_list</replaceable> }; </optional>
4746     <optional> use-v6-udp-ports { <replaceable>port_list</replaceable> }; </optional>
4747     <optional> avoid-v6-udp-ports { <replaceable>port_list</replaceable> }; </optional>
4748     <optional> listen-on <optional> port <replaceable>ip_port</replaceable> </optional> { <replaceable>address_match_list</replaceable> }; </optional>
4749     <optional> listen-on-v6 <optional> port <replaceable>ip_port</replaceable> </optional> { <replaceable>address_match_list</replaceable> }; </optional>
4750     <optional> query-source ( ( <replaceable>ip4_addr</replaceable> | <replaceable>*</replaceable> )
4751         <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> |
4752         <optional> address ( <replaceable>ip4_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
4753         <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> ) ; </optional>
4754     <optional> query-source-v6 ( ( <replaceable>ip6_addr</replaceable> | <replaceable>*</replaceable> )
4755         <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> | 
4756         <optional> address ( <replaceable>ip6_addr</replaceable> | <replaceable>*</replaceable> ) </optional> 
4757         <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> ) ; </optional>
4758     <optional> use-queryport-pool <replaceable>yes_or_no</replaceable>; </optional>
4759     <optional> queryport-pool-ports <replaceable>number</replaceable>; </optional>
4760     <optional> queryport-pool-updateinterval <replaceable>number</replaceable>; </optional>
4761     <optional> max-transfer-time-in <replaceable>number</replaceable>; </optional>
4762     <optional> max-transfer-time-out <replaceable>number</replaceable>; </optional>
4763     <optional> max-transfer-idle-in <replaceable>number</replaceable>; </optional>
4764     <optional> max-transfer-idle-out <replaceable>number</replaceable>; </optional>
4765     <optional> tcp-clients <replaceable>number</replaceable>; </optional>
4766     <optional> reserved-sockets <replaceable>number</replaceable>; </optional>
4767     <optional> recursive-clients <replaceable>number</replaceable>; </optional>
4768     <optional> serial-query-rate <replaceable>number</replaceable>; </optional>
4769     <optional> serial-queries <replaceable>number</replaceable>; </optional>
4770     <optional> tcp-listen-queue <replaceable>number</replaceable>; </optional>
4771     <optional> transfer-format <replaceable>( one-answer | many-answers )</replaceable>; </optional>
4772     <optional> transfers-in  <replaceable>number</replaceable>; </optional>
4773     <optional> transfers-out <replaceable>number</replaceable>; </optional>
4774     <optional> transfers-per-ns <replaceable>number</replaceable>; </optional>
4775     <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
4776     <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
4777     <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
4778     <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
4779                              <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
4780     <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
4781     <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
4782     <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
4783     <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
4784     <optional> notify-to-soa <replaceable>yes_or_no</replaceable> ; </optional>
4785     <optional> also-notify { <replaceable>ip_addr</replaceable>
4786                     <optional>port <replaceable>ip_port</replaceable></optional> <optional>key <replaceable>keyname</replaceable></optional> ;
4787                     <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>key <replaceable>keyname</replaceable></optional> ; ... </optional> }; </optional>
4788     <optional> max-ixfr-log-size <replaceable>number</replaceable>; </optional>
4789     <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
4790     <optional> coresize <replaceable>size_spec</replaceable> ; </optional>
4791     <optional> datasize <replaceable>size_spec</replaceable> ; </optional>
4792     <optional> files <replaceable>size_spec</replaceable> ; </optional>
4793     <optional> stacksize <replaceable>size_spec</replaceable> ; </optional>
4794     <optional> cleaning-interval <replaceable>number</replaceable>; </optional>
4795     <optional> heartbeat-interval <replaceable>number</replaceable>; </optional>
4796     <optional> interface-interval <replaceable>number</replaceable>; </optional>
4797     <optional> statistics-interval <replaceable>number</replaceable>; </optional>
4798     <optional> topology { <replaceable>address_match_list</replaceable> }</optional>;
4799     <optional> sortlist { <replaceable>address_match_list</replaceable> }</optional>;
4800     <optional> rrset-order { <replaceable>order_spec</replaceable> ; <optional> <replaceable>order_spec</replaceable> ; ... </optional> </optional> };
4801     <optional> lame-ttl <replaceable>number</replaceable>; </optional>
4802     <optional> max-ncache-ttl <replaceable>number</replaceable>; </optional>
4803     <optional> max-cache-ttl <replaceable>number</replaceable>; </optional>
4804     <optional> sig-validity-interval <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
4805     <optional> sig-signing-nodes <replaceable>number</replaceable> ; </optional>
4806     <optional> sig-signing-signatures <replaceable>number</replaceable> ; </optional>
4807     <optional> sig-signing-type <replaceable>number</replaceable> ; </optional>
4808     <optional> min-roots <replaceable>number</replaceable>; </optional>
4809     <optional> use-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
4810     <optional> provide-ixfr <replaceable>yes_or_no</replaceable>; </optional>
4811     <optional> request-ixfr <replaceable>yes_or_no</replaceable>; </optional>
4812     <optional> treat-cr-as-space <replaceable>yes_or_no</replaceable> ; </optional>
4813     <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
4814     <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
4815     <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
4816     <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
4817     <optional> port <replaceable>ip_port</replaceable>; </optional>
4818     <optional> additional-from-auth <replaceable>yes_or_no</replaceable> ; </optional>
4819     <optional> additional-from-cache <replaceable>yes_or_no</replaceable> ; </optional>
4820     <optional> random-device <replaceable>path_name</replaceable> ; </optional>
4821     <optional> max-cache-size <replaceable>size_spec</replaceable> ; </optional>
4822     <optional> match-mapped-addresses <replaceable>yes_or_no</replaceable>; </optional>
4823     <optional> filter-aaaa-on-v4 ( <replaceable>yes_or_no</replaceable> | <replaceable>break-dnssec</replaceable> ); </optional>
4824     <optional> filter-aaaa { <replaceable>address_match_list</replaceable> }; </optional>
4825     <optional> dns64 <replaceable>ipv6-prefix</replaceable> {
4826         <optional> clients { <replaceable>address_match_list</replaceable> }; </optional>
4827         <optional> mapped { <replaceable>address_match_list</replaceable> }; </optional>
4828         <optional> exclude { <replaceable>address_match_list</replaceable> }; </optional>
4829         <optional> suffix IPv6-address; </optional>
4830         <optional> recursive-only <replaceable>yes_or_no</replaceable>; </optional>
4831         <optional> break-dnssec <replaceable>yes_or_no</replaceable>; </optional>
4832     }; </optional>;
4833     <optional> dns64-server <replaceable>name</replaceable> </optional>
4834     <optional> dns64-contact <replaceable>name</replaceable> </optional>
4835     <optional> preferred-glue ( <replaceable>A</replaceable> | <replaceable>AAAA</replaceable> | <replaceable>NONE</replaceable> ); </optional>
4836     <optional> edns-udp-size <replaceable>number</replaceable>; </optional>
4837     <optional> max-udp-size <replaceable>number</replaceable>; </optional>
4838     <optional> max-rsa-exponent-size <replaceable>number</replaceable>; </optional>
4839     <optional> root-delegation-only <optional> exclude { <replaceable>namelist</replaceable> } </optional> ; </optional>
4840     <optional> querylog <replaceable>yes_or_no</replaceable> ; </optional>
4841     <optional> disable-algorithms <replaceable>domain</replaceable> { <replaceable>algorithm</replaceable>;
4842                                 <optional> <replaceable>algorithm</replaceable>; </optional> }; </optional>
4843     <optional> acache-enable <replaceable>yes_or_no</replaceable> ; </optional>
4844     <optional> acache-cleaning-interval <replaceable>number</replaceable>; </optional>
4845     <optional> max-acache-size <replaceable>size_spec</replaceable> ; </optional>
4846     <optional> clients-per-query <replaceable>number</replaceable> ; </optional>
4847     <optional> max-clients-per-query <replaceable>number</replaceable> ; </optional>
4848     <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
4849     <optional> empty-server <replaceable>name</replaceable> ; </optional>
4850     <optional> empty-contact <replaceable>name</replaceable> ; </optional>
4851     <optional> empty-zones-enable <replaceable>yes_or_no</replaceable> ; </optional>
4852     <optional> disable-empty-zone <replaceable>zone_name</replaceable> ; </optional>
4853     <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
4854     <optional> zero-no-soa-ttl-cache <replaceable>yes_or_no</replaceable> ; </optional>
4855     <optional> resolver-query-timeout <replaceable>number</replaceable> ; </optional>
4856     <optional> deny-answer-addresses { <replaceable>address_match_list</replaceable> } <optional> except-from { <replaceable>namelist</replaceable> } </optional>;</optional>
4857     <optional> deny-answer-aliases { <replaceable>namelist</replaceable> } <optional> except-from { <replaceable>namelist</replaceable> } </optional>;</optional>
4858     <optional> rate-limit {
4859         <optional> responses-per-second <replaceable>number</replaceable> ; </optional>
4860         <optional> referrals-per-second <replaceable>number</replaceable> ; </optional>
4861         <optional> nodata-per-second <replaceable>number</replaceable> ; </optional>
4862         <optional> nxdomains-per-second <replaceable>number</replaceable> ; </optional>
4863         <optional> errors-per-second <replaceable>number</replaceable> ; </optional>
4864         <optional> all-per-second <replaceable>number</replaceable> ; </optional>
4865         <optional> window <replaceable>number</replaceable> ; </optional>
4866         <optional> log-only <replaceable>yes_or_no</replaceable> ; </optional>
4867         <optional> qps-scale <replaceable>number</replaceable> ; </optional>
4868         <optional> ipv4-prefix-length <replaceable>number</replaceable> ; </optional>
4869         <optional> ipv6-prefix-length <replaceable>number</replaceable> ; </optional>
4870         <optional> slip <replaceable>number</replaceable> ; </optional>
4871         <optional> exempt-clients  { <replaceable>address_match_list</replaceable> } ; </optional>
4872         <optional> max-table-size <replaceable>number</replaceable> ; </optional>
4873         <optional> min-table-size <replaceable>number</replaceable> ; </optional>
4874       } ; </optional>
4875     <optional> response-policy { <replaceable>zone_name</replaceable>
4876         <optional> policy given | disabled | passthru | nxdomain | nodata | cname <replaceable>domain</replaceable> </optional>
4877         <optional> recursive-only <replaceable>yes_or_no</replaceable> </optional> <optional> max-policy-ttl <replaceable>number</replaceable> </optional> ;
4878     } <optional> recursive-only <replaceable>yes_or_no</replaceable> </optional> <optional> max-policy-ttl <replaceable>number</replaceable> </optional>
4879         <optional> break-dnssec <replaceable>yes_or_no</replaceable> </optional> <optional> min-ns-dots <replaceable>number</replaceable> </optional> ; </optional>
4880 };
4881 </programlisting>
4882
4883       </sect2>
4884
4885       <sect2 id="options">
4886         <title><command>options</command> Statement Definition and
4887           Usage</title>
4888
4889         <para>
4890           The <command>options</command> statement sets up global
4891           options
4892           to be used by <acronym>BIND</acronym>. This statement
4893           may appear only
4894           once in a configuration file. If there is no <command>options</command>
4895           statement, an options block with each option set to its default will
4896           be used.
4897         </para>
4898
4899         <variablelist>
4900
4901             <varlistentry>
4902               <term><command>attach-cache</command></term>
4903               <listitem>
4904                 <para>
4905                   Allows multiple views to share a single cache
4906                   database.
4907                   Each view has its own cache database by default, but
4908                   if multiple views have the same operational policy
4909                   for name resolution and caching, those views can
4910                   share a single cache to save memory and possibly
4911                   improve resolution efficiency by using this option.
4912                 </para>
4913
4914                 <para>
4915                   The <command>attach-cache</command> option
4916                   may also be specified in <command>view</command>
4917                   statements, in which case it overrides the
4918                   global <command>attach-cache</command> option.
4919                 </para>
4920
4921                 <para>
4922                   The <replaceable>cache_name</replaceable> specifies
4923                   the cache to be shared.
4924                   When the <command>named</command> server configures
4925                   views which are supposed to share a cache, it
4926                   creates a cache with the specified name for the
4927                   first view of these sharing views.
4928                   The rest of the views will simply refer to the
4929                   already created cache.
4930                 </para>
4931
4932                 <para>
4933                   One common configuration to share a cache would be to
4934                   allow all views to share a single cache.
4935                   This can be done by specifying
4936                   the <command>attach-cache</command> as a global
4937                   option with an arbitrary name.
4938                 </para>
4939
4940                 <para>
4941                   Another possible operation is to allow a subset of
4942                   all views to share a cache while the others to
4943                   retain their own caches.
4944                   For example, if there are three views A, B, and C,
4945                   and only A and B should share a cache, specify the
4946                   <command>attach-cache</command> option as a view A (or
4947                   B)'s option, referring to the other view name:
4948                 </para>
4949
4950 <programlisting>
4951   view "A" {
4952     // this view has its own cache
4953     ...
4954   };
4955   view "B" {
4956     // this view refers to A's cache
4957     attach-cache "A";
4958   };
4959   view "C" {
4960     // this view has its own cache
4961     ...
4962   };
4963 </programlisting>
4964
4965                 <para>
4966                   Views that share a cache must have the same policy
4967                   on configurable parameters that may affect caching.
4968                   The current implementation requires the following
4969                   configurable options be consistent among these
4970                   views:
4971                   <command>check-names</command>,
4972                   <command>cleaning-interval</command>,
4973                   <command>dnssec-accept-expired</command>,
4974                   <command>dnssec-validation</command>,
4975                   <command>max-cache-ttl</command>,
4976                   <command>max-ncache-ttl</command>,
4977                   <command>max-cache-size</command>, and
4978                   <command>zero-no-soa-ttl</command>.
4979                 </para>
4980
4981                 <para>
4982                   Note that there may be other parameters that may
4983                   cause confusion if they are inconsistent for
4984                   different views that share a single cache.
4985                   For example, if these views define different sets of
4986                   forwarders that can return different answers for the
4987                   same question, sharing the answer does not make
4988                   sense or could even be harmful.
4989                   It is administrator's responsibility to ensure
4990                   configuration differences in different views do
4991                   not cause disruption with a shared cache.
4992                 </para>
4993               </listitem>
4994
4995             </varlistentry>
4996
4997           <varlistentry>
4998             <term><command>directory</command></term>
4999             <listitem>
5000               <para>
5001                 The working directory of the server.
5002                 Any non-absolute pathnames in the configuration file will be
5003                 taken
5004                 as relative to this directory. The default location for most
5005                 server
5006                 output files (e.g. <filename>named.run</filename>)
5007                 is this directory.
5008                 If a directory is not specified, the working directory
5009                 defaults to `<filename>.</filename>', the directory from
5010                 which the server
5011                 was started. The directory specified should be an absolute
5012                 path.
5013               </para>
5014             </listitem>
5015           </varlistentry>
5016
5017           <varlistentry>
5018             <term><command>key-directory</command></term>
5019             <listitem>
5020               <para>
5021                 When performing dynamic update of secure zones, the
5022                 directory where the public and private DNSSEC key files
5023                 should be found, if different than the current working
5024                 directory.  (Note that this option has no effect on the
5025                 paths for files containing non-DNSSEC keys such as
5026                 <filename>bind.keys</filename>,
5027                 <filename>rndc.key</filename> or
5028                 <filename>session.key</filename>.)
5029               </para>
5030             </listitem>
5031           </varlistentry>
5032
5033           <varlistentry>
5034             <term><command>managed-keys-directory</command></term>
5035             <listitem>
5036               <para>
5037                 Specifies the directory in which to store the files that
5038                 track managed DNSSEC keys.  By default, this is the working
5039                 directory.
5040               </para>
5041               <para>
5042                 If <command>named</command> is not configured to use views,
5043                 then managed keys for the server will be tracked in a single
5044                 file called <filename>managed-keys.bind</filename>.
5045                 Otherwise, managed keys will be tracked in separate files,
5046                 one file per view; each file name will be the SHA256 hash
5047                 of the view name, followed by the extension
5048                 <filename>.mkeys</filename>.
5049               </para>
5050             </listitem>
5051           </varlistentry>
5052
5053           <varlistentry>
5054             <term><command>named-xfer</command></term>
5055             <listitem>
5056               <para>
5057                 <emphasis>This option is obsolete.</emphasis> It
5058                 was used in <acronym>BIND</acronym> 8 to specify
5059                 the pathname to the <command>named-xfer</command>
5060                 program.  In <acronym>BIND</acronym> 9, no separate
5061                 <command>named-xfer</command> program is needed;
5062                 its functionality is built into the name server.
5063               </para>
5064             </listitem>
5065           </varlistentry>
5066
5067           <varlistentry>
5068             <term><command>tkey-gssapi-keytab</command></term>
5069             <listitem>
5070               <para>
5071                 The KRB5 keytab file to use for GSS-TSIG updates. If
5072                 this option is set and tkey-gssapi-credential is not
5073                 set, then updates will be allowed with any key
5074                 matching a principal in the specified keytab.
5075               </para>
5076             </listitem>
5077           </varlistentry>
5078
5079           <varlistentry>
5080             <term><command>tkey-gssapi-credential</command></term>
5081             <listitem>
5082               <para>
5083                 The security credential with which the server should
5084                 authenticate keys requested by the GSS-TSIG protocol.
5085                 Currently only Kerberos 5 authentication is available
5086                 and the credential is a Kerberos principal which the
5087                 server can acquire through the default system key
5088                 file, normally <filename>/etc/krb5.keytab</filename>.
5089                 The location keytab file can be overridden using the
5090                 tkey-gssapi-keytab option. Normally this principal is
5091                 of the form "<userinput>DNS/</userinput><varname>server.domain</varname>".
5092                 To use GSS-TSIG, <command>tkey-domain</command> must
5093                 also be set if a specific keytab is not set with
5094                 tkey-gssapi-keytab.
5095               </para>
5096             </listitem>
5097           </varlistentry>
5098
5099           <varlistentry>
5100             <term><command>tkey-domain</command></term>
5101             <listitem>
5102               <para>
5103                 The domain appended to the names of all shared keys
5104                 generated with <command>TKEY</command>.  When a
5105                 client requests a <command>TKEY</command> exchange,
5106                 it may or may not specify the desired name for the
5107                 key. If present, the name of the shared key will
5108                 be <varname>client specified part</varname> +
5109                 <varname>tkey-domain</varname>.  Otherwise, the
5110                 name of the shared key will be <varname>random hex
5111                 digits</varname> + <varname>tkey-domain</varname>.
5112                 In most cases, the <command>domainname</command>
5113                 should be the server's domain name, or an otherwise
5114                 non-existent subdomain like
5115                 "_tkey.<varname>domainname</varname>".  If you are
5116                 using GSS-TSIG, this variable must be defined, unless
5117                 you specify a specific keytab using tkey-gssapi-keytab.
5118               </para>
5119             </listitem>
5120           </varlistentry>
5121
5122           <varlistentry>
5123             <term><command>tkey-dhkey</command></term>
5124             <listitem>
5125               <para>
5126                 The Diffie-Hellman key used by the server
5127                 to generate shared keys with clients using the Diffie-Hellman
5128                 mode
5129                 of <command>TKEY</command>. The server must be
5130                 able to load the
5131                 public and private keys from files in the working directory.
5132                 In
5133                 most cases, the keyname should be the server's host name.
5134               </para>
5135             </listitem>
5136           </varlistentry>
5137
5138           <varlistentry>
5139             <term><command>cache-file</command></term>
5140             <listitem>
5141               <para>
5142                 This is for testing only.  Do not use.
5143               </para>
5144             </listitem>
5145           </varlistentry>
5146
5147           <varlistentry>
5148             <term><command>dump-file</command></term>
5149             <listitem>
5150               <para>
5151                 The pathname of the file the server dumps
5152                 the database to when instructed to do so with
5153                 <command>rndc dumpdb</command>.
5154                 If not specified, the default is <filename>named_dump.db</filename>.
5155               </para>
5156             </listitem>
5157           </varlistentry>
5158
5159           <varlistentry>
5160             <term><command>memstatistics-file</command></term>
5161             <listitem>
5162               <para>
5163                 The pathname of the file the server writes memory
5164                 usage statistics to on exit. If not specified,
5165                 the default is <filename>named.memstats</filename>.
5166               </para>
5167             </listitem>
5168           </varlistentry>
5169
5170           <varlistentry>
5171             <term><command>pid-file</command></term>
5172             <listitem>
5173               <para>
5174                 The pathname of the file the server writes its process ID
5175                 in. If not specified, the default is
5176                 <filename>/var/run/named/named.pid</filename>.
5177                 The PID file is used by programs that want to send signals to
5178                 the running
5179                 name server. Specifying <command>pid-file none</command> disables the
5180                 use of a PID file &mdash; no file will be written and any
5181                 existing one will be removed.  Note that <command>none</command>
5182                 is a keyword, not a filename, and therefore is not enclosed
5183                 in
5184                 double quotes.
5185               </para>
5186             </listitem>
5187           </varlistentry>
5188
5189           <varlistentry>
5190             <term><command>recursing-file</command></term>
5191             <listitem>
5192               <para>
5193                 The pathname of the file the server dumps
5194                 the queries that are currently recursing when instructed
5195                 to do so with <command>rndc recursing</command>.
5196                 If not specified, the default is <filename>named.recursing</filename>.
5197               </para>
5198             </listitem>
5199           </varlistentry>
5200
5201           <varlistentry>
5202             <term><command>statistics-file</command></term>
5203             <listitem>
5204               <para>
5205                 The pathname of the file the server appends statistics
5206                 to when instructed to do so using <command>rndc stats</command>.
5207                 If not specified, the default is <filename>named.stats</filename> in the
5208                 server's current directory.  The format of the file is
5209                 described
5210                 in <xref linkend="statsfile"/>.
5211               </para>
5212             </listitem>
5213           </varlistentry>
5214
5215           <varlistentry>
5216             <term><command>bindkeys-file</command></term>
5217             <listitem>
5218               <para>
5219                 The pathname of a file to override the built-in trusted
5220                 keys provided by <command>named</command>.
5221                 See the discussion of <command>dnssec-lookaside</command>
5222                 and <command>dnssec-validation</command> for details. 
5223                 If not specified, the default is
5224                 <filename>/etc/bind.keys</filename>.
5225               </para>
5226             </listitem>
5227           </varlistentry>
5228
5229           <varlistentry>
5230             <term><command>secroots-file</command></term>
5231             <listitem>
5232               <para>
5233                 The pathname of the file the server dumps
5234                 security roots to when instructed to do so with
5235                 <command>rndc secroots</command>.
5236                 If not specified, the default is
5237                 <filename>named.secroots</filename>.
5238               </para>
5239             </listitem>
5240           </varlistentry>
5241
5242           <varlistentry>
5243             <term><command>session-keyfile</command></term>
5244             <listitem>
5245               <para>
5246                 The pathname of the file into which to write a TSIG
5247                 session key generated by <command>named</command> for use by
5248                 <command>nsupdate -l</command>.  If not specified, the
5249                 default is <filename>/var/run/named/session.key</filename>.
5250                 (See <xref linkend="dynamic_update_policies"/>, and in
5251                 particular the discussion of the
5252                 <command>update-policy</command> statement's
5253                 <userinput>local</userinput> option for more
5254                 information about this feature.)
5255               </para>
5256             </listitem>
5257           </varlistentry>
5258
5259           <varlistentry>
5260             <term><command>session-keyname</command></term>
5261             <listitem>
5262               <para>
5263                 The key name to use for the TSIG session key.
5264                 If not specified, the default is "local-ddns".
5265               </para>
5266             </listitem>
5267           </varlistentry>
5268
5269           <varlistentry>
5270             <term><command>session-keyalg</command></term>
5271             <listitem>
5272               <para>
5273                 The algorithm to use for the TSIG session key.
5274                 Valid values are hmac-sha1, hmac-sha224, hmac-sha256,
5275                 hmac-sha384, hmac-sha512 and hmac-md5.  If not
5276                 specified, the default is hmac-sha256.
5277               </para>
5278             </listitem>
5279           </varlistentry>
5280
5281           <varlistentry>
5282             <term><command>port</command></term>
5283             <listitem>
5284               <para>
5285                 The UDP/TCP port number the server uses for
5286                 receiving and sending DNS protocol traffic.
5287                 The default is 53.  This option is mainly intended for server
5288                 testing;
5289                 a server using a port other than 53 will not be able to
5290                 communicate with
5291                 the global DNS.
5292               </para>
5293             </listitem>
5294           </varlistentry>
5295
5296           <varlistentry>
5297             <term><command>random-device</command></term>
5298             <listitem>
5299               <para>
5300                 The source of entropy to be used by the server.  Entropy is
5301                 primarily needed
5302                 for DNSSEC operations, such as TKEY transactions and dynamic
5303                 update of signed
5304                 zones.  This options specifies the device (or file) from which
5305                 to read
5306                 entropy.  If this is a file, operations requiring entropy will
5307                 fail when the
5308                 file has been exhausted.  If not specified, the default value
5309                 is
5310                 <filename>/dev/random</filename>
5311                 (or equivalent) when present, and none otherwise.  The
5312                 <command>random-device</command> option takes
5313                 effect during
5314                 the initial configuration load at server startup time and
5315                 is ignored on subsequent reloads.
5316               </para>
5317             </listitem>
5318           </varlistentry>
5319
5320           <varlistentry>
5321             <term><command>preferred-glue</command></term>
5322             <listitem>
5323               <para>
5324                 If specified, the listed type (A or AAAA) will be emitted
5325                 before other glue
5326                 in the additional section of a query response.
5327                 The default is not to prefer any type (NONE).
5328               </para>
5329             </listitem>
5330           </varlistentry>
5331
5332           <varlistentry id="root_delegation_only">
5333             <term><command>root-delegation-only</command></term>
5334             <listitem>
5335               <para>
5336                 Turn on enforcement of delegation-only in TLDs
5337                 (top level domains) and root zones with an optional
5338                 exclude list.
5339               </para>
5340               <para>
5341                 DS queries are expected to be made to and be answered by
5342                 delegation only zones.  Such queries and responses are
5343                 treated as an exception to delegation-only processing
5344                 and are not converted to NXDOMAIN responses provided
5345                 a CNAME is not discovered at the query name.
5346               </para>
5347               <para>
5348                 If a delegation only zone server also serves a child
5349                 zone it is not always possible to determine whether
5350                 an answer comes from the delegation only zone or the
5351                 child zone.  SOA NS and DNSKEY records are apex
5352                 only records and a matching response that contains
5353                 these records or DS is treated as coming from a
5354                 child zone.  RRSIG records are also examined to see
5355                 if they are signed by a child zone or not.  The
5356                 authority section is also examined to see if there
5357                 is evidence that the answer is from the child zone.
5358                 Answers that are determined to be from a child zone
5359                 are not converted to NXDOMAIN responses.  Despite
5360                 all these checks there is still a possibility of
5361                 false negatives when a child zone is being served.
5362               </para>
5363               <para>
5364                 Similarly false positives can arise from empty nodes
5365                 (no records at the name) in the delegation only zone
5366                 when the query type is not ANY.
5367               </para>
5368               <para>
5369                 Note some TLDs are not delegation only (e.g. "DE", "LV",
5370                 "US" and "MUSEUM").  This list is not exhaustive.
5371               </para>
5372
5373 <programlisting>
5374 options {
5375         root-delegation-only exclude { "de"; "lv"; "us"; "museum"; };
5376 };
5377 </programlisting>
5378
5379             </listitem>
5380           </varlistentry>
5381
5382           <varlistentry>
5383             <term><command>disable-algorithms</command></term>
5384             <listitem>
5385               <para>
5386                 Disable the specified DNSSEC algorithms at and below the
5387                 specified name.
5388                 Multiple <command>disable-algorithms</command>
5389                 statements are allowed.
5390                 Only the most specific will be applied.
5391               </para>
5392             </listitem>
5393           </varlistentry>
5394
5395           <varlistentry>
5396             <term><command>dnssec-lookaside</command></term>
5397             <listitem>
5398               <para>
5399                 When set, <command>dnssec-lookaside</command> provides the
5400                 validator with an alternate method to validate DNSKEY
5401                 records at the top of a zone.  When a DNSKEY is at or
5402                 below a domain specified by the deepest
5403                 <command>dnssec-lookaside</command>, and the normal DNSSEC
5404                 validation has left the key untrusted, the trust-anchor
5405                 will be appended to the key name and a DLV record will be
5406                 looked up to see if it can validate the key.  If the DLV
5407                 record validates a DNSKEY (similarly to the way a DS
5408                 record does) the DNSKEY RRset is deemed to be trusted.
5409               </para>
5410               <para>
5411                 If <command>dnssec-lookaside</command> is set to
5412                 <userinput>auto</userinput>, then built-in default
5413                 values for the DLV domain and trust anchor will be
5414                 used, along with a built-in key for validation.
5415               </para>
5416               <para>
5417                 If <command>dnssec-lookaside</command> is set to
5418                 <userinput>no</userinput>, then dnssec-lookaside
5419                 is not used.
5420               </para>
5421               <para>
5422                 The default DLV key is stored in the file
5423                 <filename>bind.keys</filename>;
5424                 <command>named</command> will load that key at
5425                 startup if <command>dnssec-lookaside</command> is set to
5426                 <constant>auto</constant>.  A copy of the file is
5427                 installed along with <acronym>BIND</acronym> 9, and is
5428                 current as of the release date.  If the DLV key expires, a
5429                 new copy of <filename>bind.keys</filename> can be downloaded
5430                 from <ulink url="https://www.isc.org/solutions/dlv/"
5431                 >https://www.isc.org/solutions/dlv/</ulink>.
5432               </para>
5433               <para>
5434                 (To prevent problems if <filename>bind.keys</filename> is
5435                 not found, the current key is also compiled in to
5436                 <command>named</command>.  Relying on this is not
5437                 recommended, however, as it requires <command>named</command>
5438                 to be recompiled with a new key when the DLV key expires.)
5439               </para>
5440               <para>
5441                 NOTE: <command>named</command> only loads certain specific
5442                 keys from <filename>bind.keys</filename>:  those for the
5443                 DLV zone and for the DNS root zone.  The file cannot be
5444                 used to store keys for other zones.
5445               </para>
5446             </listitem>
5447           </varlistentry>
5448
5449           <varlistentry>
5450             <term><command>dnssec-must-be-secure</command></term>
5451             <listitem>
5452               <para>
5453                 Specify hierarchies which must be or may not be secure
5454                 (signed and validated).  If <userinput>yes</userinput>,
5455                 then <command>named</command> will only accept answers if
5456                 they are secure.  If <userinput>no</userinput>, then normal
5457                 DNSSEC validation applies allowing for insecure answers to
5458                 be accepted.  The specified domain must be under a
5459                 <command>trusted-keys</command> or
5460                 <command>managed-keys</command> statement, or
5461                 <command>dnssec-lookaside</command> must be active.
5462               </para>
5463             </listitem>
5464           </varlistentry>
5465
5466           <varlistentry>
5467             <term><command>dns64</command></term>
5468             <listitem>
5469               <para>
5470                 This directive instructs <command>named</command> to
5471                 return mapped IPv4 addresses to AAAA queries when
5472                 there are no AAAA records.  It is intended to be
5473                 used in conjunction with a NAT64.  Each
5474                 <command>dns64</command> defines one DNS64 prefix.
5475                 Multiple DNS64 prefixes can be defined.
5476               </para>
5477               <para>
5478                 Compatible IPv6 prefixes have lengths of 32, 40, 48, 56,
5479                 64 and 96 as per RFC 6052.
5480               </para>
5481               <para>
5482                 Additionally a reverse IP6.ARPA zone will be created for
5483                 the prefix to provide a mapping from the IP6.ARPA names
5484                 to the corresponding IN-ADDR.ARPA names using synthesized
5485                 CNAMEs.  <command>dns64-server</command> and
5486                 <command>dns64-contact</command> can be used to specify
5487                 the name of the server and contact for the zones. These
5488                 are settable at the view / options level.  These are
5489                 not settable on a per-prefix basis.
5490               </para>
5491               <para>
5492                 Each <command>dns64</command> supports an optional
5493                 <command>clients</command> ACL that determines which
5494                 clients are affected by this directive.  If not defined,
5495                 it defaults to <userinput>any;</userinput>.
5496               </para>
5497               <para>
5498                 Each <command>dns64</command> supports an optional
5499                 <command>mapped</command> ACL that selects which
5500                 IPv4 addresses are to be mapped in the corresponding    
5501                 A RRset.  If not defined it defaults to
5502                 <userinput>any;</userinput>.
5503               </para>
5504               <para>
5505                 Normally, DNS64 won't apply to a domain name that
5506                 owns one or more AAAA records; these records will
5507                 simply be returned.  The optional
5508                 <command>exclude</command> ACL allows specification
5509                 of a list of IPv6 addresses that will be ignored
5510                 if they appear in a domain name's AAAA records, and
5511                 DNS64 will be applied to any A records the domain
5512                 name owns.  If not defined, <command>exclude</command>
5513                 defaults to none.
5514               </para>
5515               <para>
5516                 A optional <command>suffix</command> can also
5517                 be defined to set the bits trailing the mapped
5518                 IPv4 address bits.  By default these bits are
5519                 set to <userinput>::</userinput>.  The bits
5520                 matching the prefix and mapped IPv4 address
5521                 must be zero.
5522               </para>
5523               <para>
5524                 If <command>recursive-only</command> is set to
5525                 <command>yes</command> the DNS64 synthesis will
5526                 only happen for recursive queries.  The default
5527                 is <command>no</command>.
5528               </para>
5529               <para>
5530                 If <command>break-dnssec</command> is set to
5531                 <command>yes</command> the DNS64 synthesis will
5532                 happen even if the result, if validated, would
5533                 cause a DNSSEC validation failure.  If this option
5534                 is set to <command>no</command> (the default), the DO
5535                 is set on the incoming query, and there are RRSIGs on
5536                 the applicable records, then synthesis will not happen.
5537               </para>
5538 <programlisting>
5539         acl rfc1918 { 10/8; 192.168/16; 172.16/12; };
5540
5541         dns64 64:FF9B::/96 {
5542                 clients { any; };
5543                 mapped { !rfc1918; any; };
5544                 exclude { 64:FF9B::/96; ::ffff:0000:0000/96; };
5545                 suffix ::;
5546         };
5547 </programlisting>
5548             </listitem>
5549           </varlistentry>
5550
5551           <varlistentry>
5552             <term><command>dnssec-update-mode</command></term>
5553             <listitem>
5554                 <para>
5555                   If this option is set to its default value of
5556                   <literal>maintain</literal> in a zone of type
5557                   <literal>master</literal> which is DNSSEC-signed
5558                   and configured to allow dynamic updates (see
5559                   <xref linkend="dynamic_update_policies"/>), and
5560                   if <command>named</command> has access to the
5561                   private signing key(s) for the zone, then
5562                   <command>named</command> will automatically sign all new
5563                   or changed records and maintain signatures for the zone
5564                   by regenerating RRSIG records whenever they approach
5565                   their expiration date.
5566                 </para>
5567                 <para>
5568                   If the option is changed to <literal>no-resign</literal>,
5569                   then <command>named</command> will sign all new or
5570                   changed records, but scheduled maintenance of
5571                   signatures is disabled.
5572                 </para>
5573                 <para>
5574                   With either of these settings, <command>named</command>
5575                   will reject updates to a DNSSEC-signed zone when the
5576                   signing keys are inactive or unavailable to
5577                   <command>named</command>.  (A planned third option,
5578                   <literal>external</literal>, will disable all automatic
5579                   signing and allow DNSSEC data to be submitted into a zone
5580                   via dynamic update; this is not yet implemented.)
5581                 </para>
5582             </listitem>
5583           </varlistentry>
5584
5585           <varlistentry>
5586             <term><command>zone-statistics</command></term>
5587             <listitem>
5588               <para>
5589                 If <userinput>full</userinput>, the server will collect
5590                 statistical data on all zones (unless specifically
5591                 turned off on a per-zone basis by specifying
5592                 <command>zone-statistics terse</command> or
5593                 <command>zone-statistics none</command>
5594                 in the <command>zone</command> statement).
5595                 The default is <userinput>terse</userinput>, providing
5596                 minimal statistics on zones (including name and
5597                 current serial number, but not query type
5598                 counters).
5599               </para>
5600               <para>
5601                 These statistics may be accessed via the
5602                 <command>statistics-channel</command> or
5603                 using <command>rndc stats</command>, which
5604                 will dump them to the file listed
5605                 in the <command>statistics-file</command>.  See
5606                 also <xref linkend="statsfile"/>.
5607               </para>
5608               <para>
5609                 For backward compatibility with earlier versions
5610                 of BIND 9, the <command>zone-statistics</command>
5611                 option can also accept <userinput>yes</userinput>
5612                 or <userinput>no</userinput>, which have the same
5613                 effect as <userinput>full</userinput> and
5614                 <userinput>terse</userinput>, respectively.
5615               </para>
5616             </listitem>
5617           </varlistentry>
5618         </variablelist>
5619
5620         <sect3 id="boolean_options">
5621           <title>Boolean Options</title>
5622
5623           <variablelist>
5624
5625             <varlistentry>
5626               <term><command>allow-new-zones</command></term>
5627               <listitem>
5628                 <para>
5629                   If <userinput>yes</userinput>, then zones can be
5630                   added at runtime via <command>rndc addzone</command>
5631                   or deleted via <command>rndc delzone</command>.
5632                   The default is <userinput>no</userinput>.
5633                 </para>
5634               </listitem>
5635             </varlistentry>
5636
5637             <varlistentry>
5638               <term><command>auth-nxdomain</command></term>
5639               <listitem>
5640                 <para>
5641                   If <userinput>yes</userinput>, then the <command>AA</command> bit
5642                   is always set on NXDOMAIN responses, even if the server is
5643                   not actually
5644                   authoritative. The default is <userinput>no</userinput>;
5645                   this is
5646                   a change from <acronym>BIND</acronym> 8. If you
5647                   are using very old DNS software, you
5648                   may need to set it to <userinput>yes</userinput>.
5649                 </para>
5650               </listitem>
5651             </varlistentry>
5652
5653             <varlistentry>
5654               <term><command>deallocate-on-exit</command></term>
5655               <listitem>
5656                 <para>
5657                   This option was used in <acronym>BIND</acronym>
5658                   8 to enable checking
5659                   for memory leaks on exit. <acronym>BIND</acronym> 9 ignores the option and always performs
5660                   the checks.
5661                 </para>
5662               </listitem>
5663             </varlistentry>
5664
5665             <varlistentry>
5666               <term><command>memstatistics</command></term>
5667               <listitem>
5668                 <para>
5669                   Write memory statistics to the file specified by
5670                   <command>memstatistics-file</command> at exit.
5671                   The default is <userinput>no</userinput> unless
5672                   '-m record' is specified on the command line in
5673                   which case it is <userinput>yes</userinput>.
5674                 </para>
5675               </listitem>
5676             </varlistentry>
5677
5678             <varlistentry>
5679               <term><command>dialup</command></term>
5680               <listitem>
5681                 <para>
5682                   If <userinput>yes</userinput>, then the
5683                   server treats all zones as if they are doing zone transfers
5684                   across
5685                   a dial-on-demand dialup link, which can be brought up by
5686                   traffic
5687                   originating from this server. This has different effects
5688                   according
5689                   to zone type and concentrates the zone maintenance so that
5690                   it all
5691                   happens in a short interval, once every <command>heartbeat-interval</command> and
5692                   hopefully during the one call. It also suppresses some of
5693                   the normal
5694                   zone maintenance traffic. The default is <userinput>no</userinput>.
5695                 </para>
5696                 <para>
5697                   The <command>dialup</command> option
5698                   may also be specified in the <command>view</command> and
5699                   <command>zone</command> statements,
5700                   in which case it overrides the global <command>dialup</command>
5701                   option.
5702                 </para>
5703                 <para>
5704                   If the zone is a master zone, then the server will send out a
5705                   NOTIFY
5706                   request to all the slaves (default). This should trigger the
5707                   zone serial
5708                   number check in the slave (providing it supports NOTIFY)
5709                   allowing the slave
5710                   to verify the zone while the connection is active.
5711                   The set of servers to which NOTIFY is sent can be controlled
5712                   by
5713                   <command>notify</command> and <command>also-notify</command>.
5714                 </para>
5715                 <para>
5716                   If the
5717                   zone is a slave or stub zone, then the server will suppress
5718                   the regular
5719                   "zone up to date" (refresh) queries and only perform them
5720                   when the
5721                   <command>heartbeat-interval</command> expires in
5722                   addition to sending
5723                   NOTIFY requests.
5724                 </para>
5725                 <para>
5726                   Finer control can be achieved by using
5727                   <userinput>notify</userinput> which only sends NOTIFY
5728                   messages,
5729                   <userinput>notify-passive</userinput> which sends NOTIFY
5730                   messages and
5731                   suppresses the normal refresh queries, <userinput>refresh</userinput>
5732                   which suppresses normal refresh processing and sends refresh
5733                   queries
5734                   when the <command>heartbeat-interval</command>
5735                   expires, and
5736                   <userinput>passive</userinput> which just disables normal
5737                   refresh
5738                   processing.
5739                 </para>
5740
5741                 <informaltable colsep="0" rowsep="0">
5742                   <tgroup cols="4" colsep="0" rowsep="0" tgroupstyle="4Level-table">
5743                     <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
5744                     <colspec colname="2" colnum="2" colsep="0" colwidth="1.150in"/>
5745                     <colspec colname="3" colnum="3" colsep="0" colwidth="1.150in"/>
5746                     <colspec colname="4" colnum="4" colsep="0" colwidth="1.150in"/>
5747                     <tbody>
5748                       <row rowsep="0">
5749                         <entry colname="1">
5750                           <para>
5751                             dialup mode
5752                           </para>
5753                         </entry>
5754                         <entry colname="2">
5755                           <para>
5756                             normal refresh
5757                           </para>
5758                         </entry>
5759                         <entry colname="3">
5760                           <para>
5761                             heart-beat refresh
5762                           </para>
5763                         </entry>
5764                         <entry colname="4">
5765                           <para>
5766                             heart-beat notify
5767                           </para>
5768                         </entry>
5769                       </row>
5770                       <row rowsep="0">
5771                         <entry colname="1">
5772                           <para><command>no</command> (default)</para>
5773                         </entry>
5774                         <entry colname="2">
5775                           <para>
5776                             yes
5777                           </para>
5778                         </entry>
5779                         <entry colname="3">
5780                           <para>
5781                             no
5782                           </para>
5783                         </entry>
5784                         <entry colname="4">
5785                           <para>
5786                             no
5787                           </para>
5788                         </entry>
5789                       </row>
5790                       <row rowsep="0">
5791                         <entry colname="1">
5792                           <para><command>yes</command></para>
5793                         </entry>
5794                         <entry colname="2">
5795                           <para>
5796                             no
5797                           </para>
5798                         </entry>
5799                         <entry colname="3">
5800                           <para>
5801                             yes
5802                           </para>
5803                         </entry>
5804                         <entry colname="4">
5805                           <para>
5806                             yes
5807                           </para>
5808                         </entry>
5809                       </row>
5810                       <row rowsep="0">
5811                         <entry colname="1">
5812                           <para><command>notify</command></para>
5813                         </entry>
5814                         <entry colname="2">
5815                           <para>
5816                             yes
5817                           </para>
5818                         </entry>
5819                         <entry colname="3">
5820                           <para>
5821                             no
5822                           </para>
5823                         </entry>
5824                         <entry colname="4">
5825                           <para>
5826                             yes
5827                           </para>
5828                         </entry>
5829                       </row>
5830                       <row rowsep="0">
5831                         <entry colname="1">
5832                           <para><command>refresh</command></para>
5833                         </entry>
5834                         <entry colname="2">
5835                           <para>
5836                             no
5837                           </para>
5838                         </entry>
5839                         <entry colname="3">
5840                           <para>
5841                             yes
5842                           </para>
5843                         </entry>
5844                         <entry colname="4">
5845                           <para>
5846                             no
5847                           </para>
5848                         </entry>
5849                       </row>
5850                       <row rowsep="0">
5851                         <entry colname="1">
5852                           <para><command>passive</command></para>
5853                         </entry>
5854                         <entry colname="2">
5855                           <para>
5856                             no
5857                           </para>
5858                         </entry>
5859                         <entry colname="3">
5860                           <para>
5861                             no
5862                           </para>
5863                         </entry>
5864                         <entry colname="4">
5865                           <para>
5866                             no
5867                           </para>
5868                         </entry>
5869                       </row>
5870                       <row rowsep="0">
5871                         <entry colname="1">
5872                           <para><command>notify-passive</command></para>
5873                         </entry>
5874                         <entry colname="2">
5875                           <para>
5876                             no
5877                           </para>
5878                         </entry>
5879                         <entry colname="3">
5880                           <para>
5881                             no
5882                           </para>
5883                         </entry>
5884                         <entry colname="4">
5885                           <para>
5886                             yes
5887                           </para>
5888                         </entry>
5889                       </row>
5890                     </tbody>
5891                   </tgroup>
5892                 </informaltable>
5893
5894                 <para>
5895                   Note that normal NOTIFY processing is not affected by
5896                   <command>dialup</command>.
5897                 </para>
5898
5899               </listitem>
5900             </varlistentry>
5901
5902             <varlistentry>
5903               <term><command>fake-iquery</command></term>
5904               <listitem>
5905                 <para>
5906                   In <acronym>BIND</acronym> 8, this option
5907                   enabled simulating the obsolete DNS query type
5908                   IQUERY. <acronym>BIND</acronym> 9 never does
5909                   IQUERY simulation.
5910                 </para>
5911               </listitem>
5912             </varlistentry>
5913
5914             <varlistentry>
5915               <term><command>fetch-glue</command></term>
5916               <listitem>
5917                 <para>
5918                   This option is obsolete.
5919                   In BIND 8, <userinput>fetch-glue yes</userinput>
5920                   caused the server to attempt to fetch glue resource records
5921                   it
5922                   didn't have when constructing the additional
5923                   data section of a response.  This is now considered a bad
5924                   idea
5925                   and BIND 9 never does it.
5926                 </para>
5927               </listitem>
5928             </varlistentry>
5929
5930             <varlistentry>
5931               <term><command>flush-zones-on-shutdown</command></term>
5932               <listitem>
5933                 <para>
5934                   When the nameserver exits due receiving SIGTERM,
5935                   flush or do not flush any pending zone writes.  The default
5936                   is
5937                   <command>flush-zones-on-shutdown</command> <userinput>no</userinput>.
5938                 </para>
5939               </listitem>
5940             </varlistentry>
5941
5942             <varlistentry>
5943               <term><command>has-old-clients</command></term>
5944               <listitem>
5945                 <para>
5946                   This option was incorrectly implemented
5947                   in <acronym>BIND</acronym> 8, and is ignored by <acronym>BIND</acronym> 9.
5948                   To achieve the intended effect
5949                   of
5950                   <command>has-old-clients</command> <userinput>yes</userinput>, specify
5951                   the two separate options <command>auth-nxdomain</command> <userinput>yes</userinput>
5952                   and <command>rfc2308-type1</command> <userinput>no</userinput> instead.
5953                 </para>
5954               </listitem>
5955             </varlistentry>
5956
5957             <varlistentry>
5958               <term><command>host-statistics</command></term>
5959               <listitem>
5960                 <para>
5961                   In BIND 8, this enables keeping of
5962                   statistics for every host that the name server interacts
5963                   with.
5964                   Not implemented in BIND 9.
5965                 </para>
5966               </listitem>
5967             </varlistentry>
5968
5969             <varlistentry>
5970               <term><command>maintain-ixfr-base</command></term>
5971               <listitem>
5972                 <para>
5973                   <emphasis>This option is obsolete</emphasis>.
5974                   It was used in <acronym>BIND</acronym> 8 to
5975                   determine whether a transaction log was
5976                   kept for Incremental Zone Transfer. <acronym>BIND</acronym> 9 maintains a transaction
5977                   log whenever possible.  If you need to disable outgoing
5978                   incremental zone
5979                   transfers, use <command>provide-ixfr</command> <userinput>no</userinput>.
5980                 </para>
5981               </listitem>
5982             </varlistentry>
5983
5984             <varlistentry>
5985               <term><command>minimal-responses</command></term>
5986               <listitem>
5987                 <para>
5988                   If <userinput>yes</userinput>, then when generating
5989                   responses the server will only add records to the authority
5990                   and additional data sections when they are required (e.g.
5991                   delegations, negative responses).  This may improve the
5992                   performance of the server.
5993                   The default is <userinput>no</userinput>.
5994                 </para>
5995               </listitem>
5996             </varlistentry>
5997
5998             <varlistentry>
5999               <term><command>multiple-cnames</command></term>
6000               <listitem>
6001                 <para>
6002                   This option was used in <acronym>BIND</acronym> 8 to allow
6003                   a domain name to have multiple CNAME records in violation of
6004                   the DNS standards.  <acronym>BIND</acronym> 9.2 onwards
6005                   always strictly enforces the CNAME rules both in master
6006                   files and dynamic updates.
6007                 </para>
6008               </listitem>
6009             </varlistentry>
6010
6011             <varlistentry>
6012               <term><command>notify</command></term>
6013               <listitem>
6014                 <para>
6015                   If <userinput>yes</userinput> (the default),
6016                   DNS NOTIFY messages are sent when a zone the server is
6017                   authoritative for
6018                   changes, see <xref linkend="notify"/>.  The messages are
6019                   sent to the
6020                   servers listed in the zone's NS records (except the master
6021                   server identified
6022                   in the SOA MNAME field), and to any servers listed in the
6023                   <command>also-notify</command> option.
6024                 </para>
6025                 <para>
6026                   If <userinput>master-only</userinput>, notifies are only
6027                   sent
6028                   for master zones.
6029                   If <userinput>explicit</userinput>, notifies are sent only
6030                   to
6031                   servers explicitly listed using <command>also-notify</command>.
6032                   If <userinput>no</userinput>, no notifies are sent.
6033                 </para>
6034                 <para>
6035                   The <command>notify</command> option may also be
6036                   specified in the <command>zone</command>
6037                   statement,
6038                   in which case it overrides the <command>options notify</command> statement.
6039                   It would only be necessary to turn off this option if it
6040                   caused slaves
6041                   to crash.
6042                 </para>
6043               </listitem>
6044             </varlistentry>
6045
6046             <varlistentry>
6047               <term><command>notify-to-soa</command></term>
6048               <listitem>
6049                 <para>
6050                   If <userinput>yes</userinput> do not check the nameservers
6051                   in the NS RRset against the SOA MNAME.  Normally a NOTIFY
6052                   message is not sent to the SOA MNAME (SOA ORIGIN) as it is
6053                   supposed to contain the name of the ultimate master.
6054                   Sometimes, however, a slave is listed as the SOA MNAME in
6055                   hidden master configurations and in that case you would
6056                   want the ultimate master to still send NOTIFY messages to
6057                   all the nameservers listed in the NS RRset.
6058                 </para>
6059               </listitem>
6060             </varlistentry>
6061
6062             <varlistentry>
6063               <term><command>recursion</command></term>
6064               <listitem>
6065                 <para>
6066                   If <userinput>yes</userinput>, and a
6067                   DNS query requests recursion, then the server will attempt
6068                   to do
6069                   all the work required to answer the query. If recursion is
6070                   off
6071                   and the server does not already know the answer, it will
6072                   return a
6073                   referral response. The default is
6074                   <userinput>yes</userinput>.
6075                   Note that setting <command>recursion no</command> does not prevent
6076                   clients from getting data from the server's cache; it only
6077                   prevents new data from being cached as an effect of client
6078                   queries.
6079                   Caching may still occur as an effect the server's internal
6080                   operation, such as NOTIFY address lookups.
6081                   See also <command>fetch-glue</command> above.
6082                 </para>
6083               </listitem>
6084             </varlistentry>
6085
6086             <varlistentry>
6087               <term><command>request-nsid</command></term>
6088               <listitem>
6089                 <para>
6090                   If <userinput>yes</userinput>, then an empty EDNS(0)
6091                   NSID (Name Server Identifier) option is sent with all 
6092                   queries to authoritative name servers during iterative
6093                   resolution. If the authoritative server returns an NSID
6094                   option in its response, then its contents are logged in
6095                   the <command>resolver</command> category at level
6096                   <command>info</command>.
6097                   The default is <userinput>no</userinput>.
6098                 </para>
6099               </listitem>
6100             </varlistentry>
6101
6102             <varlistentry>
6103               <term><command>rfc2308-type1</command></term>
6104               <listitem>
6105                 <para>
6106                   Setting this to <userinput>yes</userinput> will
6107                   cause the server to send NS records along with the SOA
6108                   record for negative
6109                   answers. The default is <userinput>no</userinput>.
6110                 </para>
6111                 <note>
6112                   <simpara>
6113                     Not yet implemented in <acronym>BIND</acronym>
6114                     9.
6115                   </simpara>
6116                 </note>
6117               </listitem>
6118             </varlistentry>
6119
6120             <varlistentry>
6121               <term><command>use-id-pool</command></term>
6122               <listitem>
6123                 <para>
6124                   <emphasis>This option is obsolete</emphasis>.
6125                   <acronym>BIND</acronym> 9 always allocates query
6126                   IDs from a pool.
6127                 </para>
6128               </listitem>
6129             </varlistentry>
6130
6131             <varlistentry>
6132               <term><command>use-ixfr</command></term>
6133               <listitem>
6134                 <para>
6135                   <emphasis>This option is obsolete</emphasis>.
6136                   If you need to disable IXFR to a particular server or
6137                   servers, see
6138                   the information on the <command>provide-ixfr</command> option
6139                   in <xref linkend="server_statement_definition_and_usage"/>.
6140                   See also
6141                   <xref linkend="incremental_zone_transfers"/>.
6142                 </para>
6143               </listitem>
6144             </varlistentry>
6145
6146             <varlistentry>
6147               <term><command>provide-ixfr</command></term>
6148               <listitem>
6149                 <para>
6150                   See the description of
6151                   <command>provide-ixfr</command> in
6152                   <xref linkend="server_statement_definition_and_usage"/>.
6153                 </para>
6154               </listitem>
6155             </varlistentry>
6156
6157             <varlistentry>
6158               <term><command>request-ixfr</command></term>
6159               <listitem>
6160                 <para>
6161                   See the description of
6162                   <command>request-ixfr</command> in
6163                   <xref linkend="server_statement_definition_and_usage"/>.
6164                 </para>
6165               </listitem>
6166             </varlistentry>
6167
6168             <varlistentry>
6169               <term><command>treat-cr-as-space</command></term>
6170               <listitem>
6171                 <para>
6172                   This option was used in <acronym>BIND</acronym>
6173                   8 to make
6174                   the server treat carriage return ("<command>\r</command>") characters the same way
6175                   as a space or tab character,
6176                   to facilitate loading of zone files on a UNIX system that
6177                   were generated
6178                   on an NT or DOS machine. In <acronym>BIND</acronym> 9, both UNIX "<command>\n</command>"
6179                   and NT/DOS "<command>\r\n</command>" newlines
6180                   are always accepted,
6181                   and the option is ignored.
6182                 </para>
6183               </listitem>
6184             </varlistentry>
6185
6186             <varlistentry>
6187               <term><command>additional-from-auth</command></term>
6188               <term><command>additional-from-cache</command></term>
6189               <listitem>
6190
6191                 <para>
6192                   These options control the behavior of an authoritative
6193                   server when
6194                   answering queries which have additional data, or when
6195                   following CNAME
6196                   and DNAME chains.
6197                 </para>
6198
6199                 <para>
6200                   When both of these options are set to <userinput>yes</userinput>
6201                   (the default) and a
6202                   query is being answered from authoritative data (a zone
6203                   configured into the server), the additional data section of
6204                   the
6205                   reply will be filled in using data from other authoritative
6206                   zones
6207                   and from the cache.  In some situations this is undesirable,
6208                   such
6209                   as when there is concern over the correctness of the cache,
6210                   or
6211                   in servers where slave zones may be added and modified by
6212                   untrusted third parties.  Also, avoiding
6213                   the search for this additional data will speed up server
6214                   operations
6215                   at the possible expense of additional queries to resolve
6216                   what would
6217                   otherwise be provided in the additional section.
6218                 </para>
6219
6220                 <para>
6221                   For example, if a query asks for an MX record for host <literal>foo.example.com</literal>,
6222                   and the record found is "<literal>MX 10 mail.example.net</literal>", normally the address
6223                   records (A and AAAA) for <literal>mail.example.net</literal> will be provided as well,
6224                   if known, even though they are not in the example.com zone.
6225                   Setting these options to <command>no</command>
6226                   disables this behavior and makes
6227                   the server only search for additional data in the zone it
6228                   answers from.
6229                 </para>
6230
6231                 <para>
6232                   These options are intended for use in authoritative-only
6233                   servers, or in authoritative-only views.  Attempts to set
6234                   them to <command>no</command> without also
6235                   specifying
6236                   <command>recursion no</command> will cause the
6237                   server to
6238                   ignore the options and log a warning message.
6239                 </para>
6240
6241                 <para>
6242                   Specifying <command>additional-from-cache no</command> actually
6243                   disables the use of the cache not only for additional data
6244                   lookups
6245                   but also when looking up the answer.  This is usually the
6246                   desired
6247                   behavior in an authoritative-only server where the
6248                   correctness of
6249                   the cached data is an issue.
6250                 </para>
6251
6252                 <para>
6253                   When a name server is non-recursively queried for a name
6254                   that is not
6255                   below the apex of any served zone, it normally answers with
6256                   an
6257                   "upwards referral" to the root servers or the servers of
6258                   some other
6259                   known parent of the query name.  Since the data in an
6260                   upwards referral
6261                   comes from the cache, the server will not be able to provide
6262                   upwards
6263                   referrals when <command>additional-from-cache no</command>
6264                   has been specified.  Instead, it will respond to such
6265                   queries
6266                   with REFUSED.  This should not cause any problems since
6267                   upwards referrals are not required for the resolution
6268                   process.
6269                 </para>
6270
6271               </listitem>
6272             </varlistentry>
6273
6274             <varlistentry>
6275               <term><command>match-mapped-addresses</command></term>
6276               <listitem>
6277                 <para>
6278                   If <userinput>yes</userinput>, then an
6279                   IPv4-mapped IPv6 address will match any address match
6280                   list entries that match the corresponding IPv4 address.
6281                 </para>
6282                 <para>
6283                   This option was introduced to work around a kernel quirk
6284                   in some operating systems that causes IPv4 TCP
6285                   connections, such as zone transfers, to be accepted on an
6286                   IPv6 socket using mapped addresses.  This caused address
6287                   match lists designed for IPv4 to fail to match.  However,
6288                   <command>named</command> now solves this problem
6289                   internally.  The use of this option is discouraged.
6290                 </para>
6291               </listitem>
6292             </varlistentry>
6293
6294             <varlistentry>
6295               <term><command>filter-aaaa-on-v4</command></term>
6296               <listitem>
6297                 <para>
6298                   This option is only available when
6299                   <acronym>BIND</acronym> 9 is compiled with the
6300                   <userinput>--enable-filter-aaaa</userinput> option on the
6301                   "configure" command line.  It is intended to help the
6302                   transition from IPv4 to IPv6 by not giving IPv6 addresses
6303                   to DNS clients unless they have connections to the IPv6
6304                   Internet.  This is not recommended unless absolutely
6305                   necessary.  The default is <userinput>no</userinput>.
6306                   The <command>filter-aaaa-on-v4</command> option
6307                   may also be specified in <command>view</command> statements
6308                   to override the global <command>filter-aaaa-on-v4</command>
6309                   option.
6310                 </para>
6311                 <para>
6312                   If <userinput>yes</userinput>,
6313                   the DNS client is at an IPv4 address, in <command>filter-aaaa</command>,
6314                   and if the response does not include DNSSEC signatures, 
6315                   then all AAAA records are deleted from the response.
6316                   This filtering applies to all responses and not only
6317                   authoritative responses.
6318                 </para>
6319                 <para>
6320                   If <userinput>break-dnssec</userinput>,
6321                   then AAAA records are deleted even when dnssec is enabled.
6322                   As suggested by the name, this makes the response not verify,
6323                   because the DNSSEC protocol is designed detect deletions.
6324                 </para>
6325                 <para>
6326                   This mechanism can erroneously cause other servers to 
6327                   not give AAAA records to their clients.  
6328                   A recursing server with both IPv6 and IPv4 network connections
6329                   that queries an authoritative server using this mechanism
6330                   via IPv4 will be denied AAAA records even if its client is
6331                   using IPv6.
6332                 </para>
6333                 <para>
6334                   This mechanism is applied to authoritative as well as
6335                   non-authoritative records.
6336                   A client using IPv4 that is not allowed recursion can
6337                   erroneously be given AAAA records because the server is not
6338                   allowed to check for A records.
6339                 </para>
6340                 <para>
6341                   Some AAAA records are given to IPv4 clients in glue records.
6342                   IPv4 clients that are servers can then erroneously
6343                   answer requests for AAAA records received via IPv4.
6344                 </para>
6345               </listitem>
6346             </varlistentry>
6347
6348             <varlistentry>
6349               <term><command>ixfr-from-differences</command></term>
6350               <listitem>
6351                 <para>
6352                   When <userinput>yes</userinput> and the server loads a new
6353                   version of a master zone from its zone file or receives a
6354                   new version of a slave file via zone transfer, it will
6355                   compare the new version to the previous one and calculate
6356                   a set of differences.  The differences are then logged in
6357                   the zone's journal file such that the changes can be
6358                   transmitted to downstream slaves as an incremental zone
6359                   transfer.
6360                 </para>
6361                 <para>
6362                   By allowing incremental zone transfers to be used for
6363                   non-dynamic zones, this option saves bandwidth at the
6364                   expense of increased CPU and memory consumption at the
6365                   master.
6366                   In particular, if the new version of a zone is completely
6367                   different from the previous one, the set of differences
6368                   will be of a size comparable to the combined size of the
6369                   old and new zone version, and the server will need to
6370                   temporarily allocate memory to hold this complete
6371                   difference set.
6372                 </para>
6373                 <para><command>ixfr-from-differences</command>
6374                   also accepts <command>master</command> and
6375                   <command>slave</command> at the view and options
6376                   levels which causes
6377                   <command>ixfr-from-differences</command> to be enabled for
6378                   all <command>master</command> or
6379                   <command>slave</command> zones respectively.
6380                   It is off by default.
6381                 </para>
6382               </listitem>
6383             </varlistentry>
6384
6385             <varlistentry>
6386               <term><command>multi-master</command></term>
6387               <listitem>
6388                 <para>
6389                   This should be set when you have multiple masters for a zone
6390                   and the
6391                   addresses refer to different machines.  If <userinput>yes</userinput>, <command>named</command> will
6392                   not log
6393                   when the serial number on the master is less than what <command>named</command>
6394                   currently
6395                   has.  The default is <userinput>no</userinput>.
6396                 </para>
6397               </listitem>
6398             </varlistentry>
6399
6400             <varlistentry>
6401               <term><command>dnssec-enable</command></term>
6402               <listitem>
6403                 <para>
6404                   Enable DNSSEC support in <command>named</command>.  Unless set to <userinput>yes</userinput>,
6405                   <command>named</command> behaves as if it does not support DNSSEC.
6406                   The default is <userinput>yes</userinput>.
6407                 </para>
6408               </listitem>
6409             </varlistentry>
6410
6411             <varlistentry>
6412               <term><command>dnssec-validation</command></term>
6413               <listitem>
6414                 <para>
6415                   Enable DNSSEC validation in <command>named</command>.
6416                   Note <command>dnssec-enable</command> also needs to be
6417                   set to <userinput>yes</userinput> to be effective.
6418                   If set to <userinput>no</userinput>, DNSSEC validation
6419                   is disabled.  If set to <userinput>auto</userinput>,
6420                   DNSSEC validation is enabled, and a default
6421                   trust-anchor for the DNS root zone is used.  If set to
6422                   <userinput>yes</userinput>, DNSSEC validation is enabled,
6423                   but a trust anchor must be manually configured using
6424                   a <command>trusted-keys</command> or
6425                   <command>managed-keys</command> statement.  The default
6426                   is <userinput>yes</userinput>.
6427                 </para>
6428               </listitem>
6429             </varlistentry>
6430
6431             <varlistentry>
6432               <term><command>dnssec-accept-expired</command></term>
6433               <listitem>
6434                 <para>
6435                   Accept expired signatures when verifying DNSSEC signatures.
6436                   The default is <userinput>no</userinput>.
6437                   Setting this option to <userinput>yes</userinput>
6438                   leaves <command>named</command> vulnerable to
6439                   replay attacks.
6440                 </para>
6441               </listitem>
6442             </varlistentry>
6443
6444             <varlistentry>
6445               <term><command>querylog</command></term>
6446               <listitem>
6447                 <para>
6448                   Specify whether query logging should be started when <command>named</command>
6449                   starts.
6450                   If <command>querylog</command> is not specified,
6451                   then the query logging
6452                   is determined by the presence of the logging category <command>queries</command>.
6453                 </para>
6454               </listitem>
6455             </varlistentry>
6456
6457             <varlistentry>
6458               <term><command>check-names</command></term>
6459               <listitem>
6460                 <para>
6461                   This option is used to restrict the character set and syntax
6462                   of
6463                   certain domain names in master files and/or DNS responses
6464                   received
6465                   from the network.  The default varies according to usage
6466                   area.  For
6467                   <command>master</command> zones the default is <command>fail</command>.
6468                   For <command>slave</command> zones the default
6469                   is <command>warn</command>.
6470                   For answers received from the network (<command>response</command>)
6471                   the default is <command>ignore</command>.
6472                 </para>
6473                 <para>
6474                   The rules for legal hostnames and mail domains are derived
6475                   from RFC 952 and RFC 821 as modified by RFC 1123.
6476                 </para>
6477                 <para><command>check-names</command>
6478                   applies to the owner names of A, AAAA and MX records.
6479                   It also applies to the domain names in the RDATA of NS, SOA,
6480                   MX, and SRV records.
6481                   It also applies to the RDATA of PTR records where the owner
6482                   name indicated that it is a reverse lookup of a hostname
6483                   (the owner name ends in IN-ADDR.ARPA, IP6.ARPA, or IP6.INT).
6484                 </para>
6485               </listitem>
6486             </varlistentry>
6487
6488             <varlistentry>
6489               <term><command>check-dup-records</command></term>
6490               <listitem>
6491                 <para>
6492                   Check master zones for records that are treated as different
6493                   by DNSSEC but are semantically equal in plain DNS.  The
6494                   default is to <command>warn</command>.  Other possible
6495                   values are <command>fail</command> and
6496                   <command>ignore</command>.
6497                 </para>
6498               </listitem>
6499             </varlistentry>
6500
6501             <varlistentry>
6502               <term><command>check-mx</command></term>
6503               <listitem>
6504                 <para>
6505                   Check whether the MX record appears to refer to a IP address.
6506                   The default is to <command>warn</command>.  Other possible
6507                   values are <command>fail</command> and
6508                   <command>ignore</command>.
6509                 </para>
6510               </listitem>
6511             </varlistentry>
6512
6513             <varlistentry>
6514               <term><command>check-wildcard</command></term>
6515               <listitem>
6516                 <para>
6517                   This option is used to check for non-terminal wildcards.
6518                   The use of non-terminal wildcards is almost always as a
6519                   result of a failure
6520                   to understand the wildcard matching algorithm (RFC 1034).
6521                   This option
6522                   affects master zones.  The default (<command>yes</command>) is to check
6523                   for non-terminal wildcards and issue a warning.
6524                 </para>
6525               </listitem>
6526             </varlistentry>
6527
6528             <varlistentry>
6529               <term><command>check-integrity</command></term>
6530               <listitem>
6531                 <para>
6532                   Perform post load zone integrity checks on master
6533                   zones.  This checks that MX and SRV records refer
6534                   to address (A or AAAA) records and that glue
6535                   address records exist for delegated zones.  For
6536                   MX and SRV records only in-zone hostnames are
6537                   checked (for out-of-zone hostnames use
6538                   <command>named-checkzone</command>).
6539                   For NS records only names below top of zone are
6540                   checked (for out-of-zone names and glue consistency
6541                   checks use <command>named-checkzone</command>).
6542                   The default is <command>yes</command>.
6543                 </para>
6544                 <para>
6545                   Check that the two forms of Sender Policy Framework
6546                   records (TXT records starting with "v=spf1" and SPF) either
6547                   both exist or both don't exist.  Warnings are
6548                   emitted it they don't and be suppressed with
6549                   <command>check-spf</command>.
6550                 </para>
6551               </listitem>
6552             </varlistentry>
6553
6554             <varlistentry>
6555               <term><command>check-mx-cname</command></term>
6556               <listitem>
6557                 <para>
6558                   If <command>check-integrity</command> is set then
6559                   fail, warn or ignore MX records that refer
6560                   to CNAMES.  The default is to <command>warn</command>.
6561                 </para>
6562               </listitem>
6563             </varlistentry>
6564
6565             <varlistentry>
6566               <term><command>check-srv-cname</command></term>
6567               <listitem>
6568                 <para>
6569                   If <command>check-integrity</command> is set then
6570                   fail, warn or ignore SRV records that refer
6571                   to CNAMES.  The default is to <command>warn</command>.
6572                 </para>
6573               </listitem>
6574             </varlistentry>
6575
6576             <varlistentry>
6577               <term><command>check-sibling</command></term>
6578               <listitem>
6579                 <para>
6580                   When performing integrity checks, also check that
6581                   sibling glue exists.  The default is <command>yes</command>.
6582                 </para>
6583               </listitem>
6584             </varlistentry>
6585
6586             <varlistentry>
6587               <term><command>check-spf</command></term>
6588               <listitem>
6589                 <para>
6590                   When performing integrity checks, check that the
6591                   two forms of Sender Policy Framwork records (TXT
6592                   records starting with "v=spf1" and SPF) both exist
6593                   or both don't exist and issue a warning if not
6594                   met.  The default is <command>warn</command>.
6595                 </para>
6596               </listitem>
6597             </varlistentry>
6598
6599             <varlistentry>
6600               <term><command>zero-no-soa-ttl</command></term>
6601               <listitem>
6602                 <para>
6603                   When returning authoritative negative responses to
6604                   SOA queries set the TTL of the SOA record returned in
6605                   the authority section to zero.
6606                   The default is <command>yes</command>.
6607                 </para>
6608               </listitem>
6609             </varlistentry>
6610
6611             <varlistentry>
6612               <term><command>zero-no-soa-ttl-cache</command></term>
6613               <listitem>
6614                 <para>
6615                   When caching a negative response to a SOA query
6616                   set the TTL to zero.
6617                   The default is <command>no</command>.
6618                 </para>
6619               </listitem>
6620             </varlistentry>
6621
6622             <varlistentry>
6623               <term><command>update-check-ksk</command></term>
6624               <listitem>
6625                 <para>
6626                   When set to the default value of <literal>yes</literal>,
6627                   check the KSK bit in each key to determine how the key
6628                   should be used when generating RRSIGs for a secure zone.
6629                 </para>
6630                 <para>
6631                   Ordinarily, zone-signing keys (that is, keys without the
6632                   KSK bit set) are used to sign the entire zone, while
6633                   key-signing keys (keys with the KSK bit set) are only
6634                   used to sign the DNSKEY RRset at the zone apex.
6635                   However, if this option is set to <literal>no</literal>,
6636                   then the KSK bit is ignored; KSKs are treated as if they
6637                   were ZSKs and are used to sign the entire zone.  This is
6638                   similar to the <command>dnssec-signzone -z</command>
6639                   command line option.
6640                 </para>
6641                 <para>
6642                   When this option is set to <literal>yes</literal>, there
6643                   must be at least two active keys for every algorithm
6644                   represented in the DNSKEY RRset: at least one KSK and one
6645                   ZSK per algorithm.  If there is any algorithm for which
6646                   this requirement is not met, this option will be ignored
6647                   for that algorithm.
6648                 </para>
6649               </listitem>
6650             </varlistentry>
6651
6652             <varlistentry>
6653               <term><command>dnssec-dnskey-kskonly</command></term>
6654               <listitem>
6655                 <para>
6656                   When this option and <command>update-check-ksk</command>
6657                   are both set to <literal>yes</literal>, only key-signing
6658                   keys (that is, keys with the KSK bit set) will be used
6659                   to sign the DNSKEY RRset at the zone apex.  Zone-signing
6660                   keys (keys without the KSK bit set) will be used to sign
6661                   the remainder of the zone, but not the DNSKEY RRset.
6662                   This is similar to the
6663                   <command>dnssec-signzone -x</command> command line option.
6664                 </para>
6665                 <para>
6666                   The default is <command>no</command>.  If
6667                   <command>update-check-ksk</command> is set to
6668                   <literal>no</literal>, this option is ignored.
6669                 </para>
6670               </listitem>
6671             </varlistentry>
6672
6673             <varlistentry>
6674               <term><command>dnssec-loadkeys-interval</command></term>
6675               <listitem>
6676                 <para>
6677                   When a zone is configured with <command>auto-dnssec
6678                   maintain;</command> its key repository must be checked
6679                   periodically to see if any new keys have been added
6680                   or any existing keys' timing metadata has been updated
6681                   (see <xref linkend="man.dnssec-keygen"/> and
6682                   <xref linkend="man.dnssec-settime"/>).  The
6683                   <command>dnssec-loadkeys-interval</command> option
6684                   sets the frequency of automatic repository checks, in
6685                   minutes.  The default is <literal>60</literal> (1 hour),
6686                   the minimum is <literal>1</literal> (1 minute), and the
6687                   maximum is <literal>1440</literal> (24 hours); any higher
6688                   value is silently reduced.
6689                 </para>
6690               </listitem>
6691             </varlistentry>
6692
6693             <varlistentry>
6694               <term><command>try-tcp-refresh</command></term>
6695               <listitem>
6696                 <para>
6697                   Try to refresh the zone using TCP if UDP queries fail.
6698                   For BIND 8 compatibility, the default is
6699                   <command>yes</command>.
6700                 </para>
6701               </listitem>
6702             </varlistentry>
6703
6704             <varlistentry>
6705               <term><command>dnssec-secure-to-insecure</command></term>
6706               <listitem>
6707                 <para>
6708                   Allow a dynamic zone to transition from secure to
6709                   insecure (i.e., signed to unsigned) by deleting all
6710                   of the DNSKEY records.  The default is <command>no</command>.
6711                   If set to <command>yes</command>, and if the DNSKEY RRset
6712                   at the zone apex is deleted, all RRSIG and NSEC records
6713                   will be removed from the zone as well.
6714                 </para>
6715                 <para>
6716                   If the zone uses NSEC3, then it is also necessary to
6717                   delete the NSEC3PARAM RRset from the zone apex; this will
6718                   cause the removal of all corresponding NSEC3 records.
6719                   (It is expected that this requirement will be eliminated
6720                   in a future release.)
6721                 </para>
6722                 <para>
6723                   Note that if a zone has been configured with
6724                   <command>auto-dnssec maintain</command> and the
6725                   private keys remain accessible in the key repository,
6726                   then the zone will be automatically signed again the
6727                   next time <command>named</command> is started.
6728                 </para>
6729               </listitem>
6730             </varlistentry>
6731
6732           </variablelist>
6733
6734         </sect3>
6735
6736         <sect3>
6737           <title>Forwarding</title>
6738           <para>
6739             The forwarding facility can be used to create a large site-wide
6740             cache on a few servers, reducing traffic over links to external
6741             name servers. It can also be used to allow queries by servers that
6742             do not have direct access to the Internet, but wish to look up
6743             exterior
6744             names anyway. Forwarding occurs only on those queries for which
6745             the server is not authoritative and does not have the answer in
6746             its cache.
6747           </para>
6748
6749           <variablelist>
6750             <varlistentry>
6751               <term><command>forward</command></term>
6752               <listitem>
6753                 <para>
6754                   This option is only meaningful if the
6755                   forwarders list is not empty. A value of <varname>first</varname>,
6756                   the default, causes the server to query the forwarders
6757                   first &mdash; and
6758                   if that doesn't answer the question, the server will then
6759                   look for
6760                   the answer itself. If <varname>only</varname> is
6761                   specified, the
6762                   server will only query the forwarders.
6763                 </para>
6764               </listitem>
6765             </varlistentry>
6766
6767             <varlistentry>
6768               <term><command>forwarders</command></term>
6769               <listitem>
6770                 <para>
6771                   Specifies the IP addresses to be used
6772                   for forwarding. The default is the empty list (no
6773                   forwarding).
6774                 </para>
6775               </listitem>
6776             </varlistentry>
6777
6778           </variablelist>
6779
6780           <para>
6781             Forwarding can also be configured on a per-domain basis, allowing
6782             for the global forwarding options to be overridden in a variety
6783             of ways. You can set particular domains to use different
6784             forwarders,
6785             or have a different <command>forward only/first</command> behavior,
6786             or not forward at all, see <xref linkend="zone_statement_grammar"/>.
6787           </para>
6788         </sect3>
6789
6790         <sect3>
6791           <title>Dual-stack Servers</title>
6792           <para>
6793             Dual-stack servers are used as servers of last resort to work
6794             around
6795             problems in reachability due the lack of support for either IPv4
6796             or IPv6
6797             on the host machine.
6798           </para>
6799
6800           <variablelist>
6801             <varlistentry>
6802               <term><command>dual-stack-servers</command></term>
6803               <listitem>
6804                 <para>
6805                   Specifies host names or addresses of machines with access to
6806                   both IPv4 and IPv6 transports. If a hostname is used, the
6807                   server must be able
6808                   to resolve the name using only the transport it has.  If the
6809                   machine is dual
6810                   stacked, then the <command>dual-stack-servers</command> have no effect unless
6811                   access to a transport has been disabled on the command line
6812                   (e.g. <command>named -4</command>).
6813                 </para>
6814               </listitem>
6815             </varlistentry>
6816           </variablelist>
6817         </sect3>
6818
6819         <sect3 id="access_control">
6820           <title>Access Control</title>
6821
6822           <para>
6823             Access to the server can be restricted based on the IP address
6824             of the requesting system. See <xref linkend="address_match_lists"/> for
6825             details on how to specify IP address lists.
6826           </para>
6827
6828           <variablelist>
6829
6830             <varlistentry>
6831               <term><command>allow-notify</command></term>
6832               <listitem>
6833                 <para>
6834                   Specifies which hosts are allowed to
6835                   notify this server, a slave, of zone changes in addition
6836                   to the zone masters.
6837                   <command>allow-notify</command> may also be
6838                   specified in the
6839                   <command>zone</command> statement, in which case
6840                   it overrides the
6841                   <command>options allow-notify</command>
6842                   statement.  It is only meaningful
6843                   for a slave zone.  If not specified, the default is to
6844                   process notify messages
6845                   only from a zone's master.
6846                 </para>
6847               </listitem>
6848             </varlistentry>
6849
6850             <varlistentry>
6851               <term><command>allow-query</command></term>
6852               <listitem>
6853                 <para>
6854                   Specifies which hosts are allowed to ask ordinary
6855                   DNS questions. <command>allow-query</command> may
6856                   also be specified in the <command>zone</command>
6857                   statement, in which case it overrides the
6858                   <command>options allow-query</command> statement.
6859                   If not specified, the default is to allow queries
6860                   from all hosts.
6861                 </para>
6862                 <note>
6863                   <para>
6864                     <command>allow-query-cache</command> is now
6865                     used to specify access to the cache.
6866                   </para>
6867                 </note>
6868               </listitem>
6869             </varlistentry>
6870
6871             <varlistentry>
6872               <term><command>allow-query-on</command></term>
6873               <listitem>
6874                 <para>
6875                   Specifies which local addresses can accept ordinary
6876                   DNS questions. This makes it possible, for instance,
6877                   to allow queries on internal-facing interfaces but
6878                   disallow them on external-facing ones, without
6879                   necessarily knowing the internal network's addresses.
6880                 </para>
6881                 <para>
6882                   Note that <command>allow-query-on</command> is only
6883                   checked for queries that are permitted by
6884                   <command>allow-query</command>.  A query must be
6885                   allowed by both ACLs, or it will be refused.
6886                 </para>
6887                 <para>
6888                   <command>allow-query-on</command> may
6889                   also be specified in the <command>zone</command>
6890                   statement, in which case it overrides the
6891                   <command>options allow-query-on</command> statement.
6892                 </para>
6893                 <para>
6894                   If not specified, the default is to allow queries
6895                   on all addresses.
6896                 </para>
6897                 <note>
6898                   <para>
6899                     <command>allow-query-cache</command> is
6900                     used to specify access to the cache.
6901                   </para>
6902                 </note>
6903               </listitem>
6904             </varlistentry>
6905
6906             <varlistentry>
6907               <term><command>allow-query-cache</command></term>
6908               <listitem>
6909                 <para>
6910                   Specifies which hosts are allowed to get answers
6911                   from the cache.  If <command>allow-query-cache</command>
6912                   is not set then <command>allow-recursion</command>
6913                   is used if set, otherwise <command>allow-query</command>
6914                   is used if set unless <command>recursion no;</command> is
6915                   set in which case <command>none;</command> is used,
6916                   otherwise the default (<command>localnets;</command>
6917                   <command>localhost;</command>) is used.
6918                 </para>
6919               </listitem>
6920             </varlistentry>
6921
6922             <varlistentry>
6923               <term><command>allow-query-cache-on</command></term>
6924               <listitem>
6925                 <para>
6926                   Specifies which local addresses can give answers
6927                   from the cache.  If not specified, the default is
6928                   to allow cache queries on any address,
6929                   <command>localnets</command> and
6930                   <command>localhost</command>.
6931                 </para>
6932               </listitem>
6933             </varlistentry>
6934
6935             <varlistentry>
6936               <term><command>allow-recursion</command></term>
6937               <listitem>
6938                 <para>
6939                   Specifies which hosts are allowed to make recursive
6940                   queries through this server. If
6941                   <command>allow-recursion</command> is not set
6942                   then <command>allow-query-cache</command> is
6943                   used if set, otherwise <command>allow-query</command>
6944                   is used if set, otherwise the default
6945                   (<command>localnets;</command>
6946                   <command>localhost;</command>) is used.
6947                 </para>
6948               </listitem>
6949             </varlistentry>
6950
6951             <varlistentry>
6952               <term><command>allow-recursion-on</command></term>
6953               <listitem>
6954                 <para>
6955                   Specifies which local addresses can accept recursive
6956                   queries.  If not specified, the default is to allow
6957                   recursive queries on all addresses.
6958                 </para>
6959               </listitem>
6960             </varlistentry>
6961
6962             <varlistentry>
6963               <term><command>allow-update</command></term>
6964               <listitem>
6965                 <para>
6966                   Specifies which hosts are allowed to
6967                   submit Dynamic DNS updates for master zones. The default is
6968                   to deny
6969                   updates from all hosts.  Note that allowing updates based
6970                   on the requestor's IP address is insecure; see
6971                   <xref linkend="dynamic_update_security"/> for details.
6972                 </para>
6973               </listitem>
6974             </varlistentry>
6975
6976             <varlistentry>
6977               <term><command>allow-update-forwarding</command></term>
6978               <listitem>
6979                 <para>
6980                   Specifies which hosts are allowed to
6981                   submit Dynamic DNS updates to slave zones to be forwarded to
6982                   the
6983                   master.  The default is <userinput>{ none; }</userinput>,
6984                   which
6985                   means that no update forwarding will be performed.  To
6986                   enable
6987                   update forwarding, specify
6988                   <userinput>allow-update-forwarding { any; };</userinput>.
6989                   Specifying values other than <userinput>{ none; }</userinput> or
6990                   <userinput>{ any; }</userinput> is usually
6991                   counterproductive, since
6992                   the responsibility for update access control should rest
6993                   with the
6994                   master server, not the slaves.
6995                 </para>
6996                 <para>
6997                   Note that enabling the update forwarding feature on a slave
6998                   server
6999                   may expose master servers relying on insecure IP address
7000                   based
7001                   access control to attacks; see <xref linkend="dynamic_update_security"/>
7002                   for more details.
7003                 </para>
7004               </listitem>
7005             </varlistentry>
7006
7007             <varlistentry>
7008               <term><command>allow-v6-synthesis</command></term>
7009               <listitem>
7010                 <para>
7011                   This option was introduced for the smooth transition from
7012                   AAAA
7013                   to A6 and from "nibble labels" to binary labels.
7014                   However, since both A6 and binary labels were then
7015                   deprecated,
7016                   this option was also deprecated.
7017                   It is now ignored with some warning messages.
7018                 </para>
7019               </listitem>
7020             </varlistentry>
7021
7022             <varlistentry>
7023               <term><command>allow-transfer</command></term>
7024               <listitem>
7025                 <para>
7026                   Specifies which hosts are allowed to
7027                   receive zone transfers from the server. <command>allow-transfer</command> may
7028                   also be specified in the <command>zone</command>
7029                   statement, in which
7030                   case it overrides the <command>options allow-transfer</command> statement.
7031                   If not specified, the default is to allow transfers to all
7032                   hosts.
7033                 </para>
7034               </listitem>
7035             </varlistentry>
7036
7037             <varlistentry>
7038               <term><command>blackhole</command></term>
7039               <listitem>
7040                 <para>
7041                   Specifies a list of addresses that the
7042                   server will not accept queries from or use to resolve a
7043                   query. Queries
7044                   from these addresses will not be responded to. The default
7045                   is <userinput>none</userinput>.
7046                 </para>
7047               </listitem>
7048             </varlistentry>
7049
7050             <varlistentry>
7051               <term><command>filter-aaaa</command></term>
7052               <listitem>
7053                 <para>
7054                   Specifies a list of addresses to which
7055                   <command>filter-aaaa-on-v4</command>
7056                   is applies.  The default is <userinput>any</userinput>.
7057                 </para>
7058               </listitem>
7059             </varlistentry>
7060
7061             <varlistentry>
7062               <term><command>resolver-query-timeout</command></term>
7063               <listitem>
7064                 <para>
7065                   The amount of time the resolver will spend attempting
7066                   to resolve a recursive query before failing.  The default
7067                   and minimum is <literal>10</literal> and the maximum is
7068                   <literal>30</literal>.  Setting it to <literal>0</literal>
7069                   will result in the default being used.
7070                 </para>
7071               </listitem>
7072             </varlistentry>
7073           </variablelist>
7074
7075         </sect3>
7076
7077         <sect3>
7078           <title>Interfaces</title>
7079           <para>
7080             The interfaces and ports that the server will answer queries
7081             from may be specified using the <command>listen-on</command> option. <command>listen-on</command> takes
7082             an optional port and an <varname>address_match_list</varname>.
7083             The server will listen on all interfaces allowed by the address
7084             match list. If a port is not specified, port 53 will be used.
7085           </para>
7086           <para>
7087             Multiple <command>listen-on</command> statements are
7088             allowed.
7089             For example,
7090           </para>
7091
7092 <programlisting>listen-on { 5.6.7.8; };
7093 listen-on port 1234 { !1.2.3.4; 1.2/16; };
7094 </programlisting>
7095
7096           <para>
7097             will enable the name server on port 53 for the IP address
7098             5.6.7.8, and on port 1234 of an address on the machine in net
7099             1.2 that is not 1.2.3.4.
7100           </para>
7101
7102           <para>
7103             If no <command>listen-on</command> is specified, the
7104             server will listen on port 53 on all IPv4 interfaces.
7105           </para>
7106
7107           <para>
7108             The <command>listen-on-v6</command> option is used to
7109             specify the interfaces and the ports on which the server will
7110             listen
7111             for incoming queries sent using IPv6.
7112           </para>
7113
7114           <para>
7115             When <programlisting>{ any; }</programlisting> is
7116             specified
7117             as the <varname>address_match_list</varname> for the
7118             <command>listen-on-v6</command> option,
7119             the server does not bind a separate socket to each IPv6 interface
7120             address as it does for IPv4 if the operating system has enough API
7121             support for IPv6 (specifically if it conforms to RFC 3493 and RFC
7122             3542).
7123             Instead, it listens on the IPv6 wildcard address.
7124             If the system only has incomplete API support for IPv6, however,
7125             the behavior is the same as that for IPv4.
7126           </para>
7127
7128           <para>
7129             A list of particular IPv6 addresses can also be specified, in
7130             which case
7131             the server listens on a separate socket for each specified
7132             address,
7133             regardless of whether the desired API is supported by the system.
7134           </para>
7135
7136           <para>
7137             Multiple <command>listen-on-v6</command> options can
7138             be used.
7139             For example,
7140           </para>
7141
7142 <programlisting>listen-on-v6 { any; };
7143 listen-on-v6 port 1234 { !2001:db8::/32; any; };
7144 </programlisting>
7145
7146           <para>
7147             will enable the name server on port 53 for any IPv6 addresses
7148             (with a single wildcard socket),
7149             and on port 1234 of IPv6 addresses that is not in the prefix
7150             2001:db8::/32 (with separate sockets for each matched address.)
7151           </para>
7152
7153           <para>
7154             To make the server not listen on any IPv6 address, use
7155           </para>
7156
7157 <programlisting>listen-on-v6 { none; };
7158 </programlisting>
7159
7160           <para>
7161             If no <command>listen-on-v6</command> option is
7162             specified, the server will not listen on any IPv6 address
7163             unless <command>-6</command> is specified when <command>named</command> is
7164             invoked.  If <command>-6</command> is specified then
7165             <command>named</command> will listen on port 53 on all IPv6 interfaces by default.
7166           </para>
7167         </sect3>
7168
7169         <sect3 id="query_address">
7170           <title>Query Address</title>
7171           <para>
7172             If the server doesn't know the answer to a question, it will
7173             query other name servers. <command>query-source</command> specifies
7174             the address and port used for such queries. For queries sent over
7175             IPv6, there is a separate <command>query-source-v6</command> option.
7176             If <command>address</command> is <command>*</command> (asterisk) or is omitted,
7177             a wildcard IP address (<command>INADDR_ANY</command>)
7178             will be used.
7179           </para>
7180
7181           <para>
7182             If <command>port</command> is <command>*</command> or is omitted,
7183             a random port number from a pre-configured
7184             range is picked up and will be used for each query.
7185             The port range(s) is that specified in
7186             the <command>use-v4-udp-ports</command> (for IPv4)
7187             and <command>use-v6-udp-ports</command> (for IPv6)
7188             options, excluding the ranges specified in
7189             the <command>avoid-v4-udp-ports</command>
7190             and <command>avoid-v6-udp-ports</command> options, respectively.
7191           </para>
7192
7193           <para>
7194             The defaults of the <command>query-source</command> and
7195             <command>query-source-v6</command> options
7196             are:
7197           </para>
7198
7199 <programlisting>query-source address * port *;
7200 query-source-v6 address * port *;
7201 </programlisting>
7202
7203           <para>
7204             If <command>use-v4-udp-ports</command> or
7205             <command>use-v6-udp-ports</command> is unspecified,
7206             <command>named</command> will check if the operating
7207             system provides a programming interface to retrieve the
7208             system's default range for ephemeral ports.
7209             If such an interface is available,
7210             <command>named</command> will use the corresponding system
7211             default range; otherwise, it will use its own defaults:
7212          </para>
7213
7214 <programlisting>use-v4-udp-ports { range 1024 65535; };
7215 use-v6-udp-ports { range 1024 65535; };
7216 </programlisting>
7217
7218           <para>
7219             Note: make sure the ranges be sufficiently large for
7220             security.  A desirable size depends on various parameters,
7221             but we generally recommend it contain at least 16384 ports
7222             (14 bits of entropy).
7223             Note also that the system's default range when used may be
7224             too small for this purpose, and that the range may even be
7225             changed while <command>named</command> is running; the new
7226             range will automatically be applied when <command>named</command>
7227             is reloaded.
7228             It is encouraged to
7229             configure <command>use-v4-udp-ports</command> and
7230             <command>use-v6-udp-ports</command> explicitly so that the
7231             ranges are sufficiently large and are reasonably
7232             independent from the ranges used by other applications.
7233           </para>
7234
7235           <para>
7236             Note: the operational configuration
7237             where <command>named</command> runs may prohibit the use
7238             of some ports.  For example, UNIX systems will not allow
7239             <command>named</command> running without a root privilege
7240             to use ports less than 1024.
7241             If such ports are included in the specified (or detected)
7242             set of query ports, the corresponding query attempts will
7243             fail, resulting in resolution failures or delay.
7244             It is therefore important to configure the set of ports
7245             that can be safely used in the expected operational environment.
7246           </para>
7247
7248           <para>
7249             The defaults of the <command>avoid-v4-udp-ports</command> and
7250             <command>avoid-v6-udp-ports</command> options
7251             are:
7252           </para>
7253
7254 <programlisting>avoid-v4-udp-ports {};
7255 avoid-v6-udp-ports {};
7256 </programlisting>
7257
7258           <para>
7259             Note: BIND 9.5.0 introduced
7260             the <command>use-queryport-pool</command> 
7261             option to support a pool of such random ports, but this
7262             option is now obsolete because reusing the same ports in
7263             the pool may not be sufficiently secure.
7264             For the same reason, it is generally strongly discouraged to
7265             specify a particular port for the
7266             <command>query-source</command> or
7267             <command>query-source-v6</command> options;
7268             it implicitly disables the use of randomized port numbers.
7269           </para>
7270
7271           <variablelist>
7272             <varlistentry>
7273               <term><command>use-queryport-pool</command></term>
7274               <listitem>
7275                 <para>
7276                   This option is obsolete.
7277                 </para>
7278               </listitem>
7279             </varlistentry>
7280
7281             <varlistentry>
7282               <term><command>queryport-pool-ports</command></term>
7283               <listitem>
7284                 <para>
7285                   This option is obsolete.
7286                 </para>
7287               </listitem>
7288             </varlistentry>
7289
7290             <varlistentry>
7291               <term><command>queryport-pool-updateinterval</command></term>
7292               <listitem>
7293                 <para>
7294                   This option is obsolete.
7295                 </para>
7296               </listitem>
7297             </varlistentry>
7298             
7299           </variablelist>
7300           <note>
7301             <para>
7302               The address specified in the <command>query-source</command> option
7303               is used for both UDP and TCP queries, but the port applies only
7304               to UDP queries.  TCP queries always use a random
7305               unprivileged port.
7306             </para>
7307           </note>
7308           <note>
7309             <para>
7310               Solaris 2.5.1 and earlier does not support setting the source
7311               address for TCP sockets.
7312             </para>
7313           </note>
7314           <note>
7315             <para>
7316               See also <command>transfer-source</command> and
7317               <command>notify-source</command>.
7318             </para>
7319           </note>
7320         </sect3>
7321
7322         <sect3 id="zone_transfers">
7323           <title>Zone Transfers</title>
7324           <para>
7325             <acronym>BIND</acronym> has mechanisms in place to
7326             facilitate zone transfers
7327             and set limits on the amount of load that transfers place on the
7328             system. The following options apply to zone transfers.
7329           </para>
7330
7331           <variablelist>
7332
7333             <varlistentry>
7334               <term><command>also-notify</command></term>
7335               <listitem>
7336                 <para>
7337                   Defines a global list of IP addresses of name servers
7338                   that are also sent NOTIFY messages whenever a fresh copy of
7339                   the
7340                   zone is loaded, in addition to the servers listed in the
7341                   zone's NS records.
7342                   This helps to ensure that copies of the zones will
7343                   quickly converge on stealth servers.
7344                   Optionally, a port may be specified with each
7345                   <command>also-notify</command> address to send
7346                   the notify messages to a port other than the
7347                   default of 53.
7348                   An optional TSIG key can also be specified with each
7349                   address to cause the notify messages to be signed; this
7350                   can be useful when sending notifies to multiple views.
7351                   In place of explicit addresses, one or more named
7352                   <command>masters</command> lists can be used.
7353                 </para>
7354                 <para>
7355                   If an <command>also-notify</command> list
7356                   is given in a <command>zone</command> statement,
7357                   it will override
7358                   the <command>options also-notify</command>
7359                   statement. When a <command>zone notify</command>
7360                   statement
7361                   is set to <command>no</command>, the IP
7362                   addresses in the global <command>also-notify</command> list will
7363                   not be sent NOTIFY messages for that zone. The default is
7364                   the empty
7365                   list (no global notification list).
7366                 </para>
7367               </listitem>
7368             </varlistentry>
7369
7370             <varlistentry>
7371               <term><command>max-transfer-time-in</command></term>
7372               <listitem>
7373                 <para>
7374                   Inbound zone transfers running longer than
7375                   this many minutes will be terminated. The default is 120
7376                   minutes
7377                   (2 hours).  The maximum value is 28 days (40320 minutes).
7378                 </para>
7379               </listitem>
7380             </varlistentry>
7381
7382             <varlistentry>
7383               <term><command>max-transfer-idle-in</command></term>
7384               <listitem>
7385                 <para>
7386                   Inbound zone transfers making no progress
7387                   in this many minutes will be terminated. The default is 60
7388                   minutes
7389                   (1 hour).  The maximum value is 28 days (40320 minutes).
7390                 </para>
7391               </listitem>
7392             </varlistentry>
7393
7394             <varlistentry>
7395               <term><command>max-transfer-time-out</command></term>
7396               <listitem>
7397                 <para>
7398                   Outbound zone transfers running longer than
7399                   this many minutes will be terminated. The default is 120
7400                   minutes
7401                   (2 hours).  The maximum value is 28 days (40320 minutes).
7402                 </para>
7403               </listitem>
7404             </varlistentry>
7405
7406             <varlistentry>
7407               <term><command>max-transfer-idle-out</command></term>
7408               <listitem>
7409                 <para>
7410                   Outbound zone transfers making no progress
7411                   in this many minutes will be terminated.  The default is 60
7412                   minutes (1
7413                   hour).  The maximum value is 28 days (40320 minutes).
7414                 </para>
7415               </listitem>
7416             </varlistentry>
7417
7418             <varlistentry>
7419               <term><command>serial-query-rate</command></term>
7420               <listitem>
7421                 <para>
7422                   Slave servers will periodically query master
7423                   servers to find out if zone serial numbers have
7424                   changed. Each such query uses a minute amount of
7425                   the slave server's network bandwidth.  To limit
7426                   the amount of bandwidth used, BIND 9 limits the
7427                   rate at which queries are sent.  The value of the
7428                   <command>serial-query-rate</command> option, an
7429                   integer, is the maximum number of queries sent
7430                   per second.  The default is 20.
7431                 </para>
7432                 <para>
7433                   In addition to controlling the rate SOA refresh
7434                   queries are issued at
7435                   <command>serial-query-rate</command> also controls
7436                   the rate at which NOTIFY messages are sent from
7437                   both master and slave zones.
7438                 </para>
7439               </listitem>
7440             </varlistentry>
7441
7442             <varlistentry>
7443               <term><command>serial-queries</command></term>
7444               <listitem>
7445                 <para>
7446                   In BIND 8, the <command>serial-queries</command>
7447                   option
7448                   set the maximum number of concurrent serial number queries
7449                   allowed to be outstanding at any given time.
7450                   BIND 9 does not limit the number of outstanding
7451                   serial queries and ignores the <command>serial-queries</command> option.
7452                   Instead, it limits the rate at which the queries are sent
7453                   as defined using the <command>serial-query-rate</command> option.
7454                 </para>
7455               </listitem>
7456             </varlistentry>
7457
7458             <varlistentry>
7459               <term><command>transfer-format</command></term>
7460               <listitem>
7461
7462                 <para>
7463                   Zone transfers can be sent using two different formats,
7464                   <command>one-answer</command> and
7465                   <command>many-answers</command>.
7466                   The <command>transfer-format</command> option is used
7467                   on the master server to determine which format it sends.
7468                   <command>one-answer</command> uses one DNS message per
7469                   resource record transferred.
7470                   <command>many-answers</command> packs as many resource
7471                   records as possible into a message.
7472                   <command>many-answers</command> is more efficient, but is
7473                   only supported by relatively new slave servers,
7474                   such as <acronym>BIND</acronym> 9, <acronym>BIND</acronym>
7475                   8.x and <acronym>BIND</acronym> 4.9.5 onwards.
7476                   The <command>many-answers</command> format is also supported by
7477                   recent Microsoft Windows nameservers.
7478                   The default is <command>many-answers</command>.
7479                   <command>transfer-format</command> may be overridden on a
7480                   per-server basis by using the <command>server</command>
7481                   statement.
7482                 </para>
7483
7484               </listitem>
7485             </varlistentry>
7486
7487             <varlistentry>
7488               <term><command>transfers-in</command></term>
7489               <listitem>
7490                 <para>
7491                   The maximum number of inbound zone transfers
7492                   that can be running concurrently. The default value is <literal>10</literal>.
7493                   Increasing <command>transfers-in</command> may
7494                   speed up the convergence
7495                   of slave zones, but it also may increase the load on the
7496                   local system.
7497                 </para>
7498               </listitem>
7499             </varlistentry>
7500
7501             <varlistentry>
7502               <term><command>transfers-out</command></term>
7503               <listitem>
7504                 <para>
7505                   The maximum number of outbound zone transfers
7506                   that can be running concurrently. Zone transfer requests in
7507                   excess
7508                   of the limit will be refused. The default value is <literal>10</literal>.
7509                 </para>
7510               </listitem>
7511             </varlistentry>
7512
7513             <varlistentry>
7514               <term><command>transfers-per-ns</command></term>
7515               <listitem>
7516                 <para>
7517                   The maximum number of inbound zone transfers
7518                   that can be concurrently transferring from a given remote
7519                   name server.
7520                   The default value is <literal>2</literal>.
7521                   Increasing <command>transfers-per-ns</command>
7522                   may
7523                   speed up the convergence of slave zones, but it also may
7524                   increase
7525                   the load on the remote name server. <command>transfers-per-ns</command> may
7526                   be overridden on a per-server basis by using the <command>transfers</command> phrase
7527                   of the <command>server</command> statement.
7528                 </para>
7529               </listitem>
7530             </varlistentry>
7531
7532             <varlistentry>
7533               <term><command>transfer-source</command></term>
7534               <listitem>
7535                 <para><command>transfer-source</command>
7536                   determines which local address will be bound to IPv4
7537                   TCP connections used to fetch zones transferred
7538                   inbound by the server.  It also determines the
7539                   source IPv4 address, and optionally the UDP port,
7540                   used for the refresh queries and forwarded dynamic
7541                   updates.  If not set, it defaults to a system
7542                   controlled value which will usually be the address
7543                   of the interface "closest to" the remote end. This
7544                   address must appear in the remote end's
7545                   <command>allow-transfer</command> option for the
7546                   zone being transferred, if one is specified. This
7547                   statement sets the
7548                   <command>transfer-source</command> for all zones,
7549                   but can be overridden on a per-view or per-zone
7550                   basis by including a
7551                   <command>transfer-source</command> statement within
7552                   the <command>view</command> or
7553                   <command>zone</command> block in the configuration
7554                   file.
7555                 </para>
7556                 <note>
7557                   <para>
7558                     Solaris 2.5.1 and earlier does not support setting the
7559                     source address for TCP sockets.
7560                   </para>
7561                 </note>
7562               </listitem>
7563             </varlistentry>
7564
7565             <varlistentry>
7566               <term><command>transfer-source-v6</command></term>
7567               <listitem>
7568                 <para>
7569                   The same as <command>transfer-source</command>,
7570                   except zone transfers are performed using IPv6.
7571                 </para>
7572               </listitem>
7573             </varlistentry>
7574
7575             <varlistentry>
7576               <term><command>alt-transfer-source</command></term>
7577               <listitem>
7578                 <para>
7579                   An alternate transfer source if the one listed in
7580                   <command>transfer-source</command> fails and
7581                   <command>use-alt-transfer-source</command> is
7582                   set.
7583                 </para>
7584                 <note>
7585                   If you do not wish the alternate transfer source
7586                   to be used, you should set
7587                   <command>use-alt-transfer-source</command>
7588                   appropriately and you should not depend upon
7589                   getting an answer back to the first refresh
7590                   query.
7591                 </note>
7592               </listitem>
7593             </varlistentry>
7594
7595             <varlistentry>
7596               <term><command>alt-transfer-source-v6</command></term>
7597               <listitem>
7598                 <para>
7599                   An alternate transfer source if the one listed in
7600                   <command>transfer-source-v6</command> fails and
7601                   <command>use-alt-transfer-source</command> is
7602                   set.
7603                 </para>
7604               </listitem>
7605             </varlistentry>
7606
7607             <varlistentry>
7608               <term><command>use-alt-transfer-source</command></term>
7609               <listitem>
7610                 <para>
7611                   Use the alternate transfer sources or not.  If views are
7612                   specified this defaults to <command>no</command>
7613                   otherwise it defaults to
7614                   <command>yes</command> (for BIND 8
7615                   compatibility).
7616                 </para>
7617               </listitem>
7618             </varlistentry>
7619
7620             <varlistentry>
7621               <term><command>notify-source</command></term>
7622               <listitem>
7623                 <para><command>notify-source</command>
7624                   determines which local source address, and
7625                   optionally UDP port, will be used to send NOTIFY
7626                   messages.  This address must appear in the slave
7627                   server's <command>masters</command> zone clause or
7628                   in an <command>allow-notify</command> clause.  This
7629                   statement sets the <command>notify-source</command>
7630                   for all zones, but can be overridden on a per-zone or
7631                   per-view basis by including a
7632                   <command>notify-source</command> statement within
7633                   the <command>zone</command> or
7634                   <command>view</command> block in the configuration
7635                   file.
7636                 </para>
7637                 <note>
7638                   <para>
7639                     Solaris 2.5.1 and earlier does not support setting the
7640                     source address for TCP sockets.
7641                   </para>
7642                 </note>
7643               </listitem>
7644             </varlistentry>
7645
7646             <varlistentry>
7647               <term><command>notify-source-v6</command></term>
7648               <listitem>
7649                 <para>
7650                   Like <command>notify-source</command>,
7651                   but applies to notify messages sent to IPv6 addresses.
7652                 </para>
7653               </listitem>
7654             </varlistentry>
7655
7656           </variablelist>
7657
7658         </sect3>
7659
7660         <sect3>
7661           <title>UDP Port Lists</title>
7662           <para>
7663             <command>use-v4-udp-ports</command>,
7664             <command>avoid-v4-udp-ports</command>,
7665             <command>use-v6-udp-ports</command>, and
7666             <command>avoid-v6-udp-ports</command>
7667             specify a list of IPv4 and IPv6 UDP ports that will be
7668             used or not used as source ports for UDP messages.
7669             See <xref linkend="query_address"/> about how the
7670             available ports are determined.
7671             For example, with the following configuration
7672           </para>
7673
7674 <programlisting>
7675 use-v6-udp-ports { range 32768 65535; };
7676 avoid-v6-udp-ports { 40000; range 50000 60000; };
7677 </programlisting>
7678
7679            <para>
7680              UDP ports of IPv6 messages sent
7681              from <command>named</command> will be in one
7682              of the following ranges: 32768 to 39999, 40001 to 49999,
7683              and 60001 to 65535.
7684            </para>
7685
7686            <para>
7687              <command>avoid-v4-udp-ports</command> and
7688              <command>avoid-v6-udp-ports</command> can be used
7689              to prevent <command>named</command> from choosing as its random source port a
7690              port that is blocked by your firewall or a port that is
7691              used by other applications;
7692              if a query went out with a source port blocked by a
7693              firewall, the
7694              answer would not get by the firewall and the name server would
7695              have to query again.
7696              Note: the desired range can also be represented only with
7697              <command>use-v4-udp-ports</command> and
7698              <command>use-v6-udp-ports</command>, and the
7699              <command>avoid-</command> options are redundant in that
7700              sense; they are provided for backward compatibility and
7701              to possibly simplify the port specification.
7702            </para>
7703         </sect3>
7704
7705         <sect3>
7706           <title>Operating System Resource Limits</title>
7707
7708           <para>
7709             The server's usage of many system resources can be limited.
7710             Scaled values are allowed when specifying resource limits.  For
7711             example, <command>1G</command> can be used instead of
7712             <command>1073741824</command> to specify a limit of
7713             one
7714             gigabyte. <command>unlimited</command> requests
7715             unlimited use, or the
7716             maximum available amount. <command>default</command>
7717             uses the limit
7718             that was in force when the server was started. See the description
7719             of <command>size_spec</command> in <xref linkend="configuration_file_elements"/>.
7720           </para>
7721
7722           <para>
7723             The following options set operating system resource limits for
7724             the name server process.  Some operating systems don't support
7725             some or
7726             any of the limits. On such systems, a warning will be issued if
7727             the
7728             unsupported limit is used.
7729           </para>
7730
7731           <variablelist>
7732
7733             <varlistentry>
7734               <term><command>coresize</command></term>
7735               <listitem>
7736                 <para>
7737                   The maximum size of a core dump. The default
7738                   is <literal>default</literal>.
7739                 </para>
7740               </listitem>
7741             </varlistentry>
7742
7743             <varlistentry>
7744               <term><command>datasize</command></term>
7745               <listitem>
7746                 <para>
7747                   The maximum amount of data memory the server
7748                   may use. The default is <literal>default</literal>.
7749                   This is a hard limit on server memory usage.
7750                   If the server attempts to allocate memory in excess of this
7751                   limit, the allocation will fail, which may in turn leave
7752                   the server unable to perform DNS service.  Therefore,
7753                   this option is rarely useful as a way of limiting the
7754                   amount of memory used by the server, but it can be used
7755                   to raise an operating system data size limit that is
7756                   too small by default.  If you wish to limit the amount
7757                   of memory used by the server, use the
7758                   <command>max-cache-size</command> and
7759                   <command>recursive-clients</command>
7760                   options instead.
7761                 </para>
7762               </listitem>
7763             </varlistentry>
7764
7765             <varlistentry>
7766               <term><command>files</command></term>
7767               <listitem>
7768                 <para>
7769                   The maximum number of files the server
7770                   may have open concurrently. The default is <literal>unlimited</literal>.
7771                 </para>
7772               </listitem>
7773             </varlistentry>
7774
7775             <varlistentry>
7776               <term><command>stacksize</command></term>
7777               <listitem>
7778                 <para>
7779                   The maximum amount of stack memory the server
7780                   may use. The default is <literal>default</literal>.
7781                 </para>
7782               </listitem>
7783             </varlistentry>
7784
7785           </variablelist>
7786
7787         </sect3>
7788
7789         <sect3 id="server_resource_limits">
7790           <title>Server  Resource Limits</title>
7791
7792           <para>
7793             The following options set limits on the server's
7794             resource consumption that are enforced internally by the
7795             server rather than the operating system.
7796           </para>
7797
7798           <variablelist>
7799
7800             <varlistentry>
7801               <term><command>max-ixfr-log-size</command></term>
7802               <listitem>
7803                 <para>
7804                   This option is obsolete; it is accepted
7805                   and ignored for BIND 8 compatibility.  The option
7806                   <command>max-journal-size</command> performs a
7807                   similar function in BIND 9.
7808                 </para>
7809               </listitem>
7810             </varlistentry>
7811
7812             <varlistentry>
7813               <term><command>max-journal-size</command></term>
7814               <listitem>
7815                 <para>
7816                   Sets a maximum size for each journal file
7817                   (see <xref linkend="journal"/>).  When the journal file
7818                   approaches
7819                   the specified size, some of the oldest transactions in the
7820                   journal
7821                   will be automatically removed.  The largest permitted
7822                   value is 2 gigabytes. The default is
7823                   <literal>unlimited</literal>, which also
7824                   means 2 gigabytes.
7825                   This may also be set on a per-zone basis.
7826                 </para>
7827               </listitem>
7828             </varlistentry>
7829
7830             <varlistentry>
7831               <term><command>host-statistics-max</command></term>
7832               <listitem>
7833                 <para>
7834                   In BIND 8, specifies the maximum number of host statistics
7835                   entries to be kept.
7836                   Not implemented in BIND 9.
7837                 </para>
7838               </listitem>
7839             </varlistentry>
7840
7841             <varlistentry>
7842               <term><command>recursive-clients</command></term>
7843               <listitem>
7844                 <para>
7845                   The maximum number of simultaneous recursive lookups
7846                   the server will perform on behalf of clients.  The default
7847                   is
7848                   <literal>1000</literal>.  Because each recursing
7849                   client uses a fair
7850                   bit of memory, on the order of 20 kilobytes, the value of
7851                   the
7852                   <command>recursive-clients</command> option may
7853                   have to be decreased
7854                   on hosts with limited memory.
7855                 </para>
7856               </listitem>
7857             </varlistentry>
7858
7859             <varlistentry>
7860               <term><command>tcp-clients</command></term>
7861               <listitem>
7862                 <para>
7863                   The maximum number of simultaneous client TCP
7864                   connections that the server will accept.
7865                   The default is <literal>100</literal>.
7866                 </para>
7867               </listitem>
7868             </varlistentry>
7869
7870             <varlistentry>
7871               <term><command>reserved-sockets</command></term>
7872               <listitem>
7873                 <para>
7874                   The number of file descriptors reserved for TCP, stdio,
7875                   etc.  This needs to be big enough to cover the number of
7876                   interfaces <command>named</command> listens on, <command>tcp-clients</command> as well as
7877                   to provide room for outgoing TCP queries and incoming zone
7878                   transfers.  The default is <literal>512</literal>.
7879                   The minimum value is <literal>128</literal> and the
7880                   maximum value is <literal>128</literal> less than
7881                   maxsockets (-S).  This option may be removed in the future.
7882                 </para>
7883                 <para>
7884                   This option has little effect on Windows.
7885                 </para>
7886               </listitem>
7887             </varlistentry>
7888
7889             <varlistentry>
7890               <term><command>max-cache-size</command></term>
7891               <listitem>
7892                 <para>
7893                   The maximum amount of memory to use for the
7894                   server's cache, in bytes.
7895                   When the amount of data in the cache
7896                   reaches this limit, the server will cause records to expire
7897                   prematurely based on an LRU based strategy so that
7898                   the limit is not exceeded.
7899                   A value of 0 is special, meaning that
7900                   records are purged from the cache only when their
7901                   TTLs expire.
7902                   Another special keyword <userinput>unlimited</userinput>
7903                   means the maximum value of 32-bit unsigned integers
7904                   (0xffffffff), which may not have the same effect as
7905                   0 on machines that support more than 32 bits of
7906                   memory space.
7907                   Any positive values less than 2MB will be ignored reset
7908                   to 2MB.
7909                   In a server with multiple views, the limit applies
7910                   separately to the cache of each view.
7911                   The default is 0.
7912                 </para>
7913               </listitem>
7914             </varlistentry>
7915
7916             <varlistentry>
7917               <term><command>tcp-listen-queue</command></term>
7918               <listitem>
7919                 <para>
7920                   The listen queue depth.  The default and minimum is 10.
7921                   If the kernel supports the accept filter "dataready" this
7922                   also controls how
7923                   many TCP connections that will be queued in kernel space
7924                   waiting for
7925                   some data before being passed to accept.  Nonzero values
7926                   less than 10 will be silently raised. A value of 0 may also
7927                   be used; on most platforms this sets the listen queue 
7928                   length to a system-defined default value.
7929                 </para>
7930               </listitem>
7931             </varlistentry>
7932
7933           </variablelist>
7934
7935         </sect3>
7936
7937         <sect3>
7938           <title>Periodic Task Intervals</title>
7939
7940           <variablelist>
7941
7942             <varlistentry>
7943               <term><command>cleaning-interval</command></term>
7944               <listitem>
7945                 <para>
7946                   This interval is effectively obsolete.  Previously,
7947                   the server would remove expired resource records
7948                   from the cache every <command>cleaning-interval</command> minutes.
7949                   <acronym>BIND</acronym> 9 now manages cache
7950                   memory in a more sophisticated manner and does not
7951                   rely on the periodic cleaning any more.
7952                   Specifying this option therefore has no effect on
7953                   the server's behavior.
7954                 </para>
7955               </listitem>
7956             </varlistentry>
7957
7958             <varlistentry>
7959               <term><command>heartbeat-interval</command></term>
7960               <listitem>
7961                 <para>
7962                   The server will perform zone maintenance tasks
7963                   for all zones marked as <command>dialup</command> whenever this
7964                   interval expires. The default is 60 minutes. Reasonable
7965                   values are up
7966                   to 1 day (1440 minutes).  The maximum value is 28 days
7967                   (40320 minutes).
7968                   If set to 0, no zone maintenance for these zones will occur.
7969                 </para>
7970               </listitem>
7971             </varlistentry>
7972
7973             <varlistentry>
7974               <term><command>interface-interval</command></term>
7975               <listitem>
7976                 <para>
7977                   The server will scan the network interface list
7978                   every <command>interface-interval</command>
7979                   minutes. The default
7980                   is 60 minutes. The maximum value is 28 days (40320 minutes).
7981                   If set to 0, interface scanning will only occur when
7982                   the configuration file is  loaded. After the scan, the
7983                   server will
7984                   begin listening for queries on any newly discovered
7985                   interfaces (provided they are allowed by the
7986                   <command>listen-on</command> configuration), and
7987                   will
7988                   stop listening on interfaces that have gone away.
7989                 </para>
7990               </listitem>
7991             </varlistentry>
7992
7993             <varlistentry>
7994               <term><command>statistics-interval</command></term>
7995               <listitem>
7996                 <para>
7997                   Name server statistics will be logged
7998                   every <command>statistics-interval</command>
7999                   minutes. The default is
8000                   60. The maximum value is 28 days (40320 minutes).
8001                   If set to 0, no statistics will be logged.
8002                   </para><note>
8003                   <simpara>
8004                     Not yet implemented in
8005                     <acronym>BIND</acronym> 9.
8006                   </simpara>
8007                 </note>
8008               </listitem>
8009             </varlistentry>
8010
8011           </variablelist>
8012
8013         </sect3>
8014
8015         <sect3 id="topology">
8016           <title>Topology</title>
8017
8018           <para>
8019             All other things being equal, when the server chooses a name
8020             server
8021             to query from a list of name servers, it prefers the one that is
8022             topologically closest to itself. The <command>topology</command> statement
8023             takes an <command>address_match_list</command> and
8024             interprets it
8025             in a special way. Each top-level list element is assigned a
8026             distance.
8027             Non-negated elements get a distance based on their position in the
8028             list, where the closer the match is to the start of the list, the
8029             shorter the distance is between it and the server. A negated match
8030             will be assigned the maximum distance from the server. If there
8031             is no match, the address will get a distance which is further than
8032             any non-negated list element, and closer than any negated element.
8033             For example,
8034           </para>
8035
8036 <programlisting>topology {
8037     10/8;
8038     !1.2.3/24;
8039     { 1.2/16; 3/8; };
8040 };</programlisting>
8041
8042           <para>
8043             will prefer servers on network 10 the most, followed by hosts
8044             on network 1.2.0.0 (netmask 255.255.0.0) and network 3, with the
8045             exception of hosts on network 1.2.3 (netmask 255.255.255.0), which
8046             is preferred least of all.
8047           </para>
8048           <para>
8049             The default topology is
8050           </para>
8051
8052 <programlisting>    topology { localhost; localnets; };
8053 </programlisting>
8054
8055           <note>
8056             <simpara>
8057               The <command>topology</command> option
8058               is not implemented in <acronym>BIND</acronym> 9.
8059             </simpara>
8060           </note>
8061         </sect3>
8062
8063         <sect3 id="the_sortlist_statement">
8064
8065           <title>The <command>sortlist</command> Statement</title>
8066
8067           <para>
8068             The response to a DNS query may consist of multiple resource
8069             records (RRs) forming a resource records set (RRset).
8070             The name server will normally return the
8071             RRs within the RRset in an indeterminate order
8072             (but see the <command>rrset-order</command>
8073             statement in <xref linkend="rrset_ordering"/>).
8074             The client resolver code should rearrange the RRs as appropriate,
8075             that is, using any addresses on the local net in preference to
8076             other addresses.
8077             However, not all resolvers can do this or are correctly
8078             configured.
8079             When a client is using a local server, the sorting can be performed
8080             in the server, based on the client's address. This only requires
8081             configuring the name servers, not all the clients.
8082           </para>
8083
8084           <para>
8085             The <command>sortlist</command> statement (see below)
8086             takes
8087             an <command>address_match_list</command> and
8088             interprets it even
8089             more specifically than the <command>topology</command>
8090             statement
8091             does (<xref linkend="topology"/>).
8092             Each top level statement in the <command>sortlist</command> must
8093             itself be an explicit <command>address_match_list</command> with
8094             one or two elements. The first element (which may be an IP
8095             address,
8096             an IP prefix, an ACL name or a nested <command>address_match_list</command>)
8097             of each top level list is checked against the source address of
8098             the query until a match is found.
8099           </para>
8100           <para>
8101             Once the source address of the query has been matched, if
8102             the top level statement contains only one element, the actual
8103             primitive
8104             element that matched the source address is used to select the
8105             address
8106             in the response to move to the beginning of the response. If the
8107             statement is a list of two elements, then the second element is
8108             treated the same as the <command>address_match_list</command> in
8109             a <command>topology</command> statement. Each top
8110             level element
8111             is assigned a distance and the address in the response with the
8112             minimum
8113             distance is moved to the beginning of the response.
8114           </para>
8115           <para>
8116             In the following example, any queries received from any of
8117             the addresses of the host itself will get responses preferring
8118             addresses
8119             on any of the locally connected networks. Next most preferred are
8120             addresses
8121             on the 192.168.1/24 network, and after that either the
8122             192.168.2/24
8123             or
8124             192.168.3/24 network with no preference shown between these two
8125             networks. Queries received from a host on the 192.168.1/24 network
8126             will prefer other addresses on that network to the 192.168.2/24
8127             and
8128             192.168.3/24 networks. Queries received from a host on the
8129             192.168.4/24
8130             or the 192.168.5/24 network will only prefer other addresses on
8131             their directly connected networks.
8132           </para>
8133
8134 <programlisting>sortlist {
8135     // IF the local host
8136     // THEN first fit on the following nets
8137     { localhost;
8138         { localnets;
8139             192.168.1/24;
8140             { 192.168.2/24; 192.168.3/24; }; }; };
8141     // IF on class C 192.168.1 THEN use .1, or .2 or .3
8142     { 192.168.1/24;
8143         { 192.168.1/24;
8144             { 192.168.2/24; 192.168.3/24; }; }; };
8145     // IF on class C 192.168.2 THEN use .2, or .1 or .3
8146     { 192.168.2/24;
8147         { 192.168.2/24;
8148             { 192.168.1/24; 192.168.3/24; }; }; };
8149     // IF on class C 192.168.3 THEN use .3, or .1 or .2
8150     { 192.168.3/24;
8151         { 192.168.3/24;
8152             { 192.168.1/24; 192.168.2/24; }; }; };
8153     // IF .4 or .5 THEN prefer that net
8154     { { 192.168.4/24; 192.168.5/24; };
8155     };
8156 };</programlisting>
8157
8158           <para>
8159             The following example will give reasonable behavior for the
8160             local host and hosts on directly connected networks. It is similar
8161             to the behavior of the address sort in <acronym>BIND</acronym> 4.9.x. Responses sent
8162             to queries from the local host will favor any of the directly
8163             connected
8164             networks. Responses sent to queries from any other hosts on a
8165             directly
8166             connected network will prefer addresses on that same network.
8167             Responses
8168             to other queries will not be sorted.
8169           </para>
8170
8171 <programlisting>sortlist {
8172            { localhost; localnets; };
8173            { localnets; };
8174 };
8175 </programlisting>
8176
8177         </sect3>
8178         <sect3 id="rrset_ordering">
8179           <title id="rrset_ordering_title">RRset Ordering</title>
8180           <para>
8181             When multiple records are returned in an answer it may be
8182             useful to configure the order of the records placed into the
8183             response.
8184             The <command>rrset-order</command> statement permits
8185             configuration
8186             of the ordering of the records in a multiple record response.
8187             See also the <command>sortlist</command> statement,
8188             <xref linkend="the_sortlist_statement"/>.
8189           </para>
8190
8191           <para>
8192             An <command>order_spec</command> is defined as
8193             follows:
8194           </para>
8195           <para>
8196             <optional>class <replaceable>class_name</replaceable></optional>
8197             <optional>type <replaceable>type_name</replaceable></optional>
8198             <optional>name <replaceable>"domain_name"</replaceable></optional>
8199             order <replaceable>ordering</replaceable>
8200           </para>
8201           <para>
8202             If no class is specified, the default is <command>ANY</command>.
8203             If no type is specified, the default is <command>ANY</command>.
8204             If no name is specified, the default is "<command>*</command>" (asterisk).
8205           </para>
8206           <para>
8207             The legal values for <command>ordering</command> are:
8208           </para>
8209           <informaltable colsep="0" rowsep="0">
8210             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
8211               <colspec colname="1" colnum="1" colsep="0" colwidth="0.750in"/>
8212               <colspec colname="2" colnum="2" colsep="0" colwidth="3.750in"/>
8213               <tbody>
8214                 <row rowsep="0">
8215                   <entry colname="1">
8216                     <para><command>fixed</command></para>
8217                   </entry>
8218                   <entry colname="2">
8219                     <para>
8220                       Records are returned in the order they
8221                       are defined in the zone file.
8222                     </para>
8223                   </entry>
8224                 </row>
8225                 <row rowsep="0">
8226                   <entry colname="1">
8227                     <para><command>random</command></para>
8228                   </entry>
8229                   <entry colname="2">
8230                     <para>
8231                       Records are returned in some random order.
8232                     </para>
8233                   </entry>
8234                 </row>
8235                 <row rowsep="0">
8236                   <entry colname="1">
8237                     <para><command>cyclic</command></para>
8238                   </entry>
8239                   <entry colname="2">
8240                     <para>
8241                       Records are returned in a cyclic round-robin order.
8242                     </para>
8243                     <para>
8244                       If <acronym>BIND</acronym> is configured with the
8245                       "--enable-fixed-rrset" option at compile time, then
8246                       the initial ordering of the RRset will match the
8247                       one specified in the zone file.
8248                     </para>
8249                   </entry>
8250                 </row>
8251               </tbody>
8252             </tgroup>
8253           </informaltable>
8254           <para>
8255             For example:
8256           </para>
8257
8258 <programlisting>rrset-order {
8259    class IN type A name "host.example.com" order random;
8260    order cyclic;
8261 };
8262 </programlisting>
8263
8264           <para>
8265             will cause any responses for type A records in class IN that
8266             have "<literal>host.example.com</literal>" as a
8267             suffix, to always be returned
8268             in random order. All other records are returned in cyclic order.
8269           </para>
8270           <para>
8271             If multiple <command>rrset-order</command> statements
8272             appear, they are not combined &mdash; the last one applies.
8273           </para>
8274           <para>
8275             By default, all records are returned in random order.
8276           </para>
8277
8278           <note>
8279             <simpara>
8280               In this release of <acronym>BIND</acronym> 9, the
8281               <command>rrset-order</command> statement does not support
8282               "fixed" ordering by default.  Fixed ordering can be enabled
8283               at compile time by specifying "--enable-fixed-rrset" on
8284               the "configure" command line.
8285             </simpara>
8286           </note>
8287         </sect3>
8288
8289         <sect3 id="tuning">
8290           <title>Tuning</title>
8291
8292           <variablelist>
8293
8294             <varlistentry>
8295               <term><command>lame-ttl</command></term>
8296               <listitem>
8297                 <para>
8298                   Sets the number of seconds to cache a
8299                   lame server indication. 0 disables caching. (This is
8300                   <emphasis role="bold">NOT</emphasis> recommended.)
8301                   The default is <literal>600</literal> (10 minutes) and the
8302                   maximum value is
8303                   <literal>1800</literal> (30 minutes).
8304                 </para>
8305
8306                 <para>
8307                   Lame-ttl also controls the amount of time DNSSEC
8308                   validation failures are cached.  There is a minimum
8309                   of 30 seconds applied to bad cache entries if the
8310                   lame-ttl is set to less than 30 seconds.
8311                 </para>
8312
8313               </listitem>
8314             </varlistentry>
8315
8316             <varlistentry>
8317               <term><command>max-ncache-ttl</command></term>
8318               <listitem>
8319                 <para>
8320                   To reduce network traffic and increase performance,
8321                   the server stores negative answers. <command>max-ncache-ttl</command> is
8322                   used to set a maximum retention time for these answers in
8323                   the server
8324                   in seconds. The default
8325                   <command>max-ncache-ttl</command> is <literal>10800</literal> seconds (3 hours).
8326                   <command>max-ncache-ttl</command> cannot exceed
8327                   7 days and will
8328                   be silently truncated to 7 days if set to a greater value.
8329                 </para>
8330               </listitem>
8331             </varlistentry>
8332
8333             <varlistentry>
8334               <term><command>max-cache-ttl</command></term>
8335               <listitem>
8336                 <para>
8337                   Sets the maximum time for which the server will
8338                   cache ordinary (positive) answers. The default is
8339                   one week (7 days).
8340                   A value of zero may cause all queries to return
8341                   SERVFAIL, because of lost caches of intermediate
8342                   RRsets (such as NS and glue AAAA/A records) in the
8343                   resolution process.
8344                 </para>
8345               </listitem>
8346             </varlistentry>
8347
8348             <varlistentry>
8349               <term><command>min-roots</command></term>
8350               <listitem>
8351                 <para>
8352                   The minimum number of root servers that
8353                   is required for a request for the root servers to be
8354                   accepted. The default
8355                   is <userinput>2</userinput>.
8356                 </para>
8357                 <note>
8358                   <simpara>
8359                     Not implemented in <acronym>BIND</acronym> 9.
8360                   </simpara>
8361                 </note>
8362               </listitem>
8363             </varlistentry>
8364
8365             <varlistentry>
8366               <term><command>sig-validity-interval</command></term>
8367               <listitem>
8368                 <para>
8369                   Specifies the number of days into the future when
8370                   DNSSEC signatures automatically generated as a
8371                   result of dynamic updates (<xref
8372                   linkend="dynamic_update"/>) will expire.  There
8373                   is an optional second field which specifies how
8374                   long before expiry that the signatures will be
8375                   regenerated.  If not specified, the signatures will
8376                   be regenerated at 1/4 of base interval.  The second
8377                   field is specified in days if the base interval is
8378                   greater than 7 days otherwise it is specified in hours.
8379                   The default base interval is <literal>30</literal> days
8380                   giving a re-signing interval of 7 1/2 days.  The maximum
8381                   values are 10 years (3660 days).
8382                 </para>
8383                 <para>
8384                   The signature inception time is unconditionally
8385                   set to one hour before the current time to allow
8386                   for a limited amount of clock skew.
8387                 </para>
8388                 <para>
8389                   The <command>sig-validity-interval</command>
8390                   should be, at least, several multiples of the SOA
8391                   expire interval to allow for reasonable interaction
8392                   between the various timer and expiry dates.
8393                 </para>
8394               </listitem>
8395             </varlistentry>
8396
8397             <varlistentry>
8398               <term><command>sig-signing-nodes</command></term>
8399               <listitem>
8400                 <para>
8401                   Specify the maximum number of nodes to be
8402                   examined in each quantum when signing a zone with
8403                   a new DNSKEY. The default is
8404                   <literal>100</literal>.
8405                 </para>
8406               </listitem>
8407             </varlistentry>
8408
8409             <varlistentry>
8410               <term><command>sig-signing-signatures</command></term>
8411               <listitem>
8412                 <para>
8413                   Specify a threshold number of signatures that
8414                   will terminate processing a quantum when signing
8415                   a zone with a new DNSKEY.  The default is
8416                   <literal>10</literal>.
8417                 </para>
8418               </listitem>
8419             </varlistentry>
8420
8421             <varlistentry>
8422               <term><command>sig-signing-type</command></term>
8423               <listitem>
8424                 <para>
8425                   Specify a private RDATA type to be used when generating
8426                   key signing records.  The default is
8427                   <literal>65534</literal>.
8428                 </para>
8429                 <para>
8430                   It is expected that this parameter may be removed
8431                   in a future version once there is a standard type.
8432                 </para>
8433                 <para>
8434                   These records can be removed from the zone once named
8435                   has completed signing the zone with the matching key
8436                   using <command>nsupdate</command> or
8437                   <command>rndc signing -clear</command>.
8438                   <command>rndc signing -clear</command> is the only supported
8439                   way to remove these records from
8440                   <command>inline-signing</command> zones.
8441                 </para>
8442               </listitem>
8443             </varlistentry>
8444
8445             <varlistentry>
8446               <term><command>min-refresh-time</command></term>
8447               <term><command>max-refresh-time</command></term>
8448               <term><command>min-retry-time</command></term>
8449               <term><command>max-retry-time</command></term>
8450               <listitem>
8451                 <para>
8452                   These options control the server's behavior on refreshing a
8453                   zone
8454                   (querying for SOA changes) or retrying failed transfers.
8455                   Usually the SOA values for the zone are used, but these
8456                   values
8457                   are set by the master, giving slave server administrators
8458                   little
8459                   control over their contents.
8460                 </para>
8461                 <para>
8462                   These options allow the administrator to set a minimum and
8463                   maximum
8464                   refresh and retry time either per-zone, per-view, or
8465                   globally.
8466                   These options are valid for slave and stub zones,
8467                   and clamp the SOA refresh and retry times to the specified
8468                   values.
8469                 </para>
8470                 <para>
8471                   The following defaults apply.
8472                   <command>min-refresh-time</command> 300 seconds,
8473                   <command>max-refresh-time</command> 2419200 seconds
8474                   (4 weeks), <command>min-retry-time</command> 500 seconds,
8475                   and <command>max-retry-time</command> 1209600 seconds
8476                   (2 weeks).
8477                 </para>
8478               </listitem>
8479             </varlistentry>
8480
8481             <varlistentry>
8482               <term><command>edns-udp-size</command></term>
8483               <listitem>
8484                 <para>
8485                   Sets the advertised EDNS UDP buffer size in bytes
8486                   to control the size of packets received.
8487                   Valid values are 512 to 4096 (values outside this range
8488                   will be silently adjusted).  The default value
8489                   is 4096.  The usual reason for setting
8490                   <command>edns-udp-size</command> to a non-default
8491                   value is to get UDP answers to pass through broken
8492                   firewalls that block fragmented packets and/or
8493                   block UDP packets that are greater than 512 bytes.
8494                 </para>
8495                 <para>
8496                   <command>named</command> will fallback to using 512 bytes
8497                   if it get a series of timeout at the initial value.  512
8498                   bytes is not being offered to encourage sites to fix their
8499                   firewalls.  Small EDNS UDP sizes will result in the
8500                   excessive use of TCP.
8501                 </para>
8502               </listitem>
8503             </varlistentry>
8504
8505             <varlistentry>
8506               <term><command>max-udp-size</command></term>
8507               <listitem>
8508                 <para>
8509                   Sets the maximum EDNS UDP message size
8510                   <command>named</command> will send in bytes.
8511                   Valid values are 512 to 4096 (values outside this
8512                   range will be silently adjusted).  The default
8513                   value is 4096.  The usual reason for setting
8514                   <command>max-udp-size</command> to a non-default
8515                   value is to get UDP answers to pass through broken
8516                   firewalls that block fragmented packets and/or
8517                   block UDP packets that are greater than 512 bytes.
8518                   This is independent of the advertised receive
8519                   buffer (<command>edns-udp-size</command>).
8520                 </para>
8521                 <para>
8522                   Setting this to a low value will encourage additional
8523                   TCP traffic to the nameserver.
8524                 </para>
8525               </listitem>
8526             </varlistentry>
8527
8528             <varlistentry>
8529               <term><command>masterfile-format</command></term>
8530               <listitem>
8531                 <para>Specifies
8532                   the file format of zone files (see
8533                   <xref linkend="zonefile_format"/>).
8534                   The default value is <constant>text</constant>, which is the
8535                   standard textual representation, except for slave zones,
8536                   in which the default value is <constant>raw</constant>.
8537                   Files in other formats than <constant>text</constant> are
8538                   typically expected to be generated by the
8539                   <command>named-compilezone</command> tool, or dumped by
8540                   <command>named</command>.
8541                 </para>
8542                 <para>
8543                   Note that when a zone file in a different format than
8544                   <constant>text</constant> is loaded, <command>named</command>
8545                   may omit some of the checks which would be performed for a
8546                   file in the <constant>text</constant> format.  In particular,
8547                   <command>check-names</command> checks do not apply
8548                   for the <constant>raw</constant> format.  This means
8549                   a zone file in the <constant>raw</constant> format
8550                   must be generated with the same check level as that
8551                   specified in the <command>named</command> configuration
8552                   file.  This statement sets the
8553                   <command>masterfile-format</command> for all zones,
8554                   but can be overridden on a per-zone or per-view basis
8555                   by including a <command>masterfile-format</command>
8556                   statement within the <command>zone</command> or
8557                   <command>view</command> block in the configuration
8558                   file.
8559                 </para>
8560               </listitem>
8561             </varlistentry>
8562
8563             <varlistentry id="clients-per-query">
8564               <term><command>clients-per-query</command></term>
8565               <term><command>max-clients-per-query</command></term>
8566               <listitem>
8567                 <para>These set the
8568                   initial value (minimum) and maximum number of recursive
8569                   simultaneous clients for any given query
8570                   (&lt;qname,qtype,qclass&gt;) that the server will accept
8571                   before dropping additional clients.  <command>named</command> will attempt to
8572                   self tune this value and changes will be logged.  The
8573                   default values are 10 and 100.
8574                 </para>
8575                 <para>
8576                   This value should reflect how many queries come in for
8577                   a given name in the time it takes to resolve that name.
8578                   If the number of queries exceed this value, <command>named</command> will
8579                   assume that it is dealing with a non-responsive zone
8580                   and will drop additional queries.  If it gets a response
8581                   after dropping queries, it will raise the estimate.  The
8582                   estimate will then be lowered in 20 minutes if it has
8583                   remained unchanged.
8584                 </para>
8585                 <para>
8586                   If <command>clients-per-query</command> is set to zero,
8587                   then there is no limit on the number of clients per query
8588                   and no queries will be dropped.
8589                 </para>
8590                 <para>
8591                   If <command>max-clients-per-query</command> is set to zero,
8592                   then there is no upper bound other than imposed by
8593                   <command>recursive-clients</command>.
8594                 </para>
8595               </listitem>
8596             </varlistentry>
8597
8598             <varlistentry>
8599               <term><command>notify-delay</command></term>
8600               <listitem>
8601                 <para>
8602                   The delay, in seconds, between sending sets of notify
8603                   messages for a zone.  The default is five (5) seconds.
8604                 </para>
8605                 <para>
8606                   The overall rate that NOTIFY messages are sent for all
8607                   zones is controlled by <command>serial-query-rate</command>.
8608                 </para>
8609               </listitem>
8610             </varlistentry>
8611
8612             <varlistentry>
8613               <term><command>max-rsa-exponent-size</command></term>
8614               <listitem>
8615                 <para>
8616                   The maximum RSA exponent size, in bits, that will
8617                   be accepted when validating.  Valid values are 35
8618                   to 4096 bits.  The default zero (0) is also accepted
8619                   and is equivalent to 4096.
8620                 </para>
8621               </listitem>
8622             </varlistentry>
8623           </variablelist>
8624
8625         </sect3>
8626
8627         <sect3 id="builtin">
8628           <title>Built-in server information zones</title>
8629
8630           <para>
8631             The server provides some helpful diagnostic information
8632             through a number of built-in zones under the
8633             pseudo-top-level-domain <literal>bind</literal> in the
8634             <command>CHAOS</command> class.  These zones are part
8635             of a
8636             built-in view (see <xref linkend="view_statement_grammar"/>) of
8637             class
8638             <command>CHAOS</command> which is separate from the
8639             default view of class <command>IN</command>. Most global
8640             configuration options (<command>allow-query</command>,
8641             etc) will apply to this view, but some are locally
8642             overridden: <command>notify</command>,
8643             <command>recursion</command> and
8644             <command>allow-new-zones</command> are
8645             always set to <userinput>no</userinput>.
8646           </para>
8647           <para>
8648             If you need to disable these zones, use the options
8649             below, or hide the built-in <command>CHAOS</command>
8650             view by
8651             defining an explicit view of class <command>CHAOS</command>
8652             that matches all clients.
8653           </para>
8654
8655           <variablelist>
8656
8657             <varlistentry>
8658               <term><command>version</command></term>
8659               <listitem>
8660                 <para>
8661                   The version the server should report
8662                   via a query of the name <literal>version.bind</literal>
8663                   with type <command>TXT</command>, class <command>CHAOS</command>.
8664                   The default is the real version number of this server.
8665                   Specifying <command>version none</command>
8666                   disables processing of the queries.
8667                 </para>
8668               </listitem>
8669             </varlistentry>
8670
8671             <varlistentry>
8672               <term><command>hostname</command></term>
8673               <listitem>
8674                 <para>
8675                   The hostname the server should report via a query of
8676                   the name <filename>hostname.bind</filename>
8677                   with type <command>TXT</command>, class <command>CHAOS</command>.
8678                   This defaults to the hostname of the machine hosting the
8679                   name server as
8680                   found by the gethostname() function.  The primary purpose of such queries
8681                   is to
8682                   identify which of a group of anycast servers is actually
8683                   answering your queries.  Specifying <command>hostname none;</command>
8684                   disables processing of the queries.
8685                 </para>
8686               </listitem>
8687             </varlistentry>
8688
8689             <varlistentry>
8690               <term><command>server-id</command></term>
8691               <listitem>
8692                 <para>
8693                   The ID the server should report when receiving a Name
8694                   Server Identifier (NSID) query, or a query of the name
8695                   <filename>ID.SERVER</filename> with type
8696                   <command>TXT</command>, class <command>CHAOS</command>.
8697                   The primary purpose of such queries is to
8698                   identify which of a group of anycast servers is actually
8699                   answering your queries.  Specifying <command>server-id none;</command>
8700                   disables processing of the queries.
8701                   Specifying <command>server-id hostname;</command> will cause <command>named</command> to
8702                   use the hostname as found by the gethostname() function.
8703                   The default <command>server-id</command> is <command>none</command>.
8704                 </para>
8705               </listitem>
8706             </varlistentry>
8707
8708           </variablelist>
8709
8710         </sect3>
8711
8712         <sect3 id="empty">
8713           <title>Built-in Empty Zones</title>
8714           <para>
8715             Named has some built-in empty zones (SOA and NS records only).
8716             These are for zones that should normally be answered locally
8717             and which queries should not be sent to the Internet's root
8718             servers.  The official servers which cover these namespaces
8719             return NXDOMAIN responses to these queries.  In particular,
8720             these cover the reverse namespaces for addresses from
8721             RFC 1918, RFC 4193, RFC 5737 and RFC 6598.  They also include the
8722             reverse namespace for IPv6 local address (locally assigned),
8723             IPv6 link local addresses, the IPv6 loopback address and the
8724             IPv6 unknown address.
8725           </para>
8726           <para>
8727             Named will attempt to determine if a built-in zone already exists
8728             or is active (covered by a forward-only forwarding declaration)
8729             and will not create an empty zone in that case.
8730           </para>
8731           <para>
8732             The current list of empty zones is:
8733             <itemizedlist>
8734               <listitem>10.IN-ADDR.ARPA</listitem>
8735               <listitem>16.172.IN-ADDR.ARPA</listitem>
8736               <listitem>17.172.IN-ADDR.ARPA</listitem>
8737               <listitem>18.172.IN-ADDR.ARPA</listitem>
8738               <listitem>19.172.IN-ADDR.ARPA</listitem>
8739               <listitem>20.172.IN-ADDR.ARPA</listitem>
8740               <listitem>21.172.IN-ADDR.ARPA</listitem>
8741               <listitem>22.172.IN-ADDR.ARPA</listitem>
8742               <listitem>23.172.IN-ADDR.ARPA</listitem>
8743               <listitem>24.172.IN-ADDR.ARPA</listitem>
8744               <listitem>25.172.IN-ADDR.ARPA</listitem>
8745               <listitem>26.172.IN-ADDR.ARPA</listitem>
8746               <listitem>27.172.IN-ADDR.ARPA</listitem>
8747               <listitem>28.172.IN-ADDR.ARPA</listitem>
8748               <listitem>29.172.IN-ADDR.ARPA</listitem>
8749               <listitem>30.172.IN-ADDR.ARPA</listitem>
8750               <listitem>31.172.IN-ADDR.ARPA</listitem>
8751               <listitem>168.192.IN-ADDR.ARPA</listitem>
8752               <listitem>64.100.IN-ADDR.ARPA</listitem>
8753               <listitem>65.100.IN-ADDR.ARPA</listitem>
8754               <listitem>66.100.IN-ADDR.ARPA</listitem>
8755               <listitem>67.100.IN-ADDR.ARPA</listitem>
8756               <listitem>68.100.IN-ADDR.ARPA</listitem>
8757               <listitem>69.100.IN-ADDR.ARPA</listitem>
8758               <listitem>70.100.IN-ADDR.ARPA</listitem>
8759               <listitem>71.100.IN-ADDR.ARPA</listitem>
8760               <listitem>72.100.IN-ADDR.ARPA</listitem>
8761               <listitem>73.100.IN-ADDR.ARPA</listitem>
8762               <listitem>74.100.IN-ADDR.ARPA</listitem>
8763               <listitem>75.100.IN-ADDR.ARPA</listitem>
8764               <listitem>76.100.IN-ADDR.ARPA</listitem>
8765               <listitem>77.100.IN-ADDR.ARPA</listitem>
8766               <listitem>78.100.IN-ADDR.ARPA</listitem>
8767               <listitem>79.100.IN-ADDR.ARPA</listitem>
8768               <listitem>80.100.IN-ADDR.ARPA</listitem>
8769               <listitem>81.100.IN-ADDR.ARPA</listitem>
8770               <listitem>82.100.IN-ADDR.ARPA</listitem>
8771               <listitem>83.100.IN-ADDR.ARPA</listitem>
8772               <listitem>84.100.IN-ADDR.ARPA</listitem>
8773               <listitem>85.100.IN-ADDR.ARPA</listitem>
8774               <listitem>86.100.IN-ADDR.ARPA</listitem>
8775               <listitem>87.100.IN-ADDR.ARPA</listitem>
8776               <listitem>88.100.IN-ADDR.ARPA</listitem>
8777               <listitem>89.100.IN-ADDR.ARPA</listitem>
8778               <listitem>90.100.IN-ADDR.ARPA</listitem>
8779               <listitem>91.100.IN-ADDR.ARPA</listitem>
8780               <listitem>92.100.IN-ADDR.ARPA</listitem>
8781               <listitem>93.100.IN-ADDR.ARPA</listitem>
8782               <listitem>94.100.IN-ADDR.ARPA</listitem>
8783               <listitem>95.100.IN-ADDR.ARPA</listitem>
8784               <listitem>96.100.IN-ADDR.ARPA</listitem>
8785               <listitem>97.100.IN-ADDR.ARPA</listitem>
8786               <listitem>98.100.IN-ADDR.ARPA</listitem>
8787               <listitem>99.100.IN-ADDR.ARPA</listitem>
8788               <listitem>100.100.IN-ADDR.ARPA</listitem>
8789               <listitem>101.100.IN-ADDR.ARPA</listitem>
8790               <listitem>102.100.IN-ADDR.ARPA</listitem>
8791               <listitem>103.100.IN-ADDR.ARPA</listitem>
8792               <listitem>104.100.IN-ADDR.ARPA</listitem>
8793               <listitem>105.100.IN-ADDR.ARPA</listitem>
8794               <listitem>106.100.IN-ADDR.ARPA</listitem>
8795               <listitem>107.100.IN-ADDR.ARPA</listitem>
8796               <listitem>108.100.IN-ADDR.ARPA</listitem>
8797               <listitem>109.100.IN-ADDR.ARPA</listitem>
8798               <listitem>110.100.IN-ADDR.ARPA</listitem>
8799               <listitem>111.100.IN-ADDR.ARPA</listitem>
8800               <listitem>112.100.IN-ADDR.ARPA</listitem>
8801               <listitem>113.100.IN-ADDR.ARPA</listitem>
8802               <listitem>114.100.IN-ADDR.ARPA</listitem>
8803               <listitem>115.100.IN-ADDR.ARPA</listitem>
8804               <listitem>116.100.IN-ADDR.ARPA</listitem>
8805               <listitem>117.100.IN-ADDR.ARPA</listitem>
8806               <listitem>118.100.IN-ADDR.ARPA</listitem>
8807               <listitem>119.100.IN-ADDR.ARPA</listitem>
8808               <listitem>120.100.IN-ADDR.ARPA</listitem>
8809               <listitem>121.100.IN-ADDR.ARPA</listitem>
8810               <listitem>122.100.IN-ADDR.ARPA</listitem>
8811               <listitem>123.100.IN-ADDR.ARPA</listitem>
8812               <listitem>124.100.IN-ADDR.ARPA</listitem>
8813               <listitem>125.100.IN-ADDR.ARPA</listitem>
8814               <listitem>126.100.IN-ADDR.ARPA</listitem>
8815               <listitem>127.100.IN-ADDR.ARPA</listitem>
8816               <listitem>0.IN-ADDR.ARPA</listitem>
8817               <listitem>127.IN-ADDR.ARPA</listitem>
8818               <listitem>254.169.IN-ADDR.ARPA</listitem>
8819               <listitem>2.0.192.IN-ADDR.ARPA</listitem>
8820               <listitem>100.51.198.IN-ADDR.ARPA</listitem>
8821               <listitem>113.0.203.IN-ADDR.ARPA</listitem>
8822               <listitem>255.255.255.255.IN-ADDR.ARPA</listitem>
8823               <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>
8824               <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>
8825               <listitem>8.B.D.0.1.0.0.2.IP6.ARPA</listitem>
8826               <listitem>D.F.IP6.ARPA</listitem>
8827               <listitem>8.E.F.IP6.ARPA</listitem>
8828               <listitem>9.E.F.IP6.ARPA</listitem>
8829               <listitem>A.E.F.IP6.ARPA</listitem>
8830               <listitem>B.E.F.IP6.ARPA</listitem>
8831             </itemizedlist>
8832           </para>
8833           <para>
8834             Empty zones are settable at the view level and only apply to
8835             views of class IN.  Disabled empty zones are only inherited
8836             from options if there are no disabled empty zones specified
8837             at the view level.  To override the options list of disabled
8838             zones, you can disable the root zone at the view level, for example:
8839 <programlisting>
8840             disable-empty-zone ".";
8841 </programlisting>
8842           </para>
8843           <para>
8844             If you are using the address ranges covered here, you should
8845             already have reverse zones covering the addresses you use.
8846             In practice this appears to not be the case with many queries
8847             being made to the infrastructure servers for names in these
8848             spaces.  So many in fact that sacrificial servers were needed
8849             to be deployed to channel the query load away from the
8850             infrastructure servers.
8851           </para>
8852           <note>
8853             The real parent servers for these zones should disable all
8854             empty zone under the parent zone they serve.  For the real
8855             root servers, this is all built-in empty zones.  This will
8856             enable them to return referrals to deeper in the tree.
8857           </note>
8858           <variablelist>
8859             <varlistentry>
8860               <term><command>empty-server</command></term>
8861               <listitem>
8862                 <para>
8863                   Specify what server name will appear in the returned
8864                   SOA record for empty zones.  If none is specified, then
8865                   the zone's name will be used.
8866                 </para>
8867                </listitem>
8868             </varlistentry>
8869               
8870             <varlistentry>
8871               <term><command>empty-contact</command></term>
8872               <listitem>
8873                 <para>
8874                   Specify what contact name will appear in the returned
8875                   SOA record for empty zones.  If none is specified, then
8876                   "." will be used.
8877                 </para>
8878               </listitem>
8879             </varlistentry>
8880   
8881             <varlistentry>
8882               <term><command>empty-zones-enable</command></term>
8883               <listitem>
8884                 <para>
8885                   Enable or disable all empty zones.  By default, they
8886                   are enabled.
8887                 </para>
8888               </listitem>
8889             </varlistentry>
8890   
8891             <varlistentry>
8892             <term><command>disable-empty-zone</command></term>
8893               <listitem>
8894                 <para>
8895                   Disable individual empty zones.  By default, none are
8896                   disabled.  This option can be specified multiple times.
8897                 </para>
8898               </listitem>
8899             </varlistentry>
8900           </variablelist>
8901         </sect3>
8902
8903         <sect3 id="acache">
8904           <title>Additional Section Caching</title>
8905
8906           <para>
8907             The additional section cache, also called <command>acache</command>,
8908             is an internal cache to improve the response performance of BIND 9.
8909             When additional section caching is enabled, BIND 9 will
8910             cache an internal short-cut to the additional section content for
8911             each answer RR.
8912             Note that <command>acache</command> is an internal caching
8913             mechanism of BIND 9, and is not related to the DNS caching
8914             server function.
8915           </para>
8916
8917           <para>
8918             Additional section caching does not change the
8919             response content (except the RRsets ordering of the additional
8920             section, see below), but can improve the response performance
8921             significantly.
8922             It is particularly effective when BIND 9 acts as an authoritative
8923             server for a zone that has many delegations with many glue RRs.
8924           </para>
8925
8926           <para>
8927             In order to obtain the maximum performance improvement
8928             from additional section caching, setting
8929             <command>additional-from-cache</command>
8930             to <command>no</command> is recommended, since the current
8931             implementation of <command>acache</command>
8932             does not short-cut of additional section information from the
8933             DNS cache data.
8934           </para>
8935
8936           <para>
8937             One obvious disadvantage of <command>acache</command> is
8938             that it requires much more
8939             memory for the internal cached data.
8940             Thus, if the response performance does not matter and memory
8941             consumption is much more critical, the
8942             <command>acache</command> mechanism can be
8943             disabled by setting <command>acache-enable</command> to
8944             <command>no</command>.
8945             It is also possible to specify the upper limit of memory
8946             consumption
8947             for acache by using <command>max-acache-size</command>.
8948           </para>
8949
8950           <para>
8951             Additional section caching also has a minor effect on the
8952             RRset ordering in the additional section.
8953             Without <command>acache</command>,
8954             <command>cyclic</command> order is effective for the additional
8955             section as well as the answer and authority sections.
8956             However, additional section caching fixes the ordering when it
8957             first caches an RRset for the additional section, and the same
8958             ordering will be kept in succeeding responses, regardless of the
8959             setting of <command>rrset-order</command>.
8960             The effect of this should be minor, however, since an
8961             RRset in the additional section
8962             typically only contains a small number of RRs (and in many cases
8963             it only contains a single RR), in which case the
8964             ordering does not matter much.
8965           </para>
8966
8967           <para>
8968             The following is a summary of options related to
8969             <command>acache</command>.
8970           </para>
8971
8972           <variablelist>
8973
8974             <varlistentry>
8975               <term><command>acache-enable</command></term>
8976               <listitem>
8977                 <para>
8978                   If <command>yes</command>, additional section caching is
8979                   enabled.  The default value is <command>no</command>.
8980                 </para>
8981               </listitem>
8982             </varlistentry>
8983
8984             <varlistentry>
8985               <term><command>acache-cleaning-interval</command></term>
8986               <listitem>
8987                 <para>
8988                   The server will remove stale cache entries, based on an LRU
8989                   based
8990                   algorithm, every <command>acache-cleaning-interval</command> minutes.
8991                   The default is 60 minutes.
8992                   If set to 0, no periodic cleaning will occur.
8993                 </para>
8994               </listitem>
8995             </varlistentry>
8996
8997             <varlistentry>
8998               <term><command>max-acache-size</command></term>
8999               <listitem>
9000                 <para>
9001                   The maximum amount of memory in bytes to use for the server's acache.
9002                   When the amount of data in the acache reaches this limit,
9003                   the server
9004                   will clean more aggressively so that the limit is not
9005                   exceeded.
9006                   In a server with multiple views, the limit applies
9007                   separately to the
9008                   acache of each view.
9009                   The default is <literal>16M</literal>.
9010                 </para>
9011               </listitem>
9012             </varlistentry>
9013
9014           </variablelist>
9015
9016         </sect3>
9017
9018         <sect3>
9019           <title>Content Filtering</title>
9020           <para>
9021             <acronym>BIND</acronym> 9 provides the ability to filter
9022             out DNS responses from external DNS servers containing
9023             certain types of data in the answer section.
9024             Specifically, it can reject address (A or AAAA) records if
9025             the corresponding IPv4 or IPv6 addresses match the given
9026             <varname>address_match_list</varname> of the
9027             <command>deny-answer-addresses</command> option.
9028             It can also reject CNAME or DNAME records if the "alias"
9029             name (i.e., the CNAME alias or the substituted query name
9030             due to DNAME) matches the
9031             given <varname>namelist</varname> of the
9032             <command>deny-answer-aliases</command> option, where
9033             "match" means the alias name is a subdomain of one of
9034             the <varname>name_list</varname> elements.
9035             If the optional <varname>namelist</varname> is specified
9036             with <command>except-from</command>, records whose query name
9037             matches the list will be accepted regardless of the filter
9038             setting.
9039             Likewise, if the alias name is a subdomain of the
9040             corresponding zone, the <command>deny-answer-aliases</command>
9041             filter will not apply;
9042             for example, even if "example.com" is specified for
9043             <command>deny-answer-aliases</command>,
9044           </para>
9045 <programlisting>www.example.com. CNAME xxx.example.com.</programlisting>
9046
9047           <para>
9048             returned by an "example.com" server will be accepted.
9049           </para>
9050
9051           <para>
9052             In the <varname>address_match_list</varname> of the
9053             <command>deny-answer-addresses</command> option, only
9054             <varname>ip_addr</varname>
9055             and <varname>ip_prefix</varname>
9056             are meaningful;
9057             any <varname>key_id</varname> will be silently ignored.
9058           </para>
9059
9060           <para>
9061             If a response message is rejected due to the filtering,
9062             the entire message is discarded without being cached, and
9063             a SERVFAIL error will be returned to the client.
9064           </para>
9065
9066           <para>
9067             This filtering is intended to prevent "DNS rebinding attacks," in
9068             which an attacker, in response to a query for a domain name the
9069             attacker controls, returns an IP address within your own network or
9070             an alias name within your own domain.
9071             A naive web browser or script could then serve as an
9072             unintended proxy, allowing the attacker
9073             to get access to an internal node of your local network
9074             that couldn't be externally accessed otherwise.
9075             See the paper available at
9076             <ulink url="http://portal.acm.org/citation.cfm?id=1315245.1315298">
9077             http://portal.acm.org/citation.cfm?id=1315245.1315298
9078             </ulink>
9079             for more details about the attacks.
9080           </para>
9081
9082           <para>
9083             For example, if you own a domain named "example.net" and
9084             your internal network uses an IPv4 prefix 192.0.2.0/24,
9085             you might specify the following rules:
9086           </para>
9087
9088 <programlisting>deny-answer-addresses { 192.0.2.0/24; } except-from { "example.net"; };
9089 deny-answer-aliases { "example.net"; };
9090 </programlisting>
9091
9092           <para>
9093             If an external attacker lets a web browser in your local
9094             network look up an IPv4 address of "attacker.example.com",
9095             the attacker's DNS server would return a response like this:
9096           </para>
9097
9098 <programlisting>attacker.example.com. A 192.0.2.1</programlisting>
9099
9100           <para>
9101             in the answer section.
9102             Since the rdata of this record (the IPv4 address) matches
9103             the specified prefix 192.0.2.0/24, this response will be
9104             ignored.
9105           </para>
9106
9107           <para>
9108             On the other hand, if the browser looks up a legitimate
9109             internal web server "www.example.net" and the
9110             following response is returned to
9111             the <acronym>BIND</acronym> 9 server
9112           </para>
9113
9114 <programlisting>www.example.net. A 192.0.2.2</programlisting>
9115
9116           <para>
9117             it will be accepted since the owner name "www.example.net"
9118             matches the <command>except-from</command> element,
9119             "example.net".
9120           </para>
9121
9122           <para>
9123             Note that this is not really an attack on the DNS per se.
9124             In fact, there is nothing wrong for an "external" name to
9125             be mapped to your "internal" IP address or domain name
9126             from the DNS point of view.
9127             It might actually be provided for a legitimate purpose,
9128             such as for debugging.
9129             As long as the mapping is provided by the correct owner,
9130             it is not possible or does not make sense to detect
9131             whether the intent of the mapping is legitimate or not
9132             within the DNS.
9133             The "rebinding" attack must primarily be protected at the
9134             application that uses the DNS.
9135             For a large site, however, it may be difficult to protect
9136             all possible applications at once.
9137             This filtering feature is provided only to help such an
9138             operational environment;
9139             it is generally discouraged to turn it on unless you are
9140             very sure you have no other choice and the attack is a
9141             real threat for your applications.
9142           </para>
9143
9144           <para>
9145             Care should be particularly taken if you want to use this
9146             option for addresses within 127.0.0.0/8.
9147             These addresses are obviously "internal", but many
9148             applications conventionally rely on a DNS mapping from
9149             some name to such an address.
9150             Filtering out DNS records containing this address
9151             spuriously can break such applications.
9152           </para>
9153         </sect3>
9154
9155         <sect3>
9156           <title>Response Policy Zone (RPZ) Rewriting</title>
9157           <para>
9158             <acronym>BIND</acronym> 9 includes a limited
9159             mechanism to modify DNS responses for requests
9160             analogous to email anti-spam DNS blacklists.
9161             Responses can be changed to deny the existence of domains(NXDOMAIN),
9162             deny the existence of IP addresses for domains (NODATA),
9163             or contain other IP addresses or data.
9164           </para>
9165
9166           <para>
9167             Response policy zones are named in the
9168             <command>response-policy</command> option for the view or among the
9169             global options if there is no response-policy option for the view.
9170             RPZs are ordinary DNS zones containing RRsets
9171             that can be queried normally if allowed.
9172             It is usually best to restrict those queries with something like
9173             <command>allow-query { localhost; };</command>.
9174           </para>
9175
9176           <para>
9177             Four policy triggers are encoded in RPZ records, QNAME, IP, NSIP,
9178             and NSDNAME.
9179             QNAME RPZ records triggered by query names of requests and targets
9180             of CNAME records resolved to generate the response.
9181             The owner name of a QNAME RPZ record is the query name relativized
9182             to the RPZ.
9183           </para>
9184
9185           <para>
9186             The second kind of RPZ trigger is an IP address in an A and AAAA
9187             record in the ANSWER section of a response.
9188             IP address triggers are encoded in records that have owner names
9189             that are subdomains of <userinput>rpz-ip</userinput> relativized
9190             to the RPZ origin name and encode an IP address or address block.
9191             IPv4 trigger addresses are represented as
9192             <userinput>prefixlength.B4.B3.B2.B1.rpz-ip</userinput>.
9193             The prefix length must be between 1 and 32.
9194             All four bytes, B4, B3, B2, and B1, must be present.
9195             B4 is the decimal value of the least significant byte of the
9196             IPv4 address as in IN-ADDR.ARPA.
9197             IPv6 addresses are encoded in a format similar to the standard
9198             IPv6 text representation,
9199             <userinput>prefixlength.W8.W7.W6.W5.W4.W3.W2.W1.rpz-ip</userinput>.
9200             Each of W8,...,W1 is a one to four digit hexadecimal number
9201             representing 16 bits of the IPv6 address as in the standard text
9202             representation of IPv6 addresses, but reversed as in IN-ADDR.ARPA.
9203             All 8 words must be present except when consecutive
9204             zero words are replaced with <userinput>.zz.</userinput>
9205             analogous to double colons (::) in standard IPv6 text encodings.
9206             The prefix length must be between 1 and 128.
9207           </para>
9208
9209           <para>
9210             NSDNAME triggers match names of authoritative servers
9211             for the query name, a parent of the query name, a CNAME for
9212             query name, or a parent of a CNAME.
9213             They are encoded as subdomains of
9214             <userinput>rpz-nsdomain</userinput> relativized
9215             to the RPZ origin name.
9216             NSIP triggers match IP addresses in A and
9217             AAAA RRsets for domains that can be checked against NSDNAME
9218             policy records.
9219             NSIP triggers are encoded like IP triggers except as subdomains of
9220             <userinput>rpz-nsip</userinput>.
9221             NSDNAME and NSIP triggers are checked only for names with at
9222             least <command>min-ns-dots</command> dots.
9223             The default value of <command>min-ns-dots</command> is 1 to
9224             exclude top level domains.
9225           </para>
9226
9227           <para>
9228             The query response is checked against all RPZs, so
9229             two or more policy records can be triggered by a response.
9230             Because DNS responses can be rewritten according to at most one
9231             policy record, a single record encoding an action (other than
9232             <command>DISABLED</command> actions) must be chosen.
9233             Triggers or the records that encode them are chosen in
9234             the following order:
9235             <itemizedlist>
9236               <listitem>Choose the triggered record in the zone that appears
9237                 first in the response-policy option.
9238               </listitem>
9239               <listitem>Prefer QNAME to IP to NSDNAME to NSIP triggers
9240                 in a single zone.
9241               </listitem>
9242               <listitem>Among NSDNAME triggers, prefer the
9243                 trigger that matches the smallest name under the DNSSEC ordering.
9244               </listitem>
9245               <listitem>Among IP or NSIP triggers, prefer the trigger
9246                 with the longest prefix.
9247               </listitem>
9248               <listitem>Among triggers with the same prefex length,
9249                 prefer the IP or NSIP trigger that matches
9250                 the smallest IP address.
9251               </listitem>
9252             </itemizedlist>
9253           </para>
9254
9255           <para>
9256             When the processing of a response is restarted to resolve
9257             DNAME or CNAME records and a policy record set has
9258             not been triggered,
9259             all RPZs are again consulted for the DNAME or CNAME names
9260             and addresses.
9261           </para>
9262
9263           <para>
9264             RPZ record sets are sets of any types of DNS record except
9265             DNAME or DNSSEC that encode actions or responses to queries.
9266             <itemizedlist>
9267               <listitem>The <command>NXDOMAIN</command> response is encoded
9268                 by a CNAME whose target is the root domain (.)
9269               </listitem>
9270               <listitem>A CNAME whose target is the wildcard top-level
9271                 domain (*.) specifies the <command>NODATA</command> action,
9272                 which rewrites the response to NODATA or ANCOUNT=1.
9273               </listitem>
9274               <listitem>The <command>Local Data</command> action is
9275                 represented by a set ordinary DNS records that are used
9276                 to answer queries.  Queries for record types not the
9277                 set are answered with NODATA.
9278
9279                 A special form of local data is a CNAME whose target is a
9280                 wildcard such as *.example.com.
9281                 It is used as if were an ordinary CNAME after the astrisk (*)
9282                 has been replaced with the query name.
9283                 The purpose for this special form is query logging in the
9284                 walled garden's authority DNS server.
9285               </listitem>
9286               <listitem>The <command>PASSTHRU</command> policy is specified
9287                 by a CNAME whose target is <command>rpz-passthru.</command>
9288                 It causes the response to not be rewritten
9289                 and is most often used to "poke holes" in policies for
9290                 CIDR blocks.
9291                 (A CNAME whose target is the variable part of its owner name
9292                 is an obsolete specification of the PASSTHRU policy.)
9293               </listitem>
9294             </itemizedlist>
9295           </para>
9296
9297           <para>
9298             The actions specified in an RPZ can be overridden with a
9299             <command>policy</command> clause in the
9300             <command>response-policy</command> option.
9301             An organization using an RPZ provided by another organization might
9302             use this mechanism to redirect domains to its own walled garden.
9303             <itemizedlist>
9304               <listitem><command>GIVEN</command> says "do not override but
9305                 perform the action specified in the zone."
9306               </listitem>
9307               <listitem><command>DISABLED</command> causes policy records to do
9308                 nothing but log what they might have done.
9309                 The response to the DNS query will be written according to
9310                 any triggered policy records that are not disabled.
9311                 Disabled policy zones should appear first,
9312                 because they will often not be logged
9313                 if a higher precedence trigger is found first.
9314               </listitem>
9315               <listitem><command>PASSTHRU</command> causes all policy records
9316                 to act as if they were CNAME records with targets the variable
9317                 part of their owner name.  They protect the response from
9318                 being changed.
9319               </listitem>
9320               <listitem><command>NXDOMAIN</command> causes all RPZ records
9321                 to specify NXDOMAIN policies.
9322               </listitem>
9323               <listitem><command>NODATA</command> overrides with the
9324                 NODATA policy
9325               </listitem>
9326               <listitem><command>CNAME domain</command> causes all RPZ
9327                 policy records to act as if they were "cname domain" records.
9328               </listitem>
9329             </itemizedlist>
9330           </para>
9331
9332           <para>
9333             By default, the actions encoded in an RPZ are applied
9334             only to queries that ask for recursion (RD=1).
9335             That default can be changed for a single RPZ or all RPZs in a view
9336             with a <command>recursive-only no</command> clause.
9337             This feature is useful for serving the same zone files
9338             both inside and outside an RFC 1918 cloud and using RPZ to
9339             delete answers that would otherwise contain RFC 1918 values
9340             on the externally visible name server or view.
9341           </para>
9342
9343           <para>
9344             Also by default, RPZ actions are applied only to DNS requests that
9345             either do not request DNSSEC metadata (DO=0) or when no DNSSEC
9346             records are available for request name in the original zone (not
9347             the response policy zone).
9348             This default can be changed for all RPZs in a view with a
9349             <command>break-dnssec yes</command> clause.
9350             In that case, RPZ actions are applied regardless of DNSSEC.
9351             The name of the clause option reflects the fact that results
9352             rewritten by RPZ actions cannot verify.
9353           </para>
9354
9355           <para>
9356             The TTL of a record modified by RPZ policies is set from the
9357             TTL of the relevant record in policy zone.  It is then limited
9358             to a maximum value.
9359             The <command>max-policy-ttl</command> clause changes that
9360             maximum from its default of 5.
9361           </para>
9362
9363           <para>
9364             For example, you might use this option statement
9365           </para>
9366 <programlisting>    response-policy { zone "badlist"; };</programlisting>
9367           <para>
9368             and this zone statement
9369           </para>
9370 <programlisting>    zone "badlist" {type master; file "master/badlist"; allow-query {none;}; };</programlisting>
9371           <para>
9372             with this zone file
9373           </para>
9374 <programlisting>$TTL 1H
9375 @                       SOA LOCALHOST. named-mgr.example.com (1 1h 15m 30d 2h)
9376                         NS  LOCALHOST.
9377
9378 ; QNAME policy records.  There are no periods (.) after the owner names.
9379 nxdomain.domain.com     CNAME   .               ; NXDOMAIN policy
9380 nodata.domain.com       CNAME   *.              ; NODATA policy
9381 bad.domain.com          A       10.0.0.1        ; redirect to a walled garden
9382                         AAAA    2001:2::1
9383
9384 ; do not rewrite (PASSTHRU) OK.DOMAIN.COM
9385 ok.domain.com           CNAME   rpz-passthru.
9386
9387 bzone.domain.com        CNAME   garden.example.com.
9388
9389 ; redirect x.bzone.domain.com to x.bzone.domain.com.garden.example.com
9390 *.bzone.domain.com      CNAME   *.garden.example.com.
9391
9392
9393 ; IP policy records that rewrite all answers for 127/8 except 127.0.0.1
9394 8.0.0.0.127.rpz-ip      CNAME   .
9395 32.1.0.0.127.rpz-ip     CNAME   rpz-passthru.
9396
9397 ; NSDNAME and NSIP policy records
9398 ns.domain.com.rpz-nsdname   CNAME   .
9399 48.zz.2.2001.rpz-nsip       CNAME   .
9400 </programlisting>
9401           <para>
9402             RPZ can affect server performance.
9403             Each configured response policy zone requires the server to
9404             perform one to four additional database lookups before a
9405             query can be answered.
9406             For example, a DNS server with four policy zones, each with all
9407             four kinds of response triggers, QNAME, IP, NSIP, and
9408             NSDNAME, requires a total of 17 times as many database
9409             lookups as a similar DNS server with no response policy zones.
9410             A <acronym>BIND9</acronym> server with adequate memory and one
9411             response policy zone with QNAME and IP triggers might achieve a
9412             maximum queries-per-second rate about 20% lower.
9413             A server with four response policy zones with QNAME and IP
9414             triggers might have a maximum QPS rate about 50% lower.
9415           </para>
9416
9417           <para>
9418             Responses rewritten by RPZ are counted in the
9419             <command>RPZRewrites</command> statistics.
9420           </para>
9421         </sect3>
9422
9423         <sect3>
9424           <title>Response Rate Limiting</title>
9425           <para>
9426             This feature is only available when <acronym>BIND</acronym> 9
9427             is compiled with the <userinput>--enable-rrl</userinput>
9428             option on the "configure" command line.
9429           </para>
9430           <para>
9431             Excessive almost identical UDP <emphasis>responses</emphasis>
9432             can be controlled by configuring a
9433             <command>rate-limit</command> clause in an
9434             <command>options</command> or <command>view</command> statement.
9435             This mechanism keeps authoritative BIND 9 from being used
9436             in amplifying reflection denial of service (DoS) attacks.
9437             Short truncated (TC=1) responses can be sent to provide
9438             rate-limited responses to legitimate clients within
9439             a range of forged, attacked IP addresses.
9440             Legitimate clients react to dropped or truncated response
9441             by retrying with UDP or with TCP respectively.
9442           </para>
9443
9444           <para>
9445             This mechanism is intended for authoritative DNS servers.
9446             It can be used on recursive servers but can slow
9447             applications such as SMTP servers (mail receivers) and
9448             HTTP clients (web browsers) that repeatedly request the
9449             same domains.
9450             When possible, closing "open" recursive servers is better.
9451           </para>
9452
9453           <para>
9454             Response rate limiting uses a "credit" or "token bucket" scheme.
9455             Each combination of identical response and client
9456             has a conceptual account that earns a specified number
9457             of credits every second.
9458             A prospective response debits its account by one.
9459             Responses are dropped or truncated
9460             while the account is negative.
9461             Responses are tracked within a rolling window of time
9462             which defaults to 15 seconds, but can be configured with
9463             the <command>window</command> option to any value from
9464             1 to 3600 seconds (1 hour).
9465             The account cannot become more positive than
9466             the per-second limit
9467             or more negative than <command>window</command>
9468             times the per-second limit.
9469             When the specified number of credits for a class of
9470             responses is set to 0, those responses are not rate limited.
9471           </para>
9472
9473           <para>
9474             The notions of "identical response" and "DNS client"
9475             for rate limiting are not simplistic.
9476             All responses to an address block are counted as if to a
9477             single client.
9478             The prefix lengths of addresses blocks are
9479             specified with <command>ipv4-prefix-length</command> (default 24)
9480             and <command>ipv6-prefix-length</command> (default 56).
9481           </para>
9482
9483           <para>
9484             All non-empty responses for a valid domain name (qname)
9485             and record type (qtype) are identical and have a limit specified
9486             with <command>responses-per-second</command>
9487             (default 0 or no limit).
9488             All empty (NODATA) responses for a valid domain,
9489             regardless of query type, are identical.
9490             Responses in the NODATA class are limited by
9491             <command>nodata-per-second</command>
9492             (default <command>responses-per-second</command>).
9493             Requests for any and all undefined subdomains of a given
9494             valid domain result in NXDOMAIN errors, and are identical
9495             regardless of query type.
9496             They are limited by <command>nxdomain-per-second</command>
9497             (default <command>responses-per-second</command>).
9498             This controls some attacks using random names, but
9499             can be relaxed or turned off (set to 0)
9500             on servers that expect many legitimate
9501             NXDOMAIN responses, such as from anti-spam blacklists.
9502             Referrals or delegations to the server of a given
9503             domain are identical and are limited by
9504             <command>referrals-per-second</command>
9505             (default <command>responses-per-second</command>).
9506           </para>
9507
9508           <para>
9509             Responses generated from local wildcards are counted and limited
9510             as if they were for the parent domain name.
9511             This controls flooding using random.wild.example.com.
9512           </para>
9513
9514           <para>
9515             All requests that result in DNS errors other
9516             than NXDOMAIN, such as SERVFAIL and FORMERR, are identical
9517             regardless of requested name (qname) or record type (qtype).
9518             This controls attacks using invalid requests or distant,
9519             broken authoritative servers.
9520             By default the limit on errors is the same as the
9521             <command>responses-per-second</command> value,
9522             but it can be set separately with
9523             <command>errors-per-second</command>.
9524           </para>
9525
9526           <para>
9527             Many attacks using DNS involve UDP requests with forged source
9528             addresses.
9529             Rate limiting prevents the use of BIND 9 to flood a network
9530             with responses to requests with forged source addresses,
9531             but could let a third party block responses to legitimate requests.
9532             There is a mechanism that can answer some legitimate
9533             requests from a client whose address is being forged in a flood.
9534             Setting <command>slip</command> to 2 (its default) causes every
9535             other UDP request to be answered with a small truncated (TC=1)
9536             response.
9537             The small size and reduced frequency, and so lack of
9538             amplification, of "slipped" responses make them unattractive
9539             for reflection DoS attacks.
9540             <command>slip</command> must be between 0 and 10.
9541             A value of 0 does not "slip":
9542             no truncated responses are sent due to rate limiting,
9543             all responses are dropped.
9544             A value of 1 causes every response to slip;
9545             values between 2 and 10 cause every n'th response to slip.
9546             Some error responses including REFUSED and SERVFAIL
9547             cannot be replaced with truncated responses and are instead
9548             leaked at the <command>slip</command> rate.
9549           </para>
9550
9551           <para>
9552             (NOTE: Dropped responses from an authoritative server may
9553             reduce the difficulty of a third party successfully forging
9554             a response to a recursive resolver. The best security
9555             against forged responses is for authoritative operators
9556             to sign their zones using DNSSEC and for resolver operators
9557             to validate the responses. When this is not an option,
9558             operators who are more concerned with response integrity
9559             than with flood mitigation may consider setting
9560             <command>slip</command> to 1, causing all rate-limited
9561             responses to be truncated rather than dropped.  This reduces
9562             the effectiveness of rate-limiting against reflection attacks.)
9563           </para>
9564
9565           <para>
9566             When the approximate query per second rate exceeds
9567             the <command>qps-scale</command> value,
9568             then the <command>responses-per-second</command>,
9569             <command>errors-per-second</command>,
9570             <command>nxdomains-per-second</command> and
9571             <command>all-per-second</command> values are reduced by the
9572             ratio of the current rate to the <command>qps-scale</command> value.
9573             This feature can tighten defenses during attacks.
9574             For example, with
9575             <command>qps-scale 250; responses-per-second 20;</command> and
9576             a total query rate of 1000 queries/second for all queries from
9577             all DNS clients including via TCP,
9578             then the effective responses/second limit changes to
9579             (250/1000)*20 or 5.
9580             Responses sent via TCP are not limited
9581             but are counted to compute the query per second rate.
9582           </para>
9583
9584           <para>
9585             Communities of DNS clients can be given their own parameters or no
9586             rate limiting by putting
9587             <command>rate-limit</command> statements in <command>view</command>
9588             statements instead of the global <command>option</command>
9589             statement.
9590             A <command>rate-limit</command> statement in a view replaces,
9591             rather than supplementing, a <command>rate-limit</command>
9592             statement among the main options.
9593             DNS clients within a view can be exempted from rate limits
9594             with the <command>exempt-clients</command> clause.
9595           </para>
9596
9597           <para>
9598             UDP responses of all kinds can be limited with the
9599             <command>all-per-second</command> phrase.
9600             This rate limiting is unlike the rate limiting provided by
9601             <command>responses-per-second</command>,
9602             <command>errors-per-second</command>, and
9603             <command>nxdomains-per-second</command> on a DNS server
9604             which are often invisible to the victim of a DNS reflection attack.
9605             Unless the forged requests of the attack are the same as the
9606             legitimate requests of the victim, the victim's requests are
9607             not affected.
9608             Responses affected by an <command>all-per-second</command> limit
9609             are always dropped; the <command>slip</command> value has no
9610             effect.
9611             An <command>all-per-second</command> limit should be
9612             at least 4 times as large as the other limits,
9613             because single DNS clients often send bursts of legitimate
9614             requests.
9615             For example, the receipt of a single mail message can prompt
9616             requests from an SMTP server for NS, PTR, A, and AAAA records
9617             as the incoming SMTP/TCP/IP connection is considered.
9618             The SMTP server can need additional NS, A, AAAA, MX, TXT, and SPF
9619             records as it considers the STMP <command>Mail From</command>
9620             command.
9621             Web browsers often repeatedly resolve the same names that
9622             are repeated in HTML &lt;IMG&gt; tags in a page.
9623             <command>All-per-second</command> is similar to the
9624             rate limiting offered by firewalls but often inferior.
9625             Attacks that justify ignoring the
9626             contents of DNS responses are likely to be attacks on the
9627             DNS server itself.
9628             They usually should be discarded before the DNS server
9629             spends resources making TCP connections or parsing DNS requests,
9630             but that rate limiting must be done before the
9631             DNS server sees the requests.
9632           </para>
9633
9634           <para>
9635             The maximum size of the table used to track requests and
9636             rate limit responses is set with <command>max-table-size</command>.
9637             Each entry in the table is between 40 and 80 bytes.
9638             The table needs approximately as many entries as the number
9639             of requests received per second.
9640             The default is 20,000.
9641             To reduce the cold start of growing the table,
9642             <command>min-table-size</command> (default 500)
9643             can set the minimum table size.
9644             Enable <command>rate-limit</command> category logging to monitor
9645             expansions of the table and inform
9646             choices for the initial and maximum table size.
9647           </para>
9648
9649           <para>
9650             Use <command>log-only yes</command> to test rate limiting parameters
9651             without actually dropping any requests.
9652           </para>
9653
9654           <para>
9655             Responses dropped by rate limits are included in the
9656             <command>RateDropped</command> and <command>QryDropped</command>
9657             statistics.
9658             Responses that truncated by rate limits are included in
9659             <command>RateSlipped</command> and <command>RespTruncated</command>.
9660           </para>
9661         </sect3>
9662       </sect2>
9663
9664       <sect2 id="server_statement_grammar">
9665         <title><command>server</command> Statement Grammar</title>
9666
9667 <programlisting><command>server</command> <replaceable>ip_addr[/prefixlen]</replaceable> {
9668     <optional> bogus <replaceable>yes_or_no</replaceable> ; </optional>
9669     <optional> provide-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
9670     <optional> request-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
9671     <optional> edns <replaceable>yes_or_no</replaceable> ; </optional>
9672     <optional> edns-udp-size <replaceable>number</replaceable> ; </optional>
9673     <optional> max-udp-size <replaceable>number</replaceable> ; </optional>
9674     <optional> transfers <replaceable>number</replaceable> ; </optional>
9675     <optional> transfer-format <replaceable>( one-answer | many-answers )</replaceable> ; ]</optional>
9676     <optional> keys <replaceable>{ string ; <optional> string ; <optional>...</optional></optional> }</replaceable> ; </optional>
9677     <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9678     <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9679     <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9680     <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9681     <optional> query-source <optional> address ( <replaceable>ip_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
9682                   <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional>; </optional>
9683     <optional> query-source-v6 <optional> address ( <replaceable>ip_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
9684                      <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional>; </optional>
9685     <optional> use-queryport-pool <replaceable>yes_or_no</replaceable>; </optional>
9686     <optional> queryport-pool-ports <replaceable>number</replaceable>; </optional>
9687     <optional> queryport-pool-updateinterval <replaceable>number</replaceable>; </optional>
9688 };
9689 </programlisting>
9690
9691         </sect2>
9692
9693         <sect2 id="server_statement_definition_and_usage">
9694           <title><command>server</command> Statement Definition and
9695             Usage</title>
9696
9697           <para>
9698             The <command>server</command> statement defines
9699             characteristics
9700             to be associated with a remote name server.  If a prefix length is
9701             specified, then a range of servers is covered.  Only the most
9702             specific
9703             server clause applies regardless of the order in
9704             <filename>named.conf</filename>.
9705           </para>
9706
9707           <para>
9708             The <command>server</command> statement can occur at
9709             the top level of the
9710             configuration file or inside a <command>view</command>
9711             statement.
9712             If a <command>view</command> statement contains
9713             one or more <command>server</command> statements, only
9714             those
9715             apply to the view and any top-level ones are ignored.
9716             If a view contains no <command>server</command>
9717             statements,
9718             any top-level <command>server</command> statements are
9719             used as
9720             defaults.
9721           </para>
9722
9723           <para>
9724             If you discover that a remote server is giving out bad data,
9725             marking it as bogus will prevent further queries to it. The
9726             default
9727             value of <command>bogus</command> is <command>no</command>.
9728           </para>
9729           <para>
9730             The <command>provide-ixfr</command> clause determines
9731             whether
9732             the local server, acting as master, will respond with an
9733             incremental
9734             zone transfer when the given remote server, a slave, requests it.
9735             If set to <command>yes</command>, incremental transfer
9736             will be provided
9737             whenever possible. If set to <command>no</command>,
9738             all transfers
9739             to the remote server will be non-incremental. If not set, the
9740             value
9741             of the <command>provide-ixfr</command> option in the
9742             view or
9743             global options block is used as a default.
9744           </para>
9745
9746           <para>
9747             The <command>request-ixfr</command> clause determines
9748             whether
9749             the local server, acting as a slave, will request incremental zone
9750             transfers from the given remote server, a master. If not set, the
9751             value of the <command>request-ixfr</command> option in
9752             the view or global options block is used as a default. It may
9753             also be set in the zone block and, if set there, it will
9754             override the global or view setting for that zone.
9755           </para>
9756
9757           <para>
9758             IXFR requests to servers that do not support IXFR will
9759             automatically
9760             fall back to AXFR.  Therefore, there is no need to manually list
9761             which servers support IXFR and which ones do not; the global
9762             default
9763             of <command>yes</command> should always work.
9764             The purpose of the <command>provide-ixfr</command> and
9765             <command>request-ixfr</command> clauses is
9766             to make it possible to disable the use of IXFR even when both
9767             master
9768             and slave claim to support it, for example if one of the servers
9769             is buggy and crashes or corrupts data when IXFR is used.
9770           </para>
9771
9772           <para>
9773             The <command>edns</command> clause determines whether
9774             the local server will attempt to use EDNS when communicating
9775             with the remote server.  The default is <command>yes</command>.
9776           </para>
9777
9778           <para>
9779             The <command>edns-udp-size</command> option sets the EDNS UDP size
9780             that is advertised by <command>named</command> when querying the remote server.
9781             Valid values are 512 to 4096 bytes (values outside this range will be
9782             silently adjusted).  This option is useful when you wish to
9783             advertises a different value to this server than the value you
9784             advertise globally, for example, when there is a firewall at the
9785             remote site that is blocking large replies.
9786           </para>
9787
9788           <para>
9789             The <command>max-udp-size</command> option sets the
9790             maximum EDNS UDP message size <command>named</command> will send.  Valid
9791             values are 512 to 4096 bytes (values outside this range will
9792             be silently adjusted).  This option is useful when you
9793             know that there is a firewall that is blocking large
9794             replies from <command>named</command>.
9795           </para>
9796
9797           <para>
9798             The server supports two zone transfer methods. The first, <command>one-answer</command>,
9799             uses one DNS message per resource record transferred. <command>many-answers</command> packs
9800             as many resource records as possible into a message. <command>many-answers</command> is
9801             more efficient, but is only known to be understood by <acronym>BIND</acronym> 9, <acronym>BIND</acronym>
9802             8.x, and patched versions of <acronym>BIND</acronym>
9803             4.9.5. You can specify which method
9804             to use for a server with the <command>transfer-format</command> option.
9805             If <command>transfer-format</command> is not
9806             specified, the <command>transfer-format</command>
9807             specified
9808             by the <command>options</command> statement will be
9809             used.
9810           </para>
9811
9812           <para><command>transfers</command>
9813             is used to limit the number of concurrent inbound zone
9814             transfers from the specified server. If no
9815             <command>transfers</command> clause is specified, the
9816             limit is set according to the
9817             <command>transfers-per-ns</command> option.
9818           </para>
9819
9820           <para>
9821             The <command>keys</command> clause identifies a
9822             <command>key_id</command> defined by the <command>key</command> statement,
9823             to be used for transaction security (TSIG, <xref linkend="tsig"/>)
9824             when talking to the remote server.
9825             When a request is sent to the remote server, a request signature
9826             will be generated using the key specified here and appended to the
9827             message. A request originating from the remote server is not
9828             required
9829             to be signed by this key.
9830           </para>
9831
9832           <para>
9833             Although the grammar of the <command>keys</command>
9834             clause
9835             allows for multiple keys, only a single key per server is
9836             currently
9837             supported.
9838           </para>
9839
9840           <para>
9841             The <command>transfer-source</command> and
9842             <command>transfer-source-v6</command> clauses specify
9843             the IPv4 and IPv6 source
9844             address to be used for zone transfer with the remote server,
9845             respectively.
9846             For an IPv4 remote server, only <command>transfer-source</command> can
9847             be specified.
9848             Similarly, for an IPv6 remote server, only
9849             <command>transfer-source-v6</command> can be
9850             specified.
9851             For more details, see the description of
9852             <command>transfer-source</command> and
9853             <command>transfer-source-v6</command> in
9854             <xref linkend="zone_transfers"/>.
9855           </para>
9856
9857           <para>
9858             The <command>notify-source</command> and
9859             <command>notify-source-v6</command> clauses specify the
9860             IPv4 and IPv6 source address to be used for notify
9861             messages sent to remote servers, respectively.  For an
9862             IPv4 remote server, only <command>notify-source</command>
9863             can be specified.  Similarly, for an IPv6 remote server,
9864             only <command>notify-source-v6</command> can be specified.
9865           </para>
9866
9867           <para>
9868             The <command>query-source</command> and
9869             <command>query-source-v6</command> clauses specify the
9870             IPv4 and IPv6 source address to be used for queries
9871             sent to remote servers, respectively.  For an IPv4
9872             remote server, only <command>query-source</command> can
9873             be specified.  Similarly, for an IPv6 remote server,
9874             only <command>query-source-v6</command> can be specified.
9875           </para>
9876
9877         </sect2>
9878
9879       <sect2 id="statschannels">
9880         <title><command>statistics-channels</command> Statement Grammar</title>
9881
9882 <programlisting><command>statistics-channels</command> {
9883    [ inet ( ip_addr | * ) [ port ip_port ]
9884    [ allow { <replaceable> address_match_list </replaceable> } ]; ]
9885    [ inet ...; ]
9886 };
9887 </programlisting>
9888       </sect2>
9889
9890       <sect2>
9891           <title><command>statistics-channels</command> Statement Definition and
9892             Usage</title>
9893
9894         <para>
9895           The <command>statistics-channels</command> statement
9896           declares communication channels to be used by system
9897           administrators to get access to statistics information of
9898           the name server.
9899         </para>
9900
9901         <para>
9902           This statement intends to be flexible to support multiple
9903           communication protocols in the future, but currently only
9904           HTTP access is supported.
9905           It requires that BIND 9 be compiled with libxml2;
9906           the <command>statistics-channels</command> statement is
9907           still accepted even if it is built without the library,
9908           but any HTTP access will fail with an error.
9909         </para>
9910
9911         <para>
9912           An <command>inet</command> control channel is a TCP socket
9913           listening at the specified <command>ip_port</command> on the
9914           specified <command>ip_addr</command>, which can be an IPv4 or IPv6
9915           address.  An <command>ip_addr</command> of <literal>*</literal> (asterisk) is
9916           interpreted as the IPv4 wildcard address; connections will be
9917           accepted on any of the system's IPv4 addresses.
9918           To listen on the IPv6 wildcard address,
9919           use an <command>ip_addr</command> of <literal>::</literal>.
9920         </para>
9921
9922         <para>
9923           If no port is specified, port 80 is used for HTTP channels.
9924           The asterisk "<literal>*</literal>" cannot be used for
9925           <command>ip_port</command>.
9926         </para>
9927
9928         <para>
9929           The attempt of opening a statistics channel is
9930           restricted by the optional <command>allow</command> clause.
9931           Connections to the statistics channel are permitted based on the
9932           <command>address_match_list</command>.
9933           If no <command>allow</command> clause is present,
9934           <command>named</command> accepts connection
9935           attempts from any address; since the statistics may
9936           contain sensitive internal information, it is highly
9937           recommended to restrict the source of connection requests
9938           appropriately.
9939         </para>
9940
9941         <para>
9942           If no <command>statistics-channels</command> statement is present,
9943           <command>named</command> will not open any communication channels.
9944         </para>
9945
9946         <para>
9947           If the statistics channel is configured to listen on 127.0.0.1
9948           port 8888, then the statistics are accessible in XML format at
9949           <ulink url="http://127.0.0.1:8888/"
9950                   >http://127.0.0.1:8888/</ulink> or
9951           <ulink url="http://127.0.0.1:8888/xml"
9952                   >http://127.0.0.1:8888/xml</ulink>. A CSS file is
9953           included which can format the XML statistics into tables 
9954           when viewed with a stylesheet-capable browser.  When
9955           <acronym>BIND</acronym> 9 is configured with --enable-newstats, 
9956           a new XML schema is used (version 3) which adds additional
9957           zone statistics and uses a flatter tree for more efficient
9958           parsing.  The stylesheet included uses the Google Charts API
9959           to render data into into charts and graphs when using a
9960           javascript-capable browser.
9961         </para>
9962
9963         <para>
9964           Applications that depend on a particular XML schema
9965           can request 
9966           <ulink url="http://127.0.0.1:8888/xml/v2"
9967                   >http://127.0.0.1:8888/xml/v2</ulink> for version 2
9968           of the statistics XML schema or 
9969           <ulink url="http://127.0.0.1:8888/xml/v3"
9970                   >http://127.0.0.1:8888/xml/v3</ulink> for version 3.
9971           If the requested schema is supported by the server, then
9972           it will respond; if not, it will return a "page not found"
9973           error.
9974         </para>
9975       </sect2>
9976
9977         <sect2 id="trusted-keys">
9978           <title><command>trusted-keys</command> Statement Grammar</title>
9979
9980 <programlisting><command>trusted-keys</command> {
9981     <replaceable>string</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ;
9982     <optional> <replaceable>string</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; <optional>...</optional></optional>
9983 };
9984 </programlisting>
9985
9986         </sect2>
9987         <sect2>
9988           <title><command>trusted-keys</command> Statement Definition
9989             and Usage</title>
9990           <para>
9991             The <command>trusted-keys</command> statement defines
9992             DNSSEC security roots. DNSSEC is described in <xref
9993             linkend="DNSSEC"/>. A security root is defined when the
9994             public key for a non-authoritative zone is known, but
9995             cannot be securely obtained through DNS, either because
9996             it is the DNS root zone or because its parent zone is
9997             unsigned.  Once a key has been configured as a trusted
9998             key, it is treated as if it had been validated and
9999             proven secure. The resolver attempts DNSSEC validation
10000             on all DNS data in subdomains of a security root.
10001           </para>
10002           <para>
10003             All keys (and corresponding zones) listed in
10004             <command>trusted-keys</command> are deemed to exist regardless
10005             of what parent zones say.  Similarly for all keys listed in
10006             <command>trusted-keys</command> only those keys are
10007             used to validate the DNSKEY RRset.  The parent's DS RRset
10008             will not be used.
10009           </para>
10010           <para>
10011             The <command>trusted-keys</command> statement can contain
10012             multiple key entries, each consisting of the key's
10013             domain name, flags, protocol, algorithm, and the Base-64
10014             representation of the key data.
10015             Spaces, tabs, newlines and carriage returns are ignored
10016             in the key data, so the configuration may be split up into
10017             multiple lines.
10018           </para>
10019           <para>
10020             <command>trusted-keys</command> may be set at the top level
10021             of <filename>named.conf</filename> or within a view.  If it is
10022             set in both places, they are additive: keys defined at the top
10023             level are inherited by all views, but keys defined in a view
10024             are only used within that view.
10025           </para>
10026         </sect2>
10027
10028         <sect2>
10029           <title><command>managed-keys</command> Statement Grammar</title>
10030
10031 <programlisting><command>managed-keys</command> {
10032     <replaceable>name</replaceable> <literal>initial-key</literal> <replaceable>flags</replaceable> <replaceable>protocol</replaceable> <replaceable>algorithm</replaceable> <replaceable>key-data</replaceable> ;
10033     <optional> <replaceable>name</replaceable> <literal>initial-key</literal> <replaceable>flags</replaceable> <replaceable>protocol</replaceable> <replaceable>algorithm</replaceable> <replaceable>key-data</replaceable> ; <optional>...</optional></optional>
10034 };
10035 </programlisting>
10036
10037         </sect2>
10038         <sect2 id="managed-keys">
10039           <title><command>managed-keys</command> Statement Definition
10040             and Usage</title>
10041           <para>
10042             The <command>managed-keys</command> statement, like 
10043             <command>trusted-keys</command>, defines DNSSEC
10044             security roots.  The difference is that
10045             <command>managed-keys</command> can be kept up to date
10046             automatically, without intervention from the resolver
10047             operator.
10048           </para>
10049           <para>
10050             Suppose, for example, that a zone's key-signing
10051             key was compromised, and the zone owner had to revoke and
10052             replace the key.  A resolver which had the old key in a
10053             <command>trusted-keys</command> statement would be
10054             unable to validate this zone any longer; it would
10055             reply with a SERVFAIL response code.  This would
10056             continue until the resolver operator had updated the
10057             <command>trusted-keys</command> statement with the new key.
10058           </para>
10059           <para>
10060             If, however, the zone were listed in a
10061             <command>managed-keys</command> statement instead, then the
10062             zone owner could add a "stand-by" key to the zone in advance.
10063             <command>named</command> would store the stand-by key, and
10064             when the original key was revoked, <command>named</command>
10065             would be able to transition smoothly to the new key.  It would
10066             also recognize that the old key had been revoked, and cease
10067             using that key to validate answers, minimizing the damage that
10068             the compromised key could do.
10069           </para>
10070           <para>
10071             A <command>managed-keys</command> statement contains a list of
10072             the keys to be managed, along with information about how the
10073             keys are to be initialized for the first time.  The only
10074             initialization method currently supported (as of
10075             <acronym>BIND</acronym> 9.7.0) is <literal>initial-key</literal>.
10076             This means the <command>managed-keys</command> statement must
10077             contain a copy of the initializing key.  (Future releases may
10078             allow keys to be initialized by other methods, eliminating this
10079             requirement.)
10080           </para>
10081           <para>
10082             Consequently, a <command>managed-keys</command> statement
10083             appears similar to a <command>trusted-keys</command>, differing
10084             in the presence of the second field, containing the keyword
10085             <literal>initial-key</literal>.  The difference is, whereas the
10086             keys listed in a <command>trusted-keys</command> continue to be
10087             trusted until they are removed from
10088             <filename>named.conf</filename>, an initializing key listed 
10089             in a <command>managed-keys</command> statement is only trusted
10090             <emphasis>once</emphasis>: for as long as it takes to load the
10091             managed key database and start the RFC 5011 key maintenance
10092             process.
10093           </para>
10094           <para>
10095             The first time <command>named</command> runs with a managed key
10096             configured in <filename>named.conf</filename>, it fetches the
10097             DNSKEY RRset directly from the zone apex, and validates it
10098             using the key specified in the <command>managed-keys</command>
10099             statement.  If the DNSKEY RRset is validly signed, then it is
10100             used as the basis for a new managed keys database.
10101           </para>
10102           <para>
10103             From that point on, whenever <command>named</command> runs, it
10104             sees the <command>managed-keys</command> statement, checks to
10105             make sure RFC 5011 key maintenance has already been initialized
10106             for the specified domain, and if so, it simply moves on.  The
10107             key specified in the <command>managed-keys</command> is not
10108             used to validate answers; it has been superseded by the key or
10109             keys stored in the managed keys database.
10110           </para>
10111           <para>
10112             The next time <command>named</command> runs after a name
10113             has been <emphasis>removed</emphasis> from the
10114             <command>managed-keys</command> statement, the corresponding
10115             zone will be removed from the managed keys database,
10116             and RFC 5011 key maintenance will no longer be used for that
10117             domain.
10118           </para>
10119           <para>
10120             <command>named</command> only maintains a single managed keys
10121             database; consequently, unlike <command>trusted-keys</command>,
10122             <command>managed-keys</command> may only be set at the top
10123             level of <filename>named.conf</filename>, not within a view.
10124           </para>
10125           <para>
10126             In the current implementation, the managed keys database is
10127             stored as a master-format zone file called
10128             <filename>managed-keys.bind</filename>.  When the key database
10129             is changed, the zone is updated.  As with any other dynamic
10130             zone, changes will be written into a journal file,
10131             <filename>managed-keys.bind.jnl</filename>.  They are committed
10132             to the master file as soon as possible afterward; in the case
10133             of the managed key database, this will usually occur within 30
10134             seconds.  So, whenever <command>named</command> is using
10135             automatic key maintenance, those two files can be expected to
10136             exist in the working directory.  (For this reason among others,
10137             the working directory should be always be writable by
10138             <command>named</command>.)
10139           </para>
10140           <para>
10141             If the <command>dnssec-validation</command> option is
10142             set to <userinput>auto</userinput>, <command>named</command>
10143             will automatically initialize a managed key for the
10144             root zone.  Similarly, if the <command>dnssec-lookaside</command>
10145             option is set to <userinput>auto</userinput>,
10146             <command>named</command> will automatically initialize
10147             a managed key for the zone <literal>dlv.isc.org</literal>.
10148             In both cases, the key that is used to initialize the key
10149             maintenance process is built into <command>named</command>,
10150             and can be overridden from <command>bindkeys-file</command>.
10151           </para>
10152         </sect2>
10153
10154         <sect2 id="view_statement_grammar">
10155           <title><command>view</command> Statement Grammar</title>
10156
10157 <programlisting><command>view</command> <replaceable>view_name</replaceable>
10158       <optional><replaceable>class</replaceable></optional> {
10159       match-clients { <replaceable>address_match_list</replaceable> };
10160       match-destinations { <replaceable>address_match_list</replaceable> };
10161       match-recursive-only <replaceable>yes_or_no</replaceable> ;
10162       <optional> <replaceable>view_option</replaceable>; ...</optional>
10163       <optional> <replaceable>zone_statement</replaceable>; ...</optional>
10164 };
10165 </programlisting>
10166
10167         </sect2>
10168         <sect2>
10169           <title><command>view</command> Statement Definition and Usage</title>
10170
10171           <para>
10172             The <command>view</command> statement is a powerful
10173             feature
10174             of <acronym>BIND</acronym> 9 that lets a name server
10175             answer a DNS query differently
10176             depending on who is asking. It is particularly useful for
10177             implementing
10178             split DNS setups without having to run multiple servers.
10179           </para>
10180
10181           <para>
10182             Each <command>view</command> statement defines a view
10183             of the
10184             DNS namespace that will be seen by a subset of clients.  A client
10185             matches
10186             a view if its source IP address matches the
10187             <varname>address_match_list</varname> of the view's
10188             <command>match-clients</command> clause and its
10189             destination IP address matches
10190             the <varname>address_match_list</varname> of the
10191             view's
10192             <command>match-destinations</command> clause.  If not
10193             specified, both
10194             <command>match-clients</command> and <command>match-destinations</command>
10195             default to matching all addresses.  In addition to checking IP
10196             addresses
10197             <command>match-clients</command> and <command>match-destinations</command>
10198             can also take <command>keys</command> which provide an
10199             mechanism for the
10200             client to select the view.  A view can also be specified
10201             as <command>match-recursive-only</command>, which
10202             means that only recursive
10203             requests from matching clients will match that view.
10204             The order of the <command>view</command> statements is
10205             significant &mdash;
10206             a client request will be resolved in the context of the first
10207             <command>view</command> that it matches.
10208           </para>
10209
10210           <para>
10211             Zones defined within a <command>view</command>
10212             statement will
10213             only be accessible to clients that match the <command>view</command>.
10214             By defining a zone of the same name in multiple views, different
10215             zone data can be given to different clients, for example,
10216             "internal"
10217             and "external" clients in a split DNS setup.
10218           </para>
10219
10220           <para>
10221             Many of the options given in the <command>options</command> statement
10222             can also be used within a <command>view</command>
10223             statement, and then
10224             apply only when resolving queries with that view.  When no
10225             view-specific
10226             value is given, the value in the <command>options</command> statement
10227             is used as a default.  Also, zone options can have default values
10228             specified
10229             in the <command>view</command> statement; these
10230             view-specific defaults
10231             take precedence over those in the <command>options</command> statement.
10232           </para>
10233
10234           <para>
10235             Views are class specific.  If no class is given, class IN
10236             is assumed.  Note that all non-IN views must contain a hint zone,
10237             since only the IN class has compiled-in default hints.
10238           </para>
10239
10240           <para>
10241             If there are no <command>view</command> statements in
10242             the config
10243             file, a default view that matches any client is automatically
10244             created
10245             in class IN. Any <command>zone</command> statements
10246             specified on
10247             the top level of the configuration file are considered to be part
10248             of
10249             this default view, and the <command>options</command>
10250             statement will
10251             apply to the default view. If any explicit <command>view</command>
10252             statements are present, all <command>zone</command>
10253             statements must
10254             occur inside <command>view</command> statements.
10255           </para>
10256
10257           <para>
10258             Here is an example of a typical split DNS setup implemented
10259             using <command>view</command> statements:
10260           </para>
10261
10262 <programlisting>view "internal" {
10263       // This should match our internal networks.
10264       match-clients { 10.0.0.0/8; };
10265
10266       // Provide recursive service to internal
10267       // clients only.
10268       recursion yes;
10269
10270       // Provide a complete view of the example.com
10271       // zone including addresses of internal hosts.
10272       zone "example.com" {
10273             type master;
10274             file "example-internal.db";
10275       };
10276 };
10277
10278 view "external" {
10279       // Match all clients not matched by the
10280       // previous view.
10281       match-clients { any; };
10282
10283       // Refuse recursive service to external clients.
10284       recursion no;
10285
10286       // Provide a restricted view of the example.com
10287       // zone containing only publicly accessible hosts.
10288       zone "example.com" {
10289            type master;
10290            file "example-external.db";
10291       };
10292 };
10293 </programlisting>
10294
10295         </sect2>
10296         <sect2 id="zone_statement_grammar">
10297           <title><command>zone</command>
10298             Statement Grammar</title>
10299
10300 <programlisting><command>zone</command> <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10301     type master;
10302     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
10303     <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
10304     <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
10305     <optional> allow-update { <replaceable>address_match_list</replaceable> }; </optional>
10306     <optional> update-check-ksk <replaceable>yes_or_no</replaceable>; </optional>
10307     <optional> dnssec-dnskey-kskonly <replaceable>yes_or_no</replaceable>; </optional>
10308     <optional> dnssec-loadkeys-interval <replaceable>number</replaceable>; </optional>
10309     <optional> update-policy <replaceable>local</replaceable> | { <replaceable>update_policy_rule</replaceable> <optional>...</optional> }; </optional>
10310     <optional> also-notify { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
10311                   <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
10312     <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
10313     <optional> check-mx (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
10314     <optional> check-wildcard <replaceable>yes_or_no</replaceable>; </optional>
10315     <optional> check-spf ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
10316     <optional> check-integrity <replaceable>yes_or_no</replaceable> ; </optional>
10317     <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
10318     <optional> file <replaceable>string</replaceable> ; </optional>
10319     <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
10320     <optional> journal <replaceable>string</replaceable> ; </optional>
10321     <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
10322     <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
10323     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
10324     <optional> ixfr-base <replaceable>string</replaceable> ; </optional>
10325     <optional> ixfr-from-differences <replaceable>yes_or_no</replaceable>; </optional>
10326     <optional> ixfr-tmp-file <replaceable>string</replaceable> ; </optional>
10327     <optional> request-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
10328     <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable> ; </optional>
10329     <optional> max-ixfr-log-size <replaceable>number</replaceable> ; </optional>
10330     <optional> max-transfer-idle-out <replaceable>number</replaceable> ; </optional>
10331     <optional> max-transfer-time-out <replaceable>number</replaceable> ; </optional>
10332     <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable> ; </optional>
10333     <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
10334     <optional> notify-to-soa <replaceable>yes_or_no</replaceable>; </optional>
10335     <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
10336     <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10337     <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10338     <optional> zone-statistics <replaceable>full</replaceable> | <replaceable>terse</replaceable> | <replaceable>none</replaceable>; </optional>
10339     <optional> sig-validity-interval <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
10340     <optional> sig-signing-nodes <replaceable>number</replaceable> ; </optional>
10341     <optional> sig-signing-signatures <replaceable>number</replaceable> ; </optional>
10342     <optional> sig-signing-type <replaceable>number</replaceable> ; </optional>
10343     <optional> database <replaceable>string</replaceable> ; </optional>
10344     <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
10345     <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
10346     <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
10347     <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
10348     <optional> key-directory <replaceable>path_name</replaceable>; </optional>
10349     <optional> auto-dnssec <constant>allow</constant>|<constant>maintain</constant>|<constant>off</constant>; </optional>
10350     <optional> inline-signing <replaceable>yes_or_no</replaceable>; </optional>
10351     <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
10352     <optional> serial-update-method <constant>increment</constant>|<constant>unixtime</constant>; </optional>
10353 };
10354
10355 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10356     type slave;
10357     <optional> allow-notify { <replaceable>address_match_list</replaceable> }; </optional>
10358     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
10359     <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
10360     <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
10361     <optional> allow-update-forwarding { <replaceable>address_match_list</replaceable> }; </optional>
10362     <optional> dnssec-update-mode ( <replaceable>maintain</replaceable> | <replaceable>no-resign</replaceable> ); </optional>
10363     <optional> update-check-ksk <replaceable>yes_or_no</replaceable>; </optional>
10364     <optional> dnssec-dnskey-kskonly <replaceable>yes_or_no</replaceable>; </optional>
10365     <optional> dnssec-loadkeys-interval <replaceable>number</replaceable>; </optional>
10366     <optional> dnssec-secure-to-insecure <replaceable>yes_or_no</replaceable> ; </optional>
10367     <optional> try-tcp-refresh <replaceable>yes_or_no</replaceable>; </optional>
10368     <optional> also-notify <optional>port <replaceable>ip_port</replaceable></optional> { ( <replaceable>masters_list</replaceable> | <replaceable>ip_addr</replaceable>
10369                               <optional>port <replaceable>ip_port</replaceable></optional>
10370                               <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> }; </optional>
10371     <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
10372     <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
10373     <optional> file <replaceable>string</replaceable> ; </optional>
10374     <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
10375     <optional> journal <replaceable>string</replaceable> ; </optional>
10376     <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
10377     <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
10378     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
10379     <optional> ixfr-base <replaceable>string</replaceable> ; </optional>
10380     <optional> ixfr-from-differences <replaceable>yes_or_no</replaceable>; </optional>
10381     <optional> ixfr-tmp-file <replaceable>string</replaceable> ; </optional>
10382     <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable> ; </optional>
10383     <optional> masters <optional>port <replaceable>ip_port</replaceable></optional> { ( <replaceable>masters_list</replaceable> | <replaceable>ip_addr</replaceable>
10384                               <optional>port <replaceable>ip_port</replaceable></optional>
10385                               <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> }; </optional>
10386     <optional> max-ixfr-log-size <replaceable>number</replaceable> ; </optional>
10387     <optional> max-transfer-idle-in <replaceable>number</replaceable> ; </optional>
10388     <optional> max-transfer-idle-out <replaceable>number</replaceable> ; </optional>
10389     <optional> max-transfer-time-in <replaceable>number</replaceable> ; </optional>
10390     <optional> max-transfer-time-out <replaceable>number</replaceable> ; </optional>
10391     <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable> ; </optional>
10392     <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
10393     <optional> notify-to-soa <replaceable>yes_or_no</replaceable>; </optional>
10394     <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
10395     <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10396     <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10397     <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10398     <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
10399                              <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10400     <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
10401     <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10402     <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10403     <optional> zone-statistics <replaceable>full</replaceable> | <replaceable>terse</replaceable> | <replaceable>none</replaceable>; </optional>
10404     <optional> sig-validity-interval <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
10405     <optional> sig-signing-nodes <replaceable>number</replaceable> ; </optional>
10406     <optional> sig-signing-signatures <replaceable>number</replaceable> ; </optional>
10407     <optional> sig-signing-type <replaceable>number</replaceable> ; </optional>
10408     <optional> database <replaceable>string</replaceable> ; </optional>
10409     <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
10410     <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
10411     <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
10412     <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
10413     <optional> key-directory <replaceable>path_name</replaceable>; </optional>
10414     <optional> auto-dnssec <constant>allow</constant>|<constant>maintain</constant>|<constant>off</constant>; </optional>
10415     <optional> inline-signing <replaceable>yes_or_no</replaceable>; </optional>
10416     <optional> multi-master <replaceable>yes_or_no</replaceable> ; </optional>
10417     <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
10418 };
10419
10420 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10421     type hint;
10422     file <replaceable>string</replaceable> ;
10423     <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
10424     <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional> // Not Implemented.
10425 };
10426
10427 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10428     type stub;
10429     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
10430     <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
10431     <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
10432     <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
10433     <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
10434     <optional> file <replaceable>string</replaceable> ; </optional>
10435     <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
10436     <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
10437     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
10438     <optional> masters <optional>port <replaceable>ip_port</replaceable></optional> { ( <replaceable>masters_list</replaceable> | <replaceable>ip_addr</replaceable>
10439                               <optional>port <replaceable>ip_port</replaceable></optional>
10440                               <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> }; </optional>
10441     <optional> max-transfer-idle-in <replaceable>number</replaceable> ; </optional>
10442     <optional> max-transfer-time-in <replaceable>number</replaceable> ; </optional>
10443     <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
10444     <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10445     <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
10446                          <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10447     <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10448     <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
10449                             <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
10450     <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
10451     <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
10452     <optional> database <replaceable>string</replaceable> ; </optional>
10453     <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
10454     <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
10455     <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
10456     <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
10457     <optional> multi-master <replaceable>yes_or_no</replaceable> ; </optional>
10458 };
10459
10460 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10461     type static-stub;
10462     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
10463     <optional> server-addresses { <optional> <replaceable>ip_addr</replaceable> ; ... </optional> }; </optional>
10464     <optional> server-names { <optional> <replaceable>namelist</replaceable> </optional> }; </optional>  
10465     <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
10466 };
10467
10468 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10469     type forward;
10470     <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
10471     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
10472     <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
10473 };
10474
10475 zone <replaceable>"."</replaceable> <optional><replaceable>class</replaceable></optional> {
10476     type redirect;
10477     file <replaceable>string</replaceable> ;
10478     <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
10479     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
10480 };
10481
10482 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10483     type delegation-only;
10484 };
10485
10486 </programlisting>
10487
10488         </sect2>
10489         <sect2>
10490           <title><command>zone</command> Statement Definition and Usage</title>
10491           <sect3>
10492             <title>Zone Types</title>
10493             <informaltable colsep="0" rowsep="0">
10494               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
10495                 <!--colspec colname="1" colnum="1" colsep="0" colwidth="1.108in"/-->
10496                 <!--colspec colname="2" colnum="2" colsep="0" colwidth="4.017in"/-->
10497                 <colspec colname="1" colnum="1" colsep="0"/>
10498                 <colspec colname="2" colnum="2" colsep="0" colwidth="4.017in"/>
10499                 <tbody>
10500                   <row rowsep="0">
10501                     <entry colname="1">
10502                       <para>
10503                         <varname>master</varname>
10504                       </para>
10505                     </entry>
10506                     <entry colname="2">
10507                       <para>
10508                         The server has a master copy of the data
10509                         for the zone and will be able to provide authoritative
10510                         answers for
10511                         it.
10512                       </para>
10513                     </entry>
10514                   </row>
10515                   <row rowsep="0">
10516                     <entry colname="1">
10517                       <para>
10518                         <varname>slave</varname>
10519                       </para>
10520                     </entry>
10521                     <entry colname="2">
10522                       <para>
10523                         A slave zone is a replica of a master
10524                         zone. The <command>masters</command> list
10525                         specifies one or more IP addresses
10526                         of master servers that the slave contacts to update
10527                         its copy of the zone.
10528                         Masters list elements can also be names of other
10529                         masters lists.
10530                         By default, transfers are made from port 53 on the
10531                         servers; this can
10532                         be changed for all servers by specifying a port number
10533                         before the
10534                         list of IP addresses, or on a per-server basis after
10535                         the IP address.
10536                         Authentication to the master can also be done with
10537                         per-server TSIG keys.
10538                         If a file is specified, then the
10539                         replica will be written to this file whenever the zone
10540                         is changed,
10541                         and reloaded from this file on a server restart. Use
10542                         of a file is
10543                         recommended, since it often speeds server startup and
10544                         eliminates
10545                         a needless waste of bandwidth. Note that for large
10546                         numbers (in the
10547                         tens or hundreds of thousands) of zones per server, it
10548                         is best to
10549                         use a two-level naming scheme for zone filenames. For
10550                         example,
10551                         a slave server for the zone <literal>example.com</literal> might place
10552                         the zone contents into a file called
10553                         <filename>ex/example.com</filename> where <filename>ex/</filename> is
10554                         just the first two letters of the zone name. (Most
10555                         operating systems
10556                         behave very slowly if you put 100000 files into
10557                         a single directory.)
10558                       </para>
10559                     </entry>
10560                   </row>
10561                   <row rowsep="0">
10562                     <entry colname="1">
10563                       <para>
10564                         <varname>stub</varname>
10565                       </para>
10566                     </entry>
10567                     <entry colname="2">
10568                       <para>
10569                         A stub zone is similar to a slave zone,
10570                         except that it replicates only the NS records of a
10571                         master zone instead
10572                         of the entire zone. Stub zones are not a standard part
10573                         of the DNS;
10574                         they are a feature specific to the <acronym>BIND</acronym> implementation.
10575                       </para>
10576
10577                       <para>
10578                         Stub zones can be used to eliminate the need for glue
10579                         NS record
10580                         in a parent zone at the expense of maintaining a stub
10581                         zone entry and
10582                         a set of name server addresses in <filename>named.conf</filename>.
10583                         This usage is not recommended for new configurations,
10584                         and BIND 9
10585                         supports it only in a limited way.
10586                         In <acronym>BIND</acronym> 4/8, zone
10587                         transfers of a parent zone
10588                         included the NS records from stub children of that
10589                         zone. This meant
10590                         that, in some cases, users could get away with
10591                         configuring child stubs
10592                         only in the master server for the parent zone. <acronym>BIND</acronym>
10593                         9 never mixes together zone data from different zones
10594                         in this
10595                         way. Therefore, if a <acronym>BIND</acronym> 9 master serving a parent
10596                         zone has child stub zones configured, all the slave
10597                         servers for the
10598                         parent zone also need to have the same child stub
10599                         zones
10600                         configured.
10601                       </para>
10602
10603                       <para>
10604                         Stub zones can also be used as a way of forcing the
10605                         resolution
10606                         of a given domain to use a particular set of
10607                         authoritative servers.
10608                         For example, the caching name servers on a private
10609                         network using
10610                         RFC1918 addressing may be configured with stub zones
10611                         for
10612                         <literal>10.in-addr.arpa</literal>
10613                         to use a set of internal name servers as the
10614                         authoritative
10615                         servers for that domain.
10616                       </para>
10617                     </entry>
10618                   </row>
10619                   <row rowsep="0">
10620                     <entry colname="1">
10621                       <para>
10622                         <varname>static-stub</varname>
10623                       </para>
10624                     </entry>
10625                     <entry colname="2">
10626                       <para>
10627                         A static-stub zone is similar to a stub zone
10628                         with the following exceptions:
10629                         the zone data is statically configured, rather
10630                         than transferred from a master server;
10631                         when recursion is necessary for a query that
10632                         matches a static-stub zone, the locally
10633                         configured data (nameserver names and glue addresses)
10634                         is always used even if different authoritative
10635                         information is cached.
10636                       </para>
10637                       <para>
10638                         Zone data is configured via the
10639                         <command>server-addresses</command> and
10640                         <command>server-names</command> zone options.
10641                       </para>
10642                       <para>
10643                         The zone data is maintained in the form of NS
10644                         and (if necessary) glue A or AAAA RRs
10645                         internally, which can be seen by dumping zone
10646                         databases by <command>rndc dumpdb -all</command>.
10647                         The configured RRs are considered local configuration
10648                         parameters rather than public data.
10649                         Non recursive queries (i.e., those with the RD
10650                         bit off) to a static-stub zone are therefore
10651                         prohibited and will be responded with REFUSED.
10652                       </para>
10653                       <para>
10654                         Since the data is statically configured, no
10655                         zone maintenance action takes place for a static-stub
10656                         zone.
10657                         For example, there is no periodic refresh
10658                         attempt, and an incoming notify message
10659                         will be rejected with an rcode of NOTAUTH.
10660                       </para>
10661                       <para>
10662                         Each static-stub zone is configured with
10663                         internally generated NS and (if necessary)
10664                         glue A or AAAA RRs 
10665                       </para>
10666                     </entry>
10667                   </row>
10668                   <row rowsep="0">
10669                     <entry colname="1">
10670                       <para>
10671                         <varname>forward</varname>
10672                       </para>
10673                     </entry>
10674                     <entry colname="2">
10675                       <para>
10676                         A "forward zone" is a way to configure
10677                         forwarding on a per-domain basis.  A <command>zone</command> statement
10678                         of type <command>forward</command> can
10679                         contain a <command>forward</command>
10680                         and/or <command>forwarders</command>
10681                         statement,
10682                         which will apply to queries within the domain given by
10683                         the zone
10684                         name. If no <command>forwarders</command>
10685                         statement is present or
10686                         an empty list for <command>forwarders</command> is given, then no
10687                         forwarding will be done for the domain, canceling the
10688                         effects of
10689                         any forwarders in the <command>options</command> statement. Thus
10690                         if you want to use this type of zone to change the
10691                         behavior of the
10692                         global <command>forward</command> option
10693                         (that is, "forward first"
10694                         to, then "forward only", or vice versa, but want to
10695                         use the same
10696                         servers as set globally) you need to re-specify the
10697                         global forwarders.
10698                       </para>
10699                     </entry>
10700                   </row>
10701                   <row rowsep="0">
10702                     <entry colname="1">
10703                       <para>
10704                         <varname>hint</varname>
10705                       </para>
10706                     </entry>
10707                     <entry colname="2">
10708                       <para>
10709                         The initial set of root name servers is
10710                         specified using a "hint zone". When the server starts
10711                         up, it uses
10712                         the root hints to find a root name server and get the
10713                         most recent
10714                         list of root name servers. If no hint zone is
10715                         specified for class
10716                         IN, the server uses a compiled-in default set of root
10717                         servers hints.
10718                         Classes other than IN have no built-in defaults hints.
10719                       </para>
10720                     </entry>
10721                   </row>
10722                   <row rowsep="0">
10723                     <entry colname="1">
10724                       <para>
10725                         <varname>redirect</varname>
10726                       </para>
10727                     </entry>
10728                     <entry colname="2">
10729                       <para>
10730                         Redirect zones are used to provide answers to
10731                         queries when normal resolution would result in
10732                         NXDOMAIN being returned.
10733                         Only one redirect zone is supported
10734                         per view.  <command>allow-query</command> can be
10735                         used to restrict which clients see these answers.
10736                       </para>
10737                       <para>
10738                         If the client has requested DNSSEC records (DO=1) and
10739                         the NXDOMAIN response is signed then no substitution
10740                         will occur.
10741                       </para>
10742                       <para>
10743                         To redirect all NXDOMAIN responses to
10744                         100.100.100.2 and
10745                         2001:ffff:ffff::100.100.100.2, one would
10746                         configure a type redirect zone named ".",
10747                         with the zone file containing wildcard records
10748                         that point to the desired addresses: 
10749                         <literal>"*. IN A 100.100.100.2"</literal>
10750                         and
10751                         <literal>"*. IN AAAA 2001:ffff:ffff::100.100.100.2"</literal>.
10752                       </para>
10753                       <para>
10754                         To redirect all Spanish names (under .ES) one
10755                         would use similar entries but with the names
10756                         "*.ES." instead of "*.".  To redirect all 
10757                         commercial Spanish names (under COM.ES) one
10758                         would use wildcard entries called "*.COM.ES.".
10759                       </para>
10760                       <para>
10761                         Note that the redirect zone supports all
10762                         possible types; it is not limited to A and
10763                         AAAA records.
10764                       </para>
10765                       <para>
10766                         Because redirect zones are not referenced
10767                         directly by name, they are not kept in the
10768                         zone lookup table with normal master and slave
10769                         zones. Consequently, it is not currently possible
10770                         to use
10771                         <command>rndc reload
10772                                 <replaceable>zonename</replaceable></command>
10773                         to reload a redirect zone.  However, when using
10774                         <command>rndc reload</command> without specifying
10775                         a zone name, redirect zones will be reloaded along
10776                         with other zones.
10777                       </para>
10778                     </entry>
10779                   </row>
10780                   <row rowsep="0">
10781                     <entry colname="1">
10782                       <para>
10783                         <varname>delegation-only</varname>
10784                       </para>
10785                     </entry>
10786                     <entry colname="2">
10787                       <para>
10788                         This is used to enforce the delegation-only
10789                         status of infrastructure zones (e.g. COM,
10790                         NET, ORG).  Any answer that is received
10791                         without an explicit or implicit delegation
10792                         in the authority section will be treated
10793                         as NXDOMAIN.  This does not apply to the
10794                         zone apex.  This should not be applied to
10795                         leaf zones.
10796                       </para>
10797                       <para>
10798                         <varname>delegation-only</varname> has no
10799                         effect on answers received from forwarders.
10800                       </para>
10801                       <para>
10802                         See caveats in <xref linkend="root_delegation_only"/>.
10803                       </para>
10804                     </entry>
10805                   </row>
10806                 </tbody>
10807               </tgroup>
10808             </informaltable>
10809           </sect3>
10810
10811           <sect3>
10812             <title>Class</title>
10813             <para>
10814               The zone's name may optionally be followed by a class. If
10815               a class is not specified, class <literal>IN</literal> (for <varname>Internet</varname>),
10816               is assumed. This is correct for the vast majority of cases.
10817             </para>
10818             <para>
10819               The <literal>hesiod</literal> class is
10820               named for an information service from MIT's Project Athena. It
10821               is
10822               used to share information about various systems databases, such
10823               as users, groups, printers and so on. The keyword
10824               <literal>HS</literal> is
10825               a synonym for hesiod.
10826             </para>
10827             <para>
10828               Another MIT development is Chaosnet, a LAN protocol created
10829               in the mid-1970s. Zone data for it can be specified with the <literal>CHAOS</literal> class.
10830             </para>
10831           </sect3>
10832           <sect3>
10833
10834             <title>Zone Options</title>
10835
10836             <variablelist>
10837
10838               <varlistentry>
10839                 <term><command>allow-notify</command></term>
10840                 <listitem>
10841                   <para>
10842                     See the description of
10843                     <command>allow-notify</command> in <xref linkend="access_control"/>.
10844                   </para>
10845                 </listitem>
10846               </varlistentry>
10847
10848               <varlistentry>
10849                 <term><command>allow-query</command></term>
10850                 <listitem>
10851                   <para>
10852                     See the description of
10853                     <command>allow-query</command> in <xref linkend="access_control"/>.
10854                   </para>
10855                 </listitem>
10856               </varlistentry>
10857
10858               <varlistentry>
10859                 <term><command>allow-query-on</command></term>
10860                 <listitem>
10861                   <para>
10862                     See the description of
10863                     <command>allow-query-on</command> in <xref linkend="access_control"/>.
10864                   </para>
10865                 </listitem>
10866               </varlistentry>
10867
10868               <varlistentry>
10869                 <term><command>allow-transfer</command></term>
10870                 <listitem>
10871                   <para>
10872                     See the description of <command>allow-transfer</command>
10873                     in <xref linkend="access_control"/>.
10874                   </para>
10875                 </listitem>
10876               </varlistentry>
10877
10878               <varlistentry>
10879                 <term><command>allow-update</command></term>
10880                 <listitem>
10881                   <para>
10882                     See the description of <command>allow-update</command>
10883                     in <xref linkend="access_control"/>.
10884                   </para>
10885                 </listitem>
10886               </varlistentry>
10887
10888               <varlistentry>
10889                 <term><command>update-policy</command></term>
10890                 <listitem>
10891                   <para>
10892                     Specifies a "Simple Secure Update" policy. See
10893                     <xref linkend="dynamic_update_policies"/>.
10894                   </para>
10895                 </listitem>
10896               </varlistentry>
10897
10898               <varlistentry>
10899                 <term><command>allow-update-forwarding</command></term>
10900                 <listitem>
10901                   <para>
10902                     See the description of <command>allow-update-forwarding</command>
10903                     in <xref linkend="access_control"/>.
10904                   </para>
10905                 </listitem>
10906               </varlistentry>
10907
10908               <varlistentry>
10909                 <term><command>also-notify</command></term>
10910                 <listitem>
10911                   <para>
10912                     Only meaningful if <command>notify</command>
10913                     is
10914                     active for this zone. The set of machines that will
10915                     receive a
10916                     <literal>DNS NOTIFY</literal> message
10917                     for this zone is made up of all the listed name servers
10918                     (other than
10919                     the primary master) for the zone plus any IP addresses
10920                     specified
10921                     with <command>also-notify</command>. A port
10922                     may be specified
10923                     with each <command>also-notify</command>
10924                     address to send the notify
10925                     messages to a port other than the default of 53.
10926                     A TSIG key may also be specified to cause the
10927                     <literal>NOTIFY</literal> to be signed by the
10928                     given key.
10929                     <command>also-notify</command> is not
10930                     meaningful for stub zones.
10931                     The default is the empty list.
10932                   </para>
10933                 </listitem>
10934               </varlistentry>
10935
10936               <varlistentry>
10937                 <term><command>check-names</command></term>
10938                 <listitem>
10939                   <para>
10940                     This option is used to restrict the character set and
10941                     syntax of
10942                     certain domain names in master files and/or DNS responses
10943                     received from the
10944                     network.  The default varies according to zone type.  For <command>master</command> zones the default is <command>fail</command>.  For <command>slave</command>
10945                     zones the default is <command>warn</command>.
10946                     It is not implemented for <command>hint</command> zones.
10947                   </para>
10948                 </listitem>
10949               </varlistentry>
10950
10951               <varlistentry>
10952                 <term><command>check-mx</command></term>
10953                 <listitem>
10954                   <para>
10955                     See the description of
10956                     <command>check-mx</command> in <xref linkend="boolean_options"/>.
10957                   </para>
10958                 </listitem>
10959               </varlistentry>
10960
10961               <varlistentry>
10962                 <term><command>check-spf</command></term>
10963                 <listitem>
10964                   <para>
10965                     See the description of
10966                     <command>check-spf</command> in <xref linkend="boolean_options"/>.
10967                   </para>
10968                 </listitem>
10969               </varlistentry>
10970
10971               <varlistentry>
10972                 <term><command>check-wildcard</command></term>
10973                 <listitem>
10974                   <para>
10975                     See the description of
10976                     <command>check-wildcard</command> in <xref linkend="boolean_options"/>.
10977                   </para>
10978                 </listitem>
10979               </varlistentry>
10980
10981               <varlistentry>
10982                 <term><command>check-integrity</command></term>
10983                 <listitem>
10984                   <para>
10985                     See the description of
10986                     <command>check-integrity</command> in <xref linkend="boolean_options"/>.
10987                   </para>
10988                 </listitem>
10989               </varlistentry>
10990
10991               <varlistentry>
10992                 <term><command>check-sibling</command></term>
10993                 <listitem>
10994                   <para>
10995                     See the description of
10996                     <command>check-sibling</command> in <xref linkend="boolean_options"/>.
10997                   </para>
10998                 </listitem>
10999               </varlistentry>
11000
11001               <varlistentry>
11002                 <term><command>zero-no-soa-ttl</command></term>
11003                 <listitem>
11004                   <para>
11005                     See the description of
11006                     <command>zero-no-soa-ttl</command> in <xref linkend="boolean_options"/>.
11007                   </para>
11008                 </listitem>
11009               </varlistentry>
11010
11011               <varlistentry>
11012                 <term><command>update-check-ksk</command></term>
11013                 <listitem>
11014                   <para>
11015                     See the description of
11016                     <command>update-check-ksk</command> in <xref linkend="boolean_options"/>.
11017                   </para>
11018                 </listitem>
11019               </varlistentry>
11020
11021               <varlistentry>
11022                 <term><command>dnssec-update-mode</command></term>
11023                 <listitem>
11024                   <para>
11025                     See the description of
11026                     <command>dnssec-update-mode</command> in <xref linkend="options"/>.
11027                   </para>
11028                 </listitem>
11029               </varlistentry>
11030
11031               <varlistentry>
11032                 <term><command>dnssec-dnskey-kskonly</command></term>
11033                 <listitem>
11034                   <para>
11035                     See the description of
11036                     <command>dnssec-dnskey-kskonly</command> in <xref linkend="boolean_options"/>.
11037                   </para>
11038                 </listitem>
11039               </varlistentry>
11040
11041               <varlistentry>
11042                 <term><command>try-tcp-refresh</command></term>
11043                 <listitem>
11044                   <para>
11045                     See the description of
11046                     <command>try-tcp-refresh</command> in <xref linkend="boolean_options"/>.
11047                   </para>
11048                 </listitem>
11049               </varlistentry>
11050
11051               <varlistentry>
11052                 <term><command>database</command></term>
11053                 <listitem>
11054                   <para>
11055                     Specify the type of database to be used for storing the
11056                     zone data.  The string following the <command>database</command> keyword
11057                     is interpreted as a list of whitespace-delimited words.
11058                     The first word
11059                     identifies the database type, and any subsequent words are
11060                     passed
11061                     as arguments to the database to be interpreted in a way
11062                     specific
11063                     to the database type.
11064                   </para>
11065                   <para>
11066                     The default is <userinput>"rbt"</userinput>, BIND 9's
11067                     native in-memory
11068                     red-black-tree database.  This database does not take
11069                     arguments.
11070                   </para>
11071                   <para>
11072                     Other values are possible if additional database drivers
11073                     have been linked into the server.  Some sample drivers are
11074                     included
11075                     with the distribution but none are linked in by default.
11076                   </para>
11077                 </listitem>
11078               </varlistentry>
11079
11080               <varlistentry>
11081                 <term><command>dialup</command></term>
11082                 <listitem>
11083                   <para>
11084                     See the description of
11085                     <command>dialup</command> in <xref linkend="boolean_options"/>.
11086                   </para>
11087                 </listitem>
11088               </varlistentry>
11089
11090               <varlistentry>
11091                 <term><command>delegation-only</command></term>
11092                 <listitem>
11093                   <para>
11094                     The flag only applies to hint and stub zones.  If set
11095                     to <userinput>yes</userinput>, then the zone will also be
11096                     treated as if it is also a delegation-only type zone.
11097                   </para>
11098                   <para>
11099                     See caveats in <xref linkend="root_delegation_only"/>.
11100                   </para>
11101                 </listitem>
11102               </varlistentry>
11103
11104               <varlistentry>
11105                 <term><command>forward</command></term>
11106                 <listitem>
11107                   <para>
11108                     Only meaningful if the zone has a forwarders
11109                     list. The <command>only</command> value causes
11110                     the lookup to fail
11111                     after trying the forwarders and getting no answer, while <command>first</command> would
11112                     allow a normal lookup to be tried.
11113                   </para>
11114                 </listitem>
11115               </varlistentry>
11116
11117               <varlistentry>
11118                 <term><command>forwarders</command></term>
11119                 <listitem>
11120                   <para>
11121                     Used to override the list of global forwarders.
11122                     If it is not specified in a zone of type <command>forward</command>,
11123                     no forwarding is done for the zone and the global options are
11124                     not used.
11125                   </para>
11126                 </listitem>
11127               </varlistentry>
11128
11129               <varlistentry>
11130                 <term><command>ixfr-base</command></term>
11131                 <listitem>
11132                   <para>
11133                     Was used in <acronym>BIND</acronym> 8 to
11134                     specify the name
11135                     of the transaction log (journal) file for dynamic update
11136                     and IXFR.
11137                     <acronym>BIND</acronym> 9 ignores the option
11138                     and constructs the name of the journal
11139                     file by appending "<filename>.jnl</filename>"
11140                     to the name of the
11141                     zone file.
11142                   </para>
11143                 </listitem>
11144               </varlistentry>
11145
11146               <varlistentry>
11147                 <term><command>ixfr-tmp-file</command></term>
11148                 <listitem>
11149                   <para>
11150                     Was an undocumented option in <acronym>BIND</acronym> 8.
11151                     Ignored in <acronym>BIND</acronym> 9.
11152                   </para>
11153                 </listitem>
11154               </varlistentry>
11155
11156               <varlistentry>
11157                 <term><command>journal</command></term>
11158                 <listitem>
11159                   <para>
11160                     Allow the default journal's filename to be overridden.
11161                     The default is the zone's filename with "<filename>.jnl</filename>" appended.
11162                     This is applicable to <command>master</command> and <command>slave</command> zones.
11163                   </para>
11164                 </listitem>
11165               </varlistentry>
11166
11167               <varlistentry>
11168                 <term><command>max-journal-size</command></term>
11169                 <listitem>
11170                   <para>
11171                     See the description of
11172                     <command>max-journal-size</command> in <xref linkend="server_resource_limits"/>.
11173                   </para>
11174                 </listitem>
11175               </varlistentry>
11176
11177               <varlistentry>
11178                 <term><command>max-transfer-time-in</command></term>
11179                 <listitem>
11180                   <para>
11181                     See the description of
11182                     <command>max-transfer-time-in</command> in <xref linkend="zone_transfers"/>.
11183                   </para>
11184                 </listitem>
11185               </varlistentry>
11186
11187               <varlistentry>
11188                 <term><command>max-transfer-idle-in</command></term>
11189                 <listitem>
11190                   <para>
11191                     See the description of
11192                     <command>max-transfer-idle-in</command> in <xref linkend="zone_transfers"/>.
11193                   </para>
11194                 </listitem>
11195               </varlistentry>
11196
11197               <varlistentry>
11198                 <term><command>max-transfer-time-out</command></term>
11199                 <listitem>
11200                   <para>
11201                     See the description of
11202                     <command>max-transfer-time-out</command> in <xref linkend="zone_transfers"/>.
11203                   </para>
11204                 </listitem>
11205               </varlistentry>
11206
11207               <varlistentry>
11208                 <term><command>max-transfer-idle-out</command></term>
11209                 <listitem>
11210                   <para>
11211                     See the description of
11212                     <command>max-transfer-idle-out</command> in <xref linkend="zone_transfers"/>.
11213                   </para>
11214                 </listitem>
11215               </varlistentry>
11216
11217               <varlistentry>
11218                 <term><command>notify</command></term>
11219                 <listitem>
11220                   <para>
11221                     See the description of
11222                     <command>notify</command> in <xref linkend="boolean_options"/>.
11223                   </para>
11224                 </listitem>
11225               </varlistentry>
11226
11227               <varlistentry>
11228                 <term><command>notify-delay</command></term>
11229                 <listitem>
11230                   <para>
11231                     See the description of
11232                     <command>notify-delay</command> in <xref linkend="tuning"/>.
11233                   </para>
11234                 </listitem>
11235               </varlistentry>
11236
11237               <varlistentry>
11238                 <term><command>notify-to-soa</command></term>
11239                 <listitem>
11240                   <para>
11241                     See the description of
11242                     <command>notify-to-soa</command> in
11243                     <xref linkend="boolean_options"/>.
11244                   </para>
11245                 </listitem>
11246               </varlistentry>
11247
11248               <varlistentry>
11249                 <term><command>pubkey</command></term>
11250                 <listitem>
11251                   <para>
11252                     In <acronym>BIND</acronym> 8, this option was
11253                     intended for specifying
11254                     a public zone key for verification of signatures in DNSSEC
11255                     signed
11256                     zones when they are loaded from disk. <acronym>BIND</acronym> 9 does not verify signatures
11257                     on load and ignores the option.
11258                   </para>
11259                 </listitem>
11260               </varlistentry>
11261
11262               <varlistentry>
11263                 <term><command>zone-statistics</command></term>
11264                 <listitem>
11265                   <para>
11266                     If <userinput>yes</userinput>, the server will keep
11267                     statistical
11268                     information for this zone, which can be dumped to the
11269                     <command>statistics-file</command> defined in
11270                     the server options.
11271                   </para>
11272                 </listitem>
11273               </varlistentry>
11274
11275               <varlistentry>
11276                 <term><command>server-addresses</command></term>
11277                 <listitem>
11278                   <para>
11279                     Only meaningful for static-stub zones.
11280                     This is a list of IP addresses to which queries
11281                     should be sent in recursive resolution for the
11282                     zone.
11283                     A non empty list for this option will internally
11284                     configure the apex NS RR with associated glue A or
11285                     AAAA RRs.
11286                   </para>
11287                   <para>
11288                     For example, if "example.com" is configured as a
11289                     static-stub zone with 192.0.2.1 and 2001:db8::1234
11290                     in a <command>server-addresses</command> option,
11291                     the following RRs will be internally configured.
11292                   </para>
11293 <programlisting>example.com. NS example.com.
11294 example.com. A 192.0.2.1
11295 example.com. AAAA 2001:db8::1234</programlisting>
11296                   <para>
11297                     These records are internally used to resolve
11298                     names under the static-stub zone.
11299                     For instance, if the server receives a query for
11300                     "www.example.com" with the RD bit on, the server
11301                     will initiate recursive resolution and send
11302                     queries to 192.0.2.1 and/or 2001:db8::1234.
11303                   </para>
11304                 </listitem>
11305               </varlistentry>
11306
11307               <varlistentry>
11308                 <term><command>server-names</command></term>
11309                 <listitem>
11310                   <para>
11311                     Only meaningful for static-stub zones.
11312                     This is a list of domain names of nameservers that
11313                     act as authoritative servers of the static-stub
11314                     zone.
11315                     These names will be resolved to IP addresses when
11316                     <command>named</command> needs to send queries to
11317                     these servers.
11318                     To make this supplemental resolution successful,
11319                     these names must not be a subdomain of the origin
11320                     name of static-stub zone.
11321                     That is, when "example.net" is the origin of a
11322                     static-stub zone, "ns.example" and
11323                     "master.example.com" can be specified in the
11324                     <command>server-names</command> option, but
11325                     "ns.example.net" cannot, and will be rejected by
11326                     the configuration parser.
11327                   </para>
11328                   <para>
11329                     A non empty list for this option will internally
11330                     configure the apex NS RR with the specified names.
11331                     For example, if "example.com" is configured as a
11332                     static-stub zone with "ns1.example.net" and
11333                     "ns2.example.net"
11334                     in a <command>server-names</command> option,
11335                     the following RRs will be internally configured.
11336                   </para>
11337 <programlisting>example.com. NS ns1.example.net.
11338 example.com. NS ns2.example.net.
11339 </programlisting>
11340                   <para>
11341                     These records are internally used to resolve
11342                     names under the static-stub zone.
11343                     For instance, if the server receives a query for
11344                     "www.example.com" with the RD bit on, the server
11345                     initiate recursive resolution,
11346                     resolve "ns1.example.net" and/or
11347                     "ns2.example.net" to IP addresses, and then send
11348                     queries to (one or more of) these addresses.
11349                   </para>
11350                 </listitem>
11351               </varlistentry>
11352
11353               <varlistentry>
11354                 <term><command>sig-validity-interval</command></term>
11355                 <listitem>
11356                   <para>
11357                     See the description of
11358                     <command>sig-validity-interval</command> in <xref linkend="tuning"/>.
11359                   </para>
11360                 </listitem>
11361               </varlistentry>
11362
11363               <varlistentry>
11364                 <term><command>sig-signing-nodes</command></term>
11365                 <listitem>
11366                   <para>
11367                     See the description of
11368                     <command>sig-signing-nodes</command> in <xref linkend="tuning"/>.
11369                   </para>
11370                 </listitem>
11371               </varlistentry>
11372
11373               <varlistentry>
11374                 <term><command>sig-signing-signatures</command></term>
11375                 <listitem>
11376                   <para>
11377                     See the description of
11378                     <command>sig-signing-signatures</command> in <xref linkend="tuning"/>.
11379                   </para>
11380                 </listitem>
11381               </varlistentry>
11382
11383               <varlistentry>
11384                 <term><command>sig-signing-type</command></term>
11385                 <listitem>
11386                   <para>
11387                     See the description of
11388                     <command>sig-signing-type</command> in <xref linkend="tuning"/>.
11389                   </para>
11390                 </listitem>
11391               </varlistentry>
11392
11393               <varlistentry>
11394                 <term><command>transfer-source</command></term>
11395                 <listitem>
11396                   <para>
11397                     See the description of
11398                     <command>transfer-source</command> in <xref linkend="zone_transfers"/>.
11399                   </para>
11400                 </listitem>
11401               </varlistentry>
11402
11403               <varlistentry>
11404                 <term><command>transfer-source-v6</command></term>
11405                 <listitem>
11406                   <para>
11407                     See the description of
11408                     <command>transfer-source-v6</command> in <xref linkend="zone_transfers"/>.
11409                   </para>
11410                 </listitem>
11411               </varlistentry>
11412
11413               <varlistentry>
11414                 <term><command>alt-transfer-source</command></term>
11415                 <listitem>
11416                   <para>
11417                     See the description of
11418                     <command>alt-transfer-source</command> in <xref linkend="zone_transfers"/>.
11419                   </para>
11420                 </listitem>
11421               </varlistentry>
11422
11423               <varlistentry>
11424                 <term><command>alt-transfer-source-v6</command></term>
11425                 <listitem>
11426                   <para>
11427                     See the description of
11428                     <command>alt-transfer-source-v6</command> in <xref linkend="zone_transfers"/>.
11429                   </para>
11430                 </listitem>
11431               </varlistentry>
11432
11433               <varlistentry>
11434                 <term><command>use-alt-transfer-source</command></term>
11435                 <listitem>
11436                   <para>
11437                     See the description of
11438                     <command>use-alt-transfer-source</command> in <xref linkend="zone_transfers"/>.
11439                   </para>
11440                 </listitem>
11441               </varlistentry>
11442
11443
11444               <varlistentry>
11445                 <term><command>notify-source</command></term>
11446                 <listitem>
11447                   <para>
11448                     See the description of
11449                     <command>notify-source</command> in <xref linkend="zone_transfers"/>.
11450                   </para>
11451                 </listitem>
11452               </varlistentry>
11453
11454               <varlistentry>
11455                 <term><command>notify-source-v6</command></term>
11456                 <listitem>
11457                   <para>
11458                     See the description of
11459                     <command>notify-source-v6</command> in <xref linkend="zone_transfers"/>.
11460                   </para>
11461                 </listitem>
11462               </varlistentry>
11463
11464               <varlistentry>
11465                 <term><command>min-refresh-time</command></term>
11466                 <term><command>max-refresh-time</command></term>
11467                 <term><command>min-retry-time</command></term>
11468                 <term><command>max-retry-time</command></term>
11469                 <listitem>
11470                   <para>
11471                     See the description in <xref linkend="tuning"/>.
11472                   </para>
11473                 </listitem>
11474               </varlistentry>
11475
11476               <varlistentry>
11477                 <term><command>ixfr-from-differences</command></term>
11478                 <listitem>
11479                   <para>
11480                     See the description of
11481                     <command>ixfr-from-differences</command> in <xref linkend="boolean_options"/>.
11482                     (Note that the <command>ixfr-from-differences</command>
11483                     <userinput>master</userinput> and
11484                     <userinput>slave</userinput> choices are not
11485                     available at the zone level.)
11486                   </para>
11487                 </listitem>
11488               </varlistentry>
11489
11490               <varlistentry>
11491                 <term><command>key-directory</command></term>
11492                 <listitem>
11493                   <para>
11494                     See the description of
11495                     <command>key-directory</command> in <xref linkend="options"/>.
11496                   </para>
11497                 </listitem>
11498               </varlistentry>
11499
11500               <varlistentry>
11501                 <term><command>auto-dnssec</command></term>
11502                 <listitem>
11503                   <para>
11504                     Zones configured for dynamic DNS may also use this
11505                     option to allow varying levels of automatic DNSSEC key
11506                     management. There are three possible settings:
11507                   </para>
11508                   <para>
11509                     <command>auto-dnssec allow;</command> permits
11510                     keys to be updated and the zone fully re-signed
11511                     whenever the user issues the command <command>rndc sign
11512                     <replaceable>zonename</replaceable></command>.
11513                   </para>
11514                   <para>
11515                     <command>auto-dnssec maintain;</command> includes the
11516                     above, but also automatically adjusts the zone's DNSSEC
11517                     keys on schedule, according to the keys' timing metadata
11518                     (see <xref linkend="man.dnssec-keygen"/> and
11519                     <xref linkend="man.dnssec-settime"/>).  The command
11520                     <command>rndc sign
11521                     <replaceable>zonename</replaceable></command> causes
11522                     <command>named</command> to load keys from the key
11523                     repository and sign the zone with all keys that are
11524                     active. 
11525                     <command>rndc loadkeys
11526                     <replaceable>zonename</replaceable></command> causes
11527                     <command>named</command> to load keys from the key
11528                     repository and schedule key maintenance events to occur
11529                     in the future, but it does not sign the full zone
11530                     immediately.  Note: once keys have been loaded for a
11531                     zone the first time, the repository will be searched
11532                     for changes periodically, regardless of whether
11533                     <command>rndc loadkeys</command> is used.  The recheck
11534                     interval is defined by
11535                     <command>dnssec-loadkeys-interval</command>.)
11536                   </para>
11537                   <para>
11538                     The default setting is <command>auto-dnssec off</command>.
11539                   </para>
11540                 </listitem>
11541               </varlistentry>
11542
11543               <varlistentry>
11544                 <term><command>serial-update-method</command></term>
11545                 <listitem>
11546                   <para>
11547                     Zones configured for dynamic DNS may use this
11548                     option to set the update method that will be used for
11549                     the zone serial number in the SOA record.
11550                   </para>
11551                   <para>
11552                     With the default setting of
11553                     <command>serial-update-method increment;</command>, the
11554                     SOA serial number will be incremented by one each time
11555                     the zone is updated.
11556                   </para>
11557                   <para>
11558                     When set to 
11559                     <command>serial-update-method unixtime;</command>, the
11560                     SOA serial number will be set to the number of seconds
11561                     since the UNIX epoch, unless the serial number is
11562                     already greater than or equal to that value, in which
11563                     case it is simply incremented by one.
11564                   </para>
11565                 </listitem>
11566               </varlistentry>
11567
11568               <varlistentry>
11569                 <term><command>inline-signing</command></term>
11570                 <listitem>
11571                   <para>
11572                     If <literal>yes</literal>, this enables
11573                     "bump in the wire" signing of a zone, where a
11574                     unsigned zone is transferred in or loaded from
11575                     disk and a signed version of the zone is served,
11576                     with possibly, a different serial number.  This
11577                     behaviour is disabled by default.
11578                   </para>
11579                 </listitem>
11580               </varlistentry>
11581
11582               <varlistentry>
11583                 <term><command>multi-master</command></term>
11584                 <listitem>
11585                   <para>
11586                     See the description of <command>multi-master</command> in
11587                     <xref linkend="boolean_options"/>.
11588                   </para>
11589                 </listitem>
11590               </varlistentry>
11591         
11592               <varlistentry>
11593                 <term><command>masterfile-format</command></term>
11594                 <listitem>
11595                   <para>
11596                     See the description of <command>masterfile-format</command>
11597                     in <xref linkend="tuning"/>.
11598                   </para>
11599                 </listitem>
11600               </varlistentry>
11601
11602               <varlistentry>
11603                 <term><command>dnssec-secure-to-insecure</command></term>
11604                 <listitem>
11605                   <para>
11606                     See the description of
11607                     <command>dnssec-secure-to-insecure</command> in <xref linkend="boolean_options"/>.
11608                   </para>
11609                 </listitem>
11610               </varlistentry>
11611
11612             </variablelist>
11613
11614           </sect3>
11615           <sect3 id="dynamic_update_policies">
11616             <title>Dynamic Update Policies</title>
11617             <para><acronym>BIND</acronym> 9 supports two alternative
11618               methods of granting clients the right to perform
11619               dynamic updates to a zone, configured by the
11620               <command>allow-update</command> and
11621               <command>update-policy</command> option, respectively.
11622             </para>
11623             <para>
11624               The <command>allow-update</command> clause works the
11625               same way as in previous versions of <acronym>BIND</acronym>.
11626               It grants given clients the permission to update any
11627               record of any name in the zone.
11628             </para>
11629             <para>
11630               The <command>update-policy</command> clause
11631               allows more fine-grained control over what updates are
11632               allowed.  A set of rules is specified, where each rule
11633               either grants or denies permissions for one or more
11634               names to be updated by one or more identities.  If
11635               the dynamic update request message is signed (that is,
11636               it includes either a TSIG or SIG(0) record), the
11637               identity of the signer can be determined.
11638             </para>
11639             <para>
11640               Rules are specified in the <command>update-policy</command>
11641               zone option, and are only meaningful for master zones.
11642               When the <command>update-policy</command> statement
11643               is present, it is a configuration error for the
11644               <command>allow-update</command> statement to be
11645               present.  The <command>update-policy</command> statement
11646               only examines the signer of a message; the source
11647               address is not relevant.
11648             </para>
11649             <para>
11650               There is a pre-defined <command>update-policy</command>
11651               rule which can be switched on with the command
11652               <command>update-policy local;</command>.
11653               Switching on this rule in a zone causes
11654               <command>named</command> to generate a TSIG session
11655               key and place it in a file, and to allow that key
11656               to update the zone.  (By default, the file is
11657               <filename>/var/run/named/session.key</filename>, the key
11658               name is "local-ddns" and the key algorithm is HMAC-SHA256,
11659               but these values are configurable with the
11660               <command>session-keyfile</command>,
11661               <command>session-keyname</command> and
11662               <command>session-keyalg</command> options, respectively).
11663             </para>
11664             <para>
11665               A client running on the local system, and with appropriate
11666               permissions, may read that file and use the key to sign update
11667               requests.  The zone's update policy will be set to allow that
11668               key to change any record within the zone.  Assuming the
11669               key name is "local-ddns", this policy is equivalent to:
11670             </para>
11671
11672             <programlisting>update-policy { grant local-ddns zonesub any; };
11673             </programlisting>
11674
11675             <para>
11676               The command <command>nsupdate -l</command> sends update
11677               requests to localhost, and signs them using the session key.
11678             </para>
11679
11680             <para>
11681               Other rule definitions look like this:
11682             </para>
11683
11684 <programlisting>
11685 ( <command>grant</command> | <command>deny</command> ) <replaceable>identity</replaceable> <replaceable>nametype</replaceable> <optional> <replaceable>name</replaceable> </optional> <optional> <replaceable>types</replaceable> </optional>
11686 </programlisting>
11687
11688             <para>
11689               Each rule grants or denies privileges.  Once a message has
11690               successfully matched a rule, the operation is immediately
11691               granted or denied and no further rules are examined.  A rule
11692               is matched when the signer matches the identity field, the
11693               name matches the name field in accordance with the nametype
11694               field, and the type matches the types specified in the type
11695               field.
11696             </para>
11697             <para>
11698               No signer is required for <replaceable>tcp-self</replaceable>
11699               or <replaceable>6to4-self</replaceable> however the standard
11700               reverse mapping / prefix conversion must match the identity
11701               field.
11702             </para>
11703             <para>
11704               The identity field specifies a name or a wildcard
11705               name.  Normally, this is the name of the TSIG or
11706               SIG(0) key used to sign the update request.  When a
11707               TKEY exchange has been used to create a shared secret,
11708               the identity of the shared secret is the same as the
11709               identity of the key used to authenticate the TKEY
11710               exchange.  TKEY is also the negotiation method used
11711               by GSS-TSIG, which establishes an identity that is
11712               the Kerberos principal of the client, such as
11713               <userinput>"user@host.domain"</userinput>.  When the
11714               <replaceable>identity</replaceable> field specifies
11715               a wildcard name, it is subject to DNS wildcard
11716               expansion, so the rule will apply to multiple identities.
11717               The <replaceable>identity</replaceable> field must
11718               contain a fully-qualified domain name.
11719             </para>
11720             <para>
11721               For nametypes <varname>krb5-self</varname>,
11722               <varname>ms-self</varname>, <varname>krb5-subdomain</varname>,
11723               and <varname>ms-subdomain</varname> the
11724               <replaceable>identity</replaceable> field specifies
11725               the Windows or Kerberos realm of the machine belongs to.
11726             </para>
11727             <para>
11728               The <replaceable>nametype</replaceable> field has 13
11729               values:
11730               <varname>name</varname>, <varname>subdomain</varname>,
11731               <varname>wildcard</varname>, <varname>self</varname>,
11732               <varname>selfsub</varname>, <varname>selfwild</varname>,
11733               <varname>krb5-self</varname>, <varname>ms-self</varname>,
11734               <varname>krb5-subdomain</varname>,
11735               <varname>ms-subdomain</varname>,
11736               <varname>tcp-self</varname>, <varname>6to4-self</varname>,
11737               <varname>zonesub</varname>, and <varname>external</varname>.
11738             </para>
11739             <informaltable>
11740               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
11741                 <colspec colname="1" colnum="1" colsep="0" colwidth="0.819in"/>
11742                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.681in"/>
11743                 <tbody>
11744                   <row rowsep="0">
11745                     <entry colname="1">
11746                       <para>
11747                         <varname>name</varname>
11748                       </para>
11749                     </entry> <entry colname="2">
11750                       <para>
11751                         Exact-match semantics.  This rule matches
11752                         when the name being updated is identical
11753                         to the contents of the
11754                         <replaceable>name</replaceable> field.
11755                       </para>
11756                     </entry>
11757                   </row>
11758                   <row rowsep="0">
11759                     <entry colname="1">
11760                       <para>
11761                         <varname>subdomain</varname>
11762                       </para>
11763                     </entry> <entry colname="2">
11764                       <para>
11765                         This rule matches when the name being updated
11766                         is a subdomain of, or identical to, the
11767                         contents of the <replaceable>name</replaceable>
11768                         field.
11769                       </para>
11770                     </entry>
11771                   </row>
11772                   <row rowsep="0">
11773                     <entry colname="1">
11774                       <para>
11775                         <varname>zonesub</varname>
11776                       </para>
11777                     </entry> <entry colname="2">
11778                       <para>
11779                         This rule is similar to subdomain, except that
11780                         it matches when the name being updated is a
11781                         subdomain of the zone in which the
11782                         <command>update-policy</command> statement
11783                         appears.  This obviates the need to type the zone
11784                         name twice, and enables the use of a standard
11785                         <command>update-policy</command> statement in
11786                         multiple zones without modification.
11787                       </para>
11788                       <para>
11789                         When this rule is used, the
11790                         <replaceable>name</replaceable> field is omitted.
11791                       </para>
11792                     </entry>
11793                   </row>
11794                   <row rowsep="0">
11795                     <entry colname="1">
11796                       <para>
11797                         <varname>wildcard</varname>
11798                       </para>
11799                     </entry> <entry colname="2">
11800                       <para>
11801                         The <replaceable>name</replaceable> field
11802                         is subject to DNS wildcard expansion, and
11803                         this rule matches when the name being updated
11804                         name is a valid expansion of the wildcard.
11805                       </para>
11806                     </entry>
11807                   </row>
11808                   <row rowsep="0">
11809                     <entry colname="1">
11810                       <para>
11811                         <varname>self</varname>
11812                       </para>
11813                     </entry>
11814                     <entry colname="2">
11815                       <para>
11816                         This rule matches when the name being updated
11817                         matches the contents of the
11818                         <replaceable>identity</replaceable> field.
11819                         The <replaceable>name</replaceable> field
11820                         is ignored, but should be the same as the
11821                         <replaceable>identity</replaceable> field.
11822                         The <varname>self</varname> nametype is
11823                         most useful when allowing using one key per
11824                         name to update, where the key has the same
11825                         name as the name to be updated.  The
11826                         <replaceable>identity</replaceable> would
11827                         be specified as <constant>*</constant> (an asterisk) in
11828                         this case.
11829                       </para>
11830                     </entry>
11831                   </row>
11832                   <row rowsep="0">
11833                     <entry colname="1">
11834                       <para>
11835                         <varname>selfsub</varname>
11836                       </para>
11837                     </entry> <entry colname="2">
11838                       <para>
11839                         This rule is similar to <varname>self</varname>
11840                         except that subdomains of <varname>self</varname>
11841                         can also be updated.
11842                       </para>
11843                     </entry>
11844                   </row>
11845                   <row rowsep="0">
11846                     <entry colname="1">
11847                       <para>
11848                         <varname>selfwild</varname>
11849                       </para>
11850                     </entry> <entry colname="2">
11851                       <para>
11852                         This rule is similar to <varname>self</varname>
11853                         except that only subdomains of
11854                         <varname>self</varname> can be updated.
11855                       </para>
11856                     </entry>
11857                   </row>
11858                   <row rowsep="0">
11859                     <entry colname="1">
11860                       <para>
11861                         <varname>ms-self</varname>
11862                       </para>
11863                     </entry> <entry colname="2">
11864                       <para>
11865                         This rule takes a Windows machine principal
11866                         (machine$@REALM) for machine in REALM and
11867                         and converts it machine.realm allowing the machine 
11868                         to update machine.realm.  The REALM to be matched
11869                         is specified in the <replaceable>identity</replaceable>
11870                         field.
11871                       </para>
11872                     </entry>
11873                   </row>
11874                   <row rowsep="0">
11875                     <entry colname="1">
11876                       <para>
11877                         <varname>ms-subdomain</varname>
11878                       </para>
11879                     </entry> <entry colname="2">
11880                       <para>
11881                         This rule takes a Windows machine principal 
11882                         (machine$@REALM) for machine in REALM and
11883                         converts it to machine.realm allowing the machine
11884                         to update subdomains of machine.realm.  The REALM
11885                         to be matched is specified in the
11886                         <replaceable>identity</replaceable> field.
11887                       </para>
11888                     </entry>
11889                   </row>
11890                   <row rowsep="0">
11891                     <entry colname="1">
11892                       <para>
11893                         <varname>krb5-self</varname>
11894                       </para>
11895                     </entry> <entry colname="2">
11896                       <para>
11897                         This rule takes a Kerberos machine principal
11898                         (host/machine@REALM) for machine in REALM and
11899                         and converts it machine.realm allowing the machine 
11900                         to update machine.realm.  The REALM to be matched
11901                         is specified in the <replaceable>identity</replaceable>
11902                         field.
11903                       </para>
11904                     </entry>
11905                   </row>
11906                   <row rowsep="0">
11907                     <entry colname="1">
11908                       <para>
11909                         <varname>krb5-subdomain</varname>
11910                       </para>
11911                     </entry> <entry colname="2">
11912                       <para>
11913                         This rule takes a Kerberos machine principal 
11914                         (host/machine@REALM) for machine in REALM and
11915                         converts it to machine.realm allowing the machine
11916                         to update subdomains of machine.realm.  The REALM
11917                         to be matched is specified in the
11918                         <replaceable>identity</replaceable> field.
11919                       </para>
11920                     </entry>
11921                   </row>
11922                   <row rowsep="0">
11923                     <entry colname="1">
11924                       <para>
11925                         <varname>tcp-self</varname>
11926                       </para>
11927                     </entry> <entry colname="2">
11928                       <para>
11929                         Allow updates that have been sent via TCP and
11930                         for which the standard mapping from the initiating
11931                         IP address into the IN-ADDR.ARPA and IP6.ARPA
11932                         namespaces match the name to be updated.
11933                       </para>
11934                       <note>
11935                         It is theoretically possible to spoof these TCP
11936                         sessions.
11937                       </note>
11938                     </entry>
11939                   </row>
11940                   <row rowsep="0">
11941                     <entry colname="1">
11942                       <para>
11943                         <varname>6to4-self</varname>
11944                       </para>
11945                     </entry> <entry colname="2">
11946                       <para>
11947                         Allow the 6to4 prefix to be update by any TCP
11948                         connection from the 6to4 network or from the
11949                         corresponding IPv4 address.  This is intended
11950                         to allow NS or DNAME RRsets to be added to the
11951                         reverse tree.
11952                       </para>
11953                       <note>
11954                         It is theoretically possible to spoof these TCP
11955                         sessions.
11956                       </note>
11957                     </entry>
11958                   </row>
11959                   <row rowsep="0">
11960                     <entry colname="1">
11961                       <para>
11962                         <varname>external</varname>
11963                       </para>
11964                     </entry> <entry colname="2">
11965                       <para>
11966                         This rule allows <command>named</command>
11967                         to defer the decision of whether to allow a
11968                         given update to an external daemon.
11969                       </para>
11970                       <para>
11971                         The method of communicating with the daemon is
11972                         specified in the <replaceable>identity</replaceable>
11973                         field, the format of which is
11974                         "<constant>local:</constant><replaceable>path</replaceable>",
11975                         where <replaceable>path</replaceable> is the location
11976                         of a UNIX-domain socket.  (Currently, "local" is the
11977                         only supported mechanism.)
11978                       </para>
11979                       <para>
11980                         Requests to the external daemon are sent over the
11981                         UNIX-domain socket as datagrams with the following
11982                         format:
11983                       </para>
11984                       <programlisting>
11985    Protocol version number (4 bytes, network byte order, currently 1)
11986    Request length (4 bytes, network byte order)
11987    Signer (null-terminated string)
11988    Name (null-terminated string)
11989    TCP source address (null-terminated string)
11990    Rdata type (null-terminated string)
11991    Key (null-terminated string)
11992    TKEY token length (4 bytes, network byte order)
11993    TKEY token (remainder of packet)</programlisting>
11994                       <para>
11995                         The daemon replies with a four-byte value in
11996                         network byte order, containing either 0 or 1; 0
11997                         indicates that the specified update is not
11998                         permitted, and 1 indicates that it is.
11999                       </para>
12000                     </entry>
12001                   </row>
12002                 </tbody>
12003               </tgroup>
12004             </informaltable>
12005
12006             <para>
12007               In all cases, the <replaceable>name</replaceable>
12008               field must specify a fully-qualified domain name.
12009             </para>
12010
12011             <para>
12012               If no types are explicitly specified, this rule matches
12013               all types except RRSIG, NS, SOA, NSEC and NSEC3. Types
12014               may be specified by name, including "ANY" (ANY matches
12015               all types except NSEC and NSEC3, which can never be
12016               updated).  Note that when an attempt is made to delete
12017               all records associated with a name, the rules are
12018               checked for each existing record type.
12019             </para>
12020           </sect3>
12021         </sect2>
12022       </sect1>
12023       <sect1>
12024         <title>Zone File</title>
12025         <sect2 id="types_of_resource_records_and_when_to_use_them">
12026           <title>Types of Resource Records and When to Use Them</title>
12027           <para>
12028             This section, largely borrowed from RFC 1034, describes the
12029             concept of a Resource Record (RR) and explains when each is used.
12030             Since the publication of RFC 1034, several new RRs have been
12031             identified
12032             and implemented in the DNS. These are also included.
12033           </para>
12034           <sect3>
12035             <title>Resource Records</title>
12036
12037             <para>
12038               A domain name identifies a node.  Each node has a set of
12039               resource information, which may be empty.  The set of resource
12040               information associated with a particular name is composed of
12041               separate RRs. The order of RRs in a set is not significant and
12042               need not be preserved by name servers, resolvers, or other
12043               parts of the DNS. However, sorting of multiple RRs is
12044               permitted for optimization purposes, for example, to specify
12045               that a particular nearby server be tried first. See <xref linkend="the_sortlist_statement"/> and <xref linkend="rrset_ordering"/>.
12046             </para>
12047
12048             <para>
12049               The components of a Resource Record are:
12050             </para>
12051             <informaltable colsep="0" rowsep="0">
12052               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
12053                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.000in"/>
12054                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.500in"/>
12055                 <tbody>
12056                   <row rowsep="0">
12057                     <entry colname="1">
12058                       <para>
12059                         owner name
12060                       </para>
12061                     </entry>
12062                     <entry colname="2">
12063                       <para>
12064                         The domain name where the RR is found.
12065                       </para>
12066                     </entry>
12067                   </row>
12068                   <row rowsep="0">
12069                     <entry colname="1">
12070                       <para>
12071                         type
12072                       </para>
12073                     </entry>
12074                     <entry colname="2">
12075                       <para>
12076                         An encoded 16-bit value that specifies
12077                         the type of the resource record.
12078                       </para>
12079                     </entry>
12080                   </row>
12081                   <row rowsep="0">
12082                     <entry colname="1">
12083                       <para>
12084                         TTL
12085                       </para>
12086                     </entry>
12087                     <entry colname="2">
12088                       <para>
12089                         The time-to-live of the RR. This field
12090                         is a 32-bit integer in units of seconds, and is
12091                         primarily used by
12092                         resolvers when they cache RRs. The TTL describes how
12093                         long a RR can
12094                         be cached before it should be discarded.
12095                       </para>
12096                     </entry>
12097                   </row>
12098                   <row rowsep="0">
12099                     <entry colname="1">
12100                       <para>
12101                         class
12102                       </para>
12103                     </entry>
12104                     <entry colname="2">
12105                       <para>
12106                         An encoded 16-bit value that identifies
12107                         a protocol family or instance of a protocol.
12108                       </para>
12109                     </entry>
12110                   </row>
12111                   <row rowsep="0">
12112                     <entry colname="1">
12113                       <para>
12114                         RDATA
12115                       </para>
12116                     </entry>
12117                     <entry colname="2">
12118                       <para>
12119                         The resource data.  The format of the
12120                         data is type (and sometimes class) specific.
12121                       </para>
12122                     </entry>
12123                   </row>
12124                 </tbody>
12125               </tgroup>
12126             </informaltable>
12127             <para>
12128               The following are <emphasis>types</emphasis> of valid RRs:
12129             </para>
12130             <informaltable colsep="0" rowsep="0">
12131               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
12132                 <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
12133                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.625in"/>
12134                 <tbody>
12135                   <row rowsep="0">
12136                     <entry colname="1">
12137                       <para>
12138                         A
12139                       </para>
12140                     </entry>
12141                     <entry colname="2">
12142                       <para>
12143                         A host address.  In the IN class, this is a
12144                         32-bit IP address.  Described in RFC 1035.
12145                       </para>
12146                     </entry>
12147                   </row>
12148                   <row rowsep="0">
12149                     <entry colname="1">
12150                       <para>
12151                         AAAA
12152                       </para>
12153                     </entry>
12154                     <entry colname="2">
12155                       <para>
12156                         IPv6 address.  Described in RFC 1886.
12157                       </para>
12158                     </entry>
12159                   </row>
12160                   <row rowsep="0">
12161                     <entry colname="1">
12162                       <para>
12163                         A6
12164                       </para>
12165                     </entry>
12166                     <entry colname="2">
12167                       <para>
12168                         IPv6 address.  This can be a partial
12169                         address (a suffix) and an indirection to the name
12170                         where the rest of the
12171                         address (the prefix) can be found.  Experimental.
12172                         Described in RFC 2874.
12173                       </para>
12174                     </entry>
12175                   </row>
12176                   <row rowsep="0">
12177                     <entry colname="1">
12178                       <para>
12179                         AFSDB
12180                       </para>
12181                     </entry>
12182                     <entry colname="2">
12183                       <para>
12184                         Location of AFS database servers.
12185                         Experimental.  Described in RFC 1183.
12186                       </para>
12187                     </entry>
12188                   </row>
12189                   <row rowsep="0">
12190                     <entry colname="1">
12191                       <para>
12192                         APL
12193                       </para>
12194                     </entry>
12195                     <entry colname="2">
12196                       <para>
12197                         Address prefix list.  Experimental.
12198                         Described in RFC 3123.
12199                       </para>
12200                     </entry>
12201                   </row>
12202                   <row rowsep="0">
12203                     <entry colname="1">
12204                       <para>
12205                         CERT
12206                       </para>
12207                     </entry>
12208                     <entry colname="2">
12209                       <para>
12210                         Holds a digital certificate.
12211                         Described in RFC 2538.
12212                       </para>
12213                     </entry>
12214                   </row>
12215                   <row rowsep="0">
12216                     <entry colname="1">
12217                       <para>
12218                         CNAME
12219                       </para>
12220                     </entry>
12221                     <entry colname="2">
12222                       <para>
12223                         Identifies the canonical name of an alias.
12224                         Described in RFC 1035.
12225                       </para>
12226                     </entry>
12227                   </row>
12228                   <row rowsep="0">
12229                     <entry colname="1">
12230                       <para>
12231                         DHCID
12232                       </para>
12233                     </entry>
12234                     <entry colname="2">
12235                       <para>
12236                         Is used for identifying which DHCP client is
12237                         associated with this name.  Described in RFC 4701.
12238                       </para>
12239                     </entry>
12240                   </row>
12241                   <row rowsep="0">
12242                     <entry colname="1">
12243                       <para>
12244                         DNAME
12245                       </para>
12246                     </entry>
12247                     <entry colname="2">
12248                       <para>
12249                         Replaces the domain name specified with
12250                         another name to be looked up, effectively aliasing an
12251                         entire
12252                         subtree of the domain name space rather than a single
12253                         record
12254                         as in the case of the CNAME RR.
12255                         Described in RFC 2672.
12256                       </para>
12257                     </entry>
12258                   </row>
12259                   <row rowsep="0">
12260                     <entry colname="1">
12261                       <para>
12262                         DNSKEY
12263                       </para>
12264                     </entry>
12265                     <entry colname="2">
12266                       <para>
12267                         Stores a public key associated with a signed
12268                         DNS zone.  Described in RFC 4034.
12269                       </para>
12270                     </entry>
12271                   </row>
12272                   <row rowsep="0">
12273                     <entry colname="1">
12274                       <para>
12275                         DS
12276                       </para>
12277                     </entry>
12278                     <entry colname="2">
12279                       <para>
12280                         Stores the hash of a public key associated with a
12281                         signed DNS zone.  Described in RFC 4034.
12282                       </para>
12283                     </entry>
12284                   </row>
12285                   <row rowsep="0">
12286                     <entry colname="1">
12287                       <para>
12288                         GPOS
12289                       </para>
12290                     </entry>
12291                     <entry colname="2">
12292                       <para>
12293                         Specifies the global position.  Superseded by LOC.
12294                       </para>
12295                     </entry>
12296                   </row>
12297                   <row rowsep="0">
12298                     <entry colname="1">
12299                       <para>
12300                         HINFO
12301                       </para>
12302                     </entry>
12303                     <entry colname="2">
12304                       <para>
12305                         Identifies the CPU and OS used by a host.
12306                         Described in RFC 1035.
12307                       </para>
12308                     </entry>
12309                   </row>
12310                   <row rowsep="0">
12311                     <entry colname="1">
12312                       <para>
12313                         IPSECKEY
12314                       </para>
12315                     </entry>
12316                     <entry colname="2">
12317                       <para>
12318                         Provides a method for storing IPsec keying material in
12319                         DNS.  Described in RFC 4025.
12320                       </para>
12321                     </entry>
12322                   </row>
12323                   <row rowsep="0">
12324                     <entry colname="1">
12325                       <para>
12326                         ISDN
12327                       </para>
12328                     </entry>
12329                     <entry colname="2">
12330                       <para>
12331                         Representation of ISDN addresses.
12332                         Experimental.  Described in RFC 1183.
12333                       </para>
12334                     </entry>
12335                   </row>
12336                   <row rowsep="0">
12337                     <entry colname="1">
12338                       <para>
12339                         KEY
12340                       </para>
12341                     </entry>
12342                     <entry colname="2">
12343                       <para>
12344                         Stores a public key associated with a
12345                         DNS name.  Used in original DNSSEC; replaced
12346                         by DNSKEY in DNSSECbis, but still used with
12347                         SIG(0).  Described in RFCs 2535 and 2931.
12348                       </para>
12349                     </entry>
12350                   </row>
12351                   <row rowsep="0">
12352                     <entry colname="1">
12353                       <para>
12354                         KX
12355                       </para>
12356                     </entry>
12357                     <entry colname="2">
12358                       <para>
12359                         Identifies a key exchanger for this
12360                         DNS name.  Described in RFC 2230.
12361                       </para>
12362                     </entry>
12363                   </row>
12364                   <row rowsep="0">
12365                     <entry colname="1">
12366                       <para>
12367                         LOC
12368                       </para>
12369                     </entry>
12370                     <entry colname="2">
12371                       <para>
12372                         For storing GPS info.  Described in RFC 1876.
12373                         Experimental.
12374                       </para>
12375                     </entry>
12376                   </row>
12377                   <row rowsep="0">
12378                     <entry colname="1">
12379                       <para>
12380                         MX
12381                       </para>
12382                     </entry>
12383                     <entry colname="2">
12384                       <para>
12385                         Identifies a mail exchange for the domain with
12386                         a 16-bit preference value (lower is better)
12387                         followed by the host name of the mail exchange.
12388                         Described in RFC 974, RFC 1035.
12389                       </para>
12390                     </entry>
12391                   </row>
12392                   <row rowsep="0">
12393                     <entry colname="1">
12394                       <para>
12395                         NAPTR
12396                       </para>
12397                     </entry>
12398                     <entry colname="2">
12399                       <para>
12400                         Name authority pointer.  Described in RFC 2915.
12401                       </para>
12402                     </entry>
12403                   </row>
12404                   <row rowsep="0">
12405                     <entry colname="1">
12406                       <para>
12407                         NSAP
12408                       </para>
12409                     </entry>
12410                     <entry colname="2">
12411                       <para>
12412                         A network service access point.
12413                         Described in RFC 1706.
12414                       </para>
12415                     </entry>
12416                   </row>
12417                   <row rowsep="0">
12418                     <entry colname="1">
12419                       <para>
12420                         NS
12421                       </para>
12422                     </entry>
12423                     <entry colname="2">
12424                       <para>
12425                         The authoritative name server for the
12426                         domain.  Described in RFC 1035.
12427                       </para>
12428                     </entry>
12429                   </row>
12430                   <row rowsep="0">
12431                     <entry colname="1">
12432                       <para>
12433                         NSEC
12434                       </para>
12435                     </entry>
12436                     <entry colname="2">
12437                       <para>
12438                         Used in DNSSECbis to securely indicate that
12439                         RRs with an owner name in a certain name interval do
12440                         not exist in
12441                         a zone and indicate what RR types are present for an
12442                         existing name.
12443                         Described in RFC 4034.
12444                       </para>
12445                     </entry>
12446                   </row>
12447                   <row rowsep="0">
12448                     <entry colname="1">
12449                       <para>
12450                         NSEC3
12451                       </para>
12452                     </entry>
12453                     <entry colname="2">
12454                       <para>
12455                         Used in DNSSECbis to securely indicate that
12456                         RRs with an owner name in a certain name
12457                         interval do not exist in a zone and indicate
12458                         what RR types are present for an existing
12459                         name.  NSEC3 differs from NSEC in that it
12460                         prevents zone enumeration but is more
12461                         computationally expensive on both the server
12462                         and the client than NSEC.  Described in RFC
12463                         5155.
12464                       </para>
12465                     </entry>
12466                   </row>
12467                   <row rowsep="0">
12468                     <entry colname="1">
12469                       <para>
12470                         NSEC3PARAM
12471                       </para>
12472                     </entry>
12473                     <entry colname="2">
12474                       <para>
12475                         Used in DNSSECbis to tell the authoritative
12476                         server which NSEC3 chains are available to use.
12477                         Described in RFC 5155.
12478                       </para>
12479                     </entry>
12480                   </row>
12481                   <row rowsep="0">
12482                     <entry colname="1">
12483                       <para>
12484                         NXT
12485                       </para>
12486                     </entry>
12487                     <entry colname="2">
12488                       <para>
12489                         Used in DNSSEC to securely indicate that
12490                         RRs with an owner name in a certain name interval do
12491                         not exist in
12492                         a zone and indicate what RR types are present for an
12493                         existing name.
12494                         Used in original DNSSEC; replaced by NSEC in
12495                         DNSSECbis.
12496                         Described in RFC 2535.
12497                       </para>
12498                     </entry>
12499                   </row>
12500                   <row rowsep="0">
12501                     <entry colname="1">
12502                       <para>
12503                         PTR
12504                       </para>
12505                     </entry>
12506                     <entry colname="2">
12507                       <para>
12508                         A pointer to another part of the domain
12509                         name space.  Described in RFC 1035.
12510                       </para>
12511                     </entry>
12512                   </row>
12513                   <row rowsep="0">
12514                     <entry colname="1">
12515                       <para>
12516                         PX
12517                       </para>
12518                     </entry>
12519                     <entry colname="2">
12520                       <para>
12521                         Provides mappings between RFC 822 and X.400
12522                         addresses.  Described in RFC 2163.
12523                       </para>
12524                     </entry>
12525                   </row>
12526                   <row rowsep="0">
12527                     <entry colname="1">
12528                       <para>
12529                         RP
12530                       </para>
12531                     </entry>
12532                     <entry colname="2">
12533                       <para>
12534                         Information on persons responsible
12535                         for the domain.  Experimental.  Described in RFC 1183.
12536                       </para>
12537                     </entry>
12538                   </row>
12539                   <row rowsep="0">
12540                     <entry colname="1">
12541                       <para>
12542                         RRSIG
12543                       </para>
12544                     </entry>
12545                     <entry colname="2">
12546                       <para>
12547                         Contains DNSSECbis signature data.  Described
12548                         in RFC 4034.
12549                       </para>
12550                     </entry>
12551                   </row>
12552                   <row rowsep="0">
12553                     <entry colname="1">
12554                       <para>
12555                         RT
12556                       </para>
12557                     </entry>
12558                     <entry colname="2">
12559                       <para>
12560                         Route-through binding for hosts that
12561                         do not have their own direct wide area network
12562                         addresses.
12563                         Experimental.  Described in RFC 1183.
12564                       </para>
12565                     </entry>
12566                   </row>
12567                   <row rowsep="0">
12568                     <entry colname="1">
12569                       <para>
12570                         SIG
12571                       </para>
12572                     </entry>
12573                     <entry colname="2">
12574                       <para>
12575                         Contains DNSSEC signature data.  Used in
12576                         original DNSSEC; replaced by RRSIG in
12577                         DNSSECbis, but still used for SIG(0).
12578                         Described in RFCs 2535 and 2931.
12579                       </para>
12580                     </entry>
12581                   </row>
12582                   <row rowsep="0">
12583                     <entry colname="1">
12584                       <para>
12585                         SOA
12586                       </para>
12587                     </entry>
12588                     <entry colname="2">
12589                       <para>
12590                         Identifies the start of a zone of authority.
12591                         Described in RFC 1035.
12592                       </para>
12593                     </entry>
12594                   </row>
12595                   <row rowsep="0">
12596                     <entry colname="1">
12597                       <para>
12598                         SPF
12599                       </para>
12600                     </entry>
12601                     <entry colname="2">
12602                       <para>
12603                         Contains the Sender Policy Framework information
12604                         for a given email domain.  Described in RFC 4408.
12605                       </para>
12606                     </entry>
12607                   </row>
12608                   <row rowsep="0">
12609                     <entry colname="1">
12610                       <para>
12611                         SRV
12612                       </para>
12613                     </entry>
12614                     <entry colname="2">
12615                       <para>
12616                         Information about well known network
12617                         services (replaces WKS).  Described in RFC 2782.
12618                       </para>
12619                     </entry>
12620                   </row>
12621                   <row rowsep="0">
12622                     <entry colname="1">
12623                       <para>
12624                         SSHFP
12625                       </para>
12626                     </entry>
12627                     <entry colname="2">
12628                       <para>
12629                         Provides a way to securely publish a secure shell key's
12630                         fingerprint.  Described in RFC 4255.
12631                       </para>
12632                     </entry>
12633                   </row>
12634                   <row rowsep="0">
12635                     <entry colname="1">
12636                       <para>
12637                         TXT
12638                       </para>
12639                     </entry>
12640                     <entry colname="2">
12641                       <para>
12642                         Text records.  Described in RFC 1035.
12643                       </para>
12644                     </entry>
12645                   </row>
12646                   <row rowsep="0">
12647                     <entry colname="1">
12648                       <para>
12649                         WKS
12650                       </para>
12651                     </entry>
12652                     <entry colname="2">
12653                       <para>
12654                         Information about which well known
12655                         network services, such as SMTP, that a domain
12656                         supports. Historical.
12657                       </para>
12658                     </entry>
12659                   </row>
12660                   <row rowsep="0">
12661                     <entry colname="1">
12662                       <para>
12663                         X25
12664                       </para>
12665                     </entry>
12666                     <entry colname="2">
12667                       <para>
12668                         Representation of X.25 network addresses.
12669                         Experimental.  Described in RFC 1183.
12670                       </para>
12671                     </entry>
12672                   </row>
12673                 </tbody>
12674               </tgroup>
12675             </informaltable>
12676             <para>
12677               The following <emphasis>classes</emphasis> of resource records
12678               are currently valid in the DNS:
12679             </para>
12680             <informaltable colsep="0" rowsep="0"><tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
12681                 <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
12682                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.625in"/>
12683                 <tbody>
12684
12685                   <row rowsep="0">
12686                     <entry colname="1">
12687                       <para>
12688                         IN
12689                       </para>
12690                     </entry>
12691                     <entry colname="2">
12692                       <para>
12693                         The Internet.
12694                       </para>
12695                     </entry>
12696                   </row>
12697
12698                   <row rowsep="0">
12699                     <entry colname="1">
12700                       <para>
12701                         CH
12702                       </para>
12703                     </entry>
12704                     <entry colname="2">
12705                       <para>
12706                         Chaosnet, a LAN protocol created at MIT in the
12707                         mid-1970s.
12708                         Rarely used for its historical purpose, but reused for
12709                         BIND's
12710                         built-in server information zones, e.g.,
12711                         <literal>version.bind</literal>.
12712                       </para>
12713                     </entry>
12714                   </row>
12715
12716                   <row rowsep="0">
12717                     <entry colname="1">
12718                       <para>
12719                         HS
12720                       </para>
12721                     </entry>
12722                     <entry colname="2">
12723                       <para>
12724                         Hesiod, an information service
12725                         developed by MIT's Project Athena. It is used to share
12726                         information
12727                         about various systems databases, such as users,
12728                         groups, printers
12729                         and so on.
12730                       </para>
12731                     </entry>
12732                   </row>
12733
12734                 </tbody>
12735               </tgroup>
12736             </informaltable>
12737
12738             <para>
12739               The owner name is often implicit, rather than forming an
12740               integral
12741               part of the RR.  For example, many name servers internally form
12742               tree
12743               or hash structures for the name space, and chain RRs off nodes.
12744               The remaining RR parts are the fixed header (type, class, TTL)
12745               which is consistent for all RRs, and a variable part (RDATA)
12746               that
12747               fits the needs of the resource being described.
12748             </para>
12749             <para>
12750               The meaning of the TTL field is a time limit on how long an
12751               RR can be kept in a cache.  This limit does not apply to
12752               authoritative
12753               data in zones; it is also timed out, but by the refreshing
12754               policies
12755               for the zone.  The TTL is assigned by the administrator for the
12756               zone where the data originates.  While short TTLs can be used to
12757               minimize caching, and a zero TTL prohibits caching, the
12758               realities
12759               of Internet performance suggest that these times should be on
12760               the
12761               order of days for the typical host.  If a change can be
12762               anticipated,
12763               the TTL can be reduced prior to the change to minimize
12764               inconsistency
12765               during the change, and then increased back to its former value
12766               following
12767               the change.
12768             </para>
12769             <para>
12770               The data in the RDATA section of RRs is carried as a combination
12771               of binary strings and domain names.  The domain names are
12772               frequently
12773               used as "pointers" to other data in the DNS.
12774             </para>
12775           </sect3>
12776           <sect3>
12777             <title>Textual expression of RRs</title>
12778             <para>
12779               RRs are represented in binary form in the packets of the DNS
12780               protocol, and are usually represented in highly encoded form
12781               when
12782               stored in a name server or resolver.  In the examples provided
12783               in
12784               RFC 1034, a style similar to that used in master files was
12785               employed
12786               in order to show the contents of RRs.  In this format, most RRs
12787               are shown on a single line, although continuation lines are
12788               possible
12789               using parentheses.
12790             </para>
12791             <para>
12792               The start of the line gives the owner of the RR.  If a line
12793               begins with a blank, then the owner is assumed to be the same as
12794               that of the previous RR.  Blank lines are often included for
12795               readability.
12796             </para>
12797             <para>
12798               Following the owner, we list the TTL, type, and class of the
12799               RR.  Class and type use the mnemonics defined above, and TTL is
12800               an integer before the type field.  In order to avoid ambiguity
12801               in
12802               parsing, type and class mnemonics are disjoint, TTLs are
12803               integers,
12804               and the type mnemonic is always last. The IN class and TTL
12805               values
12806               are often omitted from examples in the interests of clarity.
12807             </para>
12808             <para>
12809               The resource data or RDATA section of the RR are given using
12810               knowledge of the typical representation for the data.
12811             </para>
12812             <para>
12813               For example, we might show the RRs carried in a message as:
12814             </para>
12815             <informaltable colsep="0" rowsep="0"><tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
12816                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.381in"/>
12817                 <colspec colname="2" colnum="2" colsep="0" colwidth="1.020in"/>
12818                 <colspec colname="3" colnum="3" colsep="0" colwidth="2.099in"/>
12819                 <tbody>
12820                   <row rowsep="0">
12821                     <entry colname="1">
12822                       <para>
12823                         <literal>ISI.EDU.</literal>
12824                       </para>
12825                     </entry>
12826                     <entry colname="2">
12827                       <para>
12828                         <literal>MX</literal>
12829                       </para>
12830                     </entry>
12831                     <entry colname="3">
12832                       <para>
12833                         <literal>10 VENERA.ISI.EDU.</literal>
12834                       </para>
12835                     </entry>
12836                   </row>
12837                   <row rowsep="0">
12838                     <entry colname="1">
12839                       <para/>
12840                     </entry>
12841                     <entry colname="2">
12842                       <para>
12843                         <literal>MX</literal>
12844                       </para>
12845                     </entry>
12846                     <entry colname="3">
12847                       <para>
12848                         <literal>10 VAXA.ISI.EDU</literal>
12849                       </para>
12850                     </entry>
12851                   </row>
12852                   <row rowsep="0">
12853                     <entry colname="1">
12854                       <para>
12855                         <literal>VENERA.ISI.EDU</literal>
12856                       </para>
12857                     </entry>
12858                     <entry colname="2">
12859                       <para>
12860                         <literal>A</literal>
12861                       </para>
12862                     </entry>
12863                     <entry colname="3">
12864                       <para>
12865                         <literal>128.9.0.32</literal>
12866                       </para>
12867                     </entry>
12868                   </row>
12869                   <row rowsep="0">
12870                     <entry colname="1">
12871                       <para/>
12872                     </entry>
12873                     <entry colname="2">
12874                       <para>
12875                         <literal>A</literal>
12876                       </para>
12877                     </entry>
12878                     <entry colname="3">
12879                       <para>
12880                         <literal>10.1.0.52</literal>
12881                       </para>
12882                     </entry>
12883                   </row>
12884                   <row rowsep="0">
12885                     <entry colname="1">
12886                       <para>
12887                         <literal>VAXA.ISI.EDU</literal>
12888                       </para>
12889                     </entry>
12890                     <entry colname="2">
12891                       <para>
12892                         <literal>A</literal>
12893                       </para>
12894                     </entry>
12895                     <entry colname="3">
12896                       <para>
12897                         <literal>10.2.0.27</literal>
12898                       </para>
12899                     </entry>
12900                   </row>
12901                   <row rowsep="0">
12902                     <entry colname="1">
12903                       <para/>
12904                     </entry>
12905                     <entry colname="2">
12906                       <para>
12907                         <literal>A</literal>
12908                       </para>
12909                     </entry>
12910                     <entry colname="3">
12911                       <para>
12912                         <literal>128.9.0.33</literal>
12913                       </para>
12914                     </entry>
12915                   </row>
12916                 </tbody>
12917               </tgroup>
12918             </informaltable>
12919             <para>
12920               The MX RRs have an RDATA section which consists of a 16-bit
12921               number followed by a domain name.  The address RRs use a
12922               standard
12923               IP address format to contain a 32-bit internet address.
12924             </para>
12925             <para>
12926               The above example shows six RRs, with two RRs at each of three
12927               domain names.
12928             </para>
12929             <para>
12930               Similarly we might see:
12931             </para>
12932             <informaltable colsep="0" rowsep="0"><tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
12933                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.491in"/>
12934                 <colspec colname="2" colnum="2" colsep="0" colwidth="1.067in"/>
12935                 <colspec colname="3" colnum="3" colsep="0" colwidth="2.067in"/>
12936                 <tbody>
12937                   <row rowsep="0">
12938                     <entry colname="1">
12939                       <para>
12940                         <literal>XX.LCS.MIT.EDU.</literal>
12941                       </para>
12942                     </entry>
12943                     <entry colname="2">
12944                       <para>
12945                         <literal>IN A</literal>
12946                       </para>
12947                     </entry>
12948                     <entry colname="3">
12949                       <para>
12950                         <literal>10.0.0.44</literal>
12951                       </para>
12952                     </entry>
12953                   </row>
12954                   <row rowsep="0">
12955                     <entry colname="1"/>
12956                     <entry colname="2">
12957                       <para>
12958                         <literal>CH A</literal>
12959                       </para>
12960                     </entry>
12961                     <entry colname="3">
12962                       <para>
12963                         <literal>MIT.EDU. 2420</literal>
12964                       </para>
12965                     </entry>
12966                   </row>
12967                 </tbody>
12968               </tgroup>
12969             </informaltable>
12970             <para>
12971               This example shows two addresses for
12972               <literal>XX.LCS.MIT.EDU</literal>, each of a different class.
12973             </para>
12974           </sect3>
12975         </sect2>
12976
12977         <sect2>
12978           <title>Discussion of MX Records</title>
12979
12980           <para>
12981             As described above, domain servers store information as a
12982             series of resource records, each of which contains a particular
12983             piece of information about a given domain name (which is usually,
12984             but not always, a host). The simplest way to think of a RR is as
12985             a typed pair of data, a domain name matched with a relevant datum,
12986             and stored with some additional type information to help systems
12987             determine when the RR is relevant.
12988           </para>
12989
12990           <para>
12991             MX records are used to control delivery of email. The data
12992             specified in the record is a priority and a domain name. The
12993             priority
12994             controls the order in which email delivery is attempted, with the
12995             lowest number first. If two priorities are the same, a server is
12996             chosen randomly. If no servers at a given priority are responding,
12997             the mail transport agent will fall back to the next largest
12998             priority.
12999             Priority numbers do not have any absolute meaning &mdash; they are
13000             relevant
13001             only respective to other MX records for that domain name. The
13002             domain
13003             name given is the machine to which the mail will be delivered.
13004             It <emphasis>must</emphasis> have an associated address record
13005             (A or AAAA) &mdash; CNAME is not sufficient.
13006           </para>
13007           <para>
13008             For a given domain, if there is both a CNAME record and an
13009             MX record, the MX record is in error, and will be ignored.
13010             Instead,
13011             the mail will be delivered to the server specified in the MX
13012             record
13013             pointed to by the CNAME.
13014             For example:
13015           </para>
13016           <informaltable colsep="0" rowsep="0">
13017             <tgroup cols="5" colsep="0" rowsep="0" tgroupstyle="3Level-table">
13018               <colspec colname="1" colnum="1" colsep="0" colwidth="1.708in"/>
13019               <colspec colname="2" colnum="2" colsep="0" colwidth="0.444in"/>
13020               <colspec colname="3" colnum="3" colsep="0" colwidth="0.444in"/>
13021               <colspec colname="4" colnum="4" colsep="0" colwidth="0.976in"/>
13022               <colspec colname="5" colnum="5" colsep="0" colwidth="1.553in"/>
13023               <tbody>
13024                 <row rowsep="0">
13025                   <entry colname="1">
13026                     <para>
13027                       <literal>example.com.</literal>
13028                     </para>
13029                   </entry>
13030                   <entry colname="2">
13031                     <para>
13032                       <literal>IN</literal>
13033                     </para>
13034                   </entry>
13035                   <entry colname="3">
13036                     <para>
13037                       <literal>MX</literal>
13038                     </para>
13039                   </entry>
13040                   <entry colname="4">
13041                     <para>
13042                       <literal>10</literal>
13043                     </para>
13044                   </entry>
13045                   <entry colname="5">
13046                     <para>
13047                       <literal>mail.example.com.</literal>
13048                     </para>
13049                   </entry>
13050                 </row>
13051                 <row rowsep="0">
13052                   <entry colname="1">
13053                     <para/>
13054                   </entry>
13055                   <entry colname="2">
13056                     <para>
13057                       <literal>IN</literal>
13058                     </para>
13059                   </entry>
13060                   <entry colname="3">
13061                     <para>
13062                       <literal>MX</literal>
13063                     </para>
13064                   </entry>
13065                   <entry colname="4">
13066                     <para>
13067                       <literal>10</literal>
13068                     </para>
13069                   </entry>
13070                   <entry colname="5">
13071                     <para>
13072                       <literal>mail2.example.com.</literal>
13073                     </para>
13074                   </entry>
13075                 </row>
13076                 <row rowsep="0">
13077                   <entry colname="1">
13078                     <para/>
13079                   </entry>
13080                   <entry colname="2">
13081                     <para>
13082                       <literal>IN</literal>
13083                     </para>
13084                   </entry>
13085                   <entry colname="3">
13086                     <para>
13087                       <literal>MX</literal>
13088                     </para>
13089                   </entry>
13090                   <entry colname="4">
13091                     <para>
13092                       <literal>20</literal>
13093                     </para>
13094                   </entry>
13095                   <entry colname="5">
13096                     <para>
13097                       <literal>mail.backup.org.</literal>
13098                     </para>
13099                   </entry>
13100                 </row>
13101                 <row rowsep="0">
13102                   <entry colname="1">
13103                     <para>
13104                       <literal>mail.example.com.</literal>
13105                     </para>
13106                   </entry>
13107                   <entry colname="2">
13108                     <para>
13109                       <literal>IN</literal>
13110                     </para>
13111                   </entry>
13112                   <entry colname="3">
13113                     <para>
13114                       <literal>A</literal>
13115                     </para>
13116                   </entry>
13117                   <entry colname="4">
13118                     <para>
13119                       <literal>10.0.0.1</literal>
13120                     </para>
13121                   </entry>
13122                   <entry colname="5">
13123                     <para/>
13124                   </entry>
13125                 </row>
13126                 <row rowsep="0">
13127                   <entry colname="1">
13128                     <para>
13129                       <literal>mail2.example.com.</literal>
13130                     </para>
13131                   </entry>
13132                   <entry colname="2">
13133                     <para>
13134                       <literal>IN</literal>
13135                     </para>
13136                   </entry>
13137                   <entry colname="3">
13138                     <para>
13139                       <literal>A</literal>
13140                     </para>
13141                   </entry>
13142                   <entry colname="4">
13143                     <para>
13144                       <literal>10.0.0.2</literal>
13145                     </para>
13146                   </entry>
13147                   <entry colname="5">
13148                     <para/>
13149                   </entry>
13150                 </row>
13151               </tbody>
13152             </tgroup>
13153             </informaltable><para>
13154             Mail delivery will be attempted to <literal>mail.example.com</literal> and
13155             <literal>mail2.example.com</literal> (in
13156             any order), and if neither of those succeed, delivery to <literal>mail.backup.org</literal> will
13157             be attempted.
13158           </para>
13159         </sect2>
13160         <sect2 id="Setting_TTLs">
13161           <title>Setting TTLs</title>
13162           <para>
13163             The time-to-live of the RR field is a 32-bit integer represented
13164             in units of seconds, and is primarily used by resolvers when they
13165             cache RRs. The TTL describes how long a RR can be cached before it
13166             should be discarded. The following three types of TTL are
13167             currently
13168             used in a zone file.
13169           </para>
13170           <informaltable colsep="0" rowsep="0">
13171             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
13172               <colspec colname="1" colnum="1" colsep="0" colwidth="0.750in"/>
13173               <colspec colname="2" colnum="2" colsep="0" colwidth="4.375in"/>
13174               <tbody>
13175                 <row rowsep="0">
13176                   <entry colname="1">
13177                     <para>
13178                       SOA
13179                     </para>
13180                   </entry>
13181                   <entry colname="2">
13182                     <para>
13183                       The last field in the SOA is the negative
13184                       caching TTL. This controls how long other servers will
13185                       cache no-such-domain
13186                       (NXDOMAIN) responses from you.
13187                     </para>
13188                     <para>
13189                       The maximum time for
13190                       negative caching is 3 hours (3h).
13191                     </para>
13192                   </entry>
13193                 </row>
13194                 <row rowsep="0">
13195                   <entry colname="1">
13196                     <para>
13197                       $TTL
13198                     </para>
13199                   </entry>
13200                   <entry colname="2">
13201                     <para>
13202                       The $TTL directive at the top of the
13203                       zone file (before the SOA) gives a default TTL for every
13204                       RR without
13205                       a specific TTL set.
13206                     </para>
13207                   </entry>
13208                 </row>
13209                 <row rowsep="0">
13210                   <entry colname="1">
13211                     <para>
13212                       RR TTLs
13213                     </para>
13214                   </entry>
13215                   <entry colname="2">
13216                     <para>
13217                       Each RR can have a TTL as the second
13218                       field in the RR, which will control how long other
13219                       servers can cache
13220                       the it.
13221                     </para>
13222                   </entry>
13223                 </row>
13224               </tbody>
13225             </tgroup>
13226           </informaltable>
13227           <para>
13228             All of these TTLs default to units of seconds, though units
13229             can be explicitly specified, for example, <literal>1h30m</literal>.
13230           </para>
13231         </sect2>
13232         <sect2>
13233           <title>Inverse Mapping in IPv4</title>
13234           <para>
13235             Reverse name resolution (that is, translation from IP address
13236             to name) is achieved by means of the <emphasis>in-addr.arpa</emphasis> domain
13237             and PTR records. Entries in the in-addr.arpa domain are made in
13238             least-to-most significant order, read left to right. This is the
13239             opposite order to the way IP addresses are usually written. Thus,
13240             a machine with an IP address of 10.1.2.3 would have a
13241             corresponding
13242             in-addr.arpa name of
13243             3.2.1.10.in-addr.arpa. This name should have a PTR resource record
13244             whose data field is the name of the machine or, optionally,
13245             multiple
13246             PTR records if the machine has more than one name. For example,
13247             in the <optional>example.com</optional> domain:
13248           </para>
13249           <informaltable colsep="0" rowsep="0">
13250             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
13251               <colspec colname="1" colnum="1" colsep="0" colwidth="1.125in"/>
13252               <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
13253               <tbody>
13254                 <row rowsep="0">
13255                   <entry colname="1">
13256                     <para>
13257                       <literal>$ORIGIN</literal>
13258                     </para>
13259                   </entry>
13260                   <entry colname="2">
13261                     <para>
13262                       <literal>2.1.10.in-addr.arpa</literal>
13263                     </para>
13264                   </entry>
13265                 </row>
13266                 <row rowsep="0">
13267                   <entry colname="1">
13268                     <para>
13269                       <literal>3</literal>
13270                     </para>
13271                   </entry>
13272                   <entry colname="2">
13273                     <para>
13274                       <literal>IN PTR foo.example.com.</literal>
13275                     </para>
13276                   </entry>
13277                 </row>
13278               </tbody>
13279             </tgroup>
13280           </informaltable>
13281           <note>
13282             <para>
13283               The <command>$ORIGIN</command> lines in the examples
13284               are for providing context to the examples only &mdash; they do not
13285               necessarily
13286               appear in the actual usage. They are only used here to indicate
13287               that the example is relative to the listed origin.
13288             </para>
13289           </note>
13290         </sect2>
13291         <sect2>
13292           <title>Other Zone File Directives</title>
13293           <para>
13294             The Master File Format was initially defined in RFC 1035 and
13295             has subsequently been extended. While the Master File Format
13296             itself
13297             is class independent all records in a Master File must be of the
13298             same
13299             class.
13300           </para>
13301           <para>
13302             Master File Directives include <command>$ORIGIN</command>, <command>$INCLUDE</command>,
13303             and <command>$TTL.</command>
13304           </para>
13305           <sect3>
13306             <title>The <command>@</command> (at-sign)</title>
13307             <para>
13308               When used in the label (or name) field, the asperand or
13309               at-sign (@) symbol represents the current origin.
13310               At the start of the zone file, it is the 
13311               &lt;<varname>zone_name</varname>&gt; (followed by
13312               trailing dot).
13313             </para>
13314           </sect3>
13315           <sect3>
13316             <title>The <command>$ORIGIN</command> Directive</title>
13317             <para>
13318               Syntax: <command>$ORIGIN</command>
13319               <replaceable>domain-name</replaceable>
13320               <optional><replaceable>comment</replaceable></optional>
13321             </para>
13322             <para><command>$ORIGIN</command>
13323               sets the domain name that will be appended to any
13324               unqualified records. When a zone is first read in there
13325               is an implicit <command>$ORIGIN</command>
13326               &lt;<varname>zone_name</varname>&gt;<command>.</command>
13327               (followed by trailing dot).
13328               The current <command>$ORIGIN</command> is appended to
13329               the domain specified in the <command>$ORIGIN</command>
13330               argument if it is not absolute.
13331             </para>
13332
13333 <programlisting>
13334 $ORIGIN example.com.
13335 WWW     CNAME   MAIN-SERVER
13336 </programlisting>
13337
13338             <para>
13339               is equivalent to
13340             </para>
13341
13342 <programlisting>
13343 WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
13344 </programlisting>
13345
13346           </sect3>
13347           <sect3>
13348             <title>The <command>$INCLUDE</command> Directive</title>
13349             <para>
13350               Syntax: <command>$INCLUDE</command>
13351               <replaceable>filename</replaceable>
13352               <optional>
13353 <replaceable>origin</replaceable> </optional>
13354               <optional> <replaceable>comment</replaceable> </optional>
13355             </para>
13356             <para>
13357               Read and process the file <filename>filename</filename> as
13358               if it were included into the file at this point.  If <command>origin</command> is
13359               specified the file is processed with <command>$ORIGIN</command> set
13360               to that value, otherwise the current <command>$ORIGIN</command> is
13361               used.
13362             </para>
13363             <para>
13364               The origin and the current domain name
13365               revert to the values they had prior to the <command>$INCLUDE</command> once
13366               the file has been read.
13367             </para>
13368             <note>
13369               <para>
13370                 RFC 1035 specifies that the current origin should be restored
13371                 after
13372                 an <command>$INCLUDE</command>, but it is silent
13373                 on whether the current
13374                 domain name should also be restored.  BIND 9 restores both of
13375                 them.
13376                 This could be construed as a deviation from RFC 1035, a
13377                 feature, or both.
13378               </para>
13379             </note>
13380           </sect3>
13381           <sect3>
13382             <title>The <command>$TTL</command> Directive</title>
13383             <para>
13384               Syntax: <command>$TTL</command>
13385               <replaceable>default-ttl</replaceable>
13386               <optional>
13387 <replaceable>comment</replaceable> </optional>
13388             </para>
13389             <para>
13390               Set the default Time To Live (TTL) for subsequent records
13391               with undefined TTLs. Valid TTLs are of the range 0-2147483647
13392               seconds.
13393             </para>
13394             <para><command>$TTL</command>
13395                is defined in RFC 2308.
13396             </para>
13397           </sect3>
13398         </sect2>
13399         <sect2>
13400           <title><acronym>BIND</acronym> Master File Extension: the  <command>$GENERATE</command> Directive</title>
13401           <para>
13402             Syntax: <command>$GENERATE</command>
13403             <replaceable>range</replaceable>
13404             <replaceable>lhs</replaceable>
13405             <optional><replaceable>ttl</replaceable></optional>
13406             <optional><replaceable>class</replaceable></optional>
13407             <replaceable>type</replaceable>
13408             <replaceable>rhs</replaceable>
13409             <optional><replaceable>comment</replaceable></optional>
13410           </para>
13411           <para><command>$GENERATE</command>
13412             is used to create a series of resource records that only
13413             differ from each other by an
13414             iterator. <command>$GENERATE</command> can be used to
13415             easily generate the sets of records required to support
13416             sub /24 reverse delegations described in RFC 2317:
13417             Classless IN-ADDR.ARPA delegation.
13418           </para>
13419
13420 <programlisting>$ORIGIN 0.0.192.IN-ADDR.ARPA.
13421 $GENERATE 1-2 @ NS SERVER$.EXAMPLE.
13422 $GENERATE 1-127 $ CNAME $.0</programlisting>
13423
13424           <para>
13425             is equivalent to
13426           </para>
13427
13428 <programlisting>0.0.0.192.IN-ADDR.ARPA. NS SERVER1.EXAMPLE.
13429 0.0.0.192.IN-ADDR.ARPA. NS SERVER2.EXAMPLE.
13430 1.0.0.192.IN-ADDR.ARPA. CNAME 1.0.0.0.192.IN-ADDR.ARPA.
13431 2.0.0.192.IN-ADDR.ARPA. CNAME 2.0.0.0.192.IN-ADDR.ARPA.
13432 ...
13433 127.0.0.192.IN-ADDR.ARPA. CNAME 127.0.0.0.192.IN-ADDR.ARPA.
13434 </programlisting>
13435
13436            <para>
13437             Generate a set of A and MX records.  Note the MX's right hand
13438             side is a quoted string.  The quotes will be stripped when the
13439             right hand side is processed.
13440            </para>
13441
13442 <programlisting>
13443 $ORIGIN EXAMPLE.
13444 $GENERATE 1-127 HOST-$ A 1.2.3.$
13445 $GENERATE 1-127 HOST-$ MX "0 ."</programlisting>
13446
13447           <para>
13448             is equivalent to
13449           </para>
13450
13451 <programlisting>HOST-1.EXAMPLE.   A  1.2.3.1
13452 HOST-1.EXAMPLE.   MX 0 .
13453 HOST-2.EXAMPLE.   A  1.2.3.2
13454 HOST-2.EXAMPLE.   MX 0 .
13455 HOST-3.EXAMPLE.   A  1.2.3.3
13456 HOST-3.EXAMPLE.   MX 0 .
13457 ...
13458 HOST-127.EXAMPLE. A  1.2.3.127
13459 HOST-127.EXAMPLE. MX 0 .
13460 </programlisting>
13461
13462           <informaltable colsep="0" rowsep="0">
13463             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
13464                         <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
13465               <colspec colname="2" colnum="2" colsep="0" colwidth="4.250in"/>
13466               <tbody>
13467                 <row rowsep="0">
13468                   <entry colname="1">
13469                     <para><command>range</command></para>
13470                   </entry>
13471                   <entry colname="2">
13472                     <para>
13473                       This can be one of two forms: start-stop
13474                       or start-stop/step. If the first form is used, then step
13475                       is set to
13476                       1. All of start, stop and step must be positive.
13477                     </para>
13478                   </entry>
13479                 </row>
13480                 <row rowsep="0">
13481                   <entry colname="1">
13482                     <para><command>lhs</command></para>
13483                   </entry>
13484                   <entry colname="2">
13485                     <para>This
13486                       describes the owner name of the resource records
13487                       to be created.  Any single <command>$</command>
13488                       (dollar sign)
13489                       symbols within the <command>lhs</command> string
13490                       are replaced by the iterator value.
13491
13492                       To get a $ in the output, you need to escape the
13493                       <command>$</command> using a backslash
13494                       <command>\</command>,
13495                       e.g. <command>\$</command>. The
13496                       <command>$</command> may optionally be followed
13497                       by modifiers which change the offset from the
13498                       iterator, field width and base.
13499
13500                       Modifiers are introduced by a
13501                       <command>{</command> (left brace) immediately following the
13502                       <command>$</command> as
13503                       <command>${offset[,width[,base]]}</command>.
13504                       For example, <command>${-20,3,d}</command>
13505                       subtracts 20 from the current value, prints the
13506                       result as a decimal in a zero-padded field of
13507                       width 3.
13508
13509                       Available output forms are decimal
13510                       (<command>d</command>), octal
13511                       (<command>o</command>), hexadecimal
13512                       (<command>x</command> or <command>X</command>
13513                       for uppercase) and nibble
13514                       (<command>n</command> or <command>N</command>\
13515                       for uppercase).  The default modifier is
13516                       <command>${0,0,d}</command>.  If the
13517                       <command>lhs</command> is not absolute, the
13518                       current <command>$ORIGIN</command> is appended
13519                       to the name.
13520                     </para>
13521                     <para>
13522                       In nibble mode the value will be treated as
13523                       if it was a reversed hexadecimal string
13524                       with each hexadecimal digit as a separate
13525                       label.  The width field includes the label
13526                       separator.
13527                     </para>
13528                     <para>
13529                       For compatibility with earlier versions,
13530                       <command>$$</command> is still recognized as
13531                       indicating a literal $ in the output.
13532                     </para>
13533                   </entry>
13534                 </row>
13535                 <row rowsep="0">
13536                   <entry colname="1">
13537                     <para><command>ttl</command></para>
13538                   </entry>
13539                   <entry colname="2">
13540                     <para>
13541                       Specifies the time-to-live of the generated records. If
13542                       not specified this will be inherited using the
13543                       normal TTL inheritance rules.
13544                     </para>
13545                     <para><command>class</command>
13546                       and <command>ttl</command> can be
13547                       entered in either order.
13548                     </para>
13549                   </entry>
13550                 </row>
13551                 <row rowsep="0">
13552                   <entry colname="1">
13553                     <para><command>class</command></para>
13554                   </entry>
13555                   <entry colname="2">
13556                     <para>
13557                       Specifies the class of the generated records.
13558                       This must match the zone class if it is
13559                       specified.
13560                     </para>
13561                     <para><command>class</command>
13562                       and <command>ttl</command> can be
13563                       entered in either order.
13564                     </para>
13565                   </entry>
13566                 </row>
13567                 <row rowsep="0">
13568                   <entry colname="1">
13569                     <para><command>type</command></para>
13570                   </entry>
13571                   <entry colname="2">
13572                     <para>
13573                       Any valid type.
13574                     </para>
13575                   </entry>
13576                 </row>
13577                 <row rowsep="0">
13578                   <entry colname="1">
13579                     <para><command>rhs</command></para>
13580                   </entry>
13581                   <entry colname="2">
13582                     <para>
13583                       <command>rhs</command>, optionally, quoted string.
13584                     </para>
13585                   </entry>
13586                 </row>
13587               </tbody>
13588             </tgroup>
13589           </informaltable>
13590           <para>
13591             The <command>$GENERATE</command> directive is a <acronym>BIND</acronym> extension
13592             and not part of the standard zone file format.
13593           </para>
13594           <para>
13595             BIND 8 does not support the optional TTL and CLASS fields.
13596           </para>
13597         </sect2>
13598
13599         <sect2 id="zonefile_format">
13600           <title>Additional File Formats</title>
13601           <para>
13602             In addition to the standard textual format, BIND 9
13603             supports the ability to read or dump to zone files in
13604             other formats.  The <constant>raw</constant> format is
13605             currently available as an additional format.  It is a
13606             binary format representing BIND 9's internal data
13607             structure directly, thereby remarkably improving the
13608             loading time.
13609           </para>
13610           <para>
13611             For a primary server, a zone file in the
13612             <constant>raw</constant> format is expected to be
13613             generated from a textual zone file by the
13614             <command>named-compilezone</command> command.  For a
13615             secondary server or for a dynamic zone, it is automatically
13616             generated (if this format is specified by the
13617             <command>masterfile-format</command> option) when
13618             <command>named</command> dumps the zone contents after
13619             zone transfer or when applying prior updates.
13620           </para>
13621           <para>
13622             If a zone file in a binary format needs manual modification,
13623             it first must be converted to a textual form by the
13624             <command>named-compilezone</command> command.  All
13625             necessary modification should go to the text file, which
13626             should then be converted to the binary form by the
13627             <command>named-compilezone</command> command again.
13628           </para>
13629           <para>
13630              Although the <constant>raw</constant> format uses the
13631              network byte order and avoids architecture-dependent
13632              data alignment so that it is as much portable as
13633              possible, it is primarily expected to be used inside
13634              the same single system.  In order to export a zone
13635              file in the <constant>raw</constant> format or make a
13636              portable backup of the file, it is recommended to
13637              convert the file to the standard textual representation.
13638           </para>
13639         </sect2>
13640       </sect1>
13641
13642       <sect1 id="statistics">
13643         <title>BIND9 Statistics</title>
13644         <para>
13645           <acronym>BIND</acronym> 9 maintains lots of statistics
13646           information and provides several interfaces for users to
13647           get access to the statistics.
13648           The available statistics include all statistics counters
13649           that were available in <acronym>BIND</acronym> 8 and
13650           are meaningful in <acronym>BIND</acronym> 9,
13651           and other information that is considered useful.
13652         </para>
13653
13654         <para>
13655           The statistics information is categorized into the following
13656           sections.
13657         </para>
13658
13659         <informaltable frame="all">
13660           <tgroup cols="2">
13661             <colspec colname="1" colnum="1" colsep="0" colwidth="3.300in"/>
13662             <colspec colname="2" colnum="2" colsep="0" colwidth="2.625in"/>
13663             <tbody>
13664
13665               <row rowsep="0">
13666                 <entry colname="1">
13667                   <para>Incoming Requests</para>
13668                 </entry>
13669                 <entry colname="2">
13670                   <para>
13671                     The number of incoming DNS requests for each OPCODE.
13672                   </para>
13673                 </entry>
13674               </row>
13675
13676               <row rowsep="0">
13677                 <entry colname="1">
13678                   <para>Incoming Queries</para>
13679                 </entry>
13680                 <entry colname="2">
13681                   <para>
13682                     The number of incoming queries for each RR type.
13683                   </para>
13684                 </entry>
13685               </row>
13686
13687               <row rowsep="0">
13688                 <entry colname="1">
13689                   <para>Outgoing Queries</para>
13690                 </entry>
13691                 <entry colname="2">
13692                   <para>
13693                     The number of outgoing queries for each RR
13694                     type sent from the internal resolver.
13695                     Maintained per view.
13696                   </para>
13697                 </entry>
13698               </row>
13699
13700               <row rowsep="0">
13701                 <entry colname="1">
13702                   <para>Name Server Statistics</para>
13703                 </entry>
13704                 <entry colname="2">
13705                   <para>
13706                     Statistics counters about incoming request processing.
13707                   </para>
13708                 </entry>
13709               </row>
13710
13711               <row rowsep="0">
13712                 <entry colname="1">
13713                   <para>Zone Maintenance Statistics</para>
13714                 </entry>
13715                 <entry colname="2">
13716                   <para>
13717                     Statistics counters regarding zone maintenance
13718                     operations such as zone transfers.
13719                   </para>
13720                 </entry>
13721               </row>
13722
13723               <row rowsep="0">
13724                 <entry colname="1">
13725                   <para>Resolver Statistics</para>
13726                 </entry>
13727                 <entry colname="2">
13728                   <para>
13729                     Statistics counters about name resolution
13730                     performed in the internal resolver.
13731                     Maintained per view.
13732                   </para>
13733                 </entry>
13734               </row>
13735
13736               <row rowsep="0">
13737                 <entry colname="1">
13738                   <para>Cache DB RRsets</para>
13739                 </entry>
13740                 <entry colname="2">
13741                   <para>
13742                     The number of RRsets per RR type and nonexistent
13743                     names stored in the cache database.
13744                     If the exclamation mark (!) is printed for a RR
13745                     type, it means that particular type of RRset is
13746                     known to be nonexistent (this is also known as
13747                     "NXRRSET").
13748                     Maintained per view.
13749                   </para>
13750                 </entry>
13751               </row>
13752
13753               <row rowsep="0">
13754                 <entry colname="1">
13755                   <para>Socket I/O Statistics</para>
13756                 </entry>
13757                 <entry colname="2">
13758                   <para>
13759                     Statistics counters about network related events.
13760                   </para>
13761                 </entry>
13762               </row>
13763
13764             </tbody>
13765           </tgroup>
13766         </informaltable>
13767
13768         <para>
13769           A subset of Name Server Statistics is collected and shown
13770           per zone for which the server has the authority when
13771           <command>zone-statistics</command> is set to
13772           <userinput>yes</userinput>.
13773           These statistics counters are shown with their zone and view
13774           names.
13775           In some cases the view names are omitted for the default view.
13776         </para>
13777
13778         <para>
13779           There are currently two user interfaces to get access to the
13780           statistics.
13781           One is in the plain text format dumped to the file specified
13782           by the <command>statistics-file</command> configuration option.
13783           The other is remotely accessible via a statistics channel
13784           when the <command>statistics-channels</command> statement
13785           is specified in the configuration file
13786           (see <xref linkend="statschannels"/>.)
13787         </para>
13788
13789         <sect3 id="statsfile">
13790           <title>The Statistics File</title>
13791           <para>
13792             The text format statistics dump begins with a line, like:
13793           </para>
13794           <para>
13795             <command>+++ Statistics Dump +++ (973798949)</command>
13796           </para>
13797           <para>
13798             The number in parentheses is a standard
13799             Unix-style timestamp, measured as seconds since January 1, 1970.
13800
13801             Following
13802             that line is a set of statistics information, which is categorized
13803             as described above.
13804             Each section begins with a line, like:
13805           </para>
13806
13807           <para>
13808             <command>++ Name Server Statistics ++</command>
13809           </para>
13810
13811           <para>
13812             Each section consists of lines, each containing the statistics
13813             counter value followed by its textual description.
13814             See below for available counters.
13815             For brevity, counters that have a value of 0 are not shown
13816             in the statistics file.
13817           </para>
13818
13819           <para>
13820             The statistics dump ends with the line where the
13821             number is identical to the number in the beginning line; for example:
13822           </para>
13823           <para>
13824             <command>--- Statistics Dump --- (973798949)</command>
13825           </para>
13826         </sect3>
13827
13828         <sect2 id="statistics_counters">
13829           <title>Statistics Counters</title>
13830           <para>
13831             The following tables summarize statistics counters that
13832             <acronym>BIND</acronym> 9 provides.
13833             For each row of the tables, the leftmost column is the
13834             abbreviated symbol name of that counter.
13835             These symbols are shown in the statistics information
13836             accessed via an HTTP statistics channel.
13837             The rightmost column gives the description of the counter,
13838             which is also shown in the statistics file
13839             (but, in this document, possibly with slight modification
13840             for better readability).
13841             Additional notes may also be provided in this column.
13842             When a middle column exists between these two columns,
13843             it gives the corresponding counter name of the
13844             <acronym>BIND</acronym> 8 statistics, if applicable.
13845           </para>
13846
13847           <sect3>
13848             <title>Name Server Statistics Counters</title>
13849
13850             <informaltable colsep="0" rowsep="0">
13851               <tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
13852                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
13853                 <colspec colname="2" colnum="2" colsep="0" colwidth="1.150in"/>
13854                 <colspec colname="3" colnum="3" colsep="0" colwidth="3.350in"/>
13855                 <tbody>
13856                   <row>
13857                     <entry colname="1">
13858                       <para>
13859                         <emphasis>Symbol</emphasis>
13860                       </para>
13861                     </entry>
13862                     <entry colname="2">
13863                       <para>
13864                         <emphasis>BIND8 Symbol</emphasis>
13865                       </para>
13866                     </entry>
13867                     <entry colname="3">
13868                       <para>
13869                         <emphasis>Description</emphasis>
13870                       </para>
13871                     </entry>
13872                   </row>
13873
13874                   <row rowsep="0">
13875                     <entry colname="1">
13876                       <para><command>Requestv4</command></para>
13877                     </entry>
13878                     <entry colname="2">
13879                       <para><command>RQ</command></para>
13880                     </entry>
13881                     <entry colname="3">
13882                       <para>
13883                         IPv4 requests received.
13884                         Note: this also counts non query requests.
13885                       </para>
13886                     </entry>
13887                   </row>
13888                   <row rowsep="0">
13889                     <entry colname="1">
13890                       <para><command>Requestv6</command></para>
13891                     </entry>
13892                     <entry colname="2">
13893                       <para><command>RQ</command></para>
13894                     </entry>
13895                     <entry colname="3">
13896                       <para>
13897                         IPv6 requests received.
13898                         Note: this also counts non query requests.
13899                       </para>
13900                     </entry>
13901                   </row>
13902                   <row rowsep="0">
13903                     <entry colname="1">
13904                       <para><command>ReqEdns0</command></para>
13905                     </entry>
13906                     <entry colname="2">
13907                       <para><command></command></para>
13908                     </entry>
13909                     <entry colname="3">
13910                       <para>
13911                         Requests with EDNS(0) received.
13912                       </para>
13913                     </entry>
13914                   </row>
13915                   <row rowsep="0">
13916                     <entry colname="1">
13917                       <para><command>ReqBadEDNSVer</command></para>
13918                     </entry>
13919                     <entry colname="2">
13920                       <para><command></command></para>
13921                     </entry>
13922                     <entry colname="3">
13923                       <para>
13924                         Requests with unsupported EDNS version received.
13925                       </para>
13926                     </entry>
13927                   </row>
13928                   <row rowsep="0">
13929                     <entry colname="1">
13930                       <para><command>ReqTSIG</command></para>
13931                     </entry>
13932                     <entry colname="2">
13933                       <para><command></command></para>
13934                     </entry>
13935                     <entry colname="3">
13936                       <para>
13937                         Requests with TSIG received.
13938                       </para>
13939                     </entry>
13940                   </row>
13941                   <row rowsep="0">
13942                     <entry colname="1">
13943                       <para><command>ReqSIG0</command></para>
13944                     </entry>
13945                     <entry colname="2">
13946                       <para><command></command></para>
13947                     </entry>
13948                     <entry colname="3">
13949                       <para>
13950                         Requests with SIG(0) received.
13951                       </para>
13952                     </entry>
13953                   </row>
13954                   <row rowsep="0">
13955                     <entry colname="1">
13956                       <para><command>ReqBadSIG</command></para>
13957                     </entry>
13958                     <entry colname="2">
13959                       <para><command></command></para>
13960                     </entry>
13961                     <entry colname="3">
13962                       <para>
13963                         Requests with invalid (TSIG or SIG(0)) signature.
13964                       </para>
13965                     </entry>
13966                   </row>
13967                   <row rowsep="0">
13968                     <entry colname="1">
13969                       <para><command>ReqTCP</command></para>
13970                     </entry>
13971                     <entry colname="2">
13972                       <para><command>RTCP</command></para>
13973                     </entry>
13974                     <entry colname="3">
13975                       <para>
13976                         TCP requests received.
13977                       </para>
13978                     </entry>
13979                   </row>
13980                   <row rowsep="0">
13981                     <entry colname="1">
13982                       <para><command>AuthQryRej</command></para>
13983                     </entry>
13984                     <entry colname="2">
13985                       <para><command>RUQ</command></para>
13986                     </entry>
13987                     <entry colname="3">
13988                       <para>
13989                         Authoritative (non recursive) queries rejected.
13990                       </para>
13991                     </entry>
13992                   </row>
13993                   <row rowsep="0">
13994                     <entry colname="1">
13995                       <para><command>RecQryRej</command></para>
13996                     </entry>
13997                     <entry colname="2">
13998                       <para><command>RURQ</command></para>
13999                     </entry>
14000                     <entry colname="3">
14001                       <para>
14002                         Recursive queries rejected.
14003                       </para>
14004                     </entry>
14005                   </row>
14006                   <row rowsep="0">
14007                     <entry colname="1">
14008                       <para><command>XfrRej</command></para>
14009                     </entry>
14010                     <entry colname="2">
14011                       <para><command>RUXFR</command></para>
14012                     </entry>
14013                     <entry colname="3">
14014                       <para>
14015                         Zone transfer requests rejected.
14016                       </para>
14017                     </entry>
14018                   </row>
14019                   <row rowsep="0">
14020                     <entry colname="1">
14021                       <para><command>UpdateRej</command></para>
14022                     </entry>
14023                     <entry colname="2">
14024                       <para><command>RUUpd</command></para>
14025                     </entry>
14026                     <entry colname="3">
14027                       <para>
14028                         Dynamic update requests rejected.
14029                       </para>
14030                     </entry>
14031                   </row>
14032                   <row rowsep="0">
14033                     <entry colname="1">
14034                       <para><command>Response</command></para>
14035                     </entry>
14036                     <entry colname="2">
14037                       <para><command>SAns</command></para>
14038                     </entry>
14039                     <entry colname="3">
14040                       <para>
14041                         Responses sent.
14042                       </para>
14043                     </entry>
14044                   </row>
14045                   <row rowsep="0">
14046                     <entry colname="1">
14047                       <para><command>RespTruncated</command></para>
14048                     </entry>
14049                     <entry colname="2">
14050                       <para><command></command></para>
14051                     </entry>
14052                     <entry colname="3">
14053                       <para>
14054                         Truncated responses sent.
14055                       </para>
14056                     </entry>
14057                   </row>
14058                   <row rowsep="0">
14059                     <entry colname="1">
14060                       <para><command>RespEDNS0</command></para>
14061                     </entry>
14062                     <entry colname="2">
14063                       <para><command></command></para>
14064                     </entry>
14065                     <entry colname="3">
14066                       <para>
14067                         Responses with EDNS(0) sent.
14068                       </para>
14069                     </entry>
14070                   </row>
14071                   <row rowsep="0">
14072                     <entry colname="1">
14073                       <para><command>RespTSIG</command></para>
14074                     </entry>
14075                     <entry colname="2">
14076                       <para><command></command></para>
14077                     </entry>
14078                     <entry colname="3">
14079                       <para>
14080                         Responses with TSIG sent.
14081                       </para>
14082                     </entry>
14083                   </row>
14084                   <row rowsep="0">
14085                     <entry colname="1">
14086                       <para><command>RespSIG0</command></para>
14087                     </entry>
14088                     <entry colname="2">
14089                       <para><command></command></para>
14090                     </entry>
14091                     <entry colname="3">
14092                       <para>
14093                         Responses with SIG(0) sent.
14094                       </para>
14095                     </entry>
14096                   </row>
14097                   <row rowsep="0">
14098                     <entry colname="1">
14099                       <para><command>QrySuccess</command></para>
14100                     </entry>
14101                     <entry colname="2">
14102                       <para><command></command></para>
14103                     </entry>
14104                     <entry colname="3">
14105                       <para>
14106                         Queries resulted in a successful answer.
14107                         This means the query which returns a NOERROR response
14108                         with at least one answer RR.
14109                         This corresponds to the
14110                         <command>success</command> counter
14111                         of previous versions of
14112                         <acronym>BIND</acronym> 9.
14113                       </para>
14114                     </entry>
14115                   </row>
14116                   <row rowsep="0">
14117                     <entry colname="1">
14118                       <para><command>QryAuthAns</command></para>
14119                     </entry>
14120                     <entry colname="2">
14121                       <para><command></command></para>
14122                     </entry>
14123                     <entry colname="3">
14124                       <para>
14125                         Queries resulted in authoritative answer.
14126                       </para>
14127                     </entry>
14128                   </row>
14129                   <row rowsep="0">
14130                     <entry colname="1">
14131                       <para><command>QryNoauthAns</command></para>
14132                     </entry>
14133                     <entry colname="2">
14134                       <para><command>SNaAns</command></para>
14135                     </entry>
14136                     <entry colname="3">
14137                       <para>
14138                         Queries resulted in non authoritative answer.
14139                       </para>
14140                     </entry>
14141                   </row>
14142                   <row rowsep="0">
14143                     <entry colname="1">
14144                       <para><command>QryReferral</command></para>
14145                     </entry>
14146                     <entry colname="2">
14147                       <para><command></command></para>
14148                     </entry>
14149                     <entry colname="3">
14150                       <para>
14151                         Queries resulted in referral answer.
14152                         This corresponds to the
14153                         <command>referral</command> counter
14154                         of previous versions of
14155                         <acronym>BIND</acronym> 9.
14156                       </para>
14157                     </entry>
14158                   </row>
14159                   <row rowsep="0">
14160                     <entry colname="1">
14161                       <para><command>QryNxrrset</command></para>
14162                     </entry>
14163                     <entry colname="2">
14164                       <para><command></command></para>
14165                     </entry>
14166                     <entry colname="3">
14167                       <para>
14168                         Queries resulted in NOERROR responses with no data.
14169                         This corresponds to the
14170                         <command>nxrrset</command> counter
14171                         of previous versions of
14172                         <acronym>BIND</acronym> 9.
14173                       </para>
14174                     </entry>
14175                   </row>
14176                   <row rowsep="0">
14177                     <entry colname="1">
14178                       <para><command>QrySERVFAIL</command></para>
14179                     </entry>
14180                     <entry colname="2">
14181                       <para><command>SFail</command></para>
14182                     </entry>
14183                     <entry colname="3">
14184                       <para>
14185                         Queries resulted in SERVFAIL.
14186                       </para>
14187                     </entry>
14188                   </row>
14189                   <row rowsep="0">
14190                     <entry colname="1">
14191                       <para><command>QryFORMERR</command></para>
14192                     </entry>
14193                     <entry colname="2">
14194                       <para><command>SFErr</command></para>
14195                     </entry>
14196                     <entry colname="3">
14197                       <para>
14198                         Queries resulted in FORMERR.
14199                       </para>
14200                     </entry>
14201                   </row>
14202                   <row rowsep="0">
14203                     <entry colname="1">
14204                       <para><command>QryNXDOMAIN</command></para>
14205                     </entry>
14206                     <entry colname="2">
14207                       <para><command>SNXD</command></para>
14208                     </entry>
14209                     <entry colname="3">
14210                       <para>
14211                         Queries resulted in NXDOMAIN.
14212                         This corresponds to the
14213                         <command>nxdomain</command> counter
14214                         of previous versions of
14215                         <acronym>BIND</acronym> 9.
14216                       </para>
14217                     </entry>
14218                   </row>
14219                   <row rowsep="0">
14220                     <entry colname="1">
14221                       <para><command>QryRecursion</command></para>
14222                     </entry>
14223                     <entry colname="2">
14224                       <para><command>RFwdQ</command></para>
14225                     </entry>
14226                     <entry colname="3">
14227                       <para>
14228                         Queries which caused the server
14229                         to perform recursion in order to find the final answer.
14230                         This corresponds to the
14231                         <command>recursion</command> counter
14232                         of previous versions of
14233                         <acronym>BIND</acronym> 9.
14234                       </para>
14235                     </entry>
14236                   </row>
14237                   <row rowsep="0">
14238                     <entry colname="1">
14239                       <para><command>QryDuplicate</command></para>
14240                     </entry>
14241                     <entry colname="2">
14242                       <para><command>RDupQ</command></para>
14243                     </entry>
14244                     <entry colname="3">
14245                       <para>
14246                         Queries which the server attempted to
14247                         recurse but discovered an existing query with the same
14248                         IP address, port, query ID, name, type and class
14249                         already being processed.
14250                         This corresponds to the
14251                         <command>duplicate</command> counter
14252                         of previous versions of
14253                         <acronym>BIND</acronym> 9.
14254                       </para>
14255                     </entry>
14256                   </row>
14257                   <row rowsep="0">
14258                     <entry colname="1">
14259                       <para><command>QryDropped</command></para>
14260                     </entry>
14261                     <entry colname="2">
14262                       <para><command></command></para>
14263                     </entry>
14264                     <entry colname="3">
14265                       <para>
14266                         Recursive queries for which the server
14267                         discovered an excessive number of existing
14268                         recursive queries for the same name, type and
14269                         class and were subsequently dropped.
14270                         This is the number of dropped queries due to
14271                         the reason explained with the
14272                         <command>clients-per-query</command>
14273                         and
14274                         <command>max-clients-per-query</command>
14275                         options
14276                         (see the description about
14277                         <xref linkend="clients-per-query"/>.)
14278                         This corresponds to the
14279                         <command>dropped</command> counter
14280                         of previous versions of
14281                         <acronym>BIND</acronym> 9.
14282                       </para>
14283                     </entry>
14284                   </row>
14285                   <row rowsep="0">
14286                     <entry colname="1">
14287                       <para><command>QryFailure</command></para>
14288                     </entry>
14289                     <entry colname="2">
14290                       <para><command></command></para>
14291                     </entry>
14292                     <entry colname="3">
14293                       <para>
14294                         Other query failures.
14295                         This corresponds to the
14296                         <command>failure</command> counter
14297                         of previous versions of
14298                         <acronym>BIND</acronym> 9.
14299                         Note: this counter is provided mainly for
14300                         backward compatibility with the previous versions.
14301                         Normally a more fine-grained counters such as
14302                         <command>AuthQryRej</command> and
14303                         <command>RecQryRej</command>
14304                         that would also fall into this counter are provided,
14305                         and so this counter would not be of much
14306                         interest in practice.
14307                       </para>
14308                     </entry>
14309                   </row>
14310                   <row rowsep="0">
14311                     <entry colname="1">
14312                       <para><command>XfrReqDone</command></para>
14313                     </entry>
14314                     <entry colname="2">
14315                       <para><command></command></para>
14316                     </entry>
14317                     <entry colname="3">
14318                       <para>
14319                         Requested zone transfers completed.
14320                       </para>
14321                     </entry>
14322                   </row>
14323                   <row rowsep="0">
14324                     <entry colname="1">
14325                       <para><command>UpdateReqFwd</command></para>
14326                     </entry>
14327                     <entry colname="2">
14328                       <para><command></command></para>
14329                     </entry>
14330                     <entry colname="3">
14331                       <para>
14332                         Update requests forwarded.
14333                       </para>
14334                     </entry>
14335                   </row>
14336                   <row rowsep="0">
14337                     <entry colname="1">
14338                       <para><command>UpdateRespFwd</command></para>
14339                     </entry>
14340                     <entry colname="2">
14341                       <para><command></command></para>
14342                     </entry>
14343                     <entry colname="3">
14344                       <para>
14345                         Update responses forwarded.
14346                       </para>
14347                     </entry>
14348                   </row>
14349                   <row rowsep="0">
14350                     <entry colname="1">
14351                       <para><command>UpdateFwdFail</command></para>
14352                     </entry>
14353                     <entry colname="2">
14354                       <para><command></command></para>
14355                     </entry>
14356                     <entry colname="3">
14357                       <para>
14358                         Dynamic update forward failed.
14359                       </para>
14360                     </entry>
14361                   </row>
14362                   <row rowsep="0">
14363                     <entry colname="1">
14364                       <para><command>UpdateDone</command></para>
14365                     </entry>
14366                     <entry colname="2">
14367                       <para><command></command></para>
14368                     </entry>
14369                     <entry colname="3">
14370                       <para>
14371                         Dynamic updates completed.
14372                       </para>
14373                     </entry>
14374                   </row>
14375                   <row rowsep="0">
14376                     <entry colname="1">
14377                       <para><command>UpdateFail</command></para>
14378                     </entry>
14379                     <entry colname="2">
14380                       <para><command></command></para>
14381                     </entry>
14382                     <entry colname="3">
14383                       <para>
14384                         Dynamic updates failed.
14385                       </para>
14386                     </entry>
14387                   </row>
14388                   <row rowsep="0">
14389                     <entry colname="1">
14390                       <para><command>UpdateBadPrereq</command></para>
14391                     </entry>
14392                     <entry colname="2">
14393                       <para><command></command></para>
14394                     </entry>
14395                     <entry colname="3">
14396                       <para>
14397                         Dynamic updates rejected due to prerequisite failure.
14398                       </para>
14399                     </entry>
14400                   </row>
14401                   <row rowsep="0">
14402                     <entry colname="1">
14403                       <para><command>RPZRewrites</command></para>
14404                     </entry>
14405                     <entry colname="2">
14406                       <para><command></command></para>
14407                     </entry>
14408                     <entry colname="3">
14409                       <para>
14410                         Response policy zone rewrites.
14411                       </para>
14412                     </entry>
14413                   </row>
14414                   <row rowsep="0">
14415                     <entry colname="1">
14416                       <para><command>RateDropped</command></para>
14417                     </entry>
14418                     <entry colname="2">
14419                       <para><command></command></para>
14420                     </entry>
14421                     <entry colname="3">
14422                       <para>
14423                         Responses dropped by rate limits.
14424                       </para>
14425                     </entry>
14426                   </row>
14427                   <row rowsep="0">
14428                     <entry colname="1">
14429                       <para><command>RateSlipped</command></para>
14430                     </entry>
14431                     <entry colname="2">
14432                       <para><command></command></para>
14433                     </entry>
14434                     <entry colname="3">
14435                       <para>
14436                         Responses truncated by rate limits.
14437                       </para>
14438                     </entry>
14439                   </row>
14440                 </tbody>
14441               </tgroup>
14442             </informaltable>
14443           </sect3>
14444
14445           <sect3>
14446             <title>Zone Maintenance Statistics Counters</title>
14447
14448             <informaltable colsep="0" rowsep="0">
14449               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
14450                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
14451                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
14452                 <tbody>
14453                   <row>
14454                     <entry colname="1">
14455                       <para>
14456                         <emphasis>Symbol</emphasis>
14457                       </para>
14458                     </entry>
14459                     <entry colname="2">
14460                       <para>
14461                         <emphasis>Description</emphasis>
14462                       </para>
14463                     </entry>
14464                   </row>
14465
14466                   <row rowsep="0">
14467                     <entry colname="1">
14468                       <para><command>NotifyOutv4</command></para>
14469                     </entry>
14470                     <entry colname="2">
14471                       <para>
14472                         IPv4 notifies sent.
14473                       </para>
14474                     </entry>
14475                   </row>
14476                   <row rowsep="0">
14477                     <entry colname="1">
14478                       <para><command>NotifyOutv6</command></para>
14479                     </entry>
14480                     <entry colname="2">
14481                       <para>
14482                         IPv6 notifies sent.
14483                       </para>
14484                     </entry>
14485                   </row>
14486                   <row rowsep="0">
14487                     <entry colname="1">
14488                       <para><command>NotifyInv4</command></para>
14489                     </entry>
14490                     <entry colname="2">
14491                       <para>
14492                         IPv4 notifies received.
14493                       </para>
14494                     </entry>
14495                   </row>
14496                   <row rowsep="0">
14497                     <entry colname="1">
14498                       <para><command>NotifyInv6</command></para>
14499                     </entry>
14500                     <entry colname="2">
14501                       <para>
14502                         IPv6 notifies received.
14503                       </para>
14504                     </entry>
14505                   </row>
14506                   <row rowsep="0">
14507                     <entry colname="1">
14508                       <para><command>NotifyRej</command></para>
14509                     </entry>
14510                     <entry colname="2">
14511                       <para>
14512                         Incoming notifies rejected.
14513                       </para>
14514                     </entry>
14515                   </row>
14516                   <row rowsep="0">
14517                     <entry colname="1">
14518                       <para><command>SOAOutv4</command></para>
14519                     </entry>
14520                     <entry colname="2">
14521                       <para>
14522                         IPv4 SOA queries sent.
14523                       </para>
14524                     </entry>
14525                   </row>
14526                   <row rowsep="0">
14527                     <entry colname="1">
14528                       <para><command>SOAOutv6</command></para>
14529                     </entry>
14530                     <entry colname="2">
14531                       <para>
14532                         IPv6 SOA queries sent.
14533                       </para>
14534                     </entry>
14535                   </row>
14536                   <row rowsep="0">
14537                     <entry colname="1">
14538                       <para><command>AXFRReqv4</command></para>
14539                     </entry>
14540                     <entry colname="2">
14541                       <para>
14542                         IPv4 AXFR requested.
14543                       </para>
14544                     </entry>
14545                   </row>
14546                   <row rowsep="0">
14547                     <entry colname="1">
14548                       <para><command>AXFRReqv6</command></para>
14549                     </entry>
14550                     <entry colname="2">
14551                       <para>
14552                         IPv6 AXFR requested.
14553                       </para>
14554                     </entry>
14555                   </row>
14556                   <row rowsep="0">
14557                     <entry colname="1">
14558                       <para><command>IXFRReqv4</command></para>
14559                     </entry>
14560                     <entry colname="2">
14561                       <para>
14562                         IPv4 IXFR requested.
14563                       </para>
14564                     </entry>
14565                   </row>
14566                   <row rowsep="0">
14567                     <entry colname="1">
14568                       <para><command>IXFRReqv6</command></para>
14569                     </entry>
14570                     <entry colname="2">
14571                       <para>
14572                         IPv6 IXFR requested.
14573                       </para>
14574                     </entry>
14575                   </row>
14576                   <row rowsep="0">
14577                     <entry colname="1">
14578                       <para><command>XfrSuccess</command></para>
14579                     </entry>
14580                     <entry colname="2">
14581                       <para>
14582                         Zone transfer requests succeeded.
14583                       </para>
14584                     </entry>
14585                   </row>
14586                   <row rowsep="0">
14587                     <entry colname="1">
14588                       <para><command>XfrFail</command></para>
14589                     </entry>
14590                     <entry colname="2">
14591                       <para>
14592                         Zone transfer requests failed.
14593                       </para>
14594                     </entry>
14595                   </row>
14596                 </tbody>
14597               </tgroup>
14598             </informaltable>
14599           </sect3>
14600
14601           <sect3>
14602             <title>Resolver Statistics Counters</title>
14603
14604             <informaltable colsep="0" rowsep="0">
14605               <tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
14606                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
14607                 <colspec colname="2" colnum="2" colsep="0" colwidth="1.150in"/>
14608                 <colspec colname="3" colnum="3" colsep="0" colwidth="3.350in"/>
14609                 <tbody>
14610                   <row>
14611                     <entry colname="1">
14612                       <para>
14613                         <emphasis>Symbol</emphasis>
14614                       </para>
14615                     </entry>
14616                     <entry colname="2">
14617                       <para>
14618                         <emphasis>BIND8 Symbol</emphasis>
14619                       </para>
14620                     </entry>
14621                     <entry colname="3">
14622                       <para>
14623                         <emphasis>Description</emphasis>
14624                       </para>
14625                     </entry>
14626                   </row>
14627
14628                   <row rowsep="0">
14629                     <entry colname="1">
14630                       <para><command>Queryv4</command></para>
14631                     </entry>
14632                     <entry colname="2">
14633                       <para><command>SFwdQ</command></para>
14634                     </entry>
14635                     <entry colname="3">
14636                       <para>
14637                         IPv4 queries sent.
14638                       </para>
14639                     </entry>
14640                   </row>
14641                   <row rowsep="0">
14642                     <entry colname="1">
14643                       <para><command>Queryv6</command></para>
14644                     </entry>
14645                     <entry colname="2">
14646                       <para><command>SFwdQ</command></para>
14647                     </entry>
14648                     <entry colname="3">
14649                       <para>
14650                         IPv6 queries sent.
14651                       </para>
14652                     </entry>
14653                   </row>
14654                   <row rowsep="0">
14655                     <entry colname="1">
14656                       <para><command>Responsev4</command></para>
14657                     </entry>
14658                     <entry colname="2">
14659                       <para><command>RR</command></para>
14660                     </entry>
14661                     <entry colname="3">
14662                       <para>
14663                         IPv4 responses received.
14664                       </para>
14665                     </entry>
14666                   </row>
14667                   <row rowsep="0">
14668                     <entry colname="1">
14669                       <para><command>Responsev6</command></para>
14670                     </entry>
14671                     <entry colname="2">
14672                       <para><command>RR</command></para>
14673                     </entry>
14674                     <entry colname="3">
14675                       <para>
14676                         IPv6 responses received.
14677                       </para>
14678                     </entry>
14679                   </row>
14680                   <row rowsep="0">
14681                     <entry colname="1">
14682                       <para><command>NXDOMAIN</command></para>
14683                     </entry>
14684                     <entry colname="2">
14685                       <para><command>RNXD</command></para>
14686                     </entry>
14687                     <entry colname="3">
14688                       <para>
14689                         NXDOMAIN received.
14690                       </para>
14691                     </entry>
14692                   </row>
14693                   <row rowsep="0">
14694                     <entry colname="1">
14695                       <para><command>SERVFAIL</command></para>
14696                     </entry>
14697                     <entry colname="2">
14698                       <para><command>RFail</command></para>
14699                     </entry>
14700                     <entry colname="3">
14701                       <para>
14702                         SERVFAIL received.
14703                       </para>
14704                     </entry>
14705                   </row>
14706                   <row rowsep="0">
14707                     <entry colname="1">
14708                       <para><command>FORMERR</command></para>
14709                     </entry>
14710                     <entry colname="2">
14711                       <para><command>RFErr</command></para>
14712                     </entry>
14713                     <entry colname="3">
14714                       <para>
14715                         FORMERR received.
14716                       </para>
14717                     </entry>
14718                   </row>
14719                   <row rowsep="0">
14720                     <entry colname="1">
14721                       <para><command>OtherError</command></para>
14722                     </entry>
14723                     <entry colname="2">
14724                       <para><command>RErr</command></para>
14725                     </entry>
14726                     <entry colname="3">
14727                       <para>
14728                         Other errors received.
14729                       </para>
14730                     </entry>
14731                   </row>
14732                   <row rowsep="0">
14733                     <entry colname="1">
14734                       <para><command>EDNS0Fail</command></para>
14735                                                  </entry>
14736                     <entry colname="2">
14737                       <para><command></command></para>
14738                     </entry>
14739                     <entry colname="3">
14740                       <para>
14741                         EDNS(0) query failures.
14742                       </para>
14743                     </entry>
14744                   </row>
14745                   <row rowsep="0">
14746                     <entry colname="1">
14747                       <para><command>Mismatch</command></para>
14748                     </entry>
14749                     <entry colname="2">
14750                       <para><command>RDupR</command></para>
14751                     </entry>
14752                     <entry colname="3">
14753                       <para>
14754                         Mismatch responses received.
14755                         The DNS ID, response's source address,
14756                         and/or the response's source port does not
14757                         match what was expected.
14758                         (The port must be 53 or as defined by
14759                         the <command>port</command> option.)
14760                         This may be an indication of a cache
14761                         poisoning attempt.
14762                       </para>
14763                     </entry>
14764                   </row>
14765                   <row rowsep="0">
14766                     <entry colname="1">
14767                       <para><command>Truncated</command></para>
14768                     </entry>
14769                     <entry colname="2">
14770                       <para><command></command></para>
14771                     </entry>
14772                     <entry colname="3">
14773                       <para>
14774                         Truncated responses received.
14775                       </para>
14776                     </entry>
14777                   </row>
14778                   <row rowsep="0">
14779                     <entry colname="1">
14780                       <para><command>Lame</command></para>
14781                     </entry>
14782                     <entry colname="2">
14783                       <para><command>RLame</command></para>
14784                     </entry>
14785                     <entry colname="3">
14786                       <para>
14787                         Lame delegations received.
14788                       </para>
14789                     </entry>
14790                   </row>
14791                   <row rowsep="0">
14792                     <entry colname="1">
14793                       <para><command>Retry</command></para>
14794                     </entry>
14795                     <entry colname="2">
14796                       <para><command>SDupQ</command></para>
14797                     </entry>
14798                     <entry colname="3">
14799                       <para>
14800                         Query retries performed.
14801                       </para>
14802                     </entry>
14803                   </row>
14804                   <row rowsep="0">
14805                     <entry colname="1">
14806                       <para><command>QueryAbort</command></para>
14807                     </entry>
14808                     <entry colname="2">
14809                       <para><command></command></para>
14810                     </entry>
14811                     <entry colname="3">
14812                       <para>
14813                         Queries aborted due to quota control.
14814                       </para>
14815                     </entry>
14816                   </row>
14817                   <row rowsep="0">
14818                     <entry colname="1">
14819                       <para><command>QuerySockFail</command></para>
14820                     </entry>
14821                     <entry colname="2">
14822                       <para><command></command></para>
14823                     </entry>
14824                     <entry colname="3">
14825                       <para>
14826                         Failures in opening query sockets.
14827                         One common reason for such failures is a
14828                         failure of opening a new socket due to a
14829                         limitation on file descriptors.
14830                       </para>
14831                     </entry>
14832                   </row>
14833                   <row rowsep="0">
14834                     <entry colname="1">
14835                       <para><command>QueryTimeout</command></para>
14836                     </entry>
14837                     <entry colname="2">
14838                       <para><command></command></para>
14839                     </entry>
14840                     <entry colname="3">
14841                       <para>
14842                         Query timeouts.
14843                       </para>
14844                     </entry>
14845                   </row>
14846                   <row rowsep="0">
14847                     <entry colname="1">
14848                       <para><command>GlueFetchv4</command></para>
14849                     </entry>
14850                     <entry colname="2">
14851                       <para><command>SSysQ</command></para>
14852                     </entry>
14853                     <entry colname="3">
14854                       <para>
14855                         IPv4 NS address fetches invoked.
14856                       </para>
14857                     </entry>
14858                   </row>
14859                   <row rowsep="0">
14860                     <entry colname="1">
14861                       <para><command>GlueFetchv6</command></para>
14862                     </entry>
14863                     <entry colname="2">
14864                       <para><command>SSysQ</command></para>
14865                     </entry>
14866                     <entry colname="3">
14867                       <para>
14868                         IPv6 NS address fetches invoked.
14869                       </para>
14870                     </entry>
14871                   </row>
14872                   <row rowsep="0">
14873                     <entry colname="1">
14874                       <para><command>GlueFetchv4Fail</command></para>
14875                     </entry>
14876                     <entry colname="2">
14877                       <para><command></command></para>
14878                     </entry>
14879                     <entry colname="3">
14880                       <para>
14881                         IPv4 NS address fetch failed.
14882                       </para>
14883                     </entry>
14884                   </row>
14885                   <row rowsep="0">
14886                     <entry colname="1">
14887                       <para><command>GlueFetchv6Fail</command></para>
14888                     </entry>
14889                     <entry colname="2">
14890                       <para><command></command></para>
14891                     </entry>
14892                     <entry colname="3">
14893                       <para>
14894                         IPv6 NS address fetch failed.
14895                       </para>
14896                     </entry>
14897                   </row>
14898                   <row rowsep="0">
14899                     <entry colname="1">
14900                       <para><command>ValAttempt</command></para>
14901                     </entry>
14902                     <entry colname="2">
14903                       <para><command></command></para>
14904                     </entry>
14905                     <entry colname="3">
14906                       <para>
14907                         DNSSEC validation attempted.
14908                       </para>
14909                     </entry>
14910                   </row>
14911                   <row rowsep="0">
14912                     <entry colname="1">
14913                       <para><command>ValOk</command></para>
14914                     </entry>
14915                     <entry colname="2">
14916                       <para><command></command></para>
14917                     </entry>
14918                     <entry colname="3">
14919                       <para>
14920                         DNSSEC validation succeeded.
14921                       </para>
14922                     </entry>
14923                   </row>
14924                   <row rowsep="0">
14925                     <entry colname="1">
14926                       <para><command>ValNegOk</command></para>
14927                     </entry>
14928                     <entry colname="2">
14929                       <para><command></command></para>
14930                     </entry>
14931                     <entry colname="3">
14932                       <para>
14933                         DNSSEC validation on negative information succeeded.
14934                       </para>
14935                     </entry>
14936                   </row>
14937                   <row rowsep="0">
14938                     <entry colname="1">
14939                       <para><command>ValFail</command></para>
14940                     </entry>
14941                     <entry colname="2">
14942                       <para><command></command></para>
14943                     </entry>
14944                     <entry colname="3">
14945                       <para>
14946                         DNSSEC validation failed.
14947                       </para>
14948                     </entry>
14949                   </row>
14950                   <row rowsep="0">
14951                     <entry colname="1">
14952                       <para><command>QryRTTnn</command></para>
14953                     </entry>
14954                     <entry colname="2">
14955                       <para><command></command></para>
14956                     </entry>
14957                     <entry colname="3">
14958                       <para>
14959                         Frequency table on round trip times (RTTs) of
14960                         queries.
14961                         Each <command>nn</command> specifies the corresponding
14962                         frequency.
14963                         In the sequence of
14964                         <command>nn_1</command>,
14965                         <command>nn_2</command>,
14966                         ...,
14967                         <command>nn_m</command>,
14968                         the value of <command>nn_i</command> is the
14969                         number of queries whose RTTs are between
14970                         <command>nn_(i-1)</command> (inclusive) and
14971                         <command>nn_i</command> (exclusive) milliseconds.
14972                         For the sake of convenience we define
14973                         <command>nn_0</command> to be 0.
14974                         The last entry should be represented as
14975                         <command>nn_m+</command>, which means the
14976                         number of queries whose RTTs are equal to or over
14977                         <command>nn_m</command> milliseconds.
14978                       </para>
14979                     </entry>
14980                   </row>
14981                 </tbody>
14982               </tgroup>
14983             </informaltable>
14984
14985           </sect3>
14986
14987           <sect3>
14988             <title>Socket I/O Statistics Counters</title>
14989
14990             <para>
14991               Socket I/O statistics counters are defined per socket
14992               types, which are
14993               <command>UDP4</command> (UDP/IPv4),
14994               <command>UDP6</command> (UDP/IPv6),
14995               <command>TCP4</command> (TCP/IPv4),
14996               <command>TCP6</command> (TCP/IPv6),
14997               <command>Unix</command> (Unix Domain), and
14998               <command>FDwatch</command> (sockets opened outside the
14999               socket module).
15000               In the following table <command>&lt;TYPE&gt;</command>
15001               represents a socket type.
15002               Not all counters are available for all socket types;
15003               exceptions are noted in the description field.
15004             </para>
15005
15006             <informaltable colsep="0" rowsep="0">
15007               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
15008                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
15009                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
15010                 <tbody>
15011                   <row>
15012                     <entry colname="1">
15013                       <para>
15014                         <emphasis>Symbol</emphasis>
15015                       </para>
15016                     </entry>
15017                     <entry colname="2">
15018                       <para>
15019                         <emphasis>Description</emphasis>
15020                       </para>
15021                     </entry>
15022                   </row>
15023
15024                   <row rowsep="0">
15025                     <entry colname="1">
15026                       <para><command>&lt;TYPE&gt;Open</command></para>
15027                     </entry>
15028                     <entry colname="2">
15029                       <para>
15030                         Sockets opened successfully.
15031                         This counter is not applicable to the
15032                         <command>FDwatch</command> type.
15033                       </para>
15034                     </entry>
15035                   </row>
15036                   <row rowsep="0">
15037                     <entry colname="1">
15038                       <para><command>&lt;TYPE&gt;OpenFail</command></para>
15039                     </entry>
15040                     <entry colname="2">
15041                       <para>
15042                         Failures of opening sockets.
15043                         This counter is not applicable to the
15044                         <command>FDwatch</command> type.
15045                       </para>
15046                     </entry>
15047                   </row>
15048                   <row rowsep="0">
15049                     <entry colname="1">
15050                       <para><command>&lt;TYPE&gt;Close</command></para>
15051                     </entry>
15052                     <entry colname="2">
15053                       <para>
15054                         Sockets closed.
15055                       </para>
15056                     </entry>
15057                   </row>
15058                   <row rowsep="0">
15059                     <entry colname="1">
15060                       <para><command>&lt;TYPE&gt;BindFail</command></para>
15061                     </entry>
15062                     <entry colname="2">
15063                       <para>
15064                         Failures of binding sockets.
15065                       </para>
15066                     </entry>
15067                   </row>
15068                   <row rowsep="0">
15069                     <entry colname="1">
15070                       <para><command>&lt;TYPE&gt;ConnFail</command></para>
15071                     </entry>
15072                     <entry colname="2">
15073                       <para>
15074                         Failures of connecting sockets.
15075                       </para>
15076                     </entry>
15077                   </row>
15078                   <row rowsep="0">
15079                     <entry colname="1">
15080                       <para><command>&lt;TYPE&gt;Conn</command></para>
15081                     </entry>
15082                     <entry colname="2">
15083                       <para>
15084                         Connections established successfully.
15085                       </para>
15086                     </entry>
15087                   </row>
15088                   <row rowsep="0">
15089                     <entry colname="1">
15090                       <para><command>&lt;TYPE&gt;AcceptFail</command></para>
15091                     </entry>
15092                     <entry colname="2">
15093                       <para>
15094                         Failures of accepting incoming connection requests.
15095                         This counter is not applicable to the
15096                         <command>UDP</command> and
15097                         <command>FDwatch</command> types.
15098                       </para>
15099                     </entry>
15100                   </row>
15101                   <row rowsep="0">
15102                     <entry colname="1">
15103                       <para><command>&lt;TYPE&gt;Accept</command></para>
15104                     </entry>
15105                     <entry colname="2">
15106                       <para>
15107                         Incoming connections successfully accepted.
15108                         This counter is not applicable to the
15109                         <command>UDP</command> and
15110                         <command>FDwatch</command> types.
15111                       </para>
15112                     </entry>
15113                   </row>
15114                   <row rowsep="0">
15115                     <entry colname="1">
15116                       <para><command>&lt;TYPE&gt;SendErr</command></para>
15117                     </entry>
15118                     <entry colname="2">
15119                       <para>
15120                         Errors in socket send operations.
15121                         This counter corresponds
15122                         to <command>SErr</command> counter of
15123                         <command>BIND</command> 8.
15124                       </para>
15125                     </entry>
15126                   </row>
15127                   <row rowsep="0">
15128                     <entry colname="1">
15129                       <para><command>&lt;TYPE&gt;RecvErr</command></para>
15130                     </entry>
15131                     <entry colname="2">
15132                       <para>
15133                         Errors in socket receive operations.
15134                         This includes errors of send operations on a
15135                         connected UDP socket notified by an ICMP error
15136                         message.
15137                       </para>
15138                     </entry>
15139                   </row>
15140                 </tbody>
15141               </tgroup>
15142             </informaltable>
15143           </sect3>
15144           <sect3>
15145             <title>Compatibility with <emphasis>BIND</emphasis> 8 Counters</title>
15146             <para>
15147               Most statistics counters that were available
15148               in <command>BIND</command> 8 are also supported in
15149               <command>BIND</command> 9 as shown in the above tables.
15150               Here are notes about other counters that do not appear
15151               in these tables.
15152             </para>
15153
15154             <variablelist>
15155               <varlistentry>
15156                 <term><command>RFwdR,SFwdR</command></term>
15157                 <listitem>
15158                   <para>
15159                     These counters are not supported
15160                     because <command>BIND</command> 9 does not adopt
15161                     the notion of <emphasis>forwarding</emphasis>
15162                     as <command>BIND</command> 8 did.
15163                   </para>
15164                 </listitem>
15165               </varlistentry>
15166
15167               <varlistentry>
15168                 <term><command>RAXFR</command></term>
15169                 <listitem>
15170                   <para>
15171                     This counter is accessible in the Incoming Queries section.
15172                   </para>
15173                 </listitem>
15174               </varlistentry>
15175
15176               <varlistentry>
15177                 <term><command>RIQ</command></term>
15178                 <listitem>
15179                   <para>
15180                     This counter is accessible in the Incoming Requests section.
15181                   </para>
15182                 </listitem>
15183               </varlistentry>
15184
15185               <varlistentry>
15186                 <term><command>ROpts</command></term>
15187                 <listitem>
15188                   <para>
15189                     This counter is not supported
15190                     because <command>BIND</command> 9 does not care
15191                     about IP options in the first place.
15192                   </para>
15193                 </listitem>
15194               </varlistentry>
15195             </variablelist>
15196           </sect3>
15197         </sect2>
15198       </sect1>
15199
15200     </chapter>
15201     <chapter id="Bv9ARM.ch07">
15202       <title><acronym>BIND</acronym> 9 Security Considerations</title>
15203       <sect1 id="Access_Control_Lists">
15204         <title>Access Control Lists</title>
15205         <para>
15206           Access Control Lists (ACLs) are address match lists that
15207           you can set up and nickname for future use in <command>allow-notify</command>,
15208           <command>allow-query</command>, <command>allow-query-on</command>,
15209           <command>allow-recursion</command>, <command>allow-recursion-on</command>,
15210           <command>blackhole</command>, <command>allow-transfer</command>,
15211           etc.
15212         </para>
15213         <para>
15214           Using ACLs allows you to have finer control over who can access
15215           your name server, without cluttering up your config files with huge
15216           lists of IP addresses.
15217         </para>
15218         <para>
15219           It is a <emphasis>good idea</emphasis> to use ACLs, and to
15220           control access to your server. Limiting access to your server by
15221           outside parties can help prevent spoofing and denial of service (DoS) attacks against
15222           your server.
15223         </para>
15224         <para>
15225           Here is an example of how to properly apply ACLs:
15226         </para>
15227
15228 <programlisting>
15229 // Set up an ACL named "bogusnets" that will block
15230 // RFC1918 space and some reserved space, which is
15231 // commonly used in spoofing attacks.
15232 acl bogusnets {
15233         0.0.0.0/8;  192.0.2.0/24; 224.0.0.0/3;
15234         10.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16;
15235 };
15236
15237 // Set up an ACL called our-nets. Replace this with the
15238 // real IP numbers.
15239 acl our-nets { x.x.x.x/24; x.x.x.x/21; };
15240 options {
15241   ...
15242   ...
15243   allow-query { our-nets; };
15244   allow-recursion { our-nets; };
15245   ...
15246   blackhole { bogusnets; };
15247   ...
15248 };
15249
15250 zone "example.com" {
15251   type master;
15252   file "m/example.com";
15253   allow-query { any; };
15254 };
15255 </programlisting>
15256
15257         <para>
15258           This allows recursive queries of the server from the outside
15259           unless recursion has been previously disabled.
15260         </para>
15261       </sect1>
15262       <sect1>
15263         <title><command>Chroot</command> and <command>Setuid</command></title>
15264         <para>
15265           On UNIX servers, it is possible to run <acronym>BIND</acronym>
15266           in a <emphasis>chrooted</emphasis> environment (using
15267           the <command>chroot()</command> function) by specifying
15268           the "<option>-t</option>" option for <command>named</command>.
15269           This can help improve system security by placing
15270           <acronym>BIND</acronym> in a "sandbox", which will limit
15271           the damage done if a server is compromised.
15272         </para>
15273         <para>
15274           Another useful feature in the UNIX version of <acronym>BIND</acronym> is the
15275           ability to run the daemon as an unprivileged user ( <option>-u</option> <replaceable>user</replaceable> ).
15276           We suggest running as an unprivileged user when using the <command>chroot</command> feature.
15277         </para>
15278         <para>
15279           Here is an example command line to load <acronym>BIND</acronym> in a <command>chroot</command> sandbox,
15280           <command>/var/named</command>, and to run <command>named</command> <command>setuid</command> to
15281           user 202:
15282         </para>
15283         <para>
15284           <userinput>/usr/local/sbin/named -u 202 -t /var/named</userinput>
15285         </para>
15286
15287         <sect2>
15288           <title>The <command>chroot</command> Environment</title>
15289
15290           <para>
15291             In order for a <command>chroot</command> environment
15292             to
15293             work properly in a particular directory
15294             (for example, <filename>/var/named</filename>),
15295             you will need to set up an environment that includes everything
15296             <acronym>BIND</acronym> needs to run.
15297             From <acronym>BIND</acronym>'s point of view, <filename>/var/named</filename> is
15298             the root of the filesystem.  You will need to adjust the values of
15299             options like
15300             like <command>directory</command> and <command>pid-file</command> to account
15301             for this.
15302           </para>
15303           <para>
15304             Unlike with earlier versions of BIND, you typically will
15305             <emphasis>not</emphasis> need to compile <command>named</command>
15306             statically nor install shared libraries under the new root.
15307             However, depending on your operating system, you may need
15308             to set up things like
15309             <filename>/dev/zero</filename>,
15310             <filename>/dev/random</filename>,
15311             <filename>/dev/log</filename>, and
15312             <filename>/etc/localtime</filename>.
15313           </para>
15314         </sect2>
15315
15316         <sect2>
15317           <title>Using the <command>setuid</command> Function</title>
15318
15319           <para>
15320             Prior to running the <command>named</command> daemon,
15321             use
15322             the <command>touch</command> utility (to change file
15323             access and
15324             modification times) or the <command>chown</command>
15325             utility (to
15326             set the user id and/or group id) on files
15327             to which you want <acronym>BIND</acronym>
15328             to write.
15329           </para>
15330           <note>
15331             Note that if the <command>named</command> daemon is running as an
15332             unprivileged user, it will not be able to bind to new restricted
15333             ports if the server is reloaded.
15334           </note>
15335         </sect2>
15336       </sect1>
15337
15338       <sect1 id="dynamic_update_security">
15339         <title>Dynamic Update Security</title>
15340
15341         <para>
15342           Access to the dynamic
15343           update facility should be strictly limited.  In earlier versions of
15344           <acronym>BIND</acronym>, the only way to do this was
15345           based on the IP
15346           address of the host requesting the update, by listing an IP address
15347           or
15348           network prefix in the <command>allow-update</command>
15349           zone option.
15350           This method is insecure since the source address of the update UDP
15351           packet
15352           is easily forged.  Also note that if the IP addresses allowed by the
15353           <command>allow-update</command> option include the
15354           address of a slave
15355           server which performs forwarding of dynamic updates, the master can
15356           be
15357           trivially attacked by sending the update to the slave, which will
15358           forward it to the master with its own source IP address causing the
15359           master to approve it without question.
15360         </para>
15361
15362         <para>
15363           For these reasons, we strongly recommend that updates be
15364           cryptographically authenticated by means of transaction signatures
15365           (TSIG).  That is, the <command>allow-update</command>
15366           option should
15367           list only TSIG key names, not IP addresses or network
15368           prefixes. Alternatively, the new <command>update-policy</command>
15369           option can be used.
15370         </para>
15371
15372         <para>
15373           Some sites choose to keep all dynamically-updated DNS data
15374           in a subdomain and delegate that subdomain to a separate zone. This
15375           way, the top-level zone containing critical data such as the IP
15376           addresses
15377           of public web and mail servers need not allow dynamic update at
15378           all.
15379         </para>
15380
15381       </sect1>
15382     </chapter>
15383
15384     <chapter id="Bv9ARM.ch08">
15385       <title>Troubleshooting</title>
15386       <sect1>
15387         <title>Common Problems</title>
15388         <sect2>
15389           <title>It's not working; how can I figure out what's wrong?</title>
15390
15391           <para>
15392             The best solution to solving installation and
15393             configuration issues is to take preventative measures by setting
15394             up logging files beforehand. The log files provide a
15395             source of hints and information that can be used to figure out
15396             what went wrong and how to fix the problem.
15397           </para>
15398
15399         </sect2>
15400       </sect1>
15401       <sect1>
15402         <title>Incrementing and Changing the Serial Number</title>
15403
15404         <para>
15405           Zone serial numbers are just numbers &mdash; they aren't
15406           date related.  A lot of people set them to a number that
15407           represents a date, usually of the form YYYYMMDDRR.
15408           Occasionally they will make a mistake and set them to a
15409           "date in the future" then try to correct them by setting
15410           them to the "current date".  This causes problems because
15411           serial numbers are used to indicate that a zone has been
15412           updated.  If the serial number on the slave server is
15413           lower than the serial number on the master, the slave
15414           server will attempt to update its copy of the zone.
15415         </para>
15416
15417         <para>
15418           Setting the serial number to a lower number on the master
15419           server than the slave server means that the slave will not perform
15420           updates to its copy of the zone.
15421         </para>
15422
15423         <para>
15424           The solution to this is to add 2147483647 (2^31-1) to the
15425           number, reload the zone and make sure all slaves have updated to
15426           the new zone serial number, then reset the number to what you want
15427           it to be, and reload the zone again.
15428         </para>
15429
15430       </sect1>
15431       <sect1>
15432         <title>Where Can I Get Help?</title>
15433
15434         <para>
15435           The Internet Systems Consortium
15436           (<acronym>ISC</acronym>) offers a wide range
15437           of support and service agreements for <acronym>BIND</acronym> and <acronym>DHCP</acronym> servers. Four
15438           levels of premium support are available and each level includes
15439           support for all <acronym>ISC</acronym> programs,
15440           significant discounts on products
15441           and training, and a recognized priority on bug fixes and
15442           non-funded feature requests. In addition, <acronym>ISC</acronym> offers a standard
15443           support agreement package which includes services ranging from bug
15444           fix announcements to remote support. It also includes training in
15445           <acronym>BIND</acronym> and <acronym>DHCP</acronym>.
15446         </para>
15447
15448         <para>
15449           To discuss arrangements for support, contact
15450           <ulink url="mailto:info@isc.org">info@isc.org</ulink> or visit the
15451           <acronym>ISC</acronym> web page at
15452           <ulink url="http://www.isc.org/services/support/"
15453                      >http://www.isc.org/services/support/</ulink>
15454           to read more.
15455         </para>
15456       </sect1>
15457     </chapter>
15458     <appendix id="Bv9ARM.ch09">
15459       <title>Appendices</title>
15460       <sect1>
15461         <title>Acknowledgments</title>
15462         <sect2 id="historical_dns_information">
15463           <title>A Brief History of the <acronym>DNS</acronym> and <acronym>BIND</acronym></title>
15464
15465           <para>
15466             Although the "official" beginning of the Domain Name
15467             System occurred in 1984 with the publication of RFC 920, the
15468             core of the new system was described in 1983 in RFCs 882 and
15469             883. From 1984 to 1987, the ARPAnet (the precursor to today's
15470             Internet) became a testbed of experimentation for developing the
15471             new naming/addressing scheme in a rapidly expanding,
15472             operational network environment.  New RFCs were written and
15473             published in 1987 that modified the original documents to
15474             incorporate improvements based on the working model. RFC 1034,
15475             "Domain Names-Concepts and Facilities", and RFC 1035, "Domain
15476             Names-Implementation and Specification" were published and
15477             became the standards upon which all <acronym>DNS</acronym> implementations are
15478             built.
15479           </para>
15480
15481           <para>
15482             The first working domain name server, called "Jeeves", was
15483             written in 1983-84 by Paul Mockapetris for operation on DEC
15484             Tops-20
15485             machines located at the University of Southern California's
15486             Information
15487             Sciences Institute (USC-ISI) and SRI International's Network
15488             Information
15489             Center (SRI-NIC). A <acronym>DNS</acronym> server for
15490             Unix machines, the Berkeley Internet
15491             Name Domain (<acronym>BIND</acronym>) package, was
15492             written soon after by a group of
15493             graduate students at the University of California at Berkeley
15494             under
15495             a grant from the US Defense Advanced Research Projects
15496             Administration
15497             (DARPA).
15498           </para>
15499           <para>
15500             Versions of <acronym>BIND</acronym> through
15501             4.8.3 were maintained by the Computer
15502             Systems Research Group (CSRG) at UC Berkeley. Douglas Terry, Mark
15503             Painter, David Riggle and Songnian Zhou made up the initial <acronym>BIND</acronym>
15504             project team. After that, additional work on the software package
15505             was done by Ralph Campbell. Kevin Dunlap, a Digital Equipment
15506             Corporation
15507             employee on loan to the CSRG, worked on <acronym>BIND</acronym> for 2 years, from 1985
15508             to 1987. Many other people also contributed to <acronym>BIND</acronym> development
15509             during that time: Doug Kingston, Craig Partridge, Smoot
15510             Carl-Mitchell,
15511             Mike Muuss, Jim Bloom and Mike Schwartz. <acronym>BIND</acronym> maintenance was subsequently
15512             handled by Mike Karels and &#216;ivind Kure.
15513           </para>
15514           <para>
15515             <acronym>BIND</acronym> versions 4.9 and 4.9.1 were
15516             released by Digital Equipment
15517             Corporation (now Compaq Computer Corporation). Paul Vixie, then
15518             a DEC employee, became <acronym>BIND</acronym>'s
15519             primary caretaker. He was assisted
15520             by Phil Almquist, Robert Elz, Alan Barrett, Paul Albitz, Bryan
15521             Beecher, Andrew
15522             Partan, Andy Cherenson, Tom Limoncelli, Berthold Paffrath, Fuat
15523             Baran, Anant Kumar, Art Harkin, Win Treese, Don Lewis, Christophe
15524             Wolfhugel, and others.
15525           </para>
15526           <para>
15527             In 1994, <acronym>BIND</acronym> version 4.9.2 was sponsored by
15528             Vixie Enterprises. Paul
15529             Vixie became <acronym>BIND</acronym>'s principal
15530             architect/programmer.
15531           </para>
15532           <para>
15533             <acronym>BIND</acronym> versions from 4.9.3 onward
15534             have been developed and maintained
15535             by the Internet Systems Consortium and its predecessor,
15536             the Internet Software Consortium,  with support being provided
15537             by ISC's sponsors.
15538           </para>
15539           <para>
15540             As co-architects/programmers, Bob Halley and
15541             Paul Vixie released the first production-ready version of
15542             <acronym>BIND</acronym> version 8 in May 1997.
15543           </para>
15544           <para>
15545             BIND version 9 was released in September 2000 and is a
15546             major rewrite of nearly all aspects of the underlying
15547             BIND architecture.
15548           </para>
15549           <para>
15550             BIND versions 4 and 8 are officially deprecated.
15551             No additional development is done
15552             on BIND version 4 or BIND version 8.
15553           </para>
15554           <para>
15555             <acronym>BIND</acronym> development work is made
15556             possible today by the sponsorship
15557             of several corporations, and by the tireless work efforts of
15558             numerous individuals.
15559           </para>
15560         </sect2>
15561       </sect1>
15562       <sect1>
15563         <title>General <acronym>DNS</acronym> Reference Information</title>
15564         <sect2 id="ipv6addresses">
15565           <title>IPv6 addresses (AAAA)</title>
15566           <para>
15567             IPv6 addresses are 128-bit identifiers for interfaces and
15568             sets of interfaces which were introduced in the <acronym>DNS</acronym> to facilitate
15569             scalable Internet routing. There are three types of addresses: <emphasis>Unicast</emphasis>,
15570             an identifier for a single interface;
15571             <emphasis>Anycast</emphasis>,
15572             an identifier for a set of interfaces; and <emphasis>Multicast</emphasis>,
15573             an identifier for a set of interfaces. Here we describe the global
15574             Unicast address scheme. For more information, see RFC 3587,
15575             "Global Unicast Address Format."
15576           </para>
15577           <para>
15578             IPv6 unicast addresses consist of a
15579             <emphasis>global routing prefix</emphasis>, a
15580             <emphasis>subnet identifier</emphasis>, and an
15581             <emphasis>interface identifier</emphasis>.
15582           </para>
15583           <para>
15584             The global routing prefix is provided by the
15585             upstream provider or ISP, and (roughly) corresponds to the
15586             IPv4 <emphasis>network</emphasis> section
15587             of the address range.
15588
15589             The subnet identifier is for local subnetting, much the
15590             same as subnetting an
15591             IPv4 /16 network into /24 subnets.
15592
15593             The interface identifier is the address of an individual
15594             interface on a given network; in IPv6, addresses belong to
15595             interfaces rather than to machines.
15596           </para>
15597           <para>
15598             The subnetting capability of IPv6 is much more flexible than
15599             that of IPv4: subnetting can be carried out on bit boundaries,
15600             in much the same way as Classless InterDomain Routing
15601             (CIDR), and the DNS PTR representation ("nibble" format)
15602             makes setting up reverse zones easier.
15603           </para>
15604           <para>
15605             The Interface Identifier must be unique on the local link,
15606             and is usually generated automatically by the IPv6
15607             implementation, although it is usually possible to
15608             override the default setting if necessary.  A typical IPv6
15609             address might look like:
15610             <command>2001:db8:201:9:a00:20ff:fe81:2b32</command>
15611           </para>
15612           <para>
15613             IPv6 address specifications often contain long strings
15614             of zeros, so the architects have included a shorthand for
15615             specifying
15616             them. The double colon (`::') indicates the longest possible
15617             string
15618             of zeros that can fit, and can be used only once in an address.
15619           </para>
15620         </sect2>
15621       </sect1>
15622       <sect1 id="bibliography">
15623         <title>Bibliography (and Suggested Reading)</title>
15624         <sect2 id="rfcs">
15625           <title>Request for Comments (RFCs)</title>
15626           <para>
15627             Specification documents for the Internet protocol suite, including
15628             the <acronym>DNS</acronym>, are published as part of
15629             the Request for Comments (RFCs)
15630             series of technical notes. The standards themselves are defined
15631             by the Internet Engineering Task Force (IETF) and the Internet
15632             Engineering Steering Group (IESG). RFCs can be obtained online via FTP at:
15633           </para>
15634           <para>
15635             <ulink url="ftp://www.isi.edu/in-notes/">
15636               ftp://www.isi.edu/in-notes/RFC<replaceable>xxxx</replaceable>.txt
15637             </ulink>
15638           </para>
15639           <para>
15640             (where <replaceable>xxxx</replaceable> is
15641             the number of the RFC). RFCs are also available via the Web at:
15642           </para>
15643           <para>
15644             <ulink url="http://www.ietf.org/rfc/"
15645                        >http://www.ietf.org/rfc/</ulink>.
15646           </para>
15647           <bibliography>
15648             <bibliodiv>
15649               <!-- one of (BIBLIOENTRY BIBLIOMIXED) -->
15650               <title>Standards</title>
15651               <biblioentry>
15652                 <abbrev>RFC974</abbrev>
15653                 <author>
15654                   <surname>Partridge</surname>
15655                   <firstname>C.</firstname>
15656                 </author>
15657                 <title>Mail Routing and the Domain System</title>
15658                 <pubdate>January 1986</pubdate>
15659               </biblioentry>
15660               <biblioentry>
15661                 <abbrev>RFC1034</abbrev>
15662                 <author>
15663                   <surname>Mockapetris</surname>
15664                   <firstname>P.V.</firstname>
15665                 </author>
15666                 <title>Domain Names &mdash; Concepts and Facilities</title>
15667                 <pubdate>November 1987</pubdate>
15668               </biblioentry>
15669               <biblioentry>
15670                 <abbrev>RFC1035</abbrev>
15671                 <author>
15672                   <surname>Mockapetris</surname>
15673                   <firstname>P. V.</firstname>
15674                   </author> <title>Domain Names &mdash; Implementation and
15675                   Specification</title>
15676                 <pubdate>November 1987</pubdate>
15677               </biblioentry>
15678             </bibliodiv>
15679             <bibliodiv id="proposed_standards" xreflabel="Proposed Standards">
15680
15681               <title>Proposed Standards</title>
15682               <!-- one of (BIBLIOENTRY BIBLIOMIXED) -->
15683               <biblioentry>
15684                 <abbrev>RFC2181</abbrev>
15685                 <author>
15686                   <surname>Elz</surname>
15687                   <firstname>R., R. Bush</firstname>
15688                 </author>
15689                 <title>Clarifications to the <acronym>DNS</acronym>
15690                   Specification</title>
15691                 <pubdate>July 1997</pubdate>
15692               </biblioentry>
15693               <biblioentry>
15694                 <abbrev>RFC2308</abbrev>
15695                 <author>
15696                   <surname>Andrews</surname>
15697                   <firstname>M.</firstname>
15698                 </author>
15699                 <title>Negative Caching of <acronym>DNS</acronym>
15700                   Queries</title>
15701                 <pubdate>March 1998</pubdate>
15702               </biblioentry>
15703               <biblioentry>
15704                 <abbrev>RFC1995</abbrev>
15705                 <author>
15706                   <surname>Ohta</surname>
15707                   <firstname>M.</firstname>
15708                 </author>
15709                 <title>Incremental Zone Transfer in <acronym>DNS</acronym></title>
15710                 <pubdate>August 1996</pubdate>
15711               </biblioentry>
15712               <biblioentry>
15713                 <abbrev>RFC1996</abbrev>
15714                 <author>
15715                   <surname>Vixie</surname>
15716                   <firstname>P.</firstname>
15717                 </author>
15718                 <title>A Mechanism for Prompt Notification of Zone Changes</title>
15719                 <pubdate>August 1996</pubdate>
15720               </biblioentry>
15721               <biblioentry>
15722                 <abbrev>RFC2136</abbrev>
15723                 <authorgroup>
15724                   <author>
15725                     <surname>Vixie</surname>
15726                     <firstname>P.</firstname>
15727                   </author>
15728                   <author>
15729                     <firstname>S.</firstname>
15730                     <surname>Thomson</surname>
15731                   </author>
15732                   <author>
15733                     <firstname>Y.</firstname>
15734                     <surname>Rekhter</surname>
15735                   </author>
15736                   <author>
15737                     <firstname>J.</firstname>
15738                     <surname>Bound</surname>
15739                   </author>
15740                 </authorgroup>
15741                 <title>Dynamic Updates in the Domain Name System</title>
15742                 <pubdate>April 1997</pubdate>
15743               </biblioentry>
15744               <biblioentry>
15745                 <abbrev>RFC2671</abbrev>
15746                 <authorgroup>
15747                   <author>
15748                     <firstname>P.</firstname>
15749                     <surname>Vixie</surname>
15750                   </author>
15751                 </authorgroup>
15752                 <title>Extension Mechanisms for DNS (EDNS0)</title>
15753                 <pubdate>August 1997</pubdate>
15754               </biblioentry>
15755               <biblioentry>
15756                 <abbrev>RFC2672</abbrev>
15757                 <authorgroup>
15758                   <author>
15759                     <firstname>M.</firstname>
15760                     <surname>Crawford</surname>
15761                   </author>
15762                 </authorgroup>
15763                 <title>Non-Terminal DNS Name Redirection</title>
15764                 <pubdate>August 1999</pubdate>
15765               </biblioentry>
15766               <biblioentry>
15767                 <abbrev>RFC2845</abbrev>
15768                 <authorgroup>
15769                   <author>
15770                     <surname>Vixie</surname>
15771                     <firstname>P.</firstname>
15772                   </author>
15773                   <author>
15774                     <firstname>O.</firstname>
15775                     <surname>Gudmundsson</surname>
15776                   </author>
15777                   <author>
15778                     <firstname>D.</firstname>
15779                     <surname>Eastlake</surname>
15780                     <lineage>3rd</lineage>
15781                   </author>
15782                   <author>
15783                     <firstname>B.</firstname>
15784                     <surname>Wellington</surname>
15785                   </author>
15786                 </authorgroup>
15787                 <title>Secret Key Transaction Authentication for <acronym>DNS</acronym> (TSIG)</title>
15788                 <pubdate>May 2000</pubdate>
15789               </biblioentry>
15790               <biblioentry>
15791                 <abbrev>RFC2930</abbrev>
15792                 <authorgroup>
15793                   <author>
15794                     <firstname>D.</firstname>
15795                     <surname>Eastlake</surname>
15796                     <lineage>3rd</lineage>
15797                   </author>
15798                 </authorgroup>
15799                 <title>Secret Key Establishment for DNS (TKEY RR)</title>
15800                 <pubdate>September 2000</pubdate>
15801               </biblioentry>
15802               <biblioentry>
15803                 <abbrev>RFC2931</abbrev>
15804                 <authorgroup>
15805                   <author>
15806                     <firstname>D.</firstname>
15807                     <surname>Eastlake</surname>
15808                     <lineage>3rd</lineage>
15809                   </author>
15810                 </authorgroup>
15811                 <title>DNS Request and Transaction Signatures (SIG(0)s)</title>
15812                 <pubdate>September 2000</pubdate>
15813               </biblioentry>
15814               <biblioentry>
15815                 <abbrev>RFC3007</abbrev>
15816                 <authorgroup>
15817                   <author>
15818                     <firstname>B.</firstname>
15819                     <surname>Wellington</surname>
15820                   </author>
15821                 </authorgroup>
15822                 <title>Secure Domain Name System (DNS) Dynamic Update</title>
15823                 <pubdate>November 2000</pubdate>
15824               </biblioentry>
15825               <biblioentry>
15826                 <abbrev>RFC3645</abbrev>
15827                 <authorgroup>
15828                   <author>
15829                     <firstname>S.</firstname>
15830                     <surname>Kwan</surname>
15831                   </author>
15832                   <author>
15833                     <firstname>P.</firstname>
15834                     <surname>Garg</surname>
15835                   </author>
15836                   <author>
15837                     <firstname>J.</firstname>
15838                     <surname>Gilroy</surname>
15839                   </author>
15840                   <author>
15841                     <firstname>L.</firstname>
15842                     <surname>Esibov</surname>
15843                   </author>
15844                   <author>
15845                     <firstname>J.</firstname>
15846                     <surname>Westhead</surname>
15847                   </author>
15848                   <author>
15849                     <firstname>R.</firstname>
15850                     <surname>Hall</surname>
15851                   </author>
15852                 </authorgroup>
15853                 <title>Generic Security Service Algorithm for Secret
15854                        Key Transaction Authentication for DNS
15855                        (GSS-TSIG)</title>
15856                 <pubdate>October 2003</pubdate>
15857               </biblioentry>
15858             </bibliodiv>
15859             <bibliodiv>
15860               <title><acronym>DNS</acronym> Security Proposed Standards</title>
15861               <biblioentry>
15862                 <abbrev>RFC3225</abbrev>
15863                 <authorgroup>
15864                   <author>
15865                     <firstname>D.</firstname>
15866                     <surname>Conrad</surname>
15867                   </author>
15868                 </authorgroup>
15869                 <title>Indicating Resolver Support of DNSSEC</title>
15870                 <pubdate>December 2001</pubdate>
15871               </biblioentry>
15872               <biblioentry>
15873                 <abbrev>RFC3833</abbrev>
15874                 <authorgroup>
15875                   <author>
15876                     <firstname>D.</firstname>
15877                     <surname>Atkins</surname>
15878                   </author>
15879                   <author>
15880                     <firstname>R.</firstname>
15881                     <surname>Austein</surname>
15882                   </author>
15883                 </authorgroup>
15884                 <title>Threat Analysis of the Domain Name System (DNS)</title>
15885                 <pubdate>August 2004</pubdate>
15886               </biblioentry>
15887               <biblioentry>
15888                 <abbrev>RFC4033</abbrev>
15889                 <authorgroup>
15890                   <author>
15891                     <firstname>R.</firstname>
15892                     <surname>Arends</surname>
15893                   </author>
15894                   <author>
15895                     <firstname>R.</firstname>
15896                     <surname>Austein</surname>
15897                   </author>
15898                   <author>
15899                     <firstname>M.</firstname>
15900                     <surname>Larson</surname>
15901                   </author>
15902                   <author>
15903                     <firstname>D.</firstname>
15904                     <surname>Massey</surname>
15905                   </author>
15906                   <author>
15907                     <firstname>S.</firstname>
15908                     <surname>Rose</surname>
15909                   </author>
15910                 </authorgroup>
15911                 <title>DNS Security Introduction and Requirements</title>
15912                 <pubdate>March 2005</pubdate>
15913               </biblioentry>
15914               <biblioentry>
15915                 <abbrev>RFC4034</abbrev>
15916                 <authorgroup>
15917                   <author>
15918                     <firstname>R.</firstname>
15919                     <surname>Arends</surname>
15920                   </author>
15921                   <author>
15922                     <firstname>R.</firstname>
15923                     <surname>Austein</surname>
15924                   </author>
15925                   <author>
15926                     <firstname>M.</firstname>
15927                     <surname>Larson</surname>
15928                   </author>
15929                   <author>
15930                     <firstname>D.</firstname>
15931                     <surname>Massey</surname>
15932                   </author>
15933                   <author>
15934                     <firstname>S.</firstname>
15935                     <surname>Rose</surname>
15936                   </author>
15937                 </authorgroup>
15938                 <title>Resource Records for the DNS Security Extensions</title>
15939                 <pubdate>March 2005</pubdate>
15940               </biblioentry>
15941               <biblioentry>
15942                 <abbrev>RFC4035</abbrev>
15943                 <authorgroup>
15944                   <author>
15945                     <firstname>R.</firstname>
15946                     <surname>Arends</surname>
15947                   </author>
15948                   <author>
15949                     <firstname>R.</firstname>
15950                     <surname>Austein</surname>
15951                   </author>
15952                   <author>
15953                     <firstname>M.</firstname>
15954                     <surname>Larson</surname>
15955                   </author>
15956                   <author>
15957                     <firstname>D.</firstname>
15958                     <surname>Massey</surname>
15959                   </author>
15960                   <author>
15961                     <firstname>S.</firstname>
15962                     <surname>Rose</surname>
15963                   </author>
15964                 </authorgroup>
15965                 <title>Protocol Modifications for the DNS
15966                        Security Extensions</title>
15967                 <pubdate>March 2005</pubdate>
15968               </biblioentry>
15969             </bibliodiv>
15970             <bibliodiv>
15971               <title>Other Important RFCs About <acronym>DNS</acronym>
15972                 Implementation</title>
15973               <biblioentry>
15974                 <abbrev>RFC1535</abbrev>
15975                 <author>
15976                   <surname>Gavron</surname>
15977                   <firstname>E.</firstname>
15978                 </author>
15979                 <title>A Security Problem and Proposed Correction With Widely
15980                   Deployed <acronym>DNS</acronym> Software.</title>
15981                 <pubdate>October 1993</pubdate>
15982               </biblioentry>
15983               <biblioentry>
15984                 <abbrev>RFC1536</abbrev>
15985                 <authorgroup>
15986                   <author>
15987                     <surname>Kumar</surname>
15988                     <firstname>A.</firstname>
15989                   </author>
15990                   <author>
15991                     <firstname>J.</firstname>
15992                     <surname>Postel</surname>
15993                   </author>
15994                   <author>
15995                     <firstname>C.</firstname>
15996                     <surname>Neuman</surname>
15997                   </author>
15998                   <author>
15999                     <firstname>P.</firstname>
16000                     <surname>Danzig</surname>
16001                   </author>
16002                   <author>
16003                     <firstname>S.</firstname>
16004                     <surname>Miller</surname>
16005                   </author>
16006                 </authorgroup>
16007                 <title>Common <acronym>DNS</acronym> Implementation
16008                   Errors and Suggested Fixes</title>
16009                 <pubdate>October 1993</pubdate>
16010               </biblioentry>
16011               <biblioentry>
16012                 <abbrev>RFC1982</abbrev>
16013                 <authorgroup>
16014                   <author>
16015                     <surname>Elz</surname>
16016                     <firstname>R.</firstname>
16017                   </author>
16018                   <author>
16019                     <firstname>R.</firstname>
16020                     <surname>Bush</surname>
16021                   </author>
16022                 </authorgroup>
16023                 <title>Serial Number Arithmetic</title>
16024                 <pubdate>August 1996</pubdate>
16025               </biblioentry>
16026               <biblioentry>
16027                 <abbrev>RFC4074</abbrev>
16028                 <authorgroup>
16029                   <author>
16030                     <surname>Morishita</surname>
16031                     <firstname>Y.</firstname>
16032                   </author>
16033                   <author>
16034                     <firstname>T.</firstname>
16035                     <surname>Jinmei</surname>
16036                   </author>
16037                 </authorgroup>
16038                 <title>Common Misbehaviour Against <acronym>DNS</acronym>
16039                 Queries for IPv6 Addresses</title>
16040                 <pubdate>May 2005</pubdate>
16041               </biblioentry>
16042             </bibliodiv>
16043             <bibliodiv>
16044               <title>Resource Record Types</title>
16045               <biblioentry>
16046                 <abbrev>RFC1183</abbrev>
16047                 <authorgroup>
16048                   <author>
16049                     <surname>Everhart</surname>
16050                     <firstname>C.F.</firstname>
16051                   </author>
16052                   <author>
16053                     <firstname>L. A.</firstname>
16054                     <surname>Mamakos</surname>
16055                   </author>
16056                   <author>
16057                     <firstname>R.</firstname>
16058                     <surname>Ullmann</surname>
16059                   </author>
16060                   <author>
16061                     <firstname>P.</firstname>
16062                     <surname>Mockapetris</surname>
16063                   </author>
16064                 </authorgroup>
16065                 <title>New <acronym>DNS</acronym> RR Definitions</title>
16066                 <pubdate>October 1990</pubdate>
16067               </biblioentry>
16068               <biblioentry>
16069                 <abbrev>RFC1706</abbrev>
16070                 <authorgroup>
16071                   <author>
16072                     <surname>Manning</surname>
16073                     <firstname>B.</firstname>
16074                   </author>
16075                   <author>
16076                     <firstname>R.</firstname>
16077                     <surname>Colella</surname>
16078                   </author>
16079                 </authorgroup>
16080                 <title><acronym>DNS</acronym> NSAP Resource Records</title>
16081                 <pubdate>October 1994</pubdate>
16082               </biblioentry>
16083               <biblioentry>
16084                 <abbrev>RFC2168</abbrev>
16085                 <authorgroup>
16086                   <author>
16087                     <surname>Daniel</surname>
16088                     <firstname>R.</firstname>
16089                   </author>
16090                   <author>
16091                     <firstname>M.</firstname>
16092                     <surname>Mealling</surname>
16093                   </author>
16094                 </authorgroup>
16095                 <title>Resolution of Uniform Resource Identifiers using
16096                   the Domain Name System</title>
16097                 <pubdate>June 1997</pubdate>
16098               </biblioentry>
16099               <biblioentry>
16100                 <abbrev>RFC1876</abbrev>
16101                 <authorgroup>
16102                   <author>
16103                     <surname>Davis</surname>
16104                     <firstname>C.</firstname>
16105                   </author>
16106                   <author>
16107                     <firstname>P.</firstname>
16108                     <surname>Vixie</surname>
16109                   </author>
16110                   <author>
16111                     <firstname>T.</firstname>
16112                     <firstname>Goodwin</firstname>
16113                   </author>
16114                   <author>
16115                     <firstname>I.</firstname>
16116                     <surname>Dickinson</surname>
16117                   </author>
16118                 </authorgroup>
16119                 <title>A Means for Expressing Location Information in the
16120                   Domain
16121                   Name System</title>
16122                 <pubdate>January 1996</pubdate>
16123               </biblioentry>
16124               <biblioentry>
16125                 <abbrev>RFC2052</abbrev>
16126                 <authorgroup>
16127                   <author>
16128                     <surname>Gulbrandsen</surname>
16129                     <firstname>A.</firstname>
16130                   </author>
16131                   <author>
16132                     <firstname>P.</firstname>
16133                     <surname>Vixie</surname>
16134                   </author>
16135                 </authorgroup>
16136                 <title>A <acronym>DNS</acronym> RR for Specifying the
16137                   Location of
16138                   Services.</title>
16139                 <pubdate>October 1996</pubdate>
16140               </biblioentry>
16141               <biblioentry>
16142                 <abbrev>RFC2163</abbrev>
16143                 <author>
16144                   <surname>Allocchio</surname>
16145                   <firstname>A.</firstname>
16146                 </author>
16147                 <title>Using the Internet <acronym>DNS</acronym> to
16148                   Distribute MIXER
16149                   Conformant Global Address Mapping</title>
16150                 <pubdate>January 1998</pubdate>
16151               </biblioentry>
16152               <biblioentry>
16153                 <abbrev>RFC2230</abbrev>
16154                 <author>
16155                   <surname>Atkinson</surname>
16156                   <firstname>R.</firstname>
16157                 </author>
16158                 <title>Key Exchange Delegation Record for the <acronym>DNS</acronym></title>
16159                 <pubdate>October 1997</pubdate>
16160               </biblioentry>
16161               <biblioentry>
16162                 <abbrev>RFC2536</abbrev>
16163                 <author>
16164                   <surname>Eastlake</surname>
16165                   <firstname>D.</firstname>
16166                   <lineage>3rd</lineage>
16167                 </author>
16168                 <title>DSA KEYs and SIGs in the Domain Name System (DNS)</title>
16169                 <pubdate>March 1999</pubdate>
16170               </biblioentry>
16171               <biblioentry>
16172                 <abbrev>RFC2537</abbrev>
16173                 <author>
16174                   <surname>Eastlake</surname>
16175                   <firstname>D.</firstname>
16176                   <lineage>3rd</lineage>
16177                 </author>
16178                 <title>RSA/MD5 KEYs and SIGs in the Domain Name System (DNS)</title>
16179                 <pubdate>March 1999</pubdate>
16180               </biblioentry>
16181               <biblioentry>
16182                 <abbrev>RFC2538</abbrev>
16183                 <authorgroup>
16184                   <author>
16185                     <surname>Eastlake</surname>
16186                     <firstname>D.</firstname>
16187                     <lineage>3rd</lineage>
16188                   </author>
16189                   <author>
16190                     <surname>Gudmundsson</surname>
16191                     <firstname>O.</firstname>
16192                   </author>
16193                 </authorgroup>
16194                 <title>Storing Certificates in the Domain Name System (DNS)</title>
16195                 <pubdate>March 1999</pubdate>
16196               </biblioentry>
16197               <biblioentry>
16198                 <abbrev>RFC2539</abbrev>
16199                 <authorgroup>
16200                   <author>
16201                     <surname>Eastlake</surname>
16202                     <firstname>D.</firstname>
16203                     <lineage>3rd</lineage>
16204                   </author>
16205                 </authorgroup>
16206                 <title>Storage of Diffie-Hellman Keys in the Domain Name System (DNS)</title>
16207                 <pubdate>March 1999</pubdate>
16208               </biblioentry>
16209               <biblioentry>
16210                 <abbrev>RFC2540</abbrev>
16211                 <authorgroup>
16212                   <author>
16213                     <surname>Eastlake</surname>
16214                     <firstname>D.</firstname>
16215                     <lineage>3rd</lineage>
16216                   </author>
16217                 </authorgroup>
16218                 <title>Detached Domain Name System (DNS) Information</title>
16219                 <pubdate>March 1999</pubdate>
16220               </biblioentry>
16221               <biblioentry>
16222                 <abbrev>RFC2782</abbrev>
16223                 <author>
16224                   <surname>Gulbrandsen</surname>
16225                   <firstname>A.</firstname>
16226                 </author>
16227                 <author>
16228                   <surname>Vixie</surname>
16229                   <firstname>P.</firstname>
16230                 </author>
16231                 <author>
16232                   <surname>Esibov</surname>
16233                   <firstname>L.</firstname>
16234                 </author>
16235                 <title>A DNS RR for specifying the location of services (DNS SRV)</title>
16236                 <pubdate>February 2000</pubdate>
16237               </biblioentry>
16238               <biblioentry>
16239                 <abbrev>RFC2915</abbrev>
16240                 <author>
16241                   <surname>Mealling</surname>
16242                   <firstname>M.</firstname>
16243                 </author>
16244                 <author>
16245                   <surname>Daniel</surname>
16246                   <firstname>R.</firstname>
16247                 </author>
16248                 <title>The Naming Authority Pointer (NAPTR) DNS Resource Record</title>
16249                 <pubdate>September 2000</pubdate>
16250               </biblioentry>
16251               <biblioentry>
16252                 <abbrev>RFC3110</abbrev>
16253                 <author>
16254                     <surname>Eastlake</surname>
16255                     <firstname>D.</firstname>
16256                     <lineage>3rd</lineage>
16257                 </author>
16258                 <title>RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS)</title>
16259                 <pubdate>May 2001</pubdate>
16260               </biblioentry>
16261               <biblioentry>
16262                 <abbrev>RFC3123</abbrev>
16263                 <author>
16264                   <surname>Koch</surname>
16265                   <firstname>P.</firstname>
16266                 </author>
16267                 <title>A DNS RR Type for Lists of Address Prefixes (APL RR)</title>
16268                 <pubdate>June 2001</pubdate>
16269               </biblioentry>
16270               <biblioentry>
16271                 <abbrev>RFC3596</abbrev>
16272                 <authorgroup>
16273                   <author>
16274                     <surname>Thomson</surname>
16275                     <firstname>S.</firstname>
16276                   </author>
16277                   <author>
16278                     <firstname>C.</firstname>
16279                     <surname>Huitema</surname>
16280                   </author>
16281                   <author>
16282                     <firstname>V.</firstname>
16283                     <surname>Ksinant</surname>
16284                   </author>
16285                   <author>
16286                     <firstname>M.</firstname>
16287                     <surname>Souissi</surname>
16288                   </author>
16289                 </authorgroup>
16290                 <title><acronym>DNS</acronym> Extensions to support IP
16291                   version 6</title>
16292                 <pubdate>October 2003</pubdate>
16293               </biblioentry>
16294               <biblioentry>
16295                 <abbrev>RFC3597</abbrev>
16296                 <author>
16297                   <surname>Gustafsson</surname>
16298                   <firstname>A.</firstname>
16299                 </author>
16300                 <title>Handling of Unknown DNS Resource Record (RR) Types</title>
16301                 <pubdate>September 2003</pubdate>
16302               </biblioentry>
16303             </bibliodiv>
16304             <bibliodiv>
16305               <title><acronym>DNS</acronym> and the Internet</title>
16306               <biblioentry>
16307                 <abbrev>RFC1101</abbrev>
16308                 <author>
16309                   <surname>Mockapetris</surname>
16310                   <firstname>P. V.</firstname>
16311                 </author>
16312                 <title><acronym>DNS</acronym> Encoding of Network Names
16313                   and Other Types</title>
16314                 <pubdate>April 1989</pubdate>
16315               </biblioentry>
16316               <biblioentry>
16317                 <abbrev>RFC1123</abbrev>
16318                 <author>
16319                   <surname>Braden</surname>
16320                   <surname>R.</surname>
16321                 </author>
16322                 <title>Requirements for Internet Hosts - Application and
16323                   Support</title>
16324                 <pubdate>October 1989</pubdate>
16325               </biblioentry>
16326               <biblioentry>
16327                 <abbrev>RFC1591</abbrev>
16328                 <author>
16329                   <surname>Postel</surname>
16330                   <firstname>J.</firstname>
16331                 </author>
16332                 <title>Domain Name System Structure and Delegation</title>
16333                 <pubdate>March 1994</pubdate>
16334               </biblioentry>
16335               <biblioentry>
16336                 <abbrev>RFC2317</abbrev>
16337                 <authorgroup>
16338                   <author>
16339                     <surname>Eidnes</surname>
16340                     <firstname>H.</firstname>
16341                   </author>
16342                   <author>
16343                     <firstname>G.</firstname>
16344                     <surname>de Groot</surname>
16345                   </author>
16346                   <author>
16347                     <firstname>P.</firstname>
16348                     <surname>Vixie</surname>
16349                   </author>
16350                 </authorgroup>
16351                 <title>Classless IN-ADDR.ARPA Delegation</title>
16352                 <pubdate>March 1998</pubdate>
16353               </biblioentry>
16354               <biblioentry>
16355                 <abbrev>RFC2826</abbrev>
16356                 <authorgroup>
16357                   <author>
16358                     <surname>Internet Architecture Board</surname>
16359                   </author>
16360                 </authorgroup>
16361                 <title>IAB Technical Comment on the Unique DNS Root</title>
16362                 <pubdate>May 2000</pubdate>
16363               </biblioentry>
16364               <biblioentry>
16365                 <abbrev>RFC2929</abbrev>
16366                 <authorgroup>
16367                   <author>
16368                     <surname>Eastlake</surname>
16369                     <firstname>D.</firstname>
16370                     <lineage>3rd</lineage>
16371                   </author>
16372                   <author>
16373                     <surname>Brunner-Williams</surname>
16374                     <firstname>E.</firstname>
16375                   </author>
16376                   <author>
16377                     <surname>Manning</surname>
16378                     <firstname>B.</firstname>
16379                   </author>
16380                 </authorgroup>
16381                 <title>Domain Name System (DNS) IANA Considerations</title>
16382                 <pubdate>September 2000</pubdate>
16383               </biblioentry>
16384             </bibliodiv>
16385             <bibliodiv>
16386               <title><acronym>DNS</acronym> Operations</title>
16387               <biblioentry>
16388                 <abbrev>RFC1033</abbrev>
16389                 <author>
16390                   <surname>Lottor</surname>
16391                   <firstname>M.</firstname>
16392                 </author>
16393                 <title>Domain administrators operations guide.</title>
16394                 <pubdate>November 1987</pubdate>
16395               </biblioentry>
16396               <biblioentry>
16397                 <abbrev>RFC1537</abbrev>
16398                 <author>
16399                   <surname>Beertema</surname>
16400                   <firstname>P.</firstname>
16401                 </author>
16402                 <title>Common <acronym>DNS</acronym> Data File
16403                   Configuration Errors</title>
16404                 <pubdate>October 1993</pubdate>
16405               </biblioentry>
16406               <biblioentry>
16407                 <abbrev>RFC1912</abbrev>
16408                 <author>
16409                   <surname>Barr</surname>
16410                   <firstname>D.</firstname>
16411                 </author>
16412                 <title>Common <acronym>DNS</acronym> Operational and
16413                   Configuration Errors</title>
16414                 <pubdate>February 1996</pubdate>
16415               </biblioentry>
16416               <biblioentry>
16417                 <abbrev>RFC2010</abbrev>
16418                 <authorgroup>
16419                   <author>
16420                     <surname>Manning</surname>
16421                     <firstname>B.</firstname>
16422                   </author>
16423                   <author>
16424                     <firstname>P.</firstname>
16425                     <surname>Vixie</surname>
16426                   </author>
16427                 </authorgroup>
16428                 <title>Operational Criteria for Root Name Servers.</title>
16429                 <pubdate>October 1996</pubdate>
16430               </biblioentry>
16431               <biblioentry>
16432                 <abbrev>RFC2219</abbrev>
16433                 <authorgroup>
16434                   <author>
16435                     <surname>Hamilton</surname>
16436                     <firstname>M.</firstname>
16437                   </author>
16438                   <author>
16439                     <firstname>R.</firstname>
16440                     <surname>Wright</surname>
16441                   </author>
16442                 </authorgroup>
16443                 <title>Use of <acronym>DNS</acronym> Aliases for
16444                   Network Services.</title>
16445                 <pubdate>October 1997</pubdate>
16446               </biblioentry>
16447             </bibliodiv>
16448             <bibliodiv>
16449               <title>Internationalized Domain Names</title>
16450               <biblioentry>
16451                 <abbrev>RFC2825</abbrev>
16452                 <authorgroup>
16453                   <author>
16454                     <surname>IAB</surname>
16455                   </author>
16456                   <author>
16457                     <surname>Daigle</surname>
16458                     <firstname>R.</firstname>
16459                   </author>
16460                 </authorgroup>
16461                 <title>A Tangled Web: Issues of I18N, Domain Names,
16462                        and the Other Internet protocols</title>
16463                 <pubdate>May 2000</pubdate>
16464               </biblioentry>
16465               <biblioentry>
16466                 <abbrev>RFC3490</abbrev>
16467                 <authorgroup>
16468                   <author>
16469                     <surname>Faltstrom</surname>
16470                     <firstname>P.</firstname>
16471                   </author>
16472                   <author>
16473                     <surname>Hoffman</surname>
16474                     <firstname>P.</firstname>
16475                   </author>
16476                   <author>
16477                     <surname>Costello</surname>
16478                     <firstname>A.</firstname>
16479                   </author>
16480                 </authorgroup>
16481                 <title>Internationalizing Domain Names in Applications (IDNA)</title>
16482                 <pubdate>March 2003</pubdate>
16483               </biblioentry>
16484               <biblioentry>
16485                 <abbrev>RFC3491</abbrev>
16486                 <authorgroup>
16487                   <author>
16488                     <surname>Hoffman</surname>
16489                     <firstname>P.</firstname>
16490                   </author>
16491                   <author>
16492                     <surname>Blanchet</surname>
16493                     <firstname>M.</firstname>
16494                   </author>
16495                 </authorgroup>
16496                 <title>Nameprep: A Stringprep Profile for Internationalized Domain Names</title>
16497                 <pubdate>March 2003</pubdate>
16498               </biblioentry>
16499               <biblioentry>
16500                 <abbrev>RFC3492</abbrev>
16501                 <authorgroup>
16502                   <author>
16503                     <surname>Costello</surname>
16504                     <firstname>A.</firstname>
16505                   </author>
16506                 </authorgroup>
16507                 <title>Punycode: A Bootstring encoding of Unicode
16508                        for Internationalized Domain Names in
16509                        Applications (IDNA)</title>
16510                 <pubdate>March 2003</pubdate>
16511               </biblioentry>
16512             </bibliodiv>
16513             <bibliodiv>
16514               <title>Other <acronym>DNS</acronym>-related RFCs</title>
16515               <note>
16516                 <para>
16517                   Note: the following list of RFCs, although
16518                   <acronym>DNS</acronym>-related, are not
16519                   concerned with implementing software.
16520                 </para>
16521               </note>
16522               <biblioentry>
16523                 <abbrev>RFC1464</abbrev>
16524                 <author>
16525                   <surname>Rosenbaum</surname>
16526                   <firstname>R.</firstname>
16527                 </author>
16528                 <title>Using the Domain Name System To Store Arbitrary String
16529                   Attributes</title>
16530                 <pubdate>May 1993</pubdate>
16531               </biblioentry>
16532               <biblioentry>
16533                 <abbrev>RFC1713</abbrev>
16534                 <author>
16535                   <surname>Romao</surname>
16536                   <firstname>A.</firstname>
16537                 </author>
16538                 <title>Tools for <acronym>DNS</acronym> Debugging</title>
16539                 <pubdate>November 1994</pubdate>
16540               </biblioentry>
16541               <biblioentry>
16542                 <abbrev>RFC1794</abbrev>
16543                 <author>
16544                   <surname>Brisco</surname>
16545                   <firstname>T.</firstname>
16546                 </author>
16547                 <title><acronym>DNS</acronym> Support for Load
16548                   Balancing</title>
16549                 <pubdate>April 1995</pubdate>
16550               </biblioentry>
16551               <biblioentry>
16552                 <abbrev>RFC2240</abbrev>
16553                 <author>
16554                   <surname>Vaughan</surname>
16555                   <firstname>O.</firstname>
16556                 </author>
16557                 <title>A Legal Basis for Domain Name Allocation</title>
16558                 <pubdate>November 1997</pubdate>
16559               </biblioentry>
16560               <biblioentry>
16561                 <abbrev>RFC2345</abbrev>
16562                 <authorgroup>
16563                   <author>
16564                     <surname>Klensin</surname>
16565                     <firstname>J.</firstname>
16566                   </author>
16567                   <author>
16568                     <firstname>T.</firstname>
16569                     <surname>Wolf</surname>
16570                   </author>
16571                   <author>
16572                     <firstname>G.</firstname>
16573                     <surname>Oglesby</surname>
16574                   </author>
16575                 </authorgroup>
16576                 <title>Domain Names and Company Name Retrieval</title>
16577                 <pubdate>May 1998</pubdate>
16578               </biblioentry>
16579               <biblioentry>
16580                 <abbrev>RFC2352</abbrev>
16581                 <author>
16582                   <surname>Vaughan</surname>
16583                   <firstname>O.</firstname>
16584                 </author>
16585                 <title>A Convention For Using Legal Names as Domain Names</title>
16586                 <pubdate>May 1998</pubdate>
16587               </biblioentry>
16588               <biblioentry>
16589                 <abbrev>RFC3071</abbrev>
16590                 <authorgroup>
16591                   <author>
16592                     <surname>Klensin</surname>
16593                     <firstname>J.</firstname>
16594                   </author>
16595                 </authorgroup>
16596                 <title>Reflections on the DNS, RFC 1591, and Categories of Domains</title>
16597                 <pubdate>February 2001</pubdate>
16598               </biblioentry>
16599               <biblioentry>
16600                 <abbrev>RFC3258</abbrev>
16601                 <authorgroup>
16602                   <author>
16603                     <surname>Hardie</surname>
16604                     <firstname>T.</firstname>
16605                   </author>
16606                 </authorgroup>
16607                 <title>Distributing Authoritative Name Servers via
16608                        Shared Unicast Addresses</title>
16609                 <pubdate>April 2002</pubdate>
16610               </biblioentry>
16611               <biblioentry>
16612                 <abbrev>RFC3901</abbrev>
16613                 <authorgroup>
16614                   <author>
16615                     <surname>Durand</surname>
16616                     <firstname>A.</firstname>
16617                   </author>
16618                   <author>
16619                     <firstname>J.</firstname>
16620                     <surname>Ihren</surname>
16621                   </author>
16622                 </authorgroup>
16623                 <title>DNS IPv6 Transport Operational Guidelines</title>
16624                 <pubdate>September 2004</pubdate>
16625               </biblioentry>
16626             </bibliodiv>
16627             <bibliodiv>
16628               <title>Obsolete and Unimplemented Experimental RFC</title>
16629               <biblioentry>
16630                 <abbrev>RFC1712</abbrev>
16631                 <authorgroup>
16632                   <author>
16633                     <surname>Farrell</surname>
16634                     <firstname>C.</firstname>
16635                   </author>
16636                   <author>
16637                     <firstname>M.</firstname>
16638                     <surname>Schulze</surname>
16639                   </author>
16640                   <author>
16641                     <firstname>S.</firstname>
16642                     <surname>Pleitner</surname>
16643                   </author>
16644                   <author>
16645                     <firstname>D.</firstname>
16646                     <surname>Baldoni</surname>
16647                   </author>
16648                 </authorgroup>
16649                 <title><acronym>DNS</acronym> Encoding of Geographical
16650                   Location</title>
16651                 <pubdate>November 1994</pubdate>
16652               </biblioentry>
16653               <biblioentry>
16654                 <abbrev>RFC2673</abbrev>
16655                 <authorgroup>
16656                   <author>
16657                     <surname>Crawford</surname>
16658                     <firstname>M.</firstname>
16659                   </author>
16660                 </authorgroup>
16661                 <title>Binary Labels in the Domain Name System</title>
16662                 <pubdate>August 1999</pubdate>
16663               </biblioentry>
16664               <biblioentry>
16665                 <abbrev>RFC2874</abbrev>
16666                 <authorgroup>
16667                   <author>
16668                     <surname>Crawford</surname>
16669                     <firstname>M.</firstname>
16670                   </author>
16671                   <author>
16672                     <surname>Huitema</surname>
16673                     <firstname>C.</firstname>
16674                   </author>
16675                 </authorgroup>
16676                 <title>DNS Extensions to Support IPv6 Address Aggregation
16677                        and Renumbering</title>
16678                 <pubdate>July 2000</pubdate>
16679               </biblioentry>
16680             </bibliodiv>
16681             <bibliodiv>
16682               <title>Obsoleted DNS Security RFCs</title>
16683               <note>
16684                 <para>
16685                   Most of these have been consolidated into RFC4033,
16686                   RFC4034 and RFC4035 which collectively describe DNSSECbis.
16687                 </para>
16688               </note>
16689               <biblioentry>
16690                 <abbrev>RFC2065</abbrev>
16691                 <authorgroup>
16692                   <author>
16693                     <surname>Eastlake</surname>
16694                     <lineage>3rd</lineage>
16695                     <firstname>D.</firstname>
16696                   </author>
16697                   <author>
16698                     <firstname>C.</firstname>
16699                     <surname>Kaufman</surname>
16700                   </author>
16701                 </authorgroup>
16702                 <title>Domain Name System Security Extensions</title>
16703                 <pubdate>January 1997</pubdate>
16704               </biblioentry>
16705               <biblioentry>
16706                 <abbrev>RFC2137</abbrev>
16707                 <author>
16708                   <surname>Eastlake</surname>
16709                   <lineage>3rd</lineage>
16710                   <firstname>D.</firstname>
16711                 </author>
16712                 <title>Secure Domain Name System Dynamic Update</title>
16713                 <pubdate>April 1997</pubdate>
16714               </biblioentry>
16715               <biblioentry>
16716                 <abbrev>RFC2535</abbrev>
16717                 <authorgroup>
16718                   <author>
16719                     <surname>Eastlake</surname>
16720                     <lineage>3rd</lineage>
16721                     <firstname>D.</firstname>
16722                   </author>
16723                 </authorgroup>
16724                 <title>Domain Name System Security Extensions</title>
16725                 <pubdate>March 1999</pubdate>
16726               </biblioentry>
16727               <biblioentry>
16728                 <abbrev>RFC3008</abbrev>
16729                 <authorgroup>
16730                   <author>
16731                     <surname>Wellington</surname>
16732                     <firstname>B.</firstname>
16733                   </author>
16734                 </authorgroup>
16735                 <title>Domain Name System Security (DNSSEC)
16736                        Signing Authority</title>
16737                 <pubdate>November 2000</pubdate>
16738               </biblioentry>
16739               <biblioentry>
16740                 <abbrev>RFC3090</abbrev>
16741                 <authorgroup>
16742                   <author>
16743                     <surname>Lewis</surname>
16744                     <firstname>E.</firstname>
16745                   </author>
16746                 </authorgroup>
16747                 <title>DNS Security Extension Clarification on Zone Status</title>
16748                 <pubdate>March 2001</pubdate>
16749               </biblioentry>
16750               <biblioentry>
16751                 <abbrev>RFC3445</abbrev>
16752                 <authorgroup>
16753                   <author>
16754                     <surname>Massey</surname>
16755                     <firstname>D.</firstname>
16756                   </author>
16757                   <author>
16758                     <surname>Rose</surname>
16759                     <firstname>S.</firstname>
16760                   </author>
16761                 </authorgroup>
16762                 <title>Limiting the Scope of the KEY Resource Record (RR)</title>
16763                 <pubdate>December 2002</pubdate>
16764               </biblioentry>
16765               <biblioentry>
16766                 <abbrev>RFC3655</abbrev>
16767                 <authorgroup>
16768                   <author>
16769                     <surname>Wellington</surname>
16770                     <firstname>B.</firstname>
16771                   </author>
16772                   <author>
16773                     <surname>Gudmundsson</surname>
16774                     <firstname>O.</firstname>
16775                   </author>
16776                 </authorgroup>
16777                 <title>Redefinition of DNS Authenticated Data (AD) bit</title>
16778                 <pubdate>November 2003</pubdate>
16779               </biblioentry>
16780               <biblioentry>
16781                 <abbrev>RFC3658</abbrev>
16782                 <authorgroup>
16783                   <author>
16784                     <surname>Gudmundsson</surname>
16785                     <firstname>O.</firstname>
16786                   </author>
16787                 </authorgroup>
16788                 <title>Delegation Signer (DS) Resource Record (RR)</title>
16789                 <pubdate>December 2003</pubdate>
16790               </biblioentry>
16791               <biblioentry>
16792                 <abbrev>RFC3755</abbrev>
16793                 <authorgroup>
16794                   <author>
16795                     <surname>Weiler</surname>
16796                     <firstname>S.</firstname>
16797                   </author>
16798                 </authorgroup>
16799                 <title>Legacy Resolver Compatibility for Delegation Signer (DS)</title>
16800                 <pubdate>May 2004</pubdate>
16801               </biblioentry>
16802               <biblioentry>
16803                 <abbrev>RFC3757</abbrev>
16804                 <authorgroup>
16805                   <author>
16806                     <surname>Kolkman</surname>
16807                     <firstname>O.</firstname>
16808                   </author>
16809                   <author>
16810                     <surname>Schlyter</surname>
16811                     <firstname>J.</firstname>
16812                   </author>
16813                   <author>
16814                     <surname>Lewis</surname>
16815                     <firstname>E.</firstname>
16816                   </author>
16817                 </authorgroup>
16818                 <title>Domain Name System KEY (DNSKEY) Resource Record
16819                       (RR) Secure Entry Point (SEP) Flag</title>
16820                 <pubdate>April 2004</pubdate>
16821               </biblioentry>
16822               <biblioentry>
16823                 <abbrev>RFC3845</abbrev>
16824                 <authorgroup>
16825                   <author>
16826                     <surname>Schlyter</surname>
16827                     <firstname>J.</firstname>
16828                   </author>
16829                 </authorgroup>
16830                 <title>DNS Security (DNSSEC) NextSECure (NSEC) RDATA Format</title>
16831                 <pubdate>August 2004</pubdate>
16832               </biblioentry>
16833             </bibliodiv>
16834           </bibliography>
16835         </sect2>
16836         <sect2 id="internet_drafts">
16837           <title>Internet Drafts</title>
16838           <para>
16839             Internet Drafts (IDs) are rough-draft working documents of
16840             the Internet Engineering Task Force. They are, in essence, RFCs
16841             in the preliminary stages of development. Implementors are
16842             cautioned not
16843             to regard IDs as archival, and they should not be quoted or cited
16844             in any formal documents unless accompanied by the disclaimer that
16845             they are "works in progress." IDs have a lifespan of six months
16846             after which they are deleted unless updated by their authors.
16847           </para>
16848         </sect2>
16849         <sect2>
16850           <title>Other Documents About <acronym>BIND</acronym></title>
16851           <para/>
16852           <bibliography>
16853             <biblioentry>
16854               <authorgroup>
16855                 <author>
16856                   <surname>Albitz</surname>
16857                   <firstname>Paul</firstname>
16858                 </author>
16859                 <author>
16860                   <firstname>Cricket</firstname>
16861                   <surname>Liu</surname>
16862                 </author>
16863               </authorgroup>
16864               <title><acronym>DNS</acronym> and <acronym>BIND</acronym></title>
16865               <copyright>
16866                 <year>1998</year>
16867                 <holder>Sebastopol, CA: O'Reilly and Associates</holder>
16868               </copyright>
16869             </biblioentry>
16870           </bibliography>
16871         </sect2>
16872       </sect1>
16873
16874       <xi:include href="libdns.xml"/>
16875
16876     </appendix>
16877
16878
16879     <reference id="Bv9ARM.ch10">
16880       <title>Manual pages</title>
16881       <xi:include href="../../bin/dig/dig.docbook"/>
16882       <xi:include href="../../bin/dig/host.docbook"/>
16883       <xi:include href="../../bin/python/dnssec-checkds.docbook"/>
16884       <xi:include href="../../bin/python/dnssec-coverage.docbook"/>
16885       <xi:include href="../../bin/dnssec/dnssec-dsfromkey.docbook"/>
16886       <xi:include href="../../bin/dnssec/dnssec-keyfromlabel.docbook"/>
16887       <xi:include href="../../bin/dnssec/dnssec-keygen.docbook"/>
16888       <xi:include href="../../bin/dnssec/dnssec-revoke.docbook"/>
16889       <xi:include href="../../bin/dnssec/dnssec-settime.docbook"/>
16890       <xi:include href="../../bin/dnssec/dnssec-signzone.docbook"/>
16891       <xi:include href="../../bin/dnssec/dnssec-verify.docbook"/>
16892       <xi:include href="../../bin/check/named-checkconf.docbook"/>
16893       <xi:include href="../../bin/check/named-checkzone.docbook"/>
16894       <xi:include href="../../bin/named/named.docbook"/>
16895       <xi:include href="../../bin/tools/named-journalprint.docbook"/>
16896       <!-- named.conf.docbook and others? -->
16897       <xi:include href="../../bin/nsupdate/nsupdate.docbook"/>
16898       <xi:include href="../../bin/rndc/rndc.docbook"/>
16899       <xi:include href="../../bin/rndc/rndc.conf.docbook"/>
16900       <xi:include href="../../bin/confgen/rndc-confgen.docbook"/>
16901       <xi:include href="../../bin/confgen/ddns-confgen.docbook"/>
16902       <xi:include href="../../bin/tools/arpaname.docbook"/>
16903       <xi:include href="../../bin/tools/genrandom.docbook"/>
16904       <xi:include href="../../bin/tools/isc-hmac-fixup.docbook"/>
16905       <xi:include href="../../bin/tools/nsec3hash.docbook"/>
16906     </reference>
16907
16908   </book>
16909
16910 <!--
16911   - Local variables:
16912   - mode: sgml
16913   - End:
16914  -->